|
@@ -12,27 +12,40 @@ import OpenTimePicker from '../components/OpenTimePicker'
|
12
|
12
|
import EditableArround from '../components/EditableArround'
|
13
|
13
|
import FormGroupItem, { gourpItemLayout } from '../components/FormGroupItem'
|
14
|
14
|
import { formItemLayout, validMinNum } from '../utils'
|
15
|
|
-import useTags from './tag'
|
|
15
|
+import useArrounds from './useArrounds'
|
|
16
|
+import usePois from './usePois'
|
|
17
|
+import useQuery from './useQuery'
|
|
18
|
+import { initForm } from './form'
|
16
|
19
|
|
17
|
20
|
const fullWidth= { width: '100%' }
|
18
|
21
|
const Item = Form.Item
|
19
|
22
|
|
20
|
23
|
const BuildingBasic = React.forwardRef((props, ref) => {
|
21
|
|
- const { form } = props;
|
|
24
|
+ const { form, history } = props;
|
22
|
25
|
const { getFieldDecorator, getFieldValue, setFieldsValue } = form;
|
|
26
|
+ const { query } = history.location;
|
|
27
|
+ const { id } = query;
|
23
|
28
|
|
24
|
|
- const [ loading, setLoading ] = useState({ arround: false })
|
|
29
|
+ const [ loading, setLoading ] = useState({ form: false, arround: false })
|
25
|
30
|
const [
|
26
|
|
- tags,
|
27
|
|
- initTags,
|
28
|
|
- updateTags,
|
29
|
|
- deletePoi,
|
|
31
|
+ arrounds,
|
|
32
|
+ initArrounds,
|
|
33
|
+ updateArrounds,
|
|
34
|
+ deleteArround,
|
|
35
|
+ ] = useArrounds()
|
|
36
|
+ const [
|
|
37
|
+ pois,
|
30
|
38
|
initPois,
|
31
|
|
- pois2Tags,
|
32
|
|
- // updatePois,
|
33
|
|
- deleteTag,
|
34
|
|
- updatePoisAndTags,
|
35
|
|
- ] = useTags()
|
|
39
|
+ deletePoi,
|
|
40
|
+ ] = usePois()
|
|
41
|
+
|
|
42
|
+ const updateLoading = (key) => (state) => setLoading({ ...loading, [key]: state })
|
|
43
|
+
|
|
44
|
+ useQuery(id, updateLoading('form'), (res) => {
|
|
45
|
+ initPois(res.mapJson)
|
|
46
|
+ initArrounds(res)
|
|
47
|
+ initForm(form, res)
|
|
48
|
+ })
|
36
|
49
|
|
37
|
50
|
// 视频文件上传前 回调
|
38
|
51
|
const fileUploadBeforeUpload = (file, fileList) => {
|
|
@@ -67,322 +80,327 @@ const BuildingBasic = React.forwardRef((props, ref) => {
|
67
|
80
|
}
|
68
|
81
|
}, {})
|
69
|
82
|
|
70
|
|
- updatePoisAndTags(pois)
|
|
83
|
+ initPois(pois, true)
|
71
|
84
|
setLoading({ ...loading, arround: false })
|
72
|
85
|
}).catch((err) => {
|
73
|
86
|
setLoading({ ...loading, arround: false })
|
74
|
87
|
console.error(err)
|
75
|
88
|
notification.error({ message: '周边数据获取异常' })
|
76
|
89
|
})
|
77
|
|
-
|
78
|
|
- // POI_TYPES.forEach(({ key }) => {
|
79
|
|
- // getPoiData({ type: key, location: lngLat, radius: e }).then(res => {
|
80
|
|
- // updatePois(key, res.pois || [])
|
81
|
|
- // }).catch(err => {
|
82
|
|
- // console.error(err)
|
83
|
|
- // notification.error({ message: '周边数据获取失败' })
|
84
|
|
- // })
|
85
|
|
- // })
|
86
|
90
|
}
|
87
|
91
|
|
88
|
92
|
return (
|
89
|
|
- <Form {...formItemLayout}>
|
90
|
|
- <Item label="项目Id" style={{ display: 'none' }}>
|
91
|
|
- {getFieldDecorator('buildingId')(<Input disabled />)}
|
92
|
|
- </Item>
|
93
|
|
- <Item label="楼盘编号" >
|
94
|
|
- {getFieldDecorator('code', {
|
95
|
|
- rules: [{ required: true, message: '请输入楼盘编号' }],
|
96
|
|
- })(<Input />)}
|
97
|
|
- </Item>
|
98
|
|
- <Item label="楼盘名称" >
|
99
|
|
- {getFieldDecorator('buildingName', {
|
100
|
|
- rules: [{ required: true, message: '请输入楼盘名' }],
|
101
|
|
- })(<Input />)}
|
102
|
|
- </Item>
|
103
|
|
- <Form.Item label="项目类型">
|
104
|
|
- {getFieldDecorator('buildingProjectType', {
|
105
|
|
- rules: [{ required: true, message: '请选择项目类型' }],
|
106
|
|
- })(<BuildingType />)}
|
107
|
|
- </Form.Item>
|
108
|
|
- <Form.Item label="列表均价" help="项目列表展示价格,示例:约10000元/㎡、约1000万元/套起">
|
109
|
|
- {getFieldDecorator('price')(<Input />)}
|
110
|
|
- </Form.Item>
|
111
|
|
- <FormGroupItem>
|
112
|
|
- <Form.Item label="开盘时间" {...gourpItemLayout.ab.a} >
|
113
|
|
- {getFieldDecorator('openingDate')(
|
114
|
|
- <OpenTimePicker placeholder="请选择开盘时间" style={fullWidth} />
|
115
|
|
- )}
|
|
93
|
+ <Spin spinning={loading.form}>
|
|
94
|
+ <Form {...formItemLayout}>
|
|
95
|
+ <Item label="项目Id" style={{ display: 'none' }}>
|
|
96
|
+ {getFieldDecorator('buildingId')(<Input disabled />)}
|
|
97
|
+ </Item>
|
|
98
|
+ <Item label="楼盘编号" >
|
|
99
|
+ {getFieldDecorator('code', {
|
|
100
|
+ rules: [{ required: true, message: '请输入楼盘编号' }],
|
|
101
|
+ })(<Input />)}
|
|
102
|
+ </Item>
|
|
103
|
+ <Item label="楼盘名称" >
|
|
104
|
+ {getFieldDecorator('buildingName', {
|
|
105
|
+ rules: [{ required: true, message: '请输入楼盘名' }],
|
|
106
|
+ })(<Input />)}
|
|
107
|
+ </Item>
|
|
108
|
+ <Form.Item label="项目类型">
|
|
109
|
+ {getFieldDecorator('buildingProjectType', {
|
|
110
|
+ rules: [{ required: true, message: '请选择项目类型' }],
|
|
111
|
+ })(<BuildingType />)}
|
116
|
112
|
</Form.Item>
|
117
|
|
- <Form.Item label="电话" {...gourpItemLayout.ab.b } >
|
118
|
|
- {getFieldDecorator('tel', {
|
119
|
|
- rules: [
|
120
|
|
- {
|
121
|
|
- pattern: new RegExp('^[0-9]*$'),
|
122
|
|
- message: '请输入正确的电话号码',
|
123
|
|
- },
|
124
|
|
- ],
|
125
|
|
- })(<Input placeholder="手机或者座机号码" />)}
|
|
113
|
+ <Form.Item label="列表均价" help="项目列表展示价格,示例:约10000元/㎡、约1000万元/套起">
|
|
114
|
+ {getFieldDecorator('price')(<Input />)}
|
126
|
115
|
</Form.Item>
|
127
|
|
- </FormGroupItem>
|
128
|
|
- <Form.Item label="项目说明" >
|
129
|
|
- {getFieldDecorator('dynamic')(<Input placeholder="项目动态等,不超过30个字" maxLength={30}/>)}
|
130
|
|
- </Form.Item>
|
131
|
|
- {/* <Form.Item label="物业类型" >
|
132
|
|
- {getFieldDecorator('propertyType')(<Input />)}
|
133
|
|
- </Form.Item> */}
|
134
|
|
- <Form.Item label="销售状态" >
|
135
|
|
- {getFieldDecorator('marketStatus', {
|
136
|
|
- rules: [{ required: true, message: '请选择销售状态' }],
|
137
|
|
- })(
|
138
|
|
- <Select placeholder="销售状态" style={fullWidth}>
|
139
|
|
- <Select.Option value="待售">待售</Select.Option>
|
140
|
|
- <Select.Option value="在售">在售</Select.Option>
|
141
|
|
- <Select.Option value="售罄">售罄</Select.Option>
|
142
|
|
- <Select.Option value="在租">在租</Select.Option>
|
143
|
|
- </Select>,
|
144
|
|
- )}
|
145
|
|
- </Form.Item>
|
146
|
|
- <Form.Item label="项目标签" >
|
147
|
|
- {getFieldDecorator('tag')(
|
148
|
|
- <Select mode="tags" placeholder="输入后选中" style={fullWidth} />
|
149
|
|
- )}
|
150
|
|
- </Form.Item>
|
151
|
|
-
|
152
|
|
- <FormGroupItem>
|
153
|
|
- <Form.Item label="项目视频" help="视频仅支持mp4格式,建议尺寸:750*600,比例5:4,用于楼盘详情" {...gourpItemLayout.ab.a} >
|
154
|
|
- {getFieldDecorator('videoUrl')(
|
155
|
|
- <FileUpload accept=".mp4" beforeUpload={fileUploadBeforeUpload} label="上传视频" size={1} />,
|
156
|
|
- )}
|
|
116
|
+ <FormGroupItem>
|
|
117
|
+ <Form.Item label="开盘时间" {...gourpItemLayout.ab.a} >
|
|
118
|
+ {getFieldDecorator('openingDate')(
|
|
119
|
+ <OpenTimePicker placeholder="请选择开盘时间" style={fullWidth} />
|
|
120
|
+ )}
|
|
121
|
+ </Form.Item>
|
|
122
|
+ <Form.Item label="电话" {...gourpItemLayout.ab.b } >
|
|
123
|
+ {getFieldDecorator('tel', {
|
|
124
|
+ rules: [
|
|
125
|
+ {
|
|
126
|
+ pattern: new RegExp('^[0-9]*$'),
|
|
127
|
+ message: '请输入正确的电话号码',
|
|
128
|
+ },
|
|
129
|
+ ],
|
|
130
|
+ })(<Input placeholder="手机或者座机号码" />)}
|
|
131
|
+ </Form.Item>
|
|
132
|
+ </FormGroupItem>
|
|
133
|
+ <Form.Item label="项目说明" >
|
|
134
|
+ {getFieldDecorator('dynamic')(<Input placeholder="项目动态等,不超过30个字" maxLength={30}/>)}
|
157
|
135
|
</Form.Item>
|
158
|
|
- <Form.Item label="视频封面图" help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于视频封面" labelCol={{span: 8}} wrapperCol={{span:16}}>
|
159
|
|
- {getFieldDecorator('videoImage')(
|
160
|
|
- <ImageUpload />,
|
|
136
|
+ {/* <Form.Item label="物业类型" >
|
|
137
|
+ {getFieldDecorator('propertyType')(<Input />)}
|
|
138
|
+ </Form.Item> */}
|
|
139
|
+ <Form.Item label="销售状态" >
|
|
140
|
+ {getFieldDecorator('marketStatus', {
|
|
141
|
+ rules: [{ required: true, message: '请选择销售状态' }],
|
|
142
|
+ })(
|
|
143
|
+ <Select placeholder="销售状态" style={fullWidth}>
|
|
144
|
+ <Select.Option value="待售">待售</Select.Option>
|
|
145
|
+ <Select.Option value="在售">在售</Select.Option>
|
|
146
|
+ <Select.Option value="售罄">售罄</Select.Option>
|
|
147
|
+ <Select.Option value="在租">在租</Select.Option>
|
|
148
|
+ </Select>,
|
161
|
149
|
)}
|
162
|
150
|
</Form.Item>
|
163
|
|
- </FormGroupItem>
|
164
|
|
- <Form.Item label="楼盘主图" help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于楼盘详情">
|
165
|
|
- {getFieldDecorator('avatarImage', {
|
166
|
|
- rules: [{ required: true, message: '请选择项目主图' }],
|
167
|
|
- })(
|
168
|
|
- <ImageListUpload unlimited />,
|
169
|
|
- )}
|
170
|
|
- </Form.Item>
|
171
|
|
- <Form.Item label="楼盘封面图" help="建议图片尺寸:750*420px,比例16:9,格式:jpg,用于楼盘列表">
|
172
|
|
- {getFieldDecorator('listImage', {
|
173
|
|
- rules: [{ required: true, message: '请选择列表图' }],
|
174
|
|
- })(
|
175
|
|
- <ImageUpload />,
|
176
|
|
- )}
|
177
|
|
- </Form.Item>
|
178
|
|
- <FormGroupItem>
|
179
|
|
- <Form.Item label="首页推荐" {...gourpItemLayout.ab.a} >
|
180
|
|
- {getFieldDecorator('isMain', { initialValue: 1 })(
|
181
|
|
- <Radio.Group>
|
182
|
|
- <Radio value={1}>是</Radio>
|
183
|
|
- <Radio value={2}>否</Radio>
|
184
|
|
- </Radio.Group>,
|
|
151
|
+ <Form.Item label="项目标签" >
|
|
152
|
+ {getFieldDecorator('tag')(
|
|
153
|
+ <Select mode="tags" placeholder="输入后选中" style={fullWidth} />
|
185
|
154
|
)}
|
186
|
155
|
</Form.Item>
|
187
|
|
- <Form.Item label="排序" help="数值越大,楼盘在小程序列表页中展示越靠前" {...gourpItemLayout.ab.b}>
|
188
|
|
- {getFieldDecorator('orderNo')(<InputNumber min={0} style={fullWidth} />)}
|
189
|
|
- </Form.Item>
|
190
|
|
- </FormGroupItem>
|
191
|
|
- <FormGroupItem>
|
192
|
|
- <Form.Item label="所在城市" {...gourpItemLayout.ab.a } >
|
193
|
|
- {getFieldDecorator('cityId', {
|
194
|
|
- rules: [{ required: true, message: '请选择城市' }],
|
|
156
|
+
|
|
157
|
+ <FormGroupItem>
|
|
158
|
+ <Form.Item label="项目视频" help="视频仅支持mp4格式,建议尺寸:750*600,比例5:4,用于楼盘详情" {...gourpItemLayout.ab.a} >
|
|
159
|
+ {getFieldDecorator('videoUrl')(
|
|
160
|
+ <FileUpload accept=".mp4" beforeUpload={fileUploadBeforeUpload} label="上传视频" size={1} />,
|
|
161
|
+ )}
|
|
162
|
+ </Form.Item>
|
|
163
|
+ <Form.Item label="视频封面图" help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于视频封面" labelCol={{span: 8}} wrapperCol={{span:16}}>
|
|
164
|
+ {getFieldDecorator('videoImage')(
|
|
165
|
+ <ImageUpload />,
|
|
166
|
+ )}
|
|
167
|
+ </Form.Item>
|
|
168
|
+ </FormGroupItem>
|
|
169
|
+ <Form.Item label="楼盘主图" help="建议图片尺寸:750*600px,比例5:4,格式:jpg,用于楼盘详情">
|
|
170
|
+ {getFieldDecorator('avatarImage', {
|
|
171
|
+ rules: [{ required: true, message: '请选择项目主图' }],
|
195
|
172
|
})(
|
196
|
|
- <SelectCity style={fullWidth} />,
|
|
173
|
+ <ImageListUpload unlimited />,
|
197
|
174
|
)}
|
198
|
175
|
</Form.Item>
|
199
|
|
- <Form.Item label="楼盘区域" {...gourpItemLayout.ab.b } >
|
200
|
|
- {getFieldDecorator('buildingArea', {
|
201
|
|
- rules: [{ required: true, message: '请输入楼盘区域' }],
|
202
|
|
- })(<AreaSelect style={fullWidth} />)}
|
203
|
|
- </Form.Item>
|
204
|
|
- </FormGroupItem>
|
205
|
|
- <Form.Item label="项目地址" >
|
206
|
|
- {getFieldDecorator('address', {
|
207
|
|
- rules: [{ required: true, message: '请输入项目地址' }],
|
208
|
|
- })(<Input />)}
|
209
|
|
- </Form.Item>
|
210
|
|
- <Form.Item label="项目坐标" >
|
211
|
|
- {getFieldDecorator('coordinate', {
|
212
|
|
- rules: [{ required: true, message: '请输入项目坐标' }],
|
213
|
|
- })(<Amap onChange={e => setFieldsValue({ coordinate: e })} />)}
|
214
|
|
- </Form.Item>
|
215
|
|
- <Form.Item label="周边范围" >
|
216
|
|
- {getFieldDecorator('mapScope', {
|
217
|
|
- rules: [{ required: true, message: '请选择周边设施搜索范围' }],
|
218
|
|
- })(
|
219
|
|
- <Select placeholder="周边设施搜索范围" style={fullWidth} onChange={handleMapScopeChange}>
|
220
|
|
- <Select.Option value={1000}>1公里</Select.Option>
|
221
|
|
- <Select.Option value={3000}>3公里</Select.Option>
|
222
|
|
- <Select.Option value={5000}>5公里</Select.Option>
|
223
|
|
- <Select.Option value={10000}>10公里</Select.Option>
|
224
|
|
- </Select>,
|
225
|
|
- )}
|
226
|
|
- </Form.Item>
|
227
|
|
- <Spin spinning={loading.arround}>
|
228
|
|
- <Form.Item label="周边交通" >
|
229
|
|
- <EditableArround
|
230
|
|
- tags={tags.buildingTransport}
|
231
|
|
- onChange={(e) => updateTags('buildingTransport', e)}
|
232
|
|
- onDelete={(tag) => deleteTag('buildingTransport', tag)}
|
233
|
|
- onPoiDelete={(poi) => deletePoi('Transport', poi)}
|
234
|
|
- />
|
235
|
|
- </Form.Item>
|
236
|
|
- <Form.Item label="周边商业" >
|
237
|
|
- <EditableArround
|
238
|
|
- tags={tags.buildingMall}
|
239
|
|
- onChange={(e) => updateTags('buildingMall', e)}
|
240
|
|
- onDelete={(tag) => deleteTag('buildingMall', tag)}
|
241
|
|
- onPoiDelete={(poi) => deletePoi('Mall', poi)}
|
242
|
|
- />
|
243
|
|
- </Form.Item>
|
244
|
|
- <Form.Item label="周边学校" >
|
245
|
|
- <EditableArround
|
246
|
|
- tags={tags.buildingEdu}
|
247
|
|
- onChange={(e) => updateTags('buildingEdu', e)}
|
248
|
|
- onDelete={(tag) => deleteTag('buildingEdu', tag)}
|
249
|
|
- onPoiDelete={(poi) => deletePoi('Edu', poi)}
|
250
|
|
- />
|
251
|
|
- </Form.Item>
|
252
|
|
- <Form.Item label="周边医院" >
|
253
|
|
- <EditableArround
|
254
|
|
- tags={tags.buildingHospital}
|
255
|
|
- onChange={(e) => updateTags('buildingHospital', e)}
|
256
|
|
- onDelete={(tag) => deleteTag('buildingHospital', tag)}
|
257
|
|
- onPoiDelete={(poi) => deletePoi('Hospital', poi)}
|
258
|
|
- />
|
259
|
|
- </Form.Item>
|
260
|
|
- <Form.Item label="周边银行" >
|
261
|
|
- <EditableArround
|
262
|
|
- tags={tags.buildingBank}
|
263
|
|
- onChange={(e) => updateTags('buildingBank', e)}
|
264
|
|
- onDelete={(tag) => deleteTag('buildingBank', tag)}
|
265
|
|
- onPoiDelete={(poi) => deletePoi('Bank', poi)}
|
266
|
|
- />
|
267
|
|
- </Form.Item>
|
268
|
|
- <Form.Item label="周边餐饮" >
|
269
|
|
- <EditableArround
|
270
|
|
- tags={tags.buildingRestaurant}
|
271
|
|
- onChange={(e) => updateTags('buildingRestaurant', e)}
|
272
|
|
- onDelete={(tag) => deleteTag('buildingRestaurant', tag)}
|
273
|
|
- onPoiDelete={(poi) => deletePoi('Restaurant', poi)}
|
274
|
|
- />
|
275
|
|
- </Form.Item>
|
276
|
|
- </Spin>
|
277
|
|
- <FormGroupItem>
|
278
|
|
- <Form.Item label="绿化率" {...gourpItemLayout.ab.a } >
|
279
|
|
- {getFieldDecorator('greeningRate')(<Input />)}
|
280
|
|
- </Form.Item>
|
281
|
|
- <Form.Item label="容积率" {...gourpItemLayout.ab.b }>
|
282
|
|
- {getFieldDecorator('volumeRate')(<Input />)}
|
|
176
|
+ <Form.Item label="楼盘封面图" help="建议图片尺寸:750*420px,比例16:9,格式:jpg,用于楼盘列表">
|
|
177
|
+ {getFieldDecorator('listImage', {
|
|
178
|
+ rules: [{ required: true, message: '请选择列表图' }],
|
|
179
|
+ })(
|
|
180
|
+ <ImageUpload />,
|
|
181
|
+ )}
|
283
|
182
|
</Form.Item>
|
284
|
|
- </FormGroupItem>
|
285
|
|
- <FormGroupItem>
|
286
|
|
- <Form.Item label="车位数量" {...gourpItemLayout.ab.a }>
|
287
|
|
- {getFieldDecorator('parkingRate', {
|
288
|
|
- rules: [{ validator: validMinNum }]
|
289
|
|
- })(<InputNumber min={0} style={fullWidth}/>)}
|
|
183
|
+ <FormGroupItem>
|
|
184
|
+ <Form.Item label="首页推荐" {...gourpItemLayout.ab.a} >
|
|
185
|
+ {getFieldDecorator('isMain', { initialValue: 1 })(
|
|
186
|
+ <Radio.Group>
|
|
187
|
+ <Radio value={1}>是</Radio>
|
|
188
|
+ <Radio value={2}>否</Radio>
|
|
189
|
+ </Radio.Group>,
|
|
190
|
+ )}
|
|
191
|
+ </Form.Item>
|
|
192
|
+ <Form.Item label="排序" help="数值越大,楼盘在小程序列表页中展示越靠前" {...gourpItemLayout.ab.b}>
|
|
193
|
+ {getFieldDecorator('orderNo')(<InputNumber min={0} style={fullWidth} />)}
|
|
194
|
+ </Form.Item>
|
|
195
|
+ </FormGroupItem>
|
|
196
|
+ <FormGroupItem>
|
|
197
|
+ <Form.Item label="所在城市" {...gourpItemLayout.ab.a } >
|
|
198
|
+ {getFieldDecorator('cityId', {
|
|
199
|
+ rules: [{ required: true, message: '请选择城市' }],
|
|
200
|
+ })(
|
|
201
|
+ <SelectCity style={fullWidth} />,
|
|
202
|
+ )}
|
|
203
|
+ </Form.Item>
|
|
204
|
+ <Form.Item label="楼盘区域" {...gourpItemLayout.ab.b } >
|
|
205
|
+ {getFieldDecorator('buildingArea', {
|
|
206
|
+ rules: [{ required: true, message: '请输入楼盘区域' }],
|
|
207
|
+ })(<AreaSelect style={fullWidth} />)}
|
|
208
|
+ </Form.Item>
|
|
209
|
+ </FormGroupItem>
|
|
210
|
+ <Form.Item label="项目地址" >
|
|
211
|
+ {getFieldDecorator('address', {
|
|
212
|
+ rules: [{ required: true, message: '请输入项目地址' }],
|
|
213
|
+ })(<Input />)}
|
290
|
214
|
</Form.Item>
|
291
|
|
- <Form.Item label="规划户数" {...gourpItemLayout.ab.b }>
|
292
|
|
- {getFieldDecorator('familyNum', {
|
293
|
|
- rules: [{ validator: validMinNum }]
|
294
|
|
- })(<InputNumber min={0} style={fullWidth}/>)}
|
|
215
|
+ <Form.Item label="项目坐标" >
|
|
216
|
+ {getFieldDecorator('coordinate', {
|
|
217
|
+ rules: [{ required: true, message: '请输入项目坐标' }],
|
|
218
|
+ })(<Amap onChange={e => setFieldsValue({ coordinate: e })} />)}
|
295
|
219
|
</Form.Item>
|
296
|
|
- </FormGroupItem>
|
297
|
|
- <FormGroupItem>
|
298
|
|
- <Form.Item label="供水" {...gourpItemLayout.abc.a }>
|
299
|
|
- {getFieldDecorator('waterSupply')(
|
300
|
|
- <Select style={fullWidth}>
|
301
|
|
- <Select.Option value="民水">民水</Select.Option>
|
302
|
|
- <Select.Option value="商用">商用</Select.Option>
|
303
|
|
- </Select>
|
|
220
|
+ <Form.Item label="周边范围" >
|
|
221
|
+ {getFieldDecorator('mapScope', {
|
|
222
|
+ rules: [{ required: true, message: '请选择周边设施搜索范围' }],
|
|
223
|
+ })(
|
|
224
|
+ <Select placeholder="周边设施搜索范围" style={fullWidth} onChange={handleMapScopeChange}>
|
|
225
|
+ <Select.Option value={1000}>1公里</Select.Option>
|
|
226
|
+ <Select.Option value={3000}>3公里</Select.Option>
|
|
227
|
+ <Select.Option value={5000}>5公里</Select.Option>
|
|
228
|
+ <Select.Option value={10000}>10公里</Select.Option>
|
|
229
|
+ </Select>,
|
304
|
230
|
)}
|
305
|
231
|
</Form.Item>
|
306
|
|
- <Form.Item label="供电" {...gourpItemLayout.abc.b }>
|
307
|
|
- {getFieldDecorator('powerSupply')(
|
308
|
|
- <Select style={fullWidth}>
|
309
|
|
- <Select.Option value="民电">民电</Select.Option>
|
310
|
|
- <Select.Option value="商用">商用</Select.Option>
|
311
|
|
- </Select>
|
312
|
|
- )}
|
|
232
|
+ <Spin spinning={loading.arround}>
|
|
233
|
+ <Form.Item label="周边交通" >
|
|
234
|
+ <EditableArround
|
|
235
|
+ type="Transport"
|
|
236
|
+ pois={pois.Transport}
|
|
237
|
+ tags={arrounds.buildingTransport}
|
|
238
|
+ onChange={(e) => updateArrounds('buildingTransport', e)}
|
|
239
|
+ onDelete={deleteArround}
|
|
240
|
+ onPoiDelete={(poi) => deletePoi('Transport', poi)}
|
|
241
|
+ />
|
|
242
|
+ </Form.Item>
|
|
243
|
+ <Form.Item label="周边商业" >
|
|
244
|
+ <EditableArround
|
|
245
|
+ type="Mall"
|
|
246
|
+ pois={pois.Mall}
|
|
247
|
+ tags={arrounds.buildingMall}
|
|
248
|
+ onChange={(e) => updateArrounds('buildingMall', e)}
|
|
249
|
+ onDelete={deleteArround}
|
|
250
|
+ onPoiDelete={(poi) => deletePoi('Mall', poi)}
|
|
251
|
+ />
|
|
252
|
+ </Form.Item>
|
|
253
|
+ <Form.Item label="周边学校" >
|
|
254
|
+ <EditableArround
|
|
255
|
+ type="Edu"
|
|
256
|
+ pois={pois.Edu}
|
|
257
|
+ tags={arrounds.buildingEdu}
|
|
258
|
+ onChange={(e) => updateArrounds('buildingEdu', e)}
|
|
259
|
+ onDelete={deleteArround}
|
|
260
|
+ onPoiDelete={(poi) => deletePoi('Edu', poi)}
|
|
261
|
+ />
|
|
262
|
+ </Form.Item>
|
|
263
|
+ <Form.Item label="周边医院" >
|
|
264
|
+ <EditableArround
|
|
265
|
+ type="Hospital"
|
|
266
|
+ pois={pois.Hospital}
|
|
267
|
+ tags={arrounds.buildingHospital}
|
|
268
|
+ onChange={(e) => updateArrounds('buildingHospital', e)}
|
|
269
|
+ onDelete={deleteArround}
|
|
270
|
+ onPoiDelete={(poi) => deletePoi('Hospital', poi)}
|
|
271
|
+ />
|
|
272
|
+ </Form.Item>
|
|
273
|
+ <Form.Item label="周边银行" >
|
|
274
|
+ <EditableArround
|
|
275
|
+ type="Bank"
|
|
276
|
+ pois={pois.Bank}
|
|
277
|
+ tags={arrounds.buildingBank}
|
|
278
|
+ onChange={(e) => updateArrounds('buildingBank', e)}
|
|
279
|
+ onDelete={deleteArround}
|
|
280
|
+ onPoiDelete={(poi) => deletePoi('Bank', poi)}
|
|
281
|
+ />
|
|
282
|
+ </Form.Item>
|
|
283
|
+ <Form.Item label="周边餐饮" >
|
|
284
|
+ <EditableArround
|
|
285
|
+ type="Restaurant"
|
|
286
|
+ pois={pois.Restaurant}
|
|
287
|
+ tags={arrounds.buildingRestaurant}
|
|
288
|
+ onChange={(e) => updateArrounds('buildingRestaurant', e)}
|
|
289
|
+ onDelete={deleteArround}
|
|
290
|
+ onPoiDelete={(poi) => deletePoi('Restaurant', poi)}
|
|
291
|
+ />
|
|
292
|
+ </Form.Item>
|
|
293
|
+ </Spin>
|
|
294
|
+ <FormGroupItem>
|
|
295
|
+ <Form.Item label="绿化率" {...gourpItemLayout.ab.a } >
|
|
296
|
+ {getFieldDecorator('greeningRate')(<Input />)}
|
|
297
|
+ </Form.Item>
|
|
298
|
+ <Form.Item label="容积率" {...gourpItemLayout.ab.b }>
|
|
299
|
+ {getFieldDecorator('volumeRate')(<Input />)}
|
|
300
|
+ </Form.Item>
|
|
301
|
+ </FormGroupItem>
|
|
302
|
+ <FormGroupItem>
|
|
303
|
+ <Form.Item label="车位数量" {...gourpItemLayout.ab.a }>
|
|
304
|
+ {getFieldDecorator('parkingRate', {
|
|
305
|
+ rules: [{ validator: validMinNum }]
|
|
306
|
+ })(<InputNumber min={0} style={fullWidth}/>)}
|
|
307
|
+ </Form.Item>
|
|
308
|
+ <Form.Item label="规划户数" {...gourpItemLayout.ab.b }>
|
|
309
|
+ {getFieldDecorator('familyNum', {
|
|
310
|
+ rules: [{ validator: validMinNum }]
|
|
311
|
+ })(<InputNumber min={0} style={fullWidth}/>)}
|
|
312
|
+ </Form.Item>
|
|
313
|
+ </FormGroupItem>
|
|
314
|
+ <FormGroupItem>
|
|
315
|
+ <Form.Item label="供水" {...gourpItemLayout.abc.a }>
|
|
316
|
+ {getFieldDecorator('waterSupply')(
|
|
317
|
+ <Select style={fullWidth}>
|
|
318
|
+ <Select.Option value="民水">民水</Select.Option>
|
|
319
|
+ <Select.Option value="商用">商用</Select.Option>
|
|
320
|
+ </Select>
|
|
321
|
+ )}
|
|
322
|
+ </Form.Item>
|
|
323
|
+ <Form.Item label="供电" {...gourpItemLayout.abc.b }>
|
|
324
|
+ {getFieldDecorator('powerSupply')(
|
|
325
|
+ <Select style={fullWidth}>
|
|
326
|
+ <Select.Option value="民电">民电</Select.Option>
|
|
327
|
+ <Select.Option value="商用">商用</Select.Option>
|
|
328
|
+ </Select>
|
|
329
|
+ )}
|
|
330
|
+ </Form.Item>
|
|
331
|
+ <Form.Item label="供暖" {...gourpItemLayout.abc.c }>
|
|
332
|
+ {getFieldDecorator('heatingSupply')(
|
|
333
|
+ <Select style={fullWidth}>
|
|
334
|
+ <Select.Option value="集中供暖">集中供暖</Select.Option>
|
|
335
|
+ <Select.Option value="自采暖">自采暖</Select.Option>
|
|
336
|
+ </Select>
|
|
337
|
+ )}
|
|
338
|
+ </Form.Item>
|
|
339
|
+ </FormGroupItem>
|
|
340
|
+ <Form.Item label="物业公司" >
|
|
341
|
+ {getFieldDecorator('serviceCompany', {
|
|
342
|
+ rules: [{ max: 30, message: '不超过30个字' }]
|
|
343
|
+ })(<Input placeholder="不超过30个字"/>)}
|
313
|
344
|
</Form.Item>
|
314
|
|
- <Form.Item label="供暖" {...gourpItemLayout.abc.c }>
|
315
|
|
- {getFieldDecorator('heatingSupply')(
|
316
|
|
- <Select style={fullWidth}>
|
317
|
|
- <Select.Option value="集中供暖">集中供暖</Select.Option>
|
318
|
|
- <Select.Option value="自采暖">自采暖</Select.Option>
|
319
|
|
- </Select>
|
320
|
|
- )}
|
|
345
|
+ <Form.Item label="物业费" >
|
|
346
|
+ {getFieldDecorator('serviceFee', {
|
|
347
|
+ rules: [{ max: 30, message: '不超过30个字' }]
|
|
348
|
+ })(<Input placeholder="不超过30个字"/>)}
|
321
|
349
|
</Form.Item>
|
322
|
|
- </FormGroupItem>
|
323
|
|
- <Form.Item label="物业公司" >
|
324
|
|
- {getFieldDecorator('serviceCompany', {
|
325
|
|
- rules: [{ max: 30, message: '不超过30个字' }]
|
326
|
|
- })(<Input placeholder="不超过30个字"/>)}
|
327
|
|
- </Form.Item>
|
328
|
|
- <Form.Item label="物业费" >
|
329
|
|
- {getFieldDecorator('serviceFee', {
|
330
|
|
- rules: [{ max: 30, message: '不超过30个字' }]
|
331
|
|
- })(<Input placeholder="不超过30个字"/>)}
|
332
|
|
- </Form.Item>
|
333
|
|
- <FormGroupItem>
|
334
|
|
- <Form.Item label="装修标准" {...gourpItemLayout.ab.a }>
|
335
|
|
- {getFieldDecorator('decoration')(
|
336
|
|
- <Select style={fullWidth}>
|
337
|
|
- <Select.Option value="精装">精装</Select.Option>
|
338
|
|
- <Select.Option value="毛坯">毛坯</Select.Option>
|
339
|
|
- </Select>
|
340
|
|
- )}
|
|
350
|
+ <FormGroupItem>
|
|
351
|
+ <Form.Item label="装修标准" {...gourpItemLayout.ab.a }>
|
|
352
|
+ {getFieldDecorator('decoration')(
|
|
353
|
+ <Select style={fullWidth}>
|
|
354
|
+ <Select.Option value="精装">精装</Select.Option>
|
|
355
|
+ <Select.Option value="毛坯">毛坯</Select.Option>
|
|
356
|
+ </Select>
|
|
357
|
+ )}
|
|
358
|
+ </Form.Item>
|
|
359
|
+ <Form.Item label="楼栋总数" {...gourpItemLayout.ab.b }>
|
|
360
|
+ {getFieldDecorator('buildingNum', {
|
|
361
|
+ rules: [{ validator: validMinNum }]
|
|
362
|
+ })(<InputNumber style={fullWidth}/>)}
|
|
363
|
+ </Form.Item>
|
|
364
|
+ </FormGroupItem>
|
|
365
|
+ <FormGroupItem>
|
|
366
|
+ <Form.Item label="交房时间" {...gourpItemLayout.ab.a }>
|
|
367
|
+ {getFieldDecorator('receivedDate')(<DatePicker style={fullWidth}/>)}
|
|
368
|
+ </Form.Item>
|
|
369
|
+ <Form.Item label="产权年限" {...gourpItemLayout.ab.b }>
|
|
370
|
+ {getFieldDecorator('rightsYear', {
|
|
371
|
+ rules: [{ validator: validMinNum }]
|
|
372
|
+ })(<InputNumber style={fullWidth}/>)}
|
|
373
|
+ </Form.Item>
|
|
374
|
+ </FormGroupItem>
|
|
375
|
+ <Form.Item label="品牌开发商" help="【品牌开发商】与【开发商】二选一">
|
|
376
|
+ {getFieldDecorator('brandId')(<Select style={fullWidth}></Select>)}
|
341
|
377
|
</Form.Item>
|
342
|
|
- <Form.Item label="楼栋总数" {...gourpItemLayout.ab.b }>
|
343
|
|
- {getFieldDecorator('buildingNum', {
|
344
|
|
- rules: [{ validator: validMinNum }]
|
345
|
|
- })(<InputNumber style={fullWidth}/>)}
|
|
378
|
+ <Form.Item label="开发商" >
|
|
379
|
+ {getFieldDecorator('propertyDeveloper', {
|
|
380
|
+ rules: [{ max: 30, message: '不超过30个字' }]
|
|
381
|
+ })(<Input placeholder="不超过30个字"/>)}
|
346
|
382
|
</Form.Item>
|
347
|
|
- </FormGroupItem>
|
348
|
|
- <FormGroupItem>
|
349
|
|
- <Form.Item label="交房时间" {...gourpItemLayout.ab.a }>
|
350
|
|
- {getFieldDecorator('receivedDate')(<DatePicker style={fullWidth}/>)}
|
|
383
|
+ <Form.Item label="备案名" >
|
|
384
|
+ {getFieldDecorator('recordName', {
|
|
385
|
+ rules: [{ max: 30, message: '不超过30个字' }]
|
|
386
|
+ })(<Input placeholder="不超过30个字" />)}
|
351
|
387
|
</Form.Item>
|
352
|
|
- <Form.Item label="产权年限" {...gourpItemLayout.ab.b }>
|
353
|
|
- {getFieldDecorator('rightsYear', {
|
354
|
|
- rules: [{ validator: validMinNum }]
|
355
|
|
- })(<InputNumber style={fullWidth}/>)}
|
|
388
|
+ <Form.Item label="预售许可证" >
|
|
389
|
+ {getFieldDecorator('preSalePermit')(
|
|
390
|
+ <ImageUpload />,
|
|
391
|
+ )}
|
356
|
392
|
</Form.Item>
|
357
|
|
- </FormGroupItem>
|
358
|
|
- <Form.Item label="品牌开发商" help="【品牌开发商】与【开发商】二选一">
|
359
|
|
- {getFieldDecorator('brandId')(<Select style={fullWidth}></Select>)}
|
360
|
|
- </Form.Item>
|
361
|
|
- <Form.Item label="开发商" >
|
362
|
|
- {getFieldDecorator('propertyDeveloper', {
|
363
|
|
- rules: [{ max: 30, message: '不超过30个字' }]
|
364
|
|
- })(<Input placeholder="不超过30个字"/>)}
|
365
|
|
- </Form.Item>
|
366
|
|
- <Form.Item label="备案名" >
|
367
|
|
- {getFieldDecorator('recordName', {
|
368
|
|
- rules: [{ max: 30, message: '不超过30个字' }]
|
369
|
|
- })(<Input placeholder="不超过30个字" />)}
|
370
|
|
- </Form.Item>
|
371
|
|
- <Form.Item label="预售许可证" >
|
372
|
|
- {getFieldDecorator('preSalePermit')(
|
373
|
|
- <ImageUpload />,
|
374
|
|
- )}
|
375
|
|
- </Form.Item>
|
376
|
393
|
|
377
|
|
- <Form.Item label=" " colon={false}>
|
378
|
|
- <Button style={{marginLeft: '6em'}} type="primary" htmlType="submit">
|
379
|
|
- 确定
|
380
|
|
- </Button>
|
381
|
|
- <Button style={{marginLeft: '2em'}} onClick={() => router.go(-1)}>
|
382
|
|
- 取消
|
383
|
|
- </Button>
|
384
|
|
- </Form.Item>
|
385
|
|
- </Form>
|
|
394
|
+ <Form.Item label=" " colon={false}>
|
|
395
|
+ <Button style={{marginLeft: '6em'}} type="primary" htmlType="submit">
|
|
396
|
+ 确定
|
|
397
|
+ </Button>
|
|
398
|
+ <Button style={{marginLeft: '2em'}} onClick={() => router.go(-1)}>
|
|
399
|
+ 取消
|
|
400
|
+ </Button>
|
|
401
|
+ </Form.Item>
|
|
402
|
+ </Form>
|
|
403
|
+ </Spin>
|
386
|
404
|
)
|
387
|
405
|
})
|
388
|
406
|
|