From 37ac8662ecf12dad8c1054c5b4a02a98156bf697 Mon Sep 17 00:00:00 2001 From: lq <121091329@qq.com> Date: Fri, 29 Aug 2025 16:39:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E7=9A=84=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/DateUtils.ts | 8 + .../assignment-management/index.vue | 147 +++++++++++------- 2 files changed, 98 insertions(+), 57 deletions(-) diff --git a/src/utils/DateUtils.ts b/src/utils/DateUtils.ts index 1f51f0b..9b2a237 100644 --- a/src/utils/DateUtils.ts +++ b/src/utils/DateUtils.ts @@ -33,6 +33,14 @@ class DateUtils { }; } + static MonthStrToDate(dateStr: string): Date { + const year = parseInt(dateStr.split('年')[0]); + const month = parseInt(dateStr.split('年')[1].split('月')[0]) - 1; // 月份从0开始 + + const date = new Date(year, month, 1); + return date; + } + /** * 获取指定年份和月的范围 * @param year 年份 diff --git a/src/views/property-marketing/assignment-management/index.vue b/src/views/property-marketing/assignment-management/index.vue index 2200bd9..9cd4f3e 100644 --- a/src/views/property-marketing/assignment-management/index.vue +++ b/src/views/property-marketing/assignment-management/index.vue @@ -15,6 +15,7 @@ v-else-if="choseType === '周'" @change="onChangeWeek" v-model="weekModel" + format="YYYY年MM月DD日" />