修改禅道已知问题

This commit is contained in:
qq787203167
2022-08-24 14:38:32 +08:00
parent b413153c8a
commit e5ca6d6ddc
@@ -89,7 +89,7 @@
this.searchModel = ''
this.userIds = []
this.userName = []
this.queryDepartUserTreeList()
this.queryDepartUserTreeList(1)
this.visible = true
},
standardDelete() {
@@ -146,7 +146,7 @@
})
})
}
if (this.userName.length > 0){
if (this.userName.length > 0) {
for (let i = 0; i < this.userName.length; i++) {
for (let j = i + 1; j < this.userName.length; j++) {
if (this.userName[i] == this.userName[j]) {
@@ -171,7 +171,6 @@
}
let userIds = JSON.parse(JSON.stringify(this.userIds))
let userName = JSON.parse(JSON.stringify(this.userName))
console.log(userName)
this.$emit('input', userName.join(','))
this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript)
this.visible = false
@@ -195,7 +194,8 @@
if (e) {
this.getUserAndDepart()
} else {
this.queryDepartUserTreeList()
this.treeVisible = false
this.queryDepartUserTreeList(2)
}
},
getUserAndDepart() {
@@ -214,12 +214,12 @@
if (this.departId == val.node.value) {
} else {
this.departId = val.node.value
this.queryDepartUserTreeList()
this.queryDepartUserTreeList(2)
}
}
}
},
queryDepartUserTreeList() {
queryDepartUserTreeList(num) {
let gData = JSON.parse(JSON.stringify(this.gData))
if (gData && gData.length > 0) {
gData = JSON.stringify(gData)
@@ -236,32 +236,34 @@
if (res.success) {
this.gData = res.result
this.defaultExpandedKeys = [this.departId]
if (this.userName && this.userName.length == 0) {
if (this.personneQuery[this.query.db_field_name + 'Name']) {
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) {
this.userName = this.personneQuery[this.query.db_field_name].split(',')
} else {
this.userName = []
if (num == 1) {
if (this.userName && this.userName.length == 0) {
if (this.personneQuery[this.query.db_field_name + 'Name']) {
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) {
this.userName = this.personneQuery[this.query.db_field_name].split(',')
} else {
this.userName = []
}
}
}
if (this.userIds && this.userIds.length == 0) {
if (this.personneQuery[this.query.db_field_name + '_id']) {
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) {
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
} else {
this.userIds = []
if (this.userIds && this.userIds.length == 0) {
if (this.personneQuery[this.query.db_field_name + '_id']) {
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) {
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
} else {
this.userIds = []
}
}
}
this.defaultCheckedKeys = this.userIds
this.defaultCheckedKeysName = []
if (this.defaultCheckedKeys.length > 0) {
for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
this.defaultCheckedKeysName.push({
id: this.defaultCheckedKeys[i],
name: this.userName[i]
})
this.defaultCheckedKeys = this.userIds
this.defaultCheckedKeysName = []
if (this.defaultCheckedKeys.length > 0) {
for (let i = 0; i < this.defaultCheckedKeys.length; i++) {
this.defaultCheckedKeysName.push({
id: this.defaultCheckedKeys[i],
name: this.userName[i]
})
}
}
}
this.treeVisible = true