/**
 * EMA Web 前端配置
 */
var Config = {
    // 后端API地址 - 请根据实际后端服务地址修改
    baseUrl: 'http://localhost:9980',

    // API路径（使用相对路径）
    api: {
        // 认证相关
        login: '/login',
        logout: '/logout',
        imgCode: '/imgCode',
        currentUser: '/auth/currentUser',
        menus: '/auth/menus',
        menuTree: '/auth/menuTree',
        roles: '/auth/roles',
        updatePwd: '/auth/updatePwd',

        // 用户管理
        user: {
            list: '/sysUser/list',
            page: '/sysUser/page',
            save: '/sysUser/save',
            update: '/sysUser/update',
            remove: '/sysUser/remove',
            getInfo: '/sysUser/getInfo'
        },

        // 角色管理
        role: {
            list: '/sysRole/list',
            page: '/sysRole/page',
            save: '/sysRole/save',
            update: '/sysRole/update',
            remove: '/sysRole/remove',
            getInfo: '/sysRole/getInfo'
        },

        // 菜单管理
        menu: {
            list: '/sysMenu/list',
            page: '/sysMenu/page',
            save: '/sysMenu/save',
            update: '/sysMenu/update',
            remove: '/sysMenu/remove',
            getInfo: '/sysMenu/getInfo',
            tree: '/sysMenu/tree'
        },

        // 部门管理
        department: {
            list: '/sysDepartment/list',
            page: '/sysDepartment/page',
            save: '/sysDepartment/save',
            update: '/sysDepartment/update',
            remove: '/sysDepartment/remove',
            getInfo: '/sysDepartment/getInfo',
            tree: '/sysDepartment/tree',
            userList: '/sysDepartment/userList'
        },

        // 字典类型
        dictType: {
            list: '/sysDictType/list',
            page: '/sysDictType/page',
            save: '/sysDictType/save',
            update: '/sysDictType/update',
            remove: '/sysDictType/remove',
            getInfo: '/sysDictType/getInfo'
        },

        // 字典数据
        dictData: {
            list: '/sysDictData/list',
            page: '/sysDictData/page',
            save: '/sysDictData/save',
            update: '/sysDictData/update',
            remove: '/sysDictData/remove',
            getInfo: '/sysDictData/getInfo',
            getList: '/sysDictData/getList'
        },

        // 文件管理
        file: {
            upload: '/upload/file',
            batchUpload: '/upload/batch',
            download: '/download',
            delete: '/delete'
        },

        // 操作日志
        operLog: {
            page: '/sysOperLog/page',
            getInfo: '/sysOperLog/getInfo'
        },

        // 定时任务
        timersJob: {
            list: '/sysTimersJob/list',
            page: '/sysTimersJob/page',
            save: '/sysTimersJob/save',
            update: '/sysTimersJob/update',
            remove: '/sysTimersJob/remove',
            getInfo: '/sysTimersJob/getInfo',
            stop: '/sysTimersJob/stop',
            start: '/sysTimersJob/start'
        },

        // 资产管理
        assets: {
            list: '/assetsInfo/list',
            page: '/assetsInfo/page',
            save: '/assetsInfo/save',
            update: '/assetsInfo/update',
            remove: '/assetsInfo/remove',
            getInfo: '/assetsInfo/getInfo'
        },

        // 资产状态历史
        assetStatusHistory: {
            list: '/assetStatusHistory/list',
            page: '/assetStatusHistory/page',
            save: '/assetStatusHistory/save',
            update: '/assetStatusHistory/update',
            remove: '/assetStatusHistory/remove',
            getInfo: '/assetStatusHistory/getInfo'
        }
    },

    // 获取完整API地址
    getApiUrl: function(path) {
        return this.baseUrl + path;
    }
};

// 导出配置
if (typeof module !== 'undefined' && module.exports) {
    module.exports = Config;
}
