diff --git a/components/custom/check-action.vue b/components/custom/check-action.vue index fce9ad8..6cf7e9c 100644 --- a/components/custom/check-action.vue +++ b/components/custom/check-action.vue @@ -37,6 +37,10 @@ type: String, default: '' }, + TASK_ORGID: { + type: String, + default: '' + }, refuseApi: { type: String, default: '' @@ -120,6 +124,9 @@ this.dataSource.CurrentNode = currentNodes[0]; } } + if(this.TASK_ORGID&&this.TASK_ORGID.length>0){ + this.dataSource.Parameter22 = this.TASK_ORGID + } const params = { ...this.dataSource, CurrentNode: { diff --git a/pages/apply/subPages/SK/riskSafeIdenShow.vue b/pages/apply/subPages/SK/riskSafeIdenShow.vue index d0784b2..bd9b577 100644 --- a/pages/apply/subPages/SK/riskSafeIdenShow.vue +++ b/pages/apply/subPages/SK/riskSafeIdenShow.vue @@ -103,7 +103,7 @@ - + @@ -154,6 +154,7 @@ listPropUpload: ['NOTIFY_ID'], listPropValUpload: [], ORG_ID: uni.getStorageSync('orgId'), + TASK_ORGID:'', stepLoad: true, dataModel: { Nav_ApplyDepartment: { @@ -227,6 +228,7 @@ onLoad(option) { this.TaskID = option.taskID ? option.taskID : ''; this.ID = option.ID? option.ID:'' + this.TASK_ORGID = option.TASK_ORGID? option.TASK_ORGID:'' this.model.ID = option.ID ? option.ID : ''; this.tableKey = option.tableKey ? option.tableKey : '0' this.isAudit = option.isAudit @@ -255,6 +257,9 @@ extendInclude(json, 'Nav_Files'); extendInclude(json, 'Nav_Files.Nav_ImgFile'); extendIgnoreDataRule(json) + if(this.TASK_ORGID&& this.TASK_ORGID!=null){ + json.Parameter22 = this.TASK_ORGID + } // extendRule(json, 'TASK_ID', 1, this.TaskID); EvaIdentifyPlanGet(json).then(res => { this.dataModel = res; diff --git a/pages/index/index2.nvue b/pages/index/index2.nvue index 7c7f865..4c5eb47 100644 --- a/pages/index/index2.nvue +++ b/pages/index/index2.nvue @@ -7,12 +7,14 @@ - - + - + @@ -36,7 +39,8 @@ --> - + - + @@ -400,6 +405,8 @@ if (item.SOURCE_FORMCODE == 'PF119') { const orgId = uni.getStorageSync('orgId') const json = initFilter(orgId) + json.Parameter22 = item.ORG_ID + extendRule(json, 'ID', 1, item.SOURCE_DATA_ID); extendInclude(json, "Nav_ApproveDetails") extendInclude(json, "Nav_ApproveDetails.Nav_ApproveUser") @@ -427,7 +434,7 @@ item .SOURCE_DATA_ID + "&taskID=" + item.ID + '&isAudit=true&okApi=' + okApi + '&refuseApi=' + res - .REJECT_INTERFACE + .REJECT_INTERFACE + "&TASK_ORGID=" + item.ORG_ID this.$store.commit('updateAuditModel', res) uni.navigateTo({ url: linkToUrl @@ -442,7 +449,8 @@ if (linkToUrl != '') { linkToUrl += "?tableKey=" + this.affairType + "&ID=" + item.SOURCE_DATA_ID + "&taskID=" + item.ID - if (item.SOURCE_FORMCODE == 'SC034' || item.SOURCE_FORMCODE == 'SC030' || item.SOURCE_FORMCODE == 'SE050_SHOWPRINT') { + if (item.SOURCE_FORMCODE == 'SC034' || item.SOURCE_FORMCODE == 'SC030' || item.SOURCE_FORMCODE == + 'SE050_SHOWPRINT') { linkToUrl += "&FORMCODE=" + item.SOURCE_FORMCODE //会议 纪要 load时 添加标识 } diff --git a/utils/common.js b/utils/common.js index e23bda7..7aaa137 100644 --- a/utils/common.js +++ b/utils/common.js @@ -454,6 +454,7 @@ export function initQueryFilter(OrgId, PageIndex, Limit, Sort, Order) { IncludeCount: 0, OrderCount: 0, FilterGroupCount: 0, + IgnoreOrgRule: true, Include: [], Orders: [], FilterGroup: { @@ -476,6 +477,7 @@ export function initFilter(OrgId, Keyword = "", Sort, Order, PageIndex = 1, Para OrgId, PageIndex, Limit: 10, + IgnoreOrgRule: true, Start: (PageIndex - 1) * 10, Sort, Order: (Order === '' ? 0 : Order), diff --git a/utils/request.js b/utils/request.js index 5c8fe57..a743392 100644 --- a/utils/request.js +++ b/utils/request.js @@ -7,16 +7,16 @@ export default { // return config.uni_app_web_api_url.replace('api', '') return config.uni_app_web_local_api_url.replace('api', '') }, - getRequestHeaders(url, type = 'post', isIgnoreTenant) { + getRequestHeaders(url, type = 'post', data, isIgnoreTenant) { const auth = 'Bearer ' + uni.getStorageSync('accessToken') // const user = uni.getStorageSync('loginUserVerify') // const RootOrgId = uni.getStorageSync('RootOrgId') const appInfoData = uni.getStorageSync('appInfo') const tenant = uni.getStorageSync('Tenant') || '' - const userId = uni.getStorageSync('Userid')||'' + const userId = uni.getStorageSync('Userid') || '' // const userId = appInfoData?.User?.ID || '' const userName = appInfoData?.User?.NAME || '' - const orgId= uni.getStorageSync('orgId')||'' + const orgId = uni.getStorageSync('orgId') || '' // const orgId = appInfoData?.User?.ORG_ID || '' const dataRule = appInfoData?.DataRule ? appInfoData?.DataRule.join(',') : '' const departmentId = appInfoData?.User?.DEPARTMENT_ID || '' @@ -37,33 +37,38 @@ export default { // const Tenant = uni.getStorageSync('Tenant') // url.indexOf('OP') != 0 && !isIgnoreTenant && (headers.Tenant = Tenant) const Tenant = uni.getStorageSync('Tenant') || '' - if (url.indexOf('PF/Login/Login') !== -1) { - // Login接口使用最新的Tenant、Orgid、userid、Username值 - const latestTenant = uni.getStorageSync('Tenant') || '' - const latestOrgid = uni.getStorageSync('orgId') - const latestUserid = uni.getStorageSync('Userid') - const latestUsername = uni.getStorageSync('Username') - - - - if (latestTenant) { - headers.Tenant = latestTenant - } - if (latestOrgid) { - // 覆盖原有的orgId字段,使用最新值 - headers.orgId = latestOrgid - } - if (latestUserid) { - // 覆盖原有的userid字段,使用最新值 - headers.userid = latestUserid - } - // if (latestUsername) { - // // 覆盖原有的username字段,使用最新值 - // headers.username = latestUsername - // } - } else if (url.indexOf('OP') != 0 && !isIgnoreTenant) { - headers.Tenant = Tenant - } + if (url.indexOf('PF/Login/Login') !== -1) { + // Login接口使用最新的Tenant、Orgid、userid、Username值 + const latestTenant = uni.getStorageSync('Tenant') || '' + const latestOrgid = uni.getStorageSync('orgId') + const latestUserid = uni.getStorageSync('Userid') + const latestUsername = uni.getStorageSync('Username') + + + + if (latestTenant) { + headers.Tenant = latestTenant + } + if (latestOrgid) { + // 覆盖原有的orgId字段,使用最新值 + headers.orgId = latestOrgid + } + if (latestUserid) { + // 覆盖原有的userid字段,使用最新值 + headers.userid = latestUserid + } + // if (latestUsername) { + // // 覆盖原有的username字段,使用最新值 + // headers.username = latestUsername + // } + } else if (url.indexOf('OP') != 0 && !isIgnoreTenant) { + headers.Tenant = Tenant + } + //wyw + if (Tenant && Tenant == '003' && data && data.Parameter22 && data.Parameter22.length > 20) { + //总公司 Parameter22 存入子公司的ORG_ID 自动切换数据库链接 + headers.Tenant = data.Parameter22.substring(0, 3) + } return headers }, send(options = {}, onlyData, isShowLoading) { @@ -202,7 +207,7 @@ export default { return this.send({ url: url, data: data, - header: this.getRequestHeaders(url, 'get') + header: this.getRequestHeaders(url, 'get', data) }, onlyData) }, post(url = '', data = {}, onlyData = true, isShowLoading = true) { @@ -218,7 +223,7 @@ export default { return this.send({ url: url, data: data, - header: this.getRequestHeaders(url, 'post'), + header: this.getRequestHeaders(url, 'post', data), method: 'POST' }, onlyData, isShowLoading) },