|
@@ -868,57 +868,44 @@ export default {
|
|
Object.keys(this.getFilters).forEach((v) => {
|
|
Object.keys(this.getFilters).forEach((v) => {
|
|
if (typeof this.getFilters[v] !== 'undefined') {
|
|
if (typeof this.getFilters[v] !== 'undefined') {
|
|
if (v === 'industry' && typeof filters[v] === 'object') {
|
|
if (v === 'industry' && typeof filters[v] === 'object') {
|
|
- if(this.getFilters[v].length > 0) {
|
|
|
|
|
|
+ if(Object.keys(this.getFilters[v]).length > 0) {
|
|
query[v] = this.formatIndustryMap(this.getFilters[v]).join(',')
|
|
query[v] = this.formatIndustryMap(this.getFilters[v]).join(',')
|
|
- } else {
|
|
|
|
- query[v] = ''
|
|
|
|
}
|
|
}
|
|
} else if (v === 'buyerClass' && typeof filters[v] === 'object') {
|
|
} else if (v === 'buyerClass' && typeof filters[v] === 'object') {
|
|
- if(this.getFilters[v].length > 0) {
|
|
|
|
|
|
+ if(Object.keys(this.getFilters[v]).length > 0) {
|
|
query[v] = this.formatIndustryMap(this.getFilters[v]).map((v) => v.split('_')[1]).join(',')
|
|
query[v] = this.formatIndustryMap(this.getFilters[v]).map((v) => v.split('_')[1]).join(',')
|
|
- } else {
|
|
|
|
- query[v] = ''
|
|
|
|
}
|
|
}
|
|
} else if (v === 'subtype' && typeof filters[v] === 'object') {
|
|
} else if (v === 'subtype' && typeof filters[v] === 'object') {
|
|
const filterSubtype = InfoTypeTransform.mapToList(this.getFilters[v])
|
|
const filterSubtype = InfoTypeTransform.mapToList(this.getFilters[v])
|
|
- if(this.getFilters[v].length > 0) {
|
|
|
|
|
|
+ if(Object.keys(this.getFilters[v]).length > 0) {
|
|
query[v] = filterSubtype.length > 0 ? filterSubtype.join(',') : ''
|
|
query[v] = filterSubtype.length > 0 ? filterSubtype.join(',') : ''
|
|
- } else {
|
|
|
|
- query[v] = ''
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
query[v] = this.getFilters[v]
|
|
query[v] = this.getFilters[v]
|
|
}
|
|
}
|
|
- // query[v] = this.getFilters[v]
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
if (filters && Object.keys(filters).length > 0) {
|
|
if (filters && Object.keys(filters).length > 0) {
|
|
|
|
+ console.log(filters, 'filters')
|
|
Object.keys(filters).forEach((v) => {
|
|
Object.keys(filters).forEach((v) => {
|
|
if (typeof filters[v] !== 'undefined') {
|
|
if (typeof filters[v] !== 'undefined') {
|
|
if (v === 'industry' && typeof filters[v] === 'object') {
|
|
if (v === 'industry' && typeof filters[v] === 'object') {
|
|
- if(filters[v].length > 0) {
|
|
|
|
|
|
+ if(Object.keys(filters[v]).length > 0) {
|
|
query[v] = this.formatIndustryMap(filters[v]).join(',')
|
|
query[v] = this.formatIndustryMap(filters[v]).join(',')
|
|
- } else {
|
|
|
|
- query[v] = ''
|
|
|
|
}
|
|
}
|
|
- } else if (v === 'buyerClass' && typeof filters[v] === 'object') {
|
|
|
|
- if(filters[v].length > 0) {
|
|
|
|
|
|
+ } else if (v === 'buyerClass' && typeof filters[v] === 'object') {
|
|
|
|
+ if(Object.keys(filters[v]).length > 0) {
|
|
query[v] = this.formatIndustryMap(filters[v]).map((v) => v.split('_')[1]).join(',')
|
|
query[v] = this.formatIndustryMap(filters[v]).map((v) => v.split('_')[1]).join(',')
|
|
- } else {
|
|
|
|
- query[v] = ''
|
|
|
|
}
|
|
}
|
|
- } else if (v === 'subtype' && typeof filters[v] === 'object') {
|
|
|
|
|
|
+ } else if (v === 'subtype' && typeof filters[v] === 'object') {
|
|
const filterSubtype = InfoTypeTransform.mapToList(filters[v])
|
|
const filterSubtype = InfoTypeTransform.mapToList(filters[v])
|
|
- if(filters[v].length > 0) {
|
|
|
|
|
|
+ if(Object.keys(filters[v]).length > 0) {
|
|
query[v] = filterSubtype.length > 0 ? filterSubtype.join(',') : ''
|
|
query[v] = filterSubtype.length > 0 ? filterSubtype.join(',') : ''
|
|
- } else {
|
|
|
|
- query[v] = ''
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
query[v] = filters[v]
|
|
query[v] = filters[v]
|
|
}
|
|
}
|
|
- // query[v] = filters[v]
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -927,7 +914,6 @@ export default {
|
|
query.isEnt = true
|
|
query.isEnt = true
|
|
}
|
|
}
|
|
// delete query.item 所有订阅列表都增加item参数
|
|
// delete query.item 所有订阅列表都增加item参数
|
|
-
|
|
|
|
return query
|
|
return query
|
|
},
|
|
},
|
|
async getList(filters) {
|
|
async getList(filters) {
|