You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
3.3 KiB

2 years ago
// system入口
2 years ago
// import '@babel/polyfill'
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import 'babel-polyfill'
// import Es6Promise from 'es6-promise'
// Es6Promise.polyfill()
2 years ago
import Vue from 'vue'
import Element from 'element-ui'
import App from './App.vue'
import router from './router'
import store from './store'
import http from './utils/request'
import 'element-ui/lib/theme-chalk/index.css'
import '@/icons'
import '@/assets/scss/aui.scss'
import '@/assets/scss/reset.scss'
import i18n from '@/i18n'
import * as filters from '@/filters'
import { hasPermission, getDictLabel } from '@/utils'
import cloneDeep from 'lodash/cloneDeep'
import 'vxe-table/lib/index.css'
2 years ago
import md5 from 'js-md5'
2 years ago
// import echarts from 'echarts'
import * as echarts from 'echarts'
import moment from 'moment'
// import jsNSV from '@/utils/js-NSV.js'
import Base64 from '@/utils/base64.js'
Vue.prototype.$Base64 = Base64
2 years ago
Vue.prototype.$md5 = md5
2 years ago
import Print from 'vue-print-nb'
Vue.use(Print)
import { confirm } from '@/utils/confirm'
Vue.prototype.$confirmFun = confirm
2 years ago
import jquery from 'jquery'
Vue.prototype.$ = jquery
2 years ago
// import VueDragResize from 'vue-drag-resize'
// Vue.component('vue-drag-resize', VueDragResize)
// 裁切工具
import VueCropper from 'vue-cropper'
Vue.use(VueCropper)
// 全局监听DOM元素
import ElementResizeDetectorMaker from 'element-resize-detector'
Vue.prototype.$erd = ElementResizeDetectorMaker()
import animejs from 'animejs'
Vue.prototype.$anime = animejs
moment.locale('zh-cn') // 设置语言 或 moment.lang('zh-cn');
Vue.use(Element, {
size: 'default',
i18n: (key, value) => i18n.t(key, value)
})
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
// DICOM
import cornerstone from 'cornerstone-core'
import cornerstoneMath from 'cornerstone-math'
import cornerstoneTools from 'cornerstone-tools'
import Hammer from 'hammerjs'
import dicomParser from 'dicom-parser'
import cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
import cornerstoneWebImageLoader from 'cornerstone-web-image-loader'
cornerstoneTools.external.cornerstone = cornerstone
cornerstoneTools.external.Hammer = Hammer
cornerstoneTools.external.cornerstoneMath = cornerstoneMath
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
cornerstoneWADOImageLoader.external.cornerstoneMath = cornerstoneMath
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
cornerstoneWebImageLoader.external.cornerstone = cornerstone
cornerstone.registerImageLoader('http', cornerstoneWADOImageLoader.loadImage)
cornerstone.registerImageLoader('https', cornerstoneWADOImageLoader.loadImage)
cornerstone.registerImageLoader('http', cornerstoneWebImageLoader.loadImage)
Vue.prototype.$cornerstone = cornerstone
Vue.prototype.$cornerstoneTools = cornerstoneTools
// 挂载全局
Vue.prototype.$http = http
Vue.prototype.$hasPermission = hasPermission
Vue.prototype.$getDictLabel = getDictLabel
Vue.prototype.$moment = moment
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false
// 保存整站vuex本地储存初始状态
window.SITE_CONFIG.storeState = cloneDeep(store.state)
new Vue({
i18n,
router,
store,
render: h => h(App)
}).$mount('#app')