人员管理用户类型过滤
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-08-29 15:36:41 +08:00
parent fe3d30bfcb
commit 6654981721
1 changed files with 5 additions and 8 deletions

View File

@ -14,11 +14,7 @@
<!-- 用户类型 --> <!-- 用户类型 -->
<el-form-item :label="$t('trials:staff:table:userType')"> <el-form-item :label="$t('trials:staff:table:userType')">
<el-select v-model="listQuery.UserTypeId" clearable class="mr"> <el-select v-model="listQuery.UserTypeId" clearable class="mr">
<el-option v-for="item of userTypeOptions" v-show="item.UserTypeEnum !== 8 && <el-option v-for="item of userTypeOptions" :key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
item.UserTypeEnum !== 31 &&
item.UserTypeEnum !== 26 &&
item.UserTypeEnum !== 27
" :key="item.Id" :label="item.UserTypeShortName" :value="item.Id">
<span>{{ item.UserType }}</span> <span>{{ item.UserType }}</span>
</el-option> </el-option>
</el-select> </el-select>
@ -580,19 +576,20 @@ export default {
getTrialUserTypeList().then((res) => { getTrialUserTypeList().then((res) => {
let arr = []; let arr = [];
if (this.hasPermi(["role:admin"])) { if (this.hasPermi(["role:admin"])) {
arr = [1]; arr = [1, 35];
} }
if (this.hasPermi(["role:oa"])) { if (this.hasPermi(["role:oa"])) {
arr = [1, 2]; arr = [1, 2, 35];
} }
if (this.hasPermi(["role:pm"])) { if (this.hasPermi(["role:pm"])) {
arr = [1, 2, 14]; arr = [1, 2, 14, 35];
} }
this.userTypeOptions = res.Result.map((item) => { this.userTypeOptions = res.Result.map((item) => {
if (!arr.includes(item.UserTypeEnum)) { if (!arr.includes(item.UserTypeEnum)) {
return item; return item;
} }
}).filter((item) => item); }).filter((item) => item);
console.log(this.userTypeOptions, 'this.userTypeOptions')
}) })
}, },
}, },