| | |
| | | |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | |
| | | /** |
| | | * @description 获取图表视图配置表单 |
| | | * @param {object} card // 图表对象 |
| | |
| | | * @param {object} card // 图表对象 |
| | | * @param {Array} columns // 显示列 |
| | | */ |
| | | export function getOptionForm (card, columns) { |
| | | export function getOptionForm (card, uuid) { |
| | | let menu = window.GLOB.customMenu |
| | | let modules = MenuUtils.getSupModules(menu.components, uuid, menu.interfaces) |
| | | |
| | | return [ |
| | | { |
| | | type: 'select', |
| | | field: 'subtype', |
| | | label: '类型', |
| | | label: '图表类型', |
| | | initval: card.subtype || 'xflow', |
| | | required: true, |
| | | options: [{ |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'export', |
| | | label: '下载', |
| | | initval: card.export || 'png', |
| | | required: false, |
| | | field: 'function', |
| | | label: '功能', |
| | | initval: card.function || 'show', |
| | | required: true, |
| | | options: [ |
| | | {value: 'none', label: '禁用'}, |
| | | {value: 'png', label: 'PNG图'}, |
| | | {value: 'edit', label: '流程编辑'}, |
| | | {value: 'show', label: '流程展示'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'empty', values: ['show']} |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'empty', |
| | | label: '空值隐藏', |
| | | initval: card.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | type: 'cascader', |
| | | field: 'supModule', |
| | | label: '上级组件', |
| | | initval: card.supModule || [], |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | | ], |
| | | options: modules, |
| | | allowClear: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | initval: card.backgroundColor || '', |
| | | required: false, |
| | | allowClear: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'empty', |
| | | label: '空值隐藏', |
| | | initval: card.empty || 'show', |
| | | tooltip: '当查询数据为空时,隐藏该组件。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | | ], |
| | | } |
| | | ] |
| | | } |