|
@@ -1,5 +1,6 @@
|
|
|
<script setup>
|
|
|
import {ref} from "vue";
|
|
|
+import {queryMapTree} from '@/service/cim/cim'
|
|
|
import condition from './template/condition.vue'
|
|
|
import weather from './template/weather.vue'
|
|
|
|
|
@@ -11,6 +12,8 @@ const menuIndex = ref(0)
|
|
|
// 工具栏选中key
|
|
|
const utilToolIndex = ref(0)
|
|
|
|
|
|
+const layerData = ref([])
|
|
|
+
|
|
|
const layerFlag = ref(false)
|
|
|
const weatherFlag = ref(false)
|
|
|
|
|
@@ -32,19 +35,22 @@ function handleUtilMenuSelect(key, keyPath) {
|
|
|
utilToolIndex.value = key
|
|
|
}
|
|
|
|
|
|
-// 根据参数选择模板
|
|
|
-function componentDisplayFlag(type, flag) {
|
|
|
- switch (type) {
|
|
|
- case 'parameter' :
|
|
|
- layerFlag.value = !flag;
|
|
|
- weatherFlag.value = false
|
|
|
- break;
|
|
|
- case 'weather' :
|
|
|
- weatherFlag.value = !flag;
|
|
|
- layerFlag.value = false;
|
|
|
- break;
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
+// 打开天气组件
|
|
|
+function openWeatherFlag(flag) {
|
|
|
+ weatherFlag.value = flag;
|
|
|
+}
|
|
|
+
|
|
|
+// 打开参数组件
|
|
|
+function openDisplayFlag(flag) {
|
|
|
+ layerFlag.value = flag;
|
|
|
+ queryMapTree('二维', '1317').then(response => {
|
|
|
+ console.log(response.data.Rows[0].children, 123123);
|
|
|
+ layerData.value = response.data.Rows[0].children[0].children
|
|
|
+ }).catch(error => {
|
|
|
+ console.error("Error fetching queryMapTree:", error);
|
|
|
+ });
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -54,9 +60,15 @@ function componentDisplayFlag(type, flag) {
|
|
|
<div id="div-head">
|
|
|
<p class="font-ht title-font">上海CIM平台</p>
|
|
|
</div>
|
|
|
- <!-- 侧边工具栏 -->
|
|
|
- <div id="div-right-side">
|
|
|
|
|
|
+ <!-- 待接入视频流 -->
|
|
|
+ <div>
|
|
|
+ <iframe
|
|
|
+ id="layerIframe"
|
|
|
+ style="pointer-events: auto;"
|
|
|
+ src="https://zh.wikipedia.org/wiki/Wikipedia"
|
|
|
+ >
|
|
|
+ </iframe>
|
|
|
</div>
|
|
|
<!-- 底部工具栏 -->
|
|
|
<div id="div-bottom">
|
|
@@ -64,13 +76,16 @@ function componentDisplayFlag(type, flag) {
|
|
|
@select="handleMenuSelect">
|
|
|
<el-menu-item :index="1">
|
|
|
<!-- 总体态势 -->
|
|
|
- <img src="../../assets/imgs/cim/overallSituation1.png" v-if="menuIndex != 1">
|
|
|
- <img class="img-select" src="../../assets/imgs/cim/overallSituation2.png" v-if="menuIndex == 1">
|
|
|
+ <img @click="openDisplayFlag(true)" src="../../assets/imgs/cim/overallSituation1.png" v-if="menuIndex != 1">
|
|
|
+ <img @click="openDisplayFlag(false)" class="img-select" src="../../assets/imgs/cim/overallSituation2.png"
|
|
|
+ v-if="menuIndex == 1">
|
|
|
</el-menu-item>
|
|
|
<el-menu-item :index="2">
|
|
|
<!-- 实时感知 -->
|
|
|
- <img src="../../assets/imgs/cim/perception1.png" v-if="menuIndex != 2">
|
|
|
- <img class="img-select" src="../../assets/imgs/cim/perception2.png" v-if="menuIndex == 2">
|
|
|
+ <img src="../../assets/imgs/cim/perception1.png" v-if="menuIndex != 2"
|
|
|
+ @click="openDisplayFlag(true)">
|
|
|
+ <img class="img-select" src="../../assets/imgs/cim/perception2.png" v-if="menuIndex == 2"
|
|
|
+ @click="openDisplayFlag(false)">
|
|
|
</el-menu-item>
|
|
|
<el-menu-item :index="3">
|
|
|
<!-- 车辆仿真模拟 -->
|
|
@@ -79,64 +94,67 @@ function componentDisplayFlag(type, flag) {
|
|
|
</el-menu-item>
|
|
|
<el-menu-item :index="4">
|
|
|
<!-- 工地管理 -->
|
|
|
- <img src="../../assets/imgs/cim/construction1.png" v-if="menuIndex != 4">
|
|
|
- <img class="img-select" src="../../assets/imgs/cim/construction2.png" v-if="menuIndex == 4">
|
|
|
+ <img @click="openDisplayFlag(true)" src="../../assets/imgs/cim/construction1.png" v-if="menuIndex != 4">
|
|
|
+ <img @click="openDisplayFlag(false)" class="img-select" src="../../assets/imgs/cim/construction2.png"
|
|
|
+ v-if="menuIndex == 4">
|
|
|
</el-menu-item>
|
|
|
</el-menu>
|
|
|
</div>
|
|
|
|
|
|
- <div>
|
|
|
- <!-- 这里用布局只是为了让成为行内块,display修改样式和里面子组件会有问题-->
|
|
|
- <el-row>
|
|
|
- <el-col :span="8">
|
|
|
- <condition v-if="layerFlag"/>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <weather v-if="weatherFlag"/>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <!-- 工具栏具体内容 -->
|
|
|
- <div style=" position: fixed; right: 20px;">
|
|
|
- <el-menu @select="handleUtilMenuSelect" background-color="transparent" :collapse="true">
|
|
|
- <el-menu-item :index="1">
|
|
|
- <!-- 图层 -->
|
|
|
- <img src="../../assets/imgs/cim/layer1.png" v-if="utilToolIndex != 1" @click="componentDisplayFlag('parameter',layerFlag)">
|
|
|
- <img src="../../assets/imgs/cim/layer2.png" v-if="utilToolIndex == 1" @click="componentDisplayFlag('parameter',layerFlag)">
|
|
|
- </el-menu-item>
|
|
|
- <el-menu-item :index="2">
|
|
|
- <!-- 天气 -->
|
|
|
- <img src="../../assets/imgs/cim/weather1.png" v-if="utilToolIndex != 2" @click="componentDisplayFlag('weather',weatherFlag)">
|
|
|
- <img src="../../assets/imgs/cim/weather2.png" v-if="utilToolIndex == 2" @click="componentDisplayFlag('weather',weatherFlag)">
|
|
|
- </el-menu-item>
|
|
|
- <el-menu-item :index="3">
|
|
|
- <!-- 侧面 -->
|
|
|
- <img src="../../assets/imgs/cim/measureSurface1.png" v-if="utilToolIndex != 3">
|
|
|
- <img src="../../assets/imgs/cim/measureSurface2.png" v-if="utilToolIndex == 3">
|
|
|
- </el-menu-item>
|
|
|
- <el-menu-item :index="4">
|
|
|
- <!-- 测距 -->
|
|
|
- <img src="../../assets/imgs/cim/ranging1.png" v-if="utilToolIndex != 4">
|
|
|
- <img src="../../assets/imgs/cim/ranging2.png" v-if="utilToolIndex == 4">
|
|
|
- </el-menu-item>
|
|
|
- <el-menu-item :index="5">
|
|
|
- <!-- 限高 -->
|
|
|
- <img src="../../assets/imgs/cim/heightLimit1.png" v-if="utilToolIndex != 5">
|
|
|
- <img src="../../assets/imgs/cim/heightLimit2.png" v-if="utilToolIndex == 5">
|
|
|
- </el-menu-item>
|
|
|
- </el-menu>
|
|
|
-
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <!-- 工具栏具体内容 -->
|
|
|
+ <condition :data="layerData" v-if="layerFlag"/>
|
|
|
+
|
|
|
+ <weather v-if="weatherFlag"/>
|
|
|
+
|
|
|
+ <div id="toolbar" style=" position: fixed; right: 20px;">
|
|
|
+ <el-menu @select="handleUtilMenuSelect" background-color="transparent" :collapse="true">
|
|
|
+ <el-menu-item :index="1">
|
|
|
+ <!-- 图层 -->
|
|
|
+ <img src="../../assets/imgs/cim/layer1.png" v-if="utilToolIndex != 1"
|
|
|
+ @click="openDisplayFlag(true)">
|
|
|
+ <img src="../../assets/imgs/cim/layer2.png" v-if="utilToolIndex == 1"
|
|
|
+ @click="openDisplayFlag(false)">
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item :index="2">
|
|
|
+ <!-- 天气 -->
|
|
|
+ <img src="../../assets/imgs/cim/weather1.png" v-if="utilToolIndex != 2"
|
|
|
+ @click="openWeatherFlag(true)">
|
|
|
+ <img src="../../assets/imgs/cim/weather2.png" v-if="utilToolIndex == 2"
|
|
|
+ @click="openWeatherFlag(false)">
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item :index="3">
|
|
|
+ <!-- 侧面 -->
|
|
|
+ <img src="../../assets/imgs/cim/measureSurface1.png" v-if="utilToolIndex != 3">
|
|
|
+ <img src="../../assets/imgs/cim/measureSurface2.png" v-if="utilToolIndex == 3">
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item :index="4">
|
|
|
+ <!-- 测距 -->
|
|
|
+ <img src="../../assets/imgs/cim/ranging1.png" v-if="utilToolIndex != 4">
|
|
|
+ <img src="../../assets/imgs/cim/ranging2.png" v-if="utilToolIndex == 4">
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item :index="5">
|
|
|
+ <!-- 限高 -->
|
|
|
+ <img src="../../assets/imgs/cim/heightLimit1.png" v-if="utilToolIndex != 5">
|
|
|
+ <img src="../../assets/imgs/cim/heightLimit2.png" v-if="utilToolIndex == 5">
|
|
|
+ </el-menu-item>
|
|
|
+ </el-menu>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+#layerIframe {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ border: none;
|
|
|
+}
|
|
|
+
|
|
|
#div-background {
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
- background-image: url("@/assets/imgs/c062ae27629793.5b1edef82bc7a.jpg");
|
|
|
|
|
|
#div-bottom {
|
|
|
background-image: url("@/assets/imgs/cim/lowerBase.png");
|
|
@@ -145,6 +163,9 @@ function componentDisplayFlag(type, flag) {
|
|
|
#div-head {
|
|
|
background-image: url("@/assets/imgs/cim/bigTitle.png");
|
|
|
}
|
|
|
+
|
|
|
+ #toolbar {
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 侧边样式
|