From 4a3911ba129fbd87a33d8f6ae58bec284fd192f0 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 26 Mar 2025 15:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/controller/Record.php | 21 ++++++ .../src/view/record/detail.html | 71 +++++++++++++++++++ .../src/view/record/index.html | 7 +- 3 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 plugs/think-plugs-inspection/src/view/record/detail.html diff --git a/plugs/think-plugs-inspection/src/controller/Record.php b/plugs/think-plugs-inspection/src/controller/Record.php index cb60d00..26aa633 100644 --- a/plugs/think-plugs-inspection/src/controller/Record.php +++ b/plugs/think-plugs-inspection/src/controller/Record.php @@ -29,6 +29,21 @@ class Record extends Controller }); } + public function detail() + { + $id = $this->request->get('id'); + $record = InspectionRecord::query()->with(['points'])->where('id', $id)->findOrEmpty(); + if ($record->isEmpty()) $this->error('记录不存在'); + $this->vo = $record; + $this->fetch(); + } + + /** + * 状态修改 + * @auth true + * @menu true + * @return void + */ public function status() { InspectionRecord::mSave($this->_vali([ @@ -38,6 +53,12 @@ class Record extends Controller ]), 'id'); } + /** + * 删除记录 + * @auth true + * @menu true + * @return void + */ public function delete() { InspectionRecord::mDelete('id'); diff --git a/plugs/think-plugs-inspection/src/view/record/detail.html b/plugs/think-plugs-inspection/src/view/record/detail.html new file mode 100644 index 0000000..3c3a33f --- /dev/null +++ b/plugs/think-plugs-inspection/src/view/record/detail.html @@ -0,0 +1,71 @@ +