From 5424de798ca8a261491f581da78fbbed2fbe996f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Fri, 14 Apr 2023 16:55:50 +0800 Subject: [PATCH] * Finish task #91131. --- module/chart/css/common.css | 1 + module/chart/js/preview.js | 6 +++--- module/chart/model.php | 3 ++- module/screen/control.php | 12 +++++++++--- module/screen/css/browse.css | 6 ++++++ module/screen/js/browse.js | 5 +++++ module/screen/view/browse.html.php | 14 ++++++++++++++ 7 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 module/screen/js/browse.js diff --git a/module/chart/css/common.css b/module/chart/css/common.css index daca1be13f..9a1362251b 100644 --- a/module/chart/css/common.css +++ b/module/chart/css/common.css @@ -5,3 +5,4 @@ .header:hover .header-config {display: inline-block;} .label-outline.label-info {border: unset; line-height: 14px;} .border-bottom {border-bottom: 1px solid #f4f5f7;} +.visibility-hidden{visibility: hidden;} diff --git a/module/chart/js/preview.js b/module/chart/js/preview.js index 8a6a3e503e..44955b951e 100644 --- a/module/chart/js/preview.js +++ b/module/chart/js/preview.js @@ -155,7 +155,7 @@ function calcPreviewGrowFilter(resize = false) var canGrowTotal = 0; $filterBox.find('.query-inside').addClass('hidden'); - $filterBox.find('.query-outside').addClass('hidden'); + $filterBox.find('.query-outside').addClass('visibility-hidden'); chart.filters.forEach(function(filter, index) { var nowItem = '.filter-item-' + index; @@ -191,8 +191,8 @@ function calcPreviewGrowFilter(resize = false) if(filter.type == 'select' && $nowDom.find('.picker').length) $nowDom.find('.picker').find('.picker-selections').css('width', WIDTH_INPUT); }); - var queryType =(!lineWrap && nowWidth >= 60) ? '.query-inside' : '.query-outside'; - $filterBox.find(queryType).removeClass('hidden'); + if(!lineWrap && nowWidth >= 60) $filterBox.find('.query-inside').removeClass('hidden'); + else $filterBox.find('.query-outside').removeClass('visibility-hidden'); /* Set picker-selection width, default 128px. */ waitForRepaint(function() diff --git a/module/chart/model.php b/module/chart/model.php index 851eb9e4b3..74bc1cb709 100644 --- a/module/chart/model.php +++ b/module/chart/model.php @@ -604,8 +604,9 @@ class chartModel extends model if($field) { $path = $this->app->getModuleRoot() . 'dataview' . DS . 'table' . DS . "$object.php"; - include $path; + if(!is_file($path)) return; + include $path; $options = $schema->fields[$field]['options']; } break; diff --git a/module/screen/control.php b/module/screen/control.php index 1947215ebd..892a7f255a 100644 --- a/module/screen/control.php +++ b/module/screen/control.php @@ -22,9 +22,15 @@ class screen extends control { $dimensionID = $this->loadModel('dimension')->setSwitcherMenu($dimensionID); - $this->view->title = $this->lang->screen->common; - $this->view->screens = $this->screen->getList($dimensionID); - $this->view->dimension = $dimensionID; + $this->loadModel('setting'); + $currentUser = $this->app->user->account; + $firstGuide = $this->setting->getItem("owner={$currentUser}&module=bi&key=firstGuide"); + if(empty($firstGuide)) $this->setting->setItem("{$currentUser}.bi.firstGuide", 1); + + $this->view->firstGuide = !empty($firstGuide); + $this->view->title = $this->lang->screen->common; + $this->view->screens = $this->screen->getList($dimensionID); + $this->view->dimension = $dimensionID; $this->display(); } diff --git a/module/screen/css/browse.css b/module/screen/css/browse.css index 708b4dc198..77f3075d36 100644 --- a/module/screen/css/browse.css +++ b/module/screen/css/browse.css @@ -32,3 +32,9 @@ .main-col .row {margin:10px 0px; padding: 12px;} .main-col .row .col-md-3 {padding: 8px;} .main-col .row .col-md-3 a {min-width: 297px;} + +#firstGuide .modal-dialog {width: 750px !important;} +#firstGuide .modal-body {padding: 0 !important;} +#firstGuide .background-img {height: 430px !important; background: url('static/images/bi_guide_zh.png') no-repeat; background-size: 100%;} +#firstGuide .modal-footer {text-align: center !important; border-top: none !important; padding: 24px 0px !important;} +#firstGuide .btn-wide {min-width: 90px !important;} diff --git a/module/screen/js/browse.js b/module/screen/js/browse.js new file mode 100644 index 0000000000..21cacb7888 --- /dev/null +++ b/module/screen/js/browse.js @@ -0,0 +1,5 @@ +$(function() +{ + if(!firstGuide) $('#firstGuide').modal(); +}); + diff --git a/module/screen/view/browse.html.php b/module/screen/view/browse.html.php index de572ea693..848e80532d 100644 --- a/module/screen/view/browse.html.php +++ b/module/screen/view/browse.html.php @@ -1,4 +1,5 @@ getModuleRoot() . 'common/view/header.html.php';?> +
@@ -41,4 +42,17 @@
+ + getModuleRoot() . 'common/view/footer.html.php';?>