king
2022-12-06 91e232bb0b910f3670bdbccd65cc218d55e1eda9
src/menu/components/card/cardcellcomponent/index.jsx
@@ -7,6 +7,7 @@
import { getCardCellForm } from './formconfig'
import { getActionForm, getBaseTableActionForm } from '@/menu/components/share/actioncomponent/formconfig'
import Utils, { FuncUtils } from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import MenuUtils from '@/utils/utils-custom.js'
import ElementForm from './elementform'
@@ -156,6 +157,7 @@
      options = ['border', 'margin']
    } else if (element.eleType === 'text') {
      options[0] = 'font2'
      options.push('display')
    } else if (element.eleType === 'slider') {
      options = ['padding', 'margin']
    } else if (element.eleType === 'splitline') {
@@ -355,6 +357,11 @@
      let _elements = elements.map(cell => {
        if (cell.uuid === res.uuid) {
          res.style = cell.style || {}
          if (res.eleType !== 'text') {
            delete res.style.display
          }
          if (res.eleType === 'splitline' && (cell.eleType !== 'splitline' || cell.focus)) {
            res.style.paddingTop = '5px'
            res.style.paddingBottom = '5px'
@@ -629,6 +636,54 @@
    })
  }
  /**
   * @description 创建按钮存储过程
   */
  creatFunc = () => {
    const menu = window.GLOB.customMenu
    let _config = fromJS(this.props.cards).toJS()
    this.actionFormRef.handleConfirm().then(res => {
      let btn = res         // 按钮信息
      let newLText = ''     // 创建存储过程sql
      let DelText = ''      // 删除存储过程sql
      if (btn.intertype !== 'inner') return
      if (btn.OpenType === 'pop') {
        let _param = {
          funcName: btn.innerFunc,
          name: _config.setting.tableName || '',
          fields: btn.modal ? btn.modal.fields : [],
          menuNo: menu.MenuNo
        }
        newLText = Utils.formatOptions(FuncUtils.getfunc(_param, btn, menu, _config))
        DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc))
      } else if (btn.OpenType === 'excelIn') {
        let _param = {
          funcName: btn.innerFunc,
          menuNo: menu.MenuNo
        }
        newLText = Utils.formatOptions(FuncUtils.getexcelInfunc(_param, btn, menu))
        DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc))
      } else if (btn.OpenType === 'excelOut') {
        newLText = Utils.formatOptions(FuncUtils.getTableFunc(btn.innerFunc, menu, _config)) // 创建存储过程sql
        DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc))
      } else {
        let _param = {
          funcName: btn.innerFunc,
          name: _config.setting.tableName || '',
          fields: '',
          menuNo: menu.MenuNo
        }
        newLText = Utils.formatOptions(FuncUtils.getfunc(_param, btn, menu, _config))
        DelText = Utils.formatOptions(FuncUtils.dropfunc(btn.innerFunc))
      }
      this.refs.btnCreatFunc.exec(btn.innerFunc, newLText, DelText)
    })
  }
  getVerify = (card) => {
    const { cards } = this.props