@zgfe/modules-interval 1.0.23-zhongyuan.1 → 1.0.23-zhongyuan.3

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.
@@ -35,7 +35,8 @@ var EventTable = function EventTable(props) {
35
35
  eventGroupList = _useContext$eventGrou === void 0 ? [] : _useContext$eventGrou,
36
36
  eventEnvList = _useContext.eventEnvList,
37
37
  userPropList = _useContext.userPropList,
38
- authority = _useContext.authority;
38
+ authority = _useContext.authority,
39
+ showProdDownload = _useContext.showProdDownload;
39
40
  var _useContext2 = useContext(IntervalContext),
40
41
  panelName = _useContext2.panelName,
41
42
  onUserDrill = _useContext2.onUserDrill;
@@ -107,7 +108,7 @@ var EventTable = function EventTable(props) {
107
108
  className: classPrefix
108
109
  }, /*#__PURE__*/React.createElement("div", {
109
110
  className: "".concat(classPrefix, "-table-header")
110
- }, /*#__PURE__*/React.createElement("span", null, "\u6307\u6807\u8BE6\u60C5"), authority[100059] && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
111
+ }, /*#__PURE__*/React.createElement("span", null, "\u6307\u6807\u8BE6\u60C5"), authority[100059] && showProdDownload && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
111
112
  onClick: download
112
113
  }, /*#__PURE__*/React.createElement(IconFont, {
113
114
  type: "xiazai1"
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @description 异常状态码
3
+ */
4
+ export declare const ERROR_RESPONESE_CODE: {
5
+ /**
6
+ * @description 刷新失败
7
+ */
8
+ REFRESH_FAIL: string;
9
+ /**
10
+ * @description 用户群或标签查询异常
11
+ */
12
+ EXCEPTION: string;
13
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @description 异常状态码
3
+ */
4
+ export var ERROR_RESPONESE_CODE = {
5
+ /**
6
+ * @description 刷新失败
7
+ */
8
+ REFRESH_FAIL: '100080',
9
+ /**
10
+ * @description 用户群或标签查询异常
11
+ */
12
+ EXCEPTION: '100081'
13
+ };
@@ -17,9 +17,11 @@ import { extractNames, getDefaultShow } from "../../utils/formData";
17
17
  import { Apis } from "../../constants";
18
18
  import IntervalChart from "./intervalChart";
19
19
  import { searchDataParams } from "../content/utils";
20
+ import { ERROR_RESPONESE_CODE } from "../../constants/code";
20
21
  var IntervalEventChart = function IntervalEventChart(props) {
21
22
  var _dataSource$appData2;
22
- var params = props.params;
23
+ var params = props.params,
24
+ onChangeException = props.onChangeException;
23
25
  // 显示内容
24
26
  var _useState = useState(),
25
27
  _useState2 = _slicedToArray(_useState, 2),
@@ -66,12 +68,17 @@ var IntervalEventChart = function IntervalEventChart(props) {
66
68
  method: 'post',
67
69
  data: _objectSpread(_objectSpread({
68
70
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
69
- }, params), obj)
71
+ }, params), obj),
72
+ intercept: false
70
73
  }).then(function (res) {
74
+ setLoading(false);
71
75
  if (!res) {
72
76
  return;
73
77
  }
74
- setLoading(false);
78
+ if (res.code == ERROR_RESPONESE_CODE.EXCEPTION) {
79
+ onChangeException === null || onChangeException === void 0 ? void 0 : onChangeException();
80
+ return;
81
+ }
75
82
  setDataSource(res.data);
76
83
  }).catch(function () {
77
84
  setLoading(false);
@@ -41,7 +41,7 @@ var IntervalChart = function IntervalChart(props) {
41
41
  top: '10',
42
42
  left: '0',
43
43
  right: '0',
44
- bottom: '68px',
44
+ bottom: props.onlyChart ? '0' : '68px',
45
45
  containLabel: true
46
46
  },
47
47
  xAxis: {
@@ -34,5 +34,10 @@ export declare namespace eventChartProps {
34
34
  * 改变显示内容
35
35
  */
36
36
  onChangeShow?: (data: string[]) => void;
37
+ /**
38
+ *
39
+ * 指标异常回调
40
+ */
41
+ onChangeException?: () => void;
37
42
  }
38
43
  }
@@ -1,15 +1,15 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
2
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
5
  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
6
  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
7
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
13
  import { ajax, BizGlobalDataContext, BizLayout, BizTargetFromPanelContext } from '@zgfe/business-lib';
14
14
  import React, { useContext, useEffect, useRef, useState } from 'react';
15
15
  import Request from 'umi-request';
@@ -21,11 +21,15 @@ 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
+ import { ERROR_RESPONESE_CODE } from "../../constants/code";
24
25
  var CancelToken = Request.CancelToken;
25
26
  var cancel;
26
27
  var refresh = false;
27
28
  var timer = 0;
28
29
  var classPrefix = 'interval-content';
30
+ var RESPONESE_CODE = _objectSpread({
31
+ SUCCESS: '100000'
32
+ }, ERROR_RESPONESE_CODE);
29
33
  var EventContent = function EventContent(props) {
30
34
  // 最后的查询数据(防止图表在还没查询时就改变了类型)
31
35
  var _useState = useState(props.value),
@@ -69,7 +73,8 @@ var EventContent = function EventContent(props) {
69
73
  eventEnvList = _useContext2.eventEnvList,
70
74
  userPropList = _useContext2.userPropList,
71
75
  setRefreshLoading = _useContext2.setRefreshLoading,
72
- panelId = _useContext2.panelId;
76
+ panelId = _useContext2.panelId,
77
+ setException = _useContext2.setException;
73
78
  var _useContext3 = useContext(BizTargetFromPanelContext),
74
79
  handleSearch = _useContext3.handleSearch;
75
80
  var collapseRef = useRef();
@@ -91,6 +96,7 @@ var EventContent = function EventContent(props) {
91
96
  }
92
97
  }
93
98
  if (!searchData || !searchData.analysisModel) return;
99
+ if (!refresh) setLoading(true);
94
100
  if (timer) clearTimeout(timer);
95
101
  var flag = true;
96
102
  timer = setTimeout(function () {
@@ -111,14 +117,18 @@ var EventContent = function EventContent(props) {
111
117
  // 查询
112
118
  var fetchRequest = function fetchRequest() {
113
119
  var _searchData$start, _searchData$end, _searchData$associate, _searchData$associate2, _searchData$associate3;
120
+ if (typeof cancel == 'function') {
121
+ cancel();
122
+ cancel = undefined;
123
+ }
114
124
  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) {
115
- setLoading(false);
125
+ loadingHandle();
116
126
  return;
117
127
  }
118
- setEventData(undefined);
119
- if (!refresh) setLoading(true);
128
+ if (!refresh) loadingHandle();
129
+ setException(false);
120
130
  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)) {
121
- setLoading(false);
131
+ loadingHandle();
122
132
  return message.error('您查询的属性不一致,暂不支持查询');
123
133
  }
124
134
  var params = searchDataParams(searchData);
@@ -128,28 +138,47 @@ var EventContent = function EventContent(props) {
128
138
  data: _objectSpread(_objectSpread({
129
139
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
130
140
  }, params), {}, {
141
+ snapshotId: searchData === null || searchData === void 0 ? void 0 : searchData.snapshotId,
131
142
  refresh: refresh
132
143
  }),
144
+ intercept: false,
133
145
  cancelToken: new CancelToken(function executor(c) {
134
146
  cancel = c;
135
147
  })
136
148
  }).then(function (res) {
137
- setRefreshLoading(false);
138
- if (!res) {
139
- setLoading(false);
149
+ // 根据接口 code 判断后续的处理逻辑, 优先处理异常错误code
150
+ // EXCEPTION 可能发生在正常查询及刷新中
151
+ if ((res === null || res === void 0 ? void 0 : res.code) == RESPONESE_CODE.EXCEPTION) {
152
+ setException(true);
153
+ loadingHandle();
154
+ return;
155
+ }
156
+ // 处理其他非成功情况
157
+ if (res.code != RESPONESE_CODE.SUCCESS) {
158
+ message.error(res === null || res === void 0 ? void 0 : res.msg);
159
+ loadingHandle();
140
160
  return;
141
161
  }
142
162
  var result = res.data;
143
163
  setEventData(result);
144
164
  setFinalSearchData(_objectSpread({}, searchData));
145
- setTimeout(function () {
146
- setLoading(false);
147
- }, 0);
165
+ loadingHandle();
148
166
  }).catch(function () {
149
- setLoading(false);
167
+ loadingHandle();
150
168
  });
151
169
  };
152
170
 
171
+ // 关闭loading
172
+ var loadingHandle = function loadingHandle() {
173
+ // 使用setTimeout放到宏任务队列中
174
+ // 预防在loading关闭时,数据还在变动中,这会导致渲染展示的还是上次查询的数据
175
+ setTimeout(function () {
176
+ setLoading && setLoading(false);
177
+ setRefreshLoading && setRefreshLoading(false);
178
+ refresh = false;
179
+ }, 0);
180
+ };
181
+
153
182
  // 立即刷新
154
183
  var refreshHandle = function refreshHandle() {
155
184
  refresh = true;
@@ -190,8 +219,8 @@ var EventContent = function EventContent(props) {
190
219
  return _objectSpread(_objectSpread({}, data), {}, {
191
220
  time: _searchData.time,
192
221
  platform: _searchData.platform || 0,
193
- userGroup: data.analysisSubject ? undefined : data.userGroup,
194
- analysisSubject: data.analysisSubject ? data.analysisSubject : undefined
222
+ userGroup: data !== null && data !== void 0 && data.analysisSubject ? undefined : data.userGroup,
223
+ analysisSubject: data !== null && data !== void 0 && data.analysisSubject ? data === null || data === void 0 ? void 0 : data.analysisSubject : undefined
195
224
  });
196
225
  });
197
226
  };
@@ -212,6 +241,7 @@ var EventContent = function EventContent(props) {
212
241
  collapseRef: collapseRef,
213
242
  onChange: onChangeSearch,
214
243
  defaultValue: searchData,
244
+ propsDefaultValue: props.defaultValue,
215
245
  loading: loading,
216
246
  finalSearchData: finalSearchData
217
247
  })
@@ -48,7 +48,6 @@ export declare function searchDataParams(params: any): {
48
48
  userAttr: any;
49
49
  eventAttr: any;
50
50
  event: any;
51
- encryptionType: any;
52
51
  } | null;
53
52
  associatedPreAttr: any;
54
53
  associatedNextAttr: any;
@@ -4,30 +4,30 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- /**
8
- * 判断当前细分属性是否为”城市“
9
- * @param name 属性名称
10
- * @returns true标识为:是城市
7
+ /**
8
+ * 判断当前细分属性是否为”城市“
9
+ * @param name 属性名称
10
+ * @returns true标识为:是城市
11
11
  */
12
12
  export var judgeIsCity = function judgeIsCity(name) {
13
13
  var areaData = ['current_city', 'city'];
14
14
  return name && areaData.indexOf(name) !== -1 ? true : false;
15
15
  };
16
16
 
17
- /**
18
- * 判断当前细分属性,地图是否可选
19
- * @param name 属性名称
20
- * @returns true标识为:地图可选
17
+ /**
18
+ * 判断当前细分属性,地图是否可选
19
+ * @param name 属性名称
20
+ * @returns true标识为:地图可选
21
21
  */
22
22
  export var judgeIsArea = function judgeIsArea(name) {
23
23
  var areaData = ['current_area', 'current_city', 'area', 'city'];
24
24
  return name && areaData.indexOf(name) !== -1 ? true : false;
25
25
  };
26
26
 
27
- /**
28
- * 获取当前属性的全部数据
29
- * @param param 属性的部分数据
30
- * @returns 属性的全部数据
27
+ /**
28
+ * 获取当前属性的全部数据
29
+ * @param param 属性的部分数据
30
+ * @returns 属性的全部数据
31
31
  */
32
32
  export var getValue = function getValue(param, eventGroupList, eventEnvList, userPropList) {
33
33
  var res = undefined;
@@ -80,7 +80,7 @@ export function searchCondition(params) {
80
80
  };
81
81
  }
82
82
  export function searchDataParams(params) {
83
- var _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$dimension13, _params$associatedPre, _params$associatedNex;
83
+ var _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;
84
84
  return {
85
85
  time: _objectSpread({}, params === null || params === void 0 ? void 0 : params.time),
86
86
  platform: (params === null || params === void 0 ? void 0 : params.platform) || 0,
@@ -93,13 +93,12 @@ export function searchDataParams(params) {
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
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,
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
- 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
- encryptionType: params === null || params === void 0 ? void 0 : (_params$dimension13 = params.dimension) === null || _params$dimension13 === void 0 ? void 0 : _params$dimension13.encryptionType
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
98
97
  } : null,
99
98
  associatedPreAttr: params === null || params === void 0 ? void 0 : (_params$associatedPre = params.associatedPreAttr) === null || _params$associatedPre === void 0 ? void 0 : _params$associatedPre.id,
100
99
  associatedNextAttr: params === null || params === void 0 ? void 0 : (_params$associatedNex = params.associatedNextAttr) === null || _params$associatedNex === void 0 ? void 0 : _params$associatedNex.id,
101
100
  analysisModel: params.analysisModel,
102
- analysisSubject: params.analysisSubject
101
+ analysisSubject: params === null || params === void 0 ? void 0 : params.analysisSubject
103
102
  };
104
103
  }
105
104
  export function transformData(data) {
@@ -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 { ModuleInterval } from "../../../index";
9
+ import { ModuleInterval } from '@zgfe/modules-interval';
10
10
  import { requestConfig } from "../../../utils/ajaxConfig";
11
11
  import { Button } from 'antd';
12
12
  var defaultValue = null;
@@ -33,9 +33,10 @@ export default (function () {
33
33
  var onUserDrill = function onUserDrill(data, searchData) {
34
34
  console.log('onUserDrill:', data, searchData);
35
35
  };
36
+ var onJumpWarning = function onJumpWarning() {};
36
37
  return /*#__PURE__*/React.createElement(DemoWrapper, {
37
38
  needMeta: true,
38
- defaultApp: 461
39
+ defaultApp: 3
39
40
  }, isDetail ? /*#__PURE__*/React.createElement("div", null, JSON.stringify(detailParams), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Button, {
40
41
  onClick: function onClick() {
41
42
  return setIsDetail(false);
@@ -43,6 +44,7 @@ export default (function () {
43
44
  }, "\u8FD4\u56DE")) : /*#__PURE__*/React.createElement(ModuleInterval, {
44
45
  defaultValue: searchParams,
45
46
  afterEditTarget: afterEditTarget,
46
- onUserDrill: onUserDrill
47
+ onUserDrill: onUserDrill,
48
+ onJumpWarning: onJumpWarning
47
49
  }));
48
50
  });
@@ -6,48 +6,146 @@ 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 { ModuleInterval } from "../../../index";
9
+ import { ModuleInterval } from '@zgfe/modules-interval';
10
10
  import { requestConfig } from "../../../utils/ajaxConfig";
11
11
  import { Button } from 'antd';
12
12
  var defaultValue = {
13
- id: 7565,
14
- name: '测试6666',
15
- type: 0,
13
+ appId: 52,
16
14
  enlarged: 0,
17
- panelId: 400900,
15
+ hasPermission: true,
16
+ id: 488,
17
+ isPerfect: 1,
18
+ name: '间隔',
19
+ reqParam: {
20
+ data: {
21
+ appId: 52,
22
+ module: 'interval',
23
+ userGroup: [0],
24
+ start: {
25
+ id: 590,
26
+ name: 'pv',
27
+ deleted: 0
28
+ },
29
+ associatedPreAttr: {
30
+ realTime: true,
31
+ eventId: 590,
32
+ propCategory: 'eventProp',
33
+ alias: '',
34
+ id: 31415926,
35
+ label: '业务',
36
+ dimensionSub: 'event_attr',
37
+ type: 1,
38
+ key: 'eventProp-31415926',
39
+ isHidden: 0
40
+ },
41
+ associatedNextAttr: {
42
+ realTime: true,
43
+ eventId: 590,
44
+ propCategory: 'eventProp',
45
+ alias: '',
46
+ id: 3045,
47
+ label: 'page_title',
48
+ dimensionSub: 'event_attr',
49
+ type: 1,
50
+ key: 'eventProp-3045',
51
+ isHidden: 0
52
+ },
53
+ end: {
54
+ id: 590,
55
+ name: 'pv',
56
+ deleted: 0
57
+ },
58
+ dimension: {
59
+ id: 0,
60
+ alias: null,
61
+ category: 'fixed',
62
+ key: 'userProp-last_visit_time-0',
63
+ label: '最后一次访问时间',
64
+ name: 'last_visit_time',
65
+ propCategory: 'userProp',
66
+ type: 3,
67
+ realTime: false,
68
+ dimensionSub: 'last_visit_time'
69
+ },
70
+ analysisModel: 'commonInterval',
71
+ time: {
72
+ begin: '2024-11-15',
73
+ end: '2024-11-22',
74
+ relative: [7, 0],
75
+ unit: 'day'
76
+ },
77
+ platform: 0,
78
+ chartType: 'boxplot'
79
+ },
80
+ chosen_data: []
81
+ },
82
+ type: 0,
83
+ unExistEvent: '',
84
+ renderType: 'normal',
85
+ source: 'PANEL',
86
+ panelId: 87,
18
87
  panelType: 'edit',
19
88
  data: {
20
- chartType: 'boxplot',
21
- analysisIndex: 'per',
22
- id: 7565,
23
- name: '测试6666',
24
- appId: 266,
25
- platform: 0,
26
- userGroup: [933, 935],
27
- time: {
28
- unit: 'day',
29
- relative: [14, 0],
30
- begin: '2023-08-04',
31
- end: '2023-08-18'
89
+ appId: 52,
90
+ module: 'interval',
91
+ userGroup: [0],
92
+ start: {
93
+ id: 590,
94
+ name: 'pv',
95
+ deleted: 0
32
96
  },
33
- dimension: {
97
+ associatedPreAttr: {
98
+ realTime: true,
99
+ eventId: 590,
34
100
  propCategory: 'eventProp',
35
- value: 151045
101
+ alias: '',
102
+ id: 31415926,
103
+ label: '业务',
104
+ dimensionSub: 'event_attr',
105
+ type: 1,
106
+ key: 'eventProp-31415926',
107
+ isHidden: 0
36
108
  },
37
- filters: {
38
- relation: 'and',
39
- conditions: [{
40
- attrId: 151045,
41
- propCategory: 'eventProp',
42
- type: 1,
43
- operator: 'equal',
44
- values: ['55'],
45
- dimensionSub: 'event_attr',
46
- label: '应用名称',
47
- attrName: '应用名称'
48
- }]
49
- }
50
- }
109
+ associatedNextAttr: {
110
+ realTime: true,
111
+ eventId: 590,
112
+ propCategory: 'eventProp',
113
+ alias: '',
114
+ id: 3045,
115
+ label: 'page_title',
116
+ dimensionSub: 'event_attr',
117
+ type: 1,
118
+ key: 'eventProp-3045',
119
+ isHidden: 0
120
+ },
121
+ end: {
122
+ id: 590,
123
+ name: 'pv',
124
+ deleted: 0
125
+ },
126
+ dimension: {
127
+ id: 0,
128
+ alias: null,
129
+ category: 'fixed',
130
+ key: 'userProp-last_visit_time-0',
131
+ label: '最后一次访问时间',
132
+ name: 'last_visit_time',
133
+ propCategory: 'userProp',
134
+ type: 3,
135
+ realTime: false,
136
+ dimensionSub: 'last_visit_time'
137
+ },
138
+ analysisModel: 'commonInterval',
139
+ time: {
140
+ begin: '2024-11-15',
141
+ end: '2024-11-22',
142
+ relative: [7, 0],
143
+ unit: 'day'
144
+ },
145
+ platform: 0,
146
+ chartType: 'boxplot'
147
+ },
148
+ chosen_data: []
51
149
  };
52
150
  export default (function () {
53
151
  // 是否进入用户钻取页面
@@ -74,7 +172,7 @@ export default (function () {
74
172
  };
75
173
  return /*#__PURE__*/React.createElement(DemoWrapper, {
76
174
  needMeta: true,
77
- defaultApp: 266
175
+ defaultApp: 52
78
176
  }, isDetail ? /*#__PURE__*/React.createElement("div", null, JSON.stringify(detailParams), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Button, {
79
177
  onClick: function onClick() {
80
178
  return setIsDetail(false);
@@ -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 { ModuleInterval } from "../../../index";
9
+ import { ModuleInterval } from '@zgfe/modules-interval';
10
10
  import "./styles/index.less";
11
11
  import { requestConfig } from "../../../utils/ajaxConfig";
12
12
  import { Button } from 'antd';
@@ -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 { ModuleInterval } from "../../../index";
9
+ import { ModuleInterval } from '@zgfe/modules-interval';
10
10
  import { requestConfig } from "../../../utils/ajaxConfig";
11
11
  import { Button } from 'antd';
12
12
  var defaultValue = {
@@ -63,6 +63,11 @@ var ModuleInterval = function ModuleInterval(props) {
63
63
  _useState16 = _slicedToArray(_useState15, 2),
64
64
  subjectEnable = _useState16[0],
65
65
  setSubjectEnable = _useState16[1];
66
+ var _useState17 = useState(false),
67
+ _useState18 = _slicedToArray(_useState17, 2),
68
+ exception = _useState18[0],
69
+ setException = _useState18[1];
70
+
66
71
  // 初始化
67
72
  useEffect(function () {
68
73
  setLoading(true);
@@ -145,7 +150,9 @@ var ModuleInterval = function ModuleInterval(props) {
145
150
  changeLoading: setLoading,
146
151
  afterEditTarget: props.afterEditTarget,
147
152
  onUserDrill: props.onUserDrill,
148
- onJumpWarning: props.onJumpWarning
153
+ onJumpWarning: props.onJumpWarning,
154
+ exception: exception,
155
+ setException: setException
149
156
  }
150
157
  }, /*#__PURE__*/React.createElement(EventContent, {
151
158
  defaultValue: props.defaultValue ? props.defaultValue.data : undefined,
@@ -71,7 +71,6 @@ export declare namespace IntervalProps {
71
71
  perValue?: number;
72
72
  peopleNum?: number;
73
73
  names?: string[];
74
- originalNames?: string[];
75
74
  total?: number;
76
75
  children?: ColumnsDataType[];
77
76
  }
@@ -21,6 +21,7 @@ var classPrefix = 'top-panel-interval';
21
21
  var TopPanel = function TopPanel(props) {
22
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;
23
23
  var defaultValue = props.defaultValue,
24
+ propsDefaultValue = props.propsDefaultValue,
24
25
  loading = props.loading,
25
26
  collapseRef = props.collapseRef,
26
27
  finalSearchData = props.finalSearchData;
@@ -38,7 +39,7 @@ var TopPanel = function TopPanel(props) {
38
39
  endEvent = _useState4[0],
39
40
  setEndEvent = _useState4[1];
40
41
  // 关联属性
41
- var _useState5 = useState(false),
42
+ var _useState5 = useState(defaultValue !== null && defaultValue !== void 0 && defaultValue.associatedNextAttr ? true : false),
42
43
  _useState6 = _slicedToArray(_useState5, 2),
43
44
  relevancy = _useState6[0],
44
45
  setRelevancy = _useState6[1];
@@ -62,14 +63,23 @@ var TopPanel = function TopPanel(props) {
62
63
  inited = _useState12[0],
63
64
  setInited = _useState12[1];
64
65
  var formRef = React.useRef(null);
66
+
67
+ // 初始化设置细分属性
68
+ useEffect(function () {
69
+ if (formRef.current && propsDefaultValue && propsDefaultValue.dimension) {
70
+ var _formRef$current;
71
+ (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldValue('dimension', propsDefaultValue.dimension);
72
+ }
73
+ }, [formRef.current, propsDefaultValue]);
65
74
  function onSearch(values) {
66
75
  if (props.onChange) {
76
+ var _values$analysisSubje, _values$analysisSubje2, _values$analysisSubje3, _values$analysisSubje4;
67
77
  props.onChange(_objectSpread(_objectSpread({}, values), {}, {
68
- analysisSubject: values.analysisSubject ? {
69
- subjectId: values.analysisSubject.id,
70
- subjectName: values.analysisSubject.subjectName,
71
- subjectAlias: values.analysisSubject.subjectAlias,
72
- unit: values.analysisSubject.unit
78
+ analysisSubject: values !== null && values !== void 0 && values.analysisSubject ? {
79
+ subjectId: values === null || values === void 0 ? void 0 : (_values$analysisSubje = values.analysisSubject) === null || _values$analysisSubje === void 0 ? void 0 : _values$analysisSubje.id,
80
+ subjectName: values === null || values === void 0 ? void 0 : (_values$analysisSubje2 = values.analysisSubject) === null || _values$analysisSubje2 === void 0 ? void 0 : _values$analysisSubje2.subjectName,
81
+ subjectAlias: values === null || values === void 0 ? void 0 : (_values$analysisSubje3 = values.analysisSubject) === null || _values$analysisSubje3 === void 0 ? void 0 : _values$analysisSubje3.subjectAlias,
82
+ unit: values === null || values === void 0 ? void 0 : (_values$analysisSubje4 = values.analysisSubject) === null || _values$analysisSubje4 === void 0 ? void 0 : _values$analysisSubje4.unit
73
83
  } : undefined
74
84
  }), true);
75
85
  }
@@ -106,12 +116,12 @@ var TopPanel = function TopPanel(props) {
106
116
  return;
107
117
  }
108
118
  setInited(false);
109
- if (defaultValue.analysisSubject) {
119
+ if (defaultValue !== null && defaultValue !== void 0 && defaultValue.analysisSubject) {
110
120
  setAnalysisType('eventProp');
111
121
  } else {
112
122
  setAnalysisType('user');
113
123
  }
114
- if (defaultValue.analysisSubject) {
124
+ if (defaultValue !== null && defaultValue !== void 0 && defaultValue.analysisSubject) {
115
125
  setCurrentSubject(subjectList.find(function (item) {
116
126
  var _defaultValue$analysi;
117
127
  return item.id === (defaultValue === null || defaultValue === void 0 ? void 0 : (_defaultValue$analysi = defaultValue.analysisSubject) === null || _defaultValue$analysi === void 0 ? void 0 : _defaultValue$analysi.subjectId);
@@ -190,7 +200,7 @@ var TopPanel = function TopPanel(props) {
190
200
  name: "analysisSubject",
191
201
  className: "panel-form-interval-item",
192
202
  rules: [{
193
- validator: function validator(rule, value) {
203
+ validator: function validator(_rule, value) {
194
204
  if (!value) {
195
205
  return Promise.reject('请选择口径名称');
196
206
  }
@@ -203,12 +213,12 @@ var TopPanel = function TopPanel(props) {
203
213
  labelField: "subjectName",
204
214
  keyField: "id",
205
215
  onChange: function onChange(val) {
206
- var _formRef$current, _formRef$current2, _formRef$current3;
216
+ var _formRef$current2, _formRef$current3, _formRef$current4;
207
217
  setCurrentSubject(val);
208
218
  setRelevancy(false);
209
- (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldValue('start', undefined);
210
- (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.setFieldValue('end', undefined);
211
- (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : _formRef$current3.setFieldValue('dimension', undefined);
219
+ (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.setFieldValue('start', undefined);
220
+ (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : _formRef$current3.setFieldValue('end', undefined);
221
+ (_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 ? void 0 : _formRef$current4.setFieldValue('dimension', undefined);
212
222
  }
213
223
  })), analysisType === 'user' && /*#__PURE__*/React.createElement(Form.Item, {
214
224
  label: "",
@@ -260,9 +270,9 @@ var TopPanel = function TopPanel(props) {
260
270
  key: "".concat(currentSubject === null || currentSubject === void 0 ? void 0 : currentSubject.subjectName, "-start"),
261
271
  analysisType: analysisType,
262
272
  onChange: function onChange(evt) {
263
- var _formRef$current4;
273
+ var _formRef$current5;
264
274
  setStartEvent(evt);
265
- (_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 ? void 0 : _formRef$current4.setFieldValue('dimension', undefined);
275
+ (_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 ? void 0 : _formRef$current5.setFieldValue('dimension', undefined);
266
276
  }
267
277
  })), /*#__PURE__*/React.createElement(Space, {
268
278
  align: "baseline",
@@ -307,8 +317,8 @@ var TopPanel = function TopPanel(props) {
307
317
  enableDelete: true,
308
318
  key: "".concat(startEvent === null || startEvent === void 0 ? void 0 : startEvent.id, "-").concat(endEvent === null || endEvent === void 0 ? void 0 : endEvent.id, "-pre"),
309
319
  onDelete: function onDelete() {
310
- var _formRef$current5;
311
- (_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 ? void 0 : _formRef$current5.setFieldValue('associatedPreAttr', undefined);
320
+ var _formRef$current6;
321
+ (_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 ? void 0 : _formRef$current6.setFieldValue('associatedPreAttr', undefined);
312
322
  }
313
323
  }))), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
314
324
  className: "associated-label"
@@ -330,8 +340,8 @@ var TopPanel = function TopPanel(props) {
330
340
  enableDelete: true,
331
341
  key: "".concat(startEvent === null || startEvent === void 0 ? void 0 : startEvent.id, "-").concat(endEvent === null || endEvent === void 0 ? void 0 : endEvent.id, "-next"),
332
342
  onDelete: function onDelete() {
333
- var _formRef$current6;
334
- (_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 ? void 0 : _formRef$current6.setFieldValue('associatedNextAttr', undefined);
343
+ var _formRef$current7;
344
+ (_formRef$current7 = formRef.current) === null || _formRef$current7 === void 0 ? void 0 : _formRef$current7.setFieldValue('associatedNextAttr', undefined);
335
345
  }
336
346
  }))), /*#__PURE__*/React.createElement("i", {
337
347
  style: {
@@ -340,9 +350,9 @@ var TopPanel = function TopPanel(props) {
340
350
  cursor: 'pointer'
341
351
  },
342
352
  onClick: function onClick() {
343
- var _formRef$current7, _formRef$current8;
344
- (_formRef$current7 = formRef.current) === null || _formRef$current7 === void 0 ? void 0 : _formRef$current7.setFieldValue('associatedPreAttr', undefined);
345
- (_formRef$current8 = formRef.current) === null || _formRef$current8 === void 0 ? void 0 : _formRef$current8.setFieldValue('associatedNextAttr', undefined);
353
+ var _formRef$current8, _formRef$current9;
354
+ (_formRef$current8 = formRef.current) === null || _formRef$current8 === void 0 ? void 0 : _formRef$current8.setFieldValue('associatedPreAttr', undefined);
355
+ (_formRef$current9 = formRef.current) === null || _formRef$current9 === void 0 ? void 0 : _formRef$current9.setFieldValue('associatedNextAttr', undefined);
346
356
  setRelevancy(false);
347
357
  },
348
358
  className: "bsicon qingchu"
@@ -373,11 +383,11 @@ var TopPanel = function TopPanel(props) {
373
383
  }, /*#__PURE__*/React.createElement(EventFilter, {
374
384
  subject: currentSubject,
375
385
  analysisType: analysisType,
376
- key: "".concat(currentSubject === null || currentSubject === void 0 ? void 0 : currentSubject.subjectName, "-start"),
386
+ key: "".concat(currentSubject === null || currentSubject === void 0 ? void 0 : currentSubject.subjectName, "-end"),
377
387
  onChange: function onChange(val) {
378
- var _formRef$current9;
388
+ var _formRef$current10;
379
389
  setEndEvent(val);
380
- (_formRef$current9 = formRef.current) === null || _formRef$current9 === void 0 ? void 0 : _formRef$current9.setFieldValue('dimension', undefined);
390
+ (_formRef$current10 = formRef.current) === null || _formRef$current10 === void 0 ? void 0 : _formRef$current10.setFieldValue('dimension', undefined);
381
391
  }
382
392
  })), /*#__PURE__*/React.createElement(Form.Item, {
383
393
  label: "\u6309\u5C5E\u6027\u7EC6\u5206",
@@ -392,8 +402,8 @@ var TopPanel = function TopPanel(props) {
392
402
  showCommonProp: true,
393
403
  enableDelete: true,
394
404
  onDelete: function onDelete() {
395
- var _formRef$current10;
396
- (_formRef$current10 = formRef.current) === null || _formRef$current10 === void 0 ? void 0 : _formRef$current10.setFieldValue('dimension', undefined);
405
+ var _formRef$current11;
406
+ (_formRef$current11 = formRef.current) === null || _formRef$current11 === void 0 ? void 0 : _formRef$current11.setFieldValue('dimension', undefined);
397
407
  }
398
408
  })), /*#__PURE__*/React.createElement(Form.Item, {
399
409
  label: "\u5206\u6790\u6A21\u578B",
@@ -411,8 +421,8 @@ var TopPanel = function TopPanel(props) {
411
421
  loading: loading || subjectLoading,
412
422
  type: "primary",
413
423
  onClick: function onClick() {
414
- var _formRef$current11;
415
- (_formRef$current11 = formRef.current) === null || _formRef$current11 === void 0 ? void 0 : _formRef$current11.submit();
424
+ var _formRef$current12;
425
+ (_formRef$current12 = formRef.current) === null || _formRef$current12 === void 0 ? void 0 : _formRef$current12.submit();
416
426
  }
417
427
  }, "\u67E5\u8BE2"))));
418
428
  };
@@ -44,7 +44,7 @@
44
44
  padding-left: 12px;
45
45
  }
46
46
  &:hover {
47
- background-color: #e8efff;
47
+ background-color: #e7f3fe;
48
48
  }
49
49
  }
50
50
  }
@@ -66,7 +66,7 @@
66
66
  }
67
67
 
68
68
  .ant-space-item:nth-child(2):hover {
69
- background-color: #e8efff;
69
+ background-color: #e7f3fe;
70
70
  }
71
71
  }
72
72
  }
@@ -110,7 +110,7 @@
110
110
  }
111
111
 
112
112
  > div:nth-child(1):hover {
113
- background-color: #e8efff;
113
+ background-color: #e7f3fe;
114
114
  }
115
115
 
116
116
  .biz-attr-condition-group-handle {
@@ -135,7 +135,7 @@
135
135
  }
136
136
 
137
137
  .ant-space-item:hover {
138
- background-color: #e8efff;
138
+ background-color: #e7f3fe;
139
139
  }
140
140
  }
141
141
 
@@ -145,7 +145,7 @@
145
145
  }
146
146
 
147
147
  .ant-form-item-control-input:hover {
148
- background-color: #e8efff;
148
+ background-color: #e7f3fe;
149
149
  }
150
150
  }
151
151
  }
@@ -186,7 +186,7 @@
186
186
  }
187
187
 
188
188
  .ant-form-item-control-input:hover {
189
- background-color: #e8efff;
189
+ background-color: #e7f3fe;
190
190
  }
191
191
 
192
192
  .associated-link {
@@ -42,6 +42,7 @@ export interface TopPanelProps {
42
42
  * 默认值
43
43
  */
44
44
  defaultValue?: SearchValue;
45
+ propsDefaultValue?: SearchValue;
45
46
  loading?: boolean;
46
47
  /**
47
48
  * 数据更新
@@ -12,6 +12,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
12
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
13
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
14
  import React from 'react';
15
+ import { Tooltip } from 'antd';
15
16
  import { chartColors } from "../constants/color";
16
17
  import "../style/index.less";
17
18
  import { IconFont } from '@zgfe/business-lib';
@@ -27,10 +28,10 @@ function convertToHMS(seconds) {
27
28
  var s = remainingSeconds ? remainingSeconds + '秒' : '0秒';
28
29
  return h + m + s;
29
30
  }
30
- /**
31
- * 获取table的columns
32
- * @param columnData xAxis
33
- * @returns column fields
31
+ /**
32
+ * 获取table的columns
33
+ * @param columnData xAxis
34
+ * @returns column fields
34
35
  */
35
36
  export function getColumns(eventGroupList, userPropList, eventEnvList, columnData, dataSource, userGroup, searchData, showList, onUserDrill, currentApp
36
37
  // onClickToDetailCallback: Function,
@@ -46,7 +47,9 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
46
47
  dataIndex: 'time',
47
48
  className: "".concat(classPrefix, "-table-td"),
48
49
  render: function render(text, record) {
49
- return /*#__PURE__*/React.createElement("span", null, " ", text);
50
+ return /*#__PURE__*/React.createElement(Tooltip, {
51
+ title: text
52
+ }, /*#__PURE__*/React.createElement("span", null, " ", text));
50
53
  }
51
54
  }, {
52
55
  title: '最大值',
@@ -205,22 +208,22 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
205
208
  return data;
206
209
  }
207
210
 
208
- /**
209
- * 获取属性的label
210
- * @param attrData 当前属性
211
- * @param eventGroupList 事件属性列表
212
- * @param userPropList 用户属性列表
213
- * @param eventEnvList 环境属性列表
214
- * @returns label
211
+ /**
212
+ * 获取属性的label
213
+ * @param attrData 当前属性
214
+ * @param eventGroupList 事件属性列表
215
+ * @param userPropList 用户属性列表
216
+ * @param eventEnvList 环境属性列表
217
+ * @returns label
215
218
  */
216
219
 
217
- /**
218
- * 格式化表格数据
219
- * @param originalData 查询的数据
220
- * @param hasUserGroup 是否有多个用户群
221
- * @param attrNum 属性细分个数
222
- * @param showList 要展示的内容,如果没传,则展示全部
223
- * @returns
220
+ /**
221
+ * 格式化表格数据
222
+ * @param originalData 查询的数据
223
+ * @param hasUserGroup 是否有多个用户群
224
+ * @param attrNum 属性细分个数
225
+ * @param showList 要展示的内容,如果没传,则展示全部
226
+ * @returns
224
227
  */
225
228
  export function formTableData(originalData) {
226
229
  var result = createNewArray(originalData);
@@ -307,10 +310,10 @@ function getChildrenData(data, index) {
307
310
  }
308
311
  return [];
309
312
  }
310
- /**
311
- * 获取查询结果
312
- * @param source 结果数据
313
- * @returns 获取查询结果
313
+ /**
314
+ * 获取查询结果
315
+ * @param source 结果数据
316
+ * @returns 获取查询结果
314
317
  */
315
318
  export function getDefaultShow(source, data) {
316
319
  if (source.appData.series) {
@@ -332,11 +335,11 @@ export function getDefaultShow(source, data) {
332
335
  }
333
336
  return [];
334
337
  }
335
- /**
336
- * 获取显示事件对应的颜色
337
- * @param source 结果数据
338
- * @param showList 展示列表
339
- * @returns 展示列表对应的颜色
338
+ /**
339
+ * 获取显示事件对应的颜色
340
+ * @param source 结果数据
341
+ * @param showList 展示列表
342
+ * @returns 展示列表对应的颜色
340
343
  */
341
344
  export function getShowColor(source, showList) {
342
345
  var colors = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-interval",
3
- "version": "1.0.23-zhongyuan.1",
3
+ "version": "1.0.23-zhongyuan.3",
4
4
  "private": false,
5
5
  "module": "dist/esm/index.js",
6
6
  "typings": "dist/esm/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "@types/uuid": "^9.0.2",
43
43
  "@umijs/fabric": "^2.8.1",
44
44
  "@umijs/test": "^3.0.5",
45
- "@zgfe/business-lib": "1.2.70-hxd.10",
45
+ "@zgfe/business-lib": "1.2.70-hxd.31",
46
46
  "antd": "^4.22.6",
47
47
  "dumi": "^1.1.0",
48
48
  "echarts": "^5.3.2",
@@ -59,7 +59,7 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "e0ab09536ecccea2965d6c3e0e73ba24b31fea65",
62
+ "gitHead": "e8c97df2f4e849232f643a5b105e36f497101ba0",
63
63
  "gitHooks": {
64
64
  "pre-commit": "lint-staged"
65
65
  }