@zgfe/modules-interval 1.0.0-interval.1 → 1.0.0-interval.11
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/index.js +1 -1
- package/dist/esm/components/common/styles/index.less +1 -1
- package/dist/esm/components/eventFilter/index.js +5 -5
- package/dist/esm/components/eventFilter/styles/index.less +1 -1
- package/dist/esm/components/eventFilter/types.d.ts +1 -0
- package/dist/esm/components/renderContent/index.js +8 -11
- package/dist/esm/components/renderContent/styles/index.less +12 -2
- package/dist/esm/components/searchPanel/index.js +8 -3
- package/dist/esm/components/searchPanel/styles/index.less +1 -2
- package/dist/esm/components/table/index.d.ts +0 -1
- package/dist/esm/components/table/index.js +13 -87
- package/dist/esm/components/table/styles/index.less +1 -1
- package/dist/esm/components/topBar/index.js +20 -9
- package/dist/esm/components/topBar/styles/index.less +1 -1
- package/dist/esm/components/topBar/types.d.ts +3 -1
- package/dist/esm/constants/apis.js +1 -1
- package/dist/esm/constants/fields.js +4 -4
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/modules/chart/index.js +4 -3
- package/dist/esm/modules/chart/intervalChart.js +4 -2
- package/dist/esm/modules/chart/types.d.ts +1 -1
- package/dist/esm/modules/content/index.js +33 -77
- package/dist/esm/modules/content/styles/index.less +1 -1
- package/dist/esm/modules/content/types.d.ts +2 -1
- package/dist/esm/modules/content/utils.d.ts +38 -0
- package/dist/esm/modules/content/utils.js +57 -1
- package/dist/esm/modules/home/demo/create.js +2 -5
- package/dist/esm/modules/home/demo/edit.js +2 -5
- package/dist/esm/modules/home/demo/index.js +3 -6
- package/dist/esm/modules/home/demo/scene.js +2 -5
- package/dist/esm/modules/home/index.d.ts +2 -2
- package/dist/esm/modules/home/index.js +5 -4
- package/dist/esm/modules/home/styles/index.less +1 -1
- package/dist/esm/modules/topPanel/index.js +103 -51
- package/dist/esm/modules/topPanel/styles/index.less +20 -13
- package/dist/esm/modules/topPanel/types.d.ts +3 -1
- package/dist/esm/style/index.less +8 -1
- package/dist/esm/types.d.ts +2 -2
- package/dist/esm/utils/formData.d.ts +28 -6
- package/dist/esm/utils/formData.js +99 -31
- package/package.json +2 -2
- package/dist/esm/utils/base64.d.ts +0 -29
- package/dist/esm/utils/base64.js +0 -132
|
@@ -17,15 +17,14 @@ import TopBar from "../../components/topBar";
|
|
|
17
17
|
import { EventContext } from "../../types";
|
|
18
18
|
import "./styles/index.less";
|
|
19
19
|
import { Apis } from "../../constants";
|
|
20
|
-
import { judgeIsCity, judgeIsArea, getValue } from "./utils";
|
|
20
|
+
import { judgeIsCity, judgeIsArea, getValue, searchDataParams } from "./utils";
|
|
21
21
|
import { ContentPanel, SearchPanel } from "../../components";
|
|
22
22
|
import TopPanel from "../topPanel";
|
|
23
23
|
import { message } from 'antd';
|
|
24
24
|
var timer = 0;
|
|
25
|
-
var ajaxFlag = true;
|
|
26
25
|
var CancelToken = Request.CancelToken;
|
|
27
26
|
var cancel;
|
|
28
|
-
var classPrefix = '
|
|
27
|
+
var classPrefix = 'interval-content';
|
|
29
28
|
var EventContent = function EventContent(props) {
|
|
30
29
|
// console.log('EventContent', props);
|
|
31
30
|
// 最后的查询数据(防止图表在还没查询时就改变了类型)
|
|
@@ -58,10 +57,14 @@ var EventContent = function EventContent(props) {
|
|
|
58
57
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
59
58
|
isCity = _useState12[0],
|
|
60
59
|
setIsCity = _useState12[1];
|
|
61
|
-
var _useState13 = useState(
|
|
60
|
+
var _useState13 = useState(false),
|
|
62
61
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
ajaxFlag = _useState14[0],
|
|
63
|
+
setAjaxFlag = _useState14[1];
|
|
64
|
+
var _useState15 = useState(-1),
|
|
65
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
66
|
+
eventId = _useState16[0],
|
|
67
|
+
setEventId = _useState16[1];
|
|
65
68
|
var _useContext2 = useContext(EventContext),
|
|
66
69
|
searchData = _useContext2.searchData,
|
|
67
70
|
setSearchData = _useContext2.setSearchData,
|
|
@@ -90,7 +93,7 @@ var EventContent = function EventContent(props) {
|
|
|
90
93
|
var flag = true;
|
|
91
94
|
timer = setTimeout(function () {
|
|
92
95
|
if (flag) {
|
|
93
|
-
fetchRequest();
|
|
96
|
+
fetchRequest(false);
|
|
94
97
|
}
|
|
95
98
|
}, 500);
|
|
96
99
|
return function () {
|
|
@@ -102,59 +105,20 @@ var EventContent = function EventContent(props) {
|
|
|
102
105
|
useEffect(function () {
|
|
103
106
|
handleSearch && handleSearch(loading);
|
|
104
107
|
}, [loading]);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
2: 'cont-num',
|
|
111
|
-
3: 'cont-date'
|
|
112
|
-
};
|
|
113
|
-
return {
|
|
114
|
-
operator: (params === null || params === void 0 ? void 0 : (_params$filters = params.filters) === null || _params$filters === void 0 ? void 0 : _params$filters.relation) || 'and',
|
|
115
|
-
event_id: params === null || params === void 0 ? void 0 : params.id,
|
|
116
|
-
event_name: params === null || params === void 0 ? void 0 : params.name,
|
|
117
|
-
condition: params === null || params === void 0 ? void 0 : (_params$filters2 = params.filters) === null || _params$filters2 === void 0 ? void 0 : _params$filters2.conditions.map(function (item) {
|
|
118
|
-
return {
|
|
119
|
-
name: item === null || item === void 0 ? void 0 : item.attrName,
|
|
120
|
-
attrId: item === null || item === void 0 ? void 0 : item.attrId,
|
|
121
|
-
params: item === null || item === void 0 ? void 0 : item.values,
|
|
122
|
-
attr_sub: (item === null || item === void 0 ? void 0 : item.propCategory) === 'userProp' ? 'user_attr' : (item === null || item === void 0 ? void 0 : item.propCategory) === 'eventProp' ? 'event_attr' : item === null || item === void 0 ? void 0 : item.attrName,
|
|
123
|
-
category: (item === null || item === void 0 ? void 0 : item.category) || 'custom',
|
|
124
|
-
attrType: numAttrTypeMap[item === null || item === void 0 ? void 0 : item.type],
|
|
125
|
-
operator: item === null || item === void 0 ? void 0 : item.operator
|
|
126
|
-
};
|
|
127
|
-
})
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
function searchDataParams(params) {
|
|
131
|
-
var _params$time, _params$time2, _params$time3, _params$userGroup$, _params$dimension, _params$dimension2, _params$dimension3, _params$dimension4, _params$dimension5, _params$dimension6, _params$dimension7, _params$dimension8, _params$dimension9, _params$dimension10, _params$dimension11, _params$associatedPre, _params$associatedNex;
|
|
132
|
-
return {
|
|
133
|
-
time: {
|
|
134
|
-
dimension_date: params === null || params === void 0 ? void 0 : (_params$time = params.time) === null || _params$time === void 0 ? void 0 : _params$time.unit,
|
|
135
|
-
begin_date: params === null || params === void 0 ? void 0 : (_params$time2 = params.time) === null || _params$time2 === void 0 ? void 0 : _params$time2.begin,
|
|
136
|
-
end_date: params === null || params === void 0 ? void 0 : (_params$time3 = params.time) === null || _params$time3 === void 0 ? void 0 : _params$time3.end
|
|
137
|
-
},
|
|
138
|
-
user_group: (_params$userGroup$ = params.userGroup[0]) === null || _params$userGroup$ === void 0 ? void 0 : _params$userGroup$.id,
|
|
139
|
-
start: searchCondition(params === null || params === void 0 ? void 0 : params.start),
|
|
140
|
-
end: searchCondition(params === null || params === void 0 ? void 0 : params.end),
|
|
141
|
-
dimension: {
|
|
142
|
-
sub: (params === null || params === void 0 ? void 0 : (_params$dimension = params.dimension) === null || _params$dimension === void 0 ? void 0 : _params$dimension.propCategory) === 'userProp' ? 'user_attr' : (params === null || params === void 0 ? void 0 : (_params$dimension2 = params.dimension) === null || _params$dimension2 === void 0 ? void 0 : _params$dimension2.propCategory) === 'eventProp' ? 'event_attr' : params === null || params === void 0 ? void 0 : (_params$dimension3 = params.dimension) === null || _params$dimension3 === void 0 ? void 0 : _params$dimension3.name,
|
|
143
|
-
category: (params === null || params === void 0 ? void 0 : (_params$dimension4 = params.dimension) === null || _params$dimension4 === void 0 ? void 0 : _params$dimension4.category) || 'custom',
|
|
144
|
-
attr_id: params === null || params === void 0 ? void 0 : (_params$dimension5 = params.dimension) === null || _params$dimension5 === void 0 ? void 0 : _params$dimension5.id,
|
|
145
|
-
user_attr: (params === null || params === void 0 ? void 0 : (_params$dimension6 = params.dimension) === null || _params$dimension6 === void 0 ? void 0 : _params$dimension6.propCategory) === 'userProp' ? params === null || params === void 0 ? void 0 : (_params$dimension7 = params.dimension) === null || _params$dimension7 === void 0 ? void 0 : _params$dimension7.dimensionSub : null,
|
|
146
|
-
event_attr: (params === null || params === void 0 ? void 0 : (_params$dimension8 = params.dimension) === null || _params$dimension8 === void 0 ? void 0 : _params$dimension8.propCategory) === 'eventProp' ? params === null || params === void 0 ? void 0 : (_params$dimension9 = params.dimension) === null || _params$dimension9 === void 0 ? void 0 : _params$dimension9.label : null,
|
|
147
|
-
event: (params === null || params === void 0 ? void 0 : (_params$dimension10 = params.dimension) === null || _params$dimension10 === void 0 ? void 0 : _params$dimension10.propCategory) !== 'envProp' ? params === null || params === void 0 ? void 0 : (_params$dimension11 = params.dimension) === null || _params$dimension11 === void 0 ? void 0 : _params$dimension11.eventId : null
|
|
148
|
-
},
|
|
149
|
-
associated_pre_attr: params === null || params === void 0 ? void 0 : (_params$associatedPre = params.associatedPreAttr) === null || _params$associatedPre === void 0 ? void 0 : _params$associatedPre.id,
|
|
150
|
-
associated_next_attr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id
|
|
151
|
-
};
|
|
152
|
-
}
|
|
108
|
+
useEffect(function () {
|
|
109
|
+
if (ajaxFlag) {
|
|
110
|
+
fetchRequest(true);
|
|
111
|
+
}
|
|
112
|
+
}, [ajaxFlag]);
|
|
153
113
|
// 查询
|
|
154
114
|
var fetchRequest = function fetchRequest(flag) {
|
|
155
|
-
var _searchData$associate, _searchData$associate2, _searchData$associate3;
|
|
156
|
-
if (flag !== undefined)
|
|
115
|
+
var _searchData$start, _searchData$endId, _searchData$associate, _searchData$associate2, _searchData$associate3;
|
|
116
|
+
if (flag !== undefined) setAjaxFlag(flag);
|
|
157
117
|
if (!ajaxFlag) return;
|
|
118
|
+
if ((searchData === null || searchData === void 0 ? void 0 : (_searchData$start = searchData.start) === null || _searchData$start === void 0 ? void 0 : _searchData$start.id) === null || (searchData === null || searchData === void 0 ? void 0 : (_searchData$endId = searchData.endId) === null || _searchData$endId === void 0 ? void 0 : _searchData$endId.id) === null) {
|
|
119
|
+
setLoading(false);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
158
122
|
setLoading(true);
|
|
159
123
|
setEventData(undefined);
|
|
160
124
|
// 取消上次未完成的请求
|
|
@@ -165,22 +129,12 @@ var EventContent = function EventContent(props) {
|
|
|
165
129
|
return message.error('您查询的属性不一致,暂不支持查询');
|
|
166
130
|
}
|
|
167
131
|
var params = searchDataParams(searchData);
|
|
168
|
-
// const params = {
|
|
169
|
-
// app_id: 177,
|
|
170
|
-
// platform: 0,
|
|
171
|
-
// user_group: 0,
|
|
172
|
-
// time: { dimension_date: 'month', begin_date: '2023-05-01', end_date: '2023-08-29' },
|
|
173
|
-
// start: { operator: 'and', event_id: 16530, event_name: '查看商品A' },
|
|
174
|
-
// end: { operator: 'and', event_id: 16530, event_name: '查看商品A' },
|
|
175
|
-
// dimension: { sub: 'user_attr', category: 'fixed', user_attr: 'name' },
|
|
176
|
-
// };
|
|
177
|
-
console.log(666666, searchData, params);
|
|
178
132
|
props.onChange && props.onChange(searchData);
|
|
133
|
+
// console.log(77771111, searchData, params);
|
|
179
134
|
ajax(Apis.dataList, {
|
|
180
135
|
method: 'post',
|
|
181
136
|
data: _objectSpread({
|
|
182
|
-
|
|
183
|
-
platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
|
|
137
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
184
138
|
}, params),
|
|
185
139
|
cancelToken: new CancelToken(function executor(c) {
|
|
186
140
|
cancel = c;
|
|
@@ -203,7 +157,7 @@ var EventContent = function EventContent(props) {
|
|
|
203
157
|
|
|
204
158
|
// 改变时间和图表类型
|
|
205
159
|
var onChangeContent = function onChangeContent(data) {
|
|
206
|
-
|
|
160
|
+
setAjaxFlag(true);
|
|
207
161
|
setSearchData(function (value) {
|
|
208
162
|
return _objectSpread(_objectSpread({}, value), data);
|
|
209
163
|
});
|
|
@@ -216,7 +170,7 @@ var EventContent = function EventContent(props) {
|
|
|
216
170
|
|
|
217
171
|
// 平台变更
|
|
218
172
|
var platformChange = function platformChange(data) {
|
|
219
|
-
|
|
173
|
+
setAjaxFlag(true);
|
|
220
174
|
setSearchData(function (_searchData) {
|
|
221
175
|
return _objectSpread(_objectSpread({}, _searchData), {}, {
|
|
222
176
|
platform: data
|
|
@@ -226,7 +180,7 @@ var EventContent = function EventContent(props) {
|
|
|
226
180
|
|
|
227
181
|
// TopPanel组件数值变更
|
|
228
182
|
var onChangeSearch = function onChangeSearch(data, flag) {
|
|
229
|
-
|
|
183
|
+
setAjaxFlag(false);
|
|
230
184
|
data.id ? setEventId(data.id) : setEventId(-1);
|
|
231
185
|
setSearchData(function (_searchData) {
|
|
232
186
|
return _objectSpread(_objectSpread({}, _searchData), data);
|
|
@@ -234,20 +188,22 @@ var EventContent = function EventContent(props) {
|
|
|
234
188
|
};
|
|
235
189
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TopBar, {
|
|
236
190
|
searchData: searchData,
|
|
237
|
-
|
|
191
|
+
eventData: eventData,
|
|
192
|
+
platformChange: platformChange,
|
|
193
|
+
onUserDrill: props.onUserDrill
|
|
238
194
|
}), /*#__PURE__*/React.createElement(BizLayout, {
|
|
239
195
|
showTitle: false,
|
|
240
196
|
hasCollapse: true,
|
|
241
197
|
collapseRef: collapseRef,
|
|
242
|
-
topPanel: /*#__PURE__*/React.createElement(
|
|
243
|
-
|
|
244
|
-
}, /*#__PURE__*/React.createElement(TopPanel, {
|
|
198
|
+
topPanel: /*#__PURE__*/React.createElement(TopPanel, {
|
|
199
|
+
collapseRef: collapseRef,
|
|
245
200
|
onChange: onChangeSearch,
|
|
246
201
|
defaultValue: searchData,
|
|
247
202
|
ajaxFlag: ajaxFlag,
|
|
203
|
+
loading: loading,
|
|
248
204
|
finalSearchData: finalSearchData,
|
|
249
205
|
fetchRequest: fetchRequest
|
|
250
|
-
})
|
|
206
|
+
})
|
|
251
207
|
}, /*#__PURE__*/React.createElement("div", {
|
|
252
208
|
className: classPrefix
|
|
253
209
|
}, /*#__PURE__*/React.createElement(SearchPanel, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchValue } from '../../types';
|
|
1
|
+
import { SearchValue, UserDrillParamsProp } from '../../types';
|
|
2
2
|
export declare namespace EventContentProps {
|
|
3
3
|
interface Props {
|
|
4
4
|
/**
|
|
@@ -17,6 +17,7 @@ export declare namespace EventContentProps {
|
|
|
17
17
|
* 是否查询中
|
|
18
18
|
*/
|
|
19
19
|
onSearching?: (flag: boolean) => void;
|
|
20
|
+
onUserDrill: (data: UserDrillParamsProp, searchData: SearchValue) => void;
|
|
20
21
|
/**
|
|
21
22
|
* 查询条件回调
|
|
22
23
|
*/
|
|
@@ -19,3 +19,41 @@ export declare const judgeIsArea: (name: string | undefined) => boolean;
|
|
|
19
19
|
* @returns 属性的全部数据
|
|
20
20
|
*/
|
|
21
21
|
export declare const getValue: (param: bizAttributeSelectorValueProp, eventGroupList: EventGroup[] | undefined, eventEnvList: EnvProp[] | undefined, userPropList: UserProp[] | undefined) => AttributeSelect.Value | undefined;
|
|
22
|
+
export declare function searchCondition(params: any): {
|
|
23
|
+
operator: any;
|
|
24
|
+
eventId: any;
|
|
25
|
+
eventName: any;
|
|
26
|
+
condition: any;
|
|
27
|
+
};
|
|
28
|
+
export declare function searchDataParams(params: any): {
|
|
29
|
+
time: {
|
|
30
|
+
dimensionDate: any;
|
|
31
|
+
beginDate: any;
|
|
32
|
+
endDate: any;
|
|
33
|
+
};
|
|
34
|
+
platform: any;
|
|
35
|
+
userGroup: any;
|
|
36
|
+
start: {
|
|
37
|
+
operator: any;
|
|
38
|
+
eventId: any;
|
|
39
|
+
eventName: any;
|
|
40
|
+
condition: any;
|
|
41
|
+
};
|
|
42
|
+
end: {
|
|
43
|
+
operator: any;
|
|
44
|
+
eventId: any;
|
|
45
|
+
eventName: any;
|
|
46
|
+
condition: any;
|
|
47
|
+
};
|
|
48
|
+
dimension: {
|
|
49
|
+
sub: any;
|
|
50
|
+
category: any;
|
|
51
|
+
attrId: any;
|
|
52
|
+
userAttr: any;
|
|
53
|
+
eventAttr: any;
|
|
54
|
+
event: any;
|
|
55
|
+
} | null;
|
|
56
|
+
associatedPreAttr: any;
|
|
57
|
+
associatedNextAttr: any;
|
|
58
|
+
};
|
|
59
|
+
export declare function transformData(data: any[][]): string[];
|
|
@@ -48,4 +48,60 @@ export var getValue = function getValue(param, eventGroupList, eventEnvList, use
|
|
|
48
48
|
}
|
|
49
49
|
console.log('获取当前属性的全部数据', res);
|
|
50
50
|
return res;
|
|
51
|
-
};
|
|
51
|
+
};
|
|
52
|
+
export function searchCondition(params) {
|
|
53
|
+
var _params$filters, _params$filters2;
|
|
54
|
+
var numAttrTypeMap = {
|
|
55
|
+
1: 'cont-string',
|
|
56
|
+
2: 'cont-num',
|
|
57
|
+
3: 'cont-date'
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
operator: (params === null || params === void 0 ? void 0 : (_params$filters = params.filters) === null || _params$filters === void 0 ? void 0 : _params$filters.relation) || 'and',
|
|
61
|
+
eventId: params === null || params === void 0 ? void 0 : params.id,
|
|
62
|
+
eventName: params === null || params === void 0 ? void 0 : params.name,
|
|
63
|
+
condition: params === null || params === void 0 ? void 0 : (_params$filters2 = params.filters) === null || _params$filters2 === void 0 ? void 0 : _params$filters2.conditions.map(function (item) {
|
|
64
|
+
return {
|
|
65
|
+
name: item === null || item === void 0 ? void 0 : item.attrName,
|
|
66
|
+
attrId: item === null || item === void 0 ? void 0 : item.attrId,
|
|
67
|
+
params: item === null || item === void 0 ? void 0 : item.values,
|
|
68
|
+
attrSub: (item === null || item === void 0 ? void 0 : item.propCategory) === 'userProp' ? 'user_attr' : (item === null || item === void 0 ? void 0 : item.propCategory) === 'eventProp' ? 'event_attr' : item === null || item === void 0 ? void 0 : item.attrName,
|
|
69
|
+
category: (item === null || item === void 0 ? void 0 : item.category) || 'custom',
|
|
70
|
+
attrType: numAttrTypeMap[item === null || item === void 0 ? void 0 : item.type],
|
|
71
|
+
operator: item === null || item === void 0 ? void 0 : item.operator
|
|
72
|
+
};
|
|
73
|
+
})
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export function searchDataParams(params) {
|
|
77
|
+
var _params$time, _params$time2, _params$time3, _params$dimension, _params$dimension2, _params$dimension3, _params$dimension4, _params$dimension5, _params$dimension6, _params$dimension7, _params$dimension8, _params$dimension9, _params$dimension10, _params$dimension11, _params$dimension12, _params$associatedPre, _params$associatedNex;
|
|
78
|
+
return {
|
|
79
|
+
time: {
|
|
80
|
+
dimensionDate: params === null || params === void 0 ? void 0 : (_params$time = params.time) === null || _params$time === void 0 ? void 0 : _params$time.unit,
|
|
81
|
+
beginDate: params === null || params === void 0 ? void 0 : (_params$time2 = params.time) === null || _params$time2 === void 0 ? void 0 : _params$time2.begin,
|
|
82
|
+
endDate: params === null || params === void 0 ? void 0 : (_params$time3 = params.time) === null || _params$time3 === void 0 ? void 0 : _params$time3.end
|
|
83
|
+
},
|
|
84
|
+
platform: (params === null || params === void 0 ? void 0 : params.platform) || 0,
|
|
85
|
+
userGroup: params.userGroup,
|
|
86
|
+
start: searchCondition(params === null || params === void 0 ? void 0 : params.start),
|
|
87
|
+
end: searchCondition(params === null || params === void 0 ? void 0 : params.end),
|
|
88
|
+
dimension: params !== null && params !== void 0 && (_params$dimension = params.dimension) !== null && _params$dimension !== void 0 && _params$dimension.propCategory ? {
|
|
89
|
+
sub: (params === null || params === void 0 ? void 0 : (_params$dimension2 = params.dimension) === null || _params$dimension2 === void 0 ? void 0 : _params$dimension2.propCategory) === 'userProp' ? 'user_attr' : (params === null || params === void 0 ? void 0 : (_params$dimension3 = params.dimension) === null || _params$dimension3 === void 0 ? void 0 : _params$dimension3.propCategory) === 'eventProp' ? 'event_attr' : params === null || params === void 0 ? void 0 : (_params$dimension4 = params.dimension) === null || _params$dimension4 === void 0 ? void 0 : _params$dimension4.name,
|
|
90
|
+
category: (params === null || params === void 0 ? void 0 : (_params$dimension5 = params.dimension) === null || _params$dimension5 === void 0 ? void 0 : _params$dimension5.category) || 'custom',
|
|
91
|
+
attrId: params === null || params === void 0 ? void 0 : (_params$dimension6 = params.dimension) === null || _params$dimension6 === void 0 ? void 0 : _params$dimension6.id,
|
|
92
|
+
userAttr: (params === null || params === void 0 ? void 0 : (_params$dimension7 = params.dimension) === null || _params$dimension7 === void 0 ? void 0 : _params$dimension7.propCategory) === 'userProp' ? params === null || params === void 0 ? void 0 : (_params$dimension8 = params.dimension) === null || _params$dimension8 === void 0 ? void 0 : _params$dimension8.dimensionSub : null,
|
|
93
|
+
eventAttr: (params === null || params === void 0 ? void 0 : (_params$dimension9 = params.dimension) === null || _params$dimension9 === void 0 ? void 0 : _params$dimension9.propCategory) === 'eventProp' ? params === null || params === void 0 ? void 0 : (_params$dimension10 = params.dimension) === null || _params$dimension10 === void 0 ? void 0 : _params$dimension10.label : null,
|
|
94
|
+
event: (params === null || params === void 0 ? void 0 : (_params$dimension11 = params.dimension) === null || _params$dimension11 === void 0 ? void 0 : _params$dimension11.propCategory) !== 'envProp' ? params === null || params === void 0 ? void 0 : (_params$dimension12 = params.dimension) === null || _params$dimension12 === void 0 ? void 0 : _params$dimension12.eventId : null
|
|
95
|
+
} : null,
|
|
96
|
+
associatedPreAttr: params === null || params === void 0 ? void 0 : (_params$associatedPre = params.associatedPreAttr) === null || _params$associatedPre === void 0 ? void 0 : _params$associatedPre.id,
|
|
97
|
+
associatedNextAttr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export function transformData(data) {
|
|
101
|
+
return data[0].map(function (group) {
|
|
102
|
+
var _group$, _group$2;
|
|
103
|
+
var labelGroup = (_group$ = group[1]) === null || _group$ === void 0 ? void 0 : _group$.id;
|
|
104
|
+
var labelId = (_group$2 = group[2]) === null || _group$2 === void 0 ? void 0 : _group$2.layerLabelId;
|
|
105
|
+
return "".concat(labelGroup, ":").concat(labelId);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useEffect, useState } from 'react';
|
|
8
8
|
import { DemoWrapper, setGlobalConfig } from '@zgfe/business-lib';
|
|
9
|
-
import {
|
|
9
|
+
import { ModuleInterval } from "../../../index";
|
|
10
10
|
import { requestConfig } from "../../../utils/ajaxConfig";
|
|
11
11
|
import { Button } from 'antd';
|
|
12
12
|
var defaultValue = null;
|
|
@@ -32,9 +32,6 @@ export default (function () {
|
|
|
32
32
|
};
|
|
33
33
|
var onUserDrill = function onUserDrill(data, searchData) {
|
|
34
34
|
console.log('onUserDrill:', data, searchData);
|
|
35
|
-
setIsDetail(true);
|
|
36
|
-
setSearchParams(searchData);
|
|
37
|
-
setDetailParams(data);
|
|
38
35
|
};
|
|
39
36
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
40
37
|
needMeta: true,
|
|
@@ -43,7 +40,7 @@ export default (function () {
|
|
|
43
40
|
onClick: function onClick() {
|
|
44
41
|
return setIsDetail(false);
|
|
45
42
|
}
|
|
46
|
-
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(
|
|
43
|
+
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(ModuleInterval, {
|
|
47
44
|
defaultValue: searchParams,
|
|
48
45
|
afterEditTarget: afterEditTarget,
|
|
49
46
|
onUserDrill: onUserDrill
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useEffect, useState } from 'react';
|
|
8
8
|
import { DemoWrapper, setGlobalConfig } from '@zgfe/business-lib';
|
|
9
|
-
import {
|
|
9
|
+
import { ModuleInterval } from "../../../index";
|
|
10
10
|
import { requestConfig } from "../../../utils/ajaxConfig";
|
|
11
11
|
import { Button } from 'antd';
|
|
12
12
|
var defaultValue = {
|
|
@@ -71,9 +71,6 @@ export default (function () {
|
|
|
71
71
|
};
|
|
72
72
|
var onUserDrill = function onUserDrill(data, searchData) {
|
|
73
73
|
console.log('onUserDrill:', data, searchData);
|
|
74
|
-
setIsDetail(true);
|
|
75
|
-
setSearchParams(searchData);
|
|
76
|
-
setDetailParams(data);
|
|
77
74
|
};
|
|
78
75
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
79
76
|
needMeta: true,
|
|
@@ -82,7 +79,7 @@ export default (function () {
|
|
|
82
79
|
onClick: function onClick() {
|
|
83
80
|
return setIsDetail(false);
|
|
84
81
|
}
|
|
85
|
-
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(
|
|
82
|
+
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(ModuleInterval, {
|
|
86
83
|
defaultValue: searchParams,
|
|
87
84
|
afterEditTarget: afterEditTarget,
|
|
88
85
|
onUserDrill: onUserDrill
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { DemoWrapper, setGlobalConfig } from '@zgfe/business-lib';
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
|
-
import {
|
|
9
|
+
import { ModuleInterval } from "../../../index";
|
|
10
10
|
import "./styles/index.less";
|
|
11
11
|
import { requestConfig } from "../../../utils/ajaxConfig";
|
|
12
12
|
import { Button } from 'antd';
|
|
@@ -31,10 +31,7 @@ export default (function () {
|
|
|
31
31
|
console.log("".concat(type, "\u56DE\u8C03"), data);
|
|
32
32
|
};
|
|
33
33
|
var onUserDrill = function onUserDrill(data, searchData) {
|
|
34
|
-
console.log('onUserDrill:', data, searchData);
|
|
35
|
-
setIsDetail(true);
|
|
36
|
-
setSearchParams(searchData);
|
|
37
|
-
setDetailParams(data);
|
|
34
|
+
console.log('onUserDrill:111', data, searchData);
|
|
38
35
|
};
|
|
39
36
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
40
37
|
needMeta: true,
|
|
@@ -43,7 +40,7 @@ export default (function () {
|
|
|
43
40
|
onClick: function onClick() {
|
|
44
41
|
return setIsDetail(false);
|
|
45
42
|
}
|
|
46
|
-
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(
|
|
43
|
+
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(ModuleInterval, {
|
|
47
44
|
defaultValue: searchParams,
|
|
48
45
|
afterEditTarget: afterEditTarget,
|
|
49
46
|
onUserDrill: onUserDrill
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useEffect, useState } from 'react';
|
|
8
8
|
import { DemoWrapper, setGlobalConfig } from '@zgfe/business-lib';
|
|
9
|
-
import {
|
|
9
|
+
import { ModuleInterval } from "../../../index";
|
|
10
10
|
import { requestConfig } from "../../../utils/ajaxConfig";
|
|
11
11
|
import { Button } from 'antd';
|
|
12
12
|
var defaultValue = {
|
|
@@ -68,9 +68,6 @@ export default (function () {
|
|
|
68
68
|
};
|
|
69
69
|
var onUserDrill = function onUserDrill(data, searchData) {
|
|
70
70
|
console.log('onUserDrill:', data, searchData);
|
|
71
|
-
setIsDetail(true);
|
|
72
|
-
setSearchParams(searchData);
|
|
73
|
-
setDetailParams(data);
|
|
74
71
|
};
|
|
75
72
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
76
73
|
needMeta: true,
|
|
@@ -79,7 +76,7 @@ export default (function () {
|
|
|
79
76
|
onClick: function onClick() {
|
|
80
77
|
return setIsDetail(false);
|
|
81
78
|
}
|
|
82
|
-
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(
|
|
79
|
+
}, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(ModuleInterval, {
|
|
83
80
|
defaultValue: searchParams,
|
|
84
81
|
afterEditTarget: afterEditTarget,
|
|
85
82
|
onUserDrill: onUserDrill
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles/index.less';
|
|
3
3
|
import { EventProps } from './types';
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const ModuleInterval: React.FC<EventProps.Props>;
|
|
5
|
+
export default ModuleInterval;
|
|
@@ -18,8 +18,8 @@ import { EventContext } from "../../types";
|
|
|
18
18
|
import { getInitDate } from "../../constants/initData";
|
|
19
19
|
import EventContent from "../content";
|
|
20
20
|
import { chartTypes } from "../../constants";
|
|
21
|
-
var classPrefix = '
|
|
22
|
-
var
|
|
21
|
+
var classPrefix = 'interval-container';
|
|
22
|
+
var ModuleInterval = function ModuleInterval(props) {
|
|
23
23
|
// 属性
|
|
24
24
|
var _useContext = useContext(BizGlobalDataContext),
|
|
25
25
|
currentApp = _useContext.currentApp,
|
|
@@ -131,11 +131,12 @@ var ModuleEvent = function ModuleEvent(props) {
|
|
|
131
131
|
defaultValue: props.defaultValue ? props.defaultValue.data : undefined,
|
|
132
132
|
value: searchData,
|
|
133
133
|
show: showList,
|
|
134
|
+
onUserDrill: props.onUserDrill,
|
|
134
135
|
onChange: setSearchData,
|
|
135
136
|
initSearch: initSearch
|
|
136
137
|
})));
|
|
137
138
|
};
|
|
138
|
-
|
|
139
|
+
ModuleInterval.defaultProps = {
|
|
139
140
|
includeToday: true
|
|
140
141
|
};
|
|
141
|
-
export default
|
|
142
|
+
export default ModuleInterval;
|