zhaosheng

This commit is contained in:
guochunsi
2026-01-26 18:19:57 +08:00
parent 741af78a0e
commit c5eea52c46
48 changed files with 656 additions and 488 deletions

View File

@@ -96,6 +96,24 @@ export const DORM_RANGE_STATUS_LIST = [
{ label: "范围外", value: "2" }
];
// 发送短信状态
export const SEND_STATUS_LIST = [
{ label: "未发送", value: "0" },
{ label: "已发送", value: "1" }
];
// 手动设置状态
export const MANUAL_SET_STATUS_LIST = [
{ label: "未设置", value: "0" },
{ label: "已设置", value: "1" }
];
// 住宿申请状态
export const DORM_APPLY_STATUS_LIST = [
{ label: "未通过", value: "0" },
{ label: "申请通过", value: "1" }
];
// 面试结果
export const INTERVIEW_DIC_LIST = [
{ label: "未面试", value: "0" ,type: "info",icon: "Document"},
@@ -134,3 +152,60 @@ export const getStatusConfig = (statusList: any[], value: string | number) => {
return statusList.find(item => item.value === String(value));
};
/**
* 获取报到状态配置(用于 ClickableTag
* 根据字典数据0=未联系, 1=已经报到, 2=推迟报到, 3=放弃报到, 4=无法联系
* @param statusList 报到状态字典列表
* @param value 状态值
* @param iconMap 图标映射对象,包含 CircleCheck, CircleClose, DocumentChecked, Warning, Clock
* @returns 包含 label、type、icon 的配置对象
*/
export const getCheckInStatusConfig = (
statusList: any[],
value: string,
iconMap: {
CircleCheck: any
CircleClose: any
DocumentChecked: any
Warning: any
Clock: any
}
) => {
const item = statusList.find((item: any) => item.value === value)
if (!item) return null
let type: 'success' | 'info' | 'warning' | 'danger' = 'info'
let icon: any = null
// 根据状态值设置类型和图标
switch (value) {
case '1': // 已经报到
type = 'success'
icon = iconMap.CircleCheck
break
case '2': // 推迟报到
type = 'warning'
icon = iconMap.Clock
break
case '3': // 放弃报到
type = 'danger'
icon = iconMap.CircleClose
break
case '4': // 无法联系
type = 'danger'
icon = iconMap.Warning
break
case '0': // 未联系
default:
type = 'info'
icon = iconMap.DocumentChecked
break
}
return {
label: item.label,
type,
icon
}
}