xujing 5 years ago
parent
commit
3480de0205

+ 41
- 15
src/pages/carouselFigure/SelectActivity.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Select, Modal, Button,Table, Divider, Tag } from 'antd';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input } from 'antd';
3
 import { apis, fetch } from '../../utils/request';
3
 import { apis, fetch } from '../../utils/request';
4
 
4
 
5
 const getActivities = fetch(apis.activity.listSelected)
5
 const getActivities = fetch(apis.activity.listSelected)
6
+const { Search } = Input;
6
 
7
 
7
 export default (props) => {
8
 export default (props) => {
8
   const {
9
   const {
13
 
14
 
14
   const [list, setList] = useState([]);
15
   const [list, setList] = useState([]);
15
   const [visible, setVisible] = useState(false);
16
   const [visible, setVisible] = useState(false);
16
-  const [ activity, setActivity ] = useState({ dynamicId: undefined, title: '请选择活动' })
17
+  const [activity, setActivity] = useState({ dynamicId: undefined, title: '请选择活动' })
17
   const getActTitle = val => ((list.filter(x => x.dynamicId === val)[0]) || {}).title || '请选择活动'
18
   const getActTitle = val => ((list.filter(x => x.dynamicId === val)[0]) || {}).title || '请选择活动'
18
   const setAct = val => setActivity({ dynamicId: val, title: getActTitle(val) })
19
   const setAct = val => setActivity({ dynamicId: val, title: getActTitle(val) })
19
 
20
 
39
   if (value !== activity.dynamicId) {
40
   if (value !== activity.dynamicId) {
40
     setAct(value);
41
     setAct(value);
41
   }
42
   }
43
+  const searchActivity =(e)=>{
44
+    getActivities({
45
+      params: {
46
+        buildingId,
47
+        pageNum: 1,
48
+        pageSize: 999,
49
+        activityStatus: 2,
50
+        name:e
51
+      }
52
+    }).then((data) => {
53
+      setList(data.list || [])
54
+
55
+      console.log('----', buildingId, value)
56
+
57
+      // setAct(buildingId ? undefined : value);
58
+    })
59
+  }
42
 
60
 
43
   let chooseVal = value
61
   let chooseVal = value
44
 
62
 
45
   const handleChange = val => chooseVal = val
63
   const handleChange = val => chooseVal = val
46
 
64
 
47
-  const setData=val=>{
65
+  const setData = val => {
48
     setAct(val)
66
     setAct(val)
49
     onChange(val)
67
     onChange(val)
50
     setVisible(false)
68
     setVisible(false)
55
       title: '标题',
73
       title: '标题',
56
       dataIndex: 'title',
74
       dataIndex: 'title',
57
       key: 'dynamicId',
75
       key: 'dynamicId',
58
-      align:'center',
59
-      ellipsis:true,
76
+      align: 'center',
77
+      ellipsis: true,
60
       render: text => <a>{text}</a>,
78
       render: text => <a>{text}</a>,
61
     },
79
     },
62
     {
80
     {
63
       title: '操作',
81
       title: '操作',
64
       dataIndex: 'name',
82
       dataIndex: 'name',
65
-      align:'center',
66
-      width:'20%',
83
+      align: 'center',
84
+      width: '20%',
67
       render: (text, record) => (
85
       render: (text, record) => (
68
         <span>
86
         <span>
69
-          <a onClick={() => setData(record.dynamicId)} style={{color:'blue'}}>选择</a>
87
+          <a onClick={() => setData(record.dynamicId)} style={{ color: 'blue' }}>选择</a>
70
         </span>
88
         </span>
71
       ),
89
       ),
72
     },
90
     },
73
   ];
91
   ];
74
 
92
 
75
   return (
93
   return (
76
-  <div>
77
-    <div onClick={() => setVisible(true)}>{activity.title}</div>
94
+
95
+    <div>
96
+      <div onClick={() => setVisible(true)}>{activity.title}</div>
78
       <Modal
97
       <Modal
79
-        title="请选择H5"
98
+        title="请选择"
80
         visible={visible}
99
         visible={visible}
81
-         onCancel={() => setVisible(false)}
82
-         footer={[]}
100
+        onCancel={() => setVisible(false)}
101
+        footer={[]}
83
       >
102
       >
84
-       <Table rowKey={list => list.dynamicId} columns={columns} dataSource={list} />
103
+        <Search
104
+          placeholder="输入h5名称"
105
+          enterButton="搜索"
106
+          size="large"
107
+          onSearch={value => searchActivity(value)}
108
+          style={{ marginBottom: '16px' }}
109
+        />
110
+        <Table rowKey={list => list.dynamicId} columns={columns} dataSource={list} />
85
       </Modal>
111
       </Modal>
86
-  </div>
112
+    </div>
87
 
113
 
88
   );
114
   );
89
 }
115
 }

+ 39
- 15
src/pages/carouselFigure/SelectGroup.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Select, Modal, Button,Table, Divider, Tag } from 'antd';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input } from 'antd';
3
 import { apis, fetch } from '../../utils/request';
3
 import { apis, fetch } from '../../utils/request';
4
 
4
 
5
+const { Search } = Input;
6
+
5
 const getGroupList = fetch(apis.groupActivity.EffectiveList)
7
 const getGroupList = fetch(apis.groupActivity.EffectiveList)
6
 
8
 
7
 export default props => {
9
 export default props => {
35
       updateGroup(buildingId ? undefined : value);
37
       updateGroup(buildingId ? undefined : value);
36
     })
38
     })
37
   }, [buildingId]);
39
   }, [buildingId]);
40
+  const searchGroup = (e) => {
41
+    getGroupList({
42
+      params: {
43
+        buildingId,
44
+        pageNum: 1,
45
+        pageSize: 999,
46
+        status: 1,
47
+        name: e
48
+      }
49
+    }).then((data) => {
50
+      setList(data.records || [])
38
 
51
 
52
+      updateGroup(buildingId ? undefined : value);
53
+      // setAct(buildingId ? undefined : value);
54
+    })
55
+  }
39
   if (value !== group.groupId) {
56
   if (value !== group.groupId) {
40
     updateGroup(value);
57
     updateGroup(value);
41
   }
58
   }
42
 
59
 
43
   const handleChange = val => {
60
   const handleChange = val => {
44
-      onChange(val)
61
+    onChange(val)
45
   }
62
   }
46
 
63
 
47
-  const setData=val=>{
64
+  const setData = val => {
48
     updateGroup(val)
65
     updateGroup(val)
49
     onChange(val)
66
     onChange(val)
50
     setVisible(false)
67
     setVisible(false)
55
       title: '标题',
72
       title: '标题',
56
       dataIndex: 'activityName',
73
       dataIndex: 'activityName',
57
       key: 'groupActivityId',
74
       key: 'groupActivityId',
58
-      align:'center',
59
-      ellipsis:true,
75
+      align: 'center',
76
+      ellipsis: true,
60
       render: text => <a>{text}</a>,
77
       render: text => <a>{text}</a>,
61
     },
78
     },
62
     {
79
     {
63
       title: '操作',
80
       title: '操作',
64
-      align:'center',
65
-      width:'20%',
81
+      align: 'center',
82
+      width: '20%',
66
       render: (text, record) => (
83
       render: (text, record) => (
67
         <span>
84
         <span>
68
-          <a onClick={() => setData(record.groupActivityId)} style={{color:'blue'}}>选择</a>
85
+          <a onClick={() => setData(record.groupActivityId)} style={{ color: 'blue' }}>选择</a>
69
         </span>
86
         </span>
70
       ),
87
       ),
71
     },
88
     },
72
   ];
89
   ];
73
 
90
 
74
   return (
91
   return (
75
-  <div>
76
-    <div onClick={() => setVisible(true)}>{group.groupName}</div>
92
+    <div>
93
+      <div onClick={() => setVisible(true)}>{group.groupName}</div>
77
       <Modal
94
       <Modal
78
-        title="请选择H5"
95
+        title="请选择"
79
         visible={visible}
96
         visible={visible}
80
-         onCancel={() => setVisible(false)}
81
-         footer={[]}
97
+        onCancel={() => setVisible(false)}
98
+        footer={[]}
82
       >
99
       >
83
-       <Table rowKey={list => list.groupActivityId} columns={columns} dataSource={list} />
100
+        <Search
101
+          placeholder="输入h5名称"
102
+          enterButton="搜索"
103
+          size="large"
104
+          onSearch={value => searchGroup(value)}
105
+          style={{ marginBottom: '16px' }}
106
+        />
107
+        <Table rowKey={list => list.groupActivityId} columns={columns} dataSource={list} />
84
       </Modal>
108
       </Modal>
85
-  </div>
109
+    </div>
86
   );
110
   );
87
 }
111
 }

+ 42
- 19
src/pages/carouselFigure/SelectH5.1.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Select, Modal, Button } from 'antd';
2
+import { Select, Modal, Button, Input } from 'antd';
3
 import { apis, fetch } from '../../utils/request';
3
 import { apis, fetch } from '../../utils/request';
4
 
4
 
5
 const getH5List = fetch(apis.h5Activity.EffectiveList)
5
 const getH5List = fetch(apis.h5Activity.EffectiveList)
6
+const { Search } = Input;
6
 
7
 
7
 export default props => {
8
 export default props => {
8
   const {
9
   const {
13
 
14
 
14
   const [list, setList] = useState([]);
15
   const [list, setList] = useState([]);
15
   const [visible, setVisible] = useState(false);
16
   const [visible, setVisible] = useState(false);
16
-  const [group, setGroup] = useState({ groupId: undefined, groupName: '请选择H5' })
17
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '请选择' })
17
   const getGroupTitle = val => {
18
   const getGroupTitle = val => {
18
-    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择H5'
19
+    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
19
   }
20
   }
20
   const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
21
   const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
21
 
22
 
33
       updateGroup(value ? undefined : value);
34
       updateGroup(value ? undefined : value);
34
     })
35
     })
35
   }, []);
36
   }, []);
37
+  const searchH5 = (e) => {
38
+    getH5List({
39
+      params: {
40
+        buildingId,
41
+        pageNum: 1,
42
+        pageSize: 999,
43
+        activityStatus: 2,
44
+        name: e
45
+      }
46
+    }).then((data) => {
47
+      setList(data.records || [])
48
+
49
+      updateGroup(value ? undefined : value);
50
+    })
51
+  }
36
 
52
 
37
   if (value !== group.groupId) {
53
   if (value !== group.groupId) {
38
     updateGroup(value);
54
     updateGroup(value);
39
   }
55
   }
40
 
56
 
41
   const handleChange = val => {
57
   const handleChange = val => {
42
-      onChange(val)
58
+    onChange(val)
43
   }
59
   }
44
 
60
 
45
-  const setData=val=>{
61
+  const setData = val => {
46
     updateGroup('')
62
     updateGroup('')
47
     onChange('')
63
     onChange('')
48
   }
64
   }
51
     <div>
67
     <div>
52
       <div onClick={() => setVisible(true)}>{group.groupName}</div>
68
       <div onClick={() => setVisible(true)}>{group.groupName}</div>
53
       <Modal
69
       <Modal
54
-        title="请选择H5"
70
+        title="请选择"
55
         visible={visible}
71
         visible={visible}
56
-         onCancel={() => setVisible(false)}
57
-         footer={[
58
-            <Button key="back" onClick={() => setVisible(false)}>
59
-              取消
72
+        onCancel={() => setVisible(false)}
73
+        footer={[
74
+          <Button key="back" onClick={() => setVisible(false)}>
75
+            取消
60
             </Button>,
76
             </Button>,
61
-            <Button key="cancel" onClick={() => setData(value)}>
62
-              清空
77
+          <Button key="cancel" onClick={() => setData(value)}>
78
+            清空
63
             </Button>,
79
             </Button>,
64
-            <Button key="submit" type="primary" onClick={() => {
65
-              updateGroup(value)
66
-              onChange(value)
67
-              setVisible(false)
68
-            }}>
69
-              提交
80
+          <Button key="submit" type="primary" onClick={() => {
81
+            updateGroup(value)
82
+            onChange(value)
83
+            setVisible(false)
84
+          }}>
85
+            提交
70
             </Button>
86
             </Button>
71
-          ]}
87
+        ]}
72
       >
88
       >
89
+        <Search
90
+          placeholder="输入h5名称"
91
+          enterButton="搜索"
92
+          size="large"
93
+          onSearch={value => searchH5(value)}
94
+          style={{ marginBottom: '16px' }}
95
+        />
73
         <Select
96
         <Select
74
           showSearch
97
           showSearch
75
           value={value ? parseInt(value) : undefined}
98
           value={value ? parseInt(value) : undefined}

+ 42
- 20
src/pages/carouselFigure/SelectH5.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Select, Modal, Button,Table, Divider, Tag } from 'antd';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input } from 'antd';
3
 import { apis, fetch } from '../../utils/request';
3
 import { apis, fetch } from '../../utils/request';
4
 
4
 
5
 const { Column, ColumnGroup } = Table;
5
 const { Column, ColumnGroup } = Table;
6
 const getH5List = fetch(apis.h5Activity.EffectiveList)
6
 const getH5List = fetch(apis.h5Activity.EffectiveList)
7
-
7
+const { Search } = Input;
8
 export default props => {
8
 export default props => {
9
   const {
9
   const {
10
     value,
10
     value,
14
 
14
 
15
   const [list, setList] = useState([]);
15
   const [list, setList] = useState([]);
16
   const [visible, setVisible] = useState(false);
16
   const [visible, setVisible] = useState(false);
17
-  const [group, setGroup] = useState({ groupId: undefined, groupName: '请选择H5' })
17
+  const [group, setGroup] = useState({ groupId: undefined, groupName: '请选择' })
18
   const getGroupTitle = val => {
18
   const getGroupTitle = val => {
19
-    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择H5'
19
+    return (list.filter(x => x.drainageId == val)[0] || {}).name || '请选择'
20
   }
20
   }
21
   const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
21
   const updateGroup = val => setGroup({ groupId: val, groupName: getGroupTitle(val) })
22
 
22
 
34
       updateGroup(value ? undefined : value);
34
       updateGroup(value ? undefined : value);
35
     })
35
     })
36
   }, []);
36
   }, []);
37
+  const searchH5 = (e) => {
38
+    getH5List({
39
+      params: {
40
+        pageNum: 1,
41
+        pageSize: 999,
42
+        isMiniapp: 1,
43
+        status: 1,
44
+        name: e
45
+      },
46
+    }).then(data => {
47
+      setList(data.records || [])
48
+
49
+      updateGroup(value ? undefined : value);
50
+    })
51
+  }
37
 
52
 
38
   if (value !== group.groupId) {
53
   if (value !== group.groupId) {
39
     updateGroup(value);
54
     updateGroup(value);
40
   }
55
   }
41
 
56
 
42
   const handleChange = val => {
57
   const handleChange = val => {
43
-      onChange(val)
58
+    onChange(val)
44
   }
59
   }
45
 
60
 
46
-  const setData=val=>{
61
+  const setData = val => {
47
     updateGroup(val)
62
     updateGroup(val)
48
     onChange(val)
63
     onChange(val)
49
     setVisible(false)
64
     setVisible(false)
54
       title: '标题',
69
       title: '标题',
55
       dataIndex: 'name',
70
       dataIndex: 'name',
56
       key: 'drainageId',
71
       key: 'drainageId',
57
-      align:'center',
58
-      ellipsis:true,
72
+      align: 'center',
73
+      ellipsis: true,
59
       render: text => <a>{text}</a>,
74
       render: text => <a>{text}</a>,
60
     },
75
     },
61
     {
76
     {
62
       title: '操作',
77
       title: '操作',
63
-      align:'center',
64
-      width:'20%',
78
+      align: 'center',
79
+      width: '20%',
65
       render: (text, record) => (
80
       render: (text, record) => (
66
         <span>
81
         <span>
67
-          <a onClick={() => setData(record.drainageId)} style={{color:'blue'}}>选择</a>
82
+          <a onClick={() => setData(record.drainageId)} style={{ color: 'blue' }}>选择</a>
68
         </span>
83
         </span>
69
       ),
84
       ),
70
     },
85
     },
71
   ];
86
   ];
72
 
87
 
73
-  return(
88
+  return (
74
     <div>
89
     <div>
75
       <div onClick={() => setVisible(true)}>{group.groupName}</div>
90
       <div onClick={() => setVisible(true)}>{group.groupName}</div>
76
-        <Modal
77
-          title="请选择H5"
78
-          visible={visible}
79
-           onCancel={() => setVisible(false)}
80
-           footer={[]}
81
-        >
82
-         <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
83
-        </Modal>
91
+      <Modal
92
+        title="请选择"
93
+        visible={visible}
94
+        onCancel={() => setVisible(false)}
95
+        footer={[]}
96
+      >
97
+        <Search
98
+          placeholder="输入h5名称"
99
+          enterButton="搜索"
100
+          size="large"
101
+          onSearch={value => searchH5(value)}
102
+          style={{ marginBottom: '16px' }}
103
+        />
104
+        <Table rowKey={list => list.drainageId} columns={columns} dataSource={list} />
105
+      </Modal>
84
     </div>
106
     </div>
85
   )
107
   )
86
 }
108
 }

+ 37
- 15
src/pages/carouselFigure/SelectHelp.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
 
2
 
3
-import { Form, Select, Modal, Button,Table, Divider, Tag } from 'antd';
3
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input } from 'antd';
4
 import { apis, fetch } from '../../utils/request';
4
 import { apis, fetch } from '../../utils/request';
5
+const { Search } = Input;
5
 
6
 
6
 const getHelpList = fetch(apis.helpActivity.effectiveList)
7
 const getHelpList = fetch(apis.helpActivity.effectiveList)
7
 
8
 
37
       updateHelp(value ? undefined : value);
38
       updateHelp(value ? undefined : value);
38
     })
39
     })
39
   }, [buildingId]);
40
   }, [buildingId]);
41
+  const searchHelp = (e) => {
42
+    getHelpList({
43
+      params: {
44
+        buildingId,
45
+        pageNum: 1,
46
+        pageSize: 999,
47
+        status: 1,
48
+        name: e
49
+      },
50
+    }).then(data => {
51
+      setList(data.records || [])
40
 
52
 
53
+      updateHelp(value ? undefined : value);
54
+    })
55
+  }
41
   if (value !== help.helpId) {
56
   if (value !== help.helpId) {
42
     updateHelp(value);
57
     updateHelp(value);
43
   }
58
   }
46
     onChange(val)
61
     onChange(val)
47
   }
62
   }
48
 
63
 
49
-  const setData=val=>{
64
+  const setData = val => {
50
     updateHelp(val)
65
     updateHelp(val)
51
     onChange(val)
66
     onChange(val)
52
     setVisible(false)
67
     setVisible(false)
57
       title: '标题',
72
       title: '标题',
58
       dataIndex: 'title',
73
       dataIndex: 'title',
59
       key: 'helpActivityId',
74
       key: 'helpActivityId',
60
-      align:'center',
61
-      ellipsis:true,
75
+      align: 'center',
76
+      ellipsis: true,
62
       render: text => <a>{text}</a>,
77
       render: text => <a>{text}</a>,
63
     },
78
     },
64
     {
79
     {
65
       title: '操作',
80
       title: '操作',
66
-      align:'center',
67
-      width:'20%',
81
+      align: 'center',
82
+      width: '20%',
68
       render: (text, record) => (
83
       render: (text, record) => (
69
         <span>
84
         <span>
70
-          <a onClick={() => setData(record.helpActivityId)} style={{color:'blue'}}>选择</a>
85
+          <a onClick={() => setData(record.helpActivityId)} style={{ color: 'blue' }}>选择</a>
71
         </span>
86
         </span>
72
       ),
87
       ),
73
     },
88
     },
76
   return (
91
   return (
77
     <div>
92
     <div>
78
       <div onClick={() => setVisible(true)}>{help.helpName}</div>
93
       <div onClick={() => setVisible(true)}>{help.helpName}</div>
79
-        <Modal
80
-          title="请选择H5"
81
-          visible={visible}
82
-           onCancel={() => setVisible(false)}
83
-           footer={[]}
84
-        >
85
-         <Table rowKey={list => list.helpActivityId} columns={columns} dataSource={list} />
86
-        </Modal>
94
+      <Modal
95
+        title="请选择"
96
+        visible={visible}
97
+        onCancel={() => setVisible(false)}
98
+        footer={[]}
99
+      >
100
+        <Search
101
+          placeholder="输入h5名称"
102
+          enterButton="搜索"
103
+          size="large"
104
+          onSearch={value => searchHelp(value)}
105
+          style={{ marginBottom: '16px' }}
106
+        />
107
+        <Table rowKey={list => list.helpActivityId} columns={columns} dataSource={list} />
108
+      </Modal>
87
     </div>
109
     </div>
88
   );
110
   );
89
 }
111
 }

+ 37
- 15
src/pages/carouselFigure/SelectNews.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Select, Modal, Button,Table, Divider, Tag } from 'antd';
2
+import { Form, Select, Modal, Button, Table, Divider, Tag, Input } from 'antd';
3
 import { apis, fetch } from '../../utils/request';
3
 import { apis, fetch } from '../../utils/request';
4
 
4
 
5
 const getNewsList = fetch(apis.news.getList)
5
 const getNewsList = fetch(apis.news.getList)
6
+const { Search } = Input;
6
 
7
 
7
 export default props => {
8
 export default props => {
8
   const {
9
   const {
33
       updateNews(buildingId ? undefined : value);
34
       updateNews(buildingId ? undefined : value);
34
     })
35
     })
35
   }, [buildingId]);
36
   }, [buildingId]);
37
+  const searchActivity = (e) => {
38
+    getNewsList({
39
+      params: {
40
+        buildingId,
41
+        pageNum: 1,
42
+        pageSize: 999,
43
+        newsStatus: 0,
44
+        name: e
45
+      },
46
+    }).then(data => {
47
+      setList(data.records || [])
36
 
48
 
49
+      updateNews(buildingId ? undefined : value);
50
+    })
51
+  }
37
   if (value !== news.newsId) {
52
   if (value !== news.newsId) {
38
     updateNews(value);
53
     updateNews(value);
39
   }
54
   }
42
     onChange(val)
57
     onChange(val)
43
   }
58
   }
44
 
59
 
45
-  const setData=val=>{
60
+  const setData = val => {
46
     updateNews(val)
61
     updateNews(val)
47
     onChange(val)
62
     onChange(val)
48
     setVisible(false)
63
     setVisible(false)
53
       title: '标题',
68
       title: '标题',
54
       dataIndex: 'newsName',
69
       dataIndex: 'newsName',
55
       key: 'newsId',
70
       key: 'newsId',
56
-      align:'center',
57
-      ellipsis:true,
71
+      align: 'center',
72
+      ellipsis: true,
58
       render: text => <a>{text}</a>,
73
       render: text => <a>{text}</a>,
59
     },
74
     },
60
     {
75
     {
61
       title: '操作',
76
       title: '操作',
62
-      align:'center',
63
-      width:'20%',
77
+      align: 'center',
78
+      width: '20%',
64
       render: (text, record) => (
79
       render: (text, record) => (
65
         <span>
80
         <span>
66
-          <a onClick={() => setData(record.newsId)} style={{color:'blue'}}>选择</a>
81
+          <a onClick={() => setData(record.newsId)} style={{ color: 'blue' }}>选择</a>
67
         </span>
82
         </span>
68
       ),
83
       ),
69
     },
84
     },
72
   return (
87
   return (
73
     <div>
88
     <div>
74
       <div onClick={() => setVisible(true)}>{news.newsName}</div>
89
       <div onClick={() => setVisible(true)}>{news.newsName}</div>
75
-        <Modal
76
-          title="请选择H5"
77
-          visible={visible}
78
-           onCancel={() => setVisible(false)}
79
-           footer={[]}
80
-        >
81
-         <Table rowKey={list => list.newsId} columns={columns} dataSource={list} />
82
-        </Modal>
90
+      <Modal
91
+        title="请选择"
92
+        visible={visible}
93
+        onCancel={() => setVisible(false)}
94
+        footer={[]}
95
+      >
96
+        <Search
97
+          placeholder="输入h5名称"
98
+          enterButton="搜索"
99
+          size="large"
100
+          onSearch={value => searchActivity(value)}
101
+          style={{ marginBottom: '16px' }}
102
+        />
103
+        <Table rowKey={list => list.newsId} columns={columns} dataSource={list} />
104
+      </Modal>
83
     </div>
105
     </div>
84
   );
106
   );
85
 }
107
 }