From 4f8ffec8fc4aa9918264a3b3b4952421d896f5eb Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 17 四月 2020 17:48:36 +0800 Subject: [PATCH] 2020-04-17 --- src/templates/zshare/verifycard/customscript/index.jsx | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index 8430f6e..6a3508c 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -15,6 +15,7 @@ usefulfields: PropTypes.string, // 鍙敤瀛楁 initsql: PropTypes.string, // sql鍓嶇紑 systemScripts: PropTypes.array, // 绯荤粺鑴氭湰 + customScripts: PropTypes.array, // 鑷畾涔夎剼鏈� scriptsChange: PropTypes.func // 琛ㄥ崟 } @@ -52,21 +53,21 @@ notification.warning({ top: 92, message: 'sql涓璡'蹇呴』鎴愬鍑虹幇', - duration: 10 + duration: 5 }) return } else if (_lparen !== _rparen) { notification.warning({ top: 92, message: 'sql涓�()蹇呴』鎴愬鍑虹幇', - duration: 10 + duration: 5 }) return } else if (/--/ig.test(values.sql)) { notification.warning({ top: 92, message: '鑷畾涔塻ql璇彞涓紝涓嶅彲鍑虹幇瀛楃 -- 锛屾敞閲婅鐢� /*鍐呭*/', - duration: 10 + duration: 5 }) return } @@ -77,7 +78,7 @@ notification.warning({ top: 92, message: 'sql涓笉鍙娇鐢�' + error, - duration: 10 + duration: 5 }) return } @@ -86,9 +87,19 @@ aaa: ` + let _initsql = '' + this.props.customScripts.forEach(script => { + if (this.state.editItem && this.state.editItem.uuid === script.uuid) return + if (script.status === 'false' || script.position !== 'init') return + + _initsql += ` + ${script.sql} + ` + }) + let param = { func: 's_debug_sql', - LText: this.props.initsql + values.sql + tail + LText: this.props.initsql + _initsql + values.sql + tail } param.LText = Utils.formatOptions(param.LText) @@ -173,6 +184,7 @@ <Radio.Group> <Radio value="front">sql鍓�</Radio> <Radio value="back">sql鍚�</Radio> + <Radio value="init">鍒濆鍖�</Radio> </Radio.Group> )} </Form.Item> -- Gitblit v1.8.0