Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev
This commit is contained in:
commit
f41fa6d279
|
@ -6,10 +6,10 @@
|
|||
:title="type === 'active' ? '启用' : '同步'"
|
||||
:closable="false"
|
||||
>
|
||||
<div style="margin: 10px 0px 20px 0px">
|
||||
<div style="margin: 10px 0px 20px 0px; padding-right: 10px;">
|
||||
<div v-if="flag">
|
||||
<div>{{ type === 'active' ? '正在启用全部设备' : '正在同步设备状态' }}</div>
|
||||
<j-progress :percent="50" />
|
||||
<j-progress :percent="_percent" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<p>{{ type === 'active' ? '启用' : '同步' }}成功:{{ count }}条</p>
|
||||
|
@ -23,6 +23,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getDeviceNumber } from '@/api/device/product';
|
||||
import { EventSourcePolyfill } from 'event-source-polyfill';
|
||||
|
||||
const emit = defineEmits(['close', 'save']);
|
||||
|
@ -36,12 +37,11 @@ const props = defineProps({
|
|||
default: '',
|
||||
},
|
||||
});
|
||||
// const eventSource = ref<Record<string, any>>({})
|
||||
|
||||
const count = ref<number>(0);
|
||||
const total = ref<number>(0);
|
||||
const flag = ref<boolean>(true);
|
||||
const errCount = ref<number>(0);
|
||||
const isSource = ref<boolean>(false);
|
||||
const id = ref<string>('');
|
||||
const source = ref<Record<string, any>>({});
|
||||
|
||||
const handleCancel = () => {
|
||||
|
@ -49,9 +49,14 @@ const handleCancel = () => {
|
|||
emit('save');
|
||||
};
|
||||
|
||||
const _percent = computed(() => {
|
||||
return ((errCount.value + count.value) / total.value * 100).toFixed(2)
|
||||
})
|
||||
|
||||
const getData = (api: string) => {
|
||||
flag.value = true;
|
||||
let dt = 0;
|
||||
let dt1 = 0;
|
||||
const _source = new EventSourcePolyfill(api);
|
||||
source.value = _source;
|
||||
_source.onmessage = (e: any) => {
|
||||
|
@ -59,24 +64,16 @@ const getData = (api: string) => {
|
|||
switch (props.type) {
|
||||
case 'active':
|
||||
if (res.success) {
|
||||
_source.close();
|
||||
dt += res.total;
|
||||
count.value = dt;
|
||||
flag.value = false;
|
||||
} else {
|
||||
if (res.source) {
|
||||
errCount.value = 1
|
||||
id.value = res.source.id;
|
||||
isSource.value = true;
|
||||
} else {
|
||||
errCount.value = 1
|
||||
}
|
||||
dt1 += res.total;
|
||||
errCount.value = dt1;
|
||||
}
|
||||
break;
|
||||
case 'sync':
|
||||
dt += res;
|
||||
count.value = dt;
|
||||
flag.value = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -93,7 +90,12 @@ watch(
|
|||
() => props.api,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
getData(newValue);
|
||||
getDeviceNumber({}).then(resp => {
|
||||
if(resp.status === 200){
|
||||
total.value = resp.result
|
||||
getData(newValue);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true },
|
||||
|
|
|
@ -339,6 +339,7 @@ export default {
|
|||
granted: true,
|
||||
},
|
||||
{ id: 'add', name: '新增', enabled: true, granted: true },
|
||||
{ id: 'view', name: '查看', enabled: true, granted: true },
|
||||
],
|
||||
assetAccesses: [],
|
||||
options: {},
|
||||
|
@ -364,6 +365,12 @@ export default {
|
|||
granted: true,
|
||||
},
|
||||
{ id: 'update', name: '编辑', enabled: true, granted: true },
|
||||
{
|
||||
id: 'action',
|
||||
name: '启/禁用',
|
||||
enabled: true,
|
||||
granted: true,
|
||||
},
|
||||
{
|
||||
id: 'add',
|
||||
name: '新增',
|
||||
|
@ -451,6 +458,7 @@ export default {
|
|||
icon: 'icon-wangluozujian',
|
||||
url: '/iot/link/firmware',
|
||||
buttons: [
|
||||
{ id: 'view', name: '查看', enabled: true, granted: true },
|
||||
{ id: 'update', name: '编辑', enabled: true, granted: true },
|
||||
{
|
||||
id: 'action',
|
||||
|
@ -784,6 +792,7 @@ export default {
|
|||
granted: true,
|
||||
},
|
||||
{ id: 'add', name: '新增', enabled: true, granted: true },
|
||||
{ id: 'view', name: '查看', enabled: true, granted: true },
|
||||
],
|
||||
assetAccesses: [],
|
||||
options: {},
|
||||
|
@ -809,6 +818,12 @@ export default {
|
|||
granted: true,
|
||||
},
|
||||
{ id: 'update', name: '编辑', enabled: true, granted: true },
|
||||
{
|
||||
id: 'action',
|
||||
name: '启/禁用',
|
||||
enabled: true,
|
||||
granted: true,
|
||||
},
|
||||
{
|
||||
id: 'add',
|
||||
name: '新增',
|
||||
|
@ -896,6 +911,7 @@ export default {
|
|||
icon: 'icon-wangluozujian',
|
||||
url: '/iot/link/firmware',
|
||||
buttons: [
|
||||
{ id: 'view', name: '查看', enabled: true, granted: true },
|
||||
{ id: 'update', name: '编辑', enabled: true, granted: true },
|
||||
{
|
||||
id: 'action',
|
||||
|
|
|
@ -4,7 +4,7 @@ export default [
|
|||
code: 'iot',
|
||||
name: '物联网',
|
||||
owner: 'iot',
|
||||
// //id: '1',
|
||||
id: '9c21f88182e7cc75cbdfa8e4b7844272',
|
||||
url: '/iot',
|
||||
icon: 'icon-wulianwang',
|
||||
sortIndex: 1,
|
||||
|
@ -15,7 +15,7 @@ export default [
|
|||
name: '首页',
|
||||
owner: 'iot',
|
||||
//parentId: '1',
|
||||
//id: '1-1',
|
||||
id: 'd56cfb0076ecc4ff2d8503b39b3dbf1c',
|
||||
url: '/iot/home',
|
||||
icon: 'icon-zhihuishequ',
|
||||
sortIndex: 1,
|
||||
|
@ -50,7 +50,7 @@ export default [
|
|||
name: '通知管理',
|
||||
owner: 'iot',
|
||||
//parentId: '1',
|
||||
//id: '1-2',
|
||||
id: 'b27e972543cdc5da5730b6d4b9b537b1',
|
||||
url: '/iot/notice',
|
||||
icon: 'icon-tongzhiguanli',
|
||||
sortIndex: 2,
|
||||
|
@ -62,7 +62,7 @@ export default [
|
|||
name: '通知配置',
|
||||
owner: 'iot',
|
||||
//parentId: '1',
|
||||
//id: '1-2',
|
||||
id: '09bcab0a6a1f0796075254a453139287',
|
||||
url: '/iot/notice/Config',
|
||||
icon: 'icon-tongzhiguanli',
|
||||
sortIndex: 1,
|
||||
|
@ -193,7 +193,7 @@ export default [
|
|||
name: '通知模板',
|
||||
owner: 'iot',
|
||||
//parentId: '1',
|
||||
//id: '1-2',
|
||||
id: '705b82c807fa18360bf62a2b35f454e9',
|
||||
url: '/iot/notice/Template',
|
||||
icon: 'icon-tongzhiguanli',
|
||||
sortIndex: 2,
|
||||
|
@ -317,7 +317,7 @@ export default [
|
|||
name: '设备管理',
|
||||
owner: 'iot',
|
||||
//parentId: '1',
|
||||
//id: '1-3',
|
||||
id: 'b6327c3ff01b49c9a7a96101606dc27a',
|
||||
url: '/iot/device',
|
||||
icon: 'icon-shebei',
|
||||
sortIndex: 3,
|
||||
|
@ -329,7 +329,7 @@ export default [
|
|||
name: '仪表盘',
|
||||
owner: 'iot',
|
||||
//parentId: '1-3',
|
||||
//id: '1-3-1',
|
||||
id: '68a02c9efa9fb4885c89b007f97d074d',
|
||||
url: '/iot/device/DashBoard',
|
||||
icon: 'icon-keshihua',
|
||||
sortIndex: 1,
|
||||
|
@ -360,7 +360,7 @@ export default [
|
|||
name: '产品',
|
||||
owner: 'iot',
|
||||
//parentId: '1-3',
|
||||
//id: '1-3-2',
|
||||
id: '8ddbb67de5f65514105d47b448bfd70e',
|
||||
url: '/iot/device/Product',
|
||||
icon: 'icon-chanpin',
|
||||
sortIndex: 2,
|
||||
|
@ -552,7 +552,7 @@ export default [
|
|||
name: '设备',
|
||||
owner: 'iot',
|
||||
//parentId: '1-3',
|
||||
//id: '1-3-3',
|
||||
id: '1b136e7e4e4e74bb24b91802e4cfcd2d',
|
||||
url: '/iot/device/Instance',
|
||||
icon: 'icon-shebei',
|
||||
sortIndex: 3,
|
||||
|
@ -760,7 +760,7 @@ export default [
|
|||
name: '产品分类',
|
||||
owner: 'iot',
|
||||
//parentId: '1-3',
|
||||
//id: '1-3-4',
|
||||
id: 'bc83f18659982abb9ac1a96362fc3372',
|
||||
sortIndex: 4,
|
||||
url: '/iot/device/Category',
|
||||
icon: 'icon-chanpinfenlei',
|
||||
|
@ -819,7 +819,7 @@ export default [
|
|||
name: '运维管理',
|
||||
owner: 'iot',
|
||||
//parentId: '1',
|
||||
//id: '1-4',
|
||||
id: 'bd55cdc9d0c1700afe628f572f91c22e',
|
||||
url: '/iot/link',
|
||||
icon: 'icon-yunweiguanli-1',
|
||||
permissions: [],
|
||||
|
@ -830,7 +830,7 @@ export default [
|
|||
name: '仪表盘',
|
||||
owner: 'iot',
|
||||
//parentId: '1-4',
|
||||
//id: '1-4-1',
|
||||
id: '47bedff9df89ecc0f0ce896e53805f02',
|
||||
sortIndex: 1,
|
||||
url: '/iot/link/dashboard',
|
||||
icon: 'icon-keshihua',
|
||||
|
@ -853,7 +853,7 @@ export default [
|
|||
name: '设备接入网关',
|
||||
owner: 'iot',
|
||||
//parentId: '1-4',
|
||||
//id: '1-4-2',
|
||||
id: '10e67b761ec1f4206fabf36fcf9d9b0b',
|
||||
sortIndex: 2,
|
||||
url: '/iot/link/accessConfig',
|
||||
icon: 'icon-wangguanzishebei',
|
||||
|
@ -971,16 +971,15 @@ export default [
|
|||
],
|
||||
},
|
||||
],
|
||||
accessSupport: { text: "支持", value: "support" },
|
||||
supportDataAccess: true,
|
||||
assetType: 'deviceGateway'
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
},
|
||||
{
|
||||
code: 'link/Protocol',
|
||||
name: '协议管理',
|
||||
owner: 'iot',
|
||||
//parentId: '1-4',
|
||||
//id: '1-4-3',
|
||||
id: 'cdd73c8cb02d1ae9af61ded7fc31e9c5',
|
||||
sortIndex: 3,
|
||||
url: '/iot/link/protocol',
|
||||
icon: 'icon-tongzhiguanli',
|
||||
|
@ -1044,16 +1043,15 @@ export default [
|
|||
],
|
||||
},
|
||||
],
|
||||
accessSupport: { text: "支持", value: "support" },
|
||||
supportDataAccess: true,
|
||||
assetType: 'protocol'
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
},
|
||||
{
|
||||
code: 'Log',
|
||||
name: '日志管理',
|
||||
owner: 'iot',
|
||||
//parentId: '1-4',
|
||||
//id: '1-4-4',
|
||||
id: 'c340f8977e0d221da893715cab58ae8c',
|
||||
sortIndex: 4,
|
||||
url: '/iot/link/Log',
|
||||
icon: 'icon-rizhifuwu',
|
||||
|
@ -1077,7 +1075,7 @@ export default [
|
|||
name: '网络组件',
|
||||
owner: 'iot',
|
||||
//parentId: '1-4',
|
||||
//id: '1-4-5',
|
||||
id: 'f99acd0b64f96209eb276236cfb427cb',
|
||||
sortIndex: 5,
|
||||
url: '/iot/link/type',
|
||||
icon: 'icon-wangluozujian',
|
||||
|
@ -1147,16 +1145,15 @@ export default [
|
|||
],
|
||||
},
|
||||
],
|
||||
accessSupport: { text: "支持", value: "support" },
|
||||
supportDataAccess: true,
|
||||
assetType: 'network'
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
},
|
||||
{
|
||||
code: 'link/Certificate',
|
||||
name: '证书管理',
|
||||
owner: 'iot',
|
||||
//parentId: '1-4',
|
||||
//id: '1-4-6',
|
||||
id: 'e395655a273a1b765236342738289587',
|
||||
sortIndex: 6,
|
||||
url: '/iot/link/Certificate',
|
||||
icon: 'icon-zhengshuguanli',
|
||||
|
@ -1204,16 +1201,15 @@ export default [
|
|||
],
|
||||
},
|
||||
],
|
||||
accessSupport: { text: "支持", value: "support" },
|
||||
supportDataAccess: true,
|
||||
assetType: 'certificate'
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
},
|
||||
{
|
||||
code: 'media/Stream',
|
||||
name: '流媒体服务',
|
||||
owner: 'iot',
|
||||
//parentId: '1-4',
|
||||
//id: '1-4-7',
|
||||
id: '82fd382e97bc132aa1a6cc926d804d48',
|
||||
sortIndex: 7,
|
||||
url: '/iot/link/Stream',
|
||||
icon: 'icon-xuanzetongdao1',
|
||||
|
@ -1279,7 +1275,7 @@ export default [
|
|||
name: '远程升级',
|
||||
owner: 'iot',
|
||||
//parentId: '1-4',
|
||||
//id: '1-4-9',
|
||||
id: 'e0943d4c2fa539e89df1ff92e3379477',
|
||||
sortIndex: 9,
|
||||
url: '/iot/link/firmware',
|
||||
icon: 'icon-yuanchengshengji',
|
||||
|
@ -1381,14 +1377,16 @@ export default [
|
|||
],
|
||||
},
|
||||
],
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
accessSupport: { text: "间接支持", value: "indirect" },
|
||||
supportDataAccess: false,
|
||||
indirectMenus: ['8ddbb67de5f65514105d47b448bfd70e']
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
code: 'link/DataCollect',
|
||||
name: '数据采集',
|
||||
id: '3e5a9473e284803134b3f63c086d7385',
|
||||
owner: 'iot',
|
||||
sortIndex: 10,
|
||||
url: '/iot/link/DataCollect',
|
||||
|
@ -1401,6 +1399,7 @@ export default [
|
|||
name: '仪表盘',
|
||||
owner: 'iot',
|
||||
sortIndex: 1,
|
||||
id: '802c1d835cd9f687ffb2092b593fb1b8',
|
||||
url: '/iot/DataCollect/Dashboard',
|
||||
icon: 'icon-keshihua',
|
||||
showPage: [
|
||||
|
@ -1425,6 +1424,7 @@ export default [
|
|||
code: 'DataCollect/Channel',
|
||||
name: '通道管理',
|
||||
owner: 'iot',
|
||||
id: 'e867ee3d31a7b963d38f40a3b51d0191',
|
||||
sortIndex: 2,
|
||||
url: '/iot/DataCollect/Channel',
|
||||
icon: 'icon-rizhifuwu',
|
||||
|
@ -1559,6 +1559,7 @@ export default [
|
|||
code: 'DataCollect/Collector',
|
||||
name: '采集器',
|
||||
owner: 'iot',
|
||||
id: 'f97141d2737ebc3e3ab2cda4a38e8c79',
|
||||
sortIndex: 3,
|
||||
url: '/iot/DataCollect/Collector',
|
||||
icon: 'icon-yingyongguanli',
|
||||
|
@ -1696,7 +1697,7 @@ export default [
|
|||
name: '告警中心',
|
||||
owner: 'iot',
|
||||
//parentId: '1',
|
||||
//id: '1-5',
|
||||
id: '3c7dca6ea8b5828bbcc023ce905244f7',
|
||||
sortIndex: 5,
|
||||
url: '/iot/Alarm',
|
||||
icon: 'icon-shebeigaojing',
|
||||
|
@ -1709,7 +1710,7 @@ export default [
|
|||
name: '仪表盘',
|
||||
owner: 'iot',
|
||||
//parentId: '1-5',
|
||||
//id: '1-5-1',
|
||||
id: 'f4d6880e3d8b3e3234c547fa84856b32',
|
||||
sortIndex: 1,
|
||||
url: '/iot/Alarm/dashboard',
|
||||
icon: 'icon-keshihua',
|
||||
|
@ -1728,7 +1729,7 @@ export default [
|
|||
name: '基础配置',
|
||||
owner: 'iot',
|
||||
//parentId: '1-5',
|
||||
//id: '1-5-3',
|
||||
id: 'af160284d1934bf052a2eeb9b9a9cb8f',
|
||||
sortIndex: 2,
|
||||
url: '/iot/Alarm/Config',
|
||||
icon: 'icon-chajianguanli',
|
||||
|
@ -1752,7 +1753,7 @@ export default [
|
|||
name: '告警配置',
|
||||
owner: 'iot',
|
||||
//parentId: '1-5',
|
||||
//id: '1-5-2',
|
||||
id: 'c5d3b1261f2f414dd04b0bf9194aa29e',
|
||||
sortIndex: 3,
|
||||
url: '/iot/Alarm/Configuration',
|
||||
icon: 'icon-warning_amber',
|
||||
|
@ -1866,7 +1867,7 @@ export default [
|
|||
name: '告警记录',
|
||||
owner: 'iot',
|
||||
//parentId: '1-5',
|
||||
//id: '1-5-4',
|
||||
id: 'fca24d8d3276a410f7031a9b721017fd',
|
||||
sortIndex: 4,
|
||||
url: '/iot/Alarm/Log',
|
||||
icon: 'icon-changjingliandong',
|
||||
|
@ -1920,7 +1921,7 @@ export default [
|
|||
name: '北向输出',
|
||||
owner: 'iot',
|
||||
//parentId: '1',
|
||||
//id: '1-6',
|
||||
id: 'ea3d760edbd908eb0bc901db2801e8b5',
|
||||
sortIndex: 6,
|
||||
url: '/iot/northbound',
|
||||
icon: 'icon-yunyunjieru',
|
||||
|
@ -1933,7 +1934,7 @@ export default [
|
|||
name: 'DuerOS',
|
||||
owner: 'iot',
|
||||
//parentId: '1-6',
|
||||
//id: '1-6-1',
|
||||
id: '4a7c3fbac5a3a894e90d0e9e4a3e4aa5',
|
||||
sortIndex: 1,
|
||||
url: '/iot/northbound/DuerOS',
|
||||
icon: 'icon-zhineng',
|
||||
|
@ -2012,7 +2013,7 @@ export default [
|
|||
name: '阿里云',
|
||||
owner: 'iot',
|
||||
//parentId: '1-6',
|
||||
//id: '1-6-2',
|
||||
id: '2b808202bfc9159838d3be675e63719f',
|
||||
sortIndex: 2,
|
||||
url: '/iot/northbound/AliCloud',
|
||||
icon: 'icon-aliyun',
|
||||
|
@ -2092,7 +2093,7 @@ export default [
|
|||
name: '规则引擎',
|
||||
owner: 'iot',
|
||||
//parentId: '1',
|
||||
//id: '1-7',
|
||||
id: '91aa7c753b1c030dfad612aa0a45d453',
|
||||
sortIndex: 7,
|
||||
url: '/iot/rule-engine',
|
||||
icon: 'icon-zidingyiguize',
|
||||
|
@ -2104,7 +2105,7 @@ export default [
|
|||
name: '规则编排',
|
||||
owner: 'iot',
|
||||
//parentId: '1-7',
|
||||
//id: '1-7-1',
|
||||
id: '898001f2efa11f93253d67a254904ead',
|
||||
sortIndex: 1,
|
||||
url: '/iot/rule-engine/Instance',
|
||||
icon: 'icon-changjingliandong',
|
||||
|
@ -2251,7 +2252,7 @@ export default [
|
|||
name: '场景联动',
|
||||
owner: 'iot',
|
||||
//parentId: '1-7',
|
||||
//id: '1-7-2',
|
||||
id: 'b68867fdc24cfc3df7c52e842136f439',
|
||||
sortIndex: 2,
|
||||
url: '/iot/rule-engine/scene',
|
||||
icon: 'icon-yunweiguanli-1',
|
||||
|
@ -2405,6 +2406,7 @@ export default [
|
|||
code: 'edge',
|
||||
name: '边缘网关',
|
||||
owner: 'iot',
|
||||
id: 'cc29671ed5ef8d6df951b2fc523f36ca',
|
||||
sortIndex: 8,
|
||||
url: '/iot/edge',
|
||||
icon: 'icon-bianyuanwangguan',
|
||||
|
@ -2415,6 +2417,7 @@ export default [
|
|||
code: 'edge/Device',
|
||||
name: '网关设备',
|
||||
owner: 'iot',
|
||||
id: 'c9f2530273ec057e3a5674faf3c6c073',
|
||||
sortIndex: 1,
|
||||
url: '/iot/edge/Devic',
|
||||
icon: 'icon-bumenguanli',
|
||||
|
@ -2519,13 +2522,15 @@ export default [
|
|||
],
|
||||
},
|
||||
],
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
accessSupport: { text: "间接支持", value: "indirect" },
|
||||
supportDataAccess: false,
|
||||
indirectMenus: ['1b136e7e4e4e74bb24b91802e4cfcd2d']
|
||||
},
|
||||
{
|
||||
code: 'edge/Resource',
|
||||
name: '资源库',
|
||||
owner: 'iot',
|
||||
id: '7f49fcece2b291aa595a0ace3ea43ca1',
|
||||
sortIndex: 2,
|
||||
url: '/iot/edge/Resource',
|
||||
icon: 'icon-Vector',
|
||||
|
@ -2609,7 +2614,7 @@ export default [
|
|||
code: 'media',
|
||||
name: '视频中心',
|
||||
owner: 'iot',
|
||||
//id: '2',
|
||||
id: 'a0ca3cb1035b1484e04344f85a688d71',
|
||||
url: '/media',
|
||||
icon: 'icon-shipinwangguan',
|
||||
sortIndex: 2,
|
||||
|
@ -2621,7 +2626,7 @@ export default [
|
|||
name: '首页',
|
||||
owner: 'iot',
|
||||
//parentId: '2',
|
||||
//id: '2-1',
|
||||
id: 'a7693e3ccb4144fc66c4b6b7a716576b',
|
||||
sortIndex: 1,
|
||||
url: '/media/home',
|
||||
icon: 'icon-zhihuishequ',
|
||||
|
@ -2636,7 +2641,7 @@ export default [
|
|||
name: '仪表盘',
|
||||
owner: 'iot',
|
||||
//parentId: '2',
|
||||
//id: '2-2',
|
||||
id: 'cc989fbfa0cd7f70f6a1154c89f2b9a4',
|
||||
sortIndex: 2,
|
||||
url: '/media/dashboard',
|
||||
icon: 'icon-keshihua',
|
||||
|
@ -2656,7 +2661,7 @@ export default [
|
|||
name: '视频设备',
|
||||
owner: 'iot',
|
||||
//parentId: '2',
|
||||
//id: '2-3',
|
||||
id: 'c4d640af0a00ce619a429e7d1c2d2bb8',
|
||||
sortIndex: 3,
|
||||
url: '/media/device',
|
||||
icon: 'icon-shipinwangguan',
|
||||
|
@ -2770,15 +2775,16 @@ export default [
|
|||
],
|
||||
},
|
||||
],
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
accessSupport: { text: "间接支持", value: "indirect" },
|
||||
supportDataAccess: false,
|
||||
indirectMenus: ['1b136e7e4e4e74bb24b91802e4cfcd2d']
|
||||
},
|
||||
{
|
||||
code: 'media/SplitScreen',
|
||||
name: '分屏展示',
|
||||
owner: 'iot',
|
||||
//parentId: '2',
|
||||
//id: '2-4',
|
||||
id: '33ad7bae1dcb991bfe434d62fb2c72ba',
|
||||
sortIndex: 4,
|
||||
url: '/media/SplitScreen',
|
||||
icon: 'icon-fenpingzhanshi1',
|
||||
|
@ -2806,15 +2812,16 @@ export default [
|
|||
],
|
||||
},
|
||||
],
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
accessSupport: { text: "间接支持", value: "indirect" },
|
||||
supportDataAccess: false,
|
||||
indirectMenus: ['1b136e7e4e4e74bb24b91802e4cfcd2d']
|
||||
},
|
||||
{
|
||||
code: 'media/Cascade',
|
||||
name: '国标级联',
|
||||
owner: 'iot',
|
||||
//parentId: '2',
|
||||
//id: '2-5',
|
||||
id: '1e00baa93418f820671f24ed45db59ae',
|
||||
sortIndex: 5,
|
||||
url: '/media/Cascade',
|
||||
icon: 'icon-guojijilian',
|
||||
|
@ -2929,7 +2936,7 @@ export default [
|
|||
code: 'system',
|
||||
name: '系统管理',
|
||||
owner: 'iot',
|
||||
//id: '3',
|
||||
id: 'fd1670b860ae58cc58bcd01d027ccd35',
|
||||
url: '/system',
|
||||
icon: 'icon-xitongguanli1',
|
||||
sortIndex: 3,
|
||||
|
@ -2941,7 +2948,7 @@ export default [
|
|||
name: '基础配置',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-1',
|
||||
id: '96e4bd287adbe0486e2168c59450841f',
|
||||
sortIndex: 1,
|
||||
url: '/system/Basis',
|
||||
icon: 'icon-shezhi',
|
||||
|
@ -2981,7 +2988,7 @@ export default [
|
|||
name: '用户管理',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-2',
|
||||
id: 'fe2e557bcf09a5503cbb5bebeb0b7f1c',
|
||||
sortIndex: 2,
|
||||
url: '/system/user',
|
||||
icon: 'icon-yonghuguanli',
|
||||
|
@ -3072,7 +3079,7 @@ export default [
|
|||
name: '组织管理',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-3',
|
||||
id: '3962ec0835f3b4a68c1f63b955625046',
|
||||
sortIndex: 3,
|
||||
url: '/system/Department',
|
||||
icon: 'icon-bumenguanli',
|
||||
|
@ -3271,7 +3278,7 @@ export default [
|
|||
name: '角色管理',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-4',
|
||||
id: '9d1e96f17649ef5e7b8e7c6bb8e7b775',
|
||||
sortIndex: 4,
|
||||
url: '/system/Role',
|
||||
icon: 'icon-jiaoseguanli',
|
||||
|
@ -3349,7 +3356,7 @@ export default [
|
|||
name: '菜单管理',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-5',
|
||||
id: 'dcb6fa15da2eae8a4fdb71755edbc2bb',
|
||||
sortIndex: 5,
|
||||
url: '/system/Menu',
|
||||
icon: 'icon-caidanguanli',
|
||||
|
@ -3433,7 +3440,7 @@ export default [
|
|||
name: '权限管理',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-6',
|
||||
id: 'da14fad88888dc13024e8261ff8fc2b5',
|
||||
sortIndex: 6,
|
||||
url: '/system/Permission',
|
||||
icon: 'icon-quanxianguanli',
|
||||
|
@ -3523,7 +3530,7 @@ export default [
|
|||
name: '关系配置',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-8',
|
||||
id: '2fa02b8758fe82a6b9666f4ebb1bbd03',
|
||||
sortIndex: 8,
|
||||
url: '/system/Relationship',
|
||||
icon: 'icon-shuxingpeizhi',
|
||||
|
@ -3579,7 +3586,7 @@ export default [
|
|||
name: '数据源管理',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-9',
|
||||
id: 'c62a6bd5018763dae9fc0d869b6df3a2',
|
||||
sortIndex: 9,
|
||||
url: '/system/DataSource',
|
||||
icon: 'icon-shebei',
|
||||
|
@ -3664,7 +3671,7 @@ export default [
|
|||
name: 'API配置',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-10',
|
||||
id: '8750142230773cde42a4e28efa7f84d5',
|
||||
sortIndex: 10,
|
||||
url: '/system/Api',
|
||||
icon: 'icon-chakanAPI',
|
||||
|
@ -3713,7 +3720,7 @@ export default [
|
|||
name: '应用管理',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-11',
|
||||
id: 'e0640f9621c21078cad62d5646a5579d',
|
||||
sortIndex: 11,
|
||||
url: '/system/Apply',
|
||||
icon: 'icon-yingyongguanli',
|
||||
|
@ -3807,7 +3814,7 @@ export default [
|
|||
name: 'License管理',
|
||||
owner: 'iot',
|
||||
//parentId: '3',
|
||||
//id: '3-12',
|
||||
id: '3-12',
|
||||
sortIndex: 12,
|
||||
url: '/system/License',
|
||||
icon: 'icon-zidingyiguize',
|
||||
|
@ -3851,6 +3858,7 @@ export default [
|
|||
//物联卡
|
||||
{
|
||||
path: '5Hpl',
|
||||
id: '76d77b275aa60553e9ea1cb40677e9c2',
|
||||
sortIndex: 4,
|
||||
level: 1,
|
||||
owner: 'iot',
|
||||
|
@ -3864,6 +3872,7 @@ export default [
|
|||
path: '5Hpl-mghg',
|
||||
sortIndex: 1,
|
||||
level: 1,
|
||||
id: '899d4880929c3a8fc02068351f55316b',
|
||||
owner: 'iot',
|
||||
name: '首页',
|
||||
code: 'iot-card/Home',
|
||||
|
@ -3881,15 +3890,15 @@ export default [
|
|||
actions: ['query'],
|
||||
},
|
||||
],
|
||||
accessSupport: {
|
||||
text: '不支持',
|
||||
value: 'unsupported',
|
||||
},
|
||||
accessSupport: { text: "间接支持", value: "indirect" },
|
||||
supportDataAccess: false,
|
||||
indirectMenus: ['1deaa9efc0fc37a8e8e81fa9d6540bc3']
|
||||
},
|
||||
{
|
||||
path: '5Hpl-4VFS',
|
||||
sortIndex: 2,
|
||||
level: 1,
|
||||
id: 'f2ea1793896fa5ecc816e975e07d4edb',
|
||||
owner: 'iot',
|
||||
name: '仪表盘',
|
||||
code: 'iot-card/Dashboard',
|
||||
|
@ -3897,13 +3906,15 @@ export default [
|
|||
icon: 'icon-keshihua',
|
||||
showPage: ['network-flow'],
|
||||
permissions: [{ permission: 'network-flow', actions: ['query'] }],
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
accessSupport: { text: "间接支持", value: "indirect" },
|
||||
supportDataAccess: false,
|
||||
indirectMenus: ['1deaa9efc0fc37a8e8e81fa9d6540bc3']
|
||||
},
|
||||
{
|
||||
path: '5Hpl-O2m8',
|
||||
sortIndex: 3,
|
||||
level: 2,
|
||||
id: '1deaa9efc0fc37a8e8e81fa9d6540bc3',
|
||||
owner: 'iot',
|
||||
name: '物联卡管理',
|
||||
code: 'iot-card/CardManagement',
|
||||
|
@ -4067,6 +4078,7 @@ export default [
|
|||
path: '5Hpl-ZjAG',
|
||||
sortIndex: 4,
|
||||
level: 2,
|
||||
id: 'e332ab7c3837fe08b86a6e4f16dd1dcc',
|
||||
owner: 'iot',
|
||||
name: '充值管理',
|
||||
showPage: ['network-card'],
|
||||
|
@ -4106,13 +4118,15 @@ export default [
|
|||
],
|
||||
},
|
||||
],
|
||||
accessSupport: { text: "不支持", value: "unsupported" },
|
||||
supportDataAccess: false
|
||||
accessSupport: { text: "间接支持", value: "indirect" },
|
||||
supportDataAccess: false,
|
||||
indirectMenus: ['febd4c4b452ece6bb1d760c25b37b75f']
|
||||
},
|
||||
{
|
||||
path: '5Hpl-eS9h',
|
||||
sortIndex: 5,
|
||||
level: 2,
|
||||
id: 'febd4c4b452ece6bb1d760c25b37b75f',
|
||||
owner: 'iot',
|
||||
name: '平台接入',
|
||||
code: 'iot-card/Platform',
|
||||
|
@ -4186,6 +4200,7 @@ export default [
|
|||
path: '5Hpl-cL34',
|
||||
sortIndex: 6,
|
||||
level: 1,
|
||||
id: 'c4dfe00c4d7ecfd327eaeb278546502e',
|
||||
owner: 'iot',
|
||||
name: '操作记录',
|
||||
code: 'iot-card/Record',
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<pro-search :columns='columns' target='iot-card-bind-device' @search='handleSearch' type='simple' />
|
||||
<j-pro-table
|
||||
ref='bindDeviceRef'
|
||||
:alertRender='false'
|
||||
:columns='columns'
|
||||
:request='queryUnbounded'
|
||||
model='TABLE'
|
||||
|
|
|
@ -47,9 +47,13 @@
|
|||
allowClear
|
||||
showSearch
|
||||
:filter-option="filterOption"
|
||||
:disabled="type === 'edit'"
|
||||
:options="OperatorList"
|
||||
v-model:value="modelRef.operatorName"
|
||||
placeholder="请选择运营商"
|
||||
@select='() => {
|
||||
modelRef.platformConfigId = undefined
|
||||
}'
|
||||
>
|
||||
</j-select>
|
||||
</j-form-item>
|
||||
|
|
|
@ -903,7 +903,7 @@ const handelRemove = async () => {
|
|||
message.error('请选择数据');
|
||||
return;
|
||||
}
|
||||
const resp = await removeCards(_selectedRowKeys.value);
|
||||
const resp = await removeCards(_selectedRowKeys.value.map( v => ({ id:v })));
|
||||
if (resp.status === 200) {
|
||||
message.success('操作成功');
|
||||
_selectedRowKeys.value = [];
|
||||
|
|
|
@ -159,6 +159,14 @@ const queryProviders = async () => {
|
|||
// dataSource.value = getTypeList(resp.result)[0].list.filter(
|
||||
// (item) => item.name !== '插件设备接入',
|
||||
// );
|
||||
if (route.query.save) {
|
||||
// 视频中心-设备快速添加产品, 添加接入网关
|
||||
goProviders(
|
||||
dataSource.value
|
||||
.find((f: any) => f.title === '视频类设备接入')
|
||||
?.list?.find((f: any) => f.id === route.query.type),
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -121,7 +121,14 @@ const onFinish = async (values: any) => {
|
|||
id === ':id' ? await save(params) : await update({ ...params, id });
|
||||
if (resp.status === 200) {
|
||||
onlyMessage('操作成功', 'success');
|
||||
history.back();
|
||||
|
||||
if (route.query.save) {
|
||||
// @ts-ignore
|
||||
window?.onSaveSuccess(resp.result);
|
||||
window.close();
|
||||
} else {
|
||||
history.back();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -68,17 +68,17 @@
|
|||
:rules="{ required: true, message: '请选择接入网关' }"
|
||||
>
|
||||
<div class="gateway-box">
|
||||
<div v-if="!gatewayList.length">
|
||||
暂无数据,请先
|
||||
<PermissionButton
|
||||
type="link"
|
||||
style="padding: 0"
|
||||
hasPermission="link/AccessConfig:add"
|
||||
@click="onJump"
|
||||
>
|
||||
添加{{ providerType[props.channel] }}接入网关
|
||||
</PermissionButton>
|
||||
</div>
|
||||
<j-empty
|
||||
v-if="!gatewayList.length"
|
||||
style="margin-top: 50px"
|
||||
>
|
||||
<template #description>
|
||||
暂无数据,请先
|
||||
<j-button type="link" @click="handleAdd">
|
||||
添加{{ providerType[props.channel] }} 接入网关
|
||||
</j-button>
|
||||
</template>
|
||||
</j-empty>
|
||||
<div
|
||||
class="gateway-item"
|
||||
v-for="(item, index) in gatewayList"
|
||||
|
@ -242,8 +242,8 @@ watch(
|
|||
if (val) {
|
||||
getGatewayList();
|
||||
} else {
|
||||
_selectedRowKeys.value = [];
|
||||
extendFormItem.value = [];
|
||||
_selectedRowKeys.value = [];;
|
||||
extendFormItem.value = [];;
|
||||
emit('close');
|
||||
}
|
||||
},
|
||||
|
@ -299,13 +299,18 @@ const handleCancel = () => {
|
|||
formRef.value.resetFields();
|
||||
};
|
||||
|
||||
const onJump = () => {
|
||||
menuStory.jumpPage(
|
||||
`link/AccessConfig/Detail`,
|
||||
{ id: ':id' },
|
||||
{ view: false },
|
||||
/**
|
||||
* 添加接入网关
|
||||
*/
|
||||
const handleAdd = () => {
|
||||
const tab: any = window.open(
|
||||
`${origin}/#/iot/link/accessConfig/detail/:id?save=true&view=false&type=${props.channel}`,
|
||||
);
|
||||
}
|
||||
tab.onSaveSuccess = async (value: string) => {
|
||||
await getGatewayList();
|
||||
handleClick(value);
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
]'
|
||||
type='type'
|
||||
v-model:value='paramsValue.type'
|
||||
@change='typeChange'
|
||||
@select='typeChange'
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
|
@ -137,7 +137,7 @@ const props = defineProps({
|
|||
type: Object as PropType<TermsType>,
|
||||
default: () => ({
|
||||
column: '',
|
||||
type: '',
|
||||
type: 'and',
|
||||
termType: 'eq',
|
||||
value: {
|
||||
source: 'fixed',
|
||||
|
@ -174,15 +174,16 @@ const handOptionByColumn = (option: any) => {
|
|||
if (option) {
|
||||
termTypeOptions.value = option.termTypes || []
|
||||
tabsOptions.value[0].component = option.type
|
||||
const _options = isArray(option.options) ? option.options : []
|
||||
if (option.type === 'boolean') {
|
||||
valueOptions.value = option.options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || [
|
||||
valueOptions.value = _options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || [
|
||||
{ label: '是', value: true },
|
||||
{ label: '否', value: false },
|
||||
]
|
||||
} else if(option.type === 'enum') {
|
||||
valueOptions.value = option.options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || []
|
||||
valueOptions.value = _options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || []
|
||||
} else{
|
||||
valueOptions.value = (option.options || []).map((item: any) => ({ ...item, label: item.name, value: item.id}))
|
||||
valueOptions.value = _options?.map((item: any) => ({ ...item, label: item.name, value: item.id})) || []
|
||||
}
|
||||
valueColumnOptions.value = treeFilter(cloneDeep(columnOptions.value), option.type, 'type')
|
||||
} else {
|
||||
|
|
|
@ -323,7 +323,7 @@
|
|||
<j-button v-else @click="onAdd">点击配置执行动作</j-button>
|
||||
</div>
|
||||
<div class="item-number">{{ name + 1 }}</div>
|
||||
<j-popconfirm title="确认删除?" @confirm="onDelete" :overlayStyle='{minWidth: "180px"}'>
|
||||
<j-popconfirm title="确认删除?" @confirm="onDelete" placement="topRight" :overlayStyle='{minWidth: "190px"}'>
|
||||
<div class="item-delete">
|
||||
<AIcon type="DeleteOutlined" />
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<PermissionButton
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
hasPermission="device/Instance:add"
|
||||
hasPermission="rule-engine/Scene:add"
|
||||
>
|
||||
<template #icon><AIcon type="PlusOutlined" /></template>
|
||||
新增
|
||||
|
|
Loading…
Reference in New Issue