From f07c42a322f41e14ef5b1bf8f2fd66fc5d338cdd Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 28 六月 2023 18:17:09 +0800 Subject: [PATCH] 2023-06-28 --- src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx | 168 +++++++++++++++---------------------------------------- 1 files changed, 47 insertions(+), 121 deletions(-) diff --git a/src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx index 9eed12a..2be6ca1 100644 --- a/src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx @@ -1,3 +1,6 @@ + +import MenuUtils from '@/utils/utils-custom.js' + /** * @description 鑾峰彇鍥捐〃瑙嗗浘閰嶇疆琛ㄥ崟 * @param {object} card // 鍥捐〃瀵硅薄 @@ -106,7 +109,7 @@ tooltip: '鐐瑰嚮鑺傜偣鏃惰Е鍙戠殑浜嬩欢銆�', required: false, options: [ - {value: '', label: '鏁版嵁鍒囨崲'}, + {value: '', label: '鏃�'}, {value: 'menu', label: '鑿滃崟'}, {value: 'menus', label: '鑿滃崟缁�'} ], @@ -197,136 +200,71 @@ * @param {object} card // 鍥捐〃瀵硅薄 * @param {Array} columns // 鏄剧ず鍒� */ -export function getOptionForm (card, columns) { +export function getOptionForm (card, uuid) { + let menu = window.GLOB.customMenu + let modules = MenuUtils.getSupModules(menu.components, uuid, menu.interfaces) + return [ { type: 'select', field: 'subtype', - label: '绫诲瀷', - initval: card.subtype || 'mindmap', + label: '鍥捐〃绫诲瀷', + initval: card.subtype || 'xflow', required: true, options: [{ - value: 'mindmap', - label: '鎬濈淮瀵煎浘' + value: 'xflow', + label: '娴佺▼鍥�' }, { - value: 'indentTree', - label: '缂╄繘鏂囦欢鏍�' - }, { - value: 'kapmap', - label: '鐭ヨ瘑鍥捐氨鏍�' + value: 'lane', + label: '娉抽亾鍥�' }], controlFields: [ - {field: 'dirField', values: ['mindmap']}, - {field: 'nodeColor', values: ['mindmap']}, - // {field: 'collapsed', values: ['indentTree', 'kapmap']}, - ] + {field: 'gridType', values: ['xflow']}, + {field: 'backgroundColor', values: ['xflow']} + ], }, { type: 'radio', - field: 'rootType', - label: '鏍硅妭鐐瑰彇鍊�', - initval: card.rootType || 'fixed', - tooltip: '閫夋嫨涓婄骇鏃讹紝璇峰~鍐欐牴鑺傜偣鐨勬枃鏈拰鍊肩殑瀛楁鍚�', + field: 'function', + label: '鍔熻兘', + initval: card.function || 'show', required: true, - options: [{ - value: 'fixed', - label: '鍥哄畾鍊�' - }, { - value: 'supvalue', - label: '涓婄骇缁勪欢' - }, { - value: 'line', - label: '琛�' - }], + options: [ + {value: 'edit', label: '娴佺▼缂栬緫'}, + {value: 'show', label: '娴佺▼灞曠ず'}, + ], controlFields: [ - {field: 'rootLabel', values: ['fixed', 'supvalue']}, - {field: 'rootValue', values: ['fixed', 'supvalue']}, - {field: 'mark', values: ['line']}, + {field: 'empty', values: ['show']} ] }, { - type: 'text', - field: 'rootValue', - label: '鏍硅妭鐐瑰��', - initval: card.rootValue || '', - required: true - }, - { - type: 'text', - field: 'rootLabel', - label: '鏍硅妭鐐规枃鏈�', - initval: card.rootLabel || '', - required: true - }, - { - type: 'select', - field: 'valueField', - label: '鍊煎瓧娈�', - initval: card.valueField || '', - required: true, - options: columns - }, - { - type: 'select', - field: 'labelField', - label: '鏂囨湰瀛楁', - initval: card.labelField || '', - required: true, - options: columns - }, - { - type: 'select', - field: 'parentField', - label: '涓婄骇瀛楁', - initval: card.parentField || '', - required: true, - options: columns - }, - { - type: 'text', - field: 'mark', - label: '椤剁骇鏍囪瘑', - initval: card.mark || '', - tooltip: '涓婄骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负鏍硅妭鐐广��', - required: true - }, - { - type: 'select', - field: 'dirField', - label: '鏂瑰悜鎺у埗', - initval: card.dirField || '', + type: 'cascader', + field: 'supModule', + label: '涓婄骇缁勪欢', + initval: card.supModule || [], required: false, - options: columns, - controlFields: [ - {field: 'dirSign', notNull: true}, - {field: 'leftColor', notNull: true}, - ] + options: modules, + allowClear: true }, { - type: 'text', - field: 'dirSign', - label: '宸﹀悜鏍囪', - initval: card.dirSign || '', - tooltip: '褰撹妭鐐瑰�间笌鏍囪鐩稿悓鏃惰妭鐐逛俊鎭綅浜庤妭鐐瑰乏渚э紝澶氫釜鍊艰鐢ㄩ�楀彿鍒嗛殧銆�', - required: false + type: 'radio', + field: 'gridType', + label: '缃戞牸', + initval: card.gridType || 'none', + required: false, + options: [ + {value: 'none', label: '鏃�'}, + {value: 'dot', label: '鐐圭姸缃戞牸'}, + {value: 'mesh', label: '缃戠姸缃戞牸'} + ], }, { type: 'color', - field: 'nodeColor', - label: '鑺傜偣棰滆壊', - initval: card.nodeColor || '#1890ff', - tooltip: '鍙充晶鑺傜偣鐨勬爣璁伴鑹层��', - colorType: 'hex', - required: false - }, - { - type: 'color', - field: 'leftColor', - label: '宸﹁妭鐐归鑹�', - initval: card.leftColor || '#26C281', - tooltip: '宸︿晶鑺傜偣鐨勬爣璁伴鑹层��', - colorType: 'hex', - required: false + field: 'backgroundColor', + label: '鑳屾櫙鑹�', + initval: card.backgroundColor || '', + required: false, + allowClear: true }, { type: 'radio', @@ -339,18 +277,6 @@ {value: 'show', label: '鍚�'}, {value: 'hidden', label: '鏄�'}, ], - }, - { - type: 'radio', - field: 'collapsed', - label: '鑺傜偣鍚堝苟', - initval: card.collapsed || 'false', - tooltip: '涓�绾ц妭鐐规槸鍚﹀悎骞躲��', - required: false, - options: [ - {value: 'false', label: '鍚�'}, - {value: 'true', label: '鏄�'}, - ], - }, + } ] } -- Gitblit v1.8.0