|
|
|
@ -163,6 +163,17 @@ import leftCard from "./components/leftCard.vue";
|
|
|
|
|
import rightCard from "./components/rightCard.vue";
|
|
|
|
|
import totalCard from "./components/totalCard.vue";
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
enterpriseComprehensiveRisk,
|
|
|
|
|
tendencyChart,
|
|
|
|
|
ventureBusiness,
|
|
|
|
|
riskEarlyWarning,
|
|
|
|
|
variationTrend,
|
|
|
|
|
growthTrend,
|
|
|
|
|
} from "@/api/enterpriseRiskIndex/synthetical/index.js";
|
|
|
|
|
|
|
|
|
|
import { groupByReduce } from "@/loveflow/util.js";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
barOne,
|
|
|
|
@ -244,51 +255,18 @@ export default {
|
|
|
|
|
blObj: {
|
|
|
|
|
height: 0,
|
|
|
|
|
color: ["#2B82F3", "#FFD16A", "#48EEBD", "#FF745A"],
|
|
|
|
|
data: [
|
|
|
|
|
{ value: 1048, name: "重点人员预警" },
|
|
|
|
|
{ value: 735, name: "企业整改预警" },
|
|
|
|
|
{ value: 580, name: "流动人员预警" },
|
|
|
|
|
{ value: 484, name: "其他" },
|
|
|
|
|
],
|
|
|
|
|
data: [],
|
|
|
|
|
list: [],
|
|
|
|
|
name: "全区企业风险预警总量",
|
|
|
|
|
},
|
|
|
|
|
bmObj: {
|
|
|
|
|
gridTop: "25%",
|
|
|
|
|
legendTop: "12%",
|
|
|
|
|
gridLeft: "8%",
|
|
|
|
|
xData: [
|
|
|
|
|
"1月",
|
|
|
|
|
"2月",
|
|
|
|
|
"3月",
|
|
|
|
|
"4月",
|
|
|
|
|
"5月",
|
|
|
|
|
"6月",
|
|
|
|
|
"7月",
|
|
|
|
|
"8月",
|
|
|
|
|
"9月",
|
|
|
|
|
"10月",
|
|
|
|
|
"11月",
|
|
|
|
|
"12月",
|
|
|
|
|
],
|
|
|
|
|
yData: [
|
|
|
|
|
[8, 3, 1, 11, 9, 7, 8, 12, 5, 9, 12, 3],
|
|
|
|
|
[1, 7, 2, 9, 4, 10, 7, 3, 1, 11, 5, 8],
|
|
|
|
|
[4, 3, 1, 11, 9, 7, 8, 12, 5, 9, 6, 2],
|
|
|
|
|
[2, 11, 7, 8, 3, 11, 9, 11, 7, 1, 2, 1],
|
|
|
|
|
[3, 9, 1, 11, 11, 6, 9, 9, 4, 7, 8, 3],
|
|
|
|
|
[9, 6, 1, 11, 12, 8, 11, 6, 4, 6, 1, 7],
|
|
|
|
|
[5, 3, 11, 7, 3, 9, 1, 2, 8, 4, 1, 4],
|
|
|
|
|
],
|
|
|
|
|
xData: [],
|
|
|
|
|
yData: [],
|
|
|
|
|
name: "全区企业风险标签数量变化趋势",
|
|
|
|
|
legend: [
|
|
|
|
|
"澥浦镇",
|
|
|
|
|
"九龙湖镇",
|
|
|
|
|
"照宝山街道",
|
|
|
|
|
"蛟川街道",
|
|
|
|
|
"骆驼街道",
|
|
|
|
|
"贵驷街道",
|
|
|
|
|
"庄市街道",
|
|
|
|
|
],
|
|
|
|
|
legend: [],
|
|
|
|
|
color: [
|
|
|
|
|
["#09C8F5", "rgba(9,200,245,0.1)", "rgba(9,200,245,0.1)"],
|
|
|
|
|
["#48EEBD", "rgba(72,238,189,0.1)", "rgba(72,238,189,0.1)"],
|
|
|
|
@ -298,6 +276,7 @@ export default {
|
|
|
|
|
["#B276FF", "rgba(178,118,255,0.1)", "rgba(178,118,255,0.1)"],
|
|
|
|
|
["#FF6AEE", "rgba(255,106,238,0.1)", "rgba(255,106,238,0.1)"],
|
|
|
|
|
],
|
|
|
|
|
list: [],
|
|
|
|
|
},
|
|
|
|
|
trObj: {
|
|
|
|
|
color: [
|
|
|
|
@ -322,8 +301,47 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getData();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getData() {
|
|
|
|
|
enterpriseComprehensiveRisk().then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
let data = res.data || [];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
tendencyChart().then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
let data = res.data || [];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
ventureBusiness().then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
let data = res.data || [];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
riskEarlyWarning().then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
let data = res.data || [];
|
|
|
|
|
this.blObj.list = data;
|
|
|
|
|
this.blTime("day");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
variationTrend().then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
let data = res.data || [];
|
|
|
|
|
this.bmObj.list = data;
|
|
|
|
|
this.bmTime("day");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
growthTrend().then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
let data = res.data || [];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
tmTime(val) {
|
|
|
|
|
if (val == "day") {
|
|
|
|
|
this.leftData.value = 78;
|
|
|
|
@ -362,73 +380,64 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
blTime(val) {
|
|
|
|
|
if (this.blObj.list.length < 2) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log(val)
|
|
|
|
|
this.blObj.data = [];
|
|
|
|
|
let list = [];
|
|
|
|
|
if (val == "day") {
|
|
|
|
|
this.totalData.value = 7;
|
|
|
|
|
this.totalData.name = "今日企业风险项量";
|
|
|
|
|
list = this.blObj.list[0];
|
|
|
|
|
}
|
|
|
|
|
if (val == "month") {
|
|
|
|
|
this.totalData.value = 23;
|
|
|
|
|
this.totalData.name = "近三月企业风险项量";
|
|
|
|
|
list = this.blObj.list[1];
|
|
|
|
|
}
|
|
|
|
|
if (val == "year") {
|
|
|
|
|
this.totalData.value = 91;
|
|
|
|
|
this.totalData.name = "本年度企业风险项量";
|
|
|
|
|
list = this.blObj.list[2];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let total = 0;
|
|
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
|
|
total = total + list[i]["score"];
|
|
|
|
|
this.blObj.data.push({
|
|
|
|
|
name: list[i]["riskName"],
|
|
|
|
|
value: list[i]["score"],
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.totalData.value = total;
|
|
|
|
|
},
|
|
|
|
|
bmTime(val) {
|
|
|
|
|
if (this.bmObj.list.length < 2) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.bmObj.yData = [];
|
|
|
|
|
this.bmObj.xData = [];
|
|
|
|
|
this.bmObj.legend = [];
|
|
|
|
|
let data = [];
|
|
|
|
|
if (val == "day") {
|
|
|
|
|
this.bmObj.yData = [
|
|
|
|
|
[8, 3, 1, 11, 9, 7, 8, 12, 5, 9, 12, 3],
|
|
|
|
|
[1, 7, 2, 9, 4, 10, 7, 3, 1, 11, 5, 8],
|
|
|
|
|
[4, 3, 1, 11, 9, 7, 8, 12, 5, 9, 6, 2],
|
|
|
|
|
[2, 11, 7, 8, 3, 11, 9, 11, 7, 1, 2, 1],
|
|
|
|
|
[3, 9, 1, 11, 11, 6, 9, 9, 4, 7, 8, 3],
|
|
|
|
|
[9, 6, 1, 11, 12, 8, 11, 6, 4, 6, 1, 7],
|
|
|
|
|
[5, 3, 11, 7, 3, 9, 1, 2, 8, 4, 1, 4],
|
|
|
|
|
];
|
|
|
|
|
data = this.bmObj.list[0];
|
|
|
|
|
}
|
|
|
|
|
if (val == "month") {
|
|
|
|
|
this.bmObj.yData = [
|
|
|
|
|
[618, 711, 678, 811, 671, 812, 734, 597, 638, 712, 812, 768],
|
|
|
|
|
[698, 811, 671, 768, 812, 712, 638, 597, 711, 734, 878, 638],
|
|
|
|
|
[811, 671, 618, 734, 597, 812, 761, 768, 638, 597, 812, 712],
|
|
|
|
|
[671, 734, 811, 711, 618, 768, 671, 712, 768, 690, 638, 798],
|
|
|
|
|
[812, 671, 711, 812, 679, 638, 763, 768, 597, 871, 711, 567],
|
|
|
|
|
[734, 812, 618, 811, 638, 671, 712, 597, 812, 638, 638, 654],
|
|
|
|
|
[812, 811, 597, 711, 811, 618, 734, 638, 812, 712, 897, 638],
|
|
|
|
|
];
|
|
|
|
|
data = this.bmObj.list[1];
|
|
|
|
|
}
|
|
|
|
|
if (val == "year") {
|
|
|
|
|
this.bmObj.yData = [
|
|
|
|
|
[
|
|
|
|
|
2618, 2711, 2678, 1811, 2671, 2812, 1734, 2597, 2638, 2712, 1812,
|
|
|
|
|
2768,
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
2698, 2811, 2671, 1768, 2812, 2712, 2638, 1597, 2711, 1734, 2878,
|
|
|
|
|
2638,
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
1811, 2671, 2618, 2734, 2597, 2812, 2761, 2768, 1638, 1597, 2812,
|
|
|
|
|
2712,
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
2671, 2734, 2811, 1711, 2618, 2768, 2671, 1712, 2768, 2690, 1638,
|
|
|
|
|
2798,
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
1812, 2671, 2711, 2812, 2679, 2638, 1763, 2768, 2597, 2871, 2711,
|
|
|
|
|
2567,
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
2734, 1812, 2618, 2811, 2638, 1671, 2712, 2597, 2812, 2638, 2638,
|
|
|
|
|
2654,
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
2812, 2811, 1597, 2711, 2811, 2618, 2734, 2638, 2812, 2712, 2897,
|
|
|
|
|
2638,
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
data = this.bmObj.list[2];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
|
|
if (!this.bmObj.xData.includes(data[i]["month"] + "月")) {
|
|
|
|
|
this.bmObj.xData.push(data[i]["month"] + "月");
|
|
|
|
|
}
|
|
|
|
|
if (!this.bmObj.legend.includes(data[i]["riskName"])) {
|
|
|
|
|
this.bmObj.legend.push(data[i]["riskName"]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let temp = groupByReduce(data, "riskName", "score");
|
|
|
|
|
for (let i = 0; i < this.bmObj.legend.length; i++) {
|
|
|
|
|
this.bmObj.yData.push(temp[this.bmObj.legend[i]]);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|