|
@@ -98,6 +98,16 @@
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="tjdwInfoDialog" v-show="tjdwInfoDialogShow">
|
|
|
|
+ <div class="close" @click="closeTJDW">×</div>
|
|
|
|
+ <div class="content" v-if="nowPoint != null">
|
|
|
|
+ <el-scrollbar>
|
|
|
|
+ <div class="item">地址:{{ nowPoint.properties["推荐点"] }}</div>
|
|
|
|
+ <div class="item">推荐理由:{{ nowPoint.properties["推荐理由"] }}</div>
|
|
|
|
+ <div class="item">星级:{{ nowPoint.properties["星级"] }}</div>
|
|
|
|
+ </el-scrollbar>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<!-- 此处弹框样式写在App.vue中 -->
|
|
<!-- 此处弹框样式写在App.vue中 -->
|
|
<el-dialog class="yhfkInfoDialog" title="用户反馈" header-class="yhfkInfoDialogHeader"
|
|
<el-dialog class="yhfkInfoDialog" title="用户反馈" header-class="yhfkInfoDialogHeader"
|
|
footer-class="yhfkInfoDialogfooter" v-model="yhfkInfoDialogShow" :close="closeKZDP" :close-on-click-modal="false"
|
|
footer-class="yhfkInfoDialogfooter" v-model="yhfkInfoDialogShow" :close="closeKZDP" :close-on-click-modal="false"
|
|
@@ -122,7 +132,6 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
|
|
|
|
|
@@ -209,7 +218,9 @@ export default {
|
|
],
|
|
],
|
|
},
|
|
},
|
|
isShowZXQ: false,
|
|
isShowZXQ: false,
|
|
- zxqUrl: webConfig.zxqUrl
|
|
|
|
|
|
+ zxqUrl: webConfig.zxqUrl,
|
|
|
|
+ pointRecommendArr: [],
|
|
|
|
+ tjdwInfoDialogShow: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -230,9 +241,21 @@ export default {
|
|
// if (event.source !== window.parent) {
|
|
// if (event.source !== window.parent) {
|
|
// return;
|
|
// return;
|
|
// }
|
|
// }
|
|
-
|
|
|
|
// 处理接收到的消息数据
|
|
// 处理接收到的消息数据
|
|
const data = event.data;
|
|
const data = event.data;
|
|
|
|
+ if (data != null) {
|
|
|
|
+ if (data.knowledge_ids.length != 0) {
|
|
|
|
+ let pointArr = JSON.parse(data.knowledge_ids)["推荐清单"];
|
|
|
|
+ console.log(pointArr);
|
|
|
|
+ this.addRecommendPoint(pointArr);
|
|
|
|
+ // latitude
|
|
|
|
+ // longitude
|
|
|
|
+ // 推荐点
|
|
|
|
+ // 推荐理由
|
|
|
|
+ // 星级
|
|
|
|
+ }
|
|
|
|
+ return
|
|
|
|
+ }
|
|
// const imgUrl = data.imgUrl;
|
|
// const imgUrl = data.imgUrl;
|
|
// const otherParam = data.otherParam;
|
|
// const otherParam = data.otherParam;
|
|
|
|
|
|
@@ -355,6 +378,49 @@ export default {
|
|
closeZXQ() {
|
|
closeZXQ() {
|
|
this.zxqIframeContainer ='zxqIframeContainer-mb-mx'
|
|
this.zxqIframeContainer ='zxqIframeContainer-mb-mx'
|
|
this.isShowZXQ = false
|
|
this.isShowZXQ = false
|
|
|
|
+ this.clearRecommendPoint();
|
|
|
|
+ },
|
|
|
|
+ // 加载 智小青 推荐的点位
|
|
|
|
+ addRecommendPoint(pointArr) {
|
|
|
|
+ this.clearRecommendPoint();
|
|
|
|
+ this.pointRecommendArr = pointArr.map(function (pointInfo) {
|
|
|
|
+ return viewer.entities.add(new SkyScenery.Entity({
|
|
|
|
+ position: SkyScenery.Cartesian3.fromDegrees(pointInfo.longitude, pointInfo.latitude),
|
|
|
|
+ type: "tjdw",
|
|
|
|
+ info: {
|
|
|
|
+ coor: [pointInfo.longitude, pointInfo.latitude],
|
|
|
|
+ properties: {
|
|
|
|
+ "推荐点": pointInfo["推荐点"],
|
|
|
|
+ "推荐理由": pointInfo["推荐理由"],
|
|
|
|
+ "星级": pointInfo["星级"],
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ billboard: {
|
|
|
|
+ width: 48,
|
|
|
|
+ height: 48,
|
|
|
|
+ image: "./static/image/tjdw.png",
|
|
|
|
+ scale: 1,
|
|
|
|
+ horizontalOrigin: SkyScenery.HorizontalOrigin.CENTER,
|
|
|
|
+ verticalOrigin: SkyScenery.VerticalOrigin.BOTTOM,
|
|
|
|
+ }
|
|
|
|
+ }));
|
|
|
|
+ })
|
|
|
|
+ this.pointTCHandle();
|
|
|
|
+ },
|
|
|
|
+ // 清除 智小青 推荐的点位
|
|
|
|
+ clearRecommendPoint() {
|
|
|
|
+ if (this.pointRecommendArr.length > 0) {
|
|
|
|
+ this.pointRecommendArr.map(function (point) {
|
|
|
|
+ viewer.entities.remove(point)
|
|
|
|
+ })
|
|
|
|
+ this.pointRecommendArr = []
|
|
|
|
+ }
|
|
|
|
+ this.closeTJDW();
|
|
|
|
+ },
|
|
|
|
+ // 关闭 智小青 推荐的点位 弹窗
|
|
|
|
+ closeTJDW() {
|
|
|
|
+ this.tjdwInfoDialogShow = false;
|
|
|
|
+ this.nowPoint = null
|
|
},
|
|
},
|
|
// 沿街店铺
|
|
// 沿街店铺
|
|
addyjdp() {
|
|
addyjdp() {
|
|
@@ -483,6 +549,13 @@ export default {
|
|
let xy = that.lonlatConvertToScreenXY(entity.info.coor)
|
|
let xy = that.lonlatConvertToScreenXY(entity.info.coor)
|
|
document.querySelector(".kzdpInfoDialog").style.top = (xy.y - 250) + "px";
|
|
document.querySelector(".kzdpInfoDialog").style.top = (xy.y - 250) + "px";
|
|
document.querySelector(".kzdpInfoDialog").style.left = (xy.x - 150) + "px";
|
|
document.querySelector(".kzdpInfoDialog").style.left = (xy.x - 150) + "px";
|
|
|
|
+ } else if (entity.type == "tjdw") {
|
|
|
|
+ that.tjdwInfoDialogShow = true
|
|
|
|
+ that.nowPoint = entity.info;
|
|
|
|
+ that.nowPoint["type"] = "tjdw";
|
|
|
|
+ let xy = that.lonlatConvertToScreenXY(entity.info.coor)
|
|
|
|
+ document.querySelector(".tjdwInfoDialog").style.top = (xy.y - 250) + "px";
|
|
|
|
+ document.querySelector(".tjdwInfoDialog").style.left = (xy.x - 150) + "px";
|
|
}
|
|
}
|
|
that.$refs.kdyjs.clickPointJGTL({
|
|
that.$refs.kdyjs.clickPointJGTL({
|
|
lon: entity.info.coor[0],
|
|
lon: entity.info.coor[0],
|
|
@@ -499,7 +572,7 @@ export default {
|
|
}, SkyScenery.ScreenSpaceEventType.LEFT_CLICK);
|
|
}, SkyScenery.ScreenSpaceEventType.LEFT_CLICK);
|
|
viewer.scene.postRender.addEventListener(this.updatePosition, this);
|
|
viewer.scene.postRender.addEventListener(this.updatePosition, this);
|
|
} else {
|
|
} else {
|
|
- if (this.yjdpShow == false && this.kzdpShow == false) {
|
|
|
|
|
|
+ if (this.yjdpShow == false && this.kzdpShow == false && this.isShowZXQ == false) {
|
|
toRaw(this.mapHandle).destroy();
|
|
toRaw(this.mapHandle).destroy();
|
|
this.mapHandle = null
|
|
this.mapHandle = null
|
|
viewer.scene.postRender.removeEventListener(this.updatePosition, this);
|
|
viewer.scene.postRender.removeEventListener(this.updatePosition, this);
|
|
@@ -519,6 +592,9 @@ export default {
|
|
} else if (obj.type == "kzdp") {
|
|
} else if (obj.type == "kzdp") {
|
|
document.querySelector(".kzdpInfoDialog").style.top = "-9999px";
|
|
document.querySelector(".kzdpInfoDialog").style.top = "-9999px";
|
|
document.querySelector(".kzdpInfoDialog").style.left = "-9999px";
|
|
document.querySelector(".kzdpInfoDialog").style.left = "-9999px";
|
|
|
|
+ } else if (obj.type == "tjdw") {
|
|
|
|
+ document.querySelector(".tjdwInfoDialog").style.top = "-9999px";
|
|
|
|
+ document.querySelector(".tjdwInfoDialog").style.left = "-9999px";
|
|
}
|
|
}
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -528,6 +604,9 @@ export default {
|
|
} else if (obj.type == "kzdp") {
|
|
} else if (obj.type == "kzdp") {
|
|
document.querySelector(".kzdpInfoDialog").style.top = (xy.y - 250) + "px";
|
|
document.querySelector(".kzdpInfoDialog").style.top = (xy.y - 250) + "px";
|
|
document.querySelector(".kzdpInfoDialog").style.left = (xy.x - 150) + "px";
|
|
document.querySelector(".kzdpInfoDialog").style.left = (xy.x - 150) + "px";
|
|
|
|
+ } else if (obj.type == "tjdw") {
|
|
|
|
+ document.querySelector(".tjdwInfoDialog").style.top = (xy.y - 300) + "px";
|
|
|
|
+ document.querySelector(".tjdwInfoDialog").style.left = (xy.x - 150) + "px";
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1295,6 +1374,39 @@ export default {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .tjdwInfoDialog {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 0px;
|
|
|
|
+ left: 0px;
|
|
|
|
+ width: 300px;
|
|
|
|
+ height: 250px;
|
|
|
|
+ background: #01346f99;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+
|
|
|
|
+ .close {
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 6px;
|
|
|
|
+ right: 8px;
|
|
|
|
+ line-height: 24px;
|
|
|
|
+ width: 24px;
|
|
|
|
+ height: 24px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .content {
|
|
|
|
+ height: 210px;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ margin: 30px 0px 10px 20px;
|
|
|
|
+
|
|
|
|
+ .item {
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
.zxqIframeContainer {
|
|
.zxqIframeContainer {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 100px;
|
|
top: 100px;
|