This commit is contained in:
duanxiaohai 2024-08-06 14:00:43 +08:00
commit 8ef61ca63d
5 changed files with 81 additions and 24 deletions

View File

@ -2,7 +2,7 @@
<teleport to="body"> <teleport to="body">
<div <div
class="header_content" class="header_content"
style="position: absolute; z-index: 999; width: 1920px" style="position: absolute; z-index: 9999; width: 1920px"
> >
<div class="header"> <div class="header">
<div class="headerGo" @click="to('/guide')"></div> <div class="headerGo" @click="to('/guide')"></div>

View File

@ -150,10 +150,11 @@ const emit = defineEmits(["close", "handle"]);
const handleRowClick = (row, column, event) => { const handleRowClick = (row, column, event) => {
// row // row
console.log(row); console.log(row);
router.push({ emit("openMessage", {nm: row.nm, identNo: row.identNo});
path: `/home/index/person`, // router.push({
query: {nm: row.nm, identNo: row.identNo,type:'map'}, // path: `/home/index/person`,
}); // query: {nm: row.nm, identNo: row.identNo,type:'map'},
// });
}; };
// //
const dialogShow = ref(); const dialogShow = ref();

View File

@ -5,14 +5,14 @@
<img class="title" src="../assets/img_07.png" alt="" /> <img class="title" src="../assets/img_07.png" alt="" />
</div> --> </div> -->
<Header /> <Header />
<!-- <keep-alive include="首页地图">
<router-view /> <router-view />
</keep-alive> -->
<router-view v-slot="{ Component }"> <!-- <router-view v-slot="{ Component }">
<keep-alive> <keep-alive>
<component :is="Component" /> <component :is="Component" />
</keep-alive> </keep-alive>
</router-view> </router-view> -->
<!-- <keep-alive :max="1" :include="['首页地图']"> <!-- <keep-alive :max="1" :include="['首页地图']">
<router-view /> <router-view />
</keep-alive> --> </keep-alive> -->

View File

@ -220,10 +220,20 @@
</template> </template>
<script setup> <script setup>
import { reactive, ref, onMounted } from "vue"; import { reactive, ref, onMounted, watch } from "vue";
import Dialog from "@/view/dialog/dialog.vue"; import Dialog from "@/view/dialog/dialog.vue";
import { useRouter, useRoute } from "vue-router"; import { useRouter, useRoute } from "vue-router";
import http from "@/utils/request.js"; import http from "@/utils/request.js";
const jump = ref("");
const props = defineProps({
message: {
type: Object,
default: () => {
return {};
},
},
});
const emit = defineEmits(["backMap"]);
const router = useRouter(); const router = useRouter();
const routers = useRoute(); const routers = useRoute();
const data = ref([ const data = ref([
@ -391,7 +401,6 @@ const tableType = reactive({
const onClickTag = (item) => { const onClickTag = (item) => {
dialogShow.value = true; dialogShow.value = true;
}; };
const paginationDialog = reactive({ const paginationDialog = reactive({
current: 1, current: 1,
pageSize: 5, pageSize: 5,
@ -404,6 +413,7 @@ const close = (pagination) => {
const handlePagination = (pagination) => { const handlePagination = (pagination) => {
dialogShow.value = false; dialogShow.value = false;
}; };
//
const getData = (nm, identNo) => { const getData = (nm, identNo) => {
http http
.get(`/api/ggfwyth/ysyzt/getRysmzqDetails?nm=${nm}&identNo=${identNo}`) .get(`/api/ggfwyth/ysyzt/getRysmzqDetails?nm=${nm}&identNo=${identNo}`)
@ -459,21 +469,27 @@ const getData = (nm, identNo) => {
// }); // });
// }; // };
const back = () => { const back = () => {
if (jump.value == "detail") {
router.back(); router.back();
};
// const back = () => {
// // sessionStorage.setItem('return',true);
// window.location.href = "javascript:history.back(-1)";
// };
onMounted(() => {
// console.log(routers.query);
if (routers.query.type == "map") {
getData(routers.query.nm, routers.query.identNo);
} else { } else {
// getData2(routers.query.nm, routers.query.identNo); emit("closeDetail");
}
};
watch(
() => props.message,
(newValue, oldValue) => {
getData(props.message.nm, props.message.identNo);
jump.value = "map";
}
);
onMounted(() => {
if (routers.query.type) {
baseInfo.value.nm = routers.query.nm; baseInfo.value.nm = routers.query.nm;
baseInfo.value.dz = routers.query.dz; baseInfo.value.dz = routers.query.dz;
baseInfo.value.identNo = routers.query.identNo; baseInfo.value.identNo = routers.query.identNo;
jump.value = "detail";
} else {
jump.value = "map";
} }
}); });
</script> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="module"> <div class="module">
<teleport to="body"> <teleport to="body">
<div id="map" style="width: 100vw; height: 100vh"></div> <div id="map" style="width: 100vw; height: 100vh" v-show="openD"></div>
<div class="left" style="width: 517px"> <div class="left" style="width: 517px">
<div class="lyx"> <div class="lyx">
<div class="title"> <div class="title">
@ -159,12 +159,20 @@
:pagination="pagination" :pagination="pagination"
@close="close" @close="close"
@handle="handlePagination" @handle="handlePagination"
@openMessage="openMessage"
> >
<template #jzzt="{ currentCol, currentData }"> <template #jzzt="{ currentCol, currentData }">
<div v-if="currentData.jzzt == 1">居住</div> <div v-if="currentData.jzzt == 1">居住</div>
<div v-else>未居住</div> <div v-else>未居住</div>
</template> </template>
</Dialog> </Dialog>
<personDetail
class="detail"
style="width: 1920px; height: 1080px"
v-show="!openD"
:message="message"
@closeDetail="closeDetail"
></personDetail>
</teleport> </teleport>
</div> </div>
</template> </template>
@ -179,7 +187,7 @@ import {
defineProps, defineProps,
watch, watch,
nextTick, nextTick,
onActivated onActivated,
} from "vue"; } from "vue";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import tools from "@/utils/tools"; import tools from "@/utils/tools";
@ -187,6 +195,7 @@ import initializeMap from "@/utils/mapInitializer.js";
import http from "@/utils/request.js"; import http from "@/utils/request.js";
import mapTown from "@/assets/json/ly.json"; import mapTown from "@/assets/json/ly.json";
// import xkz from "@/assets/json/xkz.json"; // import xkz from "@/assets/json/xkz.json";
import personDetail from "./person/index.vue";
import cssj from "@/assets/json/cssj.json"; import cssj from "@/assets/json/cssj.json";
import j0 from "@/assets/images/map/j0.png"; import j0 from "@/assets/images/map/j0.png";
import j1 from "@/assets/images/map/j1.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 AED from "@/assets/images/map/AED.png";
import Dialog from "./dialog/dialogMapDp.vue"; import Dialog from "./dialog/dialogMapDp.vue";
//--------------- //---------------
//
const openD = ref(true);
const message = ref({});
// //
const jdm_arr = ref([]); // const jdm_arr = ref([]); //
const jdm_number_arr = ref([]); //(+) const jdm_number_arr = ref([]); //(+)
@ -1771,6 +1783,19 @@ const handlePagination = (current) => {
} }
person_detail(age); 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) => { const person_detail = (age) => {
http http
@ -2862,6 +2887,17 @@ const reset_font = () => {
"scale(" + width / 1920 + "," + height / 1080 + ")"; "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(() => { onMounted(() => {
// tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d"); // tools.data.set("token", "6b0e380b4a8f46baae4923f83faf670d");
reset_font(); reset_font();
@ -2869,6 +2905,7 @@ onMounted(() => {
getData(); getData();
getDataBq(); getDataBq();
BMAP(); BMAP();
}); });
</script> </script>
@ -3483,4 +3520,7 @@ onMounted(() => {
:deep(.el-table .el-table__row) { :deep(.el-table .el-table__row) {
border-bottom: none; border-bottom: none;
} }
.detail {
z-index: 9998;
}
</style> </style>