Commit 2cce6acc authored by 田涛's avatar 田涛

bug1147/1148巡检统计饼图样式修复

parent af85eb03
...@@ -49,8 +49,9 @@ ...@@ -49,8 +49,9 @@
position: absolute; position: absolute;
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
top: 40%; top: 50%;
right: 40%; left: 50%;
transform: translate(-50%, -50%);
} }
} }
......
...@@ -77,14 +77,17 @@ class PointSearch extends Component { ...@@ -77,14 +77,17 @@ class PointSearch extends Component {
onDeptChange = (value) => { onDeptChange = (value) => {
let { searchParam } = this.state; let { searchParam } = this.state;
searchParam['userId'] = undefined; if (searchParam['deptId'] !== value) {
Object.assign(searchParam,{ pageNumber: 0,pageSize: 10 }); searchParam['deptId'] = value;
this.setState({ searchParam }); searchParam['userId'] = undefined;
if (value === undefined){ Object.assign(searchParam,{ pageNumber: 0, pageSize: 10 });
this.setState({ userData: [] }); this.setState({ searchParam });
this.props.setSearchParam(searchParam); if (value === undefined){
} else { this.setState({ userData: [] });
this.queryUserByDept(value); this.props.setSearchParam(searchParam);
} else {
this.queryUserByDept(value);
}
} }
} }
......
...@@ -54,35 +54,19 @@ class PointStatistics extends Component { ...@@ -54,35 +54,19 @@ class PointStatistics extends Component {
let {colors, data} = this.getColor(dataList); let {colors, data} = this.getColor(dataList);
return { return {
color: colors, color: colors,
tooltip: {
trigger: 'item',
formatter: "<div style='color: white; font-size: 16px;' >{b}:<br />数量({c});比例({d}%)</div>"
},
series: [ series: [
{ {
name: '巡检点统计', name: '巡检点统计',
// silent: true,
type: 'pie', type: 'pie',
radius: ['45%', '65%'], radius: ['45%', '65%'],
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
show: false, show: false,
// position: 'center',
// formatter: function(params) {
// let dataIndex = params.dataIndex;
// if (parseInt(dataIndex) === 0) {
// return '{a|' + total + '}' + '\r\n' + '{b|' + '总数' + '}';
// } else {
// return '';
// }
// },
// rich: {
// a: {
// fontSize: '28',
// color: 'black'
// },
// b: {
// fontSize: '16',
// color: 'black'
// }
// }
}, },
labelLine: { labelLine: {
show: false show: false
...@@ -92,15 +76,6 @@ class PointStatistics extends Component { ...@@ -92,15 +76,6 @@ class PointStatistics extends Component {
labelLine: { labelLine: {
show: true, show: true,
length:90 length:90
},
label: {
show: true,
position: 'outer',
formatter: '{b}\n {c}({d}%)',
textStyle: {
fontSize: '25',
fontWeight: 'bold'
}
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment