From e8b72d77e5a25ea715c88b2e3282104299de8576 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Tue, 10 Feb 2026 10:04:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96DepartmentLeftTree=E5=92=8CDe?= =?UTF-8?q?partmentSelectTree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LeftTree/Department/Gwj/index.js | 16 ++++++++-------- .../SelectTree/Department/Gwj/index.js | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/components/LeftTree/Department/Gwj/index.js b/src/components/LeftTree/Department/Gwj/index.js index 0f5423e..71c6c72 100644 --- a/src/components/LeftTree/Department/Gwj/index.js +++ b/src/components/LeftTree/Department/Gwj/index.js @@ -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]; } diff --git a/src/components/SelectTree/Department/Gwj/index.js b/src/components/SelectTree/Department/Gwj/index.js index 068ac56..ffa9f57 100644 --- a/src/components/SelectTree/Department/Gwj/index.js +++ b/src/components/SelectTree/Department/Gwj/index.js @@ -22,7 +22,7 @@ function DepartmentSelectTree(props) { const getData = async () => { setTreeData([]); - + // 生成缓存键 const paramsStr = JSON.stringify(params); const cacheKey = `${searchType}_${paramsStr}`; @@ -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]; }