2025-03-23 10:03:12 +08:00
|
|
|
|
/*
|
|
|
|
|
* @Descripttion:
|
|
|
|
|
* @version:
|
|
|
|
|
* @Author: kBank
|
|
|
|
|
* @Date: 2022-10-24 10:45:39
|
|
|
|
|
*/
|
|
|
|
|
import Vue from 'vue'
|
|
|
|
|
import Vue2OrgTree from 'vue-tree-color'
|
|
|
|
|
Vue.use(Vue2OrgTree)
|
|
|
|
|
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
|
|
|
|
import preventReClick from './utils/index'
|
|
|
|
|
Vue.use(preventReClick)
|
|
|
|
|
import ElementUI from 'element-ui'
|
|
|
|
|
import 'element-ui/lib/theme-chalk/index.css'
|
|
|
|
|
import '../theme/index.css'
|
|
|
|
|
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
|
|
|
|
|
ElementUI.Dialog.props.closeOnClickModal.default = false
|
|
|
|
|
|
|
|
|
|
import '@/styles/index.scss' // global css
|
|
|
|
|
|
|
|
|
|
import dataV from '@jiaminghi/data-view'
|
|
|
|
|
|
|
|
|
|
Vue.use(dataV)
|
|
|
|
|
|
|
|
|
|
import App from './App'
|
|
|
|
|
import store from './store'
|
|
|
|
|
import router from './router'
|
|
|
|
|
import './utils/rem'
|
2025-09-17 18:07:19 +08:00
|
|
|
|
import Pagination from '@/components/Pagination'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
import '@/icons' // icon
|
|
|
|
|
import '@/permission' // permission control
|
2025-09-17 18:07:19 +08:00
|
|
|
|
// 国际化
|
2025-03-23 10:03:12 +08:00
|
|
|
|
// import i18n from './i18n/index'
|
|
|
|
|
import i18n from '@/assets/i18n/index'
|
|
|
|
|
import permission from './directive/permission'
|
|
|
|
|
|
2025-09-17 18:07:19 +08:00
|
|
|
|
import * as echarts from 'echarts'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
|
2025-09-17 18:07:19 +08:00
|
|
|
|
import moment from 'moment'
|
|
|
|
|
Vue.prototype.$moment = moment
|
2025-03-23 10:03:12 +08:00
|
|
|
|
import noImgEditor from '@/components/noImgEditor'
|
|
|
|
|
|
|
|
|
|
// 下载
|
|
|
|
|
// import { download } from "@/utils/ruoyi";
|
|
|
|
|
/**
|
|
|
|
|
* 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 ! ! !
|
|
|
|
|
*/
|
|
|
|
|
if (process.env.NODE_ENV === 'production') {
|
|
|
|
|
const { mockXHR } = require('../mock')
|
|
|
|
|
mockXHR()
|
|
|
|
|
}
|
|
|
|
|
// 全局组件挂载
|
|
|
|
|
Vue.component('Pagination', Pagination)
|
|
|
|
|
Vue.component('noImgEditor', noImgEditor)
|
|
|
|
|
|
2025-09-17 18:07:19 +08:00
|
|
|
|
import { download } from '@/utils/request'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
Vue.prototype.download = download
|
|
|
|
|
|
|
|
|
|
// set ElementUI lang to EN
|
|
|
|
|
Vue.use(ElementUI, { locale })
|
|
|
|
|
// 如果想要中文版 element-ui,按如下方式声明
|
|
|
|
|
// Vue.use(ElementUI)
|
|
|
|
|
|
2025-09-17 18:07:19 +08:00
|
|
|
|
import { numberToCurrencyNo, isDollar, isLocal, stateFormat, isLocalSymbol } from '@/utils/numberToCurrency'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
Vue.prototype.stateFormat = stateFormat
|
|
|
|
|
Vue.prototype.isLocalSymbol = isLocalSymbol
|
2025-09-17 18:07:19 +08:00
|
|
|
|
Vue.prototype.systemTypes = [{ value: 2, label: '新零售' }]
|
2025-03-23 10:03:12 +08:00
|
|
|
|
// 配置全局过滤器,实现数字千分位格式
|
|
|
|
|
Vue.filter('numberToCurrency', numberToCurrencyNo)
|
2025-09-17 18:07:19 +08:00
|
|
|
|
// 海外pv添加美元
|
2025-03-23 10:03:12 +08:00
|
|
|
|
Vue.filter('isDollar', isDollar)
|
|
|
|
|
// 海外添加当地币
|
|
|
|
|
Vue.filter('isLocal', isLocal)
|
|
|
|
|
|
|
|
|
|
Vue.use(permission)
|
2025-09-17 18:07:19 +08:00
|
|
|
|
Vue.prototype.$echarts = echarts
|
2025-03-23 10:03:12 +08:00
|
|
|
|
|
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
|
|
|
|
|
|
new Vue({
|
|
|
|
|
el: '#app',
|
|
|
|
|
router,
|
|
|
|
|
store,
|
|
|
|
|
i18n,
|
|
|
|
|
render: h => h(App)
|
|
|
|
|
})
|