fix: user rights module clicks the add button without loading the tenant data (#1451)

pull/1454/head
Dmego 10 months ago committed by GitHub
parent cf3c26c012
commit 4320aac82f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,7 +25,7 @@
<span>{{ temp.role }}</span>
</el-form-item>
<el-form-item :label="$t('report.tenants')" label-width="120px">
<span></span>
<span>{{ temp.tempResources }}</span>
</el-form-item>
<el-form-item :label="$t('common.createTime')" label-width="120px">
<span> {{ temp.gmtCreate }}</span>

@ -174,6 +174,7 @@ export default {
password: '',
permission: '',
resources: [],
tempResources: [],
},
resetTemp() {
this.temp = {
@ -183,6 +184,7 @@ export default {
password: '',
permission: '',
resources: [],
tempResources: [],
}
},
};
@ -229,6 +231,14 @@ export default {
createData() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
let resources = [];
for (let i = 0; i < this.temp.tempResources.length; i++) {
resources.push({
resource: this.temp.tempResources[i],
action: 'rw',
});
}
this.temp.resources = resources;
user.createUser(this.temp).then(() => {
this.fetchData();
this.dialogFormVisible = false;

Loading…
Cancel
Save