@zgfe/modules-interval 1.0.10-zbfix.4 → 1.0.11-zb.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/dist/esm/components/common/styles/index.less +3 -3
- package/dist/esm/components/eventFilter/index.js +17 -27
- package/dist/esm/components/eventFilter/types.d.ts +4 -5
- package/dist/esm/components/renderContent/styles/index.less +3 -0
- package/dist/esm/components/searchPanel/index.js +3 -4
- package/dist/esm/components/table/index.js +5 -4
- package/dist/esm/components/topBar/index.js +4 -4
- 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/modules/chart/index.js +4 -3
- package/dist/esm/modules/chart/intervalChart.js +1 -1
- package/dist/esm/modules/chart/types.d.ts +1 -0
- package/dist/esm/modules/content/index.js +28 -44
- 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 +4 -2
- 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/index.d.ts +2 -2
- package/dist/esm/modules/home/index.js +38 -33
- package/dist/esm/modules/home/styles/index.less +6 -0
- 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 +257 -136
- package/dist/esm/modules/topPanel/styles/index.less +29 -2
- package/dist/esm/modules/topPanel/types.d.ts +6 -9
- package/dist/esm/modules/topPanel/types.js +5 -1
- package/dist/esm/style/index.less +14 -0
- package/dist/esm/types.d.ts +25 -28
- package/dist/esm/types.js +1 -1
- package/dist/esm/utils/formData.d.ts +7 -2
- package/dist/esm/utils/formData.js +64 -12
- package/package.json +7 -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
|
@@ -14,7 +14,7 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
14
14
|
import { Spin } from 'antd';
|
|
15
15
|
import { BizGlobalDataContext, BizTargetFromPanel } from '@zgfe/business-lib';
|
|
16
16
|
import "./styles/index.less";
|
|
17
|
-
import {
|
|
17
|
+
import { IntervalContext } from "../../types";
|
|
18
18
|
import { getInitDate } from "../../constants/initData";
|
|
19
19
|
import EventContent from "../content";
|
|
20
20
|
import { chartTypes } from "../../constants";
|
|
@@ -36,30 +36,31 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
36
36
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
37
|
loading = _useState4[0],
|
|
38
38
|
setLoading = _useState4[1];
|
|
39
|
-
var _useState5 = useState(true),
|
|
40
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
41
|
-
pageLoading = _useState6[0],
|
|
42
|
-
setPageLoading = _useState6[1];
|
|
43
39
|
// 指标标题
|
|
40
|
+
var _useState5 = useState(),
|
|
41
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
|
+
title = _useState6[0],
|
|
43
|
+
setTitle = _useState6[1];
|
|
44
44
|
var _useState7 = useState(),
|
|
45
45
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
panelId = _useState8[0],
|
|
47
|
+
setPanelId = _useState8[1];
|
|
48
48
|
var _useState9 = useState(),
|
|
49
49
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
elementId = _useState10[0],
|
|
51
|
+
setElementId = _useState10[1];
|
|
52
52
|
var _useState11 = useState(),
|
|
53
53
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var _useState13 = useState(),
|
|
54
|
+
showList = _useState12[0],
|
|
55
|
+
setShowList = _useState12[1];
|
|
56
|
+
var _useState13 = useState(false),
|
|
57
57
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
subjectEnable = _useState14[0],
|
|
59
|
+
setSubjectEnable = _useState14[1];
|
|
60
60
|
// 初始化
|
|
61
61
|
useEffect(function () {
|
|
62
|
-
|
|
62
|
+
setLoading(true);
|
|
63
|
+
setSubjectEnable(false);
|
|
63
64
|
// 设置初始值
|
|
64
65
|
if (!props.defaultValue) {
|
|
65
66
|
initSearch();
|
|
@@ -71,8 +72,8 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
71
72
|
setSearchData(props.defaultValue.data);
|
|
72
73
|
}
|
|
73
74
|
setTimeout(function () {
|
|
74
|
-
|
|
75
|
-
}
|
|
75
|
+
setLoading(false);
|
|
76
|
+
});
|
|
76
77
|
}, []);
|
|
77
78
|
|
|
78
79
|
// 查询条件初始化
|
|
@@ -80,20 +81,21 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
80
81
|
setSearchData({
|
|
81
82
|
userGroup: (userGroupList === null || userGroupList === void 0 ? void 0 : userGroupList.length) > 0 ? [userGroupList[0].id] : [0],
|
|
82
83
|
time: getInitDate(props.includeToday),
|
|
83
|
-
chartType: '
|
|
84
|
+
chartType: 'boxplot'
|
|
84
85
|
});
|
|
85
86
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
useEffect(function () {
|
|
88
|
+
if (props.onChange) props.onChange(searchData);
|
|
89
|
+
}, [searchData]);
|
|
90
|
+
if (loading) {
|
|
91
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: classPrefix
|
|
93
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
|
94
|
+
className: "".concat(classPrefix, "-loading")
|
|
95
|
+
}));
|
|
93
96
|
}
|
|
94
|
-
return /*#__PURE__*/React.createElement(
|
|
95
|
-
|
|
96
|
-
wrapperClassName: classPrefix
|
|
97
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
98
|
+
className: classPrefix
|
|
97
99
|
}, /*#__PURE__*/React.createElement(BizTargetFromPanel, {
|
|
98
100
|
value: panelId ? {
|
|
99
101
|
panelId: panelId,
|
|
@@ -102,7 +104,7 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
102
104
|
name: title,
|
|
103
105
|
params: _objectSpread({
|
|
104
106
|
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
105
|
-
module: '
|
|
107
|
+
module: 'interval'
|
|
106
108
|
}, searchData)
|
|
107
109
|
}
|
|
108
110
|
} : undefined,
|
|
@@ -112,7 +114,7 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
112
114
|
children: ""
|
|
113
115
|
}), !panelId && /*#__PURE__*/React.createElement("div", {
|
|
114
116
|
className: "".concat(classPrefix, "-header-title")
|
|
115
|
-
}, "\u95F4\u9694\u5206\u6790"), /*#__PURE__*/React.createElement(
|
|
117
|
+
}, "\u95F4\u9694\u5206\u6790"), /*#__PURE__*/React.createElement(IntervalContext.Provider, {
|
|
116
118
|
value: {
|
|
117
119
|
panelId: panelId,
|
|
118
120
|
elementId: elementId,
|
|
@@ -121,18 +123,21 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
121
123
|
userPropList: userPropList,
|
|
122
124
|
searchData: searchData,
|
|
123
125
|
setSearchData: setSearchData,
|
|
126
|
+
subjectEnable: subjectEnable,
|
|
124
127
|
panelName: title,
|
|
125
128
|
includeToday: props.includeToday,
|
|
126
|
-
|
|
129
|
+
enableAddScene: props.defaultValue && props.defaultValue.enableAddScene === false ? false : true,
|
|
130
|
+
changeLoading: setLoading,
|
|
127
131
|
afterEditTarget: props.afterEditTarget,
|
|
128
|
-
onUserDrill: props.onUserDrill
|
|
132
|
+
onUserDrill: props.onUserDrill,
|
|
133
|
+
onJumpWarning: props.onJumpWarning
|
|
129
134
|
}
|
|
130
135
|
}, /*#__PURE__*/React.createElement(EventContent, {
|
|
131
136
|
defaultValue: props.defaultValue ? props.defaultValue.data : undefined,
|
|
132
137
|
value: searchData,
|
|
133
138
|
show: showList,
|
|
134
|
-
urlParam: props.urlParam,
|
|
135
139
|
onUserDrill: props.onUserDrill,
|
|
140
|
+
onJumpWarning: props.onJumpWarning,
|
|
136
141
|
onChange: setSearchData,
|
|
137
142
|
initSearch: initSearch
|
|
138
143
|
})));
|
|
@@ -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 = {}));
|