@zgfe/modules-interval 1.0.0-interval.46 → 1.0.0-interval.47

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.
@@ -101,10 +101,12 @@ var TopBar = function TopBar(props) {
101
101
  setShowScene(true);
102
102
  }
103
103
  }, "\u6DFB\u52A0\u5E38\u7528\u573A\u666F"), showScene && /*#__PURE__*/React.createElement(BizAddToScene, {
104
- params: _objectSpread({
104
+ params: _objectSpread(_objectSpread({
105
105
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
106
106
  module: 'interval'
107
- }, searchData),
107
+ }, searchData), {}, {
108
+ chartType: 'line'
109
+ }),
108
110
  onOk: function onOk(data) {
109
111
  return _onOk('scene', data);
110
112
  },
@@ -11,17 +11,14 @@ 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 React, { useContext, useEffect, useState } from 'react';
14
- import { BizGlobalDataContext, ajax } from '@zgfe/business-lib';
14
+ import { BizGlobalDataContext, BizLoading, ajax } from '@zgfe/business-lib';
15
15
  import { EventTable, MiNone } from "../../components";
16
16
  import { extractNames, getDefaultShow } from "../../utils/formData";
17
17
  import { Apis } from "../../constants";
18
- import { Spin } from 'antd';
19
18
  import IntervalChart from "./intervalChart";
20
19
  import { searchDataParams } from "../content/utils";
21
20
  var IntervalEventChart = function IntervalEventChart(props) {
22
21
  var _dataSource$appData2;
23
- // console.log(55555, props);
24
-
25
22
  var params = props.params;
26
23
  // 显示内容
27
24
  var _useState = useState(),
@@ -61,9 +58,9 @@ var IntervalEventChart = function IntervalEventChart(props) {
61
58
  }
62
59
  }, [params === null || params === void 0 ? void 0 : params.displaySetup, dataSource]);
63
60
  var fetchResult = function fetchResult() {
64
- var _obj$start, _obj$end;
61
+ var _obj$start, _obj$end, _params$start, _params$end;
65
62
  var obj = searchDataParams(params);
66
- if (obj !== null && obj !== void 0 && (_obj$start = obj.start) !== null && _obj$start !== void 0 && _obj$start.eventId && obj !== null && obj !== void 0 && (_obj$end = obj.end) !== null && _obj$end !== void 0 && _obj$end.eventId) {
63
+ if (obj !== null && obj !== void 0 && (_obj$start = obj.start) !== null && _obj$start !== void 0 && _obj$start.eventId && obj !== null && obj !== void 0 && (_obj$end = obj.end) !== null && _obj$end !== void 0 && _obj$end.eventId || params !== null && params !== void 0 && (_params$start = params.start) !== null && _params$start !== void 0 && _params$start.eventId && params !== null && params !== void 0 && (_params$end = params.end) !== null && _params$end !== void 0 && _params$end.eventId) {
67
64
  setLoading(true);
68
65
  ajax(Apis.dataList, {
69
66
  method: 'post',
@@ -87,9 +84,9 @@ var IntervalEventChart = function IntervalEventChart(props) {
87
84
  if (props.onChangeShow) props.onChangeShow(names);
88
85
  };
89
86
  if (loading) {
90
- return /*#__PURE__*/React.createElement(Spin, {
91
- className: "spin-container"
92
- });
87
+ return /*#__PURE__*/React.createElement(BizLoading, {
88
+ className: "mi-common-interval-content"
89
+ }, /*#__PURE__*/React.createElement("div", null));
93
90
  }
94
91
  if (!dataSource || !(dataSource !== null && dataSource !== void 0 && (_dataSource$appData2 = dataSource.appData) !== null && _dataSource$appData2 !== void 0 && _dataSource$appData2.series.length)) {
95
92
  return /*#__PURE__*/React.createElement(MiNone, {
@@ -26,7 +26,6 @@ var CancelToken = Request.CancelToken;
26
26
  var cancel;
27
27
  var classPrefix = 'interval-content';
28
28
  var EventContent = function EventContent(props) {
29
- console.log(66666, props);
30
29
  // 最后的查询数据(防止图表在还没查询时就改变了类型)
31
30
  var _useState = useState(props.value),
32
31
  _useState2 = _slicedToArray(_useState, 2),
@@ -20,7 +20,6 @@ import EventContent from "../content";
20
20
  import { chartTypes } from "../../constants";
21
21
  var classPrefix = 'interval-module-container';
22
22
  var ModuleInterval = function ModuleInterval(props) {
23
- console.log(9999999911111, props);
24
23
  // 属性
25
24
  var _useContext = useContext(BizGlobalDataContext),
26
25
  currentApp = _useContext.currentApp,
@@ -23,7 +23,6 @@ var TopPanel = function TopPanel(props) {
23
23
  collapseRef = props.collapseRef,
24
24
  finalSearchData = props.finalSearchData,
25
25
  fetchRequest = props.fetchRequest;
26
- console.log('99999999', props);
27
26
  var _Form$useForm = Form.useForm(),
28
27
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
29
28
  form = _Form$useForm2[0];
@@ -33,7 +33,6 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
33
33
  // onClickToDetailCallback: Function,
34
34
  ) {
35
35
  var _dataSource$appData, _dataSource$appData$s, _searchData$dimension;
36
- // console.log(66666661111111, searchData?.dimension?.label);
37
36
  // 显示
38
37
  var data = [{
39
38
  title: dataSource !== null && dataSource !== void 0 && (_dataSource$appData = dataSource.appData) !== null && _dataSource$appData !== void 0 && (_dataSource$appData$s = _dataSource$appData.series[0]) !== null && _dataSource$appData$s !== void 0 && _dataSource$appData$s.names[0] ? searchData === null || searchData === void 0 ? void 0 : (_searchData$dimension = searchData.dimension) === null || _searchData$dimension === void 0 ? void 0 : _searchData$dimension.label : '日期',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-interval",
3
- "version": "1.0.0-interval.46",
3
+ "version": "1.0.0-interval.47",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",