@cloud-app-dev/vidc 1.0.32 → 1.0.36

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 (67) hide show
  1. package/.umirc.ts +2 -2
  2. package/es/{WorkerFlow/api.d.ts → Api/index.d.ts} +4 -1
  3. package/es/{WorkerFlow/api.js → Api/index.js} +90 -0
  4. package/es/DeviceList/index.css +3 -0
  5. package/es/DeviceList/index.d.ts +12 -11
  6. package/es/DeviceList/index.js +54 -110
  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/List/index.css +2 -2
  20. package/es/OrgTree/index.js +5 -5
  21. package/es/OrgUserTree/demo.d.ts +2 -0
  22. package/es/OrgUserTree/demo.js +20 -0
  23. package/es/OrgUserTree/index.css +31 -0
  24. package/es/OrgUserTree/index.d.ts +22 -0
  25. package/es/OrgUserTree/index.js +128 -0
  26. package/es/PlaceTree/demo.d.ts +2 -0
  27. package/es/PlaceTree/demo.js +20 -0
  28. package/es/PlaceTree/index.css +1 -0
  29. package/es/PlaceTree/index.d.ts +2 -2
  30. package/es/PlaceTree/index.js +27 -22
  31. package/es/RefDrawer/index.d.ts +15 -0
  32. package/es/RefDrawer/index.js +72 -0
  33. package/es/RefModal/index.d.ts +15 -0
  34. package/es/RefModal/index.js +74 -0
  35. package/es/TreeMode/demo.d.ts +2 -0
  36. package/es/TreeMode/demo.js +30 -0
  37. package/es/TreeMode/index.css +36 -0
  38. package/es/TreeMode/index.d.ts +21 -0
  39. package/es/TreeMode/index.js +190 -0
  40. package/es/TreeTitle/index.css +1 -0
  41. package/es/TreeTitle/index.d.ts +3 -2
  42. package/es/TreeTitle/index.js +4 -2
  43. package/es/UserSelect/index.css +16 -0
  44. package/es/UserSelect/index.d.ts +10 -0
  45. package/es/UserSelect/index.js +168 -0
  46. package/es/WorkerFlow/Form/Condition.js +7 -5
  47. package/es/WorkerFlow/Form/EmptyUserSet.js +6 -4
  48. package/es/WorkerFlow/Form/GroupList.d.ts +1 -1
  49. package/es/WorkerFlow/Form/GroupList.js +3 -1
  50. package/es/WorkerFlow/Form/GroupSelect.js +6 -4
  51. package/es/WorkerFlow/Form/GroupSelectModalContent.js +12 -11
  52. package/es/WorkerFlow/Form/LevelGroupSelect.js +6 -4
  53. package/es/WorkerFlow/Form/Notifier.js +2 -1
  54. package/es/WorkerFlow/Form/UserAndGroupSelect.js +6 -4
  55. package/es/WorkerFlow/Form/UserSelect.js +6 -4
  56. package/es/WorkerFlow/Form/UserSelectModalContent.js +26 -25
  57. package/es/WorkerFlow/index.css +1 -1
  58. package/es/WorkerFlow/index.js +8 -5
  59. package/es/WorkerFlow/utils.js +6 -2
  60. package/es/core.d.ts +91 -0
  61. package/es/index.d.ts +7 -0
  62. package/es/index.js +7 -0
  63. package/es/utils.d.ts +10 -0
  64. package/es/utils.js +54 -1
  65. package/package.json +5 -5
  66. package/tsconfig.json +0 -1
  67. package/es/DynamicDeviceList/interface.d.ts +0 -75
@@ -1,6 +1,5 @@
1
1
  import _useChangeEffect from "@cloud-app-dev/basic-components/es/useChangeEffect";
2
2
  import _Modal from "@cloud-app-dev/basic-components/es/Modal";
3
- import _useDrawer from "@cloud-app-dev/basic-components/es/useDrawer";
4
3
 
5
4
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
5
 
@@ -23,7 +22,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
23
22
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
23
 
25
24
  import { __awaiter } from "tslib";
26
- import React, { useCallback, useImperativeHandle, useMemo, useState } from 'react';
25
+ import React, { useCallback, useImperativeHandle, useMemo, useRef, useState } from 'react';
27
26
  import { OptionTypes, NodeTemplates, NodeTypes, createVNodeApprover } from './Nodes/Constants';
28
27
  import { downloadBpmnFile, exportBpmnFile as _exportBpmnFile } from './XML';
29
28
  import { createId, getEndEventId } from './XML/utils';
@@ -38,6 +37,7 @@ import Render from './Nodes/Render';
38
37
  import Tools from './Tools';
39
38
  import WFC from './OperatorContext';
40
39
  import { filterNoticeNode, getJAVATaskData, getUserFormKeys } from './utils';
40
+ import RefDrawer from '../RefDrawer';
41
41
  import "./index.css";
42
42
  var FormMap = {
43
43
  1: ApproverForm,
@@ -59,7 +59,7 @@ function WorkerFlow(_ref, ref) {
59
59
  config = _useState2[0],
60
60
  setConfig = _useState2[1];
61
61
 
62
- var drawer = _useDrawer();
62
+ var drawerRef = useRef(null);
63
63
 
64
64
  var updateNode = function updateNode() {
65
65
  return setConfig(Object.assign({}, config));
@@ -164,6 +164,7 @@ function WorkerFlow(_ref, ref) {
164
164
  return;
165
165
  }
166
166
 
167
+ var drawer = drawerRef.current;
167
168
  var data = {};
168
169
  var formKeys = Object.keys(FormMap);
169
170
 
@@ -230,7 +231,7 @@ function WorkerFlow(_ref, ref) {
230
231
 
231
232
  var blob = _exportBpmnFile(newConfig, id, name);
232
233
 
233
- var taskList = getJAVATaskData(newConfig);
234
+ var taskList = getJAVATaskData(cloneDeep(config));
234
235
  var useFormKeys = getUserFormKeys(newConfig);
235
236
  return {
236
237
  config: {
@@ -278,7 +279,9 @@ function WorkerFlow(_ref, ref) {
278
279
  }), /*#__PURE__*/React.createElement(EndNode, {
279
280
  nodeName: "\u6D41\u7A0B\u7ED3\u675F",
280
281
  id: endId
281
- })))));
282
+ })))), /*#__PURE__*/React.createElement(RefDrawer, {
283
+ ref: drawerRef
284
+ }));
282
285
  }
283
286
 
284
287
  export default /*#__PURE__*/React.forwardRef(WorkerFlow);
@@ -29,7 +29,7 @@ export function getJAVATaskData(data) {
29
29
  taskType: node.type === 5 ? 0 : 1
30
30
  };
31
31
 
32
- if (node.userType === 1 || node.userType === 2) {
32
+ if (node.userType === 1 || node.userType === 2 || node.userType === 3 || node.userType === 5) {
33
33
  item.assignPersonIds = node.nodeUserList.filter(function (v) {
34
34
  return v.key === 'userId';
35
35
  }).map(function (v) {
@@ -80,7 +80,11 @@ export function getJAVATaskData(data) {
80
80
  }
81
81
 
82
82
  if (node.childNode) {
83
- fn(node.childNode);
83
+ if (node.childNode.type === 2 && node.childNode.childNode) {
84
+ fn(node.childNode.childNode);
85
+ } else {
86
+ fn(node.childNode);
87
+ }
84
88
  }
85
89
  };
86
90
 
package/es/core.d.ts CHANGED
@@ -29,3 +29,94 @@ export interface PostItemType {
29
29
  postName: string;
30
30
  orgId: string;
31
31
  }
32
+
33
+ export type BzTreeItemType = {
34
+ appSysId: string;
35
+ createTime: number;
36
+ creator: number;
37
+ customType: number;
38
+ description: string;
39
+ groupName: string;
40
+ id: string;
41
+ level: number;
42
+ orderNo: number;
43
+ parentId: string;
44
+ treeDescription: string;
45
+ treeId: string;
46
+ };
47
+
48
+ export interface DeviceItemType {
49
+ ability: any;
50
+ accessType: null;
51
+ aliasBrand: null;
52
+ appSystemId: string;
53
+ areaLevel: number;
54
+ bindUserid: string;
55
+ boxNum: string;
56
+ buzGroupId: string;
57
+ buzGroupIds: string[];
58
+ buzGroupName: string;
59
+ cameraType: string;
60
+ capDirection: string;
61
+ cid: string;
62
+ createTime: string;
63
+ deleteFlag: number;
64
+ detailLiftBuild: number;
65
+ detailLiftUnit: number;
66
+ deviceBrand: number;
67
+ deviceIp: string;
68
+ deviceModel: string;
69
+ deviceName: string;
70
+ devicePlace: string;
71
+ deviceStatus: 0 | 1;
72
+ deviceType: string;
73
+ extJson: any;
74
+ fullPy: string;
75
+ gbId: string;
76
+ geoCoordinateSystem: string;
77
+ groupId: string;
78
+ groupIds: string[];
79
+ groupName: string;
80
+ hadLocaltion: boolean;
81
+ hasFrontEnd: boolean;
82
+ hasStorage: boolean;
83
+ id: string;
84
+ inOutDirection: any;
85
+ industry: any;
86
+ industry1: string;
87
+ industry2: string;
88
+ installationLocationDetail: any;
89
+ installationMethod: any;
90
+ installationSite: any;
91
+ ipAddr: any;
92
+ ipV6Addr: any;
93
+ isBind: any;
94
+ isIdleDeal: any;
95
+ latitude: number;
96
+ longitude: number;
97
+ maintenancePerson: any;
98
+ maintenancePhone: any;
99
+ maintenanceUnit: any;
100
+ manufacturerDeviceType: string;
101
+ monitorAreaDesc: any;
102
+ monitorDirection: any;
103
+ operationCenterIds: any;
104
+ orgCode: any;
105
+ parentId: any;
106
+ pathId: string[];
107
+ place: string;
108
+ placeCode: string;
109
+ placeId: string;
110
+ placeIds: string[];
111
+ placeName: null;
112
+ placeTags: string[];
113
+ port: string;
114
+ ptzControl: string;
115
+ simpPy: string;
116
+ sn: string;
117
+ snapshotMode: string;
118
+ sourceFrom: string;
119
+ superiorGbcode: string;
120
+ tags: string;
121
+ villageLocationType: string;
122
+ }
package/es/index.d.ts CHANGED
@@ -1,16 +1,23 @@
1
+ export { default as Api } from './Api';
1
2
  export { default as AppLayout } from './AppLayout';
2
3
  export { default as AutoExit } from './AutoExit';
3
4
  export { default as DagInitialConfig } from './DagInitialConfig';
4
5
  export { default as DagInitialRequest } from './DagInitialRequest';
5
6
  export { default as DeviceIcon } from './DeviceIcon';
6
7
  export { default as DeviceList } from './DeviceList';
8
+ export { default as DeviceSelect } from './DeviceSelect';
7
9
  export { default as DynamicDeviceList } from './DynamicDeviceList';
8
10
  export { default as FormContent } from './FormContent';
9
11
  export { default as InitialConfig } from './InitialConfig';
10
12
  export { default as InitialRequest } from './InitialRequest';
11
13
  export { default as List } from './List';
12
14
  export { default as OrgTree } from './OrgTree';
15
+ export { default as OrgUserTree } from './OrgUserTree';
13
16
  export { default as PlaceTree } from './PlaceTree';
17
+ export { default as RefDrawer } from './RefDrawer';
18
+ export { default as RefModal } from './RefModal';
19
+ export { default as TreeMode } from './TreeMode';
14
20
  export { default as TreeTitle } from './TreeTitle';
15
21
  export { default as Upload } from './Upload';
22
+ export { default as UserSelect } from './UserSelect';
16
23
  export { default as WorkerFlow } from './WorkerFlow';
package/es/index.js CHANGED
@@ -1,16 +1,23 @@
1
+ export { default as Api } from './Api';
1
2
  export { default as AppLayout } from './AppLayout';
2
3
  export { default as AutoExit } from './AutoExit';
3
4
  export { default as DagInitialConfig } from './DagInitialConfig';
4
5
  export { default as DagInitialRequest } from './DagInitialRequest';
5
6
  export { default as DeviceIcon } from './DeviceIcon';
6
7
  export { default as DeviceList } from './DeviceList';
8
+ export { default as DeviceSelect } from './DeviceSelect';
7
9
  export { default as DynamicDeviceList } from './DynamicDeviceList';
8
10
  export { default as FormContent } from './FormContent';
9
11
  export { default as InitialConfig } from './InitialConfig';
10
12
  export { default as InitialRequest } from './InitialRequest';
11
13
  export { default as List } from './List';
12
14
  export { default as OrgTree } from './OrgTree';
15
+ export { default as OrgUserTree } from './OrgUserTree';
13
16
  export { default as PlaceTree } from './PlaceTree';
17
+ export { default as RefDrawer } from './RefDrawer';
18
+ export { default as RefModal } from './RefModal';
19
+ export { default as TreeMode } from './TreeMode';
14
20
  export { default as TreeTitle } from './TreeTitle';
15
21
  export { default as Upload } from './Upload';
22
+ export { default as UserSelect } from './UserSelect';
16
23
  export { default as WorkerFlow } from './WorkerFlow';
package/es/utils.d.ts CHANGED
@@ -1,3 +1,13 @@
1
1
  export declare const getHeader: () => {
2
2
  Authorization: any;
3
3
  };
4
+ /**
5
+ * @desc 根据id获取所有父级
6
+ */
7
+ export declare function getParentListById(id: string, orgList?: any[], list?: any[], key?: string, pkey?: string): any[];
8
+ /**
9
+ * 获取场所下的所有场所codes
10
+ * @param {string} orgId
11
+ * @param {Array} ids = []
12
+ */
13
+ export declare function getPlaceCodesWithParent(areaCode: string, list?: any[], areaCodes?: string[], key?: string, pkey?: string): any;
package/es/utils.js CHANGED
@@ -3,4 +3,57 @@ export var getHeader = function getHeader() {
3
3
  return {
4
4
  Authorization: cache.getCache('token', 'session')
5
5
  };
6
- };
6
+ };
7
+ /**
8
+ * @desc 根据id获取所有父级
9
+ */
10
+
11
+ export function getParentListById(id) {
12
+ var orgList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
13
+ var list = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
14
+ var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'id';
15
+ var pkey = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'parentId';
16
+
17
+ for (var i = 0, len = orgList.length; i < len; i++) {
18
+ var item = orgList[i];
19
+
20
+ if (item[key] === id) {
21
+ list.push(item);
22
+
23
+ if (item[pkey]) {
24
+ getParentListById(item[pkey], orgList, list, key, pkey);
25
+ }
26
+ }
27
+ }
28
+
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;
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.32",
5
+ "version": "1.0.36",
6
6
  "scripts": {
7
7
  "start": "dumi dev",
8
8
  "docs:build": "dumi build",
@@ -30,19 +30,19 @@
30
30
  ]
31
31
  },
32
32
  "dependencies": {
33
+ "@cloud-app-dev/utils": "^1.0.2",
33
34
  "chroma-js": "^2.1.2",
34
35
  "jsencrypt": "^3.2.1",
35
36
  "lodash": "^4.17.21",
36
37
  "mobx": "^6.3.2",
37
- "rc-queue-anim": "^2.0.0",
38
- "@cloud-app-dev/utils": "^1.0.1"
38
+ "rc-queue-anim": "^2.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "antd": "^4.17.0",
42
- "@cloud-app-dev/basic-components": "^1.0.46",
41
+ "@cloud-app-dev/basic-components": "^1.0.49",
43
42
  "@types/chroma-js": "^2.1.3",
44
43
  "@types/lodash": "^4.14.172",
45
44
  "@umijs/test": "^3.0.5",
45
+ "antd": "^4.17.0",
46
46
  "babel-plugin-import": "^1.13.3",
47
47
  "dumi": "^1.1.25",
48
48
  "father-build": "^1.19.8",
package/tsconfig.json CHANGED
@@ -26,7 +26,6 @@
26
26
  "skipLibCheck": true,
27
27
  "resolveJsonModule": true,
28
28
  "paths": {
29
- "@/*": ["src/*"],
30
29
  "@@/*": ["src/.umi/*"],
31
30
  "@@@/*": ["docs/*"]
32
31
  },
@@ -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
- }