From 316d969b4d6cff5e478d60f7bc739c4d39a6a0e7 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 13 九月 2022 18:48:57 +0800
Subject: [PATCH] 隐藏GB28181,点位监控日期排序, 修改功能打开方式
---
src/views/equipmentManagement/algorithmDetail/components/Card.vue | 69 ++++++++++++++++------------------
1 files changed, 32 insertions(+), 37 deletions(-)
diff --git a/src/views/equipmentManagement/algorithmDetail/components/Card.vue b/src/views/equipmentManagement/algorithmDetail/components/Card.vue
index eaea749..b1c6b0d 100644
--- a/src/views/equipmentManagement/algorithmDetail/components/Card.vue
+++ b/src/views/equipmentManagement/algorithmDetail/components/Card.vue
@@ -17,7 +17,7 @@
<div class="realTime" v-if="realTime">瀹炴椂</div>
<div class="poll" v-if="poll">杞</div>
<div class="analyse" v-if="analyse">姝e湪鍒嗘瀽</div>
- <div class="update" v-if="update">鍙崌绾�</div>
+ <div class="update" v-if="data.isUpgrade">鍙崌绾�</div>
</div>
</div>
</div>
@@ -25,7 +25,7 @@
<ul class="info">
<li>
<div class="label">瀹夎鏃堕棿:</div>
- <div class="data">{{ data.update_time }}</div>
+ <div class="data">{{ data.create_time }}</div>
</li>
<li>
@@ -35,7 +35,8 @@
<li>
<div class="label">婵�娲荤爜:</div>
- <div class="data">-</div>
+ <div class="data" v-if="data.activateCode">{{ data.activateCode }}</div>
+ <div class="data" v-else>-</div>
</li>
</ul>
@@ -56,45 +57,42 @@
</template>
<script>
-import { unInstallSdk, unInstallApp, installAppSdk } from "@/api/device";
+//搴旂敤鍗歌浇
+import { unInstallApp } from "@/api/device";
+//绠楁硶鍗囩骇鍗歌浇
+import { downloadOrUpgrade, unInstall } from "@/api/algorithm";
export default {
props: {
data: {},
type: {},
- address: {},
+ id: {},
},
data() {
return {
- realTime: true,
+ realTime: false,
poll: false,
- analyse: true,
- update: true,
+ analyse: false,
};
},
- created() {
- console.log(this.data);
- },
+ created() {},
methods: {
+ //鍗囩骇
async upgrade() {
- const res = await installAppSdk({
- ip: this.address.ip,
- port: this.address.port,
- id: this.data.id,
+ const res = await downloadOrUpgrade({
+ nodeId: this.id,
+ path: this.data.id,
+ userId: JSON.parse(sessionStorage.getItem("userInfo")).id,
+ inputText: data.sdk_name || data.name,
});
-
- if (res.success) {
- this.$message({
+ if (res && res.success) {
+ this.$notify({
type: "success",
- message: "鍗囩骇鎴愬姛!",
- });
- } else {
- this.$message({
- type: "info",
- message: "鍗囩骇澶辫触",
+ message: "鎿嶄綔鎴愬姛,璇风◢鍚�",
});
}
},
+ //鍗歌浇
unInstall() {
this.$confirm(`鏄惁鍗歌浇璇�${this.type == "sdk" ? "绠楁硶" : "搴旂敤"}`, {
confirmButtonText: "纭鍗歌浇",
@@ -103,27 +101,24 @@
customClass: "uninstallBox",
})
.then(async () => {
+ //鍗歌浇绠楁硶
if (this.type == "sdk") {
- const res = await unInstallSdk({
- ip: this.address.ip,
- port: this.address.port,
+ const res = await unInstall({
+ nodeId: this.id,
sdkId: this.data.id,
+ userId: JSON.parse(sessionStorage.getItem("userInfo")).id,
});
- if (res.success) {
- this.$message({
+ if (res && res.success) {
+ this.$emit("unInstall");
+ this.$notify({
type: "success",
- message: "鍒犻櫎鎴愬姛!",
- });
- } else {
- this.$message({
- type: "info",
- message: "鍒犻櫎澶辫触",
+ message: "鍗歌浇鎴愬姛",
});
}
+ //鍗歌浇搴旂敤
} else if (this.type == "app") {
const res = await unInstallApp({
- ip: this.address.ip,
- port: this.address.port,
+ nodeId: this.id,
appId: this.data.id,
});
if (res.success) {
--
Gitblit v1.8.0