From 9bc80fd0aab5bd3d58aad90038685195f4966dee Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期四, 07 十二月 2023 13:10:58 +0800
Subject: [PATCH] 报警json文件存放在resources
---
CanadaMes-ui/src/views/Electrical/Parameter2.vue | 53 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/CanadaMes-ui/src/views/Electrical/Parameter2.vue b/CanadaMes-ui/src/views/Electrical/Parameter2.vue
index d1f0748..ad9df4b 100644
--- a/CanadaMes-ui/src/views/Electrical/Parameter2.vue
+++ b/CanadaMes-ui/src/views/Electrical/Parameter2.vue
@@ -94,7 +94,7 @@
<script>
import LanguageMixin from '../../lang/LanguageMixin'
import data from '../../configuration/parameter2'
- import { throttle } from 'lodash';
+ // import { throttle } from 'lodash';
let socket;
// window.onload=function(){
@@ -175,7 +175,7 @@
// 灏嗗緱鍒扮殑鍊兼坊鍔犲埌 data 鏁扮粍涓�
data2.push(resetButtonValues.flat());
-
+ data2.push([]);
// 鍦� data2 鏁扮粍鍓嶉潰娣诲姞涓や釜绌烘暟缁�
@@ -189,6 +189,35 @@
}
+
+if (currentButtonName === 'Abort/ResumeTasks' || currentButtonName === '鎬ュ仠鍚庝腑姝�/缁х画閫夋嫨') {
+ const data3 = [];
+ const resetButtonValues3 = [this.jsonData[13][0].button.value];
+
+ // 灏嗗緱鍒扮殑鍊兼坊鍔犲埌 data 鏁扮粍涓�
+ data3.push(resetButtonValues3.flat());
+ data3.unshift([]);
+ // 鍦� data3 鏁扮粍鍓嶉潰娣诲姞涓や釜绌烘暟缁�
+
+
+
+ // 鍒涘缓 jsonObject3 瀵硅薄锛屽苟娣诲姞 data3 灞炴��
+ const jsonObject3 = { data: data3 };
+
+ // 鎻愪氦鏁版嵁鍒板悗绔�
+ const jsonString3 = JSON.stringify(jsonObject3);
+ console.log('鎬ュ仠鍚庝腑姝�/缁х画閫夋嫨:', jsonString3);
+ socket?.send(jsonString3);
+ // setTimeout(()=>
+ // window.location.reload(),2000
+ // )
+}
+
+
+
+
+
+
},
initWebSocket () {
@@ -229,12 +258,16 @@
- const handleMouseMove = throttle(function(event) {
- const inputBox = document.querySelectorAll('.action-button');
- const target = event.target;
+ // const handleMouseMove = throttle(function(event) {
+ // const inputBox = document.querySelectorAll('.id');
+ // const target = event.target;
- if (parms && inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
-//娓呴櫎id
+ // if (parms && inputBox && Array.from(inputBox).every(box => !box.contains(target))) {
+//鎬ュ仠鎸夐挳
+ jsonData2[13][0].button.value = obj.jiting[0][0];
+
+
+ //娓呴櫎id
for (let i = 0; i < jsonData2.length; i++) {
let arr = jsonData2[i];
@@ -353,11 +386,11 @@
}
// console.log(jsonData2);
-}, 50);
+// }, 50);
-document.addEventListener('mouseover', handleMouseMove);
+// document.addEventListener('mouseover', handleMouseMove);
-};
+// };
--
Gitblit v1.8.0