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