feat: prolist in /admin/report

This commit is contained in:
Dawn1Ocean
2024-04-02 15:53:26 +08:00
parent e71abc0c0b
commit 54f7fe53a5
7 changed files with 87 additions and 4 deletions
+37
View File
@@ -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;