From 2566b67acf159e03a4ea5c0df78f958d827eaaab Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Sat, 13 Jul 2024 13:37:35 +0800 Subject: [PATCH 1/2] gx --- src/view/echarts_education/edXS2.vue | 11 +++++++-- src/view/echarts_education/pie.vue | 1 + src/view/echarts_education/pie5.vue | 2 ++ src/view/education.vue | 35 +++++++++++++++------------- src/view/sy.vue | 8 +------ src/view/work.vue | 2 +- 6 files changed, 33 insertions(+), 26 deletions(-) diff --git a/src/view/echarts_education/edXS2.vue b/src/view/echarts_education/edXS2.vue index 32294c6..8967746 100644 --- a/src/view/echarts_education/edXS2.vue +++ b/src/view/echarts_education/edXS2.vue @@ -24,7 +24,7 @@ const data = reactive({ option: {}, bg: [], }); - +const max=ref(100); const getOption = () => { data.option = { tooltip: { @@ -62,6 +62,7 @@ const getOption = () => { }, yAxis: { type: "value", + max:max, splitLine: { show: true, lineStyle: { @@ -94,9 +95,10 @@ const getOption = () => { symbol: "emptyCircle", symbolSize: 10, - label: { + label: { show: true, color: "#ffffff", + fontSize:17, position:'top', formatter: function (data) { return data.value; @@ -138,6 +140,9 @@ const getOption = () => { ], }; }; +const getMaxValue=(arr)=> { + return Math.max(...arr); +} const setChart = () => { // Vue3中: 需要引入 var myChart = echarts.init(chart.value); @@ -150,6 +155,8 @@ onBeforeMount(() => { setTimeout(() => { data.list = props.list; data.year = props.month; + max.value=getMaxValue(data.list); + max.value=max.value+20; // console.log(data.list,props.month,'教育'); data.year.forEach(() => { data.bg.push(0); diff --git a/src/view/echarts_education/pie.vue b/src/view/echarts_education/pie.vue index 60cc04a..4d1b8fc 100644 --- a/src/view/echarts_education/pie.vue +++ b/src/view/echarts_education/pie.vue @@ -157,6 +157,7 @@ const getOption = () => { show: true, position: "top", color: "#ffffff", + fontSize:'17', formatter: function (data) { return data.value; }, diff --git a/src/view/echarts_education/pie5.vue b/src/view/echarts_education/pie5.vue index 7668c8e..eca87f8 100644 --- a/src/view/echarts_education/pie5.vue +++ b/src/view/echarts_education/pie5.vue @@ -121,6 +121,7 @@ const getOption = () => { show: true, position: "right", color: "#ffffff", + fontSize: 17, formatter: function (data) { return data.value; }, @@ -148,6 +149,7 @@ const getOption = () => { show: true, position: "right", color: "#ffffff", + fontSize: 17, formatter: function (data) { return data.value; }, diff --git a/src/view/education.vue b/src/view/education.vue index d4e5e10..982826d 100644 --- a/src/view/education.vue +++ b/src/view/education.vue @@ -96,15 +96,15 @@ class="schoolbs" @click="showDialog('学校', '/api/ggfwyth/schoolList')" > - 初中 - {{ data.xxgk.czxxsl }} + 初中 + {{ data.xxgk.czxxsl }}
- 高中 - {{ data.xxgk.gzxxsl }} + 高中 + {{ data.xxgk.gzxxsl }}
@@ -112,15 +112,15 @@ class="schoolbs" @click="showDialog('学校', '/api/ggfwyth/schoolList')" > - 小学 - {{ data.xxgk.xxxxsl }} + 小学 + {{ data.xxgk.xxxxsl }}
- 中职 - {{ data.xxgk.zzxxsl }} + 中职 + {{ data.xxgk.zzxxsl }}
@@ -128,16 +128,16 @@ class="schoolbs" @click="showDialog('学校', '/api/ggfwyth/schoolList')" > - 幼儿园 - {{ data.xxgk.yeyxxsl }} + 幼儿园 + {{ data.xxgk.yeyxxsl }}
特殊教育 - {{ data.xxgk.tsjyxxsl }} + {{ data.xxgk.tsjyxxsl }}
@@ -226,7 +226,7 @@
- 绿色预警 + 绿色预警
@@ -236,7 +236,7 @@
- 黄色预警 + 黄色预警
@@ -246,7 +246,7 @@
- 红色预警 + 红色预警
@@ -1819,7 +1819,9 @@ onMounted(() => { } } } - +.font{ + font-size: 16px !important; +} :deep(.el-table) { background: rgba(32, 64, 115, 1); @@ -1867,4 +1869,5 @@ onMounted(() => { font-size: 18px !important; } } + diff --git a/src/view/sy.vue b/src/view/sy.vue index 8ffb515..d29f2aa 100644 --- a/src/view/sy.vue +++ b/src/view/sy.vue @@ -566,13 +566,7 @@ @handle="handlePagination" > + + @@ -186,6 +193,7 @@ import { computed, } from "vue"; import DialogEnrol from "./dialog/dialogEnrol.vue"; +import DialogMap from "./dialog/dialogMap.vue"; import right2 from "./echart_analyze/right2.vue"; import right1 from "./echart_analyze/right1.vue"; import jypx from "./echart_analyze/jypx.vue"; @@ -206,10 +214,12 @@ import ViewDataimg2 from "@/assets/images/sjfx/sjfx2.png"; import ViewDataimg3 from "@/assets/images/sjfx/sjfx3.png"; import jypx1 from "@/assets/images/sjfx/pxrc.png"; import jypx2 from "@/assets/images/sjfx/gygws.png"; -import Map from "./echart_analyze/map.vue"; + const showR = ref(false); //loading // 入学分析数据 const dialogShowEnrol = ref(false); +const dialogShowMap = ref(false); +const mapTitle = ref(""); const dataTab = reactive({ url: "", title: "", @@ -313,6 +323,7 @@ const showEnrol = () => { }; const close = () => { dialogShowEnrol.value = false; + dialogShowMap.value = false; }; //数据切换 @@ -330,6 +341,17 @@ const tab_change = (index, name) => { } } }; +const chooseXX = (name) => { + console.log(name); + if (name == "交通") { + mapTitle.value='交通'; + dialogShowMap.value = true; + } + // tableType.title = village; + // tableType.columns = xz_column.value; + // tableType.url = "/api/ggfwyth/zcxxList"; + // getTownDetail(); +}; //就业培训 const jypxList = reactive([ { @@ -345,9 +367,9 @@ const jypxList = reactive([ ]); // 救助分析tap切换 const jz = ref("1"); -const jzChange = (value,label) => { +const jzChange = (value, label) => { jz.value = value; - data.jzfxName=label; + data.jzfxName = label; data.list = data.dataAnalysis[value - 1]; }; const showEchart = ref(false); @@ -358,7 +380,7 @@ const data = reactive({ }, list1: {}, list2: {}, - jzfxName:'特困', + jzfxName: "特困", options: [ { value: "1", label: "特困" }, { value: "2", label: "低保" }, diff --git a/src/view/dialog/dialogMap.vue b/src/view/dialog/dialogMap.vue new file mode 100644 index 0000000..3a359a8 --- /dev/null +++ b/src/view/dialog/dialogMap.vue @@ -0,0 +1,258 @@ + + + + \ No newline at end of file diff --git a/src/view/echart_analyze/map.vue b/src/view/echart_analyze/map.vue index 7f5a2d7..9bad908 100644 --- a/src/view/echart_analyze/map.vue +++ b/src/view/echart_analyze/map.vue @@ -19,7 +19,12 @@ const init = () => { // 主题色 mapStyle: "amap://styles/blue", // 地图层级 - zoom: 12, + zoom: 12.5, + labelDefault:{ + textStyle:{ + color:'#fffff', + } + } }); // 实时路况图层 var trafficLayer = new AMap.TileLayer.Traffic({ @@ -41,5 +46,8 @@ onMounted(() => { bottom:-100px; display: none!important;; } - +::v-deep .amap-container { + /* 调整区域的字体颜色 */ + color: #ff0000; /* 红色 */ +} \ No newline at end of file diff --git a/src/view/echart_analyze/right2.vue b/src/view/echart_analyze/right2.vue index 2c3e005..eb9444f 100644 --- a/src/view/echart_analyze/right2.vue +++ b/src/view/echart_analyze/right2.vue @@ -6,7 +6,7 @@ import { onMounted, onBeforeMount, reactive, ref } from "vue"; // 局部引入echarts核心模块 import * as echarts from "echarts"; - +const emit = defineEmits(["shuju"]); const props = defineProps({ list: { type: Array, @@ -430,6 +430,9 @@ const getOption = () => { const setChart = () => { var myChart = echarts.init(chart.value); myChart.setOption(data.option); + myChart.on("click", function (params) { + emit('shuju',params.name); + }); }; const getMaxCeilingValue = (arr) => { let max = Math.max(...arr);// 找到数组中的最大值 diff --git a/src/view/education.vue b/src/view/education.vue index 982826d..4eb1670 100644 --- a/src/view/education.vue +++ b/src/view/education.vue @@ -226,7 +226,7 @@
- 绿色预警 + 绿色预警
@@ -236,7 +236,7 @@
- 黄色预警 + 黄色预警
@@ -246,7 +246,7 @@
- 红色预警 + 红色预警
@@ -1262,7 +1262,7 @@ onMounted(() => { } .historyimg { - width: 133px; + width: 140px; height: 19px; background-repeat: no-repeat; background-size: 100% 100%; diff --git a/src/view/hygiene.vue b/src/view/hygiene.vue index 740aa4c..c34ebac 100644 --- a/src/view/hygiene.vue +++ b/src/view/hygiene.vue @@ -122,7 +122,7 @@
-
门急诊人次
+
门急诊人次
{{ data.mz.mjzrc }}
@@ -130,7 +130,7 @@
-
住院人数
+
住院人数
{{ data.mz.zyrs }}
@@ -159,7 +159,7 @@ src="@/assets/images/hygiene/jd.gif" alt="" /> -
建档份数
+
建档份数
@@ -210,14 +210,14 @@ -
孕产妇系统管理人数
+
孕产妇系统管理人数
{{ data.fyglrs.etrs }}
-
0-6岁儿童系统管理人数
+
0-6岁儿童系统管理人数
@@ -1304,4 +1304,7 @@ const getData = async () => { margin-top: 15px; margin-bottom: 10px; } +.font{ + font-size: 18px !important; +} diff --git a/src/view/sy.vue b/src/view/sy.vue index 15efc38..54265b0 100644 --- a/src/view/sy.vue +++ b/src/view/sy.vue @@ -565,9 +565,9 @@ @close="close" @handle="handlePagination" > -