소스 검색

添加统计数据转取

qinzhipeng_v@didiglobal.com 4 년 전
부모
커밋
e0d7a83aab

+ 2 - 1
src/api/defectManage.js

@@ -117,8 +117,9 @@ export function settingQueryBizModuleList(bizId) {
 // bug下载
 export function bugDownload(data) {
   return request({
-    url: TeamManagement + '/bug/downLoad',
+    url: TeamManagement + '/bug/download',
     method: 'post',
+    timeout: '10000',
     data,
     responseType: 'blob' // 表明返回服务器返回的数据类型
   })

+ 11 - 0
src/api/requirement.js

@@ -390,3 +390,14 @@ export function updateStatus(data) {
     data
   })
 }
+
+// 统计需求导出
+export function requirementDownload(data) {
+  return request({
+    url: requestIp + `/requirement/download`,
+    method: 'post',
+    timeout: '10000',
+    data,
+    responseType: 'blob' // 表明返回服务器返回的数据类型
+  })
+}

+ 6 - 4
src/api/taskIndex.js

@@ -354,11 +354,13 @@ export function getChartListData(data) {
   })
 }
 
-// 获取chart视图数据
-export function updateStatus(data) {
+// 统计下任务数据导出
+export function taskDownload(data) {
   return request({
-    url: TeamManagement + `/task/updateTaskStatusStatistic`,
+    url: TeamManagement + `/task/download`,
     method: 'post',
-    data
+    timeout: '10000',
+    data,
+    responseType: 'blob' // 表明返回服务器返回的数据类型
   })
 }

+ 31 - 8
src/views/quality/components/drawerAll.vue

@@ -3,7 +3,7 @@
     <div v-if="Statistics.title === '任务分布图数据'" class="qz-drawer-grade">按任务等级分布</div>
     <div v-if="Statistics.title === '分布图数据'" class="qz-drawer-grade-tow">按缺陷等级分布</div>
     <div>
-      <div v-if="Statistics.title !== '模块分布数据' && Statistics.title !== '需求方向分布图数据' && Statistics.title !== '责任人分布数据' && Statistics.title !== `模块分布图数据` " :class="[Statistics.towTimeLine ? 'qz-drawer-padding' : 'qz-drawer-padding-s', 'qz-drawer-header']">
+      <div v-if="Statistics.title !== '模块分布数据' && Statistics.title !== '需求方向分布图数据' && Statistics.title !== '责任人分布数据' && Statistics.title !== `模块分布图数据` && show === true " :class="[Statistics.towTimeLine ? 'qz-drawer-padding' : 'qz-drawer-padding-s', 'qz-drawer-header']">
         <div class="qz-drawer-scll">
           <timeline :data="list" :num="defaultKey" :bgmargin="bgMargin" @update="getvalue" />
         </div>
@@ -32,7 +32,7 @@
     </div>
     <div class="qz-footer-laout">
       <div style="line-height: 60px;">
-        <el-button type="primary" size="mini">导 出</el-button>
+        <el-button type="primary" size="mini" @click="exportTable">导 出</el-button>
       </div>
       <el-pagination
         :current-page.sync="currentPage"
@@ -49,9 +49,9 @@
 </template>
 
 <script>
-import { getRequirement } from '@/api/requirement.js'
-import { taskList } from '@/api/taskIndex'
-import { bugList } from '@/api/defectManage'
+import { getRequirement, requirementDownload } from '@/api/requirement.js'
+import { taskList, taskDownload } from '@/api/taskIndex'
+import { bugList, bugDownload } from '@/api/defectManage'
 import { getReportList } from '@/api/reportTemplate'
 import timeline from '@/components/timeline'
 import qzTable from './tables'
@@ -65,6 +65,8 @@ export default {
   data() {
     return {
       list: [],
+      show: true,
+      responseDownload: '',
       min_title: '', // 周期统计表头标题
       bgMargin: false,
       dataList: [],
@@ -118,6 +120,7 @@ export default {
   },
   methods: {
     setDrawerDate() {
+      this.show = true
       if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === '趋势图数据') {
         this.defaultKey = this.Statistics.dataIndex
         this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
@@ -172,6 +175,10 @@ export default {
         this.defaultKey2 = this.Statistics.seriesIndex
         this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
         this.getTableData(this.dataList)
+      } else if (this.Statistics.title === '累计新增' || this.Statistics.title === '技术准入' || this.Statistics.title === '累计上线' || this.Statistics.title === '累计hold' || this.Statistics.title === '累计修复' || this.Statistics.title === '累计reopen') {
+        this.show = false
+        this.dataList = this.Statistics.idList
+        this.getTableData(this.dataList)
       }
     },
     getvalue(e) { // 时间轴one
@@ -230,19 +237,19 @@ export default {
       const data = { ids: taskIdList, ...this.paging }
       if (this.Statistics.title === '周期统计数据') { data.statisticsType = 1 }
       if (this.Statistics.title === '人力统计数据') { data.statisticsType = 2 }
-      if (this.Statistics.title === '需求方向分布图数据' || this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据') {
+      if (this.Statistics.title === '需求方向分布图数据' || this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据' || this.Statistics.title === '累计新增' && this.Statistics.toType === '需求' || this.Statistics.title === '技术准入' && this.Statistics.toType === '需求' || this.Statistics.title === '累计上线' && this.Statistics.toType === '需求' || this.Statistics.title === '累计hold' && this.Statistics.toType === '需求') {
         const res = await getRequirement(data)
         if (res.code === 200) {
           this.tableData = res.data.list
           this.total = res.data.total
         }
-      } else if (this.Statistics.title === '任务分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === `模块分布图数据`) {
+      } else if (this.Statistics.title === '任务分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === `模块分布图数据` || this.Statistics.title === '累计新增' && this.Statistics.toType === '任务' || this.Statistics.title === '技术准入' && this.Statistics.toType === '任务' || this.Statistics.title === '累计上线' && this.Statistics.toType === '任务' || this.Statistics.title === '累计hold' && this.Statistics.toType === '任务') {
         const res = await taskList(data)
         if (res.code === 200) {
           this.tableData = res.data
           this.total = res.total
         }
-      } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === `责任人分布数据` || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '模块分布数据' || this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据` || this.Statistics.title === '平均修复时长数据' || this.Statistics.title === '趋势图数据') {
+      } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === `责任人分布数据` || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '模块分布数据' || this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据` || this.Statistics.title === '平均修复时长数据' || this.Statistics.title === '趋势图数据' || this.Statistics.title === '累计修复' && this.Statistics.toType === '缺陷' || this.Statistics.title === '累计reopen' && this.Statistics.toType === '缺陷' || this.Statistics.title === '累计新增' && this.Statistics.toType === '缺陷') {
         const res = await bugList(data)
         if (res.code === 200) {
           this.tableData = res.data
@@ -287,6 +294,22 @@ export default {
         }
       })
     },
+    async exportTable() {
+      const data = { ids: this.dataList }
+      if (this.Statistics.title === '需求方向分布图数据' || this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '需求' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '需求' || this.Statistics.title === 'PRD评审趋势图数据' || this.Statistics.title === '技术准入趋势图数据' || this.Statistics.title === '累计新增' && this.Statistics.toType === '需求' || this.Statistics.title === '技术准入' && this.Statistics.toType === '需求' || this.Statistics.title === '累计上线' && this.Statistics.toType === '需求' || this.Statistics.title === '累计hold' && this.Statistics.toType === '需求') {
+        this.responseDownload = await requirementDownload(data)
+      } else if (this.Statistics.title === '任务分布图数据' || this.Statistics.title === '状态停留分布图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '状态累积流量图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '新增趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '上线趋势图数据' && this.Statistics.toType === '任务' || this.Statistics.title === '人力统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === '周期统计数据' && this.Statistics.toType === '任务' || this.Statistics.title === '所属需求方向分布图数据' || this.Statistics.title === `模块分布图数据` || this.Statistics.title === '累计新增' && this.Statistics.toType === '任务' || this.Statistics.title === '技术准入' && this.Statistics.toType === '任务' || this.Statistics.title === '累计上线' && this.Statistics.toType === '任务' || this.Statistics.title === '累计hold' && this.Statistics.toType === '任务') {
+        this.responseDownload = await taskDownload(data)
+      } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '分布图数据' || this.Statistics.title === `责任人分布数据` || this.Statistics.title === '去除节假日的修复时长数据' || this.Statistics.title === '模块分布数据' || this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据` || this.Statistics.title === '平均修复时长数据' || this.Statistics.title === '趋势图数据' || this.Statistics.title === '累计修复' && this.Statistics.toType === '缺陷' || this.Statistics.title === '累计reopen' && this.Statistics.toType === '缺陷' || this.Statistics.title === '累计新增' && this.Statistics.toType === '缺陷') {
+        this.responseDownload = await bugDownload(data)
+      }
+      const aLink = document.createElement('a')
+      const blob = new Blob([this.responseDownload], { type: 'application/vnd.ms-excel' })
+      aLink.href = URL.createObjectURL(blob)
+      aLink.download = this.Statistics.title + '.xlsx'
+      aLink.style.display = 'none'
+      aLink.click()
+    },
     handleClose(done) { // 关闭
       this.$emit('clone')
     }

+ 0 - 224
src/views/quality/components/requireDrawer.vue

@@ -1,224 +0,0 @@
-<template>
-  <el-drawer :title="Statistics.label" :visible.sync="drawer_" :direction="direction" :modal="false" :class="{'drawer-box': showClass}" size="100%" :before-close="handleClose">
-    <div style="height: calc(100vh - 200px); overflow: scroll; overflow-x: hidden;margin-right: 20px;">
-      <el-table :data="tableData" style="width: 100%;" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }" class="integration-num">
-        <el-table-column label="优先级" min-width="80" align="left">
-          <template slot-scope="scope">
-            <div class="div_priority" :style="{background: priorityColors[scope.row.priority % priorityColors.length]}">{{ 'P'+scope.row.priority }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column :label="Statistics.typeStr + '名称'" min-width="250">
-          <template slot-scope="scope">
-            <div v-if="Statistics.typeStr === '缺陷'" class="drawer-id">{{ scope.row.bugId }}</div>
-            <div v-if="Statistics.typeStr === '任务'" class="drawer-id">{{ scope.row.taskIdSting }}</div>
-            <div v-if="Statistics.typeStr === '需求'" class="drawer-id">{{ scope.row.requirementDisplayId }}</div>
-            <el-tooltip v-if="Statistics.typeStr === '需求' && scope.row.name.length >= 15 || Statistics.typeStr === '任务' && scope.row.name.length >= 15" class="item" effect="dark" :content="scope.row.name" placement="top">
-              <div class="drawer-name" @click="jumper(scope.row)">{{ scope.row.name | ellipsis }}</div>
-            </el-tooltip>
-            <div v-else class="drawer-name" @click="jumper(scope.row)">{{ scope.row.name | ellipsis }}</div>
-            <el-tooltip v-if="Statistics.typeStr === '缺陷' && scope.row.bugName.length >= 15" class="item" effect="dark" :content="scope.row.bugName" placement="top">
-              <div class="drawer-name" @click="jumper(scope.row)">{{ scope.row.bugName | ellipsis }}</div>
-            </el-tooltip>
-            <div v-else class="drawer-name" @click="jumper(scope.row)">{{ scope.row.bugName | ellipsis }}</div>
-          </template>
-        </el-table-column>
-        <el-table-column label="状态" min-width="100" align="center">
-          <template slot-scope="scope">
-            <div v-if="Statistics.typeStr === '需求'">{{ scope.row.statusName }}</div>
-            <div v-if="Statistics.typeStr === '任务'">{{ scope.row.statusString }}</div>
-            <div v-if="Statistics.typeStr === '缺陷'">{{ querySatus(scope.row.status) }}</div>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-pagination
-      style="text-align: right; margin-right: 30px;"
-      :current-page.sync="currentPage"
-      :page-size="10"
-      layout="total, prev, pager, next, jumper"
-      :total="total"
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-    />
-  </el-drawer>
-</template>
-
-<script>
-import { EncryptId } from '@/utils/crypto-js.js'
-import { getRequirement } from '@/api/requirement.js'
-import { taskList } from '@/api/taskIndex'
-import { bugList, bugGetEnum } from '@/api/defectManage'
-export default {
-  filters: {
-    ellipsis(value) {
-      if (!value) return ''
-      if (value.length > 15) {
-        return value.slice(0, 15) + '...'
-      }
-      return value
-    }
-  },
-  props: {
-    data: { type: Object, required: true },
-    drawer: { type: Boolean, default: false }
-  },
-  data() {
-    return {
-      priorityColors: ['#F56C6C', '#FF8952', '#F5E300', '#7ED321', '#61D3B8', '#69B3FF', '#BDBDBD'],
-      Statistics: {}, // title
-      direction: 'rtl',
-      showClass: false,
-      bugList: [],
-      currentPage: 1,
-      total: 0,
-      paging: {
-        curIndex: 1, // 分页
-        pageSize: 10 // 分页
-      },
-      tableData: []
-    }
-  },
-  computed: {
-    drawer_: {
-      get() { return this.drawer },
-      set(v) {
-        this.$emit('clone', v)
-      }
-    }
-  },
-  watch: {
-    data: {
-      handler(newV, oldV) {
-        this.Statistics = newV
-        this.currentPage = 1
-        this.paging = {
-          curIndex: 1, // 分页
-          pageSize: 10 // 分页
-        }
-        this.getTableData()
-      },
-      immediate: true
-    }
-  },
-  created() {
-    this.bugGetEnum()
-  },
-  methods: {
-    async getTableData() {
-      if (this.Statistics.idList !== undefined && this.Statistics.idList.length > 0) {
-        this.paging.ids = this.Statistics.idList
-        if (this.Statistics.typeStr === '需求') {
-          const res = await getRequirement(this.paging)
-          if (res.code === 200) {
-            this.tableData = res.data.list
-            this.total = res.data.total
-          }
-        } else if (this.Statistics.typeStr === '任务') {
-          const res = await taskList(this.paging)
-          if (res.code === 200) {
-            this.tableData = res.data
-            this.total = res.total
-          }
-        } else if (this.Statistics.typeStr === '缺陷') {
-          const res = await bugList(this.paging)
-          if (res.code === 200) {
-            this.tableData = res.data
-            this.total = res.total
-          }
-        }
-      } else {
-        this.tableData = []
-      }
-    },
-    querySatus(val) {
-      let data = ''
-      this.bugList.map(item => {
-        if (val === item.code) {
-          data = item.name
-        }
-      })
-      return data
-    },
-    jumper(val) {
-      const bizId_id = EncryptId(`${val.bizId}_${val.id}`)
-      const newTab = this.$router.resolve({ name: this.Statistics.typeStr + '详情', query: { bizId_id: bizId_id }})
-      window.open(newTab.href, '_blank')
-    },
-    async bugGetEnum() {
-      const res = await bugGetEnum()
-      if (res.code === 200) {
-        this.bugList = res.data.bugEnumList
-        this.showClass = true
-      }
-    },
-    handleSizeChange(val) {
-      this.paging.pageSize = val
-      this.getTableData()
-    },
-    handleCurrentChange(val) {
-      this.paging.curIndex = val
-      this.getTableData()
-    },
-    handleClose(done) {
-      this.$emit('clone')
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
->>> :focus{outline:0;}
-.integration-num {
-  margin: 20px;
-}
-
-.drawer-name:hover {
-  color: #409eff;
-  cursor: pointer;
-}
-
-.div_priority {
-  display: inline-block;
-  width: 38px;
-  text-align: center;
-  line-height: 24px;
-  font-size: 14px;
-  color: #fff;
-  border-radius: 4px;
-  margin-right: 30px;
-}
-.drawer-id {
-  color: rgb(167, 174, 188);
-  font-size: 10px;
-}
->>>.el-drawer__header {
-    color: #444;
-    font-size: 20px;
-    font-weight: 500;
-    margin-bottom: 0px;
-    padding: 20px 30px;
-    border-bottom: 1px solid #E2E2E2;
-}
-.drawer-box {
-  box-shadow: 0 8px 10px -5px rgba(0,0,0,.2), 0 16px 24px 2px rgba(0,0,0,.14), 0 6px 30px 5px rgba(0,0,0,.12);
-}
- .el-drawer__wrapper {
-    width: 100%;
-    position: fixed;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    left: 50%;
-    overflow: hidden;
-    margin: 0;
-    // box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
-}
->>>.el-drawer__container {
-    left: 0;
-    right: 0;
-    width: 50%;
-}
->>>.el-table td, .el-table th {
-    padding: 5px 0;
-}
-</style>

+ 10 - 6
src/views/quality/components/tables/index.vue

@@ -1,18 +1,18 @@
 <template>
   <div style="margin: 0 30px;">
-    <el-table v-if="title === '状态停留分布图数据' || title === '需求分布图数据' || title === '需求方向分布图数据' || title === '任务分布图数据' || title === '状态累积流量图数据' || title === '周期统计数据' || title === '人力统计数据' || title === '新增趋势图数据' || title === '上线趋势图数据' || title === 'PRD评审趋势图数据' || title === '技术准入趋势图数据' || title === '所属需求方向分布图数据' || title === `模块分布图数据`" :data="data" style="width: 100%;" :height="setTitleHeight()" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
+    <el-table v-if="title === '状态停留分布图数据' || title === '需求分布图数据' || title === '需求方向分布图数据' || title === '任务分布图数据' || title === '状态累积流量图数据' || title === '周期统计数据' || title === '人力统计数据' || title === '新增趋势图数据' || title === '上线趋势图数据' || title === 'PRD评审趋势图数据' || title === '技术准入趋势图数据' || title === '所属需求方向分布图数据' || title === `模块分布图数据` || title === '累计新增' && type === '需求' || title === '累计新增' && type === '任务' || title === '技术准入' && type === '需求' || title === '技术准入' && type === '任务' || title === '累计上线' && type === '需求' || title === '累计上线' && type === '任务' || title === '累计hold' && type === '需求' || title === '累计hold' && type === '任务'" :data="data" style="width: 100%;" :height="setTitleHeight()" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
       <el-table-column label="优先级" min-width="80" align="left">
         <template slot-scope="scope" style="text-align: center;">
           <span class="div_priority" :style="{background: priorityColors[scope.row.priority % priorityColors.length]}">{{ 'P'+scope.row.priority }}</span>
         </template>
       </el-table-column>
-      <el-table-column v-if="type === '需求' || type === '需求状态' || type === '需求等级' || type === '需求类型' || title === '需求分布图数据' && type === '跟版客户端' || type === 'pm' || title === '状态累积流量图数据' && type === '需求' || title === '周期统计数据' && type === '需求' || title === '人力统计数据' && type === '需求' || title === '新增趋势图数据' && type === '需求' || title === '上线趋势图数据' && type === '需求' || title === 'PRD评审趋势图数据' || title === '技术准入趋势图数据' || title === '需求方向分布图数据'" label="需求名称" :min-width="title === '周期统计数据' || title === '人力统计数据' ? '120' : '360'" align="left" show-overflow-tooltip>
+      <el-table-column v-if="type === '需求' || type === '需求状态' || type === '需求等级' || type === '需求类型' || title === '需求分布图数据' && type === '跟版客户端' || type === 'pm' || title === '状态累积流量图数据' && type === '需求' || title === '周期统计数据' && type === '需求' || title === '人力统计数据' && type === '需求' || title === '新增趋势图数据' && type === '需求' || title === '上线趋势图数据' && type === '需求' || title === 'PRD评审趋势图数据' || title === '技术准入趋势图数据' || title === '需求方向分布图数据' || title === '累计新增' && type === '需求' || title === '技术准入' && type === '需求' || title === '累计上线' && type === '需求' || title === '累计hold' && type === '需求'" label="需求名称" :min-width="title === '周期统计数据' || title === '人力统计数据' ? '120' : '360'" align="left" show-overflow-tooltip>
         <template slot-scope="scope">
           <div class="drawer-id">{{ scope.row.requirementDisplayId }}</div>
           <div class="drawer-name" @click="jumper(scope.row, '需求')">{{ scope.row.name }}</div>
         </template>
       </el-table-column>
-      <el-table-column v-if="type === '任务' || type === '任务状态' || title === '所属需求方向分布图数据' || type === '任务等级' || type === '开发负责人' || type === '测试负责人' || title === '任务分布图数据' && type === '跟版客户端' || type === '直接归属' || title === '状态累积流量图数据' && type === '任务' || title === '周期统计数据' && type === '任务' || title === '新增趋势图数据' && type === '任务' || title === '上线趋势图数据' && type === '任务' || title === '人力统计数据' && type === '任务' || title === `模块分布图数据`" label="任务名称" :min-width="title === '周期统计数据' || title === '人力统计数据' ? '120' : '360'" align="left" show-overflow-tooltip>
+      <el-table-column v-if="type === '任务' || type === '任务状态' || title === '所属需求方向分布图数据' || type === '任务等级' || type === '开发负责人' || type === '测试负责人' || title === '任务分布图数据' && type === '跟版客户端' || type === '直接归属' || title === '状态累积流量图数据' && type === '任务' || title === '周期统计数据' && type === '任务' || title === '新增趋势图数据' && type === '任务' || title === '上线趋势图数据' && type === '任务' || title === '人力统计数据' && type === '任务' || title === `模块分布图数据` || title === '累计新增' && type === '任务' || title === '技术准入' && type === '任务' || title === '累计上线' && type === '任务' || title === '累计hold' && type === '任务'" label="任务名称" :min-width="title === '周期统计数据' || title === '人力统计数据' ? '120' : '360'" align="left" show-overflow-tooltip>
         <template slot-scope="scope">
           <div class="drawer-id">{{ scope.row.taskIdSting }}</div>
           <div class="drawer-name" @click="jumper(scope.row, '任务')">{{ scope.row.name }}</div>
@@ -66,8 +66,8 @@
           <span>{{ scope.row.typeName }}</span>
         </template>
       </el-table-column>
-      <el-table-column v-if="type === '需求' || type === '需求状态' || type === '需求等级' || title === '状态累积流量图数据' && type === '需求' || title === '周期统计数据' && type === '需求' || title === '人力统计数据' && type === '需求' || title === '新增趋势图数据' && type === '需求' || title === '上线趋势图数据' && type === '需求' || title === 'PRD评审趋势图数据' || title === '技术准入趋势图数据' || title === '需求方向分布图数据'" label="状态" prop="statusName" min-width="100" align="center" />
-      <el-table-column v-if="type === '任务' || type === '任务状态' || type === '任务等级' || title === '状态累积流量图数据' && type === '任务' || title === '周期统计数据' && type === '任务' || title === '人力统计数据' && type === '任务' || title === '新增趋势图数据' && type === '任务' || title === '上线趋势图数据' && type === '任务' || title === '所属需求方向分布图数据' || title === `模块分布图数据`" label="状态" prop="statusString" min-width="100" align="center" />
+      <el-table-column v-if="type === '需求' || type === '需求状态' || type === '需求等级' || title === '状态累积流量图数据' && type === '需求' || title === '周期统计数据' && type === '需求' || title === '人力统计数据' && type === '需求' || title === '新增趋势图数据' && type === '需求' || title === '上线趋势图数据' && type === '需求' || title === 'PRD评审趋势图数据' || title === '技术准入趋势图数据' || title === '需求方向分布图数据' || title === '累计新增' && type === '需求' || title === '技术准入' && type === '需求' || title === '累计上线' && type === '需求' || title === '累计hold'" label="状态" prop="statusName" min-width="100" align="center" />
+      <el-table-column v-if="type === '任务' || type === '任务状态' || type === '任务等级' || title === '状态累积流量图数据' && type === '任务' || title === '周期统计数据' && type === '任务' || title === '人力统计数据' && type === '任务' || title === '新增趋势图数据' && type === '任务' || title === '上线趋势图数据' && type === '任务' || title === '所属需求方向分布图数据' || title === `模块分布图数据` || title === '累计新增' && type === '任务' || title === '技术准入' && type === '任务' || title === '累计上线' && type === '任务' || title === '累计hold' && type === '任务'" label="状态" prop="statusString" min-width="100" align="center" />
     </el-table>
 
     <el-table v-if="title === '去除节假日的修复时长区间数据' || title === '不去除节假日的修复时长区间数据'" :data="data" style="width: auto;" height="calc(100vh - 355px)" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
@@ -99,7 +99,7 @@
       </el-table-column>
     </el-table>
 
-    <el-table v-if="title === '分布图数据' || title === '去除节假日的修复时长数据' || title === '模块分布数据' || title === '缺陷统计数据' || title === '责任人分布数据' || title === '平均修复时长数据' || title === '趋势图数据'" :data="data" style="width: auto;" :height="title === '模块分布数据' ? 'calc(100vh - 175px)': 'calc(100vh - 318px)'" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
+    <el-table v-if="title === '分布图数据' || title === '去除节假日的修复时长数据' || title === '模块分布数据' || title === '缺陷统计数据' || title === '责任人分布数据' || title === '平均修复时长数据' || title === '趋势图数据' || title === '累计修复' && type === '缺陷' || title === '累计reopen' && type === '缺陷' || title === '累计新增' && type === '缺陷'" :data="data" style="width: auto;" :height="setTitleHeight()" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
       <el-table-column label="缺陷等级" min-width="80" align="left">
         <template slot-scope="scope" style="text-align: center;">
           <span class="div_priority" :style="{background: priorityColors[scope.row.priority % priorityColors.length]}">{{ scope.row.priorityName }}</span>
@@ -200,6 +200,10 @@ export default {
         return 'calc(100vh - 363px)'
       } else if (this.title === '需求方向分布图数据' || this.title === `模块分布图数据`) {
         return 'calc(100vh - 200px)'
+      } else if (this.title === '累计新增' || this.title === '技术准入' || this.title === '累计上线' || this.title === '累计hold' || this.title === '累计修复' || this.title === '累计reopen') {
+        return 'calc(100vh - 134px)'
+      } else if (this.title === '模块分布数据') {
+        return 'calc(100vh - 175px)'
       } else {
         return 'calc(100vh - 318px)'
       }

+ 6 - 10
src/views/quality/defectStatistics.vue

@@ -1,5 +1,5 @@
 <template>
-  <div @click="openDrawer = false, drawer = false">
+  <div @click="openDrawer = false">
     <el-container class="defect-container">
       <el-header class="defect-main" style="height: auto;">
         <el-form :model="defectForm" class="demo-form-inline" :inline="true">
@@ -320,7 +320,6 @@
         </div>
       </el-main>
       <div @click.stop>
-        <require-drawer v-if="drawer" :drawer="drawer" :data="requireList" @clone="clone" />
         <drawer-all v-if="openDrawer" :drawer="openDrawer" :data="requireList" :status="reqStatus" @clone="clone" />
       </div>
     </el-container>
@@ -330,7 +329,6 @@
 import moment from 'moment'
 moment.locale('zh-cn')
 import { mapGetters } from 'vuex'
-import requireDrawer from './components/requireDrawer'
 import { settingQueryBizModuleList } from '@/api/defectManage'
 import { teamQueryTeamInfoList } from '@/api/configure'
 import {
@@ -348,10 +346,9 @@ import normalEchart from '@/components/chart/normalEchart'
 import childChart from './components/childCharts'
 import drawerAll from './components/drawerAll'
 export default {
-  components: { normalEchart, childChart, requireDrawer, drawerAll },
+  components: { normalEchart, childChart, drawerAll },
   data() {
     return {
-      drawer: false,
       requireList: {},
       reqStatus: '缺陷状态',
       openDrawer: false,
@@ -455,7 +452,6 @@ export default {
       }))
     },
     setDate(type) { // 日期筛选
-      this.drawer = false
       let startDate = null
       let endDate = null
       switch (type) {
@@ -823,12 +819,12 @@ export default {
       this.getMemberDistributeData()
     },
     getRequiredNum(value) {
-      this.drawer = true
-      value.typeStr = '缺陷'
-      this.requireList = value
+      value.title = value.label
+      value.toType = '缺陷'
+      this.requireList = { ...value, ...this.Summary }
+      this.openDrawer = true
     },
     clone(v) {
-      this.drawer = v
       this.openDrawer = false
     }
   }

+ 6 - 11
src/views/quality/requireStatistics.vue

@@ -1,5 +1,5 @@
 <template>
-  <div @click="openDrawer = false, drawer = false">
+  <div @click="openDrawer = false">
     <el-container class="defect-container">
       <el-header class="defect-main" style="height: auto;">
         <el-form :model="chartForm" class="demo-form-inline" :inline="true">
@@ -186,7 +186,6 @@
         </div>
       </el-main>
       <div @click.stop>
-        <require-drawer v-if="drawer" :drawer="drawer" :data="requireList" @clone="clone" />
         <drawer-all v-if="openDrawer" :drawer="openDrawer" :data="requireList" :status="reqStatus" @clone="clone" />
       </div>
     </el-container>
@@ -213,7 +212,6 @@ import {
   getManpowerStatistics,
   getManpowerDistributedData
 } from '@/api/statisticsApi/requireStatistics'
-import requireDrawer from './components/requireDrawer'
 import drawerAll from './components/drawerAll'
 import statusChart from './components/statusChart'
 import tendencyChart from './components/tendencyChart'
@@ -235,12 +233,10 @@ export default {
     belongChart,
     changeRequireChart,
     bugList,
-    requireDrawer,
     drawerAll
   },
   data() {
     return {
-      drawer: false,
       openDrawer: false,
       requireList: {},
       reqStatus: '',
@@ -376,7 +372,6 @@ export default {
       this.getBugStatisticData()
     },
     setDate(type) { // 日期筛选
-      this.drawer = false
       let startDate = null
       let endDate = null
       switch (type) {
@@ -560,12 +555,13 @@ export default {
       return arr
     },
     getRequiredNum(value) {
-      this.drawer = true
-      value.typeStr = '需求'
-      this.requireList = value
+      console.log(value, this.Summary, '点击')
+      value.title = value.label
+      value.toType = '需求'
+      this.requireList = { ...value, ...this.Summary }
+      this.openDrawer = true
     },
     getPeopleList(value, data) {
-      console.log(value, data, '点击')
       value.title = '人力统计数据'
       value.toType = '需求'
       value.xaxis = this.mapData(data)
@@ -630,7 +626,6 @@ export default {
       window.log({ c: 'statistic', d: 'requirement_statistic_state_stay' })
     },
     clone(v) {
-      this.drawer = v
       this.openDrawer = false
     }
   }

+ 6 - 10
src/views/quality/taskStatistics.vue

@@ -1,5 +1,5 @@
 <template>
-  <div @click="openDrawer = false, drawer = false">
+  <div @click="openDrawer = false">
     <el-container class="defect-container">
       <el-header class="defect-main" style="height: auto;">
         <el-form :model="chartForm" class="demo-form-inline" :inline="true">
@@ -188,7 +188,6 @@
         </div>
       </el-main>
       <div @click.stop>
-        <require-drawer v-if="drawer" :drawer="drawer" :data="requireList" @clone="clone" />
         <drawer-all v-if="openDrawer" :drawer="openDrawer" :data="requireList" :status="reqStatus" @clone="clone" />
       </div>
     </el-container>
@@ -198,7 +197,6 @@
 import moment from 'moment'
 moment.locale('zh-cn')
 import { mapGetters } from 'vuex'
-import requireDrawer from './components/requireDrawer'
 import { settingQueryBizModuleList } from '@/api/defectManage'
 import { teamQueryTeamInfoList } from '@/api/configure'
 import {
@@ -240,12 +238,10 @@ export default {
     belongChart,
     changeRequireChart,
     bugList,
-    requireDrawer,
     drawerAll
   },
   data() {
     return {
-      drawer: false,
       requireList: {},
       reqStatus: '',
       bugCountTimeType: 1, // 获取趋缺陷势图数据接口入参:1本周 2本月 3本年
@@ -382,7 +378,6 @@ export default {
       this.getBugStatisticData()
     },
     setDate(type) { // 日期筛选
-      this.drawer = false
       let startDate = null
       let endDate = null
       switch (type) {
@@ -572,9 +567,11 @@ export default {
       return arr
     },
     getRequiredNum(value) {
-      this.drawer = true
-      value.typeStr = '任务'
-      this.requireList = value
+      console.log(value, this.Summary, '点击')
+      value.title = value.label
+      value.toType = '任务'
+      this.requireList = { ...value, ...this.Summary }
+      this.openDrawer = true
     },
     getModuleDistribute(value, data) {
       console.log(value, data, '点击')
@@ -656,7 +653,6 @@ export default {
       window.log({ c: 'statistic', d: 'task_state_stay_data' })
     },
     clone(v) {
-      this.drawer = v
       this.openDrawer = false
     }
   }