qinzhipeng_v 5 年之前
父节点
当前提交
10ed82b19e
共有 2 个文件被更改,包括 18 次插入25 次删除
  1. 6 4
      src/views/Platform/presentation/Acceptance.vue
  2. 12 21
      src/views/Platform/presentation/ClientAcceptance.vue

+ 6 - 4
src/views/Platform/presentation/Acceptance.vue

@@ -340,6 +340,7 @@ export default {
         this.bizIdCode = this.$route.query.projectId.bizId
         this.projectIdCode = this.$route.query.projectId.id
         this.bugNum = { type: 1, projectId: this.projectIdCode }
+        this.getBugData()
       }
 
       if (this.$route.query.task) { // 任务页面新建
@@ -347,6 +348,7 @@ export default {
         this.bizIdCode = this.$route.query.task.bizId
         this.projectIdCode = this.$route.query.task.id
         this.bugNum = { type: 1, taskId: this.projectIdCode }
+        this.getBugData()
       }
 
       if (this.$route.query.projectData) { // 主页面新建
@@ -355,6 +357,7 @@ export default {
         this.projectIdCode = this.$route.query.projectData.id
         this.$route.query.projectData.typeString === 1 ? this.ClientData.projectId = this.projectIdCode : this.ClientData.taskId = this.projectIdCode
         this.bugNum = { type: 1, taskId: this.ClientData.taskId, projectId: this.ClientData.projectId }
+        this.getBugData()
       }
 
       if (this.$route.query.data) { // 报告主页更新
@@ -372,8 +375,8 @@ export default {
           this.editorSix.txt.html(this.ClientData.pftInfo)
           this.editorEight.txt.html(this.ClientData.safeResultInfo)
           this.editorNine.txt.html(this.ClientData.moniterResultInfo)
-
           this.bugNum = { type: 1, taskId: this.$route.query.taskId, projectId: this.$route.query.projectId }
+          this.getBugData()
           if (this.ClientData.status === 1) {
             this.tagBtn = 'success'
             this.status = '1'
@@ -490,11 +493,10 @@ export default {
           }
         })
       }
-      this.getBugData(this.bugNum)
     },
 
-    getBugData(e) {
-      bugFinishList(e).then(res => {
+    getBugData() {
+      bugFinishList(this.bugNum).then(res => {
         this.$set(this.ClientData, 'smokeTestResult', res.data.launchInfo)
         this.tableData = [res.data]
         this.formatData()

+ 12 - 21
src/views/Platform/presentation/ClientAcceptance.vue

@@ -239,6 +239,7 @@ export default {
         this.bizIdCode = this.$route.query.projectId.bizId
         this.projectIdCode = this.$route.query.projectId.id
         this.bugNum = { type: 2, projectId: this.projectIdCode }
+        this.getBugData()
       }
 
       if (this.$route.query.task) { // 任务页面新建
@@ -246,6 +247,7 @@ export default {
         this.bizIdCode = this.$route.query.task.bizId
         this.projectIdCode = this.$route.query.task.id
         this.bugNum = { type: 2, taskId: this.projectIdCode }
+        this.getBugData()
       }
 
       if (this.$route.query.projectData) { // 主页面新建
@@ -254,6 +256,7 @@ export default {
         this.projectIdCode = this.$route.query.projectData.id
         this.$route.query.projectData.typeString === 1 ? this.ClientData.projectId = this.projectIdCode : this.ClientData.taskId = this.projectIdCode
         this.bugNum = { type: 2, taskId: this.ClientData.taskId, projectId: this.ClientData.projectId }
+        this.getBugData()
       }
 
       if (this.$route.query.data) { // 准出主页面
@@ -262,7 +265,8 @@ export default {
         this.preview = true
         projectTestReport({ id: this.$route.query.id }).then((res) => {
           this.ClientData = res.data
-          this.bugNum = { type: 1, taskId: this.ClientData.taskId, projectId: this.ClientData.projectId }
+          this.bugNum = { type: 2, taskId: this.$route.query.taskId, projectId: this.$route.query.projectId }
+          this.getBugData()
           if (this.ClientData.status === 1) {
             this.tagBtn = 'success'
             this.tagBtn1 = 'info'
@@ -352,7 +356,13 @@ export default {
           this.editorFro.txt.html(this.ClientData.acceptanceResultInfo)
         })
       }
-      this.getBugData(this.bugNum)
+    },
+    getBugData() {
+      bugFinishList(this.bugNum).then(res => {
+        this.$set(this.ClientData, 'smokeTestResult', res.data.launchInfo)
+        this.tableData = [res.data]
+        this.formatData()
+      })
     },
     open() {
       this.$confirm('是否放弃修改,离开页面?', '确认信息', {
@@ -407,18 +417,6 @@ export default {
     },
     getQueryData(ele, vel) {
       this.ClientData = ele
-      // var obj = {}
-      // for (var a of vel) {
-      //   obj.totalBug = a.totalBug.value
-      //   obj.fixBug = a.fixBug.value
-      //   obj.remainBug = a.remainBug.value
-      //   obj.rateOfFix = a.rateOfFix.value
-      //   obj.invalidBug = a.invalidBug.value
-      //   obj.rateOfReopen = a.rateOfReopen.value
-      //   obj.launchInfo = a.launchInfo.value
-      //   obj.memo = a.memo.value
-      // }
-      // this.ClientData.bugTarget = JSON.stringify(obj)
       typeof (this.editorElem) === 'string' ? this.ClientData.projectBackground = this.editorElem : ''
       typeof (this.editorElems) === 'string' ? this.ClientData.fctInfo = this.editorElems : ''
       typeof (this.editorFrom) === 'string' ? this.ClientData.sctInfo = this.editorFrom : ''
@@ -439,13 +437,6 @@ export default {
         }
       })
     },
-    getBugData(e) {
-      bugFinishList(e).then(res => {
-        this.$set(this.ClientData, 'smokeTestResult', res.data.launchInfo)
-        this.tableData = [res.data]
-        this.formatData()
-      })
-    },
 
     formatData() {
       this.tableData.forEach(item => {