From cb4c8706eb48183ac8875d92d4a950ad6b6675a2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 18 三月 2020 11:01:11 +0800 Subject: [PATCH] 2020-03-18 --- src/tabviews/tableshare/actionList/index.jsx | 32 ++++++++++++++++++++++++++++++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/tabviews/tableshare/actionList/index.jsx b/src/tabviews/tableshare/actionList/index.jsx index 1bbb6e4..5bccc5f 100644 --- a/src/tabviews/tableshare/actionList/index.jsx +++ b/src/tabviews/tableshare/actionList/index.jsx @@ -438,6 +438,7 @@ */ printOuterLoopRequest = (params, btn, _list, _resolve) => { let param = params.shift() + let _outParam = null new Promise(resolve => { // 鍐呴儴璇锋眰 @@ -470,6 +471,7 @@ }).then(res => { if (!res) return // 澶栭儴璇锋眰 + _outParam = JSON.parse(JSON.stringify(res)) if (this.props.menuType === 'HS') { if (btn.sysInterface === 'true' && options.cloudServiceApi) { @@ -489,12 +491,38 @@ res.func = btn.outerFunc } - res.appkey = window.GLOB.appkey || '' // 澶栭儴璇锋眰鏃讹紝缁熶竴娣诲姞appkey - return Api.genericInterface(res) }).then(response => { if (!response) return + if (btn.callbackFunc) { + // 瀛樺湪鍥炶皟鍑芥暟鏃讹紝璋冪敤 + delete response.message + delete response.status + + response.func = btn.callbackFunc + + let _callbackparam = {..._outParam, ...response} + + return Api.genericInterface(_callbackparam) + } else if (response.status) { + response.data.forEach(_item => { + _list.push({data: _item, count: response.printCount}) + }) + + // 涓�娆¤姹傛垚鍔燂紝杩涜涓嬩竴椤硅姹� + if (params.length === 0) { + _resolve({next: 'getTemp', list: _list}) + } else { + this.printOuterLoopRequest(params, btn, _list, _resolve) + } + } else { + this.execError(response, btn) + _resolve({next: false, list: _list}) + } + }).then(response => { + if (!response) return + if (response.status) { response.data.forEach(_item => { _list.push({data: _item, count: response.printCount}) -- Gitblit v1.8.0