|
@@ -125,6 +125,12 @@ class buildingStats extends React.Component {
|
125
|
125
|
});
|
126
|
126
|
}
|
127
|
127
|
|
|
128
|
+ //重置搜索
|
|
129
|
+ handleReset = () => {
|
|
130
|
+ daterange = []
|
|
131
|
+ this.props.form.resetFields();
|
|
132
|
+ }
|
|
133
|
+
|
128
|
134
|
render() {
|
129
|
135
|
const columns = [
|
130
|
136
|
{
|
|
@@ -170,25 +176,36 @@ class buildingStats extends React.Component {
|
170
|
176
|
},
|
171
|
177
|
];
|
172
|
178
|
|
|
179
|
+ const { getFieldDecorator } = this.props.form;
|
173
|
180
|
return (
|
174
|
|
- <div>
|
175
|
|
- <Radio.Group buttonStyle="solid" defaultValue="a">
|
|
181
|
+
|
|
182
|
+ <div>
|
|
183
|
+ <Form layout="inline">
|
|
184
|
+ <Radio.Group buttonStyle="solid" defaultValue="a">
|
176
|
185
|
<Radio.Button value="c" onClick={() => this.getDataOf(0)}>今日</Radio.Button>
|
177
|
186
|
<Radio.Button value="a" onClick={() => this.getDataOf(7)}>最近7天</Radio.Button>
|
178
|
187
|
<Radio.Button value="b" onClick={() => this.getDataOf(30)}>最近1月</Radio.Button>
|
179
|
188
|
</Radio.Group>
|
180
|
|
- <RangePicker
|
181
|
|
- style={{ paddingLeft: '30px' }}
|
182
|
|
- ranges={{
|
183
|
|
- Today: [moment(), moment()],
|
184
|
|
- 'This Month': [moment().startOf('month'), moment().endOf('month')],
|
185
|
|
- }}
|
186
|
|
- onChange={(_dates, dateStrings) => this.onChangetime(_dates, dateStrings)}
|
187
|
|
- />
|
|
189
|
+ <Form.Item>
|
|
190
|
+ {getFieldDecorator('time', {
|
|
191
|
+ initialValue: [],
|
|
192
|
+ rules: [{ required: true, message: '请上传封面图1' }],
|
|
193
|
+ })(
|
|
194
|
+ <RangePicker
|
|
195
|
+ style={{ paddingLeft: '30px' }}
|
|
196
|
+ ranges={{
|
|
197
|
+ Today: [moment(), moment()],
|
|
198
|
+ 'This Month': [moment().startOf('month'), moment().endOf('month')],
|
|
199
|
+ }}
|
|
200
|
+ onChange={(_dates, dateStrings) => this.onChangetime(_dates, dateStrings)}
|
|
201
|
+ />
|
|
202
|
+ )}
|
|
203
|
+ </Form.Item>
|
188
|
204
|
<Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }} onClick={() => this.datalist()}>
|
189
|
205
|
查询
|
190
|
206
|
</Button>
|
191
|
|
- <Button type="danger" onClick={() => router.go(-1)} style={{ marginBottom: '18px', marginLeft: '30px' }}>重置</Button>
|
|
207
|
+ <Button type="danger" onClick={this.handleReset} style={{ marginBottom: '18px', marginLeft: '30px' }}>重置</Button>
|
|
208
|
+ </Form>
|
192
|
209
|
<div style={{fontSize:'0.09rem',color:'#999',marginBottom:'0.16rem'}}>最多显示6个项目,其他项目请在下方详细数据中搜索</div>
|
193
|
210
|
<Row>
|
194
|
211
|
<Col span={12} style={{paddingRight:'0.08rem'}}>
|
|
@@ -225,4 +242,6 @@ class buildingStats extends React.Component {
|
225
|
242
|
}
|
226
|
243
|
}
|
227
|
244
|
|
228
|
|
-export default buildingStats
|
|
245
|
+const WrappedHeader = Form.create({ name: 'record' })(buildingStats);
|
|
246
|
+
|
|
247
|
+export default WrappedHeader
|