From 5478a1f1d6a9dca0d8c3c4301b28cb6a67f58993 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 24 十一月 2022 16:38:40 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/custom/index.jsx | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 1f29849..0a2277e 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -38,6 +38,7 @@ const SettingComponent = asyncComponent(() => import('@/tabviews/zshare/settingcomponent')) const CustomChart = asyncComponent(() => import('./components/chart/custom-chart')) const TimeLine = asyncComponent(() => import('./components/timeline/normal-timeline')) +const AntvG6 = asyncComponent(() => import('./components/chart/antv-G6')) const Voucher = asyncComponent(() => import('./components/module/voucher')) const Iframe = asyncComponent(() => import('./components/iframe')) const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) @@ -724,13 +725,24 @@ group.subButton.syncComponentId = '' } + let _sql = `Declare @mk_organization nvarchar(512) select @mk_organization='${sessionStorage.getItem('organization') || ''}'\n` + let _sso = _sql + let _local = _sql + group.fields = group.fields.map(cell => { // 鏁版嵁婧恠ql璇彞锛岄澶勭悊锛屾潈闄愰粦鍚嶅崟瀛楁璁剧疆涓洪殣钘忚〃鍗� if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(cell.type) && cell.resourceType === '1') { let _option = Utils.getSelectQueryOptions(cell) + + if (cell.database === 'sso') { + cell.data_sql = Utils.formatOptions(_sso + _option.sql) + _sso = '' + } else { + cell.data_sql = Utils.formatOptions(_local + _option.sql) + _local = '' + } - cell.data_sql = Utils.formatOptions(_option.sql) - cell.base_sql = window.btoa(window.encodeURIComponent(_option.sql)) + cell.base_sql = window.btoa(window.encodeURIComponent(_sql + _option.sql)) cell.arr_field = _option.field } @@ -1260,6 +1272,12 @@ <CustomChart config={item} data={data} mainSearch={mainSearch}/> </Col> ) + } else if (item.type === 'antvG6') { + return ( + <Col span={item.width} style={style} key={item.uuid}> + <AntvG6 config={item} data={data} mainSearch={mainSearch}/> + </Col> + ) } else if (item.type === 'module' && item.subtype === 'voucher') { return ( <Col span={item.width} style={style} key={item.uuid}> -- Gitblit v1.8.0