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/carousel/data-card/options.jsx |   95 +++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 87 insertions(+), 8 deletions(-)

diff --git a/src/menu/components/carousel/data-card/options.jsx b/src/menu/components/carousel/data-card/options.jsx
index 36441fe..cf5156a 100644
--- a/src/menu/components/carousel/data-card/options.jsx
+++ b/src/menu/components/carousel/data-card/options.jsx
@@ -4,6 +4,7 @@
 export default function (wrap, subtype) {
   let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
+  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
 
   if (roleList) {
     try {
@@ -16,6 +17,13 @@
   }
 
   const cardWrapForm = [
+    {
+      type: 'text',
+      field: 'title',
+      label: '鏍囬',
+      initval: wrap.title || '',
+      required: false
+    },
     {
       type: 'text',
       field: 'name',
@@ -46,10 +54,67 @@
         {value: 'dynamic', label: '鍔ㄦ��'},
         {value: 'static', label: '闈欐��'},
       ],
-      controlFields: [
+      controlFields: subtype === 'propcard' ? [
         {field: 'empty', values: ['dynamic']},
-      ],
+      ] : null,
       forbid: subtype !== 'propcard'
+    },
+    {
+      type: 'radio',
+      field: 'display',
+      label: '鏄剧ず妯″紡',
+      initval: wrap.display || 'normal',
+      required: false,
+      options: [
+        {value: 'normal', label: '姝e父'},
+        {value: 'modal', label: '寮圭獥'},
+      ],
+      controlFields: [
+        {field: 'modalWidth', values: ['modal']},
+        {field: 'modalContent', values: ['modal']},
+        {field: 'code', values: ['modal']},
+      ]
+    },
+    {
+      type: 'radio',
+      field: 'modalContent',
+      label: '寮圭獥鍐呭',
+      initval: wrap.modalContent || 'message',
+      tooltip: '浣跨敤绯荤粺鏇存柊鏃讹紝濡傛灉杩斿洖鍊肩殑ErrCode涓�-1锛屽彧浼氬仛绯荤粺閰嶇疆鏇存柊涓嶄細鏄剧ず寮圭獥銆傛敞锛氭暟鎹簮浣跨敤鍚屾鏌ヨ鏃舵棤鏁堛��',
+      required: false,
+      options: [
+        {value: 'message', label: '娑堟伅鎻愰啋'},
+        {value: 'update', label: '绯荤粺鏇存柊'},
+      ]
+    },
+    {
+      type: 'styleInput',
+      field: 'height',
+      label: '缁勪欢楂樺害',
+      initval: wrap.height || '',
+      required: true,
+      options: ['px', 'vh']
+    },
+    {
+      type: 'styleInput',
+      field: 'modalWidth',
+      label: '寮圭獥瀹藉害',
+      initval: wrap.modalWidth || '300px',
+      required: true,
+      options: ['px', 'vw'],
+      forbid: appType === 'mob'
+    },
+    {
+      type: 'text',
+      field: 'code',
+      label: '娑堟伅缂栫爜',
+      initval: wrap.code || '',
+      tooltip: '鐢ㄤ簬璁板綍娑堟伅鏄惁宸茶鐨勬爣璇嗭紝濡傛灉涓嶅悓椤甸潰涓瓨鍦ㄧ浉鍚屾秷鎭紝鍙寚瀹氬浐瀹氬�笺��',
+      required: false,
+      rules: [{
+        pattern: /^[0-9a-zA-Z_]*$/ig,
+        message: '鍙厑璁稿寘鍚暟瀛椼�佸瓧姣嶄互鍙奯銆�'
+      }]
     },
     {
       type: 'radio',
@@ -59,7 +124,10 @@
       required: false,
       options: [
         {value: 'false', label: '鍚�'},
-        {value: 'true', label: '鏄�'},
+        {value: 'true', label: '鏄�'}
+      ],
+      controlFields: [
+        {field: 'speed', values: ['true']}
       ]
     },
     {
@@ -67,7 +135,7 @@
       field: 'speed',
       label: '鏃堕棿闂撮殧',
       initval: wrap.speed || 3,
-      tooltip: '浣跨敤鑷姩鍒囨崲鏃舵湁鏁堬紝榛樿涓�3绉�',
+      tooltip: '榛樿涓�3绉�',
       min: 1,
       max: 100,
       precision: 0,
@@ -129,7 +197,6 @@
       initval: wrap.empty || 'show',
       tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�',
       required: false,
-      skip: true,
       options: [
         {value: 'show', label: '鍚�'},
         {value: 'hidden', label: '鏄�'},
@@ -139,13 +206,25 @@
       type: 'radio',
       field: 'permission',
       label: '鏉冮檺楠岃瘉',
-      initval: wrap.permission || 'false',
+      initval: wrap.permission || (!appType ? 'true' : 'false'),
       required: false,
       options: [
-        {value: 'true', label: '鍚敤'},
+        {value: 'true', label: !appType ? '缁ф壙鑿滃崟' : '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: !appType
+      forbid: ispop
+    },
+    {
+      type: 'radio',
+      field: 'cacheLocal',
+      label: '鏈湴缂撳瓨',
+      initval: wrap.cacheLocal || 'true',
+      required: false,
+      options: [
+        {value: 'true', label: '缁ф壙鑿滃崟'},
+        {value: 'false', label: '绂佺敤'},
+      ],
+      forbid: ispop
     },
     {
       type: 'multiselect',

--
Gitblit v1.8.0