haoxuan
2023-08-28 4436c040d89980c8624f88cd4876c808806c414f
src/views/visualization.vue
@@ -531,6 +531,9 @@
      countDownHour:0,
      countDownMinute:0,
      Arr:[],
        // 记录定时器状态
        procInfoTimer:null,
       cutdownTimer: null
    };
  },
  mounted() {
@@ -658,6 +661,7 @@
      };
      getTaskInfo().then((res) => {
        if (res.code == 200) {
          this.procedureList=[]
          this.taskData = res.data
            ? res.data
            : {
@@ -694,9 +698,11 @@
              }
            });
            this.getProgressInfo();
            setInterval(() => {
              this.getProgressInfo();
            }, 6000);
            if (!this.procInfoTimer) {
                this.procInfoTimer = setInterval(() => {
                  this.getProgressInfo();
                }, 6000);
            }
          }
          console.log(this.procedureList, "===1111procedureList");
          // setTimeout(() => {
@@ -707,9 +713,12 @@
        }
        if(res.code!=200||!this.taskData.Procedure.ID){
          this.getcountdown();
            setInterval(() => {
              this.getcountdown();
            }, 60000);
          // 控制重新请求getTaskInfo, 只开启一个定时器
         if (!this.cutdownTimer) {
          this.cutdownTimer = setInterval(() => {
                 this.getcountdown();
              }, 60000);
          }
        }
      });
    },
@@ -729,6 +738,7 @@
        this.$refs.control.islook = true;
      } else {
        this.$message.error("当前设备没有工序!");
      }
    },
    // 右侧完成
@@ -831,11 +841,7 @@
  font-size: 30px;
  font-weight: 700;
}
.el-button--primary {
  border: 0;
  font-weight: 700 !important;
  font-size: 16px !important;
}
.color_4efefa {
  color: #4efefa;
}
@@ -1348,4 +1354,9 @@
    }
  }
}
.el-button--primary {
  border: 0;
  font-weight: 700 !important;
  font-size: 16px;
}
</style>