|
@@ -8,6 +8,7 @@
|
|
|
class="top-radius"
|
|
|
:class="{ 'loading-mask': listState.loading }"
|
|
|
ref="searchFilters"
|
|
|
+ @noPower="onNoPower"
|
|
|
@confirm="onFilterConfirm"
|
|
|
@reset="doSearch"
|
|
|
@open="doOpen"
|
|
@@ -30,6 +31,16 @@
|
|
|
:key="index"
|
|
|
></van-tab>
|
|
|
</van-tabs>
|
|
|
+ <div class="tab-right">
|
|
|
+ <div
|
|
|
+ class="data-export clickable"
|
|
|
+ v-if="listState.count > 0"
|
|
|
+ @click="dataExport"
|
|
|
+ >
|
|
|
+ <AppIcon name="shujudaochu_xiao1" />
|
|
|
+ <span class="text">数据导出</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="j-main list-container" ref="listContainer">
|
|
@@ -48,22 +59,12 @@
|
|
|
>
|
|
|
<div class="tab-search-info" v-show="tabSearchInfoShow">
|
|
|
<p class="search-total-count">
|
|
|
- <template v-if="listState.total > 0">
|
|
|
+ <template v-if="listState.count > 0">
|
|
|
搜索到<span class="highlight-text">
|
|
|
- {{ calcListTotalText(listState.total) }} </span
|
|
|
+ {{ calcListTotalText(listState.count) }} </span
|
|
|
>条信息
|
|
|
</template>
|
|
|
</p>
|
|
|
- <div class="tab-right">
|
|
|
- <div
|
|
|
- class="data-export clickable"
|
|
|
- v-if="listState.total > 0"
|
|
|
- @click="dataExport"
|
|
|
- >
|
|
|
- <AppIcon name="shujudaochu_xiao1" />
|
|
|
- <span class="text">数据导出</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="list-wrapper" ref="listWrapper">
|
|
|
<van-popup
|
|
@@ -297,7 +298,7 @@ import {
|
|
|
} from '@/utils'
|
|
|
import {
|
|
|
getCollectList,
|
|
|
- searchIndexDataExport,
|
|
|
+ ajaxCollectionExport,
|
|
|
selectEnt,
|
|
|
getBiddingFilterList,
|
|
|
getBidColPower,
|
|
@@ -411,7 +412,6 @@ export default {
|
|
|
pageNum: 1, // 当前页码
|
|
|
pageSize: 50, // 每页数据条数
|
|
|
count: 0, // 总共要返回多少条数据(根据权限等)
|
|
|
- total: 0, // 数据库总共查询到多少条数据
|
|
|
offset: 80,
|
|
|
scrollTop: 0,
|
|
|
list: []
|
|
@@ -491,8 +491,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
showMoreThanMaxCount() {
|
|
|
- const { count, total, finished } = this.listState
|
|
|
- return this.isLogin && finished && total > count
|
|
|
+ const { count, finished, pageNum, pageSize } = this.listState
|
|
|
+ return this.isLogin && finished && count && pageNum * pageSize > count
|
|
|
},
|
|
|
defaultFilterState() {
|
|
|
const { defaultFilterState } = this.conf
|
|
@@ -554,8 +554,8 @@ export default {
|
|
|
return this.pageState.savedFilterList.length
|
|
|
},
|
|
|
tabSearchInfoShow() {
|
|
|
- const { total } = this.listState
|
|
|
- return total > 0
|
|
|
+ const { count } = this.listState
|
|
|
+ return count > 0
|
|
|
},
|
|
|
additionalWordsArr() {
|
|
|
const { moreKeywordsMode } = this.filters
|
|
@@ -604,7 +604,7 @@ export default {
|
|
|
next()
|
|
|
},
|
|
|
created() {
|
|
|
- this.restoreDefaultScope()
|
|
|
+ // this.restoreDefaultScope()
|
|
|
// 恢复详细列表/精简列表
|
|
|
this.restoreListTabActive()
|
|
|
// 未登录时候,初始化一些东西
|
|
@@ -924,7 +924,7 @@ export default {
|
|
|
FilterHistoryViewModel2AjaxModel.formatAreaCity(this.filters.area)
|
|
|
const infoType = InfoTypeTransform.listToMap(this.filters.infoType)
|
|
|
const infoTypeText = InfoTypeTransform.formatMapToList(infoType)
|
|
|
- const { price, moreKeywordsMode } = this.filters
|
|
|
+ const { price, moreKeywordsMode, publishTime, selectTime, label, buyerClass, winnerConcat, buyerConcat, industry } = this.filters
|
|
|
// 整理wordsMode和additionalWords
|
|
|
let wordsMode
|
|
|
let additionalWords
|
|
@@ -945,31 +945,31 @@ export default {
|
|
|
pageNum: this.listState.pageNum,
|
|
|
pageSize: this.listState.pageSize,
|
|
|
reqType: '', // cache:空搜索缓存数据;lastNews:最新数据
|
|
|
- keyWords: this.filters.keywords,
|
|
|
+ keyWords: additionalWords,
|
|
|
province: area,
|
|
|
city: city,
|
|
|
district: district,
|
|
|
subtype: infoTypeText.join(','), // 信息类型
|
|
|
publishTime: FilterHistoryViewModel2AjaxModel.formatTime(
|
|
|
- this.filters.publishTime,
|
|
|
+ publishTime,
|
|
|
true,
|
|
|
'-'
|
|
|
),
|
|
|
selectTime: FilterHistoryViewModel2AjaxModel.formatTime(
|
|
|
- this.filters.selectTime,
|
|
|
+ selectTime,
|
|
|
true,
|
|
|
'-'
|
|
|
),
|
|
|
wordsMode, // 搜索关键词模式;默认0:包含所有,1:包含任意
|
|
|
additionalWords,
|
|
|
- label: this.filters.label.join(','), // 个人标签
|
|
|
+ label: label.join(','), // 个人标签
|
|
|
price: FilterHistoryViewModel2AjaxModel.formatPrice(price),
|
|
|
industry: FilterHistoryViewModel2AjaxModel.formatIndustry(
|
|
|
- this.filters.industry
|
|
|
+ industry
|
|
|
), // 行业
|
|
|
- buyerClass: this.filters.buyerClass.join(','),
|
|
|
- winnerTel: this.filters.winnerConcat.join(','),
|
|
|
- buyerTel: this.filters.buyerConcat.join(','),
|
|
|
+ buyerClass: buyerClass.join(','),
|
|
|
+ winnerTel: winnerConcat.join(','),
|
|
|
+ buyerTel: buyerConcat.join(','),
|
|
|
splitKeywords: this.pageState.splitKeywords
|
|
|
}
|
|
|
|
|
@@ -1043,6 +1043,32 @@ export default {
|
|
|
console.warn(error)
|
|
|
}
|
|
|
},
|
|
|
+ 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) {}
|
|
|
+ },
|
|
|
afterSearch(params = {}, data = {}) {
|
|
|
const {
|
|
|
list = [],
|
|
@@ -1081,7 +1107,7 @@ export default {
|
|
|
},
|
|
|
// 获取参标状态
|
|
|
async getCanBiaoStatus(arr) {
|
|
|
- let idArr = arr.map((item) => item.id)
|
|
|
+ let idArr = arr.map((item) => item._id)
|
|
|
if (idArr.length > 0) {
|
|
|
idArr = idArr.join(',')
|
|
|
} else {
|
|
@@ -1289,13 +1315,13 @@ export default {
|
|
|
const type = this.cellCardType
|
|
|
return type
|
|
|
},
|
|
|
- calcListTotalText(total) {
|
|
|
+ calcListTotalText(count) {
|
|
|
const e1 = 100000000
|
|
|
- if (total > e1) {
|
|
|
- const billionUnit = moneyUnit(total, undefined, 2)
|
|
|
+ if (count > e1) {
|
|
|
+ const billionUnit = moneyUnit(count, undefined, 2)
|
|
|
return `超过${billionUnit}`
|
|
|
} else {
|
|
|
- return total
|
|
|
+ return count
|
|
|
}
|
|
|
},
|
|
|
async showFreeLimit10Dialog() {
|
|
@@ -1365,7 +1391,7 @@ export default {
|
|
|
}
|
|
|
this.$keep.action({
|
|
|
status: item.star,
|
|
|
- id: item.id,
|
|
|
+ id: item._id,
|
|
|
beforeRedirect: () => {
|
|
|
this.pageState.cacheStar = index + ''
|
|
|
this.saveState()
|
|
@@ -1373,6 +1399,7 @@ export default {
|
|
|
complete: ({ type, message }) => {
|
|
|
if (type) {
|
|
|
item.star = !item.star
|
|
|
+ this.doSearch()
|
|
|
this.$forceUpdate()
|
|
|
}
|
|
|
}
|
|
@@ -1402,9 +1429,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
const params = {
|
|
|
- searchvalue: this.topSearch.input,
|
|
|
+ searchvalue: this.filters.additionalWords,
|
|
|
label: this.filters.label.join(','), // 个人标签
|
|
|
- scope: area, // 地区省份(数据导出接口用到)
|
|
|
+ province: area, // 地区省份(数据导出接口用到)
|
|
|
area, // 地区省份(保存筛选接口用到)
|
|
|
city,
|
|
|
district,
|
|
@@ -1416,7 +1443,7 @@ export default {
|
|
|
publishtime: FilterHistoryViewModel2AjaxModel.formatTime(
|
|
|
this.filters.publishTime
|
|
|
),
|
|
|
- selectTime: FilterHistoryViewModel2AjaxModel.formatSelectTime(
|
|
|
+ selectTime: FilterHistoryViewModel2AjaxModel.formatTime(
|
|
|
this.filters.selectTime
|
|
|
),
|
|
|
subtype: infoTypeText.join(','), // 信息类型
|
|
@@ -1442,7 +1469,7 @@ export default {
|
|
|
this.pageState.cacheExport = null
|
|
|
}
|
|
|
if (
|
|
|
- this.listState.total > 20000 &&
|
|
|
+ this.listState.count > 20000 &&
|
|
|
type !== 'popupClick' &&
|
|
|
this.$refs.popup_dataExport.isPrompt
|
|
|
) {
|
|
@@ -1454,14 +1481,14 @@ export default {
|
|
|
try {
|
|
|
// 判断是否选择过企业。未选择过调用 selectEnt 选择一个默认的企业
|
|
|
await selectEnt()
|
|
|
- const { _id } = await searchIndexDataExport(params)
|
|
|
- if (!_id) return
|
|
|
+ const { data } = await ajaxCollectionExport(params)
|
|
|
+ if (!data._id) return
|
|
|
this.saveState()
|
|
|
this.$router.push({
|
|
|
path: '/common/order/create/dataexport',
|
|
|
query: {
|
|
|
source: 'd',
|
|
|
- id: _id
|
|
|
+ id:data._id
|
|
|
}
|
|
|
})
|
|
|
} catch (error) {
|
|
@@ -1470,7 +1497,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
next_export(obj) {
|
|
|
- console.log(obj)
|
|
|
this.dataExport('popupClick')
|
|
|
},
|
|
|
// 获取免费用户信息
|
|
@@ -1515,7 +1541,6 @@ export default {
|
|
|
saveDefaultScope() {
|
|
|
const { label: defaultScope } =
|
|
|
this.$options.data().conf.defaultFilterState
|
|
|
- // 只缓存defaultScope中的项['title', 'content']
|
|
|
const { label } = this.filters
|
|
|
let cachedArr = defaultScope.filter((item) => {
|
|
|
return label.includes(item)
|