Browse Source

修改任务详情默认展示所有bug

qinzhipeng_v 5 years ago
parent
commit
ccbedd315f

+ 2 - 0
src/views/projectManage/dialog_vue.vue

@@ -152,6 +152,7 @@ export default {
             var that = this
             var that = this
             setTimeout(function() {
             setTimeout(function() {
               that.task_form = {}
               that.task_form = {}
+              that.ascription_demand = false
               that.ascription_project = true
               that.ascription_project = true
               that.$set(that.task_form, 'source', 3)
               that.$set(that.task_form, 'source', 3)
               that.$set(that.task_form, 'notest', 0)
               that.$set(that.task_form, 'notest', 0)
@@ -203,6 +204,7 @@ export default {
             setTimeout(function() {
             setTimeout(function() {
               that.task_form = {}
               that.task_form = {}
               that.ascription_demand = true
               that.ascription_demand = true
+              that.ascription_project = false
               that.$set(that.task_form, 'source', 2)
               that.$set(that.task_form, 'source', 2)
               that.$set(that.task_form, 'notest', 0)
               that.$set(that.task_form, 'notest', 0)
               that.$set(that.task_form, 'followVersion', '')
               that.$set(that.task_form, 'followVersion', '')

+ 24 - 18
src/views/projectManage/taskList/taskViewDetails.vue

@@ -663,6 +663,7 @@ export default {
         this.taskScheduleEvent = res.data.taskScheduleEvent
         this.taskScheduleEvent = res.data.taskScheduleEvent
         this.taskStatus = res.data.taskStatus
         this.taskStatus = res.data.taskStatus
         this.bugStatus = res.data.bugStatus
         this.bugStatus = res.data.bugStatus
+        this.bugStatus.unshift({ code: -1, msg: '全部' })
       })
       })
       taskGet(this.taskId[1]).then(res => {
       taskGet(this.taskId[1]).then(res => {
         this.pauseName = res.data.involveAppString
         this.pauseName = res.data.involveAppString
@@ -675,21 +676,15 @@ export default {
         this.launchTestInfoDOS = res.data.launchTestInfoDOS // 提测
         this.launchTestInfoDOS = res.data.launchTestInfoDOS // 提测
         this.dailyTestReports = res.data.dailyTestReports // 测试
         this.dailyTestReports = res.data.dailyTestReports // 测试
         this.projectTestReportDOS = res.data.projectTestReportDOS // 准出
         this.projectTestReportDOS = res.data.projectTestReportDOS // 准出
-        bugList({
-          taskId: this.taskId[1],
-          pageSize: this.pageSize,
-          curIndex: this.curIndex
-        }).then(res => {
+        bugList({ taskId: this.taskId[1], pageSize: this.pageSize, curIndex: this.curIndex }).then(res => {
           if (res.code === 200) {
           if (res.code === 200) {
-            if (!res.data) {
+            if (res.data) {
               this.bugBaseInfoDOList = res.data
               this.bugBaseInfoDOList = res.data
               this.total = res.total
               this.total = res.total
             }
             }
           }
           }
         })
         })
-        this.task_form.bugBaseInfoDOList !== null
-          ? (this.bugBaseInfoDOList = res.date.bugBaseInfoDOList)
-          : (this.bugBaseInfoDOList = []) // bug
+        this.task_form.bugBaseInfoDOList !== null ? (this.bugBaseInfoDOList = res.date.bugBaseInfoDOList) : (this.bugBaseInfoDOList = []) // bug
         const param = {
         const param = {
           appType: Number(res.data.involveApp),
           appType: Number(res.data.involveApp),
           startTime: res.data.scheduleListResponse.startTime,
           startTime: res.data.scheduleListResponse.startTime,
@@ -1004,16 +999,27 @@ export default {
     },
     },
     bug_list(e) {
     bug_list(e) {
       // bug查询
       // bug查询
-      bugList({ status: e, taskId: Number(this.taskId[1]) }).then(res => {
-        if (res.code === 200) {
-          if (res.data !== null) {
-            this.bugBaseInfoDOList = res.data
-            this.total = res.total
-          } else {
-            this.bugBaseInfoDOList = []
+      if (e === -1) {
+        bugList({ taskId: this.taskId[1], pageSize: this.pageSize, curIndex: this.curIndex }).then(res => {
+          if (res.code === 200) {
+            if (res.data) {
+              this.bugBaseInfoDOList = res.data
+              this.total = res.total
+            }
           }
           }
-        }
-      })
+        })
+      } else {
+        bugList({ status: e, taskId: Number(this.taskId[1]) }).then(res => {
+          if (res.code === 200) {
+            if (res.data !== null) {
+              this.bugBaseInfoDOList = res.data
+              this.total = res.total
+            } else {
+              this.bugBaseInfoDOList = []
+            }
+          }
+        })
+      }
     },
     },
     comment(e) {
     comment(e) {
       this.content = ''
       this.content = ''