From e0ed1c5677e8c565b4fa8795c769ac0a75a9a66e Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期二, 21 十一月 2023 17:44:34 +0800
Subject: [PATCH] feat: 错误处理重置值班人

---
 src/views/visualization.vue |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/views/visualization.vue b/src/views/visualization.vue
index 9bae842..a4710d8 100644
--- a/src/views/visualization.vue
+++ b/src/views/visualization.vue
@@ -914,12 +914,12 @@
     getModelList(){
       for (let i in this.TasksCopy){
         this.TasksCopy[i].isUpdateIcon=false;
-        if(this.TasksCopy[i].Procedure.ID&&this.TasksCopy[i].number){
+        // number:this.TasksCopy[i].number
+        if(this.TasksCopy[i].Procedure.ID){
           processModelList({
             procedureId: this.TasksCopy[i].Procedure.ID,
             page: 1,
             pageSize:6,
-            number:this.TasksCopy[i].number
           }).then(res=>{
             if(res.code==200){
               this.processList=res.data?res.data:[];
@@ -1185,6 +1185,8 @@
       getTaskInfo({taskMode:1}).then((res) => {
         if (res.code === 200&&res.data) {
           this.TaskCount=res.data?.TaskCount ?? 0
+        }else {
+          this.TaskCount = 0
         }
       },err=>{
         this.TaskCount = 0
@@ -1306,7 +1308,9 @@
                 }, 3000);
               }
         }else{
+          this.TaskCount = 0
           const allChannels = [0,1];
+          this.workers = []
           allChannels.forEach(channel => this.TasksCopy.push(this.newTaskPlaceholder(channel)))
           this.TasksCopy.sort((a,b)=>a.Channel - b.Channel)
           this.cutClick(1)
@@ -1323,7 +1327,9 @@
 
       },err=>{
         console.error(err)
+        this.TaskCount = 0
         const allChannels = [0,1];
+        this.workers = []
         allChannels.forEach(channel => this.TasksCopy.push(this.newTaskPlaceholder(channel)))
         this.TasksCopy.sort((a,b)=>a.Channel - b.Channel)
         this.cutClick(1)

--
Gitblit v1.8.0