From 47b9baefdeeb41f50a9b7abc1abcf5e90931a89d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 31 八月 2023 11:17:48 +0800 Subject: [PATCH] 2023-08-31 --- src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx | 88 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 75 insertions(+), 13 deletions(-) diff --git a/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx index 222db5a..267a56b 100644 --- a/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx @@ -1,8 +1,3 @@ -// 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 // 鍥捐〃瀵硅薄 @@ -10,6 +5,8 @@ export function getBaseForm (card) { let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') + let isprint = sessionStorage.getItem('MenuType') === 'billPrint' + let ispop = sessionStorage.getItem('editMenuType') === 'popview' if (roleList) { try { roleList = JSON.parse(roleList) @@ -48,14 +45,37 @@ required: true }, { - type: 'number', + type: 'styleInput', key: 'height', - label: '楂樺害', + label: '鍥捐〃楂樺害', initVal: card.height, - min: 100, - max: 1000, - decimal: 0, - required: true + tooltip: '鍥捐〃缁樺浘鍖哄煙鐨勯珮搴︼紝涓嶅寘鎷爣棰樺強鍐呭杈硅窛銆�', + required: true, + options: ['px', 'vh', 'vw'] + }, + { + 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', @@ -65,7 +85,7 @@ multi: true, required: false, options: roleList, - forbid: !!appType + forbid: !!appType || isprint } ] } @@ -75,6 +95,7 @@ * @param {Array} columns // 鏄剧ず鍒� */ export function getOptionForm (card, columns) { + let appType = sessionStorage.getItem('appType') let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype)) return [ @@ -128,7 +149,33 @@ value: 'false', text: '涓嶄娇鐢�' }] + }, { + type: 'radio', + key: 'download', + label: '瀵煎嚭鍥剧墖', + initVal: card.download || 'forbid', + required: false, + forbid: appType === 'mob', + options: [{ + value: 'forbid', + text: '绂佺敤' + }, { + value: 'enable', + text: '鍚敤' + }] }, + // { + // type: 'radio', + // key: 'empty', + // label: '绌哄�奸殣钘�', + // initVal: card.empty || 'show', + // tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', + // required: false, + // options: [ + // {value: 'show', text: '鍚�'}, + // {value: 'hidden', text: '鏄�'}, + // ], + // }, { type: 'color', key: 'tickColor', @@ -152,6 +199,7 @@ * @param {Array} columns // 鏄剧ず鍒� */ export function getRadioOptionForm (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)) @@ -199,7 +247,7 @@ label: '瀛椾綋澶у皬', initVal: card.fontSize || 28, min: 12, - max: 200, + max: 300, decimal: 0, required: true }, @@ -216,6 +264,20 @@ value: 'false', text: '涓嶄娇鐢�' }] + }, { + type: 'radio', + key: 'download', + label: '瀵煎嚭鍥剧墖', + initVal: card.download || 'forbid', + required: false, + forbid: appType === 'mob', + options: [{ + value: 'forbid', + text: '绂佺敤' + }, { + value: 'enable', + text: '鍚敤' + }] }, { type: 'color', -- Gitblit v1.8.0