@zgfe/business-lib 1.1.27 → 1.1.28
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/es/addToPanel/components/addPanel.js +8 -21
- package/es/addToPanel/components/radioGroup.js +1 -3
- package/es/addToPanel/components/styleList.js +5 -22
- package/es/addToPanel/demo/edit.js +5 -12
- package/es/addToPanel/demo/index.js +5 -12
- package/es/addToPanel/index.js +21 -58
- package/es/addToScene/addGroup.js +0 -4
- package/es/addToScene/demo/index.js +5 -12
- package/es/addToScene/index.js +13 -40
- package/es/assets/demo/index.js +0 -2
- package/es/assets/demo/input.js +5 -12
- package/es/assets/iconfont/iconfont.js +10 -17
- package/es/assets/theme.js +0 -1
- package/es/attrConditions/components/operateList.js +10 -27
- package/es/attrConditions/components/stringList.js +69 -98
- package/es/attrConditions/components/valuesList.js +14 -40
- package/es/attrConditions/demo/group.js +11 -23
- package/es/attrConditions/demo/index.js +17 -26
- package/es/attrConditions/group.js +17 -48
- package/es/attrConditions/index.js +22 -49
- package/es/attrConditions/types.js +0 -1
- package/es/attributeSelector/demo/disable.js +8 -16
- package/es/attributeSelector/demo/index.js +8 -17
- package/es/attributeSelector/index.js +22 -45
- package/es/attributeSelector/listPanel.js +18 -46
- package/es/attributeSelector/option.js +3 -13
- package/es/attributeSelector/types.js +0 -5
- package/es/attributeSelector/util.js +0 -3
- package/es/chart/demo/index.js +5 -14
- package/es/chart/index.js +30 -44
- package/es/chart/util/chartOptionConfig.d.ts +3 -3
- package/es/chart/util/chartOptionConfig.js +13 -37
- package/es/chart/util/data/china.js +1 -4
- package/es/chart/util/formatData.d.ts +2 -2
- package/es/chart/util/formatData.js +0 -5
- package/es/chart/util/formatOption.js +0 -13
- package/es/chart/util/mapUtil.js +5 -26
- package/es/config.js +0 -2
- package/es/cycleTime/demo/disable.js +0 -1
- package/es/cycleTime/index.js +19 -46
- package/es/cycleTime/month.js +8 -27
- package/es/datePicker/datePicker.js +5 -23
- package/es/datePicker/demo/customType.js +13 -22
- package/es/datePicker/demo/day.js +13 -22
- package/es/datePicker/demo/index.js +12 -21
- package/es/datePicker/index.js +18 -41
- package/es/datePicker/utils.js +0 -7
- package/es/demoWrapper/content.js +31 -56
- package/es/demoWrapper/head.js +9 -23
- package/es/demoWrapper/index.js +14 -30
- package/es/dialog/demo/index.js +5 -12
- package/es/dialog/index.js +4 -6
- package/es/dnd/demo/data.js +19 -28
- package/es/dnd/demo/handle.js +19 -28
- package/es/dnd/index.js +21 -45
- package/es/dnd/item.js +10 -30
- package/es/eventSelector/demo/index.js +12 -23
- package/es/eventSelector/index.js +14 -42
- package/es/eventSelector/listPanel.js +27 -61
- package/es/eventSelector/option.js +6 -11
- package/es/icon/iconFont.js +7 -13
- package/es/layout/analysisLayout/demo/index.js +0 -6
- package/es/layout/analysisLayout/index.d.ts +1 -1
- package/es/layout/analysisLayout/index.js +16 -34
- package/es/layout/detail/index.js +1 -3
- package/es/loginForm/index.js +7 -18
- package/es/searchInput/index.js +2 -7
- package/es/select/demo/children.js +8 -16
- package/es/select/demo/customLabel.js +0 -2
- package/es/select/demo/group.js +8 -17
- package/es/select/demo/index.js +11 -19
- package/es/select/demo/loading.js +8 -18
- package/es/select/demo/multiple.js +8 -16
- package/es/select/handle.js +14 -34
- package/es/select/index.js +22 -59
- package/es/select/option.js +10 -30
- package/es/select/overlay.js +25 -62
- package/es/table/demo/data/table.js +0 -2
- package/es/table/demo/index.js +13 -39
- package/es/table/demo/index2.js +5 -15
- package/es/table/demo/index3.js +7 -28
- package/es/table/index.js +14 -33
- package/es/targetConditionGroup/components/targetDimension.js +12 -38
- package/es/targetConditionGroup/demo/group.js +21 -36
- package/es/targetConditionGroup/demo/index.js +5 -13
- package/es/targetConditionGroup/index.js +31 -84
- package/es/targetSelector/demo/index.js +15 -28
- package/es/targetSelector/editBox.js +5 -20
- package/es/targetSelector/index.js +15 -36
- package/es/targetSelector/optionIcon.js +1 -5
- package/es/targetSelector/optionMenu.js +0 -3
- package/es/userCondition/conditionTypeList.js +7 -12
- package/es/userCondition/conditionWrap.js +0 -2
- package/es/userCondition/conditions/cdpCondition.js +51 -97
- package/es/userCondition/conditions/eventCondition.js +6 -16
- package/es/userCondition/conditions/periodCondition.js +8 -26
- package/es/userCondition/conditions/propCondition.js +29 -61
- package/es/userCondition/conditions/runTimesCondition.js +5 -10
- package/es/userCondition/conditions/tagsCondition.d.ts +1 -1
- package/es/userCondition/conditions/tagsCondition.js +15 -33
- package/es/userCondition/conditions/textDesc.js +16 -67
- package/es/userCondition/demo/index.js +11 -21
- package/es/userCondition/index.js +51 -91
- package/es/userCondition/orConditions.js +11 -48
- package/es/userCondition/relationLabel.js +1 -4
- package/es/userCondition/types.d.ts +1 -1
- package/es/userCondition/types.js +0 -1
- package/es/userCondition/util.js +4 -13
- package/es/userGroup/demo/group.js +14 -23
- package/es/userGroup/demo/index.js +5 -15
- package/es/userGroup/index.js +12 -30
- package/es/userTagsSelector/cascaderOverlay.js +19 -51
- package/es/userTagsSelector/components/search/index.js +0 -2
- package/es/userTagsSelector/demo/index.js +0 -3
- package/es/userTagsSelector/groups/groupOption.js +6 -8
- package/es/userTagsSelector/groups/index.js +15 -30
- package/es/userTagsSelector/index.js +17 -35
- package/es/userTagsSelector/multipleCheckPanel/checkOption.js +3 -6
- package/es/userTagsSelector/multipleCheckPanel/index.js +8 -21
- package/es/userTagsSelector/util.js +0 -2
- package/es/utils/ajax.js +45 -71
- package/es/utils/base64.js +3 -22
- package/es/utils/type.d.ts +1 -1
- package/es/utils/type.js +4 -7
- package/es/utils/util.js +0 -16
- package/package.json +2 -2
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
7
|
import { Dropdown } from 'antd';
|
|
14
8
|
import React, { useContext, useEffect, useState } from 'react';
|
|
15
9
|
import SelectHandle from '../select/handle';
|
|
@@ -17,28 +11,23 @@ import BizGlobalDataContext from '../context';
|
|
|
17
11
|
import EventListPanel from './listPanel';
|
|
18
12
|
import './styles/index.less';
|
|
19
13
|
export var classPrefix = 'biz-event-select';
|
|
20
|
-
|
|
21
14
|
var BizEventSelector = function BizEventSelector(props) {
|
|
22
15
|
var alias = props.alias,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
placeholder = props.placeholder,
|
|
17
|
+
showAllEvent = props.showAllEvent,
|
|
18
|
+
border = props.border,
|
|
19
|
+
theme = props.theme,
|
|
20
|
+
defaultSelectAble = props.defaultSelectAble;
|
|
29
21
|
var _useState = useState(),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
currentValue = _useState2[0],
|
|
24
|
+
setCurrentValue = _useState2[1];
|
|
34
25
|
var _useState3 = useState(false),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
+
visible = _useState4[0],
|
|
28
|
+
setVisible = _useState4[1];
|
|
39
29
|
var _useContext = useContext(BizGlobalDataContext),
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
eventGroupList = _useContext.eventGroupList;
|
|
42
31
|
var selectId = (Math.random() + 10).toString();
|
|
43
32
|
useEffect(function () {
|
|
44
33
|
if (!props.defaultValue) return;
|
|
@@ -50,12 +39,9 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
50
39
|
var data = getValue(props.value);
|
|
51
40
|
setCurrentValue(data);
|
|
52
41
|
}, [props.value]);
|
|
53
|
-
|
|
54
42
|
var getValue = function getValue(param) {
|
|
55
43
|
var _param$group, _param$event;
|
|
56
|
-
|
|
57
44
|
var res = {};
|
|
58
|
-
|
|
59
45
|
if (!((_param$group = param.group) === null || _param$group === void 0 ? void 0 : _param$group.id)) {
|
|
60
46
|
res.group = {
|
|
61
47
|
id: 0,
|
|
@@ -69,7 +55,6 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
69
55
|
}()
|
|
70
56
|
};
|
|
71
57
|
}
|
|
72
|
-
|
|
73
58
|
if (((_param$event = param.event) === null || _param$event === void 0 ? void 0 : _param$event.id) === -100) {
|
|
74
59
|
res.event = {
|
|
75
60
|
id: -100,
|
|
@@ -77,53 +62,41 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
77
62
|
attrList: []
|
|
78
63
|
};
|
|
79
64
|
}
|
|
80
|
-
|
|
81
65
|
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
82
66
|
var _param$group2;
|
|
83
|
-
|
|
84
67
|
if (group.id === ((_param$group2 = param.group) === null || _param$group2 === void 0 ? void 0 : _param$group2.id)) res.group = group;
|
|
85
68
|
group.eventList.forEach(function (event) {
|
|
86
69
|
var _param$event2;
|
|
87
|
-
|
|
88
70
|
if (event.id === ((_param$event2 = param.event) === null || _param$event2 === void 0 ? void 0 : _param$event2.id)) res.event = event;
|
|
89
71
|
});
|
|
90
72
|
});
|
|
91
73
|
return res;
|
|
92
74
|
};
|
|
93
|
-
|
|
94
75
|
var getLabel = function getLabel() {
|
|
95
76
|
var label = '';
|
|
96
77
|
if (!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.event)) return label;
|
|
97
78
|
var name = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.event.alias) || (currentValue === null || currentValue === void 0 ? void 0 : currentValue.event.name);
|
|
98
|
-
|
|
99
79
|
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.event.id) === -100) {
|
|
100
80
|
var _currentValue$group;
|
|
101
|
-
|
|
102
81
|
label = "".concat((currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$group = currentValue.group) === null || _currentValue$group === void 0 ? void 0 : _currentValue$group.name) || '所有分组', "/").concat(name);
|
|
103
82
|
} else {
|
|
104
83
|
label = name;
|
|
105
84
|
}
|
|
106
|
-
|
|
107
85
|
if (alias && alias !== name) {
|
|
108
86
|
label += "(".concat(alias, ")");
|
|
109
87
|
}
|
|
110
|
-
|
|
111
88
|
return label;
|
|
112
89
|
};
|
|
113
|
-
|
|
114
90
|
var onChange = function onChange(value, isOverview) {
|
|
115
91
|
if (!defaultSelectAble && !isOverview) {
|
|
116
92
|
setVisible(false);
|
|
117
93
|
}
|
|
118
|
-
|
|
119
94
|
setCurrentValue(value);
|
|
120
95
|
props.onChange && props.onChange(value);
|
|
121
96
|
};
|
|
122
|
-
|
|
123
97
|
var onVisibleChange = function onVisibleChange(flag) {
|
|
124
98
|
setVisible(flag);
|
|
125
99
|
};
|
|
126
|
-
|
|
127
100
|
return /*#__PURE__*/React.createElement("div", {
|
|
128
101
|
className: [classPrefix, border ? 'border' : ''].join(' ')
|
|
129
102
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
@@ -155,7 +128,6 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
155
128
|
size: props.size
|
|
156
129
|
}))));
|
|
157
130
|
};
|
|
158
|
-
|
|
159
131
|
BizEventSelector.defaultProps = {
|
|
160
132
|
showAllEvent: true,
|
|
161
133
|
defaultSelectAble: true,
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
|
|
3
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
-
|
|
7
4
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
-
|
|
9
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
-
|
|
11
6
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
-
|
|
13
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
18
|
-
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
19
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
-
|
|
21
11
|
import { Skeleton } from 'antd';
|
|
22
12
|
import _ from 'lodash';
|
|
23
13
|
import React, { useContext, useEffect, useState } from 'react';
|
|
@@ -27,39 +17,31 @@ import { BizGlobalDataContext } from '..';
|
|
|
27
17
|
import { ShowStatus } from '../attributeSelector/types';
|
|
28
18
|
import BizSearchInput from '../searchInput';
|
|
29
19
|
import EventListOption from './option';
|
|
30
|
-
|
|
31
20
|
var EventListPanel = function EventListPanel(props) {
|
|
32
21
|
var showOverview = props.showOverview,
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
defaultSelectAble = props.defaultSelectAble;
|
|
35
23
|
var _useState = useState(''),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
searchValue = _useState2[0],
|
|
26
|
+
setSearchValue = _useState2[1];
|
|
40
27
|
var _useContext = useContext(BizGlobalDataContext),
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
eventGroupList = _useContext.eventGroupList;
|
|
43
29
|
var _useState3 = useState(eventGroupList || []),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
30
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
+
groupList = _useState4[0],
|
|
32
|
+
setGroupList = _useState4[1];
|
|
48
33
|
var _useState5 = useState(),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
34
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
+
currentGroup = _useState6[0],
|
|
36
|
+
setCurrentGroup = _useState6[1];
|
|
53
37
|
var _useState7 = useState([]),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
38
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
39
|
+
searchEventList = _useState8[0],
|
|
40
|
+
setSearchEventList = _useState8[1];
|
|
58
41
|
var _useState9 = useState(),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
42
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
43
|
+
currentValue = _useState10[0],
|
|
44
|
+
setCurrentValue = _useState10[1];
|
|
63
45
|
var scrollableId = 'scrollableDiv' + Math.random();
|
|
64
46
|
var overviewData = {
|
|
65
47
|
id: -100,
|
|
@@ -82,7 +64,6 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
82
64
|
} else {
|
|
83
65
|
list.push(item);
|
|
84
66
|
}
|
|
85
|
-
|
|
86
67
|
listObj[item.id] = 1;
|
|
87
68
|
}
|
|
88
69
|
});
|
|
@@ -111,25 +92,19 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
111
92
|
return list;
|
|
112
93
|
});
|
|
113
94
|
}, [searchValue, currentGroup, showOverview]);
|
|
114
|
-
|
|
115
95
|
function onClickEvent(e) {
|
|
116
96
|
var resVal = _.cloneDeep(currentValue) || {};
|
|
117
97
|
resVal.event = e;
|
|
118
|
-
|
|
119
98
|
if (e.id === -100) {
|
|
120
99
|
resVal.group = currentGroup;
|
|
121
100
|
}
|
|
122
|
-
|
|
123
101
|
setCurrentValue(resVal);
|
|
124
102
|
if (props.onChange) props.onChange(resVal);
|
|
125
103
|
}
|
|
126
|
-
|
|
127
104
|
function onClickGroup(g) {
|
|
128
105
|
var _currentValue$event;
|
|
129
|
-
|
|
130
106
|
setCurrentGroup(g);
|
|
131
107
|
var isOverview = (currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$event = currentValue.event) === null || _currentValue$event === void 0 ? void 0 : _currentValue$event.id) === -100;
|
|
132
|
-
|
|
133
108
|
if (defaultSelectAble || isOverview) {
|
|
134
109
|
var resVal = _.cloneDeep(currentValue) || {};
|
|
135
110
|
resVal.group = g;
|
|
@@ -138,7 +113,6 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
138
113
|
if (props.onChange) props.onChange(resVal, isOverview);
|
|
139
114
|
}
|
|
140
115
|
}
|
|
141
|
-
|
|
142
116
|
if (!groupList || !groupList.length || !groupList[0].eventList || !groupList[0].eventList.length) {
|
|
143
117
|
return /*#__PURE__*/React.createElement("div", {
|
|
144
118
|
className: "".concat(classPrefix, "-nodata-panel")
|
|
@@ -146,7 +120,6 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
146
120
|
className: "".concat(classPrefix, "-nodata")
|
|
147
121
|
}, "\u6682\u65E0\u6570\u636E"));
|
|
148
122
|
}
|
|
149
|
-
|
|
150
123
|
return /*#__PURE__*/React.createElement("div", {
|
|
151
124
|
className: "".concat(classPrefix, "-list-panel")
|
|
152
125
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -182,31 +155,26 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
182
155
|
onClick: onClickEvent
|
|
183
156
|
}))));
|
|
184
157
|
};
|
|
185
|
-
|
|
186
158
|
var InfiniteScrollList = function InfiniteScrollList(_ref) {
|
|
187
159
|
var scrollableTarget = _ref.scrollableTarget,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
160
|
+
searchEventList = _ref.searchEventList,
|
|
161
|
+
searchValue = _ref.searchValue,
|
|
162
|
+
currentGroup = _ref.currentGroup,
|
|
163
|
+
currentValue = _ref.currentValue,
|
|
164
|
+
onClick = _ref.onClick;
|
|
194
165
|
var _useState11 = useState([]),
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
166
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
167
|
+
showList = _useState12[0],
|
|
168
|
+
setShowList = _useState12[1];
|
|
199
169
|
useEffect(function () {
|
|
200
170
|
setShowList(searchEventList.slice(0, 10));
|
|
201
171
|
}, [searchEventList]);
|
|
202
|
-
|
|
203
172
|
var loadMoreData = function loadMoreData() {
|
|
204
173
|
var moreData = searchEventList.slice(showList.length, showList.length + 10);
|
|
205
174
|
setShowList(function (list) {
|
|
206
175
|
return [].concat(_toConsumableArray(list), _toConsumableArray(moreData));
|
|
207
176
|
});
|
|
208
177
|
};
|
|
209
|
-
|
|
210
178
|
return /*#__PURE__*/React.createElement(InfiniteScroll, {
|
|
211
179
|
dataLength: showList.length,
|
|
212
180
|
hasMore: showList.length < searchEventList.length,
|
|
@@ -222,7 +190,6 @@ var InfiniteScrollList = function InfiniteScrollList(_ref) {
|
|
|
222
190
|
key: Math.random()
|
|
223
191
|
}, showList.map(function (e) {
|
|
224
192
|
var _currentValue$event2;
|
|
225
|
-
|
|
226
193
|
if (e.eventHidden === ShowStatus.hidden) return null;
|
|
227
194
|
return /*#__PURE__*/React.createElement(EventListOption, {
|
|
228
195
|
label: e.alias || e.name,
|
|
@@ -237,5 +204,4 @@ var InfiniteScrollList = function InfiniteScrollList(_ref) {
|
|
|
237
204
|
});
|
|
238
205
|
}));
|
|
239
206
|
};
|
|
240
|
-
|
|
241
207
|
export default EventListPanel;
|
|
@@ -3,20 +3,17 @@ import React from 'react';
|
|
|
3
3
|
import { classPrefix } from '.';
|
|
4
4
|
import IconFont from '../icon/iconFont';
|
|
5
5
|
import { util } from '../utils';
|
|
6
|
-
|
|
7
6
|
var EventListOption = function EventListOption(props) {
|
|
8
7
|
var showCount = props.showCount,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
count = props.count,
|
|
9
|
+
label = props.label,
|
|
10
|
+
checked = props.checked,
|
|
11
|
+
highlight = props.highlight,
|
|
12
|
+
onClick = props.onClick,
|
|
13
|
+
data = props.data;
|
|
16
14
|
var _onClick = function _onClick() {
|
|
17
15
|
if (onClick) onClick(data);
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
function getLabel(label) {
|
|
21
18
|
if (!highlight || !highlight.enable || !highlight.text) return label;
|
|
22
19
|
var text = highlight.text;
|
|
@@ -30,7 +27,6 @@ var EventListOption = function EventListOption(props) {
|
|
|
30
27
|
}, text);
|
|
31
28
|
});
|
|
32
29
|
}
|
|
33
|
-
|
|
34
30
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
31
|
className: "".concat(classPrefix, "-option ").concat(checked ? 'active' : ''),
|
|
36
32
|
onClick: _onClick
|
|
@@ -45,5 +41,4 @@ var EventListOption = function EventListOption(props) {
|
|
|
45
41
|
count: count
|
|
46
42
|
}));
|
|
47
43
|
};
|
|
48
|
-
|
|
49
44
|
export default EventListOption;
|
package/es/icon/iconFont.js
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1
2
|
var _excluded = ["className", "type", "family"];
|
|
2
|
-
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
-
|
|
11
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
|
|
13
10
|
import React, { useMemo } from 'react';
|
|
14
|
-
|
|
15
11
|
var IconFont = function IconFont(props) {
|
|
16
12
|
var className = props.className,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
type = props.type,
|
|
14
|
+
family = props.family,
|
|
15
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
21
16
|
var iconClassName = useMemo(function () {
|
|
22
17
|
return "".concat(family, " ").concat(className, " ").concat(type);
|
|
23
18
|
}, [className, type]);
|
|
@@ -28,7 +23,6 @@ var IconFont = function IconFont(props) {
|
|
|
28
23
|
}
|
|
29
24
|
}, rest));
|
|
30
25
|
};
|
|
31
|
-
|
|
32
26
|
IconFont.defaultProps = {
|
|
33
27
|
className: '',
|
|
34
28
|
family: 'bsicon'
|
|
@@ -3,7 +3,6 @@ import { BizAnalysisLayout } from '@zgfe/business-lib';
|
|
|
3
3
|
import { Button } from 'antd';
|
|
4
4
|
import '@zgfe/business-lib/es/assets/styles/resetAntd.less';
|
|
5
5
|
import './index.less';
|
|
6
|
-
|
|
7
6
|
var LeftContent = function LeftContent() {
|
|
8
7
|
return /*#__PURE__*/React.createElement("div", {
|
|
9
8
|
className: "left-content"
|
|
@@ -11,11 +10,9 @@ var LeftContent = function LeftContent() {
|
|
|
11
10
|
type: "primary"
|
|
12
11
|
}, "\u6309\u94AE"));
|
|
13
12
|
};
|
|
14
|
-
|
|
15
13
|
var Footer = function Footer() {
|
|
16
14
|
return /*#__PURE__*/React.createElement("div", null, "@footer");
|
|
17
15
|
};
|
|
18
|
-
|
|
19
16
|
var RightContent = function RightContent() {
|
|
20
17
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
18
|
style: {
|
|
@@ -23,11 +20,9 @@ var RightContent = function RightContent() {
|
|
|
23
20
|
}
|
|
24
21
|
}, /*#__PURE__*/React.createElement("h1", null, "right"));
|
|
25
22
|
};
|
|
26
|
-
|
|
27
23
|
var onCollapse = function onCollapse(flag) {
|
|
28
24
|
console.log('是否收起', flag);
|
|
29
25
|
};
|
|
30
|
-
|
|
31
26
|
var LayoutDemo = function LayoutDemo() {
|
|
32
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
33
28
|
className: "root"
|
|
@@ -37,7 +32,6 @@ var LayoutDemo = function LayoutDemo() {
|
|
|
37
32
|
onCollapse: onCollapse
|
|
38
33
|
}, /*#__PURE__*/React.createElement(RightContent, null)));
|
|
39
34
|
};
|
|
40
|
-
|
|
41
35
|
export default (function () {
|
|
42
36
|
return /*#__PURE__*/React.createElement(LayoutDemo, null);
|
|
43
37
|
});
|
|
@@ -1,41 +1,31 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
7
|
import React, { useEffect, useState } from 'react';
|
|
14
8
|
import IconFont from '../../icon/iconFont';
|
|
15
9
|
import './index.less';
|
|
16
10
|
import { Tooltip } from 'antd';
|
|
17
|
-
|
|
18
11
|
var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
19
12
|
var children = props.children,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
leftPanel = props.leftPanel,
|
|
14
|
+
leftHandle = props.leftHandle,
|
|
15
|
+
_props$isFixed = props.isFixed,
|
|
16
|
+
isFixed = _props$isFixed === void 0 ? false : _props$isFixed,
|
|
17
|
+
defaultLeftWidth = props.defaultLeftWidth,
|
|
18
|
+
minWidthOfLeft = props.minWidthOfLeft,
|
|
19
|
+
maxWidthOfLeft = props.maxWidthOfLeft,
|
|
20
|
+
className = props.className;
|
|
29
21
|
var _useState = useState(defaultLeftWidth),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
width = _useState2[0],
|
|
24
|
+
setWidth = _useState2[1];
|
|
34
25
|
var _useState3 = useState(true),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
+
showLeft = _useState4[0],
|
|
28
|
+
setShowLeft = _useState4[1];
|
|
39
29
|
var initX = 0;
|
|
40
30
|
var isDrag = false;
|
|
41
31
|
useEffect(function () {
|
|
@@ -43,7 +33,6 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
43
33
|
document.removeEventListener('mouseup', onMouseUp);
|
|
44
34
|
};
|
|
45
35
|
}, []);
|
|
46
|
-
|
|
47
36
|
var onMouseDown = function onMouseDown(e) {
|
|
48
37
|
var target = e.target || e.srcElement;
|
|
49
38
|
initX = e.clientX - target.offsetLeft;
|
|
@@ -51,11 +40,9 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
51
40
|
document.addEventListener('mousemove', onMouseMove);
|
|
52
41
|
document.addEventListener('mouseup', onMouseUp);
|
|
53
42
|
};
|
|
54
|
-
|
|
55
43
|
var onMouseMove = function onMouseMove(e) {
|
|
56
44
|
if (isDrag) {
|
|
57
45
|
var x = e.clientX - initX;
|
|
58
|
-
|
|
59
46
|
if (x < minWidthOfLeft) {
|
|
60
47
|
if (x < 250) {
|
|
61
48
|
setShowLeft(false);
|
|
@@ -65,17 +52,14 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
65
52
|
x = minWidthOfLeft || 320;
|
|
66
53
|
}
|
|
67
54
|
}
|
|
68
|
-
|
|
69
55
|
if (x > maxWidthOfLeft) x = maxWidthOfLeft || 580;
|
|
70
56
|
setWidth(x);
|
|
71
57
|
}
|
|
72
58
|
};
|
|
73
|
-
|
|
74
59
|
var onMouseUp = function onMouseUp() {
|
|
75
60
|
isDrag = false;
|
|
76
61
|
document.removeEventListener('mousemove', onMouseMove);
|
|
77
62
|
};
|
|
78
|
-
|
|
79
63
|
function onCollapse() {
|
|
80
64
|
if (props.onCollapse) props.onCollapse(showLeft);
|
|
81
65
|
setShowLeft(function (show) {
|
|
@@ -83,7 +67,6 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
83
67
|
return !show;
|
|
84
68
|
});
|
|
85
69
|
}
|
|
86
|
-
|
|
87
70
|
return /*#__PURE__*/React.createElement("div", {
|
|
88
71
|
className: "biz-layout-container ".concat(className)
|
|
89
72
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -136,7 +119,6 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
136
119
|
}
|
|
137
120
|
}, children));
|
|
138
121
|
};
|
|
139
|
-
|
|
140
122
|
BizAnalysisLayout.defaultProps = {
|
|
141
123
|
defaultLeftWidth: 320,
|
|
142
124
|
minWidthOfLeft: 320,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconFont } from '../..';
|
|
3
3
|
import './index.less';
|
|
4
|
-
|
|
5
4
|
var BizDetailLayout = function BizDetailLayout(props) {
|
|
6
5
|
var width = props.width,
|
|
7
|
-
|
|
6
|
+
className = props.className;
|
|
8
7
|
var classPrefix = 'biz-detail';
|
|
9
8
|
return /*#__PURE__*/React.createElement("div", {
|
|
10
9
|
className: "".concat(classPrefix, " ").concat(className),
|
|
@@ -21,5 +20,4 @@ var BizDetailLayout = function BizDetailLayout(props) {
|
|
|
21
20
|
className: "".concat(classPrefix, "-content")
|
|
22
21
|
}, props.children));
|
|
23
22
|
};
|
|
24
|
-
|
|
25
23
|
export default BizDetailLayout;
|
package/es/loginForm/index.js
CHANGED
|
@@ -1,34 +1,25 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
11
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
7
|
import { Button, Form, Input } from 'antd';
|
|
14
8
|
import React, { useState } from 'react';
|
|
15
9
|
import request from '../utils/ajax';
|
|
16
10
|
import base64 from '../utils/base64';
|
|
17
11
|
import './index.less';
|
|
18
12
|
import JsCookie from 'js-cookie';
|
|
19
|
-
|
|
20
13
|
var BizLoginForm = function BizLoginForm(_ref) {
|
|
21
14
|
var loginUrl = _ref.loginUrl,
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
onSuccess = _ref.onSuccess;
|
|
24
16
|
var _useState = useState(false),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
loading = _useState2[0],
|
|
19
|
+
setLoading = _useState2[1];
|
|
29
20
|
function onSubmit(_ref2) {
|
|
30
21
|
var username = _ref2.username,
|
|
31
|
-
|
|
22
|
+
password = _ref2.password;
|
|
32
23
|
setLoading(true);
|
|
33
24
|
var pwd = base64.encode(base64.gString(password, base64.pw), false);
|
|
34
25
|
request(loginUrl || '/analysis/api/system/login', {
|
|
@@ -48,7 +39,6 @@ var BizLoginForm = function BizLoginForm(_ref) {
|
|
|
48
39
|
setLoading(false);
|
|
49
40
|
});
|
|
50
41
|
}
|
|
51
|
-
|
|
52
42
|
return /*#__PURE__*/React.createElement("div", {
|
|
53
43
|
className: "biz-login"
|
|
54
44
|
}, /*#__PURE__*/React.createElement(Form, {
|
|
@@ -73,5 +63,4 @@ var BizLoginForm = function BizLoginForm(_ref) {
|
|
|
73
63
|
loading: loading
|
|
74
64
|
}, "\u767B\u5F55"))));
|
|
75
65
|
};
|
|
76
|
-
|
|
77
66
|
export default BizLoginForm;
|