From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 五月 2024 10:56:41 +0800 Subject: [PATCH] 2024-05-16 --- src/menu/components/card/data-card/options.jsx | 201 ++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 168 insertions(+), 33 deletions(-) diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index 519af8e..91f71f7 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -59,6 +59,74 @@ } } + let interaction = [] + let interOptions = [] + + if (wrap.scale === 'true') { + interaction.push('scale') + } + if (wrap.parity === 'true') { + interaction.push('parity') + } + if (wrap.hover === 'true') { + interaction.push('hover') + } + + if (subtype === 'datacard') { + interOptions = [ + {value: 'parity', label: '濂囧伓寮傝壊'}, + ] + if (appType !== 'mob') { + interOptions.push( + {value: 'hover', label: '鎮诞鍙樿壊'}, + {value: 'scale', label: '鎮诞鏀惧ぇ'} + ) + } + } else if (subtype === 'propcard' && appType !== 'mob') { + interOptions = [ + {value: 'scale', label: '鎮诞鏀惧ぇ'} + ] + } else if (subtype === 'tablecard') { + interOptions = [ + {value: 'parity', label: '濂囧伓寮傝壊'}, + ] + if (appType !== 'mob') { + interOptions.push( + {value: 'hover', label: '鎮诞鍙樿壊'} + ) + } + } + + if (interaction.length && interOptions.length) { + interaction = interaction.filter(m => interOptions.findIndex(cell => cell.value === m) > -1) + } + + // let interItem = null + + // if (interOptions.length === 1) { + // interItem = { + // type: 'radio', + // field: interOptions[0].value, + // label: interOptions[0].label, + // initval: interaction.length === 1 ? 'true' : 'false', + // required: false, + // options: [ + // {value: 'true', label: '鍚敤'}, + // {value: 'false', label: '绂佺敤'} + // ] + // } + // } else { + // interItem = { + // type: 'checkbox', + // field: 'interaction', + // label: '浜や簰鏁堟灉', + // initval: interaction, + // required: false, + // options: interOptions, + // forbid: interOptions.length === 0 + // } + // } + const cardWrapForm = [ { type: 'text', @@ -106,6 +174,7 @@ {field: 'broadcast', values: ['dynamic', 'public']}, {field: 'supModule', values: ['static']}, {field: 'publicId', values: ['public']}, + {field: 'emptyExec', values: ['dynamic', 'public']}, ], forbid: subtype !== 'propcard' }, @@ -186,6 +255,7 @@ ], controlFields: [ {field: 'slidetip', values: ['slide']}, + {field: 'maxPageSize', values: ['page']}, ], forbid: subtype === 'propcard' }, @@ -204,7 +274,7 @@ {field: 'checkAll', values: ['checkbox']}, {field: 'selected', values: ['radio', 'checkbox']}, {field: 'selStyle', values: ['radio', 'checkbox']}, - // {field: 'priKeyType', values: ['radio', 'checkbox']}, + {field: 'pickup', values: ['radio', 'checkbox']}, ], forbid: subtype === 'tablecard' }, @@ -266,7 +336,8 @@ options: [ {value: 'none', label: '鏃�'}, {value: 'active', label: '澶栭槾褰�'}, - {value: 'backFont', label: '鑳屾櫙+鏂囧瓧'}, + {value: 'backFont', label: '鑳屾櫙锛堟祬锛�+鏂囧瓧锛堟繁锛�'}, + {value: 'deepBackFont', label: '鑳屾櫙锛堟繁锛�+鏂囧瓧锛堟祬锛�'}, {value: 'font', label: '鏂囧瓧'}, {value: 'tabs', label: '鏍囩椤�'}, ...(subtype === 'datacard' ? [ @@ -292,29 +363,38 @@ }, { type: 'radio', - field: 'scale', - label: '鏀惧ぇ鏁堟灉', - initval: wrap.scale || 'false', - tooltip: '榧犳爣鎮诞浜庡崱鐗囦笂鏂规椂锛屽崱鐗囨斁澶�1.05鍊嶃��', + field: 'pickup', + label: '鏀惰捣寮�鍏�', + initval: wrap.pickup || 'false', + tooltip: '鏁版嵁鍗″彸涓婅浼氭樉绀烘敹璧峰紑鍏炽��', required: false, options: [ {value: 'false', label: '鏃�'}, {value: 'true', label: '鏈�'}, ], - forbid: subtype === 'tablecard' || appType === 'mob' + forbid: subtype !== 'datacard' || appType === 'mob' }, + // { + // type: 'radio', + // field: 'scale', + // label: '鏀惧ぇ鏁堟灉', + // initval: wrap.scale || 'false', + // tooltip: '榧犳爣鎮诞浜庡崱鐗囦笂鏂规椂锛屽崱鐗囨斁澶�1.05鍊嶃��', + // required: false, + // options: [ + // {value: 'false', label: '鏃�'}, + // {value: 'true', label: '鏈�'}, + // ], + // forbid: subtype === 'tablecard' || appType === 'mob' + // }, { - type: 'radio', - field: 'parity', - label: '濂囧伓鑳屾櫙', - initval: wrap.parity || 'false', - tooltip: '鍋舵暟琛屼細娣诲姞鑳屾櫙鑹层��', + type: 'checkbox', + field: 'interaction', + label: '浜や簰鏁堟灉', + initval: interaction, required: false, - options: [ - {value: 'false', label: '鏃�'}, - {value: 'true', label: '鏈�'}, - ], - forbid: subtype === 'propcard' + options: interOptions, + forbid: interOptions.length === 0 }, { type: 'radio', @@ -398,10 +478,26 @@ field: 'autoExec', label: '鑷姩鎵ц', initval: wrap.autoExec || '', - tooltip: '鏁版嵁鏇存柊鏃惰嚜鍔ㄦ墽琛屾寜閽�傛敞锛氭鎸夐挳鎵ц鎴愬姛鍚庤皑鎱庨�夋嫨鍒锋柊椤癸紝閬垮厤閫犳垚寰幆鎵ц銆�', + tooltip: subtype === 'propcard' ? '鏁版嵁鏇存柊鏃惰嚜鍔ㄦ墽琛屾寜閽�傛敞锛氭鎸夐挳鎵ц鎴愬姛鍚庤皑鎱庨�夋嫨鍒锋柊椤癸紝閬垮厤閫犳垚寰幆鎵ц銆�' : '鍒濆鍖栬嚜鍔ㄦ墽琛屾寜閽��', required: false, options: buttons, - forbid: subtype !== 'propcard' + forbid: subtype !== 'propcard' && subtype !== 'datacard', + controlFields: [ + {field: 'emptyExec', notNull: true}, + ] + }, + { + type: 'radio', + field: 'emptyExec', + label: '绌哄�兼墽琛�', + initval: wrap.emptyExec || 'true', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岃嚜鍔ㄦ墽琛屾寜閽槸鍚︽墽琛屻��', + required: false, + forbid: subtype !== 'propcard', + options: [ + {value: 'true', label: '鏄�'}, + {value: 'false', label: '鍚�'}, + ], }, { type: 'radio', @@ -417,7 +513,6 @@ ], controlFields: [ {field: 'jumpField', values: ['menu', 'link']}, - {field: 'joint', values: ['menu', 'link']}, {field: 'open', values: ['menu', 'link']}, {field: 'menu', values: ['menu']}, {field: 'link', values: ['link']}, @@ -451,18 +546,6 @@ tooltip: '璺宠浆閾炬帴涓烘煡璇㈡暟鎹殑杩斿洖鍊笺��', required: true, options: columns, - forbid: subtype !== 'propcard' || appType !== 'mob' - }, - { - type: 'radio', - field: 'joint', - label: '鍙傛暟鎷兼帴', - initval: wrap.joint || 'true', - required: false, - options: [ - {value: 'true', label: '鏄�'}, - {value: 'false', label: '鍚�'}, - ], forbid: subtype !== 'propcard' || appType !== 'mob' }, { @@ -564,6 +647,57 @@ forbid: ispop || isprint }, { + type: 'radio', + field: 'cacheSearch', + label: '鎼滅储缂撳瓨', + initval: wrap.cacheSearch || 'false', + tooltip: '鍚敤鎼滅储鏉′欢缂撳瓨鍚庯紝鍦ㄨ彍鍗曞埛鏂版椂鎼滅储鏉′欢涓嶅彉銆�', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: !!appType || isprint + }, + { + type: 'radio', + field: 'searchBtn', + label: '鎼滅储鎸夐挳', + initval: wrap.searchBtn || 'hidden', + // tooltip: '鍚敤鎼滅储鏉′欢缂撳瓨鍚庯紝鍦ㄨ彍鍗曞埛鏂版椂鎼滅储鏉′欢涓嶅彉銆�', + required: false, + options: [ + {value: 'hidden', label: '闅愯棌'}, + {value: 'show', label: '鏄剧ず'}, + ], + forbid: appType === 'mob' || isprint, + }, + { + type: 'radio', + field: 'shifting', + label: '鎸夐挳鍋忕Щ', + initval: wrap.shifting || 'false', + tooltip: '鍚敤鏃讹紝宸ュ叿鏍忔寜閽皢鏄剧ず鍦ㄦ爣棰樻爮鍙充笂瑙掋��', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: !!appType || subtype !== 'datacard' || isprint + }, + { + type: 'number', + field: 'maxPageSize', + label: '姣忛〉鏈�澶ф暟', + initval: wrap.maxPageSize || '', + tooltip: '鍒嗛〉鏃舵瘡椤靛彲鏄剧ず鐨勬渶澶ф暟閲忋��', + min: 10, + max: 500, + precision: 0, + required: false, + forbid: !laypage || appType === 'mob' || subtype !== 'datacard' + }, + { type: 'multiselect', field: 'blacklist', label: '榛戝悕鍗�', @@ -589,6 +723,7 @@ required: true, forbid: subtype !== 'datacard' || appType === 'mob' || isprint, span: 24, + actions: ['edit', 'del', 'add', 'move'], columns: [ { title: '搴忓彿', @@ -598,7 +733,7 @@ width: '20%' }, { - title: '鑿滃崟', + title: '缁勪欢', dataIndex: 'nodes', inputType: 'cascader', editable: true, -- Gitblit v1.8.0