main.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import 'babel-polyfill'
  2. import promise from 'es6-promise'
  3. import Vue from 'vue'
  4. import ElementUI from 'element-ui'
  5. import App from './App'
  6. import store from './store'
  7. import router from './router'
  8. import 'element-ui/lib/theme-chalk/index.css'
  9. import '@/assets/styles/index.scss'
  10. import * as $dataRoomAxios from 'data-room-ui/js/utils/http.js'
  11. import { registerConfig } from '@gcpaas/data-room-ui'
  12. import remoteComponents from '@/remoteComponents/exports.js'
  13. import customDatasetComponents from '@/customDatasetComponents/exports.js'
  14. // import customPlots from '@/customPlots/exports'
  15. Vue.use(ElementUI, { size: 'mini' })
  16. registerConfig(
  17. {
  18. routers: {
  19. // 大屏设计路由
  20. designUrl: '/bigscreen/design',
  21. // 预览路由
  22. previewUrl: '/bigscreen/preview',
  23. // 页面管理路由(带头部跳转路由)
  24. pageManagementUrl: '/',
  25. // 页面列表路由
  26. pageListUrl: '/big-screen-list',
  27. // 模版列表
  28. templateListUrl: '/big-screen-template',
  29. // 数据源管理
  30. dataSourceUrl: '/big-screen-dataSource',
  31. // 数据集管理
  32. dataSetUrl: '/big-screen-dataSet',
  33. // 资源管理
  34. sourceUrl: '/big-screen-source',
  35. // 组件库
  36. componentUrl: '/big-screen-components'
  37. },
  38. httpConfigs: {
  39. baseURL: window.CONFIG?.baseUrl
  40. },
  41. customTheme: {
  42. '--bs-background-1': '#151a26', // 整体背景色
  43. '--bs-background-2': '#232832', // 布局背景色
  44. '--bs-el-background-1': '#151A26', // 组件背景色,输入框...
  45. '--bs-el-background-2': '#35393F', // 组件背景色,按钮、分页、加载...
  46. '--bs-el-background-3': '#303640', // 组件背景色,表格头部、下拉框hover...
  47. '--bs-el-title': '#ffffff', // 标题字体颜色
  48. '--bs-el-text': '#ffffff', // 一般字体颜色
  49. '--bs-el-color-primary': '#409EFF', // 样式主题色
  50. '--bs-el-color-primary-active': '64, 158, 255', // 主要激活 => rgba(64, 158, 255, 1) = #409EFF
  51. '--bs-el-border': 'transparent' // 边框颜色
  52. },
  53. // datasetTypeList: ['original','custom'],
  54. customPlots: [],
  55. // 远程组件列表
  56. remoteComponents,
  57. customDatasetComponents
  58. },
  59. router
  60. )
  61. promise.polyfill()
  62. // 自定义指令
  63. Vue.use(ElementUI, { size: 'mini' })
  64. Vue.prototype.$dataRoomAxios = $dataRoomAxios
  65. Vue.config.productionTip = false
  66. // 兼容ie下双向绑定事件
  67. Vue.prototype.inputChange = function (e) {
  68. return e.target.value
  69. }
  70. /* eslint-disable no-new */
  71. new Vue({
  72. el: '#app',
  73. router,
  74. store,
  75. render: (h) => h(App)
  76. })