This commit is contained in:
commit
8ef61ca63d
|
@ -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>
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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> -->
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue