From 0eb129a9beddbb86ae74d7106a8e60823206b8d5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 14 十二月 2023 11:29:15 +0800
Subject: [PATCH] 2023-12-14

---
 src/menu/components/chart/antv-pie/chartcompile/index.jsx |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/menu/components/chart/antv-pie/chartcompile/index.jsx b/src/menu/components/chart/antv-pie/chartcompile/index.jsx
index 1a2ad2d..2d6fdc4 100644
--- a/src/menu/components/chart/antv-pie/chartcompile/index.jsx
+++ b/src/menu/components/chart/antv-pie/chartcompile/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { fromJS } from 'immutable'
-import { Modal, Form, Row, Col, Select, Radio, Tooltip, Input, InputNumber, Tabs, Button } from 'antd'
+import { Modal, Form, Row, Col, Select, Radio, Tooltip, Input, notification, InputNumber, Tabs, Button } from 'antd'
 import { QuestionCircleOutlined, EditOutlined } from '@ant-design/icons'
 
 import Utils from '@/utils/utils.js'
@@ -27,7 +27,7 @@
     plot: null,
     formlist: null,
     baseFormlist: null,
-    view: 'normal',
+    view: 'base',
     colorColumns: [
       {
         title: '鎸囨爣',
@@ -54,7 +54,7 @@
 
     this.setState({
       visible: true,
-      view: 'normal',
+      view: 'base',
       plot: fromJS(config.plot).toJS(),
       baseFormlist: getBaseForm(config.plot),
       formlist: getOptionForm(config.plot, config.columns)
@@ -276,6 +276,18 @@
       this.baseRef.handleConfirm().then(res => {
         let _plot = {...plot, ...res}
 
+        if (!plot.Xaxis && tab === 'color') {
+          this.setState({
+            plot: _plot,
+            view: 'normal'
+          })
+          notification.warning({
+            top: 92,
+            message: '璇锋坊鍔犲浘琛ㄨ缃��',
+            duration: 3
+          })
+          return
+        }
         this.setState({
           plot: _plot,
           view: tab

--
Gitblit v1.8.0