king
2024-05-28 643031e0fab074859c7a988ab0d25fc9f08ef214
2024-05-28
21个文件已修改
1035 ■■■■ 已修改文件
src/components/normalform/modalform/index.jsx 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkRadio/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkSelect/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/options.jsx 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/options.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/options.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/options.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/base-table/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 271 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 258 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx
@@ -7,7 +7,6 @@
import asyncComponent from '@/utils/asyncComponent'
import MKEInput from './mkInput'
import MKNumberInput from './mkNumberInput'
import MKEmitter from '@/utils/events.js'
import MKSelect from './mkSelect'
import './index.scss'
@@ -155,7 +154,7 @@
      if (item.linkField) {
        let supInitVal = fieldMap.get(item.linkField).initval || ''
        
        item.options = item.oriOptions.filter(option => option.ParentID === supInitVal)
        item.options = item.oriOptions.filter(option => option.ParentID === supInitVal || option.ParentID === '')
      }
      return item
@@ -243,30 +242,27 @@
          if (item && item.linkField) {
            let supInitVal = this.record[item.linkField] || ''
            
            item.options = item.oriOptions.filter(option => option.ParentID === supInitVal)
            item.options = item.oriOptions.filter(option => option.ParentID === supInitVal || option.ParentID === '')
          }
          return item || cell
        })
      })
    } else if (item.reset_source) {
      let map = new Map()
      this.state.formlist.forEach(cell => {
        if (!cell.field) return
        map.set(cell.field, cell)
      })
      item.callback(map, this.record, MKEmitter)
      this.setState({
        formlist: this.state.formlist.map(cell => {
          if (!cell.field) return cell
          let item = map.get(cell.field)
          return item || cell
      let reOptions = item.callback(this.record)
      if (reOptions) {
        this.setState({
          formlist: this.state.formlist.map(cell => {
            if (!cell.field || !reOptions[cell.field]) return cell
            cell.options = reOptions[cell.field]
            cell.timestamp = new Date().getTime()
            return cell
          })
        })
      })
      }
    }
  }
src/components/normalform/modalform/mkRadio/index.jsx
@@ -22,6 +22,15 @@
    MKEmitter.addListener('mkFC', this.mkFormControl)
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.config.timestamp && nextProps.config.timestamp !== this.state.config.timestamp) {
      this.setState({
        config: fromJS(nextProps.config).toJS(),
        options: fromJS(nextProps.config.options).toJS(),
      })
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
@@ -48,7 +57,7 @@
    if (field !== config.field) return
    let options = config.oriOptions ? config.oriOptions.filter(option => option.ParentID === parentId) : []
    let options = config.oriOptions ? config.oriOptions.filter(option => option.ParentID === parentId || option.ParentID === '') : []
    let val = options[0] ? options[0].value : ''
    this.setState({
src/components/normalform/modalform/mkSelect/index.jsx
@@ -31,6 +31,15 @@
    MKEmitter.addListener('mkFC', this.mkFormControl)
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.config.timestamp && nextProps.config.timestamp !== this.state.config.timestamp) {
      this.setState({
        config: fromJS(nextProps.config).toJS(),
        options: fromJS(nextProps.config.options).toJS(),
      })
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
@@ -57,7 +66,7 @@
    const { config } = this.state
    let options = config.oriOptions ? config.oriOptions.filter(option => option.ParentID === parentId) : []
    let options = config.oriOptions ? config.oriOptions.filter(option => option.ParentID === parentId || option.ParentID === '') : []
    let val = options[0] ? options[0].value : ''
    this.setState({
src/menu/components/card/balcony/index.jsx
@@ -6,7 +6,7 @@
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
import { resetStyle, getTables, checkComponent } from '@/utils/utils-custom.js'
import { resetStyle, getTables, checkComponent, getInterfaces } from '@/utils/utils-custom.js'
import MKEmitter from '@/utils/events.js'
import Utils from '@/utils/utils.js'
import getWrapForm from './options'
@@ -243,9 +243,9 @@
    let _card = {...this.state.card, wrap: res}
    if (res.datatype === 'public') {
      let interfaces = window.GLOB.customMenu.interfaces || []
      let interfaces = getInterfaces()
      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
      let d = interfaces.filter(m => m.value === res.publicId)[0]
      if (d) {
        _card.columns = fromJS(d.columns).toJS()
src/menu/components/card/balcony/options.jsx
@@ -1,5 +1,5 @@
import React from 'react'
import MenuUtils from '@/utils/utils-custom.js'
import MenuUtils, { getLinkModules, getInterfaces } from '@/utils/utils-custom.js'
/**
 * @description Wrap表单配置信息
@@ -9,22 +9,12 @@
  let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
  let modules = MenuUtils.getLinkModules(menu.components) || []
  let modules = getLinkModules(menu.components) || []
  let supmodules = MenuUtils.getSupModules(menu.components, '', menu.interfaces)
  let roleList = sessionStorage.getItem('sysRoles')
  let appType = sessionStorage.getItem('appType')
  let interfaces = []
  if (menu.interfaces) {
    menu.interfaces.forEach(item => {
      if (item.status === 'true') {
        interfaces.push({
          value: item.uuid,
          label: item.name
        })
      }
    })
  }
  let interfaces = getInterfaces()
  if (roleList) {
    try {
@@ -61,7 +51,7 @@
      field: 'datatype',
      label: '数据来源',
      initval: wrap.datatype || 'static',
      tooltip: '选择静态值,无需配置数据源。',
      tooltip: '选择静态时,无需配置数据源,可展示上级组件或url参数字段。',
      required: false,
      options: [
        {value: 'dynamic', label: '动态'},
@@ -82,23 +72,15 @@
      required: true,
      options: interfaces,
      reset_source: true,
      callback: (map, record) => {
      callback: (record) => {
        if (!record.publicId) return
        let interfaces = window.GLOB.customMenu.interfaces || []
        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0]
        let d = interfaces.filter(m => m.value === record.publicId)[0]
        if (!d || !d.columns) return
        let columns = JSON.parse(JSON.stringify(d.columns))
        let _bgField = map.get('bgField')
        if (_bgField && !_bgField.forbid) {
          _bgField.options = columns
          _bgField.oriOptions = columns
          map.set('bgField', _bgField)
        return {
          bgField: d.columns
        }
      }
    },
@@ -108,15 +90,13 @@
      label: '受控类型',
      initval: wrap.linkType || 'static',
      tooltip: <div>
        <div>组件与其他组件之间的控制类型: </div>
        <div>1、独立表示与其他组件没有关联。</div>
        <div>2、同步类型中公式、按钮以及全选元素比较特殊,操作数据为其同步组件的数据。</div>
        <div>3、上级类型需添加当前组件的上级组件,并可设置当前组件为始终显示,还是只有在上级组件选行后才显示。</div>
        <div>同步类型:此类型时公式、按钮以及全选元素比较特殊,操作数据为其同步组件选中的数据。</div>
        <div>上级类型:可设置当前组件的显示条件(始终显示或上级选行时显示),与静态数据源配合也可用于展示上级组件选中的信息。</div>
      </div>,
      toolWidth: 400,
      required: false,
      options: [
        {value: 'static', label: '独立'},
        {value: 'static', label: '无'},
        {value: 'sync', label: '同步'},
        {value: 'sup', label: '上级'},
      ],
@@ -133,7 +113,6 @@
      field: 'supModule',
      label: '上级组件',
      initval: wrap.supModule || [],
      // tooltip: '当上级组件不存在或没有权限时,当前组件不显示。',
      required: true,
      options: supmodules,
      forbid: isprint
@@ -149,6 +128,16 @@
        {value: 'hidden', label: '选行'},
        {value: 'show', label: '始终'},
      ],
      forbid: isprint
    },
    {
      type: 'cascader',
      field: 'syncModule',
      label: '同步组件',
      initval: wrap.syncModule || '',
      tooltip: '当同步组件不存在或没有权限时,当前组件不显示。',
      required: true,
      options: modules,
      forbid: isprint
    },
    {
@@ -193,6 +182,7 @@
      label: '背景图',
      initval: wrap.bgField || '',
      tooltip: '动态背景,背景图片由字段值控制。请注意调整背景样式。',
      timestamp: new Date().getTime(),
      required: false,
      options: columns
    },
src/menu/components/card/data-card/options.jsx
@@ -1,4 +1,4 @@
import MenuUtils from '@/utils/utils-custom.js'
import MenuUtils, { getInterfaces } from '@/utils/utils-custom.js'
/**
 * @description Wrap表单配置信息
@@ -9,16 +9,10 @@
  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
  let menu = window.GLOB.customMenu
  let laypage = setting && setting.laypage !== 'false'
  let interfaces = []
  if (subtype === 'propcard' && menu.interfaces) {
    menu.interfaces.forEach(item => {
      if (item.status === 'true') {
        interfaces.push({
          value: item.uuid,
          label: item.name
        })
      }
    })
  if (subtype === 'propcard') {
    interfaces = getInterfaces()
  }
  let modules = []
  if (subtype === 'propcard' || subtype === 'datacard') {
@@ -159,7 +153,7 @@
      field: 'datatype',
      label: '数据来源',
      initval: wrap.datatype || 'dynamic',
      tooltip: '选择静态值,无需配置数据源。',
      tooltip: '选择静态时,无需配置数据源,可展示上级组件或url参数字段。',
      required: false,
      options: [
        {value: 'dynamic', label: '动态', priKeyType: 'static'},
@@ -187,38 +181,17 @@
      options: interfaces,
      reset_source: true,
      forbid: subtype !== 'propcard',
      callback: (map, record) => {
      callback: (record) => {
        if (!record.publicId) return
        
        let interfaces = window.GLOB.customMenu.interfaces || []
        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0]
        let d = interfaces.filter(m => m.value === record.publicId)[0]
        
        if (!d || !d.columns) return
        let columns = JSON.parse(JSON.stringify(d.columns))
        let _broadcast = map.get('broadcast')
        if (_broadcast && !_broadcast.forbid) {
          _broadcast.options = columns
          _broadcast.oriOptions = columns
          map.set('broadcast', _broadcast)
        }
        let _jumpField = map.get('jumpField')
        if (_jumpField && !_jumpField.forbid) {
          _jumpField.options = columns
          _jumpField.oriOptions = columns
          map.set('jumpField', _jumpField)
        }
        let _link = map.get('link')
        if (_link && !_link.forbid) {
          _link.options = columns
          _link.oriOptions = columns
          map.set('link', _link)
        return {
          broadcast: d.columns,
          jumpField: d.columns,
          link: d.columns
        }
      }
    },
@@ -287,11 +260,9 @@
      required: false,
      linkField: 'datatype',
      options: [
        {ParentID: 'static', value: 'static', label: '静态值'},
        {ParentID: 'dynamic', value: 'static', label: '静态值'},
        {ParentID: '', value: 'static', label: '静态值'},
        {ParentID: 'dynamic', value: 'dynamic', label: '动态值'},
        {ParentID: 'dynamic', value: 'joint', label: '拼接值'},
        {ParentID: 'public', value: 'static', label: '静态值'},
        {ParentID: 'public', value: 'dynamic', label: '动态值'},
        {ParentID: 'public', value: 'joint', label: '拼接值'},
      ],
@@ -427,6 +398,7 @@
      label: '语音播报',
      initval: wrap.broadcast || '',
      tooltip: '语音播报在移动端有效。注:在H5中请使用音频链接,添加定时器时,可循环播报',
      timestamp: new Date().getTime(),
      required: false,
      options: columns,
      forbid: !columns || appType !== 'mob' || subtype !== 'propcard'
@@ -525,6 +497,7 @@
      label: '控制字段',
      initval: wrap.jumpField || '',
      tooltip: '当字段值为true时触发跳转。',
      timestamp: new Date().getTime(),
      required: true,
      options: columns,
      forbid: subtype !== 'propcard' || appType !== 'mob'
@@ -544,6 +517,7 @@
      label: '链接字段',
      initval: wrap.link || '',
      tooltip: '跳转链接为查询数据的返回值。',
      timestamp: new Date().getTime(),
      required: true,
      options: columns,
      forbid: subtype !== 'propcard' || appType !== 'mob'
src/menu/components/card/prop-card/index.jsx
@@ -6,7 +6,7 @@
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
import { resetStyle, getTables, checkComponent } from '@/utils/utils-custom.js'
import { resetStyle, getTables, checkComponent, getInterfaces } from '@/utils/utils-custom.js'
import MKEmitter from '@/utils/events.js'
import Utils from '@/utils/utils.js'
import getWrapForm from '../data-card/options'
@@ -331,9 +331,9 @@
        _card.setting.supModule = ''
      }
    } else if (res.datatype === 'public') {
      let interfaces = window.GLOB.customMenu.interfaces || []
      let interfaces = getInterfaces()
      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
      let d = interfaces.filter(m => m.value === res.publicId)[0]
      if (d) {
        _card.columns = fromJS(d.columns).toJS()
src/menu/components/editor/braft-editor/options.jsx
@@ -7,14 +7,15 @@
  let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
  let menu = window.GLOB.customMenu
  let interfaces = []
  if (menu.interfaces) {
    menu.interfaces.forEach(item => {
      if (item.status === 'true') {
        interfaces.push({
          value: item.uuid,
          label: item.name
          label: item.name,
          columns: JSON.parse(JSON.stringify(item.columns))
        })
      }
    })
@@ -84,23 +85,15 @@
      required: true,
      options: interfaces,
      reset_source: true,
      callback: (map, record) => {
      callback: (record) => {
        if (!record.publicId) return
        let interfaces = window.GLOB.customMenu.interfaces || []
        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0]
        let d = interfaces.filter(m => m.value === record.publicId)[0]
        if (!d || !d.columns) return
        let columns = JSON.parse(JSON.stringify(d.columns))
        let _field = map.get('field')
        if (_field) {
          _field.options = columns
          _field.oriOptions = columns
          map.set('field', _field)
        return {
          field: d.columns
        }
      }
    },
@@ -109,6 +102,7 @@
      field: 'field',
      label: '文本字段',
      initval: wrap.field || '',
      timestamp: new Date().getTime(),
      required: false,
      options: columns
    },
src/menu/components/form/step-form/options.jsx
@@ -35,7 +35,8 @@
      if (item.status === 'true') {
        interfaces.push({
          value: item.uuid,
          label: item.name
          label: item.name,
          columns: JSON.parse(JSON.stringify(item.columns))
        })
      }
    })
@@ -87,23 +88,15 @@
      required: true,
      options: interfaces,
      reset_source: config.subtype !== 'tabform',
      callback: (map, record) => {
      callback: (record) => {
        if (!record.publicId) return
        let interfaces = window.GLOB.customMenu.interfaces || []
        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0]
        let d = interfaces.filter(m => m.value === record.publicId)[0]
        if (!d || !d.columns) return
        let columns = JSON.parse(JSON.stringify(d.columns))
        let _sCtrl = map.get('statusControl')
        if (_sCtrl && !_sCtrl.forbid) {
          _sCtrl.options = columns
          _sCtrl.oriOptions = columns
          map.set('statusControl', _sCtrl)
        return {
          statusControl: d.columns
        }
      }
    },
@@ -113,6 +106,7 @@
      label: '状态控制',
      initval: wrap.statusControl || '',
      tooltip: '表单加载时的状态,当字段值与表单组的状态值一致时,启用对应的表单组。',
      timestamp: new Date().getTime(),
      required: false,
      options: config.columns,
      forbid: config.subtype === 'tabform'
src/menu/components/table/edit-table/index.jsx
@@ -284,6 +284,10 @@
    res.borderRadius = card.wrap.borderRadius || 0
    res.resetContrl = card.wrap.resetContrl || 'init'
    if (res.commit === 'check' && !res.tableType) {
      res.tableType = 'radio'
    }
    let _card = {...card, wrap: res}
    if (res.tableType) {
src/menu/components/table/edit-table/options.jsx
@@ -67,18 +67,13 @@
        {value: 'check', label: '勾选项'},
      ],
      reset_source: true,
      callback: (map, record, MKEmitter) => {
        let _tableType = map.get('tableType')
        _tableType.options[0].disabled = record.commit === 'check'
        _tableType.oriOptions[0].disabled = record.commit === 'check'
        map.set('tableType', _tableType)
        if (record.commit === 'check' && !record.tableType) {
          setTimeout(() => {
            MKEmitter.emit('mkFC', 'input', 'tableType', 'radio')
          }, 50)
      callback: (record) => {
        return {
          tableType: [
            {value: '', label: '不可选', disabled: record.commit === 'check'},
            {value: 'radio', label: '单选'},
            {value: 'checkbox', label: '多选'},
          ]
        }
      }
    },
@@ -112,6 +107,7 @@
      label: '表格属性',
      initval: wrap.tableType || '',
      required: false,
      timestamp: new Date().getTime(),
      options: [
        {value: '', label: '不可选', disabled: wrap.commit === 'check'},
        {value: 'radio', label: '单选'},
src/menu/datasource/index.jsx
@@ -264,6 +264,12 @@
      if (res.setting && res.setting.tableName && config.setting && !config.setting.tableName) {
        setTimeout(() => {
          MKEmitter.emit('publicTableChange', res.setting.tableName, 'init')
        }, 100)
      }
      if ((config.type === 'card' && config.subtype === 'datacard') || (config.type === 'table' && config.subtype === 'normaltable')) {
        setTimeout(() => {
          MKEmitter.emit('mkUpdateInter', {uuid: config.uuid, columns: res.columns}, {delay: 0})
        }, 150)
      }
    }, () => {
src/menu/datasource/verifycard/index.jsx
@@ -962,13 +962,18 @@
  copyColumns = () => {
    const { config } = this.props
    const { columns, setting } = this.state
    const { columns, subColumns, setting } = this.state
    let _columns = columns
    let m = []
    let n = []
    let s = []
    columns.forEach(col => {
    if (subColumns && subColumns.length) {
      _columns = [...columns, ...subColumns]
    }
    _columns.forEach(col => {
      m.unshift(`${col.field} ${col.datatype}`)
      n.unshift(col.field)
      if (/decimal|int/ig.test(col.datatype)) {
@@ -993,7 +998,7 @@
        cols.forEach(col => {
          if (col.type === 'extend') {
            let datatype = 'Nvarchar(50)'
            columns.forEach(c => {
            _columns.forEach(c => {
              if (c.field === col.field) {
                datatype = c.datatype
              }
@@ -1069,8 +1074,6 @@
  addProcess = () => {
    const { config } = this.props
    const { columns } = this.state
    if (config.subtype === 'dualdatacard') return
    let fields = []
    let cols = []
src/tabviews/custom/components/card/balcony/index.jsx
@@ -25,7 +25,6 @@
    data: {},
    BData: null,
    syncData: [],
    show: true,
    checked: false
  }
@@ -112,7 +111,6 @@
      }
    }
    let show = true
    let syncConfig = null
    if (_config.wrap.linkType === 'sync') {
      syncConfig = _config.syncConfig
@@ -123,12 +121,9 @@
        }
        return item
      })
    } else if (_config.wrap.linkType === 'sup' && _config.wrap.supControl === 'hidden') {
      show = false
    }
    this.setState({
      show,
      syncConfig,
      data: _data,
      BID: BID || '',
@@ -330,10 +325,6 @@
    } else {
      if (!config.wrap.supModule || config.wrap.supModule !== MenuID) return
  
      if (config.wrap.supControl === 'hidden') {
        this.setState({ show: id ? true : false })
      }
      if (id !== this.state.BID || id !== '') {
        this.setState({ BID: id, BData: data }, () => {
          this.loadData()
@@ -461,9 +452,10 @@
  }
  render() {
    const { config, loading, data, show, syncConfig, syncData, checked } = this.state
    const { config, loading, data, syncConfig, syncData, checked, BID } = this.state
    if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null
    if (config.wrap.supControl === 'hidden' && !BID) return null
    let style = {...config.style}
    if (config.wrap.bgField) {
@@ -471,7 +463,7 @@
    }
    
    return (
      <div className={'custom-balcony-box' + (!show ? ' hidden' : '')} id={'anchor' + config.uuid} style={style} onClick={this.triggerButton}>
      <div className="custom-balcony-box" id={'anchor' + config.uuid} style={style} onClick={this.triggerButton}>
        {loading ?
          <div className="loading-mask" onClick={(e) => e.stopPropagation()}>
            <div className="ant-spin-blur"></div>
src/tabviews/custom/components/card/balcony/index.scss
@@ -66,9 +66,6 @@
    }
  }
}
.custom-balcony-box.hidden {
  display: none;
}
.custom-balcony-box::after {
  content: ' ';
src/tabviews/custom/components/card/data-card/index.jsx
@@ -750,6 +750,10 @@
      if (config.setting.$hasSyncModule) {
        MKEmitter.emit('syncBalconyData', config.uuid, [], false)
      }
      if (config.$hasTopModule) {
        window.GLOB.CacheData.set(config.uuid + 'tb', { $$empty: true, $$uuid: '' })
        MKEmitter.emit('mkPublicData', config.uuid + 'tb', { $$empty: true, $$uuid: '' })
      }
      return
    }
@@ -852,6 +856,11 @@
        loading: false
      })
      if (config.$hasTopModule) {
        window.GLOB.CacheData.set(config.uuid + 'tb', data[0] || { $$empty: true, $$uuid: '' })
        MKEmitter.emit('mkPublicData', config.uuid + 'tb', data[0] || { $$empty: true, $$uuid: '' })
      }
      if (config.timer && config.clearField && result.data && result.data[0]) {
        let vals = (config.clearValue || '').split(',')
        if (vals.includes(result.data[0][config.clearField])) {
src/tabviews/custom/components/table/base-table/index.jsx
@@ -110,9 +110,9 @@
      
      MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 广播数据切换
      reset && MKEmitter.emit('resetTable', config.uuid, 'true') // 列表重置
      if (setting.$hasSyncModule) {
        MKEmitter.emit('syncBalconyData', config.uuid, [], false)
      }
      // if (setting.$hasSyncModule) {
      //   MKEmitter.emit('syncBalconyData', config.uuid, [], false)
      // }
      this.requestId = ''
      return
@@ -173,9 +173,9 @@
        }
      } else {
        MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 广播数据切换
        if (setting.$hasSyncModule) {
          MKEmitter.emit('syncBalconyData', config.uuid, [], false)
        }
        // if (setting.$hasSyncModule) {
        //   MKEmitter.emit('syncBalconyData', config.uuid, [], false)
        // }
      }
      
      reset && MKEmitter.emit('resetTable', config.uuid, repage) // 列表重置
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -530,6 +530,10 @@
      if (setting.$hasSyncModule) {
        MKEmitter.emit('syncBalconyData', config.uuid, [], false)
      }
      if (config.$hasTopModule) {
        window.GLOB.CacheData.set(config.uuid + 'tb', { $$empty: true, $$uuid: '' })
        MKEmitter.emit('mkPublicData', config.uuid + 'tb', { $$empty: true, $$uuid: '' })
      }
      this.loaded = true
      this.requestId = ''
@@ -653,6 +657,11 @@
        loading: false
      })
      if (config.$hasTopModule) {
        window.GLOB.CacheData.set(config.uuid + 'tb', data[0] || { $$empty: true, $$uuid: '' })
        MKEmitter.emit('mkPublicData', config.uuid + 'tb', data[0] || { $$empty: true, $$uuid: '' })
      }
      if (config.timer && config.clearField && result.data && result.data[0]) {
        let vals = (config.clearValue || '').split(',')
        if (vals.includes(result.data[0][config.clearField])) {
src/tabviews/custom/index.jsx
@@ -204,6 +204,7 @@
      // 权限过滤
      let roleId = sessionStorage.getItem('role_id') || '' // 角色ID
      let balMap = new Map()
      let tbMap = new Map()
      let skip = config.permission === 'false' || window.GLOB.mkHS
      let urlparam = {} // url参数
      if (param) {
@@ -261,7 +262,7 @@
      let initInters = []
      config.interfaces = this.formatInterSetting(config.interfaces, regs, MenuID, initInters, config.MenuName)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, urlparam, MenuID, config.interfaces, config.$cache, config.$time, config.MenuName, MenuID, MenuID, config.process === 'true')
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, tbMap, skip, urlparam, MenuID, config.$cache, config.$time, config.MenuName, MenuID, MenuID, config.process === 'true', regs)
      let params = []
      let BID = urlparam.$BID || ''
@@ -284,11 +285,7 @@
        }
      })
      config.components = this.formatSetting(config.components, params, inherit, regs, balMap)
      if (balMap.size > 0) {
        config.components = this.filterBalcony(config.components, balMap)
      }
      config.components = this.formatSetting(config.components, params, inherit, config.interfaces, balMap, tbMap)
      if (initInters.length > 0) {
        this.stepInter = {
@@ -380,7 +377,7 @@
    }
  }
  filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId, process) => {
  filterComponent = (components, roleId, permAction, balMap, tbMap, skip, urlparam, pageId, cache, time, MenuName, searchId, syncId, process, regs) => {
    return components.filter(item => {
      item.$pageId = pageId
      item.$searchId = searchId
@@ -497,7 +494,7 @@
            _searchId = tab.uuid
          }
          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, _searchId, tab.uuid, process)
          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, tbMap, skip, urlparam, pageId, cache, time, MenuName, _searchId, tab.uuid, process, regs)
          
          if (_searchId === tab.uuid) {
            tab.components.forEach(cell => {
@@ -521,7 +518,7 @@
          return false
        }
        item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId, process)
        item.components = this.filterComponent(item.components, roleId, permAction, balMap, tbMap, skip, urlparam, pageId, cache, time, MenuName, searchId, syncId, process, regs)
        return true
      } else if (['pie', 'bar', 'line', 'dashboard', 'scatter', 'chart', 'antvG6', 'antvX6'].includes(item.type)) {
@@ -537,16 +534,6 @@
          item.wrap.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0
        ) {
          return false
        }
        if (item.wrap.datatype === 'public') {
          let inter = interfaces.filter(int => item.wrap.publicId === int.uuid)[0]
          if (!inter) {
            item.wrap.datatype = 'static'
          } else {
            item.setting = {...inter.setting}
            item.$searchId = inter.$searchId
          }
        }
      }
@@ -785,6 +772,9 @@
          item.wrap.supModule = item.wrap.supModule.pop()
          item.setting.supModule = item.wrap.supModule
        }
        if (item.wrap.datatype === 'public') {
          balMap.set(item.wrap.publicId + 'public', true)
        }
        item.elements = item.elements.filter(cell => {
          if (cell.eleType === 'button') {
            if (cell.hidden === 'true') return false
@@ -843,43 +833,91 @@
          item.wrap.supModule = ''
        }
      }
      // 整理数据源
      if (item.setting && item.format && (!item.wrap || !['public', 'static'].includes(item.wrap.datatype))) {
        item.setting.arr_field = item.columns ? item.columns.map(col => col.field).join(',') : ''
        item.setting.useMSearch = item.setting.useMSearch === 'true'
        item.setting.laypage = item.setting.laypage === 'true'   // 是否分页,转为boolean 统一格式
        if (item.wrap && item.wrap.goback === 'true') {
          item.setting.sync = 'false'
        }
        if (item.format === 'object') {
          item.setting.laypage = false
          item.setting.$top = true
        }
        if (item.setting.interType !== 'system') { // 不使用系统函数时
          item.setting.sync = 'false'
          item.setting.dataresource = ''
        } else {
          let _customScript = ''
          let _tailScript = ''
          item.scripts && item.scripts.forEach(script => {
            if (script.status === 'false') return
            if (script.position !== 'back') {
              _customScript += `
              ${script.sql}
              `
            } else {
              _tailScript += `
              ${script.sql}
              `
            }
          })
          delete item.scripts
          item.setting.$name = item.$menuname || ''
          item.setting.execute = item.setting.execute !== 'false'  // 默认sql是否执行,转为boolean 统一格式
          if (!item.setting.execute) {
            item.setting.dataresource = ''
          }
          if (/\s/.test(item.setting.dataresource)) {
            item.setting.dataresource = '(' + item.setting.dataresource + ') tb'
          }
      
      return true
    })
  }
          if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
            item.setting.dataresource = item.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
            _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
            _tailScript = _tailScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
          } else {
            item.setting.dataresource = item.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
            _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
            _tailScript = _tailScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
          }
  filterBalcony = (components, balMap) => {
    return components.filter(item => {
      if (item.type === 'tabs') {
        item.subtabs = item.subtabs.map(tab => {
          tab.components = this.filterBalcony(tab.components, balMap)
          return tab
        })
      } else if (item.type === 'group') {
        item.components = this.filterBalcony(item.components, balMap)
      }
          regs.forEach(cell => {
            item.setting.dataresource = item.setting.dataresource.replace(cell.reg, cell.value)
            _customScript = _customScript.replace(cell.reg, cell.value)
            _tailScript = _tailScript.replace(cell.reg, cell.value)
          })
      if (item.type === 'balcony' && item.wrap.linkType === 'sync') {
        let conf = balMap.get(item.wrap.syncModuleId)
          item.setting.customScript = _customScript // 整理后自定义脚本
          item.setting.tailScript = _tailScript     // 后置自定义脚本
        if (!conf || conf === true) {
          return false
        }
        item.syncConfig = {
          uuid: conf.uuid,
          wrap: conf.wrap,
          setting: conf.setting,
          columns: conf.columns
        }
          item.setting.custompage = /@pageSize@|@orderBy@/i.test(item.setting.dataresource + item.setting.customScript)
        if (item.wrap.checkAll === 'show') {
          if (conf.subtype === 'datacard' && conf.wrap.cardType !== 'checkbox') {
            item.wrap.checkAll = 'hidden'
          } else if (conf.subtype === 'normaltable' && conf.wrap.tableType !== 'checkbox') {
            item.wrap.checkAll = 'hidden'
          if (!item.setting.execute || item.setting.custompage) {
            item.forbidLine = true
          }
          if (item.setting.sync === 'true') {
            // pageable 是否分页,组件属性,不分页的组件才可以统一查询
            if ((!item.pageable || (item.pageable && !item.setting.laypage)) && item.setting.onload === 'true') {
            } else {
              item.setting.sync = 'false'
            }
          }
        }
      }
      if (item.type === 'card' && item.subtype === 'datacard') {
        tbMap.set(item.uuid, item)
      } else if (item.type === 'table' && item.subtype !== 'editable') {
        tbMap.set(item.uuid, item)
      }
      
      return true
@@ -1089,20 +1127,64 @@
  }
  // 格式化默认设置
  formatSetting = (components, params, inherit, regs, balMap) => {
  formatSetting = (components, params, inherit, interfaces, balMap, tbMap) => {
    let delay = 20
    return components.map(component => {
      if (component.type === 'tabs') {
        component.subtabs = component.subtabs.map(tab => {
          tab.components = this.formatSetting(tab.components, null, inherit, regs, balMap)
          tab.components = this.formatSetting(tab.components, null, inherit, interfaces, balMap, tbMap)
          tab = {...tab, ...inherit}
          return tab
        })
        return component
      } else if (component.type === 'group') {
        component.components = this.formatSetting(component.components, params, null, regs, balMap)
        component.components = this.formatSetting(component.components, params, null, interfaces, balMap, tbMap)
        return component
      } else if (component.wrap && component.wrap.datatype === 'public') {
      }
      if (component.type === 'balcony') {
        if (component.wrap.linkType === 'sync') {
          let conf = tbMap.get(component.wrap.syncModuleId)
          if (conf) {
            component.syncConfig = {
              uuid: conf.uuid,
              wrap: conf.wrap,
              setting: conf.setting,
              columns: conf.columns
            }
            if (component.wrap.checkAll === 'show') {
              if (conf.subtype === 'datacard' && conf.wrap.cardType !== 'checkbox') {
                component.wrap.checkAll = 'hidden'
              } else if (conf.subtype === 'normaltable' && conf.wrap.tableType !== 'checkbox') {
                component.wrap.checkAll = 'hidden'
              }
            }
          }
        }
      } else if (balMap.has(component.uuid)) {
        component.setting.$hasSyncModule = true
      }
      if (balMap.has(component.uuid + 'public')) {
        component.$hasTopModule = true
      }
      if (component.wrap && component.wrap.datatype === 'public') {
        if (tbMap.has(component.wrap.publicId)) {
          let tb = tbMap.get(component.wrap.publicId)
          component.setting = {...tb.setting}
          component.$searchId = tb.$searchId
          component.wrap.publicId = component.wrap.publicId + 'tb'
        } else {
          let inter = interfaces.filter(int => component.wrap.publicId === int.uuid)[0]
          if (!inter) {
            component.wrap.datatype = 'static'
          } else {
            component.setting = {...inter.setting}
            component.$searchId = inter.$searchId
          }
        }
        return component
      } else if (component.wrap && component.wrap.datatype === 'static') {
        component.format = ''
@@ -1115,10 +1197,6 @@
        return component
      }
      component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : ''
      component.setting.useMSearch = component.setting.useMSearch === 'true'
      component.setting.laypage = component.setting.laypage === 'true'   // 是否分页,转为boolean 统一格式
      if (component.setting.useMSearch) {
        if (!window.GLOB.SearchBox.has(component.$searchId)) {
          component.setting.useMSearch = false
@@ -1133,79 +1211,7 @@
        }
      }
      if (component.wrap && component.wrap.goback === 'true') {
        component.setting.sync = 'false'
      }
      if (component.format === 'object') {
        component.setting.laypage = false
        component.setting.$top = true
      }
      if (component.setting.interType !== 'system') { // 不使用系统函数时
        component.setting.sync = 'false'
        component.setting.dataresource = ''
        return component
      }
      let _customScript = ''
      let _tailScript = ''
      component.scripts && component.scripts.forEach(script => {
        if (script.status === 'false') return
        if (script.position !== 'back') {
          _customScript += `
          ${script.sql}
          `
        } else {
          _tailScript += `
          ${script.sql}
          `
        }
      })
      delete component.scripts
      component.setting.$name = component.$menuname || ''
      component.setting.execute = component.setting.execute !== 'false'  // 默认sql是否执行,转为boolean 统一格式
      if (!component.setting.execute) {
        component.setting.dataresource = ''
      }
      if (/\s/.test(component.setting.dataresource)) {
        component.setting.dataresource = '(' + component.setting.dataresource + ') tb'
      }
      if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
        component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
        _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
        _tailScript = _tailScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
      } else {
        component.setting.dataresource = component.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _tailScript = _tailScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
      }
      regs.forEach(cell => {
        component.setting.dataresource = component.setting.dataresource.replace(cell.reg, cell.value)
        _customScript = _customScript.replace(cell.reg, cell.value)
        _tailScript = _tailScript.replace(cell.reg, cell.value)
      })
      component.setting.customScript = _customScript // 整理后自定义脚本
      component.setting.tailScript = _tailScript     // 后置自定义脚本
      component.setting.custompage = /@pageSize@|@orderBy@/i.test(component.setting.dataresource + component.setting.customScript)
      if (!component.setting.execute || component.setting.custompage) {
        component.forbidLine = true
      }
      if (component.setting.sync === 'true') {
        // pageable 是否分页,组件属性,不分页的组件才可以统一查询
        if ((!component.pageable || (component.pageable && !component.setting.laypage)) && component.setting.onload === 'true') {
        } else {
          component.setting.sync = 'false'
        }
      }
      if (component.setting.interType !== 'system') return component
      // dataName 系统生成的数据源名称
      if (component.setting.sync === 'true') {
@@ -1235,11 +1241,6 @@
      
      component.setting.delay = delay
      delay += 20
      if (balMap.has(component.uuid)) {
        component.setting.$hasSyncModule = true
        balMap.set(component.uuid, component)
      }
      return component
    })
src/tabviews/custom/popview/index.jsx
@@ -106,6 +106,7 @@
    // 权限过滤
    let roleId = sessionStorage.getItem('role_id') || '' // 角色ID
    let balMap = new Map()
    let tbMap = new Map()
    let urlparam = {} // url参数
    if (param) {
      Object.keys(param).forEach(key => {
@@ -139,7 +140,7 @@
      regs.push({ reg: /@works_flow_code@/ig, value: `'${flow.flow_code || ''}'` })
    }
    config.components = this.filterComponent(config.components, roleId, balMap, urlparam, Tab, Tab.uuid, Tab.uuid)
    config.components = this.filterComponent(config.components, roleId, balMap, tbMap, urlparam, Tab, Tab.uuid, Tab.uuid, regs)
    
    // 获取主搜索条件
    config.components.forEach(component => {
@@ -155,11 +156,7 @@
    let params = []
    let BID = urlparam.$BID || ''
    config.components = this.formatSetting(config.components, params, regs, balMap)
    if (balMap.size > 0) {
      config.components = this.filterBalcony(config.components, balMap)
    }
    config.components = this.formatSetting(config.components, params, balMap, tbMap)
    this.setState({
      BID: BID,
@@ -171,7 +168,7 @@
    })
  }
  filterComponent = (components, roleId, balMap, urlparam, Tab, searchId, syncId) => {
  filterComponent = (components, roleId, balMap, tbMap, urlparam, Tab, searchId, syncId, regs) => {
    return components.filter(item => {
      item.$pageId = Tab.uuid
      item.$searchId = searchId
@@ -271,7 +268,7 @@
            _searchId = tab.uuid
          }
          tab.components = this.filterComponent(tab.components, roleId, balMap, urlparam, Tab, _searchId, tab.uuid)
          tab.components = this.filterComponent(tab.components, roleId, balMap, tbMap, urlparam, Tab, _searchId, tab.uuid, regs)
          if (_searchId === tab.uuid) {
            tab.components.forEach(cell => {
@@ -295,7 +292,7 @@
          return false
        }
        item.components = this.filterComponent(item.components, roleId, balMap, urlparam, Tab, searchId, syncId)
        item.components = this.filterComponent(item.components, roleId, balMap, tbMap, urlparam, Tab, searchId, syncId, regs)
        return true
      } else if (['pie', 'bar', 'line', 'dashboard', 'scatter', 'chart'].includes(item.type)) {
@@ -501,6 +498,9 @@
          item.wrap.supModule = item.wrap.supModule.pop()
          item.setting.supModule = item.wrap.supModule
        }
        if (item.wrap.datatype === 'public') {
          balMap.set(item.wrap.publicId + 'public', true)
        }
        item.elements = item.elements.filter(cell => {
          if (cell.eleType === 'button') {
            if (cell.hidden === 'true' || cell.OpenType === 'popview') return false
@@ -545,43 +545,91 @@
          return group
        })
      }
      // 整理数据源
      if (item.setting && item.format && (!item.wrap || !['public', 'static'].includes(item.wrap.datatype))) {
        item.setting.arr_field = item.columns ? item.columns.map(col => col.field).join(',') : ''
        item.setting.useMSearch = item.setting.useMSearch === 'true'
        item.setting.laypage = item.setting.laypage === 'true'   // 是否分页,转为boolean 统一格式
        if (item.wrap && item.wrap.goback === 'true') {
          item.setting.sync = 'false'
        }
        if (item.format === 'object') {
          item.setting.laypage = false
          item.setting.$top = true
        }
        if (item.setting.interType !== 'system') { // 不使用系统函数时
          item.setting.sync = 'false'
          item.setting.dataresource = ''
        } else {
          let _customScript = ''
          let _tailScript = ''
          item.scripts && item.scripts.forEach(script => {
            if (script.status === 'false') return
            if (script.position !== 'back') {
              _customScript += `
              ${script.sql}
              `
            } else {
              _tailScript += `
              ${script.sql}
              `
            }
          })
          delete item.scripts
          item.setting.$name = item.$menuname || ''
          item.setting.execute = item.setting.execute !== 'false'  // 默认sql是否执行,转为boolean 统一格式
          if (!item.setting.execute) {
            item.setting.dataresource = ''
          }
          if (/\s/.test(item.setting.dataresource)) {
            item.setting.dataresource = '(' + item.setting.dataresource + ') tb'
          }
      
      return true
    })
  }
          if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
            item.setting.dataresource = item.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
            _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
            _tailScript = _tailScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
          } else {
            item.setting.dataresource = item.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
            _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
            _tailScript = _tailScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
          }
  filterBalcony = (components, balMap) => {
    return components.filter(item => {
      if (item.type === 'tabs') {
        item.subtabs = item.subtabs.map(tab => {
          tab.components = this.filterBalcony(tab.components, balMap)
          return tab
        })
      } else if (item.type === 'group') {
        item.components = this.filterBalcony(item.components, balMap)
      }
          regs.forEach(cell => {
            item.setting.dataresource = item.setting.dataresource.replace(cell.reg, cell.value)
            _customScript = _customScript.replace(cell.reg, cell.value)
            _tailScript = _tailScript.replace(cell.reg, cell.value)
          })
      if (item.type === 'balcony' && item.wrap.linkType === 'sync') {
        let conf = balMap.get(item.wrap.syncModuleId)
          item.setting.customScript = _customScript // 整理后自定义脚本
          item.setting.tailScript = _tailScript     // 后置自定义脚本
        if (!conf || conf === true) {
          return false
        }
        item.syncConfig = {
          uuid: conf.uuid,
          wrap: conf.wrap,
          setting: conf.setting,
          columns: conf.columns
        }
          item.setting.custompage = /@pageSize@|@orderBy@/i.test(item.setting.dataresource + item.setting.customScript)
        if (item.wrap.checkAll === 'show') {
          if (conf.subtype === 'datacard' && conf.wrap.cardType !== 'checkbox') {
            item.wrap.checkAll = 'hidden'
          } else if (conf.subtype === 'normaltable' && conf.wrap.tableType !== 'checkbox') {
            item.wrap.checkAll = 'hidden'
          if (!item.setting.execute || item.setting.custompage) {
            item.forbidLine = true
          }
          if (item.setting.sync === 'true') {
            // pageable 是否分页,组件属性,不分页的组件才可以统一查询
            if ((!item.pageable || (item.pageable && !item.setting.laypage)) && item.setting.onload === 'true') {
            } else {
              item.setting.sync = 'false'
            }
          }
        }
      }
      if (item.type === 'card' && item.subtype === 'datacard') {
        tbMap.set(item.uuid, item)
      } else if (item.type === 'table' && item.subtype !== 'editable') {
        tbMap.set(item.uuid, item)
      }
      
      return true
@@ -766,20 +814,63 @@
  }
  // 格式化默认设置
  formatSetting = (components, params, regs, balMap) => {
  formatSetting = (components, params, balMap, tbMap) => {
    let delay = 20
    return components.map(component => {
      if (component.type === 'tabs') {
        component.subtabs = component.subtabs.map(tab => {
          tab.components = this.formatSetting(tab.components, null, regs, balMap)
          tab.components = this.formatSetting(tab.components, null, balMap, tbMap)
          return tab
        })
        return component
      } else if (component.type === 'group') {
        component.components = this.formatSetting(component.components, params, regs, balMap)
        component.components = this.formatSetting(component.components, params, balMap, tbMap)
        return component
      } else if (component.wrap && (component.wrap.datatype === 'static' || component.wrap.datatype === 'public')) {
        component.wrap.datatype = 'static'
      }
      if (component.type === 'balcony') {
        if (component.wrap.linkType === 'sync') {
          let conf = tbMap.get(component.wrap.syncModuleId)
          if (conf) {
            component.syncConfig = {
              uuid: conf.uuid,
              wrap: conf.wrap,
              setting: conf.setting,
              columns: conf.columns
            }
            if (component.wrap.checkAll === 'show') {
              if (conf.subtype === 'datacard' && conf.wrap.cardType !== 'checkbox') {
                component.wrap.checkAll = 'hidden'
              } else if (conf.subtype === 'normaltable' && conf.wrap.tableType !== 'checkbox') {
                component.wrap.checkAll = 'hidden'
              }
            }
          }
        }
      } else if (balMap.has(component.uuid)) {
        component.setting.$hasSyncModule = true
      }
      if (balMap.has(component.uuid + 'public')) {
        component.$hasTopModule = true
      }
      if (component.wrap && component.wrap.datatype === 'public') {
        if (tbMap.has(component.wrap.publicId)) {
          let tb = tbMap.get(component.wrap.publicId)
          component.setting = {...tb.setting}
          component.$searchId = tb.$searchId
          component.wrap.publicId = component.wrap.publicId + 'tb'
        } else {
          component.wrap.datatype = 'static'
          component.setting = component.setting || {}
          component.setting.useMSearch = false
          component.setting.sync = 'false'
        }
        return component
      } else if (component.wrap && component.wrap.datatype === 'static') {
        component.format = ''
        component.setting = component.setting || {}
        component.setting.useMSearch = false
@@ -790,10 +881,6 @@
        return component
      }
      component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : ''
      component.setting.useMSearch = component.setting.useMSearch === 'true'
      component.setting.laypage = component.setting.laypage === 'true'   // 是否分页,转为boolean 统一格式
      if (component.setting.useMSearch) {
        if (!window.GLOB.SearchBox.has(component.$searchId)) {
          component.setting.useMSearch = false
@@ -802,75 +889,7 @@
        }
      }
      if (component.format === 'object') {
        component.setting.laypage = false
        component.setting.$top = true
      }
      if (component.setting.interType !== 'system') { // 不使用系统函数时
        component.setting.sync = 'false'
        component.setting.dataresource = ''
        return component
      }
      let _customScript = ''
      let _tailScript = ''
      component.scripts && component.scripts.forEach(script => {
        if (script.status === 'false') return
        if (script.position !== 'back') {
          _customScript += `
          ${script.sql}
          `
        } else {
          _tailScript += `
          ${script.sql}
          `
        }
      })
      delete component.scripts
      component.setting.$name = component.$menuname || ''
      component.setting.execute = component.setting.execute !== 'false'  // 默认sql是否执行,转为boolean 统一格式
      if (!component.setting.execute) {
        component.setting.dataresource = ''
      }
      if (/\s/.test(component.setting.dataresource)) {
        component.setting.dataresource = '(' + component.setting.dataresource + ') tb'
      }
      if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
        component.setting.dataresource = component.setting.dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
        _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
        _tailScript = _tailScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
      } else {
        component.setting.dataresource = component.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _tailScript = _tailScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
      }
      regs.forEach(cell => {
        component.setting.dataresource = component.setting.dataresource.replace(cell.reg, cell.value)
        _customScript = _customScript.replace(cell.reg, cell.value)
        _tailScript = _tailScript.replace(cell.reg, cell.value)
      })
      component.setting.customScript = _customScript // 整理后自定义脚本
      component.setting.tailScript = _tailScript     // 后置自定义脚本
      component.setting.custompage = /@pageSize@|@orderBy@/i.test(component.setting.dataresource + component.setting.customScript)
      if (!component.setting.execute || component.setting.custompage) {
        component.forbidLine = true
      }
      if (component.setting.sync === 'true') {
        // pageable 是否分页,组件属性,不分页的组件才可以统一查询
        if ((!component.pageable || (component.pageable && !component.setting.laypage)) && component.setting.onload === 'true') {
        } else {
          component.setting.sync = 'false'
        }
      }
      if (component.setting.interType !== 'system') return component
      // dataName 系统生成的数据源名称
      if (component.setting.sync === 'true') {
@@ -900,11 +919,6 @@
      component.setting.delay = delay
      delay += 20
      if (balMap.has(component.uuid)) {
        component.setting.$hasSyncModule = true
        balMap.set(component.uuid, component)
      }
      return component
    })
src/utils/utils-custom.js
@@ -364,80 +364,6 @@
  }
  /**
   * @description 获取可关联模块
   */
  static getLinkModules (components) {
    let modules = components.map(item => {
      if ((item.type === 'card' && item.subtype === 'datacard') || (item.type === 'table' && item.subtype === 'normaltable')) {
        return {
          value: item.uuid,
          label: item.name
        }
      } else if (item.type === 'tabs') {
        let _item = {
          value: item.uuid,
          label: item.name,
          children: item.subtabs.map(f_tab => {
            let subItem = {
              value: f_tab.uuid,
              label: f_tab.label,
              children: this.getLinkModules(f_tab.components)
            }
            if (!subItem.children || subItem.children.length === 0) {
              return {children: null}
            }
            return subItem
          })
        }
        _item.children = _item.children.filter(t => t.children !== null)
        if (_item.children.length === 0) {
          return {children: null}
        }
        return _item
      } else if (item.type === 'group') {
        let _item = {
          value: item.uuid,
          label: item.name,
          children: item.components.map(f_tab => {
            if ((f_tab.type === 'card' && f_tab.subtype === 'datacard') || (f_tab.type === 'table' && f_tab.subtype === 'normaltable')) {
              return {
                value: f_tab.uuid,
                label: f_tab.name
              }
            }
            return {
              children: null
            }
          })
        }
        _item.children = _item.children.filter(t => t.children !== null)
        if (_item.children.length === 0) {
          return {children: null}
        }
        return _item
      } else {
        return {
          children: null
        }
      }
    })
    modules = modules.filter(mod => mod.children !== null)
    if (modules.length === 0) {
      return null
    }
    return modules
  }
  /**
   * @description 生成32位uuid string + 时间
   * @return {String}  uuid
   */
@@ -1014,6 +940,128 @@
}
/**
 * @description 获取可关联模块
 */
export function getLinkModules (components) {
  let modules = components.map(item => {
    if ((item.type === 'card' && item.subtype === 'datacard') || (item.type === 'table' && item.subtype === 'normaltable')) {
      return {
        value: item.uuid,
        label: item.name
      }
    } else if (item.type === 'tabs') {
      let _item = {
        value: item.uuid,
        label: item.name,
        children: item.subtabs.map(f_tab => {
          let subItem = {
            value: f_tab.uuid,
            label: f_tab.label,
            children: this.getLinkModules(f_tab.components)
          }
          if (!subItem.children || subItem.children.length === 0) {
            return {children: null}
          }
          return subItem
        })
      }
      _item.children = _item.children.filter(t => t.children !== null)
      if (_item.children.length === 0) {
        return {children: null}
      }
      return _item
    } else if (item.type === 'group') {
      let _item = {
        value: item.uuid,
        label: item.name,
        children: item.components.map(f_tab => {
          if ((f_tab.type === 'card' && f_tab.subtype === 'datacard') || (f_tab.type === 'table' && f_tab.subtype === 'normaltable')) {
            return {
              value: f_tab.uuid,
              label: f_tab.name
            }
          }
          return {
            children: null
          }
        })
      }
      _item.children = _item.children.filter(t => t.children !== null)
      if (_item.children.length === 0) {
        return {children: null}
      }
      return _item
    } else {
      return {
        children: null
      }
    }
  })
  modules = modules.filter(mod => mod.children !== null)
  if (modules.length === 0) {
    return null
  }
  return modules
}
/**
 * @description 获取公共数据源
 */
export function getInterfaces () {
  let menu = window.GLOB.customMenu
  let interfaces = []
  if (menu.interfaces) {
    menu.interfaces.forEach(item => {
      if (item.status === 'true') {
        interfaces.push({
          value: item.uuid,
          label: item.name,
          columns: JSON.parse(JSON.stringify(item.columns))
        })
      }
    })
  }
  let mapComponents = (components = []) => {
    components.forEach(item => {
      if (item.type === 'card' && item.subtype === 'datacard') {
        interfaces.push({
          value: item.uuid,
          label: item.name + '(数据卡)',
          columns: JSON.parse(JSON.stringify(item.columns))
        })
      } else if (item.type === 'table' && item.subtype === 'normaltable') {
        interfaces.push({
          value: item.uuid,
          label: item.name + '(常用表)',
          columns: JSON.parse(JSON.stringify(item.columns))
        })
      } else if (item.type === 'tabs') {
        item.subtabs.forEach(f_tab => {
          mapComponents(f_tab.components)
        })
      } else if (item.type === 'group') {
        mapComponents(item.components)
      }
    })
  }
  mapComponents(menu.components)
  return interfaces
}
/**
 * @description 格式化搜索条件
 */
export function formatSearch (searches) {