From c6f7462d80ab626174329b69045fb7e5704c0683 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 05 六月 2021 22:44:17 +0800 Subject: [PATCH] 2021-06-05 --- src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 139 +++++++++++++++++++++++++++------------------- 1 files changed, 81 insertions(+), 58 deletions(-) diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index ae7e6fd..837e853 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -8,34 +8,34 @@ * @param {object} card // 鍥捐〃瀵硅薄 */ export function getBaseForm (card) { - let appType = sessionStorage.getItem('appType') - let menulist = null + // let appType = sessionStorage.getItem('appType') + // let menulist = null - if (appType === 'pc') { - menulist = sessionStorage.getItem('appMenus') - if (Array.isArray(card.linkmenu)) { - card.linkmenu = '' - } - } else { - menulist = sessionStorage.getItem('fstMenuList') - } + // if (appType === 'pc') { + // menulist = sessionStorage.getItem('appMenus') + // if (Array.isArray(card.linkmenu)) { + // card.linkmenu = '' + // } + // } else { + // menulist = sessionStorage.getItem('fstMenuList') + // } - if (menulist) { - try { - menulist = JSON.parse(menulist) - if (appType === 'pc') { - menulist = menulist.map(item => { - item.value = item.MenuID - item.text = item.MenuName - return item - }) - } - } catch { - menulist = [] - } - } else { - menulist = [] - } + // if (menulist) { + // try { + // menulist = JSON.parse(menulist) + // if (appType === 'pc') { + // menulist = menulist.map(item => { + // item.value = item.MenuID + // item.text = item.MenuName + // return item + // }) + // } + // } catch { + // menulist = [] + // } + // } else { + // menulist = [] + // } let roleList = sessionStorage.getItem('sysRoles') if (roleList) { @@ -94,38 +94,38 @@ required: false, options: roleList }, - { - 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 - }, - { - type: 'radio', - key: 'open', - label: '鎵撳紑鏂瑰紡', - initVal: card.open || 'blank', - required: false, - forbid: appType !== 'pc', - options: [ - { value: 'blank', text: '鏂扮獥鍙�' }, - { value: 'self', text: '褰撳墠绐楀彛' } - ] - } + // { + // 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 + // }, + // { + // type: 'radio', + // key: 'open', + // label: '鎵撳紑鏂瑰紡', + // initVal: card.open || 'blank', + // required: false, + // forbid: appType !== 'pc', + // options: [ + // { value: 'blank', text: '鏂扮獥鍙�' }, + // { value: 'self', text: '褰撳墠绐楀彛' } + // ] + // } ] } @@ -331,6 +331,20 @@ }] }, { type: 'radio', + key: 'area', + label: '闈㈢Н鍥�', + initVal: card.area || 'false', + required: false, + forbid: ['bar'].includes(card.chartType), + options: [{ + value: 'true', + text: '鏄剧ず' + }, { + value: 'false', + text: '涓嶆樉绀�' + }] + }, { + type: 'radio', key: 'repeat', label: '閲嶅鏁版嵁', initVal: card.repeat || 'unrepeat', @@ -388,6 +402,15 @@ tooltip: '鍧愭爣杞存彁绀烘枃瀛楀強绀轰緥鐨勯鑹层��', required: false }, { + type: 'color', + key: 'selectColor', + label: '閫変腑棰滆壊', + initVal: card.selectColor || '', + tooltip: '閫変腑鏌卞舰鍥剧殑棰滆壊锛屽湪浜や簰鏁堟灉銆婂厓绱犻�変腑锛堝閫夛級銆嬪拰銆婂厓绱犻�変腑锛堝崟閫夛級銆嬩腑鏈夋晥锛岃嚜瀹氫箟璁剧疆涓棤鏁堛��', + forbid: !['bar'].includes(card.chartType), + allowClear: true, + required: false + }, { type: 'select', key: 'interaction', label: '浜や簰鏁堟灉', -- Gitblit v1.8.0