forked from github/dataease
Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
7198971263
@ -2,7 +2,7 @@
|
|||||||
<layout-content :header="formType=='add' ? $t('user.create') : $t('user.modify')" back-name="system-user">
|
<layout-content :header="formType=='add' ? $t('user.create') : $t('user.modify')" back-name="system-user">
|
||||||
<el-form ref="createUserForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
|
<el-form ref="createUserForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
|
||||||
<el-form-item label="ID" prop="username">
|
<el-form-item label="ID" prop="username">
|
||||||
<el-input v-model="form.username" />
|
<el-input v-model="form.username" :disabled="formType !== 'add'" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||||
<el-input v-model="form.phone" />
|
<el-input v-model="form.phone" />
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.status')">
|
<el-form-item :label="$t('commons.status')">
|
||||||
<el-radio-group v-model="form.enabled" style="width: 140px">
|
<el-radio-group v-model="form.enabled" :disabled="formType !== 'add' && form.isAdmin" style="width: 140px">
|
||||||
<el-radio :label="1">{{ $t('commons.enable') }}</el-radio>
|
<el-radio :label="1">{{ $t('commons.enable') }}</el-radio>
|
||||||
<el-radio :label="0">{{ $t('commons.disable') }}</el-radio>
|
<el-radio :label="0">{{ $t('commons.disable') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -47,6 +47,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="form.roleIds"
|
v-model="form.roleIds"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
:disabled="formType !== 'add' && form.isAdmin"
|
||||||
multiple
|
multiple
|
||||||
:placeholder="$t('commons.please_select')"
|
:placeholder="$t('commons.please_select')"
|
||||||
@remove-tag="deleteTag"
|
@remove-tag="deleteTag"
|
||||||
|
@ -187,6 +187,7 @@ export default {
|
|||||||
show: this.checkPermission(['user:edit'])
|
show: this.checkPermission(['user:edit'])
|
||||||
}, {
|
}, {
|
||||||
label: this.$t('commons.delete'), icon: 'el-icon-delete', type: 'danger', click: this.del,
|
label: this.$t('commons.delete'), icon: 'el-icon-delete', type: 'danger', click: this.del,
|
||||||
|
disabled: this.btnDisabled,
|
||||||
show: this.checkPermission(['user:del'])
|
show: this.checkPermission(['user:del'])
|
||||||
}, {
|
}, {
|
||||||
label: this.$t('member.edit_password'), icon: 'el-icon-s-tools', type: 'success', click: this.editPassword,
|
label: this.$t('member.edit_password'), icon: 'el-icon-s-tools', type: 'success', click: this.editPassword,
|
||||||
@ -489,6 +490,9 @@ export default {
|
|||||||
allRoles().then(res => {
|
allRoles().then(res => {
|
||||||
this.roles = res.data
|
this.roles = res.data
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
btnDisabled(row) {
|
||||||
|
return row.userId === 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user