/*
 * @Description: 主文件
 * @Author: liusheng
 * @Date: 2022-04-01 13:31:59
 */
import TJUtil from './global/TJUtil.js'

import CommonConst, { CommonUrl } from './global/CommonConst.js'
import CommonUtil from './global/CommonUtil.js'
import DateUtil from './global/DateUtil.js'
import { initEncryptionUtil, EncryptionUtil } from './global/EncryptionUtil.js'
import ImageUtil from './global/ImageUtil.js'
import InteractionUtil from './global/InteractionUtil.js'
import { initAppAxios, appAxios } from './global/AppAxios';
import { initVueRequest, vueRequest } from './global/VueRequest';

/* 通用组件 */
import MaskLayer from './utilcomp/masklayer/MaskLayer.vue'
import Pagination from './utilcomp/pagination/Pagination.vue'
import WizardButtons from './utilcomp/wizardbtn/WizardButtons.vue'
import SlideBlockVcode from './utilcomp/slidervcode/SlideBlockVcode.vue'
import SliderVcodeDialog from './utilcomp/slidervcode/SliderVcodeDialog.vue'
import YdLicense from './utilcomp/ydlicense/YdLicense.vue'

/* 字典管理组件 */
import DictGenericList from './dictmng/DictGenericList.vue'
import DictRegionList from './dictmng/DictRegionList.vue'
import DictCountryList from './dictmng/DictCountryList.vue'
import DictNationList from './dictmng/DictNationList.vue'

/* 系统管理组件 */
import RoleCfg from './sysmng/rolecfg/RoleCfg.vue'
import SysCacheMng from './sysmng/syscache/SysCacheMng.vue'
import AbnormalSchedule from './sysmng/abnormalschd/AbnormalSchedule.vue'

/* 系统监控组件 */
import SysIndex from './sysmonitor/sysindex/SysIndex.vue'
import AccessReport from './sysmonitor/accessrpt/AccessReport.vue'
import BizData from './sysmonitor/bizdata/BizData.vue'
import AppVersion from './sysmonitor/appversion/AppVersion.vue'
import MongoFileMng from './sysmonitor/filemng/MongoFileMng.vue'
import SysLog from './sysmonitor/syslog/SysLog.vue'

/* AUP组件 */
import UserTagList from "./aup/aupusertag/UserTagList.vue";
import UserProfile from "./aup/common/UserProfile.vue";
import AupSubjectList from "./aup/aupsubject/AupSubjectList.vue";
import GatherTagSetList from "./aup/gathertagset/GatherTagSetList.vue";
import AnalTagSetList from "./aup/analtagset/AnalTagSetList.vue";
import ManualTagSetList from "./aup/manualtagset/ManualTagSetList.vue";
import RenderTagSetList from "./aup/rendertagset/RenderTagSetList.vue";

const CommonVue = {
    initEncryptionUtil: initEncryptionUtil,
    initAppAxios: initAppAxios,
    initVueRequest: initVueRequest,

    install: function(Vue, options) {
        //挂载工具类
        Vue.prototype.TJUtil = TJUtil;

        Vue.prototype.commonConst = CommonConst;
        Vue.prototype.commonUrl = new CommonUrl(options.baseUrl);
        Vue.prototype.commonUtil = CommonUtil;
        Vue.prototype.dateUtil = DateUtil;
        Vue.prototype.encryptionUtil = EncryptionUtil;
        Vue.prototype.imgUtil = ImageUtil;
        Vue.prototype.interactionUtil = InteractionUtil;
        Vue.prototype.appAxios = appAxios;
        Vue.prototype.vueRequest = vueRequest;

        //挂载通用组件
        Vue.component('mask-layer', MaskLayer);
        Vue.component('pagination', Pagination);
        Vue.component('wizard-buttons', WizardButtons);
        Vue.component('slide-block-vcode', SlideBlockVcode);
        Vue.component('slider-vcode-dialog', SliderVcodeDialog);
        Vue.component('yd-license', YdLicense);
        
        //挂载字典管理组件
        Vue.component('dict-generic-list', DictGenericList);
        Vue.component('dict-region-list', DictRegionList);
        Vue.component('dict-country-list', DictCountryList);
        Vue.component('dict-nation-list', DictNationList);
        
        //挂载系统管理组件
        Vue.component('role-cfg', RoleCfg);
        Vue.component('sys-cache-mng', SysCacheMng);
        Vue.component('abnormal-schedule', AbnormalSchedule);

        //挂载系统监控组件
        Vue.component('sys-index', SysIndex);
        Vue.component('access-report', AccessReport);
        Vue.component('biz-data', BizData);
        Vue.component('app-version', AppVersion);
        Vue.component('mongo-file-mng', MongoFileMng);
        Vue.component('sys-log', SysLog);
        
        //挂载AUP组件
        Vue.component("user-tag-list", UserTagList);
        Vue.component("user-Profile", UserProfile);
        Vue.component("aup-subject-list", AupSubjectList);
        Vue.component("gather-tag-set-list", GatherTagSetList);
        Vue.component("analysis-tag-set-list", AnalTagSetList);
        Vue.component("manual-tag-set-list", ManualTagSetList);
        Vue.component("render-tag-set-list", RenderTagSetList);
    }
}
export default CommonVue;
