var root = window.location.origin;//"http://e5.hieap.cn"
var sysManageUrl = "http://" + window.location.hostname+(window.location.port=="8001"?":5188":":5189");
//开发模式
if (window._global && window._global.env == 'dev') {
    root = "http://e5.hieap.cn"
}
var server = "";
var oauth = "";
var projectName = "mflm/0000221"
var pName = projectName.split("/")[0];
var user = projectName.split("/")[1];
var deployRoot="/render"
var deployDir = deployRoot+"/"+user;
//登录页url
var loginUrl = root + server + "/index.html?pn=" + pName + "/" + user;
//首页url
var admin_mainPageUrl = root + server + "/main.html?pn=" + pName + "/" + user;;
var mainPageUrl = root + server + "/main.html?pn=" + pName + "/" + user;
let serverName = server;
if (window._global && window._global.env == 'dev') {
    deployDir = ""
    serverName = ""
    sysManageUrl="http://192.168.4.192:5188"
    //登录页url
    var loginUrl = deployDir + "/" + pName + "/hivuiLogin/index.html#/";
    //首页url
    var mainPageUrl = deployDir + "/" + pName + "/hivuiMain/index.html#/";
}
var HIVUI_SETTING = {
    //admin 首页
    admin_mainPageUrl:admin_mainPageUrl,    
    //项目名
    projectName: projectName,
    //请求对象
    request: eap.request,
    //服务器域名
    url: root,
    serverName: serverName,
    //编辑器路径
    editorResDir:deployRoot,
    //默认服务url
    serverUrl: root + server,
    //授权服务url
    oauth: root + oauth,
    //用户信息
    userInfo: root + server + "/sys/user/detail",
    //登录页url
    loginUrl: loginUrl,
    //首页url
    mainPageUrl: mainPageUrl,
    //系统管理url
    sysManageUrl: sysManageUrl,
    //数据保存url
    saveUrl: root + server + "/data/save", //'/data/save',
    //数据查询url
    queryUrl: root + server + "/data/query", //'/data/query',
    //导入URL
    excelImportUrl: root + server + "/import/exceldata",
    //导出URL
    exportUrl:root + server + "/export/dataexcel",
    exportPathUrl:root + server + "/export/dataexcel/path",
    exportNewUrl:root + server + "/export/dataexcelnew",
    //excel导出心跳
    exportExcelHeartbeatUrl:root + server + "/export/dataexcel/status",
     //页面初始化接口
     pageInitUrl: root + server + "/data/page/permit",
    //数据策略url
    policyUrl: root + server + "/data/policy",
    //附件上传url
    upload: root + server + "/file/upload",
    //附件下载url
    download: root + server + "/file/download",
    //附件查看url
    review: root + server + "/file/preview",
    //流程信息url
    getFlowInfo: root + server + "/flow/open",
    getApprovalInfo: root + server + "/flow/getApprovalInfo",
    processFlow: root + server + "/flow/processFlow",
    queryTask: root + server + "/flow/queryTask",
    withdrawtask: root + server + "/flow/withdrawtask",
    taskDiagram: root + server + "/flow/taskDiagram",
    openOrdernumber: root + server + "/flow/openOrdernumber",
    //默认查询操作符
    queryOperate: 'like',
    //默认组件配置
    defaultCmp: {
        //分页组件
        "DtPagination":{
            "pagerCount":10  //页码数量
        },
        "DtToolbar": {
            "buttons": [
                {
                    "kind": "add",
                    "text": "添加"
                },
                {
                    "kind": "del",
                    "text": "删除"
                },
                {
                    "kind": "reset",
                    "text": "取消"
                },
                {
                    "kind": "save",
                    "text": "保存"
                }
            ]
        }
    }
}
window.__guid = new Date().valueOf();
//切换布局
function changeLayout(name) {
    window.localStorage.setItem('layout', name);
    window.location.reload();
}
//模板自定义配置
window.customSysCofig={
    //默认门户   对应自定义门户功能
    sysSetTabs: [
        /*{
            title: '任务中心',
            id: __guid++,
            close: false,
            url: '#taskCenter',
        },*/
        {
            title: '首页',
            id: __guid++,
            close: false,
            type: 'home',
            actived: true //默认选中
        }
        // ,{
        //     title:'工作台',
        //     id: __guid++,
        //     close:false,
        //     type:'work'
        // }
    ],
    //默认 打开功能
    sysDefTabs: [
        // {
        //   id: __guid++,
        //   title:"设计",
        //   url:'http://192.168.7.109:9090/#/design',
        //   close:true,
        // },
    ],
    //头部菜单
    sysFuncMenus: [
        {
            id: __guid++,
            name: '系统管理',
            url: window.HIVUI_SETTING.sysManageUrl + "/?pn=" + window.HIVUI_SETTING.projectName,
            iconClass: 'icon-set-fill',
            target: '_blank',
            type: 'widthToken',
        },
        /*{
            id: __guid++,
            name: '<font color=red>邮件系统</font>',
            url: 'http://hcmail.histron.cn:8001/webmail/index.do?osName=windows',
            iconClass: 'icon-mail',
            target: '_blank',
        },*/
        { type: 'split' },
        {
            id: __guid++,
            name: '布局',
            type: 'layout',
            iconClass: 'icon-user',
            children: [
                {
                    id: 'vertical',
                    name: '上下布局',
                    handler: function () {
                        changeLayout(this.id)
                    }
                },
                {
                    id: 'level',
                    name: '左右布局',
                    handler: function () {
                        changeLayout(this.id)
                    }
                }
            ]
        },
        { type: 'split' },
    ],
    //首页加载logo
    sysLoadLogo: {
        src: deployDir +'/'+pName+'/setting/desktop/sysAssets/sy_loading/png/1.0.0/sy_loading.png',
        title: '闽纺联盟'
    },
    //首页头部logo
    sysLogo: {
        src: deployDir +'/'+pName+'/setting/desktop/sysAssets/sy_logo/png/1.0.0/sy_logo.png',
        title: '闽纺联盟'
    },
    //首页mini图标
    MsysLogo: {
        src: deployDir +'/'+pName+'/setting/desktop/sysAssets/sy_minLogo/png/1.0.0/sy_minLogo.png',
        title: '闽纺联盟'
    },
//登录页配置
    //登录页logo
    loginLogo:deployDir +'/'+pName+"/setting/desktop/sysAssets/login_logo/png/1.0.0/login_logo.png",
    //logo高
    loginLogo_h:null,
    //logo宽
    loginLogo_w:null,
    //登录页背景
    loginBgImg:deployDir +'/'+pName+"/setting/desktop/sysAssets/login_bg/png/1.0.0/login_bg.png",
    //登录标签
    loginTitle:"闽纺联盟-登录",
    //首页标签
    syTitle:"闽纺联盟",
    //版权
    copyright:"版权所有 © 2020-2025 中海创科技",
    //是否开启扫码登录
    //isScan:false,
    mainColor:"#3BD2B2",
};