From 6565e619523f045ba3e5e15a5bf3ea3ccbb33ba2 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期四, 28 九月 2023 10:26:01 +0800 Subject: [PATCH] 如果工艺参数是空,或者报错,弹框提示工艺参数错误的提示而不是新任务的弹框 --- src/views/visualization.vue | 5 +++++ src/api/home/index.js | 1 + src/components/AddIssue.vue | 12 +++++++++++- 3 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/api/home/index.js b/src/api/home/index.js index 10d7f96..5b2d0b9 100644 --- a/src/api/home/index.js +++ b/src/api/home/index.js @@ -91,6 +91,7 @@ return request({ url: `v1/task/start/${data.id}`, method: "get", + loadingFlag:true, data, }); }; diff --git a/src/components/AddIssue.vue b/src/components/AddIssue.vue index 6dc7240..65a99df 100644 --- a/src/components/AddIssue.vue +++ b/src/components/AddIssue.vue @@ -167,7 +167,7 @@ </div> <div slot="footer" :class="messageError?'dialog-footer tac btn-error':'dialog-footer tac'" style="overflow: hidden"> <template v-if="messageError"> - <div class="btn" v-if="messageError =='涓嬪彂鎴愬姛锛�'" @click="closeClick"> + <div class="btn" v-if="messageError =='涓嬪彂鎴愬姛锛�'||ArrError" @click="closeClick"> <img src="../../public/close-btn.png" /> </div> <div class="btn" v-else @click="confirmClick2"> @@ -227,6 +227,12 @@ type: [Array], default: () => { return []; + }, + }, + ArrError:{ + type: [String], + default: () => { + return ''; }, }, safeProduce:{ @@ -319,6 +325,10 @@ this.islook = false; // this.islook = true; } + if(this.ArrError){ + this.messageError=this.ArrError; + + } }, getDateObj(date, fmt) { diff --git a/src/views/visualization.vue b/src/views/visualization.vue index da8a906..7dc5a4a 100644 --- a/src/views/visualization.vue +++ b/src/views/visualization.vue @@ -598,6 +598,7 @@ <AddIssue ref="control" :Arr="Arr" + :ArrError="ArrError" :safeProduce="safeProduce" :taskData="taskData" :Order="taskData.Order" @@ -726,6 +727,7 @@ countDownHour: 0, countDownMinute: 0, Arr: [], + ArrError:'', // 璁板綍瀹氭椂鍣ㄧ姸鎬� procInfoTimer: null, cutdownTimer: null, @@ -1046,10 +1048,13 @@ getTaskInfo({taskMode:1}).then(res=>{ if(res.code==200){ this.taskData=res.data.Tasks?res.data.Tasks[0]:{}; + this.ArrError='' if (this.taskData.Procedure.ID) { startTask({ id: this.taskData.Procedure.ID }).then((res) => { if (res.code == 200) { this.Arr =res.data.Params ? res.data.Params : [] + }else{ + this.ArrError=res.msg; } }); } -- Gitblit v1.8.0