From 11b6387d74467f81e33eba8f882bff610f240115 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 18 九月 2023 20:01:09 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/templates/sharecomponent/settingcomponent/settingform/index.jsx | 61 +++++++++++------------------- 1 files changed, 22 insertions(+), 39 deletions(-) diff --git a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx index 5e8df8d..c796d48 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx @@ -156,10 +156,27 @@ value: '0' }) options.push(item) - } else if (['datemonth', 'dateweek', 'daterange'].includes(search.type)) { + } else if (['datemonth', 'dateweek'].includes(search.type)) { options.push(item) options.push({ key: item.key + '1', + value: '0' + }) + } else if (search.type === 'daterange') { + let _skey = search.field + let _ekey = search.field + '1' + + if (/,/.test(search.field)) { + _skey = search.field.split(',')[0] + _ekey = search.field.split(',')[1] + } + + options.push({ + key: _skey, + value: '0' + }) + options.push({ + key: _ekey, value: '0' }) } else if (search.type === 'text' || search.type === 'select') { @@ -299,16 +316,7 @@ } else if (type === 'scripts' && _scripts.length === 0) { _resolve() } else { // type 涓� submit 銆� verify 锛屼互鍙婂叾浠栭渶瑕侀獙璇佺殑鍦烘櫙 - let timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - let r = SettingUtils.getDebugSql(setting, _scripts, arr_field, regoptions, search, timestamp) - let param = { - func: 's_debug_sql', - exec_type: 'y', - LText: r.sql - } - param.LText = Utils.formatOptions(param.LText) - param.timestamp = timestamp - param.secretkey = Utils.encrypt('', timestamp) + let r = SettingUtils.getDebugSql(setting, _scripts, arr_field, regoptions, search) if (r.errors) { notification.warning({ @@ -317,35 +325,10 @@ duration: 5 }) } - - let sumParam = null - if (r.sumSql) { - sumParam = { - func: 's_debug_sql', - exec_type: 'y', - LText: r.sumSql - } - sumParam.LText = Utils.formatOptions(sumParam.LText) - sumParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - sumParam.secretkey = Utils.encrypt('', sumParam.timestamp) - } - Api.genericInterface(param).then(result => { - if (result.status) { - if (sumParam) { - Api.genericInterface(sumParam).then(res => { - if (res.status) { - _resolve() - } else { - _reject() - Modal.error({ - title: res.message - }) - } - }) - } else { - _resolve() - } + Api.sDebug(r.sql).then(result => { + if (result.status || result.ErrCode === '-2') { + _resolve() } else { _reject() Modal.error({ -- Gitblit v1.8.0