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

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

parent af85eb03
......@@ -49,8 +49,9 @@
position: absolute;
text-align: center;
font-size: 20px;
top: 40%;
right: 40%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
......
......@@ -77,14 +77,17 @@ class PointSearch extends Component {
onDeptChange = (value) => {
let { searchParam } = this.state;
searchParam['userId'] = undefined;
Object.assign(searchParam,{ pageNumber: 0,pageSize: 10 });
this.setState({ searchParam });
if (value === undefined){
this.setState({ userData: [] });
this.props.setSearchParam(searchParam);
} else {
this.queryUserByDept(value);
if (searchParam['deptId'] !== value) {
searchParam['deptId'] = value;
searchParam['userId'] = undefined;
Object.assign(searchParam,{ pageNumber: 0, pageSize: 10 });
this.setState({ searchParam });
if (value === undefined){
this.setState({ userData: [] });
this.props.setSearchParam(searchParam);
} else {
this.queryUserByDept(value);
}
}
}
......
......@@ -54,35 +54,19 @@ class PointStatistics extends Component {
let {colors, data} = this.getColor(dataList);
return {
color: colors,
tooltip: {
trigger: 'item',
formatter: "<div style='color: white; font-size: 16px;' >{b}:<br />数量({c});比例({d}%)</div>"
},
series: [
{
name: '巡检点统计',
// silent: true,
type: 'pie',
radius: ['45%', '65%'],
itemStyle: {
normal: {
label: {
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: {
show: false
......@@ -92,15 +76,6 @@ class PointStatistics extends Component {
labelLine: {
show: true,
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