From 485197c75c0f761848fb16ae46067e560eedbdca Mon Sep 17 00:00:00 2001
From: chenbo <709206448@qq.com>
Date: Sat, 13 Jan 2024 14:20:38 +0800
Subject: [PATCH] update
---
admin/src/api/fence_house.ts | 4 +
admin/src/api/monitor_threshold.ts | 4 +
admin/src/views/device/edit.vue | 13 +-
admin/src/views/fence_house/edit.vue | 42 ++-
admin/src/views/fence_house/index.vue | 2 +-
admin/src/views/monitor_threshold/edit.vue | 282 +++++++-----------
admin/src/views/monitor_threshold/index.vue | 75 ++++-
admin/src/views/product/edit.vue | 41 ++-
admin/src/views/product/index.vue | 12 +-
.../controller/farm/FarmController.php | 6 +
.../fence_house/FenceHouseController.php | 7 +
.../lists/device/MonitorThresholdLists.php | 2 +-
.../logic/device/MonitorThresholdLogic.php | 54 ++--
app/adminapi/logic/farm/FarmLogic.php | 13 +
.../logic/fence_house/FenceHouseLogic.php | 19 ++
app/adminapi/logic/land/ProductLogic.php | 51 +---
.../device/MonitorThresholdValidate.php | 46 +--
app/common/model/device/MonitorThreshold.php | 7 +-
18 files changed, 336 insertions(+), 344 deletions(-)
diff --git a/admin/src/api/fence_house.ts b/admin/src/api/fence_house.ts
index 40ed34a..bf7bec6 100644
--- a/admin/src/api/fence_house.ts
+++ b/admin/src/api/fence_house.ts
@@ -23,4 +23,8 @@ export function apiFenceHouseDelete(params: any) {
// 栏舍管理详情
export function apiFenceHouseDetail(params: any) {
return request.get({ url: '/fence_house.fence_house/detail', params })
+}
+
+export function apiFarmLists(params: any) {
+ return request.get({ url: '/farm.farm/datas', params })
}
\ No newline at end of file
diff --git a/admin/src/api/monitor_threshold.ts b/admin/src/api/monitor_threshold.ts
index b4f33f1..d7abd6f 100644
--- a/admin/src/api/monitor_threshold.ts
+++ b/admin/src/api/monitor_threshold.ts
@@ -23,4 +23,8 @@ export function apiMonitorThresholdDelete(params: any) {
// 报警配置详情
export function apiMonitorThresholdDetail(params: any) {
return request.get({ url: '/device.monitor_threshold/detail', params })
+}
+
+export function apiFenceHouseLists(params: any) {
+ return request.get({ url: '/fence_house.fence_house/datas', params })
}
\ No newline at end of file
diff --git a/admin/src/views/device/edit.vue b/admin/src/views/device/edit.vue
index ee9205d..0306990 100644
--- a/admin/src/views/device/edit.vue
+++ b/admin/src/views/device/edit.vue
@@ -43,7 +43,7 @@
-
+
{
popupRef.value?.close()
emit('success')
}
-
+const generateUuid = () => {
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+ const r = (Math.random() * 16) | 0
+ const v = c == 'x' ? r : (r & 0x3) | 0x8
+ return v.toString(16)
+ })
+}
//打开弹窗
const open = (type = 'add') => {
mode.value = type
- popupRef.value?.open()
+ formData.code = generateUuid()
+ popupRef.value?.open()
}
// 关闭回调
diff --git a/admin/src/views/fence_house/edit.vue b/admin/src/views/fence_house/edit.vue
index 6302db9..d150794 100644
--- a/admin/src/views/fence_house/edit.vue
+++ b/admin/src/views/fence_house/edit.vue
@@ -9,8 +9,21 @@
@close="handleClose"
>
-
-
+
+
+
+
@@ -56,9 +69,11 @@