wangziqian 4 years ago
parent
commit
25a582d8c6

+ 16 - 1
src/views/workbench/components/statisticsSection.vue

@@ -25,6 +25,7 @@
         </div>
         <div v-if="title !=='缺陷'" class="statistics-chart">
           <h2>未上线{{ title }}状态分布</h2>
+          <h3 @click="getAll()">总数:{{ totalTask }}</h3>
           <div class="chart-contain">
             <normal-echart v-if="echartsOption" :chart-id="type+title" :option="echartsOption" @onClick="chartChange" />
           </div>
@@ -92,6 +93,8 @@ export default {
       statisticsList: [],
       echartsOption: null,
       echartsOption2: null,
+      totalTask: 0, // 所有总数
+      totalIdList: 0, // 所有总数的idList
       tips: {
         '需求': [
           '交付日期为今天,且状态仍未变更为“已上线”的需求数量(不包含当前状态为hold的需求)。',
@@ -171,6 +174,8 @@ export default {
         }
       } else {
         const res = await requestUrl({ teamSearchInfo: this.searchForm })
+        this.totalTask = res.data.total
+        this.totalIdList = res.data.idList
         this.echartsOption = this.setChart(res.data)
       }
     },
@@ -194,6 +199,10 @@ export default {
       }
       return option
     },
+    getAll() {
+      this.clickItem = -1
+      this.changeData(this.totalIdList, `未上线的`)
+    },
     chartChange(params) { // 点击图表产生触发列表更改
       this.clickItem = -1
       this.changeData(params.data.idList, params.name)
@@ -236,6 +245,12 @@ export default {
     margin-bottom: 20px;
     font-weight: bold;
   }
+  h3 {
+    cursor: pointer;
+    color: #999999;
+    font-size: 14px;
+    margin-bottom: 10px;
+  }
 }
 .statistics-data {
   .data-main{
@@ -289,7 +304,7 @@ export default {
   }
   .chart-contain {
     width: 100%;
-    height: 380px;
+    height: 360px;
   }
 }
 .drawer-statistics:after {

+ 8 - 1
src/views/workbench/team/components/ganntViews.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-row style="margin-bottom: 20px" class="gantt-view-header">
+    <el-row class="gantt-view-header">
       <div class="table-top">
         <div class="table-top-left">
           <el-radio-group v-model="radio1" size="small" @change="radioChange">
@@ -52,6 +52,7 @@
     <gantt-elastic
       v-if="ganttShow"
       ref="ganttElastic"
+      style="width: calc(100% - 80px)"
       :tasks="tasks"
       :options="options"
     >
@@ -243,6 +244,12 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+.gantt-view-header{
+  margin: 0 40px 20px 40px;
+}
+.gantt-elastic {
+  margin: 0 40px;
+}
 .table-top {
   margin-bottom: 10px;
   display: flex;