From 50b49c1b760489c3430fc382656d57c5fbbab07c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 29 四月 2024 16:07:24 +0800 Subject: [PATCH] 2024-04-29 --- src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 45 ++++++++++++++++++++++++++------------------- 1 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index 3bba3de..c58226f 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -716,39 +716,46 @@ if (!err) { let _verify = {...verify, ...values} - if (_verify.excelHandle !== 'true') { + if (_verify.excelHandle !== 'true') { delete _verify.excel_func + } + if (_verify.default === 'false' && _verify.scripts.length === 0) { + notification.warning({ + top: 92, + message: '涓嶆墽琛岄粯璁ql鏃讹紝蹇呴』璁剧疆鑷畾涔夎剼鏈紒', + duration: 5 + }) + return } let cols = _verify.columns.map(col => col.Column.toLowerCase()) cols = Array.from(new Set(cols)) + let error = '' if (_verify.columns.length === 0) { - notification.warning({ - top: 92, - message: '璇疯缃瓻xcel鍒楀瓧娈�!', - duration: 5 - }) - return + error = '璇疯缃瓻xcel鍒楀瓧娈�!' } else if (_verify.columns.length > cols.length) { - notification.warning({ - top: 92, - message: 'Excel鍒楀瓧娈靛悕锛屼笉鍙噸澶�!', - duration: 5 - }) - return + error = 'Excel鍒楀瓧娈靛悕锛屼笉鍙噸澶�!' + } else if (cols.includes('bid')) { + error = 'bid瀛楁涓轰繚鐣欏瓧锛屼笉鍙娇鐢�!' + } else if (cols.includes('jskey')) { + error = 'jskey瀛楁涓轰繚鐣欏瓧锛屼笉鍙娇鐢�!' } else if (_verify.range === 1) { let tEmptys = _verify.columns.filter(op => !op.Text) if (tEmptys.length > 0) { - notification.warning({ - top: 92, - message: '蹇界暐棣栬鏃讹紝浼氫娇鐢═ext鍊兼牎楠孍xcel棣栬鍐呭锛孴ext鍊间笌Excel琛ㄩ琛屽唴瀹圭浉鍚岋紝涓斿潎涓嶅彲涓虹┖锛�', - duration: 5 - }) - return + error = '蹇界暐棣栬鏃讹紝浼氫娇鐢═ext鍊兼牎楠孍xcel棣栬鍐呭锛孴ext鍊间笌Excel琛ㄩ琛屽唴瀹圭浉鍚岋紝涓斿潎涓嶅彲涓虹┖锛�' } } + if (error) { + notification.warning({ + top: 92, + message: error, + duration: 5 + }) + return + } + _verify.columns.sort((a, b) => { if (a.import === 'init' && b.import !== 'init') { return 1 -- Gitblit v1.8.0