| | |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'afterExecSuccess', |
| | | label: Formdict['header.form.afterExecSuccess'], |
| | | initVal: card.afterExecSuccess || 'close', |
| | | required: true, |
| | | options: [{ |
| | | value: 'close', |
| | | text: Formdict['header.close'] |
| | | }, { |
| | | value: 'notclose', |
| | | text: Formdict['header.notclose'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'afterExecError', |
| | | label: Formdict['header.form.afterExecError'], |
| | | initVal: card.afterExecError || 'notclose', |
| | | required: true, |
| | | options: [{ |
| | | value: 'close', |
| | | text: Formdict['header.close'] |
| | | }, { |
| | | value: 'notclose', |
| | | text: Formdict['header.notclose'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'execSuccess', |
| | | label: Formdict['header.form.execSuccess'], |
| | | initVal: card.execSuccess || 'never', |
| | |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'sheet', |
| | | label: Formdict['header.form.tablename'], |
| | | initVal: card.sheet || config.setting.tableName || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'sql', |
| | | label: Formdict['header.form.tablename'], |
| | | initVal: card.sql || config.setting.tableName || '', |
| | |
| | | tooltip: Formdict['header.form.actionhelp.sqlType'], |
| | | required: false, |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'pagination', |
| | | label: Formdict['header.form.pagination'], |
| | | initVal: card.pagination || 'false', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['header.form.true'] |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['header.form.false'] |
| | | }] |
| | | } |
| | | ] |
| | | } |
| | |
| | | max: 18, |
| | | decimal: 0, |
| | | label: Formdict['header.form.decimal'], |
| | | initVal: card.decimal, |
| | | required: false |
| | | initVal: card.decimal || 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | text: '绿色(背景)' |
| | | }], |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'fieldlength', |
| | | label: Formdict['header.form.field.length'], |
| | | initVal: card.fieldlength || (card.type === 'text' ? 50 : 512), |
| | | required: false |
| | | } |
| | | ] |
| | | } |
| | |
| | | */ |
| | | export function getModalForm (card, inputfields, subtable = false) { |
| | | let _openType = [] |
| | | let _fieldlength = 50 |
| | | |
| | | if (subtable) { |
| | | _openType.push({ |
| | | value: 'linkMain', |
| | | text: Formdict['header.form.linkMain'] |
| | | }) |
| | | } |
| | | |
| | | if (card.type === 'textarea' || card.type === 'fileupload') { |
| | | _fieldlength = 512 |
| | | } |
| | | |
| | | return [ |
| | |
| | | type: 'text', |
| | | key: 'field', |
| | | label: Formdict['header.form.field'], |
| | | initVal: card.field, |
| | | initVal: card.field || '', |
| | | required: true, |
| | | readonly: false |
| | | }, |
| | |
| | | type: 'text', |
| | | key: 'initval', |
| | | label: Formdict['header.form.initval'], |
| | | initVal: card.initval, |
| | | initVal: card.initval || '', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | key: 'decimal', |
| | | label: Formdict['header.form.decimal'], |
| | | initVal: card.decimal || 0, |
| | | required: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | label: '最大值', |
| | | initVal: card.max || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'regular', |
| | | label: Formdict['header.form.regular'], |
| | | initVal: card.regular || '', |
| | | options: [{ |
| | | value: '', |
| | | text: Formdict['header.form.empty'] |
| | | }, { |
| | | value: 'number', |
| | | text: Formdict['header.form.number'] |
| | | }, { |
| | | value: 'letter', |
| | | text: Formdict['header.form.letter'] |
| | | }, { |
| | | value: 'letter&number', |
| | | text: Formdict['header.form.letter&number'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'fieldlength', |
| | | label: Formdict['header.form.field.length'], |
| | | tooltip: '文本、下拉框、日期等字段默认长度为50,多行文本与文件上传字段默认长度为512', |
| | | initVal: card.fieldlength || _fieldlength, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'readin', |
| | | label: Formdict['header.form.readin'], |
| | | tooltip: Formdict['header.form.readin.tooltip'], |
| | | initVal: card.readin || 'true', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['header.form.true'] |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['header.form.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'linkSubField', |
| | | label: Formdict['header.form.linkForm'], |