| | |
| | | }, |
| | | methods: { |
| | | dingw (item) { |
| | | const that = this |
| | | // console.log(item); |
| | | // this.$store.dispatch("mapFlyTo", { |
| | | // lntLat: [item.jd, item.wd, 120], //114.04020791, 27.62934732 |
| | |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | item.jd, |
| | | item.wd, |
| | | 400.0 |
| | | 950.0 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | }, |
| | | getData () { |
| | | const that = this |
| | | that.loading = true |
| | | const oks = setTimeout(() => { |
| | | that.loading = false |
| | | that.signShow = false |
| | | }, 5000) |
| | | getlabel().then((res) => { |
| | | clearTimeout(oks) |
| | | console.log(res) |
| | | const data = res.data.data.records |
| | | that.signList = data |
| | | that.signList.length > 0 ? that.signShow = true : that.signShow = false |
| | | that.signList.length > 0 |
| | | ? (that.signShow = true) |
| | | : (that.signShow = false) |
| | | that.loading = false |
| | | // that.$store.commit("clearLabelLayerIcon"); |
| | | that.$store.dispatch('addLabelLayerIcon', { |
| | |
| | | }) |
| | | }, |
| | | moveMessage (e, b) { |
| | | if (b == '') { |
| | | global.viewer.tooltip.enable = false |
| | | } else { |
| | | global.viewer.tooltip.enable = true |
| | | global.viewer.tooltip.showAt(e.windowPosition, b) |
| | | } |
| | | global.viewer.tooltip.enable = true |
| | | global.viewer.tooltip.showAt(e.windowPosition, b) |
| | | }, |
| | | |
| | | mouserMove (e) { |
| | | this.moveMessage(e, '点击确认标注位置') |
| | | }, |
| | | |
| | | addSign () { |
| | | var that = this |
| | | this.$store.commit('set_closeMapClick', true) |
| | | // console.log("开始", "see"); |
| | | global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, (e) => |
| | | that.moveMessage(e, '点击确认标注位置') |
| | | ) |
| | | global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, that.mouserMove) |
| | | |
| | | global.viewer.once(global.DC.MouseEventType.CLICK, (e) => { |
| | | if (that.destroyedFlag == false) return |
| | | |
| | | global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, (e) => |
| | | that.moveMessage(e, '') |
| | | ) |
| | | global.viewer.tooltip.showAt({ x: 100, y: 100 }, '') |
| | | global.viewer.tooltip.enable = false |
| | | global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, that.mouserMove) |
| | | |
| | | // eslint-disable-next-line no-unused-vars |
| | | const popup = new global.DC.DivForms(global.viewer, { |
| | | var div = new global.DC.DivForms(global.viewer, { |
| | | domId: 'AddTagBox', |
| | | position: [ |
| | | global.DC.Transform.transformWGS84ToCartesian( |
| | |
| | | this.$store.dispatch('delVisitedViews', this.$route) |
| | | this.$router.push('/pcLayout/default') |
| | | this.$store.commit('clearLabelLayerIcon') |
| | | this.destroyedFlag = false |
| | | 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 |
| | | if (global.DC) { |
| | | global.viewer.on(global.DC.MouseEventType.MOUSE_MOVE, (e) => |
| | | that.moveMessage(e, '') |
| | | ) |
| | | } |
| | | global.viewer.tooltip.showAt({ x: 100, y: 100 }, '') |
| | | global.viewer.tooltip.enable = false |
| | | global.viewer.off(global.DC.MouseEventType.MOUSE_MOVE, that.mouseMove) |
| | | this.$store.commit('clearLabelLayerIcon') |
| | | } |
| | | } |