refactor(系统设置): 下拉列表组件中增加输入筛选功能

This commit is contained in:
fit2-zhao 2020-10-13 16:09:54 +08:00
parent 15af40cc6f
commit 9118cb3404
3 changed files with 18 additions and 18 deletions

View File

@ -101,7 +101,7 @@
<el-form :model="memberForm" ref="form" :rules="orgMemberRule" label-position="right" label-width="100px" <el-form :model="memberForm" ref="form" :rules="orgMemberRule" label-position="right" label-width="100px"
size="small"> size="small">
<el-form-item :label="$t('commons.member')" prop="userIds"> <el-form-item :label="$t('commons.member')" prop="userIds">
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" <el-select filterable v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')"
class="select-width"> class="select-width">
<el-option <el-option
v-for="item in memberForm.userList" v-for="item in memberForm.userList"
@ -114,7 +114,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('commons.role')" prop="roleIds"> <el-form-item :label="$t('commons.role')" prop="roleIds">
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')" <el-select filterable v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
class="select-width"> class="select-width">
<el-option <el-option
v-for="item in memberForm.roles" v-for="item in memberForm.roles"
@ -151,7 +151,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('commons.role')" prop="roleIds" <el-form-item :label="$t('commons.role')" prop="roleIds"
:rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}"> :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')" <el-select filterable v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
class="select-width"> class="select-width">
<el-option <el-option
v-for="item in memberForm.allroles" v-for="item in memberForm.allroles"

View File

@ -37,7 +37,7 @@
<el-input type="textarea" v-model="form.description"></el-input> <el-input type="textarea" v-model="form.description"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('workspace.organization_name')" prop="organizationId"> <el-form-item :label="$t('workspace.organization_name')" prop="organizationId">
<el-select v-model="form.organizationId" :placeholder="$t('organization.select_organization')" <el-select filterable v-model="form.organizationId" :placeholder="$t('organization.select_organization')"
class="select-width"> class="select-width">
<el-option <el-option
v-for="item in form.orgList" v-for="item in form.orgList"
@ -65,7 +65,7 @@
<el-input type="textarea" v-model="form.description"></el-input> <el-input type="textarea" v-model="form.description"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('workspace.organization_name')" prop="organizationId"> <el-form-item :label="$t('workspace.organization_name')" prop="organizationId">
<el-select v-model="form.organizationId" :placeholder="$t('organization.select_organization')" <el-select filterable v-model="form.organizationId" :placeholder="$t('organization.select_organization')"
class="select-width"> class="select-width">
<el-option <el-option
v-for="item in form.orgList1" v-for="item in form.orgList1"
@ -117,7 +117,7 @@
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px" <el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px"
size="small"> size="small">
<el-form-item :label="$t('commons.member')" prop="userIds"> <el-form-item :label="$t('commons.member')" prop="userIds">
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" <el-select filterable v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')"
class="select-width"> class="select-width">
<el-option <el-option
v-for="item in memberForm.userList" v-for="item in memberForm.userList"
@ -130,7 +130,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('commons.role')" prop="roleIds"> <el-form-item :label="$t('commons.role')" prop="roleIds">
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')" <el-select filterable v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
class="select-width"> class="select-width">
<el-option <el-option
v-for="item in memberForm.roles" v-for="item in memberForm.roles"
@ -166,7 +166,7 @@
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/> <el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}"> <el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')" <el-select filterable v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
class="select-width"> class="select-width">
<el-option <el-option
v-for="item in memberForm.allroles" v-for="item in memberForm.allroles"

View File

@ -74,7 +74,7 @@
:prop="'roles.' + index + '.id'" :prop="'roles.' + index + '.id'"
:rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}"
> >
<el-select v-model="role.id" :placeholder="$t('role.please_choose_role')"> <el-select filterable v-model="role.id" :placeholder="$t('role.please_choose_role')">
<el-option <el-option
v-for="item in activeRole(role)" v-for="item in activeRole(role)"
:key="item.id" :key="item.id"
@ -93,7 +93,7 @@
:prop="'roles.' + index + '.ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: $t('organization.select_organization'), trigger: 'change'}" :rules="{required: true, message: $t('organization.select_organization'), trigger: 'change'}"
> >
<el-select v-model="role.ids" :placeholder="$t('organization.select_organization')" multiple> <el-select filterable v-model="role.ids" :placeholder="$t('organization.select_organization')" multiple>
<el-option <el-option
v-for="item in form.orgList" v-for="item in form.orgList"
:key="item.id" :key="item.id"
@ -108,7 +108,7 @@
:prop="'roles.' + index + '.ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: $t('workspace.select'), trigger: 'change'}" :rules="{required: true, message: $t('workspace.select'), trigger: 'change'}"
> >
<el-select v-model="role.ids" :placeholder="$t('workspace.select')" multiple> <el-select filterable v-model="role.ids" :placeholder="$t('workspace.select')" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -123,7 +123,7 @@
:prop="'roles.' + index + '.ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: $t('workspace.select'), trigger: 'change'}" :rules="{required: true, message: $t('workspace.select'), trigger: 'change'}"
> >
<el-select v-model="role.ids" :placeholder="$t('workspace.select')" multiple> <el-select filterable v-model="role.ids" :placeholder="$t('workspace.select')" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -138,7 +138,7 @@
:prop="'roles.' + index + '.ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: $t('workspace.select'), trigger: 'change'}" :rules="{required: true, message: $t('workspace.select'), trigger: 'change'}"
> >
<el-select v-model="role.ids" :placeholder="$t('workspace.select')" multiple> <el-select filterable v-model="role.ids" :placeholder="$t('workspace.select')" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -187,7 +187,7 @@
:prop="'roles.' + index + '.id'" :prop="'roles.' + index + '.id'"
:rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}"
> >
<el-select v-model="role.id" :placeholder="$t('role.please_choose_role')" :disabled="!!role.id"> <el-select filterable v-model="role.id" :placeholder="$t('role.please_choose_role')" :disabled="!!role.id">
<el-option <el-option
v-for="item in activeRole(role)" v-for="item in activeRole(role)"
:key="item.id" :key="item.id"
@ -204,7 +204,7 @@
:prop="'roles.' + index + '.ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: $t('organization.select_organization'), trigger: 'change'}" :rules="{required: true, message: $t('organization.select_organization'), trigger: 'change'}"
> >
<el-select v-model="role.ids" :placeholder="$t('organization.select_organization')" multiple> <el-select filterable v-model="role.ids" :placeholder="$t('organization.select_organization')" multiple>
<el-option <el-option
v-for="item in form.orgList" v-for="item in form.orgList"
:key="item.id" :key="item.id"
@ -219,7 +219,7 @@
:prop="'roles.' + index + '.ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: $t('workspace.select'), trigger: 'change'}" :rules="{required: true, message: $t('workspace.select'), trigger: 'change'}"
> >
<el-select v-model="role.ids" :placeholder="$t('workspace.select')" multiple> <el-select filterable v-model="role.ids" :placeholder="$t('workspace.select')" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -234,7 +234,7 @@
:prop="'roles.' + index + '.ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: $t('workspace.select'), trigger: 'change'}" :rules="{required: true, message: $t('workspace.select'), trigger: 'change'}"
> >
<el-select v-model="role.ids" :placeholder="$t('workspace.select')" multiple> <el-select filterable v-model="role.ids" :placeholder="$t('workspace.select')" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"
@ -249,7 +249,7 @@
:prop="'roles.' + index + '.ids'" :prop="'roles.' + index + '.ids'"
:rules="{required: true, message: $t('workspace.select'), trigger: 'change'}" :rules="{required: true, message: $t('workspace.select'), trigger: 'change'}"
> >
<el-select v-model="role.ids" :placeholder="$t('workspace.select')" multiple> <el-select filterable v-model="role.ids" :placeholder="$t('workspace.select')" multiple>
<el-option <el-option
v-for="item in form.wsList" v-for="item in form.wsList"
:key="item.id" :key="item.id"