From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 四月 2025 12:18:03 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx | 137 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 129 insertions(+), 8 deletions(-) diff --git a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx index b6c5913..3c67d5d 100644 --- a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx @@ -2,9 +2,11 @@ * @description 鑾峰彇鍥捐〃瑙嗗浘閰嶇疆琛ㄥ崟 * @param {object} card // 鍥捐〃瀵硅薄 */ -export function getBaseForm (card) { +export function getBaseForm (card, columns) { 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) @@ -13,6 +15,32 @@ } } else { roleList = [] + } + + let menulist = [] + + if (appType === 'pc') { + menulist = sessionStorage.getItem('appMenus') + if (menulist) { + try { + menulist = JSON.parse(menulist) + } catch (e) { + menulist = [] + } + } else { + menulist = [] + } + } else if (appType === '') { + menulist = sessionStorage.getItem('fstMenuList') + if (menulist) { + try { + menulist = JSON.parse(menulist) + } catch (e) { + menulist = [] + } + } else { + menulist = [] + } } return [ @@ -61,7 +89,19 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || ispop || isprint + }, + { + type: 'radio', + field: 'cacheLocal', + label: '鏈湴缂撳瓨', + initval: card.cacheLocal || 'true', + required: false, + options: [ + {value: 'true', label: '缁ф壙鑿滃崟'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: ispop || isprint }, { type: 'multiselect', @@ -70,7 +110,86 @@ initval: card.blacklist || [], required: false, options: roleList, - forbid: !!appType + forbid: !!appType || isprint + }, + { + type: 'radio', + field: 'click', + label: '鐐瑰嚮浜嬩欢', + initval: card.click || 'switch', + tooltip: '鐐瑰嚮鑺傜偣鏃惰Е鍙戠殑浜嬩欢銆�', + required: false, + options: [ + {value: 'switch', label: '鏁版嵁鍒囨崲'}, + {value: 'menu', label: '鑿滃崟'}, + {value: 'menus', label: '鑿滃崟缁�'} + ], + controlFields: [ + {field: 'menu', values: ['menu']}, + {field: 'menus', values: ['menus']}, + {field: 'menuType', values: ['menus']}, + {field: 'open', values: ['menu', 'menus']}, + ] + }, + { + type: appType === '' ? 'cascader' : 'select', + field: 'menu', + label: '鍏宠仈鑿滃崟', + initval: card.menu || (appType === '' ? [] : ''), + required: true, + extendName: 'MenuNo', + options: menulist + }, + { + type: 'select', + field: 'menuType', + label: '鑿滃崟绫诲瀷', + initval: card.menuType || '', + required: true, + options: columns + }, + { + type: 'radio', + field: 'open', + label: '鎵撳紑鏂瑰紡', + initval: card.open || 'blank', + required: false, + options: [ + {value: 'blank', label: '鏂扮獥鍙�'}, + {value: 'self', label: '褰撳墠绐楀彛'}, + ], + forbid: appType !== 'pc' + }, + { + type: 'table', + field: 'menus', + label: '鑿滃崟缁�', + initval: card.menus || [], + required: true, + span: 24, + actions: ['edit', 'del', 'add', 'move', 'view'], + columns: [ + { + title: '鏍囪瘑', + dataIndex: 'sign', + inputType: 'input', + editable: true, + unique: true, + required: false, + width: '35%' + }, + { + title: '鑿滃崟', + dataIndex: 'menu', + inputType: !appType ? 'cascader' : 'select', + editable: true, + required: true, + extends: !appType ? 'Menu' : [{key: 'label', value: 'label'}], + width: '35%', + render: (text, record) => record.label, + options: menulist + } + ] } ] } @@ -101,7 +220,7 @@ controlFields: [ {field: 'dirField', values: ['mindmap']}, {field: 'nodeColor', values: ['mindmap']}, - {field: 'collapsed', values: ['indentTree', 'kapmap']}, + // {field: 'collapsed', values: ['indentTree', 'kapmap']}, ] }, { @@ -119,7 +238,7 @@ label: '涓婄骇缁勪欢' }, { value: 'line', - label: '琛�' + label: '鏁版嵁婧�' }], controlFields: [ {field: 'rootLabel', values: ['fixed', 'supvalue']}, @@ -132,6 +251,7 @@ field: 'rootValue', label: '鏍硅妭鐐瑰��', initval: card.rootValue || '', + tooltip: '鏍硅妭鐐逛娇鐢ㄤ笂绾х粍浠舵椂锛岃濉啓涓婄骇缁勪欢涓搴旂殑瀛楁銆�', required: true }, { @@ -139,6 +259,7 @@ field: 'rootLabel', label: '鏍硅妭鐐规枃鏈�', initval: card.rootLabel || '', + tooltip: '鏍硅妭鐐逛娇鐢ㄤ笂绾х粍浠舵椂锛岃濉啓涓婄骇缁勪欢涓搴旂殑瀛楁銆�', required: true }, { @@ -199,7 +320,7 @@ label: '鑺傜偣棰滆壊', initval: card.nodeColor || '#1890ff', tooltip: '鍙充晶鑺傜偣鐨勬爣璁伴鑹层��', - isHex: true, + colorType: 'hex', required: false }, { @@ -208,7 +329,7 @@ label: '宸﹁妭鐐归鑹�', initval: card.leftColor || '#26C281', tooltip: '宸︿晶鑺傜偣鐨勬爣璁伴鑹层��', - isHex: true, + colorType: 'hex', required: false }, { @@ -228,7 +349,7 @@ field: 'collapsed', label: '鑺傜偣鍚堝苟', initval: card.collapsed || 'false', - tooltip: '涓�绾ц妭鐐规槸鍚﹀悎骞躲��', + tooltip: '鍒濆鍖栨椂锛屼竴绾ц妭鐐规槸鍚﹀悎骞躲��', required: false, options: [ {value: 'false', label: '鍚�'}, -- Gitblit v1.8.0