|
@@ -5,6 +5,7 @@ import styles from './style.less';
|
5
|
5
|
import apis from '../../../services/apis';
|
6
|
6
|
import request from '../../../utils/request';
|
7
|
7
|
import moment from 'moment';
|
|
8
|
+import BuildSelect from '../../../components/SelectButton/BuildSelect'
|
8
|
9
|
|
9
|
10
|
import router from 'umi/router';
|
10
|
11
|
|
|
@@ -19,6 +20,7 @@ function header(props) {
|
19
|
20
|
const [tableData, setTableDataData] = useState([{}])
|
20
|
21
|
const [dataConsultant, setDataonsultant] = useState({})
|
21
|
22
|
const [intentionData, setIntentionData] = useState([])
|
|
23
|
+ const [buildingIdValue, setBuildingIdData] = useState()
|
22
|
24
|
|
23
|
25
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
24
|
26
|
useEffect(() => {
|
|
@@ -71,6 +73,12 @@ function header(props) {
|
71
|
73
|
setDataonsultant(res.geoInfo)
|
72
|
74
|
})
|
73
|
75
|
}
|
|
76
|
+
|
|
77
|
+ function changBuilding(buildingId) {
|
|
78
|
+ setBuildingIdData(buildingId)
|
|
79
|
+ getById({ pageNumber: 1, pageSize: 10, buildingId: buildingId })
|
|
80
|
+ }
|
|
81
|
+
|
74
|
82
|
const columns = [
|
75
|
83
|
{
|
76
|
84
|
title: '访问事件',
|
|
@@ -190,7 +198,8 @@ function header(props) {
|
190
|
198
|
</div>
|
191
|
199
|
<div className={styles.recordBox}>
|
192
|
200
|
<p className={styles.tableName}>访问记录</p>
|
193
|
|
- <Table dataSource={tableData.records} columns={columns} pagination={{ pageSize: 10, total: tableData.total, onChange }} />
|
|
201
|
+ <BuildSelect onChange={changBuilding} value={buildingIdValue} />
|
|
202
|
+ <Table dataSource={tableData.records} columns={columns} style={{marginTop: '15px'}} pagination={{ pageSize: 10, total: tableData.total, onChange }} />
|
194
|
203
|
{/* <Pagination showQuickJumper defaultCurrent={1} total={data.records} onChange={e => changePageNum(e)} current={data.visitRecords.total}/> */}
|
195
|
204
|
</div>
|
196
|
205
|
|