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