From 01fb0aba38796912e16f079e615903904c6afc5b Mon Sep 17 00:00:00 2001 From: duanxiaohai <1812246227@qq.com> Date: Thu, 1 Aug 2024 14:04:24 +0800 Subject: [PATCH] gx --- src/view/sy.vue | 99 ++++++++++++---------- src/view/sy_details.vue | 4 +- src/view/sy_mapcopy.vue | 3 - src/view/sy_table.vue | 182 +++++++++++++++++++++++++++------------- 4 files changed, 184 insertions(+), 104 deletions(-) diff --git a/src/view/sy.vue b/src/view/sy.vue index 14f597d..94cfe5e 100644 --- a/src/view/sy.vue +++ b/src/view/sy.vue @@ -1368,6 +1368,7 @@ const getTableTab = (url, currentPage) => { .then((res) => { if (res.code == 200) { dataTab.data = res.data; + console.log(res.data); pagination.total = res.count; dialogShowTab.value = true; } @@ -1414,10 +1415,9 @@ const showEc = (val) => { ]; // 骑行次数 dataEc.list2 = [ 695, 892, 1265, 1178, 1246, 1206, 1361, 1323, 1231, 893, 1032, 1196, - 1411, 1232, + 1411, 1232, 1232, ]; // 骑行时长(分钟) dataEc.times = [ - "14", "15", "16", "17", @@ -1432,6 +1432,7 @@ const showEc = (val) => { "26", "27", "28", + "29", ]; dialogShowEc.value = true; break; @@ -1456,27 +1457,33 @@ const showTab = (val) => { dataTab.data = []; switch (val) { case "公共汽车": - dataTab.list1 = [ - 8616, 9616, 10360, 10206, 8970, 10442, 9988, 9487, 8380, 8371, 7984, - 7574, 8647, 9515, 8974, - ]; - dataTab.times = [ - "14", - "15", - "16", - "17", - "18", - "19", - "20", - "21", - "22", - "23", - "24", - "25", - "26", - "27", - "28", - ]; + // dataTab.list1 = [ + // 8616, 9616, 10360, 10206, 8970, 10442, 9988, 9487, 8380, 8371, 7984, + // 7574, 8647, 9515, 8974, + // ]; + // dataTab.times = [ + // "14", + // "15", + // "16", + // "17", + // "18", + // "19", + // "20", + // "21", + // "22", + // "23", + // "24", + // "25", + // "26", + // "27", + // "28", + // ]; + http.get(`/api/ggfwyth/bus`).then((res) => { + if (res.code == 200) { + dataTab.list1 = res.data.data; + dataTab.times = res.data.times; + } + }); dataTab.data = [ { cc: "201A", @@ -1566,26 +1573,32 @@ const showTab = (val) => { dialogShowTab.value = true; break; case "长途汽车": - dataTab.list1 = [ - 97, 57, 37, 46, 46, 54, 40, 46, 37, 48, 39, 48, 48, 31, 43, - ]; - dataTab.times = [ - "14", - "15", - "16", - "17", - "18", - "19", - "20", - "21", - "22", - "23", - "24", - "25", - "26", - "27", - "28", - ]; + http.get(`/api/ggfwyth/longDistanceBus`).then((res) => { + if (res.code == 200) { + dataTab.list1 = res.data.data; + dataTab.times = res.data.times; + } + }); + // dataTab.list1 = [ + // 97, 57, 37, 46, 46, 54, 40, 46, 37, 48, 39, 48, 48, 31, 43, + // ]; + // dataTab.times = [ + // "14", + // "15", + // "16", + // "17", + // "18", + // "19", + // "20", + // "21", + // "22", + // "23", + // "24", + // "25", + // "26", + // "27", + // "28", + // ]; dataTab.data = [ { cc: "303", diff --git a/src/view/sy_details.vue b/src/view/sy_details.vue index 1ffce26..8fb4969 100644 --- a/src/view/sy_details.vue +++ b/src/view/sy_details.vue @@ -541,7 +541,7 @@ const handleCurrentChange = (val) => { const handlePagination = (current) => { // console.log(current,"page1"); pagination.currentPage = current; - getTable("/api/ggfwyth/ysyzt/lyxsdbrymd", pagination.currentPage); + getTable("/api/ggfwyth/pg/lyxsdbrymd", pagination.currentPage); }; // 服务表格样式 const tableHeaderColor = (arg) => { @@ -593,7 +593,7 @@ const getTable = async (url, currentPage) => { }; onMounted(() => { - getTable("/api/ggfwyth/ysyzt/lyxsdbrymd", pagination.currentPage); + getTable("/api/ggfwyth/pg/lyxsdbrymd", pagination.currentPage); handleCurrentChange(1); }); diff --git a/src/view/sy_mapcopy.vue b/src/view/sy_mapcopy.vue index 18b01f2..b8e35f9 100644 --- a/src/view/sy_mapcopy.vue +++ b/src/view/sy_mapcopy.vue @@ -1104,7 +1104,6 @@ const getData = async (i, e) => { "100nlPercent", ]; if (res.data.ageGroupsPercent) { - console.log(PopulationRatio.value[0].progress); agename.forEach((key, index) => { if (PopulationRatio.value[index]) { PopulationRatio.value[index].progress = @@ -1235,7 +1234,6 @@ const getDatas = async (e, i) => { "100nlPercent", ]; if (res.data.ageGroupsPercent) { - console.log(PopulationRatio.value[0].progress); agename.forEach((key, index) => { if (PopulationRatio.value[index]) { PopulationRatio.value[index].progress = @@ -1317,7 +1315,6 @@ const getDatas2 = async (e, i, cs) => { "100nlPercent", ]; if (res.data.ageGroupsPercent) { - console.log(PopulationRatio.value[0].progress); agename.forEach((key, index) => { if (PopulationRatio.value[index]) { PopulationRatio.value[index].progress = diff --git a/src/view/sy_table.vue b/src/view/sy_table.vue index 9cc0f7a..46ca5b1 100644 --- a/src/view/sy_table.vue +++ b/src/view/sy_table.vue @@ -27,7 +27,7 @@ ? 'tabPositionminBoxBgc' : '' " - @click="tapshow(item.id, index1)" + @click="tapshow(item, index1)" > {{ item1.name }} @@ -107,7 +107,7 @@ -
+
详情
@@ -136,6 +136,9 @@
+ @@ -162,26 +165,22 @@ import Bj3 from "@/assets/sy-table/sy-table5.png"; import Bj4 from "@/assets/sy-table/sy-table6.png"; import { useRouter, useRoute } from "vue-router"; +import http from "@/utils/request.js"; import { ElMessage } from "element-plus"; import tools from "@/utils/tools"; -// onMounted(() => { -// let token = tools.data.get("token"); -// // console.log(token, "token"); -// if (token == null) { -// ElMessage.error("请重新登录!"); -// window.location.href = -// "http://220.191.238.50:996/api/login?returnURL=" + window.location.href; -// } -// }); - const router = useRouter(); const routers = useRoute(); // 路由跳转 -const goto = (url) => { - router.push({ - path: `${url}`, - }); +const goto = (url, val) => { + console.log(val); + if (val.name == "最低生活保障") { + router.push({ + path: `${url}`, + }); + } else { + ElMessage.warning(`${val.name}暂无无数据!`); + } }; const data = reactive({ @@ -424,50 +423,55 @@ const data = reactive({ }, ], tabPublicService: [ - { - id: "0", - name: "最低生活保障", - Bj: Bj, - text: "我县在册低保对象7374户9463人,为低保对象发放最低生活保障金,2023年共支出低保金9912.65万元。", - progress: 95, //进度条 - }, - { - id: "1", - name: "重特困人员救助供养", - Bj: Bj1, - text: "我县特困供养对象329户331人,2023年支出特困供养经费722.29万元。", - progress: 95, //进度条 - }, - { - id: "2", - name: "医疗救助", - Bj: Bj2, - text: "我县医疗救助的对象为民攻部门认定的特困供养人员最低生活保障家庭成员、最低生活保障边缘家庭成员(包括纳入低保、低边的因病致贫等支出型贫困对象)。", - progress: 95, //进度条 - }, - { - id: "3", - name: "临时救助", - Bj: Bj3, - text: "为数助对象发放临时救助金,2023年共救助609户1036人,数助225.39万元。", - progress: 95, //进度条 - }, - { - id: "4", - name: "受灾人员救助", - Bj: Bj4, - text: "机构改革以来(2019年),我县自然灾害形势总体平稳,未发生因灾亡人事故。", - progress: 95, //进度条 - }, + // { + // id: "0", + // Bj: Bj, + // name: "最低生活保障", + // text: "我县在册低保对象7374户9463人,为低保对象发放最低生活保障金,2023年共支出低保金9912.65万元。", + // progress: 95, //进度条 + // }, + // { + // id: "1", + // name: "重特困人员救助供养", + // Bj: Bj1, + // text: "我县特困供养对象329户331人,2023年支出特困供养经费722.29万元。", + // progress: 95, //进度条 + // }, + // { + // id: "2", + // name: "医疗救助", + // Bj: Bj2, + // text: "我县医疗救助的对象为民攻部门认定的特困供养人员最低生活保障家庭成员、最低生活保障边缘家庭成员(包括纳入低保、低边的因病致贫等支出型贫困对象)。", + // progress: 95, //进度条 + // }, + // { + // id: "3", + // name: "临时救助", + // Bj: Bj3, + // text: "为数助对象发放临时救助金,2023年共救助609户1036人,数助225.39万元。", + // progress: 95, //进度条 + // }, + // { + // id: "4", + // name: "受灾人员救助", + // Bj: Bj4, + // text: "机构改革以来(2019年),我县自然灾害形势总体平稳,未发生因灾亡人事故。", + // progress: 95, //进度条 + // }, ], + Bj: [Bj, Bj1, Bj2, Bj3, Bj4], }); const tapshow = (parentId, childId) => { - // data.taps1 = parentId; - // data.taps = childId; + // console.log(parentId, childId, "菜单名"); + data.taps1 = parentId.id; + data.taps = childId; + getData(parentId.name, parentId.son[childId].name); }; const toggleVisibility = (val) => { + // console.log(val, "最低生活保障"); data.tabPosition.forEach((parent) => { + parent.visible = false; if (parent.id === val.id) { parent.visible = !parent.visible; } @@ -508,6 +512,39 @@ const rowState = (row) => { }; } }; +const getData = async (name, fullName) => { + await http + .get(`/api/ggfwyth/pg/jbggfw?mc=${name}&xm=${fullName}`) + .then((res) => { + if (res.code == 200) { + data.tabPublicService = []; + if (res.data.length > 0) { + res.data.forEach((item, index) => { + const imageIndex = index % data.Bj.length; + data.tabPublicService.push({ + id: index, + Bj: data.Bj[imageIndex], + name: item.sx, + text: item.bmfxqk, + progress: item.xh, + }); + }); + } + } + }); +}; + +onMounted(() => { + getData("弱有所扶", "社会救助服务"); +}); +// onMounted(() => { +// let token = tools.data.get("token"); +// if (token == null) { +// ElMessage.error("请重新登录!"); +// window.location.href = +// "http://220.191.238.50:996/api/login?returnURL=" + window.location.href; +// } +// });