From 5c0c6ad7ac6f28e970532af9936de638830f1161 Mon Sep 17 00:00:00 2001 From: ZZJ <10913410+zzj2100@user.noreply.gitee.com> Date: 星期四, 28 七月 2022 10:20:51 +0800 Subject: [PATCH] bugxiufu --- src/views/equipmentManagement/algorithmDetail/index.vue | 44 +++++++++++++++++++++++++++----------------- 1 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/views/equipmentManagement/algorithmDetail/index.vue b/src/views/equipmentManagement/algorithmDetail/index.vue index 4138451..927ef29 100644 --- a/src/views/equipmentManagement/algorithmDetail/index.vue +++ b/src/views/equipmentManagement/algorithmDetail/index.vue @@ -4,7 +4,9 @@ <!-- 闈㈠寘灞� --> <div class="heart"> <el-breadcrumb separator=">"> - <el-breadcrumb-item>绠$悊涓績</el-breadcrumb-item> + <el-breadcrumb-item :to="{ path: '/manageCenter' }" + >绠$悊涓績</el-breadcrumb-item + > <el-breadcrumb-item :to="{ path: '/equipmentList' }" >璁惧绠$悊</el-breadcrumb-item > @@ -49,7 +51,7 @@ :key="index" :data="item" :type="'sdk'" - :address="{ ip: ip, port: port }" + :id="id" ></Card> </div> <el-select @@ -76,7 +78,7 @@ :data="item" :key="index" :type="'app'" - :address="{ ip: ip, port: port }" + :id="id" ></Card> </div> <el-select @@ -106,32 +108,36 @@ 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: "绠楁硶鎬绘暟", count: "", - img: "/images/equipmentManagement/绠楁硶.png", + img: "/images/equipmentManagement/sdk.png", }, { label: "搴旂敤鎬绘暟", count: "", - img: "/images/equipmentManagement/搴旂敤_绾�.png", + img: "/images/equipmentManagement/app.png", color: "red", }, { label: "寰呭崌绾х畻娉�", count: "", - img: "/images/equipmentManagement/绠楁硶_鍗囩骇.png", + img: "/images/equipmentManagement/upgrade.png", }, { label: "寰呭崌绾у簲鐢�", count: "", - img: "/images/equipmentManagement/搴旂敤_绾鍗囩骇.png", + img: "/images/equipmentManagement/app_upgrade.png", color: "red", }, ], //搴旂敤淇℃伅 @@ -146,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: "", }; }, @@ -172,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); } }); @@ -188,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); } @@ -220,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; @@ -258,6 +264,10 @@ return this.upgradeSdk; } + if (this.algorithm == "process") { + return this.enableSdk; + } + return []; }, applicationArr() { -- Gitblit v1.8.0