@zgfe/modules-event 1.0.7 → 1.0.29-zhongyuan-event.2
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/README.md +35 -35
- package/es/components/eventFilter/index.js +107 -53
- package/es/components/eventFilter/setCascade.d.ts +3 -0
- package/es/components/eventFilter/setCascade.js +286 -0
- package/es/components/eventFilter/styles/index.less +148 -36
- package/es/components/eventFilter/types.d.ts +1 -0
- package/es/components/renderContent/index.js +16 -27
- package/es/components/renderContent/styles/index.less +19 -19
- package/es/components/renderContent/types.d.ts +0 -1
- package/es/components/searchPanel/index.js +35 -17
- package/es/components/searchPanel/styles/index.less +22 -18
- package/es/components/searchPanel/types.d.ts +2 -2
- package/es/components/table/index.js +107 -36
- package/es/components/table/styles/index.css +236 -0
- package/es/components/table/styles/index.less +249 -193
- package/es/components/table/types.d.ts +0 -1
- package/es/components/topBar/index.d.ts +6 -1
- package/es/components/topBar/index.js +62 -45
- package/es/components/topBar/styles/index.less +58 -63
- package/es/components/topBar/types.d.ts +0 -1
- package/es/constants/apis.d.ts +3 -1
- package/es/constants/apis.js +4 -2
- package/es/constants/fields.d.ts +0 -14
- package/es/constants/fields.js +1 -45
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/modules/chart/demo/index.js +5 -5
- package/es/modules/chart/demo/panel.js +7 -2
- package/es/modules/chart/index.js +123 -48
- package/es/modules/chart/types.d.ts +3 -0
- package/es/modules/content/index.d.ts +1 -1
- package/es/modules/content/index.js +116 -75
- package/es/modules/content/styles/index.less +19 -7
- package/es/modules/content/utils.d.ts +3 -2
- package/es/modules/content/utils.js +63 -34
- package/es/modules/home/demo/create.js +8 -8
- package/es/modules/home/demo/edit.js +14 -15
- package/es/modules/home/demo/index.js +13 -10
- package/es/modules/home/demo/scene.js +8 -8
- package/es/modules/home/demo/styles/index.less +33 -33
- package/es/modules/home/index.js +59 -41
- package/es/modules/home/styles/index.less +49 -49
- package/es/modules/topPanel/index.js +51 -23
- package/es/modules/topPanel/styles/index.less +50 -49
- package/es/style/image/ring.svg +8 -8
- package/es/style/index.less +62 -62
- package/es/types.d.ts +8 -0
- package/es/utils/formData.d.ts +2 -1
- package/es/utils/formData.js +70 -21
- package/package.json +24 -20
package/es/modules/home/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
7
|
-
function _slicedToArray(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
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."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function _iterableToArrayLimit(
|
|
12
|
-
function _arrayWithHoles(
|
|
13
|
-
import React, { useContext, useEffect, useState } from 'react';
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import React, { useContext, useEffect, useState, useRef } from 'react';
|
|
14
14
|
import { Spin } from 'antd';
|
|
15
15
|
import { BizGlobalDataContext, BizTargetFromPanel } from '@zgfe/business-lib';
|
|
16
16
|
import './styles/index.less';
|
|
@@ -26,11 +26,16 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
26
26
|
eventGroupList = _useContext.eventGroupList,
|
|
27
27
|
eventEnvList = _useContext.eventEnvList,
|
|
28
28
|
userPropList = _useContext.userPropList,
|
|
29
|
-
userGroupList = _useContext.userGroupList
|
|
29
|
+
userGroupList = _useContext.userGroupList,
|
|
30
|
+
useBizStoreLoading = _useContext.useBizStoreLoading;
|
|
30
31
|
var _useState = useState(),
|
|
31
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
33
|
searchData = _useState2[0],
|
|
33
34
|
setSearchData = _useState2[1];
|
|
35
|
+
var _useState3 = useState(),
|
|
36
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
+
completedSearchData = _useState4[0],
|
|
38
|
+
setCompletedSearchData = _useState4[1];
|
|
34
39
|
var onChangeUrlParam = function onChangeUrlParam(data) {
|
|
35
40
|
clearTimeout(onChangeTimer);
|
|
36
41
|
onChangeTimer = setTimeout(function () {
|
|
@@ -39,20 +44,20 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
39
44
|
});
|
|
40
45
|
}, 500);
|
|
41
46
|
};
|
|
42
|
-
var _useState3 = useState(),
|
|
43
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
44
|
-
selectEventData = _useState4[0],
|
|
45
|
-
setSelectEventData = _useState4[1];
|
|
46
47
|
var _useState5 = useState(true),
|
|
47
48
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
48
49
|
loading = _useState6[0],
|
|
49
50
|
setLoading = _useState6[1];
|
|
50
|
-
var _useState7 = useState(
|
|
51
|
+
var _useState7 = useState(false),
|
|
51
52
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var _useState9 = useState(),
|
|
55
|
-
|
|
53
|
+
refreshLoading = _useState8[0],
|
|
54
|
+
setRefreshLoading = _useState8[1];
|
|
55
|
+
var _useState9 = useState(true),
|
|
56
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
57
|
+
pageLoading = _useState0[0],
|
|
58
|
+
setPageLoading = _useState0[1];
|
|
59
|
+
var _useState1 = useState(),
|
|
60
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
56
61
|
title = _useState10[0],
|
|
57
62
|
setTitle = _useState10[1];
|
|
58
63
|
var _useState11 = useState(),
|
|
@@ -65,13 +70,13 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
65
70
|
setElementId = _useState14[1];
|
|
66
71
|
var _useState15 = useState(),
|
|
67
72
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
showListHome = _useState16[0],
|
|
74
|
+
setShowListHome = _useState16[1];
|
|
70
75
|
useEffect(function () {
|
|
71
76
|
setPageLoading(true);
|
|
72
77
|
if (props.defaultValue) {
|
|
73
78
|
var _props$defaultValue;
|
|
74
|
-
|
|
79
|
+
setShowListHome(props.defaultValue.chosen_data);
|
|
75
80
|
setPanelId(props.defaultValue.panelId);
|
|
76
81
|
setTitle(props.defaultValue.name);
|
|
77
82
|
if ((_props$defaultValue = props.defaultValue) === null || _props$defaultValue === void 0 ? void 0 : _props$defaultValue.id) {
|
|
@@ -95,23 +100,33 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
95
100
|
chartType: 'line'
|
|
96
101
|
});
|
|
97
102
|
};
|
|
103
|
+
var eventContentRef = useRef();
|
|
98
104
|
var onSelectEvent = function onSelectEvent(id, name) {
|
|
99
105
|
if ((searchData === null || searchData === void 0 ? void 0 : searchData.id) === undefined) {
|
|
100
|
-
|
|
106
|
+
var _eventContentRef$curr;
|
|
107
|
+
setSearchData({
|
|
108
|
+
id: id,
|
|
109
|
+
name: name,
|
|
101
110
|
analysisIndex: searchData === null || searchData === void 0 ? void 0 : searchData.analysisIndex,
|
|
102
111
|
chartType: searchData === null || searchData === void 0 ? void 0 : searchData.chartType,
|
|
103
112
|
time: searchData === null || searchData === void 0 ? void 0 : searchData.time,
|
|
104
|
-
userGroup: searchData === null || searchData === void 0 ? void 0 : searchData.userGroup
|
|
105
|
-
|
|
106
|
-
|
|
113
|
+
userGroup: searchData === null || searchData === void 0 ? void 0 : searchData.userGroup
|
|
114
|
+
});
|
|
115
|
+
eventContentRef === null || eventContentRef === void 0 ? void 0 : (_eventContentRef$curr = eventContentRef.current) === null || _eventContentRef$curr === void 0 ? void 0 : _eventContentRef$curr.onFormSetFieldsValue({
|
|
116
|
+
filterConditions: {
|
|
117
|
+
id: id,
|
|
118
|
+
name: name
|
|
119
|
+
},
|
|
120
|
+
userGroup: searchData === null || searchData === void 0 ? void 0 : searchData.userGroup
|
|
107
121
|
});
|
|
108
122
|
}
|
|
109
123
|
};
|
|
110
|
-
if (pageLoading) {
|
|
124
|
+
if (pageLoading || useBizStoreLoading) {
|
|
111
125
|
return /*#__PURE__*/React.createElement(Spin, null);
|
|
112
126
|
}
|
|
113
|
-
return /*#__PURE__*/React.createElement(
|
|
114
|
-
|
|
127
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
128
|
+
spinning: false,
|
|
129
|
+
wrapperClassName: classPrefix
|
|
115
130
|
}, /*#__PURE__*/React.createElement(BizTargetFromPanel, {
|
|
116
131
|
value: panelId ? {
|
|
117
132
|
panelId: panelId,
|
|
@@ -122,18 +137,21 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
122
137
|
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
123
138
|
module: 'event'
|
|
124
139
|
}, searchData),
|
|
125
|
-
showList:
|
|
140
|
+
showList: showListHome
|
|
126
141
|
}
|
|
127
142
|
} : undefined,
|
|
128
143
|
disabled: props === null || props === void 0 ? void 0 : props.panelDisabled,
|
|
129
144
|
styleOptions: chartTypes,
|
|
130
145
|
afterEditTarget: props.afterEditTarget
|
|
131
|
-
}
|
|
132
|
-
className: "".concat(classPrefix, "-header-title")
|
|
133
|
-
}, "\u4E8B\u4EF6\u5206\u6790"), /*#__PURE__*/React.createElement(EventContext.Provider, {
|
|
146
|
+
}, /*#__PURE__*/React.createElement(EventContext.Provider, {
|
|
134
147
|
value: {
|
|
148
|
+
refreshLoading: refreshLoading,
|
|
149
|
+
setRefreshLoading: setRefreshLoading,
|
|
150
|
+
currentApp: currentApp,
|
|
135
151
|
loading: loading,
|
|
136
152
|
setLoading: setLoading,
|
|
153
|
+
showListHome: showListHome,
|
|
154
|
+
setShowListHome: setShowListHome,
|
|
137
155
|
panelId: panelId,
|
|
138
156
|
elementId: elementId,
|
|
139
157
|
eventGroupList: eventGroupList,
|
|
@@ -141,8 +159,9 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
141
159
|
userPropList: userPropList,
|
|
142
160
|
searchData: searchData,
|
|
143
161
|
setSearchData: setSearchData,
|
|
162
|
+
completedSearchData: completedSearchData,
|
|
163
|
+
setCompletedSearchData: setCompletedSearchData,
|
|
144
164
|
onChangeUrlParam: onChangeUrlParam,
|
|
145
|
-
selectEventData: selectEventData,
|
|
146
165
|
onSelectEvent: onSelectEvent,
|
|
147
166
|
panelName: title,
|
|
148
167
|
includeToday: props.includeToday,
|
|
@@ -154,11 +173,10 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
154
173
|
}
|
|
155
174
|
}, /*#__PURE__*/React.createElement(EventContent, {
|
|
156
175
|
elementId: elementId,
|
|
176
|
+
ref: eventContentRef,
|
|
157
177
|
value: searchData,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
onChangeShow: setShowList
|
|
161
|
-
})));
|
|
178
|
+
initSearch: initSearch
|
|
179
|
+
}))));
|
|
162
180
|
};
|
|
163
181
|
ModuleEvent.defaultProps = {
|
|
164
182
|
includeToday: true
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
.event-module-container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
min-width: 1000px;
|
|
4
|
-
height:
|
|
5
|
-
background: #fafafb;
|
|
6
|
-
&-header-title {
|
|
7
|
-
height: 48px;
|
|
8
|
-
padding: 0px
|
|
9
|
-
color: #021429;
|
|
10
|
-
font-weight: 500;
|
|
11
|
-
font-size: 16px;
|
|
12
|
-
line-height: 48px;
|
|
13
|
-
background: #fff;
|
|
14
|
-
}
|
|
15
|
-
.biz-layout-top {
|
|
16
|
-
margin-top: 2px;
|
|
17
|
-
padding
|
|
18
|
-
.biz-user-group-header {
|
|
19
|
-
.ant-space-item {
|
|
20
|
-
color: #5f6085;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
.ant-spin-container {
|
|
25
|
-
width: 100%;
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.biz-select-option:not(.biz-select-option-multiple),
|
|
30
|
-
.biz-attr-select-option {
|
|
31
|
-
&.active {
|
|
32
|
-
background: @primary-color !important;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// 设置下拉框最大高度
|
|
37
|
-
.biz-select-overlay {
|
|
38
|
-
max-height: 300px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.biz-layout-panel-content {
|
|
42
|
-
height: auto;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.biz-layout-collapse-container {
|
|
46
|
-
align-items: center;
|
|
47
|
-
height: 24px;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
.event-module-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
min-width: 1000px;
|
|
4
|
+
height: 100% !important;
|
|
5
|
+
background: #fafafb;
|
|
6
|
+
&-header-title {
|
|
7
|
+
height: 48px;
|
|
8
|
+
padding: 0px 16px;
|
|
9
|
+
color: #021429;
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
line-height: 48px;
|
|
13
|
+
background: #fff;
|
|
14
|
+
}
|
|
15
|
+
.biz-layout-top {
|
|
16
|
+
margin-top: 2px;
|
|
17
|
+
padding: 0 16px 16px;
|
|
18
|
+
.biz-user-group-header {
|
|
19
|
+
.ant-space-item {
|
|
20
|
+
color: #5f6085;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.ant-spin-container {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.biz-select-option:not(.biz-select-option-multiple),
|
|
30
|
+
.biz-attr-select-option {
|
|
31
|
+
&.active {
|
|
32
|
+
background: @primary-color !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 设置下拉框最大高度
|
|
37
|
+
.biz-select-overlay {
|
|
38
|
+
max-height: 300px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.biz-layout-panel-content {
|
|
42
|
+
height: auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.biz-layout-collapse-container {
|
|
46
|
+
align-items: center;
|
|
47
|
+
height: 24px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
7
|
-
function _slicedToArray(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
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."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function _iterableToArrayLimit(
|
|
12
|
-
function _arrayWithHoles(
|
|
13
|
-
import React, { useState, useEffect } from 'react';
|
|
14
|
-
import { Form, Button } from 'antd';
|
|
15
|
-
import { BizUserGroupHeader, BizSelect, useSubject } from '@zgfe/business-lib';
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import React, { useState, useEffect, useRef, useImperativeHandle, useContext } from 'react';
|
|
14
|
+
import { Form, Button, Tooltip } from 'antd';
|
|
15
|
+
import { BizUserGroupHeader, BizSelect, useSubject, IconFont } from '@zgfe/business-lib';
|
|
16
16
|
import EventFilter from '../../components/eventFilter';
|
|
17
17
|
import './styles/index.less';
|
|
18
18
|
import _ from 'lodash';
|
|
19
|
+
import { EventContext } from '../../types';
|
|
19
20
|
var classPrefix = 'modules-event-top-panel';
|
|
20
21
|
var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
22
|
+
var _useContext = useContext(EventContext),
|
|
23
|
+
currentApp = _useContext.currentApp;
|
|
21
24
|
var value = props.value,
|
|
22
25
|
setIsCity = props.setIsCity,
|
|
23
26
|
setEnableSelectChart = props.setEnableSelectChart,
|
|
@@ -62,6 +65,21 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
62
65
|
});
|
|
63
66
|
props.onChange(searchData, true);
|
|
64
67
|
}
|
|
68
|
+
var collapseRef = useRef();
|
|
69
|
+
useImperativeHandle(ref, function () {
|
|
70
|
+
return {
|
|
71
|
+
onFormSetFieldsValue: function onFormSetFieldsValue(data) {
|
|
72
|
+
form.resetFields();
|
|
73
|
+
form.setFieldsValue(data);
|
|
74
|
+
},
|
|
75
|
+
getCollapseRef: function getCollapseRef() {
|
|
76
|
+
return collapseRef;
|
|
77
|
+
},
|
|
78
|
+
submit: function submit() {
|
|
79
|
+
return form.submit();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
});
|
|
65
83
|
var resetting = function resetting() {
|
|
66
84
|
form.resetFields();
|
|
67
85
|
form.setFieldsValue({
|
|
@@ -114,13 +132,23 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
114
132
|
},
|
|
115
133
|
scrollToFirstError: true,
|
|
116
134
|
onFinish: onSearch
|
|
117
|
-
}, !subDisplay ? null : /*#__PURE__*/React.createElement(Form.Item, {
|
|
118
|
-
label: "
|
|
135
|
+
}, !subDisplay ? null : (/*#__PURE__*/React.createElement(Form.Item, {
|
|
136
|
+
label: /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: "".concat(classPrefix, "-label-hasIcon")
|
|
138
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u7EDF\u8BA1\u53E3\u5F84"), "\xA0\xA0", /*#__PURE__*/React.createElement(Tooltip, {
|
|
139
|
+
title: "\u5E2E\u52A9",
|
|
140
|
+
placement: "top"
|
|
141
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
142
|
+
type: "bangzhu",
|
|
143
|
+
onClick: function onClick() {
|
|
144
|
+
return window.open("".concat(location.origin, "/webapp/app/help/intro"), '_blank');
|
|
145
|
+
}
|
|
146
|
+
}))),
|
|
119
147
|
className: "".concat(classPrefix, "-form-event hoverable-form-item")
|
|
120
148
|
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
121
149
|
className: "".concat(classPrefix, "-form-event-select"),
|
|
122
150
|
options: [{
|
|
123
|
-
label: '用户',
|
|
151
|
+
label: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体' : '用户',
|
|
124
152
|
value: 'user'
|
|
125
153
|
}, {
|
|
126
154
|
label: '事件属性',
|
|
@@ -138,15 +166,15 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
138
166
|
setIsCity && setIsCity(false);
|
|
139
167
|
resetting();
|
|
140
168
|
}
|
|
141
|
-
})), analysisType === 'user' ? /*#__PURE__*/React.createElement(Form.Item, {
|
|
169
|
+
}))), analysisType === 'user' ? (/*#__PURE__*/React.createElement(Form.Item, {
|
|
142
170
|
label: "",
|
|
143
171
|
name: "userGroup",
|
|
144
172
|
className: "hoverable-form-item"
|
|
145
173
|
}, /*#__PURE__*/React.createElement(BizUserGroupHeader, {
|
|
146
174
|
max: 3,
|
|
147
175
|
enableTags: true
|
|
148
|
-
})) : /*#__PURE__*/React.createElement(Form.Item, {
|
|
149
|
-
label: "\
|
|
176
|
+
}))) : (/*#__PURE__*/React.createElement(Form.Item, {
|
|
177
|
+
label: "\u53E3\u5F84\u540D\u79F0",
|
|
150
178
|
name: "analysisSubject",
|
|
151
179
|
className: "".concat(classPrefix, "-form-event hoverable-form-item"),
|
|
152
180
|
rules: [{
|
|
@@ -154,7 +182,7 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
154
182
|
if (value && (value.id || value.subjectId)) {
|
|
155
183
|
return Promise.resolve();
|
|
156
184
|
} else {
|
|
157
|
-
return Promise.reject('
|
|
185
|
+
return Promise.reject('请选择口径名称');
|
|
158
186
|
}
|
|
159
187
|
}
|
|
160
188
|
}]
|
|
@@ -164,8 +192,8 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
164
192
|
aliasField: "subjectAlias",
|
|
165
193
|
labelField: "subjectName",
|
|
166
194
|
keyField: "id"
|
|
167
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
168
|
-
ref:
|
|
195
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
196
|
+
ref: collapseRef
|
|
169
197
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
170
198
|
label: "\u4E8B\u4EF6",
|
|
171
199
|
name: "filterConditions",
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
.modules-event-top-panel {
|
|
2
|
-
&-form-event {
|
|
3
|
-
margin-bottom: 0;
|
|
4
|
-
& .ant-form-item-label {
|
|
5
|
-
padding-left: 24px !important;
|
|
6
|
-
font-weight: 500;
|
|
7
|
-
}
|
|
8
|
-
&-select {
|
|
9
|
-
width: 208px;
|
|
10
|
-
margin-left: 24px;
|
|
11
|
-
.biz-select-handle-input {
|
|
12
|
-
padding-left: 12px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
.ant-form-item-row .ant-form-item-control {
|
|
16
|
-
margin-bottom: 24px;
|
|
17
|
-
padding: 4px 0;
|
|
18
|
-
}
|
|
19
|
-
.ant-form-item-explain-error {
|
|
20
|
-
padding-left: 24px;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
&-form-botton-box {
|
|
24
|
-
display: flex;
|
|
25
|
-
justify-content: flex-end;
|
|
26
|
-
margin-right: 24px;
|
|
27
|
-
> :nth-child(1) {
|
|
28
|
-
margin-right: 16px;
|
|
29
|
-
color: #fff;
|
|
30
|
-
background-color: #29bd52;
|
|
31
|
-
border-color: #29bd52;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
.modules-event-top-panel {
|
|
2
|
+
&-form-event {
|
|
3
|
+
margin-bottom: 0;
|
|
4
|
+
& .ant-form-item-label {
|
|
5
|
+
padding-left: 24px !important;
|
|
6
|
+
font-weight: 500;
|
|
7
|
+
}
|
|
8
|
+
&-select {
|
|
9
|
+
width: 208px;
|
|
10
|
+
margin-left: 24px;
|
|
11
|
+
.biz-select-handle-input {
|
|
12
|
+
padding-left: 12px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.ant-form-item-row .ant-form-item-control {
|
|
16
|
+
margin-bottom: 24px;
|
|
17
|
+
padding: 4px 0;
|
|
18
|
+
}
|
|
19
|
+
.ant-form-item-explain-error {
|
|
20
|
+
padding-left: 24px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
&-form-botton-box {
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: flex-end;
|
|
26
|
+
margin-right: 24px;
|
|
27
|
+
> :nth-child(1) {
|
|
28
|
+
margin-right: 16px;
|
|
29
|
+
color: #fff;
|
|
30
|
+
background-color: #29bd52;
|
|
31
|
+
border-color: #29bd52;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-label-hasIcon {
|
|
36
|
+
.bsicon {
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.hoverable-form-item {
|
|
42
|
+
.ant-form-item-control {
|
|
43
|
+
&:hover {
|
|
44
|
+
background: #e8efff !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
.event---1 .ant-form-item-label {
|
|
49
|
+
padding-bottom: 4px !important;
|
|
50
|
+
}
|
package/es/style/image/ring.svg
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="80px" height="80px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
3
|
-
<circle cx="50" cy="50" r="32" stroke-width="4" stroke="#165dff" stroke-dasharray="50.26548245743669 50.26548245743669" fill="none" stroke-linecap="round">
|
|
4
|
-
<animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;360 50 50"></animateTransform>
|
|
5
|
-
</circle>
|
|
6
|
-
<circle cx="50" cy="50" r="27" stroke-width="4" stroke="#85adfc" stroke-dasharray="42.411500823462205 42.411500823462205" stroke-dashoffset="42.411500823462205" fill="none" stroke-linecap="round">
|
|
7
|
-
<animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;-360 50 50"></animateTransform>
|
|
8
|
-
</circle>
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="80px" height="80px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
3
|
+
<circle cx="50" cy="50" r="32" stroke-width="4" stroke="#165dff" stroke-dasharray="50.26548245743669 50.26548245743669" fill="none" stroke-linecap="round">
|
|
4
|
+
<animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;360 50 50"></animateTransform>
|
|
5
|
+
</circle>
|
|
6
|
+
<circle cx="50" cy="50" r="27" stroke-width="4" stroke="#85adfc" stroke-dasharray="42.411500823462205 42.411500823462205" stroke-dashoffset="42.411500823462205" fill="none" stroke-linecap="round">
|
|
7
|
+
<animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;-360 50 50"></animateTransform>
|
|
8
|
+
</circle>
|
|
9
9
|
<!-- [ldio] generated by https://loading.io/ --></svg>
|