From bb47f06e3c5eaf568aaecf870736787373ce73aa Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 18 六月 2021 13:28:11 +0800
Subject: [PATCH] 2021-06-18

---
 src/menu/components/share/actioncomponent/formconfig.jsx |   66 +++++++++++++++++++++++++--------
 1 files changed, 50 insertions(+), 16 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 8043242..c4b7f0f 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -11,7 +11,7 @@
  * @param {*} usefulFields   瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈�
  * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
  */
-export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = []) {
+export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = [], columns = []) {
   let appMenus = []
   let opentypes = [
     {
@@ -49,7 +49,7 @@
     { value: 'pay', text: Formdict['model.pay'] },
     { value: 'custom', text: Formdict['header.form.custom'] }
   ]
-  const isApp = sessionStorage.getItem('appType') === 'pc'
+  const isApp = ['pc', 'mob'].includes(sessionStorage.getItem('appType'))
 
   let funTypes = [
     { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
@@ -59,7 +59,7 @@
   if (isApp) {
     opentypes = opentypes.filter(item => item.value !== 'tab')
     pageTemps = [
-      { value: 'page', text: '鑿滃崟' },
+      // { value: 'page', text: '鑿滃崟' },
       { value: 'linkpage', text: '鍏宠仈鑿滃崟' },
       { value: 'billprint', text: '鍗曟嵁鎵撳嵃' },
       { value: 'pay', text: Formdict['model.pay'] },
@@ -215,14 +215,14 @@
       required: true,
       options: appMenus
     },
-    {
-      type: 'select',
-      key: 'copyMenuId',
-      label: '澶嶅埗鑿滃崟',
-      initVal: card.copyMenuId || '',
-      required: false,
-      options: appMenus
-    },
+    // {
+    //   type: 'select',
+    //   key: 'copyMenuId',
+    //   label: '澶嶅埗鑿滃崟',
+    //   initVal: card.copyMenuId || '',
+    //   required: false,
+    //   options: appMenus
+    // },
     {
       type: 'textarea',
       key: 'url',
@@ -284,17 +284,32 @@
     },
     {
       type: 'radio',
+      key: 'cross',
+      label: '璺ㄥ煙璇锋眰',
+      initVal: card.cross || 'true',
+      tooltip: '濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�',
+      required: false,
+      options: [{
+        value: 'true',
+        text: '鏀寔'
+      }, {
+        value: 'false',
+        text: '涓嶆敮鎸�'
+      }]
+    },
+    {
+      type: 'radio',
       key: 'callbackType',
       label: '鍥炶皟鏂瑰紡',
       initVal: card.callbackType || 'script',
-      tooltip: '浣跨敤榛樿鏂瑰紡鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��',
+      tooltip: '浣跨敤鍚庡彴鑴氭湰鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��',
       required: true,
       options: [{
-        value: 'default',
-        text: '榛樿鑴氭湰'
-      }, {
         value: 'script',
         text: '鑷畾涔夎剼鏈�'
+      }, {
+        value: 'default',
+        text: '鍚庡彴鑴氭湰'
       }]
     },
     {
@@ -415,7 +430,7 @@
       type: 'radio',
       key: 'show',
       label: "鏄剧ず涓�",
-      initVal: card.show || 'icon',
+      initVal: card.show || 'button',
       required: true,
       options: [{
         value: 'icon',
@@ -500,6 +515,25 @@
       initVal: card.syncComponent || [],
       required: false,
       options: modules
+    },
+    {
+      type: 'select',
+      key: 'controlField',
+      label: '鎺у埗瀛楁',
+      tooltip: '鏄剧ず鎺у埗瀛楁锛屽彲鏍规嵁琛屾暟鎹帶鍒舵寜閽槸鍚︽樉绀恒��',
+      initVal: card.controlField || '',
+      required: false,
+      forbid: card.$type !== 'tableButton',
+      options: [{label: '鏃�', field: ''}, ...columns]
+    },
+    {
+      type: 'text',
+      key: 'controlVal',
+      label: '鎺у埗鍊�',
+      tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細闅愯棌锛屽涓�肩敤閫楀彿鍒嗛殧銆�',
+      initVal: card.controlVal || '',
+      forbid: card.$type !== 'tableButton',
+      required: false
     }
   ]
 

--
Gitblit v1.8.0