部门增删改查
This commit is contained in:
parent
68f31e671c
commit
f739e52789
@ -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}`);
|
||||
};
|
||||
|
||||
/** 获取部门树级结构 */
|
||||
|
||||
@ -71,7 +71,7 @@ const {
|
||||
</el-form>
|
||||
|
||||
<PureTableBar
|
||||
title="部门列表(仅演示,操作后不生效)"
|
||||
title="部门列表"
|
||||
:columns="columns"
|
||||
:tableRef="tableRef?.getTableRef()"
|
||||
@refresh="onSearch"
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user