wangziqian 5 年之前
父节点
当前提交
129c0a6b22
共有 2 个文件被更改,包括 15 次插入3 次删除
  1. 6 1
      src/views/projectManage/bugList/details/index.vue
  2. 9 2
      src/views/quality/defectStatistics.vue

+ 6 - 1
src/views/projectManage/bugList/details/index.vue

@@ -1279,7 +1279,7 @@ export default {
 }
 </script>
 
-<style>
+<style lang="scss">
 .el-tooltip__popper.is-dark {
   background-color: rgba(121,132,150, 0.8);
 }
@@ -1374,6 +1374,11 @@ export default {
   color: #666666;
   font-weight: 500;
   padding-left: 13px
+  span {
+    display: inline-block;
+    line-height: 13px;
+    width: 65px;
+  }
 }
 .bug_manage .el-cascader .el-input__inner:hover {
   border: thin solid #DCDFE6;

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

@@ -541,13 +541,20 @@ export default {
           }]
         }
         if (this.defectStatus === 7) { // 如果是缺陷类型,则增加二级饼图
-          const childArr = this.chart1Data.xaxis.map((item, index) => {
+          // this.echartsOption1.legend.data = [...this.chart1Data.xaxis, ...this.chartChildData.xaxis]
+          const childArr = this.chartChildData.xaxis.map((item, index) => {
             return {
               value: this.chartChildData.yaxis[0] && this.chartChildData.yaxis[0].data[index] || null,
               name: item
             }
           })
-          this.echartsOption1.series.push({ name: '缺陷数量', type: 'pie', radius: ['0', '44%'], right: '30%', label: { position: 'inner' }, data: childArr, animation: false })
+          this.echartsOption1.series = [
+            {
+              name: '缺陷数量', type: 'pie', radius: ['45%', '60%'], right: '30%', label: { position: 'outer' }, data: childArr,
+              itemStyle: { normal: { label: { show: true, formatter: '{b} : {c} ({d}%)' }, labelLine: { show: true }}}
+            },
+            { name: '缺陷数量', type: 'pie', radius: ['0', '44%'], right: '30%', label: { position: 'inner', alignTo: 'edge', margin: 20 }, data: newArr, animation: false }
+          ]
         }
       }
     },