From 2e59c07704c0c69e822894b0a504e12679a6250e Mon Sep 17 00:00:00 2001 From: HashMap Date: Sun, 18 Jan 2026 14:50:06 +0800 Subject: [PATCH] =?UTF-8?q?feat|fix(views):=20=E5=8E=9F=E6=96=99=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=9D=A2=E6=9D=BF=20|=20=E4=B8=8B=E6=8B=89=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=AF=B7=E6=B1=82=E9=80=BB=E8=BE=91=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + 添加原料管理面板以支持手动原料增删改 + 对`配方管理``饲喂统计`部分有关原料列表获取函数的传参错误做出修正 使用materialQueryParams.value, 解决引用错误导致后端无法正确收到查询参数 这将导致分页参数被错误置为默认10,从而使下拉列表无法显示全部原料 --- src/views/feed/FeedStatistic/index.vue | 10 +- src/views/feed/FormulaManagement/index.vue | 954 +++++++++++---------- src/views/feed/material/index.vue | 278 ++++++ 3 files changed, 763 insertions(+), 479 deletions(-) create mode 100644 src/views/feed/material/index.vue diff --git a/src/views/feed/FeedStatistic/index.vue b/src/views/feed/FeedStatistic/index.vue index 6f2c79c..505a095 100644 --- a/src/views/feed/FeedStatistic/index.vue +++ b/src/views/feed/FeedStatistic/index.vue @@ -201,7 +201,7 @@ import { listFeedStatistic, getFeedStatistic, delFeedStatistic, addFeedStatistic, updateFeedStatistic, initFeedStatistic } from "@/api/feed/FeedStatistic" import { listFormulaManagement } from "@/api/feed/FormulaManagement" import { listSheepfold } from "@/api/produce/manage_sheep/trans_group.js"; - import { listMaterial } from "@/api/feed/Material" + import { listMaterial } from "@/api/feed/material" import { ref } from "vue"; const { proxy } = getCurrentInstance() @@ -263,10 +263,12 @@ const materialQueryParams = ref({ materialId: null, materialName: null, - isGranular: null + isGranular: null, + pageNum: 1, + pageSize: 99999 }) function getMaterials() { - listMaterial(materialQueryParams).then(response => { + listMaterial(materialQueryParams.value).then(response => { console.log("获取原料列表:", response) materials.value = response.rows.map(item => ({ value: item.materialId, @@ -282,7 +284,7 @@ // 从后端获取数据并按isGranular分组 function getGroupMaterials() { - listMaterial(materialQueryParams).then(response => { + listMaterial(materialQueryParams.value).then(response => { console.log("获取原料列表:", response) // 根据material_type分组数据 diff --git a/src/views/feed/FormulaManagement/index.vue b/src/views/feed/FormulaManagement/index.vue index 06c552d..c858eb4 100644 --- a/src/views/feed/FormulaManagement/index.vue +++ b/src/views/feed/FormulaManagement/index.vue @@ -149,14 +149,14 @@ - + - + diff --git a/src/views/feed/material/index.vue b/src/views/feed/material/index.vue new file mode 100644 index 0000000..8c80dd1 --- /dev/null +++ b/src/views/feed/material/index.vue @@ -0,0 +1,278 @@ + + +