king
2021-08-26 e9c48bd7356462ba9257540b130a47a65ad1861d
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 } from 'antd'
import { Button, Modal, notification, message, Drawer, Icon } from 'antd'
import Api from '@/api'
import Utils, { getSysDefaultSql } from '@/utils/utils.js'
@@ -155,11 +155,6 @@
        message: '需要上级主键值!',
        duration: 5
      })
      return
    }
    if (btn.$syncModule && !triggerId) {
      MKEmitter.emit('getSyncData', btn.$syncModule, btn.uuid)
      return
    }
@@ -357,6 +352,9 @@
            param.$callbacksql = callbacksql
          } else {
            param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab, false, this.moduleParams, Utils.getAllSearchOptions) // 数据源
            if (btn.OpenType === 'formSubmit' && btn.output) {
              param.key_back_type = 'Y'
            }
          }
          
          if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
@@ -1297,8 +1295,13 @@
      this.sendMessage()
    }
    let id = ''
    if (btn.output) {
      id = res.mk_b_id || res[btn.output] || ''
    }
    if (btn.execSuccess !== 'never') {
      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess || '', btn)
      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, id)
    }
  }
@@ -1804,6 +1807,22 @@
        {this.getModels()}
      </div>
    } else { // icon、text、 all 卡片
      let label = ''
      let icon = ''
      if (show === 'button') {
        label = btn.label
        icon = btn.icon || ''
      } else if (show === 'link') {
        label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span>
        icon = ''
      } else if (show === 'icon') {
        icon = btn.icon || ''
      // } else if (show === 'text') {
      } else {
        label = btn.label
      }
      return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
        <Button
          type="link"
@@ -1811,9 +1830,9 @@
          loading={loading}
          disabled={disabled}
          style={btn.style || style}
          icon={show === 'text' ? '' : (btn.icon || '')}
          icon={icon}
          onClick={() => {this.actionTrigger()}}
        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
        >{label}</Button>
        {this.getModels()}
      </div>
    }