diff --git a/src/view/sy.vue b/src/view/sy.vue index 81ae67e..bdfe539 100644 --- a/src/view/sy.vue +++ b/src/view/sy.vue @@ -1304,30 +1304,6 @@ const getData = async () => { ageRatioKeys.forEach((key) => { data.ageRatio.push(res.data.rksj[key]); }); - // 公共服务&企业服务&政府服务 - data.lytAppDayActive = res.data.app.lytAppDayActive; - - // for (let i = 0; i < res.data.app.lytApp.length; i += 2) { - // let obj = { - // highFrequencyApp: res.data.app.lytApp[i]?.title || "", - // monthlyVisits: res.data.app.lytApp[i]?.num || "", - // highFrequencyApp1: res.data.app.lytApp[i + 1]?.title || "", - // monthlyVisits1: res.data.app.lytApp[i + 1]?.num || "", - // }; - // data.tableData.push(obj); - // } - data.tableData = res.data.app.lytApp.reduce((acc, _, i, arr) => { - if (i % 2 === 0) { - acc.push({ - highFrequencyApp: arr[i]?.title || "", - monthlyVisits: arr[i]?.num || "", - highFrequencyApp1: arr[i + 1]?.title || "", - monthlyVisits1: arr[i + 1]?.num || "", - }); - } - return acc; - }, []); - // 医疗卫生 const ylwsKeys = [ "yywsysl", @@ -1364,6 +1340,30 @@ const getData = async () => { showEchart.value = true; }); }; +// 公共服务&企业服务&政府服务 +const getfw = async() => { + http.get("/api/ggfwyth/getLytAppData").then((res) => { + if (res.code == 200) { + data.lytAppDayActive = res.data.lytAppDayActive; + data.tableData = res.data.lytApp.reduce((acc, _, i, arr) => { + if (i % 2 === 0) { + acc.push({ + highFrequencyApp: arr[i]?.title || "", + monthlyVisits: arr[i]?.num || "", + highFrequencyApp1: arr[i + 1]?.title || "", + monthlyVisits1: arr[i + 1]?.num || "", + }); + } + return acc; + }, []); + } + }); + // http.get("/api/ggfwyth/getDataSharing").then((res) => { + // if (res.code == 200) { + + // } + // }); +}; //获取表格数据 const getTable = (url, currentPage) => { http @@ -1815,6 +1815,7 @@ const autoScroll = () => { }; onBeforeMount(async () => { getData(); + getfw(); setTimeout(() => { startAutoScroll(); }, 1000);