From feee5ddb482e8d93e8ca0d553f180c4556738214 Mon Sep 17 00:00:00 2001 From: duanxiaohai <1812246227@qq.com> Date: Thu, 24 Oct 2024 11:30:50 +0800 Subject: [PATCH] gx --- src/view/echarts_lysd/eP3.vue | 8 ++++++ src/view/table_gk/gk_lysd.vue | 52 +++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/src/view/echarts_lysd/eP3.vue b/src/view/echarts_lysd/eP3.vue index 162fe6d..5195657 100644 --- a/src/view/echarts_lysd/eP3.vue +++ b/src/view/echarts_lysd/eP3.vue @@ -83,6 +83,14 @@ const getOption = () => { // x: "center", // y: "center", // }, + legend: { + top: '5%', + left: 'center', + // 文本样式 + textStyle: { + color: '#fff' + } + }, grid: { bottom: 150, left: 100, diff --git a/src/view/table_gk/gk_lysd.vue b/src/view/table_gk/gk_lysd.vue index 0113d3f..864c5cb 100644 --- a/src/view/table_gk/gk_lysd.vue +++ b/src/view/table_gk/gk_lysd.vue @@ -50,7 +50,7 @@ - + @@ -104,7 +104,7 @@ const data = reactive({ //就业服务 employmentList: [ { - name: "发布人力资源供求信息", + name: "2024年发布人力资源供求信息", value: "0", img: jy1, dw: "次", @@ -183,15 +183,10 @@ const data = reactive({ show: true, data: ["0", "0", "0", "0", "0", "0"], //五级/初级工 }, - ], + ],//新增技能人才数 jnrcs: { month: [], - // one: [], //一级/高级技师 - // two: [], // 二级/技师 - // three: [], //三级/高级工 - // four: [], //四级/中级工 - // five: [], //五级/初级工 - }, //新增技能人才数 + }, //新增技能人才数月份 syl: { bf: [], //帮扶 zd: [], //重点 @@ -221,29 +216,35 @@ const jzChange = (index, value) => { data.list = value === "1" ? data.housing : data.temporary; } }; +// 更新employmentList中的value +const updateEmploymentValues = (list, data) => { + const regex = /(\d+)(次|个|人次|份|场)?/g; // 提取所有数字及其单位 + + list.forEach((item) => { + const match = data.find((entry) => entry.includes(item.name)); + if (match) { + const results = match.match(regex); // 获取所有匹配的结果 + if (results && results.length > 0) { + item.value = results[results.length - 1].replace(/[^\d]/g, ""); // 取最后一个结果并提取数字 + } else { + item.value = "0"; // 默认值 + } + } + }); +}; const getData = async () => { await http.get("/api/ggfwyth/lysdOverview").then((res) => { if (res.code == 200) { data.jnrcs.month = res.data.jnrcs.month; //新增技能人才数 - // data.jnrcs.one = res.data.jnrcs.one; //新增技能人才数 - // data.jnrcs.two = res.data.jnrcs.two; //新增技能人才数 - // data.jnrcs.three = res.data.jnrcs.three; //新增技能人才数 - // data.jnrcs.four = res.data.jnrcs.four; //新增技能人才数 - // data.jnrcs.five = res.data.jnrcs.five; //新增技能人才数 - data.ViewData[0].data = res.data.jnrcs.one; //一级/高级技师 data.ViewData[1].data = res.data.jnrcs.two; //二级/技师 data.ViewData[2].data = res.data.jnrcs.three; //三级/高级工 data.ViewData[3].data = res.data.jnrcs.four; //四级/中级工 data.ViewData[4].data = res.data.jnrcs.five; //五级/初级工 - data.syl.bf = res.data.syl.bf; // 失业率 帮扶 data.syl.zd = res.data.syl.zd; // 失业率 重点 - - data.jyfws = res.data.jyfws; // 就业服务 - data.employmentList[0].value = res.data.jyfws; //一级/高级技师 - + updateEmploymentValues(data.employmentList, res.data.jyfws); //就业服务 data.rczy = res.data.rczy; // 人才资源统计 data.sybx = res.data.sybx; // 失业保险概况 data.gsbx = res.data.gsbx; //工伤保险 @@ -420,7 +421,7 @@ onMounted(() => {}); .familyPlanning { width: 96%; - background-image: url(@/assets/images/infant/yysy_3.png); + background-image: url(@/assets/images/lysd/lysd_4.png); background-repeat: no-repeat; background-size: 100% 100%; } @@ -432,7 +433,7 @@ onMounted(() => {}); } .service { - background-image: url(@/assets/images/infant/yysy_4.png); + background-image: url(@/assets/images/lysd/lysd_5.png); background-repeat: no-repeat; background-size: 100% 100%; } @@ -599,7 +600,7 @@ onMounted(() => {}); } .center_2 { width: 96%; - background-image: url(@/assets/images/infant/yysy_2.png); + background-image: url(@/assets/images/lysd/lysd_3.png); background-repeat: no-repeat; background-size: 100% 100%; } @@ -636,6 +637,9 @@ onMounted(() => {}); } .right5 { margin-left: 14px; + display: flex; + flex-direction: column; + justify-content: space-between; .font { font-family: PingFangSC, PingFang SC; font-weight: 500; @@ -651,7 +655,7 @@ onMounted(() => {}); height: 7px; } .right5_bottom { - margin-top: 13px; + // margin-top: 13px; // padding: 5px; font-size: 22px; color: #2ef1ff;