| | |
| | | /** |
| | | * @description Wrap表单配置信息 |
| | | */ |
| | | export default function (wrap, action = []) { |
| | | export default function (wrap, action = [], columns = []) { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | let appType = sessionStorage.getItem('appType') |
| | | |
| | |
| | | type: 'radio', |
| | | field: 'tableType', |
| | | label: '表格属性', |
| | | initval: wrap.tableType, |
| | | initval: wrap.tableType || '', |
| | | required: false, |
| | | options: [ |
| | | {value: '', label: '不可选'}, |
| | |
| | | {value: 'true', label: '是'}, |
| | | {value: 'false', label: '否'}, |
| | | ], |
| | | forbid: appType === 'mob' |
| | | forbid: appType === 'mob' || appType === 'pc' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'controlField', |
| | | label: '禁用字段', |
| | | initval: wrap.controlField || '', |
| | | tooltip: '用于控制行数据是否可选择。', |
| | | required: false, |
| | | allowClear: true, |
| | | options: columns, |
| | | controlFields: [ |
| | | {field: 'controlVal', notNull: true}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'controlVal', |
| | | label: '控制值', |
| | | initval: wrap.controlVal || '', |
| | | tooltip: '当字段值与控制值相等时,行数据会禁用,多个值用逗号分隔。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'empty', |
| | | label: '空值隐藏', |
| | | initval: wrap.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'supKey', |
| | | label: '上级主键', |
| | | initval: wrap.supKey || 'true', |
| | | tooltip: '当设置上级组件时,上级主键值为空是否进行数据查询。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '验证'}, |
| | | {value: 'false', label: '忽略'}, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'permission', |
| | | label: '权限验证', |
| | | initval: wrap.permission || 'false', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '启用'}, |
| | | {value: 'false', label: '禁用'}, |
| | | ], |
| | | forbid: !appType |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | field: 'blacklist', |
| | | label: '黑名单', |