From 649a012bd1f445afd51e3aad8e137d43c36434e0 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期五, 05 八月 2022 11:48:21 +0800
Subject: [PATCH] 检索导出添加组织字段
---
src/views/GB28181/components/DevList.vue | 118 ++++++++++++++++++++++++++++------------------------------
1 files changed, 57 insertions(+), 61 deletions(-)
diff --git a/src/views/GB28181/components/DevList.vue b/src/views/GB28181/components/DevList.vue
index ce540b4..83ae5ea 100644
--- a/src/views/GB28181/components/DevList.vue
+++ b/src/views/GB28181/components/DevList.vue
@@ -4,21 +4,45 @@
<div class="empty" v-if="devList.length === 0">
<img src="/images/search/1.png" alt="" />
<div class="des">鎮ㄨ繕鏈坊鍔犻泦缇ゆ垨璁惧锛岃鍦ㄨ澶囩鐞嗕腑娣诲姞</div>
- <div class="button add">绔嬪嵆娣诲姞</div>
+ <div class="button add" @click="$router.push('/equipmentList')">
+ 绔嬪嵆娣诲姞
+ </div>
</div>
<div class="list scroll">
- <div class="devItem" v-for="(item, index) in devList" :key="index">
+ <div class="devItem" v-for="(item, index) in clusterList" :key="index">
<div class="mainInfo">
- <img v-if="item.type == 1" src="/images/hashrate/闆嗙兢.png" alt="" />
- <img v-else src="/images/hashrate/equipment.png" alt="" />
+ <img src="/images/hashrate/cluster.png" alt="" />
<div class="right">
- <div class="name">闆嗙兢123</div>
- <div class="ip">192.168.1.1</div>
- <div class="number">璁惧鎬婚噺:7</div>
+ <div class="name">{{ item.cluster_name }}</div>
+ <div class="ip">{{ item.virtual_ip }}</div>
+ <div class="number">璁惧鎬婚噺:{{ item.nodeNum }}</div>
</div>
- <div class="button set" @click="showSettingBox = true">閰嶇疆</div>
+ <div
+ class="button set"
+ @click="setting({ clusterId: item.cluster_id }, item.nodeList)"
+ >
+ 閰嶇疆
+ </div>
+ </div>
+ </div>
+ <div
+ class="devItem"
+ v-for="(item, index) in devList"
+ :key="index + 'dev'"
+ >
+ <div class="mainInfo">
+ <img src="/images/hashrate/equipment.png" alt="" />
+
+ <div class="right">
+ <div class="name">{{ item.devName }}</div>
+ <div class="ip">{{ item.devIp }}</div>
+ </div>
+
+ <div class="button set" @click="setting({ devId: item.devId })">
+ 閰嶇疆
+ </div>
</div>
</div>
</div>
@@ -26,73 +50,45 @@
<SettingBox
v-if="showSettingBox"
@close="showSettingBox = false"
+ :id="idObj"
+ :nodeList="nodeList"
></SettingBox>
</div>
</template>
<script>
import SettingBox from "@/views/GB28181/components/SettingBox";
+import { getClusterDevList } from "@/api/clusterManage";
export default {
components: {
SettingBox,
},
+ created() {
+ this.getClusterDevList();
+ },
data() {
return {
- devList: [
- {
- type: 1,
- },
- {
- type: 1,
- },
-
- {
- type: 1,
- },
- {
- type: 1,
- },
- {
- type: 1,
- },
- {
- type: 1,
- },
-
- {
- type: 1,
- },
- {
- type: 1,
- },
- {
- type: 1,
- },
- {
- type: 1,
- },
- {
- type: 1,
- },
- {
- type: 1,
- },
- {
- type: 1,
- },
- {
- type: 1,
- },
- {
- type: 0,
- },
- {
- type: 0,
- },
- ],
+ clusterList: [],
+ devList: [],
showSettingBox: false,
+ idObj: {},
+ nodeList: [],
};
+ },
+ methods: {
+ async getClusterDevList() {
+ const res = await getClusterDevList();
+ if (res && res.success) {
+ this.clusterList = res.data.clusterList;
+ this.devList = res.data.devList;
+ }
+ },
+ setting(id, nodeList) {
+ this.idObj = id;
+ this.nodeList = nodeList ? nodeList : [];
+ this.showSettingBox = true;
+ },
},
};
</script>
@@ -209,4 +205,4 @@
}
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0