|
@@ -3,6 +3,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { fourquan } from '../../api'
|
|
|
+
|
|
|
import 'echarts-liquidfill'
|
|
|
export default {
|
|
|
name: "OperationAnalysisCount",
|
|
@@ -17,7 +19,8 @@
|
|
|
{ color1: '#5fff06', color2: '#B4FF9F' },
|
|
|
{ color1: '#60b8db', color2: '#afd3ff' },
|
|
|
{ color1: '#ff00e8', color2: '#f48fff' }
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ myChart: null
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -68,189 +71,202 @@
|
|
|
},
|
|
|
createCircleImage(){
|
|
|
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- const seriesArr = [];
|
|
|
+ },
|
|
|
+ async draw() {
|
|
|
+ const result = await fourquan({}, 'POST');
|
|
|
+ this.data1 = result.data1;
|
|
|
+ this.data2 = result.data2;
|
|
|
+ this.data3 = result.data3;
|
|
|
+ this.data4 = result.data4;
|
|
|
|
|
|
- const liquidFill1 = this.createLiquidfill({ index: 0, center_x: 14, center_y: 25, text: this.data1.value, value: this.handlerData(this.data1.value) });
|
|
|
- seriesArr.push(liquidFill1);
|
|
|
+ const seriesArr = [];
|
|
|
|
|
|
- const liquidFill2 = this.createLiquidfill({ index: 1, center_x: 58, center_y: 25, text: this.data2.value, value: this.handlerData(this.data2.value) });
|
|
|
- seriesArr.push(liquidFill2);
|
|
|
+ const liquidFill1 = this.createLiquidfill({ index: 0, center_x: 14, center_y: 25, text: this.data1.value, value: this.handlerData(this.data1.value) });
|
|
|
+ seriesArr.push(liquidFill1);
|
|
|
|
|
|
- const liquidFill3 = this.createLiquidfill({ index: 2, center_x: 14, center_y: 75, text: this.data3.value, value: this.handlerData(this.data3.value) });
|
|
|
- seriesArr.push(liquidFill3);
|
|
|
+ const liquidFill2 = this.createLiquidfill({ index: 1, center_x: 58, center_y: 25, text: this.data2.value + '%', value: this.handlerData(this.data2.value + '%') });
|
|
|
+ seriesArr.push(liquidFill2);
|
|
|
|
|
|
- const liquidFill4 = this.createLiquidfill({ index: 3, center_x: 58, center_y: 75, text: this.data4.value, value: this.handlerData(this.data4.value) });
|
|
|
- seriesArr.push(liquidFill4);
|
|
|
+ const liquidFill3 = this.createLiquidfill({ index: 2, center_x: 14, center_y: 75, text: this.data3.value, value: this.handlerData(this.data3.value) });
|
|
|
+ seriesArr.push(liquidFill3);
|
|
|
|
|
|
- seriesArr.push({
|
|
|
- type: 'pictorialBar',
|
|
|
- symbol: `image://${require('../../assets/index/liquidfill-1-circle.png')}`,
|
|
|
- symbolSize: [102, 102],
|
|
|
- data: [{ value: 100, symbolPosition: 'start', symbolOffset: [10, -100] }, {}],
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- offset: [-55, -80],
|
|
|
- color: '#fff',
|
|
|
- fontSize: 16,
|
|
|
- formatter: '巡访平均周期'
|
|
|
- },
|
|
|
- z: 2
|
|
|
- });
|
|
|
+ const liquidFill4 = this.createLiquidfill({ index: 3, center_x: 58, center_y: 75, text: this.data4.value, value: this.handlerData(this.data4.value) });
|
|
|
+ seriesArr.push(liquidFill4);
|
|
|
|
|
|
- seriesArr.push({
|
|
|
- type: 'pictorialBar',
|
|
|
- symbol: `image://${require('../../assets/index/liquidfill-1-line.png')}`,
|
|
|
- symbolSize: [62, 5],
|
|
|
- data: [{ value: 100, symbolPosition: 'start', symbolOffset: [120, -60] }, {}],
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- offset: [-70, -50],
|
|
|
- color: this.colorArr[0].color1,
|
|
|
- fontSize: 16,
|
|
|
- formatter: this.data1.value
|
|
|
- },
|
|
|
- z: 2
|
|
|
- });
|
|
|
+ seriesArr.push({
|
|
|
+ type: 'pictorialBar',
|
|
|
+ symbol: `image://${require('../../assets/index/liquidfill-1-circle.png')}`,
|
|
|
+ symbolSize: [102, 102],
|
|
|
+ data: [{ value: 100, symbolPosition: 'start', symbolOffset: [10, -100] }, {}],
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ offset: [-55, -80],
|
|
|
+ color: '#fff',
|
|
|
+ fontSize: 16,
|
|
|
+ formatter: '巡访平均周期'
|
|
|
+ },
|
|
|
+ z: 2
|
|
|
+ });
|
|
|
|
|
|
- seriesArr.push({
|
|
|
- type: 'pictorialBar',
|
|
|
- symbol: `image://${require('../../assets/index/liquidfill-2-circle.png')}`,
|
|
|
- symbolSize: [102, 102],
|
|
|
- data: [{ value: 100, symbolPosition: 'start', symbolOffset: [230, -100] }, {}],
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- offset: [160, -80],
|
|
|
- color: '#fff',
|
|
|
- fontSize: 16,
|
|
|
- formatter: '子女绑定占比'
|
|
|
- },
|
|
|
- z: 2
|
|
|
- });
|
|
|
+ seriesArr.push({
|
|
|
+ type: 'pictorialBar',
|
|
|
+ symbol: `image://${require('../../assets/index/liquidfill-1-line.png')}`,
|
|
|
+ symbolSize: [62, 5],
|
|
|
+ data: [{ value: 100, symbolPosition: 'start', symbolOffset: [120, -60] }, {}],
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ offset: [-70, -50],
|
|
|
+ color: this.colorArr[0].color1,
|
|
|
+ fontSize: 16,
|
|
|
+ formatter: this.data1.value
|
|
|
+ },
|
|
|
+ z: 2
|
|
|
+ });
|
|
|
|
|
|
- seriesArr.push({
|
|
|
- type: 'pictorialBar',
|
|
|
- symbol: `image://${require('../../assets/index/liquidfill-2-line.png')}`,
|
|
|
- symbolSize: [62, 5],
|
|
|
- data: [{ value: 100, symbolPosition: 'start', symbolOffset: [340, -60] }, {}],
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- offset: [150, -50],
|
|
|
- color: this.colorArr[1].color1,
|
|
|
- fontSize: 16,
|
|
|
- formatter: this.data2.value
|
|
|
- },
|
|
|
- z: 2
|
|
|
- });
|
|
|
+ seriesArr.push({
|
|
|
+ type: 'pictorialBar',
|
|
|
+ symbol: `image://${require('../../assets/index/liquidfill-2-circle.png')}`,
|
|
|
+ symbolSize: [102, 102],
|
|
|
+ data: [{ value: 100, symbolPosition: 'start', symbolOffset: [230, -100] }, {}],
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ offset: [160, -80],
|
|
|
+ color: '#fff',
|
|
|
+ fontSize: 16,
|
|
|
+ formatter: '子女绑定占比'
|
|
|
+ },
|
|
|
+ z: 2
|
|
|
+ });
|
|
|
|
|
|
- seriesArr.push({
|
|
|
- type: 'pictorialBar',
|
|
|
- symbol: `image://${require('../../assets/index/liquidfill-3-circle.png')}`,
|
|
|
- symbolSize: [102, 102],
|
|
|
- data: [{ value: 100, symbolPosition: 'start', symbolOffset: [10, 30] }, {}],
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- offset: [-70, 55],
|
|
|
- color: '#fff',
|
|
|
- fontSize: 16,
|
|
|
- formatter: '积分存量'
|
|
|
- },
|
|
|
- z: 2
|
|
|
- });
|
|
|
+ seriesArr.push({
|
|
|
+ type: 'pictorialBar',
|
|
|
+ symbol: `image://${require('../../assets/index/liquidfill-2-line.png')}`,
|
|
|
+ symbolSize: [62, 5],
|
|
|
+ data: [{ value: 100, symbolPosition: 'start', symbolOffset: [340, -60] }, {}],
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ offset: [150, -50],
|
|
|
+ color: this.colorArr[1].color1,
|
|
|
+ fontSize: 16,
|
|
|
+ formatter: `${this.data2.value}%`
|
|
|
+ },
|
|
|
+ z: 2
|
|
|
+ });
|
|
|
|
|
|
- seriesArr.push({
|
|
|
- type: 'pictorialBar',
|
|
|
- symbol: `image://${require('../../assets/index/liquidfill-3-line.png')}`,
|
|
|
- symbolSize: [62, 5],
|
|
|
- data: [{ value: 100, symbolPosition: 'start', symbolOffset: [120, 70] }, {}],
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- offset: [-70, 90],
|
|
|
- color: this.colorArr[2].color1,
|
|
|
- fontSize: 16,
|
|
|
- formatter: `${this.data3.value}`
|
|
|
- },
|
|
|
- z: 2
|
|
|
- });
|
|
|
+ seriesArr.push({
|
|
|
+ type: 'pictorialBar',
|
|
|
+ symbol: `image://${require('../../assets/index/liquidfill-3-circle.png')}`,
|
|
|
+ symbolSize: [102, 102],
|
|
|
+ data: [{ value: 100, symbolPosition: 'start', symbolOffset: [10, 30] }, {}],
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ offset: [-70, 55],
|
|
|
+ color: '#fff',
|
|
|
+ fontSize: 16,
|
|
|
+ formatter: '积分存量'
|
|
|
+ },
|
|
|
+ z: 2
|
|
|
+ });
|
|
|
|
|
|
- seriesArr.push({
|
|
|
- type: 'pictorialBar',
|
|
|
- symbol: `image://${require('../../assets/index/liquidfill-4-circle.png')}`,
|
|
|
- symbolSize: [102, 102],
|
|
|
- data: [{ value: 100, symbolPosition: 'start', symbolOffset: [230, 30] }, {}],
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- offset: [150, 55],
|
|
|
- color: '#fff',
|
|
|
- fontSize: 16,
|
|
|
- formatter: '兑换比例'
|
|
|
- },
|
|
|
- z: 2
|
|
|
- });
|
|
|
+ seriesArr.push({
|
|
|
+ type: 'pictorialBar',
|
|
|
+ symbol: `image://${require('../../assets/index/liquidfill-3-line.png')}`,
|
|
|
+ symbolSize: [62, 5],
|
|
|
+ data: [{ value: 100, symbolPosition: 'start', symbolOffset: [120, 70] }, {}],
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ offset: [-70, 90],
|
|
|
+ color: this.colorArr[2].color1,
|
|
|
+ fontSize: 16,
|
|
|
+ formatter: `${this.data3.value}`
|
|
|
+ },
|
|
|
+ z: 2
|
|
|
+ });
|
|
|
|
|
|
- seriesArr.push({
|
|
|
- type: 'pictorialBar',
|
|
|
- symbol: `image://${require('../../assets/index/liquidfill-4-line.png')}`,
|
|
|
- symbolSize: [62, 5],
|
|
|
- data: [{ value: 100, symbolPosition: 'start', symbolOffset: [340, 70] }, {}],
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- offset: [150, 90],
|
|
|
- color: this.colorArr[3].color1,
|
|
|
- fontSize: 16,
|
|
|
- formatter: `${this.data4.value}`
|
|
|
- },
|
|
|
- z: 2
|
|
|
- });
|
|
|
+ seriesArr.push({
|
|
|
+ type: 'pictorialBar',
|
|
|
+ symbol: `image://${require('../../assets/index/liquidfill-4-circle.png')}`,
|
|
|
+ symbolSize: [102, 102],
|
|
|
+ data: [{ value: 100, symbolPosition: 'start', symbolOffset: [230, 30] }, {}],
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ offset: [150, 55],
|
|
|
+ color: '#fff',
|
|
|
+ fontSize: 16,
|
|
|
+ formatter: '兑换比例'
|
|
|
+ },
|
|
|
+ z: 2
|
|
|
+ });
|
|
|
|
|
|
- let myChart = this.$echarts.init(document.getElementById('myChartindex5'));
|
|
|
- myChart.setOption({
|
|
|
- grid:{
|
|
|
- left:"2%"
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- type: 'value',
|
|
|
- max: 100,
|
|
|
- splitLine: {
|
|
|
- show: false
|
|
|
- },
|
|
|
- axisLine: {
|
|
|
- show: false
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- show: false
|
|
|
- },
|
|
|
- axisTick: {
|
|
|
- show: false
|
|
|
- }
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: 'category',
|
|
|
- splitLine: {
|
|
|
- show: false
|
|
|
- },
|
|
|
- axisLine: {
|
|
|
- show: false
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- show: false
|
|
|
- },
|
|
|
- axisTick: {
|
|
|
- show: false
|
|
|
+ seriesArr.push({
|
|
|
+ type: 'pictorialBar',
|
|
|
+ symbol: `image://${require('../../assets/index/liquidfill-4-line.png')}`,
|
|
|
+ symbolSize: [62, 5],
|
|
|
+ data: [{ value: 100, symbolPosition: 'start', symbolOffset: [340, 70] }, {}],
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ offset: [150, 90],
|
|
|
+ color: this.colorArr[3].color1,
|
|
|
+ fontSize: 16,
|
|
|
+ formatter: `${this.data4.value}`
|
|
|
+ },
|
|
|
+ z: 2
|
|
|
+ });
|
|
|
+
|
|
|
+ if(this.myChart != null) {
|
|
|
+ this.myChart.clear();
|
|
|
}
|
|
|
- },
|
|
|
- series: seriesArr
|
|
|
- });
|
|
|
+
|
|
|
+ this.myChart = this.$echarts.init(document.getElementById('myChartindex5'));
|
|
|
+ this.myChart.setOption({
|
|
|
+ grid:{
|
|
|
+ left:"2%"
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'value',
|
|
|
+ max: 100,
|
|
|
+ splitLine: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisLine: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisTick: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'category',
|
|
|
+ splitLine: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisLine: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ axisTick: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: seriesArr
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.draw();
|
|
|
}
|
|
|
}
|
|
|
</script>
|