From 2d864f7f7ca609df83efc7dd7f8abe84b4908e59 Mon Sep 17 00:00:00 2001 From: huang <1724659546@qq.com> Date: Fri, 21 Nov 2025 17:27:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=90=9C=E7=B4=A2=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/swagger.json | 32 ++++++++---- src/api/feed.js | 6 ++- src/components/feed/RawMaterialTable.vue | 66 +++++++++++------------- 3 files changed, 56 insertions(+), 48 deletions(-) diff --git a/docs/swagger.json b/docs/swagger.json index 5531707f..a6bc2184 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1658,7 +1658,7 @@ "parameters": [ { "type": "string", - "description": "按名称模糊查询", + "description": "按营养名称模糊查询", "name": "name", "in": "query" }, @@ -1679,6 +1679,12 @@ "description": "每页数量", "name": "page_size", "in": "query" + }, + { + "type": "string", + "description": "按原料名称模糊查询", + "name": "raw_material_name", + "in": "query" } ], "responses": { @@ -2660,10 +2666,16 @@ "parameters": [ { "type": "string", - "description": "按名称模糊查询", + "description": "按原料名称模糊查询", "name": "name", "in": "query" }, + { + "type": "string", + "description": "按营养名称模糊查询", + "name": "nutrient_name", + "in": "query" + }, { "type": "string", "description": "排序字段,例如 \"id DESC\"", @@ -3069,7 +3081,6 @@ }, { "enum": [ - 7, -1, 0, 1, @@ -3079,12 +3090,12 @@ 5, -1, 5, - 6 + 6, + 7 ], "type": "integer", "format": "int32", "x-enum-varnames": [ - "_numLevels", "DebugLevel", "InfoLevel", "WarnLevel", @@ -3094,7 +3105,8 @@ "FatalLevel", "_minLevel", "_maxLevel", - "InvalidLevel" + "InvalidLevel", + "_numLevels" ], "name": "level", "in": "query" @@ -9641,7 +9653,6 @@ "type": "integer", "format": "int32", "enum": [ - 7, -1, 0, 1, @@ -9651,10 +9662,10 @@ 5, -1, 5, - 6 + 6, + 7 ], "x-enum-varnames": [ - "_numLevels", "DebugLevel", "InfoLevel", "WarnLevel", @@ -9664,7 +9675,8 @@ "FatalLevel", "_minLevel", "_maxLevel", - "InvalidLevel" + "InvalidLevel", + "_numLevels" ] } }, diff --git a/src/api/feed.js b/src/api/feed.js index 9c9230a8..0ef19a75 100644 --- a/src/api/feed.js +++ b/src/api/feed.js @@ -30,7 +30,8 @@ import {PaginationDTO, Response} from '../enums'; /** * @typedef {object} NutrientsParams - * @property {string} [name] - 按名称模糊查询 + * @property {string} [name] - 按营养名称模糊查询 + * @property {string} [raw_material_name] - 按原料名称模糊查询 * @property {string} [order_by] - 排序字段,例如 "id DESC" * @property {number} [page] * @property {number} [page_size] @@ -239,7 +240,8 @@ import {PaginationDTO, Response} from '../enums'; /** * @typedef {object} RawMaterialsParams - * @property {string} [name] - 按名称模糊查询 + * @property {string} [name] - 按原料名称模糊查询 + * @property {string} [nutrient_name] - 按营养名称模糊查询 * @property {string} [order_by] - 排序字段,例如 "id DESC" * @property {number} [page] * @property {number} [page_size] diff --git a/src/components/feed/RawMaterialTable.vue b/src/components/feed/RawMaterialTable.vue index 26937227..ba97913f 100644 --- a/src/components/feed/RawMaterialTable.vue +++ b/src/components/feed/RawMaterialTable.vue @@ -1,5 +1,21 @@