优化:优化后端 CRUD 公共组件(移除 BaseService 中无用的默认实现,抽取 BaseRequest 基类来方便使用分组校验),并同步调整部门管理 API

This commit is contained in:
2023-01-30 22:35:17 +08:00
parent 2c6bef91e8
commit 83b01c2e4f
18 changed files with 144 additions and 111 deletions

View File

@@ -281,7 +281,7 @@
DeptRecord,
DeptParams,
createDept,
updateDeptStatus,
updateDept,
deleteDept,
} from '@/api/system/dept';
import getDeptTree from '@/api/common';
@@ -405,7 +405,7 @@
// 改变状态
const handleChangeStatus = async (record: DeptRecord, val: number) => {
if (record.deptId) {
const res = await updateDeptStatus([record.deptId], { status: val });
const res = await updateDept({ deptId: record.deptId, status: val });
if (res.success) {
Message.success(res.msg);
} else {