aiccs/src/main.js

73 lines
2.0 KiB
JavaScript
Raw Normal View History

2025-12-27 16:40:23 +08:00
import 'babel-polyfill'
import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import './assets/font/iconfont.css'
import moment from 'moment'
import echarts from 'echarts'
import './utils/rem'
import '@/styles/index.scss' // global css
// import { lazyAMapApiLoaderInstance } from 'vue-amap'
import App from './App'
import store from './store'
import router from './router'
import '@/icons' // icon
import '@/permission' // permission control
import util from '@/common/js/utils'
import * as utils from './utils/index'
import { parseTime } from '@/utils/index.js'
import { xrBaseCodeList } from './api/force'
2025-12-27 16:40:23 +08:00
import hevueImgPreview from 'hevue-img-preview'
import EasyComponent from './plugins/EasyComponent/index'
EasyComponent({
BaseOptionsLoader(baseCode) {
return xrBaseCodeList({ codeid: baseCode })
}
})
import '@/plugins/element/index'
2025-12-27 16:40:23 +08:00
Vue.use(hevueImgPreview)
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api
* you can execute: mockXHR()
*
* Currently MockJs will be used in the production environment,
* please remove it before going online! ! !
*
*/
// import { mockXHR } from '../mock'
// if (process.env.NODE_ENV === 'production') {
// mockXHR()
// }
Vue.prototype.$echarts = echarts
Vue.prototype.$moment = moment
// 工具类
Vue.prototype.$util = util
Vue.prototype.$utils = utils
Vue.component('paper-swiper', () => import ('@/components/PaperSwiper'))
Vue.component('paper', () => import ('@/components/Paper'))
Vue.component('CommonTitle', () => import ('@/components/CommonTitle'))
Vue.component('IframePdf', () => import ('@/components/IframePdf/iframePdf'))
Vue.filter('datetime', function(value) {
if (!value) return ''
return parseTime(value, '{yyyy}-{mm}-{dd} {hh}:{ii}:{ss}')
})
Vue.config.productionTip = false
new Vue({
el: '#app',
router,
store,
render: h => h(App)
})
// 离开删除
window.onbeforeunload = function() {
sessionStorage.removeItem('ssoToken')
}