@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
|
@@ -1,25 +1,27 @@
|
|
|
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(
|
|
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
13
|
import { Button } from 'antd';
|
|
14
14
|
import React, { useContext, useState, useEffect } from 'react';
|
|
15
|
-
import { BizAddToPanel, BizAddToScene, BizGlobalDataContext } from '@zgfe/business-lib';
|
|
15
|
+
import { BizAddToPanel, BizAddToScene, BizGlobalDataContext, BizPlatformSelector, IconFont } from '@zgfe/business-lib';
|
|
16
16
|
import './styles/index.less';
|
|
17
17
|
import { EventContext } from '../../types';
|
|
18
|
-
import { chartTypes
|
|
18
|
+
import { chartTypes } from '../../constants/fields';
|
|
19
19
|
import { getWarningId } from '../../utils/formData';
|
|
20
20
|
var classPrefix = 'modules-event-topbar';
|
|
21
21
|
var TopBar = function TopBar(props) {
|
|
22
22
|
var _useContext = useContext(EventContext),
|
|
23
|
+
currentApp = _useContext.currentApp,
|
|
24
|
+
showListHome = _useContext.showListHome,
|
|
23
25
|
panelId = _useContext.panelId,
|
|
24
26
|
afterEditTarget = _useContext.afterEditTarget,
|
|
25
27
|
loading = _useContext.loading,
|
|
@@ -35,11 +37,11 @@ var TopBar = function TopBar(props) {
|
|
|
35
37
|
showScene = _useState4[0],
|
|
36
38
|
setShowScene = _useState4[1];
|
|
37
39
|
var _useContext2 = useContext(BizGlobalDataContext),
|
|
38
|
-
currentApp = _useContext2.currentApp,
|
|
39
40
|
eventGroupList = _useContext2.eventGroupList,
|
|
40
|
-
authority = _useContext2.authority
|
|
41
|
+
authority = _useContext2.authority,
|
|
42
|
+
router = _useContext2.router,
|
|
43
|
+
routes = _useContext2.routes;
|
|
41
44
|
var searchData = props.searchData,
|
|
42
|
-
showList = props.showList,
|
|
43
45
|
platformChange = props.platformChange,
|
|
44
46
|
eventData = props.eventData,
|
|
45
47
|
onClickGenerateReport = props.onClickGenerateReport,
|
|
@@ -48,14 +50,14 @@ var TopBar = function TopBar(props) {
|
|
|
48
50
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
49
51
|
options = _useState6[0],
|
|
50
52
|
setOptions = _useState6[1];
|
|
51
|
-
var _useState7 = useState(
|
|
53
|
+
var _useState7 = useState(-1),
|
|
52
54
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var _useState9 = useState(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
warningId = _useState8[0],
|
|
56
|
+
setWarningId = _useState8[1];
|
|
57
|
+
var _useState9 = useState((searchData === null || searchData === void 0 ? void 0 : searchData.platform) === undefined ? 0 : searchData.platform),
|
|
58
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
59
|
+
selectPlatform = _useState0[0],
|
|
60
|
+
setselectPlatform = _useState0[1];
|
|
59
61
|
useEffect(function () {
|
|
60
62
|
setWarningId(getWarningId(searchData, eventData, eventGroupList));
|
|
61
63
|
}, [searchData, eventData, eventGroupList]);
|
|
@@ -71,10 +73,10 @@ var TopBar = function TopBar(props) {
|
|
|
71
73
|
return item;
|
|
72
74
|
}), setOptions(options);
|
|
73
75
|
}, [searchData, enableSelectChart]);
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
panelType =
|
|
77
|
-
setPanelType =
|
|
76
|
+
var _useState1 = useState(),
|
|
77
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
78
|
+
panelType = _useState10[0],
|
|
79
|
+
setPanelType = _useState10[1];
|
|
78
80
|
var closeHandle = function closeHandle(type) {
|
|
79
81
|
if (type === 'panel') {
|
|
80
82
|
setPanelType(undefined);
|
|
@@ -89,14 +91,32 @@ var TopBar = function TopBar(props) {
|
|
|
89
91
|
};
|
|
90
92
|
return /*#__PURE__*/React.createElement("div", {
|
|
91
93
|
className: classPrefix
|
|
92
|
-
},
|
|
94
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: "".concat(classPrefix, "-title")
|
|
96
|
+
}, !panelId && enableGenerateReport && (/*#__PURE__*/React.createElement(IconFont, {
|
|
97
|
+
type: "fanhuiicon",
|
|
98
|
+
onClick: function onClick() {
|
|
99
|
+
if (!router) return;
|
|
100
|
+
var params = new URLSearchParams(window.location.search);
|
|
101
|
+
var _reportId = params.get('reportId');
|
|
102
|
+
router.push({
|
|
103
|
+
name: routes.report,
|
|
104
|
+
query: {
|
|
105
|
+
reportId: _reportId,
|
|
106
|
+
isEdit: 1
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}, "\u8FD4\u56DE")), /*#__PURE__*/React.createElement("span", null, "\u4E8B\u4EF6\u5206\u6790")), /*#__PURE__*/React.createElement("div", {
|
|
111
|
+
className: "".concat(classPrefix, "-right")
|
|
112
|
+
}, !panelId && (/*#__PURE__*/React.createElement("div", {
|
|
93
113
|
className: "".concat(classPrefix, "-panel")
|
|
94
114
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
95
115
|
disabled: !authority[100049],
|
|
96
116
|
onClick: function onClick() {
|
|
97
117
|
setShowPanel(true);
|
|
98
118
|
}
|
|
99
|
-
}, "\u6DFB\u52A0\u5230\u770B\u677F"), showPanel && /*#__PURE__*/React.createElement(BizAddToPanel, {
|
|
119
|
+
}, "\u6DFB\u52A0\u5230\u770B\u677F"), showPanel && (/*#__PURE__*/React.createElement(BizAddToPanel, {
|
|
100
120
|
type: panelType,
|
|
101
121
|
params: _objectSpread({
|
|
102
122
|
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
@@ -104,21 +124,21 @@ var TopBar = function TopBar(props) {
|
|
|
104
124
|
module: 'event'
|
|
105
125
|
}, searchData),
|
|
106
126
|
styleOptions: options,
|
|
107
|
-
showList: (searchData === null || searchData === void 0 ? void 0 : searchData.chartType) !== 'map' ?
|
|
127
|
+
showList: (searchData === null || searchData === void 0 ? void 0 : searchData.chartType) !== 'map' ? showListHome : [],
|
|
108
128
|
onCancel: function onCancel() {
|
|
109
129
|
return closeHandle('panel');
|
|
110
130
|
},
|
|
111
131
|
onOk: function onOk(data) {
|
|
112
132
|
return _onOk('panel', data);
|
|
113
133
|
}
|
|
114
|
-
})), !panelId && /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
})))), !panelId && (/*#__PURE__*/React.createElement("div", {
|
|
115
135
|
className: "".concat(classPrefix, "-scene")
|
|
116
136
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
117
137
|
disabled: !authority[100048],
|
|
118
138
|
onClick: function onClick() {
|
|
119
139
|
setShowScene(true);
|
|
120
140
|
}
|
|
121
|
-
}, "\u6DFB\u52A0\u5E38\u7528\u573A\u666F"), showScene && /*#__PURE__*/React.createElement(BizAddToScene, {
|
|
141
|
+
}, "\u6DFB\u52A0\u5E38\u7528\u573A\u666F"), showScene && (/*#__PURE__*/React.createElement(BizAddToScene, {
|
|
122
142
|
params: _objectSpread({
|
|
123
143
|
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
124
144
|
platform: (searchData === null || searchData === void 0 ? void 0 : searchData.platform) || 0,
|
|
@@ -130,28 +150,25 @@ var TopBar = function TopBar(props) {
|
|
|
130
150
|
onCancel: function onCancel() {
|
|
131
151
|
return closeHandle('scene');
|
|
132
152
|
}
|
|
133
|
-
})), !panelId && enableGenerateReport && /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
})))), !panelId && enableGenerateReport && (/*#__PURE__*/React.createElement("div", {
|
|
134
154
|
className: "".concat(classPrefix, "-panel")
|
|
135
155
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
136
156
|
onClick: onClickGenerateReport
|
|
137
|
-
}, "\u6DFB\u52A0\u5230\u6570\u636E\u62A5\u544A")), showWarning && /*#__PURE__*/React.createElement(Button, {
|
|
157
|
+
}, "\u6DFB\u52A0\u5230\u6570\u636E\u62A5\u544A"))), showWarning && (/*#__PURE__*/React.createElement(Button, {
|
|
138
158
|
className: "".concat(classPrefix, "-earlywarning"),
|
|
139
159
|
type: "primary",
|
|
140
160
|
disabled: loading || !authority[100141],
|
|
141
161
|
onClick: function onClick() {
|
|
142
162
|
return onLossWarning(warningId);
|
|
143
163
|
}
|
|
144
|
-
}, "\u8BBE\u7F6E\u6D41\u5931\u9884\u8B66"), /*#__PURE__*/React.createElement("div", {
|
|
164
|
+
}, "\u8BBE\u7F6E\u6D41\u5931\u9884\u8B66")), /*#__PURE__*/React.createElement("div", {
|
|
145
165
|
className: "".concat(classPrefix, "-platform")
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
}, item.value);
|
|
155
|
-
})));
|
|
166
|
+
}, /*#__PURE__*/React.createElement(BizPlatformSelector, {
|
|
167
|
+
value: selectPlatform,
|
|
168
|
+
onChange: function onChange(val) {
|
|
169
|
+
setselectPlatform(val.key);
|
|
170
|
+
platformChange(val.key);
|
|
171
|
+
}
|
|
172
|
+
}))));
|
|
156
173
|
};
|
|
157
174
|
export default TopBar;
|
|
@@ -1,63 +1,58 @@
|
|
|
1
|
-
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
-
|
|
3
|
-
.modules-event-topbar {
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content:
|
|
6
|
-
margin: 8px 0;
|
|
7
|
-
padding
|
|
8
|
-
&-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
border:
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
margin-left: -1px;
|
|
60
|
-
border-radius: 0 4px 4px 0;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
|
|
3
|
+
.modules-event-topbar {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
margin: 8px 0;
|
|
7
|
+
padding: 0 16px;
|
|
8
|
+
&-title {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
.fanhuiicon {
|
|
12
|
+
margin-right: 8px;
|
|
13
|
+
color: #5f6085;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
}
|
|
16
|
+
> span {
|
|
17
|
+
color: var(--io-N-, #021429);
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
font-family: 'PingFang SC';
|
|
21
|
+
font-style: normal;
|
|
22
|
+
line-height: 20px; /* 125% */
|
|
23
|
+
letter-spacing: 0.016px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
&-right {
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: flex-end;
|
|
29
|
+
}
|
|
30
|
+
&-panel {
|
|
31
|
+
margin-right: 16px;
|
|
32
|
+
.ant-btn {
|
|
33
|
+
background: #fff;
|
|
34
|
+
border-color: #f2f3f4;
|
|
35
|
+
}
|
|
36
|
+
.ant-btn:hover {
|
|
37
|
+
border-color: #165dff;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
&-scene {
|
|
41
|
+
margin-right: 16px;
|
|
42
|
+
.ant-btn {
|
|
43
|
+
background: #fff;
|
|
44
|
+
border-color: #f2f3f4;
|
|
45
|
+
}
|
|
46
|
+
.ant-btn:hover {
|
|
47
|
+
border-color: #165dff;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
&-earlywarning {
|
|
51
|
+
margin-right: 16px;
|
|
52
|
+
}
|
|
53
|
+
&-platform {
|
|
54
|
+
display: flex;
|
|
55
|
+
height: 32px;
|
|
56
|
+
line-height: 32px;
|
|
57
|
+
}
|
|
58
|
+
}
|
package/es/constants/apis.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ declare const Apis: {
|
|
|
2
2
|
dataList: string;
|
|
3
3
|
getEventDataSql: string;
|
|
4
4
|
eventDownloadReport: string;
|
|
5
|
-
queryAllSubjectApi: string;
|
|
6
5
|
querySubDisplayApi: string;
|
|
6
|
+
relationSaveConfig: string;
|
|
7
|
+
queryRelationConfig: string;
|
|
8
|
+
getEventSwitch: string;
|
|
7
9
|
};
|
|
8
10
|
export default Apis;
|
package/es/constants/apis.js
CHANGED
|
@@ -2,7 +2,9 @@ var Apis = {
|
|
|
2
2
|
dataList: '/zg/web/v2/data/eventDataList',
|
|
3
3
|
getEventDataSql: '/zg/web/v2/dataSql/getEventDataSql',
|
|
4
4
|
eventDownloadReport: '/zg/web/v2/data/eventDownloadReport',
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
querySubDisplayApi: '/zg/web/v2/analysisSubject/querySubDisplay',
|
|
6
|
+
relationSaveConfig: '/zg/web/v2/event/relation/saveConfig',
|
|
7
|
+
queryRelationConfig: '/zg/web/v2/event/queryRelationConfig',
|
|
8
|
+
getEventSwitch: '/zg/web/v2/event/getEventSwitch'
|
|
7
9
|
};
|
|
8
10
|
export default Apis;
|
package/es/constants/fields.d.ts
CHANGED
|
@@ -249,17 +249,3 @@ export declare const addSceneFields: ({
|
|
|
249
249
|
options?: undefined;
|
|
250
250
|
fieldNames?: undefined;
|
|
251
251
|
})[];
|
|
252
|
-
export declare const indexObject: {
|
|
253
|
-
[key: string]: string;
|
|
254
|
-
};
|
|
255
|
-
export declare const BuiltinIndicators: {
|
|
256
|
-
id: number;
|
|
257
|
-
name: string;
|
|
258
|
-
eventList: {
|
|
259
|
-
name: string;
|
|
260
|
-
id: number;
|
|
261
|
-
type: string;
|
|
262
|
-
isBuiltIn: boolean;
|
|
263
|
-
attrList: never[];
|
|
264
|
-
}[];
|
|
265
|
-
};
|
package/es/constants/fields.js
CHANGED
|
@@ -174,48 +174,4 @@ export var addSceneFields = [{
|
|
|
174
174
|
required: true,
|
|
175
175
|
message: '请输入场景名称'
|
|
176
176
|
}]
|
|
177
|
-
}];
|
|
178
|
-
export var indexObject = {
|
|
179
|
-
number: '人数',
|
|
180
|
-
times: '次数',
|
|
181
|
-
per: '人均次数',
|
|
182
|
-
sum: '总和',
|
|
183
|
-
avg: '均值',
|
|
184
|
-
duration_times: '分布',
|
|
185
|
-
median: '中位数'
|
|
186
|
-
};
|
|
187
|
-
export var BuiltinIndicators = {
|
|
188
|
-
id: -2,
|
|
189
|
-
name: '整体',
|
|
190
|
-
eventList: [{
|
|
191
|
-
name: '新增用户',
|
|
192
|
-
id: -201,
|
|
193
|
-
type: 'add',
|
|
194
|
-
isBuiltIn: true,
|
|
195
|
-
attrList: []
|
|
196
|
-
}, {
|
|
197
|
-
name: '活跃用户',
|
|
198
|
-
id: -202,
|
|
199
|
-
type: 'active',
|
|
200
|
-
isBuiltIn: true,
|
|
201
|
-
attrList: []
|
|
202
|
-
}, {
|
|
203
|
-
name: '访问次数',
|
|
204
|
-
id: -203,
|
|
205
|
-
type: 'times',
|
|
206
|
-
isBuiltIn: true,
|
|
207
|
-
attrList: []
|
|
208
|
-
}, {
|
|
209
|
-
name: '平均使用时长',
|
|
210
|
-
id: -204,
|
|
211
|
-
type: 'duration_avg',
|
|
212
|
-
isBuiltIn: true,
|
|
213
|
-
attrList: []
|
|
214
|
-
}, {
|
|
215
|
-
name: '使用时长分布',
|
|
216
|
-
id: -205,
|
|
217
|
-
type: 'duration',
|
|
218
|
-
isBuiltIn: true,
|
|
219
|
-
attrList: []
|
|
220
|
-
}]
|
|
221
|
-
};
|
|
177
|
+
}];
|
package/es/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
import EventChart from './modules/chart';
|
|
3
3
|
import ModuleEvent from './modules/home';
|
|
4
4
|
import { getNumberPanelData } from './modules/content/utils';
|
|
5
|
-
|
|
5
|
+
import EventFilter from './components/eventFilter';
|
|
6
|
+
export { ModuleEvent, EventChart, getNumberPanelData, EventFilter };
|
package/es/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import EventChart from './modules/chart';
|
|
2
2
|
import ModuleEvent from './modules/home';
|
|
3
3
|
import { getNumberPanelData } from './modules/content/utils';
|
|
4
|
-
|
|
4
|
+
import EventFilter from './components/eventFilter';
|
|
5
|
+
export { ModuleEvent, EventChart, getNumberPanelData, EventFilter };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
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."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
3
|
+
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; } }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import { EventChart } from '@zgfe/modules-event';
|
|
9
9
|
import { result, searchData, totalResult } from './data';
|
|
@@ -4,8 +4,13 @@ import { searchData, totalResult, totalSearchData } from './data';
|
|
|
4
4
|
export default (function () {
|
|
5
5
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h2", null, "\u8D8B\u52BF\u56FE\u8868\u683C"), /*#__PURE__*/React.createElement(EventChart, {
|
|
6
6
|
params: searchData
|
|
7
|
-
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("h2", null, "\u6C47\u603B\u56FE\u8868\u683C"), /*#__PURE__*/React.createElement(
|
|
7
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("h2", null, "\u6C47\u603B\u56FE\u8868\u683C"), /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
style: {
|
|
9
|
+
width: 500,
|
|
10
|
+
height: 500
|
|
11
|
+
}
|
|
12
|
+
}, /*#__PURE__*/React.createElement(EventChart, {
|
|
8
13
|
dataSource: totalResult,
|
|
9
14
|
params: totalSearchData
|
|
10
|
-
}));
|
|
15
|
+
})));
|
|
11
16
|
});
|