diff --git a/src/app/pages/trade/order-oil-list/order-oil-list.component.html b/src/app/pages/trade/order-oil-list/order-oil-list.component.html index fb881c4..1a8f52c 100644 --- a/src/app/pages/trade/order-oil-list/order-oil-list.component.html +++ b/src/app/pages/trade/order-oil-list/order-oil-list.component.html @@ -4,7 +4,7 @@ 交易创建时间 - + diff --git a/src/app/utils/dateUtils.service.ts b/src/app/utils/dateUtils.service.ts index 7ef2e54..d55e17b 100644 --- a/src/app/utils/dateUtils.service.ts +++ b/src/app/utils/dateUtils.service.ts @@ -119,4 +119,21 @@ export class DateUtils { return returnObj; } + + /** + * 获取时间 + * @param startTime 开始时间 + * @param endTime 结束时间 + */ + public static getDateSelectType(startTime: Date, endTime: Date): number { + const type = 0; // 未知 + for (let type of DateSelectType) { + let date = this.getDate(new Date(), type.value); + if (startTime.toLocaleDateString() == new Date(date.timeS).toLocaleDateString() + && endTime.toLocaleDateString() == new Date(date.timeE).toLocaleDateString()) { + return type.value; + } + } + return type; + } }