main.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import Vue from 'vue'
  2. import Cookies from 'js-cookie'
  3. // import '@/assets/styles/theme.scss';
  4. import less from 'less'
  5. Vue.use(less)
  6. import Element from 'element-ui'
  7. import './assets/styles/element-variables.scss'
  8. import 'burgeon-ui/dist/styles/burgeon-ui.css';
  9. import '@/assets/styles/index.scss' // global css
  10. import '@/assets/styles/ruoyi.scss' // ruoyi css
  11. import App from './App'
  12. import store from './store'
  13. import router from './router'
  14. import permission from './directive/permission'
  15. import { download } from '@/utils/request'
  16. import { getDyn } from '@/utils/currencyFn'
  17. import { pcaa } from 'area-data-vue';
  18. import 'area-linkage-vue/dist/index.css';
  19. import VueAreaLinkage from 'area-linkage-vue';
  20. import '@/utils/dateApi'
  21. import './assets/icons' // icon
  22. import './permission' // permission control
  23. import { getDicts } from "@/api/system/dict/data";
  24. import { getConfigKey } from "@/api/system/config";
  25. import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
  26. import Pagination from "@/components/Pagination";
  27. // 自定义表格工具扩展
  28. import RightToolbar from "@/components/RightToolbar"
  29. import DynamicForm from "@/components/DynamicForm"
  30. import DynamicForms from "@/components/DynamicForms"
  31. import DynamicFormsteo from "@/components/DynamicFormsteo"
  32. import MemoranDum from "@/components/MemoranDum"
  33. import 'burgeon-ui/dist/styles/burgeon-ui.css';
  34. import 'burgeon-ui/dist/styles/bjIconfonts/iconfont.css';
  35. import BigPicture from "@/components/BigPicture";
  36. Vue.component('BigPicture', BigPicture)
  37. import BurgeonUi from 'burgeon-ui';
  38. // 全局方法挂载
  39. Vue.prototype.getDicts = getDicts
  40. Vue.prototype.getConfigKey = getConfigKey
  41. Vue.prototype.parseTime = parseTime
  42. Vue.prototype.resetForm = resetForm
  43. Vue.prototype.addDateRange = addDateRange
  44. Vue.prototype.selectDictLabel = selectDictLabel
  45. Vue.prototype.selectDictLabels = selectDictLabels
  46. Vue.prototype.download = download
  47. Vue.prototype.getDyn = getDyn
  48. Vue.prototype.handleTree = handleTree
  49. Vue.prototype.$pcaa = pcaa;
  50. Vue.use(VueAreaLinkage);
  51. Vue.prototype.msgSuccess = function (msg) {
  52. this.$message({ showClose: true, message: msg, type: "success" });
  53. }
  54. Vue.prototype.msgError = function (msg) {
  55. this.$message({ showClose: true, message: msg, type: "error" });
  56. }
  57. Vue.prototype.msgInfo = function (msg) {
  58. this.$message.info(msg);
  59. }
  60. import directive from "@/components/Directives";
  61. Vue.use(directive)
  62. // 全局组件挂载
  63. Vue.component('Pagination', Pagination)
  64. Vue.component('RightToolbar', RightToolbar)
  65. Vue.component('DynamicForm', DynamicForm)
  66. Vue.component('DynamicForms', DynamicForms)
  67. Vue.component('DynamicFormsteo', DynamicFormsteo)
  68. Vue.component('MemoranDum', MemoranDum)
  69. Vue.use(permission)
  70. /**
  71. * If you don't want to use mock-server
  72. * you want to use MockJs for mock api
  73. * you can execute: mockXHR()
  74. *
  75. * Currently MockJs will be used in the production environment,
  76. * please remove it before going online! ! !
  77. */
  78. Vue.use(Element, {
  79. size: Cookies.get('size') || 'medium' // set element-ui default size
  80. })
  81. Vue.use(BurgeonUi);
  82. Vue.config.productionTip = false
  83. new Vue({
  84. el: '#app',
  85. router,
  86. store,
  87. render: h => h(App)
  88. })