| | |
| | | { |
| | | uuid: 'card3', |
| | | url: card3, |
| | | subelement: ['content', 'avatar', 'header', 'actions'] |
| | | subelement: ['content', 'avatar', 'header', 'bottom'] |
| | | } |
| | | ] |
| | | } |
| | |
| | | _selectlegend = _legends[0] |
| | | } |
| | | } else if (_type === 'card') { |
| | | _legends = syslegends[_type] |
| | | _selectlegend = _legends.filter(item => item.uuid === card.cardType)[0] |
| | | _legends = syslegends.card |
| | | |
| | | if (card.subelement) { |
| | | _selectlegend = _legends.filter(item => JSON.stringify(item.subelement) === JSON.stringify(card.subelement))[0] |
| | | } |
| | | |
| | | if (!_selectlegend) { |
| | | _selectlegend = _legends[0] |
| | |
| | | item.hidden = false |
| | | } else if (item.key === 'over' && _type === 'card') { |
| | | item.hidden = false |
| | | } else if (item.key === 'bgfield') { |
| | | item.hidden = _type !== 'card' |
| | | } |
| | | return item |
| | | }) |
| | |
| | | item.hidden = false |
| | | } else if (item.key === 'over' && value === 'card') { |
| | | item.hidden = false |
| | | } else if (item.key === 'bgfield') { |
| | | item.hidden = value !== 'card' |
| | | } |
| | | return item |
| | | }) |
| | |
| | | |
| | | if (!result.details) { |
| | | result.details = [ |
| | | {bold: 'true', uuid: 'cardtitle', content: 'Card title', datatype: 'static', align: 'left'}, |
| | | {bold: 'false', uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'} |
| | | {elemType: 'detail', bold: 'true', uuid: 'cardtitle', content: 'Card title', datatype: 'static', align: 'left'}, |
| | | {elemType: 'detail',bold: 'false', uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'} |
| | | ] |
| | | result.actions = [{icon: 'edit'}, {icon: 'plus'}] |
| | | result.bottom = { |
| | | elemType: 'bottom', |
| | | show: 'icon', |
| | | actions: [] |
| | | } |
| | | result.header = { |
| | | elemType: 'header', |
| | | content: 'Card title', |
| | | datatype: 'static', |
| | | actions: [] |
| | | } |
| | | result.avatar = {content: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png', datatype: 'static', width: 32, height: 32} |
| | | result.avatar = { |
| | | elemType: 'avatar', |
| | | content: '', |
| | | type: 'picture', |
| | | field: '', |
| | | size: 14, |
| | | widthType: 'absolute', |
| | | width: 32 |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | return ( |
| | | <Form {...formItemLayout} className="chart-edit-form" id="chartwinter"> |
| | | <Form {...formItemLayout} className="chart-edit-form mingke-table" id="chartwinter"> |
| | | <Row gutter={24}>{this.getFields()}</Row> |
| | | {legends ? <Row gutter={24} className="chart-model-image"> |
| | | {legends.map(item => <Col span={6} key={item.uuid}> |