|
@@ -1,18 +1,31 @@
|
|
|
<template>
|
|
|
<div class="must-page-class-name j-container search-result-bidding top-radius">
|
|
|
<div class="j-header">
|
|
|
- <top-search v-model="topSearch.input" @submit="submit()"></top-search>
|
|
|
+ <top-search v-model="topSearch.input" @submit="submit()" @clear="doBack"></top-search>
|
|
|
<DropFilter
|
|
|
v-model="confirmState"
|
|
|
:default-state="getDefaultConfirmState"
|
|
|
- :options="options"
|
|
|
- @confirm="onConfirm"
|
|
|
+ :options="getOptions"
|
|
|
@cancel="onCancel"
|
|
|
+ @confirm="onConfirm"
|
|
|
>
|
|
|
</DropFilter>
|
|
|
</div>
|
|
|
- <div class="j-main search--list" ref="list">
|
|
|
- <div>
|
|
|
+ <div ref="list" class="j-main search--list">
|
|
|
+ <scroll-view
|
|
|
+ class="scroll-view_H"
|
|
|
+ @scrolltolower="onScroll"
|
|
|
+ :scroll-y="true"
|
|
|
+ >
|
|
|
+ <div class="search-total-count" v-if="listInfo.config.total > 0">
|
|
|
+ <div>
|
|
|
+ 搜索到
|
|
|
+ <span class="highlight-text">
|
|
|
+ {{ listInfo.config.total }}
|
|
|
+ </span>
|
|
|
+ 条信息
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<ProjectCell
|
|
|
v-for="(item, index) in getFormatList"
|
|
|
:key="index"
|
|
@@ -20,34 +33,55 @@
|
|
|
card-type="detailed"
|
|
|
v-bind="item"
|
|
|
@click="onClickCell(item)"
|
|
|
- />
|
|
|
- </div>
|
|
|
+ >
|
|
|
+ <template #buyerText="{ item }">
|
|
|
+ <span class="buyer-item link-clickable">
|
|
|
+ {{ item.text }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template #winnerText="{ item }">
|
|
|
+ <span
|
|
|
+ v-for="(winner, index) in item.children"
|
|
|
+ :key="index"
|
|
|
+ class="winner-item highlight-text link-clickable j-splitter"
|
|
|
+ data-j-splitter="、"
|
|
|
+ >
|
|
|
+ {{ winner.text }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </ProjectCell>
|
|
|
+ <view class="tips-loading" v-if="listInfo.config.loading">
|
|
|
+ <span class="iconfont icon-lv"></span>
|
|
|
+ <span>加载中...</span>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
<AppEmpty
|
|
|
- class="mt-100"
|
|
|
v-if="!listInfo.config.loading && !listInfo.list.length"
|
|
|
- >未搜索到符合条件的信息</AppEmpty
|
|
|
+ class="mt-100"
|
|
|
+ >未搜索到符合条件的信息
|
|
|
+ </AppEmpty
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { AppEmpty, ProjectCell, DropFilter } from '@/ui'
|
|
|
+import {AppEmpty, ProjectCell, DropFilter} from '@/ui'
|
|
|
import scopeSelectorContent from '@/components/selector/scope'
|
|
|
import TopSearch from "@/components/search/TopSearch.vue";
|
|
|
-// import AreaCitySelector from '@/components/selector/area-city'
|
|
|
-import { filterObjOfKeys } from '@/utils'
|
|
|
-import { ajaxGetSupplySearch } from '@/api/modules/jyinfo'
|
|
|
+import AreaCitySidebar from '@/components/selector/area-city-sidebar'
|
|
|
+import {filterObjOfKeys, dateFormatter, getRandomString, calcNotExactTime} from '@/utils'
|
|
|
+import {getBiddingSearchList} from '@/api/modules/search'
|
|
|
import Taro from "@tarojs/taro";
|
|
|
|
|
|
export default {
|
|
|
- name: 'SearchResultSupplier',
|
|
|
+ name: 'SearchResultBidding',
|
|
|
components: {
|
|
|
TopSearch,
|
|
|
[AppEmpty.name]: AppEmpty,
|
|
|
[ProjectCell.name]: ProjectCell,
|
|
|
[DropFilter.name]: DropFilter,
|
|
|
- // [AreaCitySelector.name]: AreaCitySelector,
|
|
|
+ [AreaCitySidebar.name]: AreaCitySidebar,
|
|
|
[scopeSelectorContent.name]: scopeSelectorContent
|
|
|
},
|
|
|
data() {
|
|
@@ -68,14 +102,24 @@ export default {
|
|
|
list: []
|
|
|
},
|
|
|
confirmState: {
|
|
|
- searchType: ['title'],
|
|
|
- time: [''],
|
|
|
+ selectType: ['title', 'content'],
|
|
|
+ publishTime: [''],
|
|
|
area: [],
|
|
|
status: ['0']
|
|
|
},
|
|
|
options: [
|
|
|
{
|
|
|
- key: 'searchType',
|
|
|
+ key: 'area',
|
|
|
+ value: '',
|
|
|
+ menu: {
|
|
|
+ title: '地区'
|
|
|
+ },
|
|
|
+ content: {
|
|
|
+ component: AreaCitySidebar
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'selectType',
|
|
|
menu: {
|
|
|
title: '搜索范围'
|
|
|
},
|
|
@@ -90,24 +134,29 @@ export default {
|
|
|
checked: false
|
|
|
},
|
|
|
{
|
|
|
- key: 'detail',
|
|
|
+ key: 'content',
|
|
|
label: '正文搜索',
|
|
|
checked: false
|
|
|
},
|
|
|
{
|
|
|
- key: 'ent_name',
|
|
|
- label: '发布单位',
|
|
|
+ label: '附件',
|
|
|
+ key: 'file',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '项目名称/标的物',
|
|
|
+ key: 'ppa',
|
|
|
checked: false
|
|
|
}
|
|
|
],
|
|
|
- defaultVal: ['title']
|
|
|
+ defaultVal: ['title', 'content']
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- key: 'time',
|
|
|
+ key: 'publishTime',
|
|
|
menu: {
|
|
|
- title: '发布时间'
|
|
|
+ title: '时间'
|
|
|
},
|
|
|
content: {
|
|
|
component: scopeSelectorContent,
|
|
@@ -153,62 +202,37 @@ export default {
|
|
|
confirm: 'change'
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'status',
|
|
|
- value: '',
|
|
|
- menu: {
|
|
|
- title: '信息状态'
|
|
|
- },
|
|
|
- content: {
|
|
|
- component: scopeSelectorContent,
|
|
|
- props: {
|
|
|
- multiple: false,
|
|
|
- checkedIcon: 'duihao',
|
|
|
- defaultIcon: '',
|
|
|
- options: [
|
|
|
- {
|
|
|
- key: '0',
|
|
|
- label: '全部',
|
|
|
- checked: false
|
|
|
- },
|
|
|
- {
|
|
|
- key: '1',
|
|
|
- label: '生效中',
|
|
|
- checked: false
|
|
|
- },
|
|
|
- {
|
|
|
- key: '-1',
|
|
|
- label: '已过期',
|
|
|
- checked: false
|
|
|
- }
|
|
|
- ],
|
|
|
- defaultVal: ['0']
|
|
|
- },
|
|
|
- hooks: {
|
|
|
- confirm: 'change'
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ getOptions () {
|
|
|
+ return this.options.map(v => {
|
|
|
+ const hasDiffValue = this.confirmState[v.key] !== this.getDefaultConfirmState[v.key]
|
|
|
+ if (hasDiffValue) {
|
|
|
+ v.menu.hight = true
|
|
|
+ }
|
|
|
+ return v
|
|
|
+ })
|
|
|
+ },
|
|
|
getDefaultConfirmState() {
|
|
|
return this.$options.data().confirmState
|
|
|
},
|
|
|
getSearchKey() {
|
|
|
- return this.listInfo.keys.split('+')
|
|
|
+ return this.listInfo.keys?.split('+')
|
|
|
},
|
|
|
getParams() {
|
|
|
const params = {
|
|
|
- keywords: this.listInfo.config.search,
|
|
|
- pageIndex: this.listInfo.config.pageNum,
|
|
|
+ keyWords: this.topSearch?.input,
|
|
|
+ pageNum: this.listInfo.config.pageNum,
|
|
|
pageSize: this.listInfo.config.pageSize,
|
|
|
+ searchGroup: 0,
|
|
|
+ searchMode: 0,
|
|
|
noToast: true
|
|
|
}
|
|
|
if (params.pageIndex === 1) {
|
|
|
- params.keywords = this.topSearch.input
|
|
|
+ params.keyWords = this.topSearch.input
|
|
|
}
|
|
|
Object.keys(this.confirmState).forEach((key) => {
|
|
|
switch (key) {
|
|
@@ -222,12 +246,13 @@ export default {
|
|
|
})
|
|
|
break
|
|
|
}
|
|
|
- case 'time': {
|
|
|
+ case 'publishTime': {
|
|
|
params[key] = ''
|
|
|
+ console.log('tttt')
|
|
|
if (this.confirmState[key][0] !== '') {
|
|
|
- const formatTime = (
|
|
|
+ const formatTime = calcNotExactTime(
|
|
|
this.confirmState[key][0],
|
|
|
- 's'
|
|
|
+ 's'
|
|
|
)
|
|
|
params[key] = `${formatTime.start}-${formatTime.end}`
|
|
|
}
|
|
@@ -242,29 +267,30 @@ export default {
|
|
|
return params
|
|
|
},
|
|
|
getShowDetail() {
|
|
|
- return this.getParams.searchType.indexOf('detail') !== -1
|
|
|
+ return this.getParams.selectType.indexOf('content') !== -1
|
|
|
},
|
|
|
getFormatList() {
|
|
|
return this.listInfo.list.map((v) => {
|
|
|
- return Object.assign(v, {
|
|
|
- detail: this.getShowDetail ? v.detail : '',
|
|
|
- tags: [v.province].filter((v) => v),
|
|
|
- time: v.publish_time * 1000
|
|
|
- })
|
|
|
+ return this.preSortItem(v)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
this.$instance = Taro.getCurrentInstance()
|
|
|
this.topSearch.input = this.$instance.router.params.search
|
|
|
+ this.listInfo.config.search = this.topSearch.input
|
|
|
this.onLoad()
|
|
|
},
|
|
|
mounted() {
|
|
|
this.isMounted = true
|
|
|
},
|
|
|
methods: {
|
|
|
- clear() {
|
|
|
- this.$router.back()
|
|
|
+ doBack() {
|
|
|
+ Taro.navigateBack()
|
|
|
+ },
|
|
|
+ onScroll () {
|
|
|
+ console.log('scr')
|
|
|
+ this.onLoad()
|
|
|
},
|
|
|
submit() {
|
|
|
this.doResetList()
|
|
@@ -310,8 +336,8 @@ export default {
|
|
|
doQueryList() {
|
|
|
console.log('doQueryList')
|
|
|
this.listInfo.config.loading = true
|
|
|
- this.listInfo.config.search = this.getParams.keywords
|
|
|
- ajaxGetSupplySearch(this.getParams).then((res) => {
|
|
|
+ this.listInfo.config.search = this.getParams.keyWords
|
|
|
+ getBiddingSearchList(this.getParams).then((res) => {
|
|
|
if (res?.data) {
|
|
|
this.listInfo.keys = res.data?.ckeys || this.listInfo.config.search
|
|
|
if (this.listInfo.config.pageNum === 1) {
|
|
@@ -343,6 +369,93 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ preSortItem(item) {
|
|
|
+ if (!item) return
|
|
|
+ const {area, isCollected, projectInfo} = item
|
|
|
+ item.star = !!isCollected
|
|
|
+ // 参标参数
|
|
|
+ item.isCB = {
|
|
|
+ id: '',
|
|
|
+ value: 0
|
|
|
+ }
|
|
|
+ // 是否有附件
|
|
|
+ item.isFile = item?.fileExists || false
|
|
|
+ item.leftTopBadgeText =
|
|
|
+ item.site === '剑鱼信息发布平台' ? '业主委托项目' : ''
|
|
|
+ // 拟建项目独有参数
|
|
|
+ if (projectInfo) {
|
|
|
+ Object.assign(item, projectInfo)
|
|
|
+ }
|
|
|
+ const buyerClass =
|
|
|
+ item?.buyerClass && item?.buyerClass !== '其它'
|
|
|
+ ? item?.buyerClass
|
|
|
+ : undefined
|
|
|
+ // 标签
|
|
|
+ item.tagList = [
|
|
|
+ area || '全国',
|
|
|
+ buyerClass,
|
|
|
+ item?.type || item?.subtype,
|
|
|
+ ].filter((v) => v)
|
|
|
+
|
|
|
+ item.tags = item.tagList
|
|
|
+
|
|
|
+ item.dateTime = item.publishTime ? item.publishTime * 1000 : ''
|
|
|
+ item.time = item.dateTime
|
|
|
+
|
|
|
+ // 整理企业画像数据
|
|
|
+ let winnerList = Array.isArray(item.winnerInfo) ? item.winnerInfo : []
|
|
|
+ winnerList = winnerList.map((w) => {
|
|
|
+ return {
|
|
|
+ text: w.winner,
|
|
|
+ id: w.winnerId
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ item.vKid = `${item.id}--${getRandomString(8).toLowerCase()}`
|
|
|
+
|
|
|
+ // 详细列表数据
|
|
|
+ item.detailList = [
|
|
|
+ {
|
|
|
+ label: '采购单位',
|
|
|
+ splitter: ':',
|
|
|
+ text: Array.isArray(item.buyer)
|
|
|
+ ? item.buyer.join(',')
|
|
|
+ : item.buyer || '',
|
|
|
+ highlightText: true,
|
|
|
+ detailTextSlot: 'buyerText'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '代理机构',
|
|
|
+ splitter: ':',
|
|
|
+ text: item.agency || ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '中标单位',
|
|
|
+ splitter: ':',
|
|
|
+ text: Array.isArray(item.winnerInfo)
|
|
|
+ ? item.winnerInfo.map((w) => w.winner).join(',')
|
|
|
+ : '',
|
|
|
+ detailTextSlot: 'winnerText',
|
|
|
+ children: winnerList
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '报名截止日期',
|
|
|
+ splitter: ':',
|
|
|
+ text: item.signEndTime
|
|
|
+ ? dateFormatter(item.signEndTime * 1000, 'yyyy-MM-dd')
|
|
|
+ : ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '投标截止日期',
|
|
|
+ splitter: ':',
|
|
|
+ text: item.bidEndTime
|
|
|
+ ? dateFormatter(item.bidEndTime * 1000, 'yyyy-MM-dd')
|
|
|
+ : ''
|
|
|
+ }
|
|
|
+ ]
|
|
|
+
|
|
|
+ return item
|
|
|
+ },
|
|
|
doResetList() {
|
|
|
Object.assign(this.listInfo, this.$options.data().listInfo)
|
|
|
this.onLoad()
|
|
@@ -373,6 +486,7 @@ export default {
|
|
|
margin-left: 12px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.hd-search-group .back-icon {
|
|
|
display: none;
|
|
|
}
|
|
@@ -383,32 +497,51 @@ export default {
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ .tips-loading {
|
|
|
+ padding: 8px;
|
|
|
+ text-align: center;
|
|
|
+ color: $gray_7;
|
|
|
+ }
|
|
|
+
|
|
|
+ .search-total-count {
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 16px;
|
|
|
+ }
|
|
|
+
|
|
|
.search-- {
|
|
|
&tab-menu {
|
|
|
- ::v-deep {
|
|
|
- .van-dropdown-menu__bar {
|
|
|
- box-shadow: unset;
|
|
|
- }
|
|
|
- .van-dropdown-menu {
|
|
|
- color: $gray_7;
|
|
|
- }
|
|
|
- .van-dropdown-menu__title--active {
|
|
|
+ .van-dropdown-menu__bar {
|
|
|
+ box-shadow: unset;
|
|
|
+ }
|
|
|
+
|
|
|
+ .van-dropdown-menu {
|
|
|
+ color: $gray_7;
|
|
|
+ }
|
|
|
+
|
|
|
+ .van-dropdown-menu__title--active {
|
|
|
color: $main;
|
|
|
}
|
|
|
- }
|
|
|
+
|
|
|
&-title {
|
|
|
font-weight: 500;
|
|
|
font-size: 14px;
|
|
|
+
|
|
|
&.selected {
|
|
|
color: $main;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
&tab-content {
|
|
|
max-width: 100%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
+
|
|
|
&list {
|
|
|
+ .scroll-view_H {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
.mt-100 {
|
|
|
margin-top: -100px;
|
|
|
}
|