From 31ec63f0419895876cbaba99637a884a32d33d0d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 01 九月 2021 10:31:45 +0800 Subject: [PATCH] 2021-09-01 --- src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx | 54 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx index 445f08d..1d23172 100644 --- a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx @@ -8,7 +8,8 @@ * @param {object} card // 鍥捐〃瀵硅薄 */ export function getBaseForm (card) { - let isApp = sessionStorage.getItem('appType') === 'pc' + let appType = sessionStorage.getItem('appType') + let isApp = appType === 'pc' || appType === 'mob' let menulist = null if (isApp) { @@ -27,7 +28,7 @@ return item }) } - } catch { + } catch (e) { menulist = [] } } else { @@ -38,7 +39,7 @@ if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { @@ -131,6 +132,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)) @@ -251,7 +253,7 @@ { type: 'radio', key: 'label', - label: '鏍囨敞鍊�', + label: '鏍囩', initVal: card.label || 'false', required: false, options: [{ @@ -262,7 +264,10 @@ text: '鍐呬晶' }, { value: 'outer', - text: '澶栦晶' + text: '铚樿洓' + }, { + value: 'normal', + text: '甯歌' }], }, { type: 'radio', @@ -281,12 +286,51 @@ text: '绱姞' }] }, { + type: 'number', + key: 'splitLine', + label: '鍒嗛殧绾�', + initVal: card.splitLine || '', + tooltip: '鍒嗛殧绾跨殑瀹藉害銆�', + min: 0, + max: 20, + decimal: 0, + required: false + }, { + type: 'color', + key: 'splitColor', + label: '鍒嗛殧鑹�', + initVal: card.splitColor || '#ffffff', + tooltip: '鍒嗛殧绾跨殑棰滆壊锛屽瓨鍦ㄥ垎闅旂嚎鏃舵湁鏁堛��', + required: false + }, { type: 'color', key: 'color', label: '鑹茬郴', initVal: card.color || 'rgba(0, 0, 0, 0.85)', 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