From 86aab033b5129b00651b716ee70ce871cf670008 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 31 三月 2020 20:12:30 +0800
Subject: [PATCH] 2020-03-31

---
 src/templates/zshare/dragelement/card.jsx |   35 ++---------------------------------
 1 files changed, 2 insertions(+), 33 deletions(-)

diff --git a/src/templates/zshare/dragelement/card.jsx b/src/templates/zshare/dragelement/card.jsx
index 6cb7159..840d653 100644
--- a/src/templates/zshare/dragelement/card.jsx
+++ b/src/templates/zshare/dragelement/card.jsx
@@ -1,14 +1,13 @@
 import React from 'react'
 import { useDrag, useDrop } from 'react-dnd'
-import { Icon, Button, Select, DatePicker, Input } from 'antd'
+import { Icon, Select, DatePicker, Input } from 'antd'
 import moment from 'moment'
 import ItemTypes from './itemtypes'
 import './index.scss'
 
 const { MonthPicker, WeekPicker, RangePicker } = DatePicker
-// const { Paragraph } = Typography
 
-const Card = ({ id, type, card, moveCard, findCard, editCard, delCard, copyCard, profileCard, hasDrop, showfield }) => {
+const Card = ({ id, type, card, moveCard, findCard, editCard, delCard, hasDrop, showfield }) => {
   const originalIndex = findCard(id).index
   const [{ isDragging }, drag] = useDrag({
     item: { type: ItemTypes[type], id, originalIndex },
@@ -42,14 +41,6 @@
     delCard(id)
   }
 
-  const copy = () => {
-    copyCard(id)
-  }
-  
-  const profile = () => {
-    profileCard(id)
-  }
-
   let _defaultValue = '' // 涓嬫媺鎼滅储銆佹椂闂磋寖鍥寸被鍨嬶紝鍒濆鍊奸渶瑕侀澶勭悊
 
   if (type === 'search' && (card.type === 'multiselect' || card.type === 'select' || card.type === 'link')) {
@@ -72,17 +63,6 @@
       } catch {
         _defaultValue = [null, null]
       }
-    }
-  }
-
-  let hasProfile = false
-  if (type === 'action') {
-    if (['pop', 'prompt', 'exec'].includes(card.OpenType)) {
-      hasProfile = true
-    } else if (card.OpenType === 'excelIn' || card.OpenType === 'excelOut') {
-      hasProfile = true
-    } else if (card.funcType === 'print') {
-      hasProfile = true
     }
   }
 
@@ -122,15 +102,6 @@
             </div>
           </div> : null
         }
-        {type === 'action' ?
-          <Button
-            className={'mk-btn mk-' + card.class}
-            icon={card.icon}
-            key={card.uuid}
-          >
-            {card.label}{card.position === 'grid' && <Icon type="table" />}
-          </Button> : null
-        }
         {type === 'columns' ?
           <span className="ant-table-header-column">
             <div className="ant-table-column-sorters" title={card.label} style={{textAlign: card.Align}}>
@@ -152,8 +123,6 @@
       </div>
       <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}
-      {hasProfile ? <Icon className="edit profile" title="鏍¢獙瑙勫垯" type="profile" onClick={profile} /> : null}
     </div>
   )
 }

--
Gitblit v1.8.0