king
2020-09-18 2404d8a1bed5509432652f11aba6a1efa04aa160
2020-09-18
12个文件已修改
522 ■■■■■ 已修改文件
src/tabviews/commontable/index.jsx 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.jsx 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.scss 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/colspanform/index.jsx 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/colspanform/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/columnform/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx
@@ -72,7 +72,9 @@
    refreshtabs: null,    // 需要刷新的标签集
    triggerBtn: null,     // 点击表格中或快捷键触发的按钮
    tabActive: null,      // 标签页展开控制
    chartId: ''           // 展开图表ID
    chartId: '',          // 展开图表ID
    statFields: [],       // 合计字段
    statFValue: []        // 合计值
  }
  /**
@@ -223,6 +225,7 @@
      config.setting.execute = config.setting.default !== 'false'     // 默认sql是否执行,转为boolean 统一格式
      config.setting.customScript = ''                                // 自定义脚本
      if (config.setting.interType === 'system') {
      if (config.setting.scripts && config.setting.scripts.length > 0) {
        let _customScript = ''
        config.setting.scripts.forEach(item => {
@@ -251,6 +254,7 @@
      } else {
        config.setting.dataresource = config.setting.dataresource.replace(/@\$|\$@/ig, '')
        config.setting.customScript = config.setting.customScript.replace(/@\$|\$@/ig, '')
        }
      }
      if (_curUserConfig) {
@@ -293,6 +297,7 @@
      let _logcolumns = []   // 日志显示列
      let _hideCol = []      // 隐藏及合并列中字段的uuid集
      let colMap = new Map() // 用于字段过滤
      let statFields = []    // 合计字段信息
      let _actions = []      // 工具栏按钮
      let _operations = []   // 操作列按钮(存在时)
@@ -316,6 +321,9 @@
          _logcolumns.push(col)
          col.nameField && _arrField.push(col.nameField) // 链接名字段
          if (col.Hide !== 'true' && col.type === 'number' && col.sum === 'true') {
            statFields.push(col)
          }
        }
        if (col.type === 'colspan' && col.sublist) { // 筛选隐藏列
          _hideCol = _hideCol.concat(col.sublist)
@@ -385,6 +393,7 @@
        loadingview: false,
        chartId: chartId,
        config: config,
        statFields: statFields,
        tabActive: _tabActive,
        userConfig: userConfig,
        setting: config.setting,
@@ -397,6 +406,7 @@
      }, () => {
        if (config.setting.onload !== 'false' && valid) { // 初始化可加载
          this.loadmaindata()
          this.getStatFieldsValue()
        }
        this.setShortcut()
      })
@@ -564,6 +574,50 @@
  }
  /**
   * @description 获取合计字段值
   */
  getStatFieldsValue = () => {
    const { setting, search, BID, orderBy, statFields } = this.state
    if (statFields.length === 0 || setting.interType !== 'system' || !setting.dataresource) return
    let requireFields = search.filter(item => item.required && (!item.value || item.value.length === 0))
    if (requireFields.length > 0) {
      return
    }
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getStatQueryDataParams(setting, statFields, search, _orderBy, BID, this.props.menuType, this.props.dataManager)
    Api.genericInterface(param).then(res => {
      if (res.status) {
        let _data = res.data[0]
        let values = []
        if (_data) {
          statFields.forEach(item => {
            if (_data[item.field] || _data[item.field] === 0) {
              values.push({label: item.label, value: _data[item.field]})
            }
          })
        }
        this.setState({
          statFValue: values
        })
      } else {
        this.setState({
          statFValue: []
        })
        notification.error({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    })
  }
  /**
   * @description 搜索条件改变时,重置表格数据
   * 含有初始不加载的页面,修改设置
   */
@@ -577,6 +631,7 @@
        setting: {...setting, onload: 'true'}
      }, () => {
        this.loadmaindata()
        this.getStatFieldsValue()
      })
    } else {
      this.setState({
@@ -586,6 +641,7 @@
        search: searches
      }, () => {
        this.loadmaindata()
        this.getStatFieldsValue()
      })
    }
  }
@@ -622,6 +678,7 @@
      pageIndex: 1
    }, () => {
      this.loadmaindata()
      this.getStatFieldsValue()
    })
  }
@@ -918,6 +975,7 @@
                      total={this.state.total}
                      MenuID={this.props.MenuID}
                      loading={this.state.loading}
                      statFValue={this.state.statFValue}
                      refreshdata={this.refreshbytable}
                      buttonTrigger={this.buttonTrigger}
                      handleTableId={this.handleTableId}
src/tabviews/subtable/index.jsx
@@ -64,7 +64,9 @@
    search: [],           // 搜索条件数组,使用时需分场景处理
    pickup: false,        // 子表数据隐藏显示切换
    triggerBtn: null,     // 按钮触发
    chartId: ''           // 展开图表ID
    chartId: '',          // 展开图表ID
    statFields: [],       // 合计字段
    statFValue: []        // 合计值
  }
  /**
@@ -79,6 +81,7 @@
      }, () => {
        if (this.state.setting) {
          this.loadmaindata(nextProps.BID, 'refresh')
          this.getStatFieldsValue(nextProps.BID, 'refresh')
        }
      })
    } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
@@ -95,6 +98,7 @@
      if (this.state.setting) {
        this.setState({}, () => {
          this.loadmaindata()
          this.getStatFieldsValue()
        })
      }
    }
@@ -145,6 +149,7 @@
      let _logcolumns = []   // 日志显示列
      let _hideCol = []      // 隐藏及合并列中字段的uuid集
      let colMap = new Map()
      let statFields = []    // 合计字段信息
      // 版本兼容
      config = UtilsUpdate.updateSubTable(config)
@@ -241,6 +246,9 @@
          _logcolumns.push(col)
          col.nameField && _arrField.push(col.nameField) // 链接名字段
          if (col.Hide !== 'true' && col.type === 'number' && col.sum === 'true') {
            statFields.push(col)
          }
        }
        if (col.type === 'colspan' && col.sublist) { // 筛选隐藏列
          _hideCol = _hideCol.concat(col.sublist)
@@ -324,6 +332,7 @@
      config.setting.execute = config.setting.default !== 'false'     // 默认sql是否执行,转为boolean 统一格式
      config.setting.customScript = ''                                // 自定义脚本
      if (config.setting.interType === 'system') {
      if (config.setting.scripts && config.setting.scripts.length > 0) {
        let _customScript = ''
        config.setting.scripts.forEach(item => {
@@ -353,11 +362,13 @@
        config.setting.dataresource = config.setting.dataresource.replace(/@\$|\$@/ig, '')
        config.setting.customScript = config.setting.customScript.replace(/@\$|\$@/ig, '')
      }
      }
      this.setState({
        loadingview: false,
        chartId: chartId,
        config: config,
        statFields: statFields,
        setting: config.setting,
        searchlist: config.search,
        actions: _actions,
@@ -368,6 +379,7 @@
      }, () => {
        if (config.setting.onload !== 'false' && (!Tab.supMenu || BID || Tab.isTreeNode) && valid) { // 初始化可加载
          this.loadmaindata()
          this.getStatFieldsValue()
        }
      })
    } else {
@@ -458,6 +470,68 @@
  }
  /**
   * @description 获取合计字段值
   */
  getStatFieldsValue = (bid, type) => {
    const { mainSearch } = this.props
    const { setting, search, orderBy, statFields } = this.state
    let _BID = this.props.BID
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
      searches = [...mainSearch, ...searches]
    }
    if (statFields.length === 0 || setting.interType !== 'system' || !setting.dataresource) return
    let requireFields = search.filter(item => item.required && (!item.value || item.value.length === 0))
    if (requireFields.length > 0) {
      return
    }
    if (type === 'refresh') {
      if (!bid) { // 主表ID不存在时,不查询子表合计值
        this.setState({
          statFValue: []
        })
        return
      } else {
        _BID = bid
      }
    }
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, _BID, this.props.menuType, this.props.dataManager)
    Api.genericInterface(param).then(res => {
      if (res.status) {
        let _data = res.data[0]
        let values = []
        if (_data) {
          statFields.forEach(item => {
            if (_data[item.field] || _data[item.field] === 0) {
              values.push({label: item.label, value: _data[item.field]})
            }
          })
        }
        this.setState({
          statFValue: values
        })
      } else {
        this.setState({
          statFValue: []
        })
        notification.error({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    })
  }
  /**
   * @description 搜索条件改变时,重置表格数据
   * 含有初始不加载的页面,修改设置
   */
@@ -469,6 +543,7 @@
      selectedData: [],
    }, () => {
      this.loadmaindata()
      this.getStatFieldsValue()
    })
  }
@@ -504,6 +579,7 @@
      resetTable: !this.state.resetTable
    }, () => {
      this.loadmaindata()
      this.getStatFieldsValue()
    })
  }
@@ -689,6 +765,7 @@
                      total={this.state.total}
                      MenuID={this.props.MenuID}
                      loading={this.state.loading}
                      statFValue={this.state.statFValue}
                      refreshdata={this.refreshbytable}
                      buttonTrigger={this.buttonTrigger}
                      handleTableId={this.handleTableId}
src/tabviews/subtabtable/index.jsx
@@ -59,7 +59,9 @@
    orderBy: '',          // 排序
    search: '',           // 搜索条件数组,使用时需分场景处理
    triggerBtn: null,     // 按钮触发
    chartId: ''           // 展开图表ID
    chartId: '',          // 展开图表ID
    statFields: [],       // 合计字段
    statFValue: []        // 合计值
  }
  /**
@@ -107,6 +109,7 @@
      let _logcolumns = []   // 日志显示列
      let _hideCol = []      // 隐藏及合并列中字段的uuid集
      let colMap = new Map()
      let statFields = []    // 合计字段信息
      // 版本兼容
      config = UtilsUpdate.updateSubTable(config)
@@ -182,6 +185,9 @@
          _logcolumns.push(col)
          col.nameField && _arrField.push(col.nameField) // 链接名字段
          if (col.Hide !== 'true' && col.type === 'number' && col.sum === 'true') {
            statFields.push(col)
          }
        }
        if (col.type === 'colspan' && col.sublist) { // 筛选隐藏列
          _hideCol = _hideCol.concat(col.sublist)
@@ -247,6 +253,7 @@
      config.setting.execute = config.setting.default !== 'false'     // 默认sql是否执行,转为boolean 统一格式
      config.setting.customScript = ''                                // 自定义脚本
      if (config.setting.interType === 'system') {
      if (config.setting.scripts && config.setting.scripts.length > 0) {
        let _customScript = ''
        config.setting.scripts.forEach(item => {
@@ -276,11 +283,13 @@
        config.setting.dataresource = config.setting.dataresource.replace(/@\$|\$@/ig, '')
        config.setting.customScript = config.setting.customScript.replace(/@\$|\$@/ig, '')
      }
      }
      this.setState({
        loadingview: false,
        chartId: chartId,
        config: config,
        statFields: statFields,
        setting: config.setting,
        searchlist: config.search,
        actions: _actions,
@@ -291,6 +300,7 @@
      }, () => {
        if (config.setting.onload !== 'false' && valid) { // 初始化可加载
          this.loadmaindata()
          this.getStatFieldsValue()
        }
      })
    } else {
@@ -362,6 +372,56 @@
  }
  /**
   * @description 获取合计字段值
   */
  getStatFieldsValue = () => {
    const { mainSearch, BID } = this.props
    const { setting, search, orderBy, statFields } = this.state
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
      searches = [...mainSearch, ...searches]
    }
    if (statFields.length === 0 || setting.interType !== 'system' || !setting.dataresource) return
    let requireFields = search.filter(item => item.required && (!item.value || item.value.length === 0))
    if (requireFields.length > 0) {
      return
    }
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, BID, this.props.menuType, this.props.dataManager)
    Api.genericInterface(param).then(res => {
      if (res.status) {
        let _data = res.data[0]
        let values = []
        if (_data) {
          statFields.forEach(item => {
            if (_data[item.field] || _data[item.field] === 0) {
              values.push({label: item.label, value: _data[item.field]})
            }
          })
        }
        this.setState({
          statFValue: values
        })
      } else {
        this.setState({
          statFValue: []
        })
        notification.error({
          top: 92,
          message: res.message,
          duration: 10
        })
      }
    })
  }
  /**
   * @description 搜索条件改变时,重置表格数据
   * 含有初始不加载的页面,修改设置
   */
@@ -373,6 +433,7 @@
      resetTable: !this.state.resetTable
    }, () => {
      this.loadmaindata()
      this.getStatFieldsValue()
    })
  }
@@ -408,6 +469,7 @@
      resetTable: !this.state.resetTable
    }, () => {
      this.loadmaindata()
      this.getStatFieldsValue()
    })
  }
@@ -561,6 +623,7 @@
                    total={this.state.total}
                    MenuID={this.props.MenuID}
                    loading={this.state.loading}
                    statFValue={this.state.statFValue}
                    refreshdata={this.refreshbytable}
                    buttonTrigger={this.buttonTrigger}
                    resetTable={this.state.resetTable}
src/tabviews/zshare/normalTable/index.jsx
@@ -5,6 +5,7 @@
import {connect} from 'react-redux'
import { Table, message, Affix, Button, Typography, Modal, Icon } from 'antd'
import Utils from '@/utils/utils.js'
import { modifyTabview } from '@/store/action'
import '@/assets/css/table.scss'
import './index.scss'
@@ -19,6 +20,7 @@
  static propTpyes = {
    tableId: PropTypes.string,     // 列表Id
    resetTable: PropTypes.bool,    // 表格重置
    statFValue: PropTypes.any,     // 合计字段数据
    pageSize: PropTypes.any,       // 每页数据
    dict: PropTypes.object,        // 字典项
    config: PropTypes.object,      // 页面配置
@@ -44,7 +46,8 @@
    imgSrc: '',           // 图片路径
    lineMarks: null,      // 行标记
    colMap: null,         // 列信息(全部)
    activeIndex: null     // 标记当前选中行
    activeIndex: null,    // 标记当前选中行
    rowspan: null         // 行合并字段信息
  }
  UNSAFE_componentWillMount () {
@@ -55,6 +58,7 @@
    let colMap = new Map() // 用于获取字段信息
    let radio = 5          // 虚化比例
    let _format = false    // 是否虚化处理
    let rowspan = null
    if (window.GLOB.dataFormat && menuType !== 'HS' && memberLevel) {
      _format = true
@@ -110,7 +114,34 @@
        }
      }
      let cell = {
      let cell = null
      if (item.type === 'colspan' && item.unfold === 'true') {
        cell = {title: item.label, children: []}
        item.subColumn.forEach(col => {
          if (col.rowspan === 'true') {
            rowspan = col
          }
          cell.children.push({
            align: col.Align,
            title: col.label,
            dataIndex: col.field || col.uuid,
            key: col.uuid,
            width: col.Width || 120,
            render: (text, record) => {
              return this.getContent(col, record)
            }
          })
        })
      } else {
        if (item.rowspan === 'true') {
          rowspan = item
        }
        cell = {
        align: item.Align,
        dataIndex: item.field || item.uuid,
        title: item.label,
@@ -118,6 +149,7 @@
        width: item.Width || 120,
        render: (text, record) => {
          return this.getContent(item, record)
          }
        }
      }
@@ -136,7 +168,8 @@
      columns: _columns,
      pageSize: pageSize ? pageSize : 10,
      lineMarks: lineMarks,
      colMap: colMap
      colMap: colMap,
      rowspan: rowspan
    })
  }
@@ -330,6 +363,21 @@
      }
      if (item.linkThdMenu) {
        if (item.rowspan === 'true') {
          return {
            children: (
              <div className={className}>
                <div className="baseboard link-menu" onDoubleClick={() => this.triggerLink(item, record)}></div>
                <div className="content link-menu" style={{ minWidth: (item.Width || 120) + 'px' }} onDoubleClick={() => this.triggerLink(item, record)}>
                  {content}
                </div>
              </div>
            ),
            props: {
              rowSpan: record.$$rowspan,
            }
          }
        }
        return (
          <div className={className}>
            <div className="baseboard link-menu" onDoubleClick={() => this.triggerLink(item, record)}></div>
@@ -339,6 +387,21 @@
          </div>
        )
      } else {
        if (item.rowspan === 'true') {
          return {
            children: (
              <div className={className}>
                <div className="baseboard"></div>
                <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
                  {content}
                </div>
              </div>
            ),
            props: {
              rowSpan: record.$$rowspan,
            }
          }
        }
        return (
          <div className={className}>
            <div className="baseboard"></div>
@@ -872,8 +935,8 @@
  }
  render() {
    const { setting, pickup } = this.props
    const { selectedRowKeys, lineMarks, colMap, activeIndex } = this.state
    const { setting, pickup, statFValue } = this.props
    const { selectedRowKeys, lineMarks, colMap, activeIndex, rowspan } = this.state
    // 设置表格选择属性:单选、多选、不可选
    let rowSelection = null
@@ -907,6 +970,35 @@
      _data = _data.filter((item, index) => selectedRowKeys.includes(index))
    }
    if (rowspan) {
      let marks = {}
      let premark = {val: '', mark: ''}
      _data = _data.map(item => {
        if (item[rowspan.field]) {
          if (item[rowspan.field] !== premark.val) {
            premark = {val: item[rowspan.field], mark: Utils.getuuid()}
            marks[premark.mark] = 1
            item.$$mark = premark.mark
          } else {
            marks[premark.mark]++
            item.$$mark = premark.mark
          }
        } else {
          item.$$rowspan = 1
        }
        return item
      })
      _data = _data.map(item => {
        if (item.$$mark) {
          item.$$rowspan = marks[item.$$mark]
          marks[item.$$mark] = 0
        }
        return item
      })
    }
    let _pagination = false
    if (setting.laypage !== 'false') {
      _pagination = {
@@ -917,6 +1009,12 @@
        total: this.props.total,
        showTotal: (total, range) => `${range[0]}-${range[1]} ${this.props.dict['main.pagination.of']} ${total} ${this.props.dict['main.pagination.items']}`
      }
    }
    let _footer = ''
    if (statFValue && statFValue.length > 0) {
      _footer = statFValue.map(f => `${f.label}(合计):${f.value}`).join(';')
    }
    return (
@@ -1006,6 +1104,7 @@
          onChange={this.changeTable}
          pagination={_pagination}
        />
        {_footer ? <div className={'normal-table-footer ' + (_pagination ? 'pagination' : '')}>{_footer}</div> : null}
        <Modal
          className="image-scale-modal"
          visible={this.state.imgShow}
src/tabviews/zshare/normalTable/index.scss
@@ -1,5 +1,20 @@
.normal-data-table {
  position: relative;
  padding: 0 0px 30px;
  .normal-table-footer {
    padding: 10px 0px;
    color: rgba(0, 0, 0, 0.65);
  }
  .normal-table-footer.pagination {
    position: absolute;
    bottom: 40px;
  }
  >.ant-table-wrapper {
    position: relative;
    z-index: 1;
  }
  table {
    max-width: 100%;
    width: 100%;
@@ -40,18 +55,7 @@
  .ant-table-body {
    overflow-x: auto!important;
    min-height: 90px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    border-top: none;
    border-bottom: none;
    table {
      border-left: 0;
      .ant-table-thead > tr > th:last-child {
        border-right: 0;
      }
      .ant-table-tbody > tr > td:last-child {
        border-right: 0;
      }
      .ant-table-tbody > tr > td {
        vertical-align: top;
        .content {
src/templates/modalconfig/index.jsx
@@ -399,8 +399,6 @@
    if (type === 'copy') {
      card.originUuid = card.uuid
      card.uuid = Utils.getuuid()
      card.label = card.label + '(copy)'
      card.field = card.field + '(copy)'
      card.focus = true
      // 复制到剪切板
src/templates/sharecomponent/columncomponent/colspanform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, InputNumber, Select, Radio } from 'antd'
import { Form, Row, Col, Input, InputNumber, Select, Radio, Tooltip, Icon } from 'antd'
import { formRule } from '@/utils/option.js'
import TransferForm from '@/templates/zshare/transferform'
import './index.scss'
@@ -62,6 +62,7 @@
  }
  render() {
    const { card } = this.props
    const { getFieldDecorator } = this.props.form
    const formItemLayout = {
      labelCol: {
@@ -79,7 +80,7 @@
          <Col span={12}>
            <Form.Item label={this.props.dict['model.name']}>
              {getFieldDecorator('label', {
                initialValue: this.props.card.label,
                initialValue: card.label,
                rules: [
                  {
                    required: true,
@@ -109,7 +110,7 @@
          <Col span={12}>
            <Form.Item label={this.props.dict['model.form.align']}>
              {getFieldDecorator('Align', {
                initialValue: this.props.card.Align,
                initialValue: card.Align,
                rules: [
                  {
                    required: true,
@@ -130,7 +131,7 @@
          <Col span={12}>
            <Form.Item label={this.props.dict['model.form.columnWidth']}>
              {getFieldDecorator('Width', {
                initialValue: this.props.card.Width,
                initialValue: card.Width,
                rules: [
                  {
                    required: true,
@@ -141,9 +142,26 @@
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="选择显示分组,表格会展开添加分组的子列,此时排列方式会失效。">
                <Icon type="question-circle" />
                显示分组
              </Tooltip>
            }>
              {getFieldDecorator('unfold', {
                initialValue: card.unfold || 'false'
              })(
                <Radio.Group>
                  <Radio value="true">{this.props.dict['model.true']}</Radio>
                  <Radio value="false">{this.props.dict['model.false']}</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={this.props.dict['model.hidden']}>
              {getFieldDecorator('Hide', {
                initialValue: this.props.card.Hide || 'false',
                initialValue: card.Hide || 'false',
                rules: [
                  {
                    required: true,
@@ -161,7 +179,7 @@
          <Col span={12}>
            <Form.Item label={this.props.dict['header.form.order']}>
              {getFieldDecorator('order', {
                initialValue: this.props.card.order,
                initialValue: card.order,
                rules: [
                  {
                    required: true,
@@ -182,7 +200,7 @@
            </Form.Item>
          </Col>
          <Col span={24}>
            <TransferForm columns={this.props.columns} ref="column-transfer" selected={this.props.card.sublist}/>
            <TransferForm columns={this.props.columns} ref="column-transfer" selected={card.sublist}/>
          </Col>
        </Row>
      </Form>
src/templates/sharecomponent/columncomponent/colspanform/index.scss
@@ -5,4 +5,9 @@
      width: 100%;
    }
  }
  .anticon-question-circle {
    color: #c49f47;
    position: relative;
    left: -3px;
  }
}
src/templates/sharecomponent/columncomponent/columnform/index.jsx
@@ -8,8 +8,8 @@
import './index.scss'
const columnTypeOptions = {
  text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'fieldlength', 'blacklist', 'linkmenu'],
  number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'linkmenu'],
  text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'fieldlength', 'blacklist', 'linkmenu', 'rowspan'],
  number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'linkmenu', 'sum'],
  link: ['label', 'field', 'type', 'nameField', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'fieldlength', 'blacklist'],
  textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'fieldlength', 'blacklist'],
  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'maxHeight']
@@ -191,7 +191,12 @@
      } else if (item.type === 'radio') {
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.label}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal,
                rules: [
src/templates/sharecomponent/columncomponent/index.jsx
@@ -229,6 +229,7 @@
      this.columnFormRef.handleConfirm().then(res => {
        let fieldrepet = false // 字段重复
        let labelrepet = false // 提示文字重复
        let rowspanLabel = ''  // 已存在的行合并字段
        _columnlist = _columnlist.filter(item => !item.origin || item.uuid === res.uuid) // 去除初始列
@@ -238,6 +239,8 @@
              fieldrepet = true
            } else if (item.label === res.label) {
              labelrepet = true
            } else if (res.rowspan === 'true' && item.rowspan === 'true') {
              rowspanLabel = item.label
            }
          }
@@ -262,6 +265,13 @@
            duration: 5
          })
          return
        } else if (rowspanLabel) {
          notification.warning({
            top: 92,
            message: `已存在行合并字段《${rowspanLabel}》!`,
            duration: 5
          })
          return
        }
        if (!card.focus && (card.type !== res.type || (res.field && card.field !== res.field))) {
src/templates/zshare/formconfig.jsx
@@ -1144,6 +1144,36 @@
      }]
    },
    {
      type: 'radio',
      key: 'rowspan',
      label: '行合并',
      initVal: card.rowspan || 'false',
      tooltip: '相邻行信息相同时,单元格合并。注:为防止表格信息错乱,行合并只能添加一个字段。',
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    {
      type: 'radio',
      key: 'sum',
      label: '显示合计',
      initVal: card.sum || 'false',
      tooltip: '合计信息只在使用系统数据源,且当前列未隐藏时有效。',
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    {
      type: 'number',
      key: 'decimal',
      min: 0,
src/utils/utils-datamanage.js
@@ -183,4 +183,97 @@
    return param
  }
  /**
   * @description 获取系统存储过程 sPC_Get_TableData 合计值的参数
   */
  static getStatQueryDataParams (setting, statFields, search, orderBy, pageIndex, pageSize, menuType, dataManager) {
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
      arr_field: statFields.map(col => col.field).join(','),
      default_sql: setting.execute ? 'true' : 'false'
    }
    let _dataresource = setting.dataresource
    let _customScript = ''
    if (setting.customScript) {
      _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000) select @ErrorCode='',@retmsg =''
        ${setting.customScript}
      `
    }
    let regoptions = null
    if (setting.queryType === 'statistics' || _customScript) {
      let allSearch = Utils.getAllSearchOptions(search)
      regoptions = allSearch.map(item => {
        return {
          reg: new RegExp('@' + item.key + '@', 'ig'),
          value: `'${item.value}'`
        }
      })
      regoptions.push({
        reg: new RegExp('@orderBy@', 'ig'),
        value: orderBy
      }, {
        reg: new RegExp('@pageSize@', 'ig'),
        value: 999999
      }, {
        reg: new RegExp('@pageIndex@', 'ig'),
        value: 1
      })
    }
    let _search = Utils.joinMainSearchkey(search)
    if (_search) {
      _search = 'where ' + _search
    }
    if (setting.queryType === 'statistics') { // 统计数据源,内容替换
      regoptions.forEach(item => {
        _dataresource = _dataresource.replace(item.reg, item.value)
      })
    }
    if (_customScript) {
      regoptions.forEach(item => {
        _customScript = _customScript.replace(item.reg, item.value)
      })
    }
    let LText = ` select ${statFields.map(col => `sum(${col.field}) as ${col.field}`).join(',')} from ${_dataresource} ${_search} `
    if (_customScript) {
      LText = `${LText}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
      `
    }
    // 测试系统打印查询语句
    if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) {
      _customScript &&  console.log(`${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`)
      LText &&  console.log(LText)
    }
    param.custom_script = Utils.formatOptions(_customScript)
    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 = ''
    if (menuType === 'HS') { // 云端数据验证
      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
    }
    // 数据管理权限
    if (dataManager) {
      param.dataM = 'Y'
    }
    return param
  }
}