From 81d0d7721bb14a34b1eef99fd9506c3eda4bda99 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 18 十月 2023 17:17:47 +0800
Subject: [PATCH] 2023-10-18

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

diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx
index 8da4cb7..1ef5833 100644
--- a/src/menu/datasource/verifycard/index.jsx
+++ b/src/menu/datasource/verifycard/index.jsx
@@ -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,
@@ -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