| | |
| | | /** |
| | | * @description tab表单配置信息 |
| | | */ |
| | | export function getTabForm(tab, setting) { |
| | | export function getTabForm(tab) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | |
| | |
| | | required: false, |
| | | allowClear: true, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'controlVal', |
| | | label: '隐藏标记', |
| | | initval: tab.controlVal || '', |
| | | tooltip: '当禁用字段值与隐藏标记相等时,标签页会隐藏。注:多个值请用逗号分隔。', |
| | | required: false, |
| | | }, |
| | | // { |
| | | // type: 'text', |
| | | // field: 'controlVal', |
| | | // label: '隐藏标记', |
| | | // initval: tab.controlVal || '', |
| | | // tooltip: '当禁用字段值与隐藏标记相等时,标签页会隐藏。注:1、多个值请用逗号分隔,2、@pass@值表示忽略此设置(始终显示),2、@pass_empty@值表示忽略空值,即未获取上级组件信息时显示(可与其他值拼接)。', |
| | | // required: false, |
| | | // }, |
| | | { |
| | | type: 'text', |
| | | field: 'selectVal', |
| | |
| | | /** |
| | | * @description tabs表单配置信息 |
| | | */ |
| | | export function getTabsSetForm(setting, uuid) { |
| | | export function getTabsSetForm(setting, uuid, subtabs) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | |
| | |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | |
| | | let controlVals = subtabs.map(item => ({uuid: item.uuid, label: item.label, value: item.controlVal})) |
| | | |
| | | const tabForm = [ |
| | | { |
| | |
| | | options: modules, |
| | | controlFields: [ |
| | | {field: 'controlField', notNull: true}, |
| | | {field: 'controlVals', notNull: true}, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | field: 'controlField', |
| | | label: '禁用字段', |
| | | initval: setting.controlField || '', |
| | | tooltip: '用于控制标签隐藏的字段,在标签中填入隐藏标记。', |
| | | tooltip: '用于控制标签隐藏的字段。注:树形组件中不同层级会自动生成mk_floor(层级字段1、2、3...)。', |
| | | required: true, |
| | | }, |
| | | { |
| | |
| | | field: 'selectField', |
| | | label: '选中字段', |
| | | initval: setting.selectField || '', |
| | | tooltip: '用于控制标签页初始化选中,在标签中填入选中标记,注:数据源于url参数。', |
| | | tooltip: '用于控制标签页初始化选中,在标签中填入选中标记,注:数据来源于url参数。', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | options: roleList, |
| | | forbid: !!appType |
| | | }, |
| | | { |
| | | type: 'table', |
| | | field: 'controlVals', |
| | | label: '标签组', |
| | | initval: controlVals, |
| | | tooltip: '当禁用字段值与隐藏标记相等时,标签页会隐藏。注:1、多个值请用逗号分隔,2、@pass@值表示忽略此设置(始终显示),2、@pass_empty@值表示忽略空值,即未获取上级组件信息时显示(可与其他值拼接)。', |
| | | required: false, |
| | | fixed: true, |
| | | span: 24, |
| | | columns: [ |
| | | { |
| | | title: '标签名称', |
| | | dataIndex: 'label', |
| | | editable: false, |
| | | required: false, |
| | | width: '30%' |
| | | }, |
| | | { |
| | | title: '隐藏标记', |
| | | dataIndex: 'value', |
| | | inputType: 'input', |
| | | editable: true, |
| | | required: false, |
| | | width: '50%' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | |
| | | return tabForm |