import CmsEditForm from "../comps/CmsEditForm/CmsEditForm";
import CmsDialogForm from "../comps/CmsEditForm/CmsDialogForm";
import CmsEditFormApproval from "../comps/CmsEditForm/CmsEditFormApproval";
import CmsFormInputTag from "../comps/CmsEditForm/CmsFormInputTag";
import CmsFormItem from "../comps/CmsEditForm/CmsFormItem";
import CmsPageForm from "../comps/CmsEditForm/CmsPageForm";
import CmsIconFont from "../comps/CmsIconFont/CmsIconFont";
import CmsFormInput from "../comps/CmsEditForm/CmsFormInput";
import CmsFormSelectTree from '../comps/CmsFormSelect/CmsFormSelectTree'
import CmsFormCheckbox from "../comps/CmsEditForm/CmsFormCheckbox";
import CmsQueryTable from "../comps/CmsQueryTable/CmsQueryTable";
import CmsTableColumn from "../comps/CmsQueryTable/CmsTableColumn";
import CmsQueryForm from "../comps/CmsQueryForm/CmsQueryForm";
import CmsQueryItem from "../comps/CmsQueryForm/CmsQueryItem";
import CmsSteps from "../comps/CmsSteps/CmsSteps";
import CmsButton from "../comps/CmsButtonGroup/CmsButton";
import CmsButtonGroup from "../comps/CmsButtonGroup/CmsButtonGroup";
import CmsDatePicker from "../comps/CmsDatePicker/CmsDatePicker";
import CmsRadio from "../comps/CmsRadioGroup/CmsRadio";
import CmsRadioGroup from "../comps/CmsRadioGroup/CmsRadioGroup";
import CmsCommonTree from "../comps/CmsCommonTree/CmsCommonTree";
import CmsCustomTree from "../comps/CmsCustomTree/CmsCustomTree";
import CmsEditTable from "../comps/CmsEditTable/CmsEditTable";
import CmsPullDownMagnifier from "../comps/CmsPullDownMagnifier/CmsPullDownMagnifier";
import CmsPullDownTree from "../comps/CmsPullDownTree/CmsPullDownTree";
import CmsCol from "../comps/CmsRow/CmsCol";
import CmsRow from "../comps/CmsRow/CmsRow";
import CmsFileUpload from "../comps/CmsFileUpload/CmsFileUpload";
import CmsSvgIcon from "../comps/CmsSvgIcon/CmsSvgIcon";
import CmsFormSelect from "../comps/CmsFormSelect/CmsFormSelect";
import CmsLink from '../comps/CmsLink'
import CmsTreeTable from "../comps/CmsTreeTable/CmsTreeTable";
import CmsCard from "../comps/CmsCard/CmsCard";
import CmsTree from "../comps/CmsTree/CmsTree";
import CmsModal from '../comps/CmsModal/CmsModal'
import CmsImageUpload from '../comps/CmsFileUpload/CmsImageUpload'
import CmsFormEditor from '../comps/CmsFormEditor/CmsFormEditor';
import CmsFormMagnifier from '../comps/CmsFormMagnifier/CmsFormMagnifier'
import CmsQuaitzCron from "../comps/CmsQuaitzCron/Crontab";
import CmsFormTree from "../comps/CmsFormTree/CmsFormTree";

import CmsCommonSelect from "../comps/businessComponents/CmsCommonSelect/CmsCommonSelect";
import CmsOrgSelect from "../comps/businessComponents/CmsOrgSelect/CmsOrgSelect";
import CmsBranchMagnifier from "../comps/businessComponents/CmsBranchMagnifier/CmsBranchMagnifier";
import CmsApprovalStatus from "../comps/businessComponents/CmsApprovalStatus/CmsApprovalStatus";
import CmsOrgInfoMagnifier from "../comps/businessComponents/CmsOrgInfoMagnifier/CmsOrgInfoMagnifier";
import CmsFormMultiple from "../comps/businessComponents/CmsFormMultiple/CmsFormMultiple";
import CmsMultipleField from "../comps/CmsMultipleField/CmsMultipleField";
import CmsUserMagnifier from "../comps/businessComponents/CmsUserMagnifier/CmsUserMagnifier";
import CmsModelIframes from "../comps/CmsModelIframe/CmsModelIframes";

const packages = {
  CmsFormEditor,
  CmsFormInputTag,
  CmsIconFont,
  CmsFormMagnifier,
  CmsModal,
  CmsImageUpload,
  CmsCard,
  CmsTree,
  CmsRow,
  CmsCol,
  CmsSvgIcon,
  CmsFileUpload,
  CmsEditForm,
  CmsDialogForm,
  CmsEditFormApproval,
  CmsPageForm,
  CmsFormItem,
  CmsFormInput,
  CmsFormSelectTree,
  CmsFormCheckbox,
  CmsQueryTable,
  CmsQueryForm,
  CmsQueryItem,
  CmsSteps,
  CmsLink,
  CmsButton,
  CmsButtonGroup,
  CmsDatePicker,
  CmsRadio,
  CmsRadioGroup,
  CmsCommonTree,
  CmsEditTable,
  CmsCustomTree,
  CmsPullDownMagnifier,
  CmsPullDownTree,
  CmsFormSelect,
  CmsTreeTable,
  CmsQuaitzCron,
  CmsFormTree,
  CmsTableColumn,
  CmsCommonSelect,
  CmsOrgSelect,
  CmsBranchMagnifier,
  CmsApprovalStatus,
  CmsOrgInfoMagnifier,
  CmsFormMultiple,
  CmsMultipleField,
  CmsUserMagnifier,
  CmsModelIframes
};
import store, { initStore } from '@/store';
import { i18n, initI18n } from '@/utils/i18ns';
import http, { initHttp } from '@/utils/https'
import messageTips from '@/utils/messageTips';
// 加载遮罩层
import { PrevLoading } from '@/utils/loading.js'

// 导入基本对象
import {
  plugins,
} from './plugins'
// 导入验证器
import {
  validatePostCode,
  validateOfficePhone,
  validateAmount,
  validateEmail,
  validateFax,
  validateMobile,
  validateUrl
} from '@/utils/validate'
//
import { formatAxis, formatDate, formatPast } from "@/utils/formatTime.js";
import {
  verifyFullName,
  verifyAccount,
  verifyEmail,
  verifyCarNum,
  verifyNumberInteger,
  verifyAndSpace,
  verifyCnAndSpace,
  verifyEnAndSpace,
  verifyIdCard,
  verifyIPAddress,
  verifyNumberCnUppercase,
  verifyNumberComma,
  verifyNumberIntegerAndFloat,
  verifyPassword,
  verifyPasswordPowerful,
  verifyPasswordStrength,
  verifyPhone,
  verifyTelPhone,
  verifyPostalCode,
  verifyTextColor,
  verifyUrl
} from '@/utils/toolsValidate.js'
// 导入存储方法
import { Local, Session, Cookies } from '@/utils/storage'
// 请求服务配置
import HttpService from "@/utils/HttpService";
// 导入基本系统配置
import SystemConfig from '@/utils/SystemConfig';
// 导入默认路由
import router, { initRoute } from "@/router";
// 导入解密和加密
import { encrypt, encryptResult, decrypt } from '@/utils/aes-encrypt'
// 导出Api
import { getMenuAdmin, signIn } from '@/utils/https/commonApi'

import DateFormat from "@/utils/plugins/vxe-table/DateUtils";

import {
  dictionaryMix,
  pageInitMix,
  formConfigMix,
  mixTableConfig,
  mixTableConstants,
  iframeMinix
} from "@/comps/mixin/common-mixins";

export {
  iframeMinix,
  dictionaryMix,
  pageInitMix,
  formConfigMix,
  mixTableConfig,
  mixTableConstants,
  HttpService,
  DateFormat,
  SystemConfig,
  router,
  initRoute,
  getMenuAdmin,
  signIn,
  i18n,
  initI18n,
  store,
  initStore,
  messageTips,
  Local,
  Session,
  Cookies,
  http,
  initHttp,
  PrevLoading,
  encryptResult,
  decrypt,
  encrypt,
  verifyTextColor,
  verifyUrl,
  verifyTelPhone,
  verifyPostalCode,
  verifyPhone,
  verifyPassword,
  verifyPasswordPowerful,
  verifyPasswordStrength,
  verifyNumberComma,
  verifyNumberIntegerAndFloat,
  verifyIPAddress,
  verifyNumberCnUppercase,
  verifyEnAndSpace,
  verifyIdCard,
  verifyAndSpace,
  verifyCnAndSpace,
  verifyNumberInteger,
  verifyCarNum,
  verifyEmail,
  verifyAccount,
  verifyFullName,
  validateEmail,
  validateFax,
  validateMobile,
  validateUrl,
  validateAmount,
  validateOfficePhone,
  validatePostCode,
  formatPast,
  formatDate,
  formatAxis
}
export default Vue => {
  for (const key of Object.keys(packages)) {
    Vue.component(key, packages[key])
  }
  plugins(Vue);
}
