|
@@ -2,25 +2,31 @@
|
|
|
<div class="home">
|
|
|
<Header></Header>
|
|
|
<Map />
|
|
|
- <div :class="{ 'yjdp-btn': true, isActive: yjdpShow }" @click="addyjdp">沿街店铺</div>
|
|
|
- <div :class="{ 'kzdp-btn': true, isActive: kzdpShow }" @click="addkzdp">空置店铺</div>
|
|
|
- <div class="yhfk-btn" @click="openYHFK">用户反馈</div>
|
|
|
+
|
|
|
+ <div :class="{ 'yjdp-btn': true, isActive: yjdpShow }" @click="addyjdp" v-if="!isMobile">沿街店铺</div>
|
|
|
+ <div :class="{ 'kzdp-btn': true, isActive: kzdpShow }" @click="addkzdp" v-if="!isMobile">空置店铺</div>
|
|
|
+ <div class="yhfk-btn" @click="openYHFK" v-if="!isMobile">用户反馈</div>
|
|
|
+ <div :class="{ 'yjdp-btn-mb': true, isActive: yjdpShow }" @click="addyjdp" v-if="isMobile">沿街店铺</div>
|
|
|
+ <div :class="{ 'kzdp-btn-mb': true, isActive: kzdpShow }" @click="addkzdp" v-if="isMobile">空置店铺</div>
|
|
|
+ <div class="yhfk-btn-mb" @click="openYHFK" v-if="isMobile">用户反馈</div>
|
|
|
<!-- 智小青 -->
|
|
|
- <div class="zxq-btn" @click="openZXQ"></div>
|
|
|
+ <div class="zxq-btn" @click="openZXQ" v-if="!isMobile"></div>
|
|
|
+ <div class="zxq-btn-mb" @click="openZXQ" v-if="isMobile"></div>
|
|
|
|
|
|
|
|
|
- <div class="zxqIframeContainer" v-if="isShowZXQ">
|
|
|
+ <div :class="isMobile == true ? zxqIframeContainer:'zxqIframeContainer'" v-if="isShowZXQ">
|
|
|
+ <!-- <div class="wind" @click="tiggerWind" v-if="isMobile">口</div> -->
|
|
|
<div class="close" @click="closeZXQ">×</div>
|
|
|
- <iframe :src="zxqUrl" frameborder="0"></iframe>
|
|
|
+ <iframe :src="zxqUrl" frameborder="0" ></iframe>
|
|
|
</div>
|
|
|
|
|
|
<!-- <div class="control3D">
|
|
|
<div class="label">三维模型</div>
|
|
|
<el-switch v-model="isShow3D" size="large" active-text @change="changeModel" />
|
|
|
</div> -->
|
|
|
- <div class="changeBaseMap">
|
|
|
+ <div class="changeBaseMap" v-if="!isMobile">
|
|
|
<div class="container">
|
|
|
- <div v-for="(item, index) in baseMapArr" :key="index" @click="changeMap(item)">
|
|
|
+ <div v-for="(item, index) in baseMapArr" :key="index" @click="changeMap(item)" >
|
|
|
<div :class="{ 'content': true, 'active': item.isActive }">
|
|
|
<div class="label">{{ item.label }}</div>
|
|
|
</div>
|
|
@@ -28,8 +34,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="changeBaseMap-mb" v-if="isMobile" @click="changeBaseMapType()">
|
|
|
+ <div>{{baseMap}}</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="heatmapContorl">
|
|
|
- <div :class="{ 'ckzb-btn': true, isActive: heatmapPanelShow }" @click="handleOpenHeatmapPanelShow">热力图</div>
|
|
|
+ <div :class="{ 'ckzb-btn': true, isActive: heatmapPanelShow }" @click="handleOpenHeatmapPanelShow" v-if="!isMobile">热力图层</div>
|
|
|
+ <div :class="{ 'ckzb-btn-mb': true, isActive: heatmapPanelShow }" @click="handleOpenHeatmapPanelShow" v-if="isMobile">热力图层</div>
|
|
|
<div class="heatmapPanel" v-show="heatmapPanelShow">
|
|
|
<el-scrollbar>
|
|
|
<ul>
|
|
@@ -42,14 +53,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="heatmapLegend" v-show="heatmapPanelShow">
|
|
|
+ <div :class="isMobile == true ? 'heatmapLegend-mb':'heatmapLegend'" v-show="heatmapPanelShow">
|
|
|
</div>
|
|
|
|
|
|
<div :class="{ 'zxq-ckzb-btn': true, isActive: isActiveZXQ }" @click="isActiveZXQ">智小青</div>
|
|
|
|
|
|
<div class="layerContorl">
|
|
|
- <div :class="{ 'ckzb-btn': true, isActive: layerPanelShow }" @click="handleOpenLayerPanelShow">查看周边</div>
|
|
|
- <div class="layerPanel" v-show="layerPanelShow">
|
|
|
+ <div :class="{ 'ckzb-btn': true, isActive: layerPanelShow }" @click="handleOpenLayerPanelShow" v-if="!isMobile">查看周边</div>
|
|
|
+ <div :class="{ 'ckzb-btn-mb': true, isActive: layerPanelShow }" @click="handleOpenLayerPanelShow" v-if="isMobile">查看周边</div>
|
|
|
+ <div :class="isMobile == true ? 'layerPanel-mb':'layerPanel'" v-show="layerPanelShow">
|
|
|
<el-scrollbar>
|
|
|
<ul>
|
|
|
<li v-for="(item, index) in layerList" :key="index">
|
|
@@ -61,7 +73,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <KDYJS ref="kdyjs"></KDYJS>
|
|
|
+ <KDYJS ref="kdyjs" :message="parentMessage"></KDYJS>
|
|
|
|
|
|
<div class="tips">试运行阶段服务范围:夏阳街道</div>
|
|
|
<div class="yjdpInfoDialog" v-show="yjdpInfoDialogShow">
|
|
@@ -89,7 +101,7 @@
|
|
|
<!-- 此处弹框样式写在App.vue中 -->
|
|
|
<el-dialog class="yhfkInfoDialog" title="用户反馈" header-class="yhfkInfoDialogHeader"
|
|
|
footer-class="yhfkInfoDialogfooter" v-model="yhfkInfoDialogShow" :close="closeKZDP" :close-on-click-modal="false"
|
|
|
- :append-to-body="true" width="600">
|
|
|
+ :append-to-body="true" :width="isMobile == true ? 'auto':600">
|
|
|
<el-form ref="yhfkInfoDialogRef" :model="yhfkForm" label-width="auto" :rules="rules" style="max-width: 600px">
|
|
|
<el-form-item label="姓名" prop="name">
|
|
|
<el-input v-model="yhfkForm.name" />
|
|
@@ -114,7 +126,7 @@
|
|
|
<script>
|
|
|
|
|
|
|
|
|
-import { toRaw } from "vue";
|
|
|
+import { toRaw, ref, onMounted, onBeforeUnmount } from "vue";
|
|
|
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
|
|
@@ -122,6 +134,7 @@ import Map from "@/components/Map.vue";
|
|
|
import Header from "@/components/Header.vue";
|
|
|
|
|
|
import KDYJS from "@/views/KDYJS.vue";
|
|
|
+import UTIL from '@/utils/util'
|
|
|
|
|
|
export default {
|
|
|
name: "HomeView",
|
|
@@ -144,16 +157,21 @@ export default {
|
|
|
return item
|
|
|
})
|
|
|
return {
|
|
|
+ isMobile:false,
|
|
|
+ baseMap:'影像图层',
|
|
|
+ parentMessage:'',
|
|
|
+ zxqIframeContainer:'zxqIframeContainer-mb-mx',
|
|
|
+
|
|
|
isShow3D: false,
|
|
|
baseMapArr: [
|
|
|
{
|
|
|
type: "yxt",
|
|
|
- label: "影像图",
|
|
|
+ label: "影像图层",
|
|
|
isActive: false
|
|
|
},
|
|
|
{
|
|
|
type: "xht",
|
|
|
- label: "线划图",
|
|
|
+ label: "线划图层",
|
|
|
isActive: true
|
|
|
}
|
|
|
],
|
|
@@ -195,6 +213,8 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
+ let that = this;
|
|
|
+ that.isMobile = UTIL.terminalType()
|
|
|
this.$refs.kdyjs.open();
|
|
|
// 监听message事件
|
|
|
window.addEventListener('message', this.handleMessage);
|
|
@@ -224,7 +244,6 @@ export default {
|
|
|
status: status
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
changeMap(item) {
|
|
|
this.baseMapArr = this.baseMapArr.map(function (item) {
|
|
|
item.isActive = false;
|
|
@@ -240,6 +259,17 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
+ changeBaseMapType(){
|
|
|
+ let that = this;
|
|
|
+
|
|
|
+ if(that.baseMap == '影像图层'){
|
|
|
+ that.baseMap = '线划图层'
|
|
|
+ mapTriggerEvent("changeBaseMap", { type: "yxt" });
|
|
|
+ }else{
|
|
|
+ that.baseMap = '影像图层'
|
|
|
+ mapTriggerEvent("changeBaseMap", { type: "xht" });
|
|
|
+ }
|
|
|
+ },
|
|
|
// 打开用户反馈
|
|
|
openYHFK() {
|
|
|
this.yhfkInfoDialogShow = true
|
|
@@ -313,8 +343,17 @@ export default {
|
|
|
openZXQ() {
|
|
|
this.isShowZXQ = true
|
|
|
},
|
|
|
+ tiggerWind(){
|
|
|
+ if(this.zxqIframeContainer == 'zxqIframeContainer-mb'){
|
|
|
+ this.zxqIframeContainer = 'zxqIframeContainer-mb-mx'
|
|
|
+ }else{
|
|
|
+ this.zxqIframeContainer = 'zxqIframeContainer-mb'
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
// 关闭智小青
|
|
|
closeZXQ() {
|
|
|
+ this.zxqIframeContainer ='zxqIframeContainer-mb-mx'
|
|
|
this.isShowZXQ = false
|
|
|
},
|
|
|
// 沿街店铺
|
|
@@ -449,6 +488,7 @@ export default {
|
|
|
lon: entity.info.coor[0],
|
|
|
lat: entity.info.coor[1]
|
|
|
})
|
|
|
+ that.parentMessage = that.nowPoint
|
|
|
} else {
|
|
|
// console.log('未拾取到实体');
|
|
|
/**
|
|
@@ -532,6 +572,9 @@ export default {
|
|
|
// 加载wms服务
|
|
|
addWMSLayer(judge, params) {
|
|
|
if (judge) {
|
|
|
+ debugger
|
|
|
+ console.log(1111);
|
|
|
+
|
|
|
let layer = viewer.imageryLayers.addImageryProvider(
|
|
|
new SkyScenery.WebMapServiceImageryProvider({
|
|
|
url: this.layerRoot,
|
|
@@ -596,6 +639,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -722,6 +766,21 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .changeBaseMap-mb {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 50px;
|
|
|
+ z-index: 9;
|
|
|
+ right: 20px;
|
|
|
+ width: 30px;
|
|
|
+ font-size: 12px;
|
|
|
+ border-radius: 10px;
|
|
|
+ color: #ffffff;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #01346f99;
|
|
|
+ padding: 5px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #eeeeee;
|
|
|
+ }
|
|
|
|
|
|
@keyframes animation-right {
|
|
|
from {
|
|
@@ -788,6 +847,25 @@ export default {
|
|
|
background: #005cc6cc;
|
|
|
}
|
|
|
}
|
|
|
+ .ckzb-btn-mb {
|
|
|
+ width: 30px;
|
|
|
+ font-size: 12px;
|
|
|
+ border-radius: 10px;
|
|
|
+ color: #ffffff;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #01346f99;
|
|
|
+ padding: 5px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #eeeeee;
|
|
|
+
|
|
|
+ &.isActive {
|
|
|
+ background: #005cc6cc
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #005cc6cc;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.layerPanel {
|
|
|
position: absolute;
|
|
@@ -823,6 +901,40 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .layerPanel-mb {
|
|
|
+ position: absolute;
|
|
|
+ right: 50px;
|
|
|
+ bottom: 0px;
|
|
|
+ background: #01346f99;
|
|
|
+ border-radius: 5px;
|
|
|
+ // padding: 0 10px;
|
|
|
+ padding-left: 10px;
|
|
|
+ height: fit-content;
|
|
|
+ overflow: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ height: 240px;
|
|
|
+
|
|
|
+ ul {
|
|
|
+ margin: 0 0;
|
|
|
+ padding: 0 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ li {
|
|
|
+ list-style: none;
|
|
|
+ padding-right: 10px;
|
|
|
+
|
|
|
+ .el-checkbox {
|
|
|
+ color: #ffffff;
|
|
|
+
|
|
|
+ &.is-checked {
|
|
|
+ :deep(.el-checkbox__label) {
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.heatmapContorl {
|
|
@@ -851,6 +963,26 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .ckzb-btn-mb {
|
|
|
+ width: 30px;
|
|
|
+ font-size: 12px;
|
|
|
+ border-radius: 10px;
|
|
|
+ color: #ffffff;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #01346f99;
|
|
|
+ padding: 5px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #eeeeee;
|
|
|
+
|
|
|
+ &.isActive {
|
|
|
+ background: #005cc6cc
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #005cc6cc;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.heatmapPanel {
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
@@ -895,6 +1027,15 @@ export default {
|
|
|
background: url(~@/assets/images/heatmapLegend.png) no-repeat center center/100% 100%;
|
|
|
}
|
|
|
|
|
|
+ .heatmapLegend-mb {
|
|
|
+ position: absolute;
|
|
|
+ left: 10px;
|
|
|
+ bottom: 50px;
|
|
|
+ width: 10px;
|
|
|
+ height: 100px;
|
|
|
+ background: url(~@/assets/images/heatmapLegend.png) no-repeat center center/100% 100%;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
.tips {
|
|
@@ -934,6 +1075,29 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .yjdp-btn-mb {
|
|
|
+ position: absolute;
|
|
|
+ top: 130px;
|
|
|
+ right: 20px;
|
|
|
+ width: 30px;
|
|
|
+ font-size: 12px;
|
|
|
+ border-radius: 10px;
|
|
|
+ color: #ffffff;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #01346f99;
|
|
|
+ padding: 5px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #eeeeee;
|
|
|
+
|
|
|
+ &.isActive {
|
|
|
+ background: #005cc6cc;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #005cc6cc;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.kzdp-btn {
|
|
|
position: absolute;
|
|
|
top: 130px;
|
|
@@ -958,6 +1122,29 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .kzdp-btn-mb {
|
|
|
+ position: absolute;
|
|
|
+ top: 180px;
|
|
|
+ right: 20px;
|
|
|
+ width: 30px;
|
|
|
+ font-size: 12px;
|
|
|
+ border-radius: 10px;
|
|
|
+ color: #ffffff;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #01346f99;
|
|
|
+ padding: 5px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #eeeeee;
|
|
|
+
|
|
|
+ &.isActive {
|
|
|
+ background: #005cc6cc;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #005cc6cc;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.yhfk-btn {
|
|
|
position: absolute;
|
|
|
top: 180px;
|
|
@@ -978,6 +1165,25 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .yhfk-btn-mb {
|
|
|
+ position: absolute;
|
|
|
+ top: 230px;
|
|
|
+ right: 20px;
|
|
|
+ width: 30px;
|
|
|
+ font-size: 12px;
|
|
|
+ border-radius: 10px;
|
|
|
+ color: #ffffff;
|
|
|
+ cursor: pointer;
|
|
|
+ background: #01346f99;
|
|
|
+ padding: 5px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #eeeeee;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #005cc6cc;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.zxq-btn {
|
|
|
position: absolute;
|
|
|
top: 230px;
|
|
@@ -1001,6 +1207,26 @@ export default {
|
|
|
background: #005cc6cc url(~@/assets/images/zxq.png) no-repeat center center /90% 90%;
|
|
|
}
|
|
|
}
|
|
|
+ .zxq-btn-mb {
|
|
|
+ position: absolute;
|
|
|
+ top: 280px;
|
|
|
+ right: 10px;
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ border-radius: 10px;
|
|
|
+ color: #ffffff;
|
|
|
+ cursor: pointer;
|
|
|
+ background: url(~@/assets/images/zxq.png) no-repeat center center / 90% 90%;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ &.isActive {
|
|
|
+ background: #005cc6cc url(~@/assets/images/zxq.png) no-repeat center center /90% 90%;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ background: #005cc6cc url(~@/assets/images/zxq.png) no-repeat center center /90% 90%;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.yjdpInfoDialog {
|
|
|
position: absolute;
|
|
@@ -1099,5 +1325,91 @@ export default {
|
|
|
height: 100%;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .zxqIframeContainer-mb-mx {
|
|
|
+ position: absolute;
|
|
|
+ top: 0px;
|
|
|
+ bottom: 0px;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%; /* iframe高度自适应 */
|
|
|
+ border-radius: 10px;
|
|
|
+ overflow: hidden;
|
|
|
+ background: #01346f99;
|
|
|
+ z-index: 999;
|
|
|
+ .wind {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ position: absolute;
|
|
|
+ top: 15px;
|
|
|
+ right: 40px;
|
|
|
+ z-index: 1;
|
|
|
+ cursor: pointer;
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 30px;
|
|
|
+ }
|
|
|
+ .close {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: bold;
|
|
|
+ position: absolute;
|
|
|
+ top: 15px;
|
|
|
+ right: 15px;
|
|
|
+ z-index: 1;
|
|
|
+ cursor: pointer;
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ iframe {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .zxqIframeContainer-mb {
|
|
|
+ position: absolute;
|
|
|
+ //top: 0px;
|
|
|
+ bottom: 0px;
|
|
|
+ width: 100%;
|
|
|
+ height: 30%;
|
|
|
+ border-radius: 10px;
|
|
|
+ overflow: hidden;
|
|
|
+ background: #01346f99;
|
|
|
+ z-index: 999;
|
|
|
+ .wind {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ position: absolute;
|
|
|
+ top: 15px;
|
|
|
+ right: 40px;
|
|
|
+ z-index: 1;
|
|
|
+ cursor: pointer;
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 30px;
|
|
|
+ }
|
|
|
+ .close {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: bold;
|
|
|
+ position: absolute;
|
|
|
+ top: 15px;
|
|
|
+ right: 15px;
|
|
|
+ z-index: 1;
|
|
|
+ cursor: pointer;
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ iframe {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|