From d77bffddf598583a1a11ed8068d9df5bc2acdac2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 21 二月 2024 14:27:40 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/templates/zshare/verifycard/customscript/index.jsx | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index f619fc4..b0e413a 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -11,13 +11,14 @@ class CustomForm extends Component { static propTpyes = { type: PropTypes.any, - btn: PropTypes.object, // 鎸夐挳淇℃伅 - usefulfields: PropTypes.string, // 鍙敤瀛楁 - initsql: PropTypes.string, // sql鍓嶇紑 - defaultsql: PropTypes.array, // 榛樿sql - systemScripts: PropTypes.array, // 绯荤粺鑴氭湰 - customScripts: PropTypes.array, // 鑷畾涔夎剼鏈� - scriptsChange: PropTypes.func // 琛ㄥ崟 + btn: PropTypes.object, + usefulfields: PropTypes.string, + initsql: PropTypes.string, + defaultsql: PropTypes.string, + useDefaultSql: PropTypes.any, + systemScripts: PropTypes.array, + customScripts: PropTypes.array, + scriptsChange: PropTypes.func } state = { @@ -44,7 +45,7 @@ } handleConfirm = () => { - const { type, workFlow, flowType } = this.props + const { type, workFlow, flowType, useDefaultSql, defaultsql } = this.props const { editItem, skip } = this.state // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� this.props.form.validateFieldsAndScroll((err, values) => { @@ -126,7 +127,15 @@ } } - let sql = this.props.initsql + _initCustomScript + _prevCustomScript + _backCustomScript + tail + let sql = this.props.initsql + _initCustomScript + _prevCustomScript + + if (useDefaultSql) { + sql += `\n/* 榛樿sql */ + ${defaultsql} + ` + } + + sql += _backCustomScript + tail if (window.GLOB.funcs && window.GLOB.funcs.length > 0) { window.GLOB.funcs.forEach(item => { @@ -137,7 +146,8 @@ // 鏁版嵁鏉冮檺 sql = sql.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '') - sql = sql.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`) + sql = sql.replace(/@datam@/ig, `''`) + sql = sql.replace(/@typename@/ig, `'debug'`) if (window.GLOB.process && workFlow === 'true') { sql = sql.replace(/@works_flow_code@/ig, `'works_flow_code'`) -- Gitblit v1.8.0