king
2025-05-15 43251c34515c1d8e0163917da181424811e09ba7
src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -22,7 +22,8 @@
  state = {
    disabled: false,
    hidden: false,
    primaryId: ''
    primaryId: '',
    dict: window.GLOB.dict
  }
  UNSAFE_componentWillMount () {
@@ -100,16 +101,13 @@
  /**
   * @description 触发按钮操作
   */
  actionTrigger = (triggerId, record, type) => {
    const { btn, selectedData, BID } = this.props
    const { disabled } = this.state
  actionTrigger = (triggerId, record, type, lid) => {
    const { btn, selectedData, BID, LID } = this.props
    const { disabled, dict } = this.state
    if (disabled || btn.multiMenus) return
    if (triggerId && btn.uuid !== triggerId) return
    if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) {
      return
    }
    if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return
    
    let data = record || selectedData || []
@@ -117,7 +115,7 @@
      // 需要选择行时,校验数据
      notification.warning({
        top: 92,
        message: '请选择行!',
        message: dict['select_row'] || '请选择行!',
        duration: 5
      })
      return false
@@ -125,7 +123,7 @@
      // 需要选择单行时,校验数据
      notification.warning({
        top: 92,
        message: '请选择单行数据!',
        message: dict['select_single_row'] || '请选择单行数据!',
        duration: 5
      })
      return
@@ -152,7 +150,7 @@
          return uuid
        })()
        primaryId = primaryId + (btn.sign || '')
      } else {
      } else if (btn.sysId !== 'empty') {
        primaryId = BID || ''
      }
    }
@@ -190,10 +188,18 @@
      if (!menu) {
        notification.warning({
          top: 92,
          message: '菜单已删除或没有访问权限!',
          message: dict['no_perm'] || `没有${btn.MenuName ? `菜单《${btn.MenuName}》的` : '当前菜单的'}访问权限!`,
          duration: 5
        })
        return
      }
      if (btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') {
        Object.keys(data[0]).forEach(key => {
          if (/^\$/.test(key)) return
          if (key === 'children') return
          menu.param[key] = data[0][key]
        })
      }
      newtab = menu
@@ -214,6 +220,7 @@
  triggerMenu = (tab) => {
    const { btn, selectedData, BID } = this.props
    const { dict } = this.state
    let data = selectedData || []
@@ -221,7 +228,7 @@
      // 需要选择行时,校验数据
      notification.warning({
        top: 92,
        message: '请选择行!',
        message: dict['select_row'] || '请选择行!',
        duration: 5
      })
      return false
@@ -229,7 +236,7 @@
      // 需要选择单行时,校验数据
      notification.warning({
        top: 92,
        message: '请选择单行数据!',
        message: dict['select_single_row'] || '请选择单行数据!',
        duration: 5
      })
      return
@@ -256,7 +263,7 @@
          return uuid
        })()
        primaryId = primaryId + (tab.sign || '')
      } else {
      } else if (btn.sysId !== 'empty') {
        primaryId = BID || ''
      }
    }
@@ -278,7 +285,7 @@
    if (!menu) {
      notification.warning({
        top: 92,
        message: '菜单已删除或没有访问权限!',
        message: dict['no_perm'] || '没有当前菜单的访问权限!',
        duration: 5
      })
      return
@@ -325,7 +332,7 @@
          type="link"
          title={btn.show === 'icon' ? btn.label : ''}
          style={btn.style || null}
          className={btn.$toolbtn ? (btn.hover || '') : ''}
          className={btn.hover || ''}
        >{label}</Button>
      </Dropdown>)
    }
@@ -337,7 +344,7 @@
        title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')}
        style={btn.style || null}
        disabled={disabled}
        className={btn.$toolbtn ? (btn.hover || '') : ''}
        className={btn.hover || ''}
        onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
      >{label}</Button>
    )