From e657b7ed2c047af4b54cbc26e5ac66cb7656dbb5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 12 十月 2022 12:13:05 +0800 Subject: [PATCH] 2022-10-12 --- src/utils/utils-datamanage.js | 59 +++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 41 insertions(+), 18 deletions(-) diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index 06fc8f6..d4780ee 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -67,7 +67,15 @@ if (setting.sysInterface === 'true' && window.GLOB.mainSystemApi) { param.rduri = window.GLOB.mainSystemApi } else if (setting.sysInterface !== 'true') { - param.rduri = window.GLOB.systemType === 'production' ? (setting.proInterface || setting.interface) : setting.interface + if (window.GLOB.systemType === 'production' && setting.proInterface) { + param.rduri = setting.proInterface + } else { + param.rduri = setting.interface + } + let host = window.GLOB.baseurl.replace(/http(s):\/\//, '') + if (param.rduri.indexOf(host) === -1 && /\/dostars/.test(param.rduri)) { + param.$login = true + } } } @@ -91,9 +99,9 @@ default_sql: setting.execute ? 'true' : 'false' } - if (setting.transaction === 'true') { - param.func = 'sPC_Get_TableData_try' - } + // if (setting.transaction === 'true') { + // param.func = 'sPC_Get_TableData_try' + // } let userName = sessionStorage.getItem('User_Name') || '' let fullName = sessionStorage.getItem('Full_Name') || '' @@ -188,6 +196,10 @@ regoptions.forEach(item => { _customScript = _customScript.replace(item.reg, item.value) }) + if (window.GLOB.breakpoint) { + _customScript = _customScript.replace(/\$breakpoint_proc@/ig, window.GLOB.breakpoint) + param.func = 'sPC_Get_TableData_debug' + } } let LText = '' @@ -263,6 +275,13 @@ if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) + + // special HS鑷畾涔夊嚱鏁版煡璇� + if (setting.tableName === 's_custom_script' && options.cloudServiceApi) { + param.rduri = options.cloudServiceApi + param.userid = sessionStorage.getItem('CloudUserID') || '' + param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' + } } return param @@ -280,9 +299,9 @@ default_sql: setting.execute ? 'true' : 'false' } - if (setting.transaction === 'true') { - param.func = 'sPC_Get_TableData_try' - } + // if (setting.transaction === 'true') { + // param.func = 'sPC_Get_TableData_try' + // } let _dataresource = setting.dataresource let _customScript = '' @@ -431,7 +450,6 @@ */ static getPrevQueryParams (setting, search = [], BID) { let param = null - if (setting.procMode !== 'inner') { param = this.getDefaultPrevQueryParam(setting, search, BID) } else { @@ -526,7 +544,9 @@ param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } - param.menuname = setting.MenuName || '' + if (setting.$name) { + param.menuname = setting.$name + } return param } @@ -609,7 +629,10 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) param.LText = Utils.formatOptions(param.LText) - param.menuname = setting.MenuName || '' + + if (setting.$name) { + param.menuname = setting.$name + } if (BID) { param.BID = BID @@ -773,7 +796,7 @@ foreign_key: '', sql: _dataresource, script: _customScript, - transaction: setting.transaction === 'true' + // transaction: setting.transaction === 'true' } } @@ -784,7 +807,7 @@ export function getStructuredParams (params, config, BID) { let LText_field = [] let diffUser = false - let transaction = false + // let transaction = false let loginId = `'${sessionStorage.getItem('LoginUID') || ''}'` let sessionId = `'${localStorage.getItem('SessionUid') || ''}'` let userId = `'${sessionStorage.getItem('UserID') || ''}'` @@ -796,9 +819,9 @@ if (!diffUser && (/@userid@/ig.test(item.sql) || /@userid@/ig.test(_script))) { diffUser = true } - if (item.transaction) { - transaction = true - } + // if (item.transaction) { + // transaction = true + // } _sql = _sql.replace(/@ID@/ig, `''`) _script = _script.replace(/@ID@/ig, `''`) @@ -832,9 +855,9 @@ BID: BID } - if (transaction) { - param.func = 'sPC_Get_structured_data_try' - } + // if (transaction) { + // param.func = 'sPC_Get_structured_data_try' + // } let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText) -- Gitblit v1.8.0