From af02b8f3c3ec9e5684be1084904d673429421d2b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 03 九月 2020 16:40:47 +0800 Subject: [PATCH] 2020-09-03 --- src/menu/components/chart/antv-bar/index.jsx | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx index 76cdec7..bff9c9a 100644 --- a/src/menu/components/chart/antv-bar/index.jsx +++ b/src/menu/components/chart/antv-bar/index.jsx @@ -6,6 +6,7 @@ import asyncComponent from '@/utils/asyncComponent' +import Utils from '@/utils/utils.js' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import './index.scss' @@ -32,7 +33,8 @@ UNSAFE_componentWillMount () { const { card, config } = this.props - + // card.dataName = Utils.getdataName() + // this.props.updateConfig(card) if (card.isNew) { let _plot = { chartType: card.type, // 鍥捐〃绫诲瀷 @@ -68,11 +70,22 @@ i++ } + let dataName = '' + + while (!dataName) { + let _dataName = Utils.getdataName() + if (config.components.filter(com => com.dataName === _dataName).length === 0) { + dataName = _dataName + } + } + let _card = { uuid: card.uuid, type: card.type, + format: 'array', + dataName: dataName, subtype: card.subtype, - setting: {span: 12, height: 400, name}, + setting: {span: 12, height: 400, interType: 'system', name}, columns: [], scripts: [], search: [], -- Gitblit v1.8.0