From 92108e6c93de657838bbd766a9eb4f27d85e1c2d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 05 五月 2020 16:41:28 +0800
Subject: [PATCH] 2020-05-05

---
 src/templates/zshare/formconfig.jsx |  103 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 101 insertions(+), 2 deletions(-)

diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index 3b79d42..a21d0bd 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -1703,14 +1703,14 @@
       type: 'number',
       key: 'min',
       label: '鏈�灏忓��',
-      initVal: card.min || '',
+      initVal: card.min || card.min === 0 ? card.min : '',
       required: false
     },
     {
       type: 'number',
       key: 'max',
       label: '鏈�澶у��',
-      initVal: card.max || '',
+      initVal: card.max || card.max === 0 ? card.max : '',
       required: false
     },
     {
@@ -1879,4 +1879,103 @@
       options: roleList
     }
   ]
+}
+
+/**
+ * @description 鑾峰彇瀛愯彍鍗曞熀鏈俊鎭〃鍗曢厤缃俊鎭�
+ * @param {object} card  // 鏍囩閰嶇疆淇℃伅
+ */
+export function getTabForm (card, supMenu, menus, equalTab, equalTabs, type) {
+  return [
+    {
+      type: 'text',
+      key: 'label',
+      label: Formdict['header.menu.tabName'],
+      initVal: card.label || '',
+      required: true
+    },
+    {
+      type: 'select',
+      key: 'type',
+      label: Formdict['header.form.tabType'],
+      initVal: card.type || 'SubTable',
+      required: true,
+      options: [{
+        value: 'SubTable',
+        text: Formdict['header.menu.tab.subtable']
+      }]
+    },
+    {
+      type: 'select',
+      key: 'linkTab',
+      label: Formdict['header.form.linkTab'],
+      initVal: card.linkTab || '',
+      required: false,
+      options: []
+    },
+    {
+      type: 'select',
+      key: 'icon',
+      label: Formdict['header.menu.icon'],
+      initVal: card.icon || '',
+      required: false,
+      options: [{
+        value: '',
+        text: Formdict['header.form.empty']
+      }, {
+        value: 'table',
+        text: 'table'
+      }, {
+        value: 'bar-chart',
+        text: 'bar-chart'
+      }, {
+        value: 'pie-chart',
+        text: 'pie-chart'
+      }, {
+        value: 'line-chart',
+        text: 'line-chart'
+      }]
+    },
+    {
+      type: 'select',
+      key: 'supMenu',
+      label: Formdict['header.form.supTab'],
+      initVal: supMenu,
+      required: false,
+      options: menus
+    },
+    {
+      type: 'mutilselect',
+      key: 'equalTab',
+      label: Formdict['header.form.equalTab'],
+      tooltip: '濡傛灉瀛愭爣绛句腑鍚湁鍒锋柊鍚岀骇鏍囩鐨勬寜閽紝鍦ㄦ澶勬坊鍔犻渶瑕佸埛鏂扮殑鏍囩銆�',
+      initVal: equalTab,
+      required: false,
+      options: equalTabs
+    },
+    {
+      type: 'text',
+      key: 'foreignKey',
+      label: '澶栭敭',
+      tooltip: '澶栭敭鏃ㄥ湪鏍囩椤典腑鎵ц榛樿鍑芥暟锛堟坊鍔狅級鏃讹紝鏇挎崲BID瀛楁',
+      initVal: card.foreignKey || '',
+      required: false
+    },
+    {
+      type: 'radio',
+      key: 'searchPass',
+      label: '涓昏〃鎼滅储',
+      initVal: card.searchPass || 'false',
+      tooltip: '浣跨敤涓昏〃鎼滅储鏉′欢鏃讹紝涓昏〃鐨勬悳绱㈡潯浠朵細浼犲叆瀛愯〃涓��',
+      required: false,
+      forbid: type !== 'main',
+      options: [{
+        value: 'true',
+        text: '浣跨敤'
+      }, {
+        value: 'false',
+        text: '涓嶄娇鐢�'
+      }]
+    }
+  ]
 }
\ No newline at end of file

--
Gitblit v1.8.0