From f66e19dd13af07ee466306632ad43c72f1f16ae7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 26 五月 2021 14:49:55 +0800 Subject: [PATCH] 2021-05-26 --- src/menu/components/card/cardcellcomponent/formconfig.jsx | 44 ++++++++++++++++++++++++++++++++------------ 1 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index a83aee1..7d9a8f4 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', @@ -117,7 +125,7 @@ min: 0, label: '鍐呭', initVal: card.value || '', - tooltip: '鏂囨湰绫诲瀷锛屼細鏇挎崲鍐呭涓殑@username@鍜孈fullName@銆�', + tooltip: '鏂囨湰绫诲瀷锛屼細鏇挎崲鍐呭涓殑@username@銆丂fullName@銆丂login_city@銆�', required: true }, { @@ -293,9 +301,21 @@ 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' }, ] }, { -- Gitblit v1.8.0