From 5025901e459ae49d85210573ad38fb3f3c1d9230 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 25 六月 2023 18:48:54 +0800
Subject: [PATCH] 2023-06-25

---
 src/tabviews/custom/components/chart/custom-chart/index.jsx |   33 +++++++++++++++++++++++++++------
 1 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/src/tabviews/custom/components/chart/custom-chart/index.jsx b/src/tabviews/custom/components/chart/custom-chart/index.jsx
index f2b717e..6d9ee7b 100644
--- a/src/tabviews/custom/components/chart/custom-chart/index.jsx
+++ b/src/tabviews/custom/components/chart/custom-chart/index.jsx
@@ -4,7 +4,7 @@
 import { Chart } from '@antv/g2'
 import DataSet from '@antv/data-set'
 import * as echarts from 'echarts'
-import { Spin, Empty, notification } from 'antd'
+import { Spin, Empty, notification, Modal } from 'antd'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -287,16 +287,37 @@
           this.timer && this.timer.stop()
         }
       }
+      if (result.message) {
+        if (result.ErrCode === 'Y') {
+          Modal.success({
+            title: result.message
+          })
+        } else if (result.ErrCode === 'S') {
+          notification.success({
+            top: 92,
+            message: result.message,
+            duration: 2
+          })
+        }
+      }
     } else {
       this.setState({
         loading: false
       })
       this.timer && this.timer.stop()
-      notification.error({
-        top: 92,
-        message: result.message,
-        duration: 10
-      })
+      
+      if (!result.message) return
+      if (result.ErrCode === 'N') {
+        Modal.error({
+          title: result.message,
+        })
+      } else if (result.ErrCode !== '-2') {
+        notification.error({
+          top: 92,
+          message: result.message,
+          duration: 10
+        })
+      }
     }
   }
 

--
Gitblit v1.8.0