@cloud-app-dev/vidc 1.0.42 → 1.0.43
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/.fatherrc.js +3 -0
- package/.umirc.ts +3 -0
- package/es/AppLayout/AppHorizontalMenu/index.js +4 -3
- package/es/AppLayout/AppInlineMenu/index.js +4 -3
- package/es/AppLayout/AppLogo/index.js +2 -2
- package/es/AppLayout/FunctionPreview/index.js +5 -4
- package/es/AppLayout/Header/NotifyAlarm.js +13 -7
- package/es/AppLayout/Header/Tools.js +2 -2
- package/es/AppLayout/Header/UserAction.js +2 -2
- package/es/AppLayout/service/index.js +5 -5
- package/es/AppLayout/utils.js +4 -3
- package/es/DagInitialRequest/utils.js +7 -8
- package/es/InitialRequest/index.js +2 -2
- package/es/InitialRequest/utils.js +8 -9
- package/es/OrgUserTree/index.js +2 -2
- package/es/PlaceTree/index.js +2 -2
- package/es/TreeMode/index.js +2 -2
- package/es/UserSelect/demo.d.ts +2 -0
- package/es/UserSelect/demo.js +20 -0
- package/es/UserSelect/index.js +8 -5
- package/es/WorkerFlow/Demo.js +2 -1
- package/es/WorkerFlow/Form/Condition.js +4 -1
- package/es/WorkerFlow/Form/FormAuth.js +1 -1
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +25 -13
- package/es/WorkerFlow/Form/Handle.js +1 -1
- package/es/WorkerFlow/Form/Notifier.js +2 -1
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +41 -2
- package/es/WorkerFlow/Form/UserSelectModalContent.js +12 -2
- package/es/WorkerFlow/Form/UserSet.d.ts +3 -2
- package/es/WorkerFlow/Form/UserSet.js +8 -5
- package/es/WorkerFlow/Form/UsersHandleType.js +3 -1
- package/es/WorkerFlow/Nodes/Condition.js +7 -10
- package/es/WorkerFlow/Nodes/TitleElement.js +1 -1
- package/es/WorkerFlow/index.css +12 -2
- package/es/WorkerFlow/interface.d.ts +2 -1
- package/es/WorkerFlow/utils.d.ts +2 -2
- package/es/WorkerFlow/utils.js +2 -3
- package/es/utils.js +2 -2
- package/package.json +1 -1
package/.fatherrc.js
CHANGED
|
@@ -11,5 +11,8 @@ export default {
|
|
|
11
11
|
extraBabelPlugins: [
|
|
12
12
|
['import', { libraryName: 'antd', style: true }, 'antd'],
|
|
13
13
|
['import', { libraryName: '@cloud-app-dev/basic-components', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'basic-components'],
|
|
14
|
+
['import', { libraryName: '@cloud-app-dev/utils', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'utils'],
|
|
15
|
+
['import', { libraryName: 'ahooks', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'ahooks'],
|
|
16
|
+
['import', { libraryName: '@cloud-app-dev/map', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'map-components'],
|
|
14
17
|
],
|
|
15
18
|
};
|
package/.umirc.ts
CHANGED
|
@@ -14,6 +14,9 @@ export default defineConfig({
|
|
|
14
14
|
extraBabelPlugins: [
|
|
15
15
|
['import', { libraryName: 'antd', style: true }, 'antd'],
|
|
16
16
|
['import', { libraryName: '@cloud-app-dev/basic-components', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'basic-components'],
|
|
17
|
+
['import', { libraryName: '@cloud-app-dev/utils', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'utils'],
|
|
18
|
+
['import', { libraryName: 'ahooks', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'ahooks'],
|
|
19
|
+
['import', { libraryName: '@cloud-app-dev/map', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'map-components'],
|
|
17
20
|
],
|
|
18
21
|
theme: {
|
|
19
22
|
'@ant-prefix': 'cloudapp',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import "antd/lib/popover/style";
|
|
2
2
|
import _Popover from "antd/lib/popover";
|
|
3
3
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
|
+
import _uuid from "@cloud-app-dev/utils/es/uuid";
|
|
5
|
+
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
4
6
|
|
|
5
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
8
|
|
|
@@ -16,7 +18,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
18
|
|
|
17
19
|
import React, { useState, useMemo, useCallback, useRef, useEffect } from 'react';
|
|
18
20
|
import { inject, observer } from 'mobx-react';
|
|
19
|
-
import { treeHelper, uuid } from '@cloud-app-dev/utils';
|
|
20
21
|
import { updateFunctionCount } from '../utils';
|
|
21
22
|
import FunctionPreview from '../FunctionPreview';
|
|
22
23
|
import QueueAnim from 'rc-queue-anim';
|
|
@@ -35,7 +36,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
35
36
|
});
|
|
36
37
|
}, [auth.userMenuList]);
|
|
37
38
|
var menuList = useMemo(function () {
|
|
38
|
-
return renderMenu ?
|
|
39
|
+
return renderMenu ? _treeHelper.computTreeList(filterMenus, 'code', 'parentCode') : [];
|
|
39
40
|
}, [filterMenus, renderMenu]);
|
|
40
41
|
|
|
41
42
|
var _useState = useState({
|
|
@@ -70,7 +71,7 @@ function AppHorizontalMenu(_ref) {
|
|
|
70
71
|
var menu = auth.userMenuList.find(function (v) {
|
|
71
72
|
return +v.code === +item.code;
|
|
72
73
|
});
|
|
73
|
-
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(
|
|
74
|
+
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(_uuid()) : ''));
|
|
74
75
|
setTimeout(function () {
|
|
75
76
|
return setState(function (old) {
|
|
76
77
|
return Object.assign(Object.assign({}, old), {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import "antd/lib/tooltip/style";
|
|
2
2
|
import _Tooltip from "antd/lib/tooltip";
|
|
3
3
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
|
+
import _uuid from "@cloud-app-dev/utils/es/uuid";
|
|
5
|
+
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
4
6
|
|
|
5
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
8
|
|
|
@@ -16,7 +18,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
18
|
|
|
17
19
|
import React, { useCallback, useLayoutEffect, useMemo, useState } from 'react';
|
|
18
20
|
import { inject, observer } from 'mobx-react';
|
|
19
|
-
import { treeHelper, uuid } from '@cloud-app-dev/utils';
|
|
20
21
|
import QueueAnim from 'rc-queue-anim';
|
|
21
22
|
import FunctionPreview from '../FunctionPreview';
|
|
22
23
|
import SubGroup from './SubGroup';
|
|
@@ -45,7 +46,7 @@ function AppInlineMenu(_ref) {
|
|
|
45
46
|
});
|
|
46
47
|
}, [auth.userMenuList]);
|
|
47
48
|
var menuList = useMemo(function () {
|
|
48
|
-
return
|
|
49
|
+
return _treeHelper.computTreeList(filterMenus, 'code', 'parentCode');
|
|
49
50
|
}, [filterMenus]);
|
|
50
51
|
var popStyle = useMemo(function () {
|
|
51
52
|
return {
|
|
@@ -62,7 +63,7 @@ function AppInlineMenu(_ref) {
|
|
|
62
63
|
var menu = auth.userMenuList.find(function (v) {
|
|
63
64
|
return +v.code === +item.code;
|
|
64
65
|
});
|
|
65
|
-
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(
|
|
66
|
+
history.push("".concat(menu.routeUrl).concat(e.ctrlKey || e.metaKey ? "?key=".concat(_uuid()) : ''));
|
|
66
67
|
|
|
67
68
|
if (flag) {
|
|
68
69
|
setState(function (old) {
|
|
@@ -3,6 +3,7 @@ import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
|
3
3
|
import "antd/lib/col/style";
|
|
4
4
|
import _Col from "antd/lib/col";
|
|
5
5
|
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
6
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
6
7
|
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
7
8
|
|
|
8
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -18,7 +19,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
18
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
20
|
|
|
20
21
|
import React, { useState, useEffect, useMemo } from 'react';
|
|
21
|
-
import { cache } from '@cloud-app-dev/utils';
|
|
22
22
|
import "./index.css";
|
|
23
23
|
export default function AppLogo(_ref) {
|
|
24
24
|
var systemLogo = _ref.systemLogo,
|
|
@@ -40,7 +40,7 @@ export default function AppLogo(_ref) {
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var GatewayState = useMemo(function () {
|
|
43
|
-
return
|
|
43
|
+
return _cache.getCache('GATEWAY_STATE', 'session');
|
|
44
44
|
}, []);
|
|
45
45
|
useEffect(function () {
|
|
46
46
|
var _a; //用户名显示是否加入行政区划
|
|
@@ -2,6 +2,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
2
2
|
|
|
3
3
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
4
|
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
5
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
5
6
|
|
|
6
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
8
|
|
|
@@ -26,7 +27,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
26
27
|
import { __awaiter } from "tslib";
|
|
27
28
|
import React from 'react';
|
|
28
29
|
import { getFunctionCount, clearFunctionCount, deleteFunctionItemCount } from '../utils';
|
|
29
|
-
import { cache } from '@cloud-app-dev/utils';
|
|
30
30
|
import "./index.css";
|
|
31
31
|
var CACHE_KEY = 'functionCount';
|
|
32
32
|
var _global = window;
|
|
@@ -46,7 +46,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
46
46
|
|
|
47
47
|
_this.getNearList = function () {
|
|
48
48
|
getFunctionCount().then(function (counts) {
|
|
49
|
-
|
|
49
|
+
_cache.setUserCache(CACHE_KEY, counts);
|
|
50
50
|
|
|
51
51
|
_this.setState({
|
|
52
52
|
nearList: counts.map(function (item) {
|
|
@@ -68,7 +68,8 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
68
68
|
return clearFunctionCount();
|
|
69
69
|
|
|
70
70
|
case 2:
|
|
71
|
-
|
|
71
|
+
_cache.setUserCache(CACHE_KEY, []);
|
|
72
|
+
|
|
72
73
|
this.setState({
|
|
73
74
|
nearList: []
|
|
74
75
|
});
|
|
@@ -104,7 +105,7 @@ var FunctionPreview = /*#__PURE__*/function (_React$Component) {
|
|
|
104
105
|
}));
|
|
105
106
|
};
|
|
106
107
|
|
|
107
|
-
var counts =
|
|
108
|
+
var counts = _cache.getUserCache(CACHE_KEY) || [];
|
|
108
109
|
_this.state = {
|
|
109
110
|
nearList: counts.map(function (item) {
|
|
110
111
|
return _Store.auth.getInfoByName(item.id);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
2
|
|
|
3
|
+
import _SocketEmitter from "@cloud-app-dev/utils/es/SocketEmitter";
|
|
3
4
|
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
4
5
|
|
|
5
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -24,7 +25,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
24
25
|
|
|
25
26
|
/* eslint-disable no-undef */
|
|
26
27
|
import React from 'react';
|
|
27
|
-
import { SocketEmitter } from '@cloud-app-dev/utils';
|
|
28
28
|
|
|
29
29
|
var NotifyAlarm = /*#__PURE__*/function (_React$Component) {
|
|
30
30
|
_inherits(NotifyAlarm, _React$Component);
|
|
@@ -79,17 +79,23 @@ var NotifyAlarm = /*#__PURE__*/function (_React$Component) {
|
|
|
79
79
|
_createClass(NotifyAlarm, [{
|
|
80
80
|
key: "componentDidMount",
|
|
81
81
|
value: function componentDidMount() {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
_SocketEmitter.subscribe('alarm', this.handleAlarm);
|
|
83
|
+
|
|
84
|
+
_SocketEmitter.subscribe('vehicleAlarmMessage', this.handleAlarm);
|
|
85
|
+
|
|
86
|
+
_SocketEmitter.subscribe('multiMonitorActivityMessage', this.handleAlarm);
|
|
85
87
|
}
|
|
86
88
|
}, {
|
|
87
89
|
key: "componentWillUnmount",
|
|
88
90
|
value: function componentWillUnmount() {
|
|
89
91
|
clearTimeout(this.timer);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
|
|
93
|
+
_SocketEmitter.unsubscribe('alarm', this.handleAlarm);
|
|
94
|
+
|
|
95
|
+
_SocketEmitter.unsubscribe('withoutCloakMessage', this.handleAlarm);
|
|
96
|
+
|
|
97
|
+
_SocketEmitter.unsubscribe('multiMonitorActivityMessage', this.handleAlarm);
|
|
98
|
+
|
|
93
99
|
this.audioRef = null;
|
|
94
100
|
this.timer = null;
|
|
95
101
|
}
|
|
@@ -4,10 +4,10 @@ import _FullScreen from "@cloud-app-dev/basic-components/es/FullScreen";
|
|
|
4
4
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
5
5
|
import "antd/lib/popover/style";
|
|
6
6
|
import _Popover from "antd/lib/popover";
|
|
7
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
7
8
|
import React, { useCallback, useMemo } from 'react';
|
|
8
9
|
import UserAction from './UserAction';
|
|
9
10
|
import ToolsItem from './ToolsItem';
|
|
10
|
-
import { cache } from '@cloud-app-dev/utils';
|
|
11
11
|
import { inject, observer } from 'mobx-react';
|
|
12
12
|
import NotifyAlarm from './NotifyAlarm';
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ function AppTools(_ref) {
|
|
|
17
17
|
isMenuHome = _ref.isMenuHome,
|
|
18
18
|
portalPath = _ref.portalPath;
|
|
19
19
|
var GatewayState = useMemo(function () {
|
|
20
|
-
return
|
|
20
|
+
return _cache.getCache('GATEWAY_STATE', 'session');
|
|
21
21
|
}, []);
|
|
22
22
|
var handleGateway = useCallback(function () {
|
|
23
23
|
history.push(portalPath ? portalPath : !isMenuHome ? '/portalGateway/menuHome' : '/portalGateway/home');
|
|
@@ -4,6 +4,7 @@ import _Avatar from "antd/lib/avatar";
|
|
|
4
4
|
import _AuthComponent from "@cloud-app-dev/basic-components/es/AuthComponent";
|
|
5
5
|
import _ContentBox from "@cloud-app-dev/basic-components/es/ContentBox";
|
|
6
6
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
7
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
7
8
|
|
|
8
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
10
|
|
|
@@ -19,7 +20,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
20
|
|
|
20
21
|
import { __awaiter } from "tslib";
|
|
21
22
|
import React, { useCallback, useReducer, useMemo } from 'react';
|
|
22
|
-
import { cache } from '@cloud-app-dev/utils';
|
|
23
23
|
import ModifyUserAvatar from './ModifyUserAvatar';
|
|
24
24
|
import ModifyPassword from './ModifyPassword';
|
|
25
25
|
import UserService from '../service'; //用户个人中心下模块
|
|
@@ -104,7 +104,7 @@ function UserAction(_ref) {
|
|
|
104
104
|
}, []); //门户
|
|
105
105
|
|
|
106
106
|
var GatewayState = useMemo(function () {
|
|
107
|
-
return
|
|
107
|
+
return _cache.getCache('GATEWAY_STATE', 'session');
|
|
108
108
|
}, []);
|
|
109
109
|
var handleGateway = useCallback(function () {
|
|
110
110
|
history.push(portalPath || '/portalGateway/home');
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
2
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
2
3
|
|
|
3
4
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
5
|
|
|
@@ -11,7 +12,6 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11
12
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12
13
|
|
|
13
14
|
import URL from './url';
|
|
14
|
-
import { cache } from '@cloud-app-dev/utils';
|
|
15
15
|
import JSEncrypt from 'jsencrypt';
|
|
16
16
|
var RSA = {
|
|
17
17
|
decrypt: function decrypt(ciphertext, key) {
|
|
@@ -26,7 +26,7 @@ var RSA = {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
var defaultHeaders = {
|
|
29
|
-
Authorization:
|
|
29
|
+
Authorization: _cache.getCache('token', 'session')
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
var MainService = /*#__PURE__*/function () {
|
|
@@ -80,7 +80,7 @@ var MainService = /*#__PURE__*/function () {
|
|
|
80
80
|
key: "getPublicKey",
|
|
81
81
|
value: function getPublicKey() {
|
|
82
82
|
var headers = {
|
|
83
|
-
Authorization:
|
|
83
|
+
Authorization: _cache.getCache('token', 'session')
|
|
84
84
|
};
|
|
85
85
|
return _Service.$http({
|
|
86
86
|
headers: headers,
|
|
@@ -107,7 +107,7 @@ var MainService = /*#__PURE__*/function () {
|
|
|
107
107
|
switch (_context.prev = _context.next) {
|
|
108
108
|
case 0:
|
|
109
109
|
headers = {
|
|
110
|
-
Authorization:
|
|
110
|
+
Authorization: _cache.getCache('token', 'session')
|
|
111
111
|
};
|
|
112
112
|
_context.next = 3;
|
|
113
113
|
return this.getPublicKey();
|
|
@@ -160,7 +160,7 @@ var MainService = /*#__PURE__*/function () {
|
|
|
160
160
|
url: '/api/user/v1/getUserByToken',
|
|
161
161
|
method: 'post',
|
|
162
162
|
headers: {
|
|
163
|
-
Authorization:
|
|
163
|
+
Authorization: _cache.getCache('token', 'session')
|
|
164
164
|
},
|
|
165
165
|
requestId: 'getUserInfo'
|
|
166
166
|
});
|
package/es/AppLayout/utils.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import _SocketEmitter from "@cloud-app-dev/utils/es/SocketEmitter";
|
|
2
|
+
import _LM_DB from "@cloud-app-dev/utils/es/LM_DB";
|
|
1
3
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { LM_DB, SocketEmitter } from '@cloud-app-dev/utils';
|
|
3
4
|
import { orderBy } from 'lodash';
|
|
4
|
-
var db = new
|
|
5
|
+
var db = new _LM_DB('functionCount');
|
|
5
6
|
export function updateFunctionCount(name) {
|
|
6
7
|
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
7
8
|
var item, expireTime;
|
|
@@ -43,7 +44,7 @@ export function updateFunctionCount(name) {
|
|
|
43
44
|
});
|
|
44
45
|
|
|
45
46
|
case 11:
|
|
46
|
-
|
|
47
|
+
_SocketEmitter.emit('updateFunctionCount', null);
|
|
47
48
|
|
|
48
49
|
case 12:
|
|
49
50
|
case "end":
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
2
2
|
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
3
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
3
4
|
|
|
4
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
6
|
|
|
@@ -31,8 +32,6 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
31
32
|
|
|
32
33
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
33
34
|
|
|
34
|
-
import { cache } from '@cloud-app-dev/utils';
|
|
35
|
-
|
|
36
35
|
function catchPromise(fn) {
|
|
37
36
|
return new Promise(function (resolve) {
|
|
38
37
|
fn.then(function (res) {
|
|
@@ -58,7 +57,7 @@ function _initialization() {
|
|
|
58
57
|
switch (_context.prev = _context.next) {
|
|
59
58
|
case 0:
|
|
60
59
|
headers = {
|
|
61
|
-
Authorization:
|
|
60
|
+
Authorization: _cache.getCache('token', 'session')
|
|
62
61
|
};
|
|
63
62
|
_context.next = 3;
|
|
64
63
|
return _Service.$http({
|
|
@@ -159,7 +158,7 @@ function _initialization() {
|
|
|
159
158
|
|
|
160
159
|
export function queryOrganizationsList(options) {
|
|
161
160
|
var headers = {
|
|
162
|
-
Authorization:
|
|
161
|
+
Authorization: _cache.getCache('token', 'session')
|
|
163
162
|
};
|
|
164
163
|
var url = '/api/user/v1/organization/queryChildOrganizationsById';
|
|
165
164
|
return catchPromise(_Service.$http({
|
|
@@ -185,7 +184,7 @@ function _queryPlacesList() {
|
|
|
185
184
|
switch (_context2.prev = _context2.next) {
|
|
186
185
|
case 0:
|
|
187
186
|
headers = {
|
|
188
|
-
Authorization:
|
|
187
|
+
Authorization: _cache.getCache('token', 'session')
|
|
189
188
|
};
|
|
190
189
|
url = '/api/place/v1/getPlacesByHasDevice';
|
|
191
190
|
url2 = '/api/user/v1/organization/queryPlacesByOrganizationId';
|
|
@@ -230,7 +229,7 @@ function _queryPlacesList() {
|
|
|
230
229
|
|
|
231
230
|
function queryUserDevicesNew(data) {
|
|
232
231
|
var headers = {
|
|
233
|
-
Authorization:
|
|
232
|
+
Authorization: _cache.getCache('token', 'session')
|
|
234
233
|
};
|
|
235
234
|
var url = '/api/device/v1/queryDevices4User';
|
|
236
235
|
return _Service.$http({
|
|
@@ -244,7 +243,7 @@ function queryUserDevicesNew(data) {
|
|
|
244
243
|
|
|
245
244
|
function queryUserDevicesStatusNew(data) {
|
|
246
245
|
var headers = {
|
|
247
|
-
Authorization:
|
|
246
|
+
Authorization: _cache.getCache('token', 'session')
|
|
248
247
|
};
|
|
249
248
|
var url = '/api/device/v1/queryDeviceStatus4User';
|
|
250
249
|
return _Service.$http({
|
|
@@ -258,7 +257,7 @@ function queryUserDevicesStatusNew(data) {
|
|
|
258
257
|
|
|
259
258
|
function queryDeviceLocalRecordAbilityList(data) {
|
|
260
259
|
var headers = {
|
|
261
|
-
Authorization:
|
|
260
|
+
Authorization: _cache.getCache('token', 'session')
|
|
262
261
|
};
|
|
263
262
|
var url = '/api/device/v1/queryDeviceLocalRecordAbilityList';
|
|
264
263
|
return _Service.$http({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _logger from "@cloud-app-dev/utils/es/logger";
|
|
1
2
|
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
2
3
|
|
|
3
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -22,7 +23,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
22
23
|
|
|
23
24
|
import React, { useState, useEffect } from 'react';
|
|
24
25
|
import { initialization, queryOrganizationsList, queryPlacesList, queryUserDevice, authFormat, queryUserOrganizationsList } from './utils';
|
|
25
|
-
import { logger } from '@cloud-app-dev/utils';
|
|
26
26
|
var _BASE_DATA_INIT = false;
|
|
27
27
|
|
|
28
28
|
function InitialRequest(_ref) {
|
|
@@ -89,7 +89,7 @@ function InitialRequest(_ref) {
|
|
|
89
89
|
}).then(function () {
|
|
90
90
|
return setIsInit(true);
|
|
91
91
|
}).catch(function (e) {
|
|
92
|
-
return
|
|
92
|
+
return _logger.error('接口初始化失败!', e);
|
|
93
93
|
}); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
94
|
}, []);
|
|
95
95
|
return isInit ? children : Spin ? /*#__PURE__*/React.createElement(Spin, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
2
2
|
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
3
3
|
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
4
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
4
5
|
|
|
5
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
7
|
|
|
@@ -32,8 +33,6 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
32
33
|
|
|
33
34
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
34
35
|
|
|
35
|
-
import { cache } from '@cloud-app-dev/utils';
|
|
36
|
-
|
|
37
36
|
function catchPromise(fn) {
|
|
38
37
|
return new Promise(function (resolve) {
|
|
39
38
|
fn.then(function (res) {
|
|
@@ -59,7 +58,7 @@ function _initialization() {
|
|
|
59
58
|
switch (_context.prev = _context.next) {
|
|
60
59
|
case 0:
|
|
61
60
|
headers = {
|
|
62
|
-
Authorization:
|
|
61
|
+
Authorization: _cache.getCache('token', 'session')
|
|
63
62
|
};
|
|
64
63
|
_context.next = 3;
|
|
65
64
|
return _Service.$http({
|
|
@@ -213,7 +212,7 @@ function _queryOrganizationsList() {
|
|
|
213
212
|
switch (_context2.prev = _context2.next) {
|
|
214
213
|
case 0:
|
|
215
214
|
headers = {
|
|
216
|
-
Authorization:
|
|
215
|
+
Authorization: _cache.getCache('token', 'session')
|
|
217
216
|
};
|
|
218
217
|
url = '/api/udm-api/DeviceBuzTree/queryList';
|
|
219
218
|
_context2.next = 4;
|
|
@@ -258,7 +257,7 @@ function _queryUserOrganizationsList() {
|
|
|
258
257
|
switch (_context3.prev = _context3.next) {
|
|
259
258
|
case 0:
|
|
260
259
|
headers = {
|
|
261
|
-
Authorization:
|
|
260
|
+
Authorization: _cache.getCache('token', 'session')
|
|
262
261
|
};
|
|
263
262
|
url = '/api/user/v1/organization/queryChildOrganizationsById';
|
|
264
263
|
return _context3.abrupt("return", catchPromise(_Service.$http({
|
|
@@ -294,7 +293,7 @@ function _queryPlacesList() {
|
|
|
294
293
|
switch (_context4.prev = _context4.next) {
|
|
295
294
|
case 0:
|
|
296
295
|
headers = {
|
|
297
|
-
Authorization:
|
|
296
|
+
Authorization: _cache.getCache('token', 'session')
|
|
298
297
|
};
|
|
299
298
|
url = '/api/place/v1/getPlacesByHasDevice';
|
|
300
299
|
url2 = '/api/user/v1/organization/queryPlacesByOrganizationId';
|
|
@@ -339,7 +338,7 @@ function _queryPlacesList() {
|
|
|
339
338
|
|
|
340
339
|
function queryUserDevicesNew(data) {
|
|
341
340
|
var headers = {
|
|
342
|
-
Authorization:
|
|
341
|
+
Authorization: _cache.getCache('token', 'session')
|
|
343
342
|
};
|
|
344
343
|
var url = '/api/device/v1/queryDevices4User';
|
|
345
344
|
return _Service.$http({
|
|
@@ -353,7 +352,7 @@ function queryUserDevicesNew(data) {
|
|
|
353
352
|
|
|
354
353
|
function queryUserDevicesStatusNew(data) {
|
|
355
354
|
var headers = {
|
|
356
|
-
Authorization:
|
|
355
|
+
Authorization: _cache.getCache('token', 'session')
|
|
357
356
|
};
|
|
358
357
|
var url = '/api/device/v1/queryDeviceStatus4User';
|
|
359
358
|
return _Service.$http({
|
|
@@ -367,7 +366,7 @@ function queryUserDevicesStatusNew(data) {
|
|
|
367
366
|
|
|
368
367
|
function queryDeviceLocalRecordAbilityList(data) {
|
|
369
368
|
var headers = {
|
|
370
|
-
Authorization:
|
|
369
|
+
Authorization: _cache.getCache('token', 'session')
|
|
371
370
|
};
|
|
372
371
|
var url = '/api/device/v1/queryDeviceLocalRecordAbilityList';
|
|
373
372
|
return _Service.$http({
|
package/es/OrgUserTree/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
2
2
|
import _Tree from "@cloud-app-dev/basic-components/es/Tree";
|
|
3
3
|
import _CBox from "@cloud-app-dev/basic-components/es/CBox";
|
|
4
|
+
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
4
5
|
import _useHttp2 from "@cloud-app-dev/basic-components/es/useHttp";
|
|
5
6
|
|
|
6
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -27,7 +28,6 @@ import { __rest } from "tslib";
|
|
|
27
28
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
28
29
|
import api from '../Api';
|
|
29
30
|
import TreeTitle from '../TreeTitle';
|
|
30
|
-
import { treeHelper } from '@cloud-app-dev/utils';
|
|
31
31
|
import { getParentListById } from '../utils';
|
|
32
32
|
import "./index.css";
|
|
33
33
|
|
|
@@ -56,7 +56,7 @@ function OrgUserTree(_a) {
|
|
|
56
56
|
orgList = _useHttp$data === void 0 ? [] : _useHttp$data;
|
|
57
57
|
|
|
58
58
|
var treeData = useMemo(function () {
|
|
59
|
-
return
|
|
59
|
+
return _treeHelper.computTreeList(orgList);
|
|
60
60
|
}, [orgList]);
|
|
61
61
|
useEffect(function () {
|
|
62
62
|
var keys = [];
|
package/es/PlaceTree/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
|
2
2
|
import _Tree from "@cloud-app-dev/basic-components/es/Tree";
|
|
3
3
|
import _CBox from "@cloud-app-dev/basic-components/es/CBox";
|
|
4
4
|
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
5
|
+
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
5
6
|
|
|
6
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
7
8
|
|
|
@@ -25,7 +26,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
25
26
|
|
|
26
27
|
import { __rest } from "tslib";
|
|
27
28
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
28
|
-
import { treeHelper } from '@cloud-app-dev/utils';
|
|
29
29
|
import TreeTitle from '../TreeTitle';
|
|
30
30
|
import "./index.css";
|
|
31
31
|
|
|
@@ -62,7 +62,7 @@ function PlaceTree(params) {
|
|
|
62
62
|
setState = _useState2[1];
|
|
63
63
|
|
|
64
64
|
var treeDatas = useMemo(function () {
|
|
65
|
-
return treeData ||
|
|
65
|
+
return treeData || _treeHelper.computPlaceTree(_Store.place.placeList);
|
|
66
66
|
}, [treeData]);
|
|
67
67
|
var onExpand = useCallback(function (expandedKeys) {
|
|
68
68
|
return setState({
|
package/es/TreeMode/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
2
2
|
import _Tree from "@cloud-app-dev/basic-components/es/Tree";
|
|
3
3
|
import _CBox from "@cloud-app-dev/basic-components/es/CBox";
|
|
4
|
+
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
4
5
|
import _useHttp2 from "@cloud-app-dev/basic-components/es/useHttp";
|
|
5
6
|
|
|
6
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -27,7 +28,6 @@ import { __rest } from "tslib";
|
|
|
27
28
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
28
29
|
import api from '../Api';
|
|
29
30
|
import TreeTitle from '../TreeTitle';
|
|
30
|
-
import { treeHelper } from '@cloud-app-dev/utils';
|
|
31
31
|
import { getParentListById, getPlaceCodesWithParent } from '../utils';
|
|
32
32
|
import "./index.css";
|
|
33
33
|
var defaultList = [];
|
|
@@ -66,7 +66,7 @@ function TreeMode(_a) {
|
|
|
66
66
|
list = _useHttp$data === void 0 ? defaultList : _useHttp$data;
|
|
67
67
|
|
|
68
68
|
var treeData = useMemo(function () {
|
|
69
|
-
return mode === 'Place' ?
|
|
69
|
+
return mode === 'Place' ? _treeHelper.computPlaceTree(list) : _treeHelper.computTreeList(list);
|
|
70
70
|
}, [list, mode]);
|
|
71
71
|
/**
|
|
72
72
|
* @description 实现关键字展开节点
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "antd/lib/config-provider/style";
|
|
2
|
+
import _ConfigProvider from "antd/lib/config-provider";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import OrgTree from './index';
|
|
5
|
+
|
|
6
|
+
function App() {
|
|
7
|
+
return /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
8
|
+
prefixCls: "cloudapp"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
style: {
|
|
11
|
+
padding: 20,
|
|
12
|
+
width: 1000,
|
|
13
|
+
height: 600
|
|
14
|
+
}
|
|
15
|
+
}, /*#__PURE__*/React.createElement(OrgTree, {
|
|
16
|
+
selectUsers: []
|
|
17
|
+
})));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default App;
|
package/es/UserSelect/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _useChangeEffect from "@cloud-app-dev/basic-components/es/useChangeEffect";
|
|
2
|
+
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
2
3
|
import _useHttp2 from "@cloud-app-dev/basic-components/es/useHttp";
|
|
3
4
|
|
|
4
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -23,8 +24,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
23
24
|
|
|
24
25
|
import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
|
|
25
26
|
import api from '../Api';
|
|
26
|
-
import
|
|
27
|
-
import { treeHelper } from '@cloud-app-dev/utils';
|
|
27
|
+
import TreeMode from '../TreeMode';
|
|
28
28
|
import List from '../List';
|
|
29
29
|
import { uniq, intersectionWith, uniqBy, differenceWith } from 'lodash';
|
|
30
30
|
import "./index.css";
|
|
@@ -55,7 +55,7 @@ function UserSelect(_ref, ref) {
|
|
|
55
55
|
orgList = _useHttp$data === void 0 ? [] : _useHttp$data;
|
|
56
56
|
|
|
57
57
|
var treeData = useMemo(function () {
|
|
58
|
-
return
|
|
58
|
+
return _treeHelper.computTreeList(orgList);
|
|
59
59
|
}, [orgList]);
|
|
60
60
|
var selectId = useMemo(function () {
|
|
61
61
|
return state.orgId ? state.orgId : treeData[0] ? treeData[0].id : undefined;
|
|
@@ -120,7 +120,10 @@ function UserSelect(_ref, ref) {
|
|
|
120
120
|
|
|
121
121
|
return /*#__PURE__*/React.createElement("div", {
|
|
122
122
|
className: "user-select-modal-content ".concat(className)
|
|
123
|
-
}, /*#__PURE__*/React.createElement(
|
|
123
|
+
}, /*#__PURE__*/React.createElement(TreeMode, {
|
|
124
|
+
mode: "Org",
|
|
125
|
+
title: "\u7EC4\u7EC7\u673A\u6784",
|
|
126
|
+
inputPlaceholder: "\u8BF7\u8F93\u5165\u540D\u79F0",
|
|
124
127
|
onSelect: function onSelect(ids) {
|
|
125
128
|
return setState(function (old) {
|
|
126
129
|
return Object.assign(Object.assign({}, old), {
|
|
@@ -128,7 +131,7 @@ function UserSelect(_ref, ref) {
|
|
|
128
131
|
});
|
|
129
132
|
});
|
|
130
133
|
},
|
|
131
|
-
|
|
134
|
+
selectedKeys: [selectId]
|
|
132
135
|
}), /*#__PURE__*/React.createElement(List, {
|
|
133
136
|
onChecked: onUserChecked1,
|
|
134
137
|
list: userList,
|
package/es/WorkerFlow/Demo.js
CHANGED
|
@@ -56,6 +56,9 @@ function ConditionForm(_ref) {
|
|
|
56
56
|
}, [formItem.name, useConditionFields]);
|
|
57
57
|
var addCondition = useCallback(function () {
|
|
58
58
|
var modal = modalRef.current;
|
|
59
|
+
var allowForm = form.filter(function (v) {
|
|
60
|
+
return v.fromType === 'SINGLE_SELECTION' && v.required;
|
|
61
|
+
});
|
|
59
62
|
|
|
60
63
|
var onOk = function onOk() {
|
|
61
64
|
var _a, _b;
|
|
@@ -83,7 +86,7 @@ function ConditionForm(_ref) {
|
|
|
83
86
|
var options = {
|
|
84
87
|
content: /*#__PURE__*/React.createElement(ModalContent, {
|
|
85
88
|
ref: cRef,
|
|
86
|
-
form:
|
|
89
|
+
form: allowForm,
|
|
87
90
|
value: state.field
|
|
88
91
|
}),
|
|
89
92
|
width: 340,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
1
2
|
import _useHttp2 from "@cloud-app-dev/basic-components/es/useHttp";
|
|
2
3
|
|
|
3
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -23,9 +24,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
23
24
|
import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
|
|
24
25
|
import api from '../../Api';
|
|
25
26
|
import TreeMode from '../../TreeMode';
|
|
26
|
-
import List from '../../List';
|
|
27
27
|
import { uniq, intersectionWith } from 'lodash';
|
|
28
|
-
import { treeHelper } from '@cloud-app-dev/utils';
|
|
29
28
|
import { formatRenderGroup } from './utils';
|
|
30
29
|
import GroupList from './GroupList';
|
|
31
30
|
|
|
@@ -52,7 +51,7 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
52
51
|
orgList = _useHttp$data === void 0 ? [] : _useHttp$data;
|
|
53
52
|
|
|
54
53
|
var treeData = useMemo(function () {
|
|
55
|
-
return
|
|
54
|
+
return _treeHelper.computTreeList(orgList);
|
|
56
55
|
}, [orgList]);
|
|
57
56
|
var selectId = useMemo(function () {
|
|
58
57
|
return state.orgId ? state.orgId : treeData[0] ? treeData[0].id : undefined;
|
|
@@ -112,9 +111,26 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
112
111
|
})
|
|
113
112
|
};
|
|
114
113
|
}, [state.selectUsers, state.selectIds]);
|
|
114
|
+
var nodeUserList = useMemo(function () {
|
|
115
|
+
return formatRenderGroup(groupList.filter(function (v) {
|
|
116
|
+
return !state.keyword1 || v.postName.includes(state.keyword1);
|
|
117
|
+
}).map(function (v) {
|
|
118
|
+
var orgItem = orgList.find(function (v2) {
|
|
119
|
+
return v2.id === v.orgId;
|
|
120
|
+
});
|
|
121
|
+
return {
|
|
122
|
+
name: v.postName,
|
|
123
|
+
value: v.id,
|
|
124
|
+
key: 'groupId',
|
|
125
|
+
groupName: orgItem === null || orgItem === void 0 ? void 0 : orgItem.organizationName
|
|
126
|
+
};
|
|
127
|
+
}));
|
|
128
|
+
}, [groupList, orgList, state.keyword1]);
|
|
115
129
|
var renderList = useMemo(function () {
|
|
116
|
-
return formatRenderGroup(state.selectUsers)
|
|
117
|
-
|
|
130
|
+
return formatRenderGroup(state.selectUsers.filter(function (v) {
|
|
131
|
+
return !state.keyword2 || v.name.includes(state.keyword2);
|
|
132
|
+
}));
|
|
133
|
+
}, [state.selectUsers, state.keyword2]);
|
|
118
134
|
return /*#__PURE__*/React.createElement("div", {
|
|
119
135
|
className: "user-select-modal-content"
|
|
120
136
|
}, /*#__PURE__*/React.createElement(TreeMode, {
|
|
@@ -129,14 +145,9 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
129
145
|
});
|
|
130
146
|
},
|
|
131
147
|
selectedKeys: [selectId]
|
|
132
|
-
}), /*#__PURE__*/React.createElement(
|
|
133
|
-
|
|
134
|
-
list: groupList,
|
|
135
|
-
key: groupList.length,
|
|
148
|
+
}), /*#__PURE__*/React.createElement(GroupList, {
|
|
149
|
+
list: nodeUserList,
|
|
136
150
|
checkedKeys: list1CheckedKeys,
|
|
137
|
-
itemKey: "id",
|
|
138
|
-
itemNameKey: "postName",
|
|
139
|
-
title: "\u5C97\u4F4D",
|
|
140
151
|
onKeywordChange: function onKeywordChange(v) {
|
|
141
152
|
return setState(function (old) {
|
|
142
153
|
return Object.assign(Object.assign({}, old), {
|
|
@@ -144,7 +155,8 @@ function GroupSelectModalContent(_ref, ref) {
|
|
|
144
155
|
});
|
|
145
156
|
});
|
|
146
157
|
},
|
|
147
|
-
keywords: state.keyword1
|
|
158
|
+
keywords: state.keyword1,
|
|
159
|
+
onChecked: onUserChecked1
|
|
148
160
|
}), /*#__PURE__*/React.createElement(GroupList, {
|
|
149
161
|
list: renderList,
|
|
150
162
|
checkedKeys: state.selectIds,
|
|
@@ -14,7 +14,7 @@ function HandleForm(_ref) {
|
|
|
14
14
|
return (_a = getParentNodeById(config, item.id)) === null || _a === void 0 ? void 0 : _a.bpmnType;
|
|
15
15
|
}, [config, item.id]);
|
|
16
16
|
var includeUserTypes = useMemo(function () {
|
|
17
|
-
return parentNodeType === 'startEvent' || parentNodeType === 'sequenceFlow' ? [1, 3] : [1, 2, 3];
|
|
17
|
+
return parentNodeType === 'startEvent' || parentNodeType === 'sequenceFlow' ? [1, 3, 4, 5] : [1, 2, 3, 4, 5];
|
|
18
18
|
}, []);
|
|
19
19
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(UserSet, {
|
|
20
20
|
chargeLevel: item.chargeLevel,
|
|
@@ -27,6 +27,7 @@ import chroma from 'chroma-js';
|
|
|
27
27
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
28
28
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
29
29
|
import RefModal from '../../RefModal';
|
|
30
|
+
import { formatRenderGroup } from './utils';
|
|
30
31
|
|
|
31
32
|
function UserAndGroupSelect(_ref) {
|
|
32
33
|
var _this = this;
|
|
@@ -97,6 +98,9 @@ function UserAndGroupSelect(_ref) {
|
|
|
97
98
|
}
|
|
98
99
|
});
|
|
99
100
|
}, [state.userList, state.type]);
|
|
101
|
+
var renderList = useMemo(function () {
|
|
102
|
+
return state.type === 'groupId' ? formatRenderGroup(state.userList) : state.userList;
|
|
103
|
+
}, [state.userList, state.type]);
|
|
100
104
|
useEffect(function () {
|
|
101
105
|
return onChange(state.userList);
|
|
102
106
|
}, [state.userList]);
|
|
@@ -108,6 +112,16 @@ function UserAndGroupSelect(_ref) {
|
|
|
108
112
|
});
|
|
109
113
|
});
|
|
110
114
|
}, []);
|
|
115
|
+
var onCloseTag = useCallback(function (id) {
|
|
116
|
+
var list = state.userList.filter(function (v) {
|
|
117
|
+
return v.value !== id;
|
|
118
|
+
});
|
|
119
|
+
setState(function (old) {
|
|
120
|
+
return Object.assign(Object.assign({}, old), {
|
|
121
|
+
userList: list
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
}, [state.userList]);
|
|
111
125
|
return /*#__PURE__*/React.createElement("div", {
|
|
112
126
|
className: "user-select-component user-and-group-select-component"
|
|
113
127
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -135,12 +149,37 @@ function UserAndGroupSelect(_ref) {
|
|
|
135
149
|
className: "placeholder"
|
|
136
150
|
}, "\u4E0D\u80FD\u8D85\u8FC720\u4E2A")), /*#__PURE__*/React.createElement("div", {
|
|
137
151
|
className: "user-list-wrapper"
|
|
138
|
-
}, state.userList.map(function (v) {
|
|
152
|
+
}, state.type === 'userId' ? state.userList.map(function (v) {
|
|
139
153
|
return /*#__PURE__*/React.createElement(_Tag, {
|
|
140
154
|
closable: true,
|
|
141
155
|
key: v.value,
|
|
142
|
-
color: color
|
|
156
|
+
color: color,
|
|
157
|
+
onClose: function onClose() {
|
|
158
|
+
return onCloseTag(v.value);
|
|
159
|
+
}
|
|
143
160
|
}, v.name);
|
|
161
|
+
}) : renderList.map(function (v) {
|
|
162
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
key: v[0],
|
|
164
|
+
style: {
|
|
165
|
+
marginBottom: 12,
|
|
166
|
+
fontSize: 'var(--fs)'
|
|
167
|
+
}
|
|
168
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
169
|
+
style: {
|
|
170
|
+
paddingBottom: 5,
|
|
171
|
+
fontWeight: 'bold'
|
|
172
|
+
}
|
|
173
|
+
}, v[0]), v[1].map(function (item) {
|
|
174
|
+
return /*#__PURE__*/React.createElement(_Tag, {
|
|
175
|
+
closable: true,
|
|
176
|
+
key: item.value,
|
|
177
|
+
color: color,
|
|
178
|
+
onClose: function onClose() {
|
|
179
|
+
return onCloseTag(item.value);
|
|
180
|
+
}
|
|
181
|
+
}, item.name);
|
|
182
|
+
}));
|
|
144
183
|
})), /*#__PURE__*/React.createElement(RefModal, {
|
|
145
184
|
ref: modalRef
|
|
146
185
|
}));
|
|
@@ -98,6 +98,16 @@ var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalCon
|
|
|
98
98
|
})
|
|
99
99
|
};
|
|
100
100
|
}, [state.selectUsers, state.selectIds]);
|
|
101
|
+
var renderList1 = useMemo(function () {
|
|
102
|
+
return userList.filter(function (v) {
|
|
103
|
+
return !state.keyword1 || v.realName.includes(state.keyword1);
|
|
104
|
+
});
|
|
105
|
+
}, [state.keyword1, userList]);
|
|
106
|
+
var renderList2 = useMemo(function () {
|
|
107
|
+
return state.selectUsers.filter(function (v) {
|
|
108
|
+
return !state.keyword2 || v.name.includes(state.keyword2);
|
|
109
|
+
});
|
|
110
|
+
}, [state.keyword2, state.selectUsers]);
|
|
101
111
|
return /*#__PURE__*/React.createElement("div", {
|
|
102
112
|
className: "user-select-modal-content"
|
|
103
113
|
}, /*#__PURE__*/React.createElement(TreeMode, {
|
|
@@ -121,7 +131,7 @@ var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalCon
|
|
|
121
131
|
mode: "Org"
|
|
122
132
|
}), /*#__PURE__*/React.createElement(List, {
|
|
123
133
|
onChecked: onUserChecked1,
|
|
124
|
-
list:
|
|
134
|
+
list: renderList1,
|
|
125
135
|
key: userList.length,
|
|
126
136
|
checkedKeys: list1CheckedKeys,
|
|
127
137
|
itemKey: "id",
|
|
@@ -137,7 +147,7 @@ var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalCon
|
|
|
137
147
|
},
|
|
138
148
|
keywords: state.keyword1
|
|
139
149
|
}), /*#__PURE__*/React.createElement(List, {
|
|
140
|
-
list:
|
|
150
|
+
list: renderList2,
|
|
141
151
|
itemKey: "value",
|
|
142
152
|
itemNameKey: "name",
|
|
143
153
|
checkedKeys: state.selectIds,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MutipleUserHandleType, NodeUserType, UserSetType } from '../interface';
|
|
1
|
+
import { MutipleUserHandleType, NodeType, NodeUserType, UserSetType } from '../interface';
|
|
2
2
|
interface IUserSetProps {
|
|
3
3
|
userType?: UserSetType;
|
|
4
4
|
nodeUserList?: NodeUserType[];
|
|
@@ -7,6 +7,7 @@ interface IUserSetProps {
|
|
|
7
7
|
onChange: (data: any) => void;
|
|
8
8
|
includeUserTypes?: UserSetType[];
|
|
9
9
|
chargeLevel?: 1 | 2 | 3;
|
|
10
|
+
nodeType?: NodeType;
|
|
10
11
|
}
|
|
11
|
-
declare function UserSet({ userType, nodeUserList, usersHandType, onChange, emptyUsers, includeUserTypes, chargeLevel }: IUserSetProps): JSX.Element;
|
|
12
|
+
declare function UserSet({ userType, nodeType, nodeUserList, usersHandType, onChange, emptyUsers, includeUserTypes, chargeLevel }: IUserSetProps): JSX.Element;
|
|
12
13
|
export default UserSet;
|
|
@@ -38,10 +38,11 @@ function UserSet(_ref) {
|
|
|
38
38
|
|
|
39
39
|
var _ref$userType = _ref.userType,
|
|
40
40
|
userType = _ref$userType === void 0 ? 1 : _ref$userType,
|
|
41
|
+
nodeType = _ref.nodeType,
|
|
41
42
|
_ref$nodeUserList = _ref.nodeUserList,
|
|
42
43
|
nodeUserList = _ref$nodeUserList === void 0 ? [] : _ref$nodeUserList,
|
|
43
44
|
_ref$usersHandType = _ref.usersHandType,
|
|
44
|
-
usersHandType = _ref$usersHandType === void 0 ?
|
|
45
|
+
usersHandType = _ref$usersHandType === void 0 ? 2 : _ref$usersHandType,
|
|
45
46
|
onChange = _ref.onChange,
|
|
46
47
|
emptyUsers = _ref.emptyUsers,
|
|
47
48
|
includeUserTypes = _ref.includeUserTypes,
|
|
@@ -114,7 +115,8 @@ function UserSet(_ref) {
|
|
|
114
115
|
usersHandType: state.usersHandType,
|
|
115
116
|
onChange: function onChange(options) {
|
|
116
117
|
return stateChange(options);
|
|
117
|
-
}
|
|
118
|
+
},
|
|
119
|
+
nodeType: nodeType
|
|
118
120
|
})));
|
|
119
121
|
}
|
|
120
122
|
/**
|
|
@@ -127,7 +129,8 @@ function UserSelectType1(_ref2) {
|
|
|
127
129
|
usersHandType = _ref2.usersHandType,
|
|
128
130
|
_onChange = _ref2.onChange,
|
|
129
131
|
type = _ref2.type,
|
|
130
|
-
emptyUsers = _ref2.emptyUsers
|
|
132
|
+
emptyUsers = _ref2.emptyUsers,
|
|
133
|
+
nodeType = _ref2.nodeType;
|
|
131
134
|
var userList = useMemo(function () {
|
|
132
135
|
return users.filter(function (v) {
|
|
133
136
|
return v.key === 'userId';
|
|
@@ -140,7 +143,7 @@ function UserSelectType1(_ref2) {
|
|
|
140
143
|
onChange: function onChange(users) {
|
|
141
144
|
return _onChange(_defineProperty({}, type, users));
|
|
142
145
|
}
|
|
143
|
-
}), /*#__PURE__*/React.createElement(UsersHandleType, {
|
|
146
|
+
}), nodeType !== 2 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(UsersHandleType, {
|
|
144
147
|
usersHandType: usersHandType,
|
|
145
148
|
onChange: function onChange(value) {
|
|
146
149
|
return _onChange({
|
|
@@ -154,7 +157,7 @@ function UserSelectType1(_ref2) {
|
|
|
154
157
|
emptyUsers: users
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
|
-
}));
|
|
160
|
+
})));
|
|
158
161
|
}
|
|
159
162
|
/**
|
|
160
163
|
* @desc 自选人员
|
|
@@ -7,7 +7,9 @@ function UsersHandleType(_ref) {
|
|
|
7
7
|
var usersHandType = _ref.usersHandType,
|
|
8
8
|
_onChange = _ref.onChange;
|
|
9
9
|
var options = useMemo(function () {
|
|
10
|
-
return Object.values(UserHandleTypeOptions)
|
|
10
|
+
return Object.values(UserHandleTypeOptions).sort(function (a, b) {
|
|
11
|
+
return b.value - a.value;
|
|
12
|
+
});
|
|
11
13
|
}, []);
|
|
12
14
|
return /*#__PURE__*/React.createElement("div", {
|
|
13
15
|
className: "users-handle-type-content"
|
|
@@ -4,6 +4,7 @@ import AddNode from './Add';
|
|
|
4
4
|
import Render from './Render';
|
|
5
5
|
import { NodeTypes } from './Constants';
|
|
6
6
|
import WFC from '../OperatorContext';
|
|
7
|
+
import TitleElement from './TitleElement';
|
|
7
8
|
|
|
8
9
|
function CoverLine(_ref) {
|
|
9
10
|
var _ref$first = _ref.first,
|
|
@@ -44,17 +45,13 @@ function BranchNode(_ref2) {
|
|
|
44
45
|
onClick: sortLeft
|
|
45
46
|
}), /*#__PURE__*/React.createElement("div", {
|
|
46
47
|
className: "title-wrapper"
|
|
47
|
-
}, /*#__PURE__*/React.createElement(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
type: "icon-MarkNo",
|
|
52
|
-
style: {
|
|
53
|
-
color: '#333',
|
|
54
|
-
right: 5,
|
|
55
|
-
top: 5
|
|
48
|
+
}, /*#__PURE__*/React.createElement(TitleElement, {
|
|
49
|
+
placeholder: "\u8BF7\u8F93\u5165\u6761\u4EF6\u540D\u79F0",
|
|
50
|
+
onTitleChange: function onTitleChange(v) {
|
|
51
|
+
return node.nodeName = v;
|
|
56
52
|
},
|
|
57
|
-
|
|
53
|
+
delNode: delBranch,
|
|
54
|
+
nodeName: node.nodeName
|
|
58
55
|
})), !last && /*#__PURE__*/React.createElement("div", {
|
|
59
56
|
className: "sort-right",
|
|
60
57
|
onClick: sortRight
|
|
@@ -48,7 +48,7 @@ function TitleElement(_ref) {
|
|
|
48
48
|
onTitleChange && onTitleChange(title);
|
|
49
49
|
}, [title]);
|
|
50
50
|
|
|
51
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_IconFont, {
|
|
51
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, icon && /*#__PURE__*/React.createElement(_IconFont, {
|
|
52
52
|
type: icon,
|
|
53
53
|
style: {
|
|
54
54
|
paddingRight: 4
|
package/es/WorkerFlow/index.css
CHANGED
|
@@ -246,10 +246,18 @@
|
|
|
246
246
|
}
|
|
247
247
|
.worker-flow-design .auto-judge .title-wrapper .editable-title {
|
|
248
248
|
display: inline-block;
|
|
249
|
-
max-width: 120px;
|
|
250
249
|
overflow: hidden;
|
|
251
250
|
white-space: nowrap;
|
|
252
251
|
text-overflow: ellipsis;
|
|
252
|
+
margin-right: 10px;
|
|
253
|
+
height: 20px;
|
|
254
|
+
}
|
|
255
|
+
.worker-flow-design .auto-judge .title-wrapper .editable-title-input {
|
|
256
|
+
margin-right: 10px;
|
|
257
|
+
height: 20px;
|
|
258
|
+
}
|
|
259
|
+
.worker-flow-design .auto-judge .title-wrapper .anticon {
|
|
260
|
+
color: #333;
|
|
253
261
|
}
|
|
254
262
|
.worker-flow-design .auto-judge .content {
|
|
255
263
|
font-size: 14px;
|
|
@@ -400,7 +408,9 @@
|
|
|
400
408
|
top: 30px;
|
|
401
409
|
z-index: 1;
|
|
402
410
|
}
|
|
403
|
-
.auto-judge:hover .editable-title
|
|
411
|
+
.auto-judge:hover .editable-title {
|
|
412
|
+
border-bottom: 1px dashed #15bc83;
|
|
413
|
+
}
|
|
404
414
|
.node-wrap-box:hover .editable-title {
|
|
405
415
|
border-bottom: 1px dashed #fff;
|
|
406
416
|
}
|
|
@@ -15,6 +15,7 @@ export type NodeUserType = {
|
|
|
15
15
|
export type WorkerFlowFormType = {
|
|
16
16
|
name: string;
|
|
17
17
|
label: string;
|
|
18
|
+
fromType: 'SINGLE_TEXT' | 'MULTIPLE_TEXT' | 'SINGLE_SELECTION' | 'MULTIPLE_SELECTION' | 'IMAGE';
|
|
18
19
|
type: string;
|
|
19
20
|
value: string;
|
|
20
21
|
auth?: FormAuthType;
|
|
@@ -84,7 +85,7 @@ export type SubmitFlowItemType = {
|
|
|
84
85
|
export type SubmitData = {
|
|
85
86
|
config: WorkerFlowRequest;
|
|
86
87
|
bpmnBlob: Blob;
|
|
87
|
-
useFormKeys:
|
|
88
|
+
useFormKeys: ConditionItemType[];
|
|
88
89
|
taskList: SubmitFlowItemType[];
|
|
89
90
|
};
|
|
90
91
|
|
package/es/WorkerFlow/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NodeItem, SubmitFlowItemType } from './interface';
|
|
1
|
+
import { ConditionItemType, NodeItem, SubmitFlowItemType } from './interface';
|
|
2
2
|
export declare function getJAVATaskData(data: NodeItem): SubmitFlowItemType[];
|
|
3
3
|
export declare function getNextTaskId(node: NodeItem): string | undefined;
|
|
4
4
|
export declare function getNextNode(node: NodeItem): NodeItem | undefined;
|
|
5
5
|
export declare function filterNoticeNode(data: NodeItem): NodeItem;
|
|
6
|
-
export declare function getUserFormKeys(data: NodeItem):
|
|
6
|
+
export declare function getUserFormKeys(data: NodeItem): ConditionItemType[];
|
package/es/WorkerFlow/utils.js
CHANGED
|
@@ -167,9 +167,8 @@ export function getUserFormKeys(data) {
|
|
|
167
167
|
|
|
168
168
|
var fn = function fn(node) {
|
|
169
169
|
if (node.bpmnType == 'sequenceFlow') {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
})));
|
|
170
|
+
console.log(node.conditionList);
|
|
171
|
+
arr.push.apply(arr, _toConsumableArray(node.conditionList));
|
|
173
172
|
}
|
|
174
173
|
|
|
175
174
|
if (node.conditionNodes) {
|
package/es/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
2
2
|
export var getHeader = function getHeader() {
|
|
3
3
|
return {
|
|
4
|
-
Authorization:
|
|
4
|
+
Authorization: _cache.getCache('token', 'session')
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
/**
|