|
@@ -54,7 +54,12 @@
|
|
|
</scroll-view>
|
|
|
<slot name="empty-container" v-if="!listState.loading && !listState.list.length">
|
|
|
<AppEmpty class="mt-100">
|
|
|
- <slot name="empty">暂无符合条件的数据,请修改筛选条件</slot>
|
|
|
+ <slot name="empty">
|
|
|
+ <div>{{ emptyText }}</div>
|
|
|
+ <div class="empty-button-container">
|
|
|
+ <van-button type="primary" @click="resetFilters">重置筛选条件</van-button>
|
|
|
+ </div>
|
|
|
+ </slot>
|
|
|
</AppEmpty>
|
|
|
</slot>
|
|
|
<SearchPowerTipDialog v-model="dialog.freeTip" />
|
|
@@ -65,7 +70,7 @@
|
|
|
<script>
|
|
|
import Filters from '@/components/search/common/filters'
|
|
|
import { AppEmpty, ProjectCell } from '@/ui'
|
|
|
-import { Loading } from 'vant'
|
|
|
+import { Button, Loading } from 'vant'
|
|
|
import { filterObjOfKeys } from '@/utils'
|
|
|
import { getBiddingZBXMSearchList } from '@/api/modules/search'
|
|
|
import { InfoTypeTransform } from '@/utils/transform/info-type-transform'
|
|
@@ -79,6 +84,7 @@ export default {
|
|
|
name: 'SearchResultList',
|
|
|
components: {
|
|
|
[AppEmpty.name]: AppEmpty,
|
|
|
+ [Button.name]: Button,
|
|
|
[Loading.name]: Loading,
|
|
|
[ProjectCell.name]: ProjectCell,
|
|
|
SearchPowerTipDialog,
|
|
@@ -125,6 +131,13 @@ export default {
|
|
|
interceptLimit: 35, // 限制搜索长度
|
|
|
interceptOtherWords: '', // 限制后,后端截取字符
|
|
|
},
|
|
|
+ textConf: {
|
|
|
+ bidding: '项目',
|
|
|
+ 'bidding-cgyx': '项目',
|
|
|
+ information: '项目',
|
|
|
+ buyer: '画像',
|
|
|
+ unit: '画像',
|
|
|
+ },
|
|
|
dialog: {
|
|
|
toLogin: false,
|
|
|
freeTip: false
|
|
@@ -135,7 +148,7 @@ export default {
|
|
|
computed: {
|
|
|
...mapGetters('user', ['isLogin', 'isVip']),
|
|
|
...mapGetters('subscribe', ['subscribeArea', 'isPay', 'canSelectAreaCount']),
|
|
|
- ...mapGetters('config', ['isAppTypeOfUnit']),
|
|
|
+ ...mapGetters('config', ['searchTypeConf', 'isAppTypeOfUnit']),
|
|
|
canShowList () {
|
|
|
return this.listState.list.length > 0 || this.showLoadingTips
|
|
|
},
|
|
@@ -154,6 +167,17 @@ export default {
|
|
|
return ''
|
|
|
}
|
|
|
},
|
|
|
+ searchType() {
|
|
|
+ return this.searchTypeConf.type || 'bidding'
|
|
|
+ },
|
|
|
+ emptyText() {
|
|
|
+ const tText = this.textConf[this.searchType]
|
|
|
+ if (tText) {
|
|
|
+ return `无符合条件的${tText},请修改筛选条件`
|
|
|
+ } else {
|
|
|
+ return '暂无符合条件的数据,请修改筛选条件'
|
|
|
+ }
|
|
|
+ },
|
|
|
renderList() {
|
|
|
return this.listState.list.map((v) => {
|
|
|
return this.preSortItem(v)
|
|
@@ -585,6 +609,12 @@ export default {
|
|
|
console.log(error)
|
|
|
}
|
|
|
},
|
|
|
+ resetFilters() {
|
|
|
+ const { filters } = this.$refs
|
|
|
+ if (filters) {
|
|
|
+ filters.resetFilters()
|
|
|
+ }
|
|
|
+ },
|
|
|
onFilterCancel() {
|
|
|
this.doSearch()
|
|
|
},
|
|
@@ -632,6 +662,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .empty-content-position {
|
|
|
+ margin-top: -120px;
|
|
|
+ }
|
|
|
+ .empty-button-container {
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
|
|
|
.tips-loading {
|
|
|
display: flex;
|