From 994e5e08cba4e6b9ce321b7cf5cb1ec8d19dfa22 Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期二, 12 四月 2022 17:50:21 +0800 Subject: [PATCH] 摄像机管理 --- src/views/equipmentManagement/algorithmDetail/index.vue | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/views/equipmentManagement/algorithmDetail/index.vue b/src/views/equipmentManagement/algorithmDetail/index.vue index fb217af..af52910 100644 --- a/src/views/equipmentManagement/algorithmDetail/index.vue +++ b/src/views/equipmentManagement/algorithmDetail/index.vue @@ -51,7 +51,7 @@ :key="index" :data="item" :type="'sdk'" - :address="{ ip: ip, port: port }" + :id="id" ></Card> </div> <el-select @@ -78,7 +78,7 @@ :data="item" :key="index" :type="'app'" - :address="{ ip: ip, port: port }" + :id="id" ></Card> </div> <el-select @@ -108,11 +108,15 @@ import Card from "@/views/equipmentManagement/algorithmDetail/components/Card"; export default { created() { + this.userId = JSON.parse(sessionStorage.getItem("userInfo")).id; + this.id = this.$route.query.id; this.getData(); }, data() { return { deviceData: {}, + userId: null, + id: null, applicationInfo: [ { label: "绠楁硶鎬绘暟", @@ -148,13 +152,12 @@ { value: "all", label: "鍏ㄩ儴搴旂敤" }, { value: "update", label: "寰呭崌绾у簲鐢�" }, ], //搴旂敤涓嬫媺妗嗛�夐」 - ip: this.$route.query.ip, - port: this.$route.query.port, - id: this.$route.query.id, + activeApp: [], upgradeApp: [], activeSdk: [], upgradeSdk: [], + enableSdk: [], time: "", }; }, @@ -174,13 +177,16 @@ //鑾峰彇搴旂敤鍒楄〃 async getApp() { - const res = await findAllApp({ ip: this.ip, port: this.port }); - res.data.data.forEach((item) => { + const res = await findAllApp({ userId: "", nodeId: this.id }); + res.data.forEach((item) => { if (item.installed) { this.activeApp.push(item); } if (item.installed && item.isUpgrade) { this.upgradeApp.push(item); + } + if (item.installed && item.enable) { + this.enableSdk.push(item); } }); @@ -190,14 +196,12 @@ this.applicationInfo[3].count = this.upgradeApp.length ? this.upgradeApp.length : 0; - - console.log(this.applicationInfo); }, //鑾峰彇绠楁硶鍒楄〃 async getSdk() { - const res2 = await findAllSdk({ ip: this.ip, port: this.port }); - res2.data.data.forEach((item) => { + const res2 = await findAllSdk({ userId: "", nodeId: this.id }); + res2.data.forEach((item) => { if (item.installed) { this.activeSdk.push(item); } @@ -222,7 +226,7 @@ //鑾峰彇璁惧鏃堕棿鎴� async getTime() { - const res = await clockInfo({ ip: this.ip, port: this.port }); + const res = await clockInfo({ userId: this.userId, nodeId: this.id }); if (res && res.success) { // const timezone = res.data.time_zone; let timestamp = res.data.local_time; @@ -260,6 +264,10 @@ return this.upgradeSdk; } + if (this.algorithm == "process") { + return this.enableSdk; + } + return []; }, applicationArr() { -- Gitblit v1.8.0