From d8c918768a63499ad92238e68abd66af48daf4c7 Mon Sep 17 00:00:00 2001
From: wyt <414651037@qq.com>
Date: Wed, 20 Aug 2025 18:42:55 +0800
Subject: [PATCH 1/8] =?UTF-8?q?=E7=BE=8A=E5=8F=AA=E5=88=86=E7=BB=84?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=8B=E6=8B=89=E6=A1=86=E8=B0=83=E6=95=B4?=
=?UTF-8?q?=E4=B8=BA=E5=B5=8C=E5=A5=97=E6=9F=A5=E8=AF=A2=EF=BC=8C=E7=BE=8A?=
=?UTF-8?q?=E8=88=8D=E7=AE=A1=E7=90=86=E6=B7=BB=E5=8A=A0=E5=8F=AF=E8=A7=86?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/fileManagement/sheep_grouping.js | 9 +
.../fileManagement/sheepfold_management.js | 8 +
.../fileManagement/sheep_grouping/index.vue | 57 ++++++-
.../sheepfold_management/index.vue | 154 +++++++++++++++++-
4 files changed, 218 insertions(+), 10 deletions(-)
diff --git a/src/api/fileManagement/sheep_grouping.js b/src/api/fileManagement/sheep_grouping.js
index fb7d871..960b399 100644
--- a/src/api/fileManagement/sheep_grouping.js
+++ b/src/api/fileManagement/sheep_grouping.js
@@ -61,3 +61,12 @@ export function addByEarTags(data) {
data
})
}
+
+
+
+// 树形分组
+export const listGroupTree = () =>
+ request({
+ url: '/sheep_grouping/sheep_grouping/group/tree',
+ method: 'get'
+ })
\ No newline at end of file
diff --git a/src/api/fileManagement/sheepfold_management.js b/src/api/fileManagement/sheepfold_management.js
index 4847cd3..0e639b1 100644
--- a/src/api/fileManagement/sheepfold_management.js
+++ b/src/api/fileManagement/sheepfold_management.js
@@ -55,3 +55,11 @@ export function checkSheepfoldNoExist(ranchId, sheepfoldTypeId, sheepfoldNo) {
}
})
}
+
+// 获取树形座位图(牧场 → 类型 → 羊舍 → 排栏)
+export function getSeatMap() {
+ return request({
+ url: '/sheepfold_management/sheepfold_management/seatMap',
+ method: 'get'
+ })
+}
diff --git a/src/views/fileManagement/sheep_grouping/index.vue b/src/views/fileManagement/sheep_grouping/index.vue
index afc48e6..dc7665d 100644
--- a/src/views/fileManagement/sheep_grouping/index.vue
+++ b/src/views/fileManagement/sheep_grouping/index.vue
@@ -18,7 +18,7 @@
/>
-
-
-
+ -->
+
+
+
搜索
重置
@@ -134,14 +141,27 @@
-
+
+
+
+
@@ -159,6 +179,7 @@ import { listSheep_grouping, getSheep_grouping, delSheep_grouping, addSheep_grou
import {listLeafGroup} from "@/api/fileManagement/group_management"
import {listSheep_grouping_join} from "@/api/fileManagement/sheep_grouping"
import { addByEarTags } from '@/api/fileManagement/sheep_grouping'
+import { listGroupTree } from '@/api/fileManagement/sheep_grouping'
const { proxy } = getCurrentInstance()
@@ -173,6 +194,8 @@ const total = ref(0)
const title = ref("")
const leafGroupOptions = ref([])
const { sheep_gender } = proxy.useDict('sheep_gender')
+// data 里声明
+const groupTree = ref([])
const data = reactive({
form: {
@@ -390,17 +413,33 @@ loadLeafGroups()
getList()
+// // 调用示例
+// function loadLeafGroups() {
+// listLeafGroup().then(res => {
+// leafGroupOptions.value = res.data
+// })
+// }
+
// 调用示例
function loadLeafGroups() {
- listLeafGroup().then(res => {
- leafGroupOptions.value = res.data
+ listGroupTree().then(res => {
+ groupTree.value = res.data
+ console.log(groupTree.value)
})
}
+
// 根据 groupId 获取分组名称
+// function getGroupName(id) {
+// const group = leafGroupOptions.value.find(g => g.groupId === id)
+// return group ? group.groupName : ''
+// }
+
function getGroupName(id) {
- const group = leafGroupOptions.value.find(g => g.groupId === id)
- return group ? group.groupName : ''
+ const flatten = (arr) =>
+ arr.reduce((acc, cur) => acc.concat(cur, flatten(cur.children || [])), [])
+ const node = flatten(groupTree.value).find(n => n.groupId === id)
+ return node ? node.groupName : ''
}
diff --git a/src/views/fileManagement/sheepfold_management/index.vue b/src/views/fileManagement/sheepfold_management/index.vue
index de5b88c..c71db04 100644
--- a/src/views/fileManagement/sheepfold_management/index.vue
+++ b/src/views/fileManagement/sheepfold_management/index.vue
@@ -103,6 +103,86 @@
@pagination="getList"
/>
+
+
+ 牧场羊舍示意图
+
+
+
+
+
+
+
+
+
+
+
+ {{ fold.foldNo }}号{{type.typeName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -190,7 +270,7 @@
@@ -462,4 +584,34 @@ getList()
border-radius: 4px;
background-color: #f5f7fa;
}
+
+/* ===== 图形化展示样式 ===== */
+.seat-block {
+ margin-bottom: 8px;
+}
+.row-label {
+ font-weight: bold;
+ margin-bottom: 4px;
+}
+.seat-row {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 4px;
+}
+.seat {
+ width: 32px;
+ height: 32px;
+ border: 1px solid #dcdfe6;
+ border-radius: 4px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 12px;
+ cursor: pointer;
+ background: #f2f6fc;
+}
+.seat.occupied {
+ background: #67c23a;
+ color: #fff;
+}
\ No newline at end of file
From fc40d2e408e48d3ed2f9b289ae03b6c958fe278b Mon Sep 17 00:00:00 2001
From: wyt <414651037@qq.com>
Date: Wed, 20 Aug 2025 18:45:24 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BE=8A=E5=8F=AA?=
=?UTF-8?q?=E5=88=86=E7=BB=84=E5=AF=BC=E5=87=BAbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/fileManagement/sheepfold_management/index.vue | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/views/fileManagement/sheepfold_management/index.vue b/src/views/fileManagement/sheepfold_management/index.vue
index c71db04..a2fd14f 100644
--- a/src/views/fileManagement/sheepfold_management/index.vue
+++ b/src/views/fileManagement/sheepfold_management/index.vue
@@ -376,6 +376,7 @@ function reset() {
function handleQuery() {
queryParams.value.pageNum = 1
getList()
+ loadSeatMap()
}
/** 重置按钮操作 */
@@ -469,7 +470,7 @@ function submitForm() {
proxy.$modal.msgSuccess("修改成功")
open.value = false
getList()
- loadSeatMap();
+ loadSeatMap()
})
} else {
// 新增操作 - 多条记录
@@ -567,6 +568,7 @@ onMounted(() => {
getList()
+loadSeatMap()
From a28829840c33df781fea47552be82af2c013991e Mon Sep 17 00:00:00 2001
From: HashMap
Date: Tue, 26 Aug 2025 12:18:28 +0800
Subject: [PATCH 3/8] =?UTF-8?q?refactor=20(views/feed)=20=E5=AE=8C?=
=?UTF-8?q?=E5=96=84=E9=85=8D=E6=96=99=E6=B8=85=E5=8D=95=E5=92=8C=E9=A5=B2?=
=?UTF-8?q?=E5=96=82=E9=87=8F=E7=BB=9F=E8=AE=A1=E9=A1=B5=E9=9D=A2=20+=20?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=85=8D=E6=96=99=E6=B8=85=E5=8D=95?=
=?UTF-8?q?=E5=92=8C=E9=A5=B2=E5=96=82=E9=87=8F=E7=BB=9F=E8=AE=A1=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E7=9A=84=E9=83=A8=E5=88=86=E9=A1=B5=E9=9D=A2=E9=80=BB?=
=?UTF-8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/feed/FeedList/index.vue | 15 +++++++-------
src/views/feed/FeedStatistic/index.vue | 27 +++++++++++++++++++++-----
2 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/src/views/feed/FeedList/index.vue b/src/views/feed/FeedList/index.vue
index 0af5624..3c86ff0 100644
--- a/src/views/feed/FeedList/index.vue
+++ b/src/views/feed/FeedList/index.vue
@@ -19,9 +19,9 @@
-
+
修改
@@ -49,11 +49,11 @@
{{ scope.row.rootPlan ? parseTime(scope.row.rootPlan.planDate, '{y}-{m}-{d}') : '' }}
-
+
详情
@@ -75,11 +75,11 @@
-
+