From 75f3fd6e67851b9079e0b82c8cd94bf7649fe8bd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 08 三月 2021 18:53:44 +0800
Subject: [PATCH] 2021-03-08

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

diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx
index 1dc6f8c..2552a71 100644
--- a/src/menu/components/card/cardcellcomponent/formconfig.jsx
+++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -25,6 +25,22 @@
   if (type === 'table') {
     _options.push({value: 'sequence', text: '搴忓彿'})
   }
+  let appMenus = []
+  const isApp = sessionStorage.getItem('appType') === 'pc'
+
+  if (isApp) {
+    appMenus = sessionStorage.getItem('appMenus')
+    if (appMenus) {
+      try {
+        appMenus = JSON.parse(appMenus)
+        appMenus = appMenus.map(item => ({value: item.MenuID, text: item.MenuName}))
+      } catch {
+        appMenus = []
+      }
+    } else {
+      appMenus = []
+    }
+  }
 
   let forms = [
     {
@@ -138,7 +154,9 @@
       key: 'link',
       label: '閾炬帴',
       initVal: card.link || '',
+      tooltip: '鍔ㄦ�佸湴鍧�涓虹粦瀹氬瓧娈靛�笺��',
       required: false,
+      forbid: isApp,
       options: [
         { value: '', text: '鏃�' },
         { value: 'dynamic', text: '鍔ㄦ��' },
@@ -147,6 +165,38 @@
     },
     {
       type: 'select',
+      key: 'link',
+      label: '閾炬帴',
+      initVal: card.link || '',
+      required: false,
+      forbid: !isApp,
+      options: [
+        { value: '', text: '鏃�' },
+        { value: 'page', text: '鑿滃崟' },
+        { value: 'linkpage', text: '鍏宠仈鑿滃崟' },
+        { value: 'custom', text: '閾炬帴' }
+      ]
+    },
+    {
+      type: 'select',
+      key: 'linkmenu',
+      label: '鍏宠仈鑿滃崟',
+      initVal: card.linkmenu || '',
+      required: true,
+      forbid: !isApp,
+      options: appMenus
+    },
+    {
+      type: 'select',
+      key: 'copyMenuId',
+      label: '澶嶅埗鑿滃崟',
+      initVal: card.copyMenuId || '',
+      required: false,
+      forbid: !isApp,
+      options: appMenus
+    },
+    {
+      type: 'select',
       key: 'linkurl',
       label: '閾炬帴鍦板潃',
       initVal: card.linkurl || '',

--
Gitblit v1.8.0