ZengTao
2023-11-30 2f78ef164653d5d30732d6e2e3f822a68de63010
CanadaMes-ui/src/views/Electrical/ManualonePosition2.vue
@@ -188,6 +188,27 @@
      }
      if (currentButtonName === '回零') {
        const data2 = [];
        const resetButtonValues = this.jsonData.map(item => {
          const buttonItem = item.find(subItem => subItem.button && subItem.button.name === '回零');
          return buttonItem ? buttonItem.button.value : null;
        }).filter(value => value !== null);
        // 将得到的值添加到 data 数组中
        data2.push(...resetButtonValues);
        data2.unshift([], [], [], []);
        const jsonObject2 = { data2 };
        // 提交数据到后端
        const jsonString2 = JSON.stringify(jsonObject2);
        console.log('所有Type为0的value:', jsonString2);
        socket?.send(jsonString2);
      }
    },
@@ -221,7 +242,7 @@
          }
          let obj = JSON.parse(msg.data);
          console.log(obj)
          // console.log(obj)
          const jsonData2 = this.jsonData;
          const handleMouseMove = throttle(function (event) {