main.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import Vue from 'vue';
  2. import App from './App.vue';
  3. import store from './store';
  4. import router from './router';
  5. import permission from './permission';
  6. import '@/assets/styles/index.css';
  7. import {
  8. parseTime,
  9. selectDictLabelu,
  10. selectDictLabel,
  11. selectDictLabels,
  12. CJ02BD,
  13. twoPointSum,
  14. parseTimeParagraph,
  15. Micrometer,
  16. weeklyTimeDivision,
  17. gcj02BD,
  18. verifyStoreType,
  19. formatChineseDate,
  20. } from '@/utils/index';
  21. import { toastLoading } from '@/utils/commonVant';
  22. import '@vant/touch-emulator';
  23. Vue.config.productionTip = false;
  24. import Vant from 'vant';
  25. import { Toast, Notify } from 'vant';
  26. import 'vant/lib/index.css';
  27. import ClipboardJS from 'clipboard';
  28. Vue.use(Vant);
  29. import ElTable from 'element-ui/lib/table';
  30. import 'element-ui/lib/theme-chalk/table.css';
  31. import 'element-ui/lib/theme-chalk/icon.css';
  32. import ElTableColumn from 'element-ui/lib/table-column';
  33. import ElPopover from 'element-ui/lib/popover';
  34. import 'element-ui/lib/theme-chalk/table-column.css';
  35. import 'element-ui/lib/theme-chalk/popover.css';
  36. import Vconsole from 'vconsole';
  37. import ElProgress from 'element-ui/lib/progress';
  38. import 'element-ui/lib/theme-chalk/progress.css';
  39. import ElDialog from 'element-ui/lib/dialog';
  40. import 'element-ui/lib/theme-chalk/dialog.css';
  41. // import wx from 'weixin-js-sdk';
  42. // jenkins 测试打包前先合并
  43. Vue.use(ElTable);
  44. Vue.use(ElTableColumn);
  45. Vue.use(ElPopover);
  46. Vue.use(ElProgress);
  47. Vue.use(ElDialog);
  48. Vue.config.productionTip = false;
  49. Vue.prototype.parseTime = parseTime;
  50. Vue.prototype.selectDictLabel = selectDictLabel;
  51. Vue.prototype.selectDictLabels = selectDictLabels;
  52. Vue.prototype.selectDictLabelu = selectDictLabelu;
  53. Vue.prototype.weeklyTimeDivision = weeklyTimeDivision;
  54. Vue.prototype.toastLoading = toastLoading;
  55. Vue.prototype.CJ02BD = CJ02BD;
  56. Vue.prototype.gcj02BD = gcj02BD;
  57. Vue.prototype.twoPointSum = twoPointSum;
  58. Vue.prototype.wx = wx;
  59. Vue.prototype.parseTimeParagraph = parseTimeParagraph;
  60. Vue.prototype.Micrometer = Micrometer;
  61. Vue.prototype.verifyStoreType = verifyStoreType;
  62. Vue.prototype.formatChineseDate = formatChineseDate;
  63. Vue.prototype.Toast = Toast;
  64. Vue.prototype.notify = Notify;
  65. var clipboard = new ClipboardJS('.btn');
  66. clipboard.on('success', function (e) {
  67. Toast('编码复制成功!');
  68. });
  69. clipboard.on('error', function (e) {
  70. Toast('编码复制失败!');
  71. });
  72. const isProd = process.env.NODE_ENV !== 'production';
  73. if (isProd) {
  74. const vConsole = new Vconsole();
  75. Vue.use(vConsole);
  76. }
  77. new Vue({
  78. router,
  79. store,
  80. render: (h) => h(App),
  81. }).$mount('#app');