songshankun
2023-11-14 e8e7f2c01f78994b2a8717224537babbdd40b040
feat: 更改缺少工艺参数允许生产的情况下显示提示的逻辑
1个文件已修改
8 ■■■■ 已修改文件
src/components/TaskControlModal.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/TaskControlModal.vue
@@ -94,7 +94,7 @@
                  工艺参数
                </div>
                <!-- 未获取到工艺参数, 且当前设备允许在没有工艺参数的情况下生产, 则提示-->
                <div v-if="getProcessParamsErrMsg && currentDeviceAllowNoParams" class="title-item title-item-two">
                <div v-if="processParamsLoaded &&  !currentProcessParams?.length && currentDeviceAllowNoParams" class="title-item title-item-two">
                  未获取到工艺参数, 请手动设置或在云端工艺模型中上传
                </div>
                <div
@@ -239,6 +239,7 @@
      currentTaskIndex: 0,
      // 当前展示的任务对应的工艺参数
      currentProcessParams: [],
      processParamsLoaded:false,
      getProcessParamsErrMsg: '',
      // 任务列表
      taskList: [],
@@ -312,6 +313,7 @@
      if (this.secondTimer) {
        clearInterval(this.secondTimer)
      }
      this.processParamsLoaded=false
      this.num = 0;
      this.showBtn = 1;
      this.isLoading = false
@@ -392,7 +394,7 @@
      if (id) {
        this.currentProcessParams = []
        this.getProcessParamsErrMsg = ""
        this.processParamsLoaded =false
        startTask({id}).then((res) => {
          if (res.code === 200) {
            this.currentProcessParams = res.data.Params ?? []
@@ -406,6 +408,8 @@
          console.error(err)
          this.currentProcessParams = []
          this.getProcessParamsErrMsg = '获取工艺参数失败!'
        }).finally(()=>{
          this.processParamsLoaded =true
        });
      }
    },