main.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. import Astrict from '@/utils/astrict'
  16. Vue.use(Astrict)
  17. // 表格自适应高度
  18. // import Plugin from 'v-fit-columns'
  19. // import Blob from './excel/Blob'
  20. // import Export2Excel from './excel/Export2Excel.js'
  21. // less的css编码
  22. Vue.use(less)
  23. // 数据大屏插件
  24. Vue.use(dataV)
  25. // 核心插件
  26. Vue.use(ibps)
  27. new Vue({
  28. router,
  29. store,
  30. i18n,
  31. devtools: process.env.NODE_ENV === 'development',
  32. async created() {
  33. // 加载接口配置
  34. await this.$store.dispatch('ibps/api/load')
  35. },
  36. async mounted() {
  37. // 展示系统信息
  38. await this.$store.commit('ibps/releases/versionShow')
  39. // 用户登录后从数据库加载一系列的设置
  40. await this.$store.dispatch('ibps/account/load')
  41. // 获取并记录用户 UA
  42. await this.$store.commit('ibps/ua/get')
  43. // 初始化全屏监听
  44. await this.$store.dispatch('ibps/fullscreen/listen')
  45. // 初始化加载是否修改用户信息
  46. await this.$store.dispatch('ibps/user/listen')
  47. },
  48. render: (h) => h(App)
  49. }).$mount('#app')