From 5354b648a9765d8c9ca3f8c7ce065b58c3d55716 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 10 十月 2022 18:47:36 +0800
Subject: [PATCH] 2022-10-10

---
 src/menu/components/share/actioncomponent/formconfig.jsx |   59 +++++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 41 insertions(+), 18 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 149307b..a8f146a 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -12,7 +12,7 @@
  * @param {*} usefulFields   瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈�
  * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
  */
-export function getActionForm (card, functip, config, usefulFields, menulist = [], modules = [], anchors = []) {
+export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = []) {
   let appType = sessionStorage.getItem('appType')
   let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview
   let printTemps = sessionStorage.getItem('printTemps')
@@ -20,6 +20,7 @@
   let setting = config.setting || {}
   let columns = config.columns || []
   let appMenus = []
+  let menulist = []
   let type = ''
 
   if (card.eleType === 'button') {
@@ -115,6 +116,17 @@
     } else {
       appMenus = []
     }
+  } else {
+    menulist = sessionStorage.getItem('fstMenuList')
+    if (menulist) {
+      try {
+        menulist = JSON.parse(menulist)
+      } catch (e) {
+        menulist = []
+      }
+    } else {
+      menulist = []
+    }
   }
   if (appType === 'mob') {
     opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value))
@@ -173,7 +185,7 @@
   if (type === 'card') {
     opentypes.push({
       value: 'form',
-      text: '琛ㄥ崟锛堝紑鍏虫垨鍕鹃�夋锛�'
+      text: '琛ㄥ崟'
     })
   } else if (card.OpenType === 'form') { // 鎷栨嫿娣诲姞绫诲瀷杞崲
     card.OpenType = 'pop'
@@ -197,6 +209,16 @@
       value: 'closetab',
       text: '鍏抽棴鏍囩'
     }]
+  }
+
+  let formTypes = []
+  if (appType === 'mob') {
+    formTypes = [{
+      value: 'scan',
+      text: '鎵弿'
+    }]
+  } else if (card.formType === 'scan') {
+    card.formType = 'switch'
   }
 
   let forms = [
@@ -245,7 +267,8 @@
       }, {
         value: 'radio',
         text: '鍕鹃�夋'
-      }]
+      }, 
+      ...formTypes]
     },
     {
       type: 'select',
@@ -908,6 +931,21 @@
       required: false
     },
     {
+      type: 'radio',
+      key: 'hidden',
+      label: '闅愯棌',
+      initVal: card.hidden || 'false',
+      tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��',
+      required: false,
+      options: [{
+        value: 'false',
+        text: '鍚�'
+      }, {
+        value: 'true',
+        text: '鏄�'
+      }]
+    },
+    {
       type: 'splitLine',
       key: 'title',
       label: '琛ㄥ崟',
@@ -966,21 +1004,6 @@
       label: '鍏抽棴鎻愮ず',
       initVal: card.closeText || '',
       required: false,
-    },
-    {
-      type: 'radio',
-      key: 'hidden',
-      label: '闅愯棌',
-      initVal: card.hidden || 'false',
-      tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��',
-      required: false,
-      options: [{
-        value: 'false',
-        text: '鍚�'
-      }, {
-        value: 'true',
-        text: '鏄�'
-      }]
     },
     {
       type: 'radio',

--
Gitblit v1.8.0