From a9b02f6862522b54d0824152017bf2acfec2af7b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 21 三月 2024 10:29:50 +0800
Subject: [PATCH] 2024-03-21

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

diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx
index 2f83093..41265db 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')
@@ -301,6 +314,7 @@
         { value: 'YYYY-MM', text: 'YYYY-MM' },
         { value: 'YYYY-MM-DD HH:mm', text: 'YYYY-MM-DD HH:mm' },
         { value: 'YYYY-MM-DD HH:mm:ss', text: 'YYYY-MM-DD HH:mm:ss' },
+        { value: 'YYYY骞碝M鏈圖D鏃�', text: 'YYYY骞碝M鏈圖D鏃�' },
       ]
     },
     {
@@ -579,7 +593,7 @@
       key: 'link',
       label: '閾炬帴',
       initVal: card.link || '',
-      tooltip: '鍔ㄦ�佸湴鍧�涓虹粦瀹氬瓧娈靛�笺��',
+      tooltip: '鍔ㄦ�佸湴鍧�涓虹粦瀹氬瓧娈靛�笺�備娇鐢� 鍔ㄦ��-鍏宠仈鑿滃崟 鏃讹紝璇峰湪鈥滈摼鎺ュ湴鍧�鈥濆瓧娈佃繑鍥炶彍鍗旾D銆�',
       required: false,
       options: [
         { value: '', text: '鏃�' },
@@ -589,7 +603,7 @@
       forbid: isHeader
     },
     {
-      type: linkTypes.length > 4 ? 'select' : 'radio',
+      type: 'select',
       key: 'linkType',
       label: '閾炬帴绫诲瀷',
       initVal: card.linkType || 'other',
@@ -615,6 +629,15 @@
       required: true,
       options: appMenus || [],
       forbid: !['pc', 'mob'].includes(appType)
+    },
+    {
+      type: 'cascader',
+      key: 'linkmenu',
+      label: '鍏宠仈鑿滃崟',
+      initVal: card.linkmenu || [],
+      required: true,
+      options: menulist,
+      forbid: ['pc', 'mob'].includes(appType)
     },
     {
       type: 'select',
@@ -653,11 +676,11 @@
       }]
     },
     {
-      type: 'textarea',
+      type: 'codemirror',
       key: 'formula',
       label: '鍏紡',
       initVal: card.formula || '',
-      tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋滐紝鍦ㄤ笉浣跨敤瑙f瀽鏃舵崲琛岀鎴栫┖鏍间細鏇挎崲涓洪〉闈㈠厓绱犮�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛�',
+      tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋滐紝鍦ㄤ笉浣跨敤瑙f瀽鏃舵崲琛岀鎴栫┖鏍间細鏇挎崲涓洪〉闈㈠厓绱犮�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛夈�傛敞锛氫細鏇挎崲鍏紡涓殑@username@銆丂fullName@銆丂bid@銆�',
       placeholder: '渚嬪锛欯price@ * @number@',
       required: true
     },
@@ -675,6 +698,18 @@
     },
     {
       type: 'radio',
+      key: 'lostTip',
+      label: '鍥剧墖缂哄け',
+      initVal: card.lostTip || 'true',
+      tooltip: '鍥剧墖鍦板潃涓嶅瓨鍦ㄦ椂锛屾槸鍚︽彁绀哄浘鐗囦涪澶便��',
+      required: false,
+      options: [
+        { value: 'true', text: '鎻愮ず' },
+        { value: 'false', text: '涓嶆彁绀�' }
+      ]
+    },
+    {
+      type: 'radio',
       key: 'alignItems',
       label: '鍨傜洿瀵归綈',
       initVal: card.alignItems || '',

--
Gitblit v1.8.0