main.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. import router from './router'
  4. import ElementUI from 'element-ui';
  5. import {base} from '@/configue/base'
  6. import 'element-ui/lib/theme-chalk/index.css';
  7. import {axios, serverName} from './configue/http'
  8. import '../theme/index.css'
  9. import {isImage,isTypeBySend} from "@/util/index.js";
  10. Vue.use(ElementUI)
  11. Vue.config.productionTip = false
  12. Vue.prototype.$base = base
  13. Vue.prototype.$bus = new Vue()
  14. Vue.prototype.$http = axios
  15. Vue.prototype.isImage = isImage
  16. Vue.prototype.isTypeBySend = isTypeBySend
  17. Vue.prototype.MAXLENGTH = 200
  18. Vue.prototype.FONTLENGTH = 25
  19. Vue.prototype.PAGESIZES = [25,50,75,100]
  20. Vue.prototype.loading = {
  21. close(){
  22. }
  23. }
  24. Vue.prototype.loadOption = {
  25. lock: true,
  26. text: '上传中',
  27. spinner: 'el-icon-loading',
  28. background: 'rgba(0, 0, 0, 0.7)'
  29. }
  30. Vue.prototype.statusStr = {
  31. 1: "草稿中",
  32. 2: "待审核",
  33. 3: "审核不通过",
  34. 4: "审核通过"
  35. };
  36. let tmpYear = []
  37. for (let i = 2000; i <= 2050; i++) {
  38. tmpYear.push({
  39. id:i,
  40. name:i+'年'
  41. })
  42. }
  43. Vue.prototype.yearStr = [
  44. {
  45. id:1001,
  46. name:'革命战争时期'
  47. },
  48. {
  49. id:1002,
  50. name:'和平建设时期'
  51. },
  52. {
  53. id:1003,
  54. name:'军区联勤时期'
  55. }
  56. ].concat(tmpYear);
  57. Vue.prototype.typeStr = {
  58. news: "新闻",
  59. notice: "公告"
  60. };
  61. Vue.prototype.statusArr = [
  62. {
  63. id:1,
  64. name:'草稿中'
  65. },
  66. {
  67. id:2,
  68. name:'待审核'
  69. },
  70. {
  71. id:3,
  72. name:'审核不通过'
  73. },
  74. {
  75. id:4,
  76. name:'审核通过'
  77. }
  78. ]
  79. Vue.prototype.sysRole=[
  80. {
  81. name:'系统管理员',
  82. id:'sys_admin'
  83. },
  84. {
  85. name:'普通用户',
  86. id:'sys_normal'
  87. },
  88. ]
  89. Vue.prototype.collectType = {
  90. 1:'专题图库',
  91. 2:'视频文件',
  92. 3:'模型文件'
  93. };
  94. Vue.prototype.juese = {
  95. sys_admin: "系统管理员",
  96. sys_high: "高级管理员",
  97. sys_normal: "普通用户",
  98. sys_visitor: "游客",
  99. };
  100. Vue.prototype.sex = {
  101. 0: "男",
  102. 1: "女"
  103. };
  104. Vue.prototype.$serverName = serverName// 挂载到Vue实例上面
  105. new Vue({
  106. router,
  107. render: h => h(App)
  108. }).$mount('#app')