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.umd.js CHANGED
@@ -4892,12 +4892,18 @@ __webpack_require__.d(__webpack_exports__, {
4892
4892
  fireEvent: function() { return /* reexport */ fireEvent; },
4893
4893
  getAppPortalMenuDatas: function() { return /* reexport */ getAppPortalMenuDatas; },
4894
4894
  getCurrentUserPortalPageID: function() { return /* reexport */ getCurrentUserPortalPageID; },
4895
+ getGroupMappingsByAccount: function() { return /* reexport */ getGroupMappingsByAccount; },
4896
+ getKey: function() { return /* reexport */ getKey; },
4897
+ getLoginPortalAccountKey: function() { return /* reexport */ getLoginPortalAccountKey; },
4895
4898
  getMappingAppInfoByID: function() { return /* reexport */ getMappingAppInfoByID; },
4896
4899
  getMenuDatasByGroupID: function() { return /* reexport */ getMenuDatasByGroupID; },
4897
4900
  getMenuDatasByRoleIDs: function() { return /* reexport */ getMenuDatasByRoleIDs; },
4901
+ getOfficeInfosByIDs: function() { return /* reexport */ getOfficeInfosByIDs; },
4898
4902
  getPoratlAppID: function() { return /* reexport */ getPoratlAppID; },
4899
4903
  getRoleIDsByUserAndGroupID: function() { return /* reexport */ getRoleIDsByUserAndGroupID; },
4900
4904
  getUrlParamValue: function() { return /* reexport */ getUrlParamValue; },
4905
+ loginAccount: function() { return /* reexport */ loginAccount; },
4906
+ logoutAccount: function() { return /* reexport */ logoutAccount; },
4901
4907
  queryAssetById: function() { return /* reexport */ queryAssetById; },
4902
4908
  queryGroupIDByOfficeId: function() { return /* reexport */ queryGroupIDByOfficeId; },
4903
4909
  queryGroupInfosByOfficeId: function() { return /* reexport */ queryGroupInfosByOfficeId; },
@@ -5100,10 +5106,25 @@ const getAppPortalMenuDatas = async (user_id, group_id, isPortalAction, appVaria
5100
5106
  if (isPortalAction) {
5101
5107
  return true;
5102
5108
  } else {
5103
- if (menuData.app_id == app_id || menuData.app_id == portal_app_id) {
5109
+ if (menuData.app_id == portal_app_id) {
5104
5110
  return true;
5105
5111
  } else {
5106
- return false;
5112
+ let types = menuData.children;
5113
+ let hasTargetMenu = false;
5114
+ if (types && types.length > 0) {
5115
+ types.forEach(type => {
5116
+ let children = type.children;
5117
+ if (children && children.length > 0) {
5118
+ let newTypeChilden = children.filter(child => {
5119
+ return child.app_id === app_id;
5120
+ });
5121
+ if (newTypeChilden && newTypeChilden.length > 0) {
5122
+ hasTargetMenu = true;
5123
+ }
5124
+ }
5125
+ });
5126
+ }
5127
+ return hasTargetMenu;
5107
5128
  }
5108
5129
  }
5109
5130
  });
@@ -5334,6 +5355,22 @@ const getCurrentUserPortalPageID = async userData => {
5334
5355
  return portal_id;
5335
5356
  };
5336
5357
 
5358
+ /**
5359
+ * 通过账户名获取集团组织映射数据
5360
+ * @param {*} account
5361
+ * @returns
5362
+ */
5363
+ const getGroupMappingsByAccount = async account => {
5364
+ let queryData = {
5365
+ "param": {
5366
+ "account": account
5367
+ }
5368
+ };
5369
+ let resultData = await request.post(`/dataservice/rest/orchestration/getGourpMappingsByAccountName`, queryData);
5370
+ let tenetGroupDatas = resultData.data.resultGroups;
5371
+ return tenetGroupDatas;
5372
+ };
5373
+
5337
5374
  /**
5338
5375
  * 查询当前企业组织的集团组织ID
5339
5376
  * @param id 组织ID
@@ -5350,6 +5387,22 @@ const queryGroupInfosByOfficeId = async id => {
5350
5387
  return groupDptData;
5351
5388
  };
5352
5389
 
5390
+ /**
5391
+ * 查询当前企业组织信息
5392
+ * @param id 组织ID
5393
+ *
5394
+ */
5395
+ const getOfficeInfosByIDs = async group_ids => {
5396
+ let queryData_groupData = {
5397
+ "param": {
5398
+ "ids": group_ids
5399
+ }
5400
+ };
5401
+ let resultData = request.post(`/dataservice/rest/orchestration/getOfficeInfosByIDs`, queryData_groupData);
5402
+ let groupDatas = resultData.data.officeInfos;
5403
+ return groupDatas;
5404
+ };
5405
+
5353
5406
  // 查询门户映射应用信息
5354
5407
  // * @param appID 应用ID
5355
5408
  // * @param groupID 集团ID
@@ -5380,6 +5433,60 @@ const queryOfficeInfosById = async officeID => {
5380
5433
  let groupDptData = resultData.data.officeData;
5381
5434
  return groupDptData;
5382
5435
  };
5436
+
5437
+ /**
5438
+ * 登出账号
5439
+ * @param endside_type 0: web 1:手机
5440
+ * @returns {Promise<*>}
5441
+ * @param endside_type 0: web 1:手机
5442
+ *
5443
+ */
5444
+ const logoutAccount = async endside_type => {
5445
+ let resultData = request.get(`/system/authority/logout?isMobileLogout=${endside_type}`);
5446
+ return resultData;
5447
+ };
5448
+
5449
+ /**
5450
+ * 登录账号
5451
+ * @param data 登录数据
5452
+ * @param appid 应用ID
5453
+ *
5454
+ * @description
5455
+ * 登录时需要传入验证码(authPicCode)和应用ID(dataappId),
5456
+ * mobileOrWeb参数用于区分是移动端还是网页端登录。
5457
+ *
5458
+ * @returns
5459
+ */
5460
+ const loginAccount = (data, appid) => {
5461
+ return request.post(`/system/authority/loginAccount4Application?authPicCode=${data.imageCode}&dataappId=${appid}&mobileOrWeb=web`, data);
5462
+ };
5463
+
5464
+ /**
5465
+ * 获取登录门户账号密钥
5466
+ * @param {*} data
5467
+ * @returns
5468
+ */
5469
+ const getLoginPortalAccountKey = data => {
5470
+ let queryData = {
5471
+ "param": {
5472
+ "loginData": data
5473
+ }
5474
+ };
5475
+ return request.post(`/dataservice/rest/orchestration/getLoginPortalAccountKey`, queryData);
5476
+ };
5477
+
5478
+ /**
5479
+ * 获取密钥
5480
+ * @returns
5481
+ */
5482
+ const getKey = async () => {
5483
+ let queryData = {
5484
+ "param": {}
5485
+ };
5486
+ let resultData = await request.post(`/dataservice/rest/orchestration/getKey`, queryData);
5487
+ let key = resultData.data.key;
5488
+ return key;
5489
+ };
5383
5490
  ;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
5384
5491
 
5385
5492