@zgfe/modules-event 1.0.29-zhongyuanE.0 → 1.0.29-zhongyuanE.17
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/renderContent/styles/index.less +0 -19
- package/package.json +3 -3
- package/es/components/eventFilter/index.d.ts +0 -5
- package/es/components/eventFilter/index.js +0 -312
- package/es/components/eventFilter/setCascade.d.ts +0 -3
- package/es/components/eventFilter/setCascade.js +0 -286
- package/es/components/eventFilter/types.d.ts +0 -21
- package/es/components/eventFilter/types.js +0 -1
- package/es/components/index.d.ts +0 -4
- package/es/components/index.js +0 -4
- package/es/components/renderContent/index.d.ts +0 -5
- package/es/components/renderContent/index.js +0 -46
- package/es/components/renderContent/types.d.ts +0 -8
- package/es/components/renderContent/types.js +0 -1
- package/es/components/searchPanel/index.d.ts +0 -5
- package/es/components/searchPanel/index.js +0 -131
- package/es/components/searchPanel/styles/index.less +0 -22
- package/es/components/searchPanel/types.d.ts +0 -28
- package/es/components/searchPanel/types.js +0 -1
- package/es/components/table/index.d.ts +0 -6
- package/es/components/table/index.js +0 -319
- package/es/components/table/styles/index.css +0 -236
- package/es/components/table/styles/index.less +0 -249
- package/es/components/table/types.d.ts +0 -10
- package/es/components/table/types.js +0 -1
- package/es/components/topBar/index.d.ts +0 -10
- package/es/components/topBar/index.js +0 -174
- package/es/components/topBar/styles/index.less +0 -58
- package/es/components/topBar/types.d.ts +0 -8
- package/es/components/topBar/types.js +0 -1
- package/es/constants/apis.d.ts +0 -10
- package/es/constants/apis.js +0 -10
- package/es/constants/chart.d.ts +0 -2
- package/es/constants/chart.js +0 -31
- package/es/constants/color.d.ts +0 -1
- package/es/constants/color.js +0 -1
- package/es/constants/fields.d.ts +0 -251
- package/es/constants/fields.js +0 -177
- package/es/constants/index.d.ts +0 -6
- package/es/constants/index.js +0 -6
- package/es/constants/initData.d.ts +0 -2
- package/es/constants/initData.js +0 -9
- package/es/index.d.ts +0 -6
- package/es/index.js +0 -5
- package/es/modules/chart/demo/data.d.ts +0 -73
- package/es/modules/chart/demo/data.js +0 -484
- package/es/modules/chart/demo/index.d.ts +0 -3
- package/es/modules/chart/demo/index.js +0 -51
- package/es/modules/chart/demo/panel.d.ts +0 -3
- package/es/modules/chart/demo/panel.js +0 -16
- package/es/modules/chart/index.d.ts +0 -4
- package/es/modules/chart/index.js +0 -253
- package/es/modules/chart/types.d.ts +0 -19
- package/es/modules/chart/types.js +0 -1
- package/es/modules/content/index.d.ts +0 -5
- package/es/modules/content/index.js +0 -300
- package/es/modules/content/styles/index.less +0 -19
- package/es/modules/content/types.d.ts +0 -11
- package/es/modules/content/types.js +0 -1
- package/es/modules/content/utils.d.ts +0 -17
- package/es/modules/content/utils.js +0 -107
- package/es/modules/home/demo/create.d.ts +0 -3
- package/es/modules/home/demo/create.js +0 -58
- package/es/modules/home/demo/edit.d.ts +0 -3
- package/es/modules/home/demo/edit.js +0 -73
- package/es/modules/home/demo/index.d.ts +0 -4
- package/es/modules/home/demo/index.js +0 -55
- package/es/modules/home/demo/scene.d.ts +0 -3
- package/es/modules/home/demo/scene.js +0 -89
- package/es/modules/home/demo/styles/index.less +0 -33
- package/es/modules/home/index.d.ts +0 -5
- package/es/modules/home/index.js +0 -184
- package/es/modules/home/styles/index.less +0 -49
- package/es/modules/home/types.d.ts +0 -34
- package/es/modules/home/types.js +0 -1
- package/es/modules/topPanel/index.d.ts +0 -5
- package/es/modules/topPanel/index.js +0 -246
- package/es/modules/topPanel/styles/index.less +0 -50
- package/es/modules/topPanel/types.d.ts +0 -46
- package/es/modules/topPanel/types.js +0 -1
- package/es/style/theme.d.ts +0 -15
- package/es/style/theme.js +0 -14
- package/es/types.d.ts +0 -86
- package/es/types.js +0 -6
- package/es/utils/ajaxConfig.d.ts +0 -8
- package/es/utils/ajaxConfig.js +0 -40
- package/es/utils/base64.d.ts +0 -23
- package/es/utils/base64.js +0 -125
- package/es/utils/formData.d.ts +0 -20
- package/es/utils/formData.js +0 -406
- package/es/utils/util.d.ts +0 -32
- package/es/utils/util.js +0 -139
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { SearchValue, UserDrillParamsProp } from '../../types';
|
|
2
|
-
export declare namespace EventProps {
|
|
3
|
-
interface Props {
|
|
4
|
-
defaultValue?: Value;
|
|
5
|
-
panelDisabled?: boolean;
|
|
6
|
-
includeToday?: boolean;
|
|
7
|
-
afterEditTarget?: (type: string, value?: any) => void;
|
|
8
|
-
onUserDrill: (data: UserDrillParamsProp, searchData: SearchValue) => void;
|
|
9
|
-
onLossWarning?: (id: number) => void;
|
|
10
|
-
showWarning?: boolean;
|
|
11
|
-
enableGenerateReport?: boolean;
|
|
12
|
-
onChange: (data: Value | undefined) => void;
|
|
13
|
-
}
|
|
14
|
-
interface Value {
|
|
15
|
-
panelId?: number;
|
|
16
|
-
panelType?: 'edit' | 'add';
|
|
17
|
-
source?: string;
|
|
18
|
-
name?: string;
|
|
19
|
-
id?: number;
|
|
20
|
-
data?: SearchValue;
|
|
21
|
-
chosen_data?: string[];
|
|
22
|
-
[props: string]: any;
|
|
23
|
-
}
|
|
24
|
-
interface ColumnsDataType {
|
|
25
|
-
color: string;
|
|
26
|
-
eventName?: string;
|
|
27
|
-
id: number;
|
|
28
|
-
dimension?: string;
|
|
29
|
-
name: string;
|
|
30
|
-
nameGroup: string;
|
|
31
|
-
userGroup: string;
|
|
32
|
-
[x: string]: string | number | undefined;
|
|
33
|
-
}
|
|
34
|
-
}
|
package/es/modules/home/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,246 +0,0 @@
|
|
|
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
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
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
|
-
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
|
-
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; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
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
|
-
import EventFilter from '../../components/eventFilter';
|
|
17
|
-
import './styles/index.less';
|
|
18
|
-
import _ from 'lodash';
|
|
19
|
-
import { EventContext } from '../../types';
|
|
20
|
-
var classPrefix = 'modules-event-top-panel';
|
|
21
|
-
var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
22
|
-
var _useContext = useContext(EventContext),
|
|
23
|
-
currentApp = _useContext.currentApp;
|
|
24
|
-
var value = props.value,
|
|
25
|
-
setIsCity = props.setIsCity,
|
|
26
|
-
setEnableSelectChart = props.setEnableSelectChart,
|
|
27
|
-
subDisplay = props.subDisplay,
|
|
28
|
-
loading = props.loading;
|
|
29
|
-
var _useState = useState(false),
|
|
30
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
-
marginStyle = _useState2[0],
|
|
32
|
-
setmarginStyle = _useState2[1];
|
|
33
|
-
var _useState3 = useState('user'),
|
|
34
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
35
|
-
analysisType = _useState4[0],
|
|
36
|
-
setAnalysisType = _useState4[1];
|
|
37
|
-
var _useState5 = useState(false),
|
|
38
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
39
|
-
inited = _useState6[0],
|
|
40
|
-
setInited = _useState6[1];
|
|
41
|
-
var _useSubject = useSubject(),
|
|
42
|
-
subjectList = _useSubject.subjectList,
|
|
43
|
-
subjectLoading = _useSubject.loading;
|
|
44
|
-
var countChange = function countChange(count) {
|
|
45
|
-
setmarginStyle(count > 0 ? true : false);
|
|
46
|
-
};
|
|
47
|
-
var _Form$useForm = Form.useForm(),
|
|
48
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
49
|
-
form = _Form$useForm2[0];
|
|
50
|
-
var userGroup = value.userGroup;
|
|
51
|
-
function onSearch(data) {
|
|
52
|
-
var _data$filterCondition, _data$filterCondition2, _data$filterCondition3;
|
|
53
|
-
var searchData = _objectSpread(_objectSpread({
|
|
54
|
-
analysisSubject: data.analysisSubject ? {
|
|
55
|
-
subjectId: data.analysisSubject.id || data.analysisSubject.subjectId,
|
|
56
|
-
subjectName: data.analysisSubject.subjectName,
|
|
57
|
-
subjectAlias: data.analysisSubject.subjectAlias,
|
|
58
|
-
unit: data.analysisSubject.unit
|
|
59
|
-
} : undefined
|
|
60
|
-
}, _.isArray(data.filterConditions) ? {} : data.filterConditions), {}, {
|
|
61
|
-
eventIds: _.isArray(data.filterConditions) ? data.filterConditions : undefined,
|
|
62
|
-
eventGroupId: (_data$filterCondition = data.filterConditions) === null || _data$filterCondition === void 0 ? void 0 : _data$filterCondition.eventGroupId,
|
|
63
|
-
userGroup: data.userGroup || [0],
|
|
64
|
-
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
|
|
65
|
-
});
|
|
66
|
-
props.onChange(searchData, true);
|
|
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
|
-
});
|
|
83
|
-
var resetting = function resetting() {
|
|
84
|
-
form.resetFields();
|
|
85
|
-
form.setFieldsValue({
|
|
86
|
-
userGroup: [0],
|
|
87
|
-
filterConditions: null,
|
|
88
|
-
analysisSubject: null
|
|
89
|
-
});
|
|
90
|
-
props.onChange({
|
|
91
|
-
userGroup: [0],
|
|
92
|
-
id: undefined,
|
|
93
|
-
name: undefined,
|
|
94
|
-
filters: undefined,
|
|
95
|
-
dimension: undefined,
|
|
96
|
-
analysisAttr: undefined,
|
|
97
|
-
chartType: 'line'
|
|
98
|
-
}, true);
|
|
99
|
-
};
|
|
100
|
-
useEffect(function () {
|
|
101
|
-
if (!value) {
|
|
102
|
-
setInited(true);
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
setInited(false);
|
|
106
|
-
if (value.analysisSubject) {
|
|
107
|
-
setAnalysisType('eventProp');
|
|
108
|
-
props.onChangeSubjectType('eventProp');
|
|
109
|
-
} else {
|
|
110
|
-
setAnalysisType('user');
|
|
111
|
-
props.onChangeSubjectType('user');
|
|
112
|
-
}
|
|
113
|
-
setInited(true);
|
|
114
|
-
}, []);
|
|
115
|
-
if (!inited) return null;
|
|
116
|
-
return /*#__PURE__*/React.createElement(Form, {
|
|
117
|
-
form: form,
|
|
118
|
-
component: "div",
|
|
119
|
-
colon: false,
|
|
120
|
-
layout: "vertical",
|
|
121
|
-
className: "".concat(classPrefix, "-form"),
|
|
122
|
-
initialValues: {
|
|
123
|
-
userGroup: userGroup ? userGroup : [0],
|
|
124
|
-
filterConditions: (value === null || value === void 0 ? void 0 : value.eventIds) || {
|
|
125
|
-
id: value === null || value === void 0 ? void 0 : value.id,
|
|
126
|
-
name: value === null || value === void 0 ? void 0 : value.name,
|
|
127
|
-
dimension: value === null || value === void 0 ? void 0 : value.dimension,
|
|
128
|
-
filters: value === null || value === void 0 ? void 0 : value.filters,
|
|
129
|
-
eventGroupId: value === null || value === void 0 ? void 0 : value.eventGroupId
|
|
130
|
-
},
|
|
131
|
-
analysisSubject: value === null || value === void 0 ? void 0 : value.analysisSubject
|
|
132
|
-
},
|
|
133
|
-
scrollToFirstError: true,
|
|
134
|
-
onFinish: onSearch
|
|
135
|
-
}, !subDisplay ? null : /*#__PURE__*/React.createElement(Form.Item, {
|
|
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
|
-
}))),
|
|
147
|
-
className: "".concat(classPrefix, "-form-event hoverable-form-item")
|
|
148
|
-
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
149
|
-
className: "".concat(classPrefix, "-form-event-select"),
|
|
150
|
-
options: [{
|
|
151
|
-
label: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体' : '用户',
|
|
152
|
-
value: 'user'
|
|
153
|
-
}, {
|
|
154
|
-
label: '事件属性',
|
|
155
|
-
value: 'eventProp'
|
|
156
|
-
}],
|
|
157
|
-
overlayWidth: 208,
|
|
158
|
-
keyField: "value",
|
|
159
|
-
defaultValue: {
|
|
160
|
-
value: analysisType
|
|
161
|
-
},
|
|
162
|
-
onChange: function onChange(val) {
|
|
163
|
-
props.onChangeSubjectType(val.value);
|
|
164
|
-
setAnalysisType(val.value);
|
|
165
|
-
setEnableSelectChart && setEnableSelectChart(false);
|
|
166
|
-
setIsCity && setIsCity(false);
|
|
167
|
-
resetting();
|
|
168
|
-
}
|
|
169
|
-
})), analysisType === 'user' ? /*#__PURE__*/React.createElement(Form.Item, {
|
|
170
|
-
label: "",
|
|
171
|
-
name: "userGroup",
|
|
172
|
-
className: "hoverable-form-item"
|
|
173
|
-
}, /*#__PURE__*/React.createElement(BizUserGroupHeader, {
|
|
174
|
-
max: 3,
|
|
175
|
-
enableTags: true
|
|
176
|
-
})) : /*#__PURE__*/React.createElement(Form.Item, {
|
|
177
|
-
label: "\u53E3\u5F84\u540D\u79F0",
|
|
178
|
-
name: "analysisSubject",
|
|
179
|
-
className: "".concat(classPrefix, "-form-event hoverable-form-item"),
|
|
180
|
-
rules: [{
|
|
181
|
-
validator: function validator(_rule, value) {
|
|
182
|
-
if (value && (value.id || value.subjectId)) {
|
|
183
|
-
return Promise.resolve();
|
|
184
|
-
} else {
|
|
185
|
-
return Promise.reject('请选择口径名称');
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}]
|
|
189
|
-
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
190
|
-
className: "".concat(classPrefix, "-form-event-select"),
|
|
191
|
-
options: subjectList,
|
|
192
|
-
aliasField: "subjectAlias",
|
|
193
|
-
labelField: "subjectName",
|
|
194
|
-
keyField: "id"
|
|
195
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
196
|
-
ref: collapseRef
|
|
197
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
198
|
-
label: "\u4E8B\u4EF6",
|
|
199
|
-
name: "filterConditions",
|
|
200
|
-
validateStatus: "success",
|
|
201
|
-
className: "".concat(classPrefix, "-form-event event---1"),
|
|
202
|
-
rules: [{
|
|
203
|
-
validator: function validator(_rule, value) {
|
|
204
|
-
var _value$filters, _value$filters$condit;
|
|
205
|
-
if (_.isArray(value)) {
|
|
206
|
-
if (!value.length) {
|
|
207
|
-
return Promise.reject('请选择事件');
|
|
208
|
-
} else {
|
|
209
|
-
return Promise.resolve();
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (!value || !value.id) {
|
|
213
|
-
return Promise.reject('请选择事件');
|
|
214
|
-
}
|
|
215
|
-
var conditionValIsNull = false;
|
|
216
|
-
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) {
|
|
217
|
-
var _item$values;
|
|
218
|
-
if (!/null/.test(item.operator || '') && !((_item$values = item.values) === null || _item$values === void 0 ? void 0 : _item$values.length)) {
|
|
219
|
-
conditionValIsNull = true;
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
if (conditionValIsNull) {
|
|
223
|
-
return Promise.reject('请填写完整的条件');
|
|
224
|
-
}
|
|
225
|
-
return Promise.resolve();
|
|
226
|
-
},
|
|
227
|
-
validateTrigger: 'onBlur'
|
|
228
|
-
}]
|
|
229
|
-
}, /*#__PURE__*/React.createElement(EventFilter, {
|
|
230
|
-
countChange: countChange,
|
|
231
|
-
setIsCity: setIsCity,
|
|
232
|
-
setEnableSelectChart: setEnableSelectChart,
|
|
233
|
-
analysisType: analysisType
|
|
234
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
235
|
-
className: "".concat(classPrefix, "-form-botton-box ").concat(marginStyle ? 'margin-style' : '')
|
|
236
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
237
|
-
onClick: resetting
|
|
238
|
-
}, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
|
|
239
|
-
loading: subjectLoading || loading,
|
|
240
|
-
type: "primary",
|
|
241
|
-
onClick: function onClick() {
|
|
242
|
-
form.submit();
|
|
243
|
-
}
|
|
244
|
-
}, "\u67E5\u8BE2"))));
|
|
245
|
-
});
|
|
246
|
-
export default TopPanel;
|
|
@@ -1,50 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { AttrConditionTypes } from '@zgfe/business-lib';
|
|
2
|
-
import { bizAttributeSelectorValueProp, SearchValue, EventChartTypes } from '../../types';
|
|
3
|
-
interface filterConditions {
|
|
4
|
-
id?: number;
|
|
5
|
-
eventGroupId?: number;
|
|
6
|
-
name?: string;
|
|
7
|
-
filters?: AttrConditionTypes.GroupValue;
|
|
8
|
-
dimension?: bizAttributeSelectorValueProp;
|
|
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
|
-
export interface FormDataProps {
|
|
24
|
-
userGroup?: {
|
|
25
|
-
id: number;
|
|
26
|
-
}[] | any[];
|
|
27
|
-
filterConditions?: filterConditions;
|
|
28
|
-
analysisSubject?: analysisSubject | null;
|
|
29
|
-
}
|
|
30
|
-
export interface FormHandelDataProps extends filterConditions {
|
|
31
|
-
userGroup?: any[];
|
|
32
|
-
chartType?: EventChartTypes | undefined;
|
|
33
|
-
analysisSubject?: analysisSubject;
|
|
34
|
-
eventIds?: number[];
|
|
35
|
-
}
|
|
36
|
-
export interface TopPanelProps {
|
|
37
|
-
value?: SearchValue;
|
|
38
|
-
onChange: (data: SearchValue, flag: boolean) => void;
|
|
39
|
-
loading?: boolean;
|
|
40
|
-
subDisplay?: boolean;
|
|
41
|
-
setIsCity?: Function;
|
|
42
|
-
setEnableSelectChart?: Function;
|
|
43
|
-
analysisSubjectType?: analysisSubjectType;
|
|
44
|
-
onChangeSubjectType: (type: string) => void;
|
|
45
|
-
}
|
|
46
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/style/theme.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
'primary-color': string;
|
|
3
|
-
'border-color-base': string;
|
|
4
|
-
'background-color-base': string;
|
|
5
|
-
'text-color': string;
|
|
6
|
-
'text-color-secondary': string;
|
|
7
|
-
'tooltip-bg': string;
|
|
8
|
-
'error-color': string;
|
|
9
|
-
'shadow-color': string;
|
|
10
|
-
'box-shadow-base': string;
|
|
11
|
-
'btn-text-hover-bg': string;
|
|
12
|
-
'warning-color': string;
|
|
13
|
-
'border-color-split': string;
|
|
14
|
-
};
|
|
15
|
-
export default _default;
|
package/es/style/theme.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
'primary-color': '#165dff',
|
|
3
|
-
'border-color-base': '#ECEDF0',
|
|
4
|
-
'background-color-base': '#fafafb',
|
|
5
|
-
'text-color': '#021429',
|
|
6
|
-
'text-color-secondary': '#5f6085',
|
|
7
|
-
'tooltip-bg': '#242541',
|
|
8
|
-
'error-color': '#fb5547',
|
|
9
|
-
'shadow-color': 'rgba(0, 0, 0, 0.1)',
|
|
10
|
-
'box-shadow-base': '0px 4px 10px rgba(0, 0, 0, 0.1)',
|
|
11
|
-
'btn-text-hover-bg': '#cacdd4',
|
|
12
|
-
'warning-color': '#FD9F41',
|
|
13
|
-
'border-color-split': '#E8EFFF'
|
|
14
|
-
};
|
package/es/types.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { AttrConditionTypes } from '@zgfe/business-lib';
|
|
2
|
-
import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
export interface bizAttributeSelectorValueProp {
|
|
5
|
-
propCategory?: string;
|
|
6
|
-
category?: string;
|
|
7
|
-
value?: number | string;
|
|
8
|
-
id?: number;
|
|
9
|
-
key?: number | string;
|
|
10
|
-
encryptionType?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface AnalysisSubject {
|
|
13
|
-
subjectId?: number;
|
|
14
|
-
id?: number;
|
|
15
|
-
name?: string;
|
|
16
|
-
unit?: string;
|
|
17
|
-
subjectAlias?: string;
|
|
18
|
-
subjectName?: string;
|
|
19
|
-
analysisSubjectType?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface eventProps {
|
|
22
|
-
id?: number;
|
|
23
|
-
eventGroupId?: number;
|
|
24
|
-
name?: string;
|
|
25
|
-
filters?: AttrConditionTypes.GroupValue;
|
|
26
|
-
dimension?: bizAttributeSelectorValueProp;
|
|
27
|
-
}
|
|
28
|
-
export interface SearchValue {
|
|
29
|
-
id?: number;
|
|
30
|
-
eventIds?: number[];
|
|
31
|
-
eventGroupId?: number;
|
|
32
|
-
name?: string;
|
|
33
|
-
platform?: number;
|
|
34
|
-
chartType?: EventChartTypes;
|
|
35
|
-
userGroup?: number[];
|
|
36
|
-
analysisIndex?: string;
|
|
37
|
-
analysisAttr?: string;
|
|
38
|
-
time?: DatePickerTypes.Value;
|
|
39
|
-
dimension?: bizAttributeSelectorValueProp;
|
|
40
|
-
filters?: AttrConditionTypes.GroupValue;
|
|
41
|
-
analysisSubject?: AnalysisSubject;
|
|
42
|
-
}
|
|
43
|
-
export interface UserDrillParamsProp {
|
|
44
|
-
appId: number;
|
|
45
|
-
platform: number;
|
|
46
|
-
count: number;
|
|
47
|
-
source: string;
|
|
48
|
-
url: string;
|
|
49
|
-
params?: Record<string, any>;
|
|
50
|
-
module?: string;
|
|
51
|
-
}
|
|
52
|
-
export type EventChartTypes = 'line' | 'bar' | 'pie' | 'map';
|
|
53
|
-
export interface ChartItemProp {
|
|
54
|
-
label?: string;
|
|
55
|
-
value: EventChartTypes;
|
|
56
|
-
icon?: ReactNode;
|
|
57
|
-
disabled?: boolean;
|
|
58
|
-
}
|
|
59
|
-
export interface ResponseDataProps {
|
|
60
|
-
xAxis: string[];
|
|
61
|
-
series: SeriesProps[];
|
|
62
|
-
tongbi?: number[];
|
|
63
|
-
huanbi?: number[];
|
|
64
|
-
total?: number[];
|
|
65
|
-
yesterDay?: string[];
|
|
66
|
-
sum?: number;
|
|
67
|
-
yValues: number[];
|
|
68
|
-
userGroupEventTimeSum: [{
|
|
69
|
-
[k: string]: number[];
|
|
70
|
-
}];
|
|
71
|
-
eventPvTitle: string;
|
|
72
|
-
}
|
|
73
|
-
export interface SeriesProps {
|
|
74
|
-
names?: string[];
|
|
75
|
-
values: number[];
|
|
76
|
-
originalNames?: string[];
|
|
77
|
-
index?: string;
|
|
78
|
-
duration?: TableChildrenProps[];
|
|
79
|
-
diyTarget?: boolean;
|
|
80
|
-
attrSum?: number;
|
|
81
|
-
}
|
|
82
|
-
export interface TableChildrenProps {
|
|
83
|
-
name: string;
|
|
84
|
-
values: number[];
|
|
85
|
-
}
|
|
86
|
-
export declare const EventContext: import("react").Context<any>;
|
package/es/types.js
DELETED
package/es/utils/ajaxConfig.d.ts
DELETED
package/es/utils/ajaxConfig.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import _ from 'lodash';
|
|
2
|
-
function setOptionWapper(url, options) {
|
|
3
|
-
var reqOption = _.cloneDeep(options);
|
|
4
|
-
if (/^\/v1|\.jsp$/.test(url)) {
|
|
5
|
-
if (reqOption.headers && reqOption.headers['Content-Type'] === 'application/x-www-form-urlencoded') {
|
|
6
|
-
return reqOption;
|
|
7
|
-
}
|
|
8
|
-
reqOption.headers = {
|
|
9
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
10
|
-
};
|
|
11
|
-
var transformRequest = function transformRequest(param) {
|
|
12
|
-
var arr = [];
|
|
13
|
-
for (var key in param) {
|
|
14
|
-
arr.push("".concat(key, "=").concat(encodeURIComponent(param[key])));
|
|
15
|
-
}
|
|
16
|
-
return arr.join('&');
|
|
17
|
-
};
|
|
18
|
-
reqOption.data = transformRequest(options.data);
|
|
19
|
-
}
|
|
20
|
-
return reqOption;
|
|
21
|
-
}
|
|
22
|
-
export var requestConfig = {
|
|
23
|
-
request: {
|
|
24
|
-
optionsWrapper: function optionsWrapper(url, options) {
|
|
25
|
-
var newUrl = url;
|
|
26
|
-
var reqOption = options;
|
|
27
|
-
var ajaxUrlReg = '/analysis/api/common/proxy';
|
|
28
|
-
if (/^\/v1|\.jsp$/.test(url)) {
|
|
29
|
-
if (ajaxUrlReg && !url.includes(ajaxUrlReg)) {
|
|
30
|
-
newUrl = ajaxUrlReg + url;
|
|
31
|
-
reqOption = setOptionWapper(url, options);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
url: newUrl,
|
|
36
|
-
options: reqOption
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
package/es/utils/base64.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
_keyStr: string;
|
|
3
|
-
_utf8_encode: (string: string) => string;
|
|
4
|
-
_utf8_decode: (utftext: string) => string;
|
|
5
|
-
encode: (input: string, type?: any) => string;
|
|
6
|
-
decode: (input: string) => string;
|
|
7
|
-
_$: string[];
|
|
8
|
-
pw: string;
|
|
9
|
-
gString: (O6b8: {
|
|
10
|
-
[x: string]: (arg0: number) => {
|
|
11
|
-
(): any;
|
|
12
|
-
new (): any;
|
|
13
|
-
[x: string]: () => any;
|
|
14
|
-
};
|
|
15
|
-
}[], O492: {
|
|
16
|
-
[x: string]: (arg0: number) => {
|
|
17
|
-
(): any;
|
|
18
|
-
new (): any;
|
|
19
|
-
[x: string]: () => any;
|
|
20
|
-
};
|
|
21
|
-
}[]) => string;
|
|
22
|
-
};
|
|
23
|
-
export default _default;
|