king
2020-11-25 42fae277ae5ebe794fc070bf38482a919eb661fc
src/templates/sharecomponent/chartgroupcomponent/index.jsx
@@ -17,7 +17,6 @@
class ChartGroupComponent extends Component {
  static propTpyes = {
    config: PropTypes.object,         // 菜单配置信息
    sysRoles: PropTypes.array,        // 角色列表,黑名单使用
    updatechartgroup: PropTypes.func  // 图表更新
  }
@@ -90,7 +89,7 @@
        icon: 'line-chart',
        Hide: 'false',
        blacklist: [],
        correction: 7
        barSize: 35
      }
    }
@@ -130,10 +129,25 @@
      }
    }
    let actions = config.action.filter(item => item.OpenType === 'excelOut' || (item.OpenType === 'excelIn' && item.Ot === 'notRequired'))
    actions = actions.map(cell => ({value: cell.uuid, text: cell.label}))
    if (item.actions && item.actions.length > 0) {
      let keys = actions.map(cell => cell.value)
      item.actions = item.actions.filter(cell => keys.includes(cell))
    }
    let extraActions = config.action.filter(item => ['pop', 'prompt', 'exec'].includes(item.OpenType) && item.Ot === 'notRequired')
    extraActions = extraActions.map(cell => ({value: cell.uuid, text: cell.label}))
    if (item.extraAction && extraActions.filter(cell => cell.value === item.extraAction).length === 0) {
      item.extraAction = ''
    }
    this.setState({
      card: item,
      modaltype: _type,
      formlist: getChartViewForm(item, this.props.sysRoles, _columns)
      formlist: getChartViewForm(item, _columns, actions, extraActions)
    })
  }
@@ -196,8 +210,6 @@
    confirm({
      content: dict['model.confirm'] + dict['model.delete'] + ` ${plot.title} ?`,
      okText: dict['model.confirm'],
      cancelText: dict['header.cancel'],
      onOk() {
        let _chartlist = fromJS(_this.state.chartlist).toJS()
        let _chartview = _this.state.chartview
@@ -248,7 +260,7 @@
    return (
      <div className="model-table-chartview-list">
        <Icon type="plus" onClick={() => this.handleChart()} />
        {chartlist.length > 1 ? <Icon type={config.expand ? 'up' : 'down'} onClick={this.onChartChange} /> : null}
        {chartlist.length > 1 ? <Icon type={config.expand ? 'up' : 'down'} title="展开/合并" onClick={this.onChartChange} /> : null}
        {chartlist.length > 1 ? <DragChartView
          activeKey={chartview}
          list={chartlist}