From 0eb129a9beddbb86ae74d7106a8e60823206b8d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 14 十二月 2023 11:29:15 +0800 Subject: [PATCH] 2023-12-14 --- src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx | 101 +++++++++++++++++++++++++++++++++----------------- 1 files changed, 67 insertions(+), 34 deletions(-) diff --git a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx index 195f5b0..d6bb257 100644 --- a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx @@ -1,15 +1,13 @@ -// import zhCN from '@/locales/zh-CN/model.js' -// import enUS from '@/locales/en-US/model.js' - -// const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - /** * @description 鑾峰彇鍥捐〃瑙嗗浘閰嶇疆琛ㄥ崟 * @param {object} card // 鍥捐〃瀵硅薄 */ export function getBaseForm (card) { - let isApp = sessionStorage.getItem('appType') === 'pc' + let appType = sessionStorage.getItem('appType') + let isApp = appType === 'pc' || appType === 'mob' let menulist = null + let isprint = sessionStorage.getItem('MenuType') === 'billPrint' + let ispop = sessionStorage.getItem('editMenuType') === 'popview' if (isApp) { menulist = sessionStorage.getItem('appMenus') @@ -27,7 +25,7 @@ return item }) } - } catch { + } catch (e) { menulist = [] } } else { @@ -38,7 +36,7 @@ if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { @@ -73,23 +71,13 @@ required: true }, { - type: 'number', + type: 'styleInput', key: 'height', - label: '楂樺害', + label: '鍥捐〃楂樺害', initVal: card.height, - min: 100, - max: 1000, - decimal: 0, - required: true - }, - { - type: 'select', - key: 'blacklist', - label: '榛戝悕鍗�', - initVal: card.blacklist || [], - multi: true, - required: false, - options: roleList + tooltip: '鍥捐〃缁樺浘鍖哄煙鐨勯珮搴︼紝涓嶅寘鎷爣棰樺強鍐呭杈硅窛銆�', + required: true, + options: ['px', 'vh', 'vw'] }, { type: 'cascader', @@ -122,6 +110,40 @@ { value: 'blank', text: '鏂扮獥鍙�' }, { value: 'self', text: '褰撳墠绐楀彛' } ] + }, + { + type: 'radio', + key: 'permission', + label: '鏉冮檺楠岃瘉', + initVal: card.permission || 'false', + required: false, + options: [ + {value: 'true', text: '鍚敤'}, + {value: 'false', text: '绂佺敤'}, + ], + forbid: !appType || ispop || isprint + }, + { + type: 'radio', + key: 'cacheLocal', + label: '鏈湴缂撳瓨', + initVal: card.cacheLocal || 'true', + required: false, + options: [ + {value: 'true', text: '缁ф壙鑿滃崟'}, + {value: 'false', text: '绂佺敤'}, + ], + forbid: ispop || isprint + }, + { + type: 'select', + key: 'blacklist', + label: '榛戝悕鍗�', + initVal: card.blacklist || [], + multi: true, + required: false, + options: roleList, + forbid: !!appType || isprint } ] } @@ -131,6 +153,7 @@ * @param {Array} columns // 鏄剧ず鍒� */ export function getOptionForm (card, columns) { + let appType = sessionStorage.getItem('appType') let xfields = columns.filter(item => /^Nvarchar/ig.test(item.datatype)) let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype)) @@ -251,7 +274,7 @@ { type: 'radio', key: 'label', - label: '鏍囩', + label: '鏍囨敞', initVal: card.label || 'false', required: false, options: [{ @@ -269,20 +292,29 @@ }], }, { type: 'radio', - key: 'repeat', - label: '閲嶅鏁版嵁', - initVal: card.repeat || 'unrepeat', + key: 'download', + label: '瀵煎嚭鍥剧墖', + initVal: card.download || 'forbid', required: false, + forbid: appType === 'mob', options: [{ - value: 'unrepeat', - text: '鍘婚噸' + value: 'forbid', + text: '绂佺敤' }, { - value: 'average', - text: '骞冲潎' - }, { - value: 'cumsum', - text: '绱姞' + value: 'enable', + text: '鍚敤' }] + }, { + type: 'radio', + key: 'empty', + label: '绌哄�奸殣钘�', + initVal: card.empty || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', + required: false, + options: [ + {value: 'show', text: '鍚�'}, + {value: 'hidden', text: '鏄�'}, + ], }, { type: 'number', key: 'splitLine', @@ -314,6 +346,7 @@ initVal: card.interaction || [], multi: true, required: false, + forbid: appType === 'mob', options: [ { value: 'element-active', label: '鍏冪礌鑱氱劍' }, { value: 'element-selected', label: '鍏冪礌閫変腑锛堝閫夛級' }, -- Gitblit v1.8.0