import Vue from 'vue'
import './utils/axios'
import App from './App.vue'
import router from './router'
import store from './store'
import constants from './utils/constants'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import api from './api'
import * as echarts from 'echarts'
import Charts from './views/analyse/custom/components/Charts'
import Particles from 'vue-particles'
import { formatTableDate } from "./utils";
import Config from './config'
import Storage from './utils/storage'
import { hasRole } from './utils/permissions'
require('./assets/css/fix.scss')
require('./assets/css/layout.less')
import './icons'
import lodash from 'lodash'
import "@/icons/icon/iconfont.css"
import "@/icons/icon2/iconfont.css"



import {hasPermission} from './directives/permission';
Vue.prototype.$permission = hasPermission

// import myRichText from '@/views/components/common/RichText/index'
// Vue.use(myRichText);
// import mySearch from '@/views/components/common/retrieval/index'
// Vue.use(mySearch);
import model from './utils/model'
Vue.use(model)

import {reportPermission} from '@/utils/reportPermission'
Vue.prototype.$reportPermission = reportPermission

import directive from './utils/directives'
Vue.use(directive)

import Cookies from "js-cookie";
Vue.prototype.$cookie = Cookies


Vue.config.productionTip = false
Vue.prototype.$constants = constants
Vue.prototype.$api = api
Vue.prototype.$echarts = echarts
Vue.prototype.$d = formatTableDate
Vue.prototype.$p = Config.imgURL
Vue.prototype.$rImg = Config.reportImgURL
Vue.prototype.$c = Config
Vue.prototype.$s = Storage
Vue.prototype.$_ = lodash
Vue.prototype.$r = hasRole
Vue.use(Charts)
Vue.use(Particles)
// Vue.use(Element)

 
import i18n from '@/components/language'  
 
 Vue.use(Element,{
  i18n: (key, value) => i18n.t(key, value)// 在注册Element时设置i18n的处理方法
})

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: (h) => h(App)
}).$mount('#app')
