|
@@ -1,5 +1,5 @@
|
1
|
1
|
import React, { useState, useEffect } from 'react';
|
2
|
|
-import { Form, Select, Modal, Button, Table, Divider, Tag, Input } from 'antd';
|
|
2
|
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input,Row,Col } from 'antd';
|
3
|
3
|
import { apis, fetch } from '../../utils/request';
|
4
|
4
|
|
5
|
5
|
const { Column, ColumnGroup } = Table;
|
|
@@ -64,6 +64,11 @@ export default props => {
|
64
|
64
|
setVisible(false)
|
65
|
65
|
}
|
66
|
66
|
|
|
67
|
+ const clearVal = val => {
|
|
68
|
+ onChange(val)
|
|
69
|
+ setVisible(false)
|
|
70
|
+ }
|
|
71
|
+
|
67
|
72
|
const columns = [
|
68
|
73
|
{
|
69
|
74
|
title: '标题',
|
|
@@ -94,14 +99,24 @@ export default props => {
|
94
|
99
|
onCancel={() => setVisible(false)}
|
95
|
100
|
footer={[]}
|
96
|
101
|
>
|
97
|
|
- <Search
|
98
|
|
- placeholder="请输入标题"
|
99
|
|
- enterButton="搜索"
|
100
|
|
- size="large"
|
101
|
|
- onSearch={value => searchH5(value)}
|
102
|
|
- style={{ marginBottom: '16px' }}
|
103
|
|
- />
|
|
102
|
+ <Row>
|
|
103
|
+ <Col span={18}>
|
|
104
|
+ <Search
|
|
105
|
+ placeholder="请输入标题"
|
|
106
|
+ enterButton="搜索"
|
|
107
|
+ size="default"
|
|
108
|
+ allowClear="true"
|
|
109
|
+ onSearch={value => searchH5(value)}
|
|
110
|
+ style={{ marginBottom: '16px' }}
|
|
111
|
+ />
|
|
112
|
+ </Col>
|
|
113
|
+ <Col span={4} offset={1}>
|
|
114
|
+ <Button type="primary" onClick={()=>clearVal('')}>清除选择</Button>
|
|
115
|
+ </Col>
|
|
116
|
+ </Row>
|
|
117
|
+
|
104
|
118
|
<Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
|
|
119
|
+
|
105
|
120
|
</Modal>
|
106
|
121
|
</div>
|
107
|
122
|
)
|