From 20fda7434c88eae3237399a008f6ae0db50d0eab Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 15 九月 2022 19:12:29 +0800
Subject: [PATCH] 2022-09-15

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

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 789803c..157db98 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 = [], anchors = []) {
+export function getActionForm (card, functip, config, usefulFields, menulist = [], modules = [], anchors = []) {
   let appType = sessionStorage.getItem('appType')
   let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview
   let printTemps = sessionStorage.getItem('printTemps')
@@ -20,34 +20,44 @@
   let setting = config.setting || {}
   let columns = config.columns || []
   let appMenus = []
+  let type = ''
+
+  if (card.eleType === 'button') {
+    type = 'card'
+  } else if (config.subtype === 'datacard' || config.subtype === 'tablecard') {
+    type = 'datacard'
+  } else if (config.type === 'line' || config.type === 'bar' || config.type === 'scatter') {
+    type = 'chart'
+  }
+
   let opentypes = [
     {
       value: 'pop',
-      text: Formdict['model.form.popform']
+      text: '寮圭獥锛堣〃鍗曪級'
     }, {
       value: 'prompt',
-      text: Formdict['model.form.prompt']
+      text: '鎻愮ず妗�'
     }, {
       value: 'exec',
-      text: Formdict['model.form.exec']
+      text: '鐩存帴鎵ц'
     }, {
       value: 'excelIn',
-      text: Formdict['model.form.excelIn']
+      text: '瀵煎叆Excel'
     }, {
       value: 'excelOut',
-      text: Formdict['model.form.excelOut']
+      text: '瀵煎嚭Excel'
     }, {
       value: 'popview',
-      text: Formdict['model.form.popview']
+      text: '寮圭獥锛堟爣绛撅級'
     }, {
       value: 'tab',
-      text: Formdict['model.form.tab']
+      text: '鏍囩椤�'
     }, {
       value: 'innerpage',
-      text: Formdict['model.form.newpage']
+      text: '鏂伴〉闈�'
     }, {
       value: 'funcbutton',
-      text: Formdict['model.form.funcbutton']
+      text: '鍔熻兘鎸夐挳'
     }
   ]
 
@@ -76,17 +86,6 @@
     return _list
   }
 
-  // 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(window.GLOB.customMenu.components)))
 
   let pageTemps = [
@@ -152,6 +151,10 @@
   
   if (type === 'chart' && appType !== 'mob') {
     opentypes = opentypes.filter(item => item.value === 'excelIn' || item.value === 'excelOut')
+
+    if (card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut') { // 鎷栨嫿娣诲姞绫诲瀷杞崲
+      card.OpenType = 'excelOut'
+    }
   }
 
   let refresh = []
@@ -172,6 +175,8 @@
       value: 'form',
       text: '琛ㄥ崟锛堝紑鍏虫垨鍕鹃�夋锛�'
     })
+  } else if (card.OpenType === 'form') { // 鎷栨嫿娣诲姞绫诲瀷杞崲
+    card.OpenType = 'pop'
   }
 
   if (!card.control && card.controlField) {
@@ -309,7 +314,7 @@
     {
       type: 'text',
       key: 'sql',
-      label: Formdict['model.form.tablename'],
+      label: '琛ㄥ悕',
       initVal: card.sql || setting.tableName || '',
       required: true
     },

--
Gitblit v1.8.0