From e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 17 十月 2022 17:57:34 +0800
Subject: [PATCH] 2022-10-17

---
 src/menu/components/chart/antv-dashboard/index.jsx |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/menu/components/chart/antv-dashboard/index.jsx b/src/menu/components/chart/antv-dashboard/index.jsx
index 6434bd4..b05efaa 100644
--- a/src/menu/components/chart/antv-dashboard/index.jsx
+++ b/src/menu/components/chart/antv-dashboard/index.jsx
@@ -8,9 +8,7 @@
 import MKEmitter from '@/utils/events.js'
 import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
-import { resetStyle } from '@/utils/utils-custom.js'
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
+import { resetStyle, getTables } from '@/utils/utils-custom.js'
 import './index.scss'
 
 const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
@@ -65,7 +63,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     card: null,
     appType: sessionStorage.getItem('appType'),
     eventListener: null
@@ -118,7 +115,6 @@
         format: card.subtype === 'ratioboard' ? 'array' : 'object',   // 缁勪欢灞炴�� - 鏁版嵁鏍煎紡
         pageable: false,    // 缁勪欢灞炴�� - 鏄惁鍙垎椤�
         switchable: false,  // 缁勪欢灞炴�� - 鏁版嵁鏄惁鍙垏鎹�
-        dataName: card.dataName || '',
         width: _plot.width,
         name: _plot.name,
         subtype: card.subtype,
@@ -494,6 +490,10 @@
     } else if (!card.setting.supModule) {
       card.errors.push({ level: 0, detail: '鏈缃笂绾х粍浠讹紒'})
     }
+
+    if (card.errors.length === 0) {
+      card.$tables = getTables(card)
+    }
     
     if (!card.plot.valueField) {
       card.errors.push({ level: 0, detail: '鏄剧ず鍊煎皻鏈缃紒'})
@@ -534,7 +534,7 @@
       <div className="menu-dashboard-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/>
+            <ChartCompileForm config={card} plotchange={this.updateComponent}/>
             <CopyComponent type="dashboard" card={card}/>
             <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/>
             <ClockComponent config={card} updateConfig={this.updateComponent}/>

--
Gitblit v1.8.0