| | |
| | | const { TextArea } = Input |
| | | const { Paragraph } = Typography |
| | | const MkEditIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | | const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable')) |
| | | const acTyOptions = { |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden'], |
| | |
| | | |
| | | let hasclass = true |
| | | this.props.formlist.forEach(item => { |
| | | if (!item.key) return |
| | | |
| | | this.record[item.key] = item.initVal |
| | | |
| | | if (item.key === 'class') { |
| | |
| | | reOptions.intertype = this.state.interTypeOptions |
| | | |
| | | if (intertype === 'custom') { |
| | | shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross') |
| | | shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross', 'stringify') |
| | | if (this.record.procMode === 'system') { |
| | | shows.push('sql', 'sqlType') |
| | | } else if (this.record.procMode === 'inner') { |
| | |
| | | shows.push('cbTable') |
| | | } |
| | | |
| | | reRequired.outerFunc = false |
| | | if (this.record.sysInterface === 'false') { |
| | | reReadonly.interface = false |
| | | reRequired.interface = true |
| | |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | reRequired.outerFunc = true |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | |
| | | |
| | | if (this.record.formType === 'switch') { |
| | | shows.push('field', 'size', 'openVal', 'closeVal', 'openText', 'closeText') |
| | | } else if (this.record.formType === 'counter') { |
| | | } else if (this.record.formType === 'counter' || this.record.formType === 'count_line') { |
| | | shows.push('field', 'size', 'min', 'max', 'decimal') |
| | | } else if (this.record.formType === 'radio') { |
| | | shows.push('field', 'checkType', 'openVal', 'closeVal') |
| | |
| | | shows.push('cbTable') |
| | | } |
| | | |
| | | reRequired.outerFunc = false |
| | | if (this.record.sysInterface === 'false') { |
| | | reReadonly.interface = false |
| | | reRequired.interface = true |
| | |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | reRequired.outerFunc = true |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | |
| | | value: 'custom', |
| | | text: '自定义' |
| | | }] |
| | | |
| | | if (this.record.formType === 'count_line') { |
| | | reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value)) |
| | | shows = shows.filter(op => ['label', 'OpenType', 'formType', 'Ot', 'width', 'title', 'hidden', 'field', 'size', 'min', 'max', 'decimal'].includes(op)) |
| | | } |
| | | } else if (openType === 'excelIn') { |
| | | reOptions.intertype = this.state.interTypeOptions.filter(op => op.value !== 'custom') |
| | | reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) |
| | |
| | | shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc') |
| | | reRequired.innerFunc = false |
| | | reRequired.callbackFunc = false |
| | | reRequired.outerFunc = false |
| | | |
| | | if (this.record.sysInterface === 'false') { |
| | | reReadonly.interface = false |
| | |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | reRequired.outerFunc = true |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | |
| | | if (this.record.intertype === 'outer') { |
| | | shows.push('innerFunc', 'sysInterface', 'outerFunc') |
| | | reRequired.innerFunc = false |
| | | reRequired.outerFunc = false |
| | | |
| | | if (this.record.sysInterface === 'false') { |
| | | reReadonly.interface = false |
| | |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | reRequired.outerFunc = true |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | |
| | | shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc') |
| | | reRequired.innerFunc = false |
| | | reRequired.callbackFunc = false |
| | | reRequired.outerFunc = false |
| | | |
| | | if (this.record.sysInterface === 'false') { |
| | | reReadonly.interface = false |
| | |
| | | } else if (this.record.sysInterface === 'true') { |
| | | reReadonly.interface = true |
| | | reRequired.interface = false |
| | | reRequired.outerFunc = true |
| | | |
| | | shows.push('interface') |
| | | } else if (this.record.sysInterface === 'external') { |
| | |
| | | } |
| | | } |
| | | |
| | | if (shows.includes('syncComponent') && this.record.syncComponent[0] === 'multiComponent') { |
| | | shows.push('syncComponents') |
| | | } |
| | | |
| | | if (this.record.show === 'icon') { |
| | | reRequired.icon = true |
| | | } else { |
| | |
| | | } |
| | | |
| | | this.props.updRecord && this.props.updRecord(this.record) |
| | | } else if (key === 'formType') { |
| | | if (value === 'count_line') { |
| | | _fieldval.Ot = 'requiredSgl' |
| | | this.record.Ot = 'requiredSgl' |
| | | } |
| | | } else if (key === 'funcType') { |
| | | if (value === 'print') { |
| | | _fieldval.label = '打印' |
| | |
| | | { required: item.required, message: '请选择' + item.label + '!' } |
| | | ] |
| | | |
| | | content = <Cascader options={item.options || []} expandTrigger="hover" placeholder=""/> |
| | | content = <Cascader onChange={(value) => {this.optionChange(item.key, value)}} options={item.options || []} expandTrigger="hover" placeholder=""/> |
| | | } else if (item.type === 'table') { |
| | | span = 24 |
| | | className = 'textarea' |
| | | rules = [ |
| | | { required: item.required, message: '请添加' + item.label + '!' } |
| | | ] |
| | | content = (<MKTable tip={''} columns={item.columns || []} actions={[]}/>) |
| | | } else if (item.type === 'icon') { |
| | | rules = [ |
| | | { required: item.required, message: '请选择' + item.label + '!' } |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | resolve(values) |
| | | } else { |
| | | reject(err) |