/**
|
* 设备状态
|
*/
|
export const DevStateOptions = [
|
{label: "空闲", value: 0},
|
{label: "已领用", value: 5},
|
{label: "已装机", value: 10},
|
{label: "已遗失", value: 20},
|
{label: "已损坏", value: 30},
|
{label: "维修中", value: 40},
|
{label: "已报废", value: 50}
|
]
|
|
export const tranlateDevState = (state) => {
|
const stateOption = DevStateOptions.find(obj => obj.value === state)
|
return stateOption?.label || '-'
|
}
|
|
/**
|
* 检查状态
|
*/
|
export const CheckStateOptions = [
|
{label: "待检查", value: 0},
|
{label: "已领用", value: 5},
|
{label: "已装机", value: 10},
|
{label: "已拆机", value: 20},
|
{label: "已录入", value: 25},
|
{label: "领用放弃", value: 30},
|
{label: "安装放弃", value: 35},
|
{label: "已遗失", value: 40},
|
{label: "检查放弃", value: 50},
|
{label: "检查完成", value: 60},
|
]
|
|
export const tranlateCheckState = (state) => {
|
const stateOption = CheckStateOptions.find(obj => obj.value === state)
|
return stateOption?.label || '-'
|
}
|
|
/**
|
* 排队状态
|
*/
|
export const queueStatusConvert = (status: number) => {
|
if (3 === status)
|
return '已过号-排队';
|
else if (5 === status)
|
return '已过号';
|
else if (7 === status)
|
return '已过号-安装';
|
else if (10 === status)
|
return '排队中';
|
else if (12 === status)
|
return '亲和';
|
else if (13 === status)
|
return "亲和-安装"
|
else if (15 === status)
|
return '已召回';
|
else if (20 === status)
|
return '候诊中';
|
else if (30 === status)
|
return '就诊中';
|
else if (33 === status)
|
return '已领用';
|
else if (34 === status)
|
return '已召回-安装';
|
else if (36 === status)
|
return '安装中';
|
else if (40 === status)
|
return '已就诊';
|
else
|
return '未定义';
|
|
}
|