@zgfe/business-lib 1.1.22 → 1.1.24
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.d.ts +3 -1
- 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/styles/resetAntd.less +5 -0
- package/es/assets/theme.js +0 -1
- package/es/attrConditions/components/operateList.js +10 -27
- package/es/attrConditions/components/stringList.js +68 -97
- 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 +26 -60
- 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 -58
- package/es/select/option.js +10 -26
- package/es/select/overlay.js +25 -55
- 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 -37
- package/es/targetConditionGroup/demo/group.js +21 -36
- package/es/targetConditionGroup/demo/index.js +5 -13
- package/es/targetConditionGroup/index.js +31 -82
- 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.d.ts +1 -1
- 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 +2 -2
- 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 +1 -17
- package/package.json +12 -15
|
@@ -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 { Input, Tooltip, Radio, Space } from 'antd';
|
|
14
8
|
import React, { useState } from 'react';
|
|
15
9
|
import IconFont from '../../icon/iconFont';
|
|
@@ -25,20 +19,16 @@ var inputOptions = [{
|
|
|
25
19
|
label: '仅自己可见',
|
|
26
20
|
value: 3
|
|
27
21
|
}];
|
|
28
|
-
|
|
29
22
|
var AddPanel = function AddPanel(props) {
|
|
30
23
|
var classPrefix = 'biz-addpanel';
|
|
31
|
-
|
|
32
24
|
var _useState = useState(3),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
radioData = _useState2[0],
|
|
27
|
+
setRadioData = _useState2[1];
|
|
37
28
|
var _useState3 = useState(''),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
30
|
+
inputData = _useState4[0],
|
|
31
|
+
setInputData = _useState4[1];
|
|
42
32
|
var onChangeRadio = function onChangeRadio(e) {
|
|
43
33
|
var value = e.target.value;
|
|
44
34
|
setRadioData(value);
|
|
@@ -48,7 +38,6 @@ var AddPanel = function AddPanel(props) {
|
|
|
48
38
|
open_type: value
|
|
49
39
|
});
|
|
50
40
|
};
|
|
51
|
-
|
|
52
41
|
var onInput = function onInput(e) {
|
|
53
42
|
e.persist();
|
|
54
43
|
var value = e.target.value;
|
|
@@ -59,7 +48,6 @@ var AddPanel = function AddPanel(props) {
|
|
|
59
48
|
open_type: radioData
|
|
60
49
|
});
|
|
61
50
|
};
|
|
62
|
-
|
|
63
51
|
return /*#__PURE__*/React.createElement("div", {
|
|
64
52
|
className: classPrefix
|
|
65
53
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -97,5 +85,4 @@ var AddPanel = function AddPanel(props) {
|
|
|
97
85
|
}, item.label) : item.label);
|
|
98
86
|
})))));
|
|
99
87
|
};
|
|
100
|
-
|
|
101
88
|
export default AddPanel;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Radio, Space } from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
4
3
|
var RadioGroup = function RadioGroup(props) {
|
|
5
4
|
var options = props.options,
|
|
6
|
-
|
|
5
|
+
onChange = props.onChange;
|
|
7
6
|
return /*#__PURE__*/React.createElement(Radio.Group, {
|
|
8
7
|
onChange: onChange,
|
|
9
8
|
defaultValue: props.value,
|
|
@@ -17,7 +16,6 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
17
16
|
}, item.label);
|
|
18
17
|
})));
|
|
19
18
|
};
|
|
20
|
-
|
|
21
19
|
RadioGroup.defaultProps = {
|
|
22
20
|
options: [{
|
|
23
21
|
label: '动态显示数据最多的10个分组',
|
|
@@ -1,33 +1,22 @@
|
|
|
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, Radio, Space } from 'antd';
|
|
14
8
|
import React, { useState } from 'react';
|
|
15
9
|
import '../styles/style.less';
|
|
16
10
|
import IconFont from '../../icon/iconFont';
|
|
17
|
-
|
|
18
11
|
var StyleList = function StyleList(props) {
|
|
19
12
|
var _props$value;
|
|
20
|
-
|
|
21
13
|
var _useState = useState((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.split(',')),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15
|
+
tab = _useState2[0],
|
|
16
|
+
setTab = _useState2[1];
|
|
26
17
|
var classPrefix = 'biz-style';
|
|
27
|
-
|
|
28
18
|
var ChildList = function ChildList(data) {
|
|
29
19
|
var _data$children;
|
|
30
|
-
|
|
31
20
|
return /*#__PURE__*/React.createElement("div", {
|
|
32
21
|
className: "".concat(classPrefix, "-drop")
|
|
33
22
|
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
@@ -46,26 +35,21 @@ var StyleList = function StyleList(props) {
|
|
|
46
35
|
}));
|
|
47
36
|
}))));
|
|
48
37
|
};
|
|
49
|
-
|
|
50
38
|
var onChange = function onChange(data, child) {
|
|
51
39
|
setTab([data.value, child.value]);
|
|
52
40
|
props.onChange && props.onChange("".concat(child.value, ",").concat(data.value));
|
|
53
41
|
};
|
|
54
|
-
|
|
55
42
|
var _onClick = function onClick(data) {
|
|
56
43
|
if (data.disabled || tab && tab[0] === data.value) return;
|
|
57
44
|
var item = [data.value];
|
|
58
45
|
var chart = data.value;
|
|
59
|
-
|
|
60
46
|
if (data.children) {
|
|
61
47
|
item.push(data.children[0].value);
|
|
62
48
|
chart = "".concat(data.children[0].value, ",").concat(data.value);
|
|
63
49
|
}
|
|
64
|
-
|
|
65
50
|
setTab(item);
|
|
66
51
|
props.onChange && props.onChange(chart);
|
|
67
52
|
};
|
|
68
|
-
|
|
69
53
|
return /*#__PURE__*/React.createElement("div", {
|
|
70
54
|
className: classPrefix
|
|
71
55
|
}, props.options.map(function (item) {
|
|
@@ -87,7 +71,6 @@ var StyleList = function StyleList(props) {
|
|
|
87
71
|
}), /*#__PURE__*/React.createElement("span", null, item.label)));
|
|
88
72
|
}));
|
|
89
73
|
};
|
|
90
|
-
|
|
91
74
|
StyleList.defaultProps = {
|
|
92
75
|
options: []
|
|
93
76
|
};
|
|
@@ -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 React, { useState } from 'react';
|
|
14
8
|
import { BizAddToPanel } from '@zgfe/business-lib';
|
|
15
9
|
import { Button } from 'antd';
|
|
@@ -56,10 +50,9 @@ var defaultValue = {
|
|
|
56
50
|
};
|
|
57
51
|
export default (function () {
|
|
58
52
|
var _useState = useState(false),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
showDialog = _useState2[0],
|
|
55
|
+
setShowDialog = _useState2[1];
|
|
63
56
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
64
57
|
onClick: function onClick() {
|
|
65
58
|
setShowDialog(true);
|
|
@@ -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 React, { useState } from 'react';
|
|
14
8
|
import { BizAddToPanel } from '@zgfe/business-lib';
|
|
15
9
|
import { Button } from 'antd';
|
|
@@ -56,10 +50,9 @@ var defaultValue = {
|
|
|
56
50
|
};
|
|
57
51
|
export default (function () {
|
|
58
52
|
var _useState = useState(false),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
showDialog = _useState2[0],
|
|
55
|
+
setShowDialog = _useState2[1];
|
|
63
56
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
64
57
|
onClick: function onClick() {
|
|
65
58
|
setShowDialog(true);
|
package/es/addToPanel/index.js
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
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
|
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; }
|
|
2
|
-
|
|
3
3
|
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; }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
|
|
9
8
|
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."); }
|
|
10
|
-
|
|
11
9
|
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); }
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
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; }
|
|
16
|
-
|
|
10
|
+
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; }
|
|
11
|
+
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; } }
|
|
17
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
-
|
|
19
13
|
import { Button, Form, Input, notification } from 'antd';
|
|
20
14
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
21
15
|
import BizDialog from '../dialog';
|
|
@@ -30,35 +24,28 @@ import Apis from '../constants/apis';
|
|
|
30
24
|
import BizGlobalDataContext from '../context';
|
|
31
25
|
import _ from 'lodash';
|
|
32
26
|
export var classPrefix = 'biz-addtopanel';
|
|
33
|
-
|
|
34
27
|
var BizAddToPanel = function BizAddToPanel(props) {
|
|
35
28
|
var refForm = useRef();
|
|
36
|
-
|
|
37
29
|
var _useState = useState(false),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
+
addMode = _useState2[0],
|
|
32
|
+
setAddMode = _useState2[1];
|
|
42
33
|
var _useState3 = useState([]),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
35
|
+
groupList = _useState4[0],
|
|
36
|
+
setGroupList = _useState4[1];
|
|
47
37
|
var _useState5 = useState(false),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
39
|
+
loading = _useState6[0],
|
|
40
|
+
setLoading = _useState6[1];
|
|
52
41
|
var _useContext = useContext(BizGlobalDataContext),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
currentApp = _useContext.currentApp,
|
|
43
|
+
router = _useContext.router,
|
|
44
|
+
routes = _useContext.routes,
|
|
45
|
+
isDemo = _useContext.isDemo;
|
|
58
46
|
useEffect(function () {
|
|
59
47
|
queryGroups();
|
|
60
48
|
}, []);
|
|
61
|
-
|
|
62
49
|
function queryGroups() {
|
|
63
50
|
request(Apis.queryPanelGroup, {
|
|
64
51
|
method: 'post',
|
|
@@ -74,7 +61,6 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
74
61
|
});
|
|
75
62
|
return;
|
|
76
63
|
}
|
|
77
|
-
|
|
78
64
|
setGroupList(res.panels || []);
|
|
79
65
|
}).catch(function () {
|
|
80
66
|
notification.error({
|
|
@@ -82,41 +68,31 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
82
68
|
});
|
|
83
69
|
});
|
|
84
70
|
}
|
|
85
|
-
|
|
86
71
|
function toCreatePanel() {
|
|
87
72
|
var _refForm$current;
|
|
88
|
-
|
|
89
73
|
(_refForm$current = refForm.current) === null || _refForm$current === void 0 ? void 0 : _refForm$current.resetFields(['panel']);
|
|
90
74
|
setAddMode(true);
|
|
91
75
|
}
|
|
92
|
-
|
|
93
76
|
function onBack() {
|
|
94
77
|
var _refForm$current2;
|
|
95
|
-
|
|
96
78
|
(_refForm$current2 = refForm.current) === null || _refForm$current2 === void 0 ? void 0 : _refForm$current2.resetFields(['panel']);
|
|
97
79
|
setAddMode(false);
|
|
98
80
|
}
|
|
99
|
-
|
|
100
81
|
function onAdd() {
|
|
101
82
|
var _refForm$current3;
|
|
102
|
-
|
|
103
83
|
(_refForm$current3 = refForm.current) === null || _refForm$current3 === void 0 ? void 0 : _refForm$current3.submit();
|
|
104
84
|
}
|
|
105
|
-
|
|
106
85
|
function onSubmit(form) {
|
|
107
86
|
setLoading(true);
|
|
108
|
-
|
|
109
87
|
var searchParam = _.cloneDeep(props.params);
|
|
110
|
-
|
|
111
88
|
searchParam.chartType = form.chartType;
|
|
112
89
|
var resData = {
|
|
113
90
|
data: searchParam,
|
|
114
91
|
chosen_data: form.showList && form.showList === 'dynamic' ? [] : props.showList
|
|
115
92
|
};
|
|
116
93
|
var data = {},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
94
|
+
url = Apis.updatePanelTarget,
|
|
95
|
+
msgType = '保存';
|
|
120
96
|
if (props.type === 'edit') {
|
|
121
97
|
data = {
|
|
122
98
|
name: form.name,
|
|
@@ -131,33 +107,27 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
131
107
|
web_data: JSON.stringify(resData),
|
|
132
108
|
mobile_data: JSON.stringify(resData)
|
|
133
109
|
};
|
|
134
|
-
|
|
135
110
|
if (form.panel.id === 0) {
|
|
136
111
|
data.app_id = currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId;
|
|
137
112
|
data.platform = (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0;
|
|
138
113
|
data.panel_name = form.panel.name;
|
|
139
114
|
data.open_type = form.panel.open_type;
|
|
140
115
|
}
|
|
141
|
-
|
|
142
116
|
url = Apis.addPanel;
|
|
143
117
|
msgType = '添加';
|
|
144
118
|
}
|
|
145
|
-
|
|
146
119
|
request(url, {
|
|
147
120
|
method: 'post',
|
|
148
121
|
data: data
|
|
149
122
|
}).then(function (res) {
|
|
150
123
|
setLoading(false);
|
|
151
124
|
var result = res;
|
|
152
|
-
|
|
153
125
|
if (result.flag === 101) {
|
|
154
126
|
var _result$panel2;
|
|
155
|
-
|
|
156
127
|
notification.success({
|
|
157
128
|
message: /*#__PURE__*/React.createElement(React.Fragment, null, msgType, "\u81F3", /*#__PURE__*/React.createElement("a", {
|
|
158
129
|
onClick: function onClick() {
|
|
159
130
|
var _result$panel;
|
|
160
|
-
|
|
161
131
|
if (router && routes) router.push({
|
|
162
132
|
name: routes.panel,
|
|
163
133
|
params: {
|
|
@@ -167,22 +137,17 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
167
137
|
}
|
|
168
138
|
}, form.panel.name || ((_result$panel2 = result.panel) === null || _result$panel2 === void 0 ? void 0 : _result$panel2.name)), "\u6210\u529F")
|
|
169
139
|
});
|
|
170
|
-
|
|
171
140
|
if (props.onOk) {
|
|
172
141
|
var responseData = data;
|
|
173
|
-
|
|
174
142
|
if (props.type !== 'edit') {
|
|
175
143
|
var _result$panel3;
|
|
176
|
-
|
|
177
144
|
responseData = _objectSpread({
|
|
178
145
|
panelId: ((_result$panel3 = result.panel) === null || _result$panel3 === void 0 ? void 0 : _result$panel3.id) || form.panel.id
|
|
179
146
|
}, result.panel_element);
|
|
180
|
-
|
|
181
147
|
if (form.panel.id === 0) {
|
|
182
148
|
responseData.panel = _objectSpread({}, result.panel);
|
|
183
149
|
}
|
|
184
150
|
}
|
|
185
|
-
|
|
186
151
|
props.onOk(responseData);
|
|
187
152
|
}
|
|
188
153
|
} else if (result.flag === -101) {
|
|
@@ -199,7 +164,6 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
199
164
|
setLoading(false);
|
|
200
165
|
});
|
|
201
166
|
}
|
|
202
|
-
|
|
203
167
|
return /*#__PURE__*/React.createElement(BizDialog, {
|
|
204
168
|
visible: true,
|
|
205
169
|
title: props.type === 'edit' ? '修改当前看板指标' : '向看板添加指标',
|
|
@@ -291,7 +255,6 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
291
255
|
})) : null;
|
|
292
256
|
})));
|
|
293
257
|
};
|
|
294
|
-
|
|
295
258
|
BizAddToPanel.defaultProps = {
|
|
296
259
|
showList: []
|
|
297
260
|
};
|
|
@@ -2,10 +2,8 @@ import { Button, Input } from 'antd';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { classPrefix } from '.';
|
|
4
4
|
import IconFont from '../icon/iconFont';
|
|
5
|
-
|
|
6
5
|
var AddGroup = function AddGroup(props) {
|
|
7
6
|
var onBack = props.onBack;
|
|
8
|
-
|
|
9
7
|
function onInput(e) {
|
|
10
8
|
e.persist();
|
|
11
9
|
if (props.onChange) props.onChange({
|
|
@@ -13,7 +11,6 @@ var AddGroup = function AddGroup(props) {
|
|
|
13
11
|
groupId: 0
|
|
14
12
|
});
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
return /*#__PURE__*/React.createElement("div", {
|
|
18
15
|
className: "".concat(classPrefix, "-addgroup")
|
|
19
16
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
@@ -30,5 +27,4 @@ var AddGroup = function AddGroup(props) {
|
|
|
30
27
|
type: "ghost"
|
|
31
28
|
}));
|
|
32
29
|
};
|
|
33
|
-
|
|
34
30
|
export default AddGroup;
|
|
@@ -1,24 +1,17 @@
|
|
|
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 } from 'antd';
|
|
14
8
|
import React, { useState } from 'react';
|
|
15
9
|
import { BizAddToScene } from '@zgfe/business-lib';
|
|
16
10
|
export default (function () {
|
|
17
11
|
var _useState = useState(false),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13
|
+
showDialog = _useState2[0],
|
|
14
|
+
setShowDialog = _useState2[1];
|
|
22
15
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
23
16
|
onClick: function onClick() {
|
|
24
17
|
setShowDialog(true);
|
package/es/addToScene/index.js
CHANGED
|
@@ -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 { Button, Form, Input, notification } from 'antd';
|
|
14
8
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
15
9
|
import BizDialog from '../dialog';
|
|
@@ -21,55 +15,41 @@ import Apis from '../constants/apis';
|
|
|
21
15
|
import request from '../utils/ajax';
|
|
22
16
|
import IconFont from '../icon/iconFont';
|
|
23
17
|
export var classPrefix = 'biz-addtoscene';
|
|
24
|
-
|
|
25
18
|
var BizAddToScene = function BizAddToScene(props) {
|
|
26
19
|
var params = props.params;
|
|
27
|
-
|
|
28
20
|
var _useState = useState([]),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
groupList = _useState2[0],
|
|
23
|
+
setGroupList = _useState2[1];
|
|
33
24
|
var _useState3 = useState(false),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
26
|
+
addMode = _useState4[0],
|
|
27
|
+
setAddMode = _useState4[1];
|
|
38
28
|
var _useState5 = useState(false),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
30
|
+
loading = _useState6[0],
|
|
31
|
+
setLoading = _useState6[1];
|
|
43
32
|
var _useContext = useContext(BizGlobalDataContext),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
currentApp = _useContext.currentApp,
|
|
34
|
+
isDemo = _useContext.isDemo;
|
|
47
35
|
var refForm = useRef();
|
|
48
|
-
|
|
49
36
|
function toAddGroup() {
|
|
50
37
|
var _refForm$current;
|
|
51
|
-
|
|
52
38
|
(_refForm$current = refForm.current) === null || _refForm$current === void 0 ? void 0 : _refForm$current.resetFields(['group']);
|
|
53
39
|
setAddMode(true);
|
|
54
40
|
}
|
|
55
|
-
|
|
56
41
|
function onBack() {
|
|
57
42
|
var _refForm$current2;
|
|
58
|
-
|
|
59
43
|
(_refForm$current2 = refForm.current) === null || _refForm$current2 === void 0 ? void 0 : _refForm$current2.resetFields(['group']);
|
|
60
44
|
setAddMode(false);
|
|
61
45
|
}
|
|
62
|
-
|
|
63
46
|
function onSave() {
|
|
64
47
|
var _refForm$current3;
|
|
65
|
-
|
|
66
48
|
(_refForm$current3 = refForm.current) === null || _refForm$current3 === void 0 ? void 0 : _refForm$current3.submit();
|
|
67
49
|
}
|
|
68
|
-
|
|
69
50
|
function onCancel() {
|
|
70
51
|
if (props.onCancel) props.onCancel();
|
|
71
52
|
}
|
|
72
|
-
|
|
73
53
|
function onSubmit(form) {
|
|
74
54
|
setLoading(true);
|
|
75
55
|
var data = {
|
|
@@ -82,18 +62,15 @@ var BizAddToScene = function BizAddToScene(props) {
|
|
|
82
62
|
}),
|
|
83
63
|
name: form.name
|
|
84
64
|
};
|
|
85
|
-
|
|
86
65
|
if (form.group.groupId === 0) {
|
|
87
66
|
data.groupName = form.group.groupName;
|
|
88
67
|
}
|
|
89
|
-
|
|
90
68
|
request(Apis.addScene, {
|
|
91
69
|
method: 'post',
|
|
92
70
|
data: data
|
|
93
71
|
}).then(function (res) {
|
|
94
72
|
setLoading(false);
|
|
95
73
|
var result = res;
|
|
96
|
-
|
|
97
74
|
if (result.code === 10001) {
|
|
98
75
|
notification.success({
|
|
99
76
|
message: '添加成功'
|
|
@@ -113,7 +90,6 @@ var BizAddToScene = function BizAddToScene(props) {
|
|
|
113
90
|
setLoading(false);
|
|
114
91
|
});
|
|
115
92
|
}
|
|
116
|
-
|
|
117
93
|
function queryGroups() {
|
|
118
94
|
request(Apis.querySceneGroup, {
|
|
119
95
|
method: 'post',
|
|
@@ -128,11 +104,9 @@ var BizAddToScene = function BizAddToScene(props) {
|
|
|
128
104
|
});
|
|
129
105
|
return;
|
|
130
106
|
}
|
|
131
|
-
|
|
132
107
|
setGroupList(res.groups);
|
|
133
108
|
});
|
|
134
109
|
}
|
|
135
|
-
|
|
136
110
|
useEffect(function () {
|
|
137
111
|
queryGroups();
|
|
138
112
|
}, []);
|
|
@@ -197,5 +171,4 @@ var BizAddToScene = function BizAddToScene(props) {
|
|
|
197
171
|
}
|
|
198
172
|
}))));
|
|
199
173
|
};
|
|
200
|
-
|
|
201
174
|
export default BizAddToScene;
|
package/es/assets/demo/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@zgfe/business-lib/es/assets/styles/resetAntd.less';
|
|
3
|
-
|
|
4
3
|
var AssetsDemo = function AssetsDemo(_ref) {
|
|
5
4
|
var children = _ref.children;
|
|
6
5
|
return /*#__PURE__*/React.createElement("div", null, children);
|
|
7
6
|
};
|
|
8
|
-
|
|
9
7
|
export default AssetsDemo;
|