feat: prolist in /admin/report
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
const operationMap: { [key: number]: string } = {
|
||||
0: '增加',
|
||||
1: '删除',
|
||||
2: '更改',
|
||||
};
|
||||
|
||||
const targetMap: { [key: number]: string } = {
|
||||
0: '值班表',
|
||||
1: '值班信息',
|
||||
2: '值班总结',
|
||||
};
|
||||
|
||||
export type LogsItem = {
|
||||
op: string;
|
||||
time: string;
|
||||
operation: number;
|
||||
target: number;
|
||||
prev: {
|
||||
id: number;
|
||||
info: string;
|
||||
};
|
||||
curr: {
|
||||
id: number;
|
||||
info: string;
|
||||
};
|
||||
};
|
||||
|
||||
const transInfo = (num: number, type: string) => {
|
||||
switch (type) {
|
||||
case 'operation':
|
||||
return operationMap[num];
|
||||
case 'target':
|
||||
return targetMap[num];
|
||||
}
|
||||
};
|
||||
|
||||
export default transInfo;
|
||||
Reference in New Issue
Block a user