feat: There is no way the, 搜索中心优化

This commit is contained in:
super_liu
2022-05-23 17:21:21 +08:00
parent 25a92aec07
commit 695f153cee
2 changed files with 76 additions and 3 deletions
@@ -35,6 +35,21 @@
<div class="search-condition">
<div class="condition-btn" @click="conditionBtnOpen = !conditionBtnOpen" v-if="showConditionBtn">{{ toggleConditionTips }}</div>
<div class="condition-content">
<div class="condition-item" v-if="selectIndex === 'All'">
<div class="condition-item-title">检索方式</div>
<ul>
<li>
<span :class="{'selected': selectType === 'allTextSearch'}" @click="searchClick('allTextSearch')">
全文检索
</span>
</li>
<li>
<span :class="{'selected': selectType === 'titleSearch'}" @click="searchClick('titleSearch')">
标题检索
</span>
</li>
</ul>
</div>
<div class="condition-item" v-for="(condition, key) of searchOptions" :key="condition.index + key" v-if="condition.index < 5 || conditionBtnOpen">
<div class="condition-item-title">{{ condition.title }}</div>
<ul :class="[key, {'is-close': condition.isClose}]">
@@ -343,6 +358,7 @@
},
data () {
return {
selectType: 'titleSearch',
externalStatus:'',
itermsConditionsTitle1: '',
itermsConditionsTitle2: '',
@@ -482,6 +498,10 @@
}
},
methods: {
searchClick(type) {
this.selectType = type
this.searchSarByInputKey()
},
optionsFun(items){
if(Object.prototype.toString.call(items) === '[object Object]'){
return items;
@@ -1379,6 +1399,7 @@
}
AllList.selectIndex = 'fulltextserch'
AllList.selectValue = this.keywords
AllList.selectType = this.selectType
AllList.page = this.pageAll
AllList.pageSize = this.$store.getters.userInfo.configContent
this.$http.post('search/searchCenter/searchSarBykey', AllList, {
@@ -1438,6 +1459,7 @@
if(condition.selectValue === undefined){
condition.selectValue = ''
}
condition.selectType = this.selectType
this.$http.post('search/searchCenter/searchSarBykey', condition, {
_this: this,
loading: 'resultLoading'