174 lines
4.6 KiB
Vue
174 lines
4.6 KiB
Vue
<template>
|
|
<!-- <div class="main-content"> -->
|
|
<div class="orderBgc" v-if="screenValue == 0">
|
|
<div class="change-btn">
|
|
<el-button type="primary" @click="changeScreen">切换驾驶舱</el-button>
|
|
</div>
|
|
<!-- <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> -->
|
|
<!-- 百度地图版本 -->
|
|
<BDmaps class="mapStyle" :projectData="projectData" v-if="mapValue == 0"></BDmaps>
|
|
<BDmaps3D class="mapStyle" :projectData="projectData" v-if="mapValue == 1"></BDmaps3D>
|
|
<!-- <headerScreen class="topHeader"></headerScreen> -->
|
|
<leftScreen class="leftScreen"></leftScreen>
|
|
<centerScreen class="centerScreen"></centerScreen>
|
|
<rightScreen class="rightScreen"></rightScreen>
|
|
<!-- <div class="bottomContent"></div> -->
|
|
<div class="mapChange">
|
|
<div @click="changeMap(0)">地图1</div>
|
|
<div @click="changeMap(1)">地图2</div>
|
|
</div>
|
|
<!-- <div class="borderBottom"></div> -->
|
|
</div>
|
|
<!-- <div class="screenTwo" v-if="screenValue == 1">
|
|
<div class="change-btn">
|
|
<el-button type="primary" @click="changeScreen">切换驾驶舱</el-button>
|
|
</div>
|
|
<largeScreenTwo></largeScreenTwo>
|
|
</div> -->
|
|
<!-- </div> -->
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { onMounted, ref } from "vue";
|
|
import { useRoute, useRouter } from "vue-router";
|
|
import headerScreen from "./components/header.vue";
|
|
import centerScreen from "./components/center.vue";
|
|
import leftScreen from "./components/left.vue";
|
|
import rightScreen from "./components/right.vue";
|
|
// import Map3D from "./components/map3D.vue";
|
|
import Map2D from "./components/map2D.vue";
|
|
import Map3DStyle from "./components/Map3DStyle.vue";
|
|
import maps from "./components/maps.vue";
|
|
import maps3D from "./components/maps3D.vue";
|
|
import BDmaps from "./components/BDmaps.vue";
|
|
import BDmaps3D from "./components/BDmaps3D.vue";
|
|
import largeScreenTwo from "../largeScreenTwo/index.vue";
|
|
import { GlobalStore } from "@/stores";
|
|
import { sendIframeMessage } from "@/utils/util";
|
|
import { getproNamelist } from "@/api/modules/goverment";
|
|
const route = useRoute();
|
|
const router = useRouter();
|
|
const globalStore = GlobalStore();
|
|
//获取项目信息
|
|
const projectData = ref([]);
|
|
const screenValue = ref(0);
|
|
const mapValue = ref(0);
|
|
const changeMap = (val: any) => {
|
|
mapValue.value = val;
|
|
};
|
|
const changeScreen = () => {
|
|
console.log(route);
|
|
router.push("/goverment/huizhou/largeScreen/largeScreenTwo/index");
|
|
// screenValue.value = screenValue.value == 0 ? 1 : 0;
|
|
};
|
|
const getProjectList = async () => {
|
|
const res = await getproNamelist({});
|
|
if (res && res.result && res.result.length > 0) {
|
|
projectData.value = res.result;
|
|
}
|
|
console.log(res, "66-----");
|
|
};
|
|
onMounted(async () => {
|
|
await getProjectList();
|
|
await sendIframeMessage({ path: globalStore.path, moduleId: globalStore.moduleId }, 2, undefined);
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.orderBgc {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
|
|
.change-btn {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
z-index: 100;
|
|
:deep(.el-button) {
|
|
background-color: transparent;
|
|
}
|
|
}
|
|
.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%));
|
|
}
|
|
.mapChange {
|
|
position: absolute;
|
|
left: calc(50% - 132px);
|
|
bottom: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
z-index: 10;
|
|
div {
|
|
width: 106px;
|
|
height: 36px;
|
|
color: white;
|
|
font-size: 20px;
|
|
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%;
|
|
}
|
|
}
|
|
.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%;
|
|
}
|
|
}
|
|
.screenTwo {
|
|
position: relative;
|
|
.change-btn {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
z-index: 100;
|
|
:deep(.el-button) {
|
|
background-color: transparent;
|
|
}
|
|
}
|
|
}
|
|
</style>
|