@cloud-app-dev/vidc 1.0.33 → 1.0.37
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/.umirc.ts +2 -2
- package/es/{WorkerFlow/api.d.ts → Api/index.d.ts} +4 -1
- package/es/{WorkerFlow/api.js → Api/index.js} +90 -0
- package/es/AppLayout/index.d.ts +2 -2
- package/es/DeviceList/index.css +3 -0
- package/es/DeviceList/index.d.ts +12 -11
- package/es/DeviceList/index.js +54 -110
- package/es/DeviceSelect/demo.d.ts +2 -0
- package/es/DeviceSelect/demo.js +22 -0
- package/es/DeviceSelect/index.css +6 -0
- package/es/DeviceSelect/index.d.ts +7 -0
- package/es/DeviceSelect/index.js +222 -0
- package/es/DynamicDeviceList/CheckExt.d.ts +8 -0
- package/es/DynamicDeviceList/CheckExt.js +36 -0
- package/es/DynamicDeviceList/Demo.js +1 -5
- package/es/DynamicDeviceList/index.css +20 -0
- package/es/DynamicDeviceList/index.d.ts +7 -4
- package/es/DynamicDeviceList/index.js +100 -49
- package/es/DynamicDeviceList/utils.d.ts +1 -2
- package/es/List/index.css +2 -2
- package/es/OrgTree/index.js +5 -5
- package/es/OrgUserTree/demo.d.ts +2 -0
- package/es/OrgUserTree/demo.js +20 -0
- package/es/OrgUserTree/index.css +31 -0
- package/es/OrgUserTree/index.d.ts +22 -0
- package/es/OrgUserTree/index.js +128 -0
- package/es/PlaceTree/demo.d.ts +2 -0
- package/es/PlaceTree/demo.js +20 -0
- package/es/PlaceTree/index.css +1 -0
- package/es/PlaceTree/index.d.ts +2 -2
- package/es/PlaceTree/index.js +27 -22
- package/es/{WorkerFlow/RefDrawer → RefDrawer}/index.d.ts +5 -1
- package/es/{WorkerFlow/RefDrawer → RefDrawer}/index.js +6 -17
- package/es/{WorkerFlow/RefModal → RefModal}/index.d.ts +5 -1
- package/es/{WorkerFlow/RefModal → RefModal}/index.js +6 -17
- package/es/TreeMode/demo.d.ts +2 -0
- package/es/TreeMode/demo.js +30 -0
- package/es/TreeMode/index.css +36 -0
- package/es/TreeMode/index.d.ts +21 -0
- package/es/TreeMode/index.js +190 -0
- package/es/TreeTitle/index.css +1 -0
- package/es/TreeTitle/index.d.ts +3 -2
- package/es/TreeTitle/index.js +4 -2
- package/es/UserSelect/index.css +16 -0
- package/es/UserSelect/index.d.ts +10 -0
- package/es/UserSelect/index.js +168 -0
- package/es/WorkerFlow/Form/Condition.js +1 -1
- package/es/WorkerFlow/Form/EmptyUserSet.js +1 -1
- package/es/WorkerFlow/Form/GroupList.d.ts +1 -1
- package/es/WorkerFlow/Form/GroupList.js +3 -1
- package/es/WorkerFlow/Form/GroupSelect.js +1 -1
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +12 -11
- package/es/WorkerFlow/Form/LevelGroupSelect.js +1 -1
- package/es/WorkerFlow/Form/Notifier.js +2 -1
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +1 -1
- package/es/WorkerFlow/Form/UserSelect.js +1 -1
- package/es/WorkerFlow/Form/UserSelectModalContent.js +26 -25
- package/es/WorkerFlow/index.css +1 -1
- package/es/WorkerFlow/index.js +2 -2
- package/es/WorkerFlow/utils.js +6 -2
- package/es/core.d.ts +91 -0
- package/es/index.d.ts +7 -0
- package/es/index.js +7 -0
- package/es/utils.d.ts +10 -0
- package/es/utils.js +54 -1
- package/package.json +5 -5
- package/tsconfig.json +0 -1
- package/es/DynamicDeviceList/interface.d.ts +0 -75
|
@@ -23,7 +23,7 @@ import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react'
|
|
|
23
23
|
import _ from 'lodash';
|
|
24
24
|
import chroma from 'chroma-js';
|
|
25
25
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
26
|
-
import RefModal from '
|
|
26
|
+
import RefModal from '../../RefModal';
|
|
27
27
|
|
|
28
28
|
function EmptyUserSet(_ref) {
|
|
29
29
|
var _this = this;
|
|
@@ -6,5 +6,5 @@ interface IGroupListProps {
|
|
|
6
6
|
keywords?: string;
|
|
7
7
|
onChecked: (ids: string[]) => void;
|
|
8
8
|
}
|
|
9
|
-
declare function GroupList({ list, onKeywordChange, onChecked }: IGroupListProps): JSX.Element;
|
|
9
|
+
declare function GroupList({ list, onKeywordChange, onChecked, checkedKeys }: IGroupListProps): JSX.Element;
|
|
10
10
|
export default GroupList;
|
|
@@ -6,7 +6,8 @@ import TreeTitle from '../../TreeTitle';
|
|
|
6
6
|
function GroupList(_ref) {
|
|
7
7
|
var list = _ref.list,
|
|
8
8
|
onKeywordChange = _ref.onKeywordChange,
|
|
9
|
-
onChecked = _ref.onChecked
|
|
9
|
+
onChecked = _ref.onChecked,
|
|
10
|
+
checkedKeys = _ref.checkedKeys;
|
|
10
11
|
return /*#__PURE__*/React.createElement("div", {
|
|
11
12
|
className: "lm-c-check-list-wrapper vidc-list-component post-group-list"
|
|
12
13
|
}, /*#__PURE__*/React.createElement(TreeTitle, {
|
|
@@ -17,6 +18,7 @@ function GroupList(_ref) {
|
|
|
17
18
|
}), /*#__PURE__*/React.createElement("div", {
|
|
18
19
|
className: "lm-c-base-list-layout"
|
|
19
20
|
}, /*#__PURE__*/React.createElement(_Checkbox.Group, {
|
|
21
|
+
value: checkedKeys,
|
|
20
22
|
onChange: function onChange(v) {
|
|
21
23
|
return onChecked(v);
|
|
22
24
|
}
|
|
@@ -24,7 +24,7 @@ import _ from 'lodash';
|
|
|
24
24
|
import chroma from 'chroma-js';
|
|
25
25
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
26
26
|
import { formatRenderGroup } from './utils';
|
|
27
|
-
import RefModal from '
|
|
27
|
+
import RefModal from '../../RefModal';
|
|
28
28
|
|
|
29
29
|
function GroupSelect(_ref) {
|
|
30
30
|
var _this = this;
|
|
@@ -21,8 +21,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
21
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
|
|
23
23
|
import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
|
|
24
|
-
import api from '
|
|
25
|
-
import
|
|
24
|
+
import api from '../../Api';
|
|
25
|
+
import TreeMode from '../../TreeMode';
|
|
26
26
|
import List from '../../List';
|
|
27
27
|
import { uniq, intersectionWith } from 'lodash';
|
|
28
28
|
import { treeHelper } from '@cloud-app-dev/utils';
|
|
@@ -66,10 +66,10 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
66
66
|
return id ? api.getPosts(id) : Promise.resolve();
|
|
67
67
|
}),
|
|
68
68
|
_useHttp3$data = _useHttp3.data,
|
|
69
|
-
|
|
69
|
+
groupList = _useHttp3$data === void 0 ? [] : _useHttp3$data;
|
|
70
70
|
|
|
71
71
|
var onUserChecked1 = useCallback(function (ids) {
|
|
72
|
-
var items =
|
|
72
|
+
var items = groupList.filter(function (v) {
|
|
73
73
|
return ids.includes(v.id);
|
|
74
74
|
});
|
|
75
75
|
var arr = [];
|
|
@@ -90,7 +90,7 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
90
90
|
selectIds: uniq([].concat(_toConsumableArray(old.selectIds), _toConsumableArray(ids)))
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
|
-
}, [
|
|
93
|
+
}, [groupList, orgList]);
|
|
94
94
|
var onUserChecked2 = useCallback(function (ids) {
|
|
95
95
|
return setState(function (old) {
|
|
96
96
|
return Object.assign(Object.assign({}, old), {
|
|
@@ -99,12 +99,12 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
99
99
|
});
|
|
100
100
|
}, []);
|
|
101
101
|
var list1CheckedKeys = useMemo(function () {
|
|
102
|
-
return intersectionWith(
|
|
102
|
+
return intersectionWith(groupList, state.selectUsers, function (a, b) {
|
|
103
103
|
return a.id === b.value;
|
|
104
104
|
}).map(function (v) {
|
|
105
105
|
return v.id;
|
|
106
106
|
});
|
|
107
|
-
}, [
|
|
107
|
+
}, [groupList, state.selectUsers]);
|
|
108
108
|
useImperativeHandle(ref, function () {
|
|
109
109
|
return {
|
|
110
110
|
userList: state.selectUsers.filter(function (v) {
|
|
@@ -117,8 +117,9 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
117
117
|
}, [state.selectUsers]);
|
|
118
118
|
return /*#__PURE__*/React.createElement("div", {
|
|
119
119
|
className: "user-select-modal-content"
|
|
120
|
-
}, /*#__PURE__*/React.createElement(
|
|
120
|
+
}, /*#__PURE__*/React.createElement(TreeMode, {
|
|
121
121
|
treeData: treeData,
|
|
122
|
+
mode: "Org",
|
|
122
123
|
title: "\u7EC4\u7EC7\u673A\u6784",
|
|
123
124
|
onSelect: function onSelect(ids) {
|
|
124
125
|
return setState(function (old) {
|
|
@@ -127,11 +128,11 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
127
128
|
});
|
|
128
129
|
});
|
|
129
130
|
},
|
|
130
|
-
|
|
131
|
+
selectedKeys: [selectId]
|
|
131
132
|
}), /*#__PURE__*/React.createElement(List, {
|
|
132
133
|
onChecked: onUserChecked1,
|
|
133
|
-
list:
|
|
134
|
-
key:
|
|
134
|
+
list: groupList,
|
|
135
|
+
key: groupList.length,
|
|
135
136
|
checkedKeys: list1CheckedKeys,
|
|
136
137
|
itemKey: "id",
|
|
137
138
|
itemNameKey: "postName",
|
|
@@ -26,7 +26,7 @@ import _ from 'lodash';
|
|
|
26
26
|
import chroma from 'chroma-js';
|
|
27
27
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
28
28
|
import { formatRenderGroup } from './utils';
|
|
29
|
-
import RefModal from '
|
|
29
|
+
import RefModal from '../../RefModal';
|
|
30
30
|
|
|
31
31
|
function LevelGroupSelect(_ref) {
|
|
32
32
|
var _this = this;
|
|
@@ -7,7 +7,8 @@ function NotifierForm(_ref) {
|
|
|
7
7
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(UserSet, {
|
|
8
8
|
userType: item.userType,
|
|
9
9
|
nodeUserList: item.nodeUserList,
|
|
10
|
-
onChange: onChange
|
|
10
|
+
onChange: onChange,
|
|
11
|
+
includeUserTypes: [1]
|
|
11
12
|
}));
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -26,7 +26,7 @@ import _ from 'lodash';
|
|
|
26
26
|
import chroma from 'chroma-js';
|
|
27
27
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
28
28
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
29
|
-
import RefModal from '
|
|
29
|
+
import RefModal from '../../RefModal';
|
|
30
30
|
|
|
31
31
|
function UserAndGroupSelect(_ref) {
|
|
32
32
|
var _this = this;
|
|
@@ -23,7 +23,7 @@ import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react'
|
|
|
23
23
|
import _ from 'lodash';
|
|
24
24
|
import chroma from 'chroma-js';
|
|
25
25
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
26
|
-
import RefModal from '
|
|
26
|
+
import RefModal from '../../RefModal';
|
|
27
27
|
|
|
28
28
|
function UserSelect(_ref) {
|
|
29
29
|
var _this = this;
|
|
@@ -21,11 +21,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
21
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
|
|
23
23
|
import React, { useCallback, useMemo, useState, forwardRef, useImperativeHandle } from 'react';
|
|
24
|
-
import api from '
|
|
25
|
-
import
|
|
26
|
-
import { treeHelper } from '@cloud-app-dev/utils';
|
|
24
|
+
import api from '../../Api';
|
|
25
|
+
import TreeMode from '../../TreeMode';
|
|
27
26
|
import List from '../../List';
|
|
28
|
-
import { uniq, intersectionWith } from 'lodash';
|
|
27
|
+
import { uniq, intersectionWith, uniqBy, differenceWith } from 'lodash';
|
|
29
28
|
var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalContent(_ref, ref) {
|
|
30
29
|
var selectUsers = _ref.selectUsers;
|
|
31
30
|
|
|
@@ -34,6 +33,9 @@ var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalCon
|
|
|
34
33
|
keyword2: '',
|
|
35
34
|
orgId: '',
|
|
36
35
|
selectUsers: selectUsers,
|
|
36
|
+
list1CheckedKeys: selectUsers.map(function (v) {
|
|
37
|
+
return v.value;
|
|
38
|
+
}),
|
|
37
39
|
selectIds: selectUsers.map(function (v) {
|
|
38
40
|
return v.value;
|
|
39
41
|
})
|
|
@@ -42,33 +44,23 @@ var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalCon
|
|
|
42
44
|
state = _useState2[0],
|
|
43
45
|
setState = _useState2[1];
|
|
44
46
|
|
|
45
|
-
var _useHttp = _useHttp2('
|
|
46
|
-
return api.getOrgs();
|
|
47
|
-
}),
|
|
48
|
-
_useHttp$data = _useHttp.data,
|
|
49
|
-
orgList = _useHttp$data === void 0 ? [] : _useHttp$data;
|
|
50
|
-
|
|
51
|
-
var treeData = useMemo(function () {
|
|
52
|
-
return treeHelper.computTreeList(orgList);
|
|
53
|
-
}, [orgList]);
|
|
54
|
-
var selectId = useMemo(function () {
|
|
55
|
-
return state.orgId ? state.orgId : treeData[0] ? treeData[0].id : undefined;
|
|
56
|
-
}, [treeData, state.orgId]);
|
|
57
|
-
|
|
58
|
-
var _useHttp3 = _useHttp2(['QueryUserList', selectId], function (_ref2) {
|
|
47
|
+
var _useHttp = _useHttp2(['QueryUserList', state.orgId], function (_ref2) {
|
|
59
48
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
60
49
|
_ = _ref3[0],
|
|
61
50
|
id = _ref3[1];
|
|
62
51
|
|
|
63
52
|
return id ? api.getUsers(id) : Promise.resolve();
|
|
64
53
|
}),
|
|
65
|
-
|
|
66
|
-
userList =
|
|
54
|
+
_useHttp$data = _useHttp.data,
|
|
55
|
+
userList = _useHttp$data === void 0 ? [] : _useHttp$data;
|
|
67
56
|
|
|
68
57
|
var onUserChecked1 = useCallback(function (ids) {
|
|
69
58
|
var items = userList.filter(function (v) {
|
|
70
59
|
return ids.includes(v.id);
|
|
71
60
|
});
|
|
61
|
+
var notInList = differenceWith(state.selectUsers, userList, function (a, b) {
|
|
62
|
+
return a.value === b.id;
|
|
63
|
+
});
|
|
72
64
|
var arr = [];
|
|
73
65
|
items.forEach(function (item) {
|
|
74
66
|
arr.push({
|
|
@@ -79,11 +71,12 @@ var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalCon
|
|
|
79
71
|
});
|
|
80
72
|
setState(function (old) {
|
|
81
73
|
return Object.assign(Object.assign({}, old), {
|
|
82
|
-
selectUsers: arr,
|
|
74
|
+
selectUsers: uniqBy([].concat(_toConsumableArray(notInList), arr), 'value'),
|
|
75
|
+
list1CheckedKeys: ids,
|
|
83
76
|
selectIds: uniq([].concat(_toConsumableArray(old.selectIds), _toConsumableArray(ids)))
|
|
84
77
|
});
|
|
85
78
|
});
|
|
86
|
-
}, [userList]);
|
|
79
|
+
}, [userList, state.selectUsers]);
|
|
87
80
|
var onUserChecked2 = useCallback(function (ids) {
|
|
88
81
|
return setState(function (old) {
|
|
89
82
|
return Object.assign(Object.assign({}, old), {
|
|
@@ -107,9 +100,16 @@ var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalCon
|
|
|
107
100
|
}, [state.selectUsers, state.selectIds]);
|
|
108
101
|
return /*#__PURE__*/React.createElement("div", {
|
|
109
102
|
className: "user-select-modal-content"
|
|
110
|
-
}, /*#__PURE__*/React.createElement(
|
|
111
|
-
treeData: treeData,
|
|
103
|
+
}, /*#__PURE__*/React.createElement(TreeMode, {
|
|
112
104
|
title: "\u7EC4\u7EC7\u673A\u6784",
|
|
105
|
+
onDefailtSelect: function onDefailtSelect(orgId) {
|
|
106
|
+
return setState(function (old) {
|
|
107
|
+
return Object.assign(Object.assign({}, old), {
|
|
108
|
+
orgId: orgId
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
inputPlaceholder: "\u8BF7\u8F93\u5165\u540D\u79F0",
|
|
113
113
|
onSelect: function onSelect(ids) {
|
|
114
114
|
return setState(function (old) {
|
|
115
115
|
return Object.assign(Object.assign({}, old), {
|
|
@@ -117,7 +117,8 @@ var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalCon
|
|
|
117
117
|
});
|
|
118
118
|
});
|
|
119
119
|
},
|
|
120
|
-
|
|
120
|
+
selectedKeys: [state.orgId],
|
|
121
|
+
mode: "Org"
|
|
121
122
|
}), /*#__PURE__*/React.createElement(List, {
|
|
122
123
|
onChecked: onUserChecked1,
|
|
123
124
|
list: userList,
|
package/es/WorkerFlow/index.css
CHANGED
package/es/WorkerFlow/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import Render from './Nodes/Render';
|
|
|
37
37
|
import Tools from './Tools';
|
|
38
38
|
import WFC from './OperatorContext';
|
|
39
39
|
import { filterNoticeNode, getJAVATaskData, getUserFormKeys } from './utils';
|
|
40
|
-
import RefDrawer from '
|
|
40
|
+
import RefDrawer from '../RefDrawer';
|
|
41
41
|
import "./index.css";
|
|
42
42
|
var FormMap = {
|
|
43
43
|
1: ApproverForm,
|
|
@@ -231,7 +231,7 @@ function WorkerFlow(_ref, ref) {
|
|
|
231
231
|
|
|
232
232
|
var blob = _exportBpmnFile(newConfig, id, name);
|
|
233
233
|
|
|
234
|
-
var taskList = getJAVATaskData(
|
|
234
|
+
var taskList = getJAVATaskData(cloneDeep(config));
|
|
235
235
|
var useFormKeys = getUserFormKeys(newConfig);
|
|
236
236
|
return {
|
|
237
237
|
config: {
|
package/es/WorkerFlow/utils.js
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
5
|
+
"version": "1.0.37",
|
|
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
|
-
"
|
|
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
|
@@ -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
|
-
}
|