传参:日期

This commit is contained in:
gaoyuanwei 2022-08-11 15:58:33 +08:00
parent 10787a8682
commit e782213397
1 changed files with 31 additions and 14 deletions

View File

@ -371,15 +371,23 @@ export default {
async listSedimentTrailByPoints (data) { async listSedimentTrailByPoints (data) {
let endTime = data.data.dt let endTime = data.data.dt
let newEndTime = '' let newEndTime = ''
let newStartTime = ''
// endtime // endtime
endTime = new Date(endTime) endTime = new Date(endTime)
endTime.setTime(endTime.getTime() + 24 * 60 * 60 * 1000) endTime.setTime(endTime.getTime() + 24 * 60 * 60 * 1000)
newEndTime = console.log(endTime, 'aaaaaaaaa')
endTime.getFullYear() + // newEndTime =
'-' + // endTime.getFullYear() +
(endTime.getMonth() + 1) + // '-' +
'-' + // ((endTime.getMonth() + 1) > 10 ? (endTime.getMonth() + 1) : '0' + (endTime.getMonth() + 1)) +
endTime.getDate() + // '-' +
// (endTime.getDate() > 10 ? endTime.getDate() : '0' + endTime.getDate()) +
// ' ' +
// '00:00:00'
newEndTime = data.data.dt +
' ' +
'23:59:59'
newStartTime = data.data.dt +
' ' + ' ' +
'00:00:00' '00:00:00'
@ -387,9 +395,10 @@ export default {
longitude: data.latLng.lng, longitude: data.latLng.lng,
latitude: data.latLng.lat, latitude: data.latLng.lat,
radius: 3000, radius: 3000,
start: data.data.dt, start: newStartTime,
end: newEndTime end: newEndTime
} }
const res = await listSedimentTrailByPoints(param) const res = await listSedimentTrailByPoints(param)
// this.slagTruckData = res.data.data // this.slagTruckData = res.data.data
this.slagTruckData = [] this.slagTruckData = []
@ -411,15 +420,23 @@ export default {
async listTrailSanitationByPoints (data) { async listTrailSanitationByPoints (data) {
let endTime = data.data.dt let endTime = data.data.dt
let newEndTime = '' let newEndTime = ''
let newStartTime = ''
// endtime // endtime
endTime = new Date(endTime) endTime = new Date(endTime)
endTime.setTime(endTime.getTime() + 24 * 60 * 60 * 1000) endTime.setTime(endTime.getTime() + 24 * 60 * 60 * 1000)
newEndTime = console.log(endTime, 'aaaaaaaaa')
endTime.getFullYear() + // newEndTime =
'-' + // endTime.getFullYear() +
(endTime.getMonth() + 1) + // '-' +
'-' + // ((endTime.getMonth() + 1) > 10 ? (endTime.getMonth() + 1) : '0' + (endTime.getMonth() + 1)) +
endTime.getDate() + // '-' +
// (endTime.getDate() > 10 ? endTime.getDate() : '0' + endTime.getDate()) +
// ' ' +
// '00:00:00'
newEndTime = data.data.dt +
' ' +
'23:59:59'
newStartTime = data.data.dt +
' ' + ' ' +
'00:00:00' '00:00:00'
@ -427,7 +444,7 @@ export default {
longitude: data.latLng.lng, longitude: data.latLng.lng,
latitude: data.latLng.lat, latitude: data.latLng.lat,
radius: 3000, radius: 3000,
start: data.data.dt, start: newStartTime,
end: newEndTime end: newEndTime
} }