@zgfe/modules-interval 1.0.8 → 1.0.10-beiming.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -33
- package/dist/esm/components/common/styles/index.less +40 -40
- package/dist/esm/components/eventFilter/index.js +17 -21
- package/dist/esm/components/eventFilter/styles/index.less +39 -39
- package/dist/esm/components/eventFilter/types.d.ts +4 -3
- package/dist/esm/components/renderContent/styles/index.less +36 -33
- package/dist/esm/components/searchPanel/index.js +5 -11
- package/dist/esm/components/searchPanel/styles/index.less +64 -64
- package/dist/esm/components/table/index.js +5 -4
- package/dist/esm/components/table/styles/index.less +138 -138
- package/dist/esm/components/topBar/index.js +4 -4
- package/dist/esm/components/topBar/styles/index.less +50 -50
- package/dist/esm/components/topBar/types.d.ts +3 -2
- package/dist/esm/constants/apis.d.ts +1 -5
- package/dist/esm/constants/apis.js +15 -4
- package/dist/esm/constants/fields.js +4 -4
- package/dist/esm/modules/chart/index.js +4 -3
- package/dist/esm/modules/chart/index.less +58 -58
- package/dist/esm/modules/chart/intervalChart.js +2 -2
- package/dist/esm/modules/chart/types.d.ts +1 -0
- package/dist/esm/modules/content/index.js +28 -44
- package/dist/esm/modules/content/styles/index.less +7 -7
- package/dist/esm/modules/content/types.d.ts +4 -3
- package/dist/esm/modules/content/utils.d.ts +2 -0
- package/dist/esm/modules/content/utils.js +16 -14
- package/dist/esm/modules/home/demo/edit.js +1 -1
- package/dist/esm/modules/home/demo/index.js +7 -15
- package/dist/esm/modules/home/demo/scene.js +1 -1
- package/dist/esm/modules/home/demo/styles/index.less +33 -33
- package/dist/esm/modules/home/index.d.ts +2 -2
- package/dist/esm/modules/home/index.js +59 -46
- package/dist/esm/modules/home/styles/index.less +66 -60
- package/dist/esm/modules/home/types.d.ts +7 -4
- package/dist/esm/modules/home/types.js +2 -2
- package/dist/esm/modules/topPanel/index.js +246 -127
- package/dist/esm/modules/topPanel/styles/index.less +213 -186
- package/dist/esm/modules/topPanel/types.d.ts +6 -9
- package/dist/esm/modules/topPanel/types.js +5 -1
- package/dist/esm/style/image/empty.png +0 -0
- package/dist/esm/style/image/ring.svg +9 -9
- package/dist/esm/style/index.less +67 -53
- package/dist/esm/types.d.ts +25 -28
- package/dist/esm/types.js +7 -7
- package/dist/esm/utils/ajaxConfig.js +5 -5
- package/dist/esm/utils/formData.d.ts +7 -2
- package/dist/esm/utils/formData.js +91 -39
- package/dist/esm/utils/util.js +28 -28
- package/package.json +9 -4
- package/dist/esm/assets/business/demo.css +0 -539
- package/dist/esm/assets/business/demo_index.html +0 -3316
- package/dist/esm/assets/business/iconfont.css +0 -559
- package/dist/esm/assets/business/iconfont.js +0 -43
- package/dist/esm/assets/business/iconfont.json +0 -961
- package/dist/esm/assets/business/iconfont.ttf +0 -0
- package/dist/esm/assets/business/iconfont.woff +0 -0
- package/dist/esm/assets/business/iconfont.woff2 +0 -0
- package/dist/esm/assets/icons/demo.css +0 -539
- package/dist/esm/assets/icons/demo_index.html +0 -9618
- package/dist/esm/assets/icons/iconfont.css +0 -1655
- package/dist/esm/assets/icons/iconfont.js +0 -43
- package/dist/esm/assets/icons/iconfont.json +0 -2879
- package/dist/esm/assets/icons/iconfont.ttf +0 -0
- package/dist/esm/assets/icons/iconfont.woff +0 -0
- package/dist/esm/assets/icons/iconfont.woff2 +0 -0
|
@@ -1,60 +1,66 @@
|
|
|
1
|
-
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
-
.ant-card-body {
|
|
3
|
-
padding: 0;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.interval-module-container {
|
|
7
|
-
width: 100%;
|
|
8
|
-
min-width: 1000px;
|
|
9
|
-
height: 100%;
|
|
10
|
-
background: #fafafb;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
.ant-card-body {
|
|
3
|
+
padding: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.interval-module-container {
|
|
7
|
+
width: 100%;
|
|
8
|
+
min-width: 1000px;
|
|
9
|
+
height: 100%;
|
|
10
|
+
background: #fafafb;
|
|
11
|
+
&-loading {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
.interval-layout {
|
|
18
|
+
.biz-layout-collapse-container {
|
|
19
|
+
height: 24px;
|
|
20
|
+
}
|
|
21
|
+
.biz-layout-collapse-handle {
|
|
22
|
+
height: 24px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
&-header-title {
|
|
26
|
+
height: 48px;
|
|
27
|
+
padding: 0px 24px;
|
|
28
|
+
color: #021429;
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
line-height: 48px;
|
|
32
|
+
background: #fff;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.biz-layout-top {
|
|
36
|
+
margin-top: 2px;
|
|
37
|
+
padding-top: 0;
|
|
38
|
+
|
|
39
|
+
.biz-user-group-header {
|
|
40
|
+
.ant-space-item {
|
|
41
|
+
color: #5f6085;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ant-spin-container {
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: auto;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.biz-select-option:not(.biz-select-option-multiple),
|
|
52
|
+
.biz-attr-select-option {
|
|
53
|
+
&.active {
|
|
54
|
+
background: @primary-color !important;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// 设置下拉框最大高度
|
|
59
|
+
.biz-select-overlay {
|
|
60
|
+
max-height: 300px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.biz-layout-panel-content {
|
|
64
|
+
height: auto;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SearchValue,
|
|
3
|
-
export declare namespace
|
|
2
|
+
import { SearchValue, IntervalDrillParams } from '../../types';
|
|
3
|
+
export declare namespace IntervalProps {
|
|
4
4
|
interface Props {
|
|
5
5
|
/**
|
|
6
6
|
* @description 默认查询值
|
|
7
7
|
*/
|
|
8
8
|
defaultValue?: Value;
|
|
9
|
-
urlParam?: SearchValue;
|
|
10
9
|
/**
|
|
11
10
|
* @description 看板是否可禁用, true禁用
|
|
12
11
|
*/
|
|
@@ -23,7 +22,9 @@ export declare namespace EventProps {
|
|
|
23
22
|
/**
|
|
24
23
|
* 用户钻取
|
|
25
24
|
*/
|
|
26
|
-
onUserDrill: (data:
|
|
25
|
+
onUserDrill: (data: IntervalDrillParams, isSubject: boolean) => void;
|
|
26
|
+
onJumpWarning: (data: Record<string, any>, searchData: SearchValue) => void;
|
|
27
|
+
onChange?: (data: SearchValue) => void;
|
|
27
28
|
}
|
|
28
29
|
interface Value {
|
|
29
30
|
/**
|
|
@@ -69,6 +70,8 @@ export declare namespace EventProps {
|
|
|
69
70
|
min?: number;
|
|
70
71
|
perValue?: number;
|
|
71
72
|
peopleNum?: number;
|
|
73
|
+
names?: string[];
|
|
74
|
+
total?: number;
|
|
72
75
|
children?: ColumnsDataType[];
|
|
73
76
|
}
|
|
74
77
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export var
|
|
2
|
-
(function (
|
|
1
|
+
export var IntervalProps;
|
|
2
|
+
(function (_IntervalProps) {})(IntervalProps || (IntervalProps = {}));
|
|
@@ -10,74 +10,68 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useState } from 'react';
|
|
14
|
-
import { Form, Button } from 'antd';
|
|
15
|
-
import { BizAttributeSelector, BizUserGroupHeader } from '@zgfe/business-lib';
|
|
13
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
14
|
+
import { Form, Button, Radio, Space, Switch } from 'antd';
|
|
15
|
+
import { BizAttributeSelector, BizSelect, BizUserGroupHeader, useSubject } from '@zgfe/business-lib';
|
|
16
16
|
import EventFilter from "../../components/eventFilter";
|
|
17
17
|
import "./styles/index.less";
|
|
18
|
+
import { AnalysisMode } from "./types";
|
|
19
|
+
import { IntervalContext } from "../../types";
|
|
18
20
|
var classPrefix = 'top-panel-interval';
|
|
19
21
|
var TopPanel = function TopPanel(props) {
|
|
20
|
-
var _props$
|
|
22
|
+
var _props$defaultValue, _props$defaultValue2, _props$defaultValue3, _defaultValue$associa, _defaultValue$associa2, _finalSearchData$asso, _finalSearchData$asso2, _defaultValue$associa3, _finalSearchData$asso3, _defaultValue$associa4, _finalSearchData$asso4, _defaultValue$associa5, _finalSearchData$asso5, _defaultValue$associa6, _finalSearchData$asso6, _defaultValue$associa7, _finalSearchData$asso7, _defaultValue$associa8, _finalSearchData$asso8, _defaultValue$associa9, _finalSearchData$asso9, _defaultValue$associa10, _finalSearchData$asso10, _defaultValue$dimensi, _finalSearchData$dime, _defaultValue$dimensi2, _finalSearchData$dime2, _defaultValue$dimensi3, _finalSearchData$dime3, _defaultValue$dimensi4, _finalSearchData$dime4;
|
|
21
23
|
var defaultValue = props.defaultValue,
|
|
22
24
|
loading = props.loading,
|
|
23
25
|
collapseRef = props.collapseRef,
|
|
24
|
-
finalSearchData = props.finalSearchData
|
|
25
|
-
fetchRequest = props.fetchRequest;
|
|
26
|
+
finalSearchData = props.finalSearchData;
|
|
26
27
|
var _Form$useForm = Form.useForm(),
|
|
27
28
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
28
29
|
form = _Form$useForm2[0];
|
|
29
|
-
var _useState = useState(
|
|
30
|
+
var _useState = useState(),
|
|
30
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var _useState3 = useState(
|
|
32
|
+
startEvent = _useState2[0],
|
|
33
|
+
setStartEvent = _useState2[1];
|
|
34
|
+
var _useState3 = useState(),
|
|
34
35
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
endEvent = _useState4[0],
|
|
37
|
+
setEndEvent = _useState4[1];
|
|
37
38
|
// 关联属性
|
|
38
39
|
var _useState5 = useState(false),
|
|
39
40
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
40
41
|
relevancy = _useState6[0],
|
|
41
42
|
setRelevancy = _useState6[1];
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
var _useSubject = useSubject(),
|
|
44
|
+
subjectList = _useSubject.subjectList,
|
|
45
|
+
subjectLoading = _useSubject.loading;
|
|
46
|
+
var _useContext = useContext(IntervalContext),
|
|
47
|
+
subjectEnable = _useContext.subjectEnable;
|
|
48
|
+
var _ref = defaultValue || {},
|
|
47
49
|
userGroup = _ref.userGroup;
|
|
48
|
-
|
|
50
|
+
var _useState7 = useState('user'),
|
|
51
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
52
|
+
analysisType = _useState8[0],
|
|
53
|
+
setAnalysisType = _useState8[1];
|
|
49
54
|
var _useState9 = useState(),
|
|
50
55
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (allData.end.id !== null) {
|
|
69
|
-
_data = allData.end;
|
|
70
|
-
setEndId(allData.end.id);
|
|
71
|
-
} else {
|
|
72
|
-
setRelevancyFl(true);
|
|
73
|
-
}
|
|
56
|
+
currentSubject = _useState10[0],
|
|
57
|
+
setCurrentSubject = _useState10[1];
|
|
58
|
+
var _useState11 = useState(false),
|
|
59
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
60
|
+
inited = _useState12[0],
|
|
61
|
+
setInited = _useState12[1];
|
|
62
|
+
var formRef = React.useRef(null);
|
|
63
|
+
function onSearch(values) {
|
|
64
|
+
if (props.onChange) {
|
|
65
|
+
props.onChange(_objectSpread(_objectSpread({}, values), {}, {
|
|
66
|
+
analysisSubject: values.analysisSubject ? {
|
|
67
|
+
subjectId: values.analysisSubject.id,
|
|
68
|
+
subjectName: values.analysisSubject.subjectName,
|
|
69
|
+
subjectAlias: values.analysisSubject.subjectAlias,
|
|
70
|
+
unit: values.analysisSubject.unit
|
|
71
|
+
} : undefined
|
|
72
|
+
}), true);
|
|
74
73
|
}
|
|
75
|
-
|
|
76
|
-
_data.userGroup = allData.userGroup;
|
|
77
|
-
if (_data.userGroup.length <= 0) _data.userGroup = [0];
|
|
78
|
-
}
|
|
79
|
-
props.onChange(allData, (finalSearchData === null || finalSearchData === void 0 ? void 0 : finalSearchData.chartType) === 'boxplot' ? true : false);
|
|
80
|
-
};
|
|
74
|
+
}
|
|
81
75
|
var resetting = function resetting() {
|
|
82
76
|
form.resetFields();
|
|
83
77
|
form.setFieldsValue({
|
|
@@ -90,6 +84,7 @@ var TopPanel = function TopPanel(props) {
|
|
|
90
84
|
associatedNextAttr: undefined
|
|
91
85
|
});
|
|
92
86
|
setRelevancy(false);
|
|
87
|
+
setCurrentSubject(undefined);
|
|
93
88
|
props.onChange({
|
|
94
89
|
userGroup: [0],
|
|
95
90
|
start: undefined,
|
|
@@ -102,55 +97,37 @@ var TopPanel = function TopPanel(props) {
|
|
|
102
97
|
associatedNextAttr: undefined
|
|
103
98
|
}, true);
|
|
104
99
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
props.onChange({
|
|
115
|
-
associatedPreAttr: undefined
|
|
116
|
-
}, true);
|
|
117
|
-
break;
|
|
118
|
-
case 'associatedNextAttr':
|
|
119
|
-
form.setFieldsValue({
|
|
120
|
-
associatedNextAttr: undefined
|
|
121
|
-
});
|
|
122
|
-
props.onChange({
|
|
123
|
-
associatedNextAttr: undefined
|
|
124
|
-
}, true);
|
|
125
|
-
break;
|
|
126
|
-
case 'dimension':
|
|
127
|
-
form.setFieldsValue({
|
|
128
|
-
dimension: undefined
|
|
129
|
-
});
|
|
130
|
-
props.onChange({
|
|
131
|
-
dimension: undefined
|
|
132
|
-
}, true);
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
setBizAttributeSelectorValue(undefined);
|
|
100
|
+
useEffect(function () {
|
|
101
|
+
if (subjectLoading) return;
|
|
102
|
+
if (!defaultValue) {
|
|
103
|
+
setInited(true);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
setInited(false);
|
|
107
|
+
if (defaultValue.analysisSubject) {
|
|
108
|
+
setAnalysisType('eventProp');
|
|
136
109
|
} else {
|
|
137
|
-
|
|
138
|
-
setBizAttributeSelectorValue({
|
|
139
|
-
propCategory: attr.propCategory,
|
|
140
|
-
category: attr.category,
|
|
141
|
-
value: _value,
|
|
142
|
-
key: attr.propCategory === 'eventProp' ? attr.id : attr.propCategory + '-' + _value
|
|
143
|
-
});
|
|
110
|
+
setAnalysisType('user');
|
|
144
111
|
}
|
|
145
|
-
|
|
112
|
+
if (defaultValue.analysisSubject) {
|
|
113
|
+
setCurrentSubject(subjectList.find(function (item) {
|
|
114
|
+
var _defaultValue$analysi;
|
|
115
|
+
return item.id === (defaultValue === null || defaultValue === void 0 ? void 0 : (_defaultValue$analysi = defaultValue.analysisSubject) === null || _defaultValue$analysi === void 0 ? void 0 : _defaultValue$analysi.subjectId);
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
setInited(true);
|
|
119
|
+
}, [subjectLoading]);
|
|
120
|
+
if (!inited) return null;
|
|
146
121
|
return /*#__PURE__*/React.createElement(Form, {
|
|
147
122
|
form: form,
|
|
123
|
+
ref: formRef,
|
|
148
124
|
component: "div",
|
|
149
125
|
colon: false,
|
|
150
126
|
className: "panel-form-interval",
|
|
151
127
|
layout: "vertical",
|
|
152
128
|
initialValues: {
|
|
153
|
-
userGroup: props !== null && props !== void 0 && (_props$
|
|
129
|
+
userGroup: props !== null && props !== void 0 && (_props$defaultValue = props.defaultValue) !== null && _props$defaultValue !== void 0 && _props$defaultValue.userGroup ? props === null || props === void 0 ? void 0 : (_props$defaultValue2 = props.defaultValue) === null || _props$defaultValue2 === void 0 ? void 0 : _props$defaultValue2.userGroup : userGroup ? userGroup : [0],
|
|
130
|
+
analysisSubject: props === null || props === void 0 ? void 0 : (_props$defaultValue3 = props.defaultValue) === null || _props$defaultValue3 === void 0 ? void 0 : _props$defaultValue3.analysisSubject,
|
|
154
131
|
start: _objectSpread(_objectSpread({}, defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.start), {}, {
|
|
155
132
|
relevancy: defaultValue !== null && defaultValue !== void 0 && (_defaultValue$associa = defaultValue.associated_next_attr) !== null && _defaultValue$associa !== void 0 && _defaultValue$associa.event_id && defaultValue !== null && defaultValue !== void 0 && (_defaultValue$associa2 = defaultValue.associated_pre_attr) !== null && _defaultValue$associa2 !== void 0 && _defaultValue$associa2.event_id || finalSearchData !== null && finalSearchData !== void 0 && (_finalSearchData$asso = finalSearchData.associatedNextAttr) !== null && _finalSearchData$asso !== void 0 && _finalSearchData$asso.eventId && finalSearchData !== null && finalSearchData !== void 0 && (_finalSearchData$asso2 = finalSearchData.associatedPreAttr) !== null && _finalSearchData$asso2 !== void 0 && _finalSearchData$asso2.eventId ? true : false
|
|
156
133
|
}),
|
|
@@ -172,11 +149,56 @@ var TopPanel = function TopPanel(props) {
|
|
|
172
149
|
isHidden: (defaultValue === null || defaultValue === void 0 ? void 0 : (_defaultValue$dimensi2 = defaultValue.dimension) === null || _defaultValue$dimensi2 === void 0 ? void 0 : _defaultValue$dimensi2.is_hidden) || (finalSearchData === null || finalSearchData === void 0 ? void 0 : (_finalSearchData$dime2 = finalSearchData.dimension) === null || _finalSearchData$dime2 === void 0 ? void 0 : _finalSearchData$dime2.isHidden),
|
|
173
150
|
propCategory: (defaultValue === null || defaultValue === void 0 ? void 0 : (_defaultValue$dimensi3 = defaultValue.dimension) === null || _defaultValue$dimensi3 === void 0 ? void 0 : _defaultValue$dimensi3.prop_category) || (finalSearchData === null || finalSearchData === void 0 ? void 0 : (_finalSearchData$dime3 = finalSearchData.dimension) === null || _finalSearchData$dime3 === void 0 ? void 0 : _finalSearchData$dime3.propCategory),
|
|
174
151
|
eventId: (defaultValue === null || defaultValue === void 0 ? void 0 : (_defaultValue$dimensi4 = defaultValue.dimension) === null || _defaultValue$dimensi4 === void 0 ? void 0 : _defaultValue$dimensi4.event_id) || (finalSearchData === null || finalSearchData === void 0 ? void 0 : (_finalSearchData$dime4 = finalSearchData.dimension) === null || _finalSearchData$dime4 === void 0 ? void 0 : _finalSearchData$dime4.eventId)
|
|
175
|
-
})
|
|
152
|
+
}),
|
|
153
|
+
analysisModel: (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.analysisModel) || AnalysisMode.common
|
|
176
154
|
},
|
|
177
155
|
scrollToFirstError: true,
|
|
178
|
-
|
|
179
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
156
|
+
onFinish: onSearch
|
|
157
|
+
}, subjectEnable && /*#__PURE__*/React.createElement(Form.Item, {
|
|
158
|
+
label: "\u5206\u6790\u4E3B\u4F53",
|
|
159
|
+
className: "panel-form-interval-item"
|
|
160
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
161
|
+
options: [{
|
|
162
|
+
label: '用户',
|
|
163
|
+
value: 'user'
|
|
164
|
+
}, {
|
|
165
|
+
label: '事件属性',
|
|
166
|
+
value: 'eventProp'
|
|
167
|
+
}],
|
|
168
|
+
keyField: "value",
|
|
169
|
+
defaultValue: {
|
|
170
|
+
value: analysisType
|
|
171
|
+
},
|
|
172
|
+
onChange: function onChange(val) {
|
|
173
|
+
setAnalysisType(val.value);
|
|
174
|
+
resetting();
|
|
175
|
+
}
|
|
176
|
+
})), analysisType === 'eventProp' && /*#__PURE__*/React.createElement(Form.Item, {
|
|
177
|
+
label: "\u4E3B\u4F53\u540D\u79F0",
|
|
178
|
+
name: "analysisSubject",
|
|
179
|
+
className: "panel-form-interval-item",
|
|
180
|
+
rules: [{
|
|
181
|
+
validator: function validator(rule, value) {
|
|
182
|
+
if (!value) {
|
|
183
|
+
return Promise.reject('请选择主体名称');
|
|
184
|
+
}
|
|
185
|
+
return Promise.resolve();
|
|
186
|
+
}
|
|
187
|
+
}]
|
|
188
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
189
|
+
options: subjectList,
|
|
190
|
+
aliasField: "subjectAlias",
|
|
191
|
+
labelField: "subjectName",
|
|
192
|
+
keyField: "id",
|
|
193
|
+
onChange: function onChange(val) {
|
|
194
|
+
var _formRef$current, _formRef$current2, _formRef$current3;
|
|
195
|
+
setCurrentSubject(val);
|
|
196
|
+
setRelevancy(false);
|
|
197
|
+
(_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldValue('start', undefined);
|
|
198
|
+
(_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.setFieldValue('end', undefined);
|
|
199
|
+
(_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : _formRef$current3.setFieldValue('dimension', undefined);
|
|
200
|
+
}
|
|
201
|
+
})), analysisType === 'user' && /*#__PURE__*/React.createElement(Form.Item, {
|
|
180
202
|
label: "",
|
|
181
203
|
name: "userGroup",
|
|
182
204
|
className: "space-item interval-item",
|
|
@@ -191,13 +213,62 @@ var TopPanel = function TopPanel(props) {
|
|
|
191
213
|
className: "collapseRefs"
|
|
192
214
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
193
215
|
label: "\u5F00\u59CB\u4E8B\u4EF6",
|
|
194
|
-
|
|
216
|
+
style: {
|
|
217
|
+
marginBottom: '8px',
|
|
218
|
+
position: 'relative'
|
|
219
|
+
}
|
|
220
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
221
|
+
name: "start",
|
|
222
|
+
validateStatus: "success",
|
|
223
|
+
style: {
|
|
224
|
+
marginBottom: 0
|
|
225
|
+
},
|
|
226
|
+
rules: [{
|
|
227
|
+
validateTrigger: ['onBlur'],
|
|
228
|
+
validator: function validator(rule, value) {
|
|
229
|
+
var _value$filters, _value$filters$condit;
|
|
230
|
+
if (!value || !value.id) {
|
|
231
|
+
return Promise.reject('请选择开始事件');
|
|
232
|
+
}
|
|
233
|
+
var conditionValIsNull = false;
|
|
234
|
+
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) {
|
|
235
|
+
var _item$values;
|
|
236
|
+
if (!/null/.test(item.operator || '') && !((_item$values = item.values) !== null && _item$values !== void 0 && _item$values.length)) {
|
|
237
|
+
conditionValIsNull = true;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
if (conditionValIsNull) {
|
|
241
|
+
return Promise.reject('请填写完整的条件');
|
|
242
|
+
}
|
|
243
|
+
return Promise.resolve();
|
|
244
|
+
}
|
|
245
|
+
}]
|
|
195
246
|
}, /*#__PURE__*/React.createElement(EventFilter, {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
247
|
+
subject: currentSubject,
|
|
248
|
+
key: "".concat(currentSubject === null || currentSubject === void 0 ? void 0 : currentSubject.subjectName, "-start"),
|
|
249
|
+
analysisType: analysisType,
|
|
250
|
+
onChange: function onChange(evt) {
|
|
251
|
+
var _formRef$current4;
|
|
252
|
+
setStartEvent(evt);
|
|
253
|
+
(_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 ? void 0 : _formRef$current4.setFieldValue('dimension', undefined);
|
|
254
|
+
}
|
|
255
|
+
})), /*#__PURE__*/React.createElement(Space, {
|
|
256
|
+
align: "baseline",
|
|
257
|
+
style: {
|
|
258
|
+
position: 'absolute',
|
|
259
|
+
top: '9px',
|
|
260
|
+
left: '295px'
|
|
261
|
+
}
|
|
262
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
263
|
+
checked: relevancy,
|
|
264
|
+
onChange: setRelevancy
|
|
265
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
266
|
+
className: "switch-title"
|
|
267
|
+
}, "\u8BBE\u7F6E\u5173\u8054\u5C5E\u6027"))), relevancy && /*#__PURE__*/React.createElement(Form.Item, {
|
|
199
268
|
className: "associated"
|
|
200
|
-
}, /*#__PURE__*/React.createElement(
|
|
269
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
270
|
+
align: "baseline"
|
|
271
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
201
272
|
className: "associated-link"
|
|
202
273
|
}, /*#__PURE__*/React.createElement("i", {
|
|
203
274
|
style: {
|
|
@@ -208,80 +279,128 @@ var TopPanel = function TopPanel(props) {
|
|
|
208
279
|
className: "associated-label"
|
|
209
280
|
}, "\u5C5E\u60271"), /*#__PURE__*/React.createElement(Form.Item, {
|
|
210
281
|
name: "associatedPreAttr",
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
282
|
+
rules: [{
|
|
283
|
+
validator: function validator(rule, value) {
|
|
284
|
+
if (!value || !value.dimensionSub) {
|
|
285
|
+
return Promise.reject('请选择属性1');
|
|
286
|
+
}
|
|
287
|
+
return Promise.resolve();
|
|
288
|
+
}
|
|
289
|
+
}]
|
|
215
290
|
}, /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
216
291
|
enableEventProp: true,
|
|
217
292
|
enableUserProp: false,
|
|
218
293
|
enableEnvProp: false,
|
|
219
|
-
eventIdList: [
|
|
220
|
-
value: bizAttributeSelectorValue,
|
|
294
|
+
eventIdList: [startEvent === null || startEvent === void 0 ? void 0 : startEvent.id],
|
|
221
295
|
enableDelete: true,
|
|
222
|
-
|
|
296
|
+
key: "".concat(startEvent === null || startEvent === void 0 ? void 0 : startEvent.id, "-").concat(endEvent === null || endEvent === void 0 ? void 0 : endEvent.id, "-pre"),
|
|
223
297
|
onDelete: function onDelete() {
|
|
224
|
-
|
|
298
|
+
var _formRef$current5;
|
|
299
|
+
(_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 ? void 0 : _formRef$current5.setFieldValue('associatedPreAttr', undefined);
|
|
225
300
|
}
|
|
226
|
-
})), /*#__PURE__*/React.createElement("span", {
|
|
301
|
+
}))), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
227
302
|
className: "associated-label"
|
|
228
303
|
}, "\u5C5E\u60272"), /*#__PURE__*/React.createElement(Form.Item, {
|
|
229
304
|
name: "associatedNextAttr",
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
305
|
+
rules: [{
|
|
306
|
+
validator: function validator(rule, value) {
|
|
307
|
+
if (!value || !value.dimensionSub) {
|
|
308
|
+
return Promise.reject('请选择属性2');
|
|
309
|
+
}
|
|
310
|
+
return Promise.resolve();
|
|
311
|
+
}
|
|
312
|
+
}]
|
|
233
313
|
}, /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
234
314
|
enableEventProp: true,
|
|
235
315
|
enableUserProp: false,
|
|
236
316
|
enableEnvProp: false,
|
|
237
|
-
eventIdList: [
|
|
238
|
-
value: bizAttributeSelectorValue,
|
|
317
|
+
eventIdList: [endEvent === null || endEvent === void 0 ? void 0 : endEvent.id],
|
|
239
318
|
enableDelete: true,
|
|
240
|
-
|
|
319
|
+
key: "".concat(startEvent === null || startEvent === void 0 ? void 0 : startEvent.id, "-").concat(endEvent === null || endEvent === void 0 ? void 0 : endEvent.id, "-next"),
|
|
241
320
|
onDelete: function onDelete() {
|
|
242
|
-
|
|
321
|
+
var _formRef$current6;
|
|
322
|
+
(_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 ? void 0 : _formRef$current6.setFieldValue('associatedNextAttr', undefined);
|
|
243
323
|
}
|
|
244
|
-
})), /*#__PURE__*/React.createElement("i", {
|
|
324
|
+
}))), /*#__PURE__*/React.createElement("i", {
|
|
245
325
|
style: {
|
|
246
326
|
lineHeight: '32px',
|
|
247
327
|
marginLeft: '28px',
|
|
248
328
|
cursor: 'pointer'
|
|
249
329
|
},
|
|
250
330
|
onClick: function onClick() {
|
|
251
|
-
|
|
252
|
-
|
|
331
|
+
var _formRef$current7, _formRef$current8;
|
|
332
|
+
(_formRef$current7 = formRef.current) === null || _formRef$current7 === void 0 ? void 0 : _formRef$current7.setFieldValue('associatedPreAttr', undefined);
|
|
333
|
+
(_formRef$current8 = formRef.current) === null || _formRef$current8 === void 0 ? void 0 : _formRef$current8.setFieldValue('associatedNextAttr', undefined);
|
|
253
334
|
setRelevancy(false);
|
|
254
|
-
setRelevancyFl(true);
|
|
255
335
|
},
|
|
256
336
|
className: "bsicon qingchu"
|
|
257
|
-
}))
|
|
337
|
+
}))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
258
338
|
label: "\u7ED3\u675F\u4E8B\u4EF6",
|
|
259
|
-
name: "end"
|
|
260
|
-
|
|
339
|
+
name: "end",
|
|
340
|
+
validateStatus: "success",
|
|
341
|
+
rules: [{
|
|
342
|
+
validateTrigger: ['onBlur'],
|
|
343
|
+
validator: function validator(rule, value) {
|
|
344
|
+
var _value$filters2, _value$filters2$condi;
|
|
345
|
+
if (!value || !value.id) {
|
|
346
|
+
return Promise.reject('请选择结束事件');
|
|
347
|
+
}
|
|
348
|
+
var conditionValIsNull = false;
|
|
349
|
+
value === null || value === void 0 ? void 0 : (_value$filters2 = value.filters) === null || _value$filters2 === void 0 ? void 0 : (_value$filters2$condi = _value$filters2.conditions) === null || _value$filters2$condi === void 0 ? void 0 : _value$filters2$condi.forEach(function (item) {
|
|
350
|
+
var _item$values2;
|
|
351
|
+
if (!/null/.test(item.operator || '') && !((_item$values2 = item.values) !== null && _item$values2 !== void 0 && _item$values2.length)) {
|
|
352
|
+
conditionValIsNull = true;
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
if (conditionValIsNull) {
|
|
356
|
+
return Promise.reject('请填写完整的条件');
|
|
357
|
+
}
|
|
358
|
+
return Promise.resolve();
|
|
359
|
+
}
|
|
360
|
+
}]
|
|
361
|
+
}, /*#__PURE__*/React.createElement(EventFilter, {
|
|
362
|
+
subject: currentSubject,
|
|
363
|
+
analysisType: analysisType,
|
|
364
|
+
key: "".concat(currentSubject === null || currentSubject === void 0 ? void 0 : currentSubject.subjectName, "-start"),
|
|
365
|
+
onChange: function onChange(val) {
|
|
366
|
+
var _formRef$current9;
|
|
367
|
+
setEndEvent(val);
|
|
368
|
+
(_formRef$current9 = formRef.current) === null || _formRef$current9 === void 0 ? void 0 : _formRef$current9.setFieldValue('dimension', undefined);
|
|
369
|
+
}
|
|
370
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
261
371
|
label: "\u6309\u5C5E\u6027\u7EC6\u5206",
|
|
262
372
|
name: "dimension",
|
|
263
373
|
className: "dimension-interval"
|
|
264
374
|
}, /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
265
375
|
enableEventProp: true,
|
|
266
|
-
enableUserProp:
|
|
376
|
+
enableUserProp: analysisType === 'user',
|
|
267
377
|
enableEnvProp: true,
|
|
268
|
-
|
|
269
|
-
|
|
378
|
+
key: "".concat(currentSubject === null || currentSubject === void 0 ? void 0 : currentSubject.subjectName, "-dimension-").concat(startEvent === null || startEvent === void 0 ? void 0 : startEvent.id, "-").concat(endEvent === null || endEvent === void 0 ? void 0 : endEvent.id, "}"),
|
|
379
|
+
eventIdList: [(startEvent === null || startEvent === void 0 ? void 0 : startEvent.id) || 0, (endEvent === null || endEvent === void 0 ? void 0 : endEvent.id) || 0],
|
|
380
|
+
showCommonProp: true,
|
|
270
381
|
enableDelete: true,
|
|
271
|
-
onChange: onChangeAttr,
|
|
272
382
|
onDelete: function onDelete() {
|
|
273
|
-
|
|
383
|
+
var _formRef$current10;
|
|
384
|
+
(_formRef$current10 = formRef.current) === null || _formRef$current10 === void 0 ? void 0 : _formRef$current10.setFieldValue('dimension', undefined);
|
|
274
385
|
}
|
|
275
|
-
})), /*#__PURE__*/React.createElement(
|
|
386
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
387
|
+
label: "\u5206\u6790\u6A21\u578B",
|
|
388
|
+
name: "analysisModel",
|
|
389
|
+
className: "panel-form-interval-item"
|
|
390
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, null, /*#__PURE__*/React.createElement(Radio, {
|
|
391
|
+
value: AnalysisMode.common
|
|
392
|
+
}, "\u5E38\u89C4\u95F4\u9694\u5206\u6790"), /*#__PURE__*/React.createElement(Radio, {
|
|
393
|
+
value: AnalysisMode.firstAndLast
|
|
394
|
+
}, "\u9996\u672B\u6B21\u95F4\u9694\u5206\u6790"))), /*#__PURE__*/React.createElement("div", {
|
|
276
395
|
className: "".concat(classPrefix, "-form-botton-box")
|
|
277
396
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
278
397
|
onClick: resetting
|
|
279
398
|
}, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
|
|
280
|
-
loading: loading,
|
|
281
|
-
disabled: loading || !startId || !endId || relevancy && !(defaultValue !== null && defaultValue !== void 0 && defaultValue.associatedNextAttr) && !(defaultValue !== null && defaultValue !== void 0 && defaultValue.associatedNextAttr),
|
|
399
|
+
loading: loading || subjectLoading,
|
|
282
400
|
type: "primary",
|
|
283
401
|
onClick: function onClick() {
|
|
284
|
-
|
|
402
|
+
var _formRef$current11;
|
|
403
|
+
(_formRef$current11 = formRef.current) === null || _formRef$current11 === void 0 ? void 0 : _formRef$current11.submit();
|
|
285
404
|
}
|
|
286
405
|
}, "\u67E5\u8BE2"))));
|
|
287
406
|
};
|