Răsfoiți Sursa

优化批量报告

qinzhipeng_v 5 ani în urmă
părinte
comite
bef64363ce

+ 47 - 9
src/views/projectManage/projectList/components/taskList.vue

@@ -275,23 +275,61 @@ export default {
       this.selectTaskList = this.curcentList
     },
     filtrateTest() { // 提测筛选
-      this.dialogTestReport = true
-      this.$nextTick(() => {
-        this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
+      const data = this.curcentList.filter(item => { return item.id })
+      const res = []
+      data.map(item => {
+        if (item.statusString !== '开发中') {
+          res.push(item.id)
+        }
       })
+      if (res.length > 0) {
+        this.$message({ message: `任务${res}的状态不是【开发中】,无法批量提测,,请检查!`, type: 'warning', offset: 150 })
+      } else {
+        this.dialogTestReport = true
+        this.$nextTick(() => {
+          this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
+        })
+      }
     },
+
     filtrateAllow() { // 准出筛选
-      this.dialogClientReport = true
-      this.$nextTick(() => {
-        this.$refs.ClientReport.init(7, this.curcentList.map(item => { return item.id }))
+      const data = this.curcentList.filter(item => { return item.id })
+      console.log(data, '查看1')
+      const res = []
+      data.map(item => {
+        if (item.statusString !== '测试中') {
+          res.push(item.id)
+        }
       })
+      console.log(res, '查看')
+      if (res.length > 0) {
+        this.$message({ message: `任务${res}的状态不是【测试中】,无法批量准出,,请检查!`, type: 'warning', offset: 150 })
+      } else {
+        this.dialogClientReport = true
+        this.$nextTick(() => {
+          this.$refs.ClientReport.init(7, this.curcentList.map(item => { return item.id }))
+        })
+      }
     },
+
     filtrateDaily() { // 建立日报
-      this.dialogDailyReport = true
-      this.$nextTick(() => {
-        this.$refs.DailyReport.init(7, this.curcentList.map(item => { return item.id }))
+      const data = this.curcentList.filter(item => { return item.id })
+      const res = []
+      data.map(item => {
+        if (item.statusString !== '测试中') {
+          res.push(item.id)
+        }
       })
+      if (res.length > 0) {
+        this.$message({ message: `任务${res}的状态不是【测试中】,无法批量建立测试日报,请检查!`, type: 'warning', offset: 150 })
+      } else {
+        this.dialogDailyReport = true
+        this.$nextTick(() => {
+          this.$refs.DailyReport.init(7, this.curcentList.map(item => { return item.id }))
+        })
+      }
     },
+
     link_task(id) { // 跳转到任务详情页
       this.$router.push({ name: '任务详情', query: { id: id }})
     }

+ 48 - 9
src/views/projectManage/requirement/components/taskList.vue

@@ -283,22 +283,61 @@ export default {
       this.selectTaskList = this.curcentList
     },
     filtrateTest() { // 提测筛选
-      this.dialogTestReport = true
-      this.$nextTick(() => {
-        this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
+      const data = this.curcentList.filter(item => { return item.id })
+      console.log(data, '查看1')
+      const res = []
+      data.map(item => {
+        if (item.statusString !== '开发中') {
+          res.push(item.id)
+        }
       })
+      console.log(res, '查看')
+      if (res.length > 0) {
+        this.$message({ message: `任务${res}的状态不是【开发中】,无法批量提测,请检查!`, type: 'warning', offset: 150 })
+      } else {
+        this.dialogTestReport = true
+        this.$nextTick(() => {
+          this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
+        })
+      }
     },
     filtrateAllow() { // 准出筛选
-      this.dialogClientReport = true
-      this.$nextTick(() => {
-        this.$refs.ClientReport.init(7, this.curcentList.map(item => { return item.id }))
+      const data = this.curcentList.filter(item => { return item.id })
+      console.log(data, '查看1')
+      const res = []
+      data.map(item => {
+        if (item.statusString !== '测试中') {
+          res.push(item.id)
+        }
       })
+      console.log(res, '查看')
+      if (res.length > 0) {
+        this.$message({ message: `任务${res}的状态不是【测试中】,无法批量准出,请检查!`, type: 'warning', offset: 150 })
+      } else {
+        this.dialogClientReport = true
+        this.$nextTick(() => {
+          this.$refs.ClientReport.init(7, this.curcentList.map(item => { return item.id }))
+        })
+      }
     },
     filtrateDaily() { // 建立日报
-      this.dialogDailyReport = true
-      this.$nextTick(() => {
-        this.$refs.DailyReport.init(7, this.curcentList.map(item => { return item.id }))
+      const data = this.curcentList.filter(item => { return item.id })
+      console.log(data, '查看1')
+      const res = []
+      data.map(item => {
+        if (item.statusString !== '测试中') {
+          res.push(item.id)
+        }
       })
+      console.log(res, '查看')
+      if (res.length > 0) {
+        this.$message({ message: `任务${res}的状态不是【测试中】,无法批量建立测试日报,请检查!`, type: 'warning', offset: 150 })
+      } else {
+        this.dialogDailyReport = true
+        this.$nextTick(() => {
+          this.$refs.DailyReport.init(7, this.curcentList.map(item => { return item.id }))
+        })
+      }
     },
     link_task(id) { // 跳转到任务详情页
       this.$router.push({ name: '任务详情', query: { id: id }})

+ 0 - 1
src/views/projectManage/requirement/requirementDetail.vue

@@ -578,7 +578,6 @@ export default {
       }
     },
     async getRequirementById() { // 获取需求详情
-      alert(1)
       const res = await getRequirementById({ id: this.$route.query.id })
       if (res.code === 200) {
         this.form_query = res.data

+ 49 - 9
src/views/projectManage/version/components/taskList.vue

@@ -246,6 +246,7 @@ export default {
         const taskInfoDO = e
         const resTask = await taskUpdate({ taskInfoDO, user })
         if (resTask.code === 200) {
+          this.get_allTask()
           this.$message({ message: '修改成功', type: 'success', offset: 150 })
         }
       }
@@ -301,22 +302,61 @@ export default {
       this.selectTaskList = this.curcentList
     },
     filtrateTest() { // 提测筛选
-      this.dialogTestReport = true
-      this.$nextTick(() => {
-        this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
+      const data = this.curcentList.filter(item => { return item.id })
+      console.log(data, '查看1')
+      const res = []
+      data.map(item => {
+        if (item.statusString !== '开发中') {
+          res.push(item.id)
+        }
       })
+      console.log(res, '查看')
+      if (res.length > 0) {
+        this.$message({ message: `任务${res}的状态不是【开发中】,无法批量提测,请检查!`, type: 'warning', offset: 150 })
+      } else {
+        this.dialogTestReport = true
+        this.$nextTick(() => {
+          this.$refs.TestReport.init(7, this.curcentList.map(item => { return item.id }))
+        })
+      }
     },
     filtrateAllow() { // 准出筛选
-      this.dialogClientReport = true
-      this.$nextTick(() => {
-        this.$refs.ClientReport.init(7, this.curcentList.map(item => { return item.id }))
+      const data = this.curcentList.filter(item => { return item.id })
+      console.log(data, '查看1')
+      const res = []
+      data.map(item => {
+        if (item.statusString !== '测试中') {
+          res.push(item.id)
+        }
       })
+      console.log(res, '查看')
+      if (res.length > 0) {
+        this.$message({ message: `任务${res}的状态不是【测试中】,无法批量准出,请检查!`, type: 'warning', offset: 150 })
+      } else {
+        this.dialogClientReport = true
+        this.$nextTick(() => {
+          this.$refs.ClientReport.init(7, this.curcentList.map(item => { return item.id }))
+        })
+      }
     },
     filtrateDaily() { // 建立日报
-      this.dialogDailyReport = true
-      this.$nextTick(() => {
-        this.$refs.DailyReport.init(7, this.curcentList.map(item => { return item.id }))
+      const data = this.curcentList.filter(item => { return item.id })
+      console.log(data, '查看1')
+      const res = []
+      data.map(item => {
+        if (item.statusString !== '测试中') {
+          res.push(item.id)
+        }
       })
+      console.log(res, '查看')
+      if (res.length > 0) {
+        this.$message({ message: `任务${res}的状态不是【测试中】,无法批量建立测试日报,请检查!`, type: 'warning', offset: 150 })
+      } else {
+        this.dialogDailyReport = true
+        this.$nextTick(() => {
+          this.$refs.DailyReport.init(7, this.curcentList.map(item => { return item.id }))
+        })
+      }
     },
     link_task(id) { // 跳转到任务详情页
       this.$router.push({ name: '任务详情', query: { id: id }})

+ 0 - 2
src/views/workbench/team/components/taskList.vue

@@ -353,14 +353,12 @@ export default {
 
     filtrateAllow() { // 准出筛选
       const data = this.curcentList.filter(item => { return item.id })
-      console.log(data, '查看1')
       const res = []
       data.map(item => {
         if (item.statusString !== '测试中') {
           res.push(item.id)
         }
       })
-      console.log(res, '查看')
       if (res.length > 0) {
         this.$message({ message: `任务${res}的状态不是【测试中】,无法批量准出,请检查!”`, type: 'warning', offset: 150 })
       } else {