From ef8acbf3859bd13e759fbb9b8ba726039c1fb2c5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 14 十一月 2023 15:51:59 +0800 Subject: [PATCH] 2023-11-14 --- src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx | 106 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 98 insertions(+), 8 deletions(-) diff --git a/src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx index e6a8a2f..f8eaadf 100644 --- a/src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-scatter/chartcompile/formconfig.jsx @@ -3,11 +3,14 @@ * @param {object} card // 鍥捐〃瀵硅薄 */ export function getBaseForm (card) { + let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') + let isprint = sessionStorage.getItem('MenuType') === 'billPrint' + let ispop = sessionStorage.getItem('editMenuType') === 'popview' if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { @@ -42,14 +45,37 @@ required: true }, { - type: 'number', + type: 'styleInput', key: 'height', - label: '楂樺害', + label: '鍥捐〃楂樺害', initVal: card.height, - min: 100, - max: 1000, - decimal: 0, - required: true + tooltip: '鍥捐〃缁樺浘鍖哄煙鐨勯珮搴︼紝涓嶅寘鎷爣棰樺強鍐呭杈硅窛銆�', + required: true, + options: ['px', 'vh', 'vw'] + }, + { + type: 'radio', + key: 'permission', + label: '鏉冮檺楠岃瘉', + initVal: card.permission || 'false', + required: false, + options: [ + {value: 'true', text: '鍚敤'}, + {value: 'false', text: '绂佺敤'}, + ], + forbid: !appType || ispop || isprint + }, + { + type: 'radio', + key: 'cacheLocal', + label: '鏈湴缂撳瓨', + initVal: card.cacheLocal || 'true', + required: false, + options: [ + {value: 'true', text: '缁ф壙鑿滃崟'}, + {value: 'false', text: '绂佺敤'}, + ], + forbid: ispop || isprint }, { type: 'select', @@ -58,7 +84,8 @@ initVal: card.blacklist || [], multi: true, required: false, - options: roleList + options: roleList, + forbid: !!appType || isprint } ] } @@ -69,6 +96,7 @@ * @param {Array} columns // 鏄剧ず鍒� */ export function getOptionForm (card, columns) { + let appType = sessionStorage.getItem('appType') let xfields = columns.filter(item => /^Nvarchar/ig.test(item.datatype)) let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype)) @@ -112,6 +140,46 @@ }] }, { + type: 'radio', + key: 'tooltip', + label: '鎮诞鎻愮ず', + initVal: card.tooltip || 'true', + required: false, + options: [{ + value: 'true', + text: '鏄剧ず' + }, { + value: 'false', + text: '闅愯棌' + }] + }, { + type: 'radio', + key: 'download', + label: '瀵煎嚭鍥剧墖', + initVal: card.download || 'forbid', + required: false, + forbid: appType === 'mob', + options: [{ + value: 'forbid', + text: '绂佺敤' + }, { + value: 'enable', + text: '鍚敤' + }] + }, + { + type: 'radio', + key: 'empty', + label: '绌哄�奸殣钘�', + initVal: card.empty || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', + required: false, + options: [ + {value: 'show', text: '鍚�'}, + {value: 'hidden', text: '鏄�'}, + ], + }, + { type: 'text', key: 'Xunit', label: 'X杞村崟浣�', @@ -132,6 +200,28 @@ initVal: card.color || 'rgba(0, 0, 0, 0.65)', tooltip: '鍧愭爣杞存彁绀烘枃瀛楀強绀轰緥鐨勯鑹层��', required: false + }, { + type: 'select', + key: 'interaction', + label: '浜や簰鏁堟灉', + initVal: card.interaction || [], + multi: true, + required: false, + forbid: appType === 'mob', + options: [ + { value: 'element-active', label: '鍏冪礌鑱氱劍' }, + { value: 'element-selected', label: '鍏冪礌閫変腑锛堝閫夛級' }, + { value: 'element-single-selected', label: '鍏冪礌閫変腑锛堝崟閫夛級' }, + // { value: 'active-region', label: '鑳屾櫙妗�' }, + { value: 'view-zoom', label: '瑙嗗浘缂╂斁' }, + { value: 'element-highlight', label: '鍏冪礌楂樹寒' }, + { value: 'element-highlight-by-color', label: '鍚岃壊鍏冪礌楂樹寒' }, + { value: 'element-highlight-by-x', label: '鍚孹杞村厓绱犻珮浜�' }, + { value: 'legend-filter', label: '鍥句緥杩囨护' }, + { value: 'legend-active', label: '鍥句緥鑱氱劍' }, + { value: 'legend-highlight', label: '鍥句緥楂樹寒' }, + { value: 'brush', label: '閫夋杩囨护' }, + ] } ] } -- Gitblit v1.8.0