From 2aa5ab63b4bbce5c36dbb3511b205b3b5f6af9bd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 07 五月 2024 11:34:20 +0800
Subject: [PATCH] 2024-05-07

---
 src/menu/components/share/actioncomponent/formconfig.jsx |  256 ++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 203 insertions(+), 53 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 0ac75b8..c9f53f2 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -318,6 +318,24 @@
     width = +width.replace(/x/, '.5')
   }
 
+  let extraParam = []
+  if (card.recordUser === 'true') {
+    extraParam.push('recordUser')
+  }
+  if (card.dataM === 'true') {
+    extraParam.push('dataM')
+  }
+
+  if (!appType) {
+    if (typeof(card.openmenu) === 'string') {
+      card.openmenu = []
+    }
+  } else {
+    if (typeof(card.openmenu) !== 'string') {
+      card.openmenu = ''
+    }
+  }
+
   let forms = [
     {
       type: 'select',
@@ -499,14 +517,14 @@
       initVal: card.linkmenu || (isApp ? '' : []),
       required: true,
       extendName: 'MenuNo',
-      options: isApp ? appMenus : menulist
+      options: isApp ? appMenus : (menulist.length ? [...menulist, {value: 'multiMenu', label: '澶氳彍鍗�'}] : [])
     },
     {
       type: 'text',
       key: 'prefix',
       label: '鍓嶇紑',
       initVal: card.prefix || '',
-      tooltip: '鎵爜淇℃伅灏嗕笌鍓嶇紑鎷兼帴鍚庢墽琛屻�傛敞锛氳烦杞彍鍗曢渶浠kbid寮�澶淬��',
+      tooltip: '鎵爜淇℃伅灏嗕笌鍓嶇紑鎷兼帴鍚庢墽琛屻�傛敞锛氳烦杞彍鍗曢渶浠kbid锛�:鎴�,锛夊紑澶达紝mkbid锛�:鎴�,锛夎烦杞悗灏嗚鍘婚櫎銆備緥濡傦細mkbid:123456 璺宠浆鍚庨〉闈ID涓� 123456銆�',
       required: false
     },
     {
@@ -1060,7 +1078,7 @@
       key: 'tipTitle',
       label: '纭鎻愮ず',
       initVal: card.tipTitle || '',
-      tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�',
+      tooltip: '鎻愮ず妗嗙殑纭鎻愮ず淇℃伅銆�',
       required: false
     },
     {
@@ -1259,18 +1277,18 @@
       forbid: appType === 'mob'
     },
     {
-      type: 'radio',
-      key: 'recordUser',
-      label: '璁板綍鐢ㄦ埛',
-      initVal: card.recordUser || 'false',
-      tooltip: '褰撻�夋嫨鈥滄槸鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆�',
+      type: 'checkbox',
+      key: 'extraParam',
+      label: '鎵╁睍鍙傛暟',
+      initVal: extraParam,
+      tooltip: '閫夋嫨鈥滅敤鎴蜂俊鎭�濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆傞�夋嫨鈥滄暟鎹鐞嗗憳鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� dataM 锛岀鐞嗗憳鍊间负鈥淵鈥濓紝鏅�氱敤鎴蜂负绌恒��',
       required: false,
       options: [{
-        value: 'false',
-        text: '鍚�'
+        value: 'recordUser',
+        text: '鐢ㄦ埛淇℃伅'
       }, {
-        value: 'true',
-        text: '鏄�'
+        value: 'dataM',
+        text: '鏁版嵁绠$悊鍛�'
       }]
     },
     {
@@ -1320,21 +1338,21 @@
       initVal: card.reason || '',
       required: false
     },
-    {
-      type: 'radio',
-      key: 'formCache',
-      label: '琛ㄥ崟缂撳瓨',
-      initVal: card.formCache || 'false',
-      tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�',
-      required: false,
-      options: [{
-        value: 'false',
-        text: '涓嶆竻绌�'
-      }, {
-        value: 'clear',
-        text: '娓呯┖'
-      }]
-    },
+    // {
+    //   type: 'radio',
+    //   key: 'formCache',
+    //   label: '琛ㄥ崟缂撳瓨',
+    //   initVal: card.formCache || 'false',
+    //   tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�',
+    //   required: false,
+    //   options: [{
+    //     value: 'false',
+    //     text: '涓嶆竻绌�'
+    //   }, {
+    //     value: 'clear',
+    //     text: '娓呯┖'
+    //   }]
+    // },
     {
       type: 'radio',
       key: 'hidden',
@@ -1510,6 +1528,68 @@
     },
     {
       type: 'radio',
+      key: 'sysId',
+      label: '鑷畾涔塈D',
+      initVal: card.sysId || '',
+      tooltip: '涓嶉�夎鎸夐挳鍙湪鍓嶇鐢熸垚ID鍊�(32浣�)锛屼綔涓哄悗缁彍鍗曠殑BID锛屽瓨鍦ㄦ爣璁版椂锛孖D鍊煎悗灏嗘嫾鎺ユ爣璁板�笺��',
+      required: false,
+      options: [{
+        value: '',
+        text: '缁勪欢BID'
+      }, {
+        value: 'js',
+        text: '鍓嶇鐢熸垚'
+      }, {
+        value: 'empty',
+        text: '绌�'
+      }]
+    },
+    {
+      type: 'text',
+      key: 'sign',
+      label: '鏍囪',
+      initVal: card.sign || '',
+      required: false
+    },
+    {
+      type: 'table',
+      key: 'multiMenus',
+      label: '鑿滃崟鍒楄〃',
+      initVal: card.multiMenus || [],
+      required: true,
+      actions: ['edit', 'del', 'add', 'move'],
+      columns: [
+        {
+          title: '鍚嶇О',
+          dataIndex: 'name',
+          inputType: 'text',
+          editable: true,
+          required: false,
+          width: '30%'
+        },
+        {
+          title: '鑿滃崟',
+          dataIndex: 'menuId',
+          inputType: 'cascader',
+          editable: true,
+          required: true,
+          extends: [{key: 'label', value: 'label', mutilLabel: 'name'}],
+          width: '30%',
+          render: (text, record) => record.label,
+          options: menulist
+        },
+        {
+          title: '鏍囪',
+          dataIndex: 'sign',
+          inputType: 'text',
+          editable: true,
+          required: false,
+          width: '20%'
+        }
+      ]
+    },
+    {
+      type: 'radio',
       key: 'preHandle',
       label: '鑷畾涔夎剼鏈�',
       initVal: card.preHandle || 'false',
@@ -1631,6 +1711,14 @@
 
   if (card.OpenType === 'form') { // 鎷栨嫿娣诲姞绫诲瀷杞崲
     card.OpenType = 'pop'
+  }
+
+  let extraParam = []
+  if (card.recordUser === 'true') {
+    extraParam.push('recordUser')
+  }
+  if (card.dataM === 'true') {
+    extraParam.push('dataM')
   }
 
   let forms = [
@@ -1793,7 +1881,7 @@
       initVal: card.linkmenu || [],
       required: true,
       extendName: 'MenuNo',
-      options: menulist
+      options: menulist.length ? [...menulist, {value: 'multiMenu', label: '澶氳彍鍗�'}] : []
     },
     {
       type: 'textarea',
@@ -2263,7 +2351,7 @@
       key: 'tipTitle',
       label: '纭鎻愮ず',
       initVal: card.tipTitle || '',
-      tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�',
+      tooltip: '鎻愮ず妗嗙殑纭鎻愮ず淇℃伅銆�',
       required: false
     },
     {
@@ -2383,18 +2471,18 @@
       required: false
     },
     {
-      type: 'radio',
-      key: 'recordUser',
-      label: '璁板綍鐢ㄦ埛',
-      initVal: card.recordUser || 'false',
-      tooltip: '褰撻�夋嫨鈥滄槸鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆�',
+      type: 'checkbox',
+      key: 'extraParam',
+      label: '鎵╁睍鍙傛暟',
+      initVal: extraParam,
+      tooltip: '閫夋嫨鈥滅敤鎴蜂俊鎭�濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆傞�夋嫨鈥滄暟鎹鐞嗗憳鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� dataM 锛岀鐞嗗憳鍊间负鈥淵鈥濓紝鏅�氱敤鎴蜂负绌恒��',
       required: false,
       options: [{
-        value: 'false',
-        text: '鍚�'
+        value: 'recordUser',
+        text: '鐢ㄦ埛淇℃伅'
       }, {
-        value: 'true',
-        text: '鏄�'
+        value: 'dataM',
+        text: '鏁版嵁绠$悊鍛�'
       }]
     },
     {
@@ -2444,21 +2532,21 @@
       initVal: card.reason || '',
       required: false
     },
-    {
-      type: 'radio',
-      key: 'formCache',
-      label: '琛ㄥ崟缂撳瓨',
-      initVal: card.formCache || 'false',
-      tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�',
-      required: false,
-      options: [{
-        value: 'false',
-        text: '涓嶆竻绌�'
-      }, {
-        value: 'clear',
-        text: '娓呯┖'
-      }]
-    },
+    // {
+    //   type: 'radio',
+    //   key: 'formCache',
+    //   label: '琛ㄥ崟缂撳瓨',
+    //   initVal: card.formCache || 'false',
+    //   tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�',
+    //   required: false,
+    //   options: [{
+    //     value: 'false',
+    //     text: '涓嶆竻绌�'
+    //   }, {
+    //     value: 'clear',
+    //     text: '娓呯┖'
+    //   }]
+    // },
     {
       type: 'radio',
       key: 'hidden',
@@ -2539,6 +2627,68 @@
     },
     {
       type: 'radio',
+      key: 'sysId',
+      label: '鑷畾涔塈D',
+      initVal: card.sysId || '',
+      tooltip: '涓嶉�夎鎸夐挳鍙湪鍓嶇鐢熸垚ID鍊�(32浣�)锛屼綔涓哄悗缁彍鍗曠殑BID锛屽瓨鍦ㄦ爣璁版椂锛孖D鍊煎悗灏嗘嫾鎺ユ爣璁板�笺��',
+      required: false,
+      options: [{
+        value: '',
+        text: '缁勪欢BID'
+      }, {
+        value: 'js',
+        text: '鍓嶇鐢熸垚'
+      }, {
+        value: 'empty',
+        text: '绌�'
+      }]
+    },
+    {
+      type: 'text',
+      key: 'sign',
+      label: '鏍囪',
+      initVal: card.sign || '',
+      required: false
+    },
+    {
+      type: 'table',
+      key: 'multiMenus',
+      label: '鑿滃崟鍒楄〃',
+      initVal: card.multiMenus || [],
+      required: true,
+      actions: ['edit', 'del', 'add', 'move'],
+      columns: [
+        {
+          title: '鍚嶇О',
+          dataIndex: 'name',
+          inputType: 'text',
+          editable: true,
+          required: false,
+          width: '30%'
+        },
+        {
+          title: '鑿滃崟',
+          dataIndex: 'menuId',
+          inputType: 'cascader',
+          editable: true,
+          required: true,
+          extends: [{key: 'label', value: 'label', mutilLabel: 'name'}],
+          width: '30%',
+          render: (text, record) => record.label,
+          options: menulist
+        },
+        {
+          title: '鏍囪',
+          dataIndex: 'sign',
+          inputType: 'text',
+          editable: true,
+          required: false,
+          width: '20%'
+        }
+      ]
+    },
+    {
+      type: 'radio',
       key: 'preHandle',
       label: '鑷畾涔夎剼鏈�',
       initVal: card.preHandle || 'false',

--
Gitblit v1.8.0