king
2025-05-21 9282e645d0205f85bf0d424a0b2f5c42c2aae1d9
src/tabviews/zshare/actionList/funczip/index.jsx
@@ -22,6 +22,7 @@
    loading: false,
    disabled: false,
    hidden: false,
    dict: window.GLOB.dict
  }
  UNSAFE_componentWillMount () {
@@ -99,37 +100,34 @@
  /**
   * @description 触发按钮操作
   */
  actionTrigger = (triggerId, record, type) => {
    const { BID, btn, selectedData, setting } = this.props
    const { loading, disabled } = this.state
  actionTrigger = (triggerId, record, type, lid) => {
    const { BID, btn, selectedData, setting, LID } = this.props
    const { loading, disabled, dict } = this.state
    if (loading || disabled) return
    if (triggerId && btn.uuid !== triggerId) return
    if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return
    let data = record || selectedData || []
    if (setting.supModule && !BID) {
      notification.warning({
        top: 92,
        message: '需要上级主键值!',
        message: setting.supModTip || dict['sup_key_req'] || '需要上级主键值!',
        duration: 5
      })
      return
    } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) {
      return
    }
    let data = record || selectedData || []
    if (btn.Ot !== 'notRequired' && data.length === 0) {
    } else if (btn.Ot !== 'notRequired' && data.length === 0) {
      notification.warning({
        top: 92,
        message: '请选择行!',
        message: dict['select_row'] || '请选择行!',
        duration: 5
      })
      return
    } else if (btn.Ot === 'requiredSgl' && data.length !== 1) {
      notification.warning({
        top: 92,
        message: '请选择单行数据!',
        message: dict['select_single_row'] || '请选择单行数据!',
        duration: 5
      })
      return
@@ -354,43 +352,47 @@
   */
  execError = (res) => {
    const { btn } = this.props
    const { dict } = this.state
    this.setState({
      loading: false
    })
    if (res.ErrCode === '01') {
      message.error('未获取到下载文件。')
      message.error(dict['exc_fail'] || '未获取到下载文件。')
      return
    } else if (res.ErrCode === '02') {
      Modal.error({
        title: '部分文件下载失败:1、请检查文件路径是否正确,2、请检查文件是否跨域。',
        title: dict['exc_fail'] || '部分文件下载失败:1、请检查文件路径是否正确,2、请检查文件是否跨域。',
        okText: dict['got_it'] || '知道了'
      })
      return
    } else if (res.ErrCode === '03') {
      Modal.error({
        title: '文件下载失败:1、请检查文件路径是否正确,2、请检查文件是否跨域。',
        title: dict['exc_fail'] || '文件下载失败:1、请检查文件路径是否正确,2、请检查文件是否跨域。',
        okText: dict['got_it'] || '知道了'
      })
      return
    } else if (res.ErrCode === 'E') {
      Modal.error({
        title: res.message || '执行失败!',
        title: res.message || dict['exc_fail'] || '执行失败!',
        okText: dict['got_it'] || '知道了'
      })
    } else if (res.ErrCode === 'N') {
      notification.error({
        top: 92,
        message: res.message || '执行失败!',
        message: res.message || dict['exc_fail'] || '执行失败!',
        duration: 10
      })
    } else if (res.ErrCode === 'F') {
      notification.error({
        className: 'notification-custom-error',
        top: 92,
        message: res.message || '执行失败!',
        message: res.message || dict['exc_fail'] || '执行失败!',
        duration: 10
      })
    } else if (res.ErrCode === 'NM') {
      message.error(res.message || '执行失败!')
      message.error(res.message || dict['exc_fail'] || '执行失败!')
    }
    if (btn.execError !== 'never') {
@@ -425,7 +427,7 @@
        loading={loading}
        disabled={disabled}
        style={btn.style}
        className={btn.$toolbtn ? (btn.hover || '') : ''}
        className={btn.hover || ''}
        onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
      >{label}</Button>
    )