fix(项目设置):修复项目设置和系统设置中添加成员搜索结果不符问题

--bug=1026374 --user=王旭 【项目设置】添加项目成员字-字母搜索结果不符 https://www.tapd.cn/55049933/s/1376339
This commit is contained in:
WangXu10 2023-05-29 10:18:17 +08:00 committed by fit2-zhao
parent ef06912208
commit f43435143f
4 changed files with 4 additions and 5 deletions

View File

@ -137,7 +137,7 @@ export default {
userFilter(val) {
if (val) {
this.userList = this.userListCopy.filter((item) => {
if (!!~item.id.indexOf(val) || (item.name && !!~item.name.indexOf(val))) {
if (item.name && !!~item.name.indexOf(val)) {
return true;
}
})

View File

@ -341,7 +341,7 @@ export default {
userFilter(val) {
if (val) {
this.users = this.userListCopy.filter((item) => {
if (!!~item.id.indexOf(val) || (item.name && !!~item.name.indexOf(val))) {
if (item.name && !!~item.name.indexOf(val)) {
return true;
}
})

View File

@ -177,8 +177,7 @@ export default {
},
createFilter(queryString) {
return item => {
return (item.id.toLowerCase().indexOf(queryString.toLowerCase()) !== -1
|| (item.name && item.name.toLowerCase().indexOf(queryString.toLowerCase()) !== -1));
return (item.name && item.name.toLowerCase().indexOf(queryString.toLowerCase()) !== -1);
};
},
resetUserOption(val) {

View File

@ -375,7 +375,7 @@ export default {
this.handleResourceOption(queryString ? this.sourceDataCopy.filter(this.createFilter(queryString)) : this.sourceDataCopy);
},
createFilter(queryString) {
return item => (item.name && item.name.toLowerCase().indexOf(queryString.toLowerCase()) !== -1) || (item.id && item.id.indexOf(queryString)!== -1);
return item => (item.name && item.name.toLowerCase().indexOf(queryString.toLowerCase()) !== -1);
},
resetUserOption(val) {
if (val) {