174 lines
4.6 KiB
Vue
Raw Normal View History

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> -->
2023-07-15 17:38:42 +08:00
<!-- 高德地图版本 -->
<!-- <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>
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-15 17:38:42 +08:00
import BDmaps from "./components/BDmaps.vue";
import BDmaps3D from "./components/BDmaps3D.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";
2023-07-14 18:44:39 +08:00
import { sendIframeMessage } from "@/utils/util";
import { getproNamelist } from "@/api/modules/goverment";
2023-07-14 17:54:21 +08:00
const route = useRoute();
const router = useRouter();
const globalStore = GlobalStore();
2023-07-06 22:26:40 +08:00
//获取项目信息
2023-07-14 18:44:39 +08:00
const projectData = ref([]);
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 18:44:39 +08:00
const changeScreen = () => {
2023-07-14 17:54:21 +08:00
console.log(route);
2023-07-14 18:44:39 +08:00
router.push("/goverment/huizhou/largeScreen/largeScreenTwo/index");
2023-07-14 17:54:21 +08:00
// screenValue.value = screenValue.value == 0 ? 1 : 0;
};
2023-07-14 18:44:39 +08:00
const getProjectList = async () => {
const res = await getproNamelist({});
if (res && res.result && res.result.length > 0) {
projectData.value = res.result;
2023-07-14 17:54:21 +08:00
}
2023-07-14 18:44:39 +08:00
console.log(res, "66-----");
2023-07-02 11:50:09 +08:00
};
2023-07-14 18:44:39 +08:00
onMounted(async () => {
await getProjectList();
await sendIframeMessage({ path: globalStore.path, moduleId: globalStore.moduleId }, 2, undefined);
});
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;
2023-07-15 17:38:42 +08:00
z-index: 10;
2023-07-02 11:50:09 +08:00
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>