From 05eada1e66951fbb4d388518206c6f5adc93841c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 15 三月 2024 22:09:20 +0800
Subject: [PATCH] 2024-03-15

---
 src/menu/components/card/cardcellcomponent/formconfig.jsx |   36 +++++++++++++++++++++++++++++-------
 1 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx
index f0464b2..2ce967c 100644
--- a/src/menu/components/card/cardcellcomponent/formconfig.jsx
+++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -60,6 +60,7 @@
   let linkTypes = [
     { value: 'tel', text: '鐢佃瘽' },
     { value: 'email', text: '閭' },
+    { value: 'linkmenu', text: '鍏宠仈鑿滃崟' },
     { value: 'download', text: '涓嬭浇' },
     { value: 'other', text: '鍏朵粬' }
   ]
@@ -89,13 +90,25 @@
       card.linkType = ''
       card.linkurl = ''
     }
-  } else if (card.linkType === 'linkmenu') {
-    if (appType !== 'mob' && appType !== 'pc') {
-      card.link = ''
-      card.linkType = ''
-      card.linkurl = ''
-      card.linkmenu = ''
+  // } else if (card.linkType === 'linkmenu') {
+  //   if (appType !== 'mob' && appType !== 'pc') {
+  //     card.link = ''
+  //     card.linkType = ''
+  //     card.linkurl = ''
+  //     card.linkmenu = ''
+  //   }
+  }
+
+  let menulist = sessionStorage.getItem('fstMenuList')
+
+  if (appType === '' && menulist) {
+    try {
+      menulist = JSON.parse(menulist)
+    } catch (e) {
+      menulist = []
     }
+  } else {
+    menulist = []
   }
 
   let appMenus = sessionStorage.getItem('appMenus')
@@ -589,7 +602,7 @@
       forbid: isHeader
     },
     {
-      type: linkTypes.length > 4 ? 'select' : 'radio',
+      type: 'select',
       key: 'linkType',
       label: '閾炬帴绫诲瀷',
       initVal: card.linkType || 'other',
@@ -617,6 +630,15 @@
       forbid: !['pc', 'mob'].includes(appType)
     },
     {
+      type: 'cascader',
+      key: 'linkmenu',
+      label: '鍏宠仈鑿滃崟',
+      initVal: card.linkmenu || [],
+      required: true,
+      options: menulist,
+      forbid: ['pc', 'mob'].includes(appType)
+    },
+    {
       type: 'select',
       key: 'linkurl',
       label: '閾炬帴鍦板潃',

--
Gitblit v1.8.0