qinzhipeng_v@didiglobal.com пре 5 година
родитељ
комит
7f5cd05e3e

+ 9 - 5
src/views/reportManagement/ReleaseReport/newReleaeTemplate.vue

@@ -165,9 +165,11 @@ export default {
       handler(newV) {
         if (newV) {
           console.log(newV, 'hahah')
-          newV.map(item => {
-            this.judge = true
-            this.remoteMethod(item)
+          this.$nextTick(() => {
+            newV.map(item => {
+              this.judge = true
+              this.remoteMethod(item)
+            })
           })
           this.reportreleaseInitReportRelease(newV)
         }
@@ -240,14 +242,16 @@ export default {
     },
 
     async remoteMethod(query) { // 远程搜索任务
-      const res = await taskList({ bizId: Number(localStorage.getItem('bizId')), name: query })
+      const res = await taskList({ name: query })
       if (res.code === 200) {
         this.tasksOptions = res.data
         if (this.judge) {
+          alert(query)
+          console.log(res.data, 'cdscs')
           this.tasksDetailList.push(res.data[0])
+
           this.taskId.push(res.data[0].id)
           this.judge = false
-          console.log(this.tasksDetailList, 'cdscs')
         }
       }
     },

+ 1 - 1
src/views/reportManagement/Testing/newTestingTemplate.vue

@@ -267,7 +267,7 @@ export default {
     },
 
     async remoteMethod(query) { // 远程搜索任务
-      const res = await taskList({ bizId: Number(localStorage.getItem('bizId')), name: query })
+      const res = await taskList({ name: query })
       if (res.code === 200) {
         this.tasksOptions = res.data
         if (this.judge) {