king
2022-11-24 0e76431e5bc06a60c8103b39aa3b26f05bb2b810
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 => {
            // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单
            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}>