| | |
| | | /** |
| | | * @description Wrap表单配置信息 |
| | | */ |
| | | export function getTabForm(tab, setting) { |
| | | // let appType = sessionStorage.getItem('appType') |
| | | export function getTabForm(tab) { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | |
| | | if (roleList) { |
| | |
| | | required: false, |
| | | allowClear: true, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'controlVal', |
| | | label: '隐藏标记', |
| | | initval: tab.controlVal || '', |
| | | tooltip: '当禁用字段值与隐藏标记相等时,标签页会隐藏。注:多个值请用逗号分隔。', |
| | | required: false |
| | | }, |
| | | // { |
| | | // type: 'text', |
| | | // field: 'controlVal', |
| | | // label: '隐藏标记', |
| | | // initval: tab.controlVal || '', |
| | | // tooltip: '当禁用字段值与隐藏标记相等时,标签页会隐藏。注:多个值请用逗号分隔。', |
| | | // required: false |
| | | // }, |
| | | { |
| | | type: 'text', |
| | | field: 'selectVal', |
| | |
| | | {value: 'false', label: '否'}, |
| | | {value: 'true', label: '是'}, |
| | | ], |
| | | }, |
| | | // { |
| | | // type: 'multiselect', |
| | | // field: 'blacklist', |
| | | // label: '黑名单', |
| | | // initval: tab.blacklist || [], |
| | | // required: false, |
| | | // options: roleList, |
| | | // forbid: !!appType, |
| | | // }, |
| | | } |
| | | ] |
| | | |
| | | return tabForm |
| | |
| | | /** |
| | | * @description tabs表单配置信息 |
| | | */ |
| | | export function getTabsSetForm(setting, uuid) { |
| | | export function getTabsSetForm(setting, uuid, subtabs) { |
| | | let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, uuid, window.GLOB.customMenu.interfaces) |
| | | modules.push({ |
| | | value: 'preview', |
| | | label: '上一页(url参数)' |
| | | }) |
| | | |
| | | let controlVals = subtabs.map(item => ({uuid: item.uuid, label: item.label, value: item.controlVal})) |
| | | |
| | | const tabForm = [ |
| | | { |
| | |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // field: 'position', |
| | | // label: '标签位置', |
| | | // initval: setting.position || 'top', |
| | | // required: true, |
| | | // options: [ |
| | | // {value: 'top', label: 'top'}, |
| | | // {value: 'bottom', label: 'bottom'}, |
| | | // {value: 'left', label: 'left'}, |
| | | // {value: 'right', label: 'right'}, |
| | | // ], |
| | | // controlFields: [ |
| | | // {field: 'display', values: ['top', 'bottom']}, |
| | | // ] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'display', |
| | |
| | | options: modules, |
| | | controlFields: [ |
| | | {field: 'controlField', notNull: true}, |
| | | {field: 'controlVals', notNull: true}, |
| | | {field: 'swiper', values: ['']}, |
| | | ], |
| | | }, |
| | |
| | | ], |
| | | forbid: sessionStorage.getItem('editMenuType') === 'popview' |
| | | }, |
| | | { |
| | | 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 |