wenbobowen 4 жил өмнө
parent
commit
b6bbd62c26

+ 1 - 1
src/api/onlineQuality.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-const commonUrl = 'http://10.179.148.222:8083'
+const commonUrl = 'http://10.96.93.249:8083'
 
 export function addCheckTemplate(data) {
   return request({

+ 9 - 0
src/api/reportTemplate.js

@@ -354,3 +354,12 @@ export function reportdelivertestGetByTaskId(data) {
   })
 }
 
+// 获取全类型报告列表
+export function getReportList(data) {
+  return request({
+    url: Presentation + `/task/getReportList`,
+    method: 'post',
+    data
+  })
+}
+

+ 4 - 1
src/components/chart/normalEchart.vue

@@ -42,9 +42,12 @@ export default {
       const myChart = echarts.init(document.getElementById(this.chartId))
       myChart.setOption(this.option)
       myChart.off('click')// 在渲染点击事件之前先清除点击事件
-      myChart.on('click', params => {
+      myChart.on('click', params => { // 点击事件
         this.$emit('onClick', params)
       })
+      myChart.getZr().on('click', params => { // (统计页面)柱子外关闭抽屉
+        this.$emit('clone')
+      })
     }
   }
 }

+ 109 - 0
src/components/timeline/index.vue

@@ -0,0 +1,109 @@
+<template>
+  <div :class="[!bgmargin ? 'qz-timeline-bg' : 'qz-timeline-bgOne']">
+    <div class="qz-timeline-layout">
+      <div v-for="(item, index) in list" :key="index">
+        <div class="qz-timeline-name" :class="[index === key ? 'qz-time-color1' : 'qz-time-color']">{{ item }}</div>
+        <span class="circular" :class="[index === key ? 'qz-time-code1' : 'qz-time-code']" @click="qz_click_code({value: index, name: item})" />
+        <div class="qz-timeline-divider" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    data: { type: Array, required: true },
+    num: { type: Number, default: 0 },
+    bgmargin: { type: Boolean, default: false }
+  },
+  data() {
+    return {
+      list: [],
+      key: this.num
+    }
+  },
+  watch: {
+    data: {
+      handler(newV) {
+        if (!newV) return
+        this.list = newV
+      },
+      deep: true,
+      immediate: true
+    },
+    num: {
+      handler(newV) {
+        this.key = newV
+      },
+      deep: true
+    }
+  },
+  methods: {
+    // 初始化
+    timeline_init() {
+      this.list = this.list.map(item => ({
+        ...item,
+        show: false
+      }))
+    },
+    // 点击节点
+    qz_click_code(val) {
+      this.key = val.value
+      this.$emit('update', val)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.qz-timeline-bgOne {
+  min-width: max-content;
+  margin: 0 30px 18px;
+  text-align: center;
+}
+.qz-timeline-bg {
+  min-width: max-content;
+  margin: 29px 30px 30px;
+  text-align: center;
+}
+.qz-timeline-layout {
+  display: flex;
+  justify-content: center;
+}
+.qz-timeline-divider {
+  content: '';
+  min-width: 100px;
+  border: 1px solid #E5E5E5;
+}
+.qz-timeline-name {
+  font-weight: 400;
+  font-size: 12px;
+  color: #444444;
+  position: relative;
+  top: 12px;
+}
+.circular {
+  width: 10px;
+  height: 10px;
+  margin: 0 8px;
+  display: inline-block;
+  border: 1px solid #60AEFF;
+  border-radius: 50%;
+  position: relative;
+  top: 12px;
+  cursor: pointer;
+}
+.qz-time-code {
+  background: #FFF;
+}
+.qz-time-code1 {
+  background: #60AEFF;
+}
+.qz-time-color {
+  color: #444;
+}
+.qz-time-color1 {
+  color: #60AEFF;
+}
+</style>

+ 6 - 4
src/views/projectManage/bugList/details/bugTableDialog.vue

@@ -61,7 +61,7 @@
         </el-form>
         <div class="bug-footer">
           <el-button class="bug-botton" @click="bugFormQuery = {}">重置</el-button>
-          <el-button class="bug-botton" style="margin-left: 20px;" type="primary" @click="bugGetTableList(bugFormQuery, false, 2)">筛选</el-button>
+          <el-button class="bug-botton" style="margin-left: 20px;" type="primary" @click="bugGetTableList(bugFormQuery, true, 2)">筛选</el-button>
         </div>
         <div slot="reference" class="bug-Status" :class="{'bug-color': !bugIcon, 'bug-bgColor': bugIcon}" @click="bugClickIcon"><svg-icon v-if="bugIcon" icon-class="筛选" /><svg-icon v-if="!bugIcon" icon-class="筛选1" /> 筛选项 </div>
       </el-popover>
@@ -194,6 +194,7 @@ export default {
       queryData: {}, // 查询条件
       data: {}, // 查询条件
       eleId: {},
+      key: '',
       statusObj: null // 状态对象
     }
   },
@@ -285,9 +286,10 @@ export default {
       this.statusNum = e.value
       this.$set(this.bugFormQuery, 'theBugTypes', '')
       this.bugFormQuery = {}
-      this.bugGetTableList(this.bugFormQuery, false, 1)
+      this.bugGetTableList(this.bugFormQuery, true, 1)
     },
     bugGetTableList(e, index, vel) {
+      this.key = vel
       this.queryData = e
       this.data = {}
       if (index) {
@@ -331,7 +333,7 @@ export default {
     },
     handleSizeChange(val) {
       this.pageSize = val
-      this.bugGetTableList(this.queryData, false)
+      this.key === 1 ? this.bugGetTableList(this.bugFormQuery, false, 1) : this.bugGetTableList(this.queryData, false, 2)
     },
     clone() {
       this.bugIcon = false
@@ -339,7 +341,7 @@ export default {
     },
     handleCurrentChange(val) { // 分页
       this.curIndex = val
-      this.bugGetTableList(this.queryData, false)
+      this.key === 1 ? this.bugGetTableList(this.bugFormQuery, false, 1) : this.bugGetTableList(this.queryData, false, 2)
     },
     click_bugName(e) {
       this.bugQuery = JSON.parse(

+ 21 - 6
src/views/quality/components/bugList.vue

@@ -2,9 +2,9 @@
   <section>
     <div class="repair-list">
       <div v-for="(item, index) in chartData.bugCount" :key="'time'+index" class="repair-item">
-        <div :class="{'item-detail': index === 0}">
+        <div :class="{'item-detail': index === 0}" @click.stop>
           <span>{{ item.label }}</span>
-          <div class="repair-time">{{ item.countStr }}<span> 个</span></div>
+          <div class="repair-time repair-hover" @click="openDrawer(item, chartData.bugCount)">{{ item.countStr }}<span> 个</span></div>
           <div v-show="Number(item.chainRatio)>=0" class="repair-up">环比:<i class="el-icon-caret-top" /><span>{{ item.chainRatio }}%</span></div>
           <div v-show="Number(item.chainRatio)<0" class="repair-down">环比:<i class="el-icon-caret-bottom" /><span>{{ item.chainRatio.substring(1,item.chainRatio.length) }}%</span></div>
           <div v-show="item.chainRatio === '--'" class="repair-up">环比:<span>{{ item.chainRatio }}%</span></div>
@@ -13,9 +13,9 @@
     </div>
     <div class="repair-list">
       <div v-for="(item, index) in chartData.averageBugCount" :key="'time'+index" class="repair-item">
-        <div :class="{'item-detail': index === 0}">
+        <div :class="{'item-detail': index === 0}" @click.stop>
           <span>{{ item.label }}</span>
-          <div class="repair-time">{{ item.countStr }}<span> 个</span></div>
+          <div class="repair-time repair-hover" @click="openDrawer(item, chartData.averageBugCount)">{{ item.countStr }}<span> 个</span></div>
           <div v-show="Number(item.chainRatio)>=0" class="repair-up">环比:<i class="el-icon-caret-top" /><span>{{ item.chainRatio }}%</span></div>
           <div v-show="Number(item.chainRatio)<0" class="repair-down">环比:<i class="el-icon-caret-bottom" /><span>{{ item.chainRatio.substring(1,item.chainRatio.length) }}%</span></div>
           <div v-show="item.chainRatio === '--'" class="repair-up">环比:<span>{{ item.chainRatio }}%</span></div>
@@ -24,9 +24,9 @@
     </div>
     <div class="repair-list">
       <div v-for="(item, index) in chartData.averageBugRepairTime" :key="'time'+index" class="repair-item">
-        <div :class="{'item-detail': index === 0}">
+        <div :class="{'item-detail': index === 0}" @click.stop>
           <span>{{ item.label }}</span>
-          <div class="repair-time">{{ item.countStr }}<span> h</span></div>
+          <div class="repair-time repair-hover" @click="openDrawer(item, chartData.averageBugRepairTime)">{{ item.countStr }}<span> h</span></div>
           <div v-show="Number(item.chainRatio)>=0" class="repair-up">环比:<i class="el-icon-caret-top" /><span>{{ item.chainRatio }}%</span></div>
           <div v-show="Number(item.chainRatio)<0" class="repair-down">环比:<i class="el-icon-caret-bottom" /><span>{{ item.chainRatio.substring(1,item.chainRatio.length) }}%</span></div>
           <div v-show="item.chainRatio === '--'" class="repair-up">环比:<span>{{ item.chainRatio }}%</span></div>
@@ -44,6 +44,11 @@ export default {
       required: false
     }
   },
+  data() {
+    return {
+      requireList: {}
+    }
+  },
   watch: {
     chartData: {
       handler(newV) {
@@ -52,6 +57,12 @@ export default {
       immediate: true,
       deep: true
     }
+  },
+  methods: {
+    openDrawer(val, list) {
+      this.requireList = { ...val, yaxis: list }
+      this.$emit('requireBug', this.requireList)
+    }
   }
 }
 </script>
@@ -94,4 +105,8 @@ export default {
     color:#9FFF39
   }
 }
+.repair-hover {
+  cursor: pointer;
+  color: #409eff;
+}
 </style>

+ 6 - 2
src/views/quality/components/cycleStatistic.vue

@@ -42,8 +42,8 @@
             </template>
           </span>
           <div v-if="item.countStr" class="repair-time">{{ item.countStr }}<span> 天</span></div>
-          <div v-if="item.total || item.total === 0" class="repair-time">
-            {{ item.total }}<span class="unit"> 个</span>
+          <div v-if="item.total || item.total === 0" class="repair-time" @click.stop>
+            <span class="repaircur" style="    color: #303133; font-size: 18px; margin: 25px 0;" @click="$emit('clickCount', item, chartData)">{{ item.total }}</span><span class="unit"> 个</span>
             <span v-if="item.count > 0">
               /<span class="reject">打回{{ item.count }}个</span>
             </span>
@@ -182,6 +182,10 @@ export default {
     color:#9FFF39
   }
 }
+.repaircur {
+  cursor: pointer;
+  color: #1890FF;
+}
 </style>
 <style>
 .cycleStatistic-tips {

+ 10 - 2
src/views/quality/components/distributionChart.vue

@@ -10,6 +10,7 @@
               :disabled="activeTab === '2'&&item.code === 1"
               :label="item.label"
               :value="item.code"
+              @click.native="getLabel(item.label)"
             />
           </el-select>
         </el-col>
@@ -19,8 +20,8 @@
         </el-col>
       </el-row>
     </div>
-    <div class="chart-contain">
-      <normal-echart v-if="echartsOption" :chart-id="id" :option="echartsOption" />
+    <div class="chart-contain" @click.stop>
+      <normal-echart v-if="echartsOption" :chart-id="id" :option="echartsOption" @onClick="getCode" @clone="$emit('clone')" />
     </div>
   </section>
 </template>
@@ -85,12 +86,19 @@ export default {
   },
   mounted() {
     this.changeBarOrPie(this.barOrPie)
+    this.getLabel(this.statusList[0].label)
   },
   methods: {
     statusChange(e) {
       this.$emit('update:status', this.curStatus)
       this.$emit('change')
     },
+    getLabel(e) {
+      this.$emit('state', e)
+    },
+    getCode(val) {
+      this.$emit('code', val)
+    },
     changeBarOrPie(type) { // 饼图柱状图切换
       this.barOrPie = type
       if (!this.chartData) return

+ 312 - 0
src/views/quality/components/drawerAll.vue

@@ -0,0 +1,312 @@
+<template>
+  <el-drawer :title="Statistics.title" :visible.sync="drawer_" :direction="direction" :modal="false" :class="{'drawer-box': showClass}" size="100%" :before-close="handleClose">
+    <div v-if="Statistics.title === '任务分布图数据'" class="qz-drawer-grade">按任务等级分布</div>
+    <div>
+      <div v-if="Statistics.title !== '模块分布数据'" :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>
+        <div v-if="Statistics.towTimeLine" class="qz-drawer-scll">
+          <timeline :data="Statistics.towTimeLine" :num="defaultKey2" :bgmargin="bgMargin" @update="getvalueTow" />
+        </div>
+      </div>
+      <div v-if="Statistics.title === '需求分布图数据' || Statistics.title === '任务分布图数据'" class="qz-drawer-H">
+        <span class="fontSize">{{ status }}</span>为<span class="fontSize">{{ type }}</span>的{{ Statistics.toType }}
+      </div>
+      <div v-if="Statistics.title === '状态停留分布图数据'" class="qz-drawer-H">
+        在<span class="fontSize">{{ type }}</span>状态停留时长为<span class="fontSize">{{ typeTow }}</span>的{{ Statistics.toType }}
+      </div>
+      <div v-if="Statistics.title === '模块分布数据'" class="qz-drawer-H" style="margin: 20px 30px 10px;">
+        模块<span class="fontSize">{{ Statistics.name }}</span>的缺陷
+      </div>
+      <div v-if="Statistics.title === `${Statistics.qz_holiday}的修复时长区间数据`" class="qz-drawer-H" style="margin: 20px 30px 10px;">
+        {{ Statistics.qz_holiday }}修复时间区间为<span class="fontSize">{{ type }}</span>的<span class="fontSize">{{ typeTow }}</span>级缺陷
+      </div>
+      <qzTable :data="tableData" :title="Statistics.title" :type="Statistics.toType" />
+    </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 { getRequirement } from '@/api/requirement.js'
+import { taskList } from '@/api/taskIndex'
+import { bugList } from '@/api/defectManage'
+import { getReportList } from '@/api/reportTemplate'
+import timeline from '@/components/timeline'
+import qzTable from './tables'
+export default {
+  components: { timeline, qzTable },
+  props: {
+    data: { type: Object, required: true },
+    drawer: { type: Boolean, default: false },
+    status: { type: String, default: '' }
+  },
+  data() {
+    return {
+      list: [],
+      bgMargin: false,
+      dataList: [],
+      Statistics: {}, // title
+      direction: 'rtl',
+      showClass: false,
+      defaultKey2: 0,
+      defaultKey: 0,
+      bugList: [],
+      type: '',
+      typeTow: '',
+      towVal: '',
+      oneVal: '',
+      currentPage: 1,
+      total: 0,
+      reportData: {},
+      paging: {
+        curIndex: 1, // 分页
+        pageSize: 10 // 分页
+      },
+      tableData: []
+    }
+  },
+  computed: {
+    drawer_: {
+      get() { return this.drawer },
+      set(v) { this.$emit('clone', v) }
+    }
+  },
+  watch: {
+    data: {
+      handler(newV, oldV) {
+        if (newV) {
+          console.log(newV, this.drawer, '刚进来')
+          this.Statistics = newV
+          this.list = newV.xaxis
+          this.type = newV.name
+          this.bgMargin = false
+          this.currentPage = 1
+          this.paging = { curIndex: 1, pageSize: 10 }
+          this.setDrawerDate()
+        }
+      },
+      immediate: true
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.showClass = true
+    })
+  },
+  methods: {
+    setDrawerDate() {
+      if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据') {
+        this.defaultKey = this.Statistics.dataIndex
+        this.dataList = this.Statistics.yaxis[0].idList[this.defaultKey]
+        this.getTableData(this.dataList)
+      } else if (this.Statistics.title === '缺陷统计数据' || this.Statistics.title === '去除节假日的修复时长数据') {
+        const key = this.Statistics.xaxis.indexOf(this.Statistics.label)
+        this.defaultKey = key === -1 ? 0 : key
+        this.dataList = this.Statistics.idList
+        this.getTableData(this.dataList)
+      } else if (this.Statistics.title === '状态停留分布图数据') {
+        this.bgMargin = true
+        this.typeTow = this.Statistics.seriesName // 停留时长
+        this.defaultKey = this.Statistics.dataIndex
+        this.defaultKey2 = Number(this.Statistics.seriesIndex)
+        this.dataList = this.Statistics.statusList.yaxis[this.defaultKey2].idList[this.defaultKey]
+        this.getTableData(this.dataList)
+      } else if (this.Statistics.title === '报告统计数据') {
+        const key = this.Statistics.xaxis.indexOf(this.Statistics.label)
+        this.defaultKey = key === -1 ? 0 : key
+        this.Statistics.label === '总数' ? this.getIdList({ deliverTestReportIdList: this.Statistics.subCountList[0].idList, dailyReportIdList: this.Statistics.subCountList[1].idList, releaseReportIdList: this.Statistics.subCountList[2].idList }) : ''
+        key === 1 ? this.getIdList({ deliverTestReportIdList: this.Statistics.subCountList[0].idList }) : '' // 提测
+        key === 2 ? this.getIdList({ dailyReportIdList: this.Statistics.subCountList[0].idList }) : '' // 日报
+        key === 3 ? this.getIdList({ releaseReportIdList: this.Statistics.subCountList[0].idList }) : '' // 准出
+      } else if (this.Statistics.title === '模块分布数据') {
+        this.getTableData(this.Statistics.newData.idList)
+      } else if (this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据`) {
+        this.bgMargin = true
+        this.typeTow = this.Statistics.seriesName
+        this.defaultKey = this.Statistics.dataIndex
+        this.defaultKey2 = Number(this.Statistics.seriesIndex)
+        this.dataList = this.Statistics.series[this.defaultKey2].idList[this.defaultKey]
+        this.getTableData(this.dataList)
+      }
+    },
+    getvalue(e) { // 时间轴one
+      this.oneVal = e
+      this.type = e.name
+      this.defaultKey = e.value
+      this.getTimeLine()
+    },
+    getvalueTow(e) { // 时间轴tow
+      this.towVal = e
+      this.typeTow = e.name
+      this.defaultKey2 = e.value
+      this.getTimeLine()
+    },
+    getTimeLine() { // 数据筛选
+      this.dataList = []
+      this.currentPage = 1
+      this.paging = { curIndex: 1, pageSize: 10 }
+      if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '任务分布图数据' || this.Statistics.title === '分布图数据') {
+        this.dataList = this.Statistics.yaxis[0].idList[this.oneVal.value]
+      } else if (this.Statistics.title === '缺陷统计数据') {
+        this.dataList = this.Statistics.yaxis[this.oneVal.value].idList
+      } else if (this.Statistics.title === '状态停留分布图数据') {
+        this.dataList = this.Statistics.statusList.yaxis[this.defaultKey2].idList[this.defaultKey]
+      } else if (this.Statistics.title === '报告统计数据') {
+        this.defaultKey === 0 ? this.getIdList({ deliverTestReportIdList: this.Statistics.subCountList[0].idList, dailyReportIdList: this.Statistics.subCountList[1].idList, releaseReportIdList: this.Statistics.subCountList[2].idList }) : ''
+        this.defaultKey === 1 ? this.getIdList({ deliverTestReportIdList: this.Statistics.subCountList[0].idList }) : '' // 提测
+        this.defaultKey === 2 ? this.getIdList({ dailyReportIdList: this.Statistics.subCountList[0].idList }) : '' // 日报
+        this.defaultKey === 3 ? this.getIdList({ releaseReportIdList: this.Statistics.subCountList[0].idList }) : '' // 准出
+        return
+      } else if (this.Statistics.title === '去除节假日的修复时长数据') {
+        this.dataList = this.Statistics[this.defaultKey].idList
+      } else if (this.Statistics.title === `${this.Statistics.qz_holiday}的修复时长区间数据`) {
+        this.dataList = this.Statistics.series[this.defaultKey2].idList[this.defaultKey]
+      }
+      if (this.dataList[0]) { // 判断idList有没有数据
+        this.getTableData(this.dataList)
+      } else { // 没有数据初始化table
+        this.tableData = []
+        this.total = 0
+      }
+    },
+    async getTableData(taskIdList) { // 获取需求、任务、缺陷表格数据
+      if (taskIdList.length <= 0) {
+        this.tableData = []
+        this.total = 0
+        return
+      }
+      const data = { ids: taskIdList, ...this.paging }
+      if (this.Statistics.title === '需求分布图数据' || this.Statistics.title === '状态停留分布图数据' && 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 === '任务') {
+        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.qz_holiday}的修复时长区间数据`) {
+        const res = await bugList(data)
+        if (res.code === 200) {
+          this.tableData = res.data
+          this.total = res.total
+        }
+      }
+    },
+    async getIdList(value) {
+      this.reportData = value
+      const data = { ...value, ...this.paging }
+      const res = await getReportList(data)
+      if (res.code === 200) {
+        this.tableData = res.data
+        this.total = res.total
+      }
+    },
+    handleSizeChange(val) {
+      this.paging.pageSize = val
+      this.Statistics.title === '报告统计数据' ? this.getIdList(this.reportData) : this.getTableData(this.dataList)
+    },
+    handleCurrentChange(val) {
+      this.paging.curIndex = val
+      this.Statistics.title === '报告统计数据' ? this.getIdList(this.reportData) : this.getTableData(this.dataList)
+    },
+    handleClose(done) { // 关闭
+      this.$emit('clone')
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.qz-drawer-header {
+  text-align: center;
+  background: #F7F7F7;
+  border-radius: 4px;
+  min-height: 120px;
+  margin: 20px 30px;
+  overflow: hidden;
+}
+.qz-drawer-padding {
+  padding: 20px 0;
+}
+.qz-drawer-padding-s {
+  padding: 1px 0;
+}
+.qz-drawer-scll {
+  overflow-x: auto;
+}
+.qz-drawer-scll::-webkit-scrollbar { width: 0 !important; height: 0 !important }
+.qz-drawer-H {
+  font-size: 16px;
+  margin: 0 30px;
+  color: #444444;
+}
+.qz-drawer-grade {
+  color: #444;
+  font-size: 14px;
+  position: absolute;
+  top: 28px;
+  left: 185px;
+}
+.fontSize {
+  color: #333333;
+  font-weight: 500;
+}
+>>> :focus{outline:0;}
+>>>.el-table::before {
+    left: 0;
+    bottom: 0;
+    width: 100%;
+    height: 0px;
+}
+
+.div_priority {
+  color: #ffffff;
+  width:fit-content;
+  padding: 0 12px;
+  border-radius: 4px;
+  margin-left: 4px;
+}
+>>>.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;
+}
+>>>.el-drawer__container {
+    left: 0;
+    right: 0;
+    width: 50%;
+}
+>>>.el-table td, .el-table th {
+    padding: 5px 0;
+}
+</style>

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

@@ -1,6 +1,5 @@
 <template>
   <el-drawer :title="Statistics.label" :visible.sync="drawer_" :direction="direction" :modal="false" :class="{'drawer-box': showClass}" size="100%" :before-close="handleClose">
-    <div class="_font">{{ Statistics.total }}</div>
     <div style="height: calc(100vh - 200px); overflow: scroll; overflow-x: hidden;">
       <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="100">
@@ -189,11 +188,6 @@ export default {
   color: rgb(167, 174, 188);
   font-size: 10px;
 }
-._font {
-  font-size: 16px;
-  color: #409eff;
-  margin: 20px 30px;
-}
 >>>.el-drawer__header {
     color: #444;
     font-size: 20px;

+ 8 - 3
src/views/quality/components/statusStayChart.vue

@@ -1,7 +1,7 @@
 <template>
   <section>
-    <div class="chart-contain">
-      <normal-echart v-if="echartsOption" :chart-id="id" :option="echartsOption" />
+    <div class="chart-contain" @click.stop>
+      <normal-echart v-if="echartsOption" :chart-id="id" :option="echartsOption" @onClick="getCode" @clone="$emit('clone')" />
     </div>
   </section>
 </template>
@@ -23,7 +23,8 @@ export default {
   },
   data() {
     return {
-      echartsOption: null
+      echartsOption: null,
+      dayList: []
     }
   },
   watch: {
@@ -36,8 +37,12 @@ export default {
     }
   },
   methods: {
+    getCode(val) {
+      this.$emit('code', val, this.dayList, this.chartData)
+    },
     setChart() {
       if (!this.chartData) return
+      this.dayList = this.chartData.yaxis.map(item => { return item.name })
       const newArr = this.chartData.yaxis.filter(item => { return item.name !== '全部' })
       const colorArr = ['#409EFF', '#F8CE5C', '#F2904F', '#5EE2BE', '#D873F5', '#7479F5']
       this.echartsOption = {

+ 162 - 0
src/views/quality/components/tables/index.vue

@@ -0,0 +1,162 @@
+<template>
+  <div style="margin: 0 30px;">
+    <el-table v-if="title === '状态停留分布图数据' || title === '需求分布图数据' || title === '任务分布图数据'" :data="data" style="width: 100%;" :height="title === '状态停留分布图数据' ? 'calc(100vh - 363px)': 'calc(100vh - 318px)'" :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 :label="`${type}名称`" min-width="360" align="left" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <div v-if="type === '需求'" class="drawer-id">{{ scope.row.requirementDisplayId }}</div>
+          <div v-if="type === '任务'" class="drawer-id">{{ scope.row.taskIdSting }}</div>
+          <div class="drawer-name" @click="jumper(scope.row, type)">{{ scope.row.name }}</div>
+        </template>
+      </el-table-column>
+      <el-table-column v-if="type === '需求'" prop="typeName" label="需求类型" min-width="110" align="center" />
+      <el-table-column v-if="type === '需求'" label="PM" min-width="100" show-overflow-tooltip align="center">
+        <template v-if="scope.row.pmMemberInfoResponse" slot-scope="scope">
+          <span>{{ scope.row.pmMemberInfoResponse.name }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column v-if="type === '需求'" label="状态" prop="statusName" min-width="100" align="center" />
+      <el-table-column v-if="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' }">
+      <el-table-column label="优先级" prop="priorityCode" min-width="80" align="left">
+        <template slot-scope="scope" style="text-align: center;">
+          <span class="div_priority" :class="[{'priority_color': scope.row.priorityLevel === 'High'},{'priority_color1': scope.row.priorityLevel === 'Medium'},{'priority_color3': scope.row.priorityLevel === 'Low'}]">
+            {{ scope.row.priorityLevel.substring(0, 1) }}
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="bugName" label="缺陷名称" min-width="200" align="left" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <div class="drawer-id">{{ 'BUG-' + scope.row.id }}</div>
+          <span class="drawer-name" @click.stop="jumper(scope.row, '缺陷')">{{ scope.row.bugName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column v-if="title === '不去除节假日的修复时长区间数据'" prop="devFixTime" label="缺陷修复时长" min-width="80" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.devFixTime/(1000 * 3600) | numFilter }}H
+        </template>
+      </el-table-column>
+      <el-table-column v-if="title === '去除节假日的修复时长区间数据'" prop="fixTimePurgeNH" label="缺陷修复时长(去除节假日)" min-width="80" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.devFixTimePurgeNH/(1000 * 3600) | numFilter }}H
+        </template>
+      </el-table-column>
+      <el-table-column prop="bugStatusName" label="状态" min-width="100" align="center" />
+    </el-table>
+
+    <el-table v-if="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-column label="优先级" prop="priorityCode" min-width="80" align="left">
+        <template slot-scope="scope" style="text-align: center;">
+          <span class="div_priority" :class="[{'priority_color': scope.row.priorityLevel === 'High'},{'priority_color1': scope.row.priorityLevel === 'Medium'},{'priority_color3': scope.row.priorityLevel === 'Low'}]">
+            {{ scope.row.priorityLevelShortName }}
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="bugName" label="缺陷名称" min-width="200" align="left" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <div class="drawer-id">{{ 'BUG-' + scope.row.id }}</div>
+          <span class="drawer-name" @click.stop="jumper(scope.row, '缺陷')">{{ scope.row.bugName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column v-if="title === '模块分布数据' || title === '缺陷统计数据'" prop="devFixTime" label="缺陷修复时长" min-width="110" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.devFixTime/(1000 * 3600) | numFilter }}H
+        </template>
+      </el-table-column>
+      <el-table-column v-if="title === '模块分布数据' || title === '去除节假日的修复时长数据'" prop="fixTimePurgeNH" label="缺陷修复时长(去除节假日)" :min-width="title === '模块分布数据' ? '110': '80'" align="center">
+        <template slot-scope="scope">
+          {{ scope.row.devFixTimePurgeNH/(1000 * 3600) | numFilter }}H
+        </template>
+      </el-table-column>
+      <el-table-column prop="bugStatusName" label="状态" min-width="100" align="center" />
+    </el-table>
+
+    <el-table v-if="title === '报告统计数据'" :data="data" style="width: auto;" height="calc(100vh - 318px)" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }">
+      <el-table-column label="报告名称" min-width="200" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <div class="drawer-id">{{ scope.row.id }}</div>
+          <span class="drawer-name" @click.stop="jumper(scope.row, '报告')">{{ scope.row.reportName || '' }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="statusString" label="状态" min-width="110" />
+      <el-table-column label="报告人" min-width="110">
+        <template slot-scope="scope">
+          {{ scope.row.creatorObject.name || '' }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="typeString" label="类型" min-width="110" />
+    </el-table>
+  </div>
+</template>
+
+<script>
+import '@/styles/PublicStyle/index.scss'
+import { EncryptId } from '@/utils/crypto-js.js'
+export default {
+  filters: {
+    numFilter(value) {
+      let realVal = ''
+      if (!isNaN(value) && value !== '') {
+        realVal = parseFloat(value).toFixed(1) // 截取当前数据到小数点后两位
+      } else {
+        realVal = '--'
+      }
+      return realVal
+    }
+  },
+  props: {
+    data: { type: Array, default: null },
+    title: { type: String, required: true },
+    type: { type: String, default: null }
+  },
+  data() {
+    return {
+      priorityColors: ['#F56C6C', '#FF8952', '#F5E300', '#7ED321', '#61D3B8', '#69B3FF', '#BDBDBD']
+    }
+  },
+  methods: {
+    deleteChild(arr) { // 删除无用子属性
+      const bfs = arr => {
+        arr.forEach(item => {
+          if (!item.childrenEnums || item.childrenEnums.length === 0) {
+            delete item.childrenEnums
+          } else {
+            this.deleteChild(item.childrenEnums)
+          }
+        })
+      }
+      bfs(arr)
+      return arr
+    },
+    jumper(val, name) { // 需求、任务、缺陷跳转
+      const bizId_id = EncryptId(`${val.bizId}_${val.id}`)
+      const newTab = this.$router.resolve({ name: name + '详情', query: { bizId_id: bizId_id }})
+      window.open(newTab.href, '_blank')
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.div_priority {
+  color: #ffffff;
+  width:fit-content;
+  padding: 0 12px;
+  border-radius: 4px;
+  margin-left: 4px;
+}
+.drawer-name:hover {
+  color: #409eff;
+  cursor: pointer;
+}
+.drawer-id {
+  color: rgb(167, 174, 188);
+  font-size: 10px;
+}
+</style>

+ 48 - 9
src/views/quality/defectStatistics.vue

@@ -1,5 +1,5 @@
 <template>
-  <div @click="drawer = false">
+  <div @click="openDrawer = false, drawer = false">
     <el-container class="defect-container">
       <el-header class="defect-main" style="height: auto;">
         <el-form :model="defectForm" class="demo-form-inline" :inline="true">
@@ -133,7 +133,7 @@
           </el-row>
           <el-row type="flex" align="middle">
             <el-col :span="24">
-              <div class="chart-contain">
+              <div class="chart-contain" @click.stop>
                 <child-chart :show.sync="showChild" :chart-type="barOrPie" :params="childParams" />
                 <normal-echart v-if="echartsOption1" :chart-id="'chartFirst'" :option="echartsOption1" @onClick="echartClick" />
               </div>
@@ -160,7 +160,9 @@
               <div v-for="(item, index) in repairTimeListNoHoliday" :key="'time'+index" class="repair-item" :class="[Number(item.relativeRatio)<0?'repair-slow':'repair-rise']">
                 <div class="repair-item-point" :class="['point'+index]" />
                 <span>{{ item.label }}</span>
-                <div class="repair-time">{{ item.total }}</div>
+                <div @click.stop>
+                  <div class="repair-time chart-cur" @click="cilckRepairTimeListNoHoliday(item, repairTimeListNoHoliday)">{{ item.total }}</div>
+                </div>
                 <div v-show="Number(item.relativeRatio)>=0" class="repair-up">环比:<i class="el-icon-caret-top" /><span>{{ item.relativeRatio }}%</span></div>
                 <div v-show="Number(item.relativeRatio)<0" class="repair-down">环比:<i class="el-icon-caret-bottom" /><span>{{ item.relativeRatio.substring(1,item.relativeRatio.length) }}%</span></div>
                 <div v-show="item.relativeRatio === '--'" class="repair-up">环比:<span>{{ item.relativeRatio }}%</span></div>
@@ -169,8 +171,8 @@
           </el-row>
           <el-row type="flex" align="middle">
             <el-col :span="4" class="col-flex-start">
-              <div class="off-holiday" :class="[offOnholiday==='off'?'selected':'']" @click="changeHoliday('off')">去除节假日</div>
-              <div class="on-holiday" :class="[offOnholiday==='on'?'selected':'']" @click="changeHoliday('on')">不去除节假日</div>
+              <div class="off-holiday" :class="[offOnholiday==='off'?'selected':'']" @click="changeHoliday('off'), holiday = '去除节假日'">去除节假日</div>
+              <div class="on-holiday" :class="[offOnholiday==='on'?'selected':'']" @click="changeHoliday('on'), holiday = '不去除节假日'">不去除节假日</div>
             </el-col>
             <el-col :span="4" :offset="16" class="col-flex-end">
               <div class="bar-line" :class="[barOrLine==='line'?'active':'']" @click="changeBarOrLine('line')">折线图</div>
@@ -179,8 +181,8 @@
           </el-row>
           <el-row type="flex" align="middle">
             <el-col :span="24">
-              <div class="chart-contain">
-                <normal-echart v-if="echartsOption2" :chart-id="'chartSecond'" :option="echartsOption2" />
+              <div class="chart-contain" @click.stop>
+                <normal-echart v-if="echartsOption2" :chart-id="'chartSecond'" :option="echartsOption2" @onClick="getHoliday" @clone="clone" />
               </div>
             </el-col>
           </el-row>
@@ -201,7 +203,7 @@
             <el-table-column prop="name" label="模块" />
             <el-table-column v-if="activeTab=== 1" prop="newData" label="新增" sortable="custom" show-overflow-tooltip>
               <template slot-scope="scope">
-                <span class="table-repair-item1 repair-span">{{ scope.row.newData.total }}</span>
+                <span @click.stop><span class="table-repair-item1 repair-span" style="cursor: pointer;" @click="getModuleData(scope.row)">{{ scope.row.newData.total }}</span></span>
                 <span class="repair-span">{{ scope.row.newData.detail[0].label }}:{{ scope.row.newData.detail[0].total }}</span>
                 <span class="repair-span">{{ scope.row.newData.detail[1].label }}:{{ scope.row.newData.detail[1].total }}</span>
               </template>
@@ -304,6 +306,7 @@
       </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>
   </div>
@@ -328,12 +331,15 @@ import {
 } from '@/api/defectStatistics'
 import normalEchart from '@/components/chart/normalEchart'
 import childChart from './components/childCharts'
+import drawerAll from './components/drawerAll'
 export default {
-  components: { normalEchart, childChart, requireDrawer },
+  components: { normalEchart, childChart, requireDrawer, drawerAll },
   data() {
     return {
       drawer: false,
       requireList: {},
+      reqStatus: '',
+      openDrawer: false,
       echartsOption1: null,
       echartsOption2: null,
       echartsOption3: null, // 趋势图
@@ -344,6 +350,7 @@ export default {
       dateType: 'week', // 时间选择类型
       moduleList: [], // 模块列表
       activeName: 'first',
+      holiday: '去除节假日',
       activeTab: 1,
       defectStatus: 1, // 缺陷状态
       barOrPie: 'bar', // 柱状图or饼图
@@ -507,6 +514,7 @@ export default {
       }
     },
     async defectStatusChange() { // 分布图状态变动
+      this.openDrawer = false
       const moduleIds = this.defectForm.moduleIds
       const params = {
         startTime: this.stratAndEnd[0] || null,
@@ -576,6 +584,7 @@ export default {
       }
     },
     echartClick(params) { // 图表1点击事件
+      this.clickCodeData(params)
       if (this.defectStatus !== 7 || this.barOrPie === 'pie') return // 只有状态是缺陷类型的时候才显示二级
       this.showChild = true
       const moduleIds = this.defectForm.moduleIds
@@ -590,6 +599,31 @@ export default {
         bugTypeName: params.name
       }
     },
+    clickCodeData(value) {
+      value.title = '分布图数据'
+      this.requireList = { ...value, ...this.chart1Data }
+      this.openDrawer = true
+    },
+    cilckRepairTimeListNoHoliday(value, data) {
+      value.title = '去除节假日的修复时长数据'
+      value.xaxis = ['全部', 'P0', 'P1', 'P2', 'P3']
+      this.requireList = { ...value, ...data }
+      this.openDrawer = true
+    },
+    getModuleData(value) {
+      value.title = '模块分布数据'
+      value.xaxis = ['全部', 'P0', 'P1', 'P2', 'P3']
+      this.requireList = { ...value }
+      this.openDrawer = true
+    },
+    getHoliday(value) {
+      value.title = `${this.holiday}的修复时长区间数据`
+      value.qz_holiday = this.holiday
+      value.xaxis = this.echartsOption2.xAxis.data
+      value.towTimeLine = this.echartsOption2.legend.data
+      this.requireList = { ...value, ...this.echartsOption2 }
+      this.openDrawer = true
+    },
     async getSumData() { // 头部数据
       const moduleIds = this.defectForm.moduleIds
       const params = {
@@ -754,6 +788,7 @@ export default {
     },
     clone(v) {
       this.drawer = v
+      this.openDrawer = false
     }
   }
 }
@@ -1021,6 +1056,10 @@ export default {
     }
   }
 }
+.chart-cur:hover {
+  color: #4089FF;
+  cursor: pointer;
+}
 .tab-item {
   padding: 0 20px;
 }

+ 38 - 5
src/views/quality/requireStatistics.vue

@@ -1,5 +1,5 @@
 <template>
-  <div @click="drawer = false">
+  <div @click="openDrawer = false, drawer = false">
     <el-container class="defect-container">
       <el-header class="defect-main" style="height: auto;">
         <el-form :model="chartForm" class="demo-form-inline" :inline="true">
@@ -163,11 +163,14 @@
             :status.sync="distributeStatus"
             :active-tab="activeTab"
             @change="getDistributeData()"
+            @code="clickCodeData"
+            @state="getStatusType"
+            @clone="openDrawer = false"
           />
         </div>
         <div class="chart-item">
           <h3>状态停留分布图</h3>
-          <status-stay-chart :chart-data="statusStayData" />
+          <status-stay-chart :chart-data="statusStayData" @code="statusStayChart" @clone="openDrawer = false" />
         </div>
         <div class="chart-item">
           <h3>需求方向分布图</h3>
@@ -177,13 +180,14 @@
           <h3>排期发生变更的需求(<span class="strong-font">{{ changeTotal }}</span>个)</h3>
           <change-require-chart :chart-data="changeRequireData" type-name="需求" />
         </div>
-        <div class="chart-item">
+        <div class="chart-item" @click.stop>
           <h3>缺陷统计</h3>
-          <bug-list :chart-data="bugListData" />
+          <bug-list :chart-data="bugListData" @requireBug="queryData" />
         </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>
   </div>
@@ -210,6 +214,7 @@ import {
   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'
 import cycleStatistic from './components/cycleStatistic'
@@ -230,12 +235,15 @@ export default {
     belongChart,
     changeRequireChart,
     bugList,
-    requireDrawer
+    requireDrawer,
+    drawerAll
   },
   data() {
     return {
       drawer: false,
+      openDrawer: false,
       requireList: {},
+      reqStatus: '',
       bugCountTimeType: 1, // 获取趋缺陷势图数据接口入参:1本周 2本月 3本年
       timeTypeList: [ // 日期选择
         { code: 1, label: '周' },
@@ -482,7 +490,11 @@ export default {
           : this.developmentCycleData = [moment().format('YYYY-MM-DD'), '0']
       }
     },
+    getStatusType(e) {
+      this.reqStatus = e
+    },
     async getDistributeData() { // 获取需求分布图
+      this.openDrawer = false
       const params = {
         ...this.globalParams,
         type: Number(this.activeTab),
@@ -545,8 +557,29 @@ export default {
       value.typeStr = '需求'
       this.requireList = value
     },
+    queryData(value) { // 需求bug 浮层数据
+      value.title = '缺陷统计数据'
+      value.xaxis = ['全部', 'P0', 'P1', 'P2', 'P3']
+      this.requireList = value
+      this.openDrawer = true
+    },
+    clickCodeData(value) {
+      value.title = '需求分布图数据'
+      value.toType = '需求'
+      this.requireList = { ...value, ...this.distributeData }
+      this.openDrawer = true
+    },
+    statusStayChart(value, list, data) {
+      value.title = '状态停留分布图数据'
+      value.toType = '需求'
+      value.towTimeLine = list
+      value.statusList = data
+      this.requireList = { ...value, xaxis: data.xaxis }
+      this.openDrawer = true
+    },
     clone(v) {
       this.drawer = v
+      this.openDrawer = false
     }
   }
 }

+ 46 - 13
src/views/quality/taskStatistics.vue

@@ -1,5 +1,5 @@
 <template>
-  <div @click="drawer = false">
+  <div @click="openDrawer = false, drawer = false">
     <el-container class="defect-container">
       <el-header class="defect-main" style="height: auto;">
         <el-form :model="chartForm" class="demo-form-inline" :inline="true">
@@ -161,11 +161,14 @@
             :status.sync="distributeStatus"
             :active-tab="activeTab"
             @change="getDistributeData()"
+            @code="getTaskDat"
+            @state="getStatusType"
+            @clone="openDrawer = false"
           />
         </div>
         <div class="chart-item">
           <h3>状态停留分布图</h3>
-          <status-stay-chart :chart-data="statusStayData" />
+          <status-stay-chart :chart-data="statusStayData" @code="statusStayChart" @clone="openDrawer = false" />
         </div>
         <div class="chart-item">
           <h3>模块分布图</h3>
@@ -177,15 +180,16 @@
         </div>
         <div class="chart-item">
           <h3>报告统计</h3>
-          <cycle-statistic :chart-data="reportSummaryData" child-data="relativeRatio" :show-tips="false" />
+          <cycle-statistic :chart-data="reportSummaryData" child-data="relativeRatio" :show-tips="false" @clickCount="clickCount" />
         </div>
         <div class="chart-item">
           <h3>缺陷统计</h3>
-          <bug-list :chart-data="bugListData" />
+          <bug-list :chart-data="bugListData" @requireBug="clickCountStr" />
         </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>
   </div>
@@ -223,6 +227,7 @@ import statusStayChart from './components/statusStayChart'
 import belongChart from './components/belongChart'
 import changeRequireChart from './components/changeRequireChart'
 import bugList from './components/bugList'
+import drawerAll from './components/drawerAll'
 export default {
   components: {
     statusChart,
@@ -235,18 +240,21 @@ export default {
     belongChart,
     changeRequireChart,
     bugList,
-    requireDrawer
+    requireDrawer,
+    drawerAll
   },
   data() {
     return {
       drawer: false,
       requireList: {},
+      reqStatus: '',
       bugCountTimeType: 1, // 获取趋缺陷势图数据接口入参:1本周 2本月 3本年
       timeTypeList: [ // 日期选择
         { code: 1, label: '周' },
         { code: 2, label: '月' },
         { code: 3, label: '年' }
       ],
+      openDrawer: false,
       teamOptions: [], // 团队列表
       chartForm: {}, // 筛选表单
       stratAndEnd: [], // 开始结束日期
@@ -492,6 +500,7 @@ export default {
       }
     },
     async getDistributeData() { // 获取任务分布图
+      this.openDrawer = false
       const params = {
         ...this.globalParams,
         type: Number(this.activeTab),
@@ -543,28 +552,52 @@ export default {
       }
     },
     async getReportSummary() { // 报告统计
-      const params = {
-        ...this.globalParams,
-        type: Number(this.activeTab)
-      }
+      const params = { ...this.globalParams, type: Number(this.activeTab) }
       const res = await getReportSummary(params)
       if (res.code === 200) this.reportSummaryData = res.data
     },
     async getBugStatisticData() { // 缺陷统计
-      const params = {
-        ...this.globalParams,
-        type: Number(this.activeTab)
-      }
+      const params = { ...this.globalParams, type: Number(this.activeTab) }
       const res = await getBugStatisticData(params)
       if (res.code === 200) this.bugListData = res.data
     },
+    getStatusType(e) {
+      this.reqStatus = e
+    },
     getRequiredNum(value) {
       this.drawer = true
       value.typeStr = '任务'
       this.requireList = value
     },
+    clickCountStr(value) { // 需求bug 浮层数据
+      value.title = '缺陷统计数据'
+      value.xaxis = ['全部', 'P0', 'P1', 'P2', 'P3']
+      this.requireList = value
+      this.openDrawer = true
+    },
+    clickCount(value, data) {
+      value.title = '报告统计数据'
+      value.xaxis = ['全部', '提测报告', '测试日报', '准出报告']
+      this.requireList = { ...value, reportData: data }
+      this.openDrawer = true
+    },
+    getTaskDat(value) {
+      value.title = '任务分布图数据'
+      value.toType = '任务'
+      this.requireList = { ...value, ...this.distributeData }
+      this.openDrawer = true
+    },
+    statusStayChart(value, list, data) {
+      value.title = '状态停留分布图数据'
+      value.toType = '任务'
+      value.towTimeLine = list
+      value.statusList = data
+      this.requireList = { ...value, xaxis: data.xaxis }
+      this.openDrawer = true
+    },
     clone(v) {
       this.drawer = v
+      this.openDrawer = false
     }
   }
 }

+ 3 - 0
src/views/reportManagement/ReleaseReport/releaePreview.vue

@@ -215,3 +215,6 @@ export default {
   margin-bottom: 20px;
 }
 </style>
+<style scoped>
+  .parent-style div >>> table {width: 100% !important;}
+</style>