CanadaMes-ui/src/views/Electrical/Parameter2.vue
@@ -186,7 +186,7 @@
  <el-input
                v-if="item.type === '0' && groupIndex==15"
                v-model="item.value"
                @keyup.enter.native="timeout"
                @keyup.enter.native="timeout($event)"
                style="width: 300px"
                class="input-box2"
              ></el-input>
@@ -274,7 +274,7 @@
      }
    },
    //范围 0-100
    timeout(){
    timeout(event){
    
        const data3 = [];
@@ -306,7 +306,7 @@
        // setTimeout(()=>
        //   window.location.reload(),2000
        // )
        event.target.blur(); // 取消输入框焦点
    },
@@ -396,21 +396,24 @@
        socket.onopen = function () {
          console.log("websocket已打开");
        };
        let isMouseInInputBox = false; // 标记鼠标是否在输入框内
//         let isMouseInInputBox = false; // 标记鼠标是否在输入框内
        let isUpdated = false;  // 定义标志变量
const inputBox = document.querySelectorAll('.input-box2');
inputBox.forEach(box => {
  box.addEventListener('mouseenter', () => {
    isMouseInInputBox = true;
  });
  box.addEventListener('mouseleave', () => {
    isMouseInInputBox = false;
  });
});
// const inputBox = document.querySelectorAll('.input-box2');
// inputBox.forEach(box => {
//   box.addEventListener('mouseenter', () => {
//     isMouseInInputBox = true;
//   });
//   box.addEventListener('mouseleave', () => {
//     isMouseInInputBox = false;
//   });
// });
        // 收到消息
        socket.onmessage = (msg) => {
          if (!msg.data) {
            return; // 如果收到空数据,则直接返回,不执行后续逻辑
          }
          if (document.activeElement.tagName.toLowerCase() === 'input') {
    return;
          }
          let obj = JSON.parse(msg.data);
@@ -425,7 +428,7 @@
          // const inputBox = document.querySelectorAll('.id');
          // const target = event.target;
          if (parms && !isMouseInInputBox) {
          if (parms ) {
            //急停按钮
            jsonData2[13][0].button.value = obj.jiting[0][0];
            jsonData2[14][0].button.value = obj.jiting[0][1];
@@ -505,6 +508,8 @@
                }
              }
            }
            this.$forceUpdate();
            //扫描枪扫码的ID
            jsonData2.forEach((item) => {