qinzhipeng_v@didiglobal.com 4 tahun lalu
induk
melakukan
41451eb89b

+ 0 - 1
src/views/reportManagement/ReleaseReport/newReleaeTemplate.vue

@@ -157,7 +157,6 @@ export default {
     },
     templateId: {
       handler(newV) {
-        console.log(newV, 'cdscdscsds')
         if (newV === '新建模版') { // 新建模版
           this.releaseType = true
           return false

+ 28 - 25
src/views/reportManagement/Testing/newTestingTemplate.vue

@@ -143,8 +143,8 @@ export default {
     searchPeople
   },
   props: {
-    templateId: { type: [String, Number, Object], default: null }, // 模版id
-    taskIds: { type: Array, default: null }
+    taskIds: { type: Array, default: null },
+    templateId: { type: [String, Number, Object], default: null } // 模版id
   },
   data() {
     return {
@@ -164,36 +164,39 @@ export default {
     }
   },
   watch: {
-    templateId: {
+    taskIds: {
       handler(newV) {
-        if (newV === '新建模版') {
-          this.releaseType = true
-        } else {
-          this.releaseType = false
-          if (newV.repot_up) {
-            this.releaseType = true
-            this.settingGetReportModuleById(newV.repot_up)
-          } else {
-            this.releaseType = false
-            if (newV.id) {
-              this.tpltId = newV.moduleId
-              this.reportdelivertestGetReportById(newV.id)
-            } else {
-              this.tpltId = newV
-              this.tpltId ? this.settingGetReportModuleById(newV) : ''
-            }
+        if (newV) {
+          if (newV[0]) {
+            newV.map(item => {
+              this.remoteMethod_data(item)
+            })
+            this.reportdelivertestInitReportRelease(newV)
           }
         }
       },
       immediate: true
     },
-    taskIds: {
+    templateId: {
       handler(newV) {
-        if (newV[0]) {
-          newV.map(item => {
-            this.remoteMethod_data(item)
-          })
-          this.reportdelivertestInitReportRelease(newV)
+        if (newV === '新建模版') {
+          this.releaseType = true
+          return false
+        }
+        if (newV.repot_up) {
+          this.releaseType = true
+          this.settingGetReportModuleById(newV.repot_up)
+          return false
+        }
+        this.releaseType = false
+        if (newV.id) { // 编辑
+          this.tpltId = newV.moduleId
+          this.reportdelivertestGetReportById(newV.id)
+          return false
+        }
+        if (newV) { // 新建
+          this.tpltId = newV
+          this.tpltId ? this.settingGetReportModuleById(newV) : ''
         }
       },
       immediate: true

+ 0 - 1
src/views/reportManagement/components/ReleaseReport.vue

@@ -134,7 +134,6 @@ export default {
       this.dialogDaliy = true
       switch (index) {
         case 2: // 编辑
-          console.log(newData, '西单商场')
           this.daily_taskIds = null // 关联任务
           this.fromData.radio = newData // 选择的模块
           this.reportHome = true // 步骤条

+ 4 - 5
src/views/reportManagement/components/TestingReport.vue

@@ -107,9 +107,6 @@ export default {
       daily_taskIds: [] // 选择的任务ID
     }
   },
-  created() {
-    this.getreportTemplate()
-  },
   methods: {
     async getreportTemplate() { // 获取模版list
       const res = await settingQueryReportModuleList({ bizId: localStorage.getItem('bizId'), type: 1 }) // 1 提测
@@ -126,13 +123,12 @@ export default {
     },
 
     init(index, newData) {
-      console.log(index, newData, '测试')
       this.dialogDaliy = true
       switch (index) {
         case 2: // 编辑
           reportdelivertestGetReportById(newData.id).then(res => {
             if (res.code === 200) {
-              this.daily_taskIds = res.data.taskIds // 关联任务
+              this.daily_taskIds = null// 关联任务
               this.fromData.radio = res.data // 选择的模块
             }
           })
@@ -146,6 +142,7 @@ export default {
         case 4: // 重新提测
           reportdelivertestGetReportById(newData.id).then(res => {
             if (res.code === 200) {
+              this.getreportTemplate()
               this.daily_taskIds = res.data.taskIds // 关联任务
               this.fromData.radio = res.data // 选择的模块
               this.reportHome = true // 步骤条
@@ -158,6 +155,7 @@ export default {
           })
           break
         case 3: // 发送报告
+          this.getreportTemplate()
           this.dailyId = newData.id
           this.reportHome = true // 步骤条
           this.active = 3 // 步骤条状态第三步
@@ -166,6 +164,7 @@ export default {
           this.dailyPreview = true // 展示第三部
           break
         case 7: // 新建
+          this.getreportTemplate()
           this.daily_taskIds = newData
           this.reportHome = true // 步骤条
           this.active = 1 // 步骤条状态第三步