| | |
| | | return { |
| | | app: false, |
| | | timeString: '', |
| | | timeTimer: null, |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | this.startTimer() |
| | | this.$store.dispatch('GetMenu') |
| | | }, |
| | | beforeDestroy () { |
| | | if (this.timeTimer) { |
| | | clearInterval(this.timeTimer) |
| | | this.timeTimer = null |
| | | } |
| | | }, |
| | | methods: { |
| | | switchTheme () { |
| | | this.$store.commit('SET_THEME_NAME', '') |
| | |
| | | import { fullscreenToggel, listenfullscreen } from 'utils/util'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | fullscreenCleanup: null, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['isFullScren']), |
| | | }, |
| | | mounted() { |
| | | listenfullscreen(this.setScreen); |
| | | this.fullscreenCleanup = listenfullscreen(this.setScreen); |
| | | }, |
| | | beforeDestroy() { |
| | | if (this.fullscreenCleanup) { |
| | | this.fullscreenCleanup(); |
| | | this.fullscreenCleanup = null; |
| | | } |
| | | }, |
| | | methods: { |
| | | setScreen() { |
| | |
| | | data() { |
| | | return { |
| | | time: '', |
| | | timeTimer: null, |
| | | passwd: '', |
| | | passwdError: false, |
| | | pass: false, |
| | |
| | | }, |
| | | created() { |
| | | this.getTime(); |
| | | setInterval(() => { |
| | | if (this.timeTimer) clearInterval(this.timeTimer); |
| | | this.timeTimer = setInterval(() => { |
| | | this.getTime(); |
| | | }, 1000); |
| | | }, |
| | | beforeDestroy() { |
| | | if (this.timeTimer) { |
| | | clearInterval(this.timeTimer); |
| | | this.timeTimer = null; |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | computed: { |
| | | ...mapGetters(['userInfo', 'tag', 'lockPasswd']), |
| | |
| | | }, |
| | | website: website, |
| | | time: '', |
| | | timeTimer: null, |
| | | activeName: 'user', |
| | | socialForm: { |
| | | tenantId: '000000', |
| | |
| | | computed: { |
| | | ...mapGetters(['tagWel']), |
| | | }, |
| | | beforeDestroy() { |
| | | if (this.timeTimer) { |
| | | clearInterval(this.timeTimer); |
| | | this.timeTimer = null; |
| | | } |
| | | }, |
| | | props: [], |
| | | methods: { |
| | | // 动态获取系统名称 |
| | |
| | | }) |
| | | }, |
| | | getTime() { |
| | | setInterval(() => { |
| | | if (this.timeTimer) clearInterval(this.timeTimer); |
| | | this.timeTimer = setInterval(() => { |
| | | this.time = this.$dayjs().format('YYYY-MM-DD HH:mm:ss'); |
| | | }, 1000); |
| | | }, |
| | |
| | | this.handler.removeInputAction(type) |
| | | }) |
| | | |
| | | this.handler.destroy() |
| | | this.handler = null |
| | | } |
| | | } |
| | |
| | | * esc监听全屏 |
| | | */ |
| | | export const listenfullscreen = callback => { |
| | | function listen () { |
| | | const handler = () => { |
| | | callback() |
| | | } |
| | | |
| | | document.addEventListener('fullscreenchange', function () { |
| | | listen() |
| | | }) |
| | | document.addEventListener('mozfullscreenchange', function () { |
| | | listen() |
| | | }) |
| | | document.addEventListener('webkitfullscreenchange', function () { |
| | | listen() |
| | | }) |
| | | document.addEventListener('msfullscreenchange', function () { |
| | | listen() |
| | | }) |
| | | document.addEventListener('fullscreenchange', handler) |
| | | document.addEventListener('mozfullscreenchange', handler) |
| | | document.addEventListener('webkitfullscreenchange', handler) |
| | | document.addEventListener('msfullscreenchange', handler) |
| | | |
| | | return () => { |
| | | document.removeEventListener('fullscreenchange', handler) |
| | | document.removeEventListener('mozfullscreenchange', handler) |
| | | document.removeEventListener('webkitfullscreenchange', handler) |
| | | document.removeEventListener('msfullscreenchange', handler) |
| | | } |
| | | } |
| | | /** |
| | | * 获取缩略图路径 |
| | |
| | | |
| | | const removeDom = () => { |
| | | const dom = document.querySelector('#mapPopUpBox'); |
| | | if (dom && dom.parentNode) { |
| | | dom.parentNode.removeChild(dom); |
| | | if (dom) { |
| | | render(null, dom); |
| | | if (dom.parentNode) { |
| | | dom.parentNode.removeChild(dom); |
| | | } |
| | | } |
| | | }; |
| | | // 移除弹框标签 |
| | |
| | | |
| | | onMounted(() => {}); |
| | | onBeforeUnmount(() => { |
| | | removeLabel(); |
| | | if (viewer) { |
| | | viewer.destroy(); |
| | | } |
| | |
| | | selectionList: [], |
| | | option: option, |
| | | data: [], |
| | | searchChangeHandler: null, |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus?.on('triggerSearchChange', (params) => { |
| | | this.searchChangeHandler = (params) => { |
| | | this.searchChange(params, () => {}); |
| | | }); |
| | | }; |
| | | this.$bus?.on('triggerSearchChange', this.searchChangeHandler); |
| | | }, |
| | | beforeDestroy() { |
| | | if (this.searchChangeHandler) { |
| | | this.$bus?.off('triggerSearchChange', this.searchChangeHandler); |
| | | this.searchChangeHandler = null; |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permission']), |
| | | permissionList () { |
| | |
| | | this.handler.removeInputAction(type) |
| | | }) |
| | | |
| | | this.handler.destroy() |
| | | this.handler = null |
| | | } |
| | | } |
| | |
| | | isPageLoading.value = status; |
| | | }; |
| | | provide('layerParams', layerParams); |
| | | const focusOnNodeHandler = nodeData => { |
| | | focusOnNode(nodeData); |
| | | }; |
| | | onMounted(() => { |
| | | initMap(); |
| | | cesiumContextMenu(); |
| | | getdataFolderApi(); |
| | | // 监听定位事件 |
| | | EventBus.on('focusOnNode', (nodeData) => { |
| | | focusOnNode(nodeData); |
| | | }); |
| | | EventBus.on('focusOnNode', focusOnNodeHandler); |
| | | EventBus.on('deleteMapEntityById', deleteMapEntityById); |
| | | EventBus.on('deleteMapEntitiesByFolderId', deleteMapEntitiesByFolderId); |
| | | }); |
| | |
| | | onBeforeUnmount(() => { |
| | | destroyMap(); |
| | | cesiumContextMenu(false); |
| | | EventBus.off('focusOnNode', focusOnNodeHandler); |
| | | EventBus.off('deleteMapEntityById', deleteMapEntityById); |
| | | EventBus.off('deleteMapEntitiesByFolderId', deleteMapEntitiesByFolderId); |
| | | }); |