From e543372cc70a19ff2630c79d8421c2c593e54e5f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 02 六月 2021 17:15:21 +0800 Subject: [PATCH] 2021-06-02 --- src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 88 +++++++++++++++++++++++-------------------- 1 files changed, 47 insertions(+), 41 deletions(-) diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index 8a0c978..817a0a5 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -8,11 +8,14 @@ * @param {object} card // 鍥捐〃瀵硅薄 */ export function getBaseForm (card) { - let isApp = sessionStorage.getItem('appType') === 'pc' + let appType = sessionStorage.getItem('appType') let menulist = null - if (isApp) { + if (appType === 'pc') { menulist = sessionStorage.getItem('appMenus') + if (Array.isArray(card.linkmenu)) { + card.linkmenu = '' + } } else { menulist = sessionStorage.getItem('fstMenuList') } @@ -20,7 +23,7 @@ if (menulist) { try { menulist = JSON.parse(menulist) - if (isApp) { + if (appType === 'pc') { menulist = menulist.map(item => { item.value = item.MenuID item.text = item.MenuName @@ -98,7 +101,7 @@ initVal: card.linkmenu || [], tooltip: '鍦ㄤ娇鐢ㄦ煴褰㈠浘涓旀湭鍚敤鑷畾涔夎缃椂鏈夋晥銆�', required: false, - forbid: isApp, + forbid: appType === 'pc' || appType === 'mob', options: menulist }, { @@ -106,9 +109,9 @@ key: 'linkmenu', label: '鍏宠仈鑿滃崟', initVal: card.linkmenu || '', - tooltip: '鍙屽嚮楗煎浘锛屼細鎵撳紑鍏宠仈鐨勮彍鍗曘��', + tooltip: '鍙屽嚮鏌辩姸鍥撅紝浼氭墦寮�鍏宠仈鐨勮彍鍗曘��', required: false, - forbid: !isApp, + forbid: appType !== 'pc', options: menulist }, { @@ -117,7 +120,7 @@ label: '鎵撳紑鏂瑰紡', initVal: card.open || 'blank', required: false, - forbid: !isApp, + forbid: appType !== 'pc', options: [ { value: 'blank', text: '鏂扮獥鍙�' }, { value: 'self', text: '褰撳墠绐楀彛' } @@ -165,22 +168,20 @@ key: 'datatype', label: '鏁版嵁绫诲瀷', initVal: card.datatype || 'query', - tooltip: '缁熻鍥捐〃閫傜敤浜庤〃鏍间笉鍒嗛〉锛屼笖鏁版嵁闇�瑕佽浆鎹�', + tooltip: '缁熻鍥捐〃閫傜敤浜庡睍绀烘暟鎹被鍨嬩负鍔ㄦ�佸�笺��', required: false, options: [ { value: 'query', text: Formdict['header.form.query'] }, { value: 'statistics', text: Formdict['header.form.statistics'] } ] - }, - { + }, { type: 'select', key: 'Xaxis', label: 'X-杞�', initVal: card.Xaxis || '', required: true, options: xfields - }, - { + }, { type: 'select', key: 'InfoType', label: '绫诲瀷', @@ -188,8 +189,7 @@ hidden: card.datatype !== 'statistics', required: true, options: xfields - }, - { + }, { type: 'select', key: 'InfoValue', label: '鍊�', @@ -197,8 +197,7 @@ hidden: card.datatype !== 'statistics', required: true, options: yfields - }, - { + }, { type: 'select', key: 'legend', label: '鍥句緥浣嶇疆', @@ -219,8 +218,7 @@ { field: 'left-bottom', label: '宸︿笅' }, { field: 'hidden', label: '闅愯棌' } ] - }, - { + }, { type: 'select', key: 'Yaxis', label: 'Y-杞�', @@ -229,16 +227,14 @@ hidden: card.datatype === 'statistics', required: true, options: yfields - }, - { + }, { type: 'select', key: 'shape', label: '褰㈢姸', initVal: card.shape || (shapes[0] && shapes[0].field), required: false, options: shapes - }, - { + }, { type: 'radio', key: 'tooltip', label: '鎮诞鎻愮ず', @@ -251,8 +247,7 @@ value: 'false', text: '闅愯棌' }] - }, - { + }, { type: 'radio', key: 'point', label: '鐐瑰浘', @@ -266,8 +261,7 @@ value: 'false', text: '闅愯棌' }] - }, - { + }, { type: 'radio', key: 'transpose', label: '鍙樻崲', @@ -281,8 +275,7 @@ value: 'false', text: Formdict['model.false'] }] - }, - { + }, { type: 'radio', key: 'show', label: '鏍煎紡鍖�', @@ -295,8 +288,7 @@ value: 'percent', text: '鐧惧垎姣�' }] - }, - { + }, { type: 'radio', key: 'label', label: '鏍囨敞鍊�', @@ -309,6 +301,20 @@ value: 'false', text: '闅愯棌' }] + // }, { + // type: 'radio', + // key: 'offset', + // label: '鏍囨敞浣嶇疆', + // initVal: card.offset || 'outer', + // required: false, + // options: [{ + // value: 'outer', + // text: '澶栭儴' + // }, { + // value: 'inner', + // text: '鍐呴儴' + // }], + // forbid: card.chartType !== 'bar' }, { type: 'radio', key: 'adjust', @@ -354,17 +360,6 @@ }] }, { type: 'number', - key: 'InfoDefNumber', - label: '灞曠ず鏁�', - tooltip: '榛樿鏄剧ず绫诲瀷鏁伴噺', - min: 1, - max: 50, - decimal: 0, - initVal: card.InfoDefNumber || 5, - hidden: card.datatype !== 'statistics', - required: true - }, { - type: 'number', key: 'barSize', label: '鏌卞舰瀹藉害', tooltip: '绌哄�兼椂锛屽搴﹁嚜閫傚簲銆�', @@ -375,6 +370,17 @@ forbid: !['bar'].includes(card.chartType), required: false }, { + type: 'number', + key: 'barRadius', + label: '鏌卞舰鍦嗚', + tooltip: '鏌卞舰鍥句笂绔渾瑙掋��', + min: 0, + max: 200, + decimal: 0, + initVal: card.barRadius || 0, + forbid: !['bar'].includes(card.chartType), + required: false + }, { type: 'color', key: 'color', label: '鑹茬郴', -- Gitblit v1.8.0