isdata-customer-sdk 0.1.26 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4882,12 +4882,18 @@ __webpack_require__.d(__webpack_exports__, {
4882
4882
  fireEvent: function() { return /* reexport */ fireEvent; },
4883
4883
  getAppPortalMenuDatas: function() { return /* reexport */ getAppPortalMenuDatas; },
4884
4884
  getCurrentUserPortalPageID: function() { return /* reexport */ getCurrentUserPortalPageID; },
4885
+ getGroupMappingsByAccount: function() { return /* reexport */ getGroupMappingsByAccount; },
4886
+ getKey: function() { return /* reexport */ getKey; },
4887
+ getLoginPortalAccountKey: function() { return /* reexport */ getLoginPortalAccountKey; },
4885
4888
  getMappingAppInfoByID: function() { return /* reexport */ getMappingAppInfoByID; },
4886
4889
  getMenuDatasByGroupID: function() { return /* reexport */ getMenuDatasByGroupID; },
4887
4890
  getMenuDatasByRoleIDs: function() { return /* reexport */ getMenuDatasByRoleIDs; },
4891
+ getOfficeInfosByIDs: function() { return /* reexport */ getOfficeInfosByIDs; },
4888
4892
  getPoratlAppID: function() { return /* reexport */ getPoratlAppID; },
4889
4893
  getRoleIDsByUserAndGroupID: function() { return /* reexport */ getRoleIDsByUserAndGroupID; },
4890
4894
  getUrlParamValue: function() { return /* reexport */ getUrlParamValue; },
4895
+ loginAccount: function() { return /* reexport */ loginAccount; },
4896
+ logoutAccount: function() { return /* reexport */ logoutAccount; },
4891
4897
  queryAssetById: function() { return /* reexport */ queryAssetById; },
4892
4898
  queryGroupIDByOfficeId: function() { return /* reexport */ queryGroupIDByOfficeId; },
4893
4899
  queryGroupInfosByOfficeId: function() { return /* reexport */ queryGroupInfosByOfficeId; },
@@ -5090,10 +5096,25 @@ const getAppPortalMenuDatas = async (user_id, group_id, isPortalAction, appVaria
5090
5096
  if (isPortalAction) {
5091
5097
  return true;
5092
5098
  } else {
5093
- if (menuData.app_id == app_id || menuData.app_id == portal_app_id) {
5099
+ if (menuData.app_id == portal_app_id) {
5094
5100
  return true;
5095
5101
  } else {
5096
- return false;
5102
+ let types = menuData.children;
5103
+ let hasTargetMenu = false;
5104
+ if (types && types.length > 0) {
5105
+ types.forEach(type => {
5106
+ let children = type.children;
5107
+ if (children && children.length > 0) {
5108
+ let newTypeChilden = children.filter(child => {
5109
+ return child.app_id === app_id;
5110
+ });
5111
+ if (newTypeChilden && newTypeChilden.length > 0) {
5112
+ hasTargetMenu = true;
5113
+ }
5114
+ }
5115
+ });
5116
+ }
5117
+ return hasTargetMenu;
5097
5118
  }
5098
5119
  }
5099
5120
  });
@@ -5324,6 +5345,22 @@ const getCurrentUserPortalPageID = async userData => {
5324
5345
  return portal_id;
5325
5346
  };
5326
5347
 
5348
+ /**
5349
+ * 通过账户名获取集团组织映射数据
5350
+ * @param {*} account
5351
+ * @returns
5352
+ */
5353
+ const getGroupMappingsByAccount = async account => {
5354
+ let queryData = {
5355
+ "param": {
5356
+ "account": account
5357
+ }
5358
+ };
5359
+ let resultData = await request.post(`/dataservice/rest/orchestration/getGourpMappingsByAccountName`, queryData);
5360
+ let tenetGroupDatas = resultData.data.resultGroups;
5361
+ return tenetGroupDatas;
5362
+ };
5363
+
5327
5364
  /**
5328
5365
  * 查询当前企业组织的集团组织ID
5329
5366
  * @param id 组织ID
@@ -5340,6 +5377,22 @@ const queryGroupInfosByOfficeId = async id => {
5340
5377
  return groupDptData;
5341
5378
  };
5342
5379
 
5380
+ /**
5381
+ * 查询当前企业组织信息
5382
+ * @param id 组织ID
5383
+ *
5384
+ */
5385
+ const getOfficeInfosByIDs = async group_ids => {
5386
+ let queryData_groupData = {
5387
+ "param": {
5388
+ "ids": group_ids
5389
+ }
5390
+ };
5391
+ let resultData = request.post(`/dataservice/rest/orchestration/getOfficeInfosByIDs`, queryData_groupData);
5392
+ let groupDatas = resultData.data.officeInfos;
5393
+ return groupDatas;
5394
+ };
5395
+
5343
5396
  // 查询门户映射应用信息
5344
5397
  // * @param appID 应用ID
5345
5398
  // * @param groupID 集团ID
@@ -5370,6 +5423,60 @@ const queryOfficeInfosById = async officeID => {
5370
5423
  let groupDptData = resultData.data.officeData;
5371
5424
  return groupDptData;
5372
5425
  };
5426
+
5427
+ /**
5428
+ * 登出账号
5429
+ * @param endside_type 0: web 1:手机
5430
+ * @returns {Promise<*>}
5431
+ * @param endside_type 0: web 1:手机
5432
+ *
5433
+ */
5434
+ const logoutAccount = async endside_type => {
5435
+ let resultData = request.get(`/system/authority/logout?isMobileLogout=${endside_type}`);
5436
+ return resultData;
5437
+ };
5438
+
5439
+ /**
5440
+ * 登录账号
5441
+ * @param data 登录数据
5442
+ * @param appid 应用ID
5443
+ *
5444
+ * @description
5445
+ * 登录时需要传入验证码(authPicCode)和应用ID(dataappId),
5446
+ * mobileOrWeb参数用于区分是移动端还是网页端登录。
5447
+ *
5448
+ * @returns
5449
+ */
5450
+ const loginAccount = (data, appid) => {
5451
+ return request.post(`/system/authority/loginAccount4Application?authPicCode=${data.imageCode}&dataappId=${appid}&mobileOrWeb=web`, data);
5452
+ };
5453
+
5454
+ /**
5455
+ * 获取登录门户账号密钥
5456
+ * @param {*} data
5457
+ * @returns
5458
+ */
5459
+ const getLoginPortalAccountKey = data => {
5460
+ let queryData = {
5461
+ "param": {
5462
+ "loginData": data
5463
+ }
5464
+ };
5465
+ return request.post(`/dataservice/rest/orchestration/getLoginPortalAccountKey`, queryData);
5466
+ };
5467
+
5468
+ /**
5469
+ * 获取密钥
5470
+ * @returns
5471
+ */
5472
+ const getKey = async () => {
5473
+ let queryData = {
5474
+ "param": {}
5475
+ };
5476
+ let resultData = await request.post(`/dataservice/rest/orchestration/getKey`, queryData);
5477
+ let key = resultData.data.key;
5478
+ return key;
5479
+ };
5373
5480
  ;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
5374
5481
 
5375
5482