| | |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2025-04-10 12:19:47 |
| | | * @FilePath: \drone-web-manage\src\main.js |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2025 by shuishen, All Rights Reserved. |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2025 by shuishen, All Rights Reserved. |
| | | */ |
| | | import { createApp } from 'vue' |
| | | import website from './config/website' |
| | |
| | | import avueUeditor from 'avue-plugin-ueditor' |
| | | import basicBlock from 'components/basic-block/main.vue' |
| | | import basicContainer from 'components/basic-container/main.vue' |
| | | import welContainer from 'components/wel-container/main.vue' |
| | | import basicMainContent from 'components/basic-main-content/main.vue' |
| | | |
| | | import thirdRegister from './components/third-register/main.vue' |
| | | import NfDesignBase from '@saber/nf-design-base-elp' |
| | | import flowDesign from './components/flow-design/main.vue' |
| | |
| | | import 'animate.css' |
| | | import dayjs from 'dayjs' |
| | | import 'styles/common.scss' |
| | | import * as Cesium from 'cesium' |
| | | |
| | | // 业务组件 |
| | | import tenantPackage from './views/system/tenantpackage.vue' |
| | | // 地图依赖 |
| | |
| | | import * as DC from '@dvgis/dc-sdk' |
| | | import '@dvgis/dc-sdk/dist/dc.min.css' |
| | | window.DC = Object.create(DC) |
| | | import { onResize } from '@/utils/rem' |
| | | onResize() |
| | | const { VITE_APP_BASE, VITE_APP_CESIUM_TOKEN } = import.meta.env |
| | | window.CESIUM_BASE_URL = `${VITE_APP_BASE}/cesiumPu` |
| | | Cesium.Ion.defaultAccessToken = VITE_APP_CESIUM_TOKEN |
| | | |
| | | // 获取url中是否存在token |
| | | const urlParams = getUrlParams(window.location.href) |
| | |
| | | setStore('saber-token', urlParams.token) |
| | | setToken(urlParams.token) |
| | | setRefreshToken(urlParams.token) |
| | | |
| | | const cdxurl = window.location.pathname.replace(/^.*?\/manage\/(.*)$/, '/$1') |
| | | localStorage.setItem('cdx', cdxurl + '?orderNumber=' + urlParams.orderNumber) |
| | | |
| | | // 设置用户信息,把大屏用户信息保存到localStorage |
| | | let obj = {} |
| | | obj = localStorage.getItem("bs_userInfo") |
| | |
| | | app.component(key, component) |
| | | } |
| | | app.component('basicContainer', basicContainer) |
| | | app.component('welContainer', welContainer) |
| | | app.component('basicMainContent', basicMainContent) |
| | | |
| | | app.component('basicBlock', basicBlock) |
| | | app.component('thirdRegister', thirdRegister) |
| | | app.component('flowDesign', flowDesign) |
| | |
| | | app.config.globalProperties.$dayjs = dayjs |
| | | app.config.globalProperties.website = website |
| | | app.config.globalProperties.getScreen = getScreen |
| | | app.config.globalProperties.pxToVh = height => height / 10.8 + 'vh' |
| | | app.config.globalProperties.pxToRem = width => width * 0.1 + 'rem' |
| | | |
| | | app.use(error) |
| | | app.use(i18n) |
| | | app.use(store) |