@zgfe/modules-interval 1.0.1 → 1.0.3-alpha.0
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/dist/esm/constants/apis.d.ts +1 -5
- package/dist/esm/constants/apis.js +7 -4
- package/dist/esm/modules/topPanel/index.js +42 -4
- package/dist/esm/modules/topPanel/styles/index.less +23 -2
- package/dist/esm/modules/topPanel/types.d.ts +4 -0
- package/dist/esm/modules/topPanel/types.js +5 -1
- package/dist/esm/utils/formData.js +12 -12
- package/package.json +9 -4
- package/dist/esm/assets/business/demo.css +0 -539
- package/dist/esm/assets/business/demo_index.html +0 -3316
- package/dist/esm/assets/business/iconfont.css +0 -559
- package/dist/esm/assets/business/iconfont.js +0 -43
- package/dist/esm/assets/business/iconfont.json +0 -961
- package/dist/esm/assets/business/iconfont.ttf +0 -0
- package/dist/esm/assets/business/iconfont.woff +0 -0
- package/dist/esm/assets/business/iconfont.woff2 +0 -0
- package/dist/esm/assets/icons/demo.css +0 -539
- package/dist/esm/assets/icons/demo_index.html +0 -9618
- package/dist/esm/assets/icons/iconfont.css +0 -1655
- package/dist/esm/assets/icons/iconfont.js +0 -43
- package/dist/esm/assets/icons/iconfont.json +0 -2879
- package/dist/esm/assets/icons/iconfont.ttf +0 -0
- package/dist/esm/assets/icons/iconfont.woff +0 -0
- package/dist/esm/assets/icons/iconfont.woff2 +0 -0
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
var Apis = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
dataList: '/interval/intervalData',
|
|
3
|
+
getEventDataSql: '/dataSql/getEventDataSql',
|
|
4
|
+
eventDownloadReport: '/interval/downLoadintervalData',
|
|
5
|
+
querySubject: '/analysisSubject/queryAllSubject'
|
|
6
6
|
};
|
|
7
|
+
for (var key in Apis) {
|
|
8
|
+
Apis[key] = "/zg/web/v2".concat(Apis[key]);
|
|
9
|
+
}
|
|
7
10
|
export default Apis;
|
|
@@ -10,11 +10,13 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
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
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useState } from 'react';
|
|
14
|
-
import { Form, Button } from 'antd';
|
|
15
|
-
import { BizAttributeSelector, BizUserGroupHeader } from '@zgfe/business-lib';
|
|
13
|
+
import React, { useContext, useState } from 'react';
|
|
14
|
+
import { Form, Button, Radio } from 'antd';
|
|
15
|
+
import { BizAttributeSelector, BizGlobalDataContext, BizSelect, BizUserGroupHeader, ajax, useChanged } from '@zgfe/business-lib';
|
|
16
16
|
import EventFilter from "../../components/eventFilter";
|
|
17
17
|
import "./styles/index.less";
|
|
18
|
+
import { AnalysisMode } from "./types";
|
|
19
|
+
import { Apis } from "../../constants";
|
|
18
20
|
var classPrefix = 'top-panel-interval';
|
|
19
21
|
var TopPanel = function TopPanel(props) {
|
|
20
22
|
var _props$urlParam, _props$urlParam2, _defaultValue$associa, _defaultValue$associa2, _finalSearchData$asso, _finalSearchData$asso2, _defaultValue$associa3, _finalSearchData$asso3, _defaultValue$associa4, _finalSearchData$asso4, _defaultValue$associa5, _finalSearchData$asso5, _defaultValue$associa6, _finalSearchData$asso6, _defaultValue$associa7, _finalSearchData$asso7, _defaultValue$associa8, _finalSearchData$asso8, _defaultValue$associa9, _finalSearchData$asso9, _defaultValue$associa10, _finalSearchData$asso10, _defaultValue$dimensi, _finalSearchData$dime, _defaultValue$dimensi2, _finalSearchData$dime2, _defaultValue$dimensi3, _finalSearchData$dime3, _defaultValue$dimensi4, _finalSearchData$dime4;
|
|
@@ -43,6 +45,8 @@ var TopPanel = function TopPanel(props) {
|
|
|
43
45
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
44
46
|
relevancyFl = _useState8[0],
|
|
45
47
|
setRelevancyFl = _useState8[1];
|
|
48
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
49
|
+
currentApp = _useContext.currentApp;
|
|
46
50
|
var _ref = defaultValue,
|
|
47
51
|
userGroup = _ref.userGroup;
|
|
48
52
|
// 细分属性初始值
|
|
@@ -143,6 +147,14 @@ var TopPanel = function TopPanel(props) {
|
|
|
143
147
|
});
|
|
144
148
|
}
|
|
145
149
|
};
|
|
150
|
+
useChanged(function () {
|
|
151
|
+
ajax(Apis.querySubject, {
|
|
152
|
+
method: 'post',
|
|
153
|
+
data: {
|
|
154
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}, currentApp === null || currentApp === void 0 ? void 0 : currentApp.id);
|
|
146
158
|
return /*#__PURE__*/React.createElement(Form, {
|
|
147
159
|
form: form,
|
|
148
160
|
component: "div",
|
|
@@ -177,6 +189,24 @@ var TopPanel = function TopPanel(props) {
|
|
|
177
189
|
scrollToFirstError: true,
|
|
178
190
|
onValuesChange: onValuesChange
|
|
179
191
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
192
|
+
label: "\u5206\u6790\u4E3B\u4F53",
|
|
193
|
+
className: "panel-form-interval-item"
|
|
194
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
195
|
+
options: [{
|
|
196
|
+
label: '用户',
|
|
197
|
+
value: 'user'
|
|
198
|
+
}, {
|
|
199
|
+
label: '事件属性',
|
|
200
|
+
value: 'eventProp'
|
|
201
|
+
}],
|
|
202
|
+
keyField: "value"
|
|
203
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
204
|
+
label: "\u4E3B\u4F53\u540D\u79F0",
|
|
205
|
+
name: "analysisSubject",
|
|
206
|
+
className: "panel-form-interval-item"
|
|
207
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
208
|
+
options: []
|
|
209
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
180
210
|
label: "",
|
|
181
211
|
name: "userGroup",
|
|
182
212
|
className: "space-item interval-item",
|
|
@@ -272,7 +302,15 @@ var TopPanel = function TopPanel(props) {
|
|
|
272
302
|
onDelete: function onDelete() {
|
|
273
303
|
onChangeAttr(undefined, 'dimension');
|
|
274
304
|
}
|
|
275
|
-
})), /*#__PURE__*/React.createElement(
|
|
305
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
306
|
+
label: "\u5206\u6790\u6A21\u578B",
|
|
307
|
+
name: "analysisModel",
|
|
308
|
+
className: "panel-form-interval-item"
|
|
309
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, null, /*#__PURE__*/React.createElement(Radio, {
|
|
310
|
+
value: AnalysisMode.common
|
|
311
|
+
}, "\u5E38\u89C4\u95F4\u9694\u5206\u6790"), /*#__PURE__*/React.createElement(Radio, {
|
|
312
|
+
value: AnalysisMode.firstAndLast
|
|
313
|
+
}, "\u9996\u672B\u6B21\u95F4\u9694\u5206\u6790"))), /*#__PURE__*/React.createElement("div", {
|
|
276
314
|
className: "".concat(classPrefix, "-form-botton-box")
|
|
277
315
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
278
316
|
onClick: resetting
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@import '../../../assets/business/iconfont.css';
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
3
2
|
|
|
4
3
|
.top-panel-interval {
|
|
5
4
|
&-form-botton-box {
|
|
@@ -18,6 +17,28 @@
|
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
.panel-form-interval {
|
|
20
|
+
&-item {
|
|
21
|
+
.ant-form-item-label {
|
|
22
|
+
padding-left: 24px;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
}
|
|
25
|
+
.ant-form-item-control-input-content {
|
|
26
|
+
height: 40px;
|
|
27
|
+
padding: 0 24px;
|
|
28
|
+
line-height: 40px;
|
|
29
|
+
.biz-select-handle {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
width: 208px;
|
|
32
|
+
}
|
|
33
|
+
span.ant-radio + * {
|
|
34
|
+
padding-right: 40px;
|
|
35
|
+
padding-left: 12px;
|
|
36
|
+
}
|
|
37
|
+
&:hover {
|
|
38
|
+
background-color: #e8efff;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
21
42
|
.interval-item {
|
|
22
43
|
margin-top: -2px;
|
|
23
44
|
.ant-space-vertical {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { AttrConditionTypes } from '@zgfe/business-lib';
|
|
2
2
|
import { bizAttributeSelectorValueProp, SearchValue } from '../../types';
|
|
3
|
+
export declare enum AnalysisMode {
|
|
4
|
+
common = "commonInterval",
|
|
5
|
+
firstAndLast = "firstLastInterval"
|
|
6
|
+
}
|
|
3
7
|
export interface start {
|
|
4
8
|
eventId?: number;
|
|
5
9
|
id?: number;
|
|
@@ -68,8 +68,8 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
68
68
|
key: 'Q1',
|
|
69
69
|
dataIndex: 'Q1',
|
|
70
70
|
sorter: function sorter(a, b) {
|
|
71
|
-
var _a$
|
|
72
|
-
return ((_a$
|
|
71
|
+
var _a$Q, _b$Q;
|
|
72
|
+
return ((_a$Q = a === null || a === void 0 ? void 0 : a.Q1) !== null && _a$Q !== void 0 ? _a$Q : 0) - ((_b$Q = b === null || b === void 0 ? void 0 : b.Q1) !== null && _b$Q !== void 0 ? _b$Q : 0);
|
|
73
73
|
},
|
|
74
74
|
className: "".concat(classPrefix, "-table-td"),
|
|
75
75
|
render: function render(text, record) {
|
|
@@ -82,8 +82,8 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
82
82
|
align: 'right',
|
|
83
83
|
dataIndex: 'median',
|
|
84
84
|
sorter: function sorter(a, b) {
|
|
85
|
-
var _a$
|
|
86
|
-
return ((_a$
|
|
85
|
+
var _a$median, _b$median;
|
|
86
|
+
return ((_a$median = a === null || a === void 0 ? void 0 : a.median) !== null && _a$median !== void 0 ? _a$median : 0) - ((_b$median = b === null || b === void 0 ? void 0 : b.median) !== null && _b$median !== void 0 ? _b$median : 0);
|
|
87
87
|
},
|
|
88
88
|
key: 'median',
|
|
89
89
|
className: "".concat(classPrefix, "-table-td"),
|
|
@@ -97,8 +97,8 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
97
97
|
align: 'right',
|
|
98
98
|
dataIndex: 'Q3',
|
|
99
99
|
sorter: function sorter(a, b) {
|
|
100
|
-
var _a$
|
|
101
|
-
return ((_a$
|
|
100
|
+
var _a$Q2, _b$Q2;
|
|
101
|
+
return ((_a$Q2 = a === null || a === void 0 ? void 0 : a.Q3) !== null && _a$Q2 !== void 0 ? _a$Q2 : 0) - ((_b$Q2 = b === null || b === void 0 ? void 0 : b.Q3) !== null && _b$Q2 !== void 0 ? _b$Q2 : 0);
|
|
102
102
|
},
|
|
103
103
|
key: 'Q3',
|
|
104
104
|
className: "".concat(classPrefix, "-table-td"),
|
|
@@ -112,8 +112,8 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
112
112
|
align: 'right',
|
|
113
113
|
key: 'max',
|
|
114
114
|
sorter: function sorter(a, b) {
|
|
115
|
-
var _a$
|
|
116
|
-
return ((_a$
|
|
115
|
+
var _a$max, _b$max;
|
|
116
|
+
return ((_a$max = a === null || a === void 0 ? void 0 : a.max) !== null && _a$max !== void 0 ? _a$max : 0) - ((_b$max = b === null || b === void 0 ? void 0 : b.max) !== null && _b$max !== void 0 ? _b$max : 0);
|
|
117
117
|
},
|
|
118
118
|
dataIndex: 'max',
|
|
119
119
|
className: "".concat(classPrefix, "-table-td"),
|
|
@@ -127,8 +127,8 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
127
127
|
align: 'right',
|
|
128
128
|
dataIndex: 'perValue',
|
|
129
129
|
sorter: function sorter(a, b) {
|
|
130
|
-
var _a$
|
|
131
|
-
return ((_a$
|
|
130
|
+
var _a$perValue, _b$perValue;
|
|
131
|
+
return ((_a$perValue = a === null || a === void 0 ? void 0 : a.perValue) !== null && _a$perValue !== void 0 ? _a$perValue : 0) - ((_b$perValue = b === null || b === void 0 ? void 0 : b.perValue) !== null && _b$perValue !== void 0 ? _b$perValue : 0);
|
|
132
132
|
},
|
|
133
133
|
key: 'perValue',
|
|
134
134
|
className: "".concat(classPrefix, "-table-td"),
|
|
@@ -142,8 +142,8 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
142
142
|
align: 'right',
|
|
143
143
|
dataIndex: 'peopleNum',
|
|
144
144
|
sorter: function sorter(a, b) {
|
|
145
|
-
var _a$
|
|
146
|
-
return ((_a$
|
|
145
|
+
var _a$peopleNum, _b$peopleNum;
|
|
146
|
+
return ((_a$peopleNum = a === null || a === void 0 ? void 0 : a.peopleNum) !== null && _a$peopleNum !== void 0 ? _a$peopleNum : 0) - ((_b$peopleNum = b === null || b === void 0 ? void 0 : b.peopleNum) !== null && _b$peopleNum !== void 0 ? _b$peopleNum : 0);
|
|
147
147
|
},
|
|
148
148
|
key: 'peopleNum',
|
|
149
149
|
className: "".concat(classPrefix, "-table-td"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-interval",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-alpha.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -9,12 +9,16 @@
|
|
|
9
9
|
"deploy": "npm run docs:build && npm run docs:deploy",
|
|
10
10
|
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
|
11
11
|
"test": "umi-test",
|
|
12
|
+
"pub": "lerna publish",
|
|
12
13
|
"test:coverage": "umi-test --coverage",
|
|
13
14
|
"prepublishOnly": "npm run build"
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
16
17
|
"dist"
|
|
17
18
|
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
18
22
|
"module": "dist/esm/index.js",
|
|
19
23
|
"typings": "dist/esm/index.d.ts",
|
|
20
24
|
"gitHooks": {
|
|
@@ -43,7 +47,7 @@
|
|
|
43
47
|
"@types/uuid": "^9.0.2",
|
|
44
48
|
"@umijs/fabric": "^2.8.1",
|
|
45
49
|
"@umijs/test": "^3.0.5",
|
|
46
|
-
"@zgfe/business-lib": "1.1.
|
|
50
|
+
"@zgfe/business-lib": "^1.1.88",
|
|
47
51
|
"@zgfe/modules-demo-manage": "^1.0.1",
|
|
48
52
|
"antd": "^4.22.6",
|
|
49
53
|
"dumi": "^1.1.0",
|
|
@@ -51,11 +55,12 @@
|
|
|
51
55
|
"echarts-for-react": "^3.0.2",
|
|
52
56
|
"father-build": "^1.17.2",
|
|
53
57
|
"gh-pages": "^3.0.0",
|
|
54
|
-
"lerna": "
|
|
58
|
+
"lerna": "5.1.8",
|
|
55
59
|
"lint-staged": "^10.0.7",
|
|
56
60
|
"lodash": "^4.17.21",
|
|
57
61
|
"prettier": "^2.2.1",
|
|
58
62
|
"umi-request": "^1.4.0",
|
|
59
63
|
"yorkie": "^2.0.0"
|
|
60
|
-
}
|
|
64
|
+
},
|
|
65
|
+
"gitHead": "728b3ca2a91011150266aed6e52bcae3ec9962de"
|
|
61
66
|
}
|