liuyu
4 小时以前 82a74ba0402ab546ba524d23ce62198c4d00d2f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
export const YES_NO_OPTIONS = [
  { id: '1', fullName: '是' },
  { id: '0', fullName: '否' },
];
 
export const ENABLE_OPTIONS = [
  { id: '1', fullName: '启用' },
  { id: '0', fullName: '停用' },
];
 
export const SIGN_RULE_OPTIONS = [
  { id: 'scan', fullName: '仅扫码' },
  { id: 'both', fullName: '扫码+在线' },
];
 
export function labelOfYesNo(v?: string) {
  return YES_NO_OPTIONS.find((x) => x.id === v)?.fullName || v || '-';
}
 
export function labelOfSignRule(v?: string) {
  return SIGN_RULE_OPTIONS.find((x) => x.id === v)?.fullName || v || '-';
}
 
export function labelOfEnabled(v?: string) {
  return ENABLE_OPTIONS.find((x) => x.id === v)?.fullName || v || '-';
}