@zgfe/modules-interval 1.0.10-qirui.4 → 1.0.10-zbfix.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/dist/esm/assets/business/demo.css +539 -0
- package/dist/esm/assets/business/demo_index.html +3316 -0
- package/dist/esm/assets/business/iconfont.css +559 -0
- package/dist/esm/assets/business/iconfont.js +43 -0
- package/dist/esm/assets/business/iconfont.json +961 -0
- 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 +539 -0
- package/dist/esm/assets/icons/demo_index.html +9618 -0
- package/dist/esm/assets/icons/iconfont.css +1655 -0
- package/dist/esm/assets/icons/iconfont.js +43 -0
- package/dist/esm/assets/icons/iconfont.json +2879 -0
- 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
- package/dist/esm/components/common/styles/index.less +3 -3
- package/dist/esm/components/eventFilter/index.js +21 -17
- package/dist/esm/components/eventFilter/types.d.ts +3 -4
- package/dist/esm/components/renderContent/styles/index.less +0 -3
- package/dist/esm/components/searchPanel/index.js +4 -3
- package/dist/esm/components/table/index.js +4 -5
- package/dist/esm/components/topBar/index.js +4 -4
- package/dist/esm/components/topBar/types.d.ts +2 -3
- package/dist/esm/constants/apis.d.ts +5 -1
- package/dist/esm/constants/apis.js +4 -15
- package/dist/esm/modules/chart/index.js +3 -4
- package/dist/esm/modules/chart/intervalChart.js +1 -1
- package/dist/esm/modules/chart/types.d.ts +0 -1
- package/dist/esm/modules/content/index.js +44 -28
- package/dist/esm/modules/content/types.d.ts +3 -4
- package/dist/esm/modules/content/utils.d.ts +0 -2
- package/dist/esm/modules/content/utils.js +2 -4
- package/dist/esm/modules/home/demo/edit.js +1 -1
- package/dist/esm/modules/home/demo/index.js +15 -7
- 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 +46 -59
- package/dist/esm/modules/home/styles/index.less +0 -6
- package/dist/esm/modules/home/types.d.ts +4 -7
- package/dist/esm/modules/home/types.js +2 -2
- package/dist/esm/modules/topPanel/index.js +126 -246
- package/dist/esm/modules/topPanel/styles/index.less +2 -29
- package/dist/esm/modules/topPanel/types.d.ts +9 -6
- package/dist/esm/modules/topPanel/types.js +1 -5
- package/dist/esm/style/index.less +0 -14
- package/dist/esm/types.d.ts +28 -25
- package/dist/esm/types.js +1 -1
- package/dist/esm/utils/formData.d.ts +2 -7
- package/dist/esm/utils/formData.js +12 -64
- package/package.json +4 -7
|
@@ -12,12 +12,12 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
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';
|
|
15
|
-
import { BizGlobalDataContext, BizTargetFromPanel
|
|
15
|
+
import { BizGlobalDataContext, BizTargetFromPanel } from '@zgfe/business-lib';
|
|
16
16
|
import "./styles/index.less";
|
|
17
|
-
import {
|
|
17
|
+
import { EventContext } from "../../types";
|
|
18
18
|
import { getInitDate } from "../../constants/initData";
|
|
19
19
|
import EventContent from "../content";
|
|
20
|
-
import {
|
|
20
|
+
import { chartTypes } from "../../constants";
|
|
21
21
|
var classPrefix = 'interval-module-container';
|
|
22
22
|
var ModuleInterval = function ModuleInterval(props) {
|
|
23
23
|
// 属性
|
|
@@ -36,52 +36,43 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
36
36
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
37
|
loading = _useState4[0],
|
|
38
38
|
setLoading = _useState4[1];
|
|
39
|
-
|
|
40
|
-
var _useState5 = useState(),
|
|
39
|
+
var _useState5 = useState(true),
|
|
41
40
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
pageLoading = _useState6[0],
|
|
42
|
+
setPageLoading = _useState6[1];
|
|
43
|
+
// 指标标题
|
|
44
44
|
var _useState7 = useState(),
|
|
45
45
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
title = _useState8[0],
|
|
47
|
+
setTitle = _useState8[1];
|
|
48
48
|
var _useState9 = useState(),
|
|
49
49
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
panelId = _useState10[0],
|
|
51
|
+
setPanelId = _useState10[1];
|
|
52
52
|
var _useState11 = useState(),
|
|
53
53
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var _useState13 = useState(
|
|
54
|
+
elementId = _useState12[0],
|
|
55
|
+
setElementId = _useState12[1];
|
|
56
|
+
var _useState13 = useState(),
|
|
57
57
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
showList = _useState14[0],
|
|
59
|
+
setShowList = _useState14[1];
|
|
60
60
|
// 初始化
|
|
61
61
|
useEffect(function () {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
setPanelId(props.defaultValue.panelId);
|
|
77
|
-
setElementId(props.defaultValue.id);
|
|
78
|
-
setTitle(props.defaultValue.name);
|
|
79
|
-
setSearchData(props.defaultValue.data);
|
|
80
|
-
}
|
|
81
|
-
setTimeout(function () {
|
|
82
|
-
setLoading(false);
|
|
83
|
-
});
|
|
84
|
-
});
|
|
62
|
+
setPageLoading(true);
|
|
63
|
+
// 设置初始值
|
|
64
|
+
if (!props.defaultValue) {
|
|
65
|
+
initSearch();
|
|
66
|
+
} else {
|
|
67
|
+
setShowList(props.defaultValue.chosen_data);
|
|
68
|
+
setPanelId(props.defaultValue.panelId);
|
|
69
|
+
setElementId(props.defaultValue.id);
|
|
70
|
+
setTitle(props.defaultValue.name);
|
|
71
|
+
setSearchData(props.defaultValue.data);
|
|
72
|
+
}
|
|
73
|
+
setTimeout(function () {
|
|
74
|
+
setPageLoading(false);
|
|
75
|
+
}, 0);
|
|
85
76
|
}, []);
|
|
86
77
|
|
|
87
78
|
// 查询条件初始化
|
|
@@ -89,21 +80,20 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
89
80
|
setSearchData({
|
|
90
81
|
userGroup: (userGroupList === null || userGroupList === void 0 ? void 0 : userGroupList.length) > 0 ? [userGroupList[0].id] : [0],
|
|
91
82
|
time: getInitDate(props.includeToday),
|
|
92
|
-
chartType: '
|
|
83
|
+
chartType: 'line'
|
|
93
84
|
});
|
|
94
85
|
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
className: "".concat(classPrefix, "-loading")
|
|
103
|
-
}));
|
|
86
|
+
|
|
87
|
+
// 改变loading
|
|
88
|
+
var changeLoading = function changeLoading(flag) {
|
|
89
|
+
setLoading(flag);
|
|
90
|
+
};
|
|
91
|
+
if (pageLoading) {
|
|
92
|
+
return /*#__PURE__*/React.createElement(Spin, null);
|
|
104
93
|
}
|
|
105
|
-
return /*#__PURE__*/React.createElement(
|
|
106
|
-
|
|
94
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
95
|
+
spinning: loading,
|
|
96
|
+
wrapperClassName: classPrefix
|
|
107
97
|
}, /*#__PURE__*/React.createElement(BizTargetFromPanel, {
|
|
108
98
|
value: panelId ? {
|
|
109
99
|
panelId: panelId,
|
|
@@ -112,7 +102,7 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
112
102
|
name: title,
|
|
113
103
|
params: _objectSpread({
|
|
114
104
|
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
115
|
-
module: '
|
|
105
|
+
module: 'event'
|
|
116
106
|
}, searchData)
|
|
117
107
|
}
|
|
118
108
|
} : undefined,
|
|
@@ -122,7 +112,7 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
122
112
|
children: ""
|
|
123
113
|
}), !panelId && /*#__PURE__*/React.createElement("div", {
|
|
124
114
|
className: "".concat(classPrefix, "-header-title")
|
|
125
|
-
}, "\u95F4\u9694\u5206\u6790"), /*#__PURE__*/React.createElement(
|
|
115
|
+
}, "\u95F4\u9694\u5206\u6790"), /*#__PURE__*/React.createElement(EventContext.Provider, {
|
|
126
116
|
value: {
|
|
127
117
|
panelId: panelId,
|
|
128
118
|
elementId: elementId,
|
|
@@ -131,21 +121,18 @@ var ModuleInterval = function ModuleInterval(props) {
|
|
|
131
121
|
userPropList: userPropList,
|
|
132
122
|
searchData: searchData,
|
|
133
123
|
setSearchData: setSearchData,
|
|
134
|
-
subjectEnable: subjectEnable,
|
|
135
124
|
panelName: title,
|
|
136
125
|
includeToday: props.includeToday,
|
|
137
|
-
|
|
138
|
-
changeLoading: setLoading,
|
|
126
|
+
changeLoading: changeLoading,
|
|
139
127
|
afterEditTarget: props.afterEditTarget,
|
|
140
|
-
onUserDrill: props.onUserDrill
|
|
141
|
-
onJumpWarning: props.onJumpWarning
|
|
128
|
+
onUserDrill: props.onUserDrill
|
|
142
129
|
}
|
|
143
130
|
}, /*#__PURE__*/React.createElement(EventContent, {
|
|
144
131
|
defaultValue: props.defaultValue ? props.defaultValue.data : undefined,
|
|
145
132
|
value: searchData,
|
|
146
133
|
show: showList,
|
|
134
|
+
urlParam: props.urlParam,
|
|
147
135
|
onUserDrill: props.onUserDrill,
|
|
148
|
-
onJumpWarning: props.onJumpWarning,
|
|
149
136
|
onChange: setSearchData,
|
|
150
137
|
initSearch: initSearch
|
|
151
138
|
})));
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SearchValue,
|
|
3
|
-
export declare namespace
|
|
2
|
+
import { SearchValue, UserDrillParamsProp } from '../../types';
|
|
3
|
+
export declare namespace EventProps {
|
|
4
4
|
interface Props {
|
|
5
5
|
/**
|
|
6
6
|
* @description 默认查询值
|
|
7
7
|
*/
|
|
8
8
|
defaultValue?: Value;
|
|
9
|
+
urlParam?: SearchValue;
|
|
9
10
|
/**
|
|
10
11
|
* @description 看板是否可禁用, true禁用
|
|
11
12
|
*/
|
|
@@ -22,9 +23,7 @@ export declare namespace IntervalProps {
|
|
|
22
23
|
/**
|
|
23
24
|
* 用户钻取
|
|
24
25
|
*/
|
|
25
|
-
onUserDrill: (data:
|
|
26
|
-
onJumpWarning: (data: Record<string, any>, searchData: SearchValue) => void;
|
|
27
|
-
onChange?: (data: SearchValue) => void;
|
|
26
|
+
onUserDrill: (data: UserDrillParamsProp, searchData: SearchValue) => void;
|
|
28
27
|
}
|
|
29
28
|
interface Value {
|
|
30
29
|
/**
|
|
@@ -70,8 +69,6 @@ export declare namespace IntervalProps {
|
|
|
70
69
|
min?: number;
|
|
71
70
|
perValue?: number;
|
|
72
71
|
peopleNum?: number;
|
|
73
|
-
names?: string[];
|
|
74
|
-
total?: number;
|
|
75
72
|
children?: ColumnsDataType[];
|
|
76
73
|
}
|
|
77
74
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export var
|
|
2
|
-
(function (
|
|
1
|
+
export var EventProps;
|
|
2
|
+
(function (_EventProps) {})(EventProps || (EventProps = {}));
|