main.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Vue
  2. import Vue from 'vue'
  3. import i18n from './i18n'
  4. import App from './App'
  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. async created () {
  30. // 加载接口配置
  31. await this.$store.dispatch('ibps/api/load')
  32. },
  33. async mounted () {
  34. // 展示系统信息
  35. await this.$store.commit('ibps/releases/versionShow')
  36. // 用户登录后从数据库加载一系列的设置
  37. await this.$store.dispatch('ibps/account/load')
  38. // 获取并记录用户 UA
  39. await this.$store.commit('ibps/ua/get')
  40. // 初始化全屏监听
  41. await this.$store.dispatch('ibps/fullscreen/listen')
  42. // 初始化加载是否修改用户信息
  43. await this.$store.dispatch('ibps/user/listen')
  44. },
  45. render: h => h(App)
  46. }).$mount('#app')