This commit is contained in:
姚宇浩 2024-09-04 11:40:03 +08:00
parent 0d3e68ea70
commit 873dc72b79
1 changed files with 25 additions and 24 deletions

View File

@ -1304,30 +1304,6 @@ const getData = async () => {
ageRatioKeys.forEach((key) => { ageRatioKeys.forEach((key) => {
data.ageRatio.push(res.data.rksj[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 = [ const ylwsKeys = [
"yywsysl", "yywsysl",
@ -1364,6 +1340,30 @@ const getData = async () => {
showEchart.value = true; 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) => { const getTable = (url, currentPage) => {
http http
@ -1815,6 +1815,7 @@ const autoScroll = () => {
}; };
onBeforeMount(async () => { onBeforeMount(async () => {
getData(); getData();
getfw();
setTimeout(() => { setTimeout(() => {
startAutoScroll(); startAutoScroll();
}, 1000); }, 1000);