From 6781ba45775af16872ac68f7e459b1072b16c4cc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 18 十月 2023 17:33:47 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/datasource/verifycard/index.jsx |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx
index 7519b71..1ef5833 100644
--- a/src/menu/datasource/verifycard/index.jsx
+++ b/src/menu/datasource/verifycard/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import { fromJS } from 'immutable'
 import { Form, Tabs, Popconfirm, notification, Modal, Typography, Spin, message, Button, Input } from 'antd'
-import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined, CopyOutlined, BorderOutlined, SnippetsOutlined } from '@ant-design/icons'
+import { StopOutlined, CheckCircleOutlined, TableOutlined, EditOutlined, SwapOutlined, DeleteOutlined, CopyOutlined, BorderOutlined, SnippetsOutlined } from '@ant-design/icons'
 import moment from 'moment'
 import md5 from 'md5'
 
@@ -678,6 +678,55 @@
             resolve()
           })
         } else {
+          if (/鍒楀悕\s*'[a-zA-Z0-9_-]+'\s*鏃犳晥/.test(result.message)) {
+            let tail = ''
+            let type = ''
+            searches.forEach(item => {
+              if (item.forbid) return
+              item.key.split(',').forEach(field => {
+                if (new RegExp(`'${field}'`).test(result.message)) {
+                  tail = field
+                  type = '鎼滅储鏉′欢'
+                }
+              })
+            })
+
+            if (!tail) {
+              let keys = setting.order.replace(/\s+(asc|desc)/ig, '').replace(/\s+/g, '')
+              keys.split(',').forEach(field => {
+                if (new RegExp(`'${field}'`).test(result.message)) {
+                  tail = field
+                  type = '鎺掑簭'
+                }
+              })
+            }
+
+            if (!tail) {
+              columns.forEach(item => {
+                if (new RegExp(`'${item.field}'`).test(result.message)) {
+                  tail = item.field
+                  if (config.subtype === 'basetable') {
+                    type = '鏄剧ず鍒�'
+                  } else {
+                    type = '瀛楁闆�'
+                  }
+                }
+              })
+              if (!tail && config.subtype === 'dualdatacard') {
+                subColumns.forEach(item => {
+                  if (new RegExp(`'${item.field}'`).test(result.message)) {
+                    tail = item.field
+                    type = '瀛愯〃瀛楁闆�'
+                  }
+                })
+              }
+            }
+
+            if (tail) {
+              result.message = result.message.replace(/ROLLBACK TRANSACTION 璇锋眰娌℃湁瀵瑰簲鐨� BEGIN TRANSACTION銆�/, '')
+              result.message = <>{result.message}<span style={{color: 'red'}}>娉細{type}涓瓨鍦ㄥ瓧娈祘tail}</span></>
+            }
+          }
           if (type === 'submit') {
             Modal.confirm({
               title: result.message,
@@ -1053,7 +1102,7 @@
             <EditTable actions={['edit', 'move', 'copy', 'del', 'clear']} searchKey={searchKey} type="datasourcefield" wrappedComponentRef={(inst) => this.datasource = inst} data={columns} columns={colColumns} onChange={(columns) => this.setState({columns})}/>
           </TabPane> : <TabPane tab={
             <span>
-              瀛楁闆�
+              瀛楁闆�<TableOutlined style={{marginLeft: '5px', fontSize: '12px'}} />
               {columns.length ? <span className="count-tip">{columns.length}</span> : null}
             </span>
           } key="columns">
@@ -1078,8 +1127,8 @@
             <span>
               鑷畾涔夎剼鏈�
               {scripts.length ? <span className="count-tip">{scripts.length}</span> : null}
-              {config.type !== 'interface' && activeKey === 'setting' ? <CopyOutlined title="澶嶅埗鏁版嵁婧�" className="mk-copy-datasource" onClick={(e) => {e.stopPropagation();this.copyDatasource()}}/> : null}
-              {config.type !== 'interface' && activeKey === 'setting' ? <SnippetsOutlined title="瀵煎叆鏁版嵁婧�" className="mk-paste-datasource" onClick={(e) => {e.stopPropagation();this.setState({pvisible: true})}}/> : null}
+              {activeKey === 'setting' ? <CopyOutlined title="澶嶅埗鏁版嵁婧�" className="mk-copy-datasource" onClick={(e) => {e.stopPropagation();this.copyDatasource()}}/> : null}
+              {activeKey === 'setting' ? <SnippetsOutlined title="瀵煎叆鏁版嵁婧�" className="mk-paste-datasource" onClick={(e) => {e.stopPropagation();this.setState({pvisible: true})}}/> : null}
               {activeKey === 'columns' ? <CopyOutlined title="浠ラ�楀彿鎷兼帴褰㈠紡澶嶅埗瀛楁" className="mk-copy-fields" onClick={(e) => {e.stopPropagation();this.copyColumns()}}/> : null}
               {activeKey === 'subcolumns' ? <CopyOutlined title="浠ラ�楀彿鎷兼帴褰㈠紡澶嶅埗瀛楁" className="mk-copy-fields" onClick={(e) => {e.stopPropagation();this.copySubColumns()}}/> : null}
               {activeKey === 'subcolumns' || activeKey === 'columns' ? <span onClick={(e) => {e.stopPropagation()}}><Search className="mk-search-fields" defaultValue={searchKey} allowClear onSearch={(val, e) => {e.stopPropagation();this.setState({searchKey: val})}} /></span> : null}

--
Gitblit v1.8.0