修改搜索中心

This commit is contained in:
qq787203167
2022-03-21 16:48:59 +08:00
parent 8b753f4a66
commit 9b13e2ff6f
5 changed files with 79 additions and 57 deletions
@@ -7,26 +7,26 @@
<a-input-group class="input-group" compact v-if="active === $t('DocumentLibrary')">
<a-select v-model="selectModel">
<a-select-option :value="item.db_field_name"
@change="selectChange"
v-for="(item,index) in searchOption" :key="index">
{{item.db_field_txt}}
</a-select-option>
</a-select>
<a-input-search
allowClear
@change="onChange"
style="width: 70%"
placeholder="请输入搜索内容"
@search="onSearch"
></a-input-search>
</a-input-group>
<a-input-search
v-model="selectValueTwo"
v-else-if="active === $t('whole')"
class="inputSearch"
allow-clear
placeholder="请输入搜索内容"
@search="onSearch"
@search="wholeOnSearch"
></a-input-search>
<span class="textSearch" @click="wholeTextSearch(this.selectValueTwo)">结果中检索</span>
</div>
</div>
<div class="search-center-content">
@@ -42,7 +42,7 @@
</a-tabs>
</div>
</div>
<whole :url="url" v-if="active === $t('whole')"/>
<whole ref="wholeRef" :url="url" v-if="active === $t('whole')"/>
<DocumentLibrary ref="DocumentLibraryRef" v-else-if="active === $t('DocumentLibrary')"/>
</div>
</div>
@@ -69,7 +69,8 @@
queryCondition: 'search/document/queryCondition'
},
selectModel: '',
queryParam: {}
queryParam: {},
selectValueTwo:'',
}
},
mounted() {
@@ -85,11 +86,15 @@
this.$refs.DocumentLibraryRef.searchData(this.queryParam,this.selectModel)
}
},
onChange(e){
console.log(e)
wholeOnSearch(event){
if (this.$refs.wholeRef){
this.$refs.wholeRef.searchData(event)
}
},
selectChange(event) {
console.log(event)
wholeTextSearch(event){
if (this.$refs.wholeRef){
this.$refs.wholeRef.searchDataTwo(event)
}
},
getCondition() {
let query = {
@@ -197,4 +202,10 @@
.input-group .ant-select {
background: #F6F7FA;
}
.textSearch{
line-height: 40px;
display: inline-block;
margin-left: 8px;
color: #21c9cc;
}
</style>