From b1fc0a89ce16dd14a6dff98c228a308e85a53828 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 18 十月 2024 16:33:54 +0800
Subject: [PATCH] Merge branch 'positec' into dms

---
 src/tabviews/custom/components/iframe/index.jsx |   40 ++++++++++------------------------------
 1 files changed, 10 insertions(+), 30 deletions(-)

diff --git a/src/tabviews/custom/components/iframe/index.jsx b/src/tabviews/custom/components/iframe/index.jsx
index ff983aa..50352bb 100644
--- a/src/tabviews/custom/components/iframe/index.jsx
+++ b/src/tabviews/custom/components/iframe/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Input, Modal, notification, Empty, Spin } from 'antd'
+import { Input, Empty, Spin } from 'antd'
 
 import Api from '@/api'
 import UtilsDM from '@/utils/utils-datamanage.js'
@@ -45,6 +45,10 @@
     if (_config.wrap.datatype === 'dynamic') {
       _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true'
 
+      if (_config.setting.supModule && !BID) {
+        _config.setting.onload = 'false'
+      }
+      
       if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) {
         _data = window.GLOB.SyncData.get(_config.dataName) || []
         _data = _data[0] || {$$empty: true}
@@ -69,8 +73,7 @@
       linkUrl: linkUrl,
       data: _data,
       BID: BID || '',
-      config: _config,
-      arr_field: _config.columns.map(col => col.field).join(',')
+      config: _config
     })
   }
 
@@ -174,7 +177,7 @@
   }
 
   async loadData () {
-    const { config, arr_field, BID } = this.state
+    const { config, BID } = this.state
     
     if (config.wrap.datatype === 'static') {
       this.setState({
@@ -198,7 +201,7 @@
     }
 
     let _orderBy = config.setting.order || ''
-    let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID)
+    let param = UtilsDM.getQueryDataParams(config.setting, searches, _orderBy, 1, 1, BID)
 
     let result = await Api.genericInterface(param)
     if (result.status) {
@@ -213,32 +216,9 @@
         data: _data
       })
 
-      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
-          })
-        }
-      }
+      UtilsDM.querySuccess(result)
     } else {
-      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
-        })
-      }
+      UtilsDM.queryFail(result)
     }
   }
 

--
Gitblit v1.8.0