| | |
| | | */ |
| | | static getDebugSql (setting, scripts, arr_field, regoptions, search) { |
| | | let sql = '' |
| | | let _dataresource = setting.dataresource |
| | | let _dataresource = setting.dataresource || '' |
| | | let _customScript = '' |
| | | scripts && scripts.forEach(script => { |
| | | _customScript += ` |
| | |
| | | if (_customScript) { |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '') |
| | | } |
| | | // 外联数据库替换 |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | _dataresource = _dataresource.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | | _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | | } |
| | | |
| | | // 正则替换 |
| | | let _regoptions = regoptions.map(item => { |