wu
2023-12-18 37f7f87968cfd2c400283fbf83851c39c2c4d456
CanadaMes-ui/src/views/Electrical/Parameter2.vue
@@ -15,13 +15,13 @@
        active-class="blue-button"
        >{{ $t("State") }}</router-link
      >
      <router-link
      <!-- <router-link
        to="/Electrical/Action"
        tag="el-button"
        type="text"
        active-class="blue-button"
        >{{ $t("Action") }}</router-link
      >
        >{{ $t("Action") }}</router-link -->
      <!-- <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
        }}</router-link> -->
      <router-link
@@ -141,7 +141,7 @@
                    item.button.value === 2 && item.button.name !== 'Clear ID',
                  'yellow-button':
                    item.button.value === 1 && item.button.name !== 'Clear ID',
                  id: item.button.value === 1 && item.button.name == 'Clear ID',
                  'id': item.button.value === 1 && item.button.name === 'Clear ID',
                }"
                >{{ item.button.name }}</el-button
              >
@@ -162,7 +162,7 @@
                    item.button.value === 2 && item.button.name !== '清除ID',
                  'yellow-button':
                    item.button.value === 1 && item.button.name !== '清除ID',
                  id: item.button.value === 1 && item.button.name == '清除ID',
                  'id': item.button.value === 1 && item.button.name === '清除ID',
                }"
                >{{ item.button.name }}</el-button
              >
@@ -259,14 +259,14 @@
    },
    updateButtonValue(dataGroup, itemIndex) {
      if (dataGroup[itemIndex].button.value === 0) {
        // 如果当前按钮的值是 0,将其设为 1
        this.$set(dataGroup[itemIndex].button, "value", 1);
      } else {
        // 否则将其设为 0
        this.$set(dataGroup[itemIndex].button, "value", 0);
      }
    },
      if (dataGroup[itemIndex].button.value === 1) {
    // 如果当前按钮的值是 0,将其设为 1
    this.$set(dataGroup[itemIndex].button, 'value', 0);
  } else {
    // 否则将其设为 0
    this.$set(dataGroup[itemIndex].button, 'value', 1);
  }
},
    submitDataToBackend(currentButtonName) {
      if (currentButtonName === "清除ID" || currentButtonName === "Clear ID") {
        const data2 = [];
@@ -358,13 +358,13 @@
          const parms = obj.params;
          console.log(obj);
         // console.log(obj);
          // 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))) {
           if (parms ) {
          //急停按钮
          jsonData2[13][0].button.value = obj.jiting[0][0];
@@ -473,7 +473,9 @@
              }
            }
          }
        }
        };
        //  console.log(jsonData2);
        // }, 50);