2023-06-19 15:37:14 +08:00
|
|
|
<template>
|
2023-07-09 21:47:26 +08:00
|
|
|
<!-- <div class="main-content"> -->
|
2023-07-02 11:50:09 +08:00
|
|
|
<div class="orderBgc" v-if="screenValue == 0">
|
2023-07-09 21:47:26 +08:00
|
|
|
<div class="change-btn">
|
|
|
|
|
<el-button type="primary" @click="changeScreen">切换驾驶舱</el-button>
|
|
|
|
|
</div>
|
2023-07-06 22:26:40 +08:00
|
|
|
<!-- <Map2D class="mapStyle" v-if="mapValue == 0"></Map2D> -->
|
|
|
|
|
<!-- <Map3DStyle class="mapStyle" v-if="mapValue == 1"></Map3DStyle> -->
|
|
|
|
|
<maps class="mapStyle" :projectData="projectData" v-if="mapValue == 0"></maps>
|
|
|
|
|
<maps3D class="mapStyle" :projectData="projectData" v-if="mapValue == 1"></maps3D>
|
2023-06-20 19:58:03 +08:00
|
|
|
<!-- <headerScreen class="topHeader"></headerScreen> -->
|
2023-07-14 17:54:21 +08:00
|
|
|
<leftScreen class="leftScreen"></leftScreen>
|
|
|
|
|
<centerScreen class="centerScreen"></centerScreen>
|
|
|
|
|
<rightScreen class="rightScreen"></rightScreen>
|
|
|
|
|
<!-- <div class="bottomContent"></div> -->
|
2023-07-02 11:50:09 +08:00
|
|
|
<div class="mapChange">
|
2023-07-03 14:50:50 +08:00
|
|
|
<div @click="changeMap(0)">地图1</div>
|
|
|
|
|
<div @click="changeMap(1)">地图2</div>
|
2023-07-02 11:50:09 +08:00
|
|
|
</div>
|
2023-06-20 19:58:03 +08:00
|
|
|
<!-- <div class="borderBottom"></div> -->
|
|
|
|
|
</div>
|
2023-07-14 17:54:21 +08:00
|
|
|
<!-- <div class="screenTwo" v-if="screenValue == 1">
|
2023-07-09 21:47:26 +08:00
|
|
|
<div class="change-btn">
|
|
|
|
|
<el-button type="primary" @click="changeScreen">切换驾驶舱</el-button>
|
|
|
|
|
</div>
|
2023-07-02 11:50:09 +08:00
|
|
|
<largeScreenTwo></largeScreenTwo>
|
2023-07-14 17:54:21 +08:00
|
|
|
</div> -->
|
2023-07-09 21:47:26 +08:00
|
|
|
<!-- </div> -->
|
2023-06-19 15:37:14 +08:00
|
|
|
</template>
|
|
|
|
|
|
2023-06-20 19:58:03 +08:00
|
|
|
<script lang="ts" setup>
|
2023-07-02 11:50:09 +08:00
|
|
|
import { onMounted, ref } from "vue";
|
2023-07-14 17:54:21 +08:00
|
|
|
import { useRoute, useRouter } from "vue-router";
|
2023-06-20 19:58:03 +08:00
|
|
|
import headerScreen from "./components/header.vue";
|
|
|
|
|
import centerScreen from "./components/center.vue";
|
|
|
|
|
import leftScreen from "./components/left.vue";
|
|
|
|
|
import rightScreen from "./components/right.vue";
|
2023-07-03 14:50:50 +08:00
|
|
|
// import Map3D from "./components/map3D.vue";
|
2023-06-20 19:58:03 +08:00
|
|
|
import Map2D from "./components/map2D.vue";
|
2023-07-03 14:50:50 +08:00
|
|
|
import Map3DStyle from "./components/Map3DStyle.vue";
|
2023-07-06 22:26:40 +08:00
|
|
|
import maps from "./components/maps.vue";
|
|
|
|
|
import maps3D from "./components/maps3D.vue";
|
2023-07-02 11:50:09 +08:00
|
|
|
import largeScreenTwo from "../largeScreenTwo/index.vue";
|
2023-07-14 17:54:21 +08:00
|
|
|
import { GlobalStore } from "@/stores";
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
const globalStore = GlobalStore();
|
2023-07-06 22:26:40 +08:00
|
|
|
//获取项目信息
|
|
|
|
|
const projectData = ref({
|
|
|
|
|
latitude: "",
|
|
|
|
|
longitude: "",
|
|
|
|
|
totalDay: ""
|
|
|
|
|
});
|
2023-07-02 11:50:09 +08:00
|
|
|
const screenValue = ref(0);
|
|
|
|
|
const mapValue = ref(0);
|
2023-07-03 14:50:50 +08:00
|
|
|
const changeMap = (val: any) => {
|
|
|
|
|
mapValue.value = val;
|
2023-07-02 11:50:09 +08:00
|
|
|
};
|
2023-07-14 17:54:21 +08:00
|
|
|
const changeScreen = async () => {
|
|
|
|
|
console.log(route);
|
|
|
|
|
console.log({ path: globalStore.path, moduleId: globalStore.moduleId });
|
|
|
|
|
await sendMessage({ path: globalStore.path, moduleId: globalStore.moduleId }, 2);
|
|
|
|
|
// router.push("/goverment/huizhou/largeScreen/largeScreenTwo/index");
|
|
|
|
|
// screenValue.value = screenValue.value == 0 ? 1 : 0;
|
|
|
|
|
};
|
|
|
|
|
const sendMessage = (msg: any, type: any, iframeEle: any | undefined) => {
|
|
|
|
|
console.log(666);
|
|
|
|
|
if (type === 1) {
|
|
|
|
|
// 父 => 子
|
|
|
|
|
iframeEle.contentWindow.postMessage(msg, "*");
|
|
|
|
|
} else if (type === 2) {
|
|
|
|
|
// 子 => 父
|
|
|
|
|
window.parent.postMessage(msg, "*");
|
|
|
|
|
}
|
|
|
|
|
console.log(777);
|
2023-07-02 11:50:09 +08:00
|
|
|
};
|
2023-06-19 15:37:14 +08:00
|
|
|
</script>
|
2023-06-20 19:58:03 +08:00
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.orderBgc {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: relative;
|
2023-07-09 21:47:26 +08:00
|
|
|
|
|
|
|
|
.change-btn {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
z-index: 100;
|
|
|
|
|
:deep(.el-button) {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-06-20 19:58:03 +08:00
|
|
|
.mapStyle {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
.topHeader {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 15%;
|
|
|
|
|
|
|
|
|
|
// background: linear-gradient(to right, rgb(17 20 25 / 60%), rgb(17 20 25 / 20%), rgb(17 20 25 / 60%));
|
|
|
|
|
}
|
2023-07-02 11:50:09 +08:00
|
|
|
.mapChange {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: calc(50% - 132px);
|
|
|
|
|
bottom: 20px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
div {
|
|
|
|
|
width: 106px;
|
|
|
|
|
height: 36px;
|
|
|
|
|
color: white;
|
2023-07-14 17:54:21 +08:00
|
|
|
font-size: 20px;
|
2023-07-02 11:50:09 +08:00
|
|
|
line-height: 36px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
div:first-child {
|
|
|
|
|
background: url("@/assets/images/screenImg/mapImg/mapIcon1.png") no-repeat 0 0;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
margin-right: 20px;
|
|
|
|
|
}
|
|
|
|
|
div:last-child {
|
|
|
|
|
background: url("@/assets/images/screenImg/mapImg/mapIcon2.png") no-repeat 0 0;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-06-20 19:58:03 +08:00
|
|
|
.bottomContent {
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
.leftScreen {
|
|
|
|
|
flex: 2.5;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
.centerScreen {
|
|
|
|
|
flex: 5;
|
|
|
|
|
height: 100px;
|
|
|
|
|
}
|
|
|
|
|
.rightScreen {
|
|
|
|
|
flex: 2.5;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.borderBottom {
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 6%;
|
|
|
|
|
background: url("@/assets/images/screenImg/bottomBorder.png") no-repeat center bottom;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-09 21:47:26 +08:00
|
|
|
.screenTwo {
|
|
|
|
|
position: relative;
|
|
|
|
|
.change-btn {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
z-index: 100;
|
|
|
|
|
:deep(.el-button) {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-06-20 19:58:03 +08:00
|
|
|
</style>
|