king
2020-05-20 4c775de9de07291b345fd5c975a87230ddedd5ca
src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
@@ -121,7 +121,7 @@
    {
      uuid: 'card3',
      url: card3,
      subelement: ['content', 'avatar', 'header', 'actions']
      subelement: ['content', 'avatar', 'header', 'bottom']
    }
  ]
}
@@ -157,8 +157,11 @@
        _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]
@@ -177,6 +180,8 @@
          item.hidden = false
        } else if (item.key === 'over' && _type === 'card') {
          item.hidden = false
        } else if (item.key === 'bgfield') {
          item.hidden = _type !== 'card'
        }
        return item
      })
@@ -223,6 +228,8 @@
            item.hidden = false
          } else if (item.key === 'over' && value === 'card') {
            item.hidden = false
          } else if (item.key === 'bgfield') {
            item.hidden = value !== 'card'
          }
          return item
        })
@@ -421,16 +428,29 @@
            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
              }
            }
          }
@@ -457,7 +477,7 @@
      }
    }
    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}>