// 导入单个组件

// usersetting
import UsersettingIndex from './src/usersetting/index'
import UsersettingAddressBook from './src/usersetting/addressBook/index'
import UsersettingContacts from './src/usersetting/contacts/index'
import UsersettingContactsViewsSearch from './src/usersetting/contacts/views/search'
import UsersettingPreviewer from './src/usersetting/previewer/index'
import UsersettingSignatureMPdfSign from './src/usersetting/signature/mPdfSign'
import UsersettingSignatureMPdfSignOne from './src/usersetting/signature/mPdfSignOne'
import UsersettingSignatureMSignSuccess from './src/usersetting/signature/mSignSuccess'

import UsersettingTravelSetupForm from './src/usersetting/travelSetup/form'
import UsersettingTravelSetup from './src/usersetting/travelSetup/index'
import UsersettingContactsViewsUserDetail from './src/usersetting/contacts/views/userDetail'

//eai
import CCEAiIndex from './src/EAI/index'

//home
import HomeIndex from './src/home/index'
//home
import MineIndex from './src/mine/index'
import MineSettingsUser from './src/mine/settings/user'
import MineSettingsChangeMobile from './src/mine/settings/changeMobile'
import MineSettingsFileManager from './src/mine/settings/fileManager'
import MineSettingsCollection from './src/mine/settings/collection'
import MineSettingsHistory from './src/mine/settings/history'
import MineSettingsMainPage from './src/mine/settings/mainPage'
import MineSettingsSys from './src/mine/settings/sys/index'
import MineSettingsSysAccount from './src/mine/settings/sys/account'
import MineSettingsSysChangePassword from './src/mine/settings/sys/changePassword'
import MineSettingsSysCancelAccount from './src/mine/settings/sys/cancelAccount'
import MineSettingsSysSecretChat from './src/mine/settings/sys/secretChat'
import MineSettingsFont from './src/mine/settings/font'
import MineSettingsOrgChange from './src/mine/settings/orgChange'
import MineSettingsSysMsgNotify from './src/mine/settings/sys/msgNotify'
import MineSettingsSysVoiceAndVibrate from './src/mine/settings/sys/voiceAndVibrate'
import MineSettingsSysSelectVoice from './src/mine/settings/sys/selectVoice'
import MineSettingsWebSocket from './src/mine/settings/webSocket'
import SetTime from './src/gwap/setTime.vue'

//urgeTodo
import UrgeTodoAddUrge from './src/urgeTodo/AddUrge'
import UrgeTodoMyUrge from './src/urgeTodo/myUrge'
import UrgeTodoUrgeMe from './src/urgeTodo/urgeMe'
import UrgeTodoUrgeWork from './src/urgeTodo/UrgeWork'
//wflowCenter
import WflowCenter from './src/wflowCenter/index'
//webOffice
import ecweboffice from './src/webOffice/ecweboffice'
import H5Office from './src/webOffice/H5Office'
//wfTaskItem
import wfTaskItem from './src/wfTaskItem/index'
import TaskItemTypeTree from './src/wfTaskItem/TaskItemTypeTree'
//portal
import PortalCalendar from './src/portal/calendar'
import PortalCalendarForm from './src/portal/calendar/components/form'
import PortalMessage from './src/portal/message'
import PortalMessagelist from './src/portal/message/messagelist'

//gwap
import GwapLeaderPage from './src/gwap/leaderPage'
import GwapWeekLeader from './src/gwap/weekLeader'
//fqsq
import FqsqIndex from './src/fqsq/index'
//fullTextSearch
import FullTextSearch from './src/fullTextSearch/index'
//tzgg
import TzggIndex from './src/tzgg/index'
import TzggTzgg from './src/tzgg/tzgg'

//msgNotice
import MsgNoticeMsgList from './src/msgNotice/MsgList'

// document
import DocumentIndex from './src/document/index.vue'
import DocumentHome from './src/document/home.vue'
import DocumentWdsc from './src/document/wdsc.vue'
import DocumentJxwd from './src/document/jxwd.vue'

const components = {
    WflowCenter,
    HomeIndex,
    MineIndex,
    MineSettingsUser,
    MineSettingsChangeMobile,
    MineSettingsFileManager,
    MineSettingsCollection,
    MineSettingsHistory,
    MineSettingsMainPage,
    MineSettingsSys,
    MineSettingsSysAccount,
    MineSettingsSysChangePassword,
    MineSettingsSysCancelAccount,
    MineSettingsSysSecretChat,
    MineSettingsFont,
    MineSettingsOrgChange,
    MineSettingsSysMsgNotify,
    MineSettingsSysVoiceAndVibrate,
    MineSettingsSysSelectVoice,
    MineSettingsWebSocket,
    UsersettingIndex,
    UsersettingAddressBook,
    UsersettingContacts,
    UsersettingContactsViewsSearch,
    UsersettingPreviewer,
    UsersettingSignatureMPdfSign,
    UsersettingSignatureMPdfSignOne,
    UsersettingSignatureMSignSuccess,
    UsersettingTravelSetupForm,
    UsersettingTravelSetup,
    UrgeTodoAddUrge,
    UrgeTodoMyUrge,
    UrgeTodoUrgeMe,
    UrgeTodoUrgeWork,
    CCEAiIndex,
    ecweboffice,
    H5Office,
    wfTaskItem,
    TaskItemTypeTree,
    PortalCalendar,
    PortalCalendarForm,
    PortalMessage,
    PortalMessagelist,
    GwapLeaderPage,
    GwapWeekLeader,
    FqsqIndex,
    FullTextSearch,
    TzggIndex,
    TzggTzgg,
    MsgNoticeMsgList,
    UsersettingContactsViewsUserDetail,
    SetTime,
    DocumentIndex,
    DocumentHome,
    DocumentWdsc,
    DocumentJxwd
}
// 定义 install 方法
const install = function (Vue) {
    if (install.installed) return
    install.installed = true
    // 遍历并注册全局组件
    Object.keys(components).forEach((key) => {
        Vue.component(key, components[key])
    })
}

if (typeof window !== 'undefined' && window.Vue) {
    install(window.Vue)
}

const $messages = require('./lang/index.js')

export default {
    // 导出的对象必须具备一个 install 方法
    install,
    // 组件列表
    ...components,
    $messages
}
