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', path: '/home/index/person',
component: () => import('../view/person/index.vue'), component: () => import('../view/person/index.vue'),
}, },
{ // {
name: '地图编辑', // name: '地图编辑',
path: '/home/index/mapEdit', // path: '/home/index/mapEdit',
component: () => import('../view/sy_map_fb.vue'), // 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[8].value = res.data.dataShow.tekun.total; //
// data.ViewData[9].data = res.data.dataShow.qtjbrs.qtjbrs; // // data.ViewData[9].data = res.data.dataShow.qtjbrs.qtjbrs; //
// data.ViewData[9].value = res.data.dataShow.qtjbrs.total; // // 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(() => { onMounted(() => {
@ -1282,7 +1318,7 @@ onBeforeUnmount(() => {
} }
.flex11 { .flex11 {
padding-bottom: 12px ; padding-bottom: 12px;
} }
.map { .map {

View File

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