<template>
|
<public-box class="tool-layer">
|
<template slot="public-box-header">
|
<div class="title">
|
<img class="icon deblurring" src="/img/icon/tool-layer.png" alt />
|
<span>图层管理</span>
|
</div>
|
<img class="close deblurring" src="/img/navicon/close.png" alt @click="closeModel" />
|
</template>
|
<template slot="public-box-content">
|
<div class="list-box">
|
<ul v-show="signList.length > 0">
|
<li v-for="(item, index) in signList" :key="index">
|
<img src="/img/icon/layer-manage.png" alt />
|
图层1
|
<el-switch v-model="item.flag" active-text="显示" inactive-text="隐藏"></el-switch>
|
</li>
|
</ul>
|
<div v-show="signList.length == 0" class="no-data">
|
<img src="/img/icon/no-data.png" alt />
|
<div>暂无数据</div>
|
</div>
|
</div>
|
</template>
|
</public-box>
|
</template>
|
|
<script>
|
|
export default {
|
data () {
|
return {
|
signList: [{ flag: true }],
|
destroyedFlag: true
|
}
|
},
|
mounted () {
|
|
},
|
methods: {
|
moveMessage (e, b) {
|
global.viewer.tooltip.enable = true
|
global.viewer.tooltip.showAt(e.windowPosition, b)
|
},
|
|
mouseMove (e) {
|
this.moveMessage(e, '点击确认标注位置')
|
},
|
|
addSign () {
|
var that = this
|
|
global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, that.mouseMove)
|
|
global.viewer.once(global.DC.MouseEventType.CLICK, (e) => {
|
if (that.destroyedFlag == false) return
|
|
global.viewer.tooltip.showAt({ x: 100, y: 100 }, '')
|
global.viewer.tooltip.enable = false
|
global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, that.mouseMove)
|
|
// eslint-disable-next-line no-unused-vars
|
var popup = new global.DC.DivForms(global.viewer, {
|
domId: 'AddTagBox',
|
position: [global.DC.Transform.transformWGS84ToCartesian(
|
new global.DC.Position(
|
Number(
|
e.wgs84SurfacePosition.lng
|
),
|
Number(
|
e.wgs84SurfacePosition.lat
|
),
|
Number(
|
e.wgs84SurfacePosition.alt
|
)
|
)
|
)]
|
})
|
|
that.$store.commit('SET_ADDTAGPOSITION', e.wgs84SurfacePosition)
|
that.$store.commit('SET_ADDTAGPOPUP', true)
|
})
|
},
|
|
closeModel () {
|
this.$store.dispatch('delVisitedViews', this.$route)
|
this.$router.push('/pcLayout/default')
|
global.viewer.tooltip.showAt({ x: 100, y: 100 }, '')
|
global.viewer.tooltip.enable = false
|
global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, this.mouseMove)
|
}
|
},
|
destroyed () {
|
var that = this
|
that.destroyedFlag = false
|
global.viewer.tooltip.showAt({ x: 100, y: 100 }, '')
|
global.viewer.tooltip.enable = false
|
global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, that.mouseMove)
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.move {
|
cursor: move;
|
}
|
</style>
|