From e8e7f2c01f78994b2a8717224537babbdd40b040 Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期二, 14 十一月 2023 17:57:29 +0800 Subject: [PATCH] feat: 更改缺少工艺参数允许生产的情况下显示提示的逻辑 --- src/components/TaskControlModal.vue | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/TaskControlModal.vue b/src/components/TaskControlModal.vue index 73dec7f..e9c7302 100644 --- a/src/components/TaskControlModal.vue +++ b/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 }); } }, -- Gitblit v1.8.0