feat: There is no way the,es

This commit is contained in:
super_liu
2021-11-07 16:01:30 +08:00
parent 8679002126
commit 749377b0c4
+38 -10
View File
@@ -36,7 +36,7 @@
<ul :class="[key, {'is-close': condition.isClose}]">
<li v-for="(conditionOpt, optIndex) in optionsFun(condition.options)" :key="optIndex + condition.title">
<span :class="{ 'selected': searchCondition[key].indexOf(conditionOpt.value) !== -1 }" @click="optChecked(key, conditionOpt.value)">{{ conditionOpt.label }}
<span v-if="conditionOpt.number !== null && conditionOpt.number !== undefined">(<font style="color: red">{{ conditionOpt.number}}</font>)</span>
<span v-if="conditionOpt.number !== null && conditionOpt.number !== undefined && selectIndex !== 'All'">(<font style="color: red">{{ conditionOpt.number}}</font>)</span>
</span>
</li>
</ul>
@@ -739,6 +739,8 @@
* @date: 2018/12/19 11:38:21
*/
optChecked (key, value) {
console.log(value)
console.log(this.selectIndex)
if (value === 'All') {
this.AllCheck = true
// 点击全部-显示分页
@@ -775,12 +777,18 @@
index: 0
}
}
let originOptions = this.searchOriginOptions
this.searchOptions.NYLXCLASS = originOptions.NYLXCLASS
this.searchOptions.NYLXCLASS.title = '能源类型'
this.searchOptions.NYLXCLASS.index = 1
// 适用车辆类型
this.searchOptions.CLLX = originOptions.CLLX
this.searchOptions.CLLX.index = 2
this.searchCondition.selectIndex = ['All']
this.selectIndex = value
this.searchSarByInputKey()
this.$forceUpdate()
} else {
this.AllPage = false
this.Allitems = []
this.AllCheck = false
let index = this.searchCondition[key].indexOf(value)
// 资源类型为单选且必选
if (key !== 'selectIndex') {
@@ -876,6 +884,12 @@
this.searchCondition[key].splice(0, 1, value)
}
}
this.AllPage = this.selectIndex === 'All' ? true : false
this.Allitems = []
this.AllCheck = this.selectIndex === 'All' ? true : false
if (this.selectIndex === 'All'){
this.searchSarByInputKey()
}
}
},
// 统计搜索条件结果个数
@@ -1257,6 +1271,12 @@
if (filterOptions.module) {
filterOptions.module.options = []
}
filterOptions.NYLXCLASS = originOptions.NYLXCLASS
filterOptions.NYLXCLASS.title = '能源类型'
filterOptions.NYLXCLASS.index = 1
// 适用车辆类型
filterOptions.CLLX = originOptions.CLLX
filterOptions.CLLX.index = 2
break
}
this.searchOptions = filterOptions
@@ -1287,13 +1307,19 @@
if (this.keywords === undefined) {
this.keywords = ''
}
const Alllist = {
selectIndex: 'fulltextserch',
selectValue: this.keywords,
page: this.pageAll,
pageSize: this.$store.getters.userInfo.configContent
const AllList = {}
let searchCondition = this.searchCondition
let searchKeys = Object.keys(this.searchOptions)
for (let key in searchCondition) {
if (searchKeys.indexOf(key) !== -1) {
AllList[key] = searchCondition[key].join(',') === 'all' ? '' : searchCondition[key].join(',')
}
}
this.$http.post('search/searchCenter/searchSarBykey', Alllist, {
AllList.selectIndex = 'fulltextserch'
AllList.selectValue = this.keywords
AllList.page = this.pageAll
AllList.pageSize = this.$store.getters.userInfo.configContent
this.$http.post('search/searchCenter/searchSarBykey', AllList, {
_this: this,
loading: 'resultLoading'
}, res => {
@@ -2562,6 +2588,8 @@
})
})
this.searchCondition['standSort'].splice(0, 1, 'all')
this.searchCondition['NYLXCLASS'].splice(0, 1, 'all')
this.searchCondition['CLLX'].splice(0, 1, 'all')
}
},
mounted () {