From ac2f915c9f258d5f18bb61bd97c88d6e825131d1 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Fri, 18 Oct 2024 16:50:15 +0800 Subject: [PATCH] gx --- src/utils/request.js | 2 +- src/view/sy_map.vue | 33 +++++++++++++++++++-------------- vite.config.js | 4 ++-- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 1ed898f..2b1936a 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -3,7 +3,7 @@ import { ElMessage } from "element-plus"; import tools from "@/utils/tools"; import router from "../router"; -axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' +// axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' axios.defaults.timeout = 120000; // HTTP request 拦截器 diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 50a5631..6dd34b6 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -264,7 +264,7 @@ /> { } else { zyysCenter.length = 0; zyysDk.length = 0; - await get_dk_zyys(polygon.fgfwrs, polygon.startAge, polygon.endAge); + await get_dk_zyys(polygon.fgfwrs,polygon.lb); xr_dk_center_zyys(); } @@ -3003,7 +3003,7 @@ const loadCs_zyys = async (name) => { } } }; -const get_dk_zyys = async (sj, start, end) => { +const get_dk_zyys = async (sj,xd) => { zyys_dk.value.length = 0; zyys_center.value.length = 0; zyys_data.value.point.length = 0; @@ -3020,20 +3020,23 @@ const get_dk_zyys = async (sj, start, end) => { sj.forEach((item, index) => { zyysDk.forEach((dk) => { if (item.committee == dk.name) { - zyys_data.value.point.push(dk); + let a={ + ...dk, + zt:item.zt + } + zyys_data.value.point.push(a); } }); zyysCenter.forEach((center) => { if (item.committee == center.name) { - let a = { + let b = { ...center, num: item.num, town: item.town, committee: item.committee, - startAge: start, - endAge: end, + xd: xd, }; - zyys_data.value.center.push(a); + zyys_data.value.center.push(b); } }); }); @@ -3041,6 +3044,10 @@ const get_dk_zyys = async (sj, start, end) => { //资源要素(渲染地块) const xr_dk_center_zyys = async () => { zyys_data.value.point.map((item, index) => { + let color="blue"; + if(item.zt>0){ + color="green"; + } let points = []; item.point[0].map((p) => points.push(new BMapGL.Point(...p))); if (points.length) { @@ -3049,7 +3056,7 @@ const xr_dk_center_zyys = async () => { strokeColor: "blue", strokeWeight: 2, strokeOpacity: 0.8, - fillColor: "blue", + fillColor: color, fillOpacity: 0.3, zIndex: 5, }); @@ -3065,8 +3072,7 @@ const xr_dk_center_zyys = async () => { const zyys_table = reactive({ town: "", committee: "", - startAge: "", - endAge: "", + xd: "", }); const Xr_zyysNum = (polygon, indexx) => { function createLabelDOM() { @@ -3137,8 +3143,7 @@ const Xr_zyysNum = (polygon, indexx) => { tableType.columns = table_column_list.zxs; zyys_table.town = polygon.town; zyys_table.committee = polygon.committee; - zyys_table.startAge = polygon.startAge; - zyys_table.endAge = polygon.endAge; + zyys_table.xd = polygon.xd; open_detail_zyys(); }); }; @@ -3146,7 +3151,7 @@ const open_detail_zyys = () => { dialogShow.value = true; http .get( - `/api/ggfwyth/ysyzt/getRyJbxxList?page=${pagination.currentPage}&size=${pagination.pageSize}&committee=${zyys_table.committee}&town=${zyys_table.town}&startAge=${zyys_table.startAge}&endAge=${zyys_table.endAge}` + `/api/ggfwyth/ysyzt/getRyJbxxList?page=${pagination.currentPage}&size=${pagination.pageSize}&committee=${zyys_table.committee}&town=${zyys_table.town}&xd=${zyys_table.xd}` ) .then((res) => { if (res.code == 200) { diff --git a/vite.config.js b/vite.config.js index be26ac7..5c41c63 100644 --- a/vite.config.js +++ b/vite.config.js @@ -15,8 +15,8 @@ export default defineConfig({ // 第一个代理 "/api": { // 匹配到啥来进行方向代理 - // target: "http://10.0.0.7:8095/", //刘进 - target: "https://jzzf.longyou.gov.cn:998/", //线上 + target: "http://10.0.0.7:8095/", //刘进 + // target: "https://jzzf.longyou.gov.cn:998/", //线上 // target: "http://220.191.238.50:996/", //线上 // target: "https://zzdyyfb.dsjj.qz.gov.cn/web/mgop/gov-open/zj/2002428903/reserved/", //线上 changeOrigin: true, //是否支持跨域