This commit is contained in:
X_Rian 2024-06-03 19:08:58 +08:00
parent 2c65a19e2f
commit cfec531dca

View File

@ -184,7 +184,8 @@ const getNoticeList = async () => {
const dataListAlarm = ref([]); const dataListAlarm = ref([]);
const pageInfo = reactive({ const pageInfo = reactive({
dataListAlarmPage: [] as any[], dataListAlarmPage: [] as any[],
page: 0 page: 0,
dataListAlarm: []
}); });
const spArr = (arr: any[], num: number) => { const spArr = (arr: any[], num: number) => {
let newArr = []; let newArr = [];
@ -276,7 +277,7 @@ function getMessEchart() {
color: ["#FF3232", "#FF9901", "#FFE500", "#3A3AE7"], color: ["#FF3232", "#FF9901", "#FFE500", "#3A3AE7"],
grid: { grid: {
left: "3%", left: "3%",
right: "6%", right: "8%",
bottom: "4%", bottom: "4%",
top: "18%", top: "18%",
containLabel: true containLabel: true
@ -284,7 +285,7 @@ function getMessEchart() {
xAxis: { xAxis: {
type: "category", type: "category",
boundaryGap: false, boundaryGap: false,
data: ["5.30", "5.31", "6.1", "6.2", "6.3", "6.4"], data: pageInfo.dataListAlarm.map((item: any) => item.date),
axisLabel: { axisLabel: {
color: "#fff" color: "#fff"
}, },
@ -716,6 +717,7 @@ const getCountAlarmNumByEnterprise = async () => {
}; };
}); });
pageInfo.dataListAlarmPage = spArr(dataList, 4); pageInfo.dataListAlarmPage = spArr(dataList, 4);
pageInfo.dataListAlarm = res.result;
console.log("应急处置统计图", res); console.log("应急处置统计图", res);
getMessEchart(); getMessEchart();
}; };