From 432b788acf901b0720184b8ee8bc81a2e6fa47e0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 28 九月 2021 18:22:02 +0800
Subject: [PATCH] 2021-09-28

---
 src/templates/zshare/formconfig.jsx |  184 ++++++++++++++++++++++++++++++++++++---------
 1 files changed, 146 insertions(+), 38 deletions(-)

diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index 42a28d2..c9c8963 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -292,7 +292,7 @@
   if (roleList) {
     try {
       roleList = JSON.parse(roleList)
-    } catch {
+    } catch (e) {
       roleList = []
     }
   } else {
@@ -746,11 +746,25 @@
     },
     {
       type: 'radio',
+      key: 'dropdown',
+      label: '涓嬫媺妗�',
+      initVal: card.dropdown || 'true',
+      forbid: appType === 'mob',
+      options: [{
+        value: 'true',
+        text: '瀹氬'
+      }, {
+        value: 'false',
+        text: '鑷�傚簲'
+      }]
+    },
+    {
+      type: 'radio',
       key: 'inputType',
       label: '杈撳叆鏍峰紡',
       initVal: card.inputType || 'input',
+      tooltip: '浣跨敤楂樼骇鎼滅储鏃舵棤鏁堛��',
       required: false,
-      forbid: appType === null,
       options: [{
         value: 'input',
         text: '杈撳叆妗�'
@@ -788,12 +802,11 @@
 /**
  * @description 鑾峰彇鎸夐挳琛ㄥ崟閰嶇疆淇℃伅
  * @param {*} card           缂栬緫鎸夐挳
- * @param {*} functip        鐢熸垚瀛樺偍杩囩▼鎻愮ず
  * @param {*} config         椤甸潰閰嶇疆
  * @param {*} usefulFields   瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈�
  * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
  */
-export function getActionForm (card, functip, config, usefulFields, type, menulist = [], printTemps = []) {
+export function getActionForm (card, config, usefulFields, type, menulist = [], printTemps = []) {
   let columns = (config.columns || []).filter(col => col.field)
 
   let opentypes = [
@@ -871,7 +884,7 @@
       options: opentypes
     },
     {
-      type: 'radio',
+      type: 'select',
       key: 'funcType',
       label: Formdict['header.form.funcType'],
       initVal: card.funcType || '',
@@ -882,6 +895,9 @@
       }, {
         value: 'print',
         text: '鏍囩鎵撳嵃'
+      }, {
+        value: 'closetab',
+        text: '鏍囩鍏抽棴'
       }]
     },
     {
@@ -951,23 +967,12 @@
       key: 'innerFunc',
       label: Formdict['header.form.innerFunc'],
       initVal: card.innerFunc || '',
-      tooltip: functip,
+      tooltip: `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬨�俙,
       fields: usefulFields,
       tooltipClass: 'middle',
       required: card.intertype === 'inner',
       readonly: false
     },
-    // {
-    //   type: 'select',
-    //   key: 'tabType',
-    //   label: Formdict['model.form.tabType'],
-    //   initVal: card.tabType || 'SubTable',
-    //   required: true,
-    //   options: [{
-    //     value: 'SubTable',
-    //     text: Formdict['model.menu.tab.subtable']
-    //   }]
-    // },
     {
       type: 'select',
       key: 'linkTab',
@@ -1156,6 +1161,14 @@
       options: menulist
     },
     {
+      type: 'cascader',
+      key: 'refreshTab',
+      label: '鍒锋柊鏍囩',
+      initVal: card.refreshTab || [],
+      required: false,
+      options: menulist
+    },
+    {
       type: 'radio',
       key: 'afterExecSuccess',
       label: Formdict['header.form.afterExecSuccess'],
@@ -1259,6 +1272,23 @@
       options: []
     },
     {
+      type: 'cascader',
+      key: 'openmenu',
+      label: '鎵撳紑鑿滃崟',
+      initVal: card.openmenu || [],
+      tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
+      required: false,
+      options: menulist
+    },
+    {
+      type: 'text',
+      key: 'output',
+      label: '杩斿洖鍊�',
+      tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��',
+      initVal: card.output || '',
+      required: false
+    },
+    {
       type: 'radio',
       key: 'joint',
       label: Formdict['model.form.paramJoint'],
@@ -1323,7 +1353,64 @@
       tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細绂佺敤锛屽涓�肩敤閫楀彿鍒嗛殧銆�',
       initVal: card.controlVal || '',
       required: false
-    }
+    },
+    {
+      type: 'radio',
+      key: 'display',
+      label: '鏄剧ず鏂瑰紡',
+      initVal: card.display || 'modal',
+      required: true,
+      options: [{
+        value: 'modal',
+        text: '妯℃�佹'
+      }, {
+        value: 'drawer',
+        text: '鎶藉眽'
+      }]
+    },
+    {
+      type: 'number',
+      key: 'ratio',
+      min: 1,
+      max: 24,
+      precision: 0,
+      label: '姣斾緥',
+      initVal: card.ratio || 85,
+      tooltip: '灏忎簬100涓哄搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��',
+      required: true
+    },
+    {
+      type: 'radio',
+      key: 'placement',
+      label: '鎶藉眽鏂瑰悜',
+      initVal: card.placement || 'right',
+      tooltip: '浣跨敤鎶藉眽鏃舵湁鏁堛��',
+      required: false,
+      options: [{
+        value: 'right',
+        text: '鍙充晶'
+      }, {
+        value: 'left',
+        text: '宸︿晶'
+      }, {
+        value: 'top',
+        text: '涓婁晶'
+      }, {
+        value: 'bottom',
+        text: '涓嬩晶'
+      }]
+    },
+    {
+      type: 'text',
+      key: 'preFunc',
+      label: '鍓嶇疆鍑芥暟',
+      initVal: card.preFunc || '',
+      tooltip: `鍑芥暟鍚嶇О闇�浠�${usefulFields.join(', ')}绛夊瓧绗﹀紑濮嬶紱鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц銆俙,
+      fields: usefulFields,
+      tooltipClass: 'middle',
+      required: false,
+      readonly: false
+    },
   ]
 }
 
@@ -1337,7 +1424,7 @@
   if (roleList) {
     try {
       roleList = JSON.parse(roleList)
-    } catch {
+    } catch (e) {
       roleList = []
     }
   } else {
@@ -1656,7 +1743,7 @@
   if (roleList) {
     try {
       roleList = JSON.parse(roleList)
-    } catch {
+    } catch (e) {
       roleList = []
     }
   } else {
@@ -2118,7 +2205,7 @@
           label: role.text
         }
       })
-    } catch {
+    } catch (e) {
       roleList = []
     }
   } else {
@@ -2182,6 +2269,9 @@
   }, {
     value: 'split',
     text: '鍒嗛殧绾�'
+  }, {
+    value: 'linkMain',
+    text: Formdict['header.form.linkMain']
   }]
 
   let _fieldlength = 50
@@ -2236,11 +2326,6 @@
       value: 'split',
       text: '鍒嗛殧绾�'
     }]
-  } else if (subtable) {
-    _openType.push({
-      value: 'linkMain',
-      text: Formdict['header.form.linkMain']
-    })
   }
 
   if (['fileupload', 'multiselect', 'checkbox'].includes(card.type)) {
@@ -2479,6 +2564,15 @@
       }]
     },
     {
+      type: 'text',
+      key: 'disableField',
+      label: '绂佺敤路瀛楁',
+      initVal: card.disableField || '',
+      tooltip: '璁剧疆绂佺敤瀛楁锛屼笖瀛楁鍊间负true鏃讹紝閫夐」涓嶅彲閫夈��',
+      required: false,
+      readonly: false
+    },
+    {
       type: 'radio',
       key: 'multiple',
       label: '鍙閫�',
@@ -2674,7 +2768,7 @@
       type: 'radio',
       key: 'readin',
       label: Formdict['header.form.readin'],
-      tooltip: Formdict['header.form.readin.tooltip'],
+      tooltip: '鏄惁灏嗚〃鏍奸�変腑鐨勬暟鎹嚜鍔ㄥ~鍏呭埌琛ㄥ崟锛堝瓧娈电浉鍚岋級',
       initVal: card.readin || 'true',
       options: [{
         value: 'true',
@@ -2682,6 +2776,9 @@
       }, {
         value: 'false',
         text: Formdict['model.false']
+      }, {
+        value: 'top',
+        text: '棣栬'
       }]
     },
     {
@@ -2696,6 +2793,20 @@
       }, {
         value: 'false',
         text: Formdict['model.false']
+      }]
+    },
+    {
+      type: 'radio',
+      key: 'dropdown',
+      label: '涓嬫媺妗�',
+      initVal: card.dropdown || 'true',
+      forbid: appType === 'mob',
+      options: [{
+        value: 'true',
+        text: '瀹氬'
+      }, {
+        value: 'false',
+        text: '鑷�傚簲'
       }]
     },
     {
@@ -2941,6 +3052,14 @@
     },
     {
       type: 'text',
+      key: 'placeholder',
+      label: '鎻愮ず淇℃伅',
+      tooltip: '瀛楁棰勬湡鍊肩殑鎻愮ず淇℃伅銆�',
+      initVal: card.placeholder || '',
+      required: false
+    },
+    {
+      type: 'text',
       key: 'emptyText',
       label: '绌哄�兼枃鏈�',
       tooltip: '绌哄�肩殑鎻愮ず鏂囨湰锛岄�夋嫨璁剧疆绌哄�兼椂鏈夋晥锛岄粯璁ゅ�间负銆婄┖銆嬨��',
@@ -3009,17 +3128,6 @@
       initVal: card.label || '',
       required: true
     },
-    // {
-    //   type: 'select',
-    //   key: 'type',
-    //   label: Formdict['model.form.tabType'],
-    //   initVal: card.type || 'SubTable',
-    //   required: true,
-    //   options: [{
-    //     value: 'SubTable',
-    //     text: Formdict['model.menu.tab.subtable']
-    //   }]
-    // },
     {
       type: 'select',
       key: 'linkTab',

--
Gitblit v1.8.0