| | |
| | | } |
| | | ] |
| | | |
| | | // 标签类型,主表才会存在表单标签页 |
| | | let tabTems = [{ |
| | | value: 'FormTab', |
| | | text: '表单标签页' |
| | | }] |
| | | if (type === 'subtable') { |
| | | tabTems = [] |
| | | } |
| | | |
| | | if (card.execSuccess === 'view' || card.execSuccess === 'refresh') { // refresh为表单标签页 |
| | | card.execSuccess = 'grid' |
| | | } |
| | | if (card.execError === 'view' || card.execSuccess === 'refresh') { |
| | | if (card.execError === 'view' || card.execError === 'refresh') { |
| | | card.execError = 'grid' |
| | | } |
| | | if (card.popClose === 'view') { |
| | |
| | | |
| | | if (card.OpenType === 'blank') { |
| | | card.OpenType = 'tab' |
| | | } |
| | | if (!card.control && card.controlField) { |
| | | card.control = 'disabled' |
| | | } |
| | | |
| | | return [ |
| | |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'tabTemplate', |
| | | label: '标签类型', |
| | | initVal: card.tabTemplate || '', |
| | | required: true, |
| | | options: [ |
| | | { |
| | | value: 'ThdMenu', |
| | | text: Formdict['model.menu.level3'] |
| | | }, |
| | | ...tabTems |
| | | ] |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'linkmenu', |
| | | label: Formdict['model.form.linkmenu'], |
| | |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'afterExecSuccess', |
| | | label: Formdict['header.form.afterExecSuccess'], |
| | | initVal: card.afterExecSuccess || 'close', |
| | | required: true, |
| | | options: [{ |
| | | value: 'close', |
| | | text: Formdict['model.close'] |
| | | }, { |
| | | value: 'notclose', |
| | | text: Formdict['model.notclose'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'afterExecError', |
| | | label: Formdict['header.form.afterExecError'], |
| | | initVal: card.afterExecError || 'notclose', |
| | | required: true, |
| | | options: [{ |
| | | value: 'close', |
| | | text: Formdict['model.close'] |
| | | }, { |
| | | value: 'notclose', |
| | | text: Formdict['model.notclose'] |
| | | }] |
| | | }, |
| | | { |
| | | type: refresh.length === 0 ? 'radio' : 'select', |
| | | key: 'execSuccess', |
| | | label: Formdict['model.form.afterSuccess'], |
| | | initVal: card.execSuccess || 'never', |
| | | tooltip: '选择刷新行时,如果选择多条数据会刷新表格。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | text: '刷新表格' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | | }, |
| | | ...refresh] |
| | | }, |
| | |
| | | key: 'execError', |
| | | label: Formdict['model.form.afterError'], |
| | | initVal: card.execError || 'never', |
| | | tooltip: '选择刷新行时,如果选择多条数据会刷新表格。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | text: '刷新表格' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | | }, |
| | | ...refresh] |
| | | }, |
| | |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | text: '刷新表格' |
| | | }, |
| | | ...refresh] |
| | | }, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'controlField', |
| | | label: '控制字段', |
| | | tooltip: '禁用控制字段,可根据数据控制按钮是否禁用。', |
| | | initVal: card.controlField || '', |
| | | required: false, |
| | | options: [{label: '无', field: ''}, ...columns] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'controlVal', |
| | | label: '控制值', |
| | | tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会禁用,多个值用逗号分隔。', |
| | | initVal: card.controlVal || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'display', |
| | | label: '显示方式', |
| | |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'control', |
| | | label: '按钮控制', |
| | | initVal: card.control || '', |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '无' |
| | | }, { |
| | | value: 'disabled', |
| | | text: '禁用' |
| | | }, { |
| | | value: 'hidden', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'controlField', |
| | | label: '控制字段', |
| | | tooltip: '控制字段,可根据数据控制按钮的隐藏或禁用。', |
| | | initVal: card.controlField || '', |
| | | required: true, |
| | | options: columns |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'controlVal', |
| | | label: '控制值', |
| | | tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会隐藏或禁用,多个值用逗号分隔。', |
| | | initVal: card.controlVal || '', |
| | | required: false |
| | | }, |
| | | ] |
| | | } |
| | | |