| | |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | import { formRule } from '@/utils/option.js' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import './index.scss' |
| | | |
| | | const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable')) |
| | | const { TextArea } = Input |
| | | |
| | | class ActionForm extends Component { |
| | |
| | | |
| | | if (this.record.type === 'prev') { |
| | | shows = ['typeName', 'label', 'actionType'] |
| | | if (this.record.actionType === 'close') { |
| | | shows.push('refreshTab', 'reload') |
| | | } |
| | | } else if (this.record.type === 'next') { |
| | | shows = ['typeName', 'label', 'actionType'] |
| | | } else if (this.record.type === 'close' || this.record.type === 'reset') { |
| | | if (this.record.actionType === 'close') { |
| | | shows.push('refreshTab', 'reload') |
| | | } |
| | | } else if (this.record.type === 'close') { |
| | | shows = ['typeName', 'label', 'refreshTab', 'reload'] |
| | | } else if (this.record.type === 'reset') { |
| | | shows = ['typeName', 'label'] |
| | | } else { |
| | | shows = ['typeName', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'output', 'reload', 'preButton', 'refreshTab'] // 选项列表 |
| | |
| | | // if (this.record.execSuccess === 'never' && this.record.resetForms && this.record.resetForms[0]) { |
| | | // shows.push('returnValue') |
| | | // } |
| | | } |
| | | |
| | | if (this.record.syncComponent && this.record.syncComponent[0] === 'multiComponent') { |
| | | shows.push('syncComponents') |
| | | } |
| | | |
| | | if (this.record.linkmenu && this.record.linkmenu !== 'goback') { |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table') { |
| | | fields.push( |
| | | <Col span={24} key={index}> |
| | | <Form.Item label={label} className="textarea"> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [ |
| | | { |
| | | required: item.required, |
| | | message: '请添加' + item.label + '!' |
| | | } |
| | | ] |
| | | })(<MKTable columns={item.columns || []} actions={item.actions}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } |
| | | }) |
| | | return fields |