From fb3ec146a9e1444ece749d0bcf232a554e933fb0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 17 五月 2022 22:56:16 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/menu/components/share/actioncomponent/formconfig.jsx |  201 +++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 175 insertions(+), 26 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 248d1f0..7dd44d3 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')
@@ -63,17 +63,17 @@
     })
   }
 
-  if (type === 'editable') {
-    opentypes = [
-      {
-        value: 'excelIn',
-        text: Formdict['model.form.excelIn']
-      }, {
-        value: 'excelOut',
-        text: Formdict['model.form.excelOut']
-      }
-    ]
-  }
+  // if (type === 'editable') {
+  //   opentypes = [
+  //     {
+  //       value: 'excelIn',
+  //       text: Formdict['model.form.excelIn']
+  //     }, {
+  //       value: 'excelOut',
+  //       text: Formdict['model.form.excelOut']
+  //     }
+  //   ]
+  // }
 
   let tabs = getTabs(JSON.parse(JSON.stringify(modules)))
 
@@ -88,6 +88,7 @@
     { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' },
     { value: 'print', text: '鏍囩鎵撳嵃' },
     { value: 'closetab', text: '鏍囩鍏抽棴' },
+    { value: 'megvii', text: '鏃疯闈㈡澘鏈�' },
   ]
   
   if (isApp) {
@@ -109,6 +110,7 @@
       { value: 'logout', text: '閫�鍑�' },
       { value: 'mkBinding', text: '寮�閫氭壂鐮佺櫥褰�' },
       { value: 'mkUnBinding', text: '鐢ㄦ埛瑙g粦' },
+      { value: 'mkUnsubscribe', text: '娉ㄩ攢璐︽埛' },
       { value: 'reAuth', text: '鍒囨崲绯荤粺锛堟竻绌虹紦瀛�-灏忕▼搴忥級' },
       { value: 'goBack', text: '杩斿洖' },
     ]
@@ -146,6 +148,13 @@
     })
   }
 
+  if (type === 'card') {
+    opentypes.push({
+      value: 'form',
+      text: '琛ㄥ崟锛堝紑鍏虫垨鍕鹃�夋锛�'
+    })
+  }
+
   if (!card.control && card.controlField) {
     card.control = 'disabled'
   }
@@ -169,6 +178,30 @@
       initVal: card.funcType || '',
       required: true,
       options: funTypes
+    },
+    {
+      type: 'radio',
+      key: 'subFunc',
+      label: '鎺ュ彛鍚嶇О',
+      initVal: card.subFunc || 'addUser',
+      required: true,
+      options: [
+        { value: 'addUser', text: '娣诲姞鐢ㄦ埛' },
+      ]
+    },
+    {
+      type: 'radio',
+      key: 'formType',
+      label: '琛ㄥ崟绫诲瀷',
+      initVal: card.formType || 'switch',
+      required: true,
+      options: [{
+        value: 'switch',
+        text: '寮�鍏�'
+      }, {
+        value: 'radio',
+        text: '鍕鹃�夋'
+      }]
     },
     {
       type: 'select',
@@ -262,6 +295,7 @@
       label: '鍏宠仈鑿滃崟',
       initVal: card.linkmenu || (isApp ? '' : []),
       required: true,
+      extendName: 'MenuNo',
       options: isApp ? appMenus : menulist
     },
     {
@@ -378,18 +412,18 @@
       type: 'select',
       key: 'execSuccess',
       label: Formdict['model.form.afterSuccess'],
-      initVal: card.execSuccess || 'never',
-      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '鍒锋柊涓婄骇缁勪欢-琛屾椂锛屼細鍚屾鍒锋柊褰撳墠缁勪欢锛屾敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�',
+      initVal: card.execSuccess || 'grid',
+      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: '鍒锋柊涓婄骇缁勪欢 - 琛�'
@@ -404,17 +438,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: '鍒锋柊涓婄骇缁勪欢 - 琛�'
@@ -612,6 +646,15 @@
     },
     {
       type: 'cascader',
+      key: 'anchors',
+      label: '璺宠浆閿氱偣',
+      initVal: card.anchors || [],
+      tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣',
+      required: false,
+      options: anchors
+    },
+    {
+      type: 'cascader',
       key: 'refreshTab',
       label: '鍒锋柊鑿滃崟',
       initVal: card.refreshTab || [],
@@ -628,17 +671,25 @@
       initVal: card.openmenu || (!appType ? [] : ''),
       required: false,
       allowClear: true,
-      options: appType === 'mob' ? [...appMenus, {value: 'goback', text: '杩斿洖'}] : (appType === 'pc' ? appMenus : menulist),
+      options: appType === 'mob' ? [...appMenus, {value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}] : (appType === 'pc' ? appMenus : menulist),
       forbid: viewType === 'popview'
     },
     {
       type: 'text',
       key: 'output',
       label: '杩斿洖鍊�',
-      tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��',
+      tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�備緥濡傦細@id',
       initVal: card.output || '',
       required: false,
       forbid: viewType === 'popview'
+    },
+    {
+      type: 'text',
+      key: 'tipTitle',
+      label: '纭鎻愮ず',
+      initVal: card.tipTitle || '',
+      tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�',
+      required: false
     },
     {
       type: 'radio',
@@ -677,7 +728,7 @@
       precision: 0,
       label: '姣斾緥',
       initVal: card.ratio || 85,
-      tooltip: '灏忎簬100涓哄搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��',
+      tooltip: '妯℃�佹鎴栨娊灞夌殑瀹藉害锛屽皬浜�100涓虹獥鍙e搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��',
       required: true
     },
     {
@@ -717,9 +768,9 @@
     {
       type: 'radio',
       key: 'reload',
-      label: '杩斿洖鍚�',
+      label: '涓婁竴椤�',
       initVal: card.reload || 'false',
-      tooltip: '鎸夐挳鎴愬姛鍚庤繑鍥炰笂涓�椤甸潰鎴栦娇鐢ㄥ姛鑳芥寜閽�-杩斿洖鍔熻兘鏃讹紝杩斿洖鍚庢槸鍚﹀埛鏂版暟鎹�傛敞锛氬湪鏄庣浜慳pp涓紙搴旂敤妯″紡涓篴pp锛夋湁鏁堛��',
+      tooltip: '鎴愬姛鍚庢槸鍚﹀埛鏂颁笂椤电殑鏁版嵁銆傛敞锛氬湪鏄庣浜慉PP鎴栧皬绋嬪簭涓湁鏁堛��',
       forbid: appType !== 'mob',
       options: [{
         value: 'false',
@@ -727,6 +778,22 @@
       }, {
         value: 'true',
         text: '鍒锋柊'
+      }]
+    },
+    {
+      type: 'radio',
+      key: 'position',
+      label: '鏄剧ず浣嶇疆',
+      initVal: card.position || 'middle',
+      tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�',
+      required: false,
+      forbid: appType !== 'mob',
+      options: [{
+        value: 'middle',
+        text: '涓儴'
+      }, {
+        value: 'bottom',
+        text: '搴曢儴'
       }]
     },
     {
@@ -766,6 +833,88 @@
       initVal: card.controlVal || '',
       required: false
     },
+    {
+      type: 'text',
+      key: 'reason',
+      label: '绂佺敤鍘熷洜',
+      initVal: card.reason || '',
+      required: false
+    },
+    {
+      type: 'splitLine',
+      key: 'title',
+      label: '琛ㄥ崟',
+      initVal: ''
+    },
+    {
+      type: 'text',
+      key: 'field',
+      label: Formdict['model.form.field'],
+      initVal: card.field || '',
+      required: true,
+      readonly: false
+    },
+    {
+      type: 'radio',
+      key: 'size',
+      label: '寮�鍏冲昂瀵�',
+      initVal: card.size || 'default',
+      options: [{
+        value: 'large',
+        text: '澶�'
+      }, {
+        value: 'default',
+        text: '涓�'
+      }, {
+        value: 'small',
+        text: '灏�'
+      }]
+    },
+    {
+      type: 'text',
+      key: 'openVal',
+      label: '寮�鍚��',
+      initVal: card.openVal === undefined ? '' : card.openVal + '',
+      tooltip: '褰撳紑鍚笌鍏抽棴鍊煎潎涓烘鏁存暟鏃讹紝榛樿杞崲涓篒NT绫诲瀷銆�',
+      required: false
+    },
+    {
+      type: 'text',
+      key: 'closeVal',
+      label: '鍏抽棴鍊�',
+      initVal: card.closeVal === undefined ? '' : card.closeVal + '',
+      tooltip: '褰撳紑鍚笌鍏抽棴鍊煎潎涓烘鏁存暟鏃讹紝榛樿杞崲涓篒NT绫诲瀷銆�',
+      required: false
+    },
+    {
+      type: 'text',
+      key: 'openText',
+      label: '寮�鍚彁绀�',
+      initVal: card.openText || '',
+      required: false,
+    },
+    {
+      type: 'text',
+      key: 'closeText',
+      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: '鏄�'
+      }]
+    }
   ]
 
   return forms

--
Gitblit v1.8.0