传参:日期

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