|
|
@ -3,19 +3,19 @@ |
|
|
|
<div class="visualizing"> |
|
|
|
<div class="visualizing-item"> |
|
|
|
<div> |
|
|
|
<data-title title="低保类别统计" /> |
|
|
|
<data-title title="低保类别统计"/> |
|
|
|
</div> |
|
|
|
<div id="dbryChart1" style="height: 380px"></div> |
|
|
|
</div> |
|
|
|
<div class="visualizing-item"> |
|
|
|
<div> |
|
|
|
<data-title title="低保显示原因统计" /> |
|
|
|
<data-title title="低保显示原因统计"/> |
|
|
|
</div> |
|
|
|
<div id="dbryChart2" style="height: 380px"></div> |
|
|
|
</div> |
|
|
|
<div class="visualizing-item"> |
|
|
|
<div> |
|
|
|
<data-title title="低保享受服务情况统计" /> |
|
|
|
<data-title title="低保享受服务情况统计"/> |
|
|
|
</div> |
|
|
|
<div id="resiServiceChart" style="height: 400px"></div> |
|
|
|
</div> |
|
|
@ -23,13 +23,13 @@ |
|
|
|
<div class="visualizing"> |
|
|
|
<div class="visualizing-left"> |
|
|
|
<div> |
|
|
|
<data-title title="温暖找人统计" /> |
|
|
|
<data-title title="温暖找人统计"/> |
|
|
|
</div> |
|
|
|
<div id="dbryChart3" style="height: 380px"></div> |
|
|
|
</div> |
|
|
|
<div class="visualizing-right"> |
|
|
|
<div> |
|
|
|
<data-title title="服务找人统计" /> |
|
|
|
<data-title title="服务找人统计"/> |
|
|
|
</div> |
|
|
|
<div id="dbryChart4" style="height: 380px"></div> |
|
|
|
</div> |
|
|
@ -40,6 +40,7 @@ |
|
|
|
<script> |
|
|
|
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue"; |
|
|
|
import * as echarts from "echarts"; |
|
|
|
import {color, legend, series, title} from "@/views/dataBoard/renfang/visualizing/components/pie_config"; |
|
|
|
|
|
|
|
function dataFormatter(arr) { |
|
|
|
return arr.map((item) => { |
|
|
@ -49,6 +50,7 @@ function dataFormatter(arr) { |
|
|
|
}; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "dibaorenyuan", |
|
|
|
props: { |
|
|
@ -79,168 +81,73 @@ export default { |
|
|
|
methods: { |
|
|
|
getData() { |
|
|
|
this.$http |
|
|
|
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=0") |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dbryData1 = dataFormatter(res.data); |
|
|
|
this.dbryDataCharts1(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=0") |
|
|
|
.then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dbryData1 = dataFormatter(res.data); |
|
|
|
this.dbryDataCharts1(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}); |
|
|
|
this.$http |
|
|
|
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=1") |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dbryData2 = dataFormatter(res.data); |
|
|
|
this.dbryDataCharts2(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=1") |
|
|
|
.then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dbryData2 = dataFormatter(res.data); |
|
|
|
this.dbryDataCharts2(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}); |
|
|
|
this.$http |
|
|
|
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=2") |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dbryData3 = dataFormatter(res.data); |
|
|
|
this.dbryDataCharts3(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=2") |
|
|
|
.then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dbryData3 = dataFormatter(res.data); |
|
|
|
this.dbryDataCharts3(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}); |
|
|
|
this.$http |
|
|
|
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=3") |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dbryData4 = dataFormatter(res.data); |
|
|
|
this.dbryDataCharts4(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=3") |
|
|
|
.then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.dbryData4 = dataFormatter(res.data); |
|
|
|
this.dbryDataCharts4(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}); |
|
|
|
this.$http |
|
|
|
.get("/actual/base/peopleRoomOverview/findPeoplePie/SUBSISTENCE_ALLOWANCE_FLAG") |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.resiService = dataFormatter(res.data); |
|
|
|
this.initResiServiceCharts(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
.get("/actual/base/peopleRoomOverview/findPeoplePie/SUBSISTENCE_ALLOWANCE_FLAG") |
|
|
|
.then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.resiService = dataFormatter(res.data); |
|
|
|
this.initResiServiceCharts(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}); |
|
|
|
}, |
|
|
|
dbryDataCharts1() { |
|
|
|
let div = document.getElementById("dbryChart1"); |
|
|
|
this.myChart1 = echarts.init(div); |
|
|
|
const option = { |
|
|
|
color: [ |
|
|
|
"#15a7ed", |
|
|
|
"#22b998", |
|
|
|
"#5f6ff4", |
|
|
|
"#a66eeb", |
|
|
|
"#faa834", |
|
|
|
"#fd6200", |
|
|
|
"#fb3905", |
|
|
|
], |
|
|
|
|
|
|
|
tooltip: { |
|
|
|
show: true, |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
orient: "vertical", |
|
|
|
top: 20, |
|
|
|
left: 10, |
|
|
|
icon: "rect", |
|
|
|
itemHeight: 14, |
|
|
|
itemWidth: 14, |
|
|
|
textStyle: { |
|
|
|
color: "#ffffff", |
|
|
|
rich: { |
|
|
|
name: { |
|
|
|
width: 90, |
|
|
|
fontSize: 12, |
|
|
|
color: "#dddee7", |
|
|
|
}, |
|
|
|
value: { |
|
|
|
width: 30, |
|
|
|
align: "right", |
|
|
|
fontSize: 18, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.dbryData1, |
|
|
|
tooltip: { |
|
|
|
show: true, |
|
|
|
}, |
|
|
|
formatter: (name) => { |
|
|
|
if (this.dbryData1.length) { |
|
|
|
const item = this.dbryData1.filter( |
|
|
|
(item) => item.name === name |
|
|
|
)[0]; |
|
|
|
return `{name|${echarts.format.truncateText( |
|
|
|
name, |
|
|
|
100, |
|
|
|
"14px Microsoft Yahei", |
|
|
|
"…" |
|
|
|
)}}{value| ${item.value}}`; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
toolbox: { |
|
|
|
show: false, |
|
|
|
feature: { |
|
|
|
mark: { show: true }, |
|
|
|
dataView: { show: true, readOnly: false }, |
|
|
|
restore: { show: true }, |
|
|
|
saveAsImage: { show: true }, |
|
|
|
}, |
|
|
|
}, |
|
|
|
title: { |
|
|
|
show: !this.dbryData1 || this.dbryData1.length == 0, // 是否要展示“暂无数据”矢量图 |
|
|
|
text: " {a|}", // 写入占位符a,以便后续填充内容 |
|
|
|
x: "center", |
|
|
|
y: "center", |
|
|
|
subtext: "暂无数据", // 子标题 |
|
|
|
itemGap: -10, // 设置主副标题间隔 |
|
|
|
textStyle: { |
|
|
|
rich: { |
|
|
|
a: { |
|
|
|
height: 126, // 设置图片高度 |
|
|
|
width: 268, // 设置图片宽度 |
|
|
|
backgroundColor: { |
|
|
|
// 引入图片,作为背景图,填写相对路径 |
|
|
|
image: require("@/assets/images/overview/zanwu.png"), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
subtextStyle: { |
|
|
|
// 配置副标题的文字样式 |
|
|
|
fontSize: 12, |
|
|
|
color: "#ffffff", |
|
|
|
}, |
|
|
|
trigger: "item", |
|
|
|
}, |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
type: "pie", |
|
|
|
radius: this.dbryData1 && this.dbryData1.length > 0?[30, 130]:[0,0], |
|
|
|
center: ["50%", "50%"], |
|
|
|
roseType: "area", |
|
|
|
itemStyle: { |
|
|
|
borderRadius: 0, |
|
|
|
}, |
|
|
|
top: 20, |
|
|
|
left: -40, |
|
|
|
label: { |
|
|
|
position: "inside", |
|
|
|
formatter: "{d}%", |
|
|
|
textStyle: { |
|
|
|
color: "#ffffff", |
|
|
|
fontSize: 12, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.dbryData1, |
|
|
|
}, |
|
|
|
], |
|
|
|
color, |
|
|
|
legend: legend(this.dbryData1), |
|
|
|
title: title(this.dbryData1), |
|
|
|
series: series(this.dbryData1) |
|
|
|
}; |
|
|
|
this.myChart1.setOption(option); |
|
|
|
this.myChart1.on("click", (e) => { |
|
|
@ -262,114 +169,13 @@ export default { |
|
|
|
let div = document.getElementById("dbryChart2"); |
|
|
|
this.myChart2 = echarts.init(div); |
|
|
|
const option = { |
|
|
|
color: [ |
|
|
|
"#15a7ed", |
|
|
|
"#22b998", |
|
|
|
"#5f6ff4", |
|
|
|
"#a66eeb", |
|
|
|
"#faa834", |
|
|
|
"#fd6200", |
|
|
|
"#fb3905", |
|
|
|
], |
|
|
|
tooltip: { |
|
|
|
show: true, |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
orient: "vertical", |
|
|
|
top: 20, |
|
|
|
left: 10, |
|
|
|
icon: "rect", |
|
|
|
itemHeight: 14, |
|
|
|
itemWidth: 14, |
|
|
|
textStyle: { |
|
|
|
color: "#ffffff", |
|
|
|
rich: { |
|
|
|
name: { |
|
|
|
width: 90, |
|
|
|
fontSize: 12, |
|
|
|
color: "#dddee7", |
|
|
|
}, |
|
|
|
value: { |
|
|
|
width: 30, |
|
|
|
align: "right", |
|
|
|
fontSize: 18, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.dbryData2, |
|
|
|
tooltip: { |
|
|
|
show: true, |
|
|
|
}, |
|
|
|
formatter: (name) => { |
|
|
|
if (this.dbryData2.length) { |
|
|
|
const item = this.dbryData2.filter( |
|
|
|
(item) => item.name === name |
|
|
|
)[0]; |
|
|
|
return `{name|${echarts.format.truncateText( |
|
|
|
name, |
|
|
|
100, |
|
|
|
"14px Microsoft Yahei", |
|
|
|
"…" |
|
|
|
)}}{value| ${item.value}}`; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
toolbox: { |
|
|
|
show: false, |
|
|
|
feature: { |
|
|
|
mark: { show: true }, |
|
|
|
dataView: { show: true, readOnly: false }, |
|
|
|
restore: { show: true }, |
|
|
|
saveAsImage: { show: true }, |
|
|
|
}, |
|
|
|
}, |
|
|
|
title: { |
|
|
|
show: !this.dbryData2 || this.dbryData2.length == 0, // 是否要展示“暂无数据”矢量图 |
|
|
|
text: " {a|}", // 写入占位符a,以便后续填充内容 |
|
|
|
x: "center", |
|
|
|
y: "center", |
|
|
|
subtext: "暂无数据", // 子标题 |
|
|
|
itemGap: -10, // 设置主副标题间隔 |
|
|
|
textStyle: { |
|
|
|
rich: { |
|
|
|
a: { |
|
|
|
height: 126, // 设置图片高度 |
|
|
|
width: 268, // 设置图片宽度 |
|
|
|
backgroundColor: { |
|
|
|
// 引入图片,作为背景图,填写相对路径 |
|
|
|
image: require("@/assets/images/overview/zanwu.png"), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
subtextStyle: { |
|
|
|
// 配置副标题的文字样式 |
|
|
|
fontSize: 12, |
|
|
|
color: "#ffffff", |
|
|
|
}, |
|
|
|
trigger: "item", |
|
|
|
}, |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
type: "pie", |
|
|
|
radius: this.dbryData2 && this.dbryData2.length > 0?[30, 130]:[0,0], |
|
|
|
center: ["50%", "50%"], |
|
|
|
roseType: "area", |
|
|
|
itemStyle: { |
|
|
|
borderRadius: 0, |
|
|
|
}, |
|
|
|
top: 20, |
|
|
|
left: -40, |
|
|
|
label: { |
|
|
|
position: "inside", |
|
|
|
formatter: "{d}%", |
|
|
|
textStyle: { |
|
|
|
color: "#ffffff", |
|
|
|
fontSize: 12, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.dbryData2, |
|
|
|
}, |
|
|
|
], |
|
|
|
color, |
|
|
|
legend: legend(this.dbryData2), |
|
|
|
title: title(this.dbryData2), |
|
|
|
series: series(this.dbryData2) |
|
|
|
}; |
|
|
|
this.myChart2.setOption(option); |
|
|
|
this.myChart2.on("click", (a, b) => { |
|
|
@ -391,116 +197,13 @@ export default { |
|
|
|
let div = document.getElementById("dbryChart3"); |
|
|
|
this.myChart3 = echarts.init(div); |
|
|
|
const option = { |
|
|
|
color: [ |
|
|
|
"#15a7ed", |
|
|
|
"#22b998", |
|
|
|
"#5f6ff4", |
|
|
|
"#a66eeb", |
|
|
|
"#faa834", |
|
|
|
"#fd6200", |
|
|
|
"#fb3905", |
|
|
|
], |
|
|
|
tooltip: { |
|
|
|
show: true, |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
type: "scroll", |
|
|
|
orient: "vertical", |
|
|
|
top: 20, |
|
|
|
left: 10, |
|
|
|
icon: "rect", |
|
|
|
itemHeight: 14, |
|
|
|
itemWidth: 14, |
|
|
|
textStyle: { |
|
|
|
width: 120, |
|
|
|
color: "#ffffff", |
|
|
|
rich: { |
|
|
|
name: { |
|
|
|
width: 90, |
|
|
|
fontSize: 12, |
|
|
|
color: "#dddee7", |
|
|
|
}, |
|
|
|
value: { |
|
|
|
width: 30, |
|
|
|
align: "right", |
|
|
|
fontSize: 18, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.dbryData3, |
|
|
|
tooltip: { |
|
|
|
show: true, |
|
|
|
}, |
|
|
|
formatter: (name) => { |
|
|
|
if (this.dbryData3.length) { |
|
|
|
const item = this.dbryData3.filter( |
|
|
|
(item) => item.name === name |
|
|
|
)[0]; |
|
|
|
return `{name|${echarts.format.truncateText( |
|
|
|
name, |
|
|
|
100, |
|
|
|
"14px Microsoft Yahei", |
|
|
|
"…" |
|
|
|
)}}{value| ${item.value}}`; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
toolbox: { |
|
|
|
show: false, |
|
|
|
feature: { |
|
|
|
mark: { show: true }, |
|
|
|
dataView: { show: true, readOnly: false }, |
|
|
|
restore: { show: true }, |
|
|
|
saveAsImage: { show: true }, |
|
|
|
}, |
|
|
|
trigger: "item", |
|
|
|
}, |
|
|
|
title: { |
|
|
|
show: !this.dbryData3 || this.dbryData3.length == 0, // 是否要展示“暂无数据”矢量图 |
|
|
|
text: " {a|}", // 写入占位符a,以便后续填充内容 |
|
|
|
x: "center", |
|
|
|
y: "center", |
|
|
|
subtext: "暂无数据", // 子标题 |
|
|
|
itemGap: -10, // 设置主副标题间隔 |
|
|
|
textStyle: { |
|
|
|
rich: { |
|
|
|
a: { |
|
|
|
height: 126, // 设置图片高度 |
|
|
|
width: 268, // 设置图片宽度 |
|
|
|
backgroundColor: { |
|
|
|
// 引入图片,作为背景图,填写相对路径 |
|
|
|
image: require("@/assets/images/overview/zanwu.png"), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
subtextStyle: { |
|
|
|
// 配置副标题的文字样式 |
|
|
|
fontSize: 12, |
|
|
|
color: "#ffffff", |
|
|
|
}, |
|
|
|
}, |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
type: "pie", |
|
|
|
radius: this.dbryData3 && this.dbryData3.length > 0?[30, 130]:[0,0], |
|
|
|
center: ["50%", "50%"], |
|
|
|
roseType: "area", |
|
|
|
itemStyle: { |
|
|
|
borderRadius: 0, |
|
|
|
}, |
|
|
|
top: 20, |
|
|
|
left: -40, |
|
|
|
label: { |
|
|
|
position: "inside", |
|
|
|
formatter: "{d}%", |
|
|
|
textStyle: { |
|
|
|
color: "#ffffff", |
|
|
|
fontSize: 12, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.dbryData3, |
|
|
|
}, |
|
|
|
], |
|
|
|
color, |
|
|
|
legend: legend(this.dbryData3), |
|
|
|
title: title(this.dbryData3), |
|
|
|
series: series(this.dbryData3) |
|
|
|
}; |
|
|
|
this.myChart3.setOption(option); |
|
|
|
this.myChart3.on("click", (a, b) => { |
|
|
@ -521,115 +224,13 @@ export default { |
|
|
|
let div = document.getElementById("dbryChart4"); |
|
|
|
this.myChart4 = echarts.init(div); |
|
|
|
const option = { |
|
|
|
color: [ |
|
|
|
"#15a7ed", |
|
|
|
"#22b998", |
|
|
|
"#5f6ff4", |
|
|
|
"#a66eeb", |
|
|
|
"#faa834", |
|
|
|
"#fd6200", |
|
|
|
"#fb3905", |
|
|
|
], |
|
|
|
tooltip: { |
|
|
|
show: true, |
|
|
|
}, |
|
|
|
legend: { |
|
|
|
type: "scroll", |
|
|
|
orient: "vertical", |
|
|
|
top: 20, |
|
|
|
left: 10, |
|
|
|
icon: "rect", |
|
|
|
itemHeight: 14, |
|
|
|
itemWidth: 14, |
|
|
|
textStyle: { |
|
|
|
color: "#ffffff", |
|
|
|
rich: { |
|
|
|
name: { |
|
|
|
width: 90, |
|
|
|
fontSize: 12, |
|
|
|
color: "#dddee7", |
|
|
|
}, |
|
|
|
value: { |
|
|
|
width: 30, |
|
|
|
align: "right", |
|
|
|
fontSize: 18, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.dbryData4, |
|
|
|
tooltip: { |
|
|
|
show: true, |
|
|
|
}, |
|
|
|
formatter: (name) => { |
|
|
|
if (this.dbryData4.length) { |
|
|
|
const item = this.dbryData4.filter( |
|
|
|
(item) => item.name === name |
|
|
|
)[0]; |
|
|
|
return `{name|${echarts.format.truncateText( |
|
|
|
name, |
|
|
|
100, |
|
|
|
"14px Microsoft Yahei", |
|
|
|
"…" |
|
|
|
)}}{value| ${item.value}}`; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
toolbox: { |
|
|
|
show: false, |
|
|
|
feature: { |
|
|
|
mark: { show: true }, |
|
|
|
dataView: { show: true, readOnly: false }, |
|
|
|
restore: { show: true }, |
|
|
|
saveAsImage: { show: true }, |
|
|
|
}, |
|
|
|
}, |
|
|
|
title: { |
|
|
|
show: !this.dbryData4 || this.dbryData4.length == 0, // 是否要展示“暂无数据”矢量图 |
|
|
|
text: " {a|}", // 写入占位符a,以便后续填充内容 |
|
|
|
x: "center", |
|
|
|
y: "center", |
|
|
|
subtext: "暂无数据", // 子标题 |
|
|
|
itemGap: -10, // 设置主副标题间隔 |
|
|
|
textStyle: { |
|
|
|
rich: { |
|
|
|
a: { |
|
|
|
height: 126, // 设置图片高度 |
|
|
|
width: 268, // 设置图片宽度 |
|
|
|
backgroundColor: { |
|
|
|
// 引入图片,作为背景图,填写相对路径 |
|
|
|
image: require("@/assets/images/overview/zanwu.png"), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
subtextStyle: { |
|
|
|
// 配置副标题的文字样式 |
|
|
|
fontSize: 12, |
|
|
|
color: "#ffffff", |
|
|
|
}, |
|
|
|
trigger: "item", |
|
|
|
}, |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
type: "pie", |
|
|
|
radius: this.dbryData4 && this.dbryData4.length > 0?[30, 130]:[0,0], |
|
|
|
center: ["50%", "50%"], |
|
|
|
roseType: "area", |
|
|
|
itemStyle: { |
|
|
|
borderRadius: 0, |
|
|
|
}, |
|
|
|
top: 20, |
|
|
|
left: -40, |
|
|
|
label: { |
|
|
|
position: "inside", |
|
|
|
formatter: "{d}%", |
|
|
|
textStyle: { |
|
|
|
color: "#ffffff", |
|
|
|
fontSize: 12, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.dbryData4, |
|
|
|
}, |
|
|
|
], |
|
|
|
color, |
|
|
|
legend: legend(this.dbryData4), |
|
|
|
title: title(this.dbryData4), |
|
|
|
series: series(this.dbryData4) |
|
|
|
}; |
|
|
|
this.myChart4.setOption(option); |
|
|
|
this.myChart4.on("click", (a, b) => { |
|
|
@ -651,102 +252,13 @@ export default { |
|
|
|
let div = document.getElementById("resiServiceChart"); |
|
|
|
this.resiChart = echarts.init(div); |
|
|
|
const option = { |
|
|
|
color: [ |
|
|
|
"#15a7ed", |
|
|
|
"#22b998", |
|
|
|
"#5f6ff4", |
|
|
|
"#a66eeb", |
|
|
|
"#faa834", |
|
|
|
"#fd6200", |
|
|
|
"#fb3905", |
|
|
|
], |
|
|
|
legend: { |
|
|
|
orient: "vertical", |
|
|
|
top: 20, |
|
|
|
left: 10, |
|
|
|
icon: "rect", |
|
|
|
itemHeight: 14, |
|
|
|
itemWidth: 14, |
|
|
|
textStyle: { |
|
|
|
color: "#ffffff", |
|
|
|
rich: { |
|
|
|
name: { |
|
|
|
width: 90, |
|
|
|
fontSize: 12, |
|
|
|
color: "#dddee7", |
|
|
|
}, |
|
|
|
value: { |
|
|
|
width: 30, |
|
|
|
align: "right", |
|
|
|
fontSize: 18, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.resiService, |
|
|
|
formatter: (name) => { |
|
|
|
if (this.resiService.length) { |
|
|
|
const item = this.resiService.filter((item) => item.name === name)[0]; |
|
|
|
return `{name|${name}}{value| ${item.value}}`; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
toolbox: { |
|
|
|
show: false, |
|
|
|
feature: { |
|
|
|
mark: { show: true }, |
|
|
|
dataView: { show: true, readOnly: false }, |
|
|
|
restore: { show: true }, |
|
|
|
saveAsImage: { show: true }, |
|
|
|
}, |
|
|
|
}, |
|
|
|
title: { |
|
|
|
show: !this.resiService || this.resiService.length == 0, // 是否要展示“暂无数据”矢量图 |
|
|
|
text: " {a|}", // 写入占位符a,以便后续填充内容 |
|
|
|
x: "center", |
|
|
|
y: "center", |
|
|
|
subtext: "暂无数据", // 子标题 |
|
|
|
itemGap: -10, // 设置主副标题间隔 |
|
|
|
textStyle: { |
|
|
|
rich: { |
|
|
|
a: { |
|
|
|
height: 128, // 设置图片高度 |
|
|
|
width: 268, // 设置图片宽度 |
|
|
|
backgroundColor: { |
|
|
|
// 引入图片,作为背景图,填写相对路径 |
|
|
|
image: require("@/assets/images/overview/zanwu.png"), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
subtextStyle: { |
|
|
|
// 配置副标题的文字样式 |
|
|
|
fontSize: 12, |
|
|
|
color: "#ffffff", |
|
|
|
}, |
|
|
|
tooltip: { |
|
|
|
trigger: "item", |
|
|
|
}, |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
type: "pie", |
|
|
|
radius: |
|
|
|
this.resiService && this.resiService.length > 0 ? [30, 130] : [0, 0], |
|
|
|
center: ["50%", "50%"], |
|
|
|
roseType: "area", |
|
|
|
itemStyle: { |
|
|
|
borderRadius: 0, |
|
|
|
}, |
|
|
|
top: 20, |
|
|
|
left: -40, |
|
|
|
label: { |
|
|
|
position: "inside", |
|
|
|
formatter: "{d}%", |
|
|
|
textStyle: { |
|
|
|
color: "#ffffff", |
|
|
|
fontSize: 12, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: this.resiService, |
|
|
|
}, |
|
|
|
], |
|
|
|
color, |
|
|
|
legend: legend(this.resiService), |
|
|
|
title: title(this.resiService), |
|
|
|
series: series(this.resiService) |
|
|
|
}; |
|
|
|
this.resiChart.setOption(option); |
|
|
|
this.resiChart.on("click", (e) => { |
|
|
@ -769,15 +281,16 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style |
|
|
|
lang="scss" |
|
|
|
src="@/assets/scss/dataBoard/renfang/index.scss" |
|
|
|
scoped |
|
|
|
lang="scss" |
|
|
|
scoped |
|
|
|
src="@/assets/scss/dataBoard/renfang/index.scss" |
|
|
|
></style> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
.dibaorenyuan { |
|
|
|
padding: 0px 240px; |
|
|
|
padding: 0px 130px; |
|
|
|
} |
|
|
|
|
|
|
|
#dbryChart3 { |
|
|
|
.echarts-legend { |
|
|
|
white-space: normal; |
|
|
@ -786,8 +299,8 @@ export default { |
|
|
|
|
|
|
|
:v-deep #dbryChart3 { |
|
|
|
.echarts-legend span { |
|
|
|
padding: 5px 0; |
|
|
|
display: block; |
|
|
|
padding: 5px 0; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|