From fec6c24bc3fd902f8ced64bc2600c0b0836f7e52 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 10 一月 2025 11:34:58 +0800 Subject: [PATCH] 2025-01-10 --- src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx | 78 ++++++++++++++------------------------ 1 files changed, 29 insertions(+), 49 deletions(-) diff --git a/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx b/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx index 9089580..7294517 100644 --- a/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx @@ -5,6 +5,8 @@ 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) @@ -18,35 +20,35 @@ return [ { type: 'text', - key: 'title', + field: 'title', label: '鏍囬', - initVal: card.title, + initval: card.title, required: false }, { type: 'text', - key: 'name', + field: 'name', label: '缁勪欢鍚嶇О', - initVal: card.name, + initval: card.name, tooltip: '鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�', required: true }, { type: 'radio', - key: 'chartType', + field: 'chartType', label: '鍥捐〃绫诲瀷', - initVal: card.chartType || 'antv', + initval: card.chartType || 'antv', required: true, options: [ - { value: 'antv', text: 'antv' }, - { value: 'echarts', text: 'echarts' } + { value: 'antv', label: 'antv5.0' }, + { value: 'echarts', label: 'echarts' } ] }, { type: 'number', - key: 'width', + field: 'width', label: '瀹藉害', - initVal: card.width, + initval: card.width, tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', min: 1, max: 24, @@ -55,67 +57,45 @@ }, { type: 'styleInput', - key: 'height', + field: 'height', label: '鍥捐〃楂樺害', - initVal: card.height, + initval: card.height, tooltip: '鍥捐〃缁樺浘鍖哄煙鐨勯珮搴︼紝涓嶅寘鎷爣棰樺強鍐呭杈硅窛銆�', required: true, options: ['px', 'vh', 'vw'] }, { type: 'radio', - key: 'permission', + field: 'permission', label: '鏉冮檺楠岃瘉', - initVal: card.permission || 'false', + initval: card.permission || 'false', required: false, options: [ - {value: 'true', text: '鍚敤'}, - {value: 'false', text: '绂佺敤'}, + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, ], - forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' + forbid: !appType || ispop || isprint }, { type: 'radio', - key: 'cacheLocal', + field: 'cacheLocal', label: '鏈湴缂撳瓨', - initVal: card.cacheLocal || 'true', + initval: card.cacheLocal || 'true', required: false, options: [ - {value: 'true', text: '缁ф壙鑿滃崟'}, - {value: 'false', text: '绂佺敤'}, + {value: 'true', label: '缁ф壙鑿滃崟'}, + {value: 'false', label: '绂佺敤'}, ], - forbid: sessionStorage.getItem('editMenuType') === 'popview' + forbid: ispop || isprint }, { - type: 'select', - key: 'blacklist', + type: 'multiselect', + field: 'blacklist', label: '榛戝悕鍗�', - initVal: card.blacklist || [], - multi: true, + initval: card.blacklist || [], required: false, options: roleList, - forbid: !!appType - }, - // { - // type: 'cascader', - // key: 'linkmenu', - // label: '鍏宠仈鑿滃崟', - // initVal: card.linkmenu || [], - // tooltip: '鍦ㄤ娇鐢ㄦ煴褰㈠浘涓旀湭鍚敤鑷畾涔夎缃椂鏈夋晥銆�', - // required: false, - // forbid: appType === 'pc' || appType === 'mob', - // options: menulist - // }, - // { - // type: 'select', - // key: 'linkmenu', - // label: '鍏宠仈鑿滃崟', - // initVal: card.linkmenu || '', - // tooltip: '鍙屽嚮鏌辩姸鍥撅紝浼氭墦寮�鍏宠仈鐨勮彍鍗曘��', - // required: false, - // forbid: appType !== 'pc', - // options: menulist - // }, - + forbid: !!appType || isprint + } ] } \ No newline at end of file -- Gitblit v1.8.0