@zgfe/modules-event 0.1.15-qirui.1 → 0.1.16-gongyin.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 +51 -86
- package/es/components/eventFilter/styles/index.less +5 -13
- package/es/components/eventFilter/types.d.ts +3 -3
- package/es/components/renderContent/index.js +5 -5
- package/es/components/searchPanel/index.js +33 -38
- package/es/components/searchPanel/types.d.ts +0 -13
- package/es/components/table/index.js +11 -15
- package/es/components/table/styles/index.less +3 -1
- package/es/components/topBar/index.js +13 -13
- package/es/constants/apis.d.ts +0 -2
- package/es/constants/apis.js +1 -3
- package/es/modules/chart/demo/index.js +1 -1
- package/es/modules/chart/index.js +8 -8
- package/es/modules/content/index.js +26 -70
- package/es/modules/content/utils.d.ts +1 -4
- package/es/modules/content/utils.js +22 -15
- package/es/modules/home/demo/create.js +4 -4
- package/es/modules/home/demo/edit.js +4 -4
- package/es/modules/home/demo/index.js +8 -32
- package/es/modules/home/demo/scene.js +4 -4
- package/es/modules/home/index.js +8 -10
- package/es/modules/topPanel/index.js +48 -145
- package/es/modules/topPanel/styles/index.less +4 -29
- package/es/modules/topPanel/types.d.ts +0 -20
- package/es/types.d.ts +0 -11
- package/es/utils/formData.js +8 -8
- package/package.json +3 -3
package/es/modules/home/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
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(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
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); }
|
|
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
|
-
function _iterableToArrayLimit(
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import React, { useContext, useEffect, useState } from 'react';
|
|
14
14
|
import { Spin } from 'antd';
|
|
@@ -74,13 +74,11 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
74
74
|
useEffect(function () {
|
|
75
75
|
setPageLoading(true);
|
|
76
76
|
if (props.defaultValue) {
|
|
77
|
-
var _props$defaultValue;
|
|
78
77
|
setShowList(props.defaultValue.chosen_data);
|
|
79
78
|
setPanelId(props.defaultValue.panelId);
|
|
80
79
|
setTitle(props.defaultValue.name);
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
-
setElementId((_props$defaultValue2 = props.defaultValue) === null || _props$defaultValue2 === void 0 ? void 0 : _props$defaultValue2.id);
|
|
80
|
+
if (props.defaultValue.id) {
|
|
81
|
+
setElementId(props.defaultValue.id);
|
|
84
82
|
}
|
|
85
83
|
if (props.defaultValue.data) {
|
|
86
84
|
setSearchData(props.defaultValue.data);
|
|
@@ -1,43 +1,30 @@
|
|
|
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); }
|
|
7
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
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); }
|
|
10
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++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
-
function _iterableToArrayLimit(
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useState
|
|
7
|
+
import React, { useState } from 'react';
|
|
14
8
|
import { Form, Button } from 'antd';
|
|
15
|
-
import { BizUserGroupHeader
|
|
9
|
+
import { BizUserGroupHeader } from '@zgfe/business-lib';
|
|
16
10
|
import EventFilter from '../../components/eventFilter';
|
|
17
11
|
import './styles/index.less';
|
|
18
|
-
import _ from 'lodash';
|
|
19
12
|
var classPrefix = 'top-panel';
|
|
20
13
|
var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
21
14
|
var value = props.value,
|
|
15
|
+
ajaxFlag = props.ajaxFlag,
|
|
16
|
+
finalSearchData = props.finalSearchData,
|
|
17
|
+
fetchRequest = props.fetchRequest,
|
|
22
18
|
setIsCity = props.setIsCity,
|
|
23
|
-
setEnableSelectChart = props.setEnableSelectChart
|
|
24
|
-
subDisplay = props.subDisplay,
|
|
25
|
-
loading = props.loading;
|
|
19
|
+
setEnableSelectChart = props.setEnableSelectChart;
|
|
26
20
|
var _useState = useState(false),
|
|
27
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var _useState3 = useState(
|
|
22
|
+
searchDisabled = _useState2[0],
|
|
23
|
+
setSearchDisabled = _useState2[1];
|
|
24
|
+
var _useState3 = useState(false),
|
|
31
25
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
32
|
-
|
|
33
|
-
|
|
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;
|
|
26
|
+
marginStyle = _useState4[0],
|
|
27
|
+
setmarginStyle = _useState4[1];
|
|
41
28
|
var countChange = function countChange(count) {
|
|
42
29
|
setmarginStyle(count > 0 ? true : false);
|
|
43
30
|
};
|
|
@@ -45,23 +32,31 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
45
32
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
46
33
|
form = _Form$useForm2[0];
|
|
47
34
|
var userGroup = value.userGroup;
|
|
48
|
-
function
|
|
49
|
-
var _data
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
35
|
+
var onValuesChange = function onValuesChange(data, allData) {
|
|
36
|
+
var _data = {};
|
|
37
|
+
if (allData.filterConditions) {
|
|
38
|
+
if (allData.filterConditions.id !== -100) {
|
|
39
|
+
_data = allData.filterConditions;
|
|
40
|
+
}
|
|
41
|
+
_data.eventGroupId = allData.filterConditions.eventGroupId;
|
|
42
|
+
}
|
|
43
|
+
if (allData.userGroup) {
|
|
44
|
+
_data.userGroup = allData.userGroup.filter(function (item) {
|
|
45
|
+
return item !== undefined;
|
|
46
|
+
});
|
|
47
|
+
if (_data.userGroup.length <= 0 || _data.userGroup.length === 1 && _data.userGroup[0].length <= 0) {
|
|
48
|
+
_data.userGroup = [0];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (data.filterConditions) {
|
|
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
|
+
};
|
|
65
60
|
var resetting = function resetting() {
|
|
66
61
|
form.resetFields();
|
|
67
62
|
form.setFieldsValue({
|
|
@@ -73,144 +68,52 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
73
68
|
id: undefined,
|
|
74
69
|
name: undefined,
|
|
75
70
|
filters: undefined,
|
|
76
|
-
dimension: undefined
|
|
77
|
-
analysisAttr: undefined,
|
|
78
|
-
chartType: 'line'
|
|
71
|
+
dimension: undefined
|
|
79
72
|
}, true);
|
|
80
73
|
};
|
|
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;
|
|
97
74
|
return /*#__PURE__*/React.createElement(Form, {
|
|
98
75
|
form: form,
|
|
99
76
|
component: "div",
|
|
100
77
|
colon: false,
|
|
101
78
|
layout: "vertical",
|
|
102
|
-
className: "".concat(classPrefix, "-form"),
|
|
103
79
|
initialValues: {
|
|
104
80
|
userGroup: userGroup ? userGroup : [0],
|
|
105
|
-
filterConditions:
|
|
81
|
+
filterConditions: {
|
|
106
82
|
id: value === null || value === void 0 ? void 0 : value.id,
|
|
107
83
|
name: value === null || value === void 0 ? void 0 : value.name,
|
|
108
84
|
dimension: value === null || value === void 0 ? void 0 : value.dimension,
|
|
109
85
|
filters: value === null || value === void 0 ? void 0 : value.filters,
|
|
110
86
|
eventGroupId: value === null || value === void 0 ? void 0 : value.eventGroupId
|
|
111
|
-
}
|
|
112
|
-
analysisSubject: value === null || value === void 0 ? void 0 : value.analysisSubject
|
|
87
|
+
}
|
|
113
88
|
},
|
|
114
89
|
scrollToFirstError: true,
|
|
115
|
-
|
|
116
|
-
},
|
|
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, {
|
|
90
|
+
onValuesChange: onValuesChange
|
|
91
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
141
92
|
label: "",
|
|
142
|
-
name: "userGroup"
|
|
143
|
-
className: "hoverable-form-item"
|
|
93
|
+
name: "userGroup"
|
|
144
94
|
}, /*#__PURE__*/React.createElement(BizUserGroupHeader, {
|
|
145
95
|
max: 3,
|
|
146
96
|
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"
|
|
166
97
|
})), /*#__PURE__*/React.createElement("div", {
|
|
167
98
|
ref: ref
|
|
168
99
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
169
100
|
label: "\u4E8B\u4EF6",
|
|
170
101
|
name: "filterConditions",
|
|
171
|
-
|
|
172
|
-
className: "".concat(classPrefix, "-form-event event---1"),
|
|
173
|
-
rules: [{
|
|
174
|
-
validator: function validator(_rule, value) {
|
|
175
|
-
var _value$filters, _value$filters$condit;
|
|
176
|
-
if (_.isArray(value)) {
|
|
177
|
-
if (!value.length) {
|
|
178
|
-
return Promise.reject('请选择事件');
|
|
179
|
-
} else {
|
|
180
|
-
return Promise.resolve();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
if (!value || !value.id) {
|
|
184
|
-
return Promise.reject('请选择事件');
|
|
185
|
-
}
|
|
186
|
-
var conditionValIsNull = false;
|
|
187
|
-
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) {
|
|
188
|
-
var _item$values;
|
|
189
|
-
if (!/null/.test(item.operator || '') && !((_item$values = item.values) === null || _item$values === void 0 ? void 0 : _item$values.length)) {
|
|
190
|
-
conditionValIsNull = true;
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
if (conditionValIsNull) {
|
|
194
|
-
return Promise.reject('请填写完整的条件');
|
|
195
|
-
}
|
|
196
|
-
return Promise.resolve();
|
|
197
|
-
},
|
|
198
|
-
validateTrigger: 'onBlur'
|
|
199
|
-
}]
|
|
102
|
+
className: "".concat(classPrefix, "-form-event")
|
|
200
103
|
}, /*#__PURE__*/React.createElement(EventFilter, {
|
|
104
|
+
setSearchDisabled: setSearchDisabled,
|
|
201
105
|
countChange: countChange,
|
|
202
106
|
setIsCity: setIsCity,
|
|
203
|
-
setEnableSelectChart: setEnableSelectChart
|
|
204
|
-
analysisType: analysisType
|
|
107
|
+
setEnableSelectChart: setEnableSelectChart
|
|
205
108
|
})), /*#__PURE__*/React.createElement("div", {
|
|
206
109
|
className: "".concat(classPrefix, "-form-botton-box ").concat(marginStyle ? 'margin-style' : '')
|
|
207
110
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
208
111
|
onClick: resetting
|
|
209
112
|
}, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
|
|
210
|
-
|
|
113
|
+
disabled: ajaxFlag || searchDisabled,
|
|
211
114
|
type: "primary",
|
|
212
115
|
onClick: function onClick() {
|
|
213
|
-
|
|
116
|
+
fetchRequest(true);
|
|
214
117
|
}
|
|
215
118
|
}, "\u67E5\u8BE2"))));
|
|
216
119
|
});
|
|
@@ -1,28 +1,15 @@
|
|
|
1
1
|
.top-panel {
|
|
2
2
|
&-form-event {
|
|
3
3
|
margin-bottom: 0;
|
|
4
|
-
|
|
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
|
-
}
|
|
22
8
|
}
|
|
23
9
|
&-form-botton-box {
|
|
24
10
|
display: flex;
|
|
25
11
|
justify-content: flex-end;
|
|
12
|
+
margin-top: 12px;
|
|
26
13
|
margin-right: 24px;
|
|
27
14
|
> :nth-child(1) {
|
|
28
15
|
margin-right: 16px;
|
|
@@ -31,19 +18,7 @@
|
|
|
31
18
|
border-color: #29bd52;
|
|
32
19
|
}
|
|
33
20
|
}
|
|
34
|
-
&-form {
|
|
35
|
-
|
|
36
|
-
// border: 1px solid @error-color !important;
|
|
37
|
-
// }
|
|
21
|
+
&-form-botton-box.margin-style {
|
|
22
|
+
margin-top: 20px;
|
|
38
23
|
}
|
|
39
24
|
}
|
|
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,43 +7,23 @@ 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
|
-
}
|
|
23
10
|
export interface FormDataProps {
|
|
24
11
|
userGroup?: {
|
|
25
12
|
id: number;
|
|
26
13
|
}[] | any[];
|
|
27
14
|
filterConditions?: filterConditions;
|
|
28
|
-
analysisSubject?: analysisSubject | null;
|
|
29
15
|
}
|
|
30
16
|
export interface FormHandelDataProps extends filterConditions {
|
|
31
17
|
userGroup?: any[];
|
|
32
18
|
chartType?: EventChartTypes | undefined;
|
|
33
|
-
analysisSubject?: analysisSubject;
|
|
34
|
-
eventIds?: number[];
|
|
35
19
|
}
|
|
36
20
|
export interface TopPanelProps {
|
|
37
21
|
value?: SearchValue;
|
|
38
22
|
onChange: (data: SearchValue, flag: boolean) => void;
|
|
39
|
-
loading?: boolean;
|
|
40
23
|
ajaxFlag: boolean;
|
|
41
|
-
subDisplay?: boolean;
|
|
42
24
|
finalSearchData?: SearchValue;
|
|
43
25
|
fetchRequest: (flag?: boolean) => void;
|
|
44
26
|
setIsCity?: Function;
|
|
45
27
|
setEnableSelectChart?: Function;
|
|
46
|
-
analysisSubjectType?: analysisSubjectType;
|
|
47
|
-
onChangeSubjectType: (type: string) => void;
|
|
48
28
|
}
|
|
49
29
|
export {};
|
package/es/types.d.ts
CHANGED
|
@@ -8,15 +8,6 @@ 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
|
-
}
|
|
20
11
|
export interface eventProps {
|
|
21
12
|
id?: number;
|
|
22
13
|
eventGroupId?: number;
|
|
@@ -26,7 +17,6 @@ export interface eventProps {
|
|
|
26
17
|
}
|
|
27
18
|
export interface SearchValue {
|
|
28
19
|
id?: number;
|
|
29
|
-
eventIds?: number[];
|
|
30
20
|
eventGroupId?: number;
|
|
31
21
|
name?: string;
|
|
32
22
|
platform?: number;
|
|
@@ -37,7 +27,6 @@ export interface SearchValue {
|
|
|
37
27
|
time?: DatePickerTypes.Value;
|
|
38
28
|
dimension?: bizAttributeSelectorValueProp;
|
|
39
29
|
filters?: AttrConditionTypes.GroupValue;
|
|
40
|
-
analysisSubject?: AnalysisSubject;
|
|
41
30
|
}
|
|
42
31
|
export interface UserDrillParamsProp {
|
|
43
32
|
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: true,
|
|
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 (
|
|
39
|
+
if (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: true,
|
|
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: true,
|
|
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: true,
|
|
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
|
-
}),
|
|
107
|
+
}), _val)), /*#__PURE__*/React.createElement(Tooltip, {
|
|
108
108
|
title: "\u590D\u5236"
|
|
109
109
|
}, /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
110
110
|
text: _val,
|
|
@@ -134,6 +134,7 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
134
134
|
}
|
|
135
135
|
data.push({
|
|
136
136
|
title: value,
|
|
137
|
+
width: 100,
|
|
137
138
|
align: 'center',
|
|
138
139
|
ellipsis: true,
|
|
139
140
|
dataIndex: "field".concat(i),
|
|
@@ -246,8 +247,7 @@ export function getWarningId(searchData, eventData, eventGroupList) {
|
|
|
246
247
|
if (eventGroupList && eventGroupList.length > 0 && eventData) {
|
|
247
248
|
eventGroupList.map(function (item) {
|
|
248
249
|
item.eventList.map(function (_item) {
|
|
249
|
-
var
|
|
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];
|
|
250
|
+
var _name = eventData.series[0].names[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.16-gongyin.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.92-heyh.1",
|
|
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": "df678ee31b769c1730272e1e58403f6e1262d53e",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"react-copy-to-clipboard": "^5.1.0",
|
|
55
55
|
"react-highlight": "^0.15.0"
|