king
2023-08-23 547e5fe219ee7bee309ecd67db74bc8df66b5433
2023-08-23
60个文件已修改
2个文件已添加
2185 ■■■■■ 已修改文件
src/components/header/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/mkIcon/index.jsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/options.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/mkPrintTemps/index.jsx 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/mkPrintTemps/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/customscript/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/basetable/index.jsx 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/calendar/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/data-card/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-G6/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-dashboard/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-scatter/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/custom-chart/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/code/sand-box/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/editor/braft-editor/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/simple-form/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/step-form/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/iframe/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/interfaces/interItem/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/base-table/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/timeline/normal-timeline/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/tree/antd-tree/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/debugtable/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/treepage/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/exceloutbutton/index.jsx 364 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/popupbutton/index.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/printbutton/index.jsx 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx 247 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/baseform/index.jsx 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 243 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 168 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sso/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx
@@ -30,7 +30,7 @@
    systems: [],
    searchkey: '',
    thdMenuList: [],
    debug: sessionStorage.getItem('debug') === 'true',
    debug: sessionStorage.getItem('debug') === 'true' && window.GLOB.memberLevel > 0,
    collapse: sessionStorage.getItem('collapse') === 'true'
  }
src/components/mkIcon/index.jsx
@@ -46,12 +46,8 @@
  }
  componentDidMount() {
    if (!window.GLOB.designView) {
      if (window.GLOB.systemIcons) {
        this.setState({cusicons: window.GLOB.systemIcons})
      } else {
        this.getIcons()
      }
    if (!window.GLOB.designView && window.GLOB.systemIcons) {
      this.setState({cusicons: window.GLOB.systemIcons})
    }
  }
@@ -65,6 +61,8 @@
  }
  getIcons = () => {
    const { selectIcon } = this.state
    Api.getCloudConfig({ func: 's_get_icons' }).then(res => {
      if (!res.status) {
        notification.warning({
@@ -84,6 +82,13 @@
      window.GLOB.systemIcons = icons
      this.setState({cusicons: icons})
      if (icons.length > 0 && selectIcon && /<svg/.test(selectIcon)) {
        setTimeout(() => {
          let node = document.getElementById('mk-custom-tab')
          node && node.click()
        }, 200)
      }
    })
  }
@@ -92,7 +97,9 @@
    this.setState({visible: true})
    if (cusicons.length > 0 && selectIcon && /<svg/.test(selectIcon)) {
    if (!window.GLOB.designView && !window.GLOB.systemIcons) {
      this.getIcons()
    } else if (cusicons.length > 0 && selectIcon && /<svg/.test(selectIcon)) {
      setTimeout(() => {
        let node = document.getElementById('mk-custom-tab')
        node && node.click()
src/index.js
@@ -223,7 +223,7 @@
    let lang = localStorage.getItem(_href + 'lang') || (config.defaultLang !== 'en-US' ? 'zh-CN' : 'en-US')
    sessionStorage.setItem('lang', lang)
    let _level = 10
    let _level = 0
    let _Mlevel = sessionStorage.getItem('Member_Level')
    if (_Mlevel) {
src/menu/components/card/balcony/options.jsx
@@ -35,10 +35,6 @@
    roleList = []
  }
  if (wrap.datatype === 'public' && MenuType === 'billPrint') {
    wrap.datatype = 'static'
  }
  const balconyWrapForm = [
    {
      type: 'text',
@@ -69,7 +65,7 @@
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
        {value: 'public', label: '公共数据源', disabled: MenuType === 'billPrint'},
        {value: 'public', label: '公共数据源'},
      ],
      controlFields: [
        {field: 'empty', values: ['dynamic']},
src/menu/components/card/cardcellcomponent/index.jsx
@@ -1,13 +1,11 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, Button, notification } from 'antd'
import { Modal, Button } from 'antd'
import moment from 'moment'
import Api from '@/api'
import asyncComponent from '@/utils/asyncComponent'
import { getCardCellForm } from './formconfig'
import { queryPrintSql } from '@/utils/option.js'
import { getActionForm, getBaseTableActionForm } from '@/menu/components/share/actioncomponent/formconfig'
import Utils, { FuncUtils } from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
@@ -316,64 +314,21 @@
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid, supId)
    this.checkPrintTemp().then(() => {
      if (cards.subtype === 'basetable') {
        this.setState({
          actvisible: true,
          card: card,
          formlist: getBaseTableActionForm(card, functip, cards, usefulFields, modules)
        })
      } else {
        let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || []
        this.setState({
          actvisible: true,
          card: card,
          formlist: getActionForm(card, functip, cards, usefulFields, modules, anchors, side)
        })
      }
    })
  }
    if (cards.subtype === 'basetable') {
      this.setState({
        actvisible: true,
        card: card,
        formlist: getBaseTableActionForm(card, functip, cards, usefulFields, modules)
      })
    } else {
      let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || []
  checkPrintTemp = () => {
    return new Promise(resolve => {
      if (!window.GLOB.printTemps) {
        let param = {
          func: 'sPC_Get_SelectedList',
          LText: Utils.formatOptions(queryPrintSql),
          obj_name: 'data',
          arr_field: 'PN,ID,Images'
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
        param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证
        Api.getCloudConfig(param).then(res => {
          if (!res.status) {
            notification.warning({
              top: 92,
              message: res.message,
              duration: 5
            })
          }
          let temps = (res.data || []).map(temp => {
            return {
              value: temp.ID,
              text: temp.PN
            }
          })
          window.GLOB.printTemps = temps
          resolve()
        }, () => {
          resolve()
        })
      } else {
        resolve()
      }
    })
      this.setState({
        actvisible: true,
        card: card,
        formlist: getActionForm(card, functip, cards, usefulFields, modules, anchors, side)
      })
    }
  }
  /**
src/menu/components/card/data-card/options.jsx
@@ -62,10 +62,6 @@
    }
  }
  if (wrap.datatype === 'public' && MenuType === 'billPrint') {
    wrap.datatype = 'static'
  }
  const cardWrapForm = [
    {
      type: 'text',
@@ -103,7 +99,7 @@
      options: [
        {value: 'dynamic', label: '动态', priKeyType: 'static'},
        {value: 'static', label: '静态', priKeyType: 'static'},
        {value: 'public', label: '公共数据源', priKeyType: 'static', disabled: MenuType === 'billPrint'},
        {value: 'public', label: '公共数据源', priKeyType: 'static'},
      ],
      linkFields: ['priKeyType'],
      controlFields: [
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -7,6 +7,7 @@
import asyncComponent from '@/utils/asyncComponent'
import KeyInterface from '@/components/keyInterface'
import MkPrintTemps from './mkPrintTemps'
import './index.scss'
const { TextArea } = Input
@@ -353,7 +354,12 @@
      }
    } else if (openType === 'excelOut') {
      reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom')
      reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredOnce'].includes(op.value))
      if (appType === 'mob') {
        reOptions.Ot = requireOptions.filter(op => ['notRequired'].includes(op.value))
      } else {
        reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredOnce'].includes(op.value))
      }
      if (this.record.intertype === 'outer') {
        shows.push('innerFunc', 'sysInterface', 'outerFunc')
@@ -381,7 +387,9 @@
      if (this.record.execSuccess === 'grid' || this.record.execError === 'grid') {
        shows.push('resetPageIndex')
      }
      if (this.record.Ot !== 'notRequired' && this.record.Ot !== 'requiredOnce') {
      if (this.record.Ot !== 'notRequired' && appType === 'mob') {
        this.record.Ot = 'notRequired'
      } else if (this.record.Ot !== 'notRequired' && this.record.Ot !== 'requiredOnce') {
        this.record.Ot = 'notRequired'
      }
    } else if (openType === 'popview') {
@@ -923,6 +931,12 @@
        }
        content = <TextArea rows={2} readOnly={item.readonly}/>
      } else if (item.type === 'printTemps') {
        rules = [
          { required: item.required, message: '请选择' + item.label + '!' }
        ]
        content = <MkPrintTemps />
      } else if (item.type === 'keyinterface') {
        span = 24
        className = 'textarea'
@@ -995,6 +1009,10 @@
              values.verify.sheet = values.verify.sheet || 'Sheet1'
            }
            if (values.verify) {
              values.verify.scripts = []
            }
          } else if (card.OpenType === 'excelIn' && values.OpenType === 'excelOut') {
            if (values.verify && values.verify.columns && values.verify.columns.length > 0) {
              values.verify.columns = values.verify.columns.map(col => {
@@ -1016,6 +1034,10 @@
                return col
              })
            }
            if (values.verify) {
              values.verify.scripts = []
            }
          }
          if (values.OpenType === 'form') {
src/menu/components/share/actioncomponent/actionform/mkPrintTemps/index.jsx
New file
@@ -0,0 +1,89 @@
import React, {Component} from 'react'
import { Select, notification } from 'antd'
import moment from 'moment'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { queryPrintSql } from '@/utils/option.js'
class MKSelect extends Component {
  constructor(props) {
    super(props)
    this.state = {
      options: window.GLOB.printTemps || []
    }
  }
  componentDidMount () {
    if (!window.GLOB.printTemps) {
      this.getPrintTemp()
    }
  }
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  getPrintTemp = () => {
    let param = {
      func: 'sPC_Get_SelectedList',
      LText: Utils.formatOptions(queryPrintSql),
      obj_name: 'data',
      arr_field: 'PN,ID,Images'
    }
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证
    Api.getCloudConfig(param).then(res => {
      if (!res.status) {
        notification.warning({
          top: 92,
          message: res.message,
          duration: 5
        })
      }
      let temps = (res.data || []).map(temp => {
        return {
          value: temp.ID,
          text: temp.PN
        }
      })
      window.GLOB.printTemps = temps
      this.setState({options: temps})
    })
  }
  selectChange = (val) => {
    this.props.onChange(val)
  }
  render() {
    const { value } = this.props
    const { options } = this.state
    return (
      <Select
        showSearch
        allowClear
        value={value}
        filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
        onSelect={this.selectChange}
        onChange={(val) => val === undefined && this.selectChange('')}
      >
        {options.map(option =>
          <Select.Option key={option.value} value={option.value}>{option.text}</Select.Option>
        )}
      </Select>
    )
  }
}
export default MKSelect
src/menu/components/share/actioncomponent/actionform/mkPrintTemps/index.scss
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -12,7 +12,6 @@
export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side) {
  let appType = sessionStorage.getItem('appType')
  let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
  let printTemps = window.GLOB.printTemps || []
  let setting = config.setting || {}
  let columns = side === 'sub' && config.subColumns ? config.subColumns : (config.columns || [])
  let appMenus = []
@@ -399,12 +398,11 @@
      options: pageTemps
    },
    {
      type: 'select',
      type: 'printTemps',
      key: 'printTemp',
      label: '打印模板',
      initVal: card.printTemp || '',
      required: true,
      options: printTemps
      required: true
    },
    {
      type: isApp ? 'select' : 'cascader',
@@ -1282,7 +1280,6 @@
 */
export function getBaseTableActionForm (card, functip, config, usefulFields, modules) {
  let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
  let printTemps = window.GLOB.printTemps || []
  let setting = config.setting || {}
  let columns = config.columns || []
@@ -1504,12 +1501,11 @@
      options: pageTemps
    },
    {
      type: 'select',
      type: 'printTemps',
      key: 'printTemp',
      label: '打印模板',
      initVal: card.printTemp || '',
      required: true,
      options: printTemps
      required: true
    },
    {
      type: 'cascader',
src/menu/components/share/actioncomponent/index.jsx
@@ -4,9 +4,7 @@
import { Modal, notification, Button } from 'antd'
import moment from 'moment'
import Api from '@/api'
import Utils, { FuncUtils } from '@/utils/utils.js'
import { queryPrintSql } from '@/utils/option.js'
import { getActionForm, getBaseTableActionForm } from './formconfig'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import MKEmitter from '@/utils/events.js'
@@ -211,67 +209,23 @@
    
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid, supId)
    this.checkPrintTemp().then(() => {
      if (config.subtype === 'basetable') {
        delete card.eleType // 区分按钮位置
        this.setState({
          visible: true,
          card: card,
          formlist: getBaseTableActionForm(card, functip, config, usefulFields, modules)
        })
      } else {
        let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, config.uuid) || []
        this.setState({
          visible: true,
          card: card,
          formlist: getActionForm(card, functip, config, usefulFields, modules, anchors)
        })
      }
    })
  }
    if (config.subtype === 'basetable') {
      delete card.eleType // 区分按钮位置
  checkPrintTemp = () => {
    return new Promise(resolve => {
      if (!window.GLOB.printTemps) {
        let param = {
          func: 'sPC_Get_SelectedList',
          LText: Utils.formatOptions(queryPrintSql),
          obj_name: 'data',
          arr_field: 'PN,ID,Images'
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.secretkey = Utils.encrypt(param.LText, param.timestamp)
        param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证
        Api.getCloudConfig(param).then(res => {
          if (!res.status) {
            notification.warning({
              top: 92,
              message: res.message,
              duration: 5
            })
          }
          let temps = (res.data || []).map(temp => {
            return {
              value: temp.ID,
              text: temp.PN
            }
          })
      this.setState({
        visible: true,
        card: card,
        formlist: getBaseTableActionForm(card, functip, config, usefulFields, modules)
      })
    } else {
      let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, config.uuid) || []
  
          window.GLOB.printTemps = temps
          resolve()
        }, () => {
          resolve()
        })
      } else {
        resolve()
      }
    })
      this.setState({
        visible: true,
        card: card,
        formlist: getActionForm(card, functip, config, usefulFields, modules, anchors)
      })
    }
  }
  /**
src/menu/datasource/verifycard/customscript/index.jsx
@@ -98,7 +98,8 @@
      editItem: null
    })
    this.props.form.setFieldsValue({
      sql: ' '
      sql: ' ',
      position: 'front'
    })
  }
@@ -117,7 +118,6 @@
        }
        values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
        values.position = values.position || 'front'
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
src/menu/datasource/verifycard/settingform/index.jsx
@@ -27,16 +27,24 @@
    modules: [],
    innerRules: [],
    innertip: '',
    MenuType: '',
    ismain: false
  }
  UNSAFE_componentWillMount () {
    const { config, setting } = this.props
    let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, config.uuid, window.GLOB.customMenu.interfaces)
    let menu = window.GLOB.customMenu
    let MenuType = ''
    if (menu.parentId === 'BillPrintTemp') {
      MenuType = 'billPrint'
    }
    let modules = MenuUtils.getSupModules(menu.components, config.uuid, menu.interfaces)
    let ismain = false
    if (window.GLOB.customMenu.Template === 'BaseTable') {
    if (menu.Template === 'BaseTable') {
      ismain = config.name === '主表'
    }
@@ -82,7 +90,7 @@
      }
    }
    this.setState({modules, innerRules, innertip, setting: _setting, ismain})
    this.setState({modules, innerRules, innertip, setting: _setting, ismain, MenuType})
  }
  handleConfirm = () => {
@@ -181,7 +189,7 @@
  render() {
    const { columns, config } = this.props
    const { getFieldDecorator } = this.props.form
    const { setting, modules, innerRules, innertip } = this.state
    const { setting, modules, innerRules, innertip, MenuType } = this.state
    const formItemLayout = {
      labelCol: {
@@ -349,7 +357,7 @@
            </Col> : null}
            {setting.interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}>
              <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 2 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 22 }} } label={
                <Tooltip placement="topLeft" title={`使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 ''、 @$ -> */ 或 '';查询替换符 $select@ -> /* 或 ''、 @select$ -> */ 或 '';统计替换符 $sum@ -> /* 或 ''、 @sum$ -> */ 或 ''。`}>
                <Tooltip placement="topLeft" title={`使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 ''、 @$ -> */ 或 ''。`}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  数据源
                </Tooltip>
@@ -421,7 +429,7 @@
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {!['navbar', 'balcony', 'menubar'].includes(config.type) && (!config.wrap || config.wrap.supType !== 'multi') ? <Col span={8}>
            {!['navbar', 'balcony', 'menubar'].includes(config.type) && (!config.wrap || config.wrap.supType !== 'multi') && MenuType !== 'billPrint' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'该组件如果受其他组件控制,请选项相应的组件,没有时选“无”。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -535,7 +543,7 @@
                )}
              </Form.Item>
            </Col> : null}
            {config.type === 'interface' && setting.supModule && setting.supModule[0] === 'empty' ? <Col span={8}>
            {config.type === 'interface' && ((setting.supModule && setting.supModule[0] === 'empty') || MenuType === 'billPrint') ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="初始化加载将在页面加载前执行。">
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -552,7 +560,7 @@
                )}
              </Form.Item>
            </Col> : null}
            {config.type === 'interface' ? <Col span={8}>
            {config.type === 'interface' && MenuType !== 'billPrint' ? <Col span={8}>
              <Form.Item label="定时器">
                {getFieldDecorator('timer', {
                  initialValue: setting.timer || ''
src/tabviews/basetable/index.jsx
@@ -341,50 +341,10 @@
              if (cell.eleType === 'button') {
                if (cell.hidden === 'true') return false
          
                cell.logLabel = item.$menuname + '-' + cell.label
                cell.Ot = cell.Ot || 'requiredSgl'
                cell.ContainerId = this.state.ContainerId
                cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
                cell.$menuId = item.uuid
                cell.$MenuID = this.props.MenuID
                cell.$view = 'popview'
                if (cell.syncComponentId) {
                  if (cell.syncComponentId === item.setting.supModule) {
                    cell.syncComponentId = ''
                    if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                      cell.execSuccess = 'mainline'
                    }
                  } else if (cell.syncComponentId === 'multiComponent') {
                    let ids = cell.syncComponents.map(m => {
                      return m.syncComId.pop() || ''
                    })
                    if (item.setting.supModule && ids.includes(item.setting.supModule)) {
                      if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                        cell.execSuccess = 'mainline'
                      }
                      ids = ids.filter(id => id !== item.setting.supModule)
                    }
                    if (ids.length === 0) {
                      cell.syncComponentId = ''
                    } else {
                      cell.syncComponentIds = ids
                    }
                  }
                }
                cell = this.resetButton(item, cell)
                if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
                  cell = this.getPrinter(cell, item.uuid)
                }
                if (cell.controlField) {
                  if (/,/ig.test(cell.controlVal)) {
                    cell.controlVals = cell.controlVal.split(',')
                  } else {
                    cell.controlVals = [(cell.controlVal || '')]
                  }
                }
                return skip || permAction[cell.uuid]
@@ -426,51 +386,12 @@
        item.action = item.action.filter(cell => {
          if (cell.hidden === 'true') return false
          cell.logLabel = item.$menuname + '-' + cell.label
          cell.Ot = cell.Ot || 'requiredSgl'
          cell.ContainerId = this.state.ContainerId
          cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
          cell.$menuId = item.uuid
          cell.$MenuID = this.props.MenuID
          cell.$view = 'popview'
          cell.$toolbtn = true
          cell = this.resetButton(item, cell)
          if (cell.syncComponentId) {
            if (cell.syncComponentId === item.setting.supModule) {
              cell.syncComponentId = ''
              if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                cell.execSuccess = 'mainline'
              }
            } else if (cell.syncComponentId === 'multiComponent') {
              let ids = cell.syncComponents.map(m => {
                return m.syncComId.pop() || ''
              })
              if (item.setting.supModule && ids.includes(item.setting.supModule)) {
                if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                  cell.execSuccess = 'mainline'
                }
                ids = ids.filter(id => id !== item.setting.supModule)
              }
              if (ids.length === 0) {
                cell.syncComponentId = ''
              } else {
                cell.syncComponentIds = ids
              }
            }
          }
          cell.$toolbtn = true
          if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
            cell = this.getPrinter(cell, item.uuid)
          }
          if (cell.controlField) {
            if (/,/ig.test(cell.controlVal)) {
              cell.controlVals = cell.controlVal.split(',')
            } else {
              cell.controlVals = [(cell.controlVal || '')]
            }
          }
          return skip || permAction[cell.uuid]
@@ -479,6 +400,62 @@
      
      return true
    })
  }
  resetButton = (item, cell) => {
    cell.logLabel = item.$menuname + '-' + cell.label
    cell.Ot = cell.Ot || 'requiredSgl'
    cell.ContainerId = this.state.ContainerId
    cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
    cell.$menuId = item.uuid
    cell.$MenuID = this.props.MenuID
    cell.$view = 'popview'
    if (cell.controlField) {
      if (/,/ig.test(cell.controlVal)) {
        cell.controlVals = cell.controlVal.split(',')
      } else {
        cell.controlVals = [(cell.controlVal || '')]
      }
    }
    if (cell.OpenType === 'excelOut') { // 导出
      cell.$menuName = item.name
      if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) {
        cell.errorType = 'error1'
      } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom' && item.setting.interType !== 'system') {
        cell.errorType = 'error2'
      }
    }
    if (cell.syncComponentId) {
      if (cell.syncComponentId === item.setting.supModule) {
        cell.syncComponentId = ''
        if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
          cell.execSuccess = 'mainline'
        }
      } else if (cell.syncComponentId === 'multiComponent') {
        let ids = cell.syncComponents.map(m => {
          return m.syncComId.pop() || ''
        })
        if (item.setting.supModule && ids.includes(item.setting.supModule)) {
          if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
            cell.execSuccess = 'mainline'
          }
          ids = ids.filter(id => id !== item.setting.supModule)
        }
        if (ids.length === 0) {
          cell.syncComponentId = ''
        } else {
          cell.syncComponentIds = ids
        }
      }
    }
    return cell
  }
  getPrinter = (item, parentId) => {
@@ -511,6 +488,7 @@
        return component
      }
      component.setting.arr_field = component.columns.map(col => col.field).join(',')
      component.setting.useMSearch = component.setting.useMSearch === 'true'
      if (component.setting.useMSearch) {
        if (!window.GLOB.SearchBox.has(component.$searchId)) {
src/tabviews/commontable/index.jsx
@@ -45,7 +45,6 @@
    shortcuts: null,      // 快捷键
    actions: null,        // 按钮集
    columns: null,        // 显示列
    arr_field: '',        // 查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -301,6 +300,16 @@
        item.$old = true
        item.ContainerId = this.state.ContainerId
        if (item.OpenType === 'excelOut') { // 导出
          item.$menuName = MenuName
          if (!item.verify || !item.verify.columns || item.verify.columns.length === 0) {
            item.errorType = 'error1'
          } else if (item.intertype === 'system' && item.verify.dataType !== 'custom' && config.setting.interType !== 'system') {
            item.errorType = 'error2'
          }
        }
        if (item.OpenType === 'funcbutton' && item.funcType === 'print' && item.verify) { // 打印机设置
          let _item = window.GLOB.UserCacheMap.get(this.props.MenuID + item.uuid)
@@ -441,6 +450,8 @@
        resetContrl: config.setting.resetContrl,
      }
      config.setting.arr_field = _arrField.join(',')
      this.setState({
        pageSize: config.setting.pageSize || 10,
        loadingview: false,
@@ -453,7 +464,6 @@
        setting: config.setting,
        actions: _actions,
        columns: _columns,
        arr_field: _arrField.join(','),
        BID: param && param.$BID ? param.$BID : '',
        search: Utils.initMainSearch(config.search)
      }, () => {
@@ -556,14 +566,14 @@
   * @description 主表数据加载
   */ 
  async loadmaindata (id) {
    const { setting, arr_field, search, orderBy, BID, pageIndex, pageSize, absFields, autoMatic } = this.state
    const { setting, search, orderBy, BID, pageIndex, pageSize, absFields, autoMatic } = this.state
    this.setState({
      loading: true
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(setting, search, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
@@ -647,14 +657,14 @@
   * @description 获取单行数据
   */ 
  async loadmainLinedata (id) {
    const { setting, arr_field, search, orderBy, BID, pageIndex, pageSize, absFields } = this.state
    const { setting, search, orderBy, BID, pageIndex, pageSize, absFields } = this.state
    this.setState({
      loading: true
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(setting, search, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -846,16 +856,14 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { MenuName, MenuID } = this.props
    const { arr_field, orderBy, search, setting} = this.state
    const { MenuID } = this.props
    const { orderBy, search, setting } = this.state
    if (MenuID !== menuId) return
    callback({
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: search,
      menuName: MenuName
      search: search
    })
  }
src/tabviews/custom/components/calendar/index.jsx
@@ -67,7 +67,6 @@
      BID: BData ? (BData.$BID || '') : '',
      BData: BData,
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(','),
      search: _config.$searches
    })
  }
@@ -208,7 +207,7 @@
  }
  async loadData (type) {
    const { config, arr_field, BID, search, year } = this.state
    const { config, BID, search, year } = this.state
    
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -238,7 +237,7 @@
    })
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 99999, BID, '', year)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 99999, BID, '', year)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/card/balcony/index.jsx
@@ -118,8 +118,7 @@
      syncConfig,
      data: _data,
      BID: BID || '',
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(',')
      config: _config
    })
  }
@@ -339,10 +338,8 @@
    if (config.uuid !== menuId) return
    callback({
      arr_field: '',
      orderBy: '',
      search: [],
      menuName: config.name
    })
  }
@@ -355,7 +352,7 @@
  }
  async loadData (type) {
    const { config, arr_field, BID, BData } = this.state
    const { config, BID, BData } = this.state
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
@@ -384,7 +381,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/card/data-card/index.jsx
@@ -195,8 +195,7 @@
      BData: BData || '',
      config: _config,
      card: _card,
      search: _config.$searches,
      arr_field: _config.columns.map(col => col.field).join(',')
      search: _config.$searches
    })
  }
@@ -682,7 +681,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config, search, orderBy } = this.state
    const { config, search, orderBy } = this.state
    if (config.uuid !== menuId) return
@@ -698,15 +697,13 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: orderBy ||config.setting.order || '',
      search: searches,
      menuName: config.name
      orderBy: orderBy || config.setting.order || '',
      search: searches
    })
  }
  async loadData (id, type) {
    const { config, arr_field, pageIndex, pageSize, search, BID, BData, selected, orderBy } = this.state
    const { config, pageIndex, pageSize, search, BID, BData, selected, orderBy } = this.state
    if (config.setting.supModule && !BID && config.wrap.supKey !== 'false') { // BID 不存在时,不做查询
      this.loaded = true
@@ -754,7 +751,7 @@
    }
    let _orderBy = orderBy || config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -870,7 +867,7 @@
   * @description 获取单行数据
   */ 
  async loadLinedata (id) {
    const { config, arr_field, pageIndex, pageSize, search, BID, BData, orderBy } = this.state
    const { config, pageIndex, pageSize, search, BID, BData, orderBy } = this.state
    let searches = fromJS(search).toJS()
    if (config.setting.useMSearch) { // 主表搜索条件
@@ -888,7 +885,7 @@
    })
    let _orderBy = orderBy || config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -149,6 +149,8 @@
    }
    _config.setting.sub_field = subconfig.columns.map(col => col.field).join(',')
    _config.setting.all_field = _config.setting.arr_field + ',' + _config.setting.sub_field
    let pageOptions = ['10', '25', '50', '100', '500', '1000']
    if (!_config.setting.laypage) {
@@ -189,8 +191,7 @@
      subconfig: subconfig,
      wrapStyle: wrapStyle,
      card: _card,
      search: _config.$searches,
      arr_field: _config.columns.map(col => col.field).join(',')
      search: _config.$searches
    })
  }
@@ -523,7 +524,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config, search, orderBy } = this.state
    const { config, search, orderBy } = this.state
    if (config.uuid !== menuId) return
@@ -539,15 +540,13 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: orderBy || config.setting.order || '',
      search: searches,
      menuName: config.name
      search: searches
    })
  }
  async loadData (id, type) {
    const { config, arr_field, pageIndex, pageSize, search, BID, BData, selected, card, orderBy } = this.state
    const { config, pageIndex, pageSize, search, BID, BData, selected, card, orderBy } = this.state
    if (config.setting.supModule && !BID && config.wrap.supKey !== 'false') { // BID 不存在时,不做查询
      this.loaded = true
@@ -598,7 +597,7 @@
    }
    let _orderBy = orderBy || config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -771,7 +770,7 @@
   * @description 获取单行数据
   */ 
  async loadLinedata (id) {
    const { config, arr_field, pageIndex, pageSize, search, BID, BData, orderBy } = this.state
    const { config, pageIndex, pageSize, search, BID, BData, orderBy } = this.state
    let searches = fromJS(search).toJS()
    if (config.setting.useMSearch) { // 主表搜索条件
@@ -789,7 +788,7 @@
    })
    let _orderBy = orderBy || config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -47,7 +47,7 @@
    if (BData) {
      BID = BData.$BID || ''
    }
    if (_config.wrap.datatype === 'dynamic') {
      _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true'
@@ -118,8 +118,7 @@
      data: _data,
      BID: BID || '',
      BData: BData || '',
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(',')
      config: _config
    })
  }
@@ -472,10 +471,8 @@
    }
    callback({
      arr_field: '',
      orderBy: '',
      search: searches,
      menuName: config.name
      search: searches
    })
  }
@@ -488,7 +485,7 @@
  }
  async loadData (type, btn) {
    const { config, arr_field, BID, BData, selected } = this.state
    const { config, BID, BData, selected } = this.state
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
@@ -528,7 +525,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/card/table-card/index.jsx
@@ -99,8 +99,7 @@
      BData: BData || '',
      data: _data,
      config: _config,
      search: _config.$searches,
      arr_field: _config.columns.map(col => col.field).join(',')
      search: _config.$searches
    })
  }
@@ -308,7 +307,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config, search } = this.state
    const { config, search } = this.state
    if (config.uuid !== menuId) return
@@ -324,15 +323,13 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: config.setting.order || '',
      search: searches,
      menuName: config.name
      search: searches
    })
  }
  async loadData (type) {
    const { config, arr_field, pageIndex, search, BID, BData } = this.state
    const { config, pageIndex, search, BID, BData } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -366,7 +363,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, pageIndex, config.setting.pageSize, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -94,8 +94,7 @@
      BID: BID || '',
      BData: BData || '',
      config: _config,
      card: _card,
      arr_field: _config.columns.map(col => col.field).join(',')
      card: _card
    })
  }
@@ -305,7 +304,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config } = this.state
    const { config } = this.state
    if (config.uuid !== menuId) return
@@ -315,15 +314,13 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: config.setting.order || '',
      search: searches,
      menuName: config.name
      search: searches
    })
  }
  async loadData (type) {
    const { config, arr_field, BID, BData } = this.state
    const { config, BID, BData } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -351,7 +348,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, '', '', BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -90,8 +90,7 @@
      data: _data,
      BID: BID || '',
      BData: BData || '',
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(',')
      config: _config
    })
  }
@@ -303,10 +302,8 @@
    }
    callback({
      arr_field: '',
      orderBy: '',
      search: searches,
      menuName: config.name
      search: searches
    })
  }
@@ -319,7 +316,7 @@
  }
  async loadData (type) {
    const { config, arr_field, BID, BData } = this.state
    const { config, BID, BData } = this.state
    if (config.wrap.datatype === 'static') {
      this.setState({
@@ -351,7 +348,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/chart/antv-G6/index.jsx
@@ -805,7 +805,6 @@
    BID: '',
    BData: '',
    plot: null,
    arr_field : '',
    chartId: Utils.getuuid(),
    empty: true
  }
@@ -860,7 +859,6 @@
      config: _config,
      BID: BID || '',
      BData: BData || '',
      arr_field: _config.columns.map(col => col.field).join(','),
      plot: _config.plot
    })
    
@@ -1126,7 +1124,7 @@
  }
  async loadData (type) {
    const { config, arr_field, BID } = this.state
    const { config, BID } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      if (!is(fromJS(this.data), fromJS([]))) {
@@ -1151,7 +1149,7 @@
    })
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, '', '', BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -344,7 +344,6 @@
      BID: BID || '',
      vFields: vFields,
      vstFields: vstFields,
      arr_field: _config.columns.map(col => col.field).join(','),
      plot: _config.plot,
      search: _config.$searches,
      transfield
@@ -518,7 +517,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config, search } = this.state
    const { config, search } = this.state
    if (config.uuid !== menuId) return
@@ -534,7 +533,6 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: config.setting.order || '',
      search: searches,
      menuName: config.name
@@ -545,7 +543,7 @@
   * @description 数据加载
   */
  async loadData (type) {
    const { config, arr_field, BID, search } = this.state
    const { config, BID, search } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      if (!is(fromJS(this.data), fromJS([]))) {
@@ -578,7 +576,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, '', '', BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -120,7 +120,6 @@
    this.setState({
      config: _config,
      BID: BID || '',
      arr_field: _config.columns.map(col => col.field).join(','),
      plot: _config.plot
    })
  }
@@ -301,7 +300,7 @@
  }
  async loadData (type) {
    const { config, arr_field, BID } = this.state
    const { config, BID } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      let _data = null
@@ -336,7 +335,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, '', '', BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -90,7 +90,6 @@
    this.setState({
      config: _config,
      BID: BID || '',
      arr_field: _config.columns.map(col => col.field).join(','),
      plot: _config.plot,
      title: config.plot.title,
      search: _config.$searches
@@ -260,7 +259,7 @@
  }
  async loadData (type) {
    const { config, arr_field, search, BID } = this.state
    const { config, search, BID } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      if (!is(fromJS(this.data), fromJS([]))) {
@@ -293,7 +292,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, '', '', BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -83,7 +83,6 @@
      config: _config,
      BID: BID || '',
      empty: this.data.length === 0,
      arr_field: _config.columns.map(col => col.field).join(','),
      plot: _config.plot,
      search: _config.$searches
    })
@@ -262,7 +261,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config, search } = this.state
    const { config, search } = this.state
    if (config.uuid !== menuId) return
@@ -278,10 +277,8 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: config.setting.order || '',
      search: searches,
      menuName: config.name
      search: searches
    })
  }
@@ -289,7 +286,7 @@
   * @description 数据加载
   */
  async loadData (type) {
    const { config, arr_field, BID, search } = this.state
    const { config, BID, search } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({ empty: true })
@@ -325,7 +322,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, '', '', BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/chart/custom-chart/index.jsx
@@ -72,7 +72,6 @@
      config: _config,
      empty: this.data.length === 0,
      BID: BID || '',
      arr_field: _config.columns.map(col => col.field).join(','),
      plot: _config.plot,
      search: _config.$searches
    })
@@ -253,7 +252,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config, search } = this.state
    const { config, search } = this.state
    if (config.uuid !== menuId) return
@@ -269,10 +268,8 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: config.setting.order || '',
      search: searches,
      menuName: config.name
      search: searches
    })
  }
@@ -280,7 +277,7 @@
   * @description 数据加载
   */
  async loadData (type) {
    const { config, arr_field, BID, search } = this.state
    const { config, BID, search } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -318,7 +315,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, '', '', BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/code/sand-box/index.jsx
@@ -72,8 +72,7 @@
    this.setState({
      data: _data,
      BID: BID || '',
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(',')
      config: _config
    })
  }
@@ -205,7 +204,7 @@
  }
  async loadData (type) {
    const { config, arr_field, BID } = this.state
    const { config, BID } = this.state
    if (config.wrap.datatype === 'static') {
      this.setState({
@@ -236,7 +235,7 @@
    })
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/editor/braft-editor/index.jsx
@@ -63,7 +63,6 @@
      data: _data,
      BID: BID || '',
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(','),
    })
  }
@@ -168,7 +167,7 @@
  }
  async loadData () {
    const { config, arr_field, BID } = this.state
    const { config, BID } = this.state
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
@@ -203,7 +202,7 @@
    })
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/form/simple-form/index.jsx
@@ -74,8 +74,7 @@
      group: _group,
      BID: BID || '',
      BData: BData || '',
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(',')
      config: _config
    })
  }
@@ -223,7 +222,7 @@
  }
  async loadData () {
    const { config, arr_field, BID } = this.state
    const { config, BID } = this.state
    if (config.wrap.datatype === 'static') {
      this.setState({
@@ -254,7 +253,7 @@
    })
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/form/step-form/index.jsx
@@ -114,8 +114,7 @@
      step: _group.sort - 1,
      BID: BID || '',
      BData: BData || '',
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(',')
      config: _config
    })
  }
@@ -283,7 +282,7 @@
  }
  async loadData (type) {
    const { config, arr_field, BID } = this.state
    const { config, BID } = this.state
    if (config.wrap.datatype === 'static') {
      this.setState({
@@ -314,7 +313,7 @@
    })
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -88,8 +88,7 @@
      group: _config.subcards[0],
      BID: BID || '',
      BData: BData || '',
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(',')
      config: _config
    })
  }
@@ -236,7 +235,7 @@
  }
  async loadData () {
    const { config, arr_field, BID } = this.state
    const { config, BID } = this.state
    if (config.wrap.datatype === 'static') {
      this.setState({
@@ -267,7 +266,7 @@
    })
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/iframe/index.jsx
@@ -69,8 +69,7 @@
      linkUrl: linkUrl,
      data: _data,
      BID: BID || '',
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(',')
      config: _config
    })
  }
@@ -174,7 +173,7 @@
  }
  async loadData () {
    const { config, arr_field, BID } = this.state
    const { config, BID } = this.state
    
    if (config.wrap.datatype === 'static') {
      this.setState({
@@ -198,7 +197,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/interfaces/interItem/index.jsx
@@ -110,7 +110,7 @@
    this.loading = true
    let param = UtilsDM.getQueryDataParams(config.setting, config.columns.map(col => col.field).join(','), [], config.setting.order, 1, 1, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, [], config.setting.order, 1, 1, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/table/base-table/index.jsx
@@ -25,7 +25,6 @@
    config: {},           // 页面配置信息,包括按钮、搜索、显示列、标签等
    actions: null,        // 按钮集
    columns: null,        // 显示列
    arr_field: '',        // 查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -82,7 +81,6 @@
      setting: setting,
      actions: _config.action,
      columns: _config.cols,
      arr_field: _config.columns.map(col => col.field).join(','),
      search: _config.$searches
    }, () => {
      if (_config.setting.onload === 'true') {
@@ -100,7 +98,7 @@
   * @param { String }  repage 表格是否重置页码
   */
  async loadmaindata (reset, repage, id) {
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    const { setting, config, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    if (setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -137,7 +135,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -264,7 +262,7 @@
   * @description 获取单行数据
   */ 
  async loadmainLinedata (id) {
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    const { setting, config, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    let searches = fromJS(search).toJS()
    if (config.setting.useMSearch) { // 主表搜索条件
@@ -282,7 +280,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -513,7 +511,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config, orderBy, search, setting} = this.state
    const { config, orderBy, search, setting } = this.state
    if (config.uuid !== menuId) return
@@ -529,10 +527,8 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: searches,
      menuName: config.name
      search: searches
    })
  }
src/tabviews/custom/components/table/edit-table/index.jsx
@@ -27,7 +27,6 @@
    config: {},           // 页面配置信息,包括按钮、搜索、显示列、标签等
    actions: null,        // 按钮集
    columns: null,        // 显示列
    arr_field: '',        // 查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -173,7 +172,6 @@
      setting: setting,
      actions: _config.action,
      columns: _columns,
      arr_field: _config.columns.map(col => col.field).join(','),
      search: _config.$searches
    }, () => {
      if (_config.setting.onload === 'true') {
@@ -190,7 +188,7 @@
   * @param { String }  repage 表格是否重置页码
   */
  async loadmaindata (reset, repage) {
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    const { setting, config, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    if (setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -222,7 +220,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -303,7 +301,7 @@
   * @description 获取单行数据
   */ 
  async loadmainLinedata (id) {
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    const { setting, config, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    let searches = fromJS(search).toJS()
    if (config.setting.useMSearch) { // 主表搜索条件
@@ -321,7 +319,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -440,7 +438,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config, orderBy, search, setting} = this.state
    const { config, orderBy, search, setting } = this.state
    if (config.uuid !== menuId) return
@@ -456,10 +454,8 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: searches,
      menuName: config.name
      search: searches
    })
  }
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -29,7 +29,6 @@
    config: {},           // 页面配置信息,包括按钮、搜索、显示列、标签等
    actions: null,        // 按钮集
    columns: null,        // 显示列
    arr_field: '',        // 查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -149,7 +148,6 @@
      setting: setting,
      actions: _config.action,
      columns: _config.cols,
      arr_field: _config.columns.map(col => col.field).join(','),
      search: _config.$searches
    })
  }
@@ -354,7 +352,7 @@
   * @param { String }  repage 表格是否重置页码
   */
  async loadmaindata (reset, repage, id, type) {
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    const { setting, config, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    if (setting.supModule && !BID && setting.supKey !== 'false') { // BID 不存在时,不做查询
      this.setState({
@@ -395,7 +393,7 @@
    }
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -524,7 +522,7 @@
   * @description 获取单行数据
   */ 
  async loadmainLinedata (id) {
    const { setting, config, arr_field, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    const { setting, config, search, orderBy, BID, pageIndex, pageSize, BData } = this.state
    let searches = fromJS(search).toJS()
    if (config.setting.useMSearch) { // 主表搜索条件
@@ -542,7 +540,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -762,7 +760,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config, orderBy, search, setting} = this.state
    const { config, orderBy, search, setting} = this.state
    if (config.uuid !== menuId) return
@@ -778,10 +776,8 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: searches,
      menuName: config.name
      search: searches
    })
  }
src/tabviews/custom/components/timeline/normal-timeline/index.jsx
@@ -99,7 +99,6 @@
      BData: BData || '',
      data: _data,
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(',')
    })
  }
@@ -300,7 +299,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config } = this.state
    const { config } = this.state
    if (config.uuid !== menuId) return
@@ -310,15 +309,13 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: config.setting.order || '',
      search: searches,
      menuName: config.name
      search: searches
    })
  }
  async loadData (type) {
    const { config, arr_field, BID, BData } = this.state
    const { config, BID, BData } = this.state
    
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -350,7 +347,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, config.setting.pageSize, BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, config.setting.pageSize, BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/components/tree/antd-tree/index.jsx
@@ -77,8 +77,7 @@
      selected: _config.wrap.selected === 'true',
      config: _config,
      data: _data,
      BID: BID || '',
      arr_field: _config.columns.map(col => col.field).join(',')
      BID: BID || ''
    })
  }
@@ -234,7 +233,7 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { arr_field, config } = this.state
    const { config } = this.state
    if (config.uuid !== menuId) return
@@ -244,10 +243,8 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: config.setting.order || '',
      search: searches,
      menuName: config.name
      search: searches
    })
  }
@@ -273,7 +270,7 @@
   * @description 数据加载
   */
  async loadData (type) {
    const { config, arr_field, BID } = this.state
    const { config, BID } = this.state
    if (config.setting.supModule && !BID) { // BID 不存在时,不做查询
      this.setState({
@@ -301,7 +298,7 @@
    }
    let _orderBy = config.setting.order || ''
    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID)
    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, '', '', BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/custom/index.jsx
@@ -50,7 +50,6 @@
class CustomPage extends Component {
  static propTpyes = {
    param: PropTypes.any,        // 其他页面传递的参数
    Tab: PropTypes.string,       // 弹窗标签
    MenuID: PropTypes.string,    // 菜单Id
    MenuName: PropTypes.string,  // 菜单名称
    changeTemp: PropTypes.func
@@ -189,19 +188,13 @@
        })
      }
      let popview = 'CustomPage'
      if (config.version === 2.0) {
        popview = 'popview'
      }
      config.$cache = config.cacheLocal === 'true'
      config.$time = config.localCacheTime || 0
      let initInters = []
      config.interfaces = this.formatInterSetting(config.interfaces, regs, MenuID, initInters)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID, config.interfaces, popview, config.$cache, config.$time, config.MenuName, MenuID, MenuID)
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID, config.interfaces, config.$cache, config.$time, config.MenuName, MenuID, MenuID)
      let params = []
      let BID = param.$BID || ''
@@ -278,9 +271,7 @@
          this.loadmaindata(params)
        }
        if (!this.props.Tab) {
          this.setShortcut()
        }
        this.setShortcut()
      })
    } else {
      this.setState({
@@ -334,7 +325,7 @@
    }
  }
  filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, time, MenuName, searchId, syncId) => {
  filterComponent = (components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId) => {
    return components.filter(item => {
      item.$pageId = pageId
      item.$cache = cache
@@ -441,7 +432,7 @@
            _searchId = tab.uuid
          }
          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, time, MenuName, _searchId, tab.uuid)
          tab.components = this.filterComponent(tab.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, _searchId, tab.uuid)
          
          if (_searchId === tab.uuid) {
            tab.components.forEach(cell => {
@@ -465,7 +456,7 @@
          return false
        }
        item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, popview, cache, time, MenuName, searchId, syncId)
        item.components = this.filterComponent(item.components, roleId, permAction, balMap, skip, urlparam, pageId, interfaces, cache, time, MenuName, searchId, syncId)
        return true
      } else if (['pie', 'bar', 'line', 'dashboard', 'scatter', 'chart', 'antvG6', 'antvX6'].includes(item.type)) {
@@ -526,7 +517,7 @@
        item.action = item.action.filter(cell => {
          if (cell.hidden === 'true') return false
          cell = this.resetButton(item, cell, popview)
          cell = this.resetButton(item, cell)
          cell.$toolbtn = true
@@ -574,7 +565,7 @@
                if (cell.eleType === 'button') {
                  if (cell.hidden === 'true') return false
                  cell = this.resetButton(item, cell, popview)
                  cell = this.resetButton(item, cell)
                  if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
                    cell = this.getPrinter(cell, item.uuid)
@@ -631,7 +622,7 @@
            if (cell.eleType === 'button') {
              if (cell.hidden === 'true') return false
              cell = this.resetButton(item, cell, popview)
              cell = this.resetButton(item, cell)
              if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
                cell = this.getPrinter(cell, item.uuid)
@@ -673,7 +664,7 @@
            if (cell.eleType === 'button') {
              if (cell.hidden === 'true') return false
              cell = this.resetButton(item, cell, popview)
              cell = this.resetButton(item, cell)
              if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
                cell = this.getPrinter(cell, item.uuid)
@@ -697,7 +688,7 @@
          if (cell.eleType === 'button') {
            if (cell.hidden === 'true') return false
            cell = this.resetButton(item, cell, popview)
            cell = this.resetButton(item, cell)
            if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
              cell = this.getPrinter(cell, item.uuid)
@@ -801,14 +792,14 @@
    })
  }
  resetButton = (item, cell, popview) => {
  resetButton = (item, cell) => {
    cell.logLabel = item.$menuname + '-' + cell.label
    cell.Ot = cell.Ot || 'requiredSgl'
    cell.ContainerId = this.state.ContainerId
    cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : ''
    cell.$menuId = item.uuid
    cell.$MenuID = this.props.MenuID
    cell.$view = popview
    cell.$view = 'popview'
    if (cell.btnstyle) { // 兼容
      cell.style = cell.style || {}
@@ -820,6 +811,20 @@
        cell.controlVals = cell.controlVal.split(',')
      } else {
        cell.controlVals = [(cell.controlVal || '')]
      }
    }
    if (cell.OpenType === 'excelOut') { // 导出
      cell.$menuName = item.name
      if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) {
        cell.errorType = 'error1'
      } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom') {
        if (item.setting.interType !== 'system') {
          cell.errorType = 'error2'
        } else if (item.type === 'balcony' || item.subtype === 'propcard') {
          cell.errorType = 'error2'
        }
      }
    }
@@ -937,6 +942,7 @@
        return component
      }
      component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : ''
      component.setting.useMSearch = component.setting.useMSearch === 'true'
      if (component.setting.useMSearch) {
        if (!window.GLOB.SearchBox.has(component.$searchId)) {
@@ -957,9 +963,15 @@
      }
      let _customScript = ''
      let _tailScript = ''
      component.scripts && component.scripts.forEach(script => {
        if (script.status !== 'false') {
        if (script.status === 'false') return
        if (script.position !== 'back') {
          _customScript += `
          ${script.sql}
          `
        } else {
          _tailScript += `
          ${script.sql}
          `
        }
@@ -979,17 +991,21 @@
      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     // 后置自定义脚本
      if (component.setting.laypage) {
        component.setting.custompage = /@pageSize@/i.test(component.setting.dataresource + component.setting.customScript)
@@ -1077,12 +1093,20 @@
        inter.setting.onload = 'false'
      }
      inter.setting.arr_field = inter.columns.map(col => col.field).join(',')
      if (inter.setting.interType !== 'system') return inter
      let _customScript = ''
      let _tailScript = ''
      inter.scripts.forEach(script => {
        if (script.status !== 'false') {
        if (script.status === 'false') return
        if (script.position !== 'back') {
          _customScript += `
          ${script.sql}
          `
        } else {
          _tailScript += `
          ${script.sql}
          `
        }
@@ -1103,17 +1127,21 @@
      if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
        inter.setting.dataresource = inter.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 {
        inter.setting.dataresource = inter.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _tailScript = _tailScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
      }
      regs.forEach(cell => {
        inter.setting.dataresource = inter.setting.dataresource.replace(cell.reg, cell.value)
        _customScript = _customScript.replace(cell.reg, cell.value)
        _tailScript = _tailScript.replace(cell.reg, cell.value)
      })
      inter.setting.customScript = _customScript // 整理后自定义脚本
      inter.setting.tailScript = _tailScript     // 后置自定义脚本
      return inter
    })
@@ -1201,9 +1229,9 @@
  }
  resetActiveMenu = (menuId) => {
    const { MenuID, Tab } = this.props
    const { MenuID } = this.props
    if (MenuID !== menuId || Tab) return
    if (MenuID !== menuId) return
    this.setShortcut()
  }
src/tabviews/custom/popview/index.jsx
@@ -604,6 +604,20 @@
      }
    }
    if (cell.OpenType === 'excelOut') { // 导出
      cell.$menuName = item.name
      if (!cell.verify || !cell.verify.columns || cell.verify.columns.length === 0) {
        cell.errorType = 'error1'
      } else if (cell.intertype === 'system' && cell.verify.dataType !== 'custom') {
        if (item.setting.interType !== 'system') {
          cell.errorType = 'error2'
        } else if (item.type === 'balcony' || item.subtype === 'propcard') {
          cell.errorType = 'error2'
        }
      }
    }
    if (cell.syncComponentId) {
      if (cell.syncComponentId === item.setting.supModule) {
        cell.syncComponentId = ''
@@ -717,6 +731,7 @@
        return component
      }
      component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : ''
      component.setting.useMSearch = component.setting.useMSearch === 'true'
      if (component.setting.useMSearch) {
        if (!window.GLOB.SearchBox.has(component.$searchId)) {
src/tabviews/debugtable/index.jsx
@@ -27,22 +27,22 @@
      interType: 'system',
      execute: true,
      laypage: true,
      dataresource: '(select * from s_debug_value_log where createuserid=@userid@) tb'
    },
    arr_field: 'ID,Sort,CDefine1,CDefine2,CDefine3,CDefine4,CDefine5,CDefine6,CDefine7,createdate'
      dataresource: '(select * from s_debug_value_log where createuserid=@userid@) tb',
      arr_field: 'ID,Sort,CDefine1,CDefine2,CDefine3,CDefine4,CDefine5,CDefine6,CDefine7,createdate'
    }
  }
  /**
   * @description 子表数据加载
   */
  async loadmaindata () {
    const { setting, arr_field } = this.state
    const { setting } = this.state
    this.setState({
      loading: true
    })
    let param = UtilsDM.getQueryDataParams(setting, arr_field, [], 'sort', 1, 50, '')
    let param = UtilsDM.getQueryDataParams(setting, [], 'sort', 1, 50, '')
    let result = await Api.genericInterface(param)
src/tabviews/subtable/index.jsx
@@ -39,7 +39,6 @@
    config: null,         // 页面配置信息,包括按钮、搜索、显示列、标签等
    actions: null,        // 按钮集
    columns: null,        // 显示列
    arr_field: '',        // 查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -229,6 +228,16 @@
        item.$menuId = this.props.MenuID
        item.$old = true
        if (item.OpenType === 'excelOut') { // 导出
          item.$menuName = Tab.label
          if (!item.verify || !item.verify.columns || item.verify.columns.length === 0) {
            item.errorType = 'error1'
          } else if (item.intertype === 'system' && item.verify.dataType !== 'custom' && config.setting.interType !== 'system') {
            item.errorType = 'error2'
          }
        }
        if (item.OpenType === 'funcbutton' && item.funcType === 'print' && item.verify) { // 打印机设置
          let _item = window.GLOB.UserCacheMap.get(Tab.uuid + item.uuid)
@@ -343,6 +352,8 @@
        resetContrl: config.setting.resetContrl,
      }
      config.setting.arr_field = _arrField.join(',')
      this.setState({
        pageSize: config.setting.pageSize || 10,
        BID: this.props.BID || '',
@@ -355,7 +366,6 @@
        setting: config.setting,
        actions: _actions,
        columns: _columns,
        arr_field: _arrField.join(','),
        search: Utils.initMainSearch(config.search)
      }, () => {
        if (config.setting.onload !== 'false' && (!Tab.supMenu || this.props.BID || Tab.isTreeNode)) { // 初始化可加载
@@ -429,7 +439,7 @@
   */
  async loadmaindata (id) {
    const { mainSearch } = this.props
    const { setting, BID, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { setting, BID, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
@@ -441,7 +451,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
@@ -515,7 +525,7 @@
   */ 
  async loadmainLinedata (id) {
    const { mainSearch } = this.props
    const { setting, BID, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { setting, BID, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
@@ -527,7 +537,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -687,8 +697,8 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { Tab, mainSearch, MenuID } = this.props
    const { arr_field, orderBy, search, setting} = this.state
    const { mainSearch, MenuID } = this.props
    const { orderBy, search, setting} = this.state
    if (MenuID !== menuId) return
@@ -698,10 +708,8 @@
    }
    callback({
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: searches,
      menuName: Tab.label
      search: searches
    })
  }
src/tabviews/subtabtable/index.jsx
@@ -34,7 +34,6 @@
    config: null,         // 页面配置信息,包括按钮、搜索、显示列、标签等
    actions: null,        // 按钮集
    columns: null,        // 显示列
    arr_field: '',        // 查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -201,6 +200,16 @@
        if (item.OpenType === 'popview') return
        if (item.OpenType === 'excelOut') { // 导出
          item.$menuName = Tab.label
          if (!item.verify || !item.verify.columns || item.verify.columns.length === 0) {
            item.errorType = 'error1'
          } else if (item.intertype === 'system' && item.verify.dataType !== 'custom' && config.setting.interType !== 'system') {
            item.errorType = 'error2'
          }
        }
        if (item.controlField) {
          if (/,/ig.test(item.controlVal)) {
            item.controlVals = item.controlVal.split(',')
@@ -300,6 +309,8 @@
        resetContrl: config.setting.resetContrl,
      }
      config.setting.arr_field = _arrField.join(',')
      this.setState({
        pageSize: config.setting.pageSize || 10,
        loadingview: false,
@@ -309,7 +320,6 @@
        setting: config.setting,
        actions: _actions,
        columns: _columns,
        arr_field: _arrField.join(','),
        search: Utils.initMainSearch(config.search), // 搜索条件初始化(含有时间格式,需要转化)
      }, () => {
        if (config.setting.onload !== 'false') { // 初始化可加载
@@ -365,7 +375,7 @@
   */
  async loadmaindata (id) {
    const { BID } = this.props
    const { setting, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { setting, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
@@ -374,7 +384,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
@@ -490,7 +500,7 @@
   */ 
  async loadmainLinedata (id) {
    const { BID } = this.props
    const { setting, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { setting, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
@@ -499,7 +509,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -623,16 +633,14 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { Tab, MenuID } = this.props
    const { arr_field, orderBy, search, setting} = this.state
    const { MenuID } = this.props
    const { orderBy, search, setting} = this.state
    if (MenuID !== menuId) return
    callback({
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: search,
      menuName: Tab.label
      search: search
    })
  }
src/tabviews/treepage/index.jsx
@@ -186,6 +186,8 @@
        })
      }
      config.setting.arr_field = `${config.setting.valueField},${config.setting.labelField},${config.setting.parentField}`
      this.setState({
        BID: param && param.$BID ? param.$BID : '',
        loadingview: false,
@@ -261,8 +263,7 @@
      loading: true
    })
    let arr_field = `${setting.valueField},${setting.labelField},${setting.parentField}`
    let param = UtilsDM.getQueryDataParams(setting, arr_field, [], setting.order, '', '', BID)
    let param = UtilsDM.getQueryDataParams(setting, [], setting.order, '', '', BID)
    let result = await Api.genericInterface(param)
    if (result.status) {
src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -7,6 +7,7 @@
import Utils from '@/utils/utils.js'
import Api from '@/api'
import UtilsDM from '@/utils/utils-datamanage.js'
import MKEmitter from '@/utils/events.js'
import MkIcon from '@/components/mk-icon'
// import './index.scss'
@@ -18,13 +19,10 @@
    selectedData: PropTypes.any,      // 子表中选择数据
    btn: PropTypes.object,            // 按钮
    setting: PropTypes.any,           // 页面通用设置
    updateStatus: PropTypes.func,     // 按钮状态更新
    disabled: PropTypes.any,          // 行按钮禁用
  }
  state = {
    excelName: '',  // 文件名
    search: '',     // 搜索条件
    loading: false, // 导出中
    hidden: false,
    disabled: false
@@ -88,22 +86,6 @@
    }
    MKEmitter.removeListener('triggerBtnId', this.actionTrigger)
  }
  /**
   * @description 按钮状态改变
   */
  updateStatus = (type, name) => {
    if (type === 'start') {
      this.setState({
        loading: true,
        excelName: name
      })
    } else if (type === 'over') {
      this.setState({
        loading: false
      })
    }
  }
  
  /**
   * @description 触发按钮操作
@@ -126,17 +108,17 @@
      return
    }
    if (!btn.verify || !btn.verify.columns || btn.verify.columns.length === 0) {
    if (btn.errorType === 'error1') {
      notification.warning({
        top: 92,
        message: '请设置导出列!',
        duration: 5
      })
      return
    } else if (btn.intertype === 'system' && setting.interType !== 'system' && btn.verify.dataType !== 'custom') {
    } else if (btn.errorType === 'error2') {
      notification.warning({
        top: 92,
        message: '导出按钮配置错误!',
        message: '按钮需自定义导出数据源!',
        duration: 5
      })
      return
@@ -154,10 +136,11 @@
  triggerExcelout = (viewParam) => {
    const { btn } = this.props
    let name = `${viewParam.menuName}${moment().format('YYYYMMDDHHmmss')}.xlsx`
    let pageSize = 1000
    if (((btn.intertype === 'system' && btn.verify.dataType === 'custom' && btn.verify.useSearch === 'true') || btn.intertype !== 'system' || btn.verify.dataType !== 'custom') && btn.search === 'true' && viewParam.search && viewParam.search.length > 0) {
    if (btn.intertype === 'system' && btn.verify.dataType === 'custom' && btn.verify.useSearch === 'false') {
      viewParam.search = []
    } else if (((btn.intertype === 'system' && btn.verify.dataType === 'custom' && btn.verify.useSearch === 'true') || btn.intertype !== 'system' || btn.verify.dataType !== 'custom') && btn.search === 'true' && viewParam.search && viewParam.search.length > 0) {
      let valid = false
      viewParam.search.forEach(item => {
        if (item.value || item.value === 0) {
@@ -175,40 +158,13 @@
      }
    }
    if (btn.intertype === 'system') { // 使用系统函数
      if (btn.verify.dataType !== 'custom' && !viewParam.arr_field) {
        notification.warning({
          top: 92,
          message: '按钮需自定义导出数据!',
          duration: 5
        })
        return
      } else if (btn.verify.dataType === 'custom') {
        viewParam.arr_field = []
        btn.verify.columns.forEach(col => {
          if (col.Column && col.Column !== '$Index') {
            viewParam.arr_field.push(col.Column)
          }
        })
        viewParam.arr_field = viewParam.arr_field.join(',')
        viewParam.orderBy = btn.verify.order || ''
      }
    }
    if (btn.intertype === 'system' && btn.verify.enable === 'true') {
      this.setState({search: fromJS(viewParam.search).toJS()})
    }
    if (btn.intertype === 'system' && btn.verify.dataType === 'custom' && btn.verify.useSearch === 'false') {
      viewParam.search = []
    }
    viewParam.orderBy = viewParam.orderBy || viewParam.arr_field.split(',')[0]
    this.updateStatus('start', name)
    this.setState({
      loading: true
    })
    if (btn.pagination !== 'true') {
      if (btn.intertype === 'system') { // 使用系统函数
        let param = this.getExcelDefaultParam(viewParam.arr_field, viewParam.orderBy, viewParam.search)
        let param = this.getExcelDefaultParam(viewParam.orderBy, viewParam.search)
        Api.genericInterface(param).then(result => {
          if (result.status) {
@@ -358,7 +314,9 @@
          message: '导出按钮设置错误!',
          duration: 5
        })
        this.updateStatus('over')
        this.setState({
          loading: false
        })
      }
    } else if (btn.intertype === 'outer' && btn.innerFunc) { // 分页,且两步请求
      this.getExcelOutDoubleData(viewParam, 1, pageSize, [])
@@ -457,12 +415,7 @@
    const { btn } = this.props
    let param = null
    if (btn.intertype === 'system') { // 使用系统函数
      if (!viewParam.arr_field) {
        this.execError({ErrCode: 'N', message: '未设置显示列!'})
        return
      }
      param = this.getExcelDefaultParam(viewParam.arr_field, viewParam.orderBy, viewParam.search, true, pageIndex, pageSize)
      param = this.getExcelDefaultParam(viewParam.orderBy, viewParam.search, true, pageIndex, pageSize)
    } else if (btn.intertype === 'inner') { // 使用内部函数
      param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search, true, pageIndex, pageSize)
      param.func = btn.innerFunc
@@ -618,13 +571,9 @@
          table.push(_row)
        })
        this.table2excel(column, table, this.state.excelName.replace(/\.xlsx/ig, '.xls'))
        this.table2excel(column, table)
        if (btn.verify.enable === 'true' && btn.verify.script) {
          this.execCustomScript()
        } else {
          this.execSuccess({ErrCode: 'S', message: '导出成功!'})
        }
        this.execSuccess({ErrCode: 'S', message: '导出成功!'})
      } else {
        let letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
        let cols = []
@@ -759,20 +708,16 @@
        const wb = XLSX.utils.book_new()
        XLSX.utils.book_append_sheet(wb, ws, btn.verify.sheet || 'Sheet1')
  
        XLSX.writeFile(wb, this.state.excelName)
        XLSX.writeFile(wb, `${btn.$menuName || ''}${moment().format('YYYYMMDDHHmmss')}.xlsx`)
  
        if (btn.verify.enable === 'true' && btn.verify.script) {
          this.execCustomScript()
        } else {
          this.execSuccess({ErrCode: 'S', message: '导出成功!'})
        }
        this.execSuccess({ErrCode: 'S', message: '导出成功!'})
      }
    } catch (e) {
      this.execError({ErrCode: 'N', message: 'Excel生成失败!'})
    }
  }
  table2excel = (column, data, excelName) => {
  table2excel = (column, data) => {
    let thead = column.reduce((result, item) => {
      return result + `<th>${item.title}</th>`
    }, '')
@@ -806,71 +751,10 @@
    // let url = 'data:application/vnd.ms-excel;base64,' + window.btoa(unescape(encodeURIComponent(html)))
    let link = document.createElement('a')
    link.href = url
    link.download = excelName
    link.download = `${this.props.btn.$menuName || ''}${moment().format('YYYYMMDDHHmmss')}.xls`
    document.body.appendChild(link)
    link.click()
    document.body.removeChild(link)
  }
  /**
   * @description 执行自定义脚本
   */
  execCustomScript = () => {
    const { btn } = this.props
    const { search } = this.state
    let script = btn.verify.script
    if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
      script = script.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
    } else {
      script = script.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
    }
    let allSearch = Utils.getAllSearchOptions(search)
    let regoptions = allSearch.map(item => {
      return {
        reg: new RegExp('@' + item.key + '@', 'ig'),
        value: `'${item.value}'`
      }
    })
    regoptions.forEach(item => {
      script = script.replace(item.reg, item.value)
    })
    let param = {
      func: 'sPC_TableData_InUpDe',
      menuname: btn.logLabel
    }
    if (this.props.BID) {
      param.BID = this.props.BID
    }
    param.exec_type = 'y' // 后台解码
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    param.LText = Utils.formatOptions(script)
    if (window.GLOB.mkHS) { // 系统函数云端验证
      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
    }
    if (window.GLOB.probation) {
      param.s_debug_type = 'Y'
    }
    Api.genericInterface(param).then((res) => {
      if (res.status) {
        this.execSuccess({ErrCode: 'S', message: '导出成功!'})
      } else {
        this.execError(res)
      }
    }, (error) => {
      if (error && error.ErrCode === 'LoginError') return
      this.updateStatus('over')
    })
  }
  /**
@@ -912,190 +796,88 @@
  /**
   * @description 获取默认存储过程请求参数
   */
  getExcelDefaultParam = (arr_field, orderBy, search, pagination = false, pageIndex = 1, pageSize = 9999) => {
  getExcelDefaultParam = (orderBy, search, pagination = false, pageIndex = 1, pageSize = 9999) => {
    const { setting, btn, selectedData, BID } = this.props
    let defaultSql = setting.execute || setting.default || 'true'
    let customScript = setting.customScript || ''
    let _dataresource = setting.dataresource || ''
    let queryType = setting.queryType
    let primaryKey = setting.primaryKey || 'ID'
    let _setting = {}
    let _orderBy = orderBy || ''
    if (btn.verify.dataType === 'custom') {
      defaultSql = btn.verify.defaultSql || 'true'
      _dataresource = btn.verify.dataresource || ''
      queryType = btn.verify.queryType
      // primaryKey = btn.verify.primaryKey || 'ID'
      _setting.arr_field = []
      if (/\s/.test(_dataresource)) {
        _dataresource = '(' + _dataresource + ') tb'
      btn.verify.columns.forEach(col => {
        if (col.Column && col.Column !== '$Index') {
          _setting.arr_field.push(col.Column)
        }
      })
      _setting.arr_field = _setting.arr_field.join(',')
      _setting.execute = btn.verify.defaultSql !== 'false'
      _setting.dataresource = btn.verify.dataresource || ''
      _setting.primaryKey = _setting.primaryKey || setting.primaryKey || 'ID'
      if (!_setting.execute) {
        _setting.dataresource = ''
      }
      customScript = ''
      let _customScript = ''
      let _tailScript = ''
      btn.verify.scripts && btn.verify.scripts.forEach(script => {
        if (script.status !== 'false') {
          customScript += `
        if (script.status === 'false') return
        if (script.position !== 'back') {
          _customScript += `
          ${script.sql}
          `
        } else {
          _tailScript += `
          ${script.sql}
          `
        }
      })
      if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
        _dataresource = _dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
        customScript = customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
        _setting.dataresource = _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 {
        _dataresource = _dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        customScript = customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _setting.dataresource = _setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _tailScript = _tailScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
      }
    }
    let custompage = /@pageSize@/i.test(_dataresource + customScript)
    let _search = Utils.joinMainSearchkey(search)
    _search = _search ? 'where ' + _search : ''
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
      arr_field: arr_field,
      custom_script: customScript,
      default_sql: defaultSql,
      menuname: btn.logLabel
    }
      _setting.customScript = _customScript // 整理后自定义脚本
      _setting.tailScript = _tailScript     // 后置自定义脚本
    if (btn.verify.dataType !== 'custom' && setting.sub_field) {
      arr_field = arr_field + ',' + setting.sub_field
      param.arr_field = arr_field
    }
      _setting.laypage = pagination
    // 数据管理权限
    if (sessionStorage.getItem('dataM') === 'true') {
      param.dataM = 'Y'
    }
    if (BID) {
      param.BID = BID
    }
    let userName = sessionStorage.getItem('User_Name') || ''
    let fullName = sessionStorage.getItem('Full_Name') || ''
    let RoleID = sessionStorage.getItem('role_id') || ''
    let departmentcode = sessionStorage.getItem('departmentcode') || ''
    let organization = sessionStorage.getItem('organization') || ''
    let mk_user_type = sessionStorage.getItem('mk_user_type') || ''
    let nation = sessionStorage.getItem('nation') || ''
    let province = sessionStorage.getItem('province') || ''
    let city = sessionStorage.getItem('city') || ''
    let district = sessionStorage.getItem('district') || ''
    let address = sessionStorage.getItem('address') || ''
    let allSearch = Utils.getAllSearchOptions(search)
    let regoptions = allSearch.map(item => {
      return {
        reg: new RegExp('@' + item.key + '@', 'ig'),
        value: `'${item.value}'`
      if (_setting.laypage) {
        _setting.custompage = /@pageSize@/i.test(_setting.dataresource + _setting.customScript)
      }
    })
    regoptions.push({
      reg: new RegExp('@userName@', 'ig'),
      value: userName
    }, {
      reg: new RegExp('@fullName@', 'ig'),
      value: fullName
    }, {
      reg: new RegExp('@orderBy@', 'ig'),
      value: orderBy || ''
    }, {
      reg: new RegExp('@pageSize@', 'ig'),
      value: pageSize
    }, {
      reg: new RegExp('@pageIndex@', 'ig'),
      value: pageIndex
    })
      _setting.queryType = btn.verify.queryType
      _setting.$name = btn.logLabel
    regoptions.forEach(item => {
      _dataresource = _dataresource.replace(item.reg, item.value)
      param.custom_script = param.custom_script.replace(item.reg, item.value)
    })
    if (queryType === 'statistics') { // 统计数据源,内容替换
      _search = ''
      _orderBy = btn.verify.order || ''
    } else {
      _setting = {...setting}
      _setting.laypage = pagination
      _setting.arr_field = _setting.all_field || _setting.arr_field
    }
    let primaryId = ''
    if (btn.Ot === 'requiredOnce' && selectedData && selectedData.length > 0) {
      primaryId = selectedData.map(d => d.$$uuid || '').filter(Boolean).join(',')
      if (_search && primaryId) {
        _search += ` and ${primaryKey} in (select ID from dbo.SplitComma('${primaryId}'))`
      } else if (primaryId) {
        _search = `where ${primaryKey} in (select ID from dbo.SplitComma('${primaryId}'))`
      }
      primaryId = primaryId ? 'excel:' + primaryId : ''
    }
    let LText = ''
    if (custompage) {
      LText = `/*system_query*/select ${arr_field} from ${_dataresource} ${_search} `
    } else if (defaultSql !== 'false' && !pagination) {
      LText = `/*system_query*/select ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
    } else if (defaultSql !== 'false') {
      LText = `/*system_query*/select top ${pageSize} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows `
    }
    if (param.custom_script) {
      param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}'
        ${param.custom_script}
      `
      if (LText) {
        LText += `
          aaa:
          if @ErrorCode!=''
            insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
        `
      } else {
        param.custom_script += `
          aaa:
          if @ErrorCode!=''
            insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
        `
      }
    } else if (LText) {
      LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}'
        ${LText}
      `
    }
    LText = LText.replace(/@ID@/ig, `'${primaryId || ''}'`)
    param.custom_script = param.custom_script.replace(/@ID@/ig, `'${primaryId || ''}'`)
    LText = LText.replace(/@BID@/ig, `'${BID}'`)
    param.custom_script = param.custom_script.replace(/@BID@/ig, `'${BID}'`)
    LText = LText.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    param.custom_script = param.custom_script.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    LText = LText.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    param.custom_script = param.custom_script.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    LText = LText.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    param.custom_script = param.custom_script.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    LText = LText.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    param.custom_script = param.custom_script.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    LText = LText.replace(/@typename@/ig, `'admin'`)
    param.custom_script = param.custom_script.replace(/@typename@/ig, `'admin'`)
    // 测试系统打印查询语句
    if (window.GLOB.debugger === true) {
      param.custom_script && console.info(`${LText ? '' : '/*不执行默认sql*/\n'}${param.custom_script}`)
      LText && console.info(LText)
    }
    let param = UtilsDM.getDefaultQueryParam(_setting, search, _orderBy, pageIndex, pageSize, primaryId, BID)
    
    param.custom_script = Utils.formatOptions(param.custom_script)
    param.LText = Utils.formatOptions(LText)
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt(param.LText, param.timestamp)
    param.DateCount = ''
    param.username = userName
    param.fullname = fullName
    if (window.GLOB.mkHS) { // 云端数据验证
      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
    // 数据管理权限
    if (sessionStorage.getItem('dataM') === 'true') {
      param.dataM = 'Y'
    }
    if (BID) {
      param.BID = BID
    }
    return param
src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -9,7 +9,6 @@
import './index.scss'
const SubTabTable = asyncSpinComponent(() => import('@/tabviews/subtabtable'))
const CustomPage = asyncSpinComponent(() => import('@/tabviews/custom'))
const PopView = asyncSpinComponent(() => import('@/tabviews/custom/popview'))
class PopupButton extends Component {
@@ -128,7 +127,7 @@
    if (btn.uuid !== tabId) return
    if (btn.$view === 'CustomPage') {
    if (btn.$view === 'popview') {
      if (btn.popClose !== 'never') {
        MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.popClose, btn)
      }
@@ -250,7 +249,6 @@
        destroyOnClose
      >
        {!btn.$view ? <SubTabTable Tab={btn} MenuID={btn.linkTab} SupMenuID={this.props.MenuID} BID={popData ? primaryId : this.props.BID} BData={popData || this.props.BData}/> : null}
        {btn.$view === 'CustomPage' ? <CustomPage Tab={btn} MenuID={btn.uuid} MenuName={btn.label} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null}
        {btn.$view === 'popview' ? <PopView Tab={btn} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null}
      </Modal>
    } else {
@@ -287,7 +285,6 @@
          destroyOnClose
        >
          {!btn.$view ? <SubTabTable Tab={btn} MenuID={btn.linkTab} SupMenuID={this.props.MenuID} BID={popData ? primaryId : this.props.BID} BData={popData || this.props.BData}/> : null}
          {btn.$view === 'CustomPage' ? <CustomPage Tab={btn} MenuName={btn.label} MenuID={btn.uuid} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null}
          {btn.$view === 'popview' ? <PopView Tab={btn} param={{$BID: (popData ? primaryId : this.props.BID), ...(popData || this.props.BData || {})}} /> : null}
          <div className="close-drawer">
            <Button onClick={this.popclose}>
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -976,10 +976,15 @@
    let _dataresource = btn.verify.setting.dataresource
    let _customScript = ''
    let _tailScript = ''
    btn.verify.scripts && btn.verify.scripts.forEach(script => {
      if (script.status !== 'false') {
      if (script.status === 'false') return
      if (script.position !== 'back') {
        _customScript += `
        ${script.sql}
        `
      } else {
        _tailScript += `
        ${script.sql}
        `
      }
@@ -989,16 +994,28 @@
      _dataresource = ''
    }
    let isDataM = sessionStorage.getItem('dataM') === 'true'
    let regoptions = [
      { reg: /@ID@/ig, value: `'${ID}'`},
      { reg: /@BID@/ig, value: `'${BID || ''}'`},
      { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`},
      { reg: /@SessionUid@/ig, value: `'${localStorage.getItem('SessionUid') || ''}'`},
      { reg: /@UserID@/ig, value: `'${sessionStorage.getItem('UserID') || ''}'`},
      { reg: /@Appkey@/ig, value: `'${window.GLOB.appkey || ''}'`},
      { reg: /@typename@/ig, value: `'admin'`},
      { reg: /\$@/ig, value: isDataM ? '/*' : ''},
      { reg: /@\$/ig, value: isDataM ? '*/' : ''},
      { reg: /@datam@/ig, value: isDataM ? `'Y'` : `''`},
    ]
    regoptions.forEach(item => {
      _dataresource = _dataresource.replace(item.reg, item.value)
      _customScript = _customScript.replace(item.reg, item.value)
      _tailScript = _tailScript.replace(item.reg, item.value)
    })
    if (/\s/.test(_dataresource)) {
      _dataresource = '(' + _dataresource + ') tb'
    }
    if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
      _dataresource = _dataresource.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
      _customScript = _customScript.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
    } else {
      _dataresource = _dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
      _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
    }
    let initsql = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100)
@@ -1086,36 +1103,12 @@
        select ${_initvars.join(',')}
      `
    }
    
    if (_customScript) {
      _customScript = `${initsql}
        ${_customScript}
      `
    }
    _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
    _customScript = _customScript.replace(/@select\$|\$select@/ig, '')
    _dataresource = _dataresource.replace(/\$sum@/ig, '/*')
    _dataresource = _dataresource.replace(/@sum\$/ig, '*/')
    _customScript = _customScript.replace(/\$sum@/ig, '/*')
    _customScript = _customScript.replace(/@sum\$/ig, '*/')
    _dataresource = _dataresource.replace(/@ID@/ig, `'${ID}'`)
    _customScript = _customScript.replace(/@ID@/ig, `'${ID}'`)
    _dataresource = _dataresource.replace(/@BID@/ig, `'${BID || ''}'`)
    _customScript = _customScript.replace(/@BID@/ig, `'${BID || ''}'`)
    _dataresource = _dataresource.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    _customScript = _customScript.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    _dataresource = _dataresource.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    _customScript = _customScript.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    _dataresource = _dataresource.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    _customScript = _customScript.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    _dataresource = _dataresource.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _customScript = _customScript.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _dataresource = _dataresource.replace(/@typename@/ig, `'admin'`)
    _customScript = _customScript.replace(/@typename@/ig, `'admin'`)
    let LText = ''
@@ -1126,17 +1119,27 @@
    if (_customScript) {
      if (LText) {
        LText = `${LText}
          ${_tailScript}
          aaa:
          if @ErrorCode!=''
            insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,'${sessionStorage.getItem('UserID') || ''}' 
        `
      } else {
        _customScript = `${_customScript}
          ${_tailScript}
          aaa:
          if @ErrorCode!=''
            insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,'${sessionStorage.getItem('UserID') || ''}' 
        `
      }
    } else if (_tailScript) {
      LText = `${initsql}
        ${LText}
        ${_tailScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,'${sessionStorage.getItem('UserID') || ''}'
      `
    } else {
      LText = `${initsql}
        ${LText}
src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
@@ -1,7 +1,8 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Form, Row, Col, Button, notification, Tooltip, Select, Switch } from 'antd'
import { Form, Row, Col, Button, notification, Tooltip, Select, Switch, Radio } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
@@ -115,7 +116,8 @@
    })
    this.props.form.setFieldsValue({
      sql: record.sql
      sql: record.sql,
      position: record.position || 'front'
    })
  }
@@ -214,7 +216,8 @@
    })
    
    this.props.form.setFieldsValue({
      sql: ' '
      sql: ' ',
      position: 'front'
    })
  }
@@ -277,6 +280,23 @@
              {linefields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'表单及行变量,系统会定义变量并赋值。'}>,&nbsp;{linefields}</Tooltip> : null}
            </Form.Item>
          </Col>
          <Col span={8} style={{whiteSpace: 'nowrap'}}>
            <Form.Item style={{marginBottom: 0}} label={
              <Tooltip placement="bottomLeft" title={'自定义脚本与数据源位置关系。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                执行位置
              </Tooltip>
            }>
              {getFieldDecorator('position', {
                initialValue: 'front'
              })(
                <Radio.Group>
                  <Radio value="front">前置</Radio>
                  <Radio value="back">后置</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item style={{marginBottom: 0}} label="快捷添加">
              <Select
src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
@@ -216,13 +216,18 @@
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {/* {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label="主键">
            {btnType !== 'print' && dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="可自定义主键,空时默认为数据源主键。注:选行导出时使用。">
                  <QuestionCircleOutlined className="mk-form-tip" />
                  主键
                </Tooltip>
              }>
                {getFieldDecorator('primaryKey', {
                  initialValue: setting.primaryKey || 'ID',
                  initialValue: setting.primaryKey || '',
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null} */}
            </Col> : null}
            {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
              <Form.Item label="排序方式">
                {getFieldDecorator('order', {
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Tabs, Row, Col, Button, notification, Modal, message, InputNumber, Radio, Spin, Typography, Popconfirm } from 'antd'
import { Form, Tabs, Row, Col, Button, notification, Modal, message, InputNumber, Spin, Typography, Popconfirm } from 'antd'
import { EditOutlined, StopOutlined, CheckCircleOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons'
import moment from 'moment'
import md5 from 'md5'
@@ -12,7 +12,6 @@
import ColumnForm from './columnform'
import DataSource from './datasource'
import CustomScript from './customscript'
import CodeMirror from '@/templates/zshare/codemirror'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
@@ -31,7 +30,6 @@
    verify: {},
    debugId: '',
    activeKey: 'setting',
    defaultscript: '', // 自定义脚本
    excelColumns: [
      {
        title: '字段',
@@ -160,20 +158,18 @@
          )
        }
      },
      // {
      //   title: '执行位置',
      //   dataIndex: 'position',
      //   width: '10%',
      //   render: (text, record) => {
      //     if (record.position === 'init') {
      //       return <span style={{color: 'orange'}}>初始化</span>
      //     } else if (record.position === 'front') {
      //       return <span style={{color: '#26C281'}}>sql前</span>
      //     } else {
      //       return <span style={{color: '#1890ff'}}>sql后</span>
      //     }
      //   }
      // },
      {
        title: '执行位置',
        dataIndex: 'position',
        width: '10%',
        render: (text, record) => {
          if (record.position === 'back') {
            return <span style={{color: 'orange'}}>后置</span>
          } else {
            return <span style={{color: '#26C281'}}>前置</span>
          }
        }
      },
      {
        title: '状态',
        dataIndex: 'status',
@@ -221,14 +217,10 @@
      _verify = fromJS(card.verify).toJS()
    }
    _verify.enable = _verify.enable || 'false'
    _verify.dataType = _verify.dataType || 'default'
    _verify.columns = _verify.columns || []
    _verify.scripts = _verify.scripts || []
    if (card.intertype !== 'system') {
      _verify.enable = 'false'
    }
    _verify.columns = _verify.columns.map(col => {
      col.type = col.type || 'text'
      col.output = col.output || 'true'
@@ -244,16 +236,6 @@
      return col
    })
    let defaultscript = ''
    if (!_verify.script && card.intertype === 'system') {
      let search = this.formatSearch(config.search)
      search = Utils.joinMainSearchkey(search)
      search = search.replace(/@\$@/ig, '')
      search = search ? 'where ' + search : ''
      defaultscript = `update ${config.setting.tableName || ''} set idefine5= idefine5+1 ,modifydate=getdate(),cdefine5='已导出',modifyuserid=@userid@ ${search}`
    }
    let appType = sessionStorage.getItem('appType')
    let searches = []
@@ -372,8 +354,7 @@
    this.setState({
      verify: _verify,
      searches: searches,
      activeKey: card.intertype === 'system' && _verify.dataType === 'custom' ? 'setting' : 'columns',
      defaultscript: defaultscript
      activeKey: card.intertype === 'system' && _verify.dataType === 'custom' ? 'setting' : 'columns'
    })
  }
@@ -417,53 +398,6 @@
    this.setState({
      verify: verify
    })
  }
  /**
   * @description 获取全部搜索条件
   * @param {Array} searches 搜索条件数组
   */
  formatSearch (searches) {
    if (!searches || searches.length === 0) return []
    let newsearches = []
    searches.forEach(search => {
      if (!search.field) return
      let item = {
        key: search.field,
        match: search.match,
        type: search.type,
        label: search.label,
        value: search.initval,
        required: search.required === 'true'
      }
      if (item.type === 'group') {
        item.key = search.datefield
        item.type = 'daterange'
        item.match = 'between'
        item.value = [moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')].join(',')
        newsearches.push(item)
        return
      } else if (item.type === 'date') {
        item.value = moment().format('YYYY-MM-DD')
      } else if (item.type === 'datemonth') {
        item.value = moment().format('YYYY-MM')
      } else if (item.type === 'dateweek') {
        item.value = moment().format('YYYY-MM-DD')
      } else if (item.type === 'daterange') {
        item.value = [moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')].join(',')
      } else if (item.type === 'multiselect' || (item.type === 'checkcard' && search.multiple === 'true')) {
        item.type = 'multi'
        item.value = '@$@'
      } else {
        item.value = '@$@'
      }
      newsearches.push(item)
    })
    return newsearches
  }
  columnChange = (values) => {
@@ -582,9 +516,7 @@
        return
      }
      if (activeKey === 'backscript' && verify.enable === 'true') {
        this.checkScript(resolve, reject)
      } else if (activeKey === 'setting') {
      if (activeKey === 'setting') {
        this.settingForm.handleConfirm().then(res => {
          let _verify = {...verify, ...res}
@@ -667,111 +599,6 @@
      } else {
        resolve(verify)
      }
    })
  }
  checkScript = (_resolve, _reject) => {
    this.props.form.validateFieldsAndScroll((err, values) => {
      if (!err) {
        values.sql = values.sql || ''
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
        let _rparen = values.sql.match(/\){1}/g)
        _quot = _quot ? _quot.length : 0
        _lparen = _lparen ? _lparen.length : 0
        _rparen = _rparen ? _rparen.length : 0
        if (_quot % 2 !== 0) {
          notification.warning({
            top: 92,
            message: 'sql中\'必须成对出现',
            duration: 5
          })
          return
        } else if (_lparen !== _rparen) {
          notification.warning({
            top: 92,
            message: 'sql中()必须成对出现',
            duration: 5
          })
          return
        } else if (/--/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/',
            duration: 5
          })
          return
        } else if (/,,/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
            duration: 5
          })
          return
        }
        let error = Utils.verifySql(values.sql, 'customscript')
        if (error) {
          notification.warning({
            top: 92,
            message: 'sql中不可使用' + error,
            duration: 5
          })
          return
        }
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: values.sql
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        this.setState({
          loading: true
        })
        Api.genericInterface(param).then(res => {
          this.setState({
            loading: false
          })
          if (res.status) {
            let verify = {...this.state.verify, script: values.sql}
            this.setState({verify: verify}, () => {
              _resolve(verify)
            })
          } else {
            Modal.error({
              title: res.message
            })
          }
        })
      } else {
        notification.warning({
          top: 92,
          message: '自定义脚本不可为空!',
          duration: 5
        })
        _reject()
      }
    })
  }
  changeEnable = (e) => {
    const { verify } = this.state
    this.setState({
      verify: {...verify, enable: e.target.value}
    })
  }
@@ -896,13 +723,7 @@
    const { card } = this.props
    const { activeKey, verify } = this.state
    if (activeKey === 'backscript' && verify.enable === 'true') {
      this.checkScript(() => {
        this.setState({
          activeKey: val
        })
      }, () => {})
    } else if (card.intertype !== 'system' || verify.dataType !== 'custom') {
    if (card.intertype !== 'system' || verify.dataType !== 'custom') {
      this.setState({activeKey: val})
      return
    } else if (activeKey === 'setting') {
@@ -1075,8 +896,7 @@
  render() {
    const { card } = this.props
    const { verify, excelColumns, defaultscript, scriptsColumns, activeKey, loading, searches } = this.state
    const { getFieldDecorator } = this.props.form
    const { verify, excelColumns, scriptsColumns, activeKey, loading, searches } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -1126,39 +946,6 @@
              wrappedComponentRef={(inst) => this.scriptsForm = inst}
            />
            <EditTable actions={['move']} data={verify.scripts} columns={scriptsColumns} onChange={(scripts) => {this.setState({verify: {...verify, scripts}})}}/>
          </TabPane> : null}
          {card.intertype === 'system' ? <TabPane tab={
            <span>
              回调脚本
              {verify.enable === 'true' ? <span className="count-tip">1</span> : null}
            </span>
          } key="backscript">
            <Form {...formItemLayout} className="verify-form">
              <Row gutter={24}>
                <Col span={8}>
                  <Form.Item style={{marginBottom: 10}} label={'启用'}>
                    <Radio.Group defaultValue={verify.enable || 'false'} onChange={this.changeEnable}>
                      <Radio value="true">是</Radio>
                      <Radio value="false">否</Radio>
                    </Radio.Group>
                  </Form.Item>
                </Col>
                <div style={{color: '#959595', fontSize: '13px', paddingTop: '30px', float: 'right'}}>执行成功后的回调函数。</div>
                <Col span={24} className="sql">
                  <Form.Item label={'sql'}>
                    {getFieldDecorator('sql', {
                      initialValue: verify.script || defaultscript,
                      rules: [
                        {
                          required: true,
                          message: '请输入sql!'
                        }
                      ]
                    })(<CodeMirror />)}
                  </Form.Item>
                </Col>
              </Row>
            </Form>
          </TabPane> : null}
          <TabPane tab="信息提示" key="message">
            <Form {...formItemLayout}>
src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
@@ -65,12 +65,6 @@
    })
    _regoptions.push({
      reg: new RegExp('@userName@', 'ig'),
      value: `''`
    }, {
      reg: new RegExp('@fullName@', 'ig'),
      value: `''`
    }, {
      reg: new RegExp('@orderBy@', 'ig'),
      value: verify.order
    }, {
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
@@ -66,12 +66,10 @@
        dataIndex: 'position',
        width: '10%',
        render: (text, record) => {
          if (record.position === 'init') {
            return <span style={{color: 'orange'}}>初始化</span>
          } else if (record.position === 'front') {
            return <span style={{color: '#26C281'}}>sql前</span>
          if (record.position === 'back') {
            return <span style={{color: 'orange'}}>后置</span>
          } else {
            return <span style={{color: '#1890ff'}}>sql后</span>
            return <span style={{color: '#26C281'}}>前置</span>
          }
        }
      },
@@ -335,6 +333,29 @@
    })
  }
  handleEdit = (record, type) => {
    let node = null
    if (type === 'scripts') {
      this.scriptsForm.edit(record)
      node = document.getElementById('mk-exout-script')
    }
    if (node && node.scrollTop) {
      let inter = Math.ceil(node.scrollTop / 10)
      let timer = setInterval(() => {
        if (node.scrollTop - inter > 0) {
          node.scrollTop = node.scrollTop - inter
        } else {
          node.scrollTop = 0
          clearInterval(timer)
        }
      }, 10)
    }
  }
  showError = (errorType) => {
    if (errorType === 'S') {
      notification.success({
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -334,7 +334,7 @@
          </Col> : null}
          {interType === 'system' ? <Col span={24} className="mk-through-line3">
            <Form.Item help={'数据ID:' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={
              <Tooltip placement="topLeft" title={`使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 ''、 @$ -> */ 或 '';查询替换符 $select@ -> /* 或 ''、 @select$ -> */ 或 '';统计替换符 $sum@ -> /* 或 ''、 @sum$ -> */ 或 ''。`}>
              <Tooltip placement="topLeft" title={`使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 ''、 @$ -> */ 或 ''。`}>
                <QuestionCircleOutlined className="mk-form-tip" />
                数据源
              </Tooltip>
src/templates/zshare/verifycard/baseform/index.jsx
@@ -3,11 +3,9 @@
import { fromJS } from 'immutable'
import { Form, Row, Col, Select, Radio, Tooltip, Input, notification } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { queryPrintSql } from '@/utils/option.js'
import MkPrintTemps from '@/menu/components/share/actioncomponent/actionform/mkPrintTemps'
import './index.scss'
const sysTempsIds = ['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok']
@@ -25,8 +23,7 @@
  state = {
    wxTemps: [],
    selectTemp: null,
    miniTemps: [],
    printTemps: []
    miniTemps: []
  }
  componentDidMount() {
@@ -80,47 +77,6 @@
      wxTemps = JSON.parse(wxTemps)
      this.resetTemps(wxTemps)
    }
    this.checkPrintTemp()
  }
  checkPrintTemp = () => {
    if (!window.GLOB.printTemps) {
      let param = {
        func: 'sPC_Get_SelectedList',
        LText: Utils.formatOptions(queryPrintSql),
        obj_name: 'data',
        arr_field: 'PN,ID,Images'
      }
      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      param.secretkey = Utils.encrypt(param.LText, param.timestamp)
      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证
      Api.getCloudConfig(param).then(res => {
        if (!res.status) {
          notification.warning({
            top: 92,
            message: res.message,
            duration: 5
          })
        }
        let temps = (res.data || []).map(temp => {
          return {
            value: temp.ID,
            text: temp.PN
          }
        })
        window.GLOB.printTemps = temps
        this.setState({printTemps: temps})
      })
    } else {
      this.setState({printTemps: window.GLOB.printTemps || []})
    }
  }
@@ -324,7 +280,7 @@
  render() {
    const { unionFields, verify, notes, card, appType } = this.props
    const { wxTemps, selectTemp, printTemps } = this.state
    const { wxTemps, selectTemp } = this.state
    const formItemLayout = {
      labelCol: {
        xs: { span: 24 },
@@ -467,13 +423,7 @@
          </Col> : null}
          {verify.printEnable === 'true' ? <Col span={8}>
            <Form.Item label="打印模板" required>
              <Select value={verify.printTempId} onSelect={this.onPrintIdChange}>
                {printTemps.map(option =>
                  <Select.Option key={option.value} value={option.value}>
                    {option.text}
                  </Select.Option>
                )}
              </Select>
              <MkPrintTemps value={verify.printTempId} onChange={this.onPrintIdChange}/>
            </Form.Item>
          </Col> : null}
          <Col span={24}></Col>
src/utils/utils-custom.js
@@ -270,6 +270,7 @@
    if (interfaces && interfaces.length > 0) {
      interfaces.forEach(item => {
        if (item.uuid === selfId) return
        modules.push({
          value: item.uuid,
          label: item.name
src/utils/utils-datamanage.js
@@ -6,7 +6,6 @@
  /**
   * @description 数据源名称,用于统一查询
   * @param {Object}   setting      数据源设置
   * @param {String}   arrFields    查询字段
   * @param {Array}    search       搜索条件
   * @param {String}   orderBy      排序方式
   * @param {Number}   pageIndex    页码
@@ -14,11 +13,11 @@
   * @param {String}   BID          上级ID
   * @return {Object}  param
   */
  static getQueryDataParams (setting, arrFields, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, id, year) {
  static getQueryDataParams (setting, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, id, year) {
    let param = null
    if (setting.interType === 'system') {
      param = this.getDefaultQueryParam(setting, arrFields, search, orderBy, pageIndex, pageSize, id, BID, year)
      param = this.getDefaultQueryParam(setting, search, orderBy, pageIndex, pageSize, id, BID, year)
    } else {
      param = this.getCustomQueryParam(setting, search, orderBy, pageIndex, pageSize, id, year)
    }
@@ -99,18 +98,14 @@
  /**
   * @description 获取系统存储过程的参数
   */
  static getDefaultQueryParam (setting, arrFields, search, orderBy, pageIndex, pageSize, id, BID, year) {
  static getDefaultQueryParam (setting, search, orderBy, pageIndex, pageSize, id, BID, year) {
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
      exec_type: 'y',
      arr_field: arrFields,
      arr_field: setting.arr_field,
      default_sql: setting.execute ? 'true' : 'false'
    }
    // if (setting.transaction === 'true') {
    //   param.func = 'sPC_Get_TableData_try'
    // }
    let userName = sessionStorage.getItem('User_Name') || ''
    let fullName = sessionStorage.getItem('Full_Name') || ''
@@ -126,39 +121,13 @@
    let _dataresource = setting.dataresource
    let _customScript = ''
    let _tailScript = setting.tailScript || ''
    
    if (setting.customScript) {
      _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100)
        Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}'
        ${setting.customScript}
      `
    }
    _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
    _customScript = _customScript.replace(/@select\$|\$select@/ig, '')
    _dataresource = _dataresource.replace(/\$sum@/ig, '/*')
    _dataresource = _dataresource.replace(/@sum\$/ig, '*/')
    _customScript = _customScript.replace(/\$sum@/ig, '/*')
    _customScript = _customScript.replace(/@sum\$/ig, '*/')
    // _dataresource = _dataresource.replace(/@ID@/ig, `''`)
    // _customScript = _customScript.replace(/@ID@/ig, `''`)
    _dataresource = _dataresource.replace(/@BID@/ig, `'${BID || ''}'`)
    _customScript = _customScript.replace(/@BID@/ig, `'${BID || ''}'`)
    _dataresource = _dataresource.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    _customScript = _customScript.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    _dataresource = _dataresource.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    _customScript = _customScript.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    _dataresource = _dataresource.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    _customScript = _customScript.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    _dataresource = _dataresource.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _customScript = _customScript.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _dataresource = _dataresource.replace(/@typename@/ig, `'admin'`)
    _customScript = _customScript.replace(/@typename@/ig, `'admin'`)
    if (setting.$re_year) {
      _dataresource = _dataresource.replace(/@mk_year@/ig, year)
      _customScript = _customScript.replace(/@mk_year@/ig, year)
    }
    let allSearch = Utils.getAllSearchOptions(search)
@@ -168,37 +137,55 @@
        value: `'${item.value}'`
      }
    })
    regoptions.push({
      reg: new RegExp('@orderBy@', 'ig'),
      value: orderBy
    }, {
      reg: new RegExp('@pageSize@', 'ig'),
      value: setting.laypage ? pageSize : '9999'
    }, {
      reg: new RegExp('@pageIndex@', 'ig'),
      value: pageIndex
    })
    regoptions.push(
      { reg: /@orderBy@/ig, value: orderBy },
      { reg: /@pageSize@/ig, value: setting.laypage ? pageSize : '9999' },
      { reg: /@pageIndex@/ig, value: pageIndex},
      { reg: /@select\$|\$select@/ig, value: ''},
      { reg: /\$sum@/ig, value: '/*'},
      { reg: /@sum\$/ig, value: '*/'},
      { reg: /@ID@/ig, value: `'${id || ''}'`},
      { reg: /@BID@/ig, value: `'${BID || ''}'`},
      { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`},
      { reg: /@SessionUid@/ig, value: `'${localStorage.getItem('SessionUid') || ''}'`},
      { reg: /@UserID@/ig, value: `'${sessionStorage.getItem('UserID') || ''}'`},
      { reg: /@Appkey@/ig, value: `'${window.GLOB.appkey || ''}'`},
      { reg: /@typename@/ig, value: `'admin'`},
    )
    if (setting.$re_year) {
      regoptions.push({ reg: /@mk_year@/ig, value: year })
    }
    regoptions.forEach(item => {
      _dataresource = _dataresource.replace(item.reg, item.value)
      _customScript = _customScript.replace(item.reg, item.value)
      _tailScript = _tailScript.replace(item.reg, item.value)
    })
    let _search = ''
    
    if (_dataresource) {
      let id_search = ''
      if (id) {
        if (/^excel:/.test(id)) {
          id_search = `${setting.primaryKey} in (select ID from dbo.SplitComma('${id.replace(/^excel:/, '')}'))`
        } else {
          id_search = `${setting.primaryKey || 'ID'}='${id}'`
          orderBy = ''
        }
      }
      if (setting.queryType === 'statistics') { // 统计数据源,内容替换
        if (id) {
          _dataresource = _dataresource + ` where ${setting.primaryKey || 'ID'}='${id}'`
        }
      } else if (!id) {
        _search = Utils.joinMainSearchkey(search)
        if (_search) {
          _search = 'where ' + _search
          _dataresource = _dataresource + ` where ${id_search}`
        }
      } else if (id) {
        _search = Utils.joinMainSearchkey(search)
        _search = `where ${_search ? _search + ' AND ' : ''} ${setting.primaryKey || 'ID'}='${id}'`
        _search = `where ${_search ? _search + ' AND ' : ''} ${id_search}`
      } else {
        _search = Utils.joinMainSearchkey(search)
        _search = _search ? 'where ' + _search : ''
      }
    }
@@ -211,42 +198,52 @@
    let LText = ''
    let DateCount = ''
    let arr_field = setting.all_field || setting.arr_field
    if (setting.sub_field) {
      arrFields = arrFields + ',' + setting.sub_field
    }
    if (_dataresource && setting.laypage && orderBy && !id) {
      if (setting.custompage) {
        LText = `/*system_query*/select ${arrFields} from ${_dataresource} ${_search} `
      } else {
        LText = `/*system_query*/select top ${pageSize} ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows `
        if (setting.sub_field) {
          DateCount = `/*system_query*/select count(1) as total from (select distinct ${setting.primaryKey} from ${_dataresource} ${_search})a`
    if (_dataresource) {
      if (setting.laypage && orderBy) {
        if (setting.custompage) {
          LText = `/*system_query*/select ${arr_field} from ${_dataresource} ${_search} `
        } else {
          DateCount = `/*system_query*/select count(1) as total from ${_dataresource} ${_search}`
          LText = `/*system_query*/select top ${pageSize} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows `
          if (setting.sub_field) {
            DateCount = `/*system_query*/select count(1) as total from (select distinct ${setting.primaryKey} from ${_dataresource} ${_search})a`
          } else {
            DateCount = `/*system_query*/select count(1) as total from ${_dataresource} ${_search}`
          }
        }
      } else if (orderBy) {
        LText = `/*system_query*/select ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
      } else {
        LText = `/*system_query*/select ${arr_field} from ${_dataresource} ${_search}  `
      }
    } else if (_dataresource && orderBy) {
      LText = `/*system_query*/select ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
    } else if (_dataresource) {
      LText = `/*system_query*/select ${arrFields} from ${_dataresource} ${_search}  `
    }
    if (_customScript) {
      if (LText) {
        LText = `${LText}
          ${_tailScript}
          aaa:
          if @ErrorCode!=''
            insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,'${sessionStorage.getItem('UserID') || ''}' 
        `
      } else {
        _customScript = `${_customScript}
          ${_tailScript}
          aaa:
          if @ErrorCode!=''
            insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,'${sessionStorage.getItem('UserID') || ''}' 
        `
      }
    } else if (_tailScript) {
      LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100)
        Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}'
        ${LText}
        ${_tailScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,'${sessionStorage.getItem('UserID') || ''}'
      `
    } else {
      LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100)
        Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}'
@@ -334,28 +331,6 @@
      `
    }
    _dataresource = _dataresource.replace(/@sum\$|\$sum@/ig, '')
    _customScript = _customScript.replace(/@sum\$|\$sum@/ig, '')
    _dataresource = _dataresource.replace(/\$select@/ig, '/*')
    _dataresource = _dataresource.replace(/@select\$/ig, '*/')
    _customScript = _customScript.replace(/\$select@/ig, '/*')
    _customScript = _customScript.replace(/@select\$/ig, '*/')
    // _dataresource = _dataresource.replace(/@ID@/ig, `''`)
    // _customScript = _customScript.replace(/@ID@/ig, `''`)
    _dataresource = _dataresource.replace(/@BID@/ig, `'${BID || ''}'`)
    _customScript = _customScript.replace(/@BID@/ig, `'${BID || ''}'`)
    _dataresource = _dataresource.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    _customScript = _customScript.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    _dataresource = _dataresource.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    _customScript = _customScript.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    _dataresource = _dataresource.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    _customScript = _customScript.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    _dataresource = _dataresource.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _customScript = _customScript.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _dataresource = _dataresource.replace(/@typename@/ig, `'admin'`)
    _customScript = _customScript.replace(/@typename@/ig, `'admin'`)
    let allSearch = Utils.getAllSearchOptions(search)
    let regoptions = allSearch.map(item => {
      return {
@@ -364,16 +339,21 @@
      }
    })
    regoptions.push({
      reg: new RegExp('@orderBy@', 'ig'),
      value: orderBy
    }, {
      reg: new RegExp('@pageSize@', 'ig'),
      value: 999999
    }, {
      reg: new RegExp('@pageIndex@', 'ig'),
      value: 1
    })
    regoptions.push(
      { reg: /@orderBy@/ig, value: orderBy },
      { reg: /@pageSize@/ig, value: 999999 },
      { reg: /@pageIndex@/ig, value: 1},
      { reg: /\$select@/ig, value: '/*'},
      { reg: /@select\$/ig, value: '*/'},
      { reg: /@sum\$|\$sum@/ig, value: ''},
      { reg: /@ID@/ig, value: `''`},
      { reg: /@BID@/ig, value: `'${BID || ''}'`},
      { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`},
      { reg: /@SessionUid@/ig, value: `'${localStorage.getItem('SessionUid') || ''}'`},
      { reg: /@UserID@/ig, value: `'${sessionStorage.getItem('UserID') || ''}'`},
      { reg: /@Appkey@/ig, value: `'${window.GLOB.appkey || ''}'`},
      { reg: /@typename@/ig, value: `'admin'`},
    )
    regoptions.forEach(item => {
      _dataresource = _dataresource.replace(item.reg, item.value)
@@ -447,7 +427,6 @@
export function getStructDefaultParam (component, searchlist, first) {
  const { columns, setting, dataName, format, uuid } = component
  let arr_field = columns.map(col => col.field)
  let _dataresource = setting.dataresource
  let _customScript = setting.customScript
  
@@ -464,12 +443,12 @@
    _customScript = _customScript.replace(item.reg, item.value)
  })
  _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
  _customScript = _customScript.replace(/@select\$|\$select@/ig, '')
  _dataresource = _dataresource.replace(/\$sum@/ig, '/*')
  _dataresource = _dataresource.replace(/@sum\$/ig, '*/')
  _customScript = _customScript.replace(/\$sum@/ig, '/*')
  _customScript = _customScript.replace(/@sum\$/ig, '*/')
  // _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
  // _customScript = _customScript.replace(/@select\$|\$select@/ig, '')
  // _dataresource = _dataresource.replace(/\$sum@/ig, '/*')
  // _dataresource = _dataresource.replace(/@sum\$/ig, '*/')
  // _customScript = _customScript.replace(/\$sum@/ig, '/*')
  // _customScript = _customScript.replace(/@sum\$/ig, '*/')
  let _search = ''
  if (setting.queryType !== 'statistics' && _dataresource) {
@@ -478,9 +457,9 @@
  }
  if (setting.order && _dataresource) {
    _dataresource = `select top 1000 ${arr_field.join(',')} from (select ${arr_field.join(',')} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
    _dataresource = `select top 1000 ${setting.arr_field} from (select ${setting.arr_field} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows `
  } else if (_dataresource) {
    _dataresource = `select top 1000 ${arr_field.join(',')} from ${_dataresource} ${_search} `
    _dataresource = `select top 1000 ${setting.arr_field} from ${_dataresource} ${_search} `
  }
  if (first) {
@@ -508,6 +487,7 @@
    $name: setting.$name,
    columns: columns,
    par_tablename: '',
    order: setting.order || '',
    type: format === 'array' ? format : '',
    primaryKey: setting.primaryKey || '',
    foreign_key: '',
@@ -524,10 +504,18 @@
export function getStructuredParams (params, config, BID) {
  let LText_field = []
  let diffUser = false
  // let transaction = false
  let loginId = `'${sessionStorage.getItem('LoginUID') || ''}'`
  let sessionId = `'${localStorage.getItem('SessionUid') || ''}'`
  let userId = `'${sessionStorage.getItem('UserID') || ''}'`
  let regoptions = [
    { reg: /@pageSize@/ig, value: 9999 },
    { reg: /@pageIndex@/ig, value: 1},
    { reg: /@ID@/ig, value: `''`},
    { reg: /@BID@/ig, value: `'${BID || ''}'`},
    { reg: /@LoginUID@/ig, value: `'${sessionStorage.getItem('LoginUID') || ''}'`},
    { reg: /@SessionUid@/ig, value: `'${localStorage.getItem('SessionUid') || ''}'`},
    { reg: /@UserID@/ig, value: `'${sessionStorage.getItem('UserID') || ''}'`},
    { reg: /@Appkey@/ig, value: `'${window.GLOB.appkey || ''}'`},
    { reg: /@typename@/ig, value: `'admin'`},
  ]
  let _LText = params.map((item, index) => {
    let _script = item.script
@@ -536,24 +524,14 @@
    if (!diffUser && (/@userid@/ig.test(item.sql) || /@userid@/ig.test(_script))) {
      diffUser = true
    }
    // if (item.transaction) {
    //   transaction = true
    // }
    _sql = _sql.replace(/@ID@/ig, `''`)
    _script = _script.replace(/@ID@/ig, `''`)
    _sql = _sql.replace(/@BID@/ig, `'${BID || ''}'`)
    _script = _script.replace(/@BID@/ig, `'${BID || ''}'`)
    _sql = _sql.replace(/@LoginUID@/ig, loginId)
    _script = _script.replace(/@LoginUID@/ig, loginId)
    _sql = _sql.replace(/@SessionUid@/ig, sessionId)
    _script = _script.replace(/@SessionUid@/ig, sessionId)
    _sql = _sql.replace(/@UserID@/ig, userId)
    _script = _script.replace(/@UserID@/ig, userId)
    _sql = _sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _script = _script.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _sql = _sql.replace(/@typename@/ig, `'admin'`)
    _script = _script.replace(/@typename@/ig, `'admin'`)
    _sql = _sql.replace(/@orderBy@/ig, item.order)
    _script = _script.replace(/@orderBy@/ig, item.order)
    regoptions.forEach(cell => {
      _sql = _sql.replace(cell.reg, cell.value)
      _script = _script.replace(cell.reg, cell.value)
    })
    // 测试系统打印查询语句
    if (window.GLOB.debugger === true) {
@@ -579,9 +557,6 @@
  if (config.MenuName) {
    param.menuname = config.MenuName
  }
  // if (transaction) {
  //   param.func = 'sPC_Get_structured_data_try'
  // }
  let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText)
src/views/billprint/index.jsx
@@ -322,6 +322,10 @@
        window.GLOB.CacheData.set(tempId, {$BID: BID})
        let initInters = []
        this.formatInterSetting(config.interfaces, regs, initInters, params, BID)
        config.components = config.components.map(component => {
          if (component.action) {
            component.action = component.action.filter(cell => {
@@ -434,19 +438,31 @@
          if (component.wrap && component.wrap.datatype === 'static') {
            component.format = ''
          } else if (component.wrap && component.wrap.datatype === 'public') {
            component.componentId = component.wrap.publicId
            component.format = ''
          }
    
          if (!component.setting) return component // 不使用系统函数时
          if (!component.format) return component  // 没有动态数据  数据格式 array 或 object
          component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : ''
          if (component.setting.interType !== 'system') { // 不使用系统函数时
            component.setting.sync = 'false'
            return component
          }
    
          let _customScript = ''
          let _tailScript = ''
          component.scripts && component.scripts.forEach(script => {
            if (script.status !== 'false') {
            if (script.status === 'false') return
            if (script.position !== 'back') {
              _customScript += `
              ${script.sql}
              `
            } else {
              _tailScript += `
              ${script.sql}
              `
            }
@@ -467,17 +483,21 @@
          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     // 后置自定义脚本
    
          // floor    组件的层级
          // pageable 是否分页,组件属性,不分页的组件才可以统一查询
@@ -485,9 +505,8 @@
            component.dataName = 'mk' + component.uuid.slice(-18)
            let param = this.getDefaultParam(component)
            _pars.push(param)
          } else {
            let arr_field = component.columns.map(col => col.field).join(',')
            let param = UtilsDM.getQueryDataParams(component.setting, arr_field, [], component.setting.order || '', 1, 1000, BID)
          } else if (component.subtype !== 'dualdatacard') {
            let param = UtilsDM.getQueryDataParams(component.setting, [], component.setting.order || '', 1, 1000, BID)
            
            param.componentId = component.uuid
@@ -521,8 +540,10 @@
          auto: config.printPage === 'auto',
          config
        }, () => {
          if (params.length === 0) {
          if (params.length === 0 && initInters.length === 0) {
            this.setState({loadingview: false, pages: [config.components]})
          } else if (initInters.length > 0) {
            this.loadinit(initInters, params)
          } else {
            this.loadmaindata(params)
          }
@@ -576,6 +597,92 @@
    return cell
  }
  formatInterSetting = (inters, regs, initInters, params, BID) => {
    if (!inters) return []
    let delay = 15
    inters.forEach(inter => {
      if (inter.status !== 'true') return
      inter.setting.delay = delay
      delay += 15
      inter.setting.supModule = ''
      inter.setting.arr_field = inter.columns.map(col => col.field).join(',')
      if (inter.setting.interType !== 'system') {
        let param = UtilsDM.getQueryDataParams(inter.setting, [], inter.setting.order || '', 1, 1000, BID)
        param.componentId = inter.uuid
        if (inter.setting.loadlevel === 'init') {
          initInters.push(param)
        } else {
          param.public = true
          params.push(param)
        }
        return
      }
      let _customScript = ''
      let _tailScript = ''
      inter.scripts.forEach(script => {
        if (script.status === 'false') return
        if (script.position !== 'back') {
          _customScript += `
          ${script.sql}
          `
        } else {
          _tailScript += `
          ${script.sql}
          `
        }
      })
      delete inter.scripts
      inter.setting.$name = '公共数据源-' + inter.setting.name
      inter.setting.execute = inter.setting.execute !== 'false'
      inter.setting.laypage = true
      if (!inter.setting.execute) {
        inter.setting.dataresource = ''
      }
      if (/\s/.test(inter.setting.dataresource)) {
        inter.setting.dataresource = '(' + inter.setting.dataresource + ') tb'
      }
      if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
        inter.setting.dataresource = inter.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 {
        inter.setting.dataresource = inter.setting.dataresource.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _customScript = _customScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        _tailScript = _tailScript.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
      }
      regs.forEach(cell => {
        inter.setting.dataresource = inter.setting.dataresource.replace(cell.reg, cell.value)
        _customScript = _customScript.replace(cell.reg, cell.value)
        _tailScript = _tailScript.replace(cell.reg, cell.value)
      })
      inter.setting.customScript = _customScript // 整理后自定义脚本
      inter.setting.tailScript = _tailScript     // 后置自定义脚本
      let param = UtilsDM.getQueryDataParams(inter.setting, [], inter.setting.order || '', 1, 1000, BID)
      param.componentId = inter.uuid
      if (inter.setting.loadlevel === 'init') {
        initInters.push(param)
      } else {
        param.public = true
        params.push(param)
      }
    })
  }
  reload = () => {
    const { tempId } = this.state
    
@@ -598,14 +705,13 @@
  getDefaultParam = (component) => {
    const { columns, setting, dataName, format } = component
    
    let arr_field = columns.map(col => col.field)
    let _dataresource = setting.dataresource
    let _customScript = setting.customScript
    if (setting.order && _dataresource) {
      _dataresource = `select top 1000 ${arr_field.join(',')} from (select ${arr_field.join(',')} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource}) tmptable order by tmptable.rows `
      _dataresource = `select top 1000 ${setting.arr_field} from (select ${setting.arr_field} ,ROW_NUMBER() over(order by ${setting.order}) as rows from ${_dataresource}) tmptable order by tmptable.rows `
    } else if (_dataresource) {
      _dataresource = `select top 1000 ${arr_field.join(',')} from ${_dataresource} `
      _dataresource = `select top 1000 ${setting.arr_field} from ${_dataresource} `
    }
    // 测试系统打印查询语句
@@ -678,6 +784,40 @@
    return param
  }
  loadinit = (initInters, params) => {
    let deffers = initInters.map(item => {
      let componentId = item.componentId
      delete item.componentId
      return new Promise(resolve => {
        Api.genericInterface(item).then(res => {
          if (!res.status) {
            notification.warning({
              top: 92,
              message: res.message,
              duration: 5
            })
            resolve()
          } else {
            let _data = { $$empty: true }
            if (res.data && res.data[0]) {
              _data = res.data[0]
            }
            window.GLOB.CacheData.set(componentId, _data)
          }
          resolve()
        })
      })
    })
    Promise.all(deffers).then(() => {
      if (params.length === 0) {
        this.setState({loadingview: false, pages: [this.state.config.components]})
      } else {
        this.loadmaindata(params)
      }
    })
  }
  /**
   * @description 主表数据加载
   */ 
@@ -686,7 +826,9 @@
    let deffers = params.map(item => {
      let componentId = item.componentId
      let ispublic = item.public
      delete item.componentId
      delete item.public
      return new Promise(resolve => {
        Api.genericInterface(item).then(res => {
          if (!res.status) {
@@ -698,6 +840,14 @@
            resolve(false)
          } else {
            res.componentId = componentId
            if (ispublic) {
              let _data = { $$empty: true }
              if (res.data && res.data[0]) {
                _data = res.data[0]
              }
              window.GLOB.CacheData.set(componentId, _data)
            }
            resolve(res)
          }
        })
@@ -718,7 +868,7 @@
        }
        _results.forEach(res => {
          if (res.componentId === item.uuid && res.data) {
          if ((res.componentId === item.uuid || res.componentId === item.componentId) && res.data) {
            item.dataArray = fromJS(res.data).toJS()
          } else if (res.componentId === 'union' && res[item.dataName]) {
            let data = res[item.dataName]
src/views/login/index.jsx
@@ -433,6 +433,7 @@
        AppID: window.GLOB.appId,
        TimeStamp: timeStamp,
        appkey: window.GLOB.appkey,
        SessionUid: localStorage.getItem('SessionUid') || '',
        userid: _id,
        LoginUID: _id,
        nonc: Utils.getuuid()
@@ -704,7 +705,7 @@
            let memberLevel = res.member_level
            if (typeof(memberLevel) === 'number' && memberLevel > 10 && parseInt(memberLevel / 10) * 10 === memberLevel) {
            if (typeof(memberLevel) === 'number' && memberLevel > 0 && parseInt(memberLevel / 10) * 10 === memberLevel) {
              sessionStorage.setItem('Member_Level', md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + memberLevel))
              window.GLOB.memberLevel = memberLevel
            }
src/views/sso/index.jsx
@@ -135,7 +135,7 @@
        let memberLevel = res.member_level
        if (typeof(memberLevel) === 'number' && memberLevel > 10 && parseInt(memberLevel / 10) * 10 === memberLevel) {
        if (typeof(memberLevel) === 'number' && memberLevel > 0 && parseInt(memberLevel / 10) * 10 === memberLevel) {
          sessionStorage.setItem('Member_Level', md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + memberLevel))
          window.GLOB.memberLevel = memberLevel
        }