下拉框联动
This commit is contained in:
parent
8efa4eed57
commit
b7db54524a
@ -107,12 +107,6 @@ const Guide: React.FC<Props> = (props) => {
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
{/* <Row>
|
||||
<Typography.Title level={3} className={styles.title}>
|
||||
欢迎使用 <strong>{name}</strong> !
|
||||
</Typography.Title>
|
||||
</Row> */}
|
||||
|
||||
{/* 顶部信息 */}
|
||||
<div className={styles.homepageMsg}>
|
||||
<div className={styles.homepageMsgItem}>您已注册<span className={styles.homepageMsgItemSpan}>{registerDays}</span>天</div>
|
||||
|
@ -356,9 +356,13 @@ class BaseMap extends React.Component{
|
||||
this.getCityByProvince(`${provinceAdcode}`);
|
||||
this.hideHeatMap();
|
||||
this.setState ({
|
||||
provinceAdcode: `${provinceAdcode}`,
|
||||
provinceLabel: data.label,
|
||||
provinceAdcode: provinceAdcode ? `${provinceAdcode}` : '',
|
||||
provinceLabel: data ? data.label : '',
|
||||
zoom: 4,
|
||||
districtList: [],//区
|
||||
cityAdcode:'',//选中的市
|
||||
cityLabel: '',
|
||||
districtAdcode: '',
|
||||
})
|
||||
}
|
||||
// 获取市
|
||||
@ -399,11 +403,13 @@ class BaseMap extends React.Component{
|
||||
this.refs.getLayerDataFun.getBasicLayerMenu(`${cityAdcode}`);
|
||||
data && this.gotoCity(data);
|
||||
this.hideHeatMap();
|
||||
|
||||
this.setState ({
|
||||
cityAdcode: `${cityAdcode}`,
|
||||
cityLabel: data.label,
|
||||
cityAdcode: cityAdcode ? `${cityAdcode}` : '',
|
||||
cityLabel: data ? data.label : '',
|
||||
center: data && [parseFloat(data.lat), parseFloat(data.len)],
|
||||
zoom: 10,
|
||||
districtAdcode: ''
|
||||
})
|
||||
}
|
||||
// 获取区
|
||||
@ -444,7 +450,7 @@ class BaseMap extends React.Component{
|
||||
data && this.gotoCity(data);
|
||||
this.hideHeatMap();
|
||||
this.setState({
|
||||
districtAdcode: `${provinceAdcode}`,
|
||||
districtAdcode: provinceAdcode ? `${provinceAdcode}` : '',
|
||||
center: data && [parseFloat(data.lat), parseFloat(data.len)],
|
||||
zoom: 13,
|
||||
})
|
||||
@ -522,9 +528,9 @@ class BaseMap extends React.Component{
|
||||
<Col span={12}>
|
||||
<Input.Group compact style={{display:"inline"}}>
|
||||
<label className={styles.labelForm}>行政区域:</label>
|
||||
<Select style={{width: 120, marginLeft: 18}} onChange={this.onProvinceChange} options={this.state.provinceList} allowClear/>
|
||||
<Select style={{width: 120, marginLeft: 18}} onChange={this.onCityChange} options={this.state.cityList} allowClear/>
|
||||
<Select style={{width: 120, marginLeft: 18}} onChange={this.onDistrictChange} options={this.state.districtList} allowClear/>
|
||||
<Select style={{width: 120, marginLeft: 18}} onChange={this.onProvinceChange} options={this.state.provinceList} value={this.state.provinceAdcode} allowClear/>
|
||||
<Select style={{width: 120, marginLeft: 18}} onChange={this.onCityChange} options={this.state.cityList} value={this.state.cityAdcode} allowClear/>
|
||||
<Select style={{width: 120, marginLeft: 18}} onChange={this.onDistrictChange} options={this.state.districtList} value={this.state.districtAdcode} allowClear/>
|
||||
</Input.Group>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
|
Loading…
Reference in New Issue
Block a user