From 8b2306aac01a7d1977090dd5b65939f2c3d98972 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 25 Apr 2025 11:27:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8A=8A=E9=83=A8=E9=97=A8=E5=8E=BB=E6=8E=89=E5=92=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=8D=E6=B4=BB=E8=B7=83=E9=92=B1=E5=8C=85?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/admin/system/user/form.vue | 6 +- src/views/canteenDailyDishes/index.vue | 43 ++--- src/views/wallet/wallet-inactive/index.vue | 215 +++++++++++++++++++++ 3 files changed, 238 insertions(+), 26 deletions(-) create mode 100644 src/views/wallet/wallet-inactive/index.vue diff --git a/src/views/admin/system/user/form.vue b/src/views/admin/system/user/form.vue index e25012a..26f638a 100644 --- a/src/views/admin/system/user/form.vue +++ b/src/views/admin/system/user/form.vue @@ -42,7 +42,7 @@ - + { dataForm.password = "******" } - // 加载使用的数据 - getDeptData() + // 新增时加载部门树数据,修改时不加载 + !id ? getDeptData() : "" getPostData() getRoleData() } diff --git a/src/views/canteenDailyDishes/index.vue b/src/views/canteenDailyDishes/index.vue index 07a86aa..e623eca 100644 --- a/src/views/canteenDailyDishes/index.vue +++ b/src/views/canteenDailyDishes/index.vue @@ -25,17 +25,17 @@
-
+
-

今日菜品

+

今日午餐菜品

{{ currentDate }} {{ currentTime }}
-
+
@@ -43,7 +43,7 @@ @@ -71,7 +71,7 @@
@@ -104,7 +104,7 @@
-
+
@@ -114,7 +114,7 @@
@@ -147,7 +147,7 @@
-
+
@@ -157,9 +157,9 @@
-
+
智慧食堂 -
+
@@ -172,10 +172,8 @@ import dayjs from "dayjs" import { ElTooltip } from "element-plus" import { selectTimeFoodApi } from "/@/api/canteen/canteenDailyMenu" import { getAllSimple as getCanteenCategory } from "/@/api/canteen/canteenCategory" -import { useDict } from "/@/hooks/dict" import { displayPrice } from "/@/utils/formatMoney" -const { daily_menu } = useDict("daily_menu") const containerRef = ref(null) const currentDate = ref(dayjs().format("YYYY年MM月DD日")) const currentTime = ref(dayjs().format("HH:mm:ss")) @@ -210,23 +208,22 @@ const foodData = reactive<{ dinner: [], }) -// 根据时段获取菜品 +// 根据日期和时段获取菜品 const getDishByType = async () => { const result = await selectTimeFoodApi({ time: dayjs().format("YYYY-MM-DD"), // time: "2025-03-14", // time: "2025-02-07", merchantId: "1887400193644199937", - // hourType: 2, }) - if (result.code === 0) { + if (result.code == 0) { result.data.forEach((r: any) => { switch (r.hourType) { case 1: // foodData.breakfast = r.dailyMenuVOS break case 2: - foodData.lunch = r.dailyMenuVOS.filter((v: any, index: number) => index < 13) + foodData.lunch = r.dailyMenuVOS.filter((v: any, index: number) => index < 12) break case 3: // foodData.dinner = r.dailyMenuVOS @@ -464,7 +461,7 @@ const gridStyle = computed(() => { } }) -// 添加一个简单的防抖函数 +// 防抖函数 function debounce(fn: Function, delay: number) { let timer: number | null = null return function (this: any, ...args: any[]) { @@ -478,16 +475,16 @@ function debounce(fn: Function, delay: number) {