修改推送搜索接口
This commit is contained in:
@@ -10,7 +10,10 @@
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-input-search style="margin-bottom: 8px" v-model="searchModel" :placeholder="$t('NodeQuickLookup')" @change="onChange"/>
|
||||
<a-input-search style="margin-bottom: 8px" v-model="searchModel"
|
||||
@search="onSearch"
|
||||
allowClear
|
||||
:placeholder="$t('NodeQuickLookup')"/>
|
||||
<div class="drawer-content">
|
||||
<a-tree
|
||||
v-if="visibleTree"
|
||||
@@ -49,7 +52,7 @@
|
||||
data() {
|
||||
return {
|
||||
gData: [],
|
||||
searchModel:"",
|
||||
searchModel: '',
|
||||
autoExpandParent: true,
|
||||
expandedKeys: [],
|
||||
visible: false,
|
||||
@@ -81,11 +84,13 @@
|
||||
this.selectedKey = selectedKeys
|
||||
},
|
||||
onExpand(selectedKeys, val) {
|
||||
if (val.expanded) {
|
||||
if (this.departId == val.node.value) {
|
||||
} else {
|
||||
this.departId = val.node.value
|
||||
this.queryDepartUserTreeList()
|
||||
if (this.searchModel != '') {
|
||||
if (val.expanded) {
|
||||
if (this.departId == val.node.value) {
|
||||
} else {
|
||||
this.departId = val.node.value
|
||||
this.queryDepartUserTreeList()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -93,7 +98,6 @@
|
||||
this.visible = false
|
||||
this.visibleTree = false
|
||||
},
|
||||
//String departIds,String userIds,String documentIds
|
||||
handleSubmit() {
|
||||
let query = {
|
||||
documentIds: this.tableKey.join(','),
|
||||
@@ -117,8 +121,22 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onChange(e) {
|
||||
const value = e.target.value
|
||||
onSearch(e) {
|
||||
console.log(e)
|
||||
if (e) {
|
||||
this.getUserAndDepart()
|
||||
} else {
|
||||
this.queryDepartUserTreeList()
|
||||
}
|
||||
},
|
||||
getUserAndDepart() {
|
||||
getAction('sys/user/getUserAndDepart', { name: this.searchModel }).then((res) => {
|
||||
if (res.success) {
|
||||
this.gData = res || []
|
||||
} else {
|
||||
this.gData = []
|
||||
}
|
||||
})
|
||||
},
|
||||
queryDepartUserTreeList() {
|
||||
let gData = JSON.parse(JSON.stringify(this.gData))
|
||||
|
||||
Reference in New Issue
Block a user