From f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 十一月 2022 16:11:55 +0800
Subject: [PATCH] 2022-11-21

---
 src/tabviews/subtable/index.jsx |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index 278430f..51ebb7b 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { notification, Spin, Switch, Row, Col, Tabs} from 'antd'
+import { notification, Spin, Switch, Row, Col, Tabs, Modal } from 'antd'
 
 import Api from '@/api'
 import zhCN from '@/locales/zh-CN/main.js'
@@ -33,7 +33,6 @@
     MenuID: PropTypes.string,        // 鑿滃崟Id
     SupMenuID: PropTypes.string,     // 涓婄骇鑿滃崟Id
     mainSearch: PropTypes.any,       // 涓昏〃鎼滅储鏉′欢
-    ContainerId: PropTypes.any,      // 涓夌骇鑿滃崟Container(html) ID
   }
 
   state = {
@@ -99,6 +98,7 @@
         config.setting.$name = Tab.label
         config.setting.foreignKey = Tab.foreignKey || ''
         config.setting.supModule = Tab.supMenu || ''
+        config.setting.ContainerId = Tab.ContainerId || ''
       } catch (e) {
         console.warn('Parse Failure')
         config = ''
@@ -407,7 +407,7 @@
         statFValue: [],
         total: 0
       })
-      MKEmitter.emit('changeTableLine', this.props.ContainerId, this.props.Tab.uuid, '', '')
+      MKEmitter.emit('changeTableLine', this.props.Tab.ContainerId, this.props.Tab.uuid, '', '')
       return
     } else if (window.GLOB.systemType === 'production' && setting.interType === 'custom' && !setting.proInterface) {
       notification.warning({
@@ -421,7 +421,7 @@
     this.setState({
       selectedData: []
     })
-    MKEmitter.emit('changeTableLine', this.props.ContainerId, this.props.Tab.uuid, '', '')
+    MKEmitter.emit('changeTableLine', this.props.Tab.ContainerId, this.props.Tab.uuid, '', '')
 
     if (setting.interType === 'custom' && loadCustomApi) {
       if (setting.execTime === 'once') {
@@ -668,11 +668,17 @@
         loading: false
       })
 
-      notification.error({
-        top: 92,
-        message: prex + result.message,
-        duration: 10
-      })
+      if (result.ErrCode === 'N') {
+        Modal.error({
+          title: prex + result.message,
+        })
+      } else {
+        notification.error({
+          top: 92,
+          message: prex + result.message,
+          duration: 10
+        })
+      }
     }
   }
 
@@ -1025,7 +1031,6 @@
                       columns={columns}
                       MenuID={this.props.MenuID}
                       selectedData={selectedData}
-                      ContainerId={this.props.ContainerId}
                     />
                   </div>
                   <div className="subtable-box">
@@ -1045,7 +1050,6 @@
                       MenuID={this.props.MenuID}
                       loading={this.state.loading}
                       statFValue={this.state.statFValue}
-                      ContainerId={this.props.ContainerId}
                       refreshdata={this.refreshbytable}
                       chgSelectData={this.changeSelectedData}
                     />
@@ -1065,7 +1069,6 @@
                     MenuID={this.props.MenuID}
                     loading={this.state.loading}
                     tableId={this.props.Tab.uuid}
-                    ContainerId={this.props.ContainerId}
                   />
                 </Col>
               )
@@ -1094,7 +1097,6 @@
               columns={columns}
               MenuID={this.props.MenuID}
               selectedData={selectedData}
-              ContainerId={this.props.ContainerId}
             />
           </div>
           <div className="subtable-box">
@@ -1114,7 +1116,6 @@
               MenuID={this.props.MenuID}
               loading={this.state.loading}
               statFValue={this.state.statFValue}
-              ContainerId={this.props.ContainerId}
               refreshdata={this.refreshbytable}
               chgSelectData={this.changeSelectedData}
             />

--
Gitblit v1.8.0