From f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 十一月 2022 16:11:55 +0800 Subject: [PATCH] 2022-11-21 --- src/utils/utils-datamanage.js | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index d4780ee..b085f16 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -64,9 +64,17 @@ param.rduri = setting.interface } } else { - if (setting.sysInterface === 'true' && window.GLOB.mainSystemApi) { - param.rduri = window.GLOB.mainSystemApi - } else if (setting.sysInterface !== 'true') { + if (setting.sysInterface === 'true') { + if (window.GLOB.mainSystemApi) { + param.rduri = window.GLOB.mainSystemApi + } + } else if (setting.sysInterface === 'external') { + if (window.GLOB.systemType === 'production') { + param.$token = setting.exProInterface || '' + } else { + param.$token = setting.exInterface || '' + } + } else { if (window.GLOB.systemType === 'production' && setting.proInterface) { param.rduri = setting.proInterface } else { @@ -206,12 +214,12 @@ let DateCount = '' if (_dataresource && setting.laypage && orderBy && !id) { - LText = ` 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 = `select count(1) as total from ${_dataresource} ${_search}` + 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}` } else if (_dataresource && orderBy) { - LText = ` select ${arrFields} from (select ${arrFields} ,ROW_NUMBER() over(order by ${orderBy}) as rows from ${_dataresource} ${_search}) tmptable order by tmptable.rows ` + 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) { - LText = ` select ${arrFields} from ${_dataresource} ${_search} ` + LText = `/*system_query*/select ${arrFields} from ${_dataresource} ${_search} ` } if (_customScript) { @@ -272,6 +280,10 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) + + if (window.GLOB.probation) { + param.s_debug_type = 'Y' + } if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -389,7 +401,7 @@ }) } - let LText = ` select ${statFields.map(col => `isnull(sum(${col.field}),0) as ${col.field}`).join(',')} from ${_dataresource} ${_search} ` + let LText = ` /*system_query*/select ${statFields.map(col => `isnull(sum(${col.field}),0) as ${col.field}`).join(',')} from ${_dataresource} ${_search} ` if (_customScript) { LText = `${LText} @@ -855,6 +867,9 @@ BID: BID } + if (config.MenuName) { + param.menuname = config.MenuName + } // if (transaction) { // param.func = 'sPC_Get_structured_data_try' // } -- Gitblit v1.8.0