优化DepartmentLeftTree和DepartmentSelectTree
parent
10083fa9f8
commit
e8b72d77e5
|
|
@ -19,20 +19,20 @@ function DepartmentLeftTree(props) {
|
|||
const actualParams = { ...params, time: new Date().getTime() };
|
||||
if (searchType === "current") {
|
||||
requestUrl = "/basicInfo/department/listTree";
|
||||
actualParams.inType = undefined;
|
||||
actualParams.enterpriseType = undefined;
|
||||
delete actualParams.inType;
|
||||
delete actualParams.enterpriseType;
|
||||
}
|
||||
if (searchType === "all") {
|
||||
requestUrl = "/basicInfo/department/listAllTree";
|
||||
actualParams.inType = undefined;
|
||||
actualParams.enterpriseType = undefined;
|
||||
actualParams.eqCorpinfoId = undefined;
|
||||
actualParams.eqParentId = undefined;
|
||||
delete actualParams.inType;
|
||||
delete actualParams.enterpriseType;
|
||||
delete actualParams.eqCorpinfoId;
|
||||
delete actualParams.eqParentId;
|
||||
}
|
||||
if (searchType === "inType") {
|
||||
requestUrl = "/basicInfo/department/listAllTreeByCorpType";
|
||||
actualParams.eqCorpinfoId = undefined;
|
||||
actualParams.eqParentId = undefined;
|
||||
delete actualParams.eqCorpinfoId;
|
||||
delete actualParams.eqParentId;
|
||||
if (actualParams.enterpriseType && !Array.isArray(actualParams.enterpriseType)) {
|
||||
actualParams.enterpriseType = [actualParams.enterpriseType];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,20 +44,20 @@ function DepartmentSelectTree(props) {
|
|||
const actualParams = { ...params, time: new Date().getTime() };
|
||||
if (searchType === "current") {
|
||||
requestUrl = "/basicInfo/department/listTree";
|
||||
actualParams.inType = undefined;
|
||||
actualParams.enterpriseType = undefined;
|
||||
delete actualParams.inType;
|
||||
delete actualParams.enterpriseType;
|
||||
}
|
||||
if (searchType === "all") {
|
||||
requestUrl = "/basicInfo/department/listAllTree";
|
||||
actualParams.inType = undefined;
|
||||
actualParams.enterpriseType = undefined;
|
||||
actualParams.eqCorpinfoId = undefined;
|
||||
actualParams.eqParentId = undefined;
|
||||
delete actualParams.inType;
|
||||
delete actualParams.enterpriseType;
|
||||
delete actualParams.eqCorpinfoId;
|
||||
delete actualParams.eqParentId;
|
||||
}
|
||||
if (searchType === "inType") {
|
||||
requestUrl = "/basicInfo/department/listAllTreeByCorpType";
|
||||
actualParams.eqCorpinfoId = undefined;
|
||||
actualParams.eqParentId = undefined;
|
||||
delete actualParams.eqCorpinfoId;
|
||||
delete actualParams.eqParentId;
|
||||
if (actualParams.enterpriseType && !Array.isArray(actualParams.enterpriseType)) {
|
||||
actualParams.enterpriseType = [actualParams.enterpriseType];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue