Compare commits

..

No commits in common. "d270d23494b47f76e3cb4c9808d011b6b17a025c" and "5dd208aeea5a9ad63289acccb85903faceb4b33b" have entirely different histories.

5 changed files with 48 additions and 51 deletions

View File

@ -167,12 +167,11 @@ import { upload } from '@/utils/upload'
import SelectTree from '@/components/SelectTree' import SelectTree from '@/components/SelectTree'
import waves from '@/directive/waves' // waves directive import waves from '@/directive/waves' // waves directive
import TiandiMap from '@/components/TianMap/TiandiMap.vue' import TiandiMap from '@/components/TianMap/TiandiMap.vue'
import RyDragEntity from '../../../map/js/ry_dragentity' import RyDragEntity from "../../../map/js/ry_dragentity";
import DragEntity from '../../../map/js/dragentity' import DragEntity from "../../../map/js/dragentity";
let viewer = null let viewer = null
let drag = null let drag = null
// eslint-disable-next-line no-unused-vars
let ry_drag = null let ry_drag = null
var tiandituTk = 'e8a16137fd226a62a23cc7ba5c9c78ce' var tiandituTk = 'e8a16137fd226a62a23cc7ba5c9c78ce'
var subdomains = ['0', '1', '2', '3', '4', '5', '6', '7'] var subdomains = ['0', '1', '2', '3', '4', '5', '6', '7']
@ -279,7 +278,7 @@ export default {
}, },
center: { longitude: 119.6486945226887, latitude: 39.93555616569192, height: 900000 }, center: { longitude: 119.6486945226887, latitude: 39.93555616569192, height: 900000 },
poinEntity: {}, poinEntity: {},
dichitype: 0 dichitype :0
} }
}, },
watch: { watch: {
@ -329,7 +328,7 @@ export default {
}, },
initMap2() { initMap2() {
console.info(viewer) console.info(viewer)
if (this.dichitype === 2) { if (this.dichitype ===2){
return return
} }
viewer = new Cesium.Viewer('cesiumContainer', { viewer = new Cesium.Viewer('cesiumContainer', {
@ -373,9 +372,9 @@ export default {
this.initInfo() this.initInfo()
this.leftDownAction() this.leftDownAction()
console.log(this.LATITUDE) console.log(this.LATITUDE)
if (this.LATITUDE) { if(this.LATITUDE){
console.log('LATITUDE') console.log('LATITUDE')
this.dfdfd(this.LONGTITUDE, this.LATITUDE) this.dfdfd (this.LONGTITUDE,this.LATITUDE)
} }
this.loadTilesetHandler() this.loadTilesetHandler()
@ -384,16 +383,17 @@ export default {
}) })
this.dichitype = 2 this.dichitype = 2
}, },
leftDownAction() { leftDownAction(){
// entity start // entity start
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK) viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK) viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK)
// entity end // entity end
this.handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas) this.handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas)
let id
this.handler.setInputAction(movement => { this.handler.setInputAction(movement => {
// eslint-disable-next-line no-unused-vars
var cartesian = this.getCatesian3FromPX(movement.position) var cartesian = this.getCatesian3FromPX(movement.position)
}, Cesium.ScreenSpaceEventType.LEFT_CLICK) }, Cesium.ScreenSpaceEventType.LEFT_CLICK)
}, },
getCatesian3FromPX: function(px) { getCatesian3FromPX: function(px) {
if (viewer && px) { if (viewer && px) {
@ -421,11 +421,8 @@ export default {
if (cartesian) { if (cartesian) {
const cartographic = Cesium.Cartographic.fromCartesian(cartesian) const cartographic = Cesium.Cartographic.fromCartesian(cartesian)
if (cartographic.height < 0) cartographic.height = 0 if (cartographic.height < 0) cartographic.height = 0
// eslint-disable-next-line prefer-const,one-var
let lon = Cesium.Math.toDegrees(cartographic.longitude), let lon = Cesium.Math.toDegrees(cartographic.longitude),
// eslint-disable-next-line prefer-const
lat = Cesium.Math.toDegrees(cartographic.latitude), lat = Cesium.Math.toDegrees(cartographic.latitude),
// eslint-disable-next-line prefer-const
height = cartographic.height height = cartographic.height
cartesian = this.transformWGS84ToCartesian({ cartesian = this.transformWGS84ToCartesian({
lng: lon, lng: lon,
@ -464,26 +461,26 @@ export default {
const height = cartographic.height // const height = cartographic.height //
this.LONGTITUDE = lng this.LONGTITUDE = lng
this.LATITUDE = lat this.LATITUDE = lat
this.dfdfd(lng, lat) this.dfdfd(lng,lat)
return `CGCS2000 坐标: 经度 ${lng}, 纬度 ${lat}, 高度 ${height}` return `CGCS2000 坐标: 经度 ${lng}, 纬度 ${lat}, 高度 ${height}`
} }
}, },
transformWGS84ToCartesian: function(position, alt) { transformWGS84ToCartesian: function(position, alt) {
// eslint-disable-next-line no-return-assign // eslint-disable-next-line no-return-assign
return position ? Cesium.Cartesian3.fromDegrees( return position ? Cesium.Cartesian3.fromDegrees(
position.lng || position.lon, position.lng || position.lon,
position.lat, position.lat,
position.alt = alt || position.alt, position.alt = alt || position.alt,
Cesium.Ellipsoid.WGS84 Cesium.Ellipsoid.WGS84
) )
: Cesium.Cartesian3.ZERO : Cesium.Cartesian3.ZERO
}, },
dfdfd(LONGITUDE, LATITUDE) { dfdfd (LONGITUDE,LATITUDE){
let dianweiName = '消防点位' let dianweiName = '消防点位'
if (this.form.FIRE_POINT_NAME) { if(this.form.FIRE_POINT_NAME){
dianweiName = this.form.FIRE_POINT_NAME dianweiName = this.form.FIRE_POINT_NAME
} }
var initPoint = [ var initPoint = [
{ {
'id': '00002', 'id': '00002',
'data_id': '00002', 'data_id': '00002',
@ -506,7 +503,7 @@ export default {
}, },
// //
dragAreaEntity(pointArr) { dragAreaEntity(pointArr) {
console.log('pointArr', pointArr) console.log('pointArr',pointArr)
console.log('') console.log('')
this.poinEntity = {} this.poinEntity = {}
@ -719,7 +716,7 @@ export default {
handleMap() { handleMap() {
this.dialogFormMap = true this.dialogFormMap = true
this.$nextTick(() => { this.$nextTick(() => {
if (!this.map) { if (!this.map){
// this.initMap(this.LONGTITUDE, this.LATITUDE, 16) // this.initMap(this.LONGTITUDE, this.LATITUDE, 16)
this.initCorpInfo() this.initCorpInfo()
} else { } else {

View File

@ -54,13 +54,13 @@
<el-col :span="7"> <el-col :span="7">
<el-form-item label="添加时间"> <el-form-item label="添加时间">
<el-date-picker <el-date-picker
v-model="ADDTIME" v-model="ADDTIME"
type="daterange" type="daterange"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
class="filter-item"/> class="filter-item"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -189,7 +189,7 @@ export default {
}, },
// //
getQuery() { getQuery() {
if (this.ADDTIME == null | this.ADDTIME == undefined) { if (this.ADDTIME == null | this.ADDTIME == undefined ){
this.ADDTIME = [] this.ADDTIME = []
} }
this.getList() this.getList()
@ -218,8 +218,8 @@ export default {
DEPARTMENT_IDS: this.DEPARTMENT_ID.join(','), DEPARTMENT_IDS: this.DEPARTMENT_ID.join(','),
LEVEL: this.LEVEL, LEVEL: this.LEVEL,
STATUS: this.STATUS, STATUS: this.STATUS,
ADDSTART: this.ADDTIME == undefined ? '' : this.ADDTIME[0], ADDSTART: this.ADDTIME==undefined?'':this.ADDTIME[0],
ADDEND: this.ADDTIME == undefined ? '' : this.ADDTIME[1] ADDEND: this.ADDTIME==undefined?'':this.ADDTIME[1]
} }
).then((data) => { ).then((data) => {
this.listLoading = false this.listLoading = false

View File

@ -5,13 +5,13 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>hello-jsmap</title> <title>hello-jsmap</title>
<script src="http://192.168.192.201:7024/joysuch/jsmap/jsmap.js" type="text/javascript"></script> <script src="http://192.168.0.31:8089/joysuch/jsmap/jsmap.js" type="text/javascript"></script>
<link type="text/css" href="http://192.168.192.201:7024/joysuch/jsmap/jsmap.css" rel="stylesheet"/> <link type="text/css" href="http://192.168.0.31:8089/joysuch/jsmap/jsmap.css" rel="stylesheet"/>
<!-- <script src="http://mapdemo.joysuch.com/lib/jsmap/jsmap.js" type="text/javascript"></script>--> <!-- <script src="http://mapdemo.joysuch.com/lib/jsmap/jsmap.js" type="text/javascript"></script>-->
<!-- <link type="text/css" href="http://mapdemo.joysuch.com/lib/jsmap/jsmap.css" rel="stylesheet"/>--> <!-- <link type="text/css" href="http://mapdemo.joysuch.com/lib/jsmap/jsmap.css" rel="stylesheet"/>-->
<link rel="stylesheet" href="http://192.168.192.201:7024/joysuch/LocalAssets/css/animation/pop.css"> <link rel="stylesheet" href="http://192.168.0.31:8089/joysuch/LocalAssets/css/animation/pop.css">
<link rel="stylesheet" href="http://192.168.192.201:7024/joysuch/LocalAssets/css/animation/loading.css"> <link rel="stylesheet" href="http://192.168.0.31:8089/joysuch/LocalAssets/css/animation/loading.css">
<link rel="stylesheet" href="http://192.168.192.201:7024/joysuch/LocalAssets/css/dom.css"> <link rel="stylesheet" href="http://192.168.0.31:8089/joysuch/LocalAssets/css/dom.css">
<style> <style>
.jsmap-animation-point, .jsmap-animation-point,
.jsmap-animation-point:after, .jsmap-animation-point:after,
@ -326,7 +326,7 @@
mapType: jsmap.JSMapType.MAP_3D, mapType: jsmap.JSMapType.MAP_3D,
//必要,地图路径 //必要,地图路径
// mapServerURL: 'http://mapdemo.joysuch.com', // mapServerURL: 'http://mapdemo.joysuch.com',
mapServerURL: 'http://192.168.192.201:7024/joysuch/jsmap/data/map', mapServerURL: 'http://192.168.0.31:8089/joysuch/jsmap/data/map',
openingAnimation: false, openingAnimation: false,
enableLighting: true, enableLighting: true,
enableShadows: true, enableShadows: true,

View File

@ -5,13 +5,13 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>hello-jsmap</title> <title>hello-jsmap</title>
<script src="http://192.168.192.201:7024/joysuch/jsmap/jsmap.js" type="text/javascript"></script> <script src="http://192.168.0.31:8089/joysuch/jsmap/jsmap.js" type="text/javascript"></script>
<link type="text/css" href="http://192.168.192.201:7024/joysuch/jsmap/jsmap.css" rel="stylesheet"/> <link type="text/css" href="http://192.168.0.31:8089/joysuch/jsmap/jsmap.css" rel="stylesheet"/>
<!-- <script src="http://mapdemo.joysuch.com/lib/jsmap/jsmap.js" type="text/javascript"></script>--> <!-- <script src="http://mapdemo.joysuch.com/lib/jsmap/jsmap.js" type="text/javascript"></script>-->
<!-- <link type="text/css" href="http://mapdemo.joysuch.com/lib/jsmap/jsmap.css" rel="stylesheet"/>--> <!-- <link type="text/css" href="http://mapdemo.joysuch.com/lib/jsmap/jsmap.css" rel="stylesheet"/>-->
<link rel="stylesheet" href="http://192.168.192.201:7024/joysuch/LocalAssets/css/animation/pop.css"> <link rel="stylesheet" href="http://192.168.0.31:8089/joysuch/LocalAssets/css/animation/pop.css">
<link rel="stylesheet" href="http://192.168.192.201:7024/joysuch/LocalAssets/css/animation/loading.css"> <link rel="stylesheet" href="http://192.168.0.31:8089/joysuch/LocalAssets/css/animation/loading.css">
<link rel="stylesheet" href="http://192.168.192.201:7024/joysuch/LocalAssets/css/dom.css"> <link rel="stylesheet" href="http://192.168.0.31:8089/joysuch/LocalAssets/css/dom.css">
<style> <style>
.jsmap-animation-point, .jsmap-animation-point,
.jsmap-animation-point:after, .jsmap-animation-point:after,
@ -329,7 +329,7 @@
mapType: jsmap.JSMapType.MAP_3D, mapType: jsmap.JSMapType.MAP_3D,
//必要,地图路径 //必要,地图路径
// mapServerURL: 'http://mapdemo.joysuch.com', // mapServerURL: 'http://mapdemo.joysuch.com',
mapServerURL: 'http://192.168.192.201:7024/joysuch/jsmap/data/map', mapServerURL: 'http://192.168.0.31:8089/joysuch/jsmap/data/map',
mapScaleLevelRange: [15,20], //地图缩放范围,默认[1,24] mapScaleLevelRange: [15,20], //地图缩放范围,默认[1,24]
openingAnimation: false, // 是否开启开场动画默认true openingAnimation: false, // 是否开启开场动画默认true
lightingColor: '#3C4040', // 光照颜色,修改3D地图以外地图的遮罩颜色 lightingColor: '#3C4040', // 光照颜色,修改3D地图以外地图的遮罩颜色

View File

@ -5,13 +5,13 @@
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>hello-jsmap</title> <title>hello-jsmap</title>
<script src="http://192.168.192.201:7024/joysuch/jsmap/jsmap.js" type="text/javascript"></script> <script src="http://192.168.0.31:8089/joysuch/jsmap/jsmap.js" type="text/javascript"></script>
<link type="text/css" href="http://192.168.192.201:7024/joysuch/jsmap/jsmap.css" rel="stylesheet"/> <link type="text/css" href="http://192.168.0.31:8089/joysuch/jsmap/jsmap.css" rel="stylesheet"/>
<!-- <script src="http://mapdemo.joysuch.com/lib/jsmap/jsmap.js" type="text/javascript"></script>--> <!-- <script src="http://mapdemo.joysuch.com/lib/jsmap/jsmap.js" type="text/javascript"></script>-->
<!-- <link type="text/css" href="http://mapdemo.joysuch.com/lib/jsmap/jsmap.css" rel="stylesheet"/>--> <!-- <link type="text/css" href="http://mapdemo.joysuch.com/lib/jsmap/jsmap.css" rel="stylesheet"/>-->
<link rel="stylesheet" href="http://192.168.192.201:7024/joysuch/LocalAssets/css/animation/pop.css"> <link rel="stylesheet" href="http://192.168.0.31:8089/joysuch/LocalAssets/css/animation/pop.css">
<link rel="stylesheet" href="http://192.168.192.201:7024/joysuch/LocalAssets/css/animation/loading.css"> <link rel="stylesheet" href="http://192.168.0.31:8089/joysuch/LocalAssets/css/animation/loading.css">
<link rel="stylesheet" href="http://192.168.192.201:7024/joysuch/LocalAssets/css/dom.css"> <link rel="stylesheet" href="http://192.168.0.31:8089/joysuch/LocalAssets/css/dom.css">
<style> <style>
.jsmap-animation-point, .jsmap-animation-point,
.jsmap-animation-point:after, .jsmap-animation-point:after,
@ -336,7 +336,7 @@
mapType: jsmap.JSMapType.MAP_3D, mapType: jsmap.JSMapType.MAP_3D,
//必要,地图路径 //必要,地图路径
// mapServerURL: 'http://mapdemo.joysuch.com', // mapServerURL: 'http://mapdemo.joysuch.com',
mapServerURL: 'http://192.168.192.201:7024/joysuch/jsmap/data/map', mapServerURL: 'http://192.168.0.31:8089/joysuch/jsmap/data/map',
mapScaleLevelRange: [15,20], //地图缩放范围,默认[1,24] mapScaleLevelRange: [15,20], //地图缩放范围,默认[1,24]
openingAnimation: false, openingAnimation: false,
enableLighting: true, enableLighting: true,