Jelajahi Sumber

优化测试报告状态

qinzhipeng_v 5 tahun lalu
induk
melakukan
4f4e0fca1e

+ 8 - 4
src/views/Platform/presentation/testPresentation.vue

@@ -307,10 +307,14 @@ export default {
         })
         switch (this.ins) {
           case 1:
-            this.dialogDaily = true
-            this.$nextTick(() => {
-              this.$refs.DailyReport.init(7, [e])
-            })
+            if (taskData.status !== 3) {
+              this.$message({ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可准出,请检查!', type: 'warning' })
+            } else {
+              this.dialogDaily = true
+              this.$nextTick(() => {
+                this.$refs.DailyReport.init(7, [e])
+              })
+            }
             break
           case 2:
             if (taskData.status !== 3) {

+ 6 - 2
src/views/projectManage/taskList/taskViewDetails.vue

@@ -1073,8 +1073,12 @@ export default {
           }
           break
         case 2: // 日报
-          this.dialogDaily = true
-          this.$nextTick(() => { this.$refs.DailyReport.init(1) })
+          if (this.task_form.statusString !== '测试中') {
+            this.$message({ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可准出,请检查!', type: 'warning' })
+          } else {
+            this.dialogDaily = true
+            this.$nextTick(() => { this.$refs.DailyReport.init(1) })
+          }
           break
         case 3:
           if (this.task_form.statusString !== '测试中') {