综合办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.js 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * @Author: ysh
  3. * @Date: 2024-01-03 09:23:11
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2024-09-18 17:01:43
  6. */
  7. import Vue from 'vue'
  8. import Cookies from 'js-cookie'
  9. import Element from 'element-ui'
  10. import './assets/styles/element-variables.scss'
  11. import '@/assets/styles/index.scss' // global css
  12. import '@/assets/styles/ruoyi.scss' // ruoyi css
  13. import App from './App'
  14. import store from './store'
  15. import router from './router'
  16. import directive from './directive' // directive
  17. import plugins from './plugins' // plugins
  18. import { download } from '@/utils/request'
  19. import './assets/icons' // icon
  20. import './permission' // permission control
  21. import { getDicts } from "@/api/system/dict/data";
  22. import { getConfigKey } from "@/api/system/config";
  23. import {
  24. parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels,
  25. handleTree, getUserName, getFileName, reviewWord, getDeptName, getUserNames, getDeptNames,
  26. formatNumberWithWan
  27. } from "@/utils/ruoyi";
  28. // 标题组件
  29. import RowTitle from '@/components/RowTitle'
  30. // 分页组件
  31. import Pagination from "@/components/Pagination";
  32. // 自定义表格工具组件
  33. import RightToolbar from "@/components/RightToolbar"
  34. // 富文本组件
  35. import Editor from "@/components/Editor"
  36. // 文件上传组件
  37. import FileUpload from "@/components/FileUpload"
  38. // 图片上传组件
  39. import ImageUpload from "@/components/ImageUpload"
  40. // 图片预览组件
  41. import ImagePreview from "@/components/ImagePreview"
  42. // 字典标签组件
  43. import DictTag from '@/components/DictTag'
  44. // 头部标签组件
  45. import VueMeta from 'vue-meta'
  46. // 字典数据组件
  47. import DictData from '@/components/DictData'
  48. import Tinymce from '@/components/tinymce/index.vue'
  49. // 签名组件
  50. import AuditorRow from '@/views/flowable/form/components/auditorRow.vue';
  51. import publicData from '@/assets/datas/publicData'
  52. import Print from 'vue-print-nb'
  53. // 全局方法挂载
  54. Vue.prototype.getDicts = getDicts
  55. Vue.prototype.getConfigKey = getConfigKey
  56. Vue.prototype.parseTime = parseTime
  57. Vue.prototype.resetForm = resetForm
  58. Vue.prototype.addDateRange = addDateRange
  59. Vue.prototype.selectDictLabel = selectDictLabel
  60. Vue.prototype.selectDictLabels = selectDictLabels
  61. Vue.prototype.download = download
  62. Vue.prototype.handleTree = handleTree
  63. Vue.prototype.publicData = publicData
  64. Vue.prototype.getUserName = getUserName
  65. Vue.prototype.getUserNames = getUserNames
  66. Vue.prototype.getDeptNames = getDeptNames
  67. Vue.prototype.getDeptName = getDeptName
  68. Vue.prototype.getFileName = getFileName
  69. Vue.prototype.reviewWord = reviewWord
  70. Vue.prototype.formatNumberWithWan = formatNumberWithWan
  71. // 全局组件挂载
  72. Vue.component('DictTag', DictTag)
  73. Vue.component('Pagination', Pagination)
  74. Vue.component('RightToolbar', RightToolbar)
  75. Vue.component('Editor', Editor)
  76. Vue.component('FileUpload', FileUpload)
  77. Vue.component('ImageUpload', ImageUpload)
  78. Vue.component('ImagePreview', ImagePreview)
  79. Vue.component('tinymce', Tinymce)
  80. Vue.component('RowTitle', RowTitle)
  81. Vue.component('AuditorRow', AuditorRow)
  82. Vue.use(directive)
  83. Vue.use(plugins)
  84. Vue.use(VueMeta)
  85. Vue.use(Print)
  86. DictData.install()
  87. /**
  88. * If you don't want to use mock-server
  89. * you want to use MockJs for mock api
  90. * you can execute: mockXHR()
  91. *
  92. * Currently MockJs will be used in the production environment,
  93. * please remove it before going online! ! !
  94. */
  95. Vue.use(Element, {
  96. size: Cookies.get('size') || 'medium' // set element-ui default size
  97. })
  98. Vue.config.productionTip = false
  99. new Vue({
  100. el: '#app',
  101. router,
  102. store,
  103. render: h => h(App)
  104. })