From 3c26f581cd77bed95cc56464f8424993f3c6b13a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 28 六月 2021 18:45:44 +0800
Subject: [PATCH] 2021-06-28

---
 src/menu/components/share/actioncomponent/formconfig.jsx |   55 +++++++++++++++++++++++++++++++++----------------------
 1 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index c2231a5..9667f90 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -12,6 +12,7 @@
  * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
  */
 export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) {
+  let appType = sessionStorage.getItem('appType')
   let setting = config.setting || {}
   let columns = config.columns || []
   let appMenus = []
@@ -51,7 +52,7 @@
     { value: 'pay', text: Formdict['model.pay'] },
     { value: 'custom', text: Formdict['header.form.custom'] }
   ]
-  const isApp = ['pc', 'mob'].includes(sessionStorage.getItem('appType'))
+  const isApp = ['pc', 'mob'].includes(appType)
 
   let funTypes = [
     { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
@@ -195,26 +196,12 @@
       options: pageTemps
     },
     {
-      type: 'radio',
-      key: 'open',
-      label: '閾炬帴鏂瑰紡',
-      initVal: card.open || 'blank',
-      required: true,
-      forbid: sessionStorage.getItem('appType') !== 'pc',
-      options: [{
-        value: 'blank',
-        text: '鏂扮獥鍙�'
-      }, {
-        value: 'self',
-        text: '褰撳墠绐楀彛'
-      }]
-    },
-    {
       type: 'select',
       key: 'linkmenu',
       label: '鍏宠仈鑿滃崟',
       initVal: card.linkmenu || '',
       required: true,
+      forbid: !isApp,
       options: appMenus
     },
     // {
@@ -439,10 +426,10 @@
         text: '鍥炬爣'
       }, {
         value: 'button',
-        text: '鎸夐挳'
+        text: '鍥炬爣+鏂囧瓧'
       }, {
         value: 'link',
-        text: '閾炬帴'
+        text: '鏂囧瓧+鍥炬爣'
       }]
     },
     {
@@ -451,7 +438,7 @@
       label: "婊戝姩鏄剧ず",
       initVal: card.swipe || 'false',
       required: false,
-      forbid: (type !== 'datacard' || sessionStorage.getItem('appType') !== 'mob'),
+      forbid: (type !== 'datacard' || appType !== 'mob'),
       options: [{
         value: 'false',
         text: '鍚�'
@@ -464,7 +451,7 @@
       }]
     },
     {
-      type: 'select',
+      type: 'icon',
       key: 'icon',
       label: Formdict['model.icon'],
       initVal: card.icon,
@@ -476,6 +463,7 @@
       key: 'class',
       label: Formdict['model.form.color'],
       initVal: card.class,
+      tooltip: '姝ら鑹蹭负鎸夐挳鍒濆鍖栭鑹诧紝鍙湪鏍峰紡璋冩暣涓慨鏀广��',
       required: false,
       options: []
     },
@@ -543,7 +531,6 @@
       tooltip: '绂佺敤鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鏄惁绂佺敤銆�',
       initVal: card.controlField || '',
       required: false,
-      // forbid: card.$type !== 'tableButton',
       options: [{label: '鏃�', field: ''}, ...columns]
     },
     {
@@ -552,8 +539,32 @@
       label: '鎺у埗鍊�',
       tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細绂佺敤锛屽涓�肩敤閫楀彿鍒嗛殧銆�',
       initVal: card.controlVal || '',
-      // forbid: card.$type !== 'tableButton',
       required: false
+    },
+    {
+      type: 'select',
+      key: 'openmenu',
+      label: '鎵撳紑鑿滃崟',
+      tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
+      initVal: card.openmenu,
+      forbid: appType !== 'pc' && appType !== 'mob',
+      required: false,
+      options: [{value: '', text: '鏃�'}, ...appMenus]
+    },
+    {
+      type: 'radio',
+      key: 'open',
+      label: '鎵撳紑鏂瑰紡',
+      initVal: card.open || 'blank',
+      required: true,
+      forbid: appType !== 'pc',
+      options: [{
+        value: 'blank',
+        text: '鏂扮獥鍙�'
+      }, {
+        value: 'self',
+        text: '褰撳墠绐楀彛'
+      }]
     }
   ]
 

--
Gitblit v1.8.0