|
@@ -97,7 +97,7 @@
|
|
|
:time="item.publishtime * 1000"
|
|
|
v-visited:content="item._id"
|
|
|
:isFile="item.isFile"
|
|
|
- :keys="filters.keyWords"
|
|
|
+ :keys="[filters.keyWords]"
|
|
|
:leftTopBadgeText="item.leftTopBadgeText"
|
|
|
:tags="item.tagList"
|
|
|
:key="item.vKid"
|
|
@@ -264,14 +264,6 @@
|
|
|
</div>
|
|
|
<AppEmpty v-show="listState.list.length === 0 && listState.finished">
|
|
|
<div class="empty-text" v-html="emptyText"></div>
|
|
|
- <van-button
|
|
|
- class="feedback-button"
|
|
|
- plain
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- @click="feedback"
|
|
|
- >意见反馈</van-button
|
|
|
- >
|
|
|
</AppEmpty>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -380,7 +372,7 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
defaultFilterState: {
|
|
|
- moreKeywordsMode: {},
|
|
|
+ moreKeywordsMode: '',
|
|
|
label: [],
|
|
|
industry: {},
|
|
|
area: {},
|
|
@@ -404,7 +396,7 @@ export default {
|
|
|
},
|
|
|
// 发送请求整理的数据
|
|
|
filters: {
|
|
|
- moreKeywordsMode: {},
|
|
|
+ moreKeywordsMode: '',
|
|
|
keywords: '',
|
|
|
label: [],
|
|
|
industry: {},
|
|
@@ -575,20 +567,6 @@ export default {
|
|
|
const { count } = this.listState
|
|
|
return count > 0
|
|
|
},
|
|
|
- additionalWordsArr() {
|
|
|
- const { moreKeywordsMode } = this.filters
|
|
|
- let additionalWordsArr = []
|
|
|
-
|
|
|
- if (moreKeywordsMode) {
|
|
|
- if (
|
|
|
- Array.isArray(moreKeywordsMode.tags) &&
|
|
|
- moreKeywordsMode.tags.length
|
|
|
- ) {
|
|
|
- additionalWordsArr = moreKeywordsMode.tags
|
|
|
- }
|
|
|
- }
|
|
|
- return additionalWordsArr
|
|
|
- },
|
|
|
emptyText() {
|
|
|
return '暂未收藏标讯'
|
|
|
},
|
|
@@ -856,17 +834,18 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
// 附加词
|
|
|
- const { additionalWords, wordsMode } = filters
|
|
|
- const moreKeywordsModeState = {}
|
|
|
- if (Array.isArray(additionalWords) && additionalWords.length) {
|
|
|
- moreKeywordsModeState.tags = additionalWords
|
|
|
- }
|
|
|
- if (Array.isArray(wordsMode) && wordsMode.length) {
|
|
|
- moreKeywordsModeState.wordsMode = wordsMode.join(',')
|
|
|
- }
|
|
|
- if (Object.keys(moreKeywordsModeState).length) {
|
|
|
- this.$set(this.filters, 'moreKeywordsMode', moreKeywordsModeState)
|
|
|
- }
|
|
|
+ // const { additionalWords, wordsMode } = filters
|
|
|
+ // const moreKeywordsModeState = {}
|
|
|
+ // if (Array.isArray(additionalWords) && additionalWords.length) {
|
|
|
+ // moreKeywordsModeState.tags = additionalWords
|
|
|
+ // }
|
|
|
+ // if (Array.isArray(wordsMode) && wordsMode.length) {
|
|
|
+ // moreKeywordsModeState.wordsMode = wordsMode.join(',')
|
|
|
+ // }
|
|
|
+ // if (Object.keys(moreKeywordsModeState).length) {
|
|
|
+ // this.$set(this.filters, 'moreKeywordsMode', moreKeywordsModeState)
|
|
|
+ // }
|
|
|
+ this.$set(this.filters, 'moreKeywordsMode', filters.moreKeywordsMode)
|
|
|
|
|
|
// 附件
|
|
|
if (filters.fileExists) {
|
|
@@ -954,22 +933,22 @@ export default {
|
|
|
const infoTypeText = InfoTypeTransform.formatMapToList(infoType)
|
|
|
const { price, moreKeywordsMode, publishTime, selectTime, label, buyerClass, winnerConcat, buyerConcat, industry } = this.filters
|
|
|
// 整理wordsMode和additionalWords
|
|
|
- let additionalWords
|
|
|
- if (moreKeywordsMode) {
|
|
|
- if (
|
|
|
- Array.isArray(moreKeywordsMode) &&
|
|
|
- moreKeywordsMode.length
|
|
|
- ) {
|
|
|
- additionalWords = moreKeywordsMode.join(',')
|
|
|
- }
|
|
|
- }
|
|
|
- this.filters.keyWords = additionalWords
|
|
|
+ // let additionalWords
|
|
|
+ // if (moreKeywordsMode) {
|
|
|
+ // if (
|
|
|
+ // Array.isArray(moreKeywordsMode) &&
|
|
|
+ // moreKeywordsMode.length
|
|
|
+ // ) {
|
|
|
+ // additionalWords = moreKeywordsMode.join(',')
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ this.filters.keyWords = moreKeywordsMode
|
|
|
|
|
|
const params = {
|
|
|
pageNum: this.listState.pageNum,
|
|
|
pageSize: this.listState.pageSize,
|
|
|
reqType: '', // cache:空搜索缓存数据;lastNews:最新数据
|
|
|
- keyWords: additionalWords,
|
|
|
+ keyWords: moreKeywordsMode,
|
|
|
province: area,
|
|
|
city: city,
|
|
|
district: district,
|
|
@@ -1005,8 +984,6 @@ export default {
|
|
|
t.list = []
|
|
|
t.refreshing = false
|
|
|
}
|
|
|
- // 请求完成后的回调
|
|
|
- this.afterSearch(params, data)
|
|
|
// 列表赋值
|
|
|
const list = data.res
|
|
|
const count = data.count
|
|
@@ -1089,42 +1066,6 @@ export default {
|
|
|
this.$router.push('/common/order/create/svip')
|
|
|
} catch (error) {}
|
|
|
},
|
|
|
- afterSearch(params = {}, data = {}) {
|
|
|
- const {
|
|
|
- list = [],
|
|
|
- keyWords = '',
|
|
|
- interceptOtherWords,
|
|
|
- interceptLimit,
|
|
|
- interceptKeyWords
|
|
|
- } = data
|
|
|
- this.pageState.splitKeywords = keyWords
|
|
|
- if (keyWords) {
|
|
|
- this.pageState.splitKeys = keyWords.split(' ')
|
|
|
- } else {
|
|
|
- const keywordsArr = this.filters.keywords.split(' ')
|
|
|
- let additionalWordsArr = []
|
|
|
- const { moreKeywordsMode } = this.filters
|
|
|
- if (
|
|
|
- Array.isArray(moreKeywordsMode.tags) &&
|
|
|
- moreKeywordsMode.tags.length
|
|
|
- ) {
|
|
|
- additionalWordsArr = moreKeywordsMode.tags
|
|
|
- }
|
|
|
- this.pageState.splitKeys = keywordsArr.concat(additionalWordsArr)
|
|
|
- }
|
|
|
- // 限制数据赋值
|
|
|
- this.pageState.interceptOtherWords = interceptOtherWords
|
|
|
- this.pageState.interceptLimit = interceptLimit
|
|
|
- // 如果超出限制字符数,则替换输入框内容
|
|
|
- if (interceptKeyWords) {
|
|
|
- this.topSearch.input = interceptKeyWords
|
|
|
- }
|
|
|
-
|
|
|
- if (params.pageNum === 1) {
|
|
|
- // 保存更多关键词到历史记录中
|
|
|
- this.saveAdditionalWordsToHistory()
|
|
|
- }
|
|
|
- },
|
|
|
// 获取参标状态
|
|
|
async getCanBiaoStatus(arr) {
|
|
|
let idArr = arr.map((item) => item._id)
|
|
@@ -1316,22 +1257,6 @@ export default {
|
|
|
// }
|
|
|
openAppOrWxPage(targetMap)
|
|
|
},
|
|
|
- // 保存更多关键词到历史记录中
|
|
|
- saveAdditionalWordsToHistory() {
|
|
|
- const { moreKeywordsMode } = this.filters
|
|
|
- const tags = moreKeywordsMode.tags
|
|
|
- if (Array.isArray(tags) && tags.length) {
|
|
|
- tags.forEach((t) => {
|
|
|
- // 历史记录新增
|
|
|
- this.setHistory({
|
|
|
- type: 'bidding',
|
|
|
- item: {
|
|
|
- label: t
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
calcProjectCardType(item) {
|
|
|
const type = this.cellCardType
|
|
|
return type
|
|
@@ -1433,16 +1358,6 @@ export default {
|
|
|
FilterHistoryViewModel2AjaxModel.formatAreaCity(this.filters.area)
|
|
|
const infoType = InfoTypeTransform.listToMap(this.filters.infoType)
|
|
|
const infoTypeText = InfoTypeTransform.formatMapToList(infoType)
|
|
|
- let additionalWords
|
|
|
-
|
|
|
- if (moreKeywordsMode) {
|
|
|
- if (
|
|
|
- Array.isArray(moreKeywordsMode.tags) &&
|
|
|
- moreKeywordsMode.tags.length
|
|
|
- ) {
|
|
|
- additionalWords = moreKeywordsMode.tags.join(',')
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
const params = {
|
|
|
label: this.filters.label.join(','), // 个人标签
|
|
@@ -1450,7 +1365,7 @@ export default {
|
|
|
area, // 地区省份(保存筛选接口用到)
|
|
|
city,
|
|
|
district,
|
|
|
- keyWords: additionalWords,
|
|
|
+ keyWords: moreKeywordsMode,
|
|
|
industry: FilterHistoryViewModel2AjaxModel.formatIndustry(this.filters.industry), // 行业
|
|
|
minprice: this.filters.price.start,
|
|
|
maxprice: this.filters.price.end,
|