haoxuan
2023-09-07 dc5472e5bda5f4c9b779977c691e8973e2a1a12c
src/views/visualization.vue
@@ -227,7 +227,7 @@
                    </div> -->
                    <div class="card_top-4">
                      <div>工艺编号:{{ list.number }}</div>
                      <div
                      <!-- <div
                        style="
                          font-size: 14px;
                          color: #cfcfcf;
@@ -235,7 +235,7 @@
                        "
                      >
                        工艺的具体信息请点击控制查看!
                      </div>
                      </div> -->
                    </div>
                  </template>
                </div>
@@ -531,6 +531,9 @@
      countDownHour:0,
      countDownMinute:0,
      Arr:[],
        // 记录定时器状态
        procInfoTimer:null,
       cutdownTimer: null
    };
  },
  mounted() {
@@ -695,9 +698,11 @@
              }
            });
            this.getProgressInfo();
            setInterval(() => {
              this.getProgressInfo();
            }, 6000);
            if (!this.procInfoTimer) {
                this.procInfoTimer = setInterval(() => {
                  this.getProgressInfo();
                }, 6000);
            }
          }
          console.log(this.procedureList, "===1111procedureList");
          // setTimeout(() => {
@@ -708,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,13 +737,8 @@
      if (Object.keys(this.taskData).length > 0 && this.taskData.Procedure.ID) {
        this.$refs.control.islook = true;
      } else {
        this.$confirm( "当前设备没有工序!", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {})
          .catch(() => {});
        this.$message.error("当前设备没有工序!");
      }
    },
    // 右侧完成
@@ -749,13 +752,7 @@
          }
        });
      } else {
        this.$confirm( "当前设备没有工序!", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {})
          .catch(() => {});
        this.$message.error("当前设备没有工序!");
      }
    },
    getRandomNumber(min, max) {
@@ -1155,7 +1152,7 @@
          padding: 0 10px;
          height: 70px;
          line-height: 40px;
          line-height: 70px;
          color: #fff;
          background: rgb(19, 35, 90);
          font-size: 20px;