|
@@ -136,7 +136,7 @@ export default {
|
|
|
user_group_id: 0,
|
|
|
user_group_name: '全部账号组',
|
|
|
user_group_status: true,
|
|
|
- children: []
|
|
|
+ children: [],
|
|
|
}
|
|
|
],
|
|
|
treeCheckId: '',
|
|
@@ -200,13 +200,18 @@ export default {
|
|
|
this.clearForm()
|
|
|
},
|
|
|
async handleNodeClick (data) {
|
|
|
- this.treeCheckId = data.user_group_id
|
|
|
- this.formInline = _.cloneDeep(data)
|
|
|
- this.type = 'edit'
|
|
|
- const result = await this.getQuery(SERVICE_ID.getUserTableId, false, {
|
|
|
- user_group_id: data.user_group_id
|
|
|
- })
|
|
|
- this.tableData = result
|
|
|
+ if (data.user_group_id) {
|
|
|
+ this.treeCheckId = data.user_group_id
|
|
|
+ this.formInline = _.cloneDeep(data)
|
|
|
+ this.type = 'edit'
|
|
|
+ const result = await this.getQuery(SERVICE_ID.getUserTableId, false, {
|
|
|
+ user_group_id: data.user_group_id
|
|
|
+ })
|
|
|
+ this.tableData = result
|
|
|
+ } else {
|
|
|
+ this.formInline.user_group_name = ''
|
|
|
+ this.formInline.user_group_comment = ''
|
|
|
+ }
|
|
|
},
|
|
|
//清空表单
|
|
|
clearForm () {
|