wu
2024-01-23 6b8f5b27be57413aae81b3505878b71097b0751e
CanadaMes-ui/src/layout/index.vue
@@ -103,19 +103,19 @@
      </el-table>
    </el-dialog>
    <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh">
            <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'">
                <!-- {{ this.CountDowns }} -->
                {{ this.CountDowns }}
            </div>
        </el-dialog>
    <el-dialog :visible.sync="dialogFormVisible3">
      <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'">
        <!-- {{ this.CountDowns }} -->
        {{ this.CountDowns }}
      </div>
    </el-dialog>
    <!-- <el-dialog :visible.sync="dialogFormVisible3">
      <el-button :class="{ 'blue-button': receivedData === 1 }" @click="toggleButtonValue(1)">{{
        $t('A01Abort/ResumeTasks') }}</el-button>
      <el-button :class="{ 'blue-button': receivedData2 === 1 }" @click="toggleButtonValue(2)">{{
        $t('A02Abort/ResumeTasks') }}</el-button>
    </el-dialog>
    </el-dialog> -->
  </el-container>
</template>
@@ -130,7 +130,7 @@
// import Tag from '../layout/tag.vue';
// import store from '../store';
let socket;
let timer;
export default {
  name: "Layout",
  // store,
@@ -161,7 +161,7 @@
      CountDowns: "0",
      EmergencyStop: false,
      PromptSize: 250,
      dialogFormCountDown:false
      dialogFormCountDown: false
    }
  },
@@ -231,7 +231,7 @@
    },
    init() {
      let viewname = "Home";
      let viewname = "Layout";
      if (typeof (WebSocket) == "undefined") {
        console.log("您的浏览器不支持WebSocket");
      } else {
@@ -274,7 +274,6 @@
            }
            //复位倒计时
            console.log(obj.countdown);
            if (obj.countdown != null) {
              if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
                this.CountDown();
@@ -290,15 +289,12 @@
          if (obj.Abort) {
            if (obj.Abort[0].length > 0) {
              this.receivedData = obj.Abort[0][0];
              this.receivedData2 = obj.Abort[0][1];
              this.dialogFormVisible3 = true;
              // this.dialogFormVisible3 = true;
            }
          }
          this.$forceUpdate();
@@ -316,8 +312,9 @@
    },
    //45秒复位倒数计时
    CountDown() {
      clearInterval(timer);
      let count = 45;
      let timer = setInterval(
      timer = setInterval(
        () => {
          if (this.EmergencyStop == true) {
            this.dialogFormCountDown = false;
@@ -328,7 +325,6 @@
              this.PromptSize = 500;
              this.CountDowns = count;
              count--;
              this.dialogFormCountDown = true;
            }
            else {
              this.PromptSize = 200;
@@ -339,10 +335,13 @@
              }
            }
          }
        },
        1000
      );
      if (this.reset == false && this.EmergencyStop != true) {
        this.dialogFormCountDown = true;
      }
    },
    logout: function () {
      removeToken()