king
2020-05-20 4c775de9de07291b345fd5c975a87230ddedd5ca
src/templates/sharecomponent/chartgroupcomponent/index.jsx
@@ -77,6 +77,8 @@
   * @description 添加或修改图表
   */
  handleChart = (item) => {
    const { config } = this.props
    let _type = 'editChart'
    if (!item) {
      _type = 'addChart'
@@ -91,10 +93,19 @@
      }
    }
    let _columns = config.columns.filter(col => ['text', 'number'].includes(col.type) && col.marks && col.marks.filter(_mark => _mark.signType === 'card').length > 0)
    _columns = _columns.map(col => {
      return {
        uuid: col.uuid,
        value: col.field,
        text: col.label
      }
    })
    this.setState({
      card: item,
      modaltype: _type,
      formlist: getChartViewForm(item, this.props.sysRoles)
      formlist: getChartViewForm(item, this.props.sysRoles, _columns)
    })
  }