员工管理
This commit is contained in:
@ -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)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user