Commit fa547c2f authored by 张伯涛's avatar 张伯涛

部门管理模块bug修改

parent 12bbe151
......@@ -23,8 +23,8 @@ enum Api {
listDeptExcludeChildApi = '/system/dept/list/exclude/',
}
/** 列表查询*/
export const getDeptList = () =>
defHttp.get<any>({ url: Api.DeptList });
export const getDeptList = (params: any) =>
defHttp.get<DeptListGetResultModel>({ url: Api.DeptList, params });
/** 部门状态修改*/
export const statusChange = (params: any) =>
......
......@@ -56,10 +56,15 @@
const [registerTable, { reload, expandAll,getForm }] = useTable({
title: '部门管理列表',
api: async (params) => {
const response = await getDeptList(params);
//进行处理数据
const transformedData = transformData(response.data); // 定义一个函数transformData来做你需要的数据转换
return { ...response, data: transformedData };
if(params.deptName === undefined && params.flag === undefined){
//进行处理数据
const response = await getDeptList(params);
const transformedData = transformData(response.data); // 定义一个函数transformData来做你需要的数据转换
return { ...response, data: transformedData };
}else {
const response = await getDeptList(params);
return { ...response, data: response.data };
}
},
columns,
formConfig: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment