|
@@ -42,14 +42,14 @@ class buildingDetailStats extends React.Component {
|
42
|
42
|
|
43
|
43
|
// 获取图表数据
|
44
|
44
|
getTimeBarDate = (startDate, endDate) => {
|
45
|
|
- request({ ...apis.stats.timeBarList, params: { startDate, endDate, buildingId: this.state.buildingId } }).then((data) => {
|
|
45
|
+ request({ ...apis.stats.timeBarList, params: { startDate: moment(startDate).format('YYYY-MM-DDT00:00:00.000') + 'Z', endDate: moment(endDate).format('YYYY-MM-DDT23:59:59.999') + 'Z', buildingId: this.state.buildingId } }).then((data) => {
|
46
|
46
|
this.setState({...this.state, barData: data})
|
47
|
47
|
})
|
48
|
48
|
}
|
49
|
49
|
|
50
|
50
|
//获取表格数据
|
51
|
51
|
getTimeTableData = (startDate, endDate,pageNum,pageSize,sortField,sortOrder) => {
|
52
|
|
- request({ ...apis.stats.timeTableList, params: { startDate, endDate, buildingId: this.state.buildingId,pageNum,pageSize,sortField,sortOrder } }).then((data) => {
|
|
52
|
+ request({ ...apis.stats.timeTableList, params: { startDate: moment(startDate).format('YYYY-MM-DDT00:00:00.000') + 'Z', endDate: moment(endDate).format('YYYY-MM-DDT23:59:59.999') + 'Z', buildingId: this.state.buildingId,pageNum,pageSize,sortField,sortOrder } }).then((data) => {
|
53
|
53
|
this.setState({...this.state, tableData: data.records, total: data.total})
|
54
|
54
|
})
|
55
|
55
|
}
|