| | |
| | | }) |
| | | }) |
| | | } |
| | | } else if (item.key === 'noVField') { |
| | | item.options = [] |
| | | |
| | | if (side === 'sub') { |
| | | config.subColumns.forEach(col => { |
| | | let label = `${col.field}(${col.label})` |
| | | item.options.push({ |
| | | value: col.field, |
| | | text: label |
| | | }) |
| | | }) |
| | | } else { |
| | | config.columns.forEach(col => { |
| | | let label = `${col.field}(${col.label})` |
| | | item.options.push({ |
| | | value: col.field, |
| | | text: label |
| | | }) |
| | | }) |
| | | } |
| | | } else if (item.key === 'formula') { |
| | | item.fields = [] |
| | | |
| | |
| | | _options.push('value') |
| | | } |
| | | |
| | | if (this.record.eleType === 'text' && this.record.noValue === 'hide') { |
| | | _options.push('noVField') |
| | | } |
| | | if (this.record.eleType === 'picture' && this.record.noValue === 'show') { |
| | | _options.push('lostTip') |
| | | } else if (this.record.eleType === 'video' && this.record.posterType) { |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'noVField', |
| | | label: '空值字段', |
| | | initVal: card.noVField || '', |
| | | tooltip: '用于控制此静态元素的显示/隐藏,当此字段为空时(数值为0),隐藏当前元素。', |
| | | required: false, |
| | | allowClear: true, |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'lostTip', |
| | | label: '图片缺失', |
| | |
| | | })()) |
| | | } |
| | | } |
| | | |
| | | if (card.noVField && !data[card.noVField]) { |
| | | val = '' |
| | | } |
| | | } else if (data.hasOwnProperty(card.field)) { |
| | | val = data[card.field] + '' |
| | | } |