king
2022-05-20 1637a24e160f87e171fc4978a8c9cb8875cdcabb
src/tabviews/zshare/actionList/changeuserbutton/index.jsx
@@ -22,7 +22,7 @@
    selectedData: PropTypes.any,      // 子表中选择数据
    setting: PropTypes.any,           // 页面通用设置
    disabled: PropTypes.any,          // 行按钮禁用
    lineId: PropTypes.any,            // 行索引+主键值,用于行按钮双击
    lineBtn: PropTypes.any,           // 是否为行级按钮
  }
  state = {
@@ -115,16 +115,11 @@
   * @description 触发按钮操作
   */
  actionTrigger = (triggerId, record, type) => {
    const { setting, selectedData, btn, MenuID } = this.props
    const { setting, selectedData, btn, MenuID, lineBtn } = this.props
    const { loading, disabled } = this.state
    
    if (loading || disabled) return
    if (triggerId) {
      if (btn.uuid !== triggerId) return
      if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) {
        return
      }
    }
    if (triggerId && btn.uuid !== triggerId) return
    if (btn.funcType === 'closetab') {
      MKEmitter.emit('closeTabView', MenuID || btn.$MenuID)
@@ -133,10 +128,8 @@
        MKEmitter.emit('reloadMenuView', btn.refreshTab[btn.refreshTab.length - 1], 'table')
      }
      return
    } else if (type === 'linkbtn' && selectedData && selectedData.length === 1) {
      if (record[0].$Index !== selectedData[0].$Index) {
        return
      }
    } else if (type === 'linkbtn' && lineBtn && !is(fromJS(selectedData || []), fromJS(record))) {
      return
    }
    
    let data = record || selectedData || []