king
2020-12-23 bc4308e222af3e19f721a129ab132fb69909778e
2020-12-23
13个文件已修改
273 ■■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.jsx 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/tabcomponents/index.jsx 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/menushell/index.jsx 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/fieldscomponent/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx
@@ -459,6 +459,7 @@
   * @description 按钮删除
   */
  deleteElement = (card) => {
    const { cards, cardCell, side } = this.props
    const { dict, elements } = this.state
    let _this = this
@@ -470,6 +471,12 @@
        if (card.eleType === 'button') {
          MKEmitter.emit('delButtons', [card.uuid])
        }
        if (card.OpenType === 'popview' || card.verify || card.modal) {
          card.$parentId = cardCell.uuid
          card.$side = side || ''
          MKEmitter.emit('logButton', cards.uuid, card)
        }
        _this.setState({
          elements: _elements
src/menu/components/card/data-card/index.jsx
@@ -108,6 +108,7 @@
  componentDidMount () {
    MKEmitter.addListener('submitStyle', this.getStyle)
    MKEmitter.addListener('submitModal', this.handleSave)
    MKEmitter.addListener('logButton', this.logButton)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -123,8 +124,23 @@
    }
    MKEmitter.removeListener('submitStyle', this.getStyle)
    MKEmitter.removeListener('submitModal', this.handleSave)
    MKEmitter.removeListener('logButton', this.logButton)
  }
  logButton = (id, item) => {
    const { card } = this.state
    if (id !== card.uuid) return
    let btnlog = card.btnlog || []
    btnlog.push(item)
    this.setState({
      card: {...card, btnlog}
    })
    this.props.updateConfig({...card, btnlog})
  }
  /**
   * @description 卡片行外层信息更新(数据源,样式等)
   */
@@ -166,7 +182,24 @@
      content: '确定删除卡片吗?',
      onOk() {
        card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
        let uuids = []
        cell.elements && cell.elements.forEach(c => {
          if (c.eleType === 'button') {
            uuids.push(c.uuid)
          }
        })
        cell.backElements && cell.backElements.forEach(c => {
          if (c.eleType === 'button') {
            uuids.push(c.uuid)
          }
        })
        MKEmitter.emit('delButtons', uuids)
        if (card.btnlog) {
          card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
        }
        _this.setState({card})
        _this.props.updateConfig(card)
      },
src/menu/components/card/prop-card/index.jsx
@@ -103,6 +103,7 @@
  componentDidMount () {
    MKEmitter.addListener('submitStyle', this.getStyle)
    MKEmitter.addListener('logButton', this.logButton)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -117,6 +118,21 @@
      return
    }
    MKEmitter.removeListener('submitStyle', this.getStyle)
    MKEmitter.removeListener('logButton', this.logButton)
  }
  logButton = (id, item) => {
    const { card } = this.state
    if (id !== card.uuid) return
    let btnlog = card.btnlog || []
    btnlog.push(item)
    this.setState({
      card: {...card, btnlog}
    })
    this.props.updateConfig({...card, btnlog})
  }
  /**
@@ -160,7 +176,24 @@
      content: '确定删除卡片吗?',
      onOk() {
        card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
        let uuids = []
        cell.elements && cell.elements.forEach(c => {
          if (c.eleType === 'button') {
            uuids.push(c.uuid)
          }
        })
        cell.backElements && cell.backElements.forEach(c => {
          if (c.eleType === 'button') {
            uuids.push(c.uuid)
          }
        })
        MKEmitter.emit('delButtons', uuids)
        if (card.btnlog) {
          card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
        }
        _this.setState({card})
        _this.props.updateConfig(card)
      },
src/menu/components/card/table-card/index.jsx
@@ -97,6 +97,7 @@
  componentDidMount () {
    MKEmitter.addListener('submitStyle', this.getStyle)
    MKEmitter.addListener('logButton', this.logButton)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -111,6 +112,21 @@
      return
    }
    MKEmitter.removeListener('submitStyle', this.getStyle)
    MKEmitter.removeListener('logButton', this.logButton)
  }
  logButton = (id, item) => {
    const { card } = this.state
    if (id !== card.uuid) return
    let btnlog = card.btnlog || []
    btnlog.push(item)
    this.setState({
      card: {...card, btnlog}
    })
    this.props.updateConfig({...card, btnlog})
  }
  /**
@@ -154,7 +170,20 @@
      content: '确定删除卡片吗?',
      onOk() {
        card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
        let uuids = []
        cell.elements && cell.elements.forEach(c => {
          if (c.eleType === 'button') {
            uuids.push(c.uuid)
          }
        })
        MKEmitter.emit('delButtons', uuids)
        if (card.btnlog) {
          card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
        }
        _this.setState({card})
        _this.props.updateConfig(card)
      },
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -589,8 +589,6 @@
            }
            
            values.Ot = 'notRequired'
          } else if (values.OpenType === 'popview') {
            values.createTab = true // 用于标记按钮复制时,是否复制原有标签
          } else if (values.OpenType === 'funcbutton') { // 转换打印时打开方式
            if (values.funcType === 'print') {
              values.OpenType = values.execMode
src/menu/components/share/actioncomponent/index.jsx
@@ -327,10 +327,15 @@
          MKEmitter.emit('delButtons', [card.uuid])
        }
        let btnlog = config.btnlog || []
        if (card.OpenType === 'popview' || card.verify || card.modal) {
          btnlog.push(card)
        }
        _this.setState({
          actionlist: _actionlist
        }, () => {
          _this.props.updateaction({...config, action: _actionlist})
          _this.props.updateaction({...config, action: _actionlist, btnlog})
        })
      },
      onCancel() {}
src/menu/components/table/normal-table/columns/index.jsx
@@ -341,6 +341,14 @@
    let _columns = fromJS(this.state.columns).toJS()
    _columns = this.loopDelCol(_columns, col)
    if (col.type === 'action') {
      let uuids = []
      col.elements && col.elements.forEach(c => {
        uuids.push(c.uuid)
      })
      MKEmitter.emit('delButtons', uuids)
    }
    this.setState({
      columns: _columns
    }, () => {
src/menu/components/table/normal-table/index.jsx
@@ -91,6 +91,7 @@
  componentDidMount () {
    MKEmitter.addListener('submitStyle', this.getStyle)
    MKEmitter.addListener('submitModal', this.handleSave)
    MKEmitter.addListener('logButton', this.logButton)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -106,6 +107,7 @@
    }
    MKEmitter.removeListener('submitStyle', this.getStyle)
    MKEmitter.removeListener('submitModal', this.handleSave)
    MKEmitter.removeListener('logButton', this.logButton)
  }
  /**
@@ -122,6 +124,19 @@
    this.props.updateConfig(component)
  }
  logButton = (id, item) => {
    const { card } = this.state
    if (id !== card.uuid) return
    let btnlog = card.btnlog || []
    btnlog.push(item)
    this.setState({
      card: {...card, btnlog}
    })
    this.props.updateConfig({...card, btnlog})
  }
  /**
   * @description 单个卡片信息更新
src/menu/components/tabs/tabcomponents/index.jsx
@@ -5,6 +5,7 @@
import { Empty, notification, Modal } from 'antd'
import Utils from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import Card from './card'
import './index.scss'
@@ -46,10 +47,61 @@
      })
    }
    let uuids = []
    const getUuids = (item) => {
      if (item.type === 'tabs') {
        item.subtabs.forEach(tab => {
          tab.components.forEach(c => {
            getUuids(c)
          })
        })
      } else {
        if (item.action && item.action.length) {
          item.action.forEach(act => {
            if (!act.origin) {
              uuids.push(act.uuid)
            }
          })
        }
        if (item.type === 'card') {
          item.subcards.forEach(_card => {
            _card.elements && _card.elements.forEach(cell => {
              if (cell.eleType === 'button') {
                uuids.push(cell.uuid)
              }
            })
            _card.backElements && _card.backElements.forEach(cell => {
              if (cell.eleType === 'button') {
                uuids.push(cell.uuid)
              }
            })
          })
        } else if (item.type === 'table' && item.subtype === 'tablecard') {
          item.subcards.forEach(_card => {
            _card.elements && _card.elements.forEach(cell => {
              if (cell.eleType === 'button') {
                uuids.push(cell.uuid)
              }
            })
          })
        } else if (item.type === 'table' && item.subtype === 'normaltable') {
          item.cols && item.cols.forEach(col => {
            if (col.type !== 'action') return
            col.elements && col.elements.forEach(cell => {
              uuids.push(cell.uuid)
            })
          })
        }
      }
    }
    getUuids(card)
    confirm({
      title: `确定删除《${card.name}》吗?`,
      content: hasComponent ? '当前组件中含有子组件!' : '',
      onOk() {
        MKEmitter.emit('delButtons', uuids)
        handleList({...config, components: cards.filter(item => item.uuid !== card.uuid)})
      },
      onCancel() {}
src/menu/datasource/verifycard/settingform/index.jsx
@@ -13,7 +13,7 @@
    menu: PropTypes.any,          // 菜单配置信息
    config: PropTypes.object,     // 组件配置
    setting: PropTypes.object,    // 数据源配置
    modules: PropTypes.array,     // 列设置
    modules: PropTypes.array,     // 可绑定的上级组件
    columns: PropTypes.array,     // 列设置
    scripts: PropTypes.array,     // 自定义脚本
  }
src/menu/menushell/index.jsx
@@ -5,6 +5,7 @@
import { Empty, notification, Modal } from 'antd'
import Utils from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import Card from './card'
import './index.scss'
@@ -46,10 +47,61 @@
      })
    }
    let uuids = []
    const getUuids = (item) => {
      if (item.type === 'tabs') {
        item.subtabs.forEach(tab => {
          tab.components.forEach(c => {
            getUuids(c)
          })
        })
      } else {
        if (item.action && item.action.length) {
          item.action.forEach(act => {
            if (!act.origin) {
              uuids.push(act.uuid)
            }
          })
        }
        if (item.type === 'card') {
          item.subcards.forEach(_card => {
            _card.elements && _card.elements.forEach(cell => {
              if (cell.eleType === 'button') {
                uuids.push(cell.uuid)
              }
            })
            _card.backElements && _card.backElements.forEach(cell => {
              if (cell.eleType === 'button') {
                uuids.push(cell.uuid)
              }
            })
          })
        } else if (item.type === 'table' && item.subtype === 'tablecard') {
          item.subcards.forEach(_card => {
            _card.elements && _card.elements.forEach(cell => {
              if (cell.eleType === 'button') {
                uuids.push(cell.uuid)
              }
            })
          })
        } else if (item.type === 'table' && item.subtype === 'normaltable') {
          item.cols && item.cols.forEach(col => {
            if (col.type !== 'action') return
            col.elements && col.elements.forEach(cell => {
              uuids.push(cell.uuid)
            })
          })
        }
      }
    }
    getUuids(card)
    confirm({
      title: `确定删除《${card.name}》吗?`,
      content: hasComponent ? '当前组件中含有子组件!' : '',
      onOk() {
        MKEmitter.emit('delButtons', uuids)
        handleList({...menu, components: cards.filter(item => item.uuid !== card.uuid)})
      },
      onCancel() {}
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -387,7 +387,8 @@
    columns: null,        // 显示列
    activeIndex: null,    // 标记当前选中行
    rowspans: null,       // 行合并字段信息
    pickup: false
    pickup: false,        // 收起未选择项
    orderfields: {}       // 排序id与field转换
  }
  UNSAFE_componentWillMount () {
@@ -395,6 +396,7 @@
    let radio = 5          // 虚化比例
    let _format = false    // 是否虚化处理
    let rowspans = []
    let orderfields = {}
    if (window.GLOB.dataFormat && menuType !== 'HS' && memberLevel) {
      _format = true
@@ -424,7 +426,11 @@
          if (item.marks && item.marks.length === 0) {
            item.marks = ''
          }
          if (item.field) {
            orderfields[item.uuid] = item.field
          }
          cell = {
            align: item.Align,
            dataIndex: item.uuid,
@@ -453,7 +459,8 @@
    this.setState({
      columns: _columns,
      rowspans
      rowspans,
      orderfields
    })
  }
@@ -606,6 +613,8 @@
  }
  changeTable = (pagination, filters, sorter) => {
    const { orderfields } = this.state
    this.setState({
      pageIndex: pagination.current,
      pageSize: pagination.pageSize,
@@ -613,6 +622,9 @@
      activeIndex: null,
      pickup: false
    })
    sorter.field = orderfields[sorter.field] || ''
    this.props.refreshdata(pagination, filters, sorter)
  }
src/templates/sharecomponent/fieldscomponent/index.jsx
@@ -242,23 +242,24 @@
    } else if (type === 'form') {
      if (config.groups.length > 1) {
        config.groups.forEach(group => {
          let _items = []
          group.sublist.forEach(item => {
            if (columnsMap.has(item.field.toLowerCase())) {
              let cell = columnsMap.get(item.field.toLowerCase())
      
              if (cell.selected && cell.type === item.type) { // 数据选择状态及类型未修改时,直接添加
                items.push(item)
                _items.push(item)
              } else if (cell.selected) {                     // 数据类型修改时,重置类型及初始值
                item.type = cell.type
                item.initval = ''
                items.push(item)
                _items.push(item)
              }
              columnsMap.delete(item.field.toLowerCase())
            } else if (!item.origin) {                        // 过滤示例项
              items.push(item)
              _items.push(item)
            }
          })
          group.sublist = items
          group.sublist = _items
        })
        
        let _columns = [...columnsMap.values()]