From 4b467effbc0e3a9199146573c0ceedf404bd07c5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 07 九月 2023 17:16:01 +0800
Subject: [PATCH] 2023-09-07

---
 src/menu/components/card/double-data-card/options.jsx |   51 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/src/menu/components/card/double-data-card/options.jsx b/src/menu/components/card/double-data-card/options.jsx
index 3ff8529..dac4c9e 100644
--- a/src/menu/components/card/double-data-card/options.jsx
+++ b/src/menu/components/card/double-data-card/options.jsx
@@ -3,15 +3,10 @@
  */
 export default function (wrap, columns = [], setting) {
   let appType = sessionStorage.getItem('appType')
-  // let MenuType = ''
-  // let menu = window.GLOB.customMenu
   let laypage = setting && setting.laypage !== 'false'
-
-  // if (menu.parentId === 'BillPrintTemp') {
-  //   MenuType = 'billPrint'
-  // }
-
   let roleList = sessionStorage.getItem('sysRoles')
+  let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
+  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
 
   if (roleList) {
     try {
@@ -91,7 +86,7 @@
       disabled: !laypage,
       options: [
         {value: 'page', label: '椤电爜'},
-        {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob' || sessionStorage.getItem('editMenuType') === 'popview'},
+        {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob' || ispop},
         {value: 'more', label: '鏌ョ湅鏇村'},
       ],
       controlFields: [
@@ -156,15 +151,6 @@
         {value: 'true', label: '鏈�'},
       ],
     },
-    // {
-    //   type: 'number',
-    //   field: 'printHeight',
-    //   label: '鎹㈢畻楂樺害',
-    //   initval: wrap.printHeight || '',
-    //   tooltip: '褰撳墠鏁版嵁鍗¢珮搴︾浉褰撲簬鍑犳潯鏁版嵁銆�',
-    //   required: false,
-    //   forbid: MenuType !== 'billPrint'
-    // },
     {
       type: 'radio',
       field: 'empty',
@@ -233,13 +219,38 @@
       type: 'radio',
       field: 'permission',
       label: '鏉冮檺楠岃瘉',
-      initval: wrap.permission || 'false',
+      initval: wrap.permission || (!appType ? 'true' : 'false'),
+      required: false,
+      options: [
+        {value: 'true', label: !appType ? '缁ф壙鑿滃崟' : '鍚敤'},
+        {value: 'false', label: '绂佺敤'},
+      ],
+      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: 'radio',
+      field: 'cacheSearch',
+      label: '鎼滅储缂撳瓨',
+      initval: wrap.cacheSearch || 'false',
+      tooltip: '鍚敤鎼滅储鏉′欢缂撳瓨鍚庯紝鍦ㄨ彍鍗曞埛鏂版椂鎼滅储鏉′欢涓嶅彉銆�',
       required: false,
       options: [
         {value: 'true', label: '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
+      forbid: !!appType || isprint
     },
     {
       type: 'multiselect',
@@ -248,7 +259,7 @@
       initval: wrap.blacklist || [],
       required: false,
       options: roleList,
-      forbid: !!appType
+      forbid: !!appType || isprint
     },
     {
       type: 'text',

--
Gitblit v1.8.0