From ef8b9f73cdf31dc98ec1d56236265c9f9f4feca5 Mon Sep 17 00:00:00 2001 From: duanxiaohai <1812246227@qq.com> Date: Tue, 14 May 2024 10:00:40 +0800 Subject: [PATCH] gx --- src/view/echarts_education/eP1.vue | 354 ++++++++++++++++------------ src/view/echarts_education/edXX.vue | 15 +- src/view/echarts_education/pie.vue | 331 +++++++++++++------------- src/view/education.vue | 175 ++++++++++---- src/view/yl.vue | 1 + 5 files changed, 503 insertions(+), 373 deletions(-) diff --git a/src/view/echarts_education/eP1.vue b/src/view/echarts_education/eP1.vue index 1f520a6..2c73aee 100644 --- a/src/view/echarts_education/eP1.vue +++ b/src/view/echarts_education/eP1.vue @@ -3,10 +3,33 @@ diff --git a/src/view/echarts_education/edXX.vue b/src/view/echarts_education/edXX.vue index 9d5aac2..9a1c709 100644 --- a/src/view/echarts_education/edXX.vue +++ b/src/view/echarts_education/edXX.vue @@ -269,7 +269,7 @@ watch( data.list = newVal; getOption(); setChart(); - // console.log("学校", newVal, oldVal); + console.log("学校", newVal, oldVal); } ); watch( @@ -282,12 +282,13 @@ watch( ); // 使用生命钩子 -onMounted(() => { - data.list = props.list; - data.namea = props.active; - - getOption(); - setChart(); +onBeforeMount(() => { + setTimeout(() => { + data.list = props.list; + data.namea = props.active; + getOption(); + setChart(); + }, 600); // var myChart = echarts.init(chart.value); // myChart.setOption(option); diff --git a/src/view/echarts_education/pie.vue b/src/view/echarts_education/pie.vue index e1cae38..12d4f88 100644 --- a/src/view/echarts_education/pie.vue +++ b/src/view/echarts_education/pie.vue @@ -1,187 +1,202 @@ diff --git a/src/view/education.vue b/src/view/education.vue index bc0196b..7732c9a 100644 --- a/src/view/education.vue +++ b/src/view/education.vue @@ -3,7 +3,7 @@
- +
@@ -19,15 +19,33 @@
- - + +
- - + +
@@ -44,38 +62,47 @@ 学校总数
- {{ data.xxgk.xszs }} 学生总数 + {{ data.xxgk.xszs }} + 学生总数
- {{ data.xxgk.bjzs }} 班级总数 + {{ data.xxgk.bjzs }} + 班级总数
- {{ data.xxgk.jzgzs }} 教职工总数 + {{ data.xxgk.jzgzs }} + 教职工总数
- 初中 {{ data.xxgk.czxxsl }} + 初中 + {{ data.xxgk.czxxsl }}
- 高中 {{ data.xxgk.gzxxsl }} + 高中 + {{ data.xxgk.gzxxsl }}
- 小学 {{ data.xxgk.xxxxsl }} + 小学 + {{ data.xxgk.xxxxsl }}
- 中职 {{ data.xxgk.zzxxsl }} + 中职 + {{ data.xxgk.zzxxsl }}
- 幼儿园 {{ data.xxgk.yeyxxsl }} + 幼儿园 + {{ data.xxgk.yeyxxsl }}
- 特殊教育 {{ data.xxgk.tsjyxxsl }} + 特殊教育 + {{ data.xxgk.tsjyxxsl }}
@@ -83,17 +110,23 @@
- +
- +
-
+ +
县镇
-
+
农村
@@ -108,10 +141,14 @@ 资助金额
-
- 幼儿资助 - 379人次 - 70.88 +
+ {{ item.zzxm }} + {{ item.zzsl }} + {{ item.zzje }}
@@ -230,7 +267,7 @@ const selectData = reactive({ }, ], list: [], - active: "城市", + active: "县镇", list1: [], }); var roseData1 = ref([ @@ -338,14 +375,24 @@ const selectChange1 = () => { const ratingBtn = (item) => { selectData.active = item; // 设置当前选中的项目 switch (selectData.active) { - case "城市": - selectData.list1 = schoolData.value; - break; + // case "城市": + // selectData.list1 = schoolData.value; + // break; case "县镇": - selectData.list1 = schoolData1.value; + data.schoolData[0].value = data.xzncjszcsl.xzjszcsl.xzfgj; //县镇复高级数量 + data.schoolData[1].value = data.xzncjszcsl.xzjszcsl.xzzgj; //县镇正高级数量 + data.schoolData[2].value = data.xzncjszcsl.xzjszcsl.xzwdj; //县镇未定级数量 + data.schoolData[3].value = data.xzncjszcsl.xzjszcsl.xzyj; //县镇员级数量 + data.schoolData[4].value = data.xzncjszcsl.xzjszcsl.xzzj; //县镇中级数量 + data.schoolData[5].value = data.xzncjszcsl.xzjszcsl.xzzlj; //县镇助理级数量 break; case "农村": - selectData.list1 = schoolData2.value; + data.schoolData[0].value = data.xzncjszcsl.ncjszcsl.ncfgj; //县镇正高级数量 + data.schoolData[1].value = data.xzncjszcsl.ncjszcsl.nczgj; //县镇正高级数量 + data.schoolData[2].value = data.xzncjszcsl.ncjszcsl.ncwdj; //县镇中级数量 + data.schoolData[3].value = data.xzncjszcsl.ncjszcsl.nczlj; //县镇助理级数量 + data.schoolData[4].value = data.xzncjszcsl.ncjszcsl.ncyj; //县镇员级数量 + data.schoolData[5].value = data.xzncjszcsl.ncjszcsl.ncwdj; //县镇未定级数量 break; default: break; @@ -375,26 +422,50 @@ const data = reactive({ cls: "left4", }, ], - xxgk: {} -}) -onBeforeMount(() => { - selectData.list = roseData1.value; - selectData.list1 = schoolData.value; - http.get("/api/ggfwyth/education").then((res) => { + xxgk: {}, + xzncjszcsl: [], + xzncxxsl: [[], []], + zzxm: [], + schoolData: [ + { name: "副高级", value: "" }, + { name: "正高级", value: "" }, + { name: "未定级", value: "" }, + { name: "员级", value: "" }, + { name: "中级", value: "" }, + { name: "助理级", value: "" }, + ], +}); +const getData = async () => { + await http.get("/api/ggfwyth/education").then((res) => { if (res.code == 200) { - data.xsql.push(res.data.xssl.zz) - data.xsql.push(res.data.xssl.gz) - data.xsql.push(res.data.xssl.cz) - data.xsql.push(res.data.xssl.xx) - data.xsql.push(res.data.xssl.yey) - data.xsql.push(res.data.xssl.tsjy) - data.zdgz[0].value = res.data.zdgz.lset - data.zdgz[1].value = res.data.zdgz.dszn - data.zdgz[2].value = res.data.zdgz.dqjt - data.zdgz[3].value = res.data.zdgz.xsdb - data.xxgk = res.data.xxgk + data.xsql.push(res.data.xssl.zz); + data.xsql.push(res.data.xssl.gz); + data.xsql.push(res.data.xssl.cz); + data.xsql.push(res.data.xssl.xx); + data.xsql.push(res.data.xssl.yey); + data.xsql.push(res.data.xssl.tsjy); + data.zdgz[0].value = res.data.zdgz.lset; + data.zdgz[1].value = res.data.zdgz.dszn; + data.zdgz[2].value = res.data.zdgz.dqjt; + data.zdgz[3].value = res.data.zdgz.xsdb; + data.xxgk = res.data.xxgk; + + data.xzncjszcsl = res.data.xzncjszcsl; + data.xzncxxsl[0].push(res.data.xzncxxsl.ncxx.ncxx); + data.xzncxxsl[0].push(res.data.xzncxxsl.ncxx.nccz); + data.xzncxxsl[0].push(res.data.xzncxxsl.ncxx.ncgz); + data.xzncxxsl[1].push(res.data.xzncxxsl.xzxx.xzxx); + data.xzncxxsl[1].push(res.data.xzncxxsl.xzxx.xzcz); + data.xzncxxsl[1].push(res.data.xzncxxsl.xzxx.xzgz); + data.zzxm = res.data.zzxm; + ratingBtn("县镇"); } }); +}; + +onBeforeMount(async () => { + selectData.list = roseData1.value; + getData(); }); @@ -1103,8 +1174,8 @@ onBeforeMount(() => { justify-content: space-around; margin-top: 10px; width: 93.2%; - height: 34px; - padding: 6px 0; + min-height: 34px; + padding: 8px 0; box-sizing: border-box; background-image: url(@/assets/eduImg/jyImg16.png); @@ -1116,6 +1187,8 @@ onBeforeMount(() => { letter-spacing: 3px; text-align: left; font-style: normal; + width: 33%; + padding-left: 50px; } } } diff --git a/src/view/yl.vue b/src/view/yl.vue index ce921d4..5f1ba83 100644 --- a/src/view/yl.vue +++ b/src/view/yl.vue @@ -258,6 +258,7 @@ const data = reactive({ onBeforeMount(() => { getData(); }); + const getData = () => { http.get("/api/ggfwyth/yl").then((res) => { if (res.code == 200) {