Commit 86bba4b5 authored by GuanHua's avatar GuanHua

merge: 解决冲突

parent f2e43214
......@@ -30,7 +30,7 @@ export const findLastIndexFlowState = (data: any[], customKey = 'isExecute'): nu
return index;
};
export function formatTimeString(date, format: string = 'YYYY-MM-DD HH:mm:ss') {
export function formatTimeString(date, format = 'YYYY-MM-DD HH:mm:ss') {
return date ? moment(date).format(format) : ''
}
......@@ -59,138 +59,76 @@ export function timeRange(val: number) {
moment()
.startOf('days')
.format('YYYY-MM-DD HH:mm:ss'),
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
et = moment(
moment()
.endOf('days')
.format('YYYY-MM-DD HH:mm:ss'),
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
break;
case 2:
st = moment(
moment()
.subtract(7, 'days')
.format('YYYY-MM-DD') + ' 00:00:00',
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
et = moment(
moment()
.endOf('days')
.format('YYYY-MM-DD HH:mm:ss'),
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
break;
case 3:
st = moment(
moment()
.subtract(29, 'days')
.format('YYYY-MM-DD') + ' 00:00:00',
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
et = moment(
moment()
.endOf('days')
.format('YYYY-MM-DD HH:mm:ss'),
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
break;
case 4:
st = moment(
moment()
.subtract(89, 'days')
.format('YYYY-MM-DD') + ' 00:00:00',
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
et = moment(
moment()
.endOf('days')
.format('YYYY-MM-DD HH:mm:ss'),
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
break;
case 5:
st = moment(
moment()
.subtract(179, 'days')
.format('YYYY-MM-DD') + ' 00:00:00',
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
et = moment(
moment()
.endOf('days')
.format('YYYY-MM-DD HH:mm:ss'),
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
break;
case 6:
st = moment(
moment()
.subtract(364, 'days')
.format('YYYY-MM-DD') + ' 00:00:00',
<<<<<<< HEAD
).unix();
=======
).valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
et = moment(
moment()
.endOf('days')
.format('YYYY-MM-DD HH:mm:ss'),
<<<<<<< HEAD
).unix();
break;
case 7:
st = moment(
moment()
.year(moment().year() - 1)
.startOf('year')
.format('YYYY-MM-DD HH:mm:ss'),
).unix();
et = moment(
moment()
.year(moment().year() - 1)
.endOf('year')
.format('YYYY-MM-DD HH:mm:ss'),
).unix();
=======
).valueOf();
break;
case 7:
st = moment('1971-01-01', 'YYYY-MM-DD').valueOf(); // 或者0
et = moment().subtract(1, "year").valueOf();
>>>>>>> ef47bc8c1f81b198b10dc626fab6a6f54ad62fd5
break;
}
return { st, et }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment