@cloud-app-dev/vidc 1.0.35 → 1.0.39

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.
Files changed (49) hide show
  1. package/.umirc.ts +1 -1
  2. package/es/Api/index.d.ts +4 -1
  3. package/es/Api/index.js +90 -0
  4. package/es/AppLayout/index.d.ts +2 -2
  5. package/es/DeviceList/index.d.ts +2 -2
  6. package/es/DeviceList/index.js +5 -3
  7. package/es/DeviceSelect/demo.d.ts +2 -0
  8. package/es/DeviceSelect/demo.js +22 -0
  9. package/es/DeviceSelect/index.css +6 -0
  10. package/es/DeviceSelect/index.d.ts +7 -0
  11. package/es/DeviceSelect/index.js +222 -0
  12. package/es/DynamicDeviceList/CheckExt.d.ts +8 -0
  13. package/es/DynamicDeviceList/CheckExt.js +36 -0
  14. package/es/DynamicDeviceList/Demo.js +1 -5
  15. package/es/DynamicDeviceList/index.css +20 -0
  16. package/es/DynamicDeviceList/index.d.ts +7 -4
  17. package/es/DynamicDeviceList/index.js +100 -49
  18. package/es/DynamicDeviceList/utils.d.ts +1 -2
  19. package/es/OrgTree/index.js +5 -5
  20. package/es/OrgUserTree/index.d.ts +1 -1
  21. package/es/OrgUserTree/index.js +10 -10
  22. package/es/PlaceTree/demo.d.ts +2 -0
  23. package/es/PlaceTree/demo.js +20 -0
  24. package/es/PlaceTree/index.css +1 -0
  25. package/es/PlaceTree/index.d.ts +2 -2
  26. package/es/PlaceTree/index.js +27 -22
  27. package/es/TreeMode/demo.d.ts +2 -0
  28. package/es/TreeMode/demo.js +30 -0
  29. package/es/TreeMode/index.css +36 -0
  30. package/es/TreeMode/index.d.ts +21 -0
  31. package/es/TreeMode/index.js +190 -0
  32. package/es/TreeTitle/index.d.ts +2 -1
  33. package/es/TreeTitle/index.js +4 -2
  34. package/es/WorkerFlow/Form/GroupList.d.ts +1 -1
  35. package/es/WorkerFlow/Form/GroupList.js +3 -1
  36. package/es/WorkerFlow/Form/GroupSelectModalContent.js +11 -10
  37. package/es/WorkerFlow/Form/Notifier.js +2 -1
  38. package/es/WorkerFlow/Form/UserSelectModalContent.js +4 -3
  39. package/es/WorkerFlow/Form/UserSet.js +5 -2
  40. package/es/WorkerFlow/index.js +13 -6
  41. package/es/WorkerFlow/utils.d.ts +2 -0
  42. package/es/WorkerFlow/utils.js +35 -6
  43. package/es/core.d.ts +91 -0
  44. package/es/index.d.ts +2 -0
  45. package/es/index.js +2 -0
  46. package/es/utils.d.ts +6 -0
  47. package/es/utils.js +30 -1
  48. package/package.json +2 -2
  49. package/es/DynamicDeviceList/interface.d.ts +0 -75
package/es/utils.js CHANGED
@@ -21,10 +21,39 @@ export function getParentListById(id) {
21
21
  list.push(item);
22
22
 
23
23
  if (item[pkey]) {
24
- getParentListById(item[pkey], list, orgList);
24
+ getParentListById(item[pkey], orgList, list, key, pkey);
25
25
  }
26
26
  }
27
27
  }
28
28
 
29
29
  return list;
30
+ }
31
+ /**
32
+ * 获取场所下的所有场所codes
33
+ * @param {string} orgId
34
+ * @param {Array} ids = []
35
+ */
36
+
37
+ export function getPlaceCodesWithParent(areaCode) {
38
+ var list = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
39
+ var areaCodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
40
+ var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'areaCode';
41
+ var pkey = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'parentCode';
42
+ var info = list.find(function (v) {
43
+ return v[key] === areaCode;
44
+ });
45
+
46
+ if (info && info.pcodes) {
47
+ return info.pcodes.reverse();
48
+ }
49
+
50
+ if (info) {
51
+ areaCodes.push(areaCode);
52
+
53
+ if (info[pkey] && info[pkey] * 1 !== 0) {
54
+ getPlaceCodesWithParent(info.parentCode, areaCodes, list, key, pkey);
55
+ }
56
+ }
57
+
58
+ return areaCodes;
30
59
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "@cloud-app-dev/vidc",
4
4
  "description": "Video Image Data Componennts",
5
- "version": "1.0.35",
5
+ "version": "1.0.39",
6
6
  "scripts": {
7
7
  "start": "dumi dev",
8
8
  "docs:build": "dumi build",
@@ -38,7 +38,7 @@
38
38
  "rc-queue-anim": "^2.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@cloud-app-dev/basic-components": "^1.0.47",
41
+ "@cloud-app-dev/basic-components": "^1.0.51",
42
42
  "@types/chroma-js": "^2.1.3",
43
43
  "@types/lodash": "^4.14.172",
44
44
  "@umijs/test": "^3.0.5",
@@ -1,75 +0,0 @@
1
- export interface DeviceItemType {
2
- ability: any;
3
- accessType: null;
4
- aliasBrand: null;
5
- appSystemId: string;
6
- areaLevel: number;
7
- bindUserid: string;
8
- boxNum: string;
9
- buzGroupId: string;
10
- buzGroupIds: string[];
11
- buzGroupName: string;
12
- cameraType: string;
13
- capDirection: string;
14
- cid: string;
15
- createTime: string;
16
- deleteFlag: number;
17
- detailLiftBuild: number;
18
- detailLiftUnit: number;
19
- deviceBrand: number;
20
- deviceIp: string;
21
- deviceModel: string;
22
- deviceName: string;
23
- devicePlace: string;
24
- deviceStatus: 0 | 1;
25
- deviceType: string;
26
- extJson: any;
27
- fullPy: string;
28
- gbId: string;
29
- geoCoordinateSystem: string;
30
- groupId: string;
31
- groupIds: string[];
32
- groupName: string;
33
- hadLocaltion: boolean;
34
- hasFrontEnd: boolean;
35
- hasStorage: boolean;
36
- id: string;
37
- inOutDirection: any;
38
- industry: any;
39
- industry1: string;
40
- industry2: string;
41
- installationLocationDetail: any;
42
- installationMethod: any;
43
- installationSite: any;
44
- ipAddr: any;
45
- ipV6Addr: any;
46
- isBind: any;
47
- isIdleDeal: any;
48
- latitude: number;
49
- longitude: number;
50
- maintenancePerson: any;
51
- maintenancePhone: any;
52
- maintenanceUnit: any;
53
- manufacturerDeviceType: string;
54
- monitorAreaDesc: any;
55
- monitorDirection: any;
56
- operationCenterIds: any;
57
- orgCode: any;
58
- parentId: any;
59
- pathId: string[];
60
- place: string;
61
- placeCode: string;
62
- placeId: string;
63
- placeIds: string[];
64
- placeName: null;
65
- placeTags: string[];
66
- port: string;
67
- ptzControl: string;
68
- simpPy: string;
69
- sn: string;
70
- snapshotMode: string;
71
- sourceFrom: string;
72
- superiorGbcode: string;
73
- tags: string;
74
- villageLocationType: string;
75
- }