feat(expense-management): 优化项目名称远程搜索功能

- 在项目需求概览页面添加主项目列表缓存到本地存储
-重构费用管理模块中项目名称远程搜索方法,提高代码复用性
- 优化主项目和子项目名称的加载和搜索逻辑
This commit is contained in:
dj
2025-08-04 10:02:50 +08:00
parent 4229cb9d74
commit a26088a756
4 changed files with 119 additions and 85 deletions

View File

@@ -569,6 +569,7 @@ const changeCollectData = () => {
}
const filterMasterProject= (val)=>{
masterProjectList.value= JSON.parse(localStorage.getItem("projectOption"))
if(val){
getProjectList(val)
}
@@ -598,6 +599,10 @@ const getProjectList = (val) => {
masterProjectList.value = res.data.filter(item => item.value!=route.query.projectId)
}else{
masterProjectList.value = res.data
if(!val){
localStorage.setItem("projectOption", JSON.stringify(res.data))
}
}
}
})