| | |
| | | import { formRule } from '@/utils/option.js' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import KeyInterface from '@/components/keyInterface' |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | |
| | | reReadonly.interface = false |
| | | reRequired.interface = true |
| | | } else if (intertype === 'outer') { |
| | | shows.push('procMode', 'sysInterface', 'interface', 'outerFunc', 'callbackType', 'output') |
| | | shows.push('procMode', 'sysInterface', 'outerFunc', 'callbackType', 'output') |
| | | if (this.record.procMode === 'system') { |
| | | shows.push('sql', 'sqlType') |
| | | } else if (this.record.procMode === 'inner') { |
| | |
| | | reReadonly.interface = false |
| | | reRequired.interface = true |
| | | |
| | | shows.push('proInterface') |
| | | } else { |
| | | shows.push('interface', 'proInterface') |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | | shows.push('exInterface', 'exProInterface') |
| | | } |
| | | } else if (intertype === 'inner') { |
| | | shows.push('innerFunc', 'output') |
| | |
| | | reOptions.intertype = this.state.interTypeOptions.filter(item => item.value !== 'custom') |
| | | |
| | | if (intertype === 'outer') { |
| | | shows.push('procMode', 'sysInterface', 'interface', 'outerFunc', 'callbackType') |
| | | shows.push('procMode', 'sysInterface', 'outerFunc', 'callbackType') |
| | | if (this.record.procMode === 'system') { |
| | | shows.push('sql', 'sqlType') |
| | | } else if (this.record.procMode === 'inner') { |
| | |
| | | reReadonly.interface = false |
| | | reRequired.interface = true |
| | | |
| | | shows.push('proInterface') |
| | | } else { |
| | | shows.push('interface', 'proInterface') |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | | shows.push('exInterface', 'exProInterface') |
| | | } |
| | | } else if (intertype === 'inner') { |
| | | shows.push('innerFunc') |
| | |
| | | reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) |
| | | |
| | | if (this.record.intertype === 'outer') { |
| | | shows.push('innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc') |
| | | shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc') |
| | | reRequired.innerFunc = false |
| | | reRequired.callbackFunc = false |
| | | |
| | |
| | | reReadonly.interface = false |
| | | reRequired.interface = true |
| | | |
| | | shows.push('proInterface') |
| | | } else { |
| | | shows.push('interface', 'proInterface') |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | | shows.push('exInterface', 'exProInterface') |
| | | } |
| | | } else if (this.record.intertype === 'inner') { |
| | | shows.push('innerFunc') |
| | |
| | | reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom') |
| | | |
| | | if (this.record.intertype === 'outer') { |
| | | shows.push('innerFunc', 'sysInterface', 'interface', 'outerFunc') |
| | | shows.push('innerFunc', 'sysInterface', 'outerFunc') |
| | | reRequired.innerFunc = false |
| | | |
| | | if (this.record.sysInterface === 'false') { |
| | | reReadonly.interface = false |
| | | reRequired.interface = true |
| | | |
| | | shows.push('proInterface') |
| | | } else { |
| | | shows.push('interface', 'proInterface') |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | | shows.push('exInterface', 'exProInterface') |
| | | } |
| | | } else if (this.record.intertype === 'inner') { |
| | | shows.push('innerFunc') |
| | |
| | | if (_funcType === 'print') { |
| | | shows.push('execMode', 'intertype', 'Ot', 'execSuccess', 'execError') |
| | | if (this.record.intertype === 'outer') { |
| | | shows.push('innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc') |
| | | shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc') |
| | | reRequired.innerFunc = false |
| | | reRequired.callbackFunc = false |
| | | |
| | | if (this.record.sysInterface === 'false') { |
| | | reReadonly.interface = false |
| | | reRequired.interface = true |
| | | |
| | | shows.push('proInterface') |
| | | } else { |
| | | |
| | | shows.push('interface', 'proInterface') |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | | shows.push('exInterface', 'exProInterface') |
| | | } |
| | | } else if (this.record.intertype === 'inner') { |
| | | shows.push('innerFunc') |
| | |
| | | } else if (value === 'excelIn') { |
| | | _fieldval.intertype = 'system' |
| | | _fieldval.Ot = 'notRequired' |
| | | |
| | | _fieldval.execSuccess = 'grid' |
| | | _fieldval.label = '导入Excel' |
| | | _fieldval.class = 'dgreen' |
| | | this.record.Ot = 'notRequired' |
| | | this.record.label = '导入Excel' |
| | | this.record.class = 'dgreen' |
| | | |
| | | |
| | | this.record.execSuccess = 'grid' |
| | | } else if (value === 'excelOut') { |
| | | _fieldval.intertype = 'system' |
| | | _fieldval.label = '导出Excel' |
| | |
| | | ) |
| | | } else if (item.key === 'sql' || item.key === 'sheet') { |
| | | rules.push( |
| | | { pattern: /^[a-zA-Z_]+$/, message: '表名只可使用字母以及_' }, |
| | | { pattern: /^[a-zA-Z0-9@_]+$/, message: '表名只可使用字母、数字以及_' }, |
| | | { max: formRule.func.max, message: formRule.func.maxMessage } |
| | | ) |
| | | } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') { |
| | |
| | | getPopupContainer={() => document.getElementById('winter')} |
| | | > |
| | | {item.options.map((option, index) => |
| | | <Select.Option key={index} extend={option[item.extendName] || ''} value={(option.value || option.field)}> |
| | | <Select.Option key={index} title={option.text || option.label} extend={option[item.extendName] || ''} value={(option.value || option.field)}> |
| | | {(option.text || option.label)} |
| | | </Select.Option> |
| | | )} |
| | |
| | | getPopupContainer={() => document.getElementById('winter')} |
| | | > |
| | | {item.options.map((option, index) => |
| | | <Select.Option key={index} value={(option.value || option.field)}> |
| | | <Select.Option key={index} title={option.text || option.label} value={(option.value || option.field)}> |
| | | {(option.text || option.label)} |
| | | </Select.Option> |
| | | )} |
| | |
| | | ] |
| | | |
| | | content = <TextArea rows={2} readOnly={item.readonly}/> |
| | | } else if (item.type === 'keyinterface') { |
| | | span = 24 |
| | | className = 'textarea' |
| | | rules = [ |
| | | { required: item.required, message: '请输入' + item.label + '!' } |
| | | ] |
| | | |
| | | content = <KeyInterface type={item.key === 'exInterface' ? 'develop' : 'product'}/> |
| | | } |
| | | |
| | | fields.push( |
| | |
| | | values.uuid = card.uuid |
| | | values.verify = card.verify || null |
| | | values.modal = card.modal || null |
| | | values.config = card.config || null |
| | | |
| | | if (values.OpenType === 'form') { |
| | | if (values.formType !== 'scan') { |