feat: There is no way the,es
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
<ul :class="[key, {'is-close': condition.isClose}]">
|
<ul :class="[key, {'is-close': condition.isClose}]">
|
||||||
<li v-for="(conditionOpt, optIndex) in optionsFun(condition.options)" :key="optIndex + condition.title">
|
<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 :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>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -739,6 +739,8 @@
|
|||||||
* @date: 2018/12/19 11:38:21
|
* @date: 2018/12/19 11:38:21
|
||||||
*/
|
*/
|
||||||
optChecked (key, value) {
|
optChecked (key, value) {
|
||||||
|
console.log(value)
|
||||||
|
console.log(this.selectIndex)
|
||||||
if (value === 'All') {
|
if (value === 'All') {
|
||||||
this.AllCheck = true
|
this.AllCheck = true
|
||||||
// 点击全部-显示分页
|
// 点击全部-显示分页
|
||||||
@@ -775,12 +777,18 @@
|
|||||||
index: 0
|
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.searchCondition.selectIndex = ['All']
|
||||||
|
this.selectIndex = value
|
||||||
this.searchSarByInputKey()
|
this.searchSarByInputKey()
|
||||||
|
this.$forceUpdate()
|
||||||
} else {
|
} else {
|
||||||
this.AllPage = false
|
|
||||||
this.Allitems = []
|
|
||||||
this.AllCheck = false
|
|
||||||
let index = this.searchCondition[key].indexOf(value)
|
let index = this.searchCondition[key].indexOf(value)
|
||||||
// 资源类型为单选且必选
|
// 资源类型为单选且必选
|
||||||
if (key !== 'selectIndex') {
|
if (key !== 'selectIndex') {
|
||||||
@@ -876,6 +884,12 @@
|
|||||||
this.searchCondition[key].splice(0, 1, value)
|
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) {
|
if (filterOptions.module) {
|
||||||
filterOptions.module.options = []
|
filterOptions.module.options = []
|
||||||
}
|
}
|
||||||
|
filterOptions.NYLXCLASS = originOptions.NYLXCLASS
|
||||||
|
filterOptions.NYLXCLASS.title = '能源类型'
|
||||||
|
filterOptions.NYLXCLASS.index = 1
|
||||||
|
// 适用车辆类型
|
||||||
|
filterOptions.CLLX = originOptions.CLLX
|
||||||
|
filterOptions.CLLX.index = 2
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
this.searchOptions = filterOptions
|
this.searchOptions = filterOptions
|
||||||
@@ -1287,13 +1307,19 @@
|
|||||||
if (this.keywords === undefined) {
|
if (this.keywords === undefined) {
|
||||||
this.keywords = ''
|
this.keywords = ''
|
||||||
}
|
}
|
||||||
const Alllist = {
|
const AllList = {}
|
||||||
selectIndex: 'fulltextserch',
|
let searchCondition = this.searchCondition
|
||||||
selectValue: this.keywords,
|
let searchKeys = Object.keys(this.searchOptions)
|
||||||
page: this.pageAll,
|
for (let key in searchCondition) {
|
||||||
pageSize: this.$store.getters.userInfo.configContent
|
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,
|
_this: this,
|
||||||
loading: 'resultLoading'
|
loading: 'resultLoading'
|
||||||
}, res => {
|
}, res => {
|
||||||
@@ -2562,6 +2588,8 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.searchCondition['standSort'].splice(0, 1, 'all')
|
this.searchCondition['standSort'].splice(0, 1, 'all')
|
||||||
|
this.searchCondition['NYLXCLASS'].splice(0, 1, 'all')
|
||||||
|
this.searchCondition['CLLX'].splice(0, 1, 'all')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|||||||
Reference in New Issue
Block a user