From 1129a8693b2a0c014af0bc9e2abecf1d43742b48 Mon Sep 17 00:00:00 2001 From: qianlishi <1432731663@qq.com> Date: Mon, 26 Jul 2021 09:58:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8E=A7=E4=BB=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=98=9F=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/report/bigscreen/designer/tools.js | 3 ++ .../bigscreen/designer/widget/widgetTime.vue | 34 ++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/report-ui/src/views/report/bigscreen/designer/tools.js b/report-ui/src/views/report/bigscreen/designer/tools.js index cd4057f8..1276d16f 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools.js +++ b/report-ui/src/views/report/bigscreen/designer/tools.js @@ -578,6 +578,9 @@ const widgetTools = [ {code: 'MM-dd', name: '日期无年'}, {code: 'hh:mm', name: '时分'}, {code: 'hh:mm:ss', name: '时分秒'}, + {code: 'year-week', name: '日期+星期'}, + {code: 'year-h-m-week', name: '日期+时分+星期'}, + {code: 'year-h-m-s-week', name: '日期+时分秒+星期'}, {code: 'week', name: '星期'} ], value: 'yyyy-MM-dd hh:mm:ss' diff --git a/report-ui/src/views/report/bigscreen/designer/widget/widgetTime.vue b/report-ui/src/views/report/bigscreen/designer/widget/widgetTime.vue index 05fe53ab..2bea618f 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/widgetTime.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/widgetTime.vue @@ -106,7 +106,39 @@ export default { dayCycle = "星期" + dayCycleArray[i]; } } - return dayCycle; + if (fmt == "year-week") { + return year + "-" + month + "-" + day + dayCycle; + } else if (fmt == "year-h-m-week") { + return ( + year + + "-" + + month + + "-" + + day + + " " + + hours + + ":" + + minutes + + dayCycle + ); + } else if (fmt == "year-h-m-s-week") { + return ( + year + + "-" + + month + + "-" + + day + + " " + + hours + + ":" + + minutes + + ":" + + seconds + + dayCycle + ); + } else if (fmt == "week") { + return dayCycle; + } }, displayTime() { this.timestr =