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/card/data-card/options.jsx | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index d113003..519af8e 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -5,7 +5,8 @@ */ export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting, buttons = []) { let appType = sessionStorage.getItem('appType') - let MenuType = sessionStorage.getItem('MenuType') || 'custom' + let isprint = sessionStorage.getItem('MenuType') === 'billPrint' + let ispop = sessionStorage.getItem('editMenuType') === 'popview' let menu = window.GLOB.customMenu let laypage = setting && setting.laypage !== 'false' let interfaces = [] @@ -180,7 +181,7 @@ options: [ {value: 'page', label: '椤电爜'}, {value: 'switch', label: '宸﹀彸鍒囨崲', forbid: appType === 'mob' || subtype === 'tablecard'}, - {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob' || sessionStorage.getItem('editMenuType') === 'popview'}, + {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob' || ispop}, {value: 'more', label: '鏌ョ湅鏇村'}, ], controlFields: [ @@ -329,7 +330,7 @@ controlFields: [ {field: 'printHeight', values: ['content']}, ], - forbid: subtype !== 'propcard' || MenuType !== 'billPrint' + forbid: subtype !== 'propcard' || !isprint }, { type: 'number', @@ -338,7 +339,7 @@ initval: wrap.printHeight || '', tooltip: subtype !== 'propcard' ? '褰撳墠鏁版嵁鍗¢珮搴︾浉褰撲簬鍑犳潯鏁版嵁銆�' : '褰撳墠灞炴�у崱楂樺害鐩稿綋浜庡嚑鏉℃暟鎹��', required: false, - forbid: subtype === 'tablecard' || MenuType !== 'billPrint' + forbid: subtype === 'tablecard' || !isprint }, { type: 'select', @@ -487,7 +488,7 @@ {value: 'true', label: '楠岃瘉'}, {value: 'false', label: '蹇界暐'}, ], - forbid: subtype !== 'datacard' + forbid: subtype !== 'datacard' || isprint }, { type: 'cascader', @@ -497,7 +498,7 @@ required: false, options: modules, allowClear: true, - forbid: subtype !== 'propcard' + forbid: subtype !== 'propcard' || isprint }, { type: 'select', @@ -529,7 +530,7 @@ initval: wrap.supType || 'single', tooltip: '涓婄骇缁勪欢涓哄崟涓�缁勪欢鎴栧涓粍浠躲��', required: false, - forbid: subtype !== 'datacard' || appType === 'mob', + forbid: subtype !== 'datacard' || appType === 'mob' || isprint, options: [ {value: 'single', label: '鍗曠粍浠�'}, {value: 'multi', label: '澶氱粍浠�'}, @@ -548,7 +549,7 @@ {value: 'true', label: !appType ? '缁ф壙鑿滃崟' : '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: sessionStorage.getItem('editMenuType') === 'popview' + forbid: ispop || isprint }, { type: 'radio', @@ -560,7 +561,7 @@ {value: 'true', label: '缁ф壙鑿滃崟'}, {value: 'false', label: '绂佺敤'}, ], - forbid: sessionStorage.getItem('editMenuType') === 'popview' + forbid: ispop || isprint }, { type: 'multiselect', @@ -569,7 +570,7 @@ initval: wrap.blacklist || [], required: false, options: roleList, - forbid: !!appType + forbid: !!appType || isprint }, { type: 'text', @@ -586,7 +587,7 @@ label: '涓婄骇缁勪欢', initval: supNodes, required: true, - forbid: subtype !== 'datacard' || appType === 'mob', + forbid: subtype !== 'datacard' || appType === 'mob' || isprint, span: 24, columns: [ { -- Gitblit v1.8.0