feat(expense-management): 优化项目名称远程搜索功能
- 在项目需求概览页面添加主项目列表缓存到本地存储 -重构费用管理模块中项目名称远程搜索方法,提高代码复用性 - 优化主项目和子项目名称的加载和搜索逻辑
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user