From 26d0fa42ea8c63a87e8ef93d0915f75f46fb1f9c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 24 三月 2022 11:09:53 +0800 Subject: [PATCH] 2022-03-24 --- src/menu/components/card/data-card/options.jsx | 111 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 89 insertions(+), 22 deletions(-) diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index 1c71ab8..67d8f47 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -4,7 +4,7 @@ /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (wrap, subtype, columns, id) { +export default function (wrap, subtype, columns = [], id = '', supNodes = []) { let appType = sessionStorage.getItem('appType') let MenuType = '' let menu = fromJS(window.GLOB.customMenu).toJS() @@ -13,7 +13,7 @@ MenuType = 'billPrint' } let modules = [] - if (subtype === 'propcard') { + if (subtype === 'propcard' || subtype === 'datacard') { modules = MenuUtils.getSupModules(menu.components, id) || [] } @@ -70,6 +70,7 @@ linkFields: ['priKeyType'], controlFields: [ {field: 'goback', values: ['dynamic']}, + {field: 'empty', values: ['dynamic']}, {field: 'supModule', values: ['static']}, ], forbid: subtype !== 'propcard' @@ -103,7 +104,7 @@ {field: 'checkAll', values: ['checkbox']}, {field: 'selected', values: ['radio', 'checkbox']}, {field: 'selStyle', values: ['radio', 'checkbox']}, - {field: 'priKeyType', values: ['radio', 'checkbox']}, + // {field: 'priKeyType', values: ['radio', 'checkbox']}, ], forbid: subtype === 'tablecard' }, @@ -136,33 +137,18 @@ ] }, { - type: 'radio', - field: 'supType', - label: '涓婄骇绫诲瀷', - initval: wrap.supType || 'single', - tooltip: '涓婄骇缁勪欢涓哄崟涓�缁勪欢鎴栧涓粍浠躲��', - required: false, - forbid: subtype !== 'datacard' || appType === 'mob', - options: [ - {value: 'single', label: '鍗曠粍浠�'}, - {value: 'multi', label: '澶氱粍浠�'}, - ] - }, - { - type: subtype === 'propcard' ? 'select' : 'radio', + type: 'select', field: 'selStyle', label: '閫変腑椋庢牸', initval: wrap.selStyle || 'active', tooltip: '瀛樺湪杈规鏃讹紝杈规浼氫娇鐢ㄧ郴缁熻壊銆�', required: false, - options: subtype === 'propcard' ? [ + options: [ {value: 'none', label: '鏃�'}, {value: 'active', label: '澶栭槾褰�'}, {value: 'backFont', label: '鑳屾櫙+鏂囧瓧'}, {value: 'font', label: '鏂囧瓧'}, - ] : [ - {value: 'none', label: '鏃�'}, - {value: 'active', label: '澶栭槾褰�'}, + ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '鍕鹃��'}] : []) ] // forbid: subtype !== 'propcard' }, @@ -226,7 +212,7 @@ tooltip: '璇煶鎾姤鍦ㄧЩ鍔ㄧapp涓湁鏁堛�傛敞锛氫娇鐢ㄨ闊虫挱鎶ユ椂锛屾暟鎹簮涓嶈浣跨敤鍚屾鏌ヨ锛屾坊鍔犲畾鏃跺櫒鏃讹紝鍙惊鐜挱鎶�', required: false, options: columns, - forbid: !columns || appType !== 'mob' + forbid: !columns || appType !== 'mob' || subtype !== 'propcard' }, { type: 'radio', @@ -248,9 +234,22 @@ initval: wrap.empty || 'show', tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', required: false, + skip: true, options: [ {value: 'show', label: '鍚�'}, {value: 'hidden', label: '鏄�'}, + ], + }, + { + type: 'radio', + field: 'supKey', + label: '涓婄骇涓婚敭', + initval: wrap.supKey || 'true', + tooltip: '褰撹缃笂绾х粍浠舵椂锛屼笂绾т富閿�间负绌烘槸鍚﹁繘琛屾暟鎹煡璇€��', + required: false, + options: [ + {value: 'true', label: '楠岃瘉'}, + {value: 'false', label: '蹇界暐'}, ], forbid: subtype !== 'datacard' }, @@ -265,6 +264,45 @@ forbid: subtype !== 'propcard' }, { + type: 'select', + field: 'controlField', + label: '绂佺敤瀛楁', + initval: wrap.controlField || '', + tooltip: '鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆�', + required: false, + allowClear: true, + options: columns, + controlFields: [ + {field: 'controlVal', notNull: true}, + ], + forbid: subtype !== 'datacard' + }, + { + type: 'text', + field: 'controlVal', + label: '鎺у埗鍊�', + initval: wrap.controlVal || '', + tooltip: '褰撳瓧娈靛�间笌鎺у埗鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + required: false, + forbid: subtype !== 'datacard' + }, + { + type: 'radio', + field: 'supType', + label: '涓婄骇绫诲瀷', + initval: wrap.supType || 'single', + tooltip: '涓婄骇缁勪欢涓哄崟涓�缁勪欢鎴栧涓粍浠躲��', + required: false, + forbid: subtype !== 'datacard' || appType === 'mob', + options: [ + {value: 'single', label: '鍗曠粍浠�'}, + {value: 'multi', label: '澶氱粍浠�'}, + ], + controlFields: [ + {field: 'supNodes', values: ['multi']}, + ] + }, + { type: 'multiselect', field: 'blacklist', label: '榛戝悕鍗�', @@ -273,6 +311,35 @@ options: roleList, forbid: !!appType }, + { + type: 'table', + field: 'supNodes', + label: '涓婄骇缁勪欢', + initval: supNodes, + required: true, + forbid: subtype !== 'datacard' || appType === 'mob', + span: 24, + columns: [ + { + title: '搴忓彿', + dataIndex: '$index', + editable: false, + required: false, + width: '20%' + }, + { + title: '鑿滃崟', + dataIndex: 'nodes', + inputType: 'cascader', + editable: true, + required: true, + extends: [{key: 'label', value: 'label'}], + width: '50%', + render: (text, record) => record.label, + options: modules + } + ] + } ] return cardWrapForm.map(item => { -- Gitblit v1.8.0