优化DepartmentSelectTree
parent
cd87ae835f
commit
b491aed263
|
|
@ -29,14 +29,24 @@ function DepartmentSelectTree(props) {
|
|||
}
|
||||
|
||||
let requestUrl = "";
|
||||
if (searchType === "current")
|
||||
let actualParams = params;
|
||||
if (searchType === "current") {
|
||||
requestUrl = "/basicInfo/department/listTree";
|
||||
if (searchType === "all")
|
||||
actualParams.inType = undefined;
|
||||
actualParams.enterpriseType = undefined;
|
||||
}
|
||||
if (searchType === "all") {
|
||||
requestUrl = "/basicInfo/department/listAllTree";
|
||||
if (searchType === "inType")
|
||||
actualParams.inType = undefined;
|
||||
actualParams.enterpriseType = undefined;
|
||||
}
|
||||
if (searchType === "inType") {
|
||||
requestUrl = "/basicInfo/department/listAllTreeByCorpType";
|
||||
actualParams.eqCorpinfoId = undefined;
|
||||
actualParams.eqParentId = undefined;
|
||||
}
|
||||
|
||||
const { data } = await request(requestUrl, "post", params);
|
||||
const { data } = await request(requestUrl, "post", actualParams);
|
||||
setTreeData(data);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue