| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- export const RESOURCE_MAP = {
- acupoints: {
- title: '穴位管理',
- apiPath: '/acupoints',
- searchApiPath: '/acupoints/search',
- exportApiPath: '/acupoints/export',
- batchDeleteApiPath: '/acupoints/batch-delete',
- columns: [
- { prop: 'id', label: 'ID', width: 80 },
- { prop: 'code', label: '编码', width: 120 },
- { prop: 'name', label: '名称', width: 100 },
- { prop: 'meridian', label: '所属经络', width: 140 },
- { prop: 'efficacy', label: '功效', minWidth: 160 },
- { prop: 'side', label: '侧别', width: 80 },
- { prop: 'status', label: '状态', width: 80 },
- { prop: 'createTime', label: '创建时间', width: 170 },
- ],
- formFields: [
- { prop: 'code', label: '穴位编码', type: 'input', required: true },
- { prop: 'name', label: '穴位名称', type: 'input', required: true },
- { prop: 'meridian', label: '所属经络', type: 'select', options: ['督脉', '足太阳膀胱经', '手太阳小肠经', '其他'] },
- { prop: 'efficacy', label: '功效(逗号分隔)', type: 'input' },
- { prop: 'positioning', label: '定位方式', type: 'select', options: ['relative', 'absolute'] },
- { prop: 'offsetCun', label: '纵向偏移(寸)', type: 'input' },
- { prop: 'cunType', label: '指寸类型', type: 'select', options: ['cun1', 'cun1_5', 'cun3'] },
- { prop: 'side', label: '侧别', type: 'select', options: ['center', 'both', 'left', 'right'] },
- { prop: 'lateralOffset', label: '横向偏移(寸)', type: 'input' },
- { prop: 'targetGender', label: '适用性别', type: 'select', options: ['all', 'male', 'female'] },
- { prop: 'status', label: '状态', type: 'select', options: ['active', 'pending'] },
- { prop: 'source', label: '来源', type: 'select', options: ['preset', 'expert'] },
- ],
- searchFields: [
- { prop: 'name', label: '穴位名称', type: 'input' },
- { prop: 'meridian', label: '所属经络', type: 'select', options: ['', '督脉', '足太阳膀胱经', '手太阳小肠经'] },
- { prop: 'positioning', label: '定位方式', type: 'select', options: ['', 'relative', 'absolute'] },
- { prop: 'status', label: '状态', type: 'select', options: ['', 'active', 'pending'] },
- ],
- },
- 'moxa-techniques': {
- title: '艾灸手法',
- apiPath: '/moxa-techniques',
- searchApiPath: '/moxa-techniques/search',
- columns: [
- { prop: 'id', label: 'ID', width: 80 },
- { prop: 'code', label: '编码', minWidth: 100 },
- { prop: 'name', label: '名称', minWidth: 120 },
- { prop: 'movementPattern', label: '运动模式', minWidth: 120 },
- { prop: 'tempMin', label: '最低温度', width: 100 },
- { prop: 'tempMax', label: '最高温度', width: 100 },
- { prop: 'status', label: '状态', width: 80 },
- ],
- formFields: [
- { prop: 'code', label: '编码', type: 'input', required: true },
- { prop: 'name', label: '名称', type: 'input', required: true },
- { prop: 'isDefault', label: '默认手法', type: 'select', options: [{ label: '否', value: 0 }, { label: '是', value: 1 }] },
- { prop: 'description', label: '描述', type: 'textarea' },
- { prop: 'movementPattern', label: '运动模式', type: 'select', options: ['fixed', 'vertical', 'circular', 'point', 'oneclick'], required: true },
- { prop: 'tempMin', label: '最低温度(°C)', type: 'input' },
- { prop: 'tempMax', label: '最高温度(°C)', type: 'input' },
- { prop: 'durationMin', label: '最短时间(秒)', type: 'number' },
- { prop: 'durationMax', label: '最长时间(秒)', type: 'number' },
- { prop: 'movementAmplitude', label: '运动幅度(mm)', type: 'input' },
- { prop: 'movementSpeed', label: '运动速度(mm/s)', type: 'input' },
- { prop: 'status', label: '状态', type: 'select', options: ['active', 'disabled'] },
- { prop: 'remark', label: '备注', type: 'textarea' },
- ],
- searchFields: [
- { prop: 'name', label: '名称', type: 'input' },
- { prop: 'movementPattern', label: '运动模式', type: 'select', options: ['', 'fixed', 'vertical', 'circular', 'point', 'oneclick'] },
- { prop: 'status', label: '状态', type: 'select', options: ['', 'active', 'disabled'] },
- ],
- },
- users: {
- title: '用户管理',
- apiPath: '/users',
- searchApiPath: '/users/search',
- exportApiPath: '/users/export',
- batchDeleteApiPath: '/users/batch-delete',
- columns: [
- { prop: 'id', label: 'ID', width: 80 },
- { prop: 'name', label: '姓名', minWidth: 100 },
- { prop: 'gender', label: '性别', width: 70 },
- { prop: 'age', label: '年龄', width: 70 },
- { prop: 'phone', label: '手机号', width: 130 },
- { prop: 'shoulderWidth', label: '肩宽(cm)', width: 90 },
- { prop: 'bodyLength', label: '身长(cm)', width: 90 },
- { prop: 'acupointTableStatus', label: '穴位表', minWidth: 100 },
- { prop: 'createTime', label: '注册时间', width: 170 },
- ],
- formFields: [
- { prop: 'name', label: '姓名', type: 'input', required: true },
- { prop: 'gender', label: '性别', type: 'select', options: ['male', 'female'], required: true },
- { prop: 'age', label: '年龄', type: 'number', required: true },
- { prop: 'phone', label: '手机号', type: 'input', required: true },
- { prop: 'shoulderWidth', label: '肩宽(cm)', type: 'input', required: true },
- { prop: 'bodyLength', label: '身长(cm)', type: 'input', required: true },
- { prop: 'fingerCun1', label: '一寸(cm)', type: 'input' },
- { prop: 'fingerCun1_5', label: '1.5寸(cm)', type: 'input' },
- { prop: 'fingerCun3', label: '三寸(cm)', type: 'input' },
- ],
- searchFields: [
- { prop: 'keyword', label: '姓名/手机号', type: 'input' },
- { prop: 'gender', label: '性别', type: 'select', options: ['', 'male', 'female'] },
- { prop: 'acupointTableStatus', label: '穴位表状态', type: 'select', options: ['', 'GENERATED', 'NOT_GENERATED'] },
- { prop: 'deviceCode', label: '设备编号', type: 'input' },
- ],
- extraActions: ['generateAcupoint', 'manageDevices'],
- },
- devices: {
- title: '设备管理',
- apiPath: '/devices',
- searchApiPath: '/devices/search',
- exportApiPath: '/devices/export',
- batchDeleteApiPath: '/devices/batch-delete',
- columns: [
- { prop: 'id', label: 'ID', width: 80 },
- { prop: 'deviceCode', label: '设备编号', minWidth: 120 },
- { prop: 'deviceName', label: '设备名称', minWidth: 140 },
- { prop: 'model', label: '型号', width: 100 },
- { prop: 'serialNumber', label: '序列号', minWidth: 140 },
- { prop: 'firmwareVersion', label: '固件版本', width: 100 },
- { prop: 'status', label: '状态', width: 80 },
- ],
- formFields: [
- { prop: 'deviceCode', label: '设备编号', type: 'input', required: true },
- { prop: 'deviceName', label: '设备名称', type: 'input', required: true },
- { prop: 'model', label: '设备型号', type: 'select', options: ['AJY-2026', 'AJY-2025'], required: true },
- { prop: 'serialNumber', label: '序列号', type: 'input', required: true },
- { prop: 'firmwareVersion', label: '固件版本', type: 'input' },
- { prop: 'status', label: '状态', type: 'select', options: ['online', 'offline'] },
- { prop: 'remark', label: '备注', type: 'textarea' },
- ],
- searchFields: [
- { prop: 'deviceCode', label: '设备编号', type: 'input' },
- { prop: 'deviceName', label: '设备名称', type: 'input' },
- { prop: 'status', label: '在线状态', type: 'select', options: ['', 'online', 'offline'] },
- { prop: 'userName', label: '绑定用户', type: 'input' },
- ],
- extraActions: ['manageUsers'],
- },
- schemes: {
- title: '方案管理',
- apiPath: '/schemes',
- searchApiPath: '/schemes/search',
- batchDeleteApiPath: '/schemes/batch-delete',
- columns: [
- { prop: 'id', label: 'ID', width: 80 },
- { prop: 'schemeName', label: '方案名称', minWidth: 140 },
- { prop: 'mode', label: '模式', width: 120 },
- { prop: 'efficacyType', label: '功效类型', width: 90 },
- { prop: 'creatorName', label: '创作人', width: 100 },
- { prop: 'status', label: '状态', width: 80 },
- { prop: 'createTime', label: '创建时间', width: 170 },
- ],
- formFields: [
- { prop: 'schemeName', label: '方案名称', type: 'input', required: true },
- { prop: 'mode', label: '模式', type: 'select', options: ['ONE_CLICK', 'PROFESSIONAL', 'CUSTOM', 'EXPERT'], required: true },
- { prop: 'efficacyType', label: '功效类型', type: 'select', options: ['', '驱寒', '祛湿', '祛风', '化瘀', '活血', '化痰', '养颜', '扶阳'] },
- { prop: 'creatorType', label: '创作人类型', type: 'select', options: ['admin', 'user', 'expert'], required: true },
- { prop: 'creatorName', label: '创作人名称', type: 'input' },
- { prop: 'symptoms', label: '适用症状(逗号分隔)', type: 'input' },
- { prop: 'targetGender', label: '适用性别', type: 'select', options: ['all', 'male', 'female'] },
- { prop: 'ageMin', label: '最小年龄', type: 'number' },
- { prop: 'ageMax', label: '最大年龄', type: 'number' },
- { prop: 'description', label: '方案描述', type: 'textarea' },
- { prop: 'status', label: '状态', type: 'select', options: ['draft', 'published', 'archived'] },
- ],
- searchFields: [
- { prop: 'schemeName', label: '方案名称', type: 'input' },
- { prop: 'mode', label: '模式', type: 'select', options: ['', 'ONE_CLICK', 'PROFESSIONAL', 'CUSTOM', 'EXPERT'] },
- { prop: 'efficacyType', label: '功效类型', type: 'select', options: ['', '驱寒', '祛湿', '祛风', '化瘀', '活血', '化痰', '养颜', '扶阳'] },
- { prop: 'status', label: '状态', type: 'select', options: ['', 'draft', 'published', 'archived'] },
- { prop: 'creatorName', label: '创作人', type: 'input' },
- ],
- extraActions: ['viewDetail', 'publish', 'archive'],
- },
- }
- export function getResourceConfig(key) {
- return RESOURCE_MAP[key]
- }
|