From c85ee3f42541efb978bdccb05d09373a266f81d1 Mon Sep 17 00:00:00 2001 From: yangrd <1020519285@qq.com> Date: Fri, 28 Mar 2025 16:22:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85app=E8=81=94=E5=90=88?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cellsysOrg.js | 26 ++++++++++++++++++++------ cellsysUtil.js | 2 ++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/cellsysOrg.js b/cellsysOrg.js index 52118db..92b56ec 100644 --- a/cellsysOrg.js +++ b/cellsysOrg.js @@ -296,9 +296,9 @@ class CellsysOrg { /** * 查询组织内的所有App */ - queryApps(pageInfo, order, filters) { + queryApps(pageInfo, order, filters,getUnion) { let query = new Query(); - query.addFilter('org_id', Operator.Equals, this.id); + // query.addFilter('org_id', Operator.Equals, this.id); if (pageInfo) { query.setCurrPage(pageInfo.currPage); query.setPageSize(pageInfo.pageSize); @@ -313,7 +313,14 @@ class CellsysOrg { query.addFilter(item['name'], item['operator'], item['value']); }); } - let queryTask = new QueryTask(QueryType.App, pageInfo ? true : false); + let queryType=QueryType.App + if (this.unionStatus === 1 && getUnion === true) { + //联合状态为父级组织,并且需要获取联合信息 + queryType = QueryType.UnionApp; + } else { + query.setOrder({ org_id: 'asc', id: 'desc' }); + } + let queryTask = new QueryTask(queryType, pageInfo ? true : false); return new Promise((resolve, reject) => { queryTask .execute(query) @@ -346,9 +353,9 @@ class CellsysOrg { * @param order * @returns {Promise} */ - queryAppListByPublish(pageInfo, filters, order) { + queryAppListByPublish(pageInfo, filters, order,getUnion) { let query = new Query(); - query.addFilter('org_id', Operator.Equals, this.id); + // query.addFilter('org_id', Operator.Equals, this.id); query.addFilter('is_publish', Operator.Equals, 1); if (pageInfo) { query.setCurrPage(pageInfo.currPage); @@ -364,7 +371,14 @@ class CellsysOrg { query.addFilter(item['name'], item['operator'], item['value']); }); } - let queryTask = new QueryTask(QueryType.App, pageInfo ? true : false); + let queryType=QueryType.App + if (this.unionStatus === 1 && getUnion === true) { + //联合状态为父级组织,并且需要获取联合信息 + queryType = QueryType.UnionApp; + } else { + query.setOrder({ org_id: 'asc', id: 'desc' }); + } + let queryTask = new QueryTask(queryType, pageInfo ? true : false); return new Promise((resolve, reject) => { queryTask .execute(query) diff --git a/cellsysUtil.js b/cellsysUtil.js index 3589942..682b72a 100644 --- a/cellsysUtil.js +++ b/cellsysUtil.js @@ -54,6 +54,8 @@ const QueryType = { UnionMemberTypeUser: '/rpc/view_org_union_member_type_user', // 门户中App的列表 App: '/rpc/view_org_app_basic', //查询应用基础列表2(含原始应用id)view_app_basic不含 + //查询组织联合的u应用列表 + UnionApp: '/rpc/view_org_union_app', // 应用模板 AppModel: '/rpc/view_app_model', AppModelType: '/rpc/view_app_model_type',