| | |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | |
| | | /** |
| | | * @description 获取元素配置信息 |
| | | * @param {*} card |
| | | * @param {*} type |
| | | */ |
| | | export function getCardCellForm (card, type, subtype, cardCell, anchors) { |
| | | export function getCardCellForm (card, cards, cardCell) { |
| | | let _options = [ |
| | | { value: 'text', text: '文本'}, |
| | | { value: 'number', text: '数值'}, |
| | |
| | | { value: 'formula', text: '公式'}, |
| | | ] |
| | | |
| | | if (type === 'table' || (type === 'card' && subtype === 'datacard')) { |
| | | let anchors = [] |
| | | if (window.GLOB.customMenu.Template === 'BaseTable') { |
| | | anchors = null |
| | | } else { |
| | | anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || [] |
| | | } |
| | | |
| | | if (cards.type === 'table' || (cards.type === 'card' && cards.subtype === 'datacard')) { |
| | | _options.push({value: 'sequence', text: '序号'}) |
| | | } else if (card.eleType === 'sequence') { // 拖拽添加类型转换 |
| | | card.eleType = 'text' |
| | |
| | | initVal: card.anchors || [], |
| | | tooltip: sessionStorage.getItem('appType') === 'mob' ? '注:小程序中无效' : '', |
| | | required: false, |
| | | options: anchors |
| | | options: anchors, |
| | | forbid: !anchors |
| | | }, |
| | | { |
| | | type: 'number', |