main.js 2.7 KB

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