From 958377f8ed9ca55070da9aa319f23e3ee9d94701 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 07 七月 2020 10:06:50 +0800 Subject: [PATCH] 2020-07-07 --- src/tabviews/treepage/index.jsx | 28 ++++++-- src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 37 +++++++++--- src/tabviews/formtab/index.jsx | 12 ++- src/tabviews/subtable/index.jsx | 9 ++- src/tabviews/subtabtable/index.jsx | 9 ++- src/tabviews/commontable/index.jsx | 28 ++++++-- 6 files changed, 86 insertions(+), 37 deletions(-) diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index 52f6d59..7a1935c 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -642,7 +642,13 @@ param = this.getDefaultParam() } - param.BID = BID + if (BID) { + param.BID = BID + } + // 鏁版嵁绠$悊鏉冮檺 + if (this.props.dataManager) { + param.dataM = 'Y' + } let result = await Api.genericInterface(param) if (result.status) { @@ -682,7 +688,6 @@ let param = { OrderCol: orderBy || setting.order, - dataM: this.props.dataManager ? 'Y' : '', ..._search } @@ -694,10 +699,18 @@ if (setting.interType === 'inner') { param.func = setting.innerFunc } else { - if (setting.sysInterface === 'true' && window.GLOB.mainSystemApi) { - param.rduri = window.GLOB.mainSystemApi - } else if (setting.sysInterface !== 'true') { - param.rduri = setting.interface + if (this.props.menuType === 'HS') { + if (setting.sysInterface === 'true' && options.cloudServiceApi) { + param.rduri = options.cloudServiceApi + } else if (setting.sysInterface !== 'true') { + param.rduri = setting.interface + } + } else { + if (setting.sysInterface === 'true' && window.GLOB.mainSystemApi) { + param.rduri = window.GLOB.mainSystemApi + } else if (setting.sysInterface !== 'true') { + param.rduri = setting.interface + } } if (setting.outerFunc) { @@ -732,8 +745,7 @@ obj_name: 'data', arr_field: arr_field, custom_script: setting.customScript || '', - default_sql: setting.default || 'true', - dataM: this.props.dataManager ? 'Y' : '' + default_sql: setting.default || 'true' } let _orderBy = orderBy || setting.order diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx index a8ea89c..b8f1139 100644 --- a/src/tabviews/formtab/index.jsx +++ b/src/tabviews/formtab/index.jsx @@ -324,6 +324,11 @@ if (!param) return // 鏈幏鍙栧弬鏁版椂锛屼笉鍙戣姹� + // 鏁版嵁绠$悊鏉冮檺 + if (this.props.dataManager) { + param.dataM = 'Y' + } + let result = await Api.genericInterface(param) if (result.status) { let _data = result.data[0] || '' @@ -401,8 +406,7 @@ func: 'sPC_Get_TableData', obj_name: 'data', arr_field: arr_field, - ID: primaryId, - dataM: this.props.dataManager ? 'Y' : '' + ID: primaryId } let _dataresource = setting.dataresource @@ -445,9 +449,7 @@ getCustomParam = () => { const { setting, primaryId } = this.state - let param = { - dataM: this.props.dataManager ? 'Y' : '' - } + let param = {} if (setting.interType === 'inner') { param.func = setting.innerFunc diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index f7e18a7..a918fc9 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -530,6 +530,11 @@ param = this.getDefaultParam(_BID) } + // 鏁版嵁绠$悊鏉冮檺 + if (this.props.dataManager) { + param.dataM = 'Y' + } + this.handleTableId() let result = await Api.genericInterface(param) @@ -572,7 +577,6 @@ let param = { OrderCol: orderBy || setting.order, - dataM: this.props.dataManager ? 'Y' : '', BID: BID, ..._search } @@ -628,8 +632,7 @@ arr_field: arr_field, BID: BID, custom_script: setting.customScript || '', - default_sql: setting.default || 'true', - dataM: this.props.dataManager ? 'Y' : '' + default_sql: setting.default || 'true' } let _orderBy = orderBy || setting.order diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index a278a22..a8280ed 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -418,6 +418,11 @@ param = this.getDefaultParam() } + // 鏁版嵁绠$悊鏉冮檺 + if (this.props.dataManager) { + param.dataM = 'Y' + } + let result = await Api.genericInterface(param) if (result.status) { this.setState({ @@ -450,7 +455,6 @@ let param = { OrderCol: orderBy || setting.order, - dataM: this.props.dataManager ? 'Y' : '', ..._search } @@ -499,8 +503,7 @@ arr_field: arr_field, BID: this.props.BID, custom_script: setting.customScript || '', - default_sql: setting.default || 'true', - dataM: this.props.dataManager ? 'Y' : '' + default_sql: setting.default || 'true' } let _orderBy = orderBy || setting.order diff --git a/src/tabviews/treepage/index.jsx b/src/tabviews/treepage/index.jsx index b2e333a..e66612b 100644 --- a/src/tabviews/treepage/index.jsx +++ b/src/tabviews/treepage/index.jsx @@ -256,6 +256,11 @@ param = this.getDefaultParam() } + // 鏁版嵁绠$悊鏉冮檺 + if (this.props.dataManager) { + param.dataM = 'Y' + } + let result = await Api.genericInterface(param) if (result.status) { let parentNodes = [] @@ -442,17 +447,24 @@ const { setting } = this.state let param = { - OrderCol: setting.order, - dataM: this.props.dataManager ? 'Y' : '', + OrderCol: setting.order } if (setting.interType === 'inner') { param.func = setting.innerFunc } else { - if (setting.sysInterface === 'true' && window.GLOB.mainSystemApi) { - param.rduri = window.GLOB.mainSystemApi - } else if (setting.sysInterface !== 'true') { - param.rduri = setting.interface + if (this.props.menuType === 'HS') { + if (setting.sysInterface === 'true' && options.cloudServiceApi) { + param.rduri = options.cloudServiceApi + } else if (setting.sysInterface !== 'true') { + param.rduri = setting.interface + } + } else { + if (setting.sysInterface === 'true' && window.GLOB.mainSystemApi) { + param.rduri = window.GLOB.mainSystemApi + } else if (setting.sysInterface !== 'true') { + param.rduri = setting.interface + } } if (setting.outerFunc) { @@ -476,8 +488,7 @@ obj_name: 'data', arr_field: arr_field, custom_script: setting.customScript || '', - default_sql: setting.default || 'true', - dataM: this.props.dataManager ? 'Y' : '' + default_sql: setting.default || 'true' } let _dataresource = setting.dataresource @@ -943,6 +954,7 @@ const mapStateToProps = (state) => { return { + menuType: state.editLevel, tabviews: state.tabviews, refreshTab: state.refreshTab, permAction: state.permAction, diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 760a4be..d967530 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -205,10 +205,18 @@ delete res.message delete res.status - if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) { - res.rduri = window.GLOB.mainSystemApi - } else if (btn.sysInterface !== 'true') { - res.rduri = btn.interface + if (this.props.menuType === 'HS') { + if (btn.sysInterface === 'true' && options.cloudServiceApi) { + res.rduri = options.cloudServiceApi + } else if (btn.sysInterface !== 'true') { + res.rduri = btn.interface + } + } else { + if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) { + res.rduri = window.GLOB.mainSystemApi + } else if (btn.sysInterface !== 'true') { + res.rduri = btn.interface + } } if (btn.outerFunc) { @@ -260,15 +268,15 @@ if (this.props.menuType === 'HS') { if (btn.sysInterface === 'true' && options.cloudServiceApi) { - param.rduri = options.cloudServiceApi + res.rduri = options.cloudServiceApi } else if (btn.sysInterface !== 'true') { - param.rduri = btn.interface + res.rduri = btn.interface } } else { if (btn.sysInterface === 'true' && window.GLOB.mainSystemApi) { - param.rduri = window.GLOB.mainSystemApi + res.rduri = window.GLOB.mainSystemApi } else if (btn.sysInterface !== 'true') { - param.rduri = btn.interface + res.rduri = btn.interface } } @@ -540,6 +548,11 @@ ..._search } + // 鏁版嵁绠$悊鏉冮檺 + if (this.props.dataManager) { + param.dataM = 'Y' + } + if (this.props.BID) { param.BID = this.props.BID } @@ -567,8 +580,12 @@ obj_name: 'data', arr_field: arr_field, custom_script: setting.customScript || '', - default_sql: setting.default || 'true', - dataM: this.props.dataManager ? 'Y' : '' + default_sql: setting.default || 'true' + } + + // 鏁版嵁绠$悊鏉冮檺 + if (this.props.dataManager) { + param.dataM = 'Y' } if (this.props.BID) { -- Gitblit v1.8.0