From 5df578ff69f6b02e821d59a8883bc75d78695a62 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 10 十一月 2020 11:07:31 +0800
Subject: [PATCH] 2020-11-10

---
 src/menu/actioncomponent/formconfig.jsx |   97 +++++++++++++++++++++++-------------------------
 1 files changed, 46 insertions(+), 51 deletions(-)

diff --git a/src/menu/actioncomponent/formconfig.jsx b/src/menu/actioncomponent/formconfig.jsx
index 985a7e8..de09940 100644
--- a/src/menu/actioncomponent/formconfig.jsx
+++ b/src/menu/actioncomponent/formconfig.jsx
@@ -11,7 +11,7 @@
  * @param {*} permFuncField  瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈�
  * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
  */
-export function getActionForm (card, functip, setting, permFuncField = [], type, menulist = []) {
+export function getActionForm (card, functip, setting, permFuncField = [], type, menulist = [], modules = []) {
   let opentypes = [
     {
       value: 'pop',
@@ -43,23 +43,7 @@
     }
   ]
 
-  if (card.intertype === 'inner' && !card.innerFunc) {
-    card.intertype = 'system'
-  }
-
   if (type === 'chart') {
-    if (card.focus) {
-      // 瀵煎叆鍜屽鍑篹xcel锛屾寜閽悕绉扮洿鎺ヤ负瀵煎叆銆佸鍑�
-      card.label = '瀵煎嚭Excel'
-      card.OpenType = 'excelOut'
-      card.icon = 'download'
-      card.intertype = setting.interType
-      card.innerFunc = setting.innerFunc
-      card.sysInterface = setting.sysInterface
-      card.outerFunc = setting.outerFunc
-      card.interface = setting.interface
-      card.class = 'dgreen'
-    }
     opentypes = [
       {
         value: 'excelIn',
@@ -119,10 +103,10 @@
         text: '绯荤粺'
       }, {
         value: 'inner',
-        text: Formdict['header.form.interface.inner']
+        text: Formdict['model.interface.inner']
       }, {
         value: 'outer',
-        text: Formdict['header.form.interface.outer']
+        text: Formdict['model.interface.outer']
       }]
     },
     {
@@ -130,8 +114,7 @@
       key: 'sqlType',
       label: Formdict['header.form.action.type'],
       initVal: card.sqlType || '',
-      tooltip: Formdict['header.form.actionhelp.sqlType'],
-      required: false,
+      required: true,
       options: []
     },
     {
@@ -147,8 +130,7 @@
       key: 'sql',
       label: Formdict['model.form.tablename'],
       initVal: card.sql || setting.tableName || '',
-      tooltip: Formdict['header.form.actionhelp.tablename'],
-      required: false
+      required: true
     },
     {
       type: 'text',
@@ -163,21 +145,13 @@
     },
     {
       type: 'select',
-      key: 'linkTab',
-      label: '鍏宠仈鏍囩',
-      initVal: card.linkTab || '',
-      required: false,
-      options: []
-    },
-    {
-      type: 'select',
       key: 'pageTemplate',
       label: Formdict['model.form.newpage.type'],
       initVal: card.pageTemplate || '',
       required: true,
       options: [{
-        value: 'print',
-        text: Formdict['header.menu.printTemplate']
+        value: 'billprint',
+        text: '鍗曟嵁鎵撳嵃'
       }, {
         value: 'pay',
         text: Formdict['model.pay']
@@ -230,20 +204,6 @@
       initVal: card.callbackFunc || '',
       required: false,
       readonly: false
-    },
-    {
-      type: 'select',
-      key: 'position',
-      label: Formdict['header.form.position'],
-      initVal: card.position || 'toolbar',
-      required: true,
-      options: [{
-        value: 'toolbar',
-        text: Formdict['header.form.toolbar']
-      }, {
-        value: 'grid',
-        text: Formdict['header.form.grid']
-      }]
     },
     {
       type: 'select',
@@ -332,11 +292,40 @@
       }]
     },
     {
+      type: 'number',
+      key: 'width',
+      min: 1,
+      max: 24,
+      precision: 0,
+      label: '瀹藉害',
+      initVal: card.width || 12,
+      tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��',
+      forbid: type !== 'card',
+      required: true
+    },
+    {
+      type: 'select',
+      key: 'show',
+      label: "鏄剧ず涓�",
+      initVal: card.show || 'icon',
+      required: true,
+      options: [{
+        value: 'icon',
+        text: '鍥炬爣'
+      }, {
+        value: 'button',
+        text: '鎸夐挳'
+      }, {
+        value: 'link',
+        text: '閾炬帴'
+      }]
+    },
+    {
       type: 'select',
       key: 'icon',
       label: Formdict['model.icon'],
       initVal: card.icon,
-      required: type === 'chart', // 鍥捐〃蹇呴』浣跨敤鍥炬爣
+      required: false,
       options: []
     },
     {
@@ -396,6 +385,14 @@
         text: '闈炲繀濉�'
       }]
     },
+    {
+      type: 'mcascader',
+      key: 'syncComponent',
+      label: '鍚屾鍒锋柊',
+      initVal: card.syncComponent || [],
+      required: false,
+      options: modules
+    },
     // {
     //   type: 'select',
     //   key: 'linkcomponents',
@@ -406,7 +403,5 @@
     // }
   ]
 
-  if (type === 'chart') {
-    return forms
-  }
+  return forms
 }

--
Gitblit v1.8.0