import Vue from 'vue'
import router from '../router'

// Ant Design UI
import Antd from 'ant-design-vue'
import '@/theme/index.less'
Vue.use(Antd)

import Element from '@/plugins/element-ui'
Vue.use(Element)

// 全局 页面布局组件
import layouts from '@/components/hrhx/layouts'
Vue.use(layouts)

// Vue-ls
import Storage from 'vue-ls'
import config from '@/defaultSettings'
Vue.use(Storage, config.storageOptions)

// Axios Request
import { VueAxios } from '@/http/http.request'
Vue.use(VueAxios, router)

// 打印
import Print from 'vue-print-nb-jeecg'
Vue.use(Print)

// 预览
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'
Vue.use(preview)

import { isEffectiveCommon } from '@/utils/tools'
const m = {
  isEffectiveCommon
}
Vue.prototype.$m = m

// 自定义权限指令
import hasPermission from '@/utils/hasPermission'
Vue.use(hasPermission)

import DisabledAuthFilterGlobalMixin from '@/mixins/DisabledAuthFilterGlobalMixin'
Vue.use(DisabledAuthFilterGlobalMixin)

import { loadWebsocket } from '@/utils/websocket'
loadWebsocket()
