From 4f8ffec8fc4aa9918264a3b3b4952421d896f5eb Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 17 四月 2020 17:48:36 +0800
Subject: [PATCH] 2020-04-17

---
 src/tabviews/subtable/index.jsx |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index 2ee84a9..11b05d8 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -298,10 +298,12 @@
         loadingview: false,
         viewlost: true
       })
+      let prex = Tab && Tab.label ? Tab.label + ': ' : ''
+
       notification.warning({
         top: 92,
-        message: result.message,
-        duration: 10
+        message: prex + result.message,
+        duration: 5
       })
     }
   }
@@ -349,10 +351,12 @@
         })
         deffers.push(defer)
       } else if (item.resourceType === '1' && !item.dataSource) {
+        let prex = this.props.Tab && this.props.Tab.label ? this.props.Tab.label + '-' : ''
+
         notification.warning({
           top: 92,
-          message: item.label + ': ' + this.state.dict['main.datasource.settingerror'],
-          duration: 10
+          message: prex + item.label + ': ' + this.state.dict['main.datasource.settingerror'],
+          duration: 5
         })
       }
     })
@@ -384,10 +388,12 @@
             return item
           })
         } else {
+          let prex = this.props.Tab && this.props.Tab.label ? this.props.Tab.label + '-' : ''
+
           notification.warning({
             top: 92,
-            message: res.search.label + ':' + res.message,
-            duration: 10
+            message: prex + res.search.label + ':' + res.message,
+            duration: 5
           })
         }
       })
@@ -454,10 +460,12 @@
       this.setState({
         loading: false
       })
+      let prex = this.props.Tab && this.props.Tab.label ? this.props.Tab.label + ': ' : ''
+
       notification.error({
         top: 92,
-        message: result.message,
-        duration: 15
+        message: prex + result.message,
+        duration: 10
       })
     }
   }

--
Gitblit v1.8.0