|
|
@ -16,6 +16,8 @@ export default {
|
|
|
|
pageSize: 10,
|
|
|
|
pageSize: 10,
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
//总数
|
|
|
|
|
|
|
|
numTotal: 0,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
@ -27,13 +29,15 @@ export default {
|
|
|
|
getData() {
|
|
|
|
getData() {
|
|
|
|
this.load1 = true;
|
|
|
|
this.load1 = true;
|
|
|
|
workStatistics(this.beforeParams).then((res) => {
|
|
|
|
workStatistics(this.beforeParams).then((res) => {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
res.data.list.forEach((value1) => {
|
|
|
|
res.data.list.forEach((value1) => {
|
|
|
|
this.arr1.push({
|
|
|
|
this.arr1.push({
|
|
|
|
value: value1.percentageCompleted + value1.percentageNonCompleted,
|
|
|
|
value: value1.keyCompleted + value1.nonKeyCompleted,
|
|
|
|
name: value1.deptName,
|
|
|
|
name: value1.deptName,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
this.numTotal += value1.keyCompleted + value1.nonKeyCompleted;
|
|
|
|
|
|
|
|
console.log(this.arr1);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
console.log(this.arr1);
|
|
|
|
|
|
|
|
this.initChart();
|
|
|
|
this.initChart();
|
|
|
|
this.load1 = false;
|
|
|
|
this.load1 = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -77,8 +81,11 @@ export default {
|
|
|
|
itemWidth: 10,
|
|
|
|
itemWidth: 10,
|
|
|
|
itemHeight: 10,
|
|
|
|
itemHeight: 10,
|
|
|
|
icon: "circle",
|
|
|
|
icon: "circle",
|
|
|
|
formatter: function (name) {
|
|
|
|
formatter(name) {
|
|
|
|
return `{a|${name}}{b|15%}`;
|
|
|
|
// const arrA = this.arr1.filter((value, index) => {
|
|
|
|
|
|
|
|
// return value.name == name;
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
return `{a|${name}}{b|1%}`;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
rich: {
|
|
|
|
rich: {
|
|
|
@ -107,9 +114,8 @@ export default {
|
|
|
|
// { value: 10, name: "吴江区" },
|
|
|
|
// { value: 10, name: "吴江区" },
|
|
|
|
// { value: 5, name: "高新区" },
|
|
|
|
// { value: 5, name: "高新区" },
|
|
|
|
// ],
|
|
|
|
// ],
|
|
|
|
data:this.arr1
|
|
|
|
data: this.arr1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
series: [
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: "pie",
|
|
|
|
type: "pie",
|
|
|
@ -130,25 +136,27 @@ export default {
|
|
|
|
labelLine: {
|
|
|
|
labelLine: {
|
|
|
|
show: false,
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: [
|
|
|
|
// data: [
|
|
|
|
{ value: 15, name: "张家港市" },
|
|
|
|
// { value: 15, name: "张家港市" },
|
|
|
|
{ value: 10, name: "吴中区" },
|
|
|
|
// { value: 10, name: "吴中区" },
|
|
|
|
{ value: 8, name: "常熟市" },
|
|
|
|
// { value: 8, name: "常熟市" },
|
|
|
|
{ value: 10, name: "姑苏区" },
|
|
|
|
// { value: 10, name: "姑苏区" },
|
|
|
|
{ value: 18, name: "太仓市" },
|
|
|
|
// { value: 18, name: "太仓市" },
|
|
|
|
{ value: 6, name: "相城区" },
|
|
|
|
// { value: 6, name: "相城区" },
|
|
|
|
{ value: 10, name: "昆山市" },
|
|
|
|
// { value: 10, name: "昆山市" },
|
|
|
|
{ value: 4, name: "工业园区" },
|
|
|
|
// { value: 4, name: "工业园区" },
|
|
|
|
{ value: 10, name: "吴江区" },
|
|
|
|
// { value: 10, name: "吴江区" },
|
|
|
|
{ value: 5, name: "高新区" },
|
|
|
|
// { value: 5, name: "高新区" },
|
|
|
|
],
|
|
|
|
// ],
|
|
|
|
|
|
|
|
data: this.arr1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: "pie",
|
|
|
|
type: "pie",
|
|
|
|
center: ["28%", "55%"], // 饼图的中心位置
|
|
|
|
center: ["28%", "55%"], // 饼图的中心位置
|
|
|
|
radius: "32%",
|
|
|
|
radius: "32%",
|
|
|
|
|
|
|
|
color:'rgb(246,246,249)',
|
|
|
|
avoidLabelOverlap: false,
|
|
|
|
avoidLabelOverlap: false,
|
|
|
|
color: "rgb(247,247,249)",
|
|
|
|
|
|
|
|
tooltip: {
|
|
|
|
tooltip: {
|
|
|
|
show: false,
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -163,6 +171,7 @@ export default {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
position: "center",
|
|
|
|
position: "center",
|
|
|
|
formatter: function (params) {
|
|
|
|
formatter: function (params) {
|
|
|
|
|
|
|
|
console.log(params);
|
|
|
|
return `{a|${params.data.pt}%}\n{b|${params.data.name}}`;
|
|
|
|
return `{a|${params.data.pt}%}\n{b|${params.data.name}}`;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rich: {
|
|
|
|
rich: {
|
|
|
@ -182,9 +191,10 @@ export default {
|
|
|
|
labelLine: {
|
|
|
|
labelLine: {
|
|
|
|
show: false,
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: [{ value: 1, name: "苏州完成率", pt: 98 }],
|
|
|
|
data: [{ value: 1, name: "苏州完成率", pt: 100 }],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
option && myChart.setOption(option);
|
|
|
|
option && myChart.setOption(option);
|
|
|
|
},
|
|
|
|
},
|
|
|
|