| | |
| | | _customScript = _customScript.replace(/\$sum@/ig, '/*') |
| | | _customScript = _customScript.replace(/@sum\$/ig, '*/') |
| | | |
| | | _dataresource = _dataresource.replace(/@ID@/ig, `''`) |
| | | _customScript = _customScript.replace(/@ID@/ig, `''`) |
| | | // _dataresource = _dataresource.replace(/@ID@/ig, `''`) |
| | | // _customScript = _customScript.replace(/@ID@/ig, `''`) |
| | | _dataresource = _dataresource.replace(/@BID@/ig, `'${BID || ''}'`) |
| | | _customScript = _customScript.replace(/@BID@/ig, `'${BID || ''}'`) |
| | | _dataresource = _dataresource.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`) |
| | |
| | | _customScript = _customScript.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) |
| | | _dataresource = _dataresource.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | _customScript = _customScript.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | _dataresource = _dataresource.replace(/@typename@/ig, `'admin'`) |
| | | _customScript = _customScript.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | let regoptions = null |
| | | if (setting.queryType === 'statistics' || _customScript) { |
| | |
| | | let LText = '' |
| | | let DateCount = '' |
| | | |
| | | if (setting.sub_field) { |
| | | arrFields = arrFields + ',' + setting.sub_field |
| | | } |
| | | |
| | | if (_dataresource && setting.laypage && orderBy && !id) { |
| | | LText = `/*system_query*/select top ${pageSize} ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows ` |
| | | DateCount = `/*system_query*/select count(1) as total from ${_dataresource} ${_search}` |
| | | if (setting.sub_field) { |
| | | DateCount = `/*system_query*/select count(1) as total from (select distinct ${setting.primaryKey} from ${_dataresource} ${_search})a` |
| | | } else { |
| | | DateCount = `/*system_query*/select count(1) as total from ${_dataresource} ${_search}` |
| | | } |
| | | } else if (_dataresource && orderBy) { |
| | | LText = `/*system_query*/select ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows ` |
| | | } else if (_dataresource) { |
| | |
| | | // param.parid = 'BID' |
| | | // param.sub_name = 'sub_data' |
| | | // param.sub_field = 'BID,friend_text,icon,Initials' |
| | | |
| | | if (setting.sub_field) { |
| | | param.sub_name = setting.subdata |
| | | param.tabid = setting.primaryKey || '' |
| | | param.parid = setting.subBID || '' |
| | | param.sub_field = setting.sub_field |
| | | } |
| | | |
| | | // exec_type: 'y' 解码字段:LText、LText1、LText2、custom_script、DateCount |
| | | |
| | |
| | | _customScript = _customScript.replace(/\$select@/ig, '/*') |
| | | _customScript = _customScript.replace(/@select\$/ig, '*/') |
| | | |
| | | _dataresource = _dataresource.replace(/@ID@/ig, `''`) |
| | | _customScript = _customScript.replace(/@ID@/ig, `''`) |
| | | // _dataresource = _dataresource.replace(/@ID@/ig, `''`) |
| | | // _customScript = _customScript.replace(/@ID@/ig, `''`) |
| | | _dataresource = _dataresource.replace(/@BID@/ig, `'${BID || ''}'`) |
| | | _customScript = _customScript.replace(/@BID@/ig, `'${BID || ''}'`) |
| | | _dataresource = _dataresource.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`) |
| | |
| | | _customScript = _customScript.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) |
| | | _dataresource = _dataresource.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | _customScript = _customScript.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | _dataresource = _dataresource.replace(/@typename@/ig, `'admin'`) |
| | | _customScript = _customScript.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | let regoptions = null |
| | | if (setting.queryType === 'statistics' || _customScript) { |
| | |
| | | sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`) |
| | | sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) |
| | | sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | sql = sql.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | |
| | | sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`) |
| | | sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) |
| | | sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | sql = sql.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | console.info(sql.replace(/\n\s{8}/ig, '\n')) |
| | |
| | | _script = _script.replace(/@UserID@/ig, userId) |
| | | _sql = _sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | _script = _script.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | _sql = _sql.replace(/@typename@/ig, `'admin'`) |
| | | _script = _script.replace(/@typename@/ig, `'admin'`) |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |