This commit is contained in:
姚宇浩 2024-09-09 17:25:55 +08:00
parent e936b71c96
commit 9949c566fa
3 changed files with 61 additions and 9 deletions

View File

@ -70,11 +70,11 @@ const router = createRouter({
path: '/home/index/person',
component: () => import('../view/person/index.vue'),
},
{
name: '地图编辑',
path: '/home/index/mapEdit',
component: () => import('../view/sy_map_fb.vue'),
},
// {
// name: '地图编辑',
// path: '/home/index/mapEdit',
// component: () => import('../view/sy_map_fb.vue'),
// },
]
},
]

View File

@ -1021,9 +1021,45 @@ const getData = async () => {
data.ViewData[8].value = res.data.dataShow.tekun.total; //
// data.ViewData[9].data = res.data.dataShow.qtjbrs.qtjbrs; //
// data.ViewData[9].value = res.data.dataShow.qtjbrs.total; //
showEchart.value = true;
}
});
await http.get("/api/ggfwyth/succour").then((res) => {
if (res.code == 200) {
data.dataAnalysis.forEach((item,index)=>{
item.data.length=0;
item.year.length=0;
if(index<=2){
item.year=[...res.data.lifeAssistance.jz.month];
}else if (index==3){
item.year=[...res.data.underprivileged.disabilitySubsidies.month];
}else if(index==4){
item.year=[...res.data.underprivileged.difficultSoldiers.year];
}else{
item.year=[...res.data.underprivileged.needyWorkers.year];
}
})
res.data.lifeAssistance.jz.data.forEach((item, index) => {
data.dataAnalysis[0].data.push(item.tkjzrs);
data.dataAnalysis[1].data.push(item.dbjzrs);
data.dataAnalysis[2].data.push(item.dibianJzrs);
});
res.data.underprivileged.disabilitySubsidies.data.forEach(
(item, index) => {
data.dataAnalysis[3].data.push(item.shbtrs);
}
);
res.data.underprivileged.difficultSoldiers.data.forEach((item, index) => {
data.dataAnalysis[4].data.push(item.jzrs);
});
res.data.underprivileged.needyWorkers.data.forEach((item, index) => {
data.dataAnalysis[5].data.push(item.jzrs);
});
}
jzChange('1', '特困')
});
showEchart.value = true;
};
onMounted(() => {

View File

@ -33,7 +33,7 @@ const data = reactive({
name:'特困',
list: [6280, 6280, 6280, 5924, 1824],
year: [2020, 2021, 2022, 2023, 2024],
bg: [0, 0, 0, 0, 0],
bg: [0, 0, 0, 0],
option: {},
});
@ -73,8 +73,12 @@ const getOption = () => {
},
},
yAxis: {
// name: "/",
name: "人数/次",
type: "value",
max: function (value) {
// Y
return Math.ceil(Math.max(value.max, value.max * 1.6) / 50) * 50;
},
nameTextStyle: {
// Y
fontSize: 14, // 20
@ -152,6 +156,10 @@ watch(
(newVal, oldVal) => {
data.list = newVal;
data.name = props.name;
data.bg.length=0;
data.year.forEach(item=>{
data.bg.push(0)
})
getOption();
setChart();
}
@ -161,6 +169,10 @@ watch(
(newVal, oldVal) => {
data.year = newVal;
data.name = props.name;
data.bg.length=0;
data.year.forEach(item=>{
data.bg.push(0)
})
getOption();
setChart();
}
@ -171,6 +183,10 @@ onBeforeMount(() => {
data.list = props.list;
data.year = props.year;
data.name = props.name;
data.bg.length=0;
data.year.forEach(item=>{
data.bg.push(0)
})
getOption();
setChart();
}, 600);