From 13371b71ce47cb6b9590dcc51a88306ab3c08762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=9F=B5=E7=90=B4?= <757188142@qq.com> Date: Mon, 25 May 2026 17:43:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=9F=E5=9C=B0=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=A1=A8=E6=A0=BC=E5=88=97=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E4=B8=8E=E5=BC=B9=E7=AA=97=E5=AD=97=E6=AE=B5=E7=B2=BE=E7=AE=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 种植/养殖环境表格列重排,土壤类型/负责人/状态前置,与详情Drawer索引对齐 - 筛选栏种植作物、动物种类改为自由文本输入 - 新增弹窗精简非必填字段(种植作物/状态/灌溉方式/动物种类/养殖方式等) - 移除种植作物搜索选择框及其JS逻辑 - 修正showPlotDetail/showBreedDetail的td取值索引 Co-Authored-By: Claude Sonnet 4.6 --- web-admin/nutrition/doc/CHANGELOG.md | 14 +++++ web-admin/nutrition/farm-land.html | 93 ++++++---------------------- 2 files changed, 32 insertions(+), 75 deletions(-) diff --git a/web-admin/nutrition/doc/CHANGELOG.md b/web-admin/nutrition/doc/CHANGELOG.md index e04f8a0..c4191c7 100644 --- a/web-admin/nutrition/doc/CHANGELOG.md +++ b/web-admin/nutrition/doc/CHANGELOG.md @@ -1,5 +1,19 @@ # 营养用餐管理端 CHANGELOG +## [2026-05-25] + +### 修复 — 绿色种采 · 土地环境页面结构修正 + +- **`farm-land.html`** 土地环境 + - 种植环境表格列顺序调整:「土壤类型/负责人/地块状态」前置,「种植作物/灌溉方式」后移,与详情 Drawer 取值逻辑保持一致 + - 养殖环境表格列顺序调整:「负责人/养殖状态」前置,「动物种类/养殖方式」后移 + - 筛选栏「种植作物」由固定 select 改为自由文本输入框,「动物种类」同步调整 + - 新增地块弹窗精简字段:移除「种植作物(搜索选择框)」「地块状态」「灌溉方式」三项(由后续流程维护) + - 新增养殖区弹窗精简字段:移除「动物种类」「养殖方式」「养殖状态」三项 + - 移除种植作物搜索选择框(search-select)及其 JS 初始化逻辑 + - 修正 `showPlotDetail` / `showBreedDetail` 函数中 td 索引,与调整后列顺序保持一致 + - 休耕/空置状态行的「种植作物」「灌溉方式」(或「动物种类」「养殖方式」)数据清空,避免显示旧的脏数据 + ## [2026-05-22] ### 增强 — 营养用餐模块多页面交互优化 diff --git a/web-admin/nutrition/farm-land.html b/web-admin/nutrition/farm-land.html index 839d5d6..ccb4f7d 100644 --- a/web-admin/nutrition/farm-land.html +++ b/web-admin/nutrition/farm-land.html @@ -221,9 +221,7 @@ table thead .sub-header th{font-size:12px;font-weight:500;}
-
- -
+
@@ -249,7 +247,7 @@ table thead .sub-header th{font-size:12px;font-weight:500;} - + @@ -260,16 +258,16 @@ table thead .sub-header th{font-size:12px;font-weight:500;} - + - + - + - + @@ -294,9 +292,7 @@ table thead .sub-header th{font-size:12px;font-weight:500;}
-
- -
+
@@ -322,7 +318,7 @@ table thead .sub-header th{font-size:12px;font-weight:500;}
地块编号地块名称面积(亩)种植作物灌溉方式土壤类型负责人地块状态地块编号地块名称面积(亩)土壤类型负责人地块状态种植作物灌溉方式 最新监测数据 操作
LAND-001A区蔬菜基地12.5菠菜/白菜滴灌壤土张三种植中
LAND-001A区蔬菜基地12.5壤土张三种植中菠菜/白菜滴灌 17.2726.8142381860.02 2026-04-22 10:05正常详情编辑采集记录删除
LAND-002B区根茎基地8.0胡萝卜喷灌砂土李四种植中
LAND-002B区根茎基地8.0砂土李四种植中胡萝卜喷灌 18.4657.1128422100.01 2026-04-22 10:05详情编辑采集记录删除
LAND-003C区菌菇大棚3.2香菇滴灌壤土李四种植中
LAND-003C区菌菇大棚3.2壤土李四种植中香菇滴灌 22.1856.5168522240.00 2026-04-22 10:04详情编辑采集记录删除
LAND-004D区豆类基地6.8四季豆漫灌黏土王五休耕中
LAND-004D区豆类基地6.8黏土王五休耕中 16.8586.996281580.03 2026-04-22 10:05正常详情编辑采集记录删除
- + @@ -332,19 +328,19 @@ table thead .sub-header th{font-size:12px;font-weight:500;} - + - + - + - + @@ -374,18 +370,6 @@ table thead .sub-header th{font-size:12px;font-weight:500;}
-
-
- -
-
-
-
- -
-
- -
@@ -412,15 +396,6 @@ table thead .sub-header th{font-size:12px;font-weight:500;}
-
- -
-
- -
-
- -
@@ -543,12 +518,10 @@ function openPlotModal(mode, id, name, area, crop, status){ document.getElementById('plotId').value=id||''; document.getElementById('plotName').value=name||''; document.getElementById('plotArea').value=area||''; - document.getElementById('plotCrop').value=crop||''; - document.getElementById('plotStatus').value=status||'种植中'; document.getElementById('plotId').readOnly=true; } else { document.getElementById('plotId').value='';document.getElementById('plotName').value=''; - document.getElementById('plotArea').value='';document.getElementById('plotCrop').value=''; + document.getElementById('plotArea').value=''; document.getElementById('plotId').readOnly=false; } document.getElementById('plotModal').style.display='flex'; @@ -563,9 +536,7 @@ function openBreedModal(mode, id, name, area, animal, method, status){ document.getElementById('breedId').value=id||''; document.getElementById('breedName').value=name||''; document.getElementById('breedArea').value=area||''; - document.getElementById('breedAnimal').value=animal||'猪'; document.getElementById('breedMethod').value=method||'圈养'; - document.getElementById('breedStatus').value=status||'养殖中'; document.getElementById('breedId').readOnly=true; } else { document.getElementById('breedId').value='';document.getElementById('breedName').value=''; @@ -581,8 +552,8 @@ function showPlotDetail(el){ var tr=el.closest('tr'); var cells=tr.querySelectorAll('td'); var id=cells[0].textContent, name=cells[1].textContent, area=cells[2].textContent; - var crop=cells[3].textContent, irrigation=cells[4].textContent, soil=cells[5].textContent; - var person=cells[6].textContent, status=cells[7].textContent; + var soil=cells[3].textContent, person=cells[4].textContent; + var status=cells[5].textContent, crop=cells[6].textContent, irrigation=cells[7].textContent; var temp=cells[8].textContent, hum=cells[9].textContent, ph=cells[10].textContent; var n=cells[11].textContent, p=cells[12].textContent, k=cells[13].textContent; var pest=cells[14].textContent, water=cells[15].textContent; @@ -631,8 +602,9 @@ function showBreedDetail(el){ var tr=el.closest('tr'); var cells=tr.querySelectorAll('td'); var id=cells[0].textContent, name=cells[1].textContent, area=cells[2].textContent; - var animal=cells[3].textContent, method=cells[4].textContent, person=cells[5].textContent; - var status=cells[6].textContent, temp=cells[7].textContent, hum=cells[8].textContent; + var person=cells[3].textContent, status=cells[4].textContent; + var animal=cells[5].textContent, method=cells[6].textContent; + var temp=cells[7].textContent, hum=cells[8].textContent; var nh3=cells[9].textContent, co2=cells[10].textContent, lux=cells[11].textContent; var vent=cells[12].textContent, water=cells[13].textContent, waste=cells[14].textContent; var time=cells[15].textContent, warn=cells[16].textContent; @@ -674,35 +646,6 @@ function showBreedDetail(el){ } function closeBreedDetail(){document.getElementById('breedDetailDrawer').classList.remove('open');} -// --- 种植作物搜索选择框 --- -(function(){ - var cropOptions=['菠菜','白菜','胡萝卜','香菇','四季豆','番茄','黄瓜','茄子','辣椒','西兰花','芹菜','生菜','土豆','红薯','玉米','小麦','水稻','大豆','花生','油菜']; - var input=document.getElementById('plotCrop'); - var dropdown=document.getElementById('plotCropDropdown'); - function renderOptions(keyword){ - var filtered=keyword?cropOptions.filter(function(c){return c.indexOf(keyword)>-1;}):cropOptions; - if(filtered.length===0){ - dropdown.innerHTML='
无匹配结果
'; - } else { - dropdown.innerHTML=filtered.map(function(c){return '
'+c+'
';}).join(''); - } - dropdown.classList.add('show'); - } - input.addEventListener('focus',function(){renderOptions(this.value);}); - input.addEventListener('input',function(){renderOptions(this.value);}); - dropdown.addEventListener('click',function(e){ - if(e.target.classList.contains('search-select__option')){ - input.value=e.target.textContent; - dropdown.classList.remove('show'); - } - }); - document.addEventListener('click',function(e){ - if(!document.getElementById('plotCropSelect').contains(e.target)){ - dropdown.classList.remove('show'); - } - }); -})(); - // --- 预警记录弹窗逻辑 --- var alarmData={ 'LAND-001':[],
养殖区编号养殖区名称面积(㎡)动物种类养殖方式负责人养殖状态养殖区编号养殖区名称面积(㎡)负责人养殖状态动物种类养殖方式 最新监测数据 操作
BREED-A1A1-猪舍1,200猪(杜洛克)圈养王建国养殖中
BREED-A1A1-猪舍1,200王建国养殖中猪(杜洛克)圈养 22.4688.21,240180 正常正常 2026-04-22 10:05正常详情编辑采集记录删除
BREED-B3B3-鸡舍860鸡(黄羽鸡)散养李秀芳养殖中
BREED-B3B3-鸡舍860李秀芳养殖中鸡(黄羽鸡)散养 24.66212.51,580320 正常正常 2026-04-22 10:05正常详情编辑采集记录删除
BREED-C2C2-鸭舍640鸭(麻鸭)散养陈大明养殖中
BREED-C2C2-鸭舍640陈大明养殖中鸭(麻鸭)散养 23.87018.61,820210 告警异常 2026-04-22 10:04详情编辑采集记录删除
BREED-D1D1-羊舍480羊(湖羊)圈养赵志强空置
BREED-D1D1-羊舍480赵志强空置 20.2556.4860150 正常正常 2026-04-22 10:05正常详情编辑采集记录删除