From fe21d23b147ed5cec22b4f76a88840b05495d4ad Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 18 六月 2022 22:33:59 +0800
Subject: [PATCH] 2022-06-18

---
 src/menu/components/share/actioncomponent/formconfig.jsx |  141 ++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 114 insertions(+), 27 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 4adfb52..324781d 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, type, menulist = [], modules = []) {
+export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = [], anchors = []) {
   let appType = sessionStorage.getItem('appType')
   let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview
   let printTemps = sessionStorage.getItem('printTemps')
@@ -88,6 +88,7 @@
     { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' },
     { value: 'print', text: '鏍囩鎵撳嵃' },
     { value: 'closetab', text: '鏍囩鍏抽棴' },
+    { value: 'megvii', text: '鏃疯闈㈡澘鏈�' },
   ]
   
   if (isApp) {
@@ -106,11 +107,13 @@
     opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value))
     funTypes = [
       { value: 'scan', text: '鎵爜' },
+      { value: 'pay', text: '鏀粯' },
       { value: 'logout', text: '閫�鍑�' },
       { value: 'mkBinding', text: '寮�閫氭壂鐮佺櫥褰�' },
       { value: 'mkUnBinding', text: '鐢ㄦ埛瑙g粦' },
       { value: 'mkUnsubscribe', text: '娉ㄩ攢璐︽埛' },
       { value: 'reAuth', text: '鍒囨崲绯荤粺锛堟竻绌虹紦瀛�-灏忕▼搴忥級' },
+      { value: 'copyurl', text: '澶嶅埗閾炬帴鍦板潃' },
       { value: 'goBack', text: '杩斿洖' },
     ]
     pageTemps = [
@@ -161,6 +164,19 @@
     card.control = ''
   }
 
+  if (card.execSuccess === 'goback') {
+    card.openmenu = 'goback'
+    card.execSuccess = 'never'
+  }
+
+  let closetab = []
+  if (!appType) {
+    closetab = [{
+      value: 'closetab',
+      text: '鍏抽棴鏍囩'
+    }]
+  }
+
   let forms = [
     {
       type: 'select',
@@ -177,6 +193,16 @@
       initVal: card.funcType || '',
       required: true,
       options: funTypes
+    },
+    {
+      type: 'radio',
+      key: 'subFunc',
+      label: '鎺ュ彛鍚嶇О',
+      initVal: card.subFunc || 'addUser',
+      required: true,
+      options: [
+        { value: 'addUser', text: '娣诲姞鐢ㄦ埛' },
+      ]
     },
     {
       type: 'radio',
@@ -223,6 +249,20 @@
       label: '鎸夐挳鍚嶇О',
       initVal: card.label,
       required: true,
+    },
+    {
+      type: 'checkbox',
+      key: 'payType',
+      label: '鏀粯鏂瑰紡',
+      initVal: card.payType || [],
+      required: true,
+      options: [{
+        value: 'wxpay',
+        text: '寰俊'
+      }, {
+        value: 'alipay',
+        text: '鏀粯瀹�'
+      }]
     },
     {
       type: 'radio',
@@ -284,6 +324,7 @@
       label: '鍏宠仈鑿滃崟',
       initVal: card.linkmenu || (isApp ? '' : []),
       required: true,
+      extendName: 'MenuNo',
       options: isApp ? appMenus : menulist
     },
     {
@@ -401,24 +442,22 @@
       key: 'execSuccess',
       label: Formdict['model.form.afterSuccess'],
       initVal: card.execSuccess || 'grid',
-      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '鍒锋柊涓婄骇缁勪欢-琛屾椂锛屼細鍚屾鍒锋柊褰撳墠缁勪欢锛屾敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�',
+      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�',
       required: true,
       options: [{
         value: 'never',
         text: Formdict['header.form.refresh.never']
       }, {
-        value: 'grid',
-        text: '鍒锋柊褰撳墠缁勪欢'
-      }, {
         value: 'line',
         text: '鍒锋柊琛�'
       }, {
+        value: 'grid',
+        text: '鍒锋柊褰撳墠缁勪欢'
+      }, {
         value: 'mainline',
         text: '鍒锋柊涓婄骇缁勪欢 - 琛�'
-      }, {
-        value: !appType ? 'closetab' : 'goback',
-        text: !appType ? '鍏抽棴鏍囩' : '杩斿洖锛堜笂涓�涓〉闈級'
-      },
+      }, 
+      ...closetab,
       ...refresh]
     },
     {
@@ -426,17 +465,17 @@
       key: 'execError',
       label: Formdict['model.form.afterError'],
       initVal: card.execError || 'never',
-      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '鍒锋柊涓婄骇缁勪欢-琛屾椂锛屼細鍚屾鍒锋柊褰撳墠缁勪欢锛屾敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�',
+      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮��',
       required: true,
       options: [{
         value: 'never',
         text: Formdict['header.form.refresh.never']
       }, {
-        value: 'grid',
-        text: '鍒锋柊褰撳墠缁勪欢'
-      }, {
         value: 'line',
         text: '鍒锋柊琛�'
+      }, {
+        value: 'grid',
+        text: '鍒锋柊褰撳墠缁勪欢'
       }, {
         value: 'mainline',
         text: '鍒锋柊涓婄骇缁勪欢 - 琛�'
@@ -619,7 +658,7 @@
       key: 'syncComponent',
       label: '鍒锋柊缁勪欢',
       initVal: card.syncComponent || [],
-      tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧脊绐楁爣绛惧叧闂椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢',
+      tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧脊绐楁爣绛惧叧闂椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堛��',
       required: false,
       options: modules
     },
@@ -628,9 +667,18 @@
       key: 'switchTab',
       label: '鍒囨崲鏍囩',
       initVal: card.switchTab || [],
-      tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤�',
+      tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤点��' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''),
       required: false,
       options: tabs
+    },
+    {
+      type: 'cascader',
+      key: 'anchors',
+      label: '璺宠浆閿氱偣',
+      initVal: card.anchors || [],
+      tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣銆�' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''),
+      required: false,
+      options: anchors
     },
     {
       type: 'cascader',
@@ -648,16 +696,17 @@
       label: '鎵撳紑鑿滃崟',
       tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
       initVal: card.openmenu || (!appType ? [] : ''),
+      help: appType === 'mob' || appType === 'pc' ? '鍙繑鍥炰笂涓�椤点��' : null,
       required: false,
       allowClear: true,
-      options: appType === 'mob' ? [...appMenus, {value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}] : (appType === 'pc' ? appMenus : menulist),
+      options: appType === 'mob' || appType === 'pc' ? [...appMenus, {value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}] : menulist,
       forbid: viewType === 'popview'
     },
     {
       type: 'text',
       key: 'output',
       label: '杩斿洖鍊�',
-      tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��',
+      tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝濡侤id锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��',
       initVal: card.output || '',
       required: false,
       forbid: viewType === 'popview'
@@ -675,15 +724,13 @@
       key: 'open',
       label: '鎵撳紑鏂瑰紡',
       initVal: card.open || 'blank',
+      tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆�',
       required: true,
-      forbid: appType !== 'pc',
-      options: [{
-        value: 'blank',
-        text: '鏂扮獥鍙�'
-      }, {
-        value: 'self',
-        text: '褰撳墠绐楀彛'
-      }]
+      forbid: appType !== 'pc' && appType !== 'mob',
+      options: [
+        {value: 'blank', text: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'},
+        {value: 'self', text: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'},
+      ]
     },
     {
       type: 'radio',
@@ -707,7 +754,7 @@
       precision: 0,
       label: '姣斾緥',
       initVal: card.ratio || 85,
-      tooltip: '灏忎簬100涓哄搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��',
+      tooltip: '妯℃�佹鎴栨娊灞夌殑瀹藉害锛屽皬浜�100涓虹獥鍙e搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��',
       required: true
     },
     {
@@ -813,6 +860,13 @@
       required: false
     },
     {
+      type: 'text',
+      key: 'reason',
+      label: '绂佺敤鍘熷洜',
+      initVal: card.reason || '',
+      required: false
+    },
+    {
       type: 'splitLine',
       key: 'title',
       label: '琛ㄥ崟',
@@ -832,8 +886,11 @@
       label: '寮�鍏冲昂瀵�',
       initVal: card.size || 'default',
       options: [{
-        value: 'default',
+        value: 'large',
         text: '澶�'
+      }, {
+        value: 'default',
+        text: '涓�'
       }, {
         value: 'small',
         text: '灏�'
@@ -869,6 +926,36 @@
       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',
+      key: 'progress',
+      label: '杩涘害鎻愮ず',
+      initVal: card.progress || 'number',
+      required: false,
+      forbid: appType === 'mob',
+      options: [{
+        value: 'number',
+        text: '鍓╀綑鏁�'
+      }, {
+        value: 'progressbar',
+        text: '杩涘害鏉�'
+      }]
+    }
   ]
 
   return forms

--
Gitblit v1.8.0