From 26d0fa42ea8c63a87e8ef93d0915f75f46fb1f9c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 24 三月 2022 11:09:53 +0800 Subject: [PATCH] 2022-03-24 --- src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 57 ++++++++++++++++++++++----------------------------------- 1 files changed, 22 insertions(+), 35 deletions(-) diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index f6a8420..05158b6 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -8,35 +8,7 @@ * @param {object} card // 鍥捐〃瀵硅薄 */ export function getBaseForm (card) { - // 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 (menulist) { - // try { - // menulist = JSON.parse(menulist) - // if (appType === 'pc') { - // menulist = menulist.map(item => { - // item.value = item.MenuID - // item.text = item.MenuName - // return item - // }) - // } - // } catch (e) { - // menulist = [] - // } - // } else { - // menulist = [] - // } - + let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') if (roleList) { try { @@ -92,7 +64,8 @@ initVal: card.blacklist || [], multi: true, required: false, - options: roleList + options: roleList, + forbid: !!appType }, // { // type: 'cascader', @@ -194,8 +167,8 @@ tooltip: '缁熻鍥捐〃閫傜敤浜庡睍绀烘暟鎹被鍨嬩负鍔ㄦ�佸�笺��', required: false, options: [ - { value: 'query', text: Formdict['header.form.query'] }, - { value: 'statistics', text: Formdict['header.form.statistics'] } + { value: 'query', text: '鏌ヨ' }, + { value: 'statistics', text: '缁熻' } ] }, { type: 'select', @@ -301,12 +274,12 @@ }, { type: 'radio', key: 'show', - label: '鏍煎紡鍖�', + label: '鏄剧ず', initVal: card.show || 'value', required: false, options: [{ value: 'value', - text: '鏃�' + text: '鏁板��' }, { value: 'percent', text: '鐧惧垎姣�' @@ -432,6 +405,20 @@ text: '闅愯棌' }] }, { + type: 'radio', + key: 'download', + label: '瀵煎嚭鍥剧墖', + initVal: card.download || 'forbid', + required: false, + forbid: appType === 'mob', + options: [{ + value: 'forbid', + text: '绂佺敤' + }, { + value: 'enable', + text: '鍚敤' + }] + }, { type: 'number', key: 'barSize', label: '鏌卞舰瀹藉害', @@ -487,7 +474,7 @@ key: 'selectColor', label: '閫変腑棰滆壊', initVal: card.selectColor || '', - tooltip: '閫変腑鏌卞舰鍥剧殑棰滆壊锛屽湪浜や簰鏁堟灉銆婂厓绱犻�変腑锛堝閫夛級銆嬪拰銆婂厓绱犻�変腑锛堝崟閫夛級銆嬩腑鏈夋晥锛岃嚜瀹氫箟璁剧疆涓棤鏁堛��', + tooltip: '閫変腑鏌卞舰鍥剧殑棰滆壊锛屽湪浜や簰鏁堟灉銆婂厓绱犻�変腑锛堝閫夛級銆嬪拰銆婂厓绱犻�変腑锛堝崟閫夛級銆嬩腑鏈夋晥锛屽惎鐢ㄨ嚜瀹氫箟璁剧疆鏃舵棤鏁堛��', forbid: !['bar'].includes(card.chartType), allowClear: true, required: false -- Gitblit v1.8.0