49 lines
1.5 KiB
JavaScript
49 lines
1.5 KiB
JavaScript
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
|
import { apiPost, safeAction } from "../../utils/enterpriseInfo/http";
|
|
import { asId } from "../../utils/enterpriseInfo/idUtil";
|
|
|
|
export const staffInfoList = declareRequest(
|
|
"staffInfoLoading",
|
|
"Get > /safetyEval/org-personnel/page",
|
|
"staffInfoList: [] | res.data || [] & staffInfoTotal: 0 | res.total || 0",
|
|
);
|
|
|
|
export const staffInfoDeptPersonCount = declareRequest(
|
|
"staffInfoLoading",
|
|
"Get > /safetyEval/org-personnel/deptPersonCount",
|
|
"staffInfoDeptPersonCount: [] | res.data || []",
|
|
);
|
|
|
|
export const staffInfoGet = declareRequest(
|
|
"staffInfoLoading",
|
|
"Get > /safetyEval/org-personnel/get",
|
|
"staffInfoDetail: {} | res.data || {}",
|
|
);
|
|
|
|
export const staffInfoAdd = declareRequest(
|
|
"staffInfoLoading",
|
|
"Post > @/safetyEval/org-personnel/save",
|
|
);
|
|
|
|
export const staffInfoEdit = declareRequest(
|
|
"staffInfoLoading",
|
|
"Post > @/safetyEval/org-personnel/modify",
|
|
);
|
|
|
|
export const staffInfoRemove = declareRequest(
|
|
"staffInfoLoading",
|
|
safeAction(async ({ id }) => apiPost("/safetyEval/org-personnel/delete", { data: asId(id) })),
|
|
);
|
|
|
|
export const staffInfoResetPassword = declareRequest(
|
|
"staffInfoLoading",
|
|
safeAction(async ({ id, resetPassword }) =>
|
|
apiPost("/safetyEval/org-personnel/reset-password", { data: {id, resetPassword} }),
|
|
),
|
|
);
|
|
|
|
export const queryBasicDisciplineMajor = declareRequest(
|
|
"staffInfoLoading",
|
|
"Get > /safetyEval/basic-discipline-major",
|
|
"basicDisciplineMajorList: [] | res.data || []",
|
|
); |