wu
2023-12-08 31101f632c27c05d15f30ca3084e3ed3da2a29af
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);
  
};
// };