部门增删改查

This commit is contained in:
cuijiawang 2025-09-22 11:30:15 +08:00
parent 68f31e671c
commit f739e52789
3 changed files with 7 additions and 5 deletions

View File

@ -59,19 +59,22 @@ export const addDeptApi = (data: DeptRequest) => {
/** 部门详情 */
export const getDeptInfoApi = (deptId: string) => {
return http.request<ResponseData<DeptDTO>>("get", `/system/dept/${deptId}`);
return http.request<ResponseData<DeptDTO>>(
"get",
`/system/dept/details/${deptId}`
);
};
/** 修改部门 */
export const updateDeptApi = (deptId: string, data: DeptRequest) => {
return http.request<ResponseData<void>>("put", `/system/dept/${deptId}`, {
return http.request<ResponseData<void>>("post", `/system/dept/${deptId}`, {
data
});
};
/** 删除部门 */
export const deleteDeptApi = (deptId: string) => {
return http.request<ResponseData<void>>("delete", `/system/dept/${deptId}`);
return http.request<ResponseData<void>>("post", `/system/dept/del/${deptId}`);
};
/** 获取部门树级结构 */

View File

@ -71,7 +71,7 @@ const {
</el-form>
<PureTableBar
title="部门列表(仅演示,操作后不生效)"
title="部门列表"
:columns="columns"
:tableRef="tableRef?.getTableRef()"
@refresh="onSearch"

View File

@ -35,7 +35,6 @@ const opType = ref<"add" | "update">("add");
const modalVisible = ref(false);
const opRow = ref<RoleDTO>();
async function openDialog(type: "add" | "update", row?: RoleDTO) {
debugger;
try {
await getMenuTree();
if (row) {