From efc79484bd3c22c61c5a2ac7186271d0c412ba95 Mon Sep 17 00:00:00 2001 From: duanxiaohai <1812246227@qq.com> Date: Thu, 6 Jun 2024 10:11:42 +0800 Subject: [PATCH 1/4] gx --- src/view/echarts_yl/ylSMFW.vue | 23 +++-------- src/view/yl.vue | 73 ++++++++-------------------------- 2 files changed, 23 insertions(+), 73 deletions(-) diff --git a/src/view/echarts_yl/ylSMFW.vue b/src/view/echarts_yl/ylSMFW.vue index e65d0fc..4a8253f 100644 --- a/src/view/echarts_yl/ylSMFW.vue +++ b/src/view/echarts_yl/ylSMFW.vue @@ -300,22 +300,6 @@ const getOption = () => { }; }; -// // 使用生命钩子 -// onMounted(() => { -// // 基于准备好的dom,初始化echarts实例 -// // var myChart = echarts.init(document.getElementById('main')); -// // Vue3中: 需要引入 -// var myChart = echarts.init(chart.value); - -// // init(); // vue3.2没有this -// // 使用刚指定的配置项和数据显示图表。 -// myChart.setOption(option); - -// // 单图表响应式: 跟随浏览器大小改变 -// // window.addEventListener("resize", () => { -// // myChart.resize(); -// // }); -// }); const setChart = () => { var myChart = echarts.init(chart.value); myChart.setOption(data.option); @@ -324,12 +308,16 @@ const setChart = () => { const setChart1 = () => { data.list1 = []; data.list2 = []; + // var myChart = echarts.init(chart.value); + // // 显示加载动画 + // myChart.showLoading(); if (data.list.length !== 0) { - // console.log(data.list, "助老服务"); data.list.data.forEach((item) => { data.list1.push(item.sc); //服务时长 data.list2.push(item.fwcs); //服务次数 }); + // // 隐藏加载动画 + // myChart.hideLoading(); } }; @@ -338,6 +326,7 @@ onBeforeMount(() => { setTimeout(() => { data.list = props.list; data.day = props.list.day; + console.log(data.list, "助老服务"); setChart1(); getOption(); setChart(); diff --git a/src/view/yl.vue b/src/view/yl.vue index 3c5e6f2..c57c3e6 100644 --- a/src/view/yl.vue +++ b/src/view/yl.vue @@ -48,10 +48,7 @@ :year="data.leftTopYear" > -
+
@@ -97,10 +94,7 @@ :year="data.leftCenterYear" />
-
+
@@ -192,19 +186,9 @@
{{ data.yljgzlzx.yljg }}
- - - + + +
@@ -206,7 +202,7 @@
- 16 + {{data.whistleblower.green}}
@@ -216,7 +212,7 @@
- 239 + {{data.whistleblower.yellow}}
@@ -226,7 +222,7 @@
- 139 + {{data.whistleblower.red}}
@@ -460,6 +456,7 @@ const data = reactive({ xxgk: {}, xzncjszcsl: [], xzncxxsl: [[], []], + whistleblower: {}, zzxm: [], schoolData: [ { name: "副高级", value: "" }, @@ -485,6 +482,7 @@ const getData = async () => { 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; // 县镇农村学校数量 初始化数据 @@ -498,8 +496,8 @@ const getData = async () => { data.xzncjszcsl = res.data.xzncjszcsl; // 资助项目 data.zzxm = res.data.zzxm; - // ratingBtn("县镇"); // 吹哨人 + data.whistleblower = res.data.whistleblower; } }); };