From 4fc1eb4913f3302679d88ec01099fc8dd3a80f81 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 08 三月 2023 23:27:21 +0800
Subject: [PATCH] 2023-03-08

---
 src/menu/components/share/actioncomponent/dragaction/card.jsx |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/dragaction/card.jsx b/src/menu/components/share/actioncomponent/dragaction/card.jsx
index 2f251a7..3163444 100644
--- a/src/menu/components/share/actioncomponent/dragaction/card.jsx
+++ b/src/menu/components/share/actioncomponent/dragaction/card.jsx
@@ -1,7 +1,7 @@
 import React from 'react'
 import { useDrag, useDrop } from 'react-dnd'
 import { Button, Popover } from 'antd'
-import { CopyOutlined, EditOutlined, FontColorsOutlined, CloseOutlined, ProfileOutlined, WarningOutlined } from '@ant-design/icons'
+import { CopyOutlined, EditOutlined, FontColorsOutlined, CloseOutlined, ProfileOutlined, WarningOutlined, DisconnectOutlined } from '@ant-design/icons'
 
 import MkIcon from '@/components/mk-icon'
 import { resetStyle } from '@/utils/utils-custom.js'
@@ -28,13 +28,20 @@
       moveCard(draggedId, overIndex)
     },
   })
-  const opacity = isDragging ? 0 : 1
+  const opacity = isDragging ? 0.5 : 1
 
   let hasProfile = false
+  let forbidSql = false
   if (['pop', 'prompt', 'exec'].includes(card.OpenType)) {
     hasProfile = true
+    if (card.verify && card.verify.default === 'false') {
+      forbidSql = true
+    }
   } else if (card.OpenType === 'excelIn' || card.OpenType === 'excelOut') {
     hasProfile = true
+    if (card.verify && card.verify.default === 'false') {
+      forbidSql = true
+    }
   } else if (card.funcType === 'print') {
     hasProfile = true
   } else if (card.funcType === 'megvii') {
@@ -45,7 +52,7 @@
   let _style = resetStyle(card.style)
   let _class = ''
   let show = card.show
-  if (type === 'datacard') {
+  if (type === 'datacard' || type === 'dualdatacard') {
     _style = null
     _class = 'swiper swiper-' + card.color
     show = 'button'
@@ -56,6 +63,8 @@
   let warning = null
   if (card.OpenType === 'innerpage' && !card.pageTemplate) {
     warning = <WarningOutlined style={{color: 'orange', marginLeft: '5px'}}/>
+  } else if (forbidSql) {
+    warning = <DisconnectOutlined className="mk-disconnect"/>
   }
 
   if (show === 'icon') {
@@ -94,7 +103,7 @@
         <EditOutlined className="edit" onClick={() => editCard(id)} />
         <CopyOutlined className="copy" onClick={() => copyCard(id)} />
         <CloseOutlined className="close" onClick={() => delCard(id)} />
-        {type !== 'datacard' ? <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={() => changeStyle(id)}/> : ''}
+        {type !== 'datacard' && type !== 'basetable' ? <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={() => changeStyle(id)}/> : ''}
         {hasProfile ? <ProfileOutlined className="profile" title="楠岃瘉" onClick={() => profileCard(id)} /> : null}
       </div>
     } trigger="hover">

--
Gitblit v1.8.0