From dea3bb3e1f644f5792446dca82044c8b698046fc Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期一, 17 六月 2024 14:21:10 +0800
Subject: [PATCH] 1

---
 src/views/mdc/realtime-status/index.vue |   12 +++++++-----
 src/views/mdc/station-live.vue          |   13 +++++++------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/src/views/mdc/realtime-status/index.vue b/src/views/mdc/realtime-status/index.vue
index 504c737..b2140af 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-06-17 13:46:52
+ * @LastEditTime: 2024-06-17 14:19:22
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/realtime-status/index.vue
  瀹炴椂鐪嬫澘
 -->
@@ -326,10 +326,12 @@
 							        		}
 					        			}else {
 									    	if(item1.key == 'Alarm') {  //鎶ヨ
-									    		var v = JSON.parse(eventData.data[item1.key].v);
-									    		item1.name = v.code;
-									    		item1.code = v.msg;
-									    		item1.color = "#370C0D";
+												if(eventData.data[item1.key]) {
+													var v = JSON.parse(eventData.data[item1.key].v);
+													item1.name = v.code;
+													item1.code = v.msg;
+													item1.color = "#370C0D";
+												}
 									    	}else {
 												if(eventData.data[item1.key]) {
 													item1.code = eventData.data[item1.key].v;
diff --git a/src/views/mdc/station-live.vue b/src/views/mdc/station-live.vue
index c45a40a..dc233a0 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-06-17 13:47:17
+ * @LastEditTime: 2024-06-17 14:20:06
  * @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
 -->
@@ -644,7 +644,6 @@
 				}
 			},
 			getdmp(lastLevelId,machineId) {
-				console.log(lastLevelId,machineId)
 				this.$HTTP.get(`/api/blade-cps/workstation/get-dmp-variables?machineId=${machineId}&workstationId=${lastLevelId}`).then(res=> {
 					if(res.code == 200) {
 						this.dmpList = [];
@@ -676,10 +675,12 @@
 							        })
 							    }else {
 							    	if(item.name == 'Alarm') {  //鎶ヨ
-							    		var v = JSON.parse(eventData.data[item.name].v);
-							    		item.description = v.code;
-							    		item.codeName = v.msg;
-							    		item.color = "#370C0D";
+										if(eventData.data[item.name]) {
+											var v = JSON.parse(eventData.data[item.name].v);
+											item.description = v.code;
+											item.codeName = v.msg;
+											item.color = "#370C0D";
+										}
 							    	}else {
 										if(eventData.data[item.name]) {
 											item.codeName = eventData.data[item.name].v;

--
Gitblit v1.9.3