|
@@ -37,28 +37,28 @@ export default (props) => {
|
37
|
37
|
}
|
38
|
38
|
|
39
|
39
|
useEffect(() => {
|
40
|
|
- getList({ pageNum: 1, pageSize: 10 });
|
|
40
|
+ getList({ pageNum: 1, pageSize: 20 });
|
41
|
41
|
}, []);
|
42
|
42
|
|
43
|
43
|
const onChangePageNum = pageNumber => {
|
44
|
|
- getList({ pageNum: pageNumber, pageSize: 10 });
|
|
44
|
+ getList({ pageNum: pageNumber, pageSize: 20 });
|
45
|
45
|
};
|
46
|
46
|
|
47
|
47
|
const onSuccess = () => {
|
48
|
|
- // setVisible(false);
|
49
|
|
- // getList();
|
|
48
|
+ setVisible({visible:false})
|
|
49
|
+ getList({ pageNum: 1, pageSize: 10 });
|
50
|
50
|
};
|
51
|
51
|
function onDelete(record) {
|
52
|
|
- // request({ ...apis.paorama.delete, urlData: { id: record.panoramaId } })
|
53
|
|
- // .then(res => {
|
54
|
|
- // notification.success({ message: '删除成功' });
|
55
|
|
- // getList();
|
56
|
|
- // })
|
57
|
|
- // .catch(err => {
|
58
|
|
- // notification.error({
|
59
|
|
- // message: err.message,
|
60
|
|
- // });
|
61
|
|
- // });
|
|
52
|
+ request({ ...apis.building.deletebuildingSpecialRoom, urlData: { id: record.specialRoomId } })
|
|
53
|
+ .then(res => {
|
|
54
|
+ notification.success({ message: '删除成功' });
|
|
55
|
+ getList({ pageNum: 1, pageSize: 10 });
|
|
56
|
+ })
|
|
57
|
+ .catch(err => {
|
|
58
|
+ notification.error({
|
|
59
|
+ message: err.message,
|
|
60
|
+ });
|
|
61
|
+ });
|
62
|
62
|
}
|
63
|
63
|
|
64
|
64
|
function onEdit(data) {
|
|
@@ -71,7 +71,7 @@ export default (props) => {
|
71
|
71
|
<div>
|
72
|
72
|
<Button type="primary" onClick={() => setVisible({visible:true})}>新增特价房</Button>
|
73
|
73
|
</div>
|
74
|
|
- <Form visibleData={visible} onCancel={() => setVisible({visible:false})} onSuccess={onSuccess} />
|
|
74
|
+ <Form visibleData={visible} buildingId={id} onCancel={() => setVisible({visible:false})} onSuccess={onSuccess} />
|
75
|
75
|
<List data={data} buildingId={id} loading={loading} onChangePageNum={onChangePageNum} onDelete={onDelete} onEdit={onEdit}/>
|
76
|
76
|
</div>
|
77
|
77
|
)
|