From 3b103caa6bfc9ed410e67156c3ca1785bf1cecc9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 19 八月 2022 01:15:31 +0800
Subject: [PATCH] 2022-08-19

---
 src/tabviews/zshare/mutilform/index.jsx |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx
index c2b9648..6792251 100644
--- a/src/tabviews/zshare/mutilform/index.jsx
+++ b/src/tabviews/zshare/mutilform/index.jsx
@@ -650,6 +650,10 @@
   
       param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
       param.secretkey = Utils.encrypt(param.LText, param.timestamp)
+
+      if (form.database === 'sso' && window.GLOB.mainSystemApi) {
+        param.rduri = window.GLOB.mainSystemApi
+      }
   
       return (
         new Promise(resolve => {
@@ -689,21 +693,29 @@
     let _formlist = fromJS(this.state.formlist).toJS().map(item => {
       if (['select', 'link', 'radio', 'checkbox', 'checkcard', 'multiselect', 'cascader'].includes(item.type) && result[item.field] && result[item.field].length > 0) {
         let options = []
+        let map = new Map()
         result[item.field].forEach(cell => {
-          let _cell = { key: Utils.getuuid() }
+          let _cell = { key: Utils.getuuid() , ParentID: ''}
+
+          if (item.linkField && cell[item.linkField] !== undefined) {
+            _cell.ParentID = cell[item.linkField]
+          }
 
           if (item.type !== 'checkcard') {
             _cell.value = cell[item.valueField]
-            _cell.label = cell[item.valueText]
-            if (!_cell.label && _cell.label !== 0) return
+            _cell.label = cell[item.valueText] + ''
+            if (!_cell.label || map.has(_cell.ParentID + _cell.value)) return
+            
+            map.set(_cell.ParentID + _cell.value, 0)
           } else {
             _cell.$value = cell[item.cardValField]
             _cell = {..._cell, ...cell}
+
+            if (map.has(_cell.ParentID + _cell.$value)) return
+            
+            map.set(_cell.ParentID + _cell.$value, 0)
           }
-  
-          if (item.linkField) {
-            _cell.ParentID = cell[item.linkField] === undefined ? '' : cell[item.linkField]
-          }
+          
           if (item.subFields) {
             item.subFields.forEach(m => {
               _cell[m.field] = cell[m.field] === undefined ? '' : cell[m.field]

--
Gitblit v1.8.0