From 49f09cc6f8ff8c30a75ed1a9d6f510b69b73962a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 12 十二月 2023 21:05:37 +0800
Subject: [PATCH] 2023-12-12

---
 src/menu/components/card/balcony/options.jsx |   45 +++++++++++++++++++++++++++++----------------
 1 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/src/menu/components/card/balcony/options.jsx b/src/menu/components/card/balcony/options.jsx
index 81b6603..cfd50f8 100644
--- a/src/menu/components/card/balcony/options.jsx
+++ b/src/menu/components/card/balcony/options.jsx
@@ -6,7 +6,8 @@
  */
 export default function (wrap, buttons, columns) {
   let menu = window.GLOB.customMenu
-  let MenuType = menu.parentId === 'BillPrintTemp' ? 'billPrint' : ''
+  let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
+  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
 
   let modules = MenuUtils.getLinkModules(menu.components) || []
   let supmodules = MenuUtils.getSupModules(menu.components, '', menu.interfaces)
@@ -33,10 +34,6 @@
     }
   } else {
     roleList = []
-  }
-
-  if (wrap.datatype === 'public' && MenuType === 'billPrint') {
-    wrap.datatype = 'static'
   }
 
   const balconyWrapForm = [
@@ -69,7 +66,7 @@
       options: [
         {value: 'dynamic', label: '鍔ㄦ��'},
         {value: 'static', label: '闈欐��'},
-        {value: 'public', label: '鍏叡鏁版嵁婧�', disabled: MenuType === 'billPrint'},
+        {value: 'public', label: '鍏叡鏁版嵁婧�'},
       ],
       controlFields: [
         {field: 'empty', values: ['dynamic']},
@@ -128,7 +125,7 @@
         {field: 'syncModule', values: ['sync']},
         {field: 'checkAll', values: ['sync']},
       ],
-      forbid: MenuType === 'billPrint'
+      forbid: isprint
     },
     {
       type: 'cascader',
@@ -137,7 +134,8 @@
       initval: wrap.supModule || [],
       // tooltip: '褰撲笂绾х粍浠朵笉瀛樺湪鎴栨病鏈夋潈闄愭椂锛屽綋鍓嶇粍浠朵笉鏄剧ず銆�',
       required: true,
-      options: supmodules
+      options: supmodules,
+      forbid: isprint
     },
     {
       type: 'radio',
@@ -149,7 +147,8 @@
       options: [
         {value: 'hidden', label: '閫夎'},
         {value: 'show', label: '濮嬬粓'},
-      ]
+      ],
+      forbid: isprint
     },
     {
       type: 'cascader',
@@ -158,7 +157,8 @@
       initval: wrap.syncModule || '',
       tooltip: '褰撳悓姝ョ粍浠朵笉瀛樺湪鎴栨病鏈夋潈闄愭椂锛屽綋鍓嶇粍浠朵笉鏄剧ず銆�',
       required: true,
-      options: modules
+      options: modules,
+      forbid: isprint
     },
     {
       type: 'radio',
@@ -170,7 +170,8 @@
       options: [
         {value: 'hidden', label: '闅愯棌'},
         {value: 'show', label: '鏄剧ず'},
-      ]
+      ],
+      forbid: isprint
     },
     {
       type: 'radio',
@@ -205,7 +206,7 @@
         {value: 'content', label: '娴姩鍗�'},
         {value: 'headerOrfooter', label: '椤电湁/椤佃剼'},
       ],
-      forbid: MenuType !== 'billPrint'
+      forbid: !isprint
     },
     {
       type: 'radio',
@@ -214,10 +215,22 @@
       initval: wrap.permission || (!appType ? 'true' : 'false'),
       required: false,
       options: [
-        {value: 'true', label: '鍚敤'},
+        {value: 'true', label: !appType ? '缁ф壙鑿滃崟' : '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: sessionStorage.getItem('editMenuType') === 'popview'
+      forbid: ispop || isprint
+    },
+    {
+      type: 'radio',
+      field: 'cacheLocal',
+      label: '鏈湴缂撳瓨',
+      initval: wrap.cacheLocal || 'true',
+      required: false,
+      options: [
+        {value: 'true', label: '缁ф壙鑿滃崟'},
+        {value: 'false', label: '绂佺敤'},
+      ],
+      forbid: ispop || isprint
     },
     {
       type: 'select',
@@ -226,7 +239,7 @@
       initval: wrap.linkbtn || '',
       required: false,
       options: buttons,
-      forbid: MenuType === 'billPrint'
+      forbid: isprint
     },
     {
       type: 'multiselect',
@@ -235,7 +248,7 @@
       initval: wrap.blacklist || [],
       required: false,
       options: roleList,
-      forbid: !!appType
+      forbid: !!appType || isprint
     },
   ]
 

--
Gitblit v1.8.0