|
@@ -10,7 +10,6 @@
|
|
}}</span> -->
|
|
}}</span> -->
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
- v-if="this.pieData.filter(elm => elm.total).length"
|
|
|
|
id="a_oiew_mkds_ppmn_aygs"
|
|
id="a_oiew_mkds_ppmn_aygs"
|
|
class="pir"
|
|
class="pir"
|
|
style="width: 100%; height: 170px"
|
|
style="width: 100%; height: 170px"
|
|
@@ -24,7 +23,7 @@
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="detail-wrapper" :style="{marginTop: this.pieData.filter(elm => elm.total).length ? '0' : '10px'}">
|
|
|
|
|
|
+ <div class="detail-wrapper" :style="{marginTop: '10px'}">
|
|
<div v-if="this.pieData.filter(elm => elm.total).length">
|
|
<div v-if="this.pieData.filter(elm => elm.total).length">
|
|
<div
|
|
<div
|
|
v-for="(
|
|
v-for="(
|
|
@@ -130,7 +129,9 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
echartsInit() {
|
|
echartsInit() {
|
|
- this.pieData = this.tabData.qualityProcessAndRdEfficiencyCopywriters
|
|
|
|
|
|
+ this.pieData = this.tabData.qualityProcessAndRdEfficiencyCopywriters.filter(elm => elm.total)
|
|
|
|
+ const subReportDetails = this.pieData.map(elm => {return elm.subReportDetails })
|
|
|
|
+
|
|
this.option = {
|
|
this.option = {
|
|
color: [
|
|
color: [
|
|
'#5470c6',
|
|
'#5470c6',
|
|
@@ -182,9 +183,7 @@ export default {
|
|
type: 'pie',
|
|
type: 'pie',
|
|
radius: ['61%', '75%'],
|
|
radius: ['61%', '75%'],
|
|
// data: this.subIndex > -1 && this.tabData.qualityProcessAndRdEfficiencyCopywriters[this.subIndex].subReportDetails,
|
|
// data: this.subIndex > -1 && this.tabData.qualityProcessAndRdEfficiencyCopywriters[this.subIndex].subReportDetails,
|
|
- data: this.pieData.map(elm => {
|
|
|
|
- return elm.subReportDetails
|
|
|
|
- }).reduce((a, b) => a.concat(b)).filter(elm => elm.total),
|
|
|
|
|
|
+ data: subReportDetails.length && subReportDetails.reduce((a, b) => a.concat(b)).filter(elm => elm.total),
|
|
emphasis: {
|
|
emphasis: {
|
|
itemStyle: {
|
|
itemStyle: {
|
|
shadowBlur: 0,
|
|
shadowBlur: 0,
|