From 62f4cdbb9f714692015c3643fa453cca5bafcd00 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 25 Mar 2022 17:40:05 +0800
Subject: [PATCH] 部分更改,及样式
---
src/components/map/components/dimension.vue | 268 +++++++++++++++++++------------------
src/styles/pcpage/publicBox/org-nav-bar.scss | 6
src/styles/pcpage/publicBox/service-nav-bar.scss | 6
src/pcviews/specialmap/welcome.vue | 68 +++++++++
src/components/searchDetails/index.vue | 6
src/styles/pcpage/tool/layer-manage.scss | 4
src/router/axios.js | 2
src/styles/pcpage/tool/ranging.scss | 4
src/styles/pcpage/tool/sign.scss | 8
src/styles/pcpage/campus-nav.scss | 4
src/styles/pcpage/publicBox/arc-nav-bar.scss | 6
11 files changed, 227 insertions(+), 155 deletions(-)
diff --git a/src/components/map/components/dimension.vue b/src/components/map/components/dimension.vue
index 2fe92f0..329801b 100644
--- a/src/components/map/components/dimension.vue
+++ b/src/components/map/components/dimension.vue
@@ -323,8 +323,8 @@
global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100
global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = 1100
// 最大
- global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400
- global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1400
+ // global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400
+ // global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1400
// 设置相机缩小时的速率
global.viewer.scene.screenSpaceCameraController._minimumZoomRate = 2000
@@ -470,153 +470,157 @@
}
}
- document.querySelector('.dc-zoom-controller').children[2].onclick =
- function () {
- if (
- that.dimensionValue != undefined &&
- that.dimensionValue != '真三维'
- ) {
- const height = Math.ceil(
- global.viewer.camera.positionCartographic.height
- )
+ // document.querySelector('.dc-zoom-controller').children[2].onclick =
+ // function () {
+ // if (
+ // that.dimensionValue != undefined &&
+ // that.dimensionValue != '真三维'
+ // ) {
+ // const height = Math.ceil(
+ // global.viewer.camera.positionCartographic.height
+ // )
- if (height < 150) {
- global.viewer.camera.setView({
- destination:
- global.DC.Namespace.Cesium.Cartesian3.fromRadians(
- global.viewer.camera.positionCartographic.longitude,
- global.viewer.camera.positionCartographic.latitude,
- 200
- ),
- orientation: {
- // 指向
- heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
+ // if (height < 150) {
+ // global.viewer.camera.setView({
+ // destination:
+ // global.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ // global.viewer.camera.positionCartographic.longitude,
+ // global.viewer.camera.positionCartographic.latitude,
+ // 200
+ // ),
+ // orientation: {
+ // // 指向
+ // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // // 视角
+ // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ // roll: 0.0
+ // }
+ // })
- return
- }
+ // return
+ // }
- if (height < 250) {
- global.viewer.camera.setView({
- destination:
- global.DC.Namespace.Cesium.Cartesian3.fromRadians(
- global.viewer.camera.positionCartographic.longitude,
- global.viewer.camera.positionCartographic.latitude,
- 300
- ),
- orientation: {
- // 指向
- heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
+ // if (height < 250) {
+ // global.viewer.camera.setView({
+ // destination:
+ // global.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ // global.viewer.camera.positionCartographic.longitude,
+ // global.viewer.camera.positionCartographic.latitude,
+ // 300
+ // ),
+ // orientation: {
+ // // 指向
+ // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // // 视角
+ // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ // roll: 0.0
+ // }
+ // })
- return
- }
+ // return
+ // }
- if (height < 350) {
- global.viewer.camera.setView({
- destination:
- global.DC.Namespace.Cesium.Cartesian3.fromRadians(
- global.viewer.camera.positionCartographic.longitude,
- global.viewer.camera.positionCartographic.latitude,
- 400
- ),
- orientation: {
- // 指向
- heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
- }
- }
- }
+ // if (height < 350) {
+ // global.viewer.camera.setView({
+ // destination:
+ // global.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ // global.viewer.camera.positionCartographic.longitude,
+ // global.viewer.camera.positionCartographic.latitude,
+ // 400
+ // ),
+ // orientation: {
+ // // 指向
+ // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // // 视角
+ // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ // roll: 0.0
+ // }
+ // })
+ // }
+ // }
+ // }
- document.querySelector('.dc-zoom-controller').children[0].onclick =
- function () {
- if (
- that.dimensionValue != undefined &&
- that.dimensionValue != '真三维'
- ) {
- const height = Math.ceil(
- global.viewer.camera.positionCartographic.height
- )
+ // document.querySelector('.dc-zoom-controller').children[0].onclick =
+ // function () {
+ // if (
+ // that.dimensionValue != undefined &&
+ // that.dimensionValue != '真三维'
+ // ) {
+ // const height = Math.ceil(
+ // global.viewer.camera.positionCartographic.height
+ // )
- if (height > 350) {
- global.viewer.camera.setView({
- destination:
- global.DC.Namespace.Cesium.Cartesian3.fromRadians(
- global.viewer.camera.positionCartographic.longitude,
- global.viewer.camera.positionCartographic.latitude,
- 300
- ),
- orientation: {
- // 指向
- heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
+ // if (height > 350) {
+ // global.viewer.camera.setView({
+ // destination:
+ // global.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ // global.viewer.camera.positionCartographic.longitude,
+ // global.viewer.camera.positionCartographic.latitude,
+ // 300
+ // ),
+ // orientation: {
+ // // 指向
+ // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // // 视角
+ // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ // roll: 0.0
+ // }
+ // })
- return
- }
+ // return
+ // }
- if (height > 250) {
- global.viewer.camera.setView({
- destination:
- global.DC.Namespace.Cesium.Cartesian3.fromRadians(
- global.viewer.camera.positionCartographic.longitude,
- global.viewer.camera.positionCartographic.latitude,
- 200
- ),
- orientation: {
- // 指向
- heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
+ // if (height > 250) {
+ // global.viewer.camera.setView({
+ // destination:
+ // global.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ // global.viewer.camera.positionCartographic.longitude,
+ // global.viewer.camera.positionCartographic.latitude,
+ // 200
+ // ),
+ // orientation: {
+ // // 指向
+ // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // // 视角
+ // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ // roll: 0.0
+ // }
+ // })
- return
- }
+ // return
+ // }
- if (height > 150) {
- global.viewer.camera.setView({
- destination:
- global.DC.Namespace.Cesium.Cartesian3.fromRadians(
- global.viewer.camera.positionCartographic.longitude,
- global.viewer.camera.positionCartographic.latitude,
- 100
- ),
- orientation: {
- // 指向
- heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
- // 视角
- pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
- roll: 0.0
- }
- })
- }
- }
- }
+ // if (height > 150) {
+ // global.viewer.camera.setView({
+ // destination:
+ // global.DC.Namespace.Cesium.Cartesian3.fromRadians(
+ // global.viewer.camera.positionCartographic.longitude,
+ // global.viewer.camera.positionCartographic.latitude,
+ // 100
+ // ),
+ // orientation: {
+ // // 指向
+ // heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
+ // // 视角
+ // pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
+ // roll: 0.0
+ // }
+ // })
+ // }
+ // }
+ // }
- global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent)
- global.eagleViewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.smallMapCameraEvent)
+ // global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent)
+ // global.eagleViewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.smallMapCameraEvent)
}
}
}
},
methods: {
+ zoomToOpen () {
+
+ },
+
locationSTM () {
global.viewer.flyToPosition('116.45793269658417,39.92711385557482,617.5967826044838,181.95219395269424,-21.286437065473546')
},
diff --git a/src/components/searchDetails/index.vue b/src/components/searchDetails/index.vue
index e845ed1..11f2cc3 100644
--- a/src/components/searchDetails/index.vue
+++ b/src/components/searchDetails/index.vue
@@ -240,9 +240,9 @@
left: auto;
bottom: 0;
margin: auto;
- width: 14px;
- height: 14px;
- cursor: pointer;
+ width: 16px;
+ height: 16px;
+ cursor: poiner;
}
}
diff --git a/src/pcviews/specialmap/welcome.vue b/src/pcviews/specialmap/welcome.vue
index fa80c6d..72a60c2 100644
--- a/src/pcviews/specialmap/welcome.vue
+++ b/src/pcviews/specialmap/welcome.vue
@@ -73,6 +73,16 @@
</div>
</div>
</div>
+
+ <!-- <div v-show="layerList.length > 0" class="layer-manage-container">
+ <div class="header">图层管理</div>
+ <ul class="content">
+ <li v-for="(item, index) in layerList" :key="index">
+ {{item.name}}:
+ <el-switch v-model="item.flag" @change="switchChange(item)"></el-switch>
+ </li>
+ </ul>
+ </div>-->
</div>
</template>
@@ -86,6 +96,8 @@
export default {
data () {
return {
+ url: '',
+ layerList: [],
time: '',
sponsor: '',
undertake: '',
@@ -155,6 +167,26 @@
])
},
methods: {
+ switchChange (item) {
+ if (item.flag == true) {
+
+ } else {
+
+ }
+ },
+
+ addArcgisLayer (url) {
+ global.viewer.imageryLayers.addImageryProvider(
+ new global.DC.Namespace.Cesium.ArcGisMapServerImageryProvider({
+ url: url
+ })
+ )
+ },
+
+ removeArcgisLayer () {
+
+ },
+
getData () {
getWelcome({ hdname: this.urlDataName }).then((res) => {
var result = res.data.data
@@ -172,6 +204,17 @@
this.list = result.tpurl.split(',')
this.pointNameList = result.addressname.split(',')
this.pointList = result.address.split(';')
+ this.layerList = []
+
+ if (result.mapname != '' && result.mapname != null && result.mapname != undefined) {
+ var mapname = result.mapname.split(',')
+ var url = result.url.split(',')
+ mapname.forEach((item, index) => {
+ this.layerList.push({ flag: false, name: item, url: url[index] })
+ })
+ this.layerList[0].flag = true
+ this.addArcgisLayer(this.layerList[0].url)
+ }
var a = result.lx.split(';')
@@ -202,6 +245,7 @@
this.pointList.forEach((item, index) => {
this.drawPoint(item.split(','), this.pointNameList[index])
})
+
if (this.pointList.length > 0) {
this.$store.dispatch('pcMoveView', {
viewer: global.viewer,
@@ -529,4 +573,28 @@
}
}
}
+
+.layer-manage-container {
+ padding: 0 10px 10px 10px;
+ position: fixed;
+ right: 10px;
+ bottom: 240px;
+ width: 120px;
+ background: rgba(40, 187, 240, 0.7);
+ border-radius: 10px;
+ color: #fff;
+ border: 1px solid #29baf1;
+ box-shadow: 0 0 10px 2px #29baf1;
+
+ .header {
+ line-height: 36px;
+ text-align: center;
+ }
+
+ .content {
+ max-height: calc(180px - 36px);
+ overflow-y: auto;
+ text-align: center;
+ }
+}
</style>
diff --git a/src/router/axios.js b/src/router/axios.js
index a29adf7..4bf3a21 100644
--- a/src/router/axios.js
+++ b/src/router/axios.js
@@ -13,7 +13,7 @@
// console.log(url);
// }, 3000);
window.$apiUrls = 'http://171.34.197.243:782'
-// window.$apiUrls = 'http://192.168.0.222:82'
+// window.$apiUrls = 'http://192.168.0.102:82'
const service = axios.create({
// baseURL: 'http://192.168.0.107:83',
diff --git a/src/styles/pcpage/campus-nav.scss b/src/styles/pcpage/campus-nav.scss
index 6be04d1..ff35cc1 100644
--- a/src/styles/pcpage/campus-nav.scss
+++ b/src/styles/pcpage/campus-nav.scss
@@ -43,8 +43,8 @@
left: auto;
bottom: 0;
margin: auto;
- width: 14px;
- height: 14px;
+ width: 16px;
+ height: 16px;
cursor: pointer;
}
}
diff --git a/src/styles/pcpage/publicBox/arc-nav-bar.scss b/src/styles/pcpage/publicBox/arc-nav-bar.scss
index 43d5363..ed5575b 100644
--- a/src/styles/pcpage/publicBox/arc-nav-bar.scss
+++ b/src/styles/pcpage/publicBox/arc-nav-bar.scss
@@ -50,8 +50,8 @@
left: auto;
bottom: 0;
margin: auto;
- width: 14px;
- height: 14px;
+ width: 16px;
+ height: 16px;
cursor: pointer;
}
}
@@ -121,7 +121,7 @@
top: 0;
bottom: 0;
margin: auto;
- width: 14px;
+ width: 16px;
}
span {
diff --git a/src/styles/pcpage/publicBox/org-nav-bar.scss b/src/styles/pcpage/publicBox/org-nav-bar.scss
index a308660..dc0bbf0 100644
--- a/src/styles/pcpage/publicBox/org-nav-bar.scss
+++ b/src/styles/pcpage/publicBox/org-nav-bar.scss
@@ -50,8 +50,8 @@
left: auto;
bottom: 0;
margin: auto;
- width: 14px;
- height: 14px;
+ width: 16px;
+ height: 16px;
cursor: pointer;
}
}
@@ -95,7 +95,7 @@
top: 0;
bottom: 0;
margin: auto;
- width: 14px;
+ width: 16px;
}
span {
diff --git a/src/styles/pcpage/publicBox/service-nav-bar.scss b/src/styles/pcpage/publicBox/service-nav-bar.scss
index 4f0400f..e23484d 100644
--- a/src/styles/pcpage/publicBox/service-nav-bar.scss
+++ b/src/styles/pcpage/publicBox/service-nav-bar.scss
@@ -50,8 +50,8 @@
left: auto;
bottom: 0;
margin: auto;
- width: 14px;
- height: 14px;
+ width: 16px;
+ height: 16px;
cursor: pointer;
}
}
@@ -121,7 +121,7 @@
top: 0;
bottom: 0;
margin: auto;
- width: 14px;
+ width: 16px;
}
span {
diff --git a/src/styles/pcpage/tool/layer-manage.scss b/src/styles/pcpage/tool/layer-manage.scss
index f2efd1d..521290c 100644
--- a/src/styles/pcpage/tool/layer-manage.scss
+++ b/src/styles/pcpage/tool/layer-manage.scss
@@ -40,8 +40,8 @@
left: auto;
bottom: 0;
margin: auto;
- width: 14px;
- height: 14px;
+ width: 16px;
+ height: 16px;
cursor: pointer;
}
}
diff --git a/src/styles/pcpage/tool/ranging.scss b/src/styles/pcpage/tool/ranging.scss
index ba50817..f17f25e 100644
--- a/src/styles/pcpage/tool/ranging.scss
+++ b/src/styles/pcpage/tool/ranging.scss
@@ -40,8 +40,8 @@
left: auto;
bottom: 0;
margin: auto;
- width: 14px;
- height: 14px;
+ width: 16px;
+ height: 16px;
cursor: pointer;
}
}
diff --git a/src/styles/pcpage/tool/sign.scss b/src/styles/pcpage/tool/sign.scss
index 78d931a..10c8fee 100644
--- a/src/styles/pcpage/tool/sign.scss
+++ b/src/styles/pcpage/tool/sign.scss
@@ -40,8 +40,8 @@
left: auto;
bottom: 0;
margin: auto;
- width: 14px;
- height: 14px;
+ width: 16px;
+ height: 16px;
cursor: pointer;
}
@@ -52,8 +52,8 @@
left: auto;
bottom: 0;
margin: auto;
- width: 14px;
- height: 14px;
+ width: 16px;
+ height: 16px;
cursor: pointer;
}
}
--
Gitblit v1.9.3