From 55900c9b6519dbe3d0f02f914a1cb2b2be22a6a9 Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期三, 15 五月 2024 09:45:21 +0800
Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/smart-web
---
src/views/mdc/realtime-status/index.vue | 51 +++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 41 insertions(+), 10 deletions(-)
diff --git a/src/views/mdc/realtime-status/index.vue b/src/views/mdc/realtime-status/index.vue
index 7d582d6..3aa324f 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>
@@ -34,16 +37,16 @@
<el-icon><ArrowRight /></el-icon>
</div>
<div class="status-content-cardp" v-for="item in timestatus" style="width: 33.3333%; height: 50%;">
- <div class="status-card-box" style="border-color: rgb(89, 89, 89);">
+ <div class="status-card-box" style="border-color: #ccc;">
<div class="status-card-top">
<div class="status-card-detail">
<div title="461" class="status-card-detail-name">{{item.code}}</div>
<div class="status-card-detail-status">
- <div class="status-card-detail-point" style="background-color: rgb(89, 89, 89);"></div>{{item.statusName}}
- <div class="status-card-detail-time" style="color: rgb(89, 89, 89);">---</div>
+ <div class="status-card-detail-point" :style="{'background-color': item.statusStyle}"></div>{{item.statusName}}
+ <div class="status-card-detail-time" style="color: #ccc;">---</div>
</div>
</div>
- <div class="status-card-machine" style="border-color: rgb(89, 89, 89);">
+ <div class="status-card-machine" style="border-color: #ccc;">
<div class="status-card-machine-img">
<img src="./station.png" width="68" height="68">
</div>
@@ -89,12 +92,15 @@
},
data() {
return {
+ statusStyle: "#ccc",
titleMap: "",
visible: false,
visibleList: [],
devicestatus: [],
timestatus: [],
station: "鐘舵�佽鍥�",
+ stationlabel: "",
+ stationlabelList: [],
current: "1",
total: 0,
deviceStatus: [],
@@ -103,10 +109,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) {
@@ -119,7 +150,7 @@
var visibleList = JSON.parse(JSON.stringify(item.properties));
visibleList.forEach(item=> {
if(item.statusName) {
- item.namecolor = "rgb(89, 89, 89)";
+ item.namecolor = "#ccc";
item.statuscolor = "rgba(89, 89, 89, 0.14)";
}else {
item.namecolor = "rgb(127, 192, 192)";
@@ -130,10 +161,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;
})
@@ -167,12 +196,14 @@
var records = JSON.parse(JSON.stringify(res.data.records));
records.forEach(item=> {
item.statusName = "鏈煡";
+ item.statusStyle = '#ccc';
if(item.properties != null) {
item.properties.forEach(item1=> {
this.devicestatus.forEach(item2=> {
if(item2.status == item1.value) {
item.statusName = item2.statusName;
item1.statusName = item2.statusName;
+ item.statusStyle = item2.color;
}
})
})
@@ -361,7 +392,7 @@
.status-card-bottom {
font-weight: 700;
font-size: 14px;
- color: #3b8e8e;
+ color: #409eff;
display: flex;
align-items: center;
justify-content: flex-start;
--
Gitblit v1.9.3