From 72085226bc9f82a9129b8fbcd17fab1edf9ef270 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 05 一月 2024 15:08:19 +0800 Subject: [PATCH] 1. 修复飞行巡检模块中有效率异常详情弹出框无法正常显示的bug; 2.优化各异常类型的折线图配置项生成逻辑; --- src/utils/exception_common_function/index.js | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/utils/exception_common_function/index.js b/src/utils/exception_common_function/index.js index 0311b9b..dfb6dca 100644 --- a/src/utils/exception_common_function/index.js +++ b/src/utils/exception_common_function/index.js @@ -1,5 +1,9 @@ import dayjs from 'dayjs' export default { + + + + /** * description锛氳繑鍥炴椂闂存暟缁勶紝闂撮殧15鍒嗛挓銆� * @param锛� 寮傚父鐨勫紑濮�,寮傚父缁撴潫鏃堕棿 @@ -14,7 +18,7 @@ } time.push(begin); let temp = dayjs(begin).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); - while (temp != end) { + while (temp >= end) { time.push(temp); temp = dayjs(temp).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); } @@ -73,7 +77,7 @@ */ diffFiftyMinutesNum(beginNormal, endNormal) { // 灏嗗紑濮嬫椂闂村拰缁撴潫鏃堕棿杞崲涓篸ayjs瀵硅薄 - const start = dayjs(beginNormal).subtract(15, 'minute'); + const start = dayjs(beginNormal) const end = dayjs(endNormal); // 璁$畻缁撴潫鏃堕棿鍑忓幓寮�濮嬫椂闂翠腑闂寸浉宸灏戜釜鍗佸垎閽� @@ -112,9 +116,8 @@ let obj = {}; let current = intervalStarTime; let tail = dayjs(intervalEndTime) - .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); - while (current != tail) { + while (current <= tail) { let value = this.findTimeInExceptionData( headAndTailExceptionData, current -- Gitblit v1.9.3