import Vue from 'vue'
import App from './App'
import { all } from 'vue-client'
import GetAppDataService from './stores/AppData'
import GetStringData from './plugins/GetStringData'
/* require('./assets/fonttype/fontAndroid.less')*/

/** **************************通用组件******************************/

export default function (filiale) {
  Vue.use(GetAppDataService)
  Vue.use(GetStringData)
// 测试
  Vue.component('test', (resolve) => {
    require(['./components/Test'], resolve)
  })
// android登录
  Vue.component('login-app', (resolve) => {
    require(['./components/LoginApp'], resolve)
  })
// android登录
  Vue.component('login-app-v4', (resolve) => {
    require(['./components/LoginAppV4.vue'], resolve)
  })
  // android登录
  Vue.component('login-app-new', (resolve) => {
    require(['./components/LoginAppNew'], resolve)
  })
// 导航
  Vue.component('nav-bottom', (resolve) => {
    require(['./components/NavBottomVVV'], resolve)
  })
  // 导航
  Vue.component('tab-bar', (resolve) => {
    require(['./components/TabBarPhone'], resolve)
  })
// 只加载参数（只有下拉框所需参数）
  Vue.component('load-appdata', (resolve) => {
    require(['./components/LoadAppdata'], resolve)
  })
  // 头部标题
  Vue.component('tools-page', (resolve) => {
    require(['./components/ToolsPage'], resolve)
  })
  // 用户信息查找
  Vue.component('phone-user-find', (resolve) => {
    require(['./components/PhoneUserFind'], resolve)
  })
  // 用户查找
  Vue.component('phone-user', (resolve) => {
    require(['./components/PhoneUser'], resolve)
  })
  // 用户详情查找
  Vue.component('phone-user-detil', (resolve) => {
    require(['./components/PhoneUserDetil'], resolve)
  })
  // 用户信息查找
  Vue.component('phone-info-table', (resolve) => {
    require(['./components/PhoneInfoTable'], resolve)
  })
  // 用户信息查找
  Vue.component('phone-sell-info', (resolve) => {
    require(['./components/PhoneSellInfo'], resolve)
  })
  // 总用户信息查找
  Vue.component('phone-all-info', (resolve) => {
    require(['./components/PhoneAllInfo'], resolve)
  })
  // 用户换表信息查找
  Vue.component('phone-meter-info', (resolve) => {
    require(['./components/PhoneMeterInfo'], resolve)
  })
  // 用户购气记录查询
  Vue.component('phone-sell-info-lite', (resolve) => {
    require(['./components/PhoneSellInfoLite'], resolve)
  })
  // 用户信息查找
  Vue.component('phone-changemeter-info', (resolve) => {
    require(['./components/PhoneChangemeterInfo'], resolve)
  })
  // 用户信息查找
  Vue.component('phone-repair-info', (resolve) => {
    require(['./components/PhoneRepairInfo'], resolve)
  })
  Vue.component('phone-image-info', (resolve) => {
    require(['./components/PhoneImageInfo'], resolve)
  })
  // 用户信息查找
  Vue.component('phone-safe-info', (resolve) => {
    require(['./components/PhoneSafeInfo'], resolve)
  })
  // 设置
  Vue.component('system-setup', (resolve) => {
    require(['./components/SystemSetUp'], resolve)
  })
  // 待办工作
  Vue.component('attend-manage', (resolve) => {
    require(['./components/AttendManage'], resolve)
  })
  // 上传工作
  Vue.component('upload-manage', (resolve) => {
    require(['./components/UploadManage'], resolve)
  })
  // 已办工作
  Vue.component('already-service', (resolve) => {
    require(['./components/AlreadyService'], resolve)
  })
  // 在线业务
  Vue.component('online-manage', (resolve) => {
    require(['./components/OnlineManage'], resolve)
  })
  // 修改密码
  Vue.component('modify-pass-word', (resolve) => {
    require(['./components/ModifyPassWord'], resolve)
  })
  Vue.component('wasm-test', (resolve) => {
    require(['./components/wasm'], resolve)
  })
  Vue.component('right-tree', (resolve) => {
    require(['./components/RightTree'], resolve)
  })
  Vue.component('apply-online', (resolve) => {
    require(['./components/online/ApplyOnline'], resolve)
  })
  //反馈人建议添加
  Vue.component('feedback-add', (resolve) => {
    require(['./components/idea/feedbackAdd'], resolve)
  })
  //反馈人建议查询
  Vue.component('feedback', (resolve) => {
    require(['./components/idea/feedBack'], resolve)
  })
  //档案查询
  Vue.component('query-file',(resolve) => {
    require(['./components/userinfo/queryFile'],resolve)
  })
  //缴费查询
  Vue.component('payment-query',(resolve) => {
    require(['./components/userinfo/paymentQuery'],resolve)
  })
  // 用户查找
  Vue.component('phone-user', (resolve) => {
    require(['./components/PhoneUser'], resolve)
  })
  // 用户详情查找
  Vue.component('phone-user-detil', (resolve) => {
    require(['./components/PhoneUserDetil'], resolve)
  })
  // 物联网监控-主
  Vue.component('iot-monitoring-main', (resolve) => {
    require(['./components/iot/iotMonitoringMain'], resolve)
  })
  // 物联网监控表具信息
  Vue.component('iot-meter-info', (resolve) => {
    require(['./components/iot/IotMeterInfo'], resolve)
  })
  // 物联网监控基础信息
  Vue.component('iot-base-info', (resolve) => {
    require(['./components/iot/IotBaseInfo'], resolve)
  })
  // 物联网监控指令信息
  Vue.component('instruct-message', (resolve) => {
    require(['./components/iot/InstructMessage'], resolve)
  })

  Vue.component('find-userinfo', (resolve) => {
    require(['./components/info/FindUserInfo'], resolve)
  })

  Vue.component('info-table', (resolve) => {
    require(['./components/info/InfoTable'], resolve)
  })

  Vue.component('config-info', (resolve) => {
    require(['./components/info/ConfigInfo'], resolve)
  })

  // 分公司特殊页面注册替换
  if (filiale) {
    let filialeComp = require(`./filiale/${filiale}/systemphonegrid`).specialComp
    for (let key in filialeComp) {
      Vue.component(key, filialeComp[key])
    }
  }
}
