From 08cce3334a2dc81d690b518136b0aaea64e48b0b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 14 六月 2023 09:55:50 +0800
Subject: [PATCH] 2023-06-14

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

diff --git a/src/menu/components/chart/antv-scatter/index.jsx b/src/menu/components/chart/antv-scatter/index.jsx
index 79b4684..bf2a909 100644
--- a/src/menu/components/chart/antv-scatter/index.jsx
+++ b/src/menu/components/chart/antv-scatter/index.jsx
@@ -8,7 +8,7 @@
 import MKEmitter from '@/utils/events.js'
 import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
-import { resetStyle, getTables, getHeight } from '@/utils/utils-custom.js'
+import { resetStyle, getTables, getHeight, checkComponent } from '@/utils/utils-custom.js'
 import Utils from '@/utils/utils.js'
 import './index.scss'
 
@@ -253,22 +253,12 @@
 
     card.width = card.plot.width
     card.name = card.plot.name
-    card.errors = []
-
-    let columns = card.columns.map(c => c.field)
     
-    if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) {
-      card.errors.push({ level: 0, detail: '鏈缃暟鎹簮锛�'})
-    } else if (card.setting.interType === 'system' && card.setting.execute === 'false' && card.scripts.filter(script => script.status !== 'false').length === 0) {
-      card.errors.push({ level: 0, detail: '鏁版嵁婧愪腑鏃犲彲鐢ㄨ剼鏈紒'})
-    } else if (!card.setting.primaryKey) {
-      card.errors.push({ level: 0, detail: '鏈缃富閿紒'})
-    } else if (!columns.includes(card.setting.primaryKey)) {
-      card.errors.push({ level: 0, detail: '涓婚敭宸插け鏁堬紒'})
-    } else if (!card.setting.supModule) {
-      card.errors.push({ level: 0, detail: '鏈缃笂绾х粍浠讹紒'})
-    }
-
+    card.$c_ds = true
+    card.$c_ac = this.state.appType !== 'mob'
+    
+    card.errors = checkComponent(card)
+    
     if (card.errors.length === 0) {
       card.$tables = getTables(card)
     }
@@ -276,11 +266,11 @@
     if (!card.plot.Xaxis) {
       card.errors.push({ level: 0, detail: '鍧愭爣杞村皻鏈缃紒'})
     } else {
+      let columns = card.columns.map(c => c.field)
       if (!columns.includes(card.plot.Xaxis)) {
-        card.errors.push({ level: 1, detail: 'X杞村湪瀛楁闆嗕腑涓嶅瓨鍦�'})
-      }
-      if (!columns.includes(card.plot.Yaxis)) {
-        card.errors.push({ level: 1, detail: 'Y杞村湪瀛楁闆嗕腑涓嶅瓨鍦�'})
+        card.errors.push({ level: 0, detail: 'X杞村湪瀛楁闆嗕腑涓嶅瓨鍦�'})
+      } else if (!columns.includes(card.plot.Yaxis)) {
+        card.errors.push({ level: 0, detail: 'Y杞村湪瀛楁闆嗕腑涓嶅瓨鍦�'})
       }
     }
 
@@ -395,13 +385,13 @@
           <ToolOutlined/>
         </Popover>
         <NormalHeader config={card} updateComponent={this.updateComponent}/>
-        <div className="canvas" id={card.uuid + 'canvas'}></div>
+        <div className="canvas" style={{minHeight: card.plot.height}} id={card.uuid + 'canvas'}></div>
         {appType !== 'mob' ? <ActionComponent config={card} updateaction={this.updateComponent}/> : null}
         <div className="component-name">
           <div className="center">
             <div className="title" onDoubleClick={() => {
               let oInput = document.createElement('input')
-              oInput.value = card.uuid
+              oInput.value = 'anchor' + card.uuid
               document.body.appendChild(oInput)
               oInput.select()
               document.execCommand('Copy')

--
Gitblit v1.8.0