@zgfe/modules-interval 1.0.10-qirui.4 → 1.0.10-zbfix.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.
Files changed (51) hide show
  1. package/dist/esm/assets/business/demo.css +539 -0
  2. package/dist/esm/assets/business/demo_index.html +3316 -0
  3. package/dist/esm/assets/business/iconfont.css +559 -0
  4. package/dist/esm/assets/business/iconfont.js +43 -0
  5. package/dist/esm/assets/business/iconfont.json +961 -0
  6. package/dist/esm/assets/business/iconfont.ttf +0 -0
  7. package/dist/esm/assets/business/iconfont.woff +0 -0
  8. package/dist/esm/assets/business/iconfont.woff2 +0 -0
  9. package/dist/esm/assets/icons/demo.css +539 -0
  10. package/dist/esm/assets/icons/demo_index.html +9618 -0
  11. package/dist/esm/assets/icons/iconfont.css +1655 -0
  12. package/dist/esm/assets/icons/iconfont.js +43 -0
  13. package/dist/esm/assets/icons/iconfont.json +2879 -0
  14. package/dist/esm/assets/icons/iconfont.ttf +0 -0
  15. package/dist/esm/assets/icons/iconfont.woff +0 -0
  16. package/dist/esm/assets/icons/iconfont.woff2 +0 -0
  17. package/dist/esm/components/common/styles/index.less +3 -3
  18. package/dist/esm/components/eventFilter/index.js +20 -17
  19. package/dist/esm/components/eventFilter/types.d.ts +3 -4
  20. package/dist/esm/components/renderContent/styles/index.less +0 -3
  21. package/dist/esm/components/searchPanel/index.js +4 -3
  22. package/dist/esm/components/table/index.js +4 -5
  23. package/dist/esm/components/topBar/index.js +4 -4
  24. package/dist/esm/components/topBar/types.d.ts +2 -3
  25. package/dist/esm/constants/apis.d.ts +5 -1
  26. package/dist/esm/constants/apis.js +4 -15
  27. package/dist/esm/modules/chart/index.js +3 -4
  28. package/dist/esm/modules/chart/intervalChart.js +1 -1
  29. package/dist/esm/modules/chart/types.d.ts +0 -1
  30. package/dist/esm/modules/content/index.js +44 -28
  31. package/dist/esm/modules/content/types.d.ts +3 -4
  32. package/dist/esm/modules/content/utils.d.ts +0 -2
  33. package/dist/esm/modules/content/utils.js +2 -4
  34. package/dist/esm/modules/home/demo/edit.js +1 -1
  35. package/dist/esm/modules/home/demo/index.js +15 -7
  36. package/dist/esm/modules/home/demo/scene.js +1 -1
  37. package/dist/esm/modules/home/index.d.ts +2 -2
  38. package/dist/esm/modules/home/index.js +46 -59
  39. package/dist/esm/modules/home/styles/index.less +0 -6
  40. package/dist/esm/modules/home/types.d.ts +4 -7
  41. package/dist/esm/modules/home/types.js +2 -2
  42. package/dist/esm/modules/topPanel/index.js +127 -246
  43. package/dist/esm/modules/topPanel/styles/index.less +2 -29
  44. package/dist/esm/modules/topPanel/types.d.ts +9 -6
  45. package/dist/esm/modules/topPanel/types.js +1 -5
  46. package/dist/esm/style/index.less +0 -14
  47. package/dist/esm/types.d.ts +28 -25
  48. package/dist/esm/types.js +1 -1
  49. package/dist/esm/utils/formData.d.ts +2 -7
  50. package/dist/esm/utils/formData.js +12 -64
  51. package/package.json +4 -7
@@ -1,9 +1,6 @@
1
1
  @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
2
 
3
3
  .mi-common-interval {
4
- .ant-spin-nested-loading {
5
- width: 100%;
6
- }
7
4
  &-loading-icon {
8
5
  z-index: 1000;
9
6
  display: inline-block;
@@ -38,3 +35,6 @@
38
35
  color: #ccc;
39
36
  }
40
37
  }
38
+ .ant-spin-nested-loading {
39
+ width: 100%;
40
+ }
@@ -10,7 +10,7 @@ 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 { Tooltip, message } from 'antd';
13
+ import { Switch, Tooltip, message } from 'antd';
14
14
  import React, { useEffect, useRef, useState } from 'react';
15
15
  import { BizEventSelector, IconFont, BizAttrConditionGroup } from '@zgfe/business-lib';
16
16
  import "./styles/index.less";
@@ -137,6 +137,9 @@ var EventFilter = function EventFilter(props) {
137
137
  delete _dimension.key;
138
138
  _event.dimension = _dimension;
139
139
  }
140
+ if (props.relevancy && relevancy !== undefined) {
141
+ _event.relevancy = relevancy;
142
+ }
140
143
  props.onChange && props.onChange(_event);
141
144
  }, [bizAttributeSelectorValue, filter, event, relevancy]);
142
145
  return /*#__PURE__*/React.createElement("div", {
@@ -146,24 +149,10 @@ var EventFilter = function EventFilter(props) {
146
149
  showBuiltInTarget: false,
147
150
  popupContainer: false,
148
151
  defaultSelectAble: false,
149
- destroyPopupOnHide: true,
150
152
  value: {
151
153
  event: event
152
154
  },
153
155
  onChange: onChangeEvent,
154
- filter: function filter(event) {
155
- if (!props.subject) return true;
156
- var propMatch = false;
157
- for (var i = 0; i < event.attrList.length; i++) {
158
- var _props$subject;
159
- var attr = event.attrList[i];
160
- if (attr.label === ((_props$subject = props.subject) === null || _props$subject === void 0 ? void 0 : _props$subject.subjectName)) {
161
- propMatch = true;
162
- break;
163
- }
164
- }
165
- return propMatch;
166
- },
167
156
  placeholder: "\u8BF7\u9009\u62E9\u4E8B\u4EF6"
168
157
  }), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
169
158
  placement: "top",
@@ -174,13 +163,27 @@ var EventFilter = function EventFilter(props) {
174
163
  onClick: function onClick() {
175
164
  return onAdd();
176
165
  }
177
- })))), (filter || isAdd) && /*#__PURE__*/React.createElement("div", {
166
+ }))), props !== null && props !== void 0 && props.relevancy ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
167
+ placement: "top",
168
+ title: props.relevancyFl ? '请选择开始和结束事件' : ''
169
+ }, /*#__PURE__*/React.createElement(Switch, {
170
+ size: "default",
171
+ style: {
172
+ marginLeft: 24
173
+ },
174
+ checked: relevancy && !props.relevancyFl,
175
+ onChange: function onChange(checked) {
176
+ return setRelevancy(checked);
177
+ }
178
+ })), /*#__PURE__*/React.createElement("span", {
179
+ className: "switch-title"
180
+ }, "\u8BBE\u7F6E\u5173\u8054\u5C5E\u6027")) : ''), (filter || isAdd) && /*#__PURE__*/React.createElement("div", {
178
181
  className: "".concat(count > 0 ? 'attr-box-show' : '', " top")
179
182
  }, /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
180
183
  ref: conditionRef,
181
184
  value: filter,
185
+ onlyAnd: true,
182
186
  enableEventProp: true,
183
- enableUserProp: props.analysisType === 'user',
184
187
  enableDelete: true,
185
188
  eventIdList: [event.id],
186
189
  onChange: onChangeFilters,
@@ -1,4 +1,3 @@
1
- import SubjectTypes from '@zgfe/business-lib/es/hooks/types/subject';
2
1
  import { eventProps } from '../../types';
3
2
  /**
4
3
  * 事件属性
@@ -47,7 +46,7 @@ export interface ConditionsnProps {
47
46
  export interface EventFilterProps {
48
47
  id?: string;
49
48
  value?: eventProps;
50
- subject?: SubjectTypes.Subject;
51
- analysisType?: 'user' | 'eventProp';
52
- onChange?: (event: eventProps) => void;
49
+ relevancyFl?: boolean;
50
+ relevancy?: boolean;
51
+ onChange?: (event: eventProps) => {};
53
52
  }
@@ -29,8 +29,5 @@
29
29
  align-items: center;
30
30
  justify-content: center;
31
31
  min-height: 300px;
32
- .biz-loading-wrapper {
33
- width: 100%;
34
- }
35
32
  }
36
33
  }
@@ -13,12 +13,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { BizDatePicker, BizSelect } from '@zgfe/business-lib';
14
14
  import React, { useContext, useEffect, useState } from 'react';
15
15
  import { chartTypeOptions, getInitDate } from "../../constants";
16
- import { IntervalContext } from "../../types";
16
+ import { EventContext } from "../../types";
17
17
  import "./styles/index.less";
18
18
  import { extractNames } from "../../utils/formData";
19
19
  var classPrefix = 'search-panel-interval';
20
20
  var SearchPanel = function SearchPanel(props) {
21
- var _useContext = useContext(IntervalContext),
21
+ var _useContext = useContext(EventContext),
22
22
  includeToday = _useContext.includeToday;
23
23
  // 当前时间段
24
24
  var _useState = useState(props.time || getInitDate(includeToday)),
@@ -105,8 +105,9 @@ var SearchPanel = function SearchPanel(props) {
105
105
  display: 'flex'
106
106
  }
107
107
  }, /*#__PURE__*/React.createElement(BizDatePicker, {
108
- dateTypeList: ['day', 'week', 'month', 'custom'],
108
+ dateTypeList: ['day', 'week', 'month'],
109
109
  value: time,
110
+ mode: "simple",
110
111
  includeToday: true,
111
112
  onChange: onChangeTime
112
113
  }), /*#__PURE__*/React.createElement(BizSelect, {
@@ -17,7 +17,7 @@ import { message } from 'antd';
17
17
  import { formTableData, getColumns } from "../../utils/formData";
18
18
  import "./styles/index.less";
19
19
  import { searchDataParams } from "../../modules/content/utils";
20
- import { IntervalContext } from "../../types";
20
+ import { EventContext } from "../../types";
21
21
  var classPrefix = 'mi-interval-table';
22
22
  var EventTable = function EventTable(props) {
23
23
  var _dataSource$appData2;
@@ -36,9 +36,8 @@ var EventTable = function EventTable(props) {
36
36
  eventEnvList = _useContext.eventEnvList,
37
37
  userPropList = _useContext.userPropList,
38
38
  authority = _useContext.authority;
39
- var _useContext2 = useContext(IntervalContext),
40
- panelName = _useContext2.panelName,
41
- onUserDrill = _useContext2.onUserDrill;
39
+ var _useContext2 = useContext(EventContext),
40
+ panelName = _useContext2.panelName;
42
41
 
43
42
  // 按属性排序后的数据(用于合并行)
44
43
  var _useState3 = useState({
@@ -71,7 +70,7 @@ var EventTable = function EventTable(props) {
71
70
  var _dataSource$appData;
72
71
  var _searchData$userGroup = searchData.userGroup,
73
72
  userGroup = _searchData$userGroup === void 0 ? [0] : _searchData$userGroup;
74
- var _getColumns = getColumns(eventGroupList, userPropList, eventEnvList, (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$appData = dataSource.appData) === null || _dataSource$appData === void 0 ? void 0 : _dataSource$appData.x_axis) || [], dataSource, userGroup, searchData, showList, onUserDrill);
73
+ var _getColumns = getColumns(eventGroupList, userPropList, eventEnvList, (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$appData = dataSource.appData) === null || _dataSource$appData === void 0 ? void 0 : _dataSource$appData.x_axis) || [], dataSource, userGroup, searchData, showList);
75
74
  return _getColumns;
76
75
  }, [dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$appData2 = dataSource.appData) === null || _dataSource$appData2 === void 0 ? void 0 : _dataSource$appData2.x_axis, showList, sortTable, panelName]);
77
76
 
@@ -14,12 +14,12 @@ import { Button } from 'antd';
14
14
  import React, { useContext, useEffect, useState } from 'react';
15
15
  import { BizAddToPanel, BizAddToScene, BizGlobalDataContext } from '@zgfe/business-lib';
16
16
  import "./styles/index.less";
17
- import { IntervalContext } from "../../types";
17
+ import { EventContext } from "../../types";
18
18
  import { chartTypes, platformOption } from "../../constants/fields";
19
19
  import { appVersionType } from '@zgfe/business-lib/es/context';
20
20
  var classPrefix = 'modules-interval-topbar';
21
21
  var TopBar = function TopBar(props) {
22
- var _useContext = useContext(IntervalContext),
22
+ var _useContext = useContext(EventContext),
23
23
  panelId = _useContext.panelId,
24
24
  afterEditTarget = _useContext.afterEditTarget;
25
25
  var _useState = useState(false),
@@ -105,7 +105,7 @@ var TopBar = function TopBar(props) {
105
105
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
106
106
  module: 'interval'
107
107
  }, searchData), {}, {
108
- chartType: 'boxplot'
108
+ chartType: 'line'
109
109
  }),
110
110
  onOk: function onOk(data) {
111
111
  return _onOk('scene', data);
@@ -118,7 +118,7 @@ var TopBar = function TopBar(props) {
118
118
  type: "primary",
119
119
  disabled: showLoading || !authority[100143],
120
120
  onClick: function onClick() {
121
- props.onJumpWarning({
121
+ props.onUserDrill({
122
122
  appId: Number(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId),
123
123
  module: 'interval',
124
124
  platform: 0,
@@ -1,5 +1,4 @@
1
- import { IntervalProps } from '../../modules/home/types';
2
- import { ResponseDataProps, SearchValue } from '../../types';
1
+ import { ResponseDataProps, SearchValue, UserDrillParamsProp } from '../../types';
3
2
  export interface TopBarProps {
4
3
  /**
5
4
  * @description 标题
@@ -7,6 +6,6 @@ export interface TopBarProps {
7
6
  searchData?: SearchValue;
8
7
  loading?: boolean;
9
8
  eventData?: ResponseDataProps;
10
- onJumpWarning: IntervalProps.Props['onJumpWarning'];
9
+ onUserDrill: (data: UserDrillParamsProp, searchData: SearchValue) => void;
11
10
  platformChange: (data: number) => void;
12
11
  }
@@ -1,2 +1,6 @@
1
- declare const Apis: Record<string, string>;
1
+ declare const Apis: {
2
+ dataList: string;
3
+ getEventDataSql: string;
4
+ eventDownloadReport: string;
5
+ };
2
6
  export default Apis;
@@ -1,18 +1,7 @@
1
1
  var Apis = {
2
- dataList: '/interval/intervalData',
3
- getEventDataSql: '/dataSql/getEventDataSql',
4
- eventDownloadReport: '/interval/downLoadintervalData',
5
- /**
6
- * 用户下钻
7
- */
8
- userDrill: '/interval/userDrill',
9
- /**
10
- * 主体下钻
11
- */
12
- subjectDrill: '/interval/eventDrill',
13
- querySubjectDisplay: '/analysisSubject/querySubDisplay'
2
+ // dataList: '/zg/web/v2/data/eventDataList',
3
+ dataList: '/zg/web/v2/interval/intervalData',
4
+ getEventDataSql: '/zg/web/v2/dataSql/getEventDataSql',
5
+ eventDownloadReport: '/zg/web/v2/interval/downLoadintervalData'
14
6
  };
15
- for (var key in Apis) {
16
- Apis[key] = "/zg/web/v2".concat(Apis[key]);
17
- }
18
7
  export default Apis;
@@ -97,13 +97,12 @@ var IntervalEventChart = function IntervalEventChart(props) {
97
97
  dataSource: dataSource,
98
98
  showList: showList,
99
99
  dataSourceList: dataSourceList,
100
- params: params,
101
- onlyChart: props.onlyChart
102
- }), !props.onlyChart && /*#__PURE__*/React.createElement(EventTable, {
100
+ params: params
101
+ }), (params === null || params === void 0 ? void 0 : params.chartType) === 'line' ? /*#__PURE__*/React.createElement(EventTable, {
103
102
  dataSource: dataSource,
104
103
  searchData: params,
105
104
  showList: [],
106
105
  changeShow: onChangeShow
107
- }));
106
+ }) : null);
108
107
  };
109
108
  export default IntervalEventChart;
@@ -87,7 +87,7 @@ var IntervalChart = function IntervalChart(props) {
87
87
  right: 3,
88
88
  height: 20 // 设置内置的dataZoom的高度
89
89
  }, {
90
- show: props.onlyChart ? false : true,
90
+ show: (params === null || params === void 0 ? void 0 : params.module) === 'interval' ? false : true,
91
91
  type: 'slider',
92
92
  bottom: '38px',
93
93
  xAxisIndex: [0],
@@ -13,7 +13,6 @@ export declare namespace eventChartProps {
13
13
  */
14
14
  dataSource?: ChartTypesProps;
15
15
  dataSourceList?: DisplaySetup[];
16
- onlyChart?: boolean;
17
16
  /**
18
17
  * 查询条件
19
18
  */
@@ -14,13 +14,14 @@ import { ajax, BizGlobalDataContext, BizLayout, BizTargetFromPanelContext } from
14
14
  import React, { useContext, useEffect, useRef, useState } from 'react';
15
15
  import Request from 'umi-request';
16
16
  import TopBar from "../../components/topBar";
17
- import { IntervalContext } from "../../types";
17
+ import { EventContext } from "../../types";
18
18
  import "./styles/index.less";
19
19
  import { Apis } from "../../constants";
20
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
+ var timer = 0;
24
25
  var CancelToken = Request.CancelToken;
25
26
  var cancel;
26
27
  var classPrefix = 'interval-content';
@@ -55,11 +56,15 @@ var EventContent = function EventContent(props) {
55
56
  _useState12 = _slicedToArray(_useState11, 2),
56
57
  isCity = _useState12[0],
57
58
  setIsCity = _useState12[1];
58
- var _useState13 = useState(-1),
59
+ var _useState13 = useState(false),
59
60
  _useState14 = _slicedToArray(_useState13, 2),
60
- eventId = _useState14[0],
61
- setEventId = _useState14[1];
62
- var _useContext2 = useContext(IntervalContext),
61
+ ajaxFlag = _useState14[0],
62
+ setAjaxFlag = _useState14[1];
63
+ var _useState15 = useState(-1),
64
+ _useState16 = _slicedToArray(_useState15, 2),
65
+ eventId = _useState16[0],
66
+ setEventId = _useState16[1];
67
+ var _useContext2 = useContext(EventContext),
63
68
  searchData = _useContext2.searchData,
64
69
  setSearchData = _useContext2.setSearchData,
65
70
  eventGroupList = _useContext2.eventGroupList,
@@ -67,17 +72,11 @@ var EventContent = function EventContent(props) {
67
72
  userPropList = _useContext2.userPropList;
68
73
  var _useContext3 = useContext(BizTargetFromPanelContext),
69
74
  handleSearch = _useContext3.handleSearch;
70
- var _useState15 = useState(),
71
- _useState16 = _slicedToArray(_useState15, 2),
72
- searchTimer = _useState16[0],
73
- setSearchTimer = _useState16[1];
74
75
  var collapseRef = useRef();
75
76
  // 初始化
76
77
  useEffect(function () {
77
78
  if (props.defaultValue) {
78
79
  setEventId(props.defaultValue.id);
79
- } else {
80
- setLoading(false);
81
80
  }
82
81
  }, [props.defaultValue]);
83
82
  useEffect(function () {
@@ -89,28 +88,42 @@ var EventContent = function EventContent(props) {
89
88
  setIsCity(judgeIsCity(_attrName));
90
89
  }
91
90
  }
92
- if (!searchData || !searchData.analysisModel) return;
93
- if (searchTimer) clearTimeout(searchTimer);
94
- setSearchTimer(setTimeout(function () {
95
- fetchRequest();
96
- }, 300));
91
+ if (timer) clearTimeout(timer);
92
+ var flag = true;
93
+ timer = setTimeout(function () {
94
+ if (flag) {
95
+ fetchRequest(false);
96
+ }
97
+ }, 500);
97
98
  return function () {
98
- clearTimeout(searchTimer);
99
+ // 清理异步任务
100
+ if (timer) clearTimeout(timer);
101
+ flag = false;
99
102
  };
100
103
  }, [searchData]);
101
104
  useEffect(function () {
102
105
  handleSearch && handleSearch(loading);
103
106
  }, [loading]);
104
-
107
+ useEffect(function () {
108
+ if (ajaxFlag) {
109
+ fetchRequest(true);
110
+ }
111
+ }, [ajaxFlag]);
105
112
  // 查询
106
- var fetchRequest = function fetchRequest() {
113
+ var fetchRequest = function fetchRequest(flag) {
107
114
  var _searchData$start, _searchData$end, _searchData$associate, _searchData$associate2, _searchData$associate3;
115
+ if (flag !== undefined) setAjaxFlag(flag);
116
+ if (!ajaxFlag) return;
108
117
  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$end = searchData.end) === null || _searchData$end === void 0 ? void 0 : _searchData$end.id) === null) {
109
118
  setLoading(false);
110
119
  return;
111
120
  }
112
121
  setEventData(undefined);
113
122
  setLoading(true);
123
+ // 取消上次未完成的请求
124
+ // if (typeof cancel === 'function') {
125
+ // cancel();
126
+ // }
114
127
  if (searchData !== null && searchData !== void 0 && (_searchData$associate = searchData.associatedNextAttr) !== null && _searchData$associate !== void 0 && _searchData$associate.type && (searchData === null || searchData === void 0 ? void 0 : (_searchData$associate2 = searchData.associatedPreAttr) === null || _searchData$associate2 === void 0 ? void 0 : _searchData$associate2.type) !== (searchData === null || searchData === void 0 ? void 0 : (_searchData$associate3 = searchData.associatedNextAttr) === null || _searchData$associate3 === void 0 ? void 0 : _searchData$associate3.type)) {
115
128
  setLoading(false);
116
129
  return message.error('您查询的属性不一致,暂不支持查询');
@@ -146,6 +159,7 @@ var EventContent = function EventContent(props) {
146
159
  setSearchData(function (value) {
147
160
  return _objectSpread(_objectSpread({}, value), data);
148
161
  });
162
+ setAjaxFlag(true);
149
163
  };
150
164
 
151
165
  // 改变显示内容
@@ -160,26 +174,25 @@ var EventContent = function EventContent(props) {
160
174
  platform: data
161
175
  });
162
176
  });
177
+ setTimeout(function () {
178
+ setAjaxFlag(true);
179
+ }, 100);
163
180
  };
164
181
 
165
182
  // TopPanel组件数值变更
166
- var onChangeSearch = function onChangeSearch(data) {
183
+ var onChangeSearch = function onChangeSearch(data, flag) {
167
184
  data.id ? setEventId(data.id) : setEventId(-1);
168
185
  setSearchData(function (_searchData) {
169
- return _objectSpread(_objectSpread({}, data), {}, {
170
- time: _searchData.time,
171
- platform: _searchData.platform,
172
- userGroup: data.analysisSubject ? undefined : data.userGroup,
173
- analysisSubject: data.analysisSubject ? data.analysisSubject : undefined
174
- });
186
+ return _objectSpread(_objectSpread({}, _searchData), data);
175
187
  });
188
+ setAjaxFlag(false);
176
189
  };
177
190
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TopBar, {
178
191
  searchData: searchData,
179
192
  loading: loading,
180
193
  eventData: eventData,
181
194
  platformChange: platformChange,
182
- onJumpWarning: props.onJumpWarning
195
+ onUserDrill: props.onUserDrill
183
196
  }), /*#__PURE__*/React.createElement(BizLayout, {
184
197
  showTitle: false,
185
198
  hasCollapse: true,
@@ -189,8 +202,11 @@ var EventContent = function EventContent(props) {
189
202
  collapseRef: collapseRef,
190
203
  onChange: onChangeSearch,
191
204
  defaultValue: searchData,
205
+ urlParam: props.urlParam,
206
+ ajaxFlag: ajaxFlag,
192
207
  loading: loading,
193
- finalSearchData: finalSearchData
208
+ finalSearchData: finalSearchData,
209
+ fetchRequest: fetchRequest
194
210
  })
195
211
  }, /*#__PURE__*/React.createElement("div", {
196
212
  className: classPrefix
@@ -1,5 +1,4 @@
1
- import { SearchValue } from '../../types';
2
- import { IntervalProps } from '../home/types';
1
+ import { SearchValue, UserDrillParamsProp } from '../../types';
3
2
  export declare namespace EventContentProps {
4
3
  interface Props {
5
4
  /**
@@ -10,6 +9,7 @@ export declare namespace EventContentProps {
10
9
  * 默认值
11
10
  */
12
11
  value: SearchValue;
12
+ urlParam?: SearchValue;
13
13
  /**
14
14
  * 展示列表
15
15
  */
@@ -18,8 +18,7 @@ export declare namespace EventContentProps {
18
18
  * 是否查询中
19
19
  */
20
20
  onSearching?: (flag: boolean) => void;
21
- onUserDrill: IntervalProps.Props['onUserDrill'];
22
- onJumpWarning: IntervalProps.Props['onJumpWarning'];
21
+ onUserDrill: (data: UserDrillParamsProp, searchData: SearchValue) => void;
23
22
  /**
24
23
  * 查询条件回调
25
24
  */
@@ -51,7 +51,5 @@ export declare function searchDataParams(params: any): {
51
51
  } | null;
52
52
  associatedPreAttr: any;
53
53
  associatedNextAttr: any;
54
- analysisModel: any;
55
- analysisSubject: any;
56
54
  };
57
55
  export declare function transformData(data: any[][]): string[];
@@ -91,14 +91,12 @@ export function searchDataParams(params) {
91
91
  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,
92
92
  category: (params === null || params === void 0 ? void 0 : (_params$dimension5 = params.dimension) === null || _params$dimension5 === void 0 ? void 0 : _params$dimension5.category) || 'custom',
93
93
  attrId: params === null || params === void 0 ? void 0 : (_params$dimension6 = params.dimension) === null || _params$dimension6 === void 0 ? void 0 : _params$dimension6.id,
94
- 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.name : null,
94
+ 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,
95
95
  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,
96
96
  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
97
97
  } : null,
98
98
  associatedPreAttr: params === null || params === void 0 ? void 0 : (_params$associatedPre = params.associatedPreAttr) === null || _params$associatedPre === void 0 ? void 0 : _params$associatedPre.id,
99
- associatedNextAttr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id,
100
- analysisModel: params.analysisModel,
101
- analysisSubject: params.analysisSubject
99
+ associatedNextAttr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id
102
100
  };
103
101
  }
104
102
  export function transformData(data) {
@@ -17,7 +17,7 @@ var defaultValue = {
17
17
  panelId: 400900,
18
18
  panelType: 'edit',
19
19
  data: {
20
- chartType: 'boxplot',
20
+ chartType: 'line',
21
21
  analysisIndex: 'per',
22
22
  id: 7565,
23
23
  name: '测试6666',
@@ -17,11 +17,17 @@ export default (function () {
17
17
  isDetail = _useState2[0],
18
18
  setIsDetail = _useState2[1];
19
19
  var _useState3 = useState(),
20
- _useState4 = _slicedToArray(_useState3, 1),
21
- detailParams = _useState4[0];
20
+ _useState4 = _slicedToArray(_useState3, 2),
21
+ detailParams = _useState4[0],
22
+ setDetailParams = _useState4[1];
22
23
  var _useState5 = useState(),
23
- _useState6 = _slicedToArray(_useState5, 1),
24
- searchParams = _useState6[0];
24
+ _useState6 = _slicedToArray(_useState5, 2),
25
+ searchParams = _useState6[0],
26
+ setSearchParams = _useState6[1];
27
+ var _useState7 = useState(),
28
+ _useState8 = _slicedToArray(_useState7, 2),
29
+ urlParam = _useState8[0],
30
+ setUrlParam = _useState8[1];
25
31
  useEffect(function () {
26
32
  setGlobalConfig(requestConfig);
27
33
  }, []);
@@ -32,14 +38,16 @@ export default (function () {
32
38
  console.log('onUserDrill:111', data, searchData);
33
39
  };
34
40
  return /*#__PURE__*/React.createElement(DemoWrapper, {
35
- needMeta: true
41
+ needMeta: true,
42
+ defaultApp: 204
36
43
  }, isDetail ? /*#__PURE__*/React.createElement("div", null, JSON.stringify(detailParams), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Button, {
37
44
  onClick: function onClick() {
38
45
  return setIsDetail(false);
39
46
  }
40
47
  }, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(ModuleInterval, {
48
+ defaultValue: searchParams,
49
+ urlParam: urlParam,
41
50
  afterEditTarget: afterEditTarget,
42
- onUserDrill: onUserDrill,
43
- onJumpWarning: function onJumpWarning() {}
51
+ onUserDrill: onUserDrill
44
52
  }));
45
53
  });
@@ -13,7 +13,7 @@ var defaultValue = {
13
13
  data: {
14
14
  module: 'event',
15
15
  analysisIndex: 'times',
16
- chartType: 'boxplot',
16
+ chartType: 'line',
17
17
  name: 'wqeqwe',
18
18
  time: {
19
19
  unit: 'day',
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import './styles/index.less';
3
- import { IntervalProps } from './types';
4
- declare const ModuleInterval: React.FC<IntervalProps.Props>;
3
+ import { EventProps } from './types';
4
+ declare const ModuleInterval: React.FC<EventProps.Props>;
5
5
  export default ModuleInterval;