isdata-customer-sdk 0.1.30 → 0.1.32

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
@@ -4879,6 +4879,7 @@ __webpack_require__.r(__webpack_exports__);
4879
4879
 
4880
4880
  // EXPORTS
4881
4881
  __webpack_require__.d(__webpack_exports__, {
4882
+ addObjectUsedTimes: function() { return /* reexport */ addObjectUsedTimes; },
4882
4883
  fireEvent: function() { return /* reexport */ fireEvent; },
4883
4884
  getAppPortalMenuDatas: function() { return /* reexport */ getAppPortalMenuDatas; },
4884
4885
  getCurrentUserPortalPageID: function() { return /* reexport */ getCurrentUserPortalPageID; },
@@ -4888,11 +4889,16 @@ __webpack_require__.d(__webpack_exports__, {
4888
4889
  getMappingAppInfoByID: function() { return /* reexport */ getMappingAppInfoByID; },
4889
4890
  getMenuDatasByGroupID: function() { return /* reexport */ getMenuDatasByGroupID; },
4890
4891
  getMenuDatasByRoleIDs: function() { return /* reexport */ getMenuDatasByRoleIDs; },
4892
+ getObjectUseTimes: function() { return /* reexport */ getObjectUseTimes; },
4891
4893
  getOfficeInfosByIDs: function() { return /* reexport */ getOfficeInfosByIDs; },
4894
+ getPageIDByComponentID: function() { return /* reexport */ getPageIDByComponentID; },
4892
4895
  getPoratlAppID: function() { return /* reexport */ getPoratlAppID; },
4896
+ getPortalPageConfig: function() { return /* reexport */ getPortalPageConfig; },
4893
4897
  getPortalPageMenuID: function() { return /* reexport */ getPortalPageMenuID; },
4898
+ getPortalUserMappingInfos: function() { return /* reexport */ getPortalUserMappingInfos; },
4894
4899
  getRoleIDsByUserAndGroupID: function() { return /* reexport */ getRoleIDsByUserAndGroupID; },
4895
4900
  getUrlParamValue: function() { return /* reexport */ getUrlParamValue; },
4901
+ getUserAllMappngPortal: function() { return /* reexport */ getUserAllMappngPortal; },
4896
4902
  loginAccount: function() { return /* reexport */ loginAccount; },
4897
4903
  logoutAccount: function() { return /* reexport */ logoutAccount; },
4898
4904
  queryAssetById: function() { return /* reexport */ queryAssetById; },
@@ -4901,7 +4907,8 @@ __webpack_require__.d(__webpack_exports__, {
4901
4907
  queryOfficeInfosById: function() { return /* reexport */ queryOfficeInfosById; },
4902
4908
  registerEventListener: function() { return /* reexport */ registerEventListener; },
4903
4909
  removeEventListener: function() { return /* reexport */ removeEventListener; },
4904
- transformPortalData: function() { return /* reexport */ transformPortalData; }
4910
+ setPortalPageConfig: function() { return /* reexport */ setPortalPageConfig; },
4911
+ updateUserSelectPortal: function() { return /* reexport */ updateUserSelectPortal; }
4905
4912
  });
4906
4913
 
4907
4914
  ;// ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
@@ -4922,6 +4929,36 @@ if (typeof window !== 'undefined') {
4922
4929
  // Indicate to webpack that this file can be concatenated
4923
4930
  /* harmony default export */ var setPublicPath = (null);
4924
4931
 
4932
+ ;// ./src/api/event.js
4933
+ /**
4934
+ * 注册事件监听器
4935
+ * @param {} eventName
4936
+ * @param {*} actionFun
4937
+ */
4938
+ const registerEventListener = (eventName, actionFun) => {
4939
+ let eventBus = window.rjEventCenter;
4940
+ if (eventBus && eventBus.register) {
4941
+ eventBus.register(eventName, actionFun);
4942
+ }
4943
+ };
4944
+
4945
+ /**
4946
+ * 移除事件监听器
4947
+ * @param {*} eventName
4948
+ * @param {*} actionFun
4949
+ */
4950
+ const removeEventListener = (eventName, actionFun) => {
4951
+ let eventBus = window.rjEventCenter;
4952
+ if (eventBus && eventBus.unregister) {
4953
+ eventBus.unregister(eventName, actionFun);
4954
+ }
4955
+ };
4956
+ const fireEvent = (eventName, eventData) => {
4957
+ let eventBus = window.rjEventCenter;
4958
+ if (eventBus && eventBus.fireEvent) {
4959
+ eventBus.fireEvent(eventName, eventData);
4960
+ }
4961
+ };
4925
4962
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
4926
4963
  var es_array_push = __webpack_require__(4114);
4927
4964
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
@@ -4986,68 +5023,13 @@ const getInstance = (prefix = "") => {
4986
5023
  };
4987
5024
  let prefixPath = window.prefixPath || "";
4988
5025
  /* harmony default export */ var request = (getInstance(prefixPath));
4989
- ;// ./src/main.js
4990
-
5026
+ ;// ./src/api/portal.js
4991
5027
 
4992
5028
 
4993
5029
 
4994
5030
 
4995
5031
 
4996
5032
 
4997
- /**
4998
- * 查询资产
4999
- * @param id 资产ID
5000
- *
5001
- */
5002
- const queryAssetById = (id, count = 200) => request.post(`/asset/getAssetData?asset_id=${id}&count=${count}`, {
5003
- filters: []
5004
- });
5005
-
5006
- /**
5007
- * 获取URL参数值
5008
- * @param {} eventName
5009
- * @param {*} actionFun
5010
- */
5011
- const getUrlParamValue = (urlStr, paramName) => {
5012
- try {
5013
- const url = new URL(urlStr);
5014
- const value = url.searchParams.get(paramName);
5015
- return value;
5016
- } catch (err) {
5017
- console.error('URL 格式错误:', err);
5018
- return "";
5019
- }
5020
- };
5021
- /**
5022
- * 注册事件监听器
5023
- * @param {} eventName
5024
- * @param {*} actionFun
5025
- */
5026
- const registerEventListener = (eventName, actionFun) => {
5027
- let eventBus = window.rjEventCenter;
5028
- if (eventBus && eventBus.register) {
5029
- eventBus.register(eventName, actionFun);
5030
- }
5031
- };
5032
-
5033
- /**
5034
- * 移除事件监听器
5035
- * @param {*} eventName
5036
- * @param {*} actionFun
5037
- */
5038
- const removeEventListener = (eventName, actionFun) => {
5039
- let eventBus = window.rjEventCenter;
5040
- if (eventBus && eventBus.unregister) {
5041
- eventBus.unregister(eventName, actionFun);
5042
- }
5043
- };
5044
- const fireEvent = (eventName, eventData) => {
5045
- let eventBus = window.rjEventCenter;
5046
- if (eventBus && eventBus.fireEvent) {
5047
- eventBus.fireEvent(eventName, eventData);
5048
- }
5049
- };
5050
-
5051
5033
  /**
5052
5034
  * 获取门户应用ID
5053
5035
  * @param {*} isPortalAction 是否是门户操作
@@ -5190,6 +5172,14 @@ const getRoleIDsByUserAndGroupID = async (user_id, app_id, group_id) => {
5190
5172
  //获取菜单数据
5191
5173
  return role_ids;
5192
5174
  };
5175
+
5176
+ /**
5177
+ * 转换门户菜单数据
5178
+ * @param {*} datas
5179
+ * @param {*} menuTypes
5180
+ * @param {*} filterObjectMap
5181
+ * @returns
5182
+ */
5193
5183
  const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5194
5184
  // console.log(datas);
5195
5185
  let menuMaps = {};
@@ -5311,23 +5301,6 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5311
5301
  return menuList;
5312
5302
  };
5313
5303
 
5314
- /**
5315
- * 查询当前企业组织的集团组织ID
5316
- * @param id 组织ID
5317
- *
5318
- */
5319
- const queryGroupIDByOfficeId = async id => {
5320
- let queryData_office = {
5321
- "param": {
5322
- "id": id
5323
- }
5324
- };
5325
- let result = await request.post(`/dataservice/rest/orchestration/getGroupIDByDptID`, queryData_office);
5326
- let groupDptData = result.data.resultDptData;
5327
- let group_id = groupDptData.id;
5328
- return group_id;
5329
- };
5330
-
5331
5304
  /**
5332
5305
  * 获取当前用户默认的门户页面ID
5333
5306
  *
@@ -5347,70 +5320,94 @@ const getCurrentUserPortalPageID = async userData => {
5347
5320
  };
5348
5321
 
5349
5322
  /**
5350
- * 获取当前用户在门户中的默认页面ID
5351
- *
5352
- * 该方法用于获取当前用户在门户中的默认页面ID
5353
- * @param {信息} userData
5323
+ * 获取当前用户在门户中的所有映射数据
5324
+ * @param {信息} data
5354
5325
  * @returns
5355
5326
  */
5356
- const getPortalPageMenuID = async (pageID, app_id) => {
5327
+ const getUserAllMappngPortal = data => {
5357
5328
  let queryData = {
5358
5329
  "param": {
5359
- "id": pageID,
5360
- "appid": app_id
5330
+ "userData": data
5361
5331
  }
5362
5332
  };
5363
- let response = await request.post(`/dataservice/rest/orchestration/getPortalPageMenuID`, queryData);
5364
- let menu_id = response.data.menu_id;
5365
- return menu_id;
5333
+ return request.post(`/dataservice/rest/orchestration/getUserAllMappngPortal`, queryData);
5366
5334
  };
5367
5335
 
5368
5336
  /**
5369
- * 通过账户名获取集团组织映射数据
5370
- * @param {*} account
5337
+ * 获取用户关联门户关联映射信息
5338
+ * @param {信息} data
5371
5339
  * @returns
5372
5340
  */
5373
- const getGroupMappingsByAccount = async account => {
5341
+ const getPortalUserMappingInfos = async data => {
5374
5342
  let queryData = {
5375
5343
  "param": {
5376
- "account": account
5344
+ "operateData": data
5377
5345
  }
5378
5346
  };
5379
- let resultData = await request.post(`/dataservice/rest/orchestration/getGourpMappingsByAccountName`, queryData);
5380
- let tenetGroupDatas = resultData.data.resultGroups;
5381
- return tenetGroupDatas;
5347
+ let responseData = await request.post(`/dataservice/rest/orchestration/getPortalUserMappingInfos`, queryData);
5348
+ let userMappingData = responseData.data.portalMapping;
5349
+ return userMappingData;
5382
5350
  };
5383
5351
 
5384
5352
  /**
5385
- * 查询当前企业组织的集团组织ID
5386
- * @param id 组织ID
5387
- *
5353
+ * 通过页面ID获取页面配置
5354
+ * @param {信息} data
5355
+ * @returns
5388
5356
  */
5389
- const queryGroupInfosByOfficeId = async id => {
5390
- let queryData_office = {
5357
+ const getPortalPageConfig = async pageID => {
5358
+ let queryData = {
5391
5359
  "param": {
5392
- "id": id
5360
+ "id": pageID
5393
5361
  }
5394
5362
  };
5395
- let result = await request.post(`/dataservice/rest/orchestration/getGroupIDByDptID`, queryData_office);
5396
- let groupDptData = result.data.resultDptData;
5397
- return groupDptData;
5363
+ let pageConfigResponse = await request.post(`/dataservice/rest/orchestration/getPortalPageConfig`, queryData);
5364
+ let configStr = pageConfigResponse.data.portal_page_config || "[]";
5365
+ return configStr;
5398
5366
  };
5399
5367
 
5400
5368
  /**
5401
- * 查询当前企业组织信息
5402
- * @param id 组织ID
5403
- *
5369
+ * 通过页面ID设置页面配置
5370
+ * @param {信息} data
5371
+ * @returns
5404
5372
  */
5405
- const getOfficeInfosByIDs = async group_ids => {
5406
- let queryData_groupData = {
5373
+ const setPortalPageConfig = configData => {
5374
+ let queryData = {
5375
+ "param": configData
5376
+ };
5377
+ return request.post(`/dataservice/rest/orchestration/setPortalPageConfig`, queryData);
5378
+ };
5379
+
5380
+ /**
5381
+ * 更新用户选择的门户
5382
+ * @param {信息} data
5383
+ * @returns
5384
+ */
5385
+ const updateUserSelectPortal = data => {
5386
+ let queryData = {
5407
5387
  "param": {
5408
- "ids": group_ids
5388
+ "portalMappingData": data
5409
5389
  }
5410
5390
  };
5411
- let resultData = await request.post(`/dataservice/rest/orchestration/getOfficeInfosByIDs`, queryData_groupData);
5412
- let groupDatas = resultData.data.officeInfos;
5413
- return groupDatas;
5391
+ return request.post(`/dataservice/rest/orchestration/updateUserSelectPortal`, queryData);
5392
+ };
5393
+
5394
+ /**
5395
+ * 获取当前用户在门户中的默认页面ID
5396
+ *
5397
+ * 该方法用于获取当前用户在门户中的默认页面ID
5398
+ * @param {信息} userData
5399
+ * @returns
5400
+ */
5401
+ const getPortalPageMenuID = async (pageID, app_id) => {
5402
+ let queryData = {
5403
+ "param": {
5404
+ "id": pageID,
5405
+ "appid": app_id
5406
+ }
5407
+ };
5408
+ let response = await request.post(`/dataservice/rest/orchestration/getPortalPageMenuID`, queryData);
5409
+ let menu_id = response.data.menu_id;
5410
+ return menu_id;
5414
5411
  };
5415
5412
 
5416
5413
  // 查询门户映射应用信息
@@ -5427,22 +5424,7 @@ const getMappingAppInfoByID = async (appID, groupID) => {
5427
5424
  let appInfo = resultData.data.appInfo;
5428
5425
  return appInfo;
5429
5426
  };
5430
-
5431
- /**
5432
- * 查询当前企业组织信息
5433
- * @param id 组织ID
5434
- *
5435
- */
5436
- const queryOfficeInfosById = async officeID => {
5437
- let queryData = {
5438
- "param": {
5439
- "id": officeID
5440
- }
5441
- };
5442
- let resultData = await request.post(`/dataservice/rest/orchestration/getOfficeInfosByID`, queryData);
5443
- let groupDptData = resultData.data.officeData;
5444
- return groupDptData;
5445
- };
5427
+ ;// ./src/api/security.js
5446
5428
 
5447
5429
  /**
5448
5430
  * 登出账号
@@ -5497,6 +5479,163 @@ const getKey = async () => {
5497
5479
  let key = resultData.data.key;
5498
5480
  return key;
5499
5481
  };
5482
+ ;// ./src/api/utils.js
5483
+
5484
+
5485
+ /**
5486
+ * 查询资产
5487
+ * @param id 资产ID
5488
+ *
5489
+ */
5490
+ const queryAssetById = (id, count = 200) => request.post(`/asset/getAssetData?asset_id=${id}&count=${count}`, {
5491
+ filters: []
5492
+ });
5493
+
5494
+ /**
5495
+ * 获取URL参数值
5496
+ * @param {} eventName
5497
+ * @param {*} actionFun
5498
+ */
5499
+ const getUrlParamValue = (urlStr, paramName) => {
5500
+ try {
5501
+ const url = new URL(urlStr);
5502
+ const value = url.searchParams.get(paramName);
5503
+ return value;
5504
+ } catch (err) {
5505
+ console.error('URL 格式错误:', err);
5506
+ return "";
5507
+ }
5508
+ };
5509
+
5510
+ /**
5511
+ * 查询当前企业组织的集团组织ID
5512
+ * @param id 组织ID
5513
+ *
5514
+ */
5515
+ const queryGroupIDByOfficeId = async id => {
5516
+ let queryData_office = {
5517
+ "param": {
5518
+ "id": id
5519
+ }
5520
+ };
5521
+ let result = await request.post(`/dataservice/rest/orchestration/getGroupIDByDptID`, queryData_office);
5522
+ let groupDptData = result.data.resultDptData;
5523
+ let group_id = groupDptData.id;
5524
+ return group_id;
5525
+ };
5526
+
5527
+ /**
5528
+ * 添加或更新对象使用次数
5529
+ * @param {信息} data
5530
+ * @returns
5531
+ */
5532
+ const addObjectUsedTimes = data => {
5533
+ let queryData = {
5534
+ "param": {
5535
+ "operateData": data
5536
+ }
5537
+ };
5538
+ return request.post(`/dataservice/rest/orchestration/addObjectUsedTimes`, queryData);
5539
+ };
5540
+
5541
+ /**
5542
+ * 获取对象使用次数
5543
+ * @param {信息} data
5544
+ * @returns
5545
+ */
5546
+ const getObjectUseTimes = data => {
5547
+ let queryData = {
5548
+ "param": {
5549
+ "objectInfo": data
5550
+ }
5551
+ };
5552
+ return request.post(`/dataservice/rest/orchestration/getObjectUseTimes`, queryData);
5553
+ };
5554
+
5555
+ /**
5556
+ * 获取组件的页面ID
5557
+ * @param {信息} data
5558
+ * @returns
5559
+ */
5560
+ const getPageIDByComponentID = async componentID => {
5561
+ let queryData = {
5562
+ "param": {
5563
+ "componentID": componentID
5564
+ }
5565
+ };
5566
+ let response = await request.post(`/dataservice/rest/orchestration/getPageIDByComponentID`, queryData);
5567
+ let pageID = response.data.page_id;
5568
+ return pageID;
5569
+ };
5570
+
5571
+ /**
5572
+ * 通过账户名获取集团组织映射数据
5573
+ * @param {*} account
5574
+ * @returns
5575
+ */
5576
+ const getGroupMappingsByAccount = async account => {
5577
+ let queryData = {
5578
+ "param": {
5579
+ "account": account
5580
+ }
5581
+ };
5582
+ let resultData = await request.post(`/dataservice/rest/orchestration/getGourpMappingsByAccountName`, queryData);
5583
+ let tenetGroupDatas = resultData.data.resultGroups;
5584
+ return tenetGroupDatas;
5585
+ };
5586
+
5587
+ /**
5588
+ * 查询当前企业组织的集团组织ID
5589
+ * @param id 组织ID
5590
+ *
5591
+ */
5592
+ const queryGroupInfosByOfficeId = async id => {
5593
+ let queryData_office = {
5594
+ "param": {
5595
+ "id": id
5596
+ }
5597
+ };
5598
+ let result = await request.post(`/dataservice/rest/orchestration/getGroupIDByDptID`, queryData_office);
5599
+ let groupDptData = result.data.resultDptData;
5600
+ return groupDptData;
5601
+ };
5602
+
5603
+ /**
5604
+ * 查询当前企业组织信息
5605
+ * @param id 组织ID
5606
+ *
5607
+ */
5608
+ const getOfficeInfosByIDs = async group_ids => {
5609
+ let queryData_groupData = {
5610
+ "param": {
5611
+ "ids": group_ids
5612
+ }
5613
+ };
5614
+ let resultData = await request.post(`/dataservice/rest/orchestration/getOfficeInfosByIDs`, queryData_groupData);
5615
+ let groupDatas = resultData.data.officeInfos;
5616
+ return groupDatas;
5617
+ };
5618
+
5619
+ /**
5620
+ * 查询当前企业组织信息
5621
+ * @param id 组织ID
5622
+ *
5623
+ */
5624
+ const queryOfficeInfosById = async officeID => {
5625
+ let queryData = {
5626
+ "param": {
5627
+ "id": officeID
5628
+ }
5629
+ };
5630
+ let resultData = await request.post(`/dataservice/rest/orchestration/getOfficeInfosByID`, queryData);
5631
+ let groupDptData = resultData.data.officeData;
5632
+ return groupDptData;
5633
+ };
5634
+ ;// ./src/main.js
5635
+
5636
+
5637
+
5638
+
5500
5639
  ;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
5501
5640
 
5502
5641