This commit is contained in:
duanxiaohai 2024-08-06 11:25:30 +08:00
commit 1011b01aa7
5 changed files with 50 additions and 11 deletions

BIN
src/assets/person/back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -5,7 +5,17 @@
<img class="title" src="../assets/img_07.png" alt="" />
</div> -->
<Header />
<!-- <keep-alive include="首页地图">
<router-view />
</keep-alive> -->
<!-- <router-view v-slot="{ Component }">
<keep-alive>
<component :is="Component" />
</keep-alive>
</router-view> -->
<keep-alive :max="1" :include="['首页地图']">
<router-view />
</keep-alive>
</div>
</div>
</template>
@ -13,7 +23,7 @@
<script setup>
import Header from "../components/header.vue";
import { ref, onMounted, onBeforeMount ,watch, nextTick} from "vue";
import { ref, onMounted, onBeforeMount, watch, nextTick } from "vue";
import { useRouter, useRoute } from "vue-router";
const router = useRouter();
const routers = useRoute();
@ -21,9 +31,9 @@ console.log(routers.path);
watch(
() => routers.path,
(newVal, oldVal) => {
nextTick(()=>{
reset_font()
})
nextTick(() => {
reset_font();
});
}
);
const reset_font = () => {
@ -31,7 +41,6 @@ const reset_font = () => {
let height =
document.documentElement.clientHeight || document.body.clientHeight;
document.querySelector("#m").style.transformOrigin = "top left";
document.querySelector("#m").style.transform =
"scale(" + width / 1920 + "," + height / 1080 + ")";
@ -39,17 +48,14 @@ const reset_font = () => {
document.querySelector(".header_content").style.transformOrigin = "top left";
document.querySelector(".header_content").style.transform =
"scale(" + width / 1920 + "," + height / 1080 + ")";
if (
document.querySelector(".left")) {
if (document.querySelector(".left")) {
document.querySelector(".left").style.transformOrigin = "bottom left";
document.querySelector(".left").style.transform =
"scale(" + width / 1920 + "," + height / 1080 + ")";
document.querySelector(".right").style.transformOrigin = "bottom right";
document.querySelector(".right").style.transform =
"scale(" + width / 1920 + "," + height / 1080 + ")";
}
};
onMounted(() => {
reset_font();
@ -93,7 +99,6 @@ body {
overflow: hidden;
// position: absolute;
z-index: -1;
}
#emap {

View File

@ -89,6 +89,10 @@
<div class="main-tag-item">身后事</div>
<div class="main-tag-item">综合</div>
<div class="person-main-person"></div>
<div class="back" @click="back()">
<img src="@/assets/person/back.png" alt="" />
<p>返回</p>
</div>
</div>
<div class="person-side">
<div class="my-label">
@ -461,6 +465,9 @@ const getData = (nm, identNo) => {
// }
// });
// };
const back=()=>{
router.back()
}
onMounted(() => {
// console.log(routers.query);
if (routers.query.type == "map") {
@ -777,4 +784,30 @@ onMounted(() => {
}
}
}
.back {
box-sizing: border-box;
position: absolute;
width: 88px;
height: 36px;
top: 0px;
left: 30px;
background: url("../../assets/person/back_bg.png") no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
padding: 10px 16px;
z-index: 10;
cursor: pointer;
img {
width: 17px;
height: 16px;
}
p {
margin-left: 5px;
font-weight: 400;
font-size: 16px;
color: #b5eaff;
line-height: 22px;
}
}
</style>

View File

@ -179,6 +179,7 @@ import {
defineProps,
watch,
nextTick,
onActivated
} from "vue";
import { ElMessage } from "element-plus";
import tools from "@/utils/tools";