| | |
| | | import Vue from 'vue'; |
| | | import axios from './router/axios'; |
| | | import VueAxios from 'vue-axios'; |
| | | import App from './App'; |
| | | import router from './router/router'; |
| | | import './permission'; // 权限 |
| | | import './error'; // 日志 |
| | | import './cache';//页面缓存 |
| | | import store from './store'; |
| | | /* |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-02-06 10:34:02 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-07 10:39:07 |
| | | * @FilePath: \srs-police-web\src\main.js |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. |
| | | */ |
| | | import Vue from 'vue' |
| | | import axios from './router/axios' |
| | | import VueAxios from 'vue-axios' |
| | | import App from './App' |
| | | import router from './router/router' |
| | | import './permission' // 权限 |
| | | import './error' // 日志 |
| | | import './cache'//页面缓存 |
| | | import store from './store' |
| | | import { loadStyle } from './util/util' |
| | | import * as urls from '@/config/env'; |
| | | import Element from 'element-ui'; |
| | | import * as urls from '@/config/env' |
| | | import Element from 'element-ui' |
| | | import { |
| | | iconfontUrl, |
| | | iconfontVersion |
| | | } from '@/config/env'; |
| | | import i18n from './lang'; // Internationalization |
| | | import './styles/common.scss'; |
| | | import basicBlock from './components/basic-block/main'; |
| | | import basicContainer from './components/basic-container/main'; |
| | | import thirdRegister from './components/third-register/main'; |
| | | import flowDesign from './components/flow-design/main'; |
| | | import avueUeditor from 'avue-plugin-ueditor'; |
| | | import website from '@/config/website'; |
| | | import crudCommon from '@/mixins/crud'; |
| | | iconfontUrl, |
| | | iconfontVersion |
| | | } from '@/config/env' |
| | | import i18n from './lang' // Internationalization |
| | | import './styles/common.scss' |
| | | import basicBlock from './components/basic-block/main' |
| | | import basicContainer from './components/basic-container/main' |
| | | import thirdRegister from './components/third-register/main' |
| | | import flowDesign from './components/flow-design/main' |
| | | import avueUeditor from 'avue-plugin-ueditor' |
| | | import website from '@/config/website' |
| | | import crudCommon from '@/mixins/crud' |
| | | // 业务组件 |
| | | import tenantPackage from './views/system/tenantpackage'; |
| | | import tenantPackage from './views/system/tenantpackage' |
| | | |
| | | import * as echarts from 'echarts' |
| | | Vue.prototype.$echarts = echarts |
| | | |
| | | import DC from '@dvgis/dc-sdk/dist/dc.base.min' //基础包 |
| | | import DcCore from '@dvgis/dc-sdk/dist/dc.core.min' //核心包 |
| | | import DcChart from '@dvgis/dc-sdk/dist/dc.chart.min' //chart包 |
| | | import DcMapv from '@dvgis/dc-sdk/dist/dc.mapv.min' //mapv包 |
| | | import DcS3M from '@dvgis/dc-sdk/dist/dc.s3m.min' //s3m包 |
| | | import '@dvgis/dc-sdk/dist/dc.core.min.css' // 主要样式 |
| | | |
| | | global.DC = DC // 将DC提升到全局变量,方便在工程中直接使用 |
| | | global.viewer = null // 将viewer提升到全局变量,方便在工程中直接使用 |
| | | global.searchViewer = null // 将viewer提升到全局变量,方便在工程中直接使用 |
| | | |
| | | global.echarts = echarts // 将DC提升到全局变量,方便在工程中直接使用 |
| | | |
| | | DC.use(DcCore) // 安装DC核心库 |
| | | DC.use(DcChart) // 安装DC图标库,使用前确保echarts为全局函数 |
| | | DC.use(DcMapv) // 安装Mapv库 |
| | | DC.use(DcS3M) // 安装DcS3M库 |
| | | |
| | | |
| | | // 注册全局crud驱动 |
| | | window.$crudCommon = crudCommon; |
| | | window.$crudCommon = crudCommon |
| | | // 加载Vue拓展 |
| | | Vue.use(router); |
| | | Vue.use(VueAxios, axios); |
| | | Vue.use(router) |
| | | Vue.use(VueAxios, axios) |
| | | Vue.use(Element, { |
| | | i18n: (key, value) => i18n.t(key, value) |
| | | }); |
| | | i18n: (key, value) => i18n.t(key, value) |
| | | }) |
| | | Vue.use(window.AVUE, { |
| | | size: 'small', |
| | | tableSize: 'small', |
| | | calcHeight: 65, |
| | | i18n: (key, value) => i18n.t(key, value) |
| | | }); |
| | | size: 'small', |
| | | tableSize: 'small', |
| | | calcHeight: 65, |
| | | i18n: (key, value) => i18n.t(key, value) |
| | | }) |
| | | // 注册全局容器 |
| | | Vue.component('basicContainer', basicContainer); |
| | | Vue.component('basicBlock', basicBlock); |
| | | Vue.component('thirdRegister', thirdRegister); |
| | | Vue.component('avueUeditor', avueUeditor); |
| | | Vue.component('flowDesign', flowDesign); |
| | | Vue.component('tenantPackage', tenantPackage); |
| | | Vue.component('basicContainer', basicContainer) |
| | | Vue.component('basicBlock', basicBlock) |
| | | Vue.component('thirdRegister', thirdRegister) |
| | | Vue.component('avueUeditor', avueUeditor) |
| | | Vue.component('flowDesign', flowDesign) |
| | | Vue.component('tenantPackage', tenantPackage) |
| | | // 加载相关url地址 |
| | | Object.keys(urls).forEach(key => { |
| | | Vue.prototype[key] = urls[key]; |
| | | }); |
| | | Vue.prototype[key] = urls[key] |
| | | }) |
| | | // 加载NutFlow |
| | | Vue.use(window.WfDesignBase); |
| | | Vue.use(window.WfDesignBase) |
| | | // 加载website |
| | | Vue.prototype.website = website; |
| | | Vue.prototype.website = website |
| | | // 动态加载阿里云字体库 |
| | | iconfontVersion.forEach(ele => { |
| | | loadStyle(iconfontUrl.replace('$key', ele)); |
| | | }); |
| | | loadStyle(iconfontUrl.replace('$key', ele)) |
| | | }) |
| | | |
| | | Vue.config.productionTip = false; |
| | | |
| | | //import Cookies from 'js-cookie' |
| | | // 携带token跳转页面设置 |
| | | |
| | | //const tokenLength = window.location.href.indexOf('='); |
| | | //if(tokenLength>0){ |
| | | // //取“=”之后的token |
| | | // let z = window.location.href.substring(tokenLength + 1) |
| | | // // 把token存进B系统 |
| | | // let obj = { |
| | | // dataType: typeof (z), |
| | | // content: z, |
| | | // datetime: new Date().getTime() |
| | | // } |
| | | // window.localStorage.setItem('saber-token', JSON.stringify(obj)); |
| | | // Cookies.set('saber-access-token', z) |
| | | //} |
| | | Vue.config.productionTip = false |
| | | |
| | | new Vue({ |
| | | router, |
| | | store, |
| | | i18n, |
| | | render: h => h(App) |
| | | }).$mount('#app'); |
| | | router, |
| | | store, |
| | | i18n, |
| | | render: h => h(App) |
| | | }).$mount('#app') |