diff --git a/src/components/SelectTree/Department/Gwj/index.js b/src/components/SelectTree/Department/Gwj/index.js index 8b6b3ac..13b1833 100644 --- a/src/components/SelectTree/Department/Gwj/index.js +++ b/src/components/SelectTree/Department/Gwj/index.js @@ -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); };