From 53b9fb93d0376eb02bb996935f1720b4e95cd897 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 12 十月 2022 14:41:06 +0800
Subject: [PATCH] 2022-10-12

---
 src/menu/components/form/formaction/formconfig.jsx |  113 ++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 92 insertions(+), 21 deletions(-)

diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx
index 475a856..f27f8b5 100644
--- a/src/menu/components/form/formaction/formconfig.jsx
+++ b/src/menu/components/form/formaction/formconfig.jsx
@@ -9,8 +9,8 @@
  * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
  */
 
-export function getActionForm (card, functip, tableName, usefulFields, modules) {
-  const isApp = sessionStorage.getItem('appType') === 'pc'
+export function getActionForm (card, functip, tableName, usefulFields, modules, anchors) {
+  const appType = sessionStorage.getItem('appType')
   let _type = '鎻愪氦'
   if (card.type === 'prev') {
     _type = '涓婁竴姝�'
@@ -19,25 +19,25 @@
   }
 
   let menulist = []
-  if (isApp) {
+  if (appType === 'pc' || appType === 'mob') {
     menulist = sessionStorage.getItem('appMenus')
     if (menulist) {
       try {
         menulist = JSON.parse(menulist)
         menulist = menulist.map(item => ({value: item.MenuID, text: item.MenuName}))
-      } catch {
+      } catch (e) {
         menulist = []
       }
     } else {
       menulist = []
     }
-    menulist.unshift({value: '', text: '鏃�'})
+    menulist.push({value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'})
   } else {
     menulist = sessionStorage.getItem('fstMenuList')
     if (menulist) {
       try {
         menulist = JSON.parse(menulist)
-      } catch {
+      } catch (e) {
         menulist = []
       }
     } else {
@@ -92,13 +92,16 @@
       }, {
         value: 'inner',
         text: '鍐呴儴鍑芥暟'
+      }, {
+        value: 'none',
+        text: '鏃�'
       }]
     },
     {
       type: 'radio',
       key: 'sqlType',
       label: Formdict['header.form.action.type'],
-      initVal: card.sqlType || 'update',
+      initVal: card.sqlType || '',
       required: true,
       options: [{
         value: 'insert',
@@ -126,7 +129,7 @@
       tooltip: functip,
       fields: usefulFields,
       tooltipClass: 'middle',
-      required: card.intertype === 'inner',
+      required: true,
       readonly: false
     },
     {
@@ -224,6 +227,12 @@
       }, {
         value: 'default',
         text: '鍚庡彴鑴氭湰'
+      }, {
+        value: 'func',
+        text: '鍥炶皟鍑芥暟'
+      }, {
+        value: 'none',
+        text: '鏃�'
       }]
     },
     {
@@ -238,17 +247,58 @@
       key: 'callbackFunc',
       label: Formdict['header.form.callbackFunc'],
       initVal: card.callbackFunc || '',
-      required: false,
+      required: true,
       readonly: false
     },
     {
-      type: isApp ? 'select' : 'cascader',
+      type: 'radio',
+      key: 'Ot',
+      label: '琛岃缃�',
+      initVal: card.Ot,
+      required: true,
+      options: [{
+        value: 'notRequired',
+        text: '涓嶉�夋嫨琛�'
+      }, {
+        value: 'requiredSgl',
+        text: '閫夋嫨鍗曡'
+      }]
+    },
+    {
+      type: 'select',
+      key: 'execSuccess',
+      label: '鎴愬姛鍚�',
+      initVal: card.execSuccess || 'grid',
+      required: true,
+      options: [{
+        value: 'never',
+        text: '涓嶅埛鏂�'
+      }, {
+        value: 'grid',
+        text: '鍒锋柊褰撳墠缁勪欢'
+      }, {
+        value: 'mainline',
+        text: '鍒锋柊涓婄骇缁勪欢 - 琛�'
+      }]
+    },
+    {
+      type: (appType === 'pc' || appType === 'mob') ? 'select' : 'cascader',
       key: 'linkmenu',
-      label: '鎵撳紑鑿滃崟',
+      label: '涓嬩竴姝ユ搷浣�',
       tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
       initVal: card.linkmenu,
+      help: appType === 'pc' || appType === 'mob' ? '鍙繑鍥炰笂涓�椤点��' : null,
       required: false,
+      allowClear: true,
       options: menulist
+    },
+    {
+      type: 'text',
+      key: 'output',
+      label: '杩斿洖鍊�',
+      tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝杩斿洖id鏃跺彲浣跨敤@id@锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��',
+      initVal: card.output || '',
+      required: false
     },
     {
       type: 'radio',
@@ -256,23 +306,44 @@
       label: '鎵撳紑鏂瑰紡',
       initVal: card.open || 'blank',
       required: false,
-      forbid: !isApp,
-      options: [{
-        value: 'blank',
-        text: '鏂扮獥鍙�'
-      }, {
-        value: 'self',
-        text: '褰撳墠绐楀彛'
-      }]
+      forbid: appType !== 'pc' && appType !== 'mob',
+      options: [
+        {value: 'blank', text: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'},
+        {value: 'self', text: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'},
+      ]
     },
     {
       type: 'cascader',
       key: 'syncComponent',
       label: '鍚屾鍒锋柊',
       initVal: card.syncComponent,
-      tooltip: '鎵ц鎴愬姛鍚庨渶瑕佸埛鏂扮殑缁勪欢銆�',
+      tooltip: '鎵ц鎴愬姛鍚庨渶瑕佸埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堬紝鍒锋柊涓婄骇缁勪欢璇烽�夋嫨鎴愬姛鍚庘�滃埛鏂颁笂绾х粍浠� - 琛屸�濄��',
       required: false,
       options: modules
-    }
+    },
+    {
+      type: 'cascader',
+      key: 'anchors',
+      label: '璺宠浆閿氱偣',
+      initVal: card.anchors || [],
+      tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣銆�' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''),
+      required: false,
+      options: anchors
+    },
+    {
+      type: 'radio',
+      key: 'reload',
+      label: '涓婁竴椤�',
+      initVal: card.reload || 'false',
+      tooltip: '鎴愬姛鍚庢槸鍚﹀埛鏂颁笂椤电殑鏁版嵁銆傛敞锛氬湪鏄庣浜慉PP鎴栧皬绋嬪簭涓湁鏁堛��',
+      forbid: appType !== 'mob',
+      options: [{
+        value: 'false',
+        text: '涓嶅埛鏂�'
+      }, {
+        value: 'true',
+        text: '鍒锋柊'
+      }]
+    },
   ]
 }

--
Gitblit v1.8.0