From 6dd965723be9dc245105296198c25a80cfe51b54 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 27 四月 2023 10:51:50 +0800
Subject: [PATCH] 2023-04-27

---
 src/menu/components/share/actioncomponent/formconfig.jsx |   98 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 88 insertions(+), 10 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index ab5b23b..8167d07 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -1,4 +1,4 @@
-import { btnCustomClasses, btnClasses } from '@/utils/option.js'
+import { btnClasses } from '@/utils/option.js'
 
 
 /**
@@ -9,20 +9,20 @@
  * @param {*} usefulFields   瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈�
  * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
  */
-export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = []) {
+export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side) {
   let appType = sessionStorage.getItem('appType')
   let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview
   let printTemps = sessionStorage.getItem('printTemps')
   printTemps = printTemps ? JSON.parse(printTemps) : []
   let setting = config.setting || {}
-  let columns = config.columns || []
+  let columns = side === 'sub' && config.subColumns ? config.subColumns : (config.columns || [])
   let appMenus = []
   let menulist = []
   let type = ''
 
   if (card.eleType === 'button') {
     type = 'card'
-  } else if (config.subtype === 'datacard' || config.subtype === 'tablecard') {
+  } else if (config.subtype === 'datacard' || config.subtype === 'tablecard' || config.subtype === 'dualdatacard') {
     type = 'datacard'
   } else if (config.type === 'line' || config.type === 'bar' || config.type === 'scatter') {
     type = 'chart'
@@ -137,6 +137,7 @@
       { value: 'mkUnBinding', text: '鐢ㄦ埛瑙g粦' },
       { value: 'mkUnsubscribe', text: '娉ㄩ攢璐︽埛' },
       { value: 'reAuth', text: '鍒囨崲绯荤粺锛堟竻绌虹紦瀛�-灏忕▼搴忥級' },
+      { value: 'clearCache', text: '娓呯┖鏈湴閰嶇疆' },
       { value: 'copyurl', text: '澶嶅埗閾炬帴鍦板潃' },
       { value: 'logout', text: '閫�鍑�' },
       { value: 'goBack', text: '杩斿洖' },
@@ -157,6 +158,12 @@
       { value: 'pay', text: '鏀粯' },
       { value: 'custom', text: '閾炬帴' }
     ]
+  } else {
+    if (card.pageTemplate === 'print') { // 鍘熺被鍨嬫敮鎸�
+      pageTemps.unshift({ value: 'print', text: '鏍囩鎵撳嵃妯℃澘' })
+    } else if (card.pageTemplate === 'billprintTemp') { // 鍘熺被鍨嬫敮鎸�
+      pageTemps.unshift({ value: 'billprintTemp', text: '鍗曟嵁鎵撳嵃妯℃澘' })
+    }
   }
   
   if (type === 'chart' && appType !== 'mob') {
@@ -265,6 +272,9 @@
       }, {
         value: 'radio',
         text: '鍕鹃�夋'
+      }, {
+        value: 'counter',
+        text: '璁℃暟鍣�'
       }, 
       ...formTypes]
     },
@@ -382,6 +392,14 @@
       required: true,
       extendName: 'MenuNo',
       options: isApp ? appMenus : menulist
+    },
+    {
+      type: 'text',
+      key: 'prefix',
+      label: '鍓嶇紑',
+      initVal: card.prefix || '',
+      tooltip: '鎵爜淇℃伅灏嗕笌鍓嶇紑鎷兼帴鍚庢墽琛屻�傛敞锛氳烦杞彍鍗曢渶浠kbid寮�澶淬��',
+      required: false
     },
     {
       type: 'textarea',
@@ -523,7 +541,7 @@
       key: 'execSuccess',
       label: '鎴愬姛鍚�',
       initVal: card.execSuccess || 'grid',
-      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�',
+      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��',
       required: true,
       options: [{
         value: 'never',
@@ -546,7 +564,7 @@
       key: 'execError',
       label: '澶辫触鍚�',
       initVal: card.execError || 'never',
-      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮��',
+      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��',
       required: true,
       options: [{
         value: 'never',
@@ -659,7 +677,7 @@
       tooltip: '姝ら鑹蹭负鎸夐挳鍒濆鍖栭鑹诧紝鍙湪鏍峰紡璋冩暣涓慨鏀广��',
       required: false,
       forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽笉璁剧疆閫氱敤棰滆壊
-      options: btnCustomClasses
+      options: btnClasses
     },
     {
       type: 'radio',
@@ -683,6 +701,9 @@
       }, {
         value: 'light',
         text: '鐏�'
+      }, {
+        value: 'system',
+        text: '绯荤粺'
       }]
     },
     {
@@ -1017,7 +1038,7 @@
     {
       type: 'radio',
       key: 'size',
-      label: '寮�鍏冲昂瀵�',
+      label: '灏哄',
       initVal: card.size || 'default',
       options: [{
         value: 'large',
@@ -1052,6 +1073,27 @@
       required: false
     },
     {
+      type: 'number',
+      key: 'min',
+      label: '鏈�灏忓��',
+      initVal: card.min,
+      required: false
+    },
+    {
+      type: 'number',
+      key: 'max',
+      label: '鏈�澶у��',
+      initVal: card.max,
+      required: false
+    },
+    {
+      type: 'number',
+      key: 'decimal',
+      label: '灏忔暟浣�',
+      initVal: card.decimal || 0,
+      required: true
+    },
+    {
       type: 'text',
       key: 'closeVal',
       label: '鍏抽棴鍊�',
@@ -1072,6 +1114,21 @@
       label: '鍏抽棴鎻愮ず',
       initVal: card.closeText || '',
       required: false,
+    },
+    {
+      type: 'radio',
+      key: 'execType',
+      label: '璇锋眰鏂瑰紡',
+      initVal: card.execType || 'multi',
+      tooltip: '閫変腑澶氭潯鏁版嵁鏃剁殑璇锋眰鏂瑰紡锛屾敞锛氬綋閫変腑鏁版嵁瓒呰繃20鏉℃椂灏嗛�愭潯璇锋眰銆�',
+      required: false,
+      options: [{
+        value: 'multi',
+        text: '鎵归噺璇锋眰'
+      }, {
+        value: 'single',
+        text: '閫愭潯璇锋眰'
+      }]
     },
     {
       type: 'radio',
@@ -1145,6 +1202,12 @@
     { value: 'pay', text: '鏀粯' },
     { value: 'custom', text: '鑷畾涔�' }
   ]
+
+  if (card.pageTemplate === 'print') { // 鍘熺被鍨嬫敮鎸�
+    pageTemps.unshift({ value: 'print', text: '鏍囩鎵撳嵃妯℃澘' })
+  } else if (card.pageTemplate === 'billprintTemp') { // 鍘熺被鍨嬫敮鎸�
+    pageTemps.unshift({ value: 'billprintTemp', text: '鍗曟嵁鎵撳嵃妯℃澘' })
+  }
 
   let funTypes = [
     { value: 'print', text: '鏍囩鎵撳嵃' },
@@ -1468,7 +1531,7 @@
       key: 'execSuccess',
       label: '鎴愬姛鍚�',
       initVal: card.execSuccess || 'grid',
-      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�',
+      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��',
       required: true,
       options: [{
         value: 'never',
@@ -1490,7 +1553,7 @@
       key: 'execError',
       label: '澶辫触鍚�',
       initVal: card.execError || 'never',
-      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮��',
+      tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊鍝竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭腑鍖呭惈@close_tab@銆丂close_popup@銆丂goback@ 浼氭墽琛岋紙鍏抽棴鏍囩-绠$悊绯荤粺锛夈�侊紙鍏抽棴寮圭獥锛夈�侊紙杩斿洖涓婁竴椤�-瀛愬簲鐢級绛夊姩浣溿��',
       required: true,
       options: [{
         value: 'never',
@@ -1804,6 +1867,21 @@
     },
     {
       type: 'radio',
+      key: 'execType',
+      label: '璇锋眰鏂瑰紡',
+      initVal: card.execType || 'multi',
+      tooltip: '閫変腑澶氭潯鏁版嵁鏃剁殑璇锋眰鏂瑰紡锛屾敞锛氬綋閫変腑鏁版嵁瓒呰繃20鏉℃椂灏嗛�愭潯璇锋眰銆�',
+      required: false,
+      options: [{
+        value: 'multi',
+        text: '鎵归噺璇锋眰'
+      }, {
+        value: 'single',
+        text: '閫愭潯璇锋眰'
+      }]
+    },
+    {
+      type: 'radio',
       key: 'progress',
       label: '杩涘害鎻愮ず',
       initVal: card.progress || 'number',

--
Gitblit v1.8.0