|
@@ -16,7 +16,8 @@ const AssistConsultant = props => {
|
16
|
16
|
|
17
|
17
|
const [tableData, setTableData] = useState({});
|
18
|
18
|
const [loading, setLoading] = useState(false);
|
19
|
|
-
|
|
19
|
+ const [buildingId, setBuildingId] = useState();
|
|
20
|
+
|
20
|
21
|
const openNotificationWithIcon = (type, message) => {
|
21
|
22
|
notification[type]({
|
22
|
23
|
message,
|
|
@@ -52,11 +53,12 @@ const AssistConsultant = props => {
|
52
|
53
|
|
53
|
54
|
// 分页
|
54
|
55
|
function onChange(pageNum) {
|
55
|
|
- getList({ pageNumber: pageNum, pageSize: 5 });
|
|
56
|
+ getList({ pageNumber: pageNum, pageSize: 5,buildingId: buildingId||data.buildingId });
|
56
|
57
|
}
|
57
|
58
|
|
58
|
59
|
function changBuilding(buildingId) {
|
59
|
60
|
if (buildingId) {
|
|
61
|
+ setBuildingId(buildingId)
|
60
|
62
|
getList({ pageNumber: 1, pageSize: 5, buildingId: buildingId });
|
61
|
63
|
}
|
62
|
64
|
}
|
|
@@ -67,7 +69,7 @@ const AssistConsultant = props => {
|
67
|
69
|
request({
|
68
|
70
|
...apis.customer.consultantAssist,
|
69
|
71
|
urlData: { id: data.customerId },
|
70
|
|
- data: { userId: record.userId, buildingId: data.buildingName || data.buildingId },
|
|
72
|
+ data: { userId: record.userId, buildingId: buildingId || data.buildingId },
|
71
|
73
|
})
|
72
|
74
|
.then(res => {
|
73
|
75
|
// eslint-disable-next-line no-unused-expressions
|
|
@@ -141,7 +143,7 @@ const AssistConsultant = props => {
|
141
|
143
|
</>
|
142
|
144
|
)} */}
|
143
|
145
|
{data?.buildingId == null && (
|
144
|
|
- <BuildSelect onChange={e => changBuilding(e)} value={data?.buildingName} />
|
|
146
|
+ <BuildSelect onChange={e => changBuilding(e)} value={buildingId||data?.buildingId} />
|
145
|
147
|
)}
|
146
|
148
|
<Table
|
147
|
149
|
dataSource={tableData.records}
|