From 23c19efebd9f59fb6e78beff64782b39b3795a5d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 24 八月 2022 12:01:42 +0800 Subject: [PATCH] 2022-08-24 --- src/tabviews/zshare/actionList/normalbutton/index.jsx | 102 +++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 91 insertions(+), 11 deletions(-) diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 4f27208..3a308ee 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -710,7 +710,7 @@ }) } - if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 + if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // special 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -755,7 +755,7 @@ param[setting.primaryKey] = primaryId } - if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 + if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // special 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -1582,7 +1582,11 @@ result.func = btn.outerFunc } if (window.GLOB.mkHS) { - if (btn.sysInterface === 'true' && options.cloudServiceApi) { + if (btn.outerFunc === 's_app_version_upt') { // special 鏇存柊鐗堟湰鍙锋椂璁块棶sso + if (window.GLOB.mainSystemApi) { + result.rduri = window.GLOB.mainSystemApi + } + } else if (btn.sysInterface === 'true' && options.cloudServiceApi) { result.rduri = options.cloudServiceApi result.userid = sessionStorage.getItem('CloudUserID') || '' result.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' @@ -1594,7 +1598,7 @@ } } - // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 + // special 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 if (result.func === 's_sDataDictb_TBBack' && result.LTextOut) { result.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') result.secretkey = Utils.encrypt(result.LTextOut, result.timestamp) @@ -1631,7 +1635,16 @@ result.mk_api_key = record.mk_api_key } - if (btn.callbackType === 'script' || btn.callbackType === 'default') { + // special 鐗堟湰鍗囩骇鍥炶皟澶勭悊 + if (window.GLOB.mkHS && btn.outerFunc === 's_get_sVersionDetail_Ltext' && btn.callbackFunc) { + if (result.status) { + this.verupRequest(params, result, outParam, _resolve) + } else { + this.execError(result) + _resolve() + } + return + } else if (btn.callbackType === 'script' || btn.callbackType === 'default') { param = this.getCallBackSql(result, record) } else if (btn.callbackType === 'func' || btn.callbackFunc) { delete result.message @@ -1643,7 +1656,7 @@ func: btn.callbackFunc } - // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 + // special 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) @@ -1679,6 +1692,71 @@ _resolve() } }) + } + + verupRequest = (params, result, outParam, _resolve) => { + const { btn } = this.props + + delete result.message + delete result.status + + result.func = btn.callbackFunc + + let ssoParam = null + let callParam = {...outParam, ...result} + + if (callParam.LTextOut) { + callParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + callParam.secretkey = Utils.encrypt(callParam.LTextOut, callParam.timestamp) + callParam.open_key = Utils.encryptOpenKey(callParam.secretkey, callParam.timestamp) + } + + if (callParam.UpType === 'SSO' && window.GLOB.mainSystemApi) { + ssoParam = fromJS(callParam).toJS() + + ssoParam.rduri = window.GLOB.mainSystemApi + + delete ssoParam.UpType + } else { + delete callParam.UpType + } + + if (ssoParam) { + Api.genericInterface(ssoParam).then(res => { + if (!res.status) { + this.execError(res) + _resolve() + } else { + Api.genericInterface(callParam).then(re => { + if (!re.status) { + this.execError(re) + _resolve() + } else { + if (params.length === 0) { + this.execSuccess(res) + _resolve() + } else { + this.outerLoopRequest(params, _resolve) + } + } + }) + } + }) + } else { + Api.genericInterface(callParam).then(re => { + if (!re.status) { + this.execError(re) + _resolve() + } else { + if (params.length === 0) { + this.execSuccess(re) + _resolve() + } else { + this.outerLoopRequest(params, _resolve) + } + } + }) + } } /** @@ -2240,7 +2318,7 @@ } modelconfirm = () => { - const { btn } = this.props + const { btn, BID } = this.props const { btnconfig, selines } = this.state let _this = this @@ -2282,15 +2360,17 @@ _initval = moment().subtract(_initval, 'days').format('YYYY-MM-DD HH:mm:ss') } + if (_initval === undefined) { + _initval = '' + } + let _fieldlen = item.fieldlength || 50 if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect') { _fieldlen = item.fieldlength || 512 } else if (item.type === 'number') { _fieldlen = item.decimal ? item.decimal : 0 - } - - if (_initval === undefined) { - _initval = '' + } else if (item.type === 'text' && /@appkey@|@SessionUid@|@bid@/ig.test(_initval)) { // 鐗规畩瀛楁鏇挎崲 + _initval = _initval.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey).replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')).replace(/^(\s*)@bid@(\s*)$/ig, (BID || '')) } let _type = item.type -- Gitblit v1.8.0