From f0bf8c399c354c22227f8f1a76ed806098db59c0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 21 五月 2024 16:51:02 +0800
Subject: [PATCH] 2024-05-21

---
 src/tabviews/custom/components/card/balcony/index.jsx |   57 ++++++++++++++++++++++++++++-----------------------------
 1 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx
index d3b0ce0..3b9b8f7 100644
--- a/src/tabviews/custom/components/card/balcony/index.jsx
+++ b/src/tabviews/custom/components/card/balcony/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Spin, notification, Checkbox, Modal } from 'antd'
+import { Spin, Checkbox } from 'antd'
 
 import Api from '@/api'
 import UtilsDM from '@/utils/utils-datamanage.js'
@@ -71,12 +71,26 @@
         _data = window.GLOB.CacheData.get(_config.wrap.publicId)
         _data = fromJS(_data).toJS()
       }
+    } else {
+      _config.elements.forEach(item => {
+        if (item.eleType === 'button') return
+        if (item.datatype === 'dynamic' && item.field) {
+          item.field = item.field.toLowerCase()
+        }
+      })
     }
 
     _data.$$BID = BID || ''
     _data.$$BData = BData || ''
     if (_config.setting.primaryKey) {
       _data.$$uuid = _data[_config.setting.primaryKey] || ''
+    }
+
+    if (_config.wrap.datatype === 'static' && BData) {
+      Object.keys(BData).forEach(key => {
+        if (/\$/.test(key)) return
+        _data[key.toLowerCase()] = BData[key]
+      })
     }
 
     if (!_config.style.position) {
@@ -273,8 +287,8 @@
 
       this.loadData()
     } else {
-      if ((position === 'mainline' || position === 'popclose') && config.wrap.supModule && BID) { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠�
-        MKEmitter.emit('reloadData', config.wrap.supModule, BID)
+      if (['mainline', 'maingrid', 'popclose'].includes(position) && config.wrap.supModule) {
+        MKEmitter.emit('reloadData', config.wrap.supModule, position === 'maingrid' ? '' : BID)
       } else {
         this.loadData()
       }
@@ -359,8 +373,16 @@
     }
     
     if (config.wrap.datatype === 'static') {
+      let _data = {$$BID: BID || '', $$BData: BData, $$empty: true, $$time: new Date().getTime()}
+      if (BData) {
+        Object.keys(BData).forEach(key => {
+          if (/\$/.test(key)) return
+          _data[key.toLowerCase()] = BData[key]
+        })
+      }
+
       this.setState({
-        data: {$$BID: BID || '', $$BData: BData, $$empty: true, $$time: new Date().getTime()},
+        data: _data
       })
       return
     } else if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇�
@@ -413,37 +435,14 @@
         }
       }
 
-      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 {
       this.setState({
         loading: false
       })
       this.timer && this.timer.stop()
       
-      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