From 96c4744bd7be4e4293442690bdde8f304734a33e Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Thu, 11 May 2023 11:38:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AE=BE=E5=A4=87=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/DeviceController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Admin/Controllers/DeviceController.php b/app/Admin/Controllers/DeviceController.php index bb2cbe1..74bd3ab 100644 --- a/app/Admin/Controllers/DeviceController.php +++ b/app/Admin/Controllers/DeviceController.php @@ -2,12 +2,11 @@ namespace App\Admin\Controllers; -use Slowlyo\OwlAdmin\Renderers\{Button, Form, Page, TableColumn, TextControl, Component, CRUDTable, Card, Video, DateRangeControl}; +use Slowlyo\OwlAdmin\Renderers\{Button, Form, Page, TableColumn, TextControl, Json, Component, CRUDTable, Card, Video, DateRangeControl, Mapping}; use Slowlyo\OwlAdmin\Controllers\AdminController; use App\Services\Admin\DeviceService; use App\Models\Device; use App\Models\Keyword; -use App\Admin\Components; class DeviceController extends AdminController { @@ -72,6 +71,12 @@ class DeviceController extends AdminController TextControl::make()->static(true)->name('id')->label('ID'), TextControl::make()->static(true)->name('name')->label('名称'), TextControl::make()->static(true)->name('sn')->label('编号'), + TextControl::make()->static(true)->name('factory.name')->label('厂家'), + TextControl::make()->static(true)->name('model_sn')->label('型号'), + TextControl::make()->static(true)->name('type')->label('类型')->staticSchema( + Mapping::make()->map(Device::typeMap())), + TextControl::make()->static(true)->name('extends')->label('扩展信息')->staticSchema( + Json::make()), TextControl::make()->static(true)->name('created_at')->label('创建时间'), TextControl::make()->static(true)->name('updated_at')->label('更新时间') ]);