main.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import Vue from 'vue'
  2. import App from './App'
  3. import router from './router'
  4. import ElementUI from 'element-ui'
  5. import 'element-ui/lib/theme-chalk/index.css'
  6. import axios from 'axios'
  7. import bus from '@/utils/bus'
  8. import api from '@/api/api'
  9. import store from './store'
  10. import '@/assets/icons' // icon
  11. // import ECharts from "vue-echarts";
  12. import * as echarts from 'echarts'
  13. import './layout/permission'
  14. import upload from '@/utils/uploadFile'
  15. import RightToolbar from "@/components/RightToolbar"
  16. import Paginations from "@/components/Paginations";
  17. import methodsTools from '@/utils/methodsTool'
  18. import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi";
  19. import fullCalendar from 'vue-fullcalendar'
  20. Vue.component('full-calendar', fullCalendar)
  21. Vue.config.productionTip = false
  22. Vue.use(ElementUI);
  23. Vue.prototype.parseTime = parseTime
  24. Vue.prototype.resetForm = resetForm
  25. Vue.prototype.addDateRange = addDateRange
  26. Vue.prototype.selectDictLabel = selectDictLabel
  27. Vue.prototype.selectDictLabels = selectDictLabels
  28. Vue.prototype.download = download
  29. Vue.prototype.handleTree = handleTree
  30. Vue.prototype.$bus = bus
  31. Vue.prototype.$axios = axios
  32. Vue.prototype.$api = api
  33. Vue.prototype.$upload = upload
  34. Vue.prototype.$methodsTools = methodsTools
  35. // Vue.component('v-chart', ECharts)//全局注册
  36. Vue.prototype.$echarts = echarts;
  37. Vue.component('RightToolbar', RightToolbar)
  38. Vue.component('Paginations', Paginations)
  39. Vue.prototype.msgSuccess = function (msg) {
  40. this.$message({ showClose: true, message: msg, type: "success" });
  41. }
  42. Vue.prototype.msgError = function (msg) {
  43. this.$message({ showClose: true, message: msg, type: "error" });
  44. }
  45. Vue.prototype.msgInfo = function (msg) {
  46. this.$message.info(msg);
  47. }
  48. /* eslint-disable no-new */
  49. new Vue({
  50. el: '#app',
  51. router,
  52. store,
  53. render: h => h(App)
  54. })