@zgfe/modules-event 1.0.7 → 1.0.29-zhongyuan.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 +68 -20
- 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/renderContent/index.js +14 -25
- package/es/components/renderContent/styles/index.less +19 -19
- package/es/components/renderContent/types.d.ts +0 -1
- package/es/components/searchPanel/index.js +19 -6
- package/es/components/searchPanel/styles/index.less +22 -18
- package/es/components/searchPanel/types.d.ts +2 -2
- package/es/components/table/index.js +60 -9
- package/es/components/table/styles/index.less +241 -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 +39 -22
- 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/modules/chart/demo/panel.js +7 -2
- package/es/modules/chart/index.js +105 -36
- package/es/modules/chart/types.d.ts +3 -0
- package/es/modules/content/index.d.ts +1 -1
- package/es/modules/content/index.js +94 -55
- package/es/modules/content/styles/index.less +19 -7
- package/es/modules/content/utils.d.ts +1 -1
- package/es/modules/content/utils.js +19 -18
- package/es/modules/home/demo/edit.js +6 -7
- package/es/modules/home/demo/index.js +1 -1
- package/es/modules/home/demo/styles/index.less +33 -33
- package/es/modules/home/index.js +53 -35
- package/es/modules/home/styles/index.less +49 -49
- package/es/modules/topPanel/index.js +36 -8
- 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 +6 -0
- package/es/utils/formData.d.ts +2 -1
- package/es/utils/formData.js +39 -9
- package/package.json +24 -20
|
@@ -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
|
+
}
|
|
@@ -10,14 +10,17 @@ 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, useEffect } from 'react';
|
|
14
|
-
import { Form, Button } from 'antd';
|
|
15
|
-
import { BizUserGroupHeader, BizSelect, useSubject } from '@zgfe/business-lib';
|
|
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({
|
|
@@ -115,12 +133,22 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
115
133
|
scrollToFirstError: true,
|
|
116
134
|
onFinish: onSearch
|
|
117
135
|
}, !subDisplay ? null : /*#__PURE__*/React.createElement(Form.Item, {
|
|
118
|
-
label: "
|
|
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('https://docs.zhugeio.com/datamanager/Statistical_caliber.html', '_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: '事件属性',
|
|
@@ -146,7 +174,7 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
146
174
|
max: 3,
|
|
147
175
|
enableTags: true
|
|
148
176
|
})) : /*#__PURE__*/React.createElement(Form.Item, {
|
|
149
|
-
label: "\
|
|
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
|
}]
|
|
@@ -165,7 +193,7 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
165
193
|
labelField: "subjectName",
|
|
166
194
|
keyField: "id"
|
|
167
195
|
})), /*#__PURE__*/React.createElement("div", {
|
|
168
|
-
ref:
|
|
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>
|
package/es/style/index.less
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
@import '~@zgfe/business-lib/es/assets/styles/variable.less';
|
|
2
|
-
.event-form-data {
|
|
3
|
-
&-table-td {
|
|
4
|
-
padding: 0 !important;
|
|
5
|
-
|
|
6
|
-
&-show {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
min-width: 60px;
|
|
11
|
-
height: 48px;
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
span {
|
|
14
|
-
width: 10px;
|
|
15
|
-
height: 10px;
|
|
16
|
-
border-radius: 50%;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&-name {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
.bsicon {
|
|
25
|
-
margin-right: 4px;
|
|
26
|
-
color: #fd9f41;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&-content {
|
|
30
|
-
display: inline-block;
|
|
31
|
-
max-width: 300px;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
white-space: nowrap;
|
|
34
|
-
text-overflow: ellipsis;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&-link {
|
|
40
|
-
display: flex;
|
|
41
|
-
justify-content: flex-end;
|
|
42
|
-
&:hover {
|
|
43
|
-
.a-yanjingkai {
|
|
44
|
-
display: block;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
.a-yanjingkai {
|
|
48
|
-
display: none;
|
|
49
|
-
margin-right: 10px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
&-link:not(.not-to-detail) {
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
&:hover {
|
|
55
|
-
color: @primary-color;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
&-table-event-data {
|
|
60
|
-
text-align: right !important;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/variable.less';
|
|
2
|
+
.event-form-data {
|
|
3
|
+
&-table-td {
|
|
4
|
+
padding: 0 !important;
|
|
5
|
+
|
|
6
|
+
&-show {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
min-width: 60px;
|
|
11
|
+
height: 48px;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
span {
|
|
14
|
+
width: 10px;
|
|
15
|
+
height: 10px;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-name {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
.bsicon {
|
|
25
|
+
margin-right: 4px;
|
|
26
|
+
color: #fd9f41;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-content {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
max-width: 300px;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-link {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
&:hover {
|
|
43
|
+
.a-yanjingkai {
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.a-yanjingkai {
|
|
48
|
+
display: none;
|
|
49
|
+
margin-right: 10px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
&-link:not(.not-to-detail) {
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
&:hover {
|
|
55
|
+
color: @primary-color;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
&-table-event-data {
|
|
60
|
+
text-align: right !important;
|
|
61
|
+
}
|
|
62
|
+
}
|
package/es/types.d.ts
CHANGED
|
@@ -62,6 +62,12 @@ export interface ResponseDataProps {
|
|
|
62
62
|
huanbi?: number[];
|
|
63
63
|
total?: number[];
|
|
64
64
|
yesterDay?: string[];
|
|
65
|
+
sum?: number;
|
|
66
|
+
yValues: number[];
|
|
67
|
+
userGroupEventTimeSum: [{
|
|
68
|
+
[k: string]: number[];
|
|
69
|
+
}];
|
|
70
|
+
eventPvTitle: string;
|
|
65
71
|
}
|
|
66
72
|
export interface SeriesProps {
|
|
67
73
|
names?: string[];
|
package/es/utils/formData.d.ts
CHANGED
|
@@ -5,10 +5,11 @@ import { EventGroup, UserProp, EnvProp } from '@zgfe/business-lib/es/attributeSe
|
|
|
5
5
|
import { ResponseDataProps, SearchValue } from '../types';
|
|
6
6
|
import { EventProps } from '../modules/home/types';
|
|
7
7
|
import '../style/index.less';
|
|
8
|
+
export declare function sortOriginalData(data: any, sorter: any): any;
|
|
8
9
|
export declare function getColumns(eventGroupList: EventGroup[] | undefined, userPropList: UserProp[] | undefined, eventEnvList: EnvProp[] | undefined, columnData: string[], userGroup: number[] | string[], searchData: SearchValue, showList: string[], onShowCallback: Function, onClickToDetailCallback: Function, onSelectEvent?: (id: number, name: string) => void): ColumnsType<EventProps.ColumnsDataType>;
|
|
9
10
|
export declare function getChartDataEventAliasName(dataSource: eventChartProps.ChartTypesProps, eventGroupList: EventGroup[] | undefined): eventChartProps.ChartTypesProps;
|
|
10
11
|
export declare function getEventAliasName(name: string, eventGroupList: EventGroup[] | undefined): string;
|
|
11
|
-
export declare function getEventAliasId(name:
|
|
12
|
+
export declare function getEventAliasId(name: any, eventGroupList: EventGroup[] | undefined): number;
|
|
12
13
|
export declare function getSortData(data: ResponseDataProps): ResponseDataProps;
|
|
13
14
|
export declare function getUserGroupsCompareData(data: ResponseDataProps): ResponseDataProps;
|
|
14
15
|
export declare function marketEventGroupList(eventGroupList: EventGroup[] | undefined): string[];
|
package/es/utils/formData.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
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); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
1
7
|
import { util, IconFont } from '@zgfe/business-lib';
|
|
2
8
|
import React from 'react';
|
|
3
9
|
import { message } from 'antd';
|
|
@@ -9,6 +15,23 @@ import { Tooltip } from 'antd';
|
|
|
9
15
|
import '../style/index.less';
|
|
10
16
|
import { getValue } from '../modules/content/utils';
|
|
11
17
|
var classPrefix = 'event-form-data';
|
|
18
|
+
export function sortOriginalData(data, sorter) {
|
|
19
|
+
var columnKey = sorter.columnKey,
|
|
20
|
+
order = sorter.order;
|
|
21
|
+
if (columnKey && order) {
|
|
22
|
+
var sortedData = _toConsumableArray(data).sort(function (a, b) {
|
|
23
|
+
if (order === 'ascend') {
|
|
24
|
+
return a[columnKey] - b[columnKey];
|
|
25
|
+
} else if (order === 'descend') {
|
|
26
|
+
return b[columnKey] - a[columnKey];
|
|
27
|
+
}
|
|
28
|
+
return 0;
|
|
29
|
+
});
|
|
30
|
+
return sortedData;
|
|
31
|
+
} else {
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
12
35
|
export function getColumns(eventGroupList, userPropList, eventEnvList, columnData, userGroup, searchData, showList, onShowCallback, onClickToDetailCallback, onSelectEvent) {
|
|
13
36
|
var marketEventNameList = marketEventGroupList(eventGroupList);
|
|
14
37
|
var data = [{
|
|
@@ -23,7 +46,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
23
46
|
render: function render(_, record) {
|
|
24
47
|
var isActive = showList.includes(record.nameGroup);
|
|
25
48
|
var cannotClick = showList.length >= 10 && !isActive;
|
|
26
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
return record.color ? /*#__PURE__*/React.createElement("div", {
|
|
27
50
|
className: "".concat(classPrefix, "-table-td-show"),
|
|
28
51
|
onClick: function onClick() {
|
|
29
52
|
if (cannotClick) return;
|
|
@@ -33,7 +56,9 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
33
56
|
style: {
|
|
34
57
|
background: isActive ? record.color : '#D9D9D9'
|
|
35
58
|
}
|
|
36
|
-
}))
|
|
59
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: "".concat(classPrefix, "-table-td-show")
|
|
61
|
+
});
|
|
37
62
|
}
|
|
38
63
|
}];
|
|
39
64
|
if (!(searchData === null || searchData === void 0 ? void 0 : searchData.analysisSubject) && (userGroup.length > 1 || userGroup[0] !== 0)) {
|
|
@@ -45,7 +70,11 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
45
70
|
ellipsis: true,
|
|
46
71
|
fixed: 'left',
|
|
47
72
|
render: function render(text) {
|
|
48
|
-
return
|
|
73
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
className: "tooltip-userGroup-box"
|
|
75
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
76
|
+
title: text
|
|
77
|
+
}, /*#__PURE__*/React.createElement("div", null, text)));
|
|
49
78
|
}
|
|
50
79
|
});
|
|
51
80
|
}
|
|
@@ -90,7 +119,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
90
119
|
key: 'eventName',
|
|
91
120
|
ellipsis: true,
|
|
92
121
|
fixed: 'left',
|
|
93
|
-
render: function render(val) {
|
|
122
|
+
render: function render(val, record) {
|
|
94
123
|
var _val = val;
|
|
95
124
|
return /*#__PURE__*/React.createElement("div", {
|
|
96
125
|
className: "tooltip-name-box"
|
|
@@ -99,7 +128,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
99
128
|
}, /*#__PURE__*/React.createElement("div", {
|
|
100
129
|
className: "tooltip-name-box-market",
|
|
101
130
|
onClick: function onClick() {
|
|
102
|
-
onSelectEvent && onSelectEvent(getEventAliasId(
|
|
131
|
+
!record.isAdd && onSelectEvent && onSelectEvent(getEventAliasId(record === null || record === void 0 ? void 0 : record.originalName, eventGroupList), val);
|
|
103
132
|
}
|
|
104
133
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
105
134
|
type: "shoucang",
|
|
@@ -137,18 +166,19 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
137
166
|
align: 'center',
|
|
138
167
|
ellipsis: true,
|
|
139
168
|
dataIndex: "field".concat(i),
|
|
169
|
+
defaultSortOrder: i === columnData.length - 1 ? 'descend' : null,
|
|
140
170
|
className: "".concat(classPrefix, "-table-event-data"),
|
|
141
171
|
sorter: function sorter(a, b) {
|
|
142
|
-
return a["field".concat(i)] - b["field".concat(i)];
|
|
172
|
+
return a.isAdd || b.isAdd ? 0 : a["field".concat(i)] - b["field".concat(i)];
|
|
143
173
|
},
|
|
144
174
|
render: function render(text, record) {
|
|
145
175
|
var click = text > 0 && (searchData.analysisIndex === 'number' ? true : false);
|
|
146
176
|
return /*#__PURE__*/React.createElement("div", {
|
|
147
|
-
className: "".concat(classPrefix, "-table-td-link ").concat(click ? '' : 'not-to-detail'),
|
|
177
|
+
className: "".concat(classPrefix, "-table-td-link ").concat(!record.isAdd && click ? '' : 'not-to-detail'),
|
|
148
178
|
onClick: function onClick() {
|
|
149
|
-
click ? onClickToDetailCallback(record, columnData[i], text) : null;
|
|
179
|
+
!record.isAdd && click ? onClickToDetailCallback(record, columnData[i], text) : null;
|
|
150
180
|
}
|
|
151
|
-
}, click && /*#__PURE__*/React.createElement(IconFont, {
|
|
181
|
+
}, !record.isAdd && click && /*#__PURE__*/React.createElement(IconFont, {
|
|
152
182
|
type: "a-yanjingkai"
|
|
153
183
|
}), text);
|
|
154
184
|
}
|
package/package.json
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-event",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"scripts": {
|
|
5
|
-
"start": "dumi dev",
|
|
6
|
-
"docs:build": "dumi build",
|
|
7
|
-
"docs:deploy": "gh-pages -d docs-dist",
|
|
8
|
-
"build": "father-build",
|
|
9
|
-
"deploy": "npm run docs:build && npm run docs:deploy",
|
|
10
|
-
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
|
11
|
-
"test": "umi-test",
|
|
12
|
-
"test:coverage": "umi-test --coverage",
|
|
13
|
-
"prepublishOnly": "npm run build",
|
|
14
|
-
"pub": "lerna publish"
|
|
15
|
-
},
|
|
3
|
+
"version": "1.0.29-zhongyuan.2",
|
|
16
4
|
"module": "es/index.js",
|
|
17
5
|
"typings": "es/index.d.ts",
|
|
18
|
-
"
|
|
19
|
-
|
|
6
|
+
"private": false,
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
20
9
|
},
|
|
21
10
|
"files": [
|
|
22
11
|
"es"
|
|
23
12
|
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "father-build",
|
|
15
|
+
"deploy": "npm run docs:build && npm run docs:deploy",
|
|
16
|
+
"docs:build": "dumi build",
|
|
17
|
+
"docs:deploy": "gh-pages -d docs-dist",
|
|
18
|
+
"prepublishOnly": "npm run build",
|
|
19
|
+
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
|
20
|
+
"pub": "lerna publish",
|
|
21
|
+
"start": "dumi dev",
|
|
22
|
+
"test": "umi-test",
|
|
23
|
+
"test:coverage": "umi-test --coverage"
|
|
24
|
+
},
|
|
24
25
|
"lint-staged": {
|
|
25
26
|
"*.{js,jsx,less,md,json}": [
|
|
26
27
|
"prettier --write"
|
|
@@ -29,6 +30,10 @@
|
|
|
29
30
|
"prettier --parser=typescript --write"
|
|
30
31
|
]
|
|
31
32
|
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"react-copy-to-clipboard": "^5.1.0",
|
|
35
|
+
"react-highlight": "^0.15.0"
|
|
36
|
+
},
|
|
32
37
|
"devDependencies": {
|
|
33
38
|
"@testing-library/jest-dom": "^5.15.1",
|
|
34
39
|
"@testing-library/react": "^12.1.2",
|
|
@@ -36,7 +41,7 @@
|
|
|
36
41
|
"@types/lodash": "^4.14.191",
|
|
37
42
|
"@umijs/fabric": "^2.8.1",
|
|
38
43
|
"@umijs/test": "^3.0.5",
|
|
39
|
-
"@zgfe/business-lib": "1.2.
|
|
44
|
+
"@zgfe/business-lib": "1.2.70-hxd.1",
|
|
40
45
|
"antd": "^4.22.6",
|
|
41
46
|
"dumi": "^1.1.0",
|
|
42
47
|
"echarts": "^5.3.2",
|
|
@@ -49,9 +54,8 @@
|
|
|
49
54
|
"react": "^16.12.0 || ^17.0.0",
|
|
50
55
|
"yorkie": "^2.0.0"
|
|
51
56
|
},
|
|
52
|
-
"gitHead": "
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"react-highlight": "^0.15.0"
|
|
57
|
+
"gitHead": "9814054f09c1dcd59c8b10ac00109ae60a4ae2c5",
|
|
58
|
+
"gitHooks": {
|
|
59
|
+
"pre-commit": "lint-staged"
|
|
56
60
|
}
|
|
57
61
|
}
|