main.js 1.23 KB
Newer Older
qzhxx's avatar
qzhxx committed
1 2 3 4 5
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
xulili's avatar
xulili committed
6 7 8
import App from './App'
import router from './router'

qzhxx's avatar
qzhxx committed
9 10 11 12 13 14
import $ from 'jquery'

import moment from 'moment'
import Vuex from 'vuex'
import qs from 'qs'
import axios from 'axios'
xulili's avatar
xulili committed
15
import {backToken} from './config/env'
qzhxx's avatar
qzhxx committed
16 17 18
import http from './config/httpServer'

import echarts from 'echarts'
qzhxx's avatar
qzhxx committed
19 20
import Video from 'video.js'
import 'video.js/dist/video-js.css'
qzhxx's avatar
qzhxx committed
21 22 23

Vue.prototype.$echarts = echarts

xulili's avatar
xulili committed
24

qzhxx's avatar
qzhxx committed
25

xulili's avatar
xulili committed
26 27 28 29
// 引入JsPdf
import exportToPdf from "@/utils/exportToPdf"
Vue.use(exportToPdf)

qzhxx's avatar
qzhxx committed
30 31 32 33 34 35
Vue.filter('dateformat', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
  return moment(dataStr).format(pattern)
})



liqin's avatar
liqin committed
36
Vue.prototype.$querystring = qs//其他的代码用到比较多  就新增一个可以了
qzhxx's avatar
qzhxx committed
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

Vue.prototype.$qs = qs
Vue.prototype.$http = axios
Vue.prototype.$https = http
Vue.prototype.backToken=backToken
Vue.prototype.moment = moment

Vue.use(ElementUI);
Vue.use(Vuex);
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})