员工管理

This commit is contained in:
Taric Xin
2021-11-30 11:11:02 +08:00
parent 08d5b09401
commit 83208b4934
22 changed files with 650 additions and 53 deletions

View File

@ -41,7 +41,7 @@ function getRule(params: any): any {
if (params.no) {
ret = ret.filter(data => data.no.indexOf(params.no) > -1);
}
return { data: ret, success: true };
return { data: { records: ret, total: ret.length }, success: true };
}
function removeRule(nos: string): any {
@ -51,7 +51,7 @@ function removeRule(nos: string): any {
list.splice(idx, 1);
}
});
return { data: true, success: true };
}
@ -78,6 +78,6 @@ function saveRule(description: string): void {
export const RULES = {
'POST /rule': (req: MockRequest) => getRule(req.queryString),
'POST /delete/rule': (req: MockRequest) => removeRule(req.body.nos),
'POST /delete/rule': (req: MockRequest) => removeRule(req.body.nos)
// 'POST /rule': (req: MockRequest) => saveRule(req.body.description)
};