|
@@ -61,7 +61,7 @@ class TypeForm extends React.Component {
|
61
|
61
|
position: 'relative',
|
62
|
62
|
border: '1px solid #eee',
|
63
|
63
|
borderRadius: '4px',
|
64
|
|
- marginTop:'16px'
|
|
64
|
+ marginTop: '16px',
|
65
|
65
|
}}>
|
66
|
66
|
|
67
|
67
|
<p style={{ padding: '20px', borderBottom: '1px solid #eee' }}>{this.props.type.buildingTypeName || ''} <Button type="link" style={{ position: 'absolute', right: '16px' }} icon="close" onClick={() => this.close()} /></p>
|
|
@@ -140,6 +140,7 @@ class ProjectTypeBody extends React.Component {
|
140
|
140
|
const updateProjectDate = this.updateProjectType(tempDate)
|
141
|
141
|
console.log('updateProjectDate: ', updateProjectDate)
|
142
|
142
|
this.setState({ data: updateProjectDate })
|
|
143
|
+ this.setState({ defaultCheckboxValue: updateProjectDate.map(item => item.buildingTypeId) })
|
143
|
144
|
}
|
144
|
145
|
|
145
|
146
|
onClose = e => {
|
|
@@ -239,7 +240,7 @@ class ProjectTypeBody extends React.Component {
|
239
|
240
|
onOk={this.handleOk}
|
240
|
241
|
onCancel={this.handleCancel}
|
241
|
242
|
>
|
242
|
|
- <Checkbox.Group options={this.state.projectType.map(item => ({ label: item.buildingTypeName, value: item.buildingTypeId }))} defaultValue={this.state.defaultCheckboxValue} onChange={e => this.onCheckboxChange(e)} />
|
|
243
|
+ <Checkbox.Group options={this.state.projectType.map(item => ({ label: item.buildingTypeName, value: item.buildingTypeId }))} onChange={e => this.onCheckboxChange(e)} value={this.state.defaultCheckboxValue}/>
|
243
|
244
|
</Modal>
|
244
|
245
|
<Row type="flex" justify="space-between">
|
245
|
246
|
{
|