|
@@ -5,17 +5,17 @@
|
|
|
<div v-if="tabData" class="echarts-wrapper">
|
|
|
<div class="pie-wrapper">
|
|
|
<div class="total-wrapper">
|
|
|
- 总数:<span class="total" @click.stop="reportBizName = ''">{{
|
|
|
+<!-- 总数:<span class="total" @click.stop="reportBizName = ''">{{
|
|
|
tabData.total
|
|
|
- }}</span>
|
|
|
+ }}</span> -->
|
|
|
</div>
|
|
|
<div
|
|
|
id="a_oiew_mkds_ppmn_aygs"
|
|
|
class="pir"
|
|
|
- style="width: 100%; height: 130px"
|
|
|
+ style="width: 100%; height: 170px"
|
|
|
/>
|
|
|
- <div v-if="tabData">
|
|
|
- 本月 {{ active }} 类:
|
|
|
+ <div v-if="tabData" style="width: 205px">
|
|
|
+ 本月{{ active }}类:
|
|
|
<span v-for="(item, itemIndex ) in tabData.qualityProcessAndRdEfficiencyCopywriters" :key="itemIndex">
|
|
|
<span>{{ item.type }}</span>
|
|
|
<span :class="{ fontWeight: true, red: item.total > 0 }">{{ item.total }}次</span>
|
|
@@ -31,18 +31,18 @@
|
|
|
(elm) => (reportBizName ? elm.name === reportBizName : true)
|
|
|
)"
|
|
|
:key="itemIndex"
|
|
|
- style="margin-bottom: 20px"
|
|
|
+ style="margin-bottom: 10px"
|
|
|
>
|
|
|
- <div class="fontWeight" style="margin-bottom: 10px">
|
|
|
+ <div class="fontWeight" style="margin-bottom: 0px">
|
|
|
{{ item.type }}数据
|
|
|
</div>
|
|
|
- <div>本月{{ item.type }}{{ item.total }}次</div>
|
|
|
+ <div style="margin-top: 5px;">本月{{ item.type }}{{ item.total }}次</div>
|
|
|
<div
|
|
|
v-for="(elm, elmIndex) in item.subClientDetails"
|
|
|
:key="elmIndex"
|
|
|
style="margin-bottom: 10px"
|
|
|
>
|
|
|
- <div class="fontWeight">
|
|
|
+ <div class="fontWeight" style="margin-top: 10px">
|
|
|
{{ elm.subClientType }}{{ item.type }}{{ elm.total }}次
|
|
|
</div>
|
|
|
<div
|
|
@@ -50,7 +50,7 @@
|
|
|
:key="'sub_' + subindex"
|
|
|
style="margin-bottom: 5px"
|
|
|
>
|
|
|
- <div v-if="subItem.name">
|
|
|
+ <div v-if="subItem.name" style="margin-top: 5px">
|
|
|
<span class="fontWeight">{{ subindex + 1 }}、</span
|
|
|
>{{ subItem.name
|
|
|
}}<span
|
|
@@ -120,7 +120,6 @@ export default {
|
|
|
})
|
|
|
this.active = this.pageData[0].clientType
|
|
|
this.tabData = this.pageData[0]
|
|
|
- console.log(this.tabData)
|
|
|
// this.subIndex = 0
|
|
|
this.$nextTick(() => {
|
|
|
this.echartsInit()
|
|
@@ -176,9 +175,11 @@ export default {
|
|
|
{
|
|
|
// name: '访问来源',
|
|
|
type: 'pie',
|
|
|
- radius: ['61%', '80%'],
|
|
|
+ radius: ['61%', '75%'],
|
|
|
// data: this.subIndex > -1 && this.tabData.qualityProcessAndRdEfficiencyCopywriters[this.subIndex].subReportDetails,
|
|
|
- data: this.subReportDetails,
|
|
|
+ data: this.tabData.qualityProcessAndRdEfficiencyCopywriters.map(elm => {
|
|
|
+ return elm.subReportDetails
|
|
|
+ }).reduce((a, b) => a.concat(b)).filter(elm=>elm.total),
|
|
|
emphasis: {
|
|
|
itemStyle: {
|
|
|
shadowBlur: 0,
|
|
@@ -198,22 +199,20 @@ export default {
|
|
|
// 绘制图表
|
|
|
this.myChart.setOption(this.option)
|
|
|
this.myChart.on('click', (params) => {
|
|
|
- // console.log(params.data);
|
|
|
- // console.log();
|
|
|
const list = this.tabData.qualityProcessAndRdEfficiencyCopywriters
|
|
|
- console.log(list)
|
|
|
+ // console.log(list)
|
|
|
for (var i = list.length - 1; i >= 0; i--) {
|
|
|
if (list[i].name === params.data.name) {
|
|
|
this.reportBizName = params.data.name
|
|
|
- console.log(params.data.name)
|
|
|
+ // console.log(params.data.name)
|
|
|
this.subIndex = i
|
|
|
- this.subReportDetails = list[i].subReportDetails
|
|
|
+ // this.subReportDetails = list[i].subReportDetails
|
|
|
// this.myChart.setOption({...option,
|
|
|
// series:[
|
|
|
// option.series
|
|
|
// ]})
|
|
|
- this.option.series[1].data = this.subReportDetails
|
|
|
- this.myChart.setOption(this.option)
|
|
|
+ // this.option.series[1].data = this.subReportDetails
|
|
|
+ // this.myChart.setOption(this.option)
|
|
|
this.$forceUpdate()
|
|
|
}
|
|
|
}
|
|
@@ -222,12 +221,13 @@ export default {
|
|
|
tabChange(value) {
|
|
|
this.active = value
|
|
|
this.reportBizName = ''
|
|
|
- console.log(this.myChart)
|
|
|
-
|
|
|
this.tabData = this.pageData.filter(
|
|
|
(elm) => elm.clientType === this.active
|
|
|
)[0]
|
|
|
- this.option.series[1].data = null
|
|
|
+ this.option.series[0].data = this.tabData.qualityProcessAndRdEfficiencyCopywriters
|
|
|
+ this.option.series[1].data = this.tabData.qualityProcessAndRdEfficiencyCopywriters.map(elm => {
|
|
|
+ return elm.subReportDetails
|
|
|
+ }).reduce((a, b) => a.concat(b)).filter(elm=>elm.total)
|
|
|
this.myChart.setOption(this.option)
|
|
|
}
|
|
|
}
|
|
@@ -236,20 +236,16 @@ export default {
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
.echarts-wrapper {
|
|
|
- margin-top: -10px;
|
|
|
- .fontWeight {
|
|
|
- font-weight: 500;
|
|
|
- }
|
|
|
- .red {
|
|
|
- color: red;
|
|
|
- }
|
|
|
+ margin-top: 0px;
|
|
|
+
|
|
|
display: flex;
|
|
|
- color: #333;
|
|
|
+ color: #666;
|
|
|
font-size: 14px;
|
|
|
.pie-wrapper {
|
|
|
width: 50%;
|
|
|
.total-wrapper {
|
|
|
color: #666;
|
|
|
+ margin-top: 10px;
|
|
|
|
|
|
.total {
|
|
|
color: #409eff;
|
|
@@ -261,8 +257,19 @@ export default {
|
|
|
.detail-wrapper {
|
|
|
width: 50%;
|
|
|
padding: 10px;
|
|
|
- height: 200px;
|
|
|
+ height: 270px;
|
|
|
overflow-y: scroll;
|
|
|
}
|
|
|
+ .fontWeight {
|
|
|
+ font-weight: 500;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ .red {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ .p10{
|
|
|
+ display: inline-block;
|
|
|
+ padding-left: 10px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|