From 137fb8ea6af2789b3238b22bac31d80bced41dfe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 七月 2021 11:39:39 +0800
Subject: [PATCH] 2021-07-28

---
 src/menu/components/card/cardcellcomponent/formconfig.jsx |   72 +++++++++++++++++++++++++----------
 1 files changed, 51 insertions(+), 21 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx
index b81da36..ac0423d 100644
--- a/src/menu/components/card/cardcellcomponent/formconfig.jsx
+++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -4,11 +4,11 @@
 const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
 
 /**
- * @description 鑾峰彇鎸夐挳琛ㄥ崟閰嶇疆淇℃伅
- * @param {*} card           缂栬緫鎸夐挳
- * @param {*} type           鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
+ * @description 鑾峰彇鍏冪礌閰嶇疆淇℃伅
+ * @param {*} card
+ * @param {*} type
  */
-export function getCardCellForm (card, type) {
+export function getCardCellForm (card, type, subtype, cardCell) {
   let _options = [
     { value: 'text', text: '鏂囨湰'},
     { value: 'number', text: '鏁板��'},
@@ -22,7 +22,7 @@
     { value: 'currentDate', text: '褰撳墠鏃堕棿'},
   ]
 
-  if (type === 'table') {
+  if (type === 'table' || (type === 'card' && subtype === 'datacard')) {
     _options.push({value: 'sequence', text: '搴忓彿'})
   }
   let appMenus = []
@@ -40,6 +40,17 @@
     } else {
       appMenus = []
     }
+  }
+
+  let dataTypes = [
+    { value: 'dynamic', text: '鍔ㄦ��' },
+    { value: 'static', text: '闈欐��' }
+  ]
+  if (cardCell.$cardType === 'extendCard') {
+    card.datatype = 'static'
+    dataTypes = [
+      { value: 'static', text: '闈欐��' }
+    ]
   }
 
   let forms = [
@@ -98,10 +109,7 @@
       label: '鏁版嵁绫诲瀷',
       initVal: card.datatype || 'static',
       required: true,
-      options: [
-        { value: 'dynamic', text: '鍔ㄦ��' },
-        { value: 'static', text: '闈欐��' }
-      ]
+      options: dataTypes
     },
     {
       type: 'select',
@@ -293,10 +301,32 @@
       required: true,
       options: [
         { value: '1:1', text: '1:1' },
-        { value: '3:2', text: '3:2' },
         { value: '4:3', text: '4:3' },
-        { value: '16:9', text: '16:9' }
+        { value: '3:2', text: '3:2' },
+        { value: '16:9', text: '16:9' },
+        { value: '2:1', text: '2:1' },
+        { value: '3:1', text: '3:1' },
+        { value: '4:1', text: '4:1' },
+        { value: '5:1', text: '5:1' },
+        { value: '6:1', text: '6:1' },
+        { value: '7:1', text: '7:1' },
+        { value: '8:1', text: '8:1' },
+        { value: '9:1', text: '9:1' },
+        { value: '10:1', text: '10:1' },
+        { value: '3:4', text: '3:4' },
+        { value: '2:3', text: '2:3' },
+        { value: '9:16', text: '9:16' },
       ]
+    },
+    {
+      type: 'number',
+      key: 'maxWidth',
+      min: 10,
+      max: 2000,
+      label: '鏈�澶у搴�',
+      initVal: card.maxWidth || '',
+      tooltip: '鍥剧墖瀹藉害鐨勬渶澶у�笺��',
+      required: false,
     },
     {
       type: 'select',
@@ -332,7 +362,7 @@
       forbid: !isApp,
       options: [
         { value: '', text: '鏃�' },
-        { value: 'page', text: '鑿滃崟' },
+        // { value: 'page', text: '鑿滃崟' },
         { value: 'linkpage', text: '鍏宠仈鑿滃崟' },
         { value: 'custom', text: '閾炬帴' }
       ]
@@ -358,15 +388,15 @@
         { value: 'self', text: '褰撳墠椤甸潰' }
       ]
     },
-    {
-      type: 'select',
-      key: 'copyMenuId',
-      label: '澶嶅埗鑿滃崟',
-      initVal: card.copyMenuId || '',
-      required: false,
-      forbid: !isApp,
-      options: appMenus
-    },
+    // {
+    //   type: 'select',
+    //   key: 'copyMenuId',
+    //   label: '澶嶅埗鑿滃崟',
+    //   initVal: card.copyMenuId || '',
+    //   required: false,
+    //   forbid: !isApp,
+    //   options: appMenus
+    // },
     {
       type: 'radio',
       key: 'joint',

--
Gitblit v1.8.0