Commit 77f6acb3 by liuguorong93

技术人员序列统计 修改

parent 518a3926
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
value: res.data.workDogClass[item], value: res.data.workDogClass[item],
}; };
} }
if (item == "其他工作犬") { if (item == "普通工作犬") {
this.qzCount.Grade[3] = { this.qzCount.Grade[3] = {
name: item, name: item,
value: res.data.workDogClass[item], value: res.data.workDogClass[item],
......
...@@ -8,16 +8,6 @@ ...@@ -8,16 +8,6 @@
class="dogPh_co_ov" class="dogPh_co_ov"
id="dogPhId" id="dogPhId"
> >
<!-- <div
class="dogPh_co_ov_for"
v-for="(item, index) in dogRankingList"
:key="index"
>
<div class="dogPh_co_ov_for_name">{{ item.name }}</div>
<div class="dogPh_co_ov_for_value">
<span class="dogPh_co_ov_for_value_count">{{ item.count }}</span><span class="dogPh_co_ov_for_value_tou"></span>
</div>
</div> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -28,23 +18,34 @@ import { postRequest } from "@/api/dogView.js"; ...@@ -28,23 +18,34 @@ import { postRequest } from "@/api/dogView.js";
export default { export default {
data() { data() {
return { return {
dogRankingList: [], seriesDatas: [],
}; };
}, },
mounted() { mounted() {
this.setEcharts(); this.getData();
// postRequest("/policeDogScreen/oneworkDogqz").then((res) => {
// if (res.data) {
// for (let item in res.data.一级工作犬犬种排行) {
// this.dogRankingList.push({
// name: item,
// count: res.data.一级工作犬犬种排行[item],
// });
// }
// }
// });
}, },
methods: { methods: {
getData() {
this.seriesDatas = [];
postRequest("/policeDogScreen/selectJwjsxlFlCount").then((res) => {
if (
res.code === 200 &&
res.success &&
res.data &&
res.data.jwjsxlFl &&
res.data.jwjsxlFl.length
) {
let datas = res.data.jwjsxlFl;
datas.forEach((item) => {
this.seriesDatas.push({
value: item.counts,
name: item.name,
});
});
this.setEcharts();
}
});
},
setEcharts() { setEcharts() {
let myChart = this.$echarts.init(document.getElementById("dogPhId")); let myChart = this.$echarts.init(document.getElementById("dogPhId"));
const colorList = ["#4D88FE", "#50CCCB", "#FFBF3C"]; const colorList = ["#4D88FE", "#50CCCB", "#FFBF3C"];
...@@ -66,6 +67,9 @@ export default { ...@@ -66,6 +67,9 @@ export default {
type: "pie", type: "pie",
top: -30, top: -30,
radius: "60%", radius: "60%",
label: {
show: false,
},
itemStyle: { itemStyle: {
normal: { normal: {
borderColor: "#fff", borderColor: "#fff",
...@@ -75,11 +79,7 @@ export default { ...@@ -75,11 +79,7 @@ export default {
}, },
}, },
}, },
data: [ data: this.seriesDatas,
{ value: 1048, name: "警务技术" },
{ value: 735, name: "执法勤务" },
{ value: 580, name: "综合管理" },
],
}, },
], ],
}; };
......
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