From da5ff4b9866a2d458d950f0c743ab9244e16c66d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 12 十一月 2023 12:23:08 +0800 Subject: [PATCH] 2023-11-12 --- src/menu/components/chart/antv-bar/index.jsx | 11 ++++- src/menu/components/card/double-data-card/options.jsx | 13 ++++++ src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 12 ++++- src/tabviews/custom/components/card/double-data-card/index.scss | 16 ++++++++ src/menu/components/card/data-card/options.jsx | 13 ++++++ src/tabviews/custom/components/card/double-data-card/index.jsx | 8 +++ src/tabviews/custom/components/card/data-card/index.scss | 16 ++++++++ src/tabviews/custom/components/card/data-card/index.jsx | 8 +++ 8 files changed, 89 insertions(+), 8 deletions(-) diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index 818913d..0c0bf4f 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -607,6 +607,19 @@ forbid: !!appType || isprint }, { + type: 'radio', + field: 'shifting', + label: '鎸夐挳鍋忕Щ', + initval: wrap.shifting || 'false', + tooltip: '鍚敤鏃讹紝宸ュ叿鏍忔寜閽皢鏄剧ず鍦ㄦ爣棰樻爮鍙充笂瑙掋��', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: !!appType || subtype !== 'datacard' || isprint + }, + { type: 'multiselect', field: 'blacklist', label: '榛戝悕鍗�', diff --git a/src/menu/components/card/double-data-card/options.jsx b/src/menu/components/card/double-data-card/options.jsx index 1941d17..942b421 100644 --- a/src/menu/components/card/double-data-card/options.jsx +++ b/src/menu/components/card/double-data-card/options.jsx @@ -251,6 +251,19 @@ forbid: !!appType || isprint }, { + type: 'radio', + field: 'shifting', + label: '鎸夐挳鍋忕Щ', + initval: wrap.shifting || 'false', + tooltip: '鍚敤鏃讹紝宸ュ叿鏍忔寜閽皢鏄剧ず鍦ㄦ爣棰樻爮鍙充笂瑙掋��', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: !!appType || isprint + }, + { type: 'multiselect', field: 'blacklist', label: '榛戝悕鍗�', diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx index 332e3ab..ad556b3 100644 --- a/src/menu/components/chart/antv-bar/index.jsx +++ b/src/menu/components/chart/antv-bar/index.jsx @@ -550,7 +550,8 @@ }) } - if (!plot.legend || plot.legend === 'hidden') { + let noLegend = !plot.legend || plot.legend === 'hidden' + if (noLegend) { chart.legend(false) } else { chart.legend({ @@ -643,7 +644,9 @@ } view1.axis('value', yc) - // view1.legend(false) + if (!noLegend) { + view1.legend(false) + } if (plot.mutilBar !== 'stack') { let _chart = view1 @@ -770,7 +773,9 @@ view2.data(dv.rows) - // view2.legend(false) + if (!noLegend) { + view2.legend(false) + } fields.forEach(item => { if (item.chartType === 'bar' && !Bar_axis.length) { diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 55ada26..9ea2eff 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -136,6 +136,12 @@ _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${_config.wrap.scale}` + if (_config.wrap.shifting === 'true') { + _config.wrap.shifting = 'shifting' + } else { + _config.wrap.shifting = '' + } + let pageOptions = ['10', '25', '50', '100', '500', '1000'] if (!_config.setting.laypage) { @@ -1178,7 +1184,7 @@ } return ( - <div className="custom-data-card-box" id={'anchor' + config.uuid} style={config.style}> + <div className={'custom-data-card-box ' + config.wrap.shifting} id={'anchor' + config.uuid} style={config.style}> {loading ? <div className="loading-mask"> {data.length ? <div className="ant-spin-blur"></div> : null} diff --git a/src/tabviews/custom/components/card/data-card/index.scss b/src/tabviews/custom/components/card/data-card/index.scss index e56de99..8cc715c 100644 --- a/src/tabviews/custom/components/card/data-card/index.scss +++ b/src/tabviews/custom/components/card/data-card/index.scss @@ -251,6 +251,22 @@ } } } +.custom-data-card-box.shifting { + .normal-header:not(.header-search) + .toolbar-button { + position: absolute; + top: 0px; + right: 0px; + button { + margin-bottom: 0px!important; + } + } + .normal-header:not(.header-search) + .toolbar-button + .pickup-wrap{ + position: relative; + button { + position: relative; + } + } +} .custom-data-card-box::-webkit-scrollbar { width: 7px; height: 7px; diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx index a7f73d6..eb2415e 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -129,6 +129,12 @@ _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}` + if (_config.wrap.shifting === 'true') { + _config.wrap.shifting = 'shifting' + } else { + _config.wrap.shifting = '' + } + let wrapStyle = null let subcard = fromJS(_card).toJS() let subconfig = fromJS(_config).toJS() @@ -1135,7 +1141,7 @@ } return ( - <div className="double-data-card-box" id={'anchor' + config.uuid} style={config.style}> + <div className={'double-data-card-box ' + config.wrap.shifting} id={'anchor' + config.uuid} style={config.style}> {loading ? <div className="loading-mask"> {data.length ? <div className="ant-spin-blur"></div> : null} diff --git a/src/tabviews/custom/components/card/double-data-card/index.scss b/src/tabviews/custom/components/card/double-data-card/index.scss index bb3872a..86868e4 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.scss +++ b/src/tabviews/custom/components/card/double-data-card/index.scss @@ -305,6 +305,22 @@ background: rgba(0, 0, 0, 0); } } +.double-data-card-box.shifting { + .normal-header:not(.header-search) + .toolbar-button { + position: absolute; + top: 0px; + right: 0px; + button { + margin-bottom: 0px!important; + } + } + .normal-header:not(.header-search) + .toolbar-button + .pickup-wrap{ + position: relative; + button { + position: relative; + } + } +} .double-data-card-box::-webkit-scrollbar { width: 7px; height: 7px; diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx index 46c4260..cfe93bc 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -1187,7 +1187,8 @@ }) } - if (!plot.legend || plot.legend === 'hidden') { + let noLegend = !plot.legend || plot.legend === 'hidden' + if (noLegend) { chart.legend(false) } else { chart.legend({ @@ -1273,7 +1274,9 @@ view1.scale('value', c) view1.axis('value', plot.$yc) - // view1.legend(false) + if (!noLegend) { + view1.legend(false) + } let colorIndex = 0 @@ -1407,7 +1410,10 @@ } view2.data(dv.rows) - // view2.legend(false) + + if (!noLegend) { + view2.legend(false) + } plot.customs.forEach(item => { if (item.chartType === 'bar' && !plot.Bar_axis) { -- Gitblit v1.8.0