|
@@ -46,7 +46,7 @@ function header(props) {
|
46
|
46
|
const toDelBatch = rowData => () => {
|
47
|
47
|
console.log(taNoticeList, 'taNoticeList')
|
48
|
48
|
if (taNoticeList.length < 1) {
|
49
|
|
- openNotificationWithIcon('error', '请先选择需要删除的批次')
|
|
49
|
+ // openNotificationWithIcon('error', '请先选择需要删除的批次')
|
50
|
50
|
return
|
51
|
51
|
}
|
52
|
52
|
|
|
@@ -58,19 +58,14 @@ function header(props) {
|
58
|
58
|
request({ ...apis.openScreen.delete, data: taNoticeList, }).then((data) => {
|
59
|
59
|
message.info("操作成功")
|
60
|
60
|
getList({ pageNum: 1, pageSize: 10 });
|
|
61
|
+
|
|
62
|
+ // setHouseIdList([])
|
61
|
63
|
}).catch((err) => {
|
62
|
64
|
})
|
63
|
65
|
},
|
64
|
66
|
});
|
65
|
67
|
}
|
66
|
68
|
|
67
|
|
- const rowSelection = {
|
68
|
|
- onChange: (selectedRowKeys, selectedRows) => {
|
69
|
|
- console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
|
70
|
|
- setTaNoticeList(selectedRows)
|
71
|
|
- },
|
72
|
|
- };
|
73
|
|
-
|
74
|
69
|
const changePageNum = pageNumber => {
|
75
|
70
|
getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
|
76
|
71
|
}
|
|
@@ -148,7 +143,21 @@ function header(props) {
|
148
|
143
|
},
|
149
|
144
|
];
|
150
|
145
|
|
|
146
|
+ // const onSelectChange = (selectedRowKeys, selectedRows) => {
|
|
147
|
+ // console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
|
|
148
|
+ // setTaNoticeList(selectedRows)
|
|
149
|
+ // // this.setState({ selectedRowKeys });
|
|
150
|
+ // };
|
|
151
|
+
|
151
|
152
|
const { getFieldDecorator } = props.form
|
|
153
|
+
|
|
154
|
+ const rowSelection = {
|
|
155
|
+ onChange: (selectedRowKeys, selectedRows) => {
|
|
156
|
+ console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
|
|
157
|
+ setTaNoticeList(selectedRows)
|
|
158
|
+ },
|
|
159
|
+ };
|
|
160
|
+
|
152
|
161
|
return (
|
153
|
162
|
|
154
|
163
|
<>
|
|
@@ -207,8 +216,8 @@ function header(props) {
|
207
|
216
|
|
208
|
217
|
<Button type="primary" className={styles.addBtn} onClick={toDelBatch()} style={{ marginLeft: '30px' }} >删除</Button>
|
209
|
218
|
|
210
|
|
- <Table rowSelection={rowSelection} rowKey="taNoticeList" dataSource={data.records} columns={columns} pagination={false} />
|
211
|
|
-
|
|
219
|
+ <Table id='noticeTable' rowSelection={rowSelection} rowKey={r => r.noticeId} dataSource={data.records} columns={columns} pagination={false} />
|
|
220
|
+ {/* selectedRowKeys */}
|
212
|
221
|
<div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
|
213
|
222
|
<Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
|
214
|
223
|
</div>
|