diff --git a/app/task/controller/Index.php b/app/task/controller/Index.php index f96a29de0a6d251bf286e7e7f3b429a1c3e5e0e7..9fbe844e5f0932868826db816adb7a8dec4f2ac1 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 798604d7e719b8b5d9a8be5039815dda170148ed..6300d8b4124efa17279a246c211ce5a23cb99137 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;