From c8e680b315ce010905f6b0409d3156218abfe056 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 11 三月 2021 19:03:31 +0800 Subject: [PATCH] 2021-03-11 --- src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 40 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 39 insertions(+), 1 deletions(-) diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index 459e98e..29d0d30 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -8,10 +8,25 @@ * @param {object} card // 鍥捐〃瀵硅薄 */ export function getBaseForm (card) { - let menulist = sessionStorage.getItem('fstMenuList') + let isApp = sessionStorage.getItem('appType') === 'pc' + let menulist = null + + if (isApp) { + menulist = sessionStorage.getItem('appMenus') + } else { + menulist = sessionStorage.getItem('fstMenuList') + } + if (menulist) { try { menulist = JSON.parse(menulist) + if (isApp) { + menulist = menulist.map(item => { + item.value = item.MenuID + item.text = item.MenuName + return item + }) + } } catch { menulist = [] } @@ -83,7 +98,30 @@ initVal: card.linkmenu || [], tooltip: '鍦ㄤ娇鐢ㄦ煴褰㈠浘涓旀湭鍚敤鑷畾涔夎缃椂鏈夋晥銆�', required: false, + forbid: isApp, options: menulist + }, + { + type: 'select', + key: 'linkmenu', + label: '鍏宠仈鑿滃崟', + initVal: card.linkmenu || '', + tooltip: '鍙屽嚮楗煎浘锛屼細鎵撳紑鍏宠仈鐨勮彍鍗曘��', + required: false, + forbid: !isApp, + options: menulist + }, + { + type: 'radio', + key: 'open', + label: '鎵撳紑鏂瑰紡', + initVal: card.open || 'blank', + required: false, + forbid: !isApp, + options: [ + { value: 'blank', text: '鏂扮獥鍙�' }, + { value: 'self', text: '褰撳墠绐楀彛' } + ] } ] } -- Gitblit v1.8.0