// import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/iconfonts/iconfont.css'
import './assets/page.less'
// import 'normalize.css'
import './permission' // permission control 

// import ELEMENT from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ELEMENT, {
  size: 'mini'
}) 

import GeminiScrollbar from 'vue-gemini-scrollbar'
Vue.use(GeminiScrollbar) 
import Message from './components/vue-m-message'
Vue.use(Message) // will mount `Vue.prototype.$message`
/*任务中心*/
import 'zhc-flowchart/lib/zhc-flowchart.css'
import  zhcflowchart from "zhc-flowchart";
Vue.use(zhcflowchart) 
Vue.config.productionTip = false

Vue.directive('add2Body', {
  // 当被绑定的元素插入到 DOM 中时……
  inserted: function (el) {
    document.body.appendChild(el);
  }
});
Vue.prototype.$lang = function(key){
  if(Scp&&Scp.lang&&Scp.lang["Portal.Page"]){
    return Scp.lang["Portal.Page"][key]||"";
  }else{
    return "";
  }
}
let hiSetting = HIVUI_SETTING;
Vue.prototype.$HI = {
  projectName: hiSetting.projectName,
  request: hiSetting.request,
  queryOperate: hiSetting.queryOperate,
  pageSize: 20,
  saveUrl: hiSetting.saveUrl,
  queryUrl: hiSetting.queryUrl,
  datasetUrl: hiSetting.datasetUrl,
  policyUrl: hiSetting.policyUrl,
  upload: hiSetting.upload,
  download: hiSetting.download,
  review: hiSetting.review,
  getFlowInfo: hiSetting.getFlowInfo,
  getApprovalInfo: hiSetting.getApprovalInfo,
  processFlow: hiSetting.processFlow,
  queryTask: hiSetting.queryTask,
  withdrawtask: hiSetting.withdrawtask,
  taskDiagram: hiSetting.taskDiagram,
  openOrdernumber: hiSetting.openOrdernumber,
  editorImgServer :hiSetting.review+"?relativePath="
};
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
