From 46f59e30133c25f1f01074b1c92445f9e85b8c98 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 31 十二月 2019 15:58:37 +0800
Subject: [PATCH] 2019-12-31

---
 src/templates/tableshare/dragelement/card.jsx |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/templates/tableshare/dragelement/card.jsx b/src/templates/tableshare/dragelement/card.jsx
index 00bdafe..b329c20 100644
--- a/src/templates/tableshare/dragelement/card.jsx
+++ b/src/templates/tableshare/dragelement/card.jsx
@@ -7,7 +7,7 @@
 
 const { MonthPicker, WeekPicker, RangePicker } = DatePicker
 
-const Card = ({ id, type, card, moveCard, findCard, editCard, delCard, copyCard, hasDrop, showfield }) => {
+const Card = ({ id, type, card, moveCard, findCard, editCard, delCard, copyCard, profileCard, hasDrop, showfield }) => {
   const originalIndex = findCard(id).index
   const [{ isDragging }, drag] = useDrag({
     item: { type: ItemTypes[type], id, originalIndex },
@@ -44,10 +44,14 @@
   const copy = () => {
     copyCard(id)
   }
+  
+  const profile = () => {
+    profileCard(id)
+  }
 
   let _defaultValue = '' // 涓嬫媺鎼滅储銆佹椂闂磋寖鍥寸被鍨嬶紝鍒濆鍊奸渶瑕侀澶勭悊
 
-  if (type === 'search' && card.type === 'select') {
+  if (type === 'search' && (card.type === 'multiselect' || card.type === 'select' || card.type === 'link')) {
     if (card.initval) {
       let _option = card.options.filter(option => option.Value === card.initval)[0]
       if (_option) {
@@ -82,7 +86,7 @@
               {card.type === 'text' ?
                 <Input style={{marginTop: '4px'}} defaultValue={card.initval} /> : null
               }
-              {(card.type === 'select' || card.type === 'link') ?
+              {(card.type === 'multiselect' || card.type === 'select' || card.type === 'link') ?
                 <Select defaultValue={_defaultValue}></Select> : null
               }
               {card.type === 'date' ?
@@ -134,9 +138,12 @@
           </span> : null
         }
       </div>
-      <Icon className="edit" type="edit" onClick={edit} />
-      <Icon className="edit close" type="close" onClick={del} />
-      {type === 'action' ? <Icon className="edit copy" type="copy" onClick={copy} /> : null}
+      <Icon className="edit" title="缂栬緫" type="edit" onClick={edit} />
+      <Icon className="edit close" title="鍒犻櫎" type="close" onClick={del} />
+      {type === 'action' ? <Icon className="edit copy" title="澶嶅埗" type="copy" onClick={copy} /> : null}
+      {type === 'action' && ['pop', 'prompt', 'exec'].includes(card.OpenType) && card.intertype === 'inner' && !card.innerFunc ?
+        <Icon className="edit profile" title="鏍¢獙瑙勫垯" type="profile" onClick={profile} /> : null
+      }
     </div>
   )
 }

--
Gitblit v1.8.0