From f3ec8c20eeabee6eaab1508d2f3896c28aab611c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 22 七月 2021 14:42:42 +0800 Subject: [PATCH] 修改页面中按钮保存 --- src/utils/utils-datamanage.js | 42 +++++++++++++++++++++--------------------- 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index dd0c995..d878668 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -65,7 +65,7 @@ if (setting.sysInterface === 'true' && window.GLOB.mainSystemApi) { param.rduri = window.GLOB.mainSystemApi } else if (setting.sysInterface !== 'true') { - param.rduri = setting.interface + param.rduri = window.GLOB.systemType === 'production' ? (setting.proInterface || setting.interface) : setting.interface } } @@ -108,6 +108,13 @@ ` } + _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '') + _customScript = _customScript.replace(/@select\$|\$select@/ig, '') + _dataresource = _dataresource.replace(/\$sum@/ig, '/*') + _dataresource = _dataresource.replace(/@sum\$/ig, '*/') + _customScript = _customScript.replace(/\$sum@/ig, '/*') + _customScript = _customScript.replace(/@sum\$/ig, '*/') + let regoptions = null if (setting.queryType === 'statistics' || _customScript) { let allSearch = Utils.getAllSearchOptions(search) @@ -118,15 +125,6 @@ } }) regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - value: `'${city}'` - }, { - reg: new RegExp('@userName@', 'ig'), - value: `'${userName}'` - }, { - reg: new RegExp('@fullName@', 'ig'), - value: `'${fullName}'` - }, { reg: new RegExp('@orderBy@', 'ig'), value: orderBy }, { @@ -240,6 +238,13 @@ ` } + _dataresource = _dataresource.replace(/@sum\$|\$sum@/ig, '') + _customScript = _customScript.replace(/@sum\$|\$sum@/ig, '') + _dataresource = _dataresource.replace(/\$select@/ig, '/*') + _dataresource = _dataresource.replace(/@select\$/ig, '*/') + _customScript = _customScript.replace(/\$select@/ig, '/*') + _customScript = _customScript.replace(/@select\$/ig, '*/') + let regoptions = null if (setting.queryType === 'statistics' || _customScript) { let allSearch = Utils.getAllSearchOptions(search) @@ -251,15 +256,6 @@ } }) regoptions.push({ - reg: new RegExp('@login_city@', 'ig'), - value: `'${city}'` - }, { - reg: new RegExp('@userName@', 'ig'), - value: `'${userName}'` - }, { - reg: new RegExp('@fullName@', 'ig'), - value: `'${fullName}'` - }, { reg: new RegExp('@orderBy@', 'ig'), value: orderBy }, { @@ -280,6 +276,7 @@ regoptions.forEach(item => { _dataresource = _dataresource.replace(item.reg, item.value) }) + _search = '' } if (_customScript) { @@ -357,7 +354,7 @@ } /** - * @description 鑾峰彇绯荤粺瀛樺偍杩囩▼ sPC_Get_TableData 鐨勫弬鏁� + * @description 鑾峰彇绯荤粺鍓嶇疆鑴氭湰 */ static getDefaultPrevQueryParam (setting, search, menuType) { let param = { @@ -441,7 +438,7 @@ } /** - * @description 鑾峰彇绯荤粺瀛樺偍杩囩▼ sPC_Get_TableData 鐨勫弬鏁� + * @description 鑾峰彇绯荤粺鍥炶皟鑴氭湰 */ static getCallBackQueryParams (setting, sql, errSql) { let param = { @@ -540,6 +537,9 @@ subObjs.push(val) } } else { + if (typeof(val) === 'string') { + val = val.replace(/'/ig, '"') + } keys.push(key) vals.push(`'${val}'`) } -- Gitblit v1.8.0