diff --git a/src/components/header.vue b/src/components/header.vue index 635e565..5efaa2a 100644 --- a/src/components/header.vue +++ b/src/components/header.vue @@ -2,7 +2,7 @@
diff --git a/src/view/dialog/dialogMapDp.vue b/src/view/dialog/dialogMapDp.vue index 179dcea..e351c81 100644 --- a/src/view/dialog/dialogMapDp.vue +++ b/src/view/dialog/dialogMapDp.vue @@ -150,10 +150,11 @@ const emit = defineEmits(["close", "handle"]); const handleRowClick = (row, column, event) => { // row 是当前行的数据 console.log(row); - router.push({ - path: `/home/index/person`, - query: {nm: row.nm, identNo: row.identNo,type:'map'}, - }); + emit("openMessage", {nm: row.nm, identNo: row.identNo}); + // router.push({ + // path: `/home/index/person`, + // query: {nm: row.nm, identNo: row.identNo,type:'map'}, + // }); }; // 详情弹框 const dialogShow = ref(); diff --git a/src/view/home.vue b/src/view/home.vue index f226580..f091900 100644 --- a/src/view/home.vue +++ b/src/view/home.vue @@ -5,17 +5,17 @@
-->
- + - +
diff --git a/src/view/person/index.vue b/src/view/person/index.vue index 4f2cc39..01354fc 100644 --- a/src/view/person/index.vue +++ b/src/view/person/index.vue @@ -1,7 +1,5 @@ diff --git a/src/view/sy_mapcopy.vue b/src/view/sy_mapcopy.vue index 11a8aa4..d5ddd0f 100644 --- a/src/view/sy_mapcopy.vue +++ b/src/view/sy_mapcopy.vue @@ -1,7 +1,7 @@ @@ -179,7 +187,7 @@ import { defineProps, watch, nextTick, - onActivated + onActivated, } from "vue"; import { ElMessage } from "element-plus"; import tools from "@/utils/tools"; @@ -187,6 +195,7 @@ import initializeMap from "@/utils/mapInitializer.js"; import http from "@/utils/request.js"; import mapTown from "@/assets/json/ly.json"; // import xkz from "@/assets/json/xkz.json"; +import personDetail from "./person/index.vue"; import cssj from "@/assets/json/cssj.json"; import j0 from "@/assets/images/map/j0.png"; import j1 from "@/assets/images/map/j1.png"; @@ -216,6 +225,9 @@ import xcbg from "@/assets/images/map/xcbg.png"; import AED from "@/assets/images/map/AED.png"; import Dialog from "./dialog/dialogMapDp.vue"; //--------定义参数------- +//是否打开人物详情 +const openD = ref(true); +const message = ref({}); //存放渲染的地块及图标的数组 const jdm_arr = ref([]); //街道名 const jdm_number_arr = ref([]); //街道名(+数量) @@ -1771,6 +1783,19 @@ const handlePagination = (current) => { } person_detail(age); }; +//打开人物详情页面 +const openMessage = (e) => { + message.value = e; + openD.value = false; + reset_font2(); + //监听实现人物详情动态缩放 + window.addEventListener('resize', reset_font2); +}; +//关闭人物详情页面 +const closeDetail = () => { + openD.value = true; + window.removeEventListener('resize', reset_font2); +}; //获取人口详情接口 const person_detail = (age) => { http @@ -2862,6 +2887,17 @@ const reset_font = () => { "scale(" + width / 1920 + "," + height / 1080 + ")"; } }; +const reset_font2 = () => { + console.log(111111); + + let width = document.documentElement.clientWidth || document.body.clientWidth; + let height = + document.documentElement.clientHeight || document.body.clientHeight; + + document.querySelector(".detail").style.transformOrigin = "top left"; + document.querySelector(".detail").style.transform = + "scale(" + width / 1920 + "," + height / 1080 + ")"; +}; onMounted(() => { // tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d"); reset_font(); @@ -2869,6 +2905,7 @@ onMounted(() => { getData(); getDataBq(); BMAP(); + }); @@ -3483,4 +3520,7 @@ onMounted(() => { :deep(.el-table .el-table__row) { border-bottom: none; } +.detail { + z-index: 9998; +}