77 门诊挂号-》预约签到
This commit is contained in:
@@ -162,3 +162,61 @@ export const STATUS = {
|
||||
NORMAL: '0', // 正常/启用
|
||||
DISABLE: '1' // 停用
|
||||
};
|
||||
|
||||
/**
|
||||
* 号源槽位状态(与后端 CommonConstants.SlotStatus 保持一致)
|
||||
* adm_schedule_slot.status 字段
|
||||
*/
|
||||
export const SlotStatus = {
|
||||
/** 可用 / 待预约 */
|
||||
AVAILABLE: 0,
|
||||
/** 已预约 */
|
||||
BOOKED: 1,
|
||||
/** 已取消 / 已停诊 */
|
||||
CANCELLED: 2,
|
||||
/** 已锁定 */
|
||||
LOCKED: 3,
|
||||
/** 已签到 / 已取号 */
|
||||
CHECKED_IN: 4,
|
||||
};
|
||||
|
||||
/**
|
||||
* 号源槽位状态说明信息
|
||||
*/
|
||||
export const SlotStatusDescriptions = {
|
||||
0: '未预约',
|
||||
1: '已预约',
|
||||
2: '已停诊',
|
||||
3: '已锁定',
|
||||
4: '已取号',
|
||||
};
|
||||
|
||||
/**
|
||||
* 号源槽位状态对应的CSS类名
|
||||
*/
|
||||
export const SlotStatusClassMap = {
|
||||
'未预约': 'status-unbooked',
|
||||
'已预约': 'status-booked',
|
||||
'已取号': 'status-checked',
|
||||
'已停诊': 'status-cancelled',
|
||||
'已取消': 'status-cancelled',
|
||||
'已锁定': 'status-locked',
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取号源槽位状态的说明
|
||||
* @param {number} value - 状态值
|
||||
* @returns {string} - 说明信息
|
||||
*/
|
||||
export function getSlotStatusDescription(value) {
|
||||
return SlotStatusDescriptions[value] || '未知状态';
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取号源槽位状态对应的CSS类名
|
||||
* @param {string} status - 状态说明
|
||||
* @returns {string} - CSS类名
|
||||
*/
|
||||
export function getSlotStatusClass(status) {
|
||||
return SlotStatusClassMap[status] || 'status-unbooked';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user