commit
e89595c017
|
@ -37,19 +37,6 @@ export const updateStatus = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TiTlePermissionButtonStyle = {
|
|
||||||
padding: 0,
|
|
||||||
'max-width': 'calc(100% - 90px)',
|
|
||||||
color: ' #1890ff !important',
|
|
||||||
'font-weight': 700,
|
|
||||||
'font-size': '16px',
|
|
||||||
overflow: 'hidden',
|
|
||||||
'text-overflow': 'ellipsis',
|
|
||||||
'white-space': 'nowrap',
|
|
||||||
width: 'calc(100%-150px)',
|
|
||||||
// width: '60%',
|
|
||||||
};
|
|
||||||
|
|
||||||
export const regOnlyNumber = new RegExp(/^\d+$/);
|
export const regOnlyNumber = new RegExp(/^\d+$/);
|
||||||
|
|
||||||
export const regIP = new RegExp(
|
export const regIP = new RegExp(
|
||||||
|
|
|
@ -45,15 +45,16 @@
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="card-item-content">
|
<div class="card-item-content">
|
||||||
<PermissionButton
|
<Ellipsis style="width: calc(100% - 100px)">
|
||||||
type="link"
|
<span
|
||||||
@click="handlEye(slotProps.id)"
|
style="
|
||||||
hasPermission="DataCollect/Collector:view"
|
font-size: 16px;
|
||||||
:style="TiTlePermissionButtonStyle"
|
font-weight: 600;
|
||||||
>
|
"
|
||||||
{{ slotProps.name }}
|
>
|
||||||
</PermissionButton>
|
{{ slotProps.name }}
|
||||||
|
</span>
|
||||||
|
</Ellipsis>
|
||||||
<j-row class="card-item-content-box">
|
<j-row class="card-item-content-box">
|
||||||
<j-col :span="12">
|
<j-col :span="12">
|
||||||
<div class="card-item-content-text">
|
<div class="card-item-content-text">
|
||||||
|
@ -125,12 +126,8 @@
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { query, remove, update } from '@/api/data-collect/channel';
|
import { query, remove, update } from '@/api/data-collect/channel';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import {
|
import { StatusColorEnum, updateStatus } from './data';
|
||||||
TiTlePermissionButtonStyle,
|
|
||||||
StatusColorEnum,
|
|
||||||
updateStatus,
|
|
||||||
} from './data';
|
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -240,7 +237,7 @@ const getActions = (
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await update(data.id, updateStatus[state]);
|
const res = await update(data.id, updateStatus[state]);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -259,7 +256,7 @@ const getActions = (
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -279,14 +276,11 @@ const handlEdit = (data: object) => {
|
||||||
current.value = _.cloneDeep(data);
|
current.value = _.cloneDeep(data);
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
};
|
};
|
||||||
const handlEye = (id: string) => {
|
|
||||||
menuStory.jumpPage(`DataCollect/Collector`, {}, { channelId: id });
|
|
||||||
};
|
|
||||||
const saveChange = (value: object) => {
|
const saveChange = (value: object) => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -193,13 +193,13 @@
|
||||||
/>
|
/>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
|
|
||||||
<a-form-item label="" :name="['features']">
|
<j-form-item label="" :name="['features']">
|
||||||
<a-checkbox-group v-model:value="formData.features">
|
<j-checkbox-group v-model:value="formData.features">
|
||||||
<a-checkbox value="changedOnly" name="type"
|
<j-checkbox value="changedOnly" name="type"
|
||||||
>只推送变化的数据</a-checkbox
|
>只推送变化的数据</j-checkbox
|
||||||
>
|
>
|
||||||
</a-checkbox-group>
|
</j-checkbox-group>
|
||||||
</a-form-item>
|
</j-form-item>
|
||||||
|
|
||||||
<j-form-item label="说明" :name="['description']">
|
<j-form-item label="说明" :name="['description']">
|
||||||
<j-textarea
|
<j-textarea
|
||||||
|
|
|
@ -63,13 +63,13 @@
|
||||||
addon-after="ms"
|
addon-after="ms"
|
||||||
/>
|
/>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
<a-form-item label="" :name="['features']">
|
<j-form-item label="" :name="['features']">
|
||||||
<a-checkbox-group v-model:value="formData.features">
|
<j-checkbox-group v-model:value="formData.features">
|
||||||
<a-checkbox value="changedOnly" name="type"
|
<j-checkbox value="changedOnly" name="type"
|
||||||
>只推送变化的数据</a-checkbox
|
>只推送变化的数据</j-checkbox
|
||||||
>
|
>
|
||||||
</a-checkbox-group>
|
</j-checkbox-group>
|
||||||
</a-form-item>
|
</j-form-item>
|
||||||
<j-form-item label="说明" :name="['description']">
|
<j-form-item label="说明" :name="['description']">
|
||||||
<j-textarea
|
<j-textarea
|
||||||
placeholder="请输入说明"
|
placeholder="请输入说明"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column: { dataIndex }, record, index }">
|
<template #bodyCell="{ column: { dataIndex }, record, index }">
|
||||||
<template v-if="dataIndex === 'name'">
|
<template v-if="dataIndex === 'name'">
|
||||||
<a-form-item
|
<j-form-item
|
||||||
:name="['dataSource', index, 'name']"
|
:name="['dataSource', index, 'name']"
|
||||||
:rules="[
|
:rules="[
|
||||||
{
|
{
|
||||||
|
@ -21,20 +21,20 @@
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
allowClear
|
allowClear
|
||||||
></j-input>
|
></j-input>
|
||||||
</a-form-item>
|
</j-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="dataIndex === 'id'">
|
<template v-if="dataIndex === 'id'">
|
||||||
<a-form-item :name="['dataSource', index, 'id']">
|
<j-form-item :name="['dataSource', index, 'id']">
|
||||||
<j-input
|
<j-input
|
||||||
v-model:value="record[dataIndex]"
|
v-model:value="record[dataIndex]"
|
||||||
disabled
|
disabled
|
||||||
:bordered="false"
|
:bordered="false"
|
||||||
></j-input>
|
></j-input>
|
||||||
</a-form-item>
|
</j-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="dataIndex === 'accessModes'">
|
<template v-if="dataIndex === 'accessModes'">
|
||||||
<a-form-item
|
<j-form-item
|
||||||
class="form-item"
|
class="form-item"
|
||||||
:name="['dataSource', index, 'accessModes', 'value']"
|
:name="['dataSource', index, 'accessModes', 'value']"
|
||||||
:rules="[
|
:rules="[
|
||||||
|
@ -67,10 +67,10 @@
|
||||||
@click="changeCheckbox(index, dataIndex)"
|
@click="changeCheckbox(index, dataIndex)"
|
||||||
>同上</j-checkbox
|
>同上</j-checkbox
|
||||||
>
|
>
|
||||||
</a-form-item>
|
</j-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="dataIndex === 'interval'">
|
<template v-if="dataIndex === 'interval'">
|
||||||
<a-form-item
|
<j-form-item
|
||||||
class="form-item"
|
class="form-item"
|
||||||
:name="[
|
:name="[
|
||||||
'dataSource',
|
'dataSource',
|
||||||
|
@ -113,10 +113,10 @@
|
||||||
@click="changeCheckbox(index, dataIndex)"
|
@click="changeCheckbox(index, dataIndex)"
|
||||||
>同上</j-checkbox
|
>同上</j-checkbox
|
||||||
>
|
>
|
||||||
</a-form-item>
|
</j-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="dataIndex === 'features'">
|
<template v-if="dataIndex === 'features'">
|
||||||
<a-form-item
|
<j-form-item
|
||||||
class="form-item"
|
class="form-item"
|
||||||
:name="['dataSource', index, 'features', 'value']"
|
:name="['dataSource', index, 'features', 'value']"
|
||||||
:rules="[
|
:rules="[
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
@click="changeCheckbox(index, dataIndex)"
|
@click="changeCheckbox(index, dataIndex)"
|
||||||
>同上</j-checkbox
|
>同上</j-checkbox
|
||||||
>
|
>
|
||||||
</a-form-item>
|
</j-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="dataIndex === 'action'">
|
<template v-if="dataIndex === 'action'">
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<j-checkbox v-model:checked="isSelected">隐藏已有节点</j-checkbox>
|
<j-checkbox v-model:checked="isSelected">隐藏已有节点</j-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<j-spin :spinning="spinning">
|
<j-spin :spinning="spinning">
|
||||||
<a-tree
|
<j-tree
|
||||||
v-if="!!treeData"
|
v-if="!!treeData"
|
||||||
:load-data="onLoadData"
|
:load-data="onLoadData"
|
||||||
:tree-data="treeData"
|
:tree-data="treeData"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</a-tree>
|
</j-tree>
|
||||||
<j-empty v-else />
|
<j-empty v-else />
|
||||||
</j-spin>
|
</j-spin>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<template lang="">
|
<template>
|
||||||
<j-modal
|
<j-modal
|
||||||
title="批量编辑"
|
title="批量编辑"
|
||||||
:visible="true"
|
:visible="true"
|
||||||
|
@ -6,9 +6,8 @@
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
>
|
>
|
||||||
<div class="sizeText">
|
<div class="sizeText">
|
||||||
将批量修改{{
|
将批量修改
|
||||||
data.length
|
{{ data.length }} 条数据的访问类型、采集频率、只推送变化的数据
|
||||||
}}条数据的访问类型、采集频率、只推送变化的数据
|
|
||||||
</div>
|
</div>
|
||||||
<j-form
|
<j-form
|
||||||
class="form"
|
class="form"
|
||||||
|
@ -62,13 +61,13 @@
|
||||||
/>
|
/>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
|
|
||||||
<a-form-item label="" :name="['features']">
|
<j-form-item :name="['features']">
|
||||||
<a-checkbox-group v-model:value="formData.features">
|
<j-checkbox-group v-model:value="formData.features">
|
||||||
<a-checkbox value="changedOnly" name="type"
|
<j-checkbox value="changedOnly" name="type"
|
||||||
>只推送变化的数据</a-checkbox
|
>只推送变化的数据</j-checkbox
|
||||||
>
|
>
|
||||||
</a-checkbox-group>
|
</j-checkbox-group>
|
||||||
</a-form-item>
|
</j-form-item>
|
||||||
</j-form>
|
</j-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<j-button key="back" @click="handleCancel">取消</j-button>
|
<j-button key="back" @click="handleCancel">取消</j-button>
|
||||||
|
@ -119,7 +118,7 @@ const checkLength = (_rule: Rule, value: string): Promise<any> =>
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleOk = async () => {
|
const handleOk = async () => {
|
||||||
const data: any = await formRef.value?.validate();
|
const data = cloneDeep(formData.value);
|
||||||
const { accessModes, features, interval } = data;
|
const { accessModes, features, interval } = data;
|
||||||
const ischange =
|
const ischange =
|
||||||
accessModes.length !== 0 || features.length !== 0 || !!interval;
|
accessModes.length !== 0 || features.length !== 0 || !!interval;
|
||||||
|
|
|
@ -251,7 +251,7 @@ import {
|
||||||
removePoint,
|
removePoint,
|
||||||
readPoint,
|
readPoint,
|
||||||
} from '@/api/data-collect/collector';
|
} from '@/api/data-collect/collector';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import PointCardBox from './components/PointCardBox/index.vue';
|
import PointCardBox from './components/PointCardBox/index.vue';
|
||||||
import WritePoint from './components/WritePoint/index.vue';
|
import WritePoint from './components/WritePoint/index.vue';
|
||||||
import BatchUpdate from './components/BatchUpdate/index.vue';
|
import BatchUpdate from './components/BatchUpdate/index.vue';
|
||||||
|
@ -412,13 +412,13 @@ const handlDelete = async (id: string | undefined = undefined) => {
|
||||||
if (res?.status === 200) {
|
if (res?.status === 200) {
|
||||||
cancelSelect();
|
cancelSelect();
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
spinning.value = false;
|
spinning.value = false;
|
||||||
};
|
};
|
||||||
const handlBatchUpdate = () => {
|
const handlBatchUpdate = () => {
|
||||||
if (_selectedRowKeys.value.length === 0) {
|
if (_selectedRowKeys.value.length === 0) {
|
||||||
message.warn('请先选择');
|
onlyMessage('请先选择', 'warning');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const dataSet = new Set(_selectedRowKeys.value);
|
const dataSet = new Set(_selectedRowKeys.value);
|
||||||
|
@ -442,7 +442,7 @@ const clickRedo = async (data: any) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
cancelSelect();
|
cancelSelect();
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ const saveChange = (value: object) => {
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="tree-container">
|
<div class="tree-container">
|
||||||
<a-input-search
|
<j-input-search
|
||||||
v-model:value="searchValue"
|
v-model:value="searchValue"
|
||||||
style="margin-bottom: 8px"
|
style="margin-bottom: 8px"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
@ -106,7 +106,7 @@ import {
|
||||||
remove,
|
remove,
|
||||||
} from '@/api/data-collect/collector';
|
} from '@/api/data-collect/collector';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { Store } from 'jetlinks-store';
|
import { Store } from 'jetlinks-store';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { colorMap, getState } from '../data.ts';
|
import { colorMap, getState } from '../data.ts';
|
||||||
|
@ -173,14 +173,14 @@ const handlUpdate = async (data: any) => {
|
||||||
});
|
});
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
handleSearch(params.value);
|
handleSearch(params.value);
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handlDelete = async (id: string) => {
|
const handlDelete = async (id: string) => {
|
||||||
const resp = await remove(id);
|
const resp = await remove(id);
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
handleSearch(params.value);
|
handleSearch(params.value);
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -189,11 +189,11 @@ const saveChange = (value: object) => {
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
handleSearch(params.value);
|
handleSearch(params.value);
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSearch = async (value: string) => {
|
const handleSearch = async (value: any) => {
|
||||||
if (!searchValue.value && !value) {
|
if (!searchValue.value && !value) {
|
||||||
params.value = _.cloneDeep(defualtParams);
|
params.value = _.cloneDeep(defualtParams);
|
||||||
} else if (!!searchValue.value) {
|
} else if (!!searchValue.value) {
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { TOKEN_KEY } from '@/utils/variable';
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
import { FIRMWARE_UPLOAD, querySystemApi } from '@/api/device/firmware';
|
import { FIRMWARE_UPLOAD, querySystemApi } from '@/api/device/firmware';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
|
import type { UploadChangeParam } from 'ant-design-vue';
|
||||||
import { notification as Notification } from 'ant-design-vue';
|
import { notification as Notification } from 'ant-design-vue';
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'update:extraValue', 'change']);
|
const emit = defineEmits(['update:modelValue', 'update:extraValue', 'change']);
|
||||||
|
@ -53,12 +53,12 @@ const handleChange = async (info: UploadChangeParam) => {
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
const result = info.file.response?.result;
|
const result = info.file.response?.result;
|
||||||
const api: any = await querySystemApi(['paths']);
|
const api: any = await querySystemApi(['paths']); // todo base-path在pinia获取系统配置的
|
||||||
const path = api.result[0]?.properties
|
const path = api.result[0]?.properties
|
||||||
? api.result[0]?.properties['base-path']
|
? api.result[0]?.properties['base-path']
|
||||||
: '';
|
: '';
|
||||||
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
fileValue.value = f;
|
fileValue.value = f;
|
||||||
emit('update:modelValue', f);
|
emit('update:modelValue', f);
|
||||||
emit('update:extraValue', result);
|
emit('update:extraValue', result);
|
||||||
|
|
|
@ -201,6 +201,7 @@ import {
|
||||||
} from '@/api/device/firmware';
|
} from '@/api/device/firmware';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import type { Properties } from '../type';
|
import type { Properties } from '../type';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const dynamicValidateForm = reactive<{ properties: Properties[] }>({
|
const dynamicValidateForm = reactive<{ properties: Properties[] }>({
|
||||||
|
@ -327,7 +328,8 @@ const handleOk = async () => {
|
||||||
? await save(params).catch(() => {})
|
? await save(params).catch(() => {})
|
||||||
: await update({ ...props.data, ...params }).catch(() => {});
|
: await update({ ...props.data, ...params }).catch(() => {});
|
||||||
if (response?.status === 200) {
|
if (response?.status === 200) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
|
|
||||||
emit('change', true);
|
emit('change', true);
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
|
@ -55,7 +55,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Search :columns="columns" target="search" @search="handleSearch" />
|
<pro-search
|
||||||
|
:columns="columns"
|
||||||
|
target="search"
|
||||||
|
@search="handleSearch"
|
||||||
|
/>
|
||||||
<j-pro-table
|
<j-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
model="TABLE"
|
model="TABLE"
|
||||||
|
@ -129,6 +133,7 @@ import { getImage } from '@/utils/comm';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
import Save from './Save.vue';
|
import Save from './Save.vue';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const tableRef = ref<Record<string, any>>({});
|
const tableRef = ref<Record<string, any>>({});
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -313,7 +318,7 @@ const handlEye = (data: string) => {
|
||||||
const handlTry = async (id: string) => {
|
const handlTry = async (id: string) => {
|
||||||
const res = await startOneTask([id]);
|
const res = await startOneTask([id]);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -324,7 +329,7 @@ const saveChange = (value: boolean) => {
|
||||||
const confirm = async (e: MouseEvent) => {
|
const confirm = async (e: MouseEvent) => {
|
||||||
const res = await startTask(taskId, ['failed']);
|
const res = await startTask(taskId, ['failed']);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
handleRefresh('failed');
|
handleRefresh('failed');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,10 +233,15 @@ const handleOk = () => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateSelect = (selectedRowKeys: T[]) =>
|
const updateSelect = (selectedRowKeys: T[]) => {
|
||||||
selectedRowKeys
|
let selectedRowLabel: any = selectedRowKeys
|
||||||
.map((item) => checkAllDataMap.has(item) && checkAllDataMap.get(item))
|
.map((item) => checkAllDataMap.has(item) && checkAllDataMap.get(item))
|
||||||
.toString();
|
.toString();
|
||||||
|
if (selectedRowLabel === 'false') {
|
||||||
|
selectedRowLabel = selectedRowKeys;
|
||||||
|
}
|
||||||
|
return selectedRowLabel;
|
||||||
|
};
|
||||||
|
|
||||||
const onVisible = () => {
|
const onVisible = () => {
|
||||||
!props.data.view && (visible.value = true);
|
!props.data.view && (visible.value = true);
|
||||||
|
@ -258,6 +263,7 @@ onMounted(() => {
|
||||||
if (props.data.id) {
|
if (props.data.id) {
|
||||||
checkLable.value = updateSelect(props.data.deviceId);
|
checkLable.value = updateSelect(props.data.deviceId);
|
||||||
emit('update:modelValue', props.data.deviceId);
|
emit('update:modelValue', props.data.deviceId);
|
||||||
|
console.log(111, checkLable.value, props.data.deviceId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<script lang="ts" setup name="TaskPage">
|
<script lang="ts" setup name="TaskPage">
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { task, startTask, stopTask } from '@/api/device/firmware';
|
import { task, startTask, stopTask } from '@/api/device/firmware';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
const res = await stopTask(data.id);
|
const res = await stopTask(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -195,7 +195,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
const res = await startTask(data.id, ['canceled']);
|
const res = await startTask(data.id, ['canceled']);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -223,7 +223,7 @@ const saveChange = (value: boolean) => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -74,6 +74,7 @@ import _ from 'lodash';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
import type { FormDataType } from './type';
|
import type { FormDataType } from './type';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
|
|
||||||
|
@ -233,7 +234,7 @@ const saveChange = (value: FormDataType) => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -241,7 +242,7 @@ const saveChange = (value: FormDataType) => {
|
||||||
const handlDelete = async (id: string) => {
|
const handlDelete = async (id: string) => {
|
||||||
const res = await remove(id);
|
const res = await remove(id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessChannel">
|
<script lang="ts" setup name="AccessChannel">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { update, save } from '@/api/link/accessConfig';
|
import { update, save } from '@/api/link/accessConfig';
|
||||||
import { ProtocolMapping } from '../../data';
|
import { ProtocolMapping } from '../../data';
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ const onFinish = async (values: any) => {
|
||||||
const resp =
|
const resp =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -310,7 +310,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessCloudCtwing">
|
<script lang="ts" setup name="AccessCloudCtwing">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
||||||
import { ProtocolMapping } from '../../data';
|
import { ProtocolMapping } from '../../data';
|
||||||
|
@ -409,7 +409,7 @@ const saveData = async () => {
|
||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -446,7 +446,7 @@ const next = async () => {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
} else if (current.value === 1) {
|
} else if (current.value === 1) {
|
||||||
if (!procotolCurrent.value) {
|
if (!procotolCurrent.value) {
|
||||||
message.error('请选择消息协议!');
|
onlyMessage('请选择消息协议!', 'error');
|
||||||
} else {
|
} else {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -394,7 +394,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessCloudOneNet">
|
<script lang="ts" setup name="AccessCloudOneNet">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
import { update, save, getProtocolList } from '@/api/link/accessConfig';
|
||||||
import AccessCard from '../AccessCard/index.vue';
|
import AccessCard from '../AccessCard/index.vue';
|
||||||
|
@ -496,7 +496,7 @@ const saveData = async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -533,7 +533,7 @@ const next = async () => {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
} else if (current.value === 1) {
|
} else if (current.value === 1) {
|
||||||
if (!procotolCurrent.value) {
|
if (!procotolCurrent.value) {
|
||||||
message.error('请选择消息协议!');
|
onlyMessage('请选择消息协议!', 'error');
|
||||||
} else {
|
} else {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessEdge">
|
<script lang="ts" setup name="AccessEdge">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import { update, save, getNetworkList } from '@/api/link/accessConfig';
|
import { update, save, getNetworkList } from '@/api/link/accessConfig';
|
||||||
import {
|
import {
|
||||||
|
@ -270,7 +270,7 @@ const onFinish = async (values: any) => {
|
||||||
const resp =
|
const resp =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -325,7 +325,7 @@ const addNetwork = () => {
|
||||||
|
|
||||||
const next = async () => {
|
const next = async () => {
|
||||||
if (!networkCurrent.value) {
|
if (!networkCurrent.value) {
|
||||||
message.error('请选择网络组件!');
|
onlyMessage('请选择网络组件!', 'error');
|
||||||
} else {
|
} else {
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -520,10 +520,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessNetwork">
|
<script lang="ts" setup name="AccessNetwork">
|
||||||
import { message, Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import { getResourcesCurrent, getClusters } from '@/api/link/accessConfig';
|
import { getResourcesCurrent, getClusters } from '@/api/link/accessConfig';
|
||||||
import { update, save } from '@/api/link/accessConfig';
|
import { update, save } from '@/api/link/accessConfig';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
interface Form2 {
|
interface Form2 {
|
||||||
clusterNodeId: string | undefined;
|
clusterNodeId: string | undefined;
|
||||||
|
@ -663,7 +664,7 @@ const saveData = () => {
|
||||||
const resp =
|
const resp =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -85,8 +85,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessMedia">
|
<script lang="ts" setup name="AccessMedia">
|
||||||
import { message, Form } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
|
||||||
import GB28181 from './GB28181.vue';
|
import GB28181 from './GB28181.vue';
|
||||||
import { update, save } from '@/api/link/accessConfig';
|
import { update, save } from '@/api/link/accessConfig';
|
||||||
|
|
||||||
|
@ -125,7 +124,7 @@ const onFinish = async (values: any) => {
|
||||||
const resp =
|
const resp =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -334,10 +334,10 @@ import {
|
||||||
ColumnsHTTP,
|
ColumnsHTTP,
|
||||||
} from '../../data';
|
} from '../../data';
|
||||||
import AccessCard from '../AccessCard/index.vue';
|
import AccessCard from '../AccessCard/index.vue';
|
||||||
import { message, Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import type { FormInstance, TableColumnType } from 'ant-design-vue';
|
import type { FormInstance, TableColumnType } from 'ant-design-vue';
|
||||||
import Markdown from 'vue3-markdown-it';
|
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
function generateUUID() {
|
function generateUUID() {
|
||||||
|
@ -528,7 +528,7 @@ const saveData = () => {
|
||||||
? await save(params)
|
? await save(params)
|
||||||
: await update({ ...params, id });
|
: await update({ ...params, id });
|
||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -538,14 +538,14 @@ const saveData = () => {
|
||||||
const next = async () => {
|
const next = async () => {
|
||||||
if (current.value === 0) {
|
if (current.value === 0) {
|
||||||
if (!networkCurrent.value) {
|
if (!networkCurrent.value) {
|
||||||
message.error('请选择网络组件!');
|
onlyMessage('请选择网络组件!', 'error');
|
||||||
} else {
|
} else {
|
||||||
queryProcotolList(props.provider.id);
|
queryProcotolList(props.provider.id);
|
||||||
current.value = current.value + 1;
|
current.value = current.value + 1;
|
||||||
}
|
}
|
||||||
} else if (current.value === 1) {
|
} else if (current.value === 1) {
|
||||||
if (!procotolCurrent.value) {
|
if (!procotolCurrent.value) {
|
||||||
message.error('请选择消息协议!');
|
onlyMessage('请选择消息协议!', 'error');
|
||||||
} else {
|
} else {
|
||||||
const resp =
|
const resp =
|
||||||
type !== 'child-device'
|
type !== 'child-device'
|
||||||
|
|
|
@ -115,17 +115,6 @@ const ColumnsHTTP = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const TiTlePermissionButtonStyle = {
|
|
||||||
padding: 0,
|
|
||||||
'max-width': 'calc(100% - 90px)',
|
|
||||||
color: ' #1890ff !important',
|
|
||||||
'font-weight': 700,
|
|
||||||
'font-size': '16px',
|
|
||||||
overflow: 'hidden',
|
|
||||||
'text-overflow': 'ellipsis',
|
|
||||||
'white-space': 'nowrap',
|
|
||||||
};
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
NetworkTypeMapping,
|
NetworkTypeMapping,
|
||||||
ProtocolMapping,
|
ProtocolMapping,
|
||||||
|
@ -133,5 +122,4 @@ export {
|
||||||
descriptionList,
|
descriptionList,
|
||||||
ColumnsMQTT,
|
ColumnsMQTT,
|
||||||
ColumnsHTTP,
|
ColumnsHTTP,
|
||||||
TiTlePermissionButtonStyle,
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -53,15 +53,23 @@
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="card-item-content">
|
<div class="card-item-content">
|
||||||
<PermissionButton
|
<Ellipsis
|
||||||
type="link"
|
style="
|
||||||
@click="handlEye(slotProps.id)"
|
width: calc(100% - 100px);
|
||||||
hasPermission="link/AccessConfig:view"
|
margin-bottom: 10px;
|
||||||
:style="TiTlePermissionButtonStyle"
|
color: #2f54eb;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ slotProps.name }}
|
<span
|
||||||
</PermissionButton>
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
"
|
||||||
|
@click.stop="handlEye(slotProps.id)"
|
||||||
|
>
|
||||||
|
{{ slotProps.name }}
|
||||||
|
</span>
|
||||||
|
</Ellipsis>
|
||||||
<j-row class="card-item-content-box">
|
<j-row class="card-item-content-box">
|
||||||
<j-col
|
<j-col
|
||||||
:span="12"
|
:span="12"
|
||||||
|
@ -174,9 +182,8 @@ import {
|
||||||
undeploy,
|
undeploy,
|
||||||
deploy,
|
deploy,
|
||||||
} from '@/api/link/accessConfig';
|
} from '@/api/link/accessConfig';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
import { TiTlePermissionButtonStyle } from './data';
|
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
const tableRef = ref<Record<string, any>>({});
|
const tableRef = ref<Record<string, any>>({});
|
||||||
|
@ -281,10 +288,8 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
: await deploy(data.id);
|
: await deploy(data.id);
|
||||||
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
} else {
|
|
||||||
message.error('操作失败!');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -301,10 +306,8 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
} else {
|
|
||||||
message.error('操作失败!');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -314,7 +317,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getProvidersList = async () => {
|
const getProvidersList = async () => {
|
||||||
const res = await getProviders();
|
const res: any = await getProviders();
|
||||||
providersList.value = res.result;
|
providersList.value = res.result;
|
||||||
};
|
};
|
||||||
getProvidersList();
|
getProvidersList();
|
||||||
|
@ -372,15 +375,6 @@ const handleSearch = (e: any) => {
|
||||||
|
|
||||||
.card-item-content {
|
.card-item-content {
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
|
|
||||||
.card-item-content-title-a {
|
|
||||||
color: #1890ff !important;
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 16px;
|
|
||||||
overflow: hidden; //超出的文本隐藏
|
|
||||||
text-overflow: ellipsis; //溢出用省略号显示
|
|
||||||
white-space: nowrap; //溢出不换行
|
|
||||||
}
|
|
||||||
.card-item-content-box {
|
.card-item-content-box {
|
||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="CertificateFile">
|
<script setup lang="ts" name="CertificateFile">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { UploadChangeParam } from 'ant-design-vue';
|
import type { UploadChangeParam } from 'ant-design-vue';
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { TOKEN_KEY } from '@/utils/variable';
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
|
@ -54,7 +54,7 @@ const loading = ref(false);
|
||||||
const handleChange = (info: UploadChangeParam) => {
|
const handleChange = (info: UploadChangeParam) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
const result = info.file.response?.result;
|
const result = info.file.response?.result;
|
||||||
keystoreBase64.value = result;
|
keystoreBase64.value = result;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
|
@ -101,12 +101,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="CertificateDetail">
|
<script lang="ts" setup name="CertificateDetail">
|
||||||
import { message, Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import CertificateFile from './CertificateFile.vue';
|
import CertificateFile from './CertificateFile.vue';
|
||||||
import type { UploadChangeParam } from 'ant-design-vue';
|
import type { UploadChangeParam } from 'ant-design-vue';
|
||||||
import { save, update, queryDetail } from '@/api/link/certificate';
|
import { save, update, queryDetail } from '@/api/link/certificate';
|
||||||
import { FormDataType, TypeObjType } from '../type';
|
import { FormDataType, TypeObjType } from '../type';
|
||||||
|
import { onlyMessage } from '@/utils/comm';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -156,7 +157,7 @@ const onSubmit = () => {
|
||||||
? await save(params).catch(() => {})
|
? await save(params).catch(() => {})
|
||||||
: await update({ ...params, id }).catch(() => {});
|
: await update({ ...params, id }).catch(() => {});
|
||||||
if (response?.status === 200) {
|
if (response?.status === 200) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
router.push('/iot/link/certificate');
|
router.push('/iot/link/certificate');
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
@ -169,7 +170,7 @@ const onSubmit = () => {
|
||||||
const handleChange = (info: UploadChangeParam) => {
|
const handleChange = (info: UploadChangeParam) => {
|
||||||
fileLoading.value = true;
|
fileLoading.value = true;
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
const result = info.file.response?.result;
|
const result = info.file.response?.result;
|
||||||
formData.value.configs.cert = result;
|
formData.value.configs.cert = result;
|
||||||
fileLoading.value = false;
|
fileLoading.value = false;
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<script lang="ts" setup name="CertificatePage">
|
<script lang="ts" setup name="CertificatePage">
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { query, remove } from '@/api/link/certificate';
|
import { query, remove } from '@/api/link/certificate';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
|
@ -175,7 +175,7 @@ const handlEdit = (id: string) => {
|
||||||
const handlDelete = async (id: string) => {
|
const handlDelete = async (id: string) => {
|
||||||
const res = await remove(id);
|
const res = await remove(id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
import { LocalStore } from '@/utils/comm';
|
import { LocalStore } from '@/utils/comm';
|
||||||
import { TOKEN_KEY } from '@/utils/variable';
|
import { TOKEN_KEY } from '@/utils/variable';
|
||||||
import { PROTOCOL_UPLOAD, querySystemApi } from '@/api/link/protocol';
|
import { PROTOCOL_UPLOAD, querySystemApi } from '@/api/link/protocol';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
|
import type { UploadChangeParam, UploadProps } from 'ant-design-vue';
|
||||||
import { notification as Notification } from 'ant-design-vue';
|
import { notification as Notification } from 'ant-design-vue';
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ const beforeUpload: UploadProps['beforeUpload'] = (file) => {
|
||||||
const arr = file.name.split('.');
|
const arr = file.name.split('.');
|
||||||
const isFile = ['jar', 'zip'].includes(arr[arr.length - 1]); // file.type === 'application/zip' || file.type === 'application/javj-archive'
|
const isFile = ['jar', 'zip'].includes(arr[arr.length - 1]); // file.type === 'application/zip' || file.type === 'application/javj-archive'
|
||||||
if (!isFile) {
|
if (!isFile) {
|
||||||
message.error('请上传.zip.jar格式的文件');
|
onlyMessage('请上传.zip.jar格式的文件', 'error');
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
return isFile;
|
return isFile;
|
||||||
|
@ -58,12 +58,12 @@ const handleChange = async (info: UploadChangeParam) => {
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
const result = info.file.response?.result;
|
const result = info.file.response?.result;
|
||||||
const api: any = await querySystemApi(['paths']);
|
const api: any = await querySystemApi(['paths']); // todo base-path在pinia获取系统配置的
|
||||||
const path = api.result[0]?.properties
|
const path = api.result[0]?.properties
|
||||||
? api.result[0]?.properties['base-path']
|
? api.result[0]?.properties['base-path']
|
||||||
: '';
|
: '';
|
||||||
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
const f = `${path}/file/${result.id}?accessKey=${result.others.accessKey}`;
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
value.value = f;
|
value.value = f;
|
||||||
emit('update:modelValue', f);
|
emit('update:modelValue', f);
|
||||||
emit('change', f);
|
emit('change', f);
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import type { UploadChangeParam, FormInstance } from 'ant-design-vue';
|
import type { UploadChangeParam, FormInstance } from 'ant-design-vue';
|
||||||
import FileUpload from './FileUpload.vue';
|
import FileUpload from './FileUpload.vue';
|
||||||
|
@ -153,7 +153,7 @@ const onSubmit = async () => {
|
||||||
const handleChange = (info: UploadChangeParam) => {
|
const handleChange = (info: UploadChangeParam) => {
|
||||||
fileLoading.value = true;
|
fileLoading.value = true;
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
message.success('上传成功!');
|
onlyMessage('上传成功!', 'success');
|
||||||
const result = info.file.response?.result;
|
const result = info.file.response?.result;
|
||||||
formData.value.configuration.location = result;
|
formData.value.configuration.location = result;
|
||||||
fileLoading.value = false;
|
fileLoading.value = false;
|
||||||
|
|
|
@ -40,16 +40,21 @@
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="card-item-content">
|
<div class="card-item-content">
|
||||||
<j-tooltip>
|
<Ellipsis
|
||||||
<template #title>
|
style="
|
||||||
{{ slotProps.name }}
|
width: calc(100% - 100px);
|
||||||
</template>
|
margin-bottom: 10px;
|
||||||
<h3
|
"
|
||||||
class="card-item-content-title card-item-content-title-a"
|
>
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ slotProps.name }}
|
{{ slotProps.name }}
|
||||||
</h3>
|
</span>
|
||||||
</j-tooltip>
|
</Ellipsis>
|
||||||
<j-row class="card-item-content-box">
|
<j-row class="card-item-content-box">
|
||||||
<j-col
|
<j-col
|
||||||
:span="12"
|
:span="12"
|
||||||
|
@ -138,7 +143,7 @@
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { list, remove } from '@/api/link/protocol';
|
import { list, remove } from '@/api/link/protocol';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import Save from './Save/index.vue';
|
import Save from './Save/index.vue';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
|
@ -230,10 +235,8 @@ const getActions = (
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
} else {
|
|
||||||
message.error('操作失败!');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -256,7 +259,7 @@ const saveChange = (value: object) => {
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
current.value = {};
|
current.value = {};
|
||||||
if (value) {
|
if (value) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -293,14 +296,6 @@ const handleSearch = (e: any) => {
|
||||||
.card-item-content {
|
.card-item-content {
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
|
|
||||||
.card-item-content-title-a {
|
|
||||||
color: #000 !important;
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 16px;
|
|
||||||
overflow: hidden; //超出的文本隐藏
|
|
||||||
text-overflow: ellipsis; //溢出用省略号显示
|
|
||||||
white-space: nowrap; //溢出不换行
|
|
||||||
}
|
|
||||||
.card-item-content-box {
|
.card-item-content-box {
|
||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -974,7 +974,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="AccessNetwork">
|
<script lang="ts" setup name="AccessNetwork">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
import {
|
import {
|
||||||
update,
|
update,
|
||||||
|
@ -1153,7 +1153,7 @@ const saveData = async () => {
|
||||||
? await save(params).catch(() => {})
|
? await save(params).catch(() => {})
|
||||||
: await update({ ...params, id }).catch(() => {});
|
: await update({ ...params, id }).catch(() => {});
|
||||||
if (resp?.status === 200) {
|
if (resp?.status === 200) {
|
||||||
message.success('操作成功!');
|
onlyMessage('操作成功', 'success');
|
||||||
history.back();
|
history.back();
|
||||||
if ((window as any).onTabSaveSuccess) {
|
if ((window as any).onTabSaveSuccess) {
|
||||||
if (resp.result?.id) {
|
if (resp.result?.id) {
|
||||||
|
|
|
@ -307,14 +307,3 @@ export const Rules = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TiTlePermissionButtonStyle = {
|
|
||||||
padding: 0,
|
|
||||||
'max-width': 'calc(100% - 90px)',
|
|
||||||
color: ' #1890ff !important',
|
|
||||||
'font-weight': 700,
|
|
||||||
'font-size': '16px',
|
|
||||||
overflow: 'hidden',
|
|
||||||
'text-overflow': 'ellipsis',
|
|
||||||
'white-space': 'nowrap',
|
|
||||||
};
|
|
||||||
|
|
|
@ -52,14 +52,23 @@
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="card-item-content">
|
<div class="card-item-content">
|
||||||
<PermissionButton
|
<Ellipsis
|
||||||
type="link"
|
style="
|
||||||
@click="handlEye(slotProps.id)"
|
width: calc(100% - 100px);
|
||||||
hasPermission="link/Type:view"
|
margin-bottom: 10px;
|
||||||
:style="TiTlePermissionButtonStyle"
|
color: #2f54eb;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ slotProps.name }}
|
<span
|
||||||
</PermissionButton>
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
"
|
||||||
|
@click.stop="handlEye(slotProps.id)"
|
||||||
|
>
|
||||||
|
{{ slotProps.name }}
|
||||||
|
</span>
|
||||||
|
</Ellipsis>
|
||||||
<j-row class="card-item-content-box">
|
<j-row class="card-item-content-box">
|
||||||
<j-col :span="12">
|
<j-col :span="12">
|
||||||
<div class="card-item-content-text">
|
<div class="card-item-content-text">
|
||||||
|
@ -165,8 +174,7 @@
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { supports, query, remove, start, shutdown } from '@/api/link/type';
|
import { supports, query, remove, start, shutdown } from '@/api/link/type';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { TiTlePermissionButtonStyle } from './data';
|
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
|
@ -299,7 +307,7 @@ const getActions = (
|
||||||
? await shutdown(data.id)
|
? await shutdown(data.id)
|
||||||
: await start(data.id);
|
: await start(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -318,7 +326,7 @@ const getActions = (
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -263,7 +263,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="StreamDetail">
|
<script lang="ts" setup name="StreamDetail">
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { queryProviders, queryDetail, save, update } from '@/api/media/stream';
|
import { queryProviders, queryDetail, save, update } from '@/api/media/stream';
|
||||||
import type { FormInstance } from 'ant-design-vue';
|
import type { FormInstance } from 'ant-design-vue';
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ const onSubmit = async () => {
|
||||||
const response =
|
const response =
|
||||||
id === ':id' ? await save(params) : await update({ ...params, id });
|
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
router.push('/iot/link/Stream');
|
router.push('/iot/link/Stream');
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
|
@ -54,12 +54,23 @@
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="card-item-content">
|
<div class="card-item-content">
|
||||||
<h3
|
<Ellipsis
|
||||||
@click="handlEye(slotProps.id)"
|
style="
|
||||||
class="card-item-content-title card-item-content-title-a"
|
width: calc(100% - 100px);
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: #2f54eb;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ slotProps.name }}
|
<span
|
||||||
</h3>
|
style="
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
"
|
||||||
|
@click.stop="handlEye(slotProps.id)"
|
||||||
|
>
|
||||||
|
{{ slotProps.name }}
|
||||||
|
</span>
|
||||||
|
</Ellipsis>
|
||||||
<j-row class="card-item-content-box">
|
<j-row class="card-item-content-box">
|
||||||
<j-col
|
<j-col
|
||||||
:span="8"
|
:span="8"
|
||||||
|
@ -144,7 +155,7 @@
|
||||||
import type { ActionsType } from '@/components/Table/index';
|
import type { ActionsType } from '@/components/Table/index';
|
||||||
import { getImage } from '@/utils/comm';
|
import { getImage } from '@/utils/comm';
|
||||||
import { query, remove, disable, enalbe } from '@/api/media/stream';
|
import { query, remove, disable, enalbe } from '@/api/media/stream';
|
||||||
import { message } from 'ant-design-vue';
|
import { onlyMessage } from '@/utils/comm';
|
||||||
import { useMenuStore } from 'store/menu';
|
import { useMenuStore } from 'store/menu';
|
||||||
|
|
||||||
const menuStory = useMenuStore();
|
const menuStory = useMenuStore();
|
||||||
|
@ -213,7 +224,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
? await disable(data.id)
|
? await disable(data.id)
|
||||||
: await enalbe(data.id);
|
: await enalbe(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value?.reload();
|
tableRef.value?.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -231,7 +242,7 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
|
||||||
onConfirm: async () => {
|
onConfirm: async () => {
|
||||||
const res = await remove(data.id);
|
const res = await remove(data.id);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
message.success('操作成功');
|
onlyMessage('操作成功', 'success');
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -276,14 +287,6 @@ const handleSearch = (e: any) => {
|
||||||
.card-item-content {
|
.card-item-content {
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
|
|
||||||
.card-item-content-title-a {
|
|
||||||
// color: #000 !important;
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 16px;
|
|
||||||
overflow: hidden; //超出的文本隐藏
|
|
||||||
text-overflow: ellipsis; //溢出用省略号显示
|
|
||||||
white-space: nowrap; //溢出不换行
|
|
||||||
}
|
|
||||||
.card-item-content-box {
|
.card-item-content-box {
|
||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue