|
@@ -9,8 +9,10 @@ import IndustrySelector from '@/components/filter-items/IndustrySelector.vue'
|
|
|
import KeywordTagsSelector from '@/components/filter-items/KeywordTagsSelector'
|
|
|
import RegionSelector from '@/components/filter-items/RegionSelector'
|
|
|
import SelectorWithBasePower from '@/components/filter-items/SelectorWithBasePower.vue'
|
|
|
+import OnecascadeContent from '@/components/filter-items/OnecascadeContent.vue'
|
|
|
import { calcSearchScope } from '@/assets/js/selector/scope.js'
|
|
|
import $bus from '@/utils/bus'
|
|
|
+import { findIndex } from 'lodash'
|
|
|
|
|
|
function noPower() {
|
|
|
$bus.$emit('search:filter:no-power')
|
|
@@ -54,8 +56,6 @@ const moreFiltersNeedVipKeyList = [
|
|
|
'buyer',
|
|
|
'winner',
|
|
|
'agency',
|
|
|
- 'buyer',
|
|
|
- 'buyer',
|
|
|
]
|
|
|
|
|
|
|
|
@@ -170,8 +170,8 @@ function createSearchBidBaseSchema(conf = {}) {
|
|
|
return SearchBidBaseSchema
|
|
|
}
|
|
|
|
|
|
-function createSearchBidMoreSchema() {
|
|
|
- const SearchBidMoreSchema = [
|
|
|
+function createSearchBidMoreSchema(filterItems) {
|
|
|
+ let SearchBidMoreSchema = [
|
|
|
{
|
|
|
key: 'regionMap',
|
|
|
label: '地区',
|
|
@@ -324,6 +324,44 @@ function createSearchBidMoreSchema() {
|
|
|
}
|
|
|
]
|
|
|
|
|
|
+ // 移动端融创,动态添加筛选条件(支持多个筛选条件插入)
|
|
|
+ if(Array.isArray(filterItems)) {
|
|
|
+ const resultFilter = []
|
|
|
+ filterItems.forEach(fTemp => {
|
|
|
+ const { key, defaultVal, label, options, type } = fTemp
|
|
|
+ let obj = {}
|
|
|
+ if(type === 'multiple') {
|
|
|
+ const formatOptions = options.map(o => {
|
|
|
+ return {
|
|
|
+ ...o,
|
|
|
+ label: o.label,
|
|
|
+ value: o.key,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ obj = {
|
|
|
+ key: key,
|
|
|
+ label: label,
|
|
|
+ defaultVal: defaultVal,
|
|
|
+ _name: 'type',
|
|
|
+ _type: 'component',
|
|
|
+ expand: {
|
|
|
+ component: OnecascadeContent,
|
|
|
+ props: {
|
|
|
+ options: formatOptions,
|
|
|
+ placeholder: label
|
|
|
+ },
|
|
|
+ hooks: {}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ resultFilter.push(obj)
|
|
|
+ })
|
|
|
+ const index = findIndex(SearchBidMoreSchema, function (o) {
|
|
|
+ return o.label === '采购单位类型'
|
|
|
+ })
|
|
|
+ SearchBidMoreSchema.splice(index, 0, ...resultFilter)
|
|
|
+ }
|
|
|
+
|
|
|
SearchBidMoreSchema.forEach((schema) => {
|
|
|
const key = schema.key
|
|
|
if (moreFiltersNeedVipKeyList.includes(key)) {
|