|
@@ -1,5 +1,3 @@
|
|
|
-import { getPropertyFilters } from '@/api/modules/bi'
|
|
|
-
|
|
|
import RegionCollapseSelector from '@/components/filter-items/RegionCollapseSelector'
|
|
|
import CommonCheckboxSelector from '@/components/filter-items/CommonCheckboxSelector'
|
|
|
import PriceSelector from '@/components/selector/PriceSelector'
|
|
@@ -16,33 +14,13 @@ import ChangeHandsDropdown from '@/components/filter-items/ChangeHandsDropdown.v
|
|
|
import SearchTimeScopeSelector from '@/components/selector/SearchTimeScopeSelector.vue'
|
|
|
import ContactSelector from '@/components/filter-items/ContactSelector.vue'
|
|
|
import KeywordTagsSelector from '@/components/filter-items/KeywordTagsSelector'
|
|
|
-import basicDropdown from '@/components/selector/basicDropdown'
|
|
|
|
|
|
-// 获取物业专版筛选条件
|
|
|
-let propertyListData = {}
|
|
|
-async function getFilters () {
|
|
|
- const { error_code: code, data} = await getPropertyFilters()
|
|
|
- if(code === 0) {
|
|
|
- let newData = {}
|
|
|
- Object.keys(data).forEach(v => {
|
|
|
- newData[v] = []
|
|
|
- data[v].forEach(s => {
|
|
|
- let sArr = s.split('#')
|
|
|
- s = {
|
|
|
- label: sArr[0],
|
|
|
- value: sArr[1]
|
|
|
- }
|
|
|
- newData[v].push(s)
|
|
|
- })
|
|
|
- })
|
|
|
- propertyListData = newData
|
|
|
- createBiSearchBidBaseSchema()
|
|
|
- }
|
|
|
-}
|
|
|
-getFilters()
|
|
|
|
|
|
-function createBiSearchBidBaseSchema() {
|
|
|
+function createBiSearchBidBaseSchema(propertyListData = {}) {
|
|
|
const businessList = propertyListData['业务类型'] || []
|
|
|
+ const priceList = propertyListData['价格区间'] || []
|
|
|
+ const periodList = propertyListData['合同周期'] || []
|
|
|
+ const propertyList = propertyListData['物业业态'] || []
|
|
|
const SearchBidBaseSchema = [
|
|
|
{
|
|
|
key: 'regionMap',
|
|
@@ -81,6 +59,7 @@ function createBiSearchBidBaseSchema() {
|
|
|
expand: {
|
|
|
component: CommonCheckboxSelector,
|
|
|
props: {
|
|
|
+ field: 'value',
|
|
|
options: {
|
|
|
value: businessList
|
|
|
}
|
|
@@ -95,8 +74,13 @@ function createBiSearchBidBaseSchema() {
|
|
|
_name: 'scale',
|
|
|
_type: 'component',
|
|
|
expand: {
|
|
|
- component: PriceSelector,
|
|
|
- props: {},
|
|
|
+ component: CommonCheckboxSelector,
|
|
|
+ props: {
|
|
|
+ field: 'value',
|
|
|
+ options: {
|
|
|
+ value: priceList
|
|
|
+ }
|
|
|
+ },
|
|
|
hooks: {}
|
|
|
}
|
|
|
},
|
|
@@ -108,7 +92,13 @@ function createBiSearchBidBaseSchema() {
|
|
|
_type: 'component',
|
|
|
expand: {
|
|
|
component: CommonCheckboxSelector,
|
|
|
- props: {},
|
|
|
+ props: {
|
|
|
+ single: true,
|
|
|
+ field: 'value',
|
|
|
+ options: {
|
|
|
+ value: periodList
|
|
|
+ }
|
|
|
+ },
|
|
|
hooks: {}
|
|
|
}
|
|
|
},
|
|
@@ -120,7 +110,12 @@ function createBiSearchBidBaseSchema() {
|
|
|
_type: 'component',
|
|
|
expand: {
|
|
|
component: CommonCheckboxSelector,
|
|
|
- props: {},
|
|
|
+ props: {
|
|
|
+ field: 'value',
|
|
|
+ options: {
|
|
|
+ value: propertyList
|
|
|
+ }
|
|
|
+ },
|
|
|
hooks: {}
|
|
|
}
|
|
|
}
|