From 5e2c060760e0b0a42e0baf2fd008b37d733228cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A5=E9=97=A8=E5=88=B0=E6=94=BE=E5=BC=83?= <727897186@qq.com> Date: Tue, 17 Jan 2023 03:08:58 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=AD=20=E4=BF=AE=E6=94=B9=E6=AF=8F=E4=B8=AA=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=8A=B6=E6=80=81=E9=83=BD=E8=AE=B0=E5=BD=95=E5=88=B0?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 入门到放弃 <727897186@qq.com> --- app/task/controller/Index.php | 12 ++++++++++++ app/task/view/index/view.html | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/task/controller/Index.php b/app/task/controller/Index.php index f96a29d..9fbe844 100644 --- a/app/task/controller/Index.php +++ b/app/task/controller/Index.php @@ -72,6 +72,18 @@ class Index extends BaseController $param['update_time'] = time(); $res = TaskList::where('id', $param['id'])->strict(false)->field(true)->update($param); if ($res) { + $log_data = array( + 'module' => 'task', + 'task_id' => $param['id'], + 'old_content' => $task[$param['name']], + 'new_content' => $param['real_val'], + 'field' => $param['name'], + 'action' => 'edit', + 'admin_id' => $this->uid, + 'create_time' => time(), + ); + Db::name('Log')->strict(false)->field(true)->insert($log_data); + unset($param['name'],$param['real_val']); add_log('edit', $param['id'], $param, $task); } return to_assign(); diff --git a/app/task/view/index/view.html b/app/task/view/index/view.html index 798604d..6300d8b 100644 --- a/app/task/view/index/view.html +++ b/app/task/view/index/view.html @@ -373,7 +373,7 @@ layer.msg(e.msg); } } - let postData = { id: id }; + let postData = { id: id,name:name,real_val:real_val}; postData[name] = real_val; if (name == 'md_content') { postData['content'] = show_val; -- Gitee