|
@@ -8,7 +8,6 @@
|
|
|
class="top-radius"
|
|
|
:class="{ 'loading-mask': listState.loading }"
|
|
|
ref="searchFilters"
|
|
|
- @noPower="onNoPower"
|
|
|
@confirm="onFilterConfirm"
|
|
|
@reset="doSearch"
|
|
|
@open="doOpen"
|
|
@@ -22,7 +21,6 @@
|
|
|
class="tab-left"
|
|
|
v-model="pageState.listTabActive"
|
|
|
:ellipsis="false"
|
|
|
- :before-change="beforeTabActiveChange"
|
|
|
@change="onListTabChange"
|
|
|
>
|
|
|
<van-tab
|
|
@@ -67,25 +65,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="tip-toggle-search-mode-container"
|
|
|
- v-show="toggleBlurModeTip.show"
|
|
|
- >
|
|
|
- <div>
|
|
|
- 如需查看更多相关信息,建议您将搜索模式切换为
|
|
|
- <div class="tip-action highlight-text">
|
|
|
- “模糊搜索”
|
|
|
- <AppIcon
|
|
|
- class="search-mode-label-icon"
|
|
|
- name="help1"
|
|
|
- @click="showSearchModeHelp"
|
|
|
- >
|
|
|
- </AppIcon>
|
|
|
- </div>
|
|
|
- 按照当前条件共匹配到{{ toggleBlurModeTip.count }}条公告。
|
|
|
- </div>
|
|
|
- <button @click="doToggleSearchBlurMode">立即切换查看</button>
|
|
|
- </div>
|
|
|
<div class="list-wrapper" ref="listWrapper">
|
|
|
<van-popup
|
|
|
:style="popupHeight"
|
|
@@ -112,7 +91,7 @@
|
|
|
@click="goToDetail(item)"
|
|
|
:title="item.title"
|
|
|
:filetext_search="item.filetext_search"
|
|
|
- :time="item.dateTime"
|
|
|
+ :time="item.publishTime"
|
|
|
v-visited:content="item.id"
|
|
|
:isFile="item.isFile"
|
|
|
:keys="pageState.splitKeys"
|
|
@@ -297,11 +276,6 @@
|
|
|
v-model="pageState.saveFilterDialog"
|
|
|
:content="pageState.calcFilterParams"
|
|
|
/>
|
|
|
- <OneKeySubscribeDialog
|
|
|
- v-model="pageState.oneKeySub.prompt"
|
|
|
- :keywords="filters.keywords"
|
|
|
- :areaSet="pageState.oneKeySub.areaSet"
|
|
|
- />
|
|
|
<popupDataexport
|
|
|
ref="popup_dataExport"
|
|
|
@next="next_export"
|
|
@@ -317,7 +291,6 @@ import bidStatusNode from '@/components/bid-update/BidUpdate'
|
|
|
import AdSingle from '@/components/ad/Ad'
|
|
|
import CollectionFilters from '@/views/collection/components/filters'
|
|
|
import SearchFilterHistoryDialog from '@/components/search/bidding/filterHistoryDialog'
|
|
|
-import OneKeySubscribeDialog from '@/components/search/bidding/oneKeySubscribeDialog'
|
|
|
import popupDataexport from '@/components/dataExport/popupDataexport.vue'
|
|
|
import { AppIcon, AppEmpty, ProjectCell } from '@/ui'
|
|
|
import { getFreeSubscribeInfo } from '@/api/modules/public'
|
|
@@ -343,7 +316,6 @@ import {
|
|
|
searchIndexDataExport,
|
|
|
selectEnt,
|
|
|
getBiddingFilterList,
|
|
|
- freeUserNeedOneKeySubscribe,
|
|
|
getBidColPower,
|
|
|
ajaxCanBiaoStatus,
|
|
|
ajaxCanBiaoAction,
|
|
@@ -363,7 +335,6 @@ export default {
|
|
|
[Popup.name]: Popup,
|
|
|
CollectionFilters,
|
|
|
SearchFilterHistoryDialog,
|
|
|
- OneKeySubscribeDialog,
|
|
|
AppIcon,
|
|
|
AppEmpty,
|
|
|
ProjectCell,
|
|
@@ -407,7 +378,6 @@ export default {
|
|
|
],
|
|
|
defaultFilterState: {
|
|
|
moreKeywordsMode: {},
|
|
|
- searchMode: ['0'],
|
|
|
label: [],
|
|
|
industry: {},
|
|
|
area: {},
|
|
@@ -416,24 +386,19 @@ export default {
|
|
|
start: '',
|
|
|
end: ''
|
|
|
},
|
|
|
- dateTime: {
|
|
|
+ publishTime: {
|
|
|
exact: 'thisyear'
|
|
|
},
|
|
|
infoType: [],
|
|
|
buyerClass: [],
|
|
|
fileExists: ['0'],
|
|
|
winnerConcat: [''],
|
|
|
- buyerConcat: [''],
|
|
|
- notKey: [],
|
|
|
- buyerList: [],
|
|
|
- winnerList: [],
|
|
|
- agencyList: []
|
|
|
+ buyerConcat: ['']
|
|
|
}
|
|
|
},
|
|
|
// 发送请求整理的数据
|
|
|
filters: {
|
|
|
moreKeywordsMode: {},
|
|
|
- searchMode: ['0'],
|
|
|
keywords: '',
|
|
|
label: [],
|
|
|
industry: {},
|
|
@@ -443,16 +408,12 @@ export default {
|
|
|
end: ''
|
|
|
},
|
|
|
priceCheckbox: [''],
|
|
|
- dateTime: {},
|
|
|
+ publishTime: {},
|
|
|
infoType: [],
|
|
|
buyerClass: [],
|
|
|
winnerConcat: [''],
|
|
|
buyerConcat: [''],
|
|
|
- fileExists: ['0'],
|
|
|
- notKey: [],
|
|
|
- winnerList: [],
|
|
|
- buyerList: [],
|
|
|
- agencyList: []
|
|
|
+ fileExists: ['0']
|
|
|
},
|
|
|
listState: {
|
|
|
limit: 0,
|
|
@@ -487,12 +448,6 @@ export default {
|
|
|
interceptOtherWords: '', // 限制后,后端截取字符
|
|
|
saveFilterDialog: false,
|
|
|
tabSwitchShow: true,
|
|
|
- oneKeySub: {
|
|
|
- prompt: false, // 一键订阅弹窗
|
|
|
- checkLoaded: false, // 一键订阅弹窗查询
|
|
|
- areaSet: false,
|
|
|
- freeArea: true
|
|
|
- },
|
|
|
bidColPower: {
|
|
|
isOld: false
|
|
|
},
|
|
@@ -555,7 +510,7 @@ export default {
|
|
|
defaultFilterState() {
|
|
|
const { defaultFilterState } = this.conf
|
|
|
if (!this.isFree) {
|
|
|
- defaultFilterState.dateTime.exact = 'fiveyear'
|
|
|
+ defaultFilterState.publishTime.exact = 'fiveyear'
|
|
|
}
|
|
|
return defaultFilterState
|
|
|
},
|
|
@@ -633,19 +588,6 @@ export default {
|
|
|
},
|
|
|
tabSwitchShow() {
|
|
|
return this.pageState.tabSwitchShow
|
|
|
- },
|
|
|
- // 切换模糊搜索
|
|
|
- toggleBlurModeTip() {
|
|
|
- const isBlurMode = this.filters.searchMode.indexOf('1') !== -1
|
|
|
- let canShow = isBlurMode ? false : this.toggleSearchBlurData.show
|
|
|
- if (this.listState.loading) {
|
|
|
- canShow = false
|
|
|
- }
|
|
|
- const result = {
|
|
|
- show: canShow,
|
|
|
- count: this.toggleSearchBlurData.count
|
|
|
- }
|
|
|
- return result
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -725,21 +667,6 @@ export default {
|
|
|
this.pageState.tagLabelList = data
|
|
|
}
|
|
|
},
|
|
|
- // 切换到模糊搜索
|
|
|
- doToggleSearchBlurMode() {
|
|
|
- this.switchSearchMode(1)
|
|
|
- this.doSearch()
|
|
|
- },
|
|
|
- async showSearchModeHelp() {
|
|
|
- return await this.$dialog.alert({
|
|
|
- title: '搜索模式',
|
|
|
- messageAlign: 'left',
|
|
|
- className: 'j-confirm-dialog',
|
|
|
- confirmButtonText: '我知道了',
|
|
|
- message:
|
|
|
- '<p>精准搜索: 搜索结果必须完全包含完整的关键词。如搜索"医疗设备" ,搜索结果一定完整包含“医疗设备”才能被搜索到,而“医疗的设备”或“设备医疗”的项目不会被搜索到。</p><br /><p>模糊搜索: 系统会先自动智能分词然后再进行搜索。如搜索"医疗设备" ,系统会自动分成“医疗”“设备”然后进行搜索,只要项目中出现“医疗”和“设备”都会被搜索到,前提是两个词必须一同出现在一则公告内,不分先后顺序。</p>'
|
|
|
- })
|
|
|
- },
|
|
|
/**
|
|
|
* 针对多类型的接口字段判断,可根据类型执行对应函数,没有则返回默认值
|
|
|
* @param params - 参数
|
|
@@ -800,12 +727,12 @@ export default {
|
|
|
calcInitFilters() {
|
|
|
// 计算选择器内容
|
|
|
// 1. 计算时间
|
|
|
- const { dateTime } = this.filters
|
|
|
- if (!dateTime.start && !dateTime.end) {
|
|
|
+ const { publishTime } = this.filters
|
|
|
+ if (!publishTime.start && !publishTime.end) {
|
|
|
// 没有计算过精确时间
|
|
|
- if (dateTime && dateTime.exact !== 'exact') {
|
|
|
- const exactTime = calcNotExactTime(dateTime.exact)
|
|
|
- Object.assign(dateTime, exactTime)
|
|
|
+ if (publishTime && publishTime.exact !== 'exact') {
|
|
|
+ const exactTime = calcNotExactTime(publishTime.exact)
|
|
|
+ Object.assign(publishTime, exactTime)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -831,32 +758,6 @@ export default {
|
|
|
storage: sessionStorage
|
|
|
})
|
|
|
},
|
|
|
- async onNoPower(type = '') {
|
|
|
- const noPowerMessageMap = {
|
|
|
- default: '立享更多搜索权限\n寻找商机更精准',
|
|
|
- detailList:
|
|
|
- '立享列表展示更多公告关键信息,例如:采购单位、中标单位、招标代理机构等,提高公告查看效率'
|
|
|
- }
|
|
|
- const message = noPowerMessageMap[type] || noPowerMessageMap.default
|
|
|
-
|
|
|
- try {
|
|
|
- await this.$dialog.confirm({
|
|
|
- title: '开通超级订阅',
|
|
|
- message,
|
|
|
- className: 'j-confirm-dialog',
|
|
|
- confirmButtonText: '去开通'
|
|
|
- })
|
|
|
- this.saveState()
|
|
|
- if (!this.isLogin) {
|
|
|
- return openLinkOfOther(LINKS.APP登录页.app, {
|
|
|
- query: {
|
|
|
- url: '/jy_mobile/common/order/create/svip'
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- this.$router.push('/common/order/create/svip')
|
|
|
- } catch (error) {}
|
|
|
- },
|
|
|
async getBidColPower() {
|
|
|
const { data = {}, error_code: code = 0 } = await getBidColPower()
|
|
|
if (code === 0 && data) {
|
|
@@ -925,7 +826,7 @@ export default {
|
|
|
.map((item) => item.key)
|
|
|
const { exact } = filters.publishTime
|
|
|
if (exact && canUseOptions.includes(exact)) {
|
|
|
- this.$set(this.filters, 'dateTime', filters.publishTime)
|
|
|
+ this.$set(this.filters, 'publishTime', filters.publishTime)
|
|
|
}
|
|
|
}
|
|
|
if (filters.selectTime) {
|
|
@@ -951,45 +852,11 @@ export default {
|
|
|
this.$set(this.filters, 'moreKeywordsMode', moreKeywordsModeState)
|
|
|
}
|
|
|
|
|
|
- // 搜索模式
|
|
|
- if (Array.isArray(filters.searchMode) && filters.searchMode.length) {
|
|
|
- this.filters.searchMode = filters.searchMode
|
|
|
- }
|
|
|
-
|
|
|
// 附件
|
|
|
if (filters.fileExists) {
|
|
|
this.filters.fileExists = filters.fileExists
|
|
|
}
|
|
|
|
|
|
- if (filters.notKey && !this.isFree) {
|
|
|
- if (Array.isArray(filters.notKey)) {
|
|
|
- this.filters.notKey = filters.notKey
|
|
|
- } else {
|
|
|
- this.filters.notKey = filters.notKey.split(',')
|
|
|
- }
|
|
|
- }
|
|
|
- if (filters.buyerList && !this.isFree) {
|
|
|
- if (Array.isArray(filters.buyerList)) {
|
|
|
- this.filters.buyerList = filters.buyerList
|
|
|
- } else {
|
|
|
- this.filters.buyerList = filters.buyerList.split(',')
|
|
|
- }
|
|
|
- }
|
|
|
- if (filters.winnerList && !this.isFree) {
|
|
|
- if (Array.isArray(filters.winnerList)) {
|
|
|
- this.filters.winnerList = filters.winnerList
|
|
|
- } else {
|
|
|
- this.filters.winnerList = filters.winnerList.split(',')
|
|
|
- }
|
|
|
- }
|
|
|
- if (filters.agencyList && !this.isFree) {
|
|
|
- if (Array.isArray(filters.agencyList)) {
|
|
|
- this.filters.agencyList = filters.agencyList
|
|
|
- } else {
|
|
|
- this.filters.agencyList = filters.agencyList.split(',')
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
// 信息类型
|
|
|
if (filters.infoType) {
|
|
|
const key = 'infoType'
|
|
@@ -1105,8 +972,6 @@ export default {
|
|
|
true,
|
|
|
'-'
|
|
|
),
|
|
|
- // publishTimeType: this.filters.dateTime?.exact,
|
|
|
- searchMode: this.filters.searchMode.join('') - 0, // 搜索模式:0精准搜索(不进行系统分词) 1模糊搜索(进行系统分词)
|
|
|
wordsMode, // 搜索关键词模式;默认0:包含所有,1:包含任意
|
|
|
additionalWords,
|
|
|
label: this.filters.label.join(','), // 个人标签
|
|
@@ -1117,28 +982,8 @@ export default {
|
|
|
buyerClass: this.filters.buyerClass.join(','),
|
|
|
winnerTel: this.filters.winnerConcat.join(','),
|
|
|
buyerTel: this.filters.buyerConcat.join(','),
|
|
|
- exclusionWords: this.filters.notKey.join(','),
|
|
|
- buyer: this.filters.buyerList.join(','),
|
|
|
- winner: this.filters.winnerList.join(','),
|
|
|
- agency: this.filters.agencyList.join(','),
|
|
|
- fileExists: this.filters.fileExists.join(','),
|
|
|
splitKeywords: this.pageState.splitKeywords
|
|
|
}
|
|
|
- // if (!params.keyWords && !params.additionalWords) {
|
|
|
- // t.loading = false
|
|
|
- // t.finished = true
|
|
|
- // return
|
|
|
- // }
|
|
|
- console.table({
|
|
|
- start: dateFormatter(this.filters.dateTime?.start),
|
|
|
- end: dateFormatter(this.filters.dateTime?.end)
|
|
|
- })
|
|
|
- // 免费用户搜索结果查看大于11页时弹窗提示
|
|
|
- // if (this.noLoginOrFree && this.listState.pageNum > 10) {
|
|
|
- // this.showFreeLimit10Dialog()
|
|
|
- // t.finished = true
|
|
|
- // return
|
|
|
- // }
|
|
|
|
|
|
try {
|
|
|
const {
|
|
@@ -1240,69 +1085,12 @@ export default {
|
|
|
if (interceptKeyWords) {
|
|
|
this.topSearch.input = interceptKeyWords
|
|
|
}
|
|
|
- if (Array.isArray(list) && list.length) {
|
|
|
- if (this.isFree && this.isLogin) {
|
|
|
- if (params.keyWords) {
|
|
|
- this.checkOneKeySub()
|
|
|
- }
|
|
|
- }
|
|
|
- if (params.pageNum === 1) {
|
|
|
- if (this.pageState.searchModeAutoChangedSearch) {
|
|
|
- this.$toast('精准搜索无结果,已为您自动切换到模糊搜索')
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- this.checkToggleSearchMode({
|
|
|
- pageNum: params.pageNum,
|
|
|
- count: data.total || 0,
|
|
|
- blurCount: data?.bCount || 0,
|
|
|
- searchMode: params.searchMode
|
|
|
- })
|
|
|
|
|
|
if (params.pageNum === 1) {
|
|
|
// 保存更多关键词到历史记录中
|
|
|
this.saveAdditionalWordsToHistory()
|
|
|
}
|
|
|
},
|
|
|
- /**
|
|
|
- * 检查是否需要切换模糊搜索、是否展示提示
|
|
|
- * 1. 精准搜索无数据 (自动切换模糊搜索)
|
|
|
- * 2. 精准搜索有数据,< 50,提示手动切换搜索模式
|
|
|
- */
|
|
|
- checkToggleSearchMode({
|
|
|
- pageNum = 1,
|
|
|
- searchMode = 0,
|
|
|
- count = 0,
|
|
|
- blurCount = 0
|
|
|
- }) {
|
|
|
- if (pageNum === 1) {
|
|
|
- // 重置变量
|
|
|
- this.toggleSearchBlurData.show = false
|
|
|
- this.toggleSearchBlurData.count = ''
|
|
|
-
|
|
|
- if (searchMode === 0) {
|
|
|
- const canAutoToggleBlurMode = count < 1 && blurCount > count
|
|
|
- const canShowToggleBlurModeTip =
|
|
|
- count >= 1 && count < 50 && blurCount > count
|
|
|
-
|
|
|
- if (canShowToggleBlurModeTip) {
|
|
|
- this.toggleSearchBlurData.show = true
|
|
|
- this.toggleSearchBlurData.count = blurCount
|
|
|
- }
|
|
|
-
|
|
|
- if (canAutoToggleBlurMode) {
|
|
|
- this.switchSearchMode(1)
|
|
|
- this.pageState.searchModeAutoChangedSearch = true
|
|
|
- this.doSearch({ from: 'searchModeAutoChangedSearch' })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- // 切换搜索模式:精准搜索0/模糊搜索1
|
|
|
- switchSearchMode(m) {
|
|
|
- this.filters.searchMode = [m + '']
|
|
|
- },
|
|
|
// 获取参标状态
|
|
|
async getCanBiaoStatus(arr) {
|
|
|
let idArr = arr.map((item) => item.id)
|
|
@@ -1401,7 +1189,7 @@ export default {
|
|
|
this.formatTypeofItemKey(item?.bidAmount || item?.budget, 'money', '')
|
|
|
].filter((v) => v)
|
|
|
|
|
|
- item.dateTime = item.publishTime ? item.publishTime * 1000 : ''
|
|
|
+ item.publishTime = item.publishTime ? item.publishTime * 1000 : ''
|
|
|
item.selectTime = item.selectTime ? item.selectTime * 1000 : ''
|
|
|
// 整理企业画像数据
|
|
|
let winnerList = Array.isArray(item.winnerInfo) ? item.winnerInfo : []
|
|
@@ -1609,7 +1397,6 @@ export default {
|
|
|
FilterHistoryViewModel2AjaxModel.formatAreaCity(this.filters.area)
|
|
|
const infoType = InfoTypeTransform.listToMap(this.filters.infoType)
|
|
|
const infoTypeText = InfoTypeTransform.formatMapToList(infoType)
|
|
|
- const fileExists = this.filters.fileExists.join(',')
|
|
|
// 整理wordsMode和additionalWords
|
|
|
let wordsMode
|
|
|
let additionalWords
|
|
@@ -1628,7 +1415,7 @@ export default {
|
|
|
|
|
|
const params = {
|
|
|
searchvalue: this.topSearch.input,
|
|
|
- label: this.filters.label.join(','), // 搜索范围
|
|
|
+ label: this.filters.label.join(','), // 个人标签
|
|
|
scope: area, // 地区省份(数据导出接口用到)
|
|
|
area, // 地区省份(保存筛选接口用到)
|
|
|
city,
|
|
@@ -1639,7 +1426,7 @@ export default {
|
|
|
minprice: this.filters.price.start,
|
|
|
maxprice: this.filters.price.end,
|
|
|
publishtime: FilterHistoryViewModel2AjaxModel.formatTime(
|
|
|
- this.filters.dateTime
|
|
|
+ this.filters.publishTime
|
|
|
),
|
|
|
selectTime: FilterHistoryViewModel2AjaxModel.formatSelectTime(
|
|
|
this.filters.selectTime
|
|
@@ -1648,12 +1435,6 @@ export default {
|
|
|
buyerclass: this.filters.buyerClass.join(','),
|
|
|
winnertel: this.filters.winnerConcat.join(','),
|
|
|
buyertel: this.filters.buyerConcat.join(','),
|
|
|
- fileExists: fileExists || '0',
|
|
|
- notkey: this.filters.notKey.join(','),
|
|
|
- buyer: this.filters.buyerList.join(','),
|
|
|
- winner: this.filters.winnerList.join(','),
|
|
|
- agency: this.filters.agencyList.join(','),
|
|
|
- searchMode: this.filters.searchMode.join('') - 0,
|
|
|
wordsMode,
|
|
|
additionalWords
|
|
|
}
|
|
@@ -1743,21 +1524,6 @@ export default {
|
|
|
console.warn(error)
|
|
|
}
|
|
|
},
|
|
|
- // 检查一键订阅是否打开(仅免费用户检查)
|
|
|
- async checkOneKeySub() {
|
|
|
- const { checkLoaded } = this.pageState.oneKeySub
|
|
|
- if (checkLoaded) return
|
|
|
- try {
|
|
|
- const { error_code: code = 0, data } =
|
|
|
- await freeUserNeedOneKeySubscribe()
|
|
|
- if (code === 0 && data) {
|
|
|
- Object.assign(this.pageState.oneKeySub, data)
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- } finally {
|
|
|
- this.pageState.oneKeySub.checkLoaded = true
|
|
|
- }
|
|
|
- },
|
|
|
saveDefaultScope() {
|
|
|
const { label: defaultScope } =
|
|
|
this.$options.data().conf.defaultFilterState
|
|
@@ -1871,16 +1637,6 @@ export default {
|
|
|
onFilterConfirm() {
|
|
|
this.doSearch()
|
|
|
},
|
|
|
- beforeTabActiveChange(name) {
|
|
|
- if (name === 'detailedList') {
|
|
|
- if (this.noLoginOrFree) {
|
|
|
- // 弹窗
|
|
|
- this.onNoPower('detailList')
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
- return true
|
|
|
- },
|
|
|
scrollWrapFn(e) {
|
|
|
const scrollDOM = e.target
|
|
|
const scrollTop = scrollDOM.scrollTop
|