|
@@ -272,6 +272,7 @@ export default {
|
|
|
async getTreeData () {
|
|
|
const result = await this.getQueryList(this.queryId)
|
|
|
if (result && result.length) {
|
|
|
+ this.arrs = []
|
|
|
// this.dataList = result
|
|
|
this.arrs.push(...result)
|
|
|
// this.options = result
|
|
@@ -279,6 +280,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleAdd () {
|
|
|
+ const datas = this.arrs.filter(item => item.user_group_name == '新建账号组')
|
|
|
+ if (datas && datas.length) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.arrs.push({ user_group_name: '新建账号组' })
|
|
|
this.type = 'add'
|
|
|
this.treeCheckId = null
|
|
|
this.tableData = []
|
|
@@ -360,12 +366,13 @@ export default {
|
|
|
let code = null
|
|
|
this.formInline.user_group_id = this.treeCheckId
|
|
|
const data = this.formInline
|
|
|
- if (this.type == 'add') {
|
|
|
- code = await this.getChangeList(this.queryId, data, 1, 'user_group_id')
|
|
|
- } else {
|
|
|
+ console.log(this.type)
|
|
|
+ if (this.type = 'edit') {
|
|
|
const id = this.formInline.user_group_id
|
|
|
if (id) {
|
|
|
code = await this.getChangeList(this.queryId, data, 2,'user_group_id')
|
|
|
+ } else {
|
|
|
+ code = await this.getChangeList(this.queryId, data, 1)
|
|
|
}
|
|
|
}
|
|
|
if (code) {
|