From 684d74d2285092559b5d25fac451e4f1abb52a5b Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 20 Jan 2022 17:28:44 +0800
Subject: [PATCH] 部分内容完善
---
/dev/null | 310 --------------------------------------------
src/components/map/components/dimension.vue | 62 ++++++--
src/components/map/components/campusBuildingSearch.vue | 8
src/styles/entitys/text-entitys.scss | 8
src/styles/layout/pc.scss | 1
src/api/pc/public/arc.js | 10 +
src/components/arcNavBar/index.vue | 8
src/components/leftNav/index.vue | 6
src/components/map/components/mapPopup.vue | 4
9 files changed, 70 insertions(+), 347 deletions(-)
diff --git a/src/api/pc/public/arc.js b/src/api/pc/public/arc.js
index 2b76bd6..f2e7e7d 100644
--- a/src/api/pc/public/arc.js
+++ b/src/api/pc/public/arc.js
@@ -2,7 +2,7 @@
* @Author: Morpheus
* @Date: 2021-05-09 15:17:44
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-12-24 11:30:06
+ * @Last Modified time: 2022-01-20 16:36:28
*/
// 校区
import request from '@/router/axios'
@@ -38,3 +38,11 @@
params: params
})
}
+
+export const getDetail = (params) => {
+ return request({
+ url: '/blade-architecture/architecture/detail',
+ method: 'get',
+ params: params
+ })
+}
diff --git a/src/components/arcNavBar/index.vue b/src/components/arcNavBar/index.vue
index ab1570c..7d5d6f1 100644
--- a/src/components/arcNavBar/index.vue
+++ b/src/components/arcNavBar/index.vue
@@ -180,8 +180,6 @@
this.$store.commit('CLEAR_ALL', null)
var imgArr = result.tpurl.split(',')
- var tabOne = res.data.data[0].jx.split(',')
- var tabTwo = res.data.data[0].sh.split(',')
this.$store.commit('SET_POPUPBGURL', imgArr[0])
this.$store.commit('SET_POPUPQRURL', result.codeurl)
@@ -195,13 +193,15 @@
if (result.videourl && result.videourl != '') {
this.$store.commit('SET_MONITORURL', result.videourl)
}
- if (res.data.data[0].jx != '') {
+ if (res.data.data[0].jx != undefined && res.data.data[0].jx != '') {
+ var tabOne = res.data.data[0].jx.split(',')
this.$store.commit('SET_TEACHLIST', tabOne)
} else {
this.$store.commit('SET_TEACHLIST', [])
}
- if (res.data.data[0].sh != '') {
+ if (res.data.data[0].sh != undefined && res.data.data[0].sh != '') {
+ var tabTwo = res.data.data[0].sh.split(',')
this.$store.commit('SET_LIVELIST', tabTwo)
} else {
this.$store.commit('SET_LIVELIST', [])
diff --git a/src/components/leftNav/index.vue b/src/components/leftNav/index.vue
index 4fa6746..c3e7a14 100644
--- a/src/components/leftNav/index.vue
+++ b/src/components/leftNav/index.vue
@@ -23,9 +23,9 @@
return {
leftNavData: [
{
- flag: false,
+ flag: true,
label: '标签',
- img: '/img/leftnav/tag.png',
+ img: '/img/leftnav/tag-checked.png',
normal: '/img/leftnav/tag.png',
checked: '/img/leftnav/tag-checked.png',
layer: 'tagLayer'
@@ -162,7 +162,7 @@
this.tagLayer.addOverlay(divIcon)
})
- this.tagLayer.show = false
+ // this.tagLayer.show = false
})
getWayList().then(res => {
diff --git a/src/components/map/components/campusBuildingSearch.vue b/src/components/map/components/campusBuildingSearch.vue
index 174021a..6c2dc17 100644
--- a/src/components/map/components/campusBuildingSearch.vue
+++ b/src/components/map/components/campusBuildingSearch.vue
@@ -233,8 +233,6 @@
var result = param.list
var imgArr = result.tpurl.split(',')
- var tabOne = param.jx.split(',')
- var tabTwo = param.sh.split(',')
this.$store.commit('SET_POPUPBGURL', imgArr[0])
this.$store.commit('SET_POPUPQRURL', result.codeurl)
@@ -250,13 +248,15 @@
this.$store.commit('SET_MONITORURL', result.videourl)
}
this.$store.commit('SET_POPUPIMGATLAS', imgArr)
- if (param.jx != '') {
+ if (param.jx != undefined && param.jx != '') {
+ var tabOne = param.jx.split(',')
this.$store.commit('SET_TEACHLIST', tabOne)
} else {
this.$store.commit('SET_TEACHLIST', [])
}
- if (param.sh != '') {
+ if (param.sh != undefined && param.sh != '') {
+ var tabTwo = param.sh.split(',')
this.$store.commit('SET_LIVELIST', tabTwo)
} else {
this.$store.commit('SET_LIVELIST', [])
diff --git a/src/components/map/components/dimension copy.vue b/src/components/map/components/dimension copy.vue
deleted file mode 100644
index dc5582c..0000000
--- a/src/components/map/components/dimension copy.vue
+++ /dev/null
@@ -1,310 +0,0 @@
-<template>
- <div class="dimension-cut">
- <el-radio-group v-model="dimensionValue"
- size="medium"
- @change="dimensionChange">
- <el-radio-button label="2.5维"></el-radio-button>
- <el-radio-button label="3 维"></el-radio-button>
- </el-radio-group>
- </div>
-</template>
-
-<script>
-
-import { mapGetters } from 'vuex'
-
-export default {
- name: 'dimension',
- data () {
- return {
- DC: null,
- dimensionValue: '2.5维',
- newLayer: null,
- provider: null,
- wallLayer: null,
- tileset: null,
- tilesetLayer: null,
- titlesetLayerFlag: false,
- silhouetteBlue: null,
- wallArr: [
- [116.41526036, 27.95352217, 100],
- [116.41128018, 27.95789328, 100],
- [116.40246486, 27.96397110, 100],
- [116.39728537, 27.96779573, 100],
- [116.39588026, 27.96862679, 100],
- [116.38903705, 27.97029865, 100],
- [116.38872398, 27.97051829, 100],
- [116.38892229, 27.97090120, 100],
- [116.38906721, 27.97190632, 100],
- [116.38706808, 27.97195638, 100],
- [116.38649076, 27.97114448, 100],
- [116.38214070, 27.97312735, 100],
- [116.37876213, 27.97582549, 100],
- [116.37851310, 27.97664153, 100],
- [116.37634915, 27.98039526, 100],
- [116.37439220, 27.98131916, 100],
- [116.36995935, 27.97936074, 100],
- [116.37217247, 27.97498147, 100],
- [116.35099819, 27.97539586, 100],
- [116.35103749, 27.98088050, 100],
- [116.33972460, 27.97987911, 100],
- [116.33950071, 27.97372028, 100],
- [116.32313266, 27.97004136, 100],
- [116.32606743, 27.95863979, 100],
- [116.34788837, 27.92538024, 100],
- [116.34566310, 27.92338627, 100],
- [116.34874490, 27.91718915, 100],
- [116.35311999, 27.91804451, 100],
- [116.35109257, 27.92284807, 100],
- [116.35975153, 27.92900526, 100],
- [116.35660704, 27.93816236, 100],
- [116.39585177, 27.93945304, 100],
- [116.41526036, 27.95352217, 100]
- ]
- }
- },
- computed: {
- ...mapGetters([
- 'viewer',
- // 社区内导航的显示关闭
- 'campusNavFlag',
- 'orgNavBarFlag',
- 'arcNavBarFlag'
- ])
- },
- created () {
- this.DC = global.DC
- },
- watch: {
- viewer: {
- immediate: true,
- handler (newCode, oldCode) {
- if (this.titlesetLayerFlag == false && newCode != null) {
- var that = this
- that.tilesetLayer = new that.DC.TilesetLayer('tilesetLayer')
- that.viewer.addLayer(that.tilesetLayer)
- that.tileset = new that.DC.Tileset(
- 'http://data.mars3d.cn/3dtiles/max-shihua/tileset.json',
- {
- luminanceAtZenith: 0.5
- }
- )
- that.tilesetLayer.addOverlay(that.tileset)
-
- that.silhouetteBlue = that.DC.Namespace.Cesium.PostProcessStageLibrary.createEdgeDetectionStage()
- that.silhouetteBlue.uniforms.color = that.DC.Namespace.Cesium.Color.fromBytes(9, 162, 40)
- that.silhouetteBlue.uniforms.length = 0.01
- that.silhouetteBlue.selected = []
-
- that.viewer.scene.postProcessStages.add(
- that.DC.Namespace.Cesium.PostProcessStageLibrary.createSilhouetteStage([
- that.silhouetteBlue
- ])
- )
-
- var highlighted = {
- feature: undefined,
- originalColor: new that.DC.Namespace.Cesium.Color()
- }
-
- var selected = {
- feature: undefined,
- originalColor: new that.DC.Namespace.Cesium.Color()
- }
-
- that.tileset.on(that.DC.MouseEventType.CLICK, e => {
- that.viewer.scene.globe.depthTestAgainstTerrain = false
-
- that.$store.commit('CLEAR_ALL', null)
-
- var imgArr = ['http://223.82.109.183:2081/zhxy/upload/20220105/3c05dd70a9eac17b7e49afbfc7b1b68e.png']
-
- that.$store.commit('SET_POPUPBGURL', imgArr[0])
- that.$store.commit('SET_POPUPQRURL', 'http://223.82.109.183:2081/zhxy/upload/20211222/9c324adea5d9e5b50cd8f874d5f780f4.png')
- that.$store.commit('SET_POINTPOSITION', [Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt), Number(0), Number(0), Number(0)])
- that.$store.commit('SET_STATENAME', e.overlay.attr.name)
- that.$store.commit('SET_SITENAME', e.overlay.attr['地址'])
- that.$store.commit('SET_POPUPIMGATLAS', imgArr)
-
- // 定制化窗体
- // eslint-disable-next-line no-unused-vars
- var popup = new that.DC.DivForms(that.viewer, {
- domId: 'divFormsDomBox',
- position: [
- that.DC.Transform.transformWGS84ToCartesian(new that.DC.Position(Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt)))
- ]
- })
-
- this.$store.commit('SET_PANORAMAPOPUP', false)
- this.$store.commit('SET_MONITORPOPUP', false)
- this.$store.commit('SET_DETAILSPOPUP', true)
- })
-
- that.tileset.on(that.DC.MouseEventType.MOUSE_MOVE, e => {
- that.silhouetteBlue.selected = []
-
- if (that.DC.Namespace.Cesium.defined(highlighted.feature)) {
- highlighted.feature.color = highlighted.originalColor
- highlighted.feature = undefined
- }
-
- if (e.feature !== selected.feature) {
- that.silhouetteBlue.selected = [e.feature]
-
- highlighted.feature = e.feature
-
- that.DC.Namespace.Cesium.Color.clone(
- e.feature.color,
- highlighted.originalColor
- )
- e.feature.color = that.DC.Namespace.Cesium.Color.fromBytes(155, 255, 175)
- }
- })
-
- var provider = new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
- url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/PingXiang25DMap/MapServer/tile/{TileMatrix}/{TileRow}/{TileCol}',
- layer: 'PingXiang25DMap',
- style: 'default',
- tileMatrixSetID: 'default028mm',
- format: 'image/jpgpng',
- tilingScheme: new that.DC.Namespace.Cesium.GeographicTilingScheme(),
- maximumLevel: 19,
- tileMatrixLabels: [
- '0',
- '1',
- '2',
- '3',
- '4',
- '5',
- '6',
- '7',
- '8',
- '9',
- '10',
- '11',
- '12',
- '13',
- '14',
- '15',
- '16',
- '17',
- '18',
- '19'
- ]
- })
- that.newLayer = that.viewer.imageryLayers.addImageryProvider(provider)
-
- that.wallLayer = new that.DC.VectorLayer('wallLayer')
- that.viewer.addLayer(that.wallLayer)
-
- that.wallArr.forEach(item => {
- item = item.join(',')
- })
- that.wallArr = that.wallArr.join(';')
- const wall = new that.DC.Wall(
- that.wallArr
- )
- wall.setStyle({
- material: new that.DC.WallTrailMaterialProperty({
- color: that.DC.Namespace.Cesium.Color.fromBytes(0, 142, 255, 150),
- // color: that.DC.Color.CYAN,
- speed: 10
- })
- })
- that.wallLayer.addOverlay(wall)
-
- that.viewer.camera.setView({
- // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // fromDegrees()方法,将经纬度和高程转换为世界坐标
- destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.03928791, 27.62954732, 1000.0),
- orientation: {
- // 指向
- heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
-
- this.tilesetLayer.show = false
- this.titlesetLayerFlag = true
- }
- }
- }
- },
- methods: {
- dimensionChange () {
- var that = this
- if (that.dimensionValue == '3 维') {
- that.wallLayer.show = false
- that.viewer.imageryLayers.remove(that.newLayer)
- that.newLayer = null
- that.silhouetteBlue.selected = []
- that.tilesetLayer.show = true
- that.viewer.flyTo(that.tileset)
- } else {
- that.tilesetLayer.show = false
- var provider = new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
- url: 'http://www.tdtfz.com/OneMapServer/rest/services/fzsw2019/MapServer/WMTS/tile/1.0.0/fzsw2019/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}',
- layer: 'fzsw2019',
- style: 'default',
- tileMatrixSetID: 'default028mm',
- format: 'image/jpgpng',
- tilingScheme: new that.DC.Namespace.Cesium.GeographicTilingScheme(),
- maximumLevel: 19,
- tileMatrixLabels: [
- '0',
- '1',
- '2',
- '3',
- '4',
- '5',
- '6',
- '7',
- '8',
- '9',
- '10',
- '11',
- '12',
- '13',
- '14',
- '15',
- '16',
- '17',
- '18',
- '19'
- ]
- })
- that.newLayer = that.viewer.imageryLayers.addImageryProvider(provider)
-
- that.wallLayer.show = true
-
- that.viewer.camera.setView({
- // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
- // fromDegrees()方法,将经纬度和高程转换为世界坐标
- destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees(114.03928791, 27.62954732, 1000.0),
- orientation: {
- // 指向
- heading: that.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: that.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
- }
- }
- }
-
-}
-</script>
-
-<style lang='scss' scope>
-.dimension-cut {
- position: fixed;
- top: 100px;
- right: 10px;
- width: auto;
- // height: 40px;
- z-index: 1;
-}
-</style>
diff --git a/src/components/map/components/dimension.vue b/src/components/map/components/dimension.vue
index a7c7773..0e0e06c 100644
--- a/src/components/map/components/dimension.vue
+++ b/src/components/map/components/dimension.vue
@@ -13,6 +13,7 @@
import axios from 'axios'
import { mapGetters } from 'vuex'
+import { getDetail } from '@/api/pc/public/arc'
export default {
name: 'dimension',
@@ -390,30 +391,53 @@
that.viewer.on(that.DC.MouseEventType.CLICK, e => {
if (e.overlay != undefined && e.layer.id == 'areaLayer') {
- that.viewer.scene.globe.depthTestAgainstTerrain = false
+ var rid = e.overlay.attr['楼栋号'] == '8栋' ? '9栋' : e.overlay.attr['楼栋号'] == '9栋' ? '8栋' : e.overlay.attr['楼栋号']
+ getDetail({ mechanismname: '香琴湾' + rid }).then((res) => {
+ that.viewer.scene.globe.depthTestAgainstTerrain = false
+ var result = res.data.data
+ this.$store.commit('CLEAR_ALL', null)
- that.$store.commit('CLEAR_ALL', null)
+ var imgArr = result.tpurl.split(',')
- var imgArr = ['http://223.82.109.183:2081/zhxy/upload/20220105/3c05dd70a9eac17b7e49afbfc7b1b68e.png']
+ this.$store.commit('SET_POPUPBGURL', imgArr[0])
+ this.$store.commit('SET_POPUPQRURL', result.codeurl)
+ that.$store.commit('SET_POINTPOSITION', [Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt), Number(0), Number(0), Number(0)])
+ this.$store.commit('SET_STATENAME', result.mechanismname)
+ this.$store.commit('SET_SITENAME', result.address)
+ this.$store.commit('SET_TELEPHONE', result.telephone)
+ this.$store.commit('SET_INTRODUCETEXT', result.introduce)
+ this.$store.commit('SET_PANORAMAURL', result.panoramaurl)
+ this.$store.commit('SET_POPUPIMGATLAS', imgArr)
+ if (result.videourl && result.videourl != '') {
+ this.$store.commit('SET_MONITORURL', result.videourl)
+ }
+ if (result.jx != undefined && result.jx != '') {
+ var tabOne = res.data.data[0].jx.split(',')
+ this.$store.commit('SET_TEACHLIST', tabOne)
+ } else {
+ this.$store.commit('SET_TEACHLIST', [])
+ }
- that.$store.commit('SET_POPUPBGURL', imgArr[0])
- that.$store.commit('SET_POPUPQRURL', 'http://223.82.109.183:2081/zhxy/upload/20211222/9c324adea5d9e5b50cd8f874d5f780f4.png')
- that.$store.commit('SET_POINTPOSITION', [Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt), Number(0), Number(0), Number(0)])
- that.$store.commit('SET_STATENAME', e.overlay.attr['楼栋号'])
- that.$store.commit('SET_POPUPIMGATLAS', imgArr)
+ if (result.sh != undefined && result.sh != '') {
+ var tabTwo = res.data.data[0].sh.split(',')
+ this.$store.commit('SET_LIVELIST', tabTwo)
+ } else {
+ this.$store.commit('SET_LIVELIST', [])
+ }
- // 定制化窗体
- // eslint-disable-next-line no-unused-vars
- var popup = new that.DC.DivForms(that.viewer, {
- domId: 'divFormsDomBox',
- position: [
- that.DC.Transform.transformWGS84ToCartesian(new that.DC.Position(Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt)))
- ]
+ // 定制化窗体
+ // eslint-disable-next-line no-unused-vars
+ var popup = new that.DC.DivForms(that.viewer, {
+ domId: 'divFormsDomBox',
+ position: [
+ that.DC.Transform.transformWGS84ToCartesian(new that.DC.Position(Number(e.wgs84Position.lng), Number(e.wgs84Position.lat), Number(e.wgs84Position.alt)))
+ ]
+ })
+
+ this.$store.commit('SET_PANORAMAPOPUP', false)
+ this.$store.commit('SET_MONITORPOPUP', false)
+ this.$store.commit('SET_DETAILSPOPUP', true)
})
-
- this.$store.commit('SET_PANORAMAPOPUP', false)
- this.$store.commit('SET_MONITORPOPUP', false)
- this.$store.commit('SET_DETAILSPOPUP', true)
}
})
diff --git a/src/components/map/components/mapPopup.vue b/src/components/map/components/mapPopup.vue
index 8e0d070..88445b5 100644
--- a/src/components/map/components/mapPopup.vue
+++ b/src/components/map/components/mapPopup.vue
@@ -72,7 +72,8 @@
<i class="popup-icon live-action-nav deblurring"></i>
实景
</li>
- <li v-show="panoramaUrl != null && panoramaUrl != ''"
+ <!-- v-show="panoramaUrl != null && panoramaUrl != ''" -->
+ <li v-show="false"
@click="monitorClick">
<i class="popup-icon monitor-nav deblurring"></i>
监控
@@ -426,6 +427,7 @@
// eslint-disable-next-line new-cap
var positions = this.DC.Transform.transformWGS84ToCartesian(
+ // eslint-disable-next-line new-cap
new this.DC.Position.fromArray(this.pointPosition)
)
this.viewer.scene.globe.depthTestAgainstTerrain = false
diff --git a/src/styles/entitys/text-entitys.scss b/src/styles/entitys/text-entitys.scss
index 314a6ef..b467d8a 100644
--- a/src/styles/entitys/text-entitys.scss
+++ b/src/styles/entitys/text-entitys.scss
@@ -47,8 +47,7 @@
}
}
.tag-entitys-box {
- margin-left: 24px;
- margin-bottom: 44px;
+ transform: translate(24px, -44px);
height: 28px;
.tag-content {
@@ -93,8 +92,7 @@
}
.way-entitys-box {
- margin-left: 8px;
- margin-bottom: 136px;
+ transform: translate(8px, -136px);
.way-title {
border: white 1px solid;
@@ -115,7 +113,7 @@
}
.park-entitys-box {
- margin-bottom: 26px;
+ transform: translate(0, -26px);
.park-title {
position: relative;
diff --git a/src/styles/layout/pc.scss b/src/styles/layout/pc.scss
index a12c986..3f27683 100644
--- a/src/styles/layout/pc.scss
+++ b/src/styles/layout/pc.scss
@@ -44,6 +44,7 @@
}
.header-title {
+ margin-right: 10px;
position: relative;
text-indent: 0.1em;
font-size: 18px;
--
Gitblit v1.9.3