From 21167ece56edd628e6f6546d1d642947cc3a048f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 12 八月 2024 22:17:33 +0800
Subject: [PATCH] 2024-08-12

---
 src/menu/components/form/simple-form/options.jsx |  112 +++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 91 insertions(+), 21 deletions(-)

diff --git a/src/menu/components/form/simple-form/options.jsx b/src/menu/components/form/simple-form/options.jsx
index 889190a..a1a4dc4 100644
--- a/src/menu/components/form/simple-form/options.jsx
+++ b/src/menu/components/form/simple-form/options.jsx
@@ -1,4 +1,4 @@
-import MenuUtils from '@/utils/utils-custom.js'
+import MenuUtils, { getInterfaces } from '@/utils/utils-custom.js'
 
 /**
  * @description Wrap琛ㄥ崟閰嶇疆淇℃伅
@@ -45,6 +45,19 @@
     }
   }
 
+  let interfaces = getInterfaces()
+  let buttons = []
+
+  if (!wrap.enable || wrap.enable === 'true') {
+    buttons.push('enable')
+  }
+  if (wrap.closeEnable === 'true') {
+    buttons.push('closeEnable')
+  }
+  if (wrap.resetEnable === 'true') {
+    buttons.push('resetEnable')
+  }
+
   const wrapForm = [
     {
       type: 'text',
@@ -82,16 +95,35 @@
       options: [
         {value: 'dynamic', label: '鍔ㄦ��'},
         {value: 'static', label: '闈欐��'},
+        {value: 'public', label: '鍏叡鏁版嵁婧�'},
       ],
       controlFields: [
+        {field: 'empty', values: ['dynamic']},
         {field: 'supModule', values: ['static']},
+        {field: 'publicId', values: ['public']},
       ]
     },
     {
       type: 'select',
+      field: 'publicId',
+      label: '鏁版嵁婧�',
+      initval: wrap.publicId || '',
+      required: true,
+      options: interfaces
+    },
+    {
+      type: 'select',
       field: 'focus',
-      label: '鐒︾偣',
+      label: '鍒濆鐒︾偣',
       initval: wrap.focus || '',
+      required: false,
+      options: fields
+    },
+    {
+      type: 'select',
+      field: 'refocus',
+      label: '鍒锋柊鐒︾偣',
+      initval: wrap.refocus || '',
       required: false,
       options: fields
     },
@@ -134,27 +166,52 @@
       forbid: appType === 'mob'
     },
     {
-      type: 'radio',
-      field: 'enable',
-      label: '鎻愪氦',
-      initval: wrap.enable || 'true',
-      required: false,
-      options: [
-        {value: 'true', label: '鏄剧ず'},
-        {value: 'false', label: '闅愯棌'},
-      ]
-    },
-    {
-      type: 'radio',
-      field: 'closeEnable',
-      label: '鍏抽棴',
-      initval: wrap.closeEnable || 'false',
+      type: 'checkbox',
+      field: 'buttons',
+      label: '鎸夐挳缁�',
+      initval: buttons,
       tooltip: '绠$悊绯荤粺涓細鍏抽棴褰撳墠鏍囩锛屽瓙搴旂敤涓负杩斿洖涓婁竴椤点��',
       required: false,
       options: [
-        {value: 'true', label: '鏄剧ず'},
-        {value: 'false', label: '闅愯棌'},
-      ]
+        {value: 'enable', label: '鎻愪氦'},
+        {value: 'resetEnable', label: '閲嶇疆'},
+        {value: 'closeEnable', label: '鍏抽棴'},
+      ],
+    },
+    // {
+    //   type: 'radio',
+    //   field: 'enable',
+    //   label: '鎻愪氦',
+    //   initval: wrap.enable || 'true',
+    //   required: false,
+    //   options: [
+    //     {value: 'true', label: '鏄剧ず'},
+    //     {value: 'false', label: '闅愯棌'},
+    //   ]
+    // },
+    // {
+    //   type: 'radio',
+    //   field: 'closeEnable',
+    //   label: '鍏抽棴',
+    //   initval: wrap.closeEnable || 'false',
+    //   tooltip: '绠$悊绯荤粺涓細鍏抽棴褰撳墠鏍囩锛屽瓙搴旂敤涓负杩斿洖涓婁竴椤点��',
+    //   required: false,
+    //   options: [
+    //     {value: 'true', label: '鏄剧ず'},
+    //     {value: 'false', label: '闅愯棌'},
+    //   ]
+    // },
+    {
+      type: 'radio',
+      field: 'formStyle',
+      label: '琛ㄥ崟鏍峰紡',
+      initval: wrap.formStyle || '',
+      required: false,
+      options: [
+        {value: '', label: '榛樿'},
+        {value: 'shadow', label: '闃村奖'},
+      ],
+      forbid: appType !== 'mob'
     },
     {
       type: 'radio',
@@ -171,6 +228,19 @@
     },
     {
       type: 'radio',
+      field: 'empty',
+      label: '绌哄�奸殣钘�',
+      initval: wrap.empty || 'show',
+      tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�',
+      required: false,
+      skip: true,
+      options: [
+        {value: 'show', label: '鍚�'},
+        {value: 'hidden', label: '鏄�'},
+      ],
+    },
+    {
+      type: 'radio',
       field: 'permission',
       label: '鏉冮檺楠岃瘉',
       initval: wrap.permission || 'false',
@@ -179,7 +249,7 @@
         {value: 'true', label: '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: !appType
+      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
     },
     {
       type: 'cascader',

--
Gitblit v1.8.0