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 @@ +
+
巡检情况
+
+
+
+
+ + \ No newline at end of file diff --git a/plugs/think-plugs-inspection/src/view/record/index.html b/plugs/think-plugs-inspection/src/view/record/index.html index e9f9339..8236e13 100644 --- a/plugs/think-plugs-inspection/src/view/record/index.html +++ b/plugs/think-plugs-inspection/src/view/record/index.html @@ -12,15 +12,16 @@ {/block}