king
2021-08-31 12add7610dc9a998b4296e3f203fa858694bdbd3
2021-08-31
17个文件已修改
150 ■■■■ 已修改文件
src/components/tabview/index.jsx 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/changeuserbutton/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/cardcomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/actionform/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx
@@ -49,7 +49,7 @@
    dict: sessionStorage.getItem('lang') !== 'en-US' ? mzhCN : menUS,
  }
  handleTabview = (e, menu) => {
  handleTabview = (e, menu, index) => {
    e.stopPropagation()
    // 关闭tab页,重新选择显示页
    let tabs = fromJS(this.state.tabviews).toJS()
@@ -57,10 +57,37 @@
      return tab.MenuID !== menu.MenuID
    })
    
    if (menu.selected && tabs[0]) {
      tabs[0].selected = true
    if (menu.selected && tabs[index - 1]) {
      tabs[index - 1].selected = true
      this.setState({
        activeId: tabs[0].MenuID || ''
        activeId: tabs[index - 1].MenuID || ''
      })
      if (this.props.isiframe) {
        this.props.toggleIsiframe(false)
      }
    }
    this.props.modifyTabview(tabs)
  }
  closeTabView = (id) => {
    // 关闭tab页,重新选择显示页
    let tabs = fromJS(this.state.tabviews).toJS()
    let index = 0
    tabs = tabs.filter((tab, i) => {
      if (tab.MenuID === id) {
        index = i
        return false
      } else {
        return true
      }
    })
    if (tabs[index - 1]) {
      tabs[index - 1].selected = true
      this.setState({
        activeId: tabs[index - 1].MenuID || ''
      })
      if (this.props.isiframe) {
@@ -214,6 +241,7 @@
      }
      this.props.modifyTabview([home])
    }
    MKEmitter.addListener('closeTabView', this.closeTabView)
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
@@ -257,6 +285,7 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('closeTabView', this.closeTabView)
  }
  render () {
@@ -267,7 +296,7 @@
        <div className="content-header">
          {tabviews && tabviews.length > 0 &&
            <Tabs activeKey={activeId}>
              {tabviews.map(view => {
              {tabviews.map((view, index) => {
                return (
                  <Tabs.TabPane
                    tab={
@@ -277,7 +306,7 @@
                          {view.MenuName}
                        </span>
                        {view.type !== 'Home' ?
                          <Icon type="close" onClick={(e) => {this.handleTabview(e, view)}}/> : null
                          <Icon type="close" onClick={(e) => {this.handleTabview(e, view, index)}}/> : null
                        }
                      </span>
                    }
src/menu/components/card/cardcellcomponent/index.jsx
@@ -516,6 +516,8 @@
        MKEmitter.emit('changeEditMenu', {MenuID: btn.uuid, copyMenuId: btn.copyMenuId})
      } else if (btn.OpenType === 'innerpage' && btn.pageTemplate === 'linkpage') {
        MKEmitter.emit('changeEditMenu', {MenuID: btn.linkmenu})
      } else {
        this.handleElement(item)
      }
    } else {
      if (btn.link === 'page') {
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -169,7 +169,7 @@
      }
    } else if (_opentype === 'funcbutton') {
      if (_funcType === 'print') {
        _options.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError', 'resetPageIndex')
        _options.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError', 'resetPageIndex', 'controlField', 'controlVal')
        if (_intertype === 'outer') {
          _options.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
        } else if (_intertype === 'inner') {
@@ -177,6 +177,8 @@
        }
      } else if (_funcType === 'mkBinding' || _funcType === 'mkUnBinding') {
        _options.push('execSuccess', 'execError')
      } else if (_funcType === 'closetab') {
        _options.push('refreshTab')
      }
    } else if (_opentype !== 'popview' && _opentype !== 'tab') {
      if (_intertype === 'custom') {
@@ -196,14 +198,8 @@
      }
    }
    if (_Ot !== 'notRequired' && _opentype !== 'excelOut') {
      if (this.state.appType === 'mob') {
        if (_opentype !== 'funcbutton') {
          _options.push('controlField', 'controlVal')
        }
      } else {
        _options.push('controlField', 'controlVal')
      }
    if (_Ot !== 'notRequired' && _opentype !== 'excelOut' && _opentype !== 'funcbutton') {
      _options.push('controlField', 'controlVal')
    }
    if (_Ot === 'requiredSgl' && ['pop', 'prompt', 'exec'].includes(_opentype)) {
      _options.push('swipe')
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -56,7 +56,8 @@
  let funTypes = [
    { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
    { value: 'print', text: '标签打印' }
    { value: 'print', text: '标签打印' },
    { value: 'closetab', text: '标签关闭' },
  ]
  
  if (isApp) {
@@ -117,7 +118,7 @@
      options: opentypes
    },
    {
      type: 'radio',
      type: 'select',
      key: 'funcType',
      label: Formdict['header.form.funcType'],
      initVal: card.funcType || '',
@@ -337,6 +338,15 @@
      options: menulist
    },
    {
      type: 'cascader',
      key: 'refreshTab',
      label: '刷新标签',
      initVal: card.refreshTab || [],
      required: false,
      forbid: isApp,
      options: menulist
    },
    {
      type: 'select',
      key: 'execSuccess',
      label: Formdict['model.form.afterSuccess'],
src/menu/components/share/actioncomponent/index.jsx
@@ -415,11 +415,7 @@
    } else if (element.OpenType === 'innerpage' && element.pageTemplate === 'linkpage') {
      MKEmitter.emit('changeEditMenu', {MenuID: element.linkmenu})
    } else {
      notification.warning({
        top: 92,
        message: '此按钮无子配置项!',
        duration: 5
      })
      this.handleAction(element)
    }
  }
src/menu/components/table/normal-table/columns/index.jsx
@@ -53,7 +53,7 @@
    if (index !== undefined) {
      return connectDragSource(
        connectDropTarget(<th {...restProps} index={index} style={{ cursor: 'move', textAlign: align }}>
        connectDropTarget(<th {...restProps} index={index} style={{ cursor: 'move', textAlign: align }} onDoubleClick={() => column && this.props.editColumn(column)}>
          <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
            <div className="mk-popover-control">
              {column && ['custom', 'colspan', 'action'].includes(column.type) ?
@@ -71,7 +71,7 @@
      )
    } else if (column) {
      return (
        <th {...restProps} key={column.uuid}>
        <th {...restProps} key={column.uuid} onDoubleClick={() => this.props.editColumn(column)}>
          <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
            <div className="mk-popover-control">
              {column && ['custom', 'colspan'].includes(column.type) ?
src/tabviews/commontable/index.jsx
@@ -973,12 +973,16 @@
    }
  }
  reloadMenuView = (menuId) => {
  reloadMenuView = (menuId, position) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.reloadview()
    if (position === 'table') {
      this.reloadtable()
    } else {
      this.reloadview()
    }
  }
  resetActiveMenu = (menuId) => {
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -709,7 +709,7 @@
          </Col>
        )
      } else if (card.OpenType === 'funcbutton') {
        if (card.funcType === 'changeuser') {
        if (card.funcType === 'changeuser' || card.funcType === 'closetab') {
          return (
            <Col key={card.uuid} className="mk-cell-btn" span={card.width}>
              <ChangeUserButton
src/tabviews/custom/index.jsx
@@ -575,6 +575,8 @@
          if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
            cell = this.getPrinter(cell, item.uuid)
          } else if (cell.OpenType === 'funcbutton' && cell.funcType === 'closetab') { // 标签关闭按钮,重置菜单Id
            cell.$menuId = this.props.MenuID
          }
          if (cell.btnstyle) { // 兼容
@@ -609,6 +611,8 @@
              if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
                cell = this.getPrinter(cell, item.uuid)
              } else if (cell.OpenType === 'funcbutton' && cell.funcType === 'closetab') { // 标签关闭按钮,重置菜单Id
                cell.$menuId = this.props.MenuID
              }
              if (card.btnstyle) { // 兼容
                card.style = card.style || {}
@@ -632,6 +636,8 @@
              if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
                cell = this.getPrinter(cell, item.uuid)
              } else if (cell.OpenType === 'funcbutton' && cell.funcType === 'closetab') { // 标签关闭按钮,重置菜单Id
                cell.$menuId = this.props.MenuID
              }
              if (card.btnstyle) { // 兼容
                card.style = card.style || {}
@@ -659,6 +665,8 @@
            if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
              cell = this.getPrinter(cell, item.uuid)
            } else if (cell.OpenType === 'funcbutton' && cell.funcType === 'closetab') { // 标签关闭按钮,重置菜单Id
              cell.$menuId = this.props.MenuID
            }
          } else if (['text', 'number', 'link'].includes(cell.eleType) && !cell.height) {
            cell.innerHeight = 'auto'
@@ -681,6 +689,8 @@
              if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
                cell = this.getPrinter(cell, item.uuid)
              } else if (cell.OpenType === 'funcbutton' && cell.funcType === 'closetab') { // 标签关闭按钮,重置菜单Id
                cell.$menuId = this.props.MenuID
              }
              if (card.btnstyle) { // 兼容
@@ -707,6 +717,8 @@
            if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置
              cell = this.getPrinter(cell, item.uuid)
            } else if (cell.OpenType === 'funcbutton' && cell.funcType === 'closetab') { // 标签关闭按钮,重置菜单Id
              cell.$menuId = this.props.MenuID
            }
            if (cell.btnstyle) { // 兼容
src/tabviews/zshare/actionList/changeuserbutton/index.jsx
@@ -15,6 +15,7 @@
  static propTpyes = {
    show: PropTypes.any,              // 按钮显示样式控制
    position: PropTypes.any,          // 按钮位置,工具栏为toolbar
    MenuID: PropTypes.any,            // 菜单ID
    BID: PropTypes.string,            // 主表ID
    btn: PropTypes.object,            // 按钮
    selectedData: PropTypes.any,      // 子表中选择数据
@@ -83,10 +84,19 @@
   * @description 触发按钮操作
   */
  actionTrigger = (triggerId, record) => {
    const { setting, selectedData, btn } = this.props
    const { setting, selectedData, btn, MenuID } = this.props
    const { loading } = this.state
    
    if ((triggerId && btn.uuid !== triggerId) || loading) return
    if (btn.funcType === 'closetab') {
      MKEmitter.emit('closeTabView', MenuID || btn.$menuId)
      if (btn.refreshTab && btn.refreshTab.length > 0) {
        MKEmitter.emit('reloadMenuView', btn.refreshTab[btn.refreshTab.length - 1], 'table')
      }
      return
    }
    
    let data = record || selectedData || []
src/tabviews/zshare/actionList/index.jsx
@@ -121,13 +121,14 @@
          />
        )
      } else if (item.OpenType === 'funcbutton') {
        if (item.funcType === 'changeuser') {
        if (item.funcType === 'changeuser' || item.funcType === 'closetab') {
          return (
            <ChangeUserButton
              key={item.uuid}
              show={item.show || 'actionList'}
              BID={BID}
              btn={item}
              MenuID={MenuID}
              setting={setting}
              position="toolbar"
              selectedData={selectedData}
src/tabviews/zshare/cardcomponent/index.jsx
@@ -181,7 +181,7 @@
          />
        )
      } else if (item.OpenType === 'funcbutton') {
        if (item.funcType === 'changeuser') {
        if (item.funcType === 'changeuser' || item.funcType === 'closetab') {
          return (
            <ChangeUserButton
              key={item.uuid}
src/tabviews/zshare/mutilform/index.jsx
@@ -778,7 +778,7 @@
    }
    return (
      <Form className={'main-form-field ' + _align} id="main-form-box">
      <Form className={'main-form-field ' + _align}>
        <Row gutter={24}>{this.getFields()}</Row>
      </Form>
    )
src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -202,12 +202,14 @@
      }
    } else if (_opentype === 'funcbutton') {
      if (_funcType === 'print') {
        _options.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError')
        _options.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError', 'controlField', 'controlVal')
        if (_intertype === 'outer') {
          _options.push('innerFunc', 'sysInterface', 'interface', 'proInterface', 'outerFunc', 'callbackFunc')
        } else if (_intertype === 'inner') {
          _options.push('innerFunc')
        }
      } else if (_funcType === 'closetab') {
        _options.push('refreshTab')
      }
    } else if (_opentype !== 'popview') { // 打开方式不是弹窗页面时
      if (_intertype === 'custom') {
@@ -230,7 +232,7 @@
      _options.push('resetPageIndex')
    }
    if (_Ot !== 'notRequired' && _opentype !== 'excelOut') {
    if (_Ot !== 'notRequired' && _opentype !== 'excelOut' && _opentype !== 'funcbutton') {
      _options.push('controlField', 'controlVal')
    }
@@ -613,6 +615,7 @@
                  showSearch
                  filterOption={(input, option) => option.props.children[2].toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  onChange={(value) => {this.optionChange(item.key, value)}}
                  allowClear={item.key === 'icon'}
                  getPopupContainer={() => document.getElementById('winter')}
                >
                  {item.options.map((option, index) =>
src/templates/sharecomponent/actioncomponent/index.jsx
@@ -836,11 +836,7 @@
    if (!el.origin && (el.OpenType === 'pop' || el.execMode === 'pop' || el.OpenType === 'popview' || (el.OpenType === 'tab' && el.tabTemplate === 'FormTab'))) {
      this.props.setSubConfig(el)
    } else {
      notification.warning({
        top: 92,
        message: '此按钮无子配置项!',
        duration: 5
      })
      this.handleAction(el)
    }
  }
src/templates/sharecomponent/columncomponent/dragcolumn/card.jsx
@@ -37,7 +37,7 @@
      </div>
    } trigger="hover">
      <div className="page-card" style={{ flex: card.Width, opacity: opacity}}>
        <div ref={node => drag(drop(node))}>
        <div ref={node => drag(drop(node))} onDoubleClick={() => editCard(id)}>
          <span className="ant-table-header-column">
            <div className="ant-table-column-sorters" title={card.label} style={{textAlign: card.Align}}>
              <span className="ant-table-column-title">{card.label}</span>
src/templates/zshare/formconfig.jsx
@@ -871,7 +871,7 @@
      options: opentypes
    },
    {
      type: 'radio',
      type: 'select',
      key: 'funcType',
      label: Formdict['header.form.funcType'],
      initVal: card.funcType || '',
@@ -882,6 +882,9 @@
      }, {
        value: 'print',
        text: '标签打印'
      }, {
        value: 'closetab',
        text: '标签关闭'
      }]
    },
    {
@@ -1156,6 +1159,14 @@
      options: menulist
    },
    {
      type: 'cascader',
      key: 'refreshTab',
      label: '刷新标签',
      initVal: card.refreshTab || [],
      required: false,
      options: menulist
    },
    {
      type: 'radio',
      key: 'afterExecSuccess',
      label: Formdict['header.form.afterExecSuccess'],