工作台搜索切换搜索tab时清除上次搜索残留的推荐内容

prod
吕天方 8 months ago
parent 38c918ca3e
commit cfa2b3760c

@ -16,6 +16,7 @@
<div class="workbench-btn">
<el-autocomplete
placeholder="请输入企业名称、项目名称、荣誉,查询"
ref="autocomplete"
v-model="search"
:fetch-suggestions="querySearch"
:trigger-on-focus="false"
@ -200,6 +201,9 @@ export default {
changeTab(index){
this.checked = index;
this.search = "";
//
this.$refs.autocomplete.suggestions = [];
this.$refs.autocomplete.highlightedIndex = -1;
},
//
handleApproval(row) {
@ -256,10 +260,23 @@ export default {
},
//
handleSelect(item) {
console.log(item);
// console.log(item);
if(this.checked == 0) {
this.$router.push({
name: 'enterInfo',
query: { userId: item.id, creditCode: item.creditCode }
})
} else if(this.checked == 1) {
this.$router.push({
name: 'projectInfo',
query: { userId: item.id }
})
} else if(this.checked == 2) {
}
},
searchBtn(){
console.log(this.search);
// console.log(this.search);
if(this.checked == 0) {
this.$router.push({
name: 'Enterpriselibrary',

Loading…
Cancel
Save