From 0ac68a47d7e024ba74d63e1b0f3cf7b9eeb20994 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 24 六月 2024 09:35:21 +0800
Subject: [PATCH] 2024-06-24

---
 src/menu/components/card/cardcellcomponent/formconfig.jsx        |   20 +++++-----
 src/tabviews/custom/components/card/cardcellList/index.jsx       |   26 +++++++++---
 src/menu/components/card/cardcellcomponent/elementform/index.jsx |   18 +++++++++
 3 files changed, 47 insertions(+), 17 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
index 0b03681..1435179 100644
--- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -233,6 +233,24 @@
       if (this.record.eval === 'true') {
         _options.push('decimal')
       }
+      if (this.record.eval !== 'func') {
+        _options.push('link')
+      }
+      if (this.record.link && this.record.eval !== 'func') {
+        _options.push('linkType')
+        if (this.record.linkType === 'linkmenu') {
+          _options.push('open')
+          if (this.record.link === 'static') {
+            _options.push('linkmenu')
+          } else {
+            _options.push('linkurl')
+          }
+        } else if (this.record.linkType === 'other') {
+          _options.push('linkurl', 'open')
+        } else {
+          _options.push('linkurl')
+        }
+      }
     }
     if (_options.includes('fixStyle') && this.record.fixStyle === 'alone') {
       _options.push('fixSize', 'fixColor', 'fixLeft', 'fixRight')
diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx
index 32da945..99d6305 100644
--- a/src/menu/components/card/cardcellcomponent/formconfig.jsx
+++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -608,6 +608,16 @@
       ]
     },
     {
+      type: 'codemirror',
+      key: 'formula',
+      label: '鍏紡',
+      initVal: card.formula || '',
+      tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋滐紝鍦ㄤ笉浣跨敤瑙f瀽鏃舵崲琛岀鎴栫┖鏍间細鏇挎崲涓洪〉闈㈠厓绱犮�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛夈�傛敞锛氫細鏇挎崲鍏紡涓殑@username@銆丂fullName@銆丂bid@銆�',
+      toolWidth: 450,
+      placeholder: '渚嬪锛欯price@ * @number@',
+      required: true
+    },
+    {
       type: 'radio',
       key: 'link',
       label: '閾炬帴',
@@ -683,16 +693,6 @@
         {value: 'blank', text: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'},
         {value: 'self', text: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'},
       ]
-    },
-    {
-      type: 'codemirror',
-      key: 'formula',
-      label: '鍏紡',
-      initVal: card.formula || '',
-      tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋滐紝鍦ㄤ笉浣跨敤瑙f瀽鏃舵崲琛岀鎴栫┖鏍间細鏇挎崲涓洪〉闈㈠厓绱犮�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛夈�傛敞锛氫細鏇挎崲鍏紡涓殑@username@銆丂fullName@銆丂bid@銆�',
-      toolWidth: 450,
-      placeholder: '渚嬪锛欯price@ * @number@',
-      required: true
     },
     {
       type: 'checkbox',
diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx
index 2412eb3..8d44dbb 100644
--- a/src/tabviews/custom/components/card/cardcellList/index.jsx
+++ b/src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -1034,14 +1034,26 @@
           className = mark.signType
         }
 
-        contents.push(
-          <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
-            <div style={_style}>
-              {card.alignItems ? <TextCell card={card} className={'ant-mk-text line' + (card.height || '') + className} value={val}/> : 
-              <div className={'ant-mk-text line' + (card.height || '') + className} style={{height: card.innerHeight}}>{val}</div>}
+        if (card.link && !data.$disabled) {
+          _style.cursor = 'pointer'
+          contents.push(
+            <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
+              <div style={_style} onClick={(e) => {this.openNewView(e, card)}}>
+                {card.alignItems ? <TextCell card={card} className={'ant-mk-text line' + (card.height || '') + className} value={val}/> : 
+                <div className={'ant-mk-text line' + (card.height || '') + className} style={{height: card.innerHeight}}>{val}</div>}
+              </div>
             </div>
-          </div>
-        )
+          )
+        } else {
+          contents.push(
+            <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
+              <div style={_style}>
+                {card.alignItems ? <TextCell card={card} className={'ant-mk-text line' + (card.height || '') + className} value={val}/> : 
+                <div className={'ant-mk-text line' + (card.height || '') + className} style={{height: card.innerHeight}}>{val}</div>}
+              </div>
+            </div>
+          )
+        }
       } else if (card.eleType === 'tag') {
         let vals = ''
   

--
Gitblit v1.8.0