@zgfe/modules-interval 1.0.0-interval.13 → 1.0.0-interval.15

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.
@@ -5,6 +5,55 @@
5
5
  "css_prefix_text": "",
6
6
  "description": "诸葛业务平台",
7
7
  "glyphs": [
8
+ {
9
+ "icon_id": "37343412",
10
+ "name": "盒须图",
11
+ "font_class": "hexutu",
12
+ "unicode": "e796",
13
+ "unicode_decimal": 59286
14
+ },
15
+ {
16
+ "icon_id": "37316029",
17
+ "name": "全屏展示",
18
+ "font_class": "quanpingzhanshi",
19
+ "unicode": "e6a3",
20
+ "unicode_decimal": 59043
21
+ },
22
+ {
23
+ "icon_id": "37316033",
24
+ "name": "流向图",
25
+ "font_class": "liuxiangtu",
26
+ "unicode": "e78f",
27
+ "unicode_decimal": 59279
28
+ },
29
+ {
30
+ "icon_id": "37316032",
31
+ "name": "旭日图",
32
+ "font_class": "xuritu",
33
+ "unicode": "e790",
34
+ "unicode_decimal": 59280
35
+ },
36
+ {
37
+ "icon_id": "37316031",
38
+ "name": "桑基图",
39
+ "font_class": "sangjitu",
40
+ "unicode": "e791",
41
+ "unicode_decimal": 59281
42
+ },
43
+ {
44
+ "icon_id": "37316030",
45
+ "name": "树形图",
46
+ "font_class": "shuxingtu",
47
+ "unicode": "e792",
48
+ "unicode_decimal": 59282
49
+ },
50
+ {
51
+ "icon_id": "37316028",
52
+ "name": "全屏收起",
53
+ "font_class": "quanpingshouqi",
54
+ "unicode": "e793",
55
+ "unicode_decimal": 59283
56
+ },
8
57
  {
9
58
  "icon_id": "36957204",
10
59
  "name": "对勾",
@@ -656,13 +705,6 @@
656
705
  "unicode": "e6a5",
657
706
  "unicode_decimal": 59045
658
707
  },
659
- {
660
- "icon_id": "31389407",
661
- "name": "全屏展示",
662
- "font_class": "quanpingzhanshi",
663
- "unicode": "e6a3",
664
- "unicode_decimal": 59043
665
- },
666
708
  {
667
709
  "icon_id": "31360676",
668
710
  "name": "收藏",
@@ -8,7 +8,7 @@ import { Spin } from 'antd';
8
8
  import React, { useEffect, useState } from 'react';
9
9
  import { MiNone, MiSpin } from '..';
10
10
  import "./styles/index.less";
11
- import EventChart from "../../modules/chart";
11
+ import IntervalEventChart from "../../modules/chart";
12
12
  var classPrefix = 'render-content-interval';
13
13
  var ContentPanel = function ContentPanel(props) {
14
14
  var _eventData$appData, _eventData$appData$se;
@@ -41,8 +41,8 @@ var ContentPanel = function ContentPanel(props) {
41
41
  className: classPrefix
42
42
  }, /*#__PURE__*/React.createElement("div", {
43
43
  className: "".concat(classPrefix, "-chart-container")
44
- }, eventData && (_eventData$appData = eventData.appData) !== null && _eventData$appData !== void 0 && (_eventData$appData$se = _eventData$appData.series) !== null && _eventData$appData$se !== void 0 && _eventData$appData$se.length ? /*#__PURE__*/React.createElement(EventChart, {
45
- type: "grid",
44
+ }, eventData && (_eventData$appData = eventData.appData) !== null && _eventData$appData !== void 0 && (_eventData$appData$se = _eventData$appData.series) !== null && _eventData$appData$se !== void 0 && _eventData$appData$se.length ? /*#__PURE__*/React.createElement(IntervalEventChart, {
45
+ type: "boxplot",
46
46
  dataSource: eventData,
47
47
  params: searchData,
48
48
  onChangeShow: onChangeShow
@@ -11,7 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
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
13
  import { Button } from 'antd';
14
- import React, { useContext, useState } from 'react';
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
17
  import { EventContext } from "../../types";
@@ -19,7 +19,6 @@ import { chartTypes, platformOption } from "../../constants/fields";
19
19
  import { searchDataParams } from "../../modules/content/utils";
20
20
  var classPrefix = 'modules-interval-topbar';
21
21
  var TopBar = function TopBar(props) {
22
- var _props$eventData, _props$eventData$appD, _props$eventData$appD2, _props$eventData2, _props$eventData2$app, _props$eventData2$app2, _props$eventData3, _props$eventData3$app, _props$eventData3$app2;
23
22
  var _useContext = useContext(EventContext),
24
23
  panelId = _useContext.panelId,
25
24
  afterEditTarget = _useContext.afterEditTarget,
@@ -32,19 +31,23 @@ var TopBar = function TopBar(props) {
32
31
  _useState4 = _slicedToArray(_useState3, 2),
33
32
  showScene = _useState4[0],
34
33
  setShowScene = _useState4[1];
34
+ var _useState5 = useState(true),
35
+ _useState6 = _slicedToArray(_useState5, 2),
36
+ showLoading = _useState6[0],
37
+ setShowLoading = _useState6[1];
35
38
  var _useContext2 = useContext(BizGlobalDataContext),
36
39
  currentApp = _useContext2.currentApp;
37
40
  var searchData = props.searchData,
38
41
  platformChange = props.platformChange;
39
- var _useState5 = useState((searchData === null || searchData === void 0 ? void 0 : searchData.platform) === undefined ? 0 : searchData.platform),
40
- _useState6 = _slicedToArray(_useState5, 2),
41
- selectPlatform = _useState6[0],
42
- setselectPlatform = _useState6[1];
43
- // 看板弹窗类型
44
- var _useState7 = useState(),
42
+ var _useState7 = useState((searchData === null || searchData === void 0 ? void 0 : searchData.platform) === undefined ? 0 : searchData.platform),
45
43
  _useState8 = _slicedToArray(_useState7, 2),
46
- panelType = _useState8[0],
47
- setPanelType = _useState8[1];
44
+ selectPlatform = _useState8[0],
45
+ setselectPlatform = _useState8[1];
46
+ // 看板弹窗类型
47
+ var _useState9 = useState(),
48
+ _useState10 = _slicedToArray(_useState9, 2),
49
+ panelType = _useState10[0],
50
+ setPanelType = _useState10[1];
48
51
 
49
52
  // 关闭弹窗
50
53
  var closeHandle = function closeHandle(type) {
@@ -55,7 +58,11 @@ var TopBar = function TopBar(props) {
55
58
  setShowScene(false);
56
59
  }
57
60
  };
58
-
61
+ useEffect(function () {
62
+ if (props.eventData !== undefined) {
63
+ setShowLoading(false);
64
+ }
65
+ }, [props.eventData]);
59
66
  // 保存
60
67
  var _onOk = function onOk(type, val) {
61
68
  // console.log('onOk', type, val);
@@ -67,7 +74,7 @@ var TopBar = function TopBar(props) {
67
74
  }, !panelId && /*#__PURE__*/React.createElement("div", {
68
75
  className: "".concat(classPrefix, "-panel")
69
76
  }, /*#__PURE__*/React.createElement(Button, {
70
- disabled: !(props !== null && props !== void 0 && props.eventData) || (props === null || props === void 0 ? void 0 : (_props$eventData = props.eventData) === null || _props$eventData === void 0 ? void 0 : (_props$eventData$appD = _props$eventData.appData) === null || _props$eventData$appD === void 0 ? void 0 : (_props$eventData$appD2 = _props$eventData$appD.series) === null || _props$eventData$appD2 === void 0 ? void 0 : _props$eventData$appD2.length) === 0,
77
+ disabled: showLoading,
71
78
  onClick: function onClick() {
72
79
  setShowPanel(true);
73
80
  }
@@ -89,7 +96,7 @@ var TopBar = function TopBar(props) {
89
96
  })), enableAddScene && /*#__PURE__*/React.createElement("div", {
90
97
  className: "".concat(classPrefix, "-scene")
91
98
  }, /*#__PURE__*/React.createElement(Button, {
92
- disabled: !(props !== null && props !== void 0 && props.eventData) || (props === null || props === void 0 ? void 0 : (_props$eventData2 = props.eventData) === null || _props$eventData2 === void 0 ? void 0 : (_props$eventData2$app = _props$eventData2.appData) === null || _props$eventData2$app === void 0 ? void 0 : (_props$eventData2$app2 = _props$eventData2$app.series) === null || _props$eventData2$app2 === void 0 ? void 0 : _props$eventData2$app2.length) === 0,
99
+ disabled: showLoading,
93
100
  onClick: function onClick() {
94
101
  setShowScene(true);
95
102
  }
@@ -97,17 +104,17 @@ var TopBar = function TopBar(props) {
97
104
  params: _objectSpread({
98
105
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
99
106
  module: 'interval'
100
- }, searchDataParams(searchData)),
107
+ }, searchData),
101
108
  onOk: function onOk(data) {
102
109
  return _onOk('scene', data);
103
110
  },
104
111
  onCancel: function onCancel() {
105
112
  return closeHandle('scene');
106
113
  }
107
- })), (currentApp === null || currentApp === void 0 ? void 0 : currentApp.appVersion) === 1 || (currentApp === null || currentApp === void 0 ? void 0 : currentApp.appVersion) === 2 ? /*#__PURE__*/React.createElement(Button, {
114
+ })), (currentApp === null || currentApp === void 0 ? void 0 : currentApp.appVersion) === 2 ? /*#__PURE__*/React.createElement(Button, {
108
115
  className: "".concat(classPrefix, "-earlywarning"),
109
116
  type: "primary",
110
- disabled: !(props !== null && props !== void 0 && props.eventData) || (props === null || props === void 0 ? void 0 : (_props$eventData3 = props.eventData) === null || _props$eventData3 === void 0 ? void 0 : (_props$eventData3$app = _props$eventData3.appData) === null || _props$eventData3$app === void 0 ? void 0 : (_props$eventData3$app2 = _props$eventData3$app.series) === null || _props$eventData3$app2 === void 0 ? void 0 : _props$eventData3$app2.length) === 0,
117
+ disabled: showLoading,
111
118
  onClick: function onClick() {
112
119
  props.onUserDrill({
113
120
  appId: Number(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId),
@@ -4,6 +4,7 @@ export interface TopBarProps {
4
4
  * @description 标题
5
5
  */
6
6
  searchData?: SearchValue;
7
+ loading?: boolean;
7
8
  eventData?: ResponseDataProps;
8
9
  onUserDrill: (data: UserDrillParamsProp, searchData: SearchValue) => void;
9
10
  platformChange: (data: number) => void;
@@ -14,7 +14,7 @@ export var platformOption = [{
14
14
  export var chartTypes = [{
15
15
  label: '盒须图',
16
16
  value: 'boxplot',
17
- icon: 'qushitu1'
17
+ icon: 'hexutu'
18
18
  }];
19
19
 
20
20
  // 添加看板弹窗内容
@@ -1,4 +1,4 @@
1
1
  /// <reference path="../typings.d.ts" />
2
- import IntervalChart from './modules/chart/intervalChart';
2
+ import IntervalEventChart from './modules/chart';
3
3
  import ModuleInterval from './modules/home';
4
- export { ModuleInterval, IntervalChart };
4
+ export { ModuleInterval, IntervalEventChart };
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /// <reference path="../typings.d.ts" />
2
- import IntervalChart from "./modules/chart/intervalChart";
2
+ import IntervalEventChart from "./modules/chart";
3
3
  import ModuleInterval from "./modules/home";
4
- export { ModuleInterval, IntervalChart };
4
+ export { ModuleInterval, IntervalEventChart };
@@ -1,79 +1,42 @@
1
- export declare const result: {
2
- xAxis: string[];
3
- series: ({
4
- duration: never[];
5
- index: string;
6
- names: string[];
7
- values: number[];
8
- } | {
9
- duration: {
10
- name: string;
11
- values: number[];
12
- }[];
13
- index: null;
14
- names: string[];
15
- values: number[];
16
- })[];
17
- };
18
- export declare const totalResult: {
19
- xAxis: string[];
20
- series: ({
21
- duration: never[];
22
- index: string;
23
- names: string[];
24
- original_names: never[];
25
- p_total: never[];
26
- total: never[];
27
- values: number[];
28
- } | {
29
- duration: never[];
30
- index: null;
31
- names: string[];
32
- original_names: never[];
33
- p_total: never[];
34
- total: never[];
35
- values: number[];
36
- })[];
37
- };
38
1
  export declare const searchData: {
39
- targets: {
40
- type: string;
41
- alias: string;
42
- eventId: number;
43
- eventName: string;
44
- eventGroupId: number;
45
- analysisDimension: {
46
- analysisIndex: string;
47
- };
48
- }[];
49
- userGroup: number[];
2
+ appId: number;
50
3
  time: {
51
- unit: string;
52
- relative: number[];
53
- begin: string;
54
- end: string;
4
+ dimensionDate: string;
5
+ beginDate: string;
6
+ endDate: string;
55
7
  };
56
- chartType: string;
57
- };
58
- export declare const totalSearchData: {
59
- appId: number;
60
8
  platform: number;
61
- targets: {
62
- type: string;
63
- alias: string;
9
+ userGroup: number[];
10
+ start: {
11
+ operator: string;
64
12
  eventId: number;
65
13
  eventName: string;
66
- eventGroupId: number;
67
- analysisDimension: {
68
- analysisIndex: string;
69
- };
70
- }[];
71
- userGroup: number[];
72
- time: {
73
- unit: string;
74
- relative: number[];
75
- begin: string;
76
- end: string;
77
14
  };
78
- chartType: string;
15
+ end: {
16
+ operator: string;
17
+ eventId: number;
18
+ eventName: string;
19
+ };
20
+ dimension: null;
21
+ };
22
+ export declare const searchDataParams: {
23
+ appData: {
24
+ huanbi: never[];
25
+ series: {
26
+ diyTarget: boolean;
27
+ duration: never[];
28
+ index: null;
29
+ names: never[];
30
+ originalNames: never[];
31
+ pNext: never[];
32
+ pTotal: never[];
33
+ resultFormat: null;
34
+ total: never[];
35
+ values: number[][];
36
+ }[];
37
+ tongbi: never[];
38
+ total: never[];
39
+ xAxis: string[];
40
+ yesterDay: never[];
41
+ };
79
42
  };