修改文档库人员选择显示的问题

This commit is contained in:
qq787203167
2022-04-26 15:01:37 +08:00
parent e3b6943c80
commit 38802154d3
2 changed files with 30 additions and 7 deletions
@@ -23,7 +23,7 @@
@close="handleCancel" @close="handleCancel"
:visible="visible" :visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;"> style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-input-search style="margin-bottom: 8px":placeholder="$t('NodeQuickLookup')" <a-input-search style="margin-bottom: 8px" :placeholder="$t('NodeQuickLookup')"
v-model="searchModel" @search="onSearch"/> v-model="searchModel" @search="onSearch"/>
<div class="drawer-content"> <div class="drawer-content">
<a-tree <a-tree
@@ -68,9 +68,9 @@
departId: '', departId: '',
selectedKey: [], selectedKey: [],
userIds: [], userIds: [],
searchModel:'', searchModel: '',
defaultExpandedKeys: [], defaultExpandedKeys: [],
defaultCheckedKeys: [], defaultCheckedKeys: []
} }
}, },
mounted() { mounted() {
@@ -167,9 +167,32 @@
if (res.success) { if (res.success) {
this.gData = res.result this.gData = res.result
this.defaultExpandedKeys = [this.departId] this.defaultExpandedKeys = [this.departId]
this.defaultCheckedKeys = this.personneQuery[this.query.db_field_name + '_id'] ? this.personneQuery[this.query.db_field_name + '_id'].split(',') : [] if (this.personneQuery[this.query.db_field_name + '_id']) {
this.selectedKey = this.personneQuery[this.query.db_field_name + '_id'] ? this.personneQuery[this.query.db_field_name + '_id'].split(',') : [] this.defaultCheckedKeys = this.personneQuery[this.query.db_field_name + '_id'].split(',')
console.log(this.defaultCheckedKeys) this.selectedKey = this.personneQuery[this.query.db_field_name + '_id'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) {
this.defaultCheckedKeys = this.personneQuery[this.query.db_field_name].split(',')
this.selectedKey = this.personneQuery[this.query.db_field_name].split(',')
} else {
this.defaultCheckedKeys = []
this.selectedKey = []
}
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.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 = []
}
console.log(this.userIds)
console.log(this.userName)
this.treeVisible = true this.treeVisible = true
} else { } else {
this.gData = [] this.gData = []
@@ -52,7 +52,7 @@
}, },
{ {
title: this.$t('Operator'), title: this.$t('Operator'),
dataIndex: 'Operator', dataIndex: 'assignee',
align: 'center' align: 'center'
}, },
{ {