main.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Vue
  2. import Vue from 'vue'
  3. import App from './App'
  4. import i18n from './i18n'
  5. // 核心插件
  6. import ibps from './plugins/ibps'
  7. // store
  8. import store from './store/index'
  9. // 菜单和路由设置
  10. import router from './router'
  11. // 数据大屏插件
  12. import dataV from '@jiaminghi/data-view'
  13. // less的css编码语法
  14. import less from 'less'
  15. // 表格自适应高度
  16. // import Plugin from 'v-fit-columns'
  17. // import Blob from './excel/Blob'
  18. // import Export2Excel from './excel/Export2Excel.js'
  19. // less的css编码
  20. Vue.use(less)
  21. // 数据大屏插件
  22. Vue.use(dataV)
  23. // 核心插件
  24. Vue.use(ibps)
  25. new Vue({
  26. router,
  27. store,
  28. i18n,
  29. devtools: process.env.NODE_ENV === 'development',
  30. async created() {
  31. // 加载接口配置
  32. await this.$store.dispatch('ibps/api/load')
  33. },
  34. async mounted() {
  35. // 展示系统信息
  36. await this.$store.commit('ibps/releases/versionShow')
  37. // 用户登录后从数据库加载一系列的设置
  38. await this.$store.dispatch('ibps/account/load')
  39. // 获取并记录用户 UA
  40. await this.$store.commit('ibps/ua/get')
  41. // 初始化全屏监听
  42. await this.$store.dispatch('ibps/fullscreen/listen')
  43. // 初始化加载是否修改用户信息
  44. await this.$store.dispatch('ibps/user/listen')
  45. },
  46. render: (h) => h(App)
  47. }).$mount('#app')