From 4fb4a10815ffb3a27a8bc1d2b2608d187a7cba2a Mon Sep 17 00:00:00 2001
From: xiayuping666 <1269237624@qq.com>
Date: Sun, 4 Feb 2024 17:31:34 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=AF=8F=E6=97=A5=E9=A3=9F?=
=?UTF-8?q?=E8=B0=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/recipe/api.js | 73 +++++-
src/views/recipe/components/CommonHead.vue | 14 +-
src/views/recipe/index.vue | 255 ++++++++++++++++-----
3 files changed, 286 insertions(+), 56 deletions(-)
diff --git a/src/views/recipe/api.js b/src/views/recipe/api.js
index d6e7408..8a8589a 100644
--- a/src/views/recipe/api.js
+++ b/src/views/recipe/api.js
@@ -36,6 +36,22 @@ export function postSemester (data) {
data
})
}
+// 修改食谱大标题
+export function putSemester (data) {
+ return request({
+ url: '/semester/recipe',
+ method: 'put',
+ data
+ })
+}
+// 删除食谱大标题
+export function deleteSemester (data) {
+ return request({
+ url: '/semester/recipe/'+data,
+ method: 'delete',
+ })
+}
+
// 通过学期食谱标题id添加这学期的每周食谱
export function postWeek (data) {
return request({
@@ -44,6 +60,24 @@ export function postWeek (data) {
data
})
}
+
+// 修改每周
+export function putWeek (data) {
+ return request({
+ url: '/week/recipe',
+ method: 'put',
+ data
+ })
+}
+// 通过学期食谱标题id添加这学期的每周食谱
+export function deleteWeek (data) {
+ return request({
+ url: '/week/recipe/'+data,
+ method: 'delete',
+ })
+}
+
+
// 添加这周每日食谱
export function postMeal (data) {
return request({
@@ -53,7 +87,6 @@ export function postMeal (data) {
})
}
-
// 修改这周每日食谱
export function putMeal (data) {
return request({
@@ -63,3 +96,41 @@ export function putMeal (data) {
})
}
+// 班级类别列表
+export function getClass (campusId) {
+ return request({
+ url: '/recipe/type/list',
+ method: 'get',
+ params: {
+ campusId
+ }
+ })
+}
+// 添加班级类别
+export function postClass (tName) {
+ return request({
+ url: '/recipe/type',
+ method: 'post',
+ data: {
+ tName
+ }
+ })
+}
+// 修改班级类别
+export function putClass (data) {
+ return request({
+ url: '/recipe/type',
+ method: 'put',
+ data
+ })
+}
+// 删除班级类别
+export function deleteClass (data) {
+ return request({
+ url: '/recipe/type/'+data,
+ method: 'delete',
+ })
+}
+
+
+
diff --git a/src/views/recipe/components/CommonHead.vue b/src/views/recipe/components/CommonHead.vue
index f22b586..b1dd96c 100644
--- a/src/views/recipe/components/CommonHead.vue
+++ b/src/views/recipe/components/CommonHead.vue
@@ -8,12 +8,14 @@
>新增周次
修改周次
- 新增食谱总类别
+ 修改食谱类别
+
@@ -25,7 +27,7 @@
-
+
+ 添加食谱类别
{{ item.tName }}
-
-
-
+
+
+
+
+
+
+
+
+ 立即添加
+ 取消
+
+
+
+
+
+
+
+ 立即创建
+ 取消
+
+
+
@@ -147,21 +175,32 @@
-
-
+
+
{{ item.sName }}
-
{{ item.isEdit ? '修改' : '保存' }}
-
删除
+
{{ !item.isEdit ? '修改' : '保存' }}
+
删除
-
-
- 提交
- 取消
-
-
+
+
+
{{ item.wName }}
+
+
{{ !item.isEdit ? '修改' : '保存' }}
+
删除
+
+
+
+
+
{{ item.tName }}
+
+
{{ !item.isEdit ? '修改' : '保存' }}
+
删除
+
+
+
@@ -169,7 +208,9 @@