| | |
| | | * @param {object} card // 图表对象 |
| | | * @param {Array} columns // 显示列 |
| | | */ |
| | | export function getBarOrLineChartOptionForm (card, columns, sysRoles = []) { |
| | | export function getBarOrLineChartOptionForm (card, columns, sysRoles = [], MenuType) { |
| | | let shapes = [] |
| | | let _sysRoles = sysRoles.map(item => ({...item, field: item.value, label: item.text})) |
| | | |
| | |
| | | required: true |
| | | }, { |
| | | type: 'number', |
| | | key: 'correction', |
| | | label: '数据修正', |
| | | tooltip: '当数据项少于设置值时,系统会自动修正(避免柱形图过宽),在自定义中,设置为折线图时失效。', |
| | | key: 'barSize', |
| | | label: '柱形宽度', |
| | | tooltip: '空值时,宽度自适应。', |
| | | min: 5, |
| | | max: 30, |
| | | max: 100, |
| | | decimal: 0, |
| | | initVal: card.correction, |
| | | initVal: card.barSize, |
| | | forbid: !['bar'].includes(card.chartType), |
| | | required: false |
| | | }, { |
| | |
| | | initVal: card.blacklist || [], |
| | | multi: true, |
| | | required: false, |
| | | forbid: MenuType === 'billPrint', |
| | | options: _sysRoles |
| | | } |
| | | ] |