File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
pages/DashBoardPage/utils Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,7 @@ export const getControllerDateValues = (obj: {
302302 timeValues [ 0 ] = time . format ( TIME_FORMATTER ) ;
303303 }
304304 if ( endTime ) {
305+ //end 精确时间
305306 if ( endTime . relativeOrExact === TimeFilterValueCategory . Exact ) {
306307 timeValues [ 1 ] = endTime . exactValue as string ;
307308 if ( obj . execute ) {
@@ -313,9 +314,12 @@ export const getControllerDateValues = (obj: {
313314 timeValues [ 1 ] = endTime . exactValue as string ;
314315 }
315316 } else {
317+ // end 相对时间
316318 const { amount, unit, direction } = endTime . relativeValue ! ;
317- const time = getTime ( + ( direction + amount ) , unit ) ( unit , false ) ;
319+ const isStart = ! obj . execute ;
320+ const time = getTime ( + ( direction + amount ) , unit ) ( unit , isStart ) ;
318321 timeValues [ 1 ] = time . format ( TIME_FORMATTER ) ;
322+ debugger ;
319323 }
320324 }
321325
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export function getTime(
4040 amount ?: number | string ,
4141 unit ?: unitOfTime . DurationConstructor ,
4242) : ( unitTime , isStart ?: boolean ) => Moment {
43- return ( unitOfTime : unitOfTime . StartOf , isStart ) => {
43+ return ( unitOfTime : unitOfTime . StartOf , isStart ?: boolean ) => {
4444 if ( ! ! isStart ) {
4545 return moment ( ) . add ( amount , unit ) . startOf ( unitOfTime ) ;
4646 }
You can’t perform that action at this time.
0 commit comments