From cd1e57cba425a3131760b807eaaf70d081770add Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Mon, 23 Jun 2025 16:41:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=80=BB=E8=A7=88=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kitchen/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/kitchen/index.vue b/src/views/kitchen/index.vue index c900c14b..10b5d75d 100644 --- a/src/views/kitchen/index.vue +++ b/src/views/kitchen/index.vue @@ -198,6 +198,7 @@ export default { }, InitEChartsOne() { console.log(this.dateRange1) + console.log(this.formatDate(this.dateRange1[0])) var chartData=[] // getProportionOfOrderTypesApi({type:this.type3}).then((response) => { // chartData = response.data; @@ -1105,6 +1106,15 @@ export default { // }); }); }, + + //日期 + formatDate(date) { + // 格式化为 YYYY-MM-DD + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始 + const day = String(date.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + } } }