From 4652987d6b2e88f61984600a030876a99d975ba5 Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期二, 08 十月 2024 18:04:35 +0800
Subject: [PATCH] 1
---
src/views/mdc/realtime-status/index.vue | 44 ++++++++++++++++++++++----------------------
src/utils/tool.js | 2 +-
src/views/mdc/station-live.vue | 12 +++++-------
3 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/src/utils/tool.js b/src/utils/tool.js
index 3dcaf3e..f16c025 100644
--- a/src/utils/tool.js
+++ b/src/utils/tool.js
@@ -2,7 +2,7 @@
* @Descripttion: 宸ュ叿闆�
* @version: 1.2
* @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-10-07 22:35:14
+ * @LastEditTime: 2024-10-08 18:04:17
*/
import CryptoJS from 'crypto-js';
diff --git a/src/views/mdc/realtime-status/index.vue b/src/views/mdc/realtime-status/index.vue
index aaa191b..420a7a0 100644
--- a/src/views/mdc/realtime-status/index.vue
+++ b/src/views/mdc/realtime-status/index.vue
@@ -1,7 +1,7 @@
<!--
* @Date: 2024-04-09 22:11:21
* @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-10-07 21:48:45
+ * @LastEditTime: 2024-10-08 17:50:00
* @FilePath: /mdc/Users/mache/Documents/demo/cps-web/src/views/mdc/realtime-status/index.vue
瀹炴椂鐪嬫澘
-->
@@ -44,7 +44,7 @@
<ArrowRight />
</el-icon>
</div>
- <div class="status-content-cardp" v-for="item in timestatus" :style="{ 'width': (100 / column) + '%' }">
+ <div class="status-content-cardp" v-for="(item,index) in timestatus" :style="{ 'width': (100 / column) + '%' }">
<div class="status-card-box" style="border-color: #ccc;">
<div class="status-card-top">
<div class="status-card-detail">
@@ -66,15 +66,11 @@
<div class="status-card-machine-mesg-label">宸ヤ綅缂栧彿</div>
<div class="status-card-machine-mesg-value">{{ item.code }}</div>
</div>
- <div class="status-card-machine-mesg-form">
- <div class="status-card-machine-mesg-label">宸ュ崟</div>
- <div class="status-card-machine-mesg-value">-</div>
- </div>
</div>
</div>
</div>
<div class="status-card-bottom">
- <div class="status-card-bottom-realtime" @click="showvisible(item)"><i
+ <div class="status-card-bottom-realtime" @click="showvisible(item,index)"><i
class="iconfont saber-xiangqing status-card-bottom-icon"></i> 瀹炴椂鏁版嵁</div>
<div class="status-card-bottom-detail" @click="gostatus(item)"><i
class="iconfont saber-shuju status-card-bottom-icon"></i> 宸ヤ綅璇︽儏</div>
@@ -84,7 +80,7 @@
</div>
<el-dialog :title="titleMap" v-model="visible" :width="740">
<div class="dialogstyle">
- <div class="realtime-analysis-card" v-for="item in visibleList">
+ <div class="realtime-analysis-card" v-for="item in timestatus[clickIndex].properties">
<div class="card-name" :style="{ 'background-color': item.color }">{{ item.name }}</div>
<div class="card-value"
:class="{ 'card-value': true, 'card-value-bg1': item.key != 'Alarm', 'card-value-bg2': item.key == 'Alarm' }">
@@ -108,6 +104,7 @@
},
data() {
return {
+ clickIndex: 0,
allwcs: [],
statusStyle: "#ccc",
titleMap: "",
@@ -129,7 +126,6 @@
mounted() {
this.deviceStatus = this.$route.query.currentTag?[...this.$route.query.currentTag]:[];
this.getstationlabelList(); //鑾峰彇鏍囩瑙嗗浘涓嬬殑list
- this.setIntervalTime(); //鍗佺澧炲姞鏃堕棿
this.getprocess(); //鑾峰彇棰滆壊==銆嬭幏鍙栭《閮╰itle==銆嬭缃嚑琛屽嚑鍒�==銆媤s
},
methods: {
@@ -215,17 +211,19 @@
}
this.gettimestatus(); //鏌ヨ鍒楄〃
},
- showvisible(item) {
- if (item.properties == null || item.properties.length == 0) {
- this.$message({
- message: '璇烽厤缃噰闆嗛」',
- type: 'warning'
- });
- return;
- }
- var visibleList = JSON.parse(JSON.stringify(item.properties));
- this.titleMap = "瀹炴椂鏁版嵁(" + item.code + ")";
- this.visibleList = visibleList;
+ showvisible(item,index) {
+ //clickIndex
+ this.clickIndex = index;
+ // if (item.properties == null || item.properties.length == 0) {
+ // this.$message({
+ // message: '璇烽厤缃噰闆嗛」',
+ // type: 'warning'
+ // });
+ // return;
+ // }
+ // var visibleList = JSON.parse(JSON.stringify(item.properties));
+ // this.titleMap = "瀹炴椂鏁版嵁(" + item.code + ")";
+ // this.visibleList = visibleList;
this.visible = true;
},
searchstatus(item, index) {
@@ -338,6 +336,7 @@
if (eventData.data.DeviceStatus) {
var time = moment(eventData.data.DeviceStatus.t).format('YYYY-MM-DD HH:mm:ss');
var diffTime = that.changeTime(time); //杞崲鎴愬樊鍊硷紙鏃跺垎绉掞級
+ that.setIntervalTime(); //鍗佺澧炲姞鏃堕棿
item.time = diffTime;
that.allwcs.forEach(item1 => {
if (item1.code == eventData.data.DeviceStatus.v) {
@@ -354,7 +353,8 @@
item.properties.forEach((item1, index1) => {
if (item1.key == "DeviceStatus") { //鏈哄櫒鐘舵��
that.allwcs.forEach(item2 => {
- if (item2.code == item1.value) {
+ if (item2.code == eventData.data.DeviceStatus.v) {
+ item1.value = item2.code;
item1.color = item2.color;
item1.code = item2.name;
}
@@ -423,7 +423,7 @@
}
})
}
- }
+ },
}
</script>
diff --git a/src/views/mdc/station-live.vue b/src/views/mdc/station-live.vue
index 51a59cf..b262ed2 100644
--- a/src/views/mdc/station-live.vue
+++ b/src/views/mdc/station-live.vue
@@ -2,7 +2,7 @@
* @Author: lzhe lzhe@example.com
* @Date: 2024-03-26 10:28:33
* @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-10-07 00:49:07
+ * @LastEditTime: 2024-10-08 18:03:09
* @FilePath: /smart-web/src/views/master/person/main/index.vue
* @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -46,7 +46,7 @@
</div>
</div>
<div class="fact-analysis-card" v-for="item in dmpList" v-if="dmpList.length != 0">
- <div class="card-name" :style="{'background-color': item.color}">{{item.description}}</div>
+ <div class="card-name" :style="{'background-color': item.color}">{{item.dplabel}}</div>
<div :class="{'card-value': true,'card-value-bg1':item.name != 'Alarm','card-value-bg2':item.name == 'Alarm'}">{{item.codeName}}</div>
</div>
</div>
@@ -673,7 +673,6 @@
item.color = item1.color;
}
})
- item.description = item.dpLabel;
}else {
if(item.dpName == 'Alarm') { //鎶ヨ
if(eventData.data[item.dpName]) {
@@ -682,24 +681,23 @@
if(v.length == 0) {
JSONData.splice(index,1);
}else {
- item.description = v[0].code;
item.codeName = v[0].msg;
}
}else {
- item.description = v.code;
item.codeName = v.msg;
}
}
}else {
if(eventData.data[item.dpName]) {
- item.description = item.dpLabel;
item.codeName = eventData.data[item.dpName].v;
}
}
that.allwcs.forEach((item1)=> {
if(item.code == item1.code) {
item.color = item1.color;
- }
+ }else {
+ item.color = "#7FC0C0";
+ }
})
}
});
--
Gitblit v1.9.3