From 3ee167b8a6ea53e3a9b14f0d190ecf281bc3db48 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Mon, 9 Dec 2024 11:22:30 +0800 Subject: [PATCH] +[feedback#133862,1h,doing]. --- module/doc/zen.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/module/doc/zen.php b/module/doc/zen.php index af2644d472..7f5ed32de1 100644 --- a/module/doc/zen.php +++ b/module/doc/zen.php @@ -1057,6 +1057,35 @@ class docZen extends doc $this->view->cols = $cols; } + protected function previewFeedback(string $view, array $settings, string $idList): void + { + $cols = $this->loadModel('datatable')->getSetting('feedback', 'browse'); + $data = array(); + $action = $settings['action']; + + if($action === 'preview' && $view === 'setting') + { + $haveSession = false; + if(isset($_SESSION['feedbackProduct'])) + { + $tmpSession = $_SESSION['feedbackProduct']; + $haveSession = true; + } + $_SESSION['feedbackProduct'] = (int)$settings['product']; + $data = $this->loadModel('feedback')->getList('all'); + + if($haveSession) $_SESSION['feedbackProduct'] = $tmpSession; + else unset($_SESSION['feedbackProduct']); + } + elseif($view === 'list') + { + $data = $this->loadModel('feedback')->getByList($idList); + } + + $this->view->cols = $cols; + $this->view->data = $data; + } + /** * 预览产品计划列表。 * Preview plan list.