From 8089d636a09c0e6a56b16db3aeb2d4aeb929030a Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期日, 21 四月 2024 22:14:18 +0800
Subject: [PATCH] 1
---
src/views/mdc/realtime-status/index.vue | 36 ++++++++++++++++++++++++++++++++----
1 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/src/views/mdc/realtime-status/index.vue b/src/views/mdc/realtime-status/index.vue
index 7d582d6..3f9f793 100644
--- a/src/views/mdc/realtime-status/index.vue
+++ b/src/views/mdc/realtime-status/index.vue
@@ -17,7 +17,7 @@
<span class="setBtn" @click="goSet">璁剧疆</span>
</span>
</div>
- <ul class="status-view-box">
+ <ul class="status-view-box" v-if="station == '鐘舵�佽鍥�'">
<li v-for="(item,index) in devicestatus" @click="searchstatus(item,index)" :class="{'active': item.active}">
<el-icon :style="{'color': item.color}">
<component :is='item.icon'></component>
@@ -26,6 +26,9 @@
<span class="view-box-num">{{item.deviceNum}}</span>
</li>
</ul>
+ <el-radio-group v-model="stationlabel" @change="changestationlabel" v-if="station == '鏍囩瑙嗗浘'" style="margin-top:8px;">
+ <el-radio-button v-for="item in stationlabelList" :label="item.groupName" :value="item.groupId" />
+ </el-radio-group>
<div class="status-content-cardBox">
<div class="status-prev" @click="prev">
<el-icon><ArrowLeft /></el-icon>
@@ -95,6 +98,8 @@
devicestatus: [],
timestatus: [],
station: "鐘舵�佽鍥�",
+ stationlabel: "",
+ stationlabelList: [],
current: "1",
total: 0,
deviceStatus: [],
@@ -103,10 +108,35 @@
},
mounted() {
this.getdevicestatus(); //鑾峰彇椤堕儴title
+ this.getstationlabelList(); //鑾峰彇鏍囩瑙嗗浘涓嬬殑list
},
methods: {
+ changestationlabel(name) {
+ this.stationlabel = name;
+ this.stationlabelList.forEach(item=> {
+ if(item.groupName == name) {
+ this.workStationGroupIdList = [item.groupId];
+ }
+ })
+ this.gettimestatus(); //鏌ヨ鍒楄〃
+ },
+ getstationlabelList() {
+ this.$HTTP.get("/api/blade-cps/group/get-mdc-group").then(res=> {
+ if(res.code == 200) {
+ this.stationlabelList = res.data;
+ this.stationlabel = res.data[0].groupName;
+ }
+ })
+ },
changestatus(name) {
- console.log(name)
+ this.station = name;
+ if(this.station == '鐘舵�佽鍥�') {
+ this.workStationGroupIdList = [];
+ }else {
+ this.stationlabel = this.stationlabelList[0].groupName;
+ this.workStationGroupIdList = [this.stationlabelList[0].groupId];
+ }
+ this.gettimestatus(); //鏌ヨ鍒楄〃
},
showvisible(item) {
if(item.properties == null) {
@@ -130,10 +160,8 @@
this.titleMap = "瀹炴椂鏁版嵁(" + item.code + ")";
this.visibleList = visibleList;
this.visible = true;
- console.log(this.visibleList)
},
searchstatus(item,index) {
- console.log(item)
this.devicestatus.forEach(item=> {
item.active = false;
})
--
Gitblit v1.9.3