From a9a908f9285b631f94e4e553866db2986a7dc8d8 Mon Sep 17 00:00:00 2001
From: yaooo <272523191@qq.com>
Date: Tue, 28 Nov 2023 15:20:27 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=8E=E5=8F=B0=E7=B3=BB?=
=?UTF-8?q?=E7=BB=9F=E7=BB=86=E8=8A=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin/src/views/device/index.vue | 27 ++++++++++-------
admin/src/views/land/index.vue | 32 ++++++++++-----------
admin/src/views/land_plant/index.vue | 6 ++--
admin/src/views/land_plant_action/index.vue | 4 +--
admin/src/views/product/index.vue | 4 +--
app/adminapi/lists/device/DeviceLists.php | 12 +++++---
6 files changed, 48 insertions(+), 37 deletions(-)
diff --git a/admin/src/views/device/index.vue b/admin/src/views/device/index.vue
index 7296ccd8..645e6f4a 100644
--- a/admin/src/views/device/index.vue
+++ b/admin/src/views/device/index.vue
@@ -89,37 +89,44 @@
ID: {{ row.user_id }}
- 账户: {{ row.user_id }}
+ 账户: {{ row.account }}
-
+
- {{ row.user_id }}
+ ID: {{ row.land_id }}
+ 名称: {{ row.land_title }}
-
-
-
+
+
+ ID: {{ row.product_id }}
+ 名称: {{ row.product_name }}
+
+
+
+
+
-
+
-
+
-
+
-
+
{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}
diff --git a/admin/src/views/land/index.vue b/admin/src/views/land/index.vue
index e36254f0..ccb52745 100644
--- a/admin/src/views/land/index.vue
+++ b/admin/src/views/land/index.vue
@@ -68,6 +68,22 @@
>
编辑
+
+
+ 产品信息
+
+
土地图片
@@ -88,22 +104,6 @@
种植信息
-
-
- 产品信息
-
-
-
+
-
+
-
+
{{ row.plant_date ? timeFormat(row.plant_date, 'yyyy-mm-dd hh:MM:ss') : '' }}
diff --git a/admin/src/views/land_plant_action/index.vue b/admin/src/views/land_plant_action/index.vue
index c216cc8f..e4199763 100644
--- a/admin/src/views/land_plant_action/index.vue
+++ b/admin/src/views/land_plant_action/index.vue
@@ -52,14 +52,14 @@
类型: {{ row.kind }} 品牌: {{ row.breed }}
-
+
-
+
{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}
diff --git a/admin/src/views/product/index.vue b/admin/src/views/product/index.vue
index 162aa43c..ac5025fb 100644
--- a/admin/src/views/product/index.vue
+++ b/admin/src/views/product/index.vue
@@ -74,12 +74,12 @@
-
+
-
+
{{ row.create_time ? timeFormat(row.create_time, 'yyyy-mm-dd hh:MM:ss') : '' }}
diff --git a/app/adminapi/lists/device/DeviceLists.php b/app/adminapi/lists/device/DeviceLists.php
index ad1622af..e0b2f3e5 100644
--- a/app/adminapi/lists/device/DeviceLists.php
+++ b/app/adminapi/lists/device/DeviceLists.php
@@ -41,7 +41,8 @@ class DeviceLists extends BaseAdminDataLists implements ListsSearchInterface
public function setSearch(): array
{
return [
- '=' => ['d.code', 'd.name', 'd.type', 'd.status', 'd.is_online', 'd.is_bind'],
+ '%like%' => ['d.name'],
+ '=' => ['d.code', 'd.type', 'd.status', 'd.is_online', 'd.is_bind'],
];
}
@@ -72,9 +73,12 @@ class DeviceLists extends BaseAdminDataLists implements ListsSearchInterface
{
return Db::name('device')->alias('d')
->where($this->searchWhere)->where($this->userSearch())
- // ->leftJoin('land_device ld','ld.device_id = d.id')
- // ->leftJoin('land l','l.id = ld.land_id')
- // ->field('d.*, ld.land_id, l.title')
+ ->leftJoin('user u','u.id = d.user_id')
+ ->leftJoin('product_device pd','pd.device_id = d.id')
+ ->leftJoin('product p','p.id = pd.product_id')
+ ->leftJoin('land_product lp','lp.product_id = pd.product_id')
+ ->leftJoin('land l','l.id = lp.land_id')
+ ->field('d.*, u.account, pd.product_id, p.name as product_name, lp.land_id, l.title as land_title')
->limit($this->limitOffset, $this->limitLength)
->order(['d.id' => 'desc'])
->select()