>()
// 是否显示编辑框
const showEdit = ref(false)
-
+let fence_house_id = query.fence_house_id
+if (typeof fence_house_id == 'undefined') {
+ fence_house_id = ''
+}
// 查询条件
const queryParams = reactive({
sn: '',
+ fence_house_id: fence_house_id
})
// 选中数据
diff --git a/admin/src/views/fence_house/index.vue b/admin/src/views/fence_house/index.vue
index b94a325..39577a9 100644
--- a/admin/src/views/fence_house/index.vue
+++ b/admin/src/views/fence_house/index.vue
@@ -33,7 +33,7 @@
-
+
-
+
删除
+
+
+ 动物档案
+
+
@@ -101,6 +117,7 @@ import { apiFenceHouseLists, apiFenceHouseDelete } from '@/api/fence_house'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
+import {getRoutePath} from "@/router";
const editRef = shallowRef>()
// 是否显示编辑框
diff --git a/app/adminapi/lists/animal_info/AnimalInfoLists.php b/app/adminapi/lists/animal_info/AnimalInfoLists.php
index 7f57fbf..7c92f6e 100644
--- a/app/adminapi/lists/animal_info/AnimalInfoLists.php
+++ b/app/adminapi/lists/animal_info/AnimalInfoLists.php
@@ -1,77 +1,79 @@
- ['sn'],
- ];
- }
-
-
- /**
- * @notes 获取列表
- * @return array
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\DbException
- * @throws \think\db\exception\ModelNotFoundException
- * @author likeadmin
- * @date 2024/01/10 15:53
- */
- public function lists(): array
- {
- return AnimalInfo::where($this->searchWhere)
- ->field(['id', 'fence_house_id', 'sn', 'animal_type', 'brand', 'physi_stage', 'gender', 'blood_purity', 'animal_source', 'current_estimation', 'algebra', 'birth', 'entry_date', 'birth_estimation', 'health_condition'])
- ->limit($this->limitOffset, $this->limitLength)
- ->order(['id' => 'desc'])
- ->select()
- ->toArray();
- }
-
-
- /**
- * @notes 获取数量
- * @return int
- * @author likeadmin
- * @date 2024/01/10 15:53
- */
- public function count(): int
- {
- return AnimalInfo::where($this->searchWhere)->count();
- }
-
+ ['sn', 'fence_house_id'],
+
+ ];
+ }
+
+
+ /**
+ * @notes 获取列表
+ * @return array
+ * @throws \think\db\exception\DataNotFoundException
+ * @throws \think\db\exception\DbException
+ * @throws \think\db\exception\ModelNotFoundException
+ * @author likeadmin
+ * @date 2024/01/10 15:53
+ */
+ public function lists(): array
+ {
+ return AnimalInfo::where($this->searchWhere)
+ ->field(['id', 'fence_house_id', 'sn', 'animal_type', 'brand', 'physi_stage', 'gender', 'blood_purity', 'animal_source', 'current_estimation', 'algebra', 'birth', 'entry_date', 'birth_estimation', 'health_condition'])
+ ->with(['fenceHouseAttr'])
+ ->limit($this->limitOffset, $this->limitLength)
+ ->order(['id' => 'desc'])
+ ->select()
+ ->toArray();
+ }
+
+
+ /**
+ * @notes 获取数量
+ * @return int
+ * @author likeadmin
+ * @date 2024/01/10 15:53
+ */
+ public function count(): int
+ {
+ return AnimalInfo::where($this->searchWhere)->count();
+ }
+
}
\ No newline at end of file