ZengTao
2023-09-14 64601cfd934c074330fa9df76831c5ee361513bf
CanadaMes-ui/src/views/Electrical/Parameter.vue
@@ -102,13 +102,23 @@
          }
          let obj = JSON.parse(msg.data);
          if (obj.params && obj.state){
          this.record.params[0] = obj.params[0];
          this.record.state = obj.state[0];
          if (obj.state && obj.state.length > 0) {
  let isButtonDisabled = this.record.state.includes(1);
  this.isButtonDisabled = isButtonDisabled;
          let isButtonDisabled = this.record.state.includes(1);
          // 判断state中是否存在1
          //console.log(isButtonDisabled)
          this.isButtonDisabled = isButtonDisabled; // 将判断结果保存到变量isButtonDisabled中
         // 将判断结果保存到变量isButtonDisabled中
          for (let a = 0; a <= this.record.params[0].length - 1; a++) {
            if (!this.record.xyData[a]) {
@@ -117,7 +127,8 @@
              this.record.xyData[a].value = this.record.params[0][a];
            }
          }
        }
      }
          //console.log(this.record.xyData);
          this.$forceUpdate();
        };
@@ -145,7 +156,7 @@
};
</script>
<style>
<style scoped>
.kuai_div {
  width: calc(100% / 2);
  margin-bottom: 15px;
@@ -153,6 +164,7 @@
.el-input__inner {
  border: 1px solid black;
  border: none;
}
.in_mc {
@@ -162,7 +174,7 @@
.blue-button {
  background-color: skyblue;
  color: #fff;
}
#btn_div {
  width: 100%;