king
2021-01-07 2292d1826e69e21c8a411c217faef635fe57d458
src/tabviews/subtable/index.jsx
@@ -183,10 +183,6 @@
            item = {...item, ...userConfig.action[item.uuid]}
          }
          if (item.execMode) {
            item.OpenType = 'funcbutton'
          }
          if (item.OpenType === 'funcbutton' && item.funcType === 'print' && item.verify && item.printer) {
            item.verify.defaultPrinter = item.printer.defaultPrinter || ''
            if (item.verify.printerTypeList && item.printer.printerList) {
@@ -258,9 +254,7 @@
      config.action.forEach(item => {
        item.logLabel = Tab.label + '-' + item.label // 用于sPC_TableData_InUpDe记录操作按钮
        if (item.execMode) {
          item.OpenType = 'funcbutton'
        }
        item.$menuId = this.props.MenuID
        if (item.position === 'toolbar') {
          _actions.push(item)
@@ -675,21 +669,23 @@
  /**
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  getexceloutparam = () => {
    const { Tab, mainSearch } = this.props
  getexceloutparam = (menuId, btnId) => {
    const { Tab, mainSearch, MenuID } = this.props
    const { arr_field, orderBy, search, setting} = this.state
    if (MenuID !== menuId) return
    let searches = search
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
      searches = [...mainSearch, ...search]
    }
    return {
    MKEmitter.emit('execExcelout', MenuID, btnId, {
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: searches,
      menuName: Tab.label
    }
    })
  }
  /**
@@ -748,6 +744,7 @@
  componentDidMount () {
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('getexceloutparam', this.getexceloutparam)
  }
  /**
@@ -758,6 +755,7 @@
      return
    }
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('getexceloutparam', this.getexceloutparam)
  }
  render() {
@@ -794,7 +792,6 @@
                      selectedData={selectedData}
                      refreshdata={this.refreshbyaction}
                      ContainerId={this.props.ContainerId}
                      getexceloutparam={this.getexceloutparam}
                    />
                  </div>
                  <div className="subtable-box">
@@ -840,7 +837,6 @@
                    tableId={this.props.Tab.uuid}
                    refreshdata={this.refreshbyaction}
                    handleTableId={this.handleTableId}
                    getexceloutparam={this.getexceloutparam}
                  />
                </Col>
              )
@@ -853,7 +849,6 @@
                    BID={this.props.BID}
                    Tab={this.props.Tab}
                    data={this.state.data}
                    getexceloutparam={this.getexceloutparam}
                    loading={this.state.loading}
                  />
                </Col>