修改bug 56515 机构管理-工作组-新增,选择工作组组长和组员的时候 点击查询按钮现在是查到部门,应该查询到人

This commit is contained in:
hanshaozhuang
2022-07-15 15:30:04 +08:00
parent aba7e0e6b1
commit c6349bffe5
+30 -9
View File
@@ -16,14 +16,15 @@
<el-input
v-model="filterText"
placeholder="请输入姓名"
@keyup.enter.native="searchChange"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-primary" type="primary" style="margin-top: 14px;" size="medium" @click="changeInput(filterText)">
<el-button class="common-button-primary" type="primary" style="margin-top: 14px;" size="medium" @click="searchChange">
查询
</el-button>
</el-form-item>
</el-form>
</el-form>
<el-tree
v-if="open1 && isVisible2"
node-key="id"
@@ -57,6 +58,7 @@
:props="defaultProps"
@check-change="checkChange2"
:default-checked-keys="nodeList"
:default-expanded-keys="defaultKey"
highlight-current
check-strictly
@check="drawerCheck"
@@ -132,20 +134,39 @@ export default {
}
},
methods: {
changeInput:debounce(function (val) {
if (val.length) {
searchChange(){
if (this.filterText.length) {
this.open1 = false
this.treeLoading = true
this.$http.get('SarInstitution/institution/institutionAndUser', {
userName: val
this.defaultKey = []
this.$http.get('SarInstitution/institution/getNextTwo', {
userName: this.filterText
}, {}, res => {
this.treeData1 = res.data
this.treeData1 = res
this.treeData1.forEach(item => {
this.defaultKey.push(item.id)
})
this.treeLoading = false
})
// this.$http.get('SarInstitution/institution/institutionAndUser', {
// userName: this.filterText
// }, {}, res => {
// this.treeData1 = res.data
// this.treeData1.forEach(item => {
// this.defaultKey.push(item.id)
// })
// console.log(1);
// this.getChildren()
// this.treeLoading = false
// })
} else {
this.open1 = true
}
}),
},
checkChange2 (row, type, c) {
if (this.checkBox) {
} else {