From d1cd5af5adb53e91efdd278328e1b6f8ad834fb5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 06 二月 2025 21:11:56 +0800
Subject: [PATCH] Merge branch 'positec' into dms

---
 src/menu/components/form/simple-form/options.jsx |  109 +++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 95 insertions(+), 14 deletions(-)

diff --git a/src/menu/components/form/simple-form/options.jsx b/src/menu/components/form/simple-form/options.jsx
index c9182cf..df74b82 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琛ㄥ崟閰嶇疆淇℃伅
@@ -22,14 +22,14 @@
 
   if (appType === 'mob') {
     config.subcards[0].fields.forEach(f => {
-      if (f.field && ['select', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
-        fields.push(f)
+      if (f.field && ['select', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
+        fields.push({...f, label: `${f.label}锛�${f.field}锛塦})
       }
     })
   } else {
     config.subcards[0].fields.forEach(f => {
-      if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
-        fields.push(f)
+      if (f.field && ['select', 'link', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
+        fields.push({...f, label: `${f.label}锛�${f.field}锛塦})
       }
     })
   }
@@ -43,6 +43,19 @@
     if (!has) {
       wrap.supModule = ''
     }
+  }
+
+  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 = [
@@ -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,15 +166,52 @@
       forbid: appType === 'mob'
     },
     {
-      type: 'radio',
-      field: 'subEnable',
-      label: '鎻愪氦',
-      initval: wrap.enable || 'true',
+      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',
@@ -159,6 +228,18 @@
     },
     {
       type: 'radio',
+      field: 'empty',
+      label: '绌哄�奸殣钘�',
+      initval: wrap.empty || 'show',
+      tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�',
+      required: false,
+      options: [
+        {value: 'show', label: '鍚�'},
+        {value: 'hidden', label: '鏄�'},
+      ],
+    },
+    {
+      type: 'radio',
       field: 'permission',
       label: '鏉冮檺楠岃瘉',
       initval: wrap.permission || 'false',
@@ -167,7 +248,7 @@
         {value: 'true', label: '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: !appType
+      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
     },
     {
       type: 'cascader',

--
Gitblit v1.8.0