[fix bug] 用户管理新增 换掉选择角色和性别的组件
This commit is contained in:
@@ -83,7 +83,7 @@ module.exports = {
|
||||
expandAll: 'Expand All',
|
||||
mergeAll: 'Drop All',
|
||||
treeOperation: 'Tree Operation',
|
||||
creator: 'Created by',
|
||||
creator: 'Creator',
|
||||
sort: 'Order',
|
||||
address: 'Address',
|
||||
remarks: 'Comments',
|
||||
|
||||
@@ -65,12 +65,24 @@
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
v-show="!roleDisabled">
|
||||
<j-multi-select-tag
|
||||
<!--<j-multi-select-tag-->
|
||||
<!-- :disabled="disableSubmit"-->
|
||||
<!-- v-model="model.selectedroles"-->
|
||||
<!-- :options="rolesOptions"-->
|
||||
<!-- :placeholder="$t('pleaseSelect') + $t('role')">-->
|
||||
<!--</j-multi-select-tag>-->
|
||||
<a-select
|
||||
:placeholder="$t('pleaseSelect') + $t('role')"
|
||||
:disabled="disableSubmit"
|
||||
v-model="model.selectedroles"
|
||||
:options="rolesOptions"
|
||||
:placeholder="$t('pleaseSelect') + $t('role')">
|
||||
</j-multi-select-tag>
|
||||
mode="tags"
|
||||
:filter-option="filterOption"
|
||||
>
|
||||
<a-select-option v-for="item in rolesOptions" :key="item.value" :value="item.label">
|
||||
{{ item.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
|
||||
<!--部门分配-->
|
||||
@@ -128,13 +140,21 @@
|
||||
<!--</a-form-model-item>-->
|
||||
|
||||
<a-form-model-item :label="$t('user.gender')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select v-model="model.sex"
|
||||
:placeholder="disableSubmit ? '' : $t('pleaseSelect') + $t('user.gender')"
|
||||
:getPopupContainer="(target) => target.parentNode"
|
||||
:disabled="disableSubmit">
|
||||
<a-select-option :value="1">{{ $t('user.male') }}</a-select-option>
|
||||
<a-select-option :value="2">{{ $t('user.female') }}</a-select-option>
|
||||
</a-select>
|
||||
<j-dict-select-tag
|
||||
:placeholder="disableSubmit ? '' : $t('pleaseSelect') + $t('user.gender')"
|
||||
:getPopupContainer="(target) => target.parentNode"
|
||||
:disabled="disableSubmit"
|
||||
v-model="model.sex"
|
||||
dict-code="sex"
|
||||
>
|
||||
</j-dict-select-tag>
|
||||
<!--<a-select v-model="model.sex"-->
|
||||
<!-- :placeholder="disableSubmit ? '' : $t('pleaseSelect') + $t('user.gender')"-->
|
||||
<!-- :getPopupContainer="(target) => target.parentNode"-->
|
||||
<!-- :disabled="disableSubmit">-->
|
||||
<!-- <a-select-option :value="1">{{ $t('user.male') }}</a-select-option>-->
|
||||
<!-- <a-select-option :value="2">{{ $t('user.female') }}</a-select-option>-->
|
||||
<!--</a-select>-->
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item :label="$t('user.mailbox')" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
|
||||
@@ -270,6 +290,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
filterOption (input, option) {
|
||||
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
add () {
|
||||
this.refresh()
|
||||
this.validatorRules.phone = [{ validator: this.validatePhone }]
|
||||
@@ -283,7 +306,7 @@ export default {
|
||||
// 根据屏幕宽度自适应抽屉宽度
|
||||
this.resetScreenSize()
|
||||
that.model = Object.assign({}, {
|
||||
selectedroles: '',
|
||||
selectedroles: undefined,
|
||||
selecteddeparts: ''
|
||||
}, record)
|
||||
// 身份为上级显示负责部门,否则不显示
|
||||
|
||||
Reference in New Issue
Block a user