diff --git a/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue b/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue index 8ee6d57..6f40d40 100644 --- a/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue +++ b/src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue @@ -431,21 +431,17 @@ } }) }, - copyUserRoleList:{ - get(){ - let arr = this.userRoleList.filter(item=>{ - if (!!this.filterParams.username && !!this.filterParams.userDisplay){ - return item.username.includes(this.filterParams.username) && item.userDisplay.includes(this.filterParams.userDisplay) - } - if (!!this.filterParams.username){ - return item.username.includes(this.filterParams.username) - } - if (!!this.filterParams.userDisplay){ - return item.userDisplay.includes(this.filterParams.userDisplay) - } - return true - }) - return arr + copyUserRoleList: { + get() { + return this.userRoleList.filter(item => { + const usernameMatch = this.filterParams.username + ? item.username.toLowerCase().includes(this.filterParams.username.toLowerCase()) + : true; + const userDisplayMatch = this.filterParams.userDisplay + ? item.userDisplay.toLowerCase().includes(this.filterParams.userDisplay.toLowerCase()) + : true; + return usernameMatch && userDisplayMatch; + }); } } },