| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- import Vue from 'vue'
- import App from './App'
- import router from './router'
- import axios from 'axios'
- import { VueJsonp } from 'vue-jsonp' //解决百度地图跨域
- Vue.use(VueJsonp)
- import './util/http.js'
- Vue.prototype.$axios = axios //全局注册,使用方法为:this.$axios
- import qs from 'qs'
- Vue.prototype.qs = qs //全局注册,使用方法为:this.qs
- Vue.prototype.$EventBus = new Vue() //中央时间总线
- Vue.config.productionTip = false //是阻止显示生产模式的消息
- Vue.prototype.$host = 'http://192.168.1.12:8000/' // 线下图片服务器路径常量
- import 'babel-polyfill' //兼容IE11
- require("babel-polyfill")
- // 引入百度地图
- import BaiduMap from 'vue-baidu-map'
- import {
- BmPolygon,
- BmControl,
- BmMarker
- } from 'vue-baidu-map'
- Vue.use(BaiduMap, BmPolygon, BmControl, BmMarker, {
- ak: 'nroAiX0Lf6ppNEGt2dBLtDkOldGCPFwF'
- })
- import store from './vuex/store' //引入store.js
- import promise from 'es6-promise'
- promise.polyfill();
- import VueHighcharts from 'vue-highcharts';
- Vue.use(VueHighcharts);
- import Viewer from 'v-viewer'
- Vue.use(Viewer, {
- defaultOptions: {
- "zIndex": 9999,
- }
- })
- import 'viewerjs/dist/viewer.css'
- // 样式
- import './assets/icon/iconfont.css'
- import './plugin/elementUi';
- // import './assets/css/theme/ffffff/index.css' //皮肤一
- import '../theme/index.css' //皮肤一
- //导入全局样式
- import './assets/css/global.css'
- // 图片放大
- import preview from 'vue-photo-preview'
- import 'vue-photo-preview/dist/skin.css'
- Vue.use(preview)
- // 图片裁剪
- import VueCropper from 'vue-cropper'
- Vue.use(VueCropper)
- //格式化时间戳
- import './util/formatTime'
- //设备类型
- Vue.filter('equipType', function (i) {
- switch (i) {
- case '2':
- return '杀虫灯';
- break;
- case '3':
- return '虫情测报灯';
- break;
- case '4':
- return '性诱测报';
- break;
- case '5':
- return '环境监测';
- break;
- case '6':
- return '监控';
- break;
- case '7':
- return '孢子仪';
- break;
- case '9':
- return '糖醋测报';
- break;
- }
- })
- /* eslint-disable no-new */
- new Vue({
- el: '#app',
- router,
- store,
- components: {
- App
- },
- template: '<App/>'
- })
|