@zgfe/modules-event 0.1.14 → 0.1.15-qirui.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/es/components/eventFilter/index.js +84 -46
- package/es/components/eventFilter/styles/index.less +13 -5
- package/es/components/eventFilter/types.d.ts +3 -3
- package/es/components/renderContent/index.js +2 -2
- package/es/components/searchPanel/index.js +31 -19
- package/es/components/searchPanel/types.d.ts +13 -0
- package/es/components/table/index.js +12 -5
- package/es/components/table/styles/index.less +1 -3
- package/es/components/topBar/index.js +6 -3
- package/es/constants/apis.d.ts +2 -0
- package/es/constants/apis.js +3 -1
- package/es/modules/chart/demo/index.d.ts +2 -1
- package/es/modules/chart/demo/index.js +2 -2
- package/es/modules/chart/demo/panel.d.ts +2 -1
- package/es/modules/chart/index.js +6 -3
- package/es/modules/content/index.js +65 -10
- package/es/modules/content/utils.d.ts +4 -0
- package/es/modules/content/utils.js +14 -1
- package/es/modules/home/demo/create.d.ts +2 -1
- package/es/modules/home/demo/create.js +2 -2
- package/es/modules/home/demo/edit.d.ts +2 -1
- package/es/modules/home/demo/edit.js +2 -2
- package/es/modules/home/demo/index.d.ts +2 -1
- package/es/modules/home/demo/index.js +30 -6
- package/es/modules/home/demo/scene.d.ts +2 -1
- package/es/modules/home/demo/scene.js +2 -2
- package/es/modules/home/index.js +10 -5
- package/es/modules/topPanel/index.js +145 -49
- package/es/modules/topPanel/styles/index.less +29 -4
- package/es/modules/topPanel/types.d.ts +20 -0
- package/es/types.d.ts +11 -0
- package/es/utils/formData.js +8 -8
- package/package.json +3 -3
|
@@ -1,30 +1,43 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
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."); }
|
|
3
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
5
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useState } from 'react';
|
|
13
|
+
import React, { useState, useEffect } from 'react';
|
|
8
14
|
import { Form, Button } from 'antd';
|
|
9
|
-
import { BizUserGroupHeader } from '@zgfe/business-lib';
|
|
15
|
+
import { BizUserGroupHeader, BizSelect, useSubject } from '@zgfe/business-lib';
|
|
10
16
|
import EventFilter from '../../components/eventFilter';
|
|
11
17
|
import './styles/index.less';
|
|
18
|
+
import _ from 'lodash';
|
|
12
19
|
var classPrefix = 'top-panel';
|
|
13
20
|
var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
14
21
|
var value = props.value,
|
|
15
|
-
ajaxFlag = props.ajaxFlag,
|
|
16
|
-
finalSearchData = props.finalSearchData,
|
|
17
|
-
fetchRequest = props.fetchRequest,
|
|
18
22
|
setIsCity = props.setIsCity,
|
|
19
|
-
setEnableSelectChart = props.setEnableSelectChart
|
|
23
|
+
setEnableSelectChart = props.setEnableSelectChart,
|
|
24
|
+
subDisplay = props.subDisplay,
|
|
25
|
+
loading = props.loading;
|
|
20
26
|
var _useState = useState(false),
|
|
21
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _useState3 = useState(
|
|
28
|
+
marginStyle = _useState2[0],
|
|
29
|
+
setmarginStyle = _useState2[1];
|
|
30
|
+
var _useState3 = useState('user'),
|
|
25
31
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
analysisType = _useState4[0],
|
|
33
|
+
setAnalysisType = _useState4[1];
|
|
34
|
+
var _useState5 = useState(false),
|
|
35
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
36
|
+
inited = _useState6[0],
|
|
37
|
+
setInited = _useState6[1];
|
|
38
|
+
var _useSubject = useSubject(),
|
|
39
|
+
subjectList = _useSubject.subjectList,
|
|
40
|
+
subjectLoading = _useSubject.loading;
|
|
28
41
|
var countChange = function countChange(count) {
|
|
29
42
|
setmarginStyle(count > 0 ? true : false);
|
|
30
43
|
};
|
|
@@ -32,31 +45,23 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
32
45
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
33
46
|
form = _Form$useForm2[0];
|
|
34
47
|
var userGroup = value.userGroup;
|
|
35
|
-
|
|
36
|
-
var _data
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (finalSearchData && finalSearchData.id && data.filterConditions.id === finalSearchData.id && data.filterConditions.eventGroupId === finalSearchData.eventGroupId) {
|
|
53
|
-
ajaxFlag = false;
|
|
54
|
-
} else {
|
|
55
|
-
ajaxFlag = true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
props.onChange(_data, ajaxFlag);
|
|
59
|
-
};
|
|
48
|
+
function onSearch(data) {
|
|
49
|
+
var _data$filterCondition, _data$filterCondition2, _data$filterCondition3;
|
|
50
|
+
var searchData = _objectSpread(_objectSpread({
|
|
51
|
+
analysisSubject: data.analysisSubject ? {
|
|
52
|
+
subjectId: data.analysisSubject.id || data.analysisSubject.subjectId,
|
|
53
|
+
subjectName: data.analysisSubject.subjectName,
|
|
54
|
+
subjectAlias: data.analysisSubject.subjectAlias,
|
|
55
|
+
unit: data.analysisSubject.unit
|
|
56
|
+
} : undefined
|
|
57
|
+
}, _.isArray(data.filterConditions) ? {} : data.filterConditions), {}, {
|
|
58
|
+
eventIds: _.isArray(data.filterConditions) ? data.filterConditions : undefined,
|
|
59
|
+
eventGroupId: (_data$filterCondition = data.filterConditions) === null || _data$filterCondition === void 0 ? void 0 : _data$filterCondition.eventGroupId,
|
|
60
|
+
userGroup: data.userGroup || [0],
|
|
61
|
+
id: ((_data$filterCondition2 = data.filterConditions) === null || _data$filterCondition2 === void 0 ? void 0 : _data$filterCondition2.id) >= 0 ? (_data$filterCondition3 = data.filterConditions) === null || _data$filterCondition3 === void 0 ? void 0 : _data$filterCondition3.id : undefined
|
|
62
|
+
});
|
|
63
|
+
props.onChange(searchData, true);
|
|
64
|
+
}
|
|
60
65
|
var resetting = function resetting() {
|
|
61
66
|
form.resetFields();
|
|
62
67
|
form.setFieldsValue({
|
|
@@ -68,52 +73,143 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
68
73
|
id: undefined,
|
|
69
74
|
name: undefined,
|
|
70
75
|
filters: undefined,
|
|
71
|
-
dimension: undefined
|
|
76
|
+
dimension: undefined,
|
|
77
|
+
analysisAttr: undefined,
|
|
78
|
+
chartType: 'line'
|
|
72
79
|
}, true);
|
|
73
80
|
};
|
|
81
|
+
useEffect(function () {
|
|
82
|
+
if (!value) {
|
|
83
|
+
setInited(true);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
setInited(false);
|
|
87
|
+
if (value.analysisSubject) {
|
|
88
|
+
setAnalysisType('eventProp');
|
|
89
|
+
props.onChangeSubjectType('eventProp');
|
|
90
|
+
} else {
|
|
91
|
+
setAnalysisType('user');
|
|
92
|
+
props.onChangeSubjectType('user');
|
|
93
|
+
}
|
|
94
|
+
setInited(true);
|
|
95
|
+
}, []);
|
|
96
|
+
if (!inited) return null;
|
|
74
97
|
return /*#__PURE__*/React.createElement(Form, {
|
|
75
98
|
form: form,
|
|
76
99
|
component: "div",
|
|
77
100
|
colon: false,
|
|
78
101
|
layout: "vertical",
|
|
102
|
+
className: "".concat(classPrefix, "-form"),
|
|
79
103
|
initialValues: {
|
|
80
104
|
userGroup: userGroup ? userGroup : [0],
|
|
81
|
-
filterConditions: {
|
|
105
|
+
filterConditions: (value === null || value === void 0 ? void 0 : value.eventIds) || {
|
|
82
106
|
id: value === null || value === void 0 ? void 0 : value.id,
|
|
83
107
|
name: value === null || value === void 0 ? void 0 : value.name,
|
|
84
108
|
dimension: value === null || value === void 0 ? void 0 : value.dimension,
|
|
85
109
|
filters: value === null || value === void 0 ? void 0 : value.filters,
|
|
86
110
|
eventGroupId: value === null || value === void 0 ? void 0 : value.eventGroupId
|
|
87
|
-
}
|
|
111
|
+
},
|
|
112
|
+
analysisSubject: value === null || value === void 0 ? void 0 : value.analysisSubject
|
|
88
113
|
},
|
|
89
114
|
scrollToFirstError: true,
|
|
90
|
-
|
|
91
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
115
|
+
onFinish: onSearch
|
|
116
|
+
}, !subDisplay ? null : /*#__PURE__*/React.createElement(Form.Item, {
|
|
117
|
+
label: "\u5206\u6790\u4E3B\u4F53",
|
|
118
|
+
className: "".concat(classPrefix, "-form-event hoverable-form-item")
|
|
119
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
120
|
+
className: "".concat(classPrefix, "-form-event-select"),
|
|
121
|
+
options: [{
|
|
122
|
+
label: '用户',
|
|
123
|
+
value: 'user'
|
|
124
|
+
}, {
|
|
125
|
+
label: '事件属性',
|
|
126
|
+
value: 'eventProp'
|
|
127
|
+
}],
|
|
128
|
+
overlayWidth: 208,
|
|
129
|
+
keyField: "value",
|
|
130
|
+
defaultValue: {
|
|
131
|
+
value: analysisType
|
|
132
|
+
},
|
|
133
|
+
onChange: function onChange(val) {
|
|
134
|
+
props.onChangeSubjectType(val.value);
|
|
135
|
+
setAnalysisType(val.value);
|
|
136
|
+
setEnableSelectChart && setEnableSelectChart(false);
|
|
137
|
+
setIsCity && setIsCity(false);
|
|
138
|
+
resetting();
|
|
139
|
+
}
|
|
140
|
+
})), analysisType === 'user' ? /*#__PURE__*/React.createElement(Form.Item, {
|
|
92
141
|
label: "",
|
|
93
|
-
name: "userGroup"
|
|
142
|
+
name: "userGroup",
|
|
143
|
+
className: "hoverable-form-item"
|
|
94
144
|
}, /*#__PURE__*/React.createElement(BizUserGroupHeader, {
|
|
95
145
|
max: 3,
|
|
96
146
|
enableTags: true
|
|
147
|
+
})) : /*#__PURE__*/React.createElement(Form.Item, {
|
|
148
|
+
label: "\u4E3B\u4F53\u540D\u79F0",
|
|
149
|
+
name: "analysisSubject",
|
|
150
|
+
className: "".concat(classPrefix, "-form-event hoverable-form-item"),
|
|
151
|
+
rules: [{
|
|
152
|
+
validator: function validator(_rule, value) {
|
|
153
|
+
if (value && (value.id || value.subjectId)) {
|
|
154
|
+
return Promise.resolve();
|
|
155
|
+
} else {
|
|
156
|
+
return Promise.reject('请选择分析主体');
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}]
|
|
160
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
161
|
+
className: "".concat(classPrefix, "-form-event-select"),
|
|
162
|
+
options: subjectList,
|
|
163
|
+
aliasField: "subjectAlias",
|
|
164
|
+
labelField: "subjectName",
|
|
165
|
+
keyField: "id"
|
|
97
166
|
})), /*#__PURE__*/React.createElement("div", {
|
|
98
167
|
ref: ref
|
|
99
168
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
100
169
|
label: "\u4E8B\u4EF6",
|
|
101
170
|
name: "filterConditions",
|
|
102
|
-
className: "".concat(classPrefix, "-form-event")
|
|
171
|
+
className: "".concat(classPrefix, "-form-event event---1"),
|
|
172
|
+
rules: [{
|
|
173
|
+
validator: function validator(_rule, value) {
|
|
174
|
+
var _value$filters, _value$filters$condit;
|
|
175
|
+
if (_.isArray(value)) {
|
|
176
|
+
if (!value.length) {
|
|
177
|
+
return Promise.reject('请选择事件');
|
|
178
|
+
} else {
|
|
179
|
+
return Promise.resolve();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
if (!value || !value.id) {
|
|
183
|
+
return Promise.reject('请选择事件');
|
|
184
|
+
}
|
|
185
|
+
var conditionValIsNull = false;
|
|
186
|
+
value === null || value === void 0 ? void 0 : (_value$filters = value.filters) === null || _value$filters === void 0 ? void 0 : (_value$filters$condit = _value$filters.conditions) === null || _value$filters$condit === void 0 ? void 0 : _value$filters$condit.forEach(function (item) {
|
|
187
|
+
var _item$values;
|
|
188
|
+
if (!/null/.test(item.operator || '') && !((_item$values = item.values) === null || _item$values === void 0 ? void 0 : _item$values.length)) {
|
|
189
|
+
conditionValIsNull = true;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
if (conditionValIsNull) {
|
|
193
|
+
return Promise.reject('请填写完整的条件');
|
|
194
|
+
}
|
|
195
|
+
return Promise.resolve();
|
|
196
|
+
},
|
|
197
|
+
validateTrigger: 'onBlur'
|
|
198
|
+
}]
|
|
103
199
|
}, /*#__PURE__*/React.createElement(EventFilter, {
|
|
104
|
-
setSearchDisabled: setSearchDisabled,
|
|
105
200
|
countChange: countChange,
|
|
106
201
|
setIsCity: setIsCity,
|
|
107
|
-
setEnableSelectChart: setEnableSelectChart
|
|
202
|
+
setEnableSelectChart: setEnableSelectChart,
|
|
203
|
+
analysisType: analysisType
|
|
108
204
|
})), /*#__PURE__*/React.createElement("div", {
|
|
109
205
|
className: "".concat(classPrefix, "-form-botton-box ").concat(marginStyle ? 'margin-style' : '')
|
|
110
206
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
111
207
|
onClick: resetting
|
|
112
208
|
}, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
|
|
113
|
-
|
|
209
|
+
loading: subjectLoading || loading,
|
|
114
210
|
type: "primary",
|
|
115
211
|
onClick: function onClick() {
|
|
116
|
-
|
|
212
|
+
form.submit();
|
|
117
213
|
}
|
|
118
214
|
}, "\u67E5\u8BE2"))));
|
|
119
215
|
});
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
.top-panel {
|
|
2
2
|
&-form-event {
|
|
3
3
|
margin-bottom: 0;
|
|
4
|
-
.ant-form-item-label {
|
|
4
|
+
& .ant-form-item-label {
|
|
5
5
|
padding-left: 24px;
|
|
6
6
|
font-weight: 500;
|
|
7
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
|
+
}
|
|
8
22
|
}
|
|
9
23
|
&-form-botton-box {
|
|
10
24
|
display: flex;
|
|
11
25
|
justify-content: flex-end;
|
|
12
|
-
margin-top: 12px;
|
|
13
26
|
margin-right: 24px;
|
|
14
27
|
> :nth-child(1) {
|
|
15
28
|
margin-right: 16px;
|
|
@@ -18,7 +31,19 @@
|
|
|
18
31
|
border-color: #29bd52;
|
|
19
32
|
}
|
|
20
33
|
}
|
|
21
|
-
&-form
|
|
22
|
-
|
|
34
|
+
&-form {
|
|
35
|
+
.ant-form-item-has-error .biz-event-select {
|
|
36
|
+
border: 1px solid @error-color !important;
|
|
37
|
+
}
|
|
23
38
|
}
|
|
24
39
|
}
|
|
40
|
+
.hoverable-form-item {
|
|
41
|
+
.ant-form-item-control {
|
|
42
|
+
&:hover {
|
|
43
|
+
background: #e8efff !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.event---1 .ant-form-item-label {
|
|
48
|
+
padding-bottom: 4px !important;
|
|
49
|
+
}
|
|
@@ -7,23 +7,43 @@ interface filterConditions {
|
|
|
7
7
|
filters?: AttrConditionTypes.GroupValue;
|
|
8
8
|
dimension?: bizAttributeSelectorValueProp;
|
|
9
9
|
}
|
|
10
|
+
interface analysisSubject {
|
|
11
|
+
id?: number;
|
|
12
|
+
subjectId?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
unit?: string;
|
|
15
|
+
subjectAlias?: string;
|
|
16
|
+
subjectName?: string;
|
|
17
|
+
analysisSubjectType?: string;
|
|
18
|
+
}
|
|
19
|
+
interface analysisSubjectType {
|
|
20
|
+
value?: string;
|
|
21
|
+
user?: string;
|
|
22
|
+
}
|
|
10
23
|
export interface FormDataProps {
|
|
11
24
|
userGroup?: {
|
|
12
25
|
id: number;
|
|
13
26
|
}[] | any[];
|
|
14
27
|
filterConditions?: filterConditions;
|
|
28
|
+
analysisSubject?: analysisSubject | null;
|
|
15
29
|
}
|
|
16
30
|
export interface FormHandelDataProps extends filterConditions {
|
|
17
31
|
userGroup?: any[];
|
|
18
32
|
chartType?: EventChartTypes | undefined;
|
|
33
|
+
analysisSubject?: analysisSubject;
|
|
34
|
+
eventIds?: number[];
|
|
19
35
|
}
|
|
20
36
|
export interface TopPanelProps {
|
|
21
37
|
value?: SearchValue;
|
|
22
38
|
onChange: (data: SearchValue, flag: boolean) => void;
|
|
39
|
+
loading?: boolean;
|
|
23
40
|
ajaxFlag: boolean;
|
|
41
|
+
subDisplay?: boolean;
|
|
24
42
|
finalSearchData?: SearchValue;
|
|
25
43
|
fetchRequest: (flag?: boolean) => void;
|
|
26
44
|
setIsCity?: Function;
|
|
27
45
|
setEnableSelectChart?: Function;
|
|
46
|
+
analysisSubjectType?: analysisSubjectType;
|
|
47
|
+
onChangeSubjectType: (type: string) => void;
|
|
28
48
|
}
|
|
29
49
|
export {};
|
package/es/types.d.ts
CHANGED
|
@@ -8,6 +8,15 @@ export interface bizAttributeSelectorValueProp {
|
|
|
8
8
|
id?: number;
|
|
9
9
|
key?: number | string;
|
|
10
10
|
}
|
|
11
|
+
export interface AnalysisSubject {
|
|
12
|
+
subjectId?: number;
|
|
13
|
+
id?: number;
|
|
14
|
+
name?: string;
|
|
15
|
+
unit?: string;
|
|
16
|
+
subjectAlias?: string;
|
|
17
|
+
subjectName?: string;
|
|
18
|
+
analysisSubjectType?: string;
|
|
19
|
+
}
|
|
11
20
|
export interface eventProps {
|
|
12
21
|
id?: number;
|
|
13
22
|
eventGroupId?: number;
|
|
@@ -17,6 +26,7 @@ export interface eventProps {
|
|
|
17
26
|
}
|
|
18
27
|
export interface SearchValue {
|
|
19
28
|
id?: number;
|
|
29
|
+
eventIds?: number[];
|
|
20
30
|
eventGroupId?: number;
|
|
21
31
|
name?: string;
|
|
22
32
|
platform?: number;
|
|
@@ -27,6 +37,7 @@ export interface SearchValue {
|
|
|
27
37
|
time?: DatePickerTypes.Value;
|
|
28
38
|
dimension?: bizAttributeSelectorValueProp;
|
|
29
39
|
filters?: AttrConditionTypes.GroupValue;
|
|
40
|
+
analysisSubject?: AnalysisSubject;
|
|
30
41
|
}
|
|
31
42
|
export interface UserDrillParamsProp {
|
|
32
43
|
appId: number;
|
package/es/utils/formData.js
CHANGED
|
@@ -19,7 +19,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
19
19
|
key: 'nameGroup',
|
|
20
20
|
align: 'center',
|
|
21
21
|
className: "".concat(classPrefix, "-table-td"),
|
|
22
|
-
fixed:
|
|
22
|
+
fixed: 'left',
|
|
23
23
|
render: function render(_, record) {
|
|
24
24
|
var isActive = showList.includes(record.nameGroup);
|
|
25
25
|
var cannotClick = showList.length >= 10 && !isActive;
|
|
@@ -36,14 +36,14 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
36
36
|
}));
|
|
37
37
|
}
|
|
38
38
|
}];
|
|
39
|
-
if (userGroup.length > 1 || userGroup[0] !== 0) {
|
|
39
|
+
if (!(searchData === null || searchData === void 0 ? void 0 : searchData.analysisSubject) && (userGroup.length > 1 || userGroup[0] !== 0)) {
|
|
40
40
|
data.push({
|
|
41
41
|
title: '用户群',
|
|
42
42
|
width: 150,
|
|
43
43
|
dataIndex: 'userGroup',
|
|
44
44
|
key: 'userGroup',
|
|
45
45
|
ellipsis: true,
|
|
46
|
-
fixed:
|
|
46
|
+
fixed: 'left',
|
|
47
47
|
render: function render(text) {
|
|
48
48
|
return text;
|
|
49
49
|
}
|
|
@@ -57,7 +57,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
57
57
|
dataIndex: 'dimension',
|
|
58
58
|
key: 'dimension',
|
|
59
59
|
ellipsis: true,
|
|
60
|
-
fixed:
|
|
60
|
+
fixed: 'left',
|
|
61
61
|
render: function render(val) {
|
|
62
62
|
return /*#__PURE__*/React.createElement("div", {
|
|
63
63
|
className: "tooltip-name-box"
|
|
@@ -89,7 +89,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
89
89
|
dataIndex: 'eventName',
|
|
90
90
|
key: 'eventName',
|
|
91
91
|
ellipsis: true,
|
|
92
|
-
fixed:
|
|
92
|
+
fixed: 'left',
|
|
93
93
|
render: function render(val) {
|
|
94
94
|
var _val = val;
|
|
95
95
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -104,7 +104,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
104
104
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
105
105
|
type: "shoucang",
|
|
106
106
|
className: "".concat(marketEventNameList.indexOf(_val) === -1 ? 'notshoucang' : '')
|
|
107
|
-
}), _val)), /*#__PURE__*/React.createElement(Tooltip, {
|
|
107
|
+
}), util.strMiddleSplit(_val))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
108
108
|
title: "\u590D\u5236"
|
|
109
109
|
}, /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
110
110
|
text: _val,
|
|
@@ -134,7 +134,6 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
134
134
|
}
|
|
135
135
|
data.push({
|
|
136
136
|
title: value,
|
|
137
|
-
width: 100,
|
|
138
137
|
align: 'center',
|
|
139
138
|
ellipsis: true,
|
|
140
139
|
dataIndex: "field".concat(i),
|
|
@@ -247,7 +246,8 @@ export function getWarningId(searchData, eventData, eventGroupList) {
|
|
|
247
246
|
if (eventGroupList && eventGroupList.length > 0 && eventData) {
|
|
248
247
|
eventGroupList.map(function (item) {
|
|
249
248
|
item.eventList.map(function (_item) {
|
|
250
|
-
var
|
|
249
|
+
var _eventData$series$, _searchData$userGroup;
|
|
250
|
+
var _name = eventData === null || eventData === void 0 ? void 0 : (_eventData$series$ = eventData.series[0]) === null || _eventData$series$ === void 0 ? void 0 : _eventData$series$.names[(searchData === null || searchData === void 0 ? void 0 : (_searchData$userGroup = searchData.userGroup) === null || _searchData$userGroup === void 0 ? void 0 : _searchData$userGroup.length) > 1 ? 1 : 0];
|
|
251
251
|
if (_item.name === _name || _item.alias === _name) {
|
|
252
252
|
id = _item.id;
|
|
253
253
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-event",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15-qirui.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/lodash": "^4.14.191",
|
|
37
37
|
"@umijs/fabric": "^2.8.1",
|
|
38
38
|
"@umijs/test": "^3.0.5",
|
|
39
|
-
"@zgfe/business-lib": "1.1.
|
|
39
|
+
"@zgfe/business-lib": "1.1.96-qirui.0",
|
|
40
40
|
"antd": "^4.22.6",
|
|
41
41
|
"dumi": "^1.1.0",
|
|
42
42
|
"echarts": "^5.3.2",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react": "^16.12.0 || ^17.0.0",
|
|
50
50
|
"yorkie": "^2.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "71f4640ffca565fea18098506b0cb78ef3a7ab05",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"react-copy-to-clipboard": "^5.1.0",
|
|
55
55
|
"react-highlight": "^0.15.0"
|