Browse Source

旭日图好了,去掉服务页面bug

feature
tianq 3 years ago
parent
commit
d3f08c6fcf
  1. 4
      src/views/dataBoard/sida/cpts/fw01gg.vue
  2. 50
      src/views/dataBoard/sida/cpts/fw02gxxq.vue
  3. 20
      src/views/dataBoard/sida/cpts/fwBarOption01.js
  4. 130
      src/views/dataBoard/sida/cpts/zyqd.vue

4
src/views/dataBoard/sida/cpts/fw01gg.vue

@ -117,7 +117,7 @@ export default {
pieData0.push(item.service_category); pieData0.push(item.service_category);
pieData1.push(item.common_service_num); pieData1.push(item.common_service_num);
pieData2.push(item.appoint_service_num); pieData2.push(item.appoint_service_num);
pieData3.push(item.served_person_qty_num); // pieData3.push(item.served_person_qty_num);
}); });
this.pieData = [pieData0, pieData1, pieData2, pieData3]; this.pieData = [pieData0, pieData1, pieData2, pieData3];
@ -131,7 +131,7 @@ export default {
this.pieOption.xAxis[0].data = this.pieData[0]; this.pieOption.xAxis[0].data = this.pieData[0];
this.pieOption.series[0].data = this.pieData[1]; this.pieOption.series[0].data = this.pieData[1];
this.pieOption.series[1].data = this.pieData[2]; this.pieOption.series[1].data = this.pieData[2];
this.pieOption.series[2].data = this.pieData[3]; // this.pieOption.series[2].data = this.pieData[3];
this.$refs.pieChart.setOption(this.pieOption); this.$refs.pieChart.setOption(this.pieOption);
} }
} }

50
src/views/dataBoard/sida/cpts/fw02gxxq.vue

@ -16,7 +16,7 @@
</template> </template>
<script> <script>
import screenEchartsFrame from '@/views/dataBoard/cpts/screen-echarts-frame/index'; import screenEchartsFrame from '@/views/dataBoard/cpts/screen-echarts-frame/index';
import { pieOption } from './fwqdPieOption.js'; // import { pieOption } from './fwqdPieOption.js';
import { requestPostBi } from '@/js/dai/request-bipass'; import { requestPostBi } from '@/js/dai/request-bipass';
export default { export default {
props: { props: {
@ -31,7 +31,45 @@ export default {
showNoData: false, showNoData: false,
timer: null, timer: null,
pieChart: '', pieChart: '',
pieOption: {}, pieOption: {
color: ['#1A95FF', '#FF6138', '#2adcea', '#2cc4ad', '#7377f5', '#32de66', '#8155d4', '#c7ea48', '#ef47c2', 'd43349'],
tooltip: {
trigger: 'item'
},
series: [
{
name: '',
type: 'pie',
radius: [40, 130],
center: ['50%', '50%'],
// roseType: 'area',
itemStyle: {
borderRadius: 1
},
avoidLabelOverlap: false,
labelLine: {
show: false
},
label: {
normal: {
position: 'inner',
show: true,
formatter: '{d}%',
fontSize: 24,
color: '#FFFFFF'
}
},
emphasis: {
label: {
show: true,
// fontSize: 36,
fontWeight: 'bold'
}
},
data: []
}
]
},
pieInitState: false, pieInitState: false,
pieData: [], pieData: [],
@ -118,7 +156,7 @@ export default {
async iniPieChart() { async iniPieChart() {
this.$refs.pieChart.clear(); this.$refs.pieChart.clear();
// pieChart // pieChart
this.pieOption = pieOption();
this.pieOption.series[0].name = this.currentTab; this.pieOption.series[0].name = this.currentTab;
this.pieOption.series[0].data = this.pieData; this.pieOption.series[0].data = this.pieData;
this.$refs.pieChart.setOption(this.pieOption); this.$refs.pieChart.setOption(this.pieOption);
@ -131,9 +169,9 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
/deep/.pieMain3 { /deep/.pieMain3 {
.legend { .legend {
.legend-row{ .legend-row {
margin-top:10px!important margin-top: 10px !important;
}
} }
} }
}
</style> </style>

20
src/views/dataBoard/sida/cpts/fwBarOption01.js

@ -107,24 +107,6 @@ export function pieOption() {
}]) }])
}, },
data: [] data: []
}, { } ]
name: '服务人数',
type: 'bar',
barWidth: 12,
stack: 'Ad',
emphasis: {
focus: 'series'
},
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#FFAA00'
}, {
offset: 1,
color: 'rgba(168,241,255,0)'
}])
},
data: []
}, ]
} }
} }

130
src/views/dataBoard/sida/cpts/zyqd.vue

@ -114,7 +114,6 @@ export default {
}, },
// //
async getInfo() { async getInfo() {
console.log('this.orgId', this.orgId);
let url = ''; let url = '';
if (this.currentTab == '人资源') { if (this.currentTab == '人资源') {
url = 'people_res_view'; url = 'people_res_view';
@ -195,7 +194,6 @@ export default {
type: 'sunburst', type: 'sunburst',
radius: ['20%', '100%'], radius: ['20%', '100%'],
center: ['50%', '50%'], center: ['50%', '50%'],
// roseType: 'area',
itemStyle: { itemStyle: {
borderRadius: 1 borderRadius: 1
}, },
@ -203,24 +201,21 @@ export default {
labelLine: { labelLine: {
show: false show: false
}, },
// {a}
// {b}
// {c}
// {@xxx} 'xxx' {@product} 'product'
// {@[n]} n {@[3]} 3 0
label: { label: {
normal: { normal: {
position: 'inner', position: 'inner',
show: true, show: true,
formatter: '{@radio}', formatter: function(e) {
fontSize: 16, let data = e.data;
return `${data.radio}`;
},
fontSize:24,
color: '#FFFFFF' color: '#FFFFFF'
} }
}, },
emphasis: { emphasis: {
label: { label: {
show: true, show: true,
// fontSize: 36,
fontWeight: 'bold' fontWeight: 'bold'
} }
}, },
@ -229,119 +224,28 @@ export default {
] ]
}; };
this.pieOption.series[0].name = this.currentTab; this.pieOption.series[0].name = this.currentTab;
console.log('ddd', 'pieDatatotal');
let data = this.pieData; let data = this.pieData;
let pieDatatotal = data let pieDatatotal = data
.map(item => item.value) .map(item => item.value)
.reduce(function(prev, cur, index, arr) { .reduce(function(prev, cur, index, arr) {
console.log(prev, cur, index);
return prev + cur; return prev + cur;
}); });
console.log(pieDatatotal, 'pieDatatotal');
let data2 = data.map(item => { data.forEach(item => {
return { item.radio = item.value == 0 ? '0%' : ((item.value / pieDatatotal) * 100).toFixed(2) + '%';
value: item.value, if (item.children.length > 0) {
name: item.name, let children = item.children;
children: item.children, children.forEach(item2 => {
radio: item.value == 0 ? '0' : ((item.value / pieDatatotal) * 100).toFixed(2) item2.radio = item2.value == 0 ? '0%' : ((item2.value / pieDatatotal) * 100).toFixed(2) + '%';
}; });
}
}); });
console.log(data2, 'data2'); let data2 = [...data];
console.log('data2', data2);
this.pieOption.series[0].data = data2; this.pieOption.series[0].data = data2;
this.$refs.pieChart.setOption(this.pieOption); this.$refs.pieChart.setOption(this.pieOption);
// [
// {
// "org_id": "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
// "name": "",
// "count": 19,
// "child": [
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 0
// }
// ]
// },
// {
// "org_id": "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
// "name": "",
// "count": 7,
// "child": [
// {
// "name": "",
// "count": 1
// },
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 1
// },
// {
// "name": "",
// "count": 1
// },
// {
// "name": "",
// "count": 1
// },
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 2
// }
// ]
// },
// {
// "org_id": "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
// "name": "",
// "count": 0,
// "child": [
// {
// "name": "",
// "count": 0
// },
// {
// "name": "",
// "count": 0
// }
// ]
// }
// ]
}, },
handelClickMyPei(item) { handelClickMyPei(item) {
this.handleClickItem(item); this.handleClickItem(item);

Loading…
Cancel
Save