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 |  127 ++++++++++++++++++++++++++----------------
 1 files changed, 78 insertions(+), 49 deletions(-)

diff --git a/src/menu/components/card/double-data-card/options.jsx b/src/menu/components/card/double-data-card/options.jsx
index 2a7fabe..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 {
@@ -65,22 +60,22 @@
       precision: 0,
       required: true
     },
-    {
-      type: 'radio',
-      field: 'layout',
-      label: '鍗$墖甯冨眬',
-      initval: wrap.layout || 'grid',
-      tooltip: appType === 'mob' ? '寮规�у竷灞�鏃讹紝婊戝姩鍔犺浇鏃犳晥' : '',
-      required: false,
-      options: [
-        {value: 'grid', label: '鏍呮牸甯冨眬'},
-        {value: 'flex', label: '寮规�у竷灞�'},
-      ],
-      controlFields: [
-        {field: 'printHeight', values: ['flex']},
-        {field: 'cardFloat', values: ['grid']},
-      ]
-    },
+    // {
+    //   type: 'radio',
+    //   field: 'layout',
+    //   label: '鍗$墖甯冨眬',
+    //   initval: wrap.layout || 'grid',
+    //   tooltip: appType === 'mob' ? '寮规�у竷灞�鏃讹紝婊戝姩鍔犺浇鏃犳晥' : '',
+    //   required: false,
+    //   options: [
+    //     {value: 'grid', label: '鏍呮牸甯冨眬'},
+    //     {value: 'flex', label: '寮规�у竷灞�'},
+    //   ],
+    //   controlFields: [
+    //     {field: 'printHeight', values: ['flex']},
+    //     {field: 'cardFloat', values: ['grid']},
+    //   ]
+    // },
     {
       type: 'radio',
       field: 'pagestyle',
@@ -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: [
@@ -146,19 +141,6 @@
     },
     {
       type: 'radio',
-      field: 'cardFloat',
-      label: '瀵归綈鏂瑰紡',
-      initval: wrap.cardFloat || 'left',
-      tooltip: '璁剧疆鍗$墖鐨勫榻愭柟寮忋��',
-      required: false,
-      options: [
-        {value: 'left', label: '宸﹀榻�'},
-        {value: 'center', label: '灞呬腑'},
-        {value: 'right', label: '鍙冲榻�'},
-      ],
-    },
-    {
-      type: 'radio',
       field: 'parity',
       label: '濂囧伓鑳屾櫙',
       initval: wrap.parity || 'false',
@@ -168,15 +150,6 @@
         {value: 'false', label: '鏃�'},
         {value: 'true', label: '鏈�'},
       ],
-    },
-    {
-      type: 'number',
-      field: 'printHeight',
-      label: '鎹㈢畻楂樺害',
-      initval: wrap.printHeight || '',
-      tooltip: '褰撳墠鏁版嵁鍗¢珮搴︾浉褰撲簬鍑犳潯鏁版嵁銆�',
-      required: false,
-      forbid: MenuType !== 'billPrint'
     },
     {
       type: 'radio',
@@ -212,16 +185,72 @@
       required: false
     },
     {
+      type: 'number',
+      field: 'minWidth',
+      label: '鏈�灏忓搴�',
+      min: 0,
+      max: 5000,
+      precision: 0,
+      initval: wrap.minWidth,
+      tooltip: '璁剧疆鍗$墖鍖哄煙鐨勬渶灏忓搴︼紝鏄剧ず鍖哄煙灏忎簬姝ゅ�煎皢鍑虹幇妯悜婊氬姩銆�',
+      required: false
+    },
+    {
+      type: 'number',
+      field: 'zHeight',
+      label: '楂樺害',
+      min: 10,
+      max: 5000,
+      precision: 0,
+      initval: wrap.zHeight,
+      tooltip: '鍗$墖鍖哄煙楂樺害锛屽唴瀹硅秴鍑烘椂绾靛悜婊氬姩銆傛敞锛氬皬浜庣瓑浜�100鏃朵负楂樺害鐨勭櫨鍒嗘瘮锛岀涓�涓墿灞曞睘鎬у崱灏嗗畾浣嶅湪椤堕儴銆�',
+      required: false,
+      forbid: appType === 'mob'
+    },
+    {
+      type: 'color',
+      field: 'zBColor',
+      label: '杈规棰滆壊',
+      initval: wrap.zBColor || 'transparent',
+      tooltip: '鍗$墖鍖哄煙璁剧疆楂樺害鎴栨渶灏忓搴︽椂锛屾粴鍔ㄥ尯鍩熻竟妗嗙殑棰滆壊銆�',
+      required: false
+    },
+    {
       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',
@@ -230,7 +259,7 @@
       initval: wrap.blacklist || [],
       required: false,
       options: roleList,
-      forbid: !!appType
+      forbid: !!appType || isprint
     },
     {
       type: 'text',

--
Gitblit v1.8.0