@zgfe/modules-event 0.1.5-event.7 → 0.1.5-event.70
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 +90 -51
- package/es/components/eventFilter/styles/index.less +13 -5
- package/es/components/eventFilter/types.d.ts +3 -4
- package/es/components/renderContent/index.js +1 -1
- package/es/components/searchPanel/index.js +20 -23
- package/es/components/searchPanel/types.d.ts +12 -0
- package/es/components/table/index.js +11 -7
- package/es/components/table/styles/index.less +8 -3
- package/es/components/table/types.d.ts +1 -0
- package/es/components/topBar/index.js +4 -4
- package/es/modules/chart/demo/index.js +1 -1
- package/es/modules/chart/index.js +5 -4
- package/es/modules/content/index.js +34 -40
- package/es/modules/content/utils.js +4 -4
- package/es/modules/home/demo/create.js +1 -1
- package/es/modules/home/demo/edit.js +37 -23
- package/es/modules/home/demo/index.js +29 -5
- package/es/modules/home/demo/scene.js +1 -1
- package/es/modules/home/index.js +8 -6
- package/es/modules/topPanel/index.js +123 -99
- package/es/modules/topPanel/styles/index.less +22 -6
- package/es/modules/topPanel/types.d.ts +3 -1
- package/es/types.d.ts +1 -0
- package/es/utils/formData.js +6 -7
- package/package.json +3 -3
|
@@ -1,191 +1,215 @@
|
|
|
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
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; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
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
13
|
import React, { useState, useEffect } from 'react';
|
|
8
14
|
import { Form, Button } from 'antd';
|
|
9
|
-
import { BizUserGroupHeader, BizSelect } 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
23
|
setEnableSelectChart = props.setEnableSelectChart,
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
subDisplay = props.subDisplay,
|
|
25
|
+
loading = props.loading;
|
|
22
26
|
var _useState = useState(false),
|
|
23
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var _useState3 = useState(
|
|
28
|
+
marginStyle = _useState2[0],
|
|
29
|
+
setmarginStyle = _useState2[1];
|
|
30
|
+
var _useState3 = useState('user'),
|
|
27
31
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var _useState5 = useState(
|
|
31
|
-
value: 'user',
|
|
32
|
-
label: '用户'
|
|
33
|
-
}),
|
|
32
|
+
analysisType = _useState4[0],
|
|
33
|
+
setAnalysisType = _useState4[1];
|
|
34
|
+
var _useState5 = useState(false),
|
|
34
35
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
inited = _useState6[0],
|
|
37
|
+
setInited = _useState6[1];
|
|
38
|
+
var _useSubject = useSubject(),
|
|
39
|
+
subjectList = _useSubject.subjectList,
|
|
40
|
+
subjectLoading = _useSubject.loading;
|
|
37
41
|
var countChange = function countChange(count) {
|
|
38
42
|
setmarginStyle(count > 0 ? true : false);
|
|
39
43
|
};
|
|
40
|
-
useEffect(function () {
|
|
41
|
-
console.log('value===', value);
|
|
42
|
-
if (value) {
|
|
43
|
-
var analysisSubject = value.analysisSubject;
|
|
44
|
-
setAnalysisSubjectType({
|
|
45
|
-
value: analysisSubject && analysisSubject.analysisSubjectType,
|
|
46
|
-
label: analysisSubject && analysisSubject.analysisSubjectType === 'user' ? 'user' : 'event'
|
|
47
|
-
});
|
|
48
|
-
console.log('setAnalysisSubjectType useEffect', analysisSubjectType);
|
|
49
|
-
}
|
|
50
|
-
}, []);
|
|
51
44
|
var _Form$useForm = Form.useForm(),
|
|
52
45
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
53
46
|
form = _Form$useForm2[0];
|
|
54
47
|
var userGroup = value.userGroup;
|
|
55
|
-
|
|
56
|
-
var _data
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
_data.analysisSubject = {
|
|
73
|
-
subjectId: allData.analysisSubject.subjectId,
|
|
74
|
-
subjectName: allData.analysisSubject.subjectName,
|
|
75
|
-
subjectAlias: allData.analysisSubject.subjectAlias,
|
|
76
|
-
unit: allData.analysisSubject.unit,
|
|
77
|
-
analysisSubjectType: analysisSubjectType.value
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
if (data.filterConditions) {
|
|
81
|
-
if (finalSearchData && finalSearchData.id && data.filterConditions.id === finalSearchData.id && data.filterConditions.eventGroupId === finalSearchData.eventGroupId) {
|
|
82
|
-
ajaxFlag = false;
|
|
83
|
-
} else {
|
|
84
|
-
ajaxFlag = true;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
props.onChange(_data, ajaxFlag);
|
|
88
|
-
};
|
|
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
|
+
}
|
|
89
65
|
var resetting = function resetting() {
|
|
90
66
|
form.resetFields();
|
|
91
67
|
form.setFieldsValue({
|
|
92
68
|
userGroup: [0],
|
|
93
|
-
filterConditions: null
|
|
94
|
-
analysisSubject: null
|
|
69
|
+
filterConditions: null
|
|
95
70
|
});
|
|
96
71
|
props.onChange({
|
|
97
72
|
userGroup: [0],
|
|
98
|
-
analysisSubject: undefined,
|
|
99
73
|
id: undefined,
|
|
100
74
|
name: undefined,
|
|
101
75
|
filters: undefined,
|
|
102
|
-
dimension: undefined
|
|
76
|
+
dimension: undefined,
|
|
77
|
+
analysisAttr: undefined,
|
|
78
|
+
chartType: 'line'
|
|
103
79
|
}, true);
|
|
104
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;
|
|
105
97
|
return /*#__PURE__*/React.createElement(Form, {
|
|
106
98
|
form: form,
|
|
107
99
|
component: "div",
|
|
108
100
|
colon: false,
|
|
109
101
|
layout: "vertical",
|
|
102
|
+
className: "".concat(classPrefix, "-form"),
|
|
110
103
|
initialValues: {
|
|
111
104
|
userGroup: userGroup ? userGroup : [0],
|
|
112
|
-
filterConditions: {
|
|
105
|
+
filterConditions: (value === null || value === void 0 ? void 0 : value.eventIds) || {
|
|
113
106
|
id: value === null || value === void 0 ? void 0 : value.id,
|
|
114
107
|
name: value === null || value === void 0 ? void 0 : value.name,
|
|
115
108
|
dimension: value === null || value === void 0 ? void 0 : value.dimension,
|
|
116
109
|
filters: value === null || value === void 0 ? void 0 : value.filters,
|
|
117
110
|
eventGroupId: value === null || value === void 0 ? void 0 : value.eventGroupId
|
|
118
111
|
},
|
|
119
|
-
|
|
120
|
-
value: 'event',
|
|
121
|
-
label: '事件属性'
|
|
122
|
-
},
|
|
123
|
-
analysisSubject: {
|
|
124
|
-
subjectId: '12',
|
|
125
|
-
subjectName: '12321',
|
|
126
|
-
subjectAlias: '123',
|
|
127
|
-
unit: '123'
|
|
128
|
-
}
|
|
112
|
+
analysisSubject: value === null || value === void 0 ? void 0 : value.analysisSubject
|
|
129
113
|
},
|
|
130
114
|
scrollToFirstError: true,
|
|
131
|
-
|
|
115
|
+
onFinish: onSearch
|
|
132
116
|
}, !subDisplay ? null : /*#__PURE__*/React.createElement(Form.Item, {
|
|
133
117
|
label: "\u5206\u6790\u4E3B\u4F53",
|
|
134
|
-
className: "".concat(classPrefix, "-form-event")
|
|
118
|
+
className: "".concat(classPrefix, "-form-event hoverable-form-item")
|
|
135
119
|
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
136
120
|
className: "".concat(classPrefix, "-form-event-select"),
|
|
137
121
|
options: [{
|
|
138
|
-
|
|
139
|
-
|
|
122
|
+
label: '用户',
|
|
123
|
+
value: 'user'
|
|
140
124
|
}, {
|
|
141
|
-
|
|
142
|
-
|
|
125
|
+
label: '事件属性',
|
|
126
|
+
value: 'eventProp'
|
|
143
127
|
}],
|
|
144
128
|
overlayWidth: 208,
|
|
145
|
-
labelField: "label",
|
|
146
129
|
keyField: "value",
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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);
|
|
151
138
|
resetting();
|
|
152
139
|
}
|
|
153
|
-
})),
|
|
140
|
+
})), analysisType === 'user' ? /*#__PURE__*/React.createElement(Form.Item, {
|
|
154
141
|
label: "",
|
|
155
|
-
name: "userGroup"
|
|
142
|
+
name: "userGroup",
|
|
143
|
+
className: "hoverable-form-item"
|
|
156
144
|
}, /*#__PURE__*/React.createElement(BizUserGroupHeader, {
|
|
157
145
|
max: 3,
|
|
158
146
|
enableTags: true
|
|
159
147
|
})) : /*#__PURE__*/React.createElement(Form.Item, {
|
|
160
148
|
label: "\u4E3B\u4F53\u540D\u79F0",
|
|
161
149
|
name: "analysisSubject",
|
|
162
|
-
className: "".concat(classPrefix, "-form-event")
|
|
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
|
+
}]
|
|
163
160
|
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
164
161
|
className: "".concat(classPrefix, "-form-event-select"),
|
|
165
|
-
options:
|
|
166
|
-
|
|
162
|
+
options: subjectList,
|
|
163
|
+
aliasField: "subjectAlias",
|
|
164
|
+
labelField: "subjectName",
|
|
167
165
|
keyField: "id"
|
|
168
166
|
})), /*#__PURE__*/React.createElement("div", {
|
|
169
167
|
ref: ref
|
|
170
168
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
171
169
|
label: "\u4E8B\u4EF6",
|
|
172
170
|
name: "filterConditions",
|
|
173
|
-
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
|
+
}]
|
|
174
199
|
}, /*#__PURE__*/React.createElement(EventFilter, {
|
|
175
|
-
setSearchDisabled: setSearchDisabled,
|
|
176
200
|
countChange: countChange,
|
|
177
201
|
setIsCity: setIsCity,
|
|
178
202
|
setEnableSelectChart: setEnableSelectChart,
|
|
179
|
-
|
|
203
|
+
analysisType: analysisType
|
|
180
204
|
})), /*#__PURE__*/React.createElement("div", {
|
|
181
205
|
className: "".concat(classPrefix, "-form-botton-box ").concat(marginStyle ? 'margin-style' : '')
|
|
182
206
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
183
207
|
onClick: resetting
|
|
184
208
|
}, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
|
|
185
|
-
|
|
209
|
+
loading: subjectLoading || loading,
|
|
186
210
|
type: "primary",
|
|
187
211
|
onClick: function onClick() {
|
|
188
|
-
|
|
212
|
+
form.submit();
|
|
189
213
|
}
|
|
190
214
|
}, "\u67E5\u8BE2"))));
|
|
191
215
|
});
|
|
@@ -1,23 +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
8
|
&-select {
|
|
9
9
|
width: 208px;
|
|
10
|
-
margin-bottom: 24px;
|
|
11
10
|
margin-left: 24px;
|
|
12
11
|
.biz-select-handle-input {
|
|
13
12
|
padding-left: 12px;
|
|
14
13
|
}
|
|
15
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
|
+
}
|
|
16
22
|
}
|
|
17
23
|
&-form-botton-box {
|
|
18
24
|
display: flex;
|
|
19
25
|
justify-content: flex-end;
|
|
20
|
-
margin-top: 12px;
|
|
21
26
|
margin-right: 24px;
|
|
22
27
|
> :nth-child(1) {
|
|
23
28
|
margin-right: 16px;
|
|
@@ -26,8 +31,19 @@
|
|
|
26
31
|
border-color: #29bd52;
|
|
27
32
|
}
|
|
28
33
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
&-form {
|
|
35
|
+
.ant-form-item-has-error .biz-event-select {
|
|
36
|
+
border: 1px solid @error-color !important;
|
|
37
|
+
}
|
|
32
38
|
}
|
|
33
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
|
+
}
|
|
@@ -8,6 +8,7 @@ interface filterConditions {
|
|
|
8
8
|
dimension?: bizAttributeSelectorValueProp;
|
|
9
9
|
}
|
|
10
10
|
interface analysisSubject {
|
|
11
|
+
id?: number;
|
|
11
12
|
subjectId?: number;
|
|
12
13
|
name?: string;
|
|
13
14
|
unit?: string;
|
|
@@ -30,17 +31,18 @@ export interface FormHandelDataProps extends filterConditions {
|
|
|
30
31
|
userGroup?: any[];
|
|
31
32
|
chartType?: EventChartTypes | undefined;
|
|
32
33
|
analysisSubject?: analysisSubject;
|
|
34
|
+
eventIds?: number[];
|
|
33
35
|
}
|
|
34
36
|
export interface TopPanelProps {
|
|
35
37
|
value?: SearchValue;
|
|
36
38
|
onChange: (data: SearchValue, flag: boolean) => void;
|
|
39
|
+
loading?: boolean;
|
|
37
40
|
ajaxFlag: boolean;
|
|
38
41
|
subDisplay?: boolean;
|
|
39
42
|
finalSearchData?: SearchValue;
|
|
40
43
|
fetchRequest: (flag?: boolean) => void;
|
|
41
44
|
setIsCity?: Function;
|
|
42
45
|
setEnableSelectChart?: Function;
|
|
43
|
-
allSubjectList?: any[];
|
|
44
46
|
analysisSubjectType?: analysisSubjectType;
|
|
45
47
|
onChangeSubjectType: (type: string) => void;
|
|
46
48
|
}
|
package/es/types.d.ts
CHANGED
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),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-event",
|
|
3
|
-
"version": "0.1.5-event.
|
|
3
|
+
"version": "0.1.5-event.70",
|
|
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.89-qirui.
|
|
39
|
+
"@zgfe/business-lib": "1.1.89-qirui.23",
|
|
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": "0f68524d27aece9ad2346f60cfc571acf97f2586",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"react-copy-to-clipboard": "^5.1.0",
|
|
55
55
|
"react-highlight": "^0.15.0"
|