king
2021-12-22 bd1dfc9e6c9b9f8076ca2783ce598e0936b4c664
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -3,7 +3,7 @@
import moment from 'moment'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Button, Modal, notification, message, Drawer, Icon } from 'antd'
import { Button, Modal, notification, message, Drawer } from 'antd'
import Api from '@/api'
import Utils, { getSysDefaultSql } from '@/utils/utils.js'
@@ -13,6 +13,7 @@
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import { updateForm } from '@/utils/utils-update.js'
import MKEmitter from '@/utils/events.js'
import MkIcon from '@/components/mk-icon'
// import './index.scss'
const MutilForm = asyncSpinComponent(() => import('@/tabviews/zshare/mutilform'))
@@ -1413,6 +1414,8 @@
    if (btn.execSuccess === 'closetab') {
      MKEmitter.emit('closeTabView', btn.$MenuID)
    } else if (btn.execSuccess === 'closepoptab') {
      MKEmitter.emit('popclose')
    } else if (btn.execSuccess !== 'never') {
      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, id, this.state.selines)
    }
@@ -1645,7 +1648,9 @@
      MKEmitter.emit('mkFC', 'focus', btnconfig.setting.errFocus)
    }
    if (btn.execError !== 'never') {
    if (btn.execError === 'closepoptab') {
      MKEmitter.emit('popclose')
    } else if (btn.execError !== 'never') {
      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn, '', this.state.selines)
    }
  }
@@ -1692,7 +1697,7 @@
    const { btnconfig, autoMatic } = this.state
    if (btnconfig) {
      if (!autoMatic && btnconfig.setting.display === 'prompt') { // 如果表单以是否框展示
      if (!autoMatic && (btnconfig.setting.display === 'prompt' || btnconfig.setting.display === 'exec')) { // 如果表单以是否框展示
        this.modelconfirm()
      } else {
        this.setState({
@@ -1736,7 +1741,7 @@
          this.setState({
            btnconfig: _LongParam
          }, () => {
            if (!autoMatic && _LongParam.setting.display === 'prompt') { // 如果表单以是否框展示
            if (!autoMatic && (_LongParam.setting.display === 'prompt' || _LongParam.setting.display === 'exec')) { // 如果表单以是否框展示
              this.modelconfirm()
            } else {
              this.setState({
@@ -1845,17 +1850,21 @@
      })
    })
    confirm({
      title: this.state.dict['main.action.confirm.tip'],
      onOk() {
        return new Promise(resolve => {
          _this.execSubmit(selines, resolve, result)
        })
      },
      onCancel() {
        _this.setState({ loading: false })
      }
    })
    if (btnconfig.setting.display === 'exec') {
      this.execSubmit(selines, () => {}, result)
    } else {
      confirm({
        title: this.state.dict['main.action.confirm.tip'],
        onOk() {
          return new Promise(resolve => {
            _this.execSubmit(selines, resolve, result)
          })
        },
        onCancel() {
          _this.setState({ loading: false })
        }
      })
    }
  }
  /**
@@ -1984,11 +1993,10 @@
        label = btn.label
        icon = btn.icon || ''
      } else if (show === 'link') {
        label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span>
        label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span>
        icon = ''
      } else if (show === 'icon') {
        icon = btn.icon || ''
      // } else if (show === 'text') {
      } else {
        label = btn.label
      }