From cf83be61fa551f9907377af31e0896f67ee610c4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 15 七月 2024 19:45:46 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/api/index.js                                         |    2 
 src/menu/components/share/actioncomponent/formconfig.jsx |   31 +++++++++------
 src/templates/comtableconfig/updatetable/index.jsx       |   34 +++++++++++++++++
 3 files changed, 53 insertions(+), 14 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index aab9485..5e93d05 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -968,7 +968,7 @@
       })
     } else {
       let url = '/webapi/dostars'
-      if (param.rduri && !window.GLOB.transfer && /\/dostars/.test(param.rduri) && param.func !== 'webapi_ChangeUser') {
+      if (param.rduri && (!window.GLOB.transfer || /https:\/\/sso.mk9h.cn/.test(param.rduri)) && /\/dostars/.test(param.rduri) && param.func !== 'webapi_ChangeUser') {
         url = param.rduri
         delete param.rduri
       }
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 3b176a2..5dc2f82 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -325,7 +325,7 @@
   }
 
   let width = card.width || (card.width === 0 ? 0 : 12)
-  if (/x/.test(card.width)) {
+  if (card.width && /x/.test(card.width)) {
     width = +width.replace(/x/, '.5')
   }
 
@@ -1818,6 +1818,11 @@
     })
   }
 
+  let width = card.width || (card.width === 0 ? 0 : 12)
+  if (card.width && /x/.test(card.width)) {
+    width = +width.replace(/x/, '.5')
+  }
+
   let forms = [
     {
       type: 'select',
@@ -2339,18 +2344,18 @@
       tooltip: '鍒嗕韩鏃跺鐢ㄦ埛鐨勬彁绀轰俊鎭��',
       required: false
     },
-    // {
-    //   type: 'number',
-    //   key: 'width',
-    //   min: 1,
-    //   max: 24,
-    //   precision: 0,
-    //   label: '瀹藉害',
-    //   initVal: card.width || 12,
-    //   tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��',
-    //   forbid: card.eleType !== 'button',
-    //   required: true
-    // },
+    {
+      type: 'number',
+      key: 'width',
+      min: 0,
+      max: 24,
+      precision: 1,
+      label: '瀹藉害',
+      initVal: width,
+      tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼�備负 0 鏃跺搴﹁嚜閫傚簲銆傚彲璁剧疆鍗婂垪鍗�.5銆�',
+      forbid: position !== 'line',
+      required: true
+    },
     {
       type: 'radio',
       key: 'show',
diff --git a/src/templates/comtableconfig/updatetable/index.jsx b/src/templates/comtableconfig/updatetable/index.jsx
index ed03667..c1a3d21 100644
--- a/src/templates/comtableconfig/updatetable/index.jsx
+++ b/src/templates/comtableconfig/updatetable/index.jsx
@@ -429,6 +429,40 @@
   
                 if (_LongParam) {
                   _LongParam.uuid = item.uuid
+
+                  if (_LongParam.fields && _LongParam.fields.length === 0 && _LongParam.groups && _LongParam.groups.length > 0) {
+                    _LongParam.groups.forEach(group => {
+                      if (group.sublist && group.sublist.length > 0) {
+                        _LongParam.fields.push({
+                          uuid: Utils.getuuid(),
+                          label: group.label,
+                          field: '',
+                          type: 'split'
+                        })
+                        _LongParam.fields.push(...group.sublist)
+                      }
+                    })
+                  }
+
+                  let span = _LongParam.setting && _LongParam.setting.cols ? (24 / _LongParam.setting.cols) : 12
+                  if (![24, 12, 8].includes(span)) {
+                    span = 12
+                  }
+
+                  if (_LongParam.fields) {
+                    _LongParam.fields = _LongParam.fields.map(n => {
+                      if (!n.span && n.type !== 'split') {
+                        if (['textarea', 'hint', 'checkcard', 'brafteditor'].includes(n.type)) {
+                          n.span = 24
+                        } else {
+                          n.span = span
+                        }
+                      }
+
+                      return n
+                    })
+                  }
+
                   resolve(_LongParam)
                 } else {
                   resolve({uuid: item.uuid, $empty: true})

--
Gitblit v1.8.0