补充app联合查询

This commit is contained in:
yangrd 2025-03-28 16:22:29 +08:00
parent c872318147
commit c85ee3f425
2 changed files with 22 additions and 6 deletions

View File

@ -296,9 +296,9 @@ class CellsysOrg {
/** /**
* 查询组织内的所有App * 查询组织内的所有App
*/ */
queryApps(pageInfo, order, filters) { queryApps(pageInfo, order, filters,getUnion) {
let query = new Query(); let query = new Query();
query.addFilter('org_id', Operator.Equals, this.id); // query.addFilter('org_id', Operator.Equals, this.id);
if (pageInfo) { if (pageInfo) {
query.setCurrPage(pageInfo.currPage); query.setCurrPage(pageInfo.currPage);
query.setPageSize(pageInfo.pageSize); query.setPageSize(pageInfo.pageSize);
@ -313,7 +313,14 @@ class CellsysOrg {
query.addFilter(item['name'], item['operator'], item['value']); 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) => { return new Promise((resolve, reject) => {
queryTask queryTask
.execute(query) .execute(query)
@ -346,9 +353,9 @@ class CellsysOrg {
* @param order * @param order
* @returns {Promise<unknown>} * @returns {Promise<unknown>}
*/ */
queryAppListByPublish(pageInfo, filters, order) { queryAppListByPublish(pageInfo, filters, order,getUnion) {
let query = new Query(); 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); query.addFilter('is_publish', Operator.Equals, 1);
if (pageInfo) { if (pageInfo) {
query.setCurrPage(pageInfo.currPage); query.setCurrPage(pageInfo.currPage);
@ -364,7 +371,14 @@ class CellsysOrg {
query.addFilter(item['name'], item['operator'], item['value']); 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) => { return new Promise((resolve, reject) => {
queryTask queryTask
.execute(query) .execute(query)

View File

@ -54,6 +54,8 @@ const QueryType = {
UnionMemberTypeUser: '/rpc/view_org_union_member_type_user', UnionMemberTypeUser: '/rpc/view_org_union_member_type_user',
// 门户中App的列表 // 门户中App的列表
App: '/rpc/view_org_app_basic', //查询应用基础列表2含原始应用idview_app_basic不含 App: '/rpc/view_org_app_basic', //查询应用基础列表2含原始应用idview_app_basic不含
//查询组织联合的u应用列表
UnionApp: '/rpc/view_org_union_app',
// 应用模板 // 应用模板
AppModel: '/rpc/view_app_model', AppModel: '/rpc/view_app_model',
AppModelType: '/rpc/view_app_model_type', AppModelType: '/rpc/view_app_model_type',