wangziqian 4 years ago
parent
commit
a1b80be0cc

+ 4 - 0
src/views/workbench/components/statisticsSection.vue

@@ -142,6 +142,10 @@ export default {
       const res = await requestUrl({ teamSearchInfo: this.searchForm })
       if (res.code === 200) {
         this.statisticsList = res.data || []
+        if (this.statisticsList.length > 0) {
+          const show = this.statisticsList[0].total + this.statisticsList[1].total > 0
+          this.$emit('showTips', this.title, show)
+        }
         // 如果是点击左边6个区域的,保留idList,如果点击是图表,默认回到左边第一个区域中的idList
         if (this.clickItem < 0) {
           this.clickItem = 0

+ 18 - 0
src/views/workbench/person/index.vue

@@ -67,6 +67,7 @@
               requestData:getPersonalRequireSummary,
               requestChart:getPersonalRequireDisData
             }"
+            @showTips="changeTips"
             @change="changeData"
           />
           <needs-list
@@ -88,6 +89,7 @@
               requestData:getPersonalTaskSummary,
               requestChart:getPersonalTaskDisData
             }"
+            @showTips="changeTips"
             @change="changeData"
           />
           <task-list
@@ -109,6 +111,7 @@
               requestData:getPersonalBugSummary,
               requestChart:getPersonalBugDisDataBy
             }"
+            @showTips="changeTips"
             @change="changeData"
           />
           <bug-tableList
@@ -358,6 +361,12 @@ export default {
           ? this.$router.push({ path: this.$route.path, query: { page: newV }})
           : this.$router.push({ path: this.$route.path, query: { page: '1' }})
       }
+    },
+    tabTips: {
+      handler(newV) {
+        console.log(newV)
+      },
+      deep: true
     }
   },
   created() {
@@ -540,6 +549,15 @@ export default {
       this.nowDetailData = data
       this.deleteSchedule()
     },
+    changeTips(e, show) { // 红点展示更改
+      if (e === '需求') {
+        this.tabTips.require = show
+      } else if (e === '任务') {
+        this.tabTips.task = show
+      } else if (e === '缺陷') {
+        this.tabTips.bug = show
+      }
+    },
     changeData(e, idList, name) { // 数据变更
       if (e === '需求') {
         this.idList.requireList = idList

+ 3 - 14
src/views/workbench/team/components/taskList.vue

@@ -119,7 +119,7 @@
     <TestReport v-if="dialogTestReport" ref="TestReport" />
     <DailyReport v-if="dialogDailyReport" ref="DailyReport" />
     <ReleaseReport v-if="dialogClientReport" ref="ClientReport" />
-    <taskDialog v-if="showTaskDialog" :show.sync="showTaskDialog" :task-id="taskId.id" :status-name="taskId.statusString" @getList="get_allTask" />
+    <task-dialog v-if="showTaskDialog" :show.sync="showTaskDialog" :task-id="taskId.id" :status-name="taskId.statusString" @getList="getNew" />
     <!-- 批量排期 -->
     <modify-schedule
       v-if="visibleSchedule"
@@ -274,15 +274,8 @@ export default {
         }
       }
     },
-    async confirmStatus() { // 确认更改状态
-      const user = { name: localStorage.getItem('username'), ename: localStorage.getItem('realname'), id: '' }
-      const taskInfoDO = this.nowChangeTask
-      taskInfoDO.onlineRealTime = this.changeStatusDate
-      const resTask = await taskUpdate({ taskInfoDO, user })
-      if (resTask.code === 200) {
-        this.$message({ message: '修改成功', type: 'success', offset: 150 })
-        this.$emit('change', '任务')
-      }
+    getNew() { // 状态改变成功回调
+      this.$emit('change', '任务')// 通知父组件,让父组件去执行子组件的数据更新
     },
     handleSelectionChange(val) { // 任务列表删选操作
       this.tableList = []
@@ -325,7 +318,6 @@ export default {
       this.visibleSchedule = true
       this.selectTaskList = this.curcentList
     },
-
     async filtrateTest() { // 提测筛选
       const data = this.curcentList.map(item => { return item.id })
       const res = await reportdelivertestCheckStatus(data)
@@ -336,7 +328,6 @@ export default {
         })
       }
     },
-
     async filtrateAllow() { // 准出筛选
       const data = this.curcentList.map(item => { return item.id })
       const res = await reportreleaseCheckStatus(data)
@@ -347,7 +338,6 @@ export default {
         })
       }
     },
-
     async filtrateDaily() { // 建立日报
       const data = this.curcentList.map(item => { return item.id })
       const res = await dailyReportCheckStatus(data)
@@ -358,7 +348,6 @@ export default {
         })
       }
     },
-
     link_task(id) { // 跳转到任务详情页
       if (this.newTabOpen) {
         const newTab = this.$router.resolve({ name: '任务详情', query: { id: id }})

+ 12 - 0
src/views/workbench/team/index.vue

@@ -102,6 +102,7 @@
             requestData:getTeamRequireSummary,
             requestChart:getTeamRequireDisData
           }"
+          @showTips="changeTips"
           @change="changeData"
         />
         <needs-list
@@ -123,6 +124,7 @@
             requestData:getTeamTaskSummary,
             requestChart:getTeamTaskDisData
           }"
+          @showTips="changeTips"
           @change="changeData"
         />
         <task-list
@@ -144,6 +146,7 @@
             requestData:getTeamBugSummary,
             requestChart:getTeamBugDisDataBy
           }"
+          @showTips="changeTips"
           @change="changeData"
         />
         <bug-tableList
@@ -506,6 +509,15 @@ export default {
         })
       }
     },
+    changeTips(e, show) { // 红点展示更改
+      if (e === '需求') {
+        this.tabTips.require = show
+      } else if (e === '任务') {
+        this.tabTips.task = show
+      } else if (e === '缺陷') {
+        this.tabTips.bug = show
+      }
+    },
     changeData(e, idList, name) { // 数据变更
       if (e === '需求') {
         this.idList.requireList = idList