king
2022-05-29 f38b3321250222b81a797a538d9c3efa9f8a0ecb
src/tabviews/zshare/cardcomponent/index.jsx
@@ -111,13 +111,30 @@
    
    let extra = null
    if (card.header && card.header.actions) {
      let actions = this.getActionList(card.header.actions, card.header.show)
      let actions = card.header.actions.map(item => {
        if (card.header.show === 'icon') {
          item.show = 'icon'
        } else {
          item.show = 'button'
        }
        return item
      })
      actions = this.getActionList(actions)
      extra = actions[0]
    }
    let _actions = null
    if (card.bottom && card.bottom.actions) {
      _actions = this.getActionList(card.bottom.actions, card.bottom.show)
      _actions = card.bottom.actions.map(item => {
        if (card.bottom.show === 'icon') {
          item.show = 'icon'
        } else {
          item.show = 'button'
        }
        return item
      })
      _actions = this.getActionList(_actions)
    }
    this.setState({
@@ -129,7 +146,7 @@
  /**
   * @description 获取按钮元素
   */
  getActionList = (actions, show) => {
  getActionList = (actions) => {
    const { BData, Tab, setting, columns, ContainerId, data, MenuID } = this.props
    
    return actions.map(item => {
@@ -140,7 +157,6 @@
            BID={data.$$BID}
            Tab={Tab}
            btn={item}
            show={show}
            BData={BData}
            setting={setting}
            columns={columns}
@@ -155,7 +171,6 @@
            BID={data.$$BID}
            Tab={Tab}
            btn={item}
            show={show}
            BData={BData}
            setting={setting}
            selectedData={[data]}
@@ -166,7 +181,6 @@
          <TabButton
            key={item.uuid}
            btn={item}
            show={show}
            MenuID={MenuID}
            setting={setting}
            selectedData={[data]}
@@ -177,7 +191,6 @@
          <NewPageButton
            key={item.uuid}
            btn={item}
            show={show}
            setting={setting}
            selectedData={[data]}
          />
@@ -189,7 +202,6 @@
              key={item.uuid}
              BID={data.$$BID}
              btn={item}
              show={show}
              setting={setting}
              selectedData={[data]}
            />
@@ -201,7 +213,6 @@
              BID={data.$$BID}
              Tab={Tab}
              btn={item}
              show={show}
              BData={BData}
              setting={setting}
              selectedData={[data]}
@@ -440,6 +451,7 @@
        title = card.header.content
      }
    }
    let style = {fontSize: plusSize + 'px'}
    return (
      <div className={'chart-card-box ' + card.outclass}>
@@ -487,8 +499,7 @@
            <NormalButton
              BID={this.props.BID}
              Tab={this.props.Tab}
              btn={card.insertAction}
              show={'plus' + plusSize}
              btn={{...card.insertAction, style}}
              BData={this.props.BData}
              setting={this.props.setting}
              columns={this.props.columns}
@@ -555,8 +566,10 @@
      if ((item.Ot && item.Ot !== 'notRequired' && !['excelIn', 'excelOut'].includes(item.OpenType)) || item.funcType === 'changeuser') {
        actionMap.set(item.uuid, item)
      } else if (plot.extraAction && plot.extraAction === item.uuid && ['pop', 'prompt', 'exec'].includes(item.OpenType) && item.Ot === 'notRequired') {
        item.show = 'icon'
        insertAction = item
      } else if (plot.actions && plot.actions.length > 0 && plot.actions.includes(item.uuid) && (item.OpenType === 'excelOut' || (item.OpenType === 'excelIn' && item.Ot === 'notRequired'))) {
        item.show = 'icon'
        actionList.push(item)
      }
    })
@@ -761,7 +774,6 @@
                    key={action.uuid}
                    BID={BID}
                    Tab={Tab}
                    show="icon"
                    btn={action}
                    setting={config.setting}
                  />
@@ -772,7 +784,6 @@
                    key={action.uuid}
                    BID={BID}
                    Tab={Tab}
                    show="icon"
                    btn={action}
                    setting={config.setting}
                  />