修改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 <el-input
v-model="filterText" v-model="filterText"
placeholder="请输入姓名" placeholder="请输入姓名"
@keyup.enter.native="searchChange"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="" class="search-item btn-box"> <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-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tree <el-tree
v-if="open1 && isVisible2" v-if="open1 && isVisible2"
node-key="id" node-key="id"
@@ -57,6 +58,7 @@
:props="defaultProps" :props="defaultProps"
@check-change="checkChange2" @check-change="checkChange2"
:default-checked-keys="nodeList" :default-checked-keys="nodeList"
:default-expanded-keys="defaultKey"
highlight-current highlight-current
check-strictly check-strictly
@check="drawerCheck" @check="drawerCheck"
@@ -132,20 +134,39 @@ export default {
} }
}, },
methods: { methods: {
changeInput:debounce(function (val) { searchChange(){
if (val.length) { if (this.filterText.length) {
this.open1 = false this.open1 = false
this.treeLoading = true this.treeLoading = true
this.$http.get('SarInstitution/institution/institutionAndUser', { this.defaultKey = []
userName: val this.$http.get('SarInstitution/institution/getNextTwo', {
userName: this.filterText
}, {}, res => { }, {}, res => {
this.treeData1 = res.data this.treeData1 = res
this.treeData1.forEach(item => {
this.defaultKey.push(item.id)
})
this.treeLoading = false 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 { } else {
this.open1 = true this.open1 = true
} }
}), },
checkChange2 (row, type, c) { checkChange2 (row, type, c) {
if (this.checkBox) { if (this.checkBox) {
} else { } else {