282 lines
14 KiB
JavaScript
282 lines
14 KiB
JavaScript
const modules = [
|
|
{
|
|
key: 'password',
|
|
title: '密码工具',
|
|
ops: [
|
|
{ id: 'pwd-generate', name: '生成密码', method: 'POST', path: '/api/console/password/generate', fields: [
|
|
{ key: 'length', label: '长度', type: 'number', default: 16 },
|
|
{ key: 'type', label: '类型(mix/num/alpha)', type: 'text', default: 'mix' }
|
|
] },
|
|
{ id: 'pwd-encrypt', name: '加密', method: 'POST', path: '/api/console/password/encrypt', fields: [
|
|
{ key: 'plaintext', label: '明文', type: 'textarea', required: true }
|
|
] },
|
|
{ id: 'pwd-decrypt', name: '解密', method: 'POST', path: '/api/console/password/decrypt', fields: [
|
|
{ key: 'ciphertext', label: '密文', type: 'textarea', required: true }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'finance',
|
|
title: '理财计算',
|
|
ops: [
|
|
{ id: 'finance-calc', name: '计算', method: 'POST', path: '/api/console/finance', fields: [
|
|
{ key: 'rate', label: '利率', type: 'text', required: true },
|
|
{ key: 'money', label: '本金', type: 'text', required: true },
|
|
{ key: 'days', label: '天数', type: 'number', required: true }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'oil',
|
|
title: '油费计算',
|
|
ops: [
|
|
{ id: 'oil-calc', name: '计算', method: 'POST', path: '/api/console/oil', fields: [
|
|
{ key: 'province', label: '省份', type: 'text' },
|
|
{ key: 'oilType', label: '油号', type: 'text' },
|
|
{ key: 'consumption', label: '油耗', type: 'text' },
|
|
{ key: 'distance', label: '里程(km)', type: 'number', required: true }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'electric',
|
|
title: '电费计算',
|
|
ops: [
|
|
{ id: 'electric-calc', name: '计算', method: 'POST', path: '/api/console/electric', fields: [
|
|
{ key: 'province', label: '省份', type: 'text' },
|
|
{ key: 'power', label: '功率', type: 'text', required: true },
|
|
{ key: 'hours', label: '使用时长', type: 'text', required: true }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'payrecord',
|
|
title: '记账管理',
|
|
ops: [
|
|
{ id: 'pay-create', name: '新增记账', method: 'POST', path: '/api/console/payrecord', fields: [
|
|
{ key: 'records', label: '记账内容', type: 'textarea', required: true }
|
|
] },
|
|
{ id: 'pay-list', name: '记账列表', method: 'GET', path: '/api/console/payrecord', fields: [
|
|
{ key: 'limit', label: '条数限制', type: 'number', in: 'query' }
|
|
] },
|
|
{ id: 'pay-stats', name: '统计', method: 'GET', path: '/api/console/payrecord/stats', fields: [
|
|
{ key: 'range', label: '范围(week/month/custom)', type: 'text', in: 'query' },
|
|
{ key: 'page', label: '页码', type: 'number', in: 'query' },
|
|
{ key: 'pageSize', label: '每页数量', type: 'number', in: 'query' },
|
|
{ key: 'start', label: '开始日期(YYYY-MM-DD)', type: 'text', in: 'query' },
|
|
{ key: 'end', label: '结束日期(YYYY-MM-DD)', type: 'text', in: 'query' }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'dayrecord',
|
|
title: '日记管理',
|
|
ops: [
|
|
{ id: 'day-create', name: '新增日记', method: 'POST', path: '/api/console/dayrecord', fields: [
|
|
{ key: 'content', label: '内容', type: 'textarea', required: true }
|
|
] },
|
|
{ id: 'day-list', name: '日记列表', method: 'GET', path: '/api/console/dayrecord', fields: [
|
|
{ key: 'range', label: '范围(week/month/custom)', type: 'text', in: 'query' },
|
|
{ key: 'page', label: '页码', type: 'number', in: 'query' },
|
|
{ key: 'pageSize', label: '每页数量', type: 'number', in: 'query' },
|
|
{ key: 'start', label: '开始日期', type: 'text', in: 'query' },
|
|
{ key: 'end', label: '结束日期', type: 'text', in: 'query' }
|
|
] },
|
|
{ id: 'day-analyze', name: 'AI 分析', method: 'POST', path: '/api/console/dayrecord/analyze', fields: [
|
|
{ key: 'range_type', label: '范围', type: 'text' },
|
|
{ key: 'start_date', label: '开始日期', type: 'text' },
|
|
{ key: 'end_date', label: '结束日期', type: 'text' }
|
|
] },
|
|
{ id: 'day-analysis-history', name: '分析历史', method: 'GET', path: '/api/console/dayrecord/analysis-history', fields: [
|
|
{ key: 'page', label: '页码', type: 'number', in: 'query' },
|
|
{ key: 'pageSize', label: '每页数量', type: 'number', in: 'query' }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'search',
|
|
title: '全局搜索',
|
|
ops: [
|
|
{ id: 'search', name: '搜索', method: 'GET', path: '/api/console/search', fields: [
|
|
{ key: 'q', label: '关键词', type: 'text', in: 'query', required: true },
|
|
{ key: 'type', label: '类型', type: 'text', in: 'query' },
|
|
{ key: 'start', label: '开始日期', type: 'text', in: 'query' },
|
|
{ key: 'end', label: '结束日期', type: 'text', in: 'query' },
|
|
{ key: 'page', label: '页码', type: 'number', in: 'query' },
|
|
{ key: 'pageSize', label: '每页数量', type: 'number', in: 'query' }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'report',
|
|
title: '报告中心',
|
|
ops: [
|
|
{ id: 'report-generate', name: '生成报告', method: 'POST', path: '/api/console/report/generate', fields: [
|
|
{ key: 'type', label: '类型(week/month/custom)', type: 'text', required: true },
|
|
{ key: 'start_date', label: '开始日期', type: 'text' },
|
|
{ key: 'end_date', label: '结束日期', type: 'text' },
|
|
{ key: 'include', label: '包含内容(逗号分隔: diary,pay,remind)', type: 'text' },
|
|
{ key: 'mask_money', label: '脱敏金额(true/false)', type: 'text' },
|
|
{ key: 'mask_names', label: '脱敏姓名(true/false)', type: 'text' },
|
|
{ key: 'body_json', label: '自定义JSON(可选)', type: 'json' }
|
|
] },
|
|
{ id: 'report-history', name: '历史记录', method: 'GET', path: '/api/console/report/history', fields: [
|
|
{ key: 'type', label: '类型', type: 'text', in: 'query' },
|
|
{ key: 'page', label: '页码', type: 'number', in: 'query' },
|
|
{ key: 'pageSize', label: '每页数量', type: 'number', in: 'query' }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'books',
|
|
title: '读书任务',
|
|
ops: [
|
|
{ id: 'books-list', name: '书籍列表', method: 'GET', path: '/api/console/books', fields: [
|
|
{ key: 'status', label: '状态', type: 'number', in: 'query' },
|
|
{ key: 'keyword', label: '关键词', type: 'text', in: 'query' },
|
|
{ key: 'page', label: '页码', type: 'number', in: 'query' },
|
|
{ key: 'pageSize', label: '每页数量', type: 'number', in: 'query' }
|
|
] },
|
|
{ id: 'books-import-path', name: '导入书籍(路径)', method: 'POST', path: '/api/console/books', fields: [
|
|
{ key: 'path', label: '服务器路径', type: 'text', required: true },
|
|
{ key: 'creator', label: '创建人', type: 'text' }
|
|
] },
|
|
{ id: 'books-upload', name: '导入书籍(PDF上传)', method: 'POST', path: '/api/console/books', type: 'upload', fields: [
|
|
{ key: 'file', label: 'PDF文件', type: 'file', required: true },
|
|
{ key: 'creator', label: '创建人', type: 'text' }
|
|
] },
|
|
{ id: 'books-detail', name: '书籍详情', method: 'GET', path: '/api/console/books/{bookId}', fields: [
|
|
{ key: 'bookId', label: '书籍ID', type: 'number', required: true, in: 'path' }
|
|
] },
|
|
{ id: 'books-delete', name: '删除书籍', method: 'DELETE', path: '/api/console/books/{bookId}', fields: [
|
|
{ key: 'bookId', label: '书籍ID', type: 'number', required: true, in: 'path' }
|
|
] },
|
|
{ id: 'books-preview', name: '预览书页', method: 'GET', path: '/api/console/books/{bookId}/page/{page}', responseType: 'file', fields: [
|
|
{ key: 'bookId', label: '书籍ID', type: 'number', required: true, in: 'path' },
|
|
{ key: 'page', label: '页码', type: 'number', required: true, in: 'path' }
|
|
] },
|
|
{ id: 'readtask-list', name: '读书任务列表', method: 'GET', path: '/api/console/read_task', fields: [
|
|
{ key: 'status', label: '状态', type: 'number', in: 'query' },
|
|
{ key: 'book_id', label: '书籍ID', type: 'number', in: 'query' },
|
|
{ key: 'page', label: '页码', type: 'number', in: 'query' },
|
|
{ key: 'pageSize', label: '每页数量', type: 'number', in: 'query' }
|
|
] },
|
|
{ id: 'readtask-create', name: '创建读书任务', method: 'POST', path: '/api/console/read_task', fields: [
|
|
{ key: 'book_id', label: '书籍ID', type: 'number', required: true },
|
|
{ key: 'days', label: '天数', type: 'number' },
|
|
{ key: 'push_times', label: '推送时间(逗号分隔)', type: 'text' },
|
|
{ key: 'channel', label: '渠道(email/wechat)', type: 'text' },
|
|
{ key: 'email', label: '邮箱', type: 'text' },
|
|
{ key: 'wechat_remark', label: '微信备注', type: 'text' },
|
|
{ key: 'auto_start', label: '自动开始(true/false)', type: 'text' }
|
|
] },
|
|
{ id: 'readtask-update', name: '更新读书任务', method: 'PUT', path: '/api/console/read_task/{taskId}', fields: [
|
|
{ key: 'taskId', label: '任务ID', type: 'text', required: true, in: 'path' },
|
|
{ key: 'status', label: '状态', type: 'number' },
|
|
{ key: 'days', label: '天数', type: 'number' },
|
|
{ key: 'push_times', label: '推送时间', type: 'text' },
|
|
{ key: 'channel', label: '渠道', type: 'text' },
|
|
{ key: 'email', label: '邮箱', type: 'text' },
|
|
{ key: 'wechat_remark', label: '微信备注', type: 'text' },
|
|
{ key: 'auto_start', label: '自动开始(true/false)', type: 'text' }
|
|
] },
|
|
{ id: 'readtask-delete', name: '删除读书任务', method: 'DELETE', path: '/api/console/read_task/{taskId}', fields: [
|
|
{ key: 'taskId', label: '任务ID', type: 'text', required: true, in: 'path' }
|
|
] },
|
|
{ id: 'readtask-push', name: '手动推送', method: 'POST', path: '/api/console/read_task/{taskId}/push_once', fields: [
|
|
{ key: 'taskId', label: '任务ID', type: 'text', required: true, in: 'path' }
|
|
] },
|
|
{ id: 'readtask-next', name: '预览下一批', method: 'GET', path: '/api/console/read_task/{taskId}/next', fields: [
|
|
{ key: 'taskId', label: '任务ID', type: 'text', required: true, in: 'path' }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'remind',
|
|
title: '提醒任务',
|
|
ops: [
|
|
{ id: 'remind-create', name: '创建提醒', method: 'POST', path: '/api/console/remind', fields: [
|
|
{ key: 'content', label: '提醒内容', type: 'textarea', required: true },
|
|
{ key: 'email', label: '邮箱', type: 'text' }
|
|
] },
|
|
{ id: 'remind-list', name: '提醒列表', method: 'GET', path: '/api/console/remind', fields: [
|
|
{ key: 'page', label: '页码', type: 'number', in: 'query' },
|
|
{ key: 'pageSize', label: '每页数量', type: 'number', in: 'query' }
|
|
] },
|
|
{ id: 'remind-update', name: '更新提醒', method: 'PUT', path: '/api/console/remind', fields: [
|
|
{ key: 'id', label: '任务ID', type: 'number', required: true },
|
|
{ key: 'timeTodo', label: '提醒时间', type: 'text', required: true },
|
|
{ key: 'things', label: '提醒事项', type: 'text', required: true }
|
|
] },
|
|
{ id: 'remind-delete', name: '删除提醒', method: 'DELETE', path: '/api/console/remind', fields: [
|
|
{ key: 'id', label: '任务ID', type: 'number', required: true, in: 'query' }
|
|
] },
|
|
{ id: 'remind-done', name: '完成提醒', method: 'PUT', path: '/api/console/remind/{id}/done', fields: [
|
|
{ key: 'id', label: '任务ID', type: 'number', required: true, in: 'path' }
|
|
] },
|
|
{ id: 'remind-delay', name: '延期提醒', method: 'PUT', path: '/api/console/remind/{id}/delay', fields: [
|
|
{ key: 'id', label: '任务ID', type: 'number', required: true, in: 'path' },
|
|
{ key: 'minutes', label: '延期分钟', type: 'number', required: true }
|
|
] },
|
|
{ id: 'remind-archive', name: '归档提醒', method: 'PUT', path: '/api/console/remind/{id}/archive', fields: [
|
|
{ key: 'id', label: '任务ID', type: 'number', required: true, in: 'path' }
|
|
] },
|
|
{ id: 'remind-history', name: '提醒历史', method: 'GET', path: '/api/console/remind/history', fields: [
|
|
{ key: 'action', label: '动作(done/archive)', type: 'text', in: 'query' },
|
|
{ key: 'page', label: '页码', type: 'number', in: 'query' },
|
|
{ key: 'pageSize', label: '每页数量', type: 'number', in: 'query' }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'ai',
|
|
title: 'AI 对话',
|
|
ops: [
|
|
{ id: 'ai-chat', name: '发送对话', method: 'POST', path: '/api/console/ai/chat', fields: [
|
|
{ key: 'message', label: '输入内容', type: 'textarea', required: true }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'didi',
|
|
title: '滴滴秒杀',
|
|
ops: [
|
|
{ id: 'didi-token', name: '设置Token', method: 'POST', path: '/api/console/didi/token', fields: [
|
|
{ key: 'token', label: 'Token', type: 'textarea', required: true }
|
|
] },
|
|
{ id: 'didi-goods', name: '商品列表', method: 'GET', path: '/api/console/didi/goods', fields: [] },
|
|
{ id: 'didi-start', name: '启动调度', method: 'POST', path: '/api/console/didi/start', fields: [
|
|
{ key: 'email', label: '邮箱', type: 'text' }
|
|
] },
|
|
{ id: 'didi-stop', name: '停止调度', method: 'POST', path: '/api/console/didi/stop', fields: [] },
|
|
{ id: 'didi-status', name: '状态', method: 'GET', path: '/api/console/didi/status', fields: [] },
|
|
{ id: 'didi-check', name: 'Token校验', method: 'GET', path: '/api/console/didi/check', fields: [] },
|
|
{ id: 'didi-seckill', name: '手动秒杀', method: 'POST', path: '/api/console/didi/seckill', fields: [
|
|
{ key: 'saleTime', label: '秒杀时间(秒)', type: 'number', required: true },
|
|
{ key: 'email', label: '邮箱', type: 'text' }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'qianggou',
|
|
title: '抢购控制',
|
|
ops: [
|
|
{ id: 'qianggou-status', name: '查询状态', method: 'GET', path: '/api/console/qianggou', fields: [] },
|
|
{ id: 'qianggou-action', name: '启动/停止', method: 'POST', path: '/api/console/qianggou', fields: [
|
|
{ key: 'action', label: '动作(start/stop)', type: 'text', required: true }
|
|
] }
|
|
]
|
|
},
|
|
{
|
|
key: 'system',
|
|
title: '系统状态',
|
|
ops: [
|
|
{ id: 'ping', name: '探活', method: 'GET', path: '/api/console/ping', fields: [] },
|
|
{ id: 'features', name: '功能列表', method: 'GET', path: '/api/console/features', fields: [] },
|
|
{ id: 'status', name: '系统状态', method: 'GET', path: '/api/console/status', fields: [] }
|
|
]
|
|
}
|
|
];
|
|
|
|
module.exports = { modules };
|