@zgfe/modules-interval 1.0.23-zhongyuan.10 → 1.0.23-zhongyuan.12

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.
@@ -1,4 +1,7 @@
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
2
5
  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
6
  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
7
  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; }
@@ -13,13 +16,15 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
16
  import { Tooltip, message } from 'antd';
14
17
  import React, { useContext, useEffect, useRef, useState } from 'react';
15
18
  import { BizEventSelector, IconFont, BizAttrConditionGroup, BizGlobalDataContext } from '@zgfe/business-lib';
19
+ import { eventApi } from '@zgfe/business-lib/es/utils';
16
20
  import "./styles/index.less";
17
21
  import _ from 'lodash';
18
22
  var classPrefix = 'interval-box';
19
23
  var EventFilter = function EventFilter(props) {
20
24
  var _useContext = useContext(BizGlobalDataContext),
21
25
  eventIdMap = _useContext.eventIdMap,
22
- envs = _useContext.envs;
26
+ envs = _useContext.envs,
27
+ currentApp = _useContext.currentApp;
23
28
  // 筛选条件个数
24
29
  var _useState = useState(0),
25
30
  _useState2 = _slicedToArray(_useState, 2),
@@ -142,6 +147,37 @@ var EventFilter = function EventFilter(props) {
142
147
  }
143
148
  props.onChange && props.onChange(_event);
144
149
  }, [bizAttributeSelectorValue, filter, event, relevancy]);
150
+ var _useState15 = useState([]),
151
+ _useState16 = _slicedToArray(_useState15, 2),
152
+ eventAttrs = _useState16[0],
153
+ setEventAttrs = _useState16[1];
154
+ useEffect(function () {
155
+ if (event) {
156
+ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
157
+ var eventAttrs;
158
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
159
+ while (1) switch (_context.prev = _context.next) {
160
+ case 0:
161
+ _context.next = 2;
162
+ return eventApi.fetchEventAttrs(event === null || event === void 0 ? void 0 : event.id, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId);
163
+ case 2:
164
+ _context.t0 = _context.sent;
165
+ if (_context.t0) {
166
+ _context.next = 5;
167
+ break;
168
+ }
169
+ _context.t0 = [];
170
+ case 5:
171
+ eventAttrs = _context.t0;
172
+ setEventAttrs(eventAttrs);
173
+ case 7:
174
+ case "end":
175
+ return _context.stop();
176
+ }
177
+ }, _callee);
178
+ }))();
179
+ }
180
+ }, [event.id]);
145
181
  return /*#__PURE__*/React.createElement("div", {
146
182
  className: classPrefix
147
183
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizEventSelector, {
@@ -155,11 +191,12 @@ var EventFilter = function EventFilter(props) {
155
191
  },
156
192
  onChange: onChangeEvent,
157
193
  filter: function filter(event) {
194
+ console.log(event, 'event');
158
195
  if (!props.subject) return true;
159
196
  var propMatch = false;
160
- for (var i = 0; i < event.attrList.length; i++) {
197
+ for (var i = 0; i < eventAttrs.length; i++) {
161
198
  var _props$subject;
162
- var attr = event.attrList[i];
199
+ var attr = eventAttrs[i];
163
200
  if (attr.label === ((_props$subject = props.subject) === null || _props$subject === void 0 ? void 0 : _props$subject.subjectName)) {
164
201
  propMatch = true;
165
202
  break;
@@ -12,19 +12,21 @@ import "./styles/index.less";
12
12
  import IntervalEventChart from "../../modules/chart";
13
13
  var classPrefix = 'render-content-interval';
14
14
  var ContentPanel = function ContentPanel(props) {
15
+ var _props$searchData;
15
16
  var loading = props.loading,
16
17
  eventData = props.eventData,
17
18
  searchData = props.searchData;
18
19
  var _useContext = useContext(IntervalContext),
19
20
  refreshLoading = _useContext.refreshLoading;
20
21
  // 显示内容
21
- var _useState = useState(props.showList || []),
22
+ var _useState = useState(((_props$searchData = props.searchData) === null || _props$searchData === void 0 ? void 0 : _props$searchData.displaySetup) || []),
22
23
  _useState2 = _slicedToArray(_useState, 2),
23
24
  showList = _useState2[0],
24
25
  setShowList = _useState2[1];
25
26
  useEffect(function () {
26
- setShowList(props.showList);
27
- }, [eventData]);
27
+ var _props$searchData2;
28
+ setShowList(((_props$searchData2 = props.searchData) === null || _props$searchData2 === void 0 ? void 0 : _props$searchData2.displaySetup) || []);
29
+ }, [props === null || props === void 0 ? void 0 : props.searchData]);
28
30
 
29
31
  // 表格筛选,取前10个
30
32
  var onChangeShow = function onChangeShow(names) {
@@ -1,32 +1,32 @@
1
- .render-content-interval-chart-container {
2
- display: flex;
3
- flex-direction: column;
4
- align-items: center;
5
- justify-content: center;
6
- min-height: 300px;
7
- }
8
- .render-content-interval-chart-container .echarts-for-react {
9
- width: 100%;
10
- background: #fff;
11
- border: 1px solid var(--unnamed, #ecedf0);
12
- border-radius: 8px;
13
- }
14
- .render-content-interval-MiNone {
15
- display: flex;
16
- align-items: center;
17
- justify-content: center;
18
- width: 100%;
19
- height: 368px;
20
- padding: 24px 16px;
21
- border: 1px solid #ecedf0;
22
- border-radius: 8px;
23
- }
24
- .render-content-interval-spin-container {
25
- display: flex !important;
26
- align-items: center;
27
- justify-content: center;
28
- min-height: 300px;
29
- }
30
- .render-content-interval-spin-container .biz-loading-wrapper {
31
- width: 100%;
32
- }
1
+ .render-content-interval-chart-container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ min-height: 300px;
7
+ }
8
+ .render-content-interval-chart-container .echarts-for-react {
9
+ width: 100%;
10
+ background: #fff;
11
+ border: 1px solid var(--unnamed, #ecedf0);
12
+ border-radius: 8px;
13
+ }
14
+ .render-content-interval-MiNone {
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ width: 100%;
19
+ height: 368px;
20
+ padding: 24px 16px;
21
+ border: 1px solid #ecedf0;
22
+ border-radius: 8px;
23
+ }
24
+ .render-content-interval-spin-container {
25
+ display: flex !important;
26
+ align-items: center;
27
+ justify-content: center;
28
+ min-height: 300px;
29
+ }
30
+ .render-content-interval-spin-container .biz-loading-wrapper {
31
+ width: 100%;
32
+ }
@@ -1,37 +1,37 @@
1
- .render-content-interval {
2
- &-chart-container {
3
- display: flex;
4
- flex-direction: column;
5
- align-items: center;
6
- justify-content: center;
7
- min-height: 300px;
8
-
9
- .echarts-for-react {
10
- width: 100%;
11
- background: #fff;
12
- border: 1px solid var(--unnamed, #ecedf0);
13
- border-radius: 8px;
14
- }
15
- }
16
-
17
- &-MiNone {
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
- width: 100%;
22
- height: 368px;
23
- padding: 24px 16px;
24
- border: 1px solid #ecedf0;
25
- border-radius: 8px;
26
- }
27
-
28
- &-spin-container {
29
- display: flex !important;
30
- align-items: center;
31
- justify-content: center;
32
- min-height: 300px;
33
- .biz-loading-wrapper {
34
- width: 100%;
35
- }
36
- }
37
- }
1
+ .render-content-interval {
2
+ &-chart-container {
3
+ display: flex;
4
+ flex-direction: column;
5
+ align-items: center;
6
+ justify-content: center;
7
+ min-height: 300px;
8
+
9
+ .echarts-for-react {
10
+ width: 100%;
11
+ background: #fff;
12
+ border: 1px solid var(--unnamed, #ecedf0);
13
+ border-radius: 8px;
14
+ }
15
+ }
16
+
17
+ &-MiNone {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ width: 100%;
22
+ height: 368px;
23
+ padding: 24px 16px;
24
+ border: 1px solid #ecedf0;
25
+ border-radius: 8px;
26
+ }
27
+
28
+ &-spin-container {
29
+ display: flex !important;
30
+ align-items: center;
31
+ justify-content: center;
32
+ min-height: 300px;
33
+ .biz-loading-wrapper {
34
+ width: 100%;
35
+ }
36
+ }
37
+ }
@@ -47,7 +47,7 @@ var SearchPanel = function SearchPanel(props) {
47
47
  var _useState9 = useState([]),
48
48
  _useState10 = _slicedToArray(_useState9, 2),
49
49
  displaySetupSliceList = _useState10[0],
50
- setDisplaySetupSliceList = _useState10[1];
50
+ setDisplaySetupSliceList = _useState10[1]; // 选中的显示设置
51
51
  // 查询维度
52
52
  var _useState11 = useState({
53
53
  analysisIndex: 'number'
@@ -58,8 +58,10 @@ var SearchPanel = function SearchPanel(props) {
58
58
  // 初始化表格表头和内容
59
59
  useEffect(function () {
60
60
  if (props !== null && props !== void 0 && props.eventData) {
61
+ var _props$searchData;
61
62
  var arr = extractNames(props === null || props === void 0 ? void 0 : props.eventData);
62
63
  setDisplaySetupLIst(arr);
64
+ setDisplaySetupSliceList(props === null || props === void 0 ? void 0 : (_props$searchData = props.searchData) === null || _props$searchData === void 0 ? void 0 : _props$searchData.displaySetup);
63
65
  }
64
66
  }, [props === null || props === void 0 ? void 0 : props.eventData]);
65
67
  // 初始化
@@ -123,7 +125,7 @@ var SearchPanel = function SearchPanel(props) {
123
125
  placeholder: "\u8BF7\u9009\u62E9\u663E\u793A\u8BBE\u7F6E",
124
126
  enableSearch: true,
125
127
  options: displaySetupList,
126
- value: displaySetupSliceList.length > 0 ? displaySetupSliceList : displaySetupList.slice(0, 4),
128
+ value: displaySetupSliceList,
127
129
  labelField: "label",
128
130
  keyField: "value"
129
131
  })), /*#__PURE__*/React.createElement(Button, {
@@ -1,5 +1,5 @@
1
1
  import { DatePickerTypes } from '@zgfe/business-lib/es/datePicker/types';
2
- import { EventChartTypes, ResponseDataProps } from '../../types';
2
+ import { EventChartTypes, ResponseDataProps, SearchValue } from '../../types';
3
3
  import { ReactNode } from 'react';
4
4
  /**
5
5
  * 右边的查询组件
@@ -43,6 +43,7 @@ export interface SearchPanelProps {
43
43
  * 内容改变回调
44
44
  */
45
45
  onChange?: (data: SearchPanelProps) => void;
46
+ searchData?: SearchValue;
46
47
  }
47
48
  export interface DisplaySetup {
48
49
  value: number;
@@ -1,13 +1,13 @@
1
- /**
2
- * @description 异常状态码
1
+ /**
2
+ * @description 异常状态码
3
3
  */
4
4
  export var ERROR_RESPONESE_CODE = {
5
- /**
6
- * @description 刷新失败
5
+ /**
6
+ * @description 刷新失败
7
7
  */
8
8
  REFRESH_FAIL: '100080',
9
- /**
10
- * @description 用户群或标签查询异常
9
+ /**
10
+ * @description 用户群或标签查询异常
11
11
  */
12
12
  EXCEPTION: '100081'
13
13
  };
@@ -3,8 +3,6 @@ import "./index.less";
3
3
  var CustomTooltip = function CustomTooltip(_ref) {
4
4
  var payload = _ref.payload,
5
5
  series = _ref.series;
6
- console.log(payload, series, 'payload, series');
7
-
8
6
  // 初始化,判断showList是否有值,如果没值,取结果的前10条
9
7
  useEffect(function () {}, []);
10
8
  function convertToHMS(seconds) {
@@ -1,52 +1,52 @@
1
- .custom-tooltip-chart {
2
- display: inline-block;
3
- flex-direction: column;
4
- flex-shrink: 0;
5
- gap: 4px;
6
- align-items: flex-start;
7
- width: 146px;
8
- height: 100%;
9
- padding: 8px;
10
- color: var(--io-n, #021429);
11
- font-weight: 500;
12
- font-size: 12px;
13
- font-style: normal;
14
- border-radius: 10px;
15
- box-shadow: 0px 4px 10px 0px #0000001a;
16
- }
17
- .custom-tooltip-chart .custom-tooltip-name {
18
- color: var(--io-n, #021429);
19
- font-weight: 500;
20
- font-size: 12px;
21
- font-family: PingFang SC;
22
- font-style: normal;
23
- line-height: normal;
24
- }
25
- .custom-tooltip-chart .custom-tooltip-div {
26
- display: flex;
27
- flex-direction: column;
28
- gap: 6px;
29
- width: 100%;
30
- height: 100%;
31
- padding: 0px 8px;
32
- background: #fff;
33
- border-radius: 4px;
34
- box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04);
35
- }
36
- .custom-tooltip-chart .custom-tooltip-div .tooltip-span {
37
- display: block;
38
- color: var(--3, #5f6085);
39
- font-weight: 400;
40
- font-size: 12px;
41
- font-family: PingFang SC;
42
- font-style: normal;
43
- line-height: normal;
44
- }
45
- .custom-tooltip-chart .custom-tooltip-div > div {
46
- display: flex;
47
- align-items: center;
48
- justify-content: space-between;
49
- }
50
- .custom-tooltip-chart .custom-tooltip-div .tooltip-marker {
51
- justify-content: flex-start;
52
- }
1
+ .custom-tooltip-chart {
2
+ display: inline-block;
3
+ flex-direction: column;
4
+ flex-shrink: 0;
5
+ gap: 4px;
6
+ align-items: flex-start;
7
+ width: 146px;
8
+ height: 100%;
9
+ padding: 8px;
10
+ color: var(--io-n, #021429);
11
+ font-weight: 500;
12
+ font-size: 12px;
13
+ font-style: normal;
14
+ border-radius: 10px;
15
+ box-shadow: 0px 4px 10px 0px #0000001a;
16
+ }
17
+ .custom-tooltip-chart .custom-tooltip-name {
18
+ color: var(--io-n, #021429);
19
+ font-weight: 500;
20
+ font-size: 12px;
21
+ font-family: PingFang SC;
22
+ font-style: normal;
23
+ line-height: normal;
24
+ }
25
+ .custom-tooltip-chart .custom-tooltip-div {
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: 6px;
29
+ width: 100%;
30
+ height: 100%;
31
+ padding: 0px 8px;
32
+ background: #fff;
33
+ border-radius: 4px;
34
+ box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04);
35
+ }
36
+ .custom-tooltip-chart .custom-tooltip-div .tooltip-span {
37
+ display: block;
38
+ color: var(--3, #5f6085);
39
+ font-weight: 400;
40
+ font-size: 12px;
41
+ font-family: PingFang SC;
42
+ font-style: normal;
43
+ line-height: normal;
44
+ }
45
+ .custom-tooltip-chart .custom-tooltip-div > div {
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: space-between;
49
+ }
50
+ .custom-tooltip-chart .custom-tooltip-div .tooltip-marker {
51
+ justify-content: flex-start;
52
+ }
@@ -1,58 +1,58 @@
1
- .custom-tooltip-chart {
2
- display: inline-block;
3
- flex-direction: column;
4
- flex-shrink: 0;
5
- gap: 4px;
6
- align-items: flex-start;
7
- width: 146px;
8
- height: 100%;
9
- padding: 8px;
10
- color: var(--io-n, #021429);
11
- font-weight: 500;
12
- font-size: 12px;
13
- font-style: normal;
14
- // background: rgba(250, 251, 253, 0.8);
15
- border-radius: 10px;
16
- box-shadow: 0px 4px 10px 0px #0000001a;
17
-
18
- .custom-tooltip-name {
19
- color: var(--io-n, #021429);
20
- font-weight: 500;
21
- font-size: 12px;
22
- font-family: PingFang SC;
23
- font-style: normal;
24
- line-height: normal;
25
- }
26
-
27
- .custom-tooltip-div {
28
- display: flex;
29
- flex-direction: column;
30
- gap: 6px;
31
- width: 100%;
32
- height: 100%;
33
- padding: 0px 8px;
34
- background: #fff;
35
- border-radius: 4px;
36
- box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04);
37
-
38
- .tooltip-span {
39
- display: block;
40
- color: var(--3, #5f6085);
41
- font-weight: 400;
42
- font-size: 12px;
43
- font-family: PingFang SC;
44
- font-style: normal;
45
- line-height: normal;
46
- }
47
-
48
- > div {
49
- display: flex;
50
- align-items: center;
51
- justify-content: space-between;
52
- }
53
-
54
- .tooltip-marker {
55
- justify-content: flex-start;
56
- }
57
- }
58
- }
1
+ .custom-tooltip-chart {
2
+ display: inline-block;
3
+ flex-direction: column;
4
+ flex-shrink: 0;
5
+ gap: 4px;
6
+ align-items: flex-start;
7
+ width: 146px;
8
+ height: 100%;
9
+ padding: 8px;
10
+ color: var(--io-n, #021429);
11
+ font-weight: 500;
12
+ font-size: 12px;
13
+ font-style: normal;
14
+ // background: rgba(250, 251, 253, 0.8);
15
+ border-radius: 10px;
16
+ box-shadow: 0px 4px 10px 0px #0000001a;
17
+
18
+ .custom-tooltip-name {
19
+ color: var(--io-n, #021429);
20
+ font-weight: 500;
21
+ font-size: 12px;
22
+ font-family: PingFang SC;
23
+ font-style: normal;
24
+ line-height: normal;
25
+ }
26
+
27
+ .custom-tooltip-div {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 6px;
31
+ width: 100%;
32
+ height: 100%;
33
+ padding: 0px 8px;
34
+ background: #fff;
35
+ border-radius: 4px;
36
+ box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04);
37
+
38
+ .tooltip-span {
39
+ display: block;
40
+ color: var(--3, #5f6085);
41
+ font-weight: 400;
42
+ font-size: 12px;
43
+ font-family: PingFang SC;
44
+ font-style: normal;
45
+ line-height: normal;
46
+ }
47
+
48
+ > div {
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: space-between;
52
+ }
53
+
54
+ .tooltip-marker {
55
+ justify-content: flex-start;
56
+ }
57
+ }
58
+ }
@@ -226,7 +226,6 @@ var IntervalChart = function IntervalChart(props) {
226
226
  echartsInstance = _useState4[0],
227
227
  setEchartsInstance = _useState4[1];
228
228
  useEffect(function () {
229
- console.log(chartRef.current.getEchartsInstance(), 'chartRef.current.getEchartsInstance()');
230
229
  setEchartsInstance(chartRef.current.getEchartsInstance());
231
230
  }, []);
232
231
  return /*#__PURE__*/React.createElement(ReactECharts, {
@@ -241,10 +240,7 @@ var IntervalChart = function IntervalChart(props) {
241
240
  return updateCollapseButton(params);
242
241
  },
243
242
  mousemove: function mousemove(params) {
244
- console.log('鼠标进入');
245
243
  var pointInPixel = [params.offsetX, params.offsetY];
246
- console.log(echartsInstance, 'echartsInstanceechartsInstance');
247
-
248
244
  // 检查是否在网格区域内
249
245
  if (echartsInstance && echartsInstance.containPixel('grid', pointInPixel)) {
250
246
  var pointInGrid = echartsInstance && echartsInstance.convertFromPixel({
@@ -36,9 +36,9 @@ var IntervalChart = function IntervalChart(props) {
36
36
  setChartInstance(aDom);
37
37
  }, []);
38
38
  useEffect(function () {
39
- var _props$showList, _seriesData$series;
39
+ var _props$showList$appDa, _props$showList, _props$dataSource, _seriesData$series;
40
40
  // chartRef && chartRef.current.getEchartsInstance().clear();
41
- var seriesData = props === null || props === void 0 ? void 0 : (_props$showList = props.showList) === null || _props$showList === void 0 ? void 0 : _props$showList.appData;
41
+ var seriesData = (_props$showList$appDa = props === null || props === void 0 ? void 0 : (_props$showList = props.showList) === null || _props$showList === void 0 ? void 0 : _props$showList.appData) !== null && _props$showList$appDa !== void 0 ? _props$showList$appDa : props === null || props === void 0 ? void 0 : (_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.appData;
42
42
  var params = props === null || props === void 0 ? void 0 : props.params;
43
43
  var eCharts = {
44
44
  tooltip: {
@@ -22,6 +22,7 @@ import { ContentPanel, SearchPanel } from "../../components";
22
22
  import TopPanel from "../topPanel";
23
23
  import { message } from 'antd';
24
24
  import { ERROR_RESPONESE_CODE } from "../../constants/code";
25
+ import { extractNames } from "../../utils/formData";
25
26
  var CancelToken = Request.CancelToken;
26
27
  var cancel;
27
28
  var refresh = false;
@@ -161,8 +162,17 @@ var EventContent = function EventContent(props) {
161
162
  }
162
163
  var result = res.data;
163
164
  setEventData(result);
164
- setFinalSearchData(_objectSpread({}, searchData));
165
+ var arr = extractNames(result);
166
+ setFinalSearchData(_objectSpread(_objectSpread({}, searchData), {}, {
167
+ displaySetup: arr === null || arr === void 0 ? void 0 : arr.splice(0, 4)
168
+ }));
169
+ setSearchData(_objectSpread(_objectSpread({}, searchData), {}, {
170
+ displaySetup: arr === null || arr === void 0 ? void 0 : arr.splice(0, 4)
171
+ }));
165
172
  loadingHandle();
173
+ if (props !== null && props !== void 0 && props.setShowList) {
174
+ props.setShowList(arr === null || arr === void 0 ? void 0 : arr.splice(0, 4));
175
+ }
166
176
  }).catch(function () {
167
177
  loadingHandle();
168
178
  });
@@ -201,6 +211,9 @@ var EventContent = function EventContent(props) {
201
211
  // 改变显示内容
202
212
  var onChangeShow = function onChangeShow(data) {
203
213
  setShowList(data);
214
+ if (props !== null && props !== void 0 && props.setShowList) {
215
+ props.setShowList(data);
216
+ }
204
217
  };
205
218
 
206
219
  // 平台变更
@@ -253,6 +266,7 @@ var EventContent = function EventContent(props) {
253
266
  analysisAttr: searchData === null || searchData === void 0 ? void 0 : searchData.analysisAttr,
254
267
  displaySetup: searchData === null || searchData === void 0 ? void 0 : searchData.analysisAttr,
255
268
  analysisIndex: searchData === null || searchData === void 0 ? void 0 : searchData.analysisIndex,
269
+ searchData: searchData,
256
270
  eventId: eventId,
257
271
  eventData: eventData,
258
272
  enableSelectChart: enableSelectChart,
@@ -14,6 +14,7 @@ export declare namespace EventContentProps {
14
14
  * 展示列表
15
15
  */
16
16
  show?: string[];
17
+ setShowList?: any;
17
18
  /**
18
19
  * 是否查询中
19
20
  */