|
|
@ -174,6 +174,7 @@ export default {
|
|
|
|
password: '',
|
|
|
|
password: '',
|
|
|
|
permission: '',
|
|
|
|
permission: '',
|
|
|
|
resources: [],
|
|
|
|
resources: [],
|
|
|
|
|
|
|
|
tempResources: [],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
resetTemp() {
|
|
|
|
resetTemp() {
|
|
|
|
this.temp = {
|
|
|
|
this.temp = {
|
|
|
@ -183,6 +184,7 @@ export default {
|
|
|
|
password: '',
|
|
|
|
password: '',
|
|
|
|
permission: '',
|
|
|
|
permission: '',
|
|
|
|
resources: [],
|
|
|
|
resources: [],
|
|
|
|
|
|
|
|
tempResources: [],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -229,6 +231,14 @@ export default {
|
|
|
|
createData() {
|
|
|
|
createData() {
|
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
|
if (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(() => {
|
|
|
|
user.createUser(this.temp).then(() => {
|
|
|
|
this.fetchData();
|
|
|
|
this.fetchData();
|
|
|
|
this.dialogFormVisible = false;
|
|
|
|
this.dialogFormVisible = false;
|
|
|
|