| | |
| | | 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' |
| | |
| | | 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') { |
| | |
| | | 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' |
| | |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @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 |
| | | |