king
2022-10-20 6de5ea0a0c6f06e0321ae41846473118fb85de48
src/menu/components/share/actioncomponent/index.jsx
@@ -4,7 +4,7 @@
import { Modal, notification, Button } from 'antd'
import Utils, { FuncUtils } from '@/utils/utils.js'
import { getActionForm } from './formconfig'
import { getActionForm, getBaseTableActionForm } from './formconfig'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import MKEmitter from '@/utils/events.js'
@@ -169,6 +169,15 @@
      functip = ''
    }
    if (config.subtype === 'basetable') {
      this.setState({
        visible: true,
        card: card,
        formlist: getBaseTableActionForm(card, functip, config, usefulFields)
      })
      return
    }
    let supId = ''
    if (config.setting && config.setting.supModule) {
      let pid = config.setting.supModule[config.setting.supModule.length - 1]
@@ -218,7 +227,7 @@
   */
  handleSubmit = () => {
    const { config } = this.props
    let color = { primary: '#1890ff', yellow: '#c49f47', orange: 'orange', danger: '#ff4d4f', green: '#26C281', dgreen: '#32c5d2', purple: '#8E44AD', cyan: '#13c2c2', gray: '#666666' }
    let color = { primary: '#1890ff', yellow: '#c49f47', orange: 'orange', danger: '#ff4d4f', green: '#26C281', dgreen: '#32c5d2', purple: '#8E44AD', cyan: '#13c2c2', gray: '#666666', default: '#333333' }
    let _actionlist = fromJS(this.state.actionlist).toJS()
    
    this.actionFormRef.handleConfirm().then(btn => {
@@ -231,14 +240,23 @@
        }
        if (item.uuid === btn.uuid) {
          btn.style = item.style || {}
          if (btn.class !== item.class || btn.show !== item.show || !btn.style.color || item.focus) {
            if (btn.show === 'icon') {
              btn.style.color = color[btn.class]
              btn.style.backgroundColor = 'transparent'
          if (config.subtype === 'basetable') {
            let _c = btn.class.replace('border-', '')
            if (btn.class.indexOf('border') > -1 || btn.class === 'default') {
              btn.style = {color: color[_c], backgroundColor: '#fff', borderColor: color[_c]}
            } else {
              btn.style.color = '#ffffff'
              btn.style.backgroundColor = color[btn.class]
              btn.style = {color: '#fff', backgroundColor: color[_c], borderColor: color[_c]}
            }
          } else {
            btn.style = item.style || {}
            if (btn.class !== item.class || btn.show !== item.show || !btn.style.color || item.focus) {
              if (btn.show === 'icon') {
                btn.style.color = color[btn.class]
                btn.style.backgroundColor = 'transparent'
              } else {
                btn.style.color = '#ffffff'
                btn.style.backgroundColor = color[btn.class]
              }
            }
          }
          return btn
@@ -491,7 +509,7 @@
      <div className={'model-menu-action-list length' + actionlist.length}>
        <DragElement
          list={actionlist}
          type={appType === 'mob' ? config.subtype : ''}
          type={appType === 'mob' || config.subtype === 'basetable' ? config.subtype : ''}
          handleList={this.handleList}
          dropButton={this.dropButton}
          handleMenu={this.handleAction}