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 {hasPermission} from './directives/permission';
Vue.prototype.$permission = hasPermission
// import Directives from './directives/index'
// Vue.use(Directives)

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

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