@vtx/modals2 5.0.3 → 5.0.4
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.
- package/lib/_components/index.js +4 -3
- package/lib/_components/vm-bar-charts/index.js +1 -1
- package/lib/_components/vm-calendar/style/index.less +4 -7
- package/lib/_components/vm-card-statistics/index.less +27 -27
- package/lib/_components/vm-factor/index.js +10 -5
- package/lib/_components/vm-factor/style/index.less +5 -1
- package/lib/_components/vm-factor-list/index.less +11 -11
- package/lib/_components/vm-filter/style/index.less +2 -1
- package/lib/_components/vm-info-collection/index.js +2 -2
- package/lib/_components/vm-line-charts/index.js +1 -1
- package/lib/_components/vm-map/index.js +5 -5
- package/lib/_components/vm-pie-charts/index.js +7 -5
- package/lib/_components/vm-repair-maintain/RmInfoSummary.js +46 -0
- package/lib/_components/vm-repair-maintain/RmMonthTrend.js +44 -0
- package/lib/_components/vm-repair-maintain/RmRecord.js +157 -0
- package/lib/_components/vm-repair-maintain/RmType.js +32 -0
- package/lib/_components/vm-repair-maintain/api.js +92 -0
- package/lib/_components/vm-repair-maintain/imgs/amount.png +0 -0
- package/lib/_components/vm-repair-maintain/imgs/amount_light.png +0 -0
- package/lib/_components/vm-repair-maintain/imgs/count.png +0 -0
- package/lib/_components/vm-repair-maintain/imgs/count_light.png +0 -0
- package/lib/_components/vm-repair-maintain/index.js +56 -0
- package/lib/_components/vm-repair-maintain/style/index.js +1 -0
- package/lib/_components/vm-repair-maintain/style/index.less +25 -0
- package/lib/_components/vm-table/index.js +7 -4
- package/lib/_components/vm-table/style/index.less +3 -2
- package/lib/_components/vm-tag/style/index.less +9 -0
- package/lib/_components/vm-title/index.js +3 -2
- package/lib/_components/vm-wrapper/index.js +32 -10
- package/lib/_components/vm-wrapper/style/index.less +28 -0
- package/lib/index.js +7 -2
- package/lib/style/index.less +2 -6
- package/lib/vtx-area-modal/components/BaseInfo/ListZymx.js +2 -1
- package/lib/vtx-base-modal/Header/index.less +98 -98
- package/lib/vtx-base-modal/Tabs/index.less +31 -31
- package/lib/vtx-base-modal/index.js +5 -2
- package/lib/vtx-car-modal/api.js +4 -3
- package/lib/vtx-car-modal/components/Info/index.less +6 -6
- package/lib/vtx-car-modal/content/Cc/BaseInfo/index.js +3 -0
- package/lib/vtx-car-modal/content/Cc/WorkRecord/Summary.js +1 -0
- package/lib/vtx-car-modal/content/Common/BaseInfo/index.js +5 -1
- package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
- package/lib/vtx-car-modal/content/Common/StaticInfo/index.js +1 -0
- package/lib/vtx-car-modal/content/Common/WaterConsumption/index.js +1 -0
- package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
- package/lib/vtx-car-modal/content/JXH/AlarmInfo/List.js +9 -3
- package/lib/vtx-car-modal/content/JXH/BaseInfo/index.js +5 -1
- package/lib/vtx-car-modal/content/JXH/StaticInfo/index.js +7 -6
- package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +20 -12
- package/lib/vtx-car-modal/content/Ljsy/BaseInfo/index.js +3 -0
- package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Summary.js +1 -0
- package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +3 -0
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Summary.js +1 -0
- package/lib/vtx-car-modal/index.js +16 -2
- package/lib/vtx-cc-cp-modal/api.js +381 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmRecord.js +120 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTrend.js +27 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTypeAnalysis.js +32 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/StaticInfo.js +41 -0
- package/lib/vtx-cc-cp-modal/components/AlarmInfo/index.js +69 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/AllWork.js +103 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/Info.js +75 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/Rules.js +58 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/SyRecord.js +142 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/index.js +63 -0
- package/lib/vtx-cc-cp-modal/components/BaseInfo/index.less +16 -0
- package/lib/vtx-cc-cp-modal/components/Calendar/index.js +168 -0
- package/lib/vtx-cc-cp-modal/components/Calendar/index.less +93 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTrend.js +27 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTypeAnalysis.js +32 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExeceptionRecord.js +118 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/StaticInfo.js +41 -0
- package/lib/vtx-cc-cp-modal/components/ExceptionInfo/index.js +69 -0
- package/lib/vtx-cc-cp-modal/components/Restaurant/index.js +111 -0
- package/lib/vtx-cc-cp-modal/components/Restaurant/index.less +3 -0
- package/lib/vtx-cc-cp-modal/components/SyInfo/Ljcsl.js +46 -0
- package/lib/vtx-cc-cp-modal/components/SyInfo/SummaryInfo.js +81 -0
- package/lib/vtx-cc-cp-modal/components/SyInfo/index.js +78 -0
- package/lib/vtx-cc-cp-modal/components/index.js +7 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsjts.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsjts_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsjzl.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsjzl_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsscs.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/rwnsscs_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsjts.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsjts_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsjzl.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsjzl_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsscs.png +0 -0
- package/lib/vtx-cc-cp-modal/imgs/zsscs_dark.png +0 -0
- package/lib/vtx-cc-cp-modal/index.js +119 -0
- package/lib/vtx-cc-cp-modal/style/index.js +1 -0
- package/lib/vtx-cc-cp-modal/style/index.less +13 -0
- package/lib/vtx-cc-unit-modal/api.js +361 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/CollectRecord.js +69 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/DetailList.js +66 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/Factory.js +60 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/Statistics.js +91 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/index.js +118 -0
- package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -0
- package/lib/vtx-cc-unit-modal/components/CarList/index.js +129 -0
- package/lib/vtx-cc-unit-modal/components/Collection/index.js +95 -0
- package/lib/vtx-cc-unit-modal/components/DetailInfo/index.js +126 -0
- package/lib/vtx-cc-unit-modal/components/Factory/index.js +149 -0
- package/lib/vtx-cc-unit-modal/components/RestaurantList/index.js +127 -0
- package/lib/vtx-cc-unit-modal/components/index.js +7 -0
- package/lib/vtx-cc-unit-modal/imgs/jccc.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/jccc_dark.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/jcl.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/jcl_dark.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/syts.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/syts_dark.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/syzl.png +0 -0
- package/lib/vtx-cc-unit-modal/imgs/syzl_dark.png +0 -0
- package/lib/vtx-cc-unit-modal/index.js +137 -0
- package/lib/vtx-cc-unit-modal/style/index.js +1 -0
- package/lib/vtx-cc-unit-modal/style/index.less +14 -0
- package/lib/vtx-cp-modal/api.js +3 -3
- package/lib/vtx-cp-modal/index.js +4 -1
- package/lib/vtx-default-modal/index.js +10 -7
- package/lib/vtx-device-modal/api.js +531 -0
- package/lib/vtx-device-modal/components/BaseInfo/index.js +140 -0
- package/lib/vtx-device-modal/components/DataAnalysis/AlarmAnalysis.js +279 -0
- package/lib/vtx-device-modal/components/DataAnalysis/MonitorAnalysis.js +611 -0
- package/lib/vtx-device-modal/components/DataAnalysis/TabsList.js +23 -0
- package/lib/vtx-device-modal/components/DataAnalysis/index.js +24 -0
- package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -0
- package/lib/vtx-device-modal/components/index.js +3 -0
- package/lib/vtx-device-modal/config.js +21 -0
- package/lib/vtx-device-modal/imgs/current.png +0 -0
- package/lib/vtx-device-modal/imgs/current_dark.png +0 -0
- package/lib/vtx-device-modal/imgs/history.png +0 -0
- package/lib/vtx-device-modal/imgs/history_dark.png +0 -0
- package/lib/vtx-device-modal/index.js +96 -0
- package/lib/vtx-device-modal/style/index.js +1 -0
- package/lib/vtx-device-modal/style/index.less +1 -0
- package/lib/vtx-df-modal/index.js +11 -9
- package/lib/vtx-kh-modal/api2.js +178 -0
- package/lib/vtx-kh-modal/components/BaseInfo/index.js +197 -0
- package/lib/vtx-kh-modal/components/BaseInfo/index.less +101 -0
- package/lib/vtx-kh-modal/components/Record/index.js +204 -0
- package/lib/vtx-kh-modal/components/Record/index.less +7 -0
- package/lib/vtx-kh-modal/components/index.js +3 -0
- package/lib/vtx-kh-modal/imgs/count.png +0 -0
- package/lib/vtx-kh-modal/imgs/count_light.png +0 -0
- package/lib/vtx-kh-modal/imgs/question_bg.png +0 -0
- package/lib/vtx-kh-modal/imgs/question_bg_light.png +0 -0
- package/lib/vtx-kh-modal/imgs/score.png +0 -0
- package/lib/vtx-kh-modal/imgs/score_light.png +0 -0
- package/lib/vtx-kh-modal/imgs/subtract.png +0 -0
- package/lib/vtx-kh-modal/imgs/subtract_light.png +0 -0
- package/lib/vtx-kh-modal/index.js +46 -0
- package/lib/vtx-kh-modal/style/index.js +4 -0
- package/lib/vtx-kh-modal/style/index.less +1 -0
- package/lib/vtx-restaurant-modal/api.js +297 -0
- package/lib/vtx-restaurant-modal/components/Alarm/AlarmRecord.js +47 -0
- package/lib/vtx-restaurant-modal/components/Alarm/AlarmTrend.js +31 -0
- package/lib/vtx-restaurant-modal/components/Alarm/AlarmTypeAnalysis.js +36 -0
- package/lib/vtx-restaurant-modal/components/Alarm/StaticInfo.js +41 -0
- package/lib/vtx-restaurant-modal/components/Alarm/index.js +69 -0
- package/lib/vtx-restaurant-modal/components/Basic/CollectRule.js +64 -0
- package/lib/vtx-restaurant-modal/components/Basic/DetailList.js +68 -0
- package/lib/vtx-restaurant-modal/components/Basic/Info.js +87 -0
- package/lib/vtx-restaurant-modal/components/Basic/Summary.js +61 -0
- package/lib/vtx-restaurant-modal/components/Basic/SummaryStatistics.js +60 -0
- package/lib/vtx-restaurant-modal/components/Basic/index.js +74 -0
- package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -0
- package/lib/vtx-restaurant-modal/components/Calendar/index.js +171 -0
- package/lib/vtx-restaurant-modal/components/Calendar/index.less +93 -0
- package/lib/vtx-restaurant-modal/components/Collection/index.js +86 -0
- package/lib/vtx-restaurant-modal/components/DetailInfo/index.js +111 -0
- package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +299 -0
- package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +198 -0
- package/lib/vtx-restaurant-modal/components/index.js +7 -0
- package/lib/vtx-restaurant-modal/config.js +283 -0
- package/lib/vtx-restaurant-modal/imgs/csl.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/csl_dark.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/sycs.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/sycs_dark.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/syts.png +0 -0
- package/lib/vtx-restaurant-modal/imgs/syts_dark.png +0 -0
- package/lib/vtx-restaurant-modal/index.js +168 -0
- package/lib/vtx-restaurant-modal/style/index.js +1 -0
- package/lib/vtx-restaurant-modal/style/index.less +13 -0
- package/lib/vtx-road-modal/components/BaseInfo/index.less +218 -218
- package/lib/vtx-road-modal/components/Statistical/index.less +32 -32
- package/lib/vtx-shxq-modal/components/AlarmRecord/index.js +4 -1
- package/lib/vtx-shxq-modal/components/Tfd/index.js +0 -1
- package/lib/vtx-shxq-modal/components/ThrowRecord/index.js +4 -1
- package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +6 -2
- package/lib/vtx-tfd-modal/api.js +22 -27
- package/lib/vtx-tfd-modal/components/BaseInfo/index.js +107 -59
- package/lib/vtx-tfd-modal/components/BaseInfo/index.less +5 -0
- package/lib/vtx-zg-modal/api.js +107 -0
- package/lib/vtx-zg-modal/components/BaseInfo/index.js +287 -0
- package/lib/vtx-zg-modal/components/BaseInfo/index.less +124 -0
- package/lib/vtx-zg-modal/components/index.js +1 -0
- package/lib/vtx-zg-modal/imgs/dot.png +0 -0
- package/lib/vtx-zg-modal/imgs/dot_done.png +0 -0
- package/lib/vtx-zg-modal/index.js +42 -0
- package/lib/vtx-zg-modal/style/index.js +3 -0
- package/lib/vtx-zg-modal/style/index.less +1 -0
- package/lib/vtx-zzz-modal/index.js +10 -10
- package/package.json +1 -1
- package/lib/vtx-car-modal/imgs/calendar/fsdf/durationqq.png +0 -0
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import { ChartIcon, ListIcon } from "../../../_util/iconSvgHtml";
|
|
12
|
+
import { useSetState } from 'ahooks';
|
|
13
|
+
import { Col, Row, Space, Spin } from 'antd';
|
|
14
|
+
import classnames from 'classnames';
|
|
15
|
+
import dayjs from 'dayjs';
|
|
16
|
+
import * as echarts from 'echarts';
|
|
17
|
+
import ReactEcharts from 'echarts-for-react';
|
|
18
|
+
import { isEmpty } from 'lodash';
|
|
19
|
+
import { useEffect, useState } from 'react';
|
|
20
|
+
import { VmEmpty, VmExtraTab, VmFilter, VmTable, VmTag, VmTitle, VmWrapper } from "../../../_components";
|
|
21
|
+
import useSettings from "../../../_hooks/useSettings";
|
|
22
|
+
import { BaseService } from "../../api";
|
|
23
|
+
import "./index.less";
|
|
24
|
+
import TabsList from "./TabsList";
|
|
25
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
var MonitorAnalysis = function MonitorAnalysis(_ref) {
|
|
27
|
+
var _newList$, _newList$2, _newList$3;
|
|
28
|
+
var id = _ref.id;
|
|
29
|
+
var _useSettings = useSettings(),
|
|
30
|
+
chartFontColor = _useSettings.chartFontColor,
|
|
31
|
+
chartLineColor = _useSettings.chartLineColor,
|
|
32
|
+
isDark = _useSettings.isDark,
|
|
33
|
+
theme = _useSettings.theme;
|
|
34
|
+
var blueColor = '#1677FF';
|
|
35
|
+
var greenColor = '#0fb964';
|
|
36
|
+
var areaColor = ['rgba(22, 119, 255, 0.30)', 'rgba(22, 119, 255, 0)'];
|
|
37
|
+
if (isDark) {
|
|
38
|
+
blueColor = '#009dff';
|
|
39
|
+
greenColor = ' #13f97';
|
|
40
|
+
areaColor = ['rgba(22, 119, 255, 0.30)', 'rgba(22, 119, 255, 0)'];
|
|
41
|
+
}
|
|
42
|
+
var _BaseService$useRealt = BaseService.useRealtimeList(id),
|
|
43
|
+
data = _BaseService$useRealt.data;
|
|
44
|
+
var _useState = useState([]),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
monitorItemIds = _useState2[0],
|
|
47
|
+
setMonitorItemIds = _useState2[1];
|
|
48
|
+
var _BaseService$useColle = BaseService.useCollectList({
|
|
49
|
+
deviceIds: id,
|
|
50
|
+
monitorItemIds: monitorItemIds
|
|
51
|
+
}),
|
|
52
|
+
_BaseService$useColle2 = _BaseService$useColle.data,
|
|
53
|
+
collectList = _BaseService$useColle2 === void 0 ? [] : _BaseService$useColle2;
|
|
54
|
+
useEffect(function () {
|
|
55
|
+
if (!isEmpty(data)) {
|
|
56
|
+
setMonitorItemIds([data[0].monitorItemId]);
|
|
57
|
+
}
|
|
58
|
+
}, [JSON.stringify(data)]);
|
|
59
|
+
var _useSetState = useSetState({
|
|
60
|
+
startDate: dayjs().startOf('date'),
|
|
61
|
+
endDate: dayjs().endOf('date'),
|
|
62
|
+
collectFrequency: '',
|
|
63
|
+
danTimeType: '24h',
|
|
64
|
+
showType: 'chart'
|
|
65
|
+
}),
|
|
66
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
67
|
+
state = _useSetState2[0],
|
|
68
|
+
setState = _useSetState2[1];
|
|
69
|
+
var startDate = state.startDate,
|
|
70
|
+
endDate = state.endDate,
|
|
71
|
+
collectFrequency = state.collectFrequency,
|
|
72
|
+
danTimeType = state.danTimeType,
|
|
73
|
+
showType = state.showType;
|
|
74
|
+
var tabList = [{
|
|
75
|
+
label: '24小时',
|
|
76
|
+
value: '24h'
|
|
77
|
+
}, {
|
|
78
|
+
label: '3天',
|
|
79
|
+
value: '3days'
|
|
80
|
+
}, {
|
|
81
|
+
label: '7天',
|
|
82
|
+
value: '7days'
|
|
83
|
+
}].concat(_toConsumableArray(collectFrequency === 'day' ? [{
|
|
84
|
+
label: '月',
|
|
85
|
+
value: 'month'
|
|
86
|
+
}] : []), _toConsumableArray(collectFrequency === 'month' ? [{
|
|
87
|
+
label: '年',
|
|
88
|
+
value: 'year'
|
|
89
|
+
}] : []), [{
|
|
90
|
+
label: '自定义',
|
|
91
|
+
value: 'self'
|
|
92
|
+
}]);
|
|
93
|
+
useEffect(function () {
|
|
94
|
+
if (!isEmpty(collectList)) {
|
|
95
|
+
var _collectList$;
|
|
96
|
+
setState({
|
|
97
|
+
collectFrequency: collectList === null || collectList === void 0 || (_collectList$ = collectList[0]) === null || _collectList$ === void 0 ? void 0 : _collectList$.id
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}, [JSON.stringify(collectList)]);
|
|
101
|
+
var _BaseService$useGetAn = BaseService.useGetAnalysis({
|
|
102
|
+
timeType: 'danTime',
|
|
103
|
+
danTimeEndTime: dayjs(endDate).format('YYYY-MM-DD HH:mm:ss'),
|
|
104
|
+
danTimeType: danTimeType,
|
|
105
|
+
danTimeStartTime: dayjs(startDate).format('YYYY-MM-DD HH:mm:ss'),
|
|
106
|
+
collectFrequency: collectFrequency,
|
|
107
|
+
deviceIds: id,
|
|
108
|
+
monitorItemIds: monitorItemIds
|
|
109
|
+
}),
|
|
110
|
+
chartDataList = _BaseService$useGetAn.data,
|
|
111
|
+
loading = _BaseService$useGetAn.loading;
|
|
112
|
+
var isHasChartData = function isHasChartData() {
|
|
113
|
+
var isHasData = true;
|
|
114
|
+
if (chartDataList.length) {
|
|
115
|
+
isHasData = true;
|
|
116
|
+
if (chartDataList.some(function (item) {
|
|
117
|
+
return item.values && item.values.length;
|
|
118
|
+
})) {
|
|
119
|
+
isHasData = true;
|
|
120
|
+
} else {
|
|
121
|
+
isHasData = false;
|
|
122
|
+
}
|
|
123
|
+
} else {
|
|
124
|
+
isHasData = false;
|
|
125
|
+
}
|
|
126
|
+
return isHasData;
|
|
127
|
+
};
|
|
128
|
+
var isHasChartItemData = function isHasChartItemData(item) {
|
|
129
|
+
// console.log(item);
|
|
130
|
+
var isHasData = true;
|
|
131
|
+
if (item.values.length) {
|
|
132
|
+
isHasData = true;
|
|
133
|
+
} else {
|
|
134
|
+
isHasData = false;
|
|
135
|
+
}
|
|
136
|
+
return isHasData;
|
|
137
|
+
};
|
|
138
|
+
var newList = isHasChartData() ? chartDataList.filter(function (item) {
|
|
139
|
+
return isHasChartItemData(item);
|
|
140
|
+
}) : null;
|
|
141
|
+
var getGroupDanOption = function getGroupDanOption(list) {
|
|
142
|
+
var xData = _.uniq(_.flatMap(list, 'xData').sort());
|
|
143
|
+
var legendData = [];
|
|
144
|
+
list.forEach(function (item, index) {
|
|
145
|
+
if (item.showMode === 'stack') {
|
|
146
|
+
var _state = _.map(_.uniqBy(item.dataList, 'value'));
|
|
147
|
+
var colors = [blueColor, greenColor];
|
|
148
|
+
var stateColor = {};
|
|
149
|
+
_state.forEach(function (v, index) {
|
|
150
|
+
stateColor[v.value] = colors[index % 2];
|
|
151
|
+
});
|
|
152
|
+
legendData.push.apply(legendData, _toConsumableArray((_state || []).map(function (item) {
|
|
153
|
+
return {
|
|
154
|
+
name: item.value,
|
|
155
|
+
itemStyle: {
|
|
156
|
+
color: stateColor[item.value]
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
})));
|
|
160
|
+
} else {
|
|
161
|
+
legendData.push({
|
|
162
|
+
name: item.newName || item.name || '',
|
|
163
|
+
itemStyle: {
|
|
164
|
+
color: blueColor
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
return {
|
|
170
|
+
color: [blueColor],
|
|
171
|
+
grid: {
|
|
172
|
+
top: 26,
|
|
173
|
+
left: 40,
|
|
174
|
+
right: 50,
|
|
175
|
+
bottom: 50,
|
|
176
|
+
containLabel: true
|
|
177
|
+
},
|
|
178
|
+
legend: {
|
|
179
|
+
type: 'scroll',
|
|
180
|
+
itemWidth: 17,
|
|
181
|
+
itemHeight: 10,
|
|
182
|
+
textStyle: {
|
|
183
|
+
color: chartFontColor
|
|
184
|
+
},
|
|
185
|
+
top: 0,
|
|
186
|
+
left: 'center'
|
|
187
|
+
},
|
|
188
|
+
tooltip: {
|
|
189
|
+
trigger: 'axis',
|
|
190
|
+
valueFormatter: function valueFormatter(value) {
|
|
191
|
+
var _list$;
|
|
192
|
+
return "".concat(value).concat((list === null || list === void 0 || (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.unit) || '');
|
|
193
|
+
},
|
|
194
|
+
position: function position(point, _params, _dom, _rect, size) {
|
|
195
|
+
// 固定在顶部
|
|
196
|
+
var leftSize = point[0] - size.contentSize[0];
|
|
197
|
+
return [point[0] + size.contentSize[0] > size.viewSize[0] ? leftSize < 0 ? '35%' : leftSize : point[0], '0%'];
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
dataZoom: [{
|
|
201
|
+
type: 'slider',
|
|
202
|
+
show: true,
|
|
203
|
+
bottom: 20,
|
|
204
|
+
fillerColor: theme === 'light' ? 'rgba(22, 119, 255, 0.10)' : 'rgba(0, 157, 255, 0.10)',
|
|
205
|
+
textStyle: {
|
|
206
|
+
color: chartFontColor
|
|
207
|
+
}
|
|
208
|
+
}],
|
|
209
|
+
xAxis: [{
|
|
210
|
+
type: 'category',
|
|
211
|
+
boundaryGap: false,
|
|
212
|
+
axisLine: {
|
|
213
|
+
show: true,
|
|
214
|
+
lineStyle: {
|
|
215
|
+
color: chartLineColor
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
axisLabel: {
|
|
219
|
+
textStyle: {
|
|
220
|
+
color: chartFontColor,
|
|
221
|
+
fontSize: 12
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
axisTick: {
|
|
225
|
+
show: false
|
|
226
|
+
},
|
|
227
|
+
data: xData
|
|
228
|
+
}],
|
|
229
|
+
yAxis: list.map(function (item, index) {
|
|
230
|
+
return {
|
|
231
|
+
minInterval: 1,
|
|
232
|
+
position: 'left',
|
|
233
|
+
// maxInterval: 5,
|
|
234
|
+
nameTextStyle: {
|
|
235
|
+
color: chartFontColor
|
|
236
|
+
},
|
|
237
|
+
nameLocation: 'middle',
|
|
238
|
+
nameGap: 0,
|
|
239
|
+
splitLine: {
|
|
240
|
+
lineStyle: {
|
|
241
|
+
color: chartLineColor,
|
|
242
|
+
type: 'dashed'
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
axisLine: {
|
|
246
|
+
show: true,
|
|
247
|
+
color: chartFontColor
|
|
248
|
+
},
|
|
249
|
+
axisLabel: {
|
|
250
|
+
color: chartFontColor,
|
|
251
|
+
margin: 20
|
|
252
|
+
},
|
|
253
|
+
axisTick: {
|
|
254
|
+
show: false
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
}),
|
|
258
|
+
series: list.flatMap(function (item, index) {
|
|
259
|
+
if (item.showMode === 'stack') {
|
|
260
|
+
var _state2 = _.map(_.uniqBy(item.dataList, 'value'));
|
|
261
|
+
var colors = [blueColor, greenColor];
|
|
262
|
+
var stateColor = {};
|
|
263
|
+
_state2.forEach(function (v, index) {
|
|
264
|
+
stateColor[v.value] = colors[index % 2];
|
|
265
|
+
});
|
|
266
|
+
return [].concat(_toConsumableArray((_state2 || []).map(function (v) {
|
|
267
|
+
return {
|
|
268
|
+
name: v.value,
|
|
269
|
+
type: 'bar',
|
|
270
|
+
data: [],
|
|
271
|
+
yAxisIndex: index,
|
|
272
|
+
markLine: {
|
|
273
|
+
symbol: ['none', 'none'],
|
|
274
|
+
// 去掉箭头
|
|
275
|
+
data: (item.markLine || []).filter(function (_unused, i) {
|
|
276
|
+
return i !== 0;
|
|
277
|
+
}).map(function (m, i) {
|
|
278
|
+
return {
|
|
279
|
+
name: dayjs(m.data).format('YYYY-MM-DD'),
|
|
280
|
+
xAxis: "(".concat(i + 1, ")").concat(dayjs(m.data).format('HH:mm')),
|
|
281
|
+
lineStyle: {
|
|
282
|
+
color: blueColor
|
|
283
|
+
},
|
|
284
|
+
label: {
|
|
285
|
+
position: 'end',
|
|
286
|
+
formatter: '{b}'
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
})
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
})), [{
|
|
293
|
+
type: 'custom',
|
|
294
|
+
yAxisIndex: index,
|
|
295
|
+
renderItem: function renderItem(params, api) {
|
|
296
|
+
var categoryIndex = api.value(0);
|
|
297
|
+
var start = api.coord([api.value(1), categoryIndex]);
|
|
298
|
+
var end = api.coord([api.value(2), categoryIndex]);
|
|
299
|
+
var height = 18;
|
|
300
|
+
return {
|
|
301
|
+
type: 'rect',
|
|
302
|
+
shape: echarts.graphic.clipRectByRect({
|
|
303
|
+
x: start[0],
|
|
304
|
+
y: start[1] - height / 2,
|
|
305
|
+
width: end[0] - start[0],
|
|
306
|
+
height: height
|
|
307
|
+
}, {
|
|
308
|
+
x: params.coordSys.x,
|
|
309
|
+
y: params.coordSys.y,
|
|
310
|
+
width: params.coordSys.width,
|
|
311
|
+
height: params.coordSys.height
|
|
312
|
+
}),
|
|
313
|
+
style: api.style()
|
|
314
|
+
};
|
|
315
|
+
},
|
|
316
|
+
encode: {
|
|
317
|
+
x: [1, 2],
|
|
318
|
+
y: 0
|
|
319
|
+
},
|
|
320
|
+
data: (item.dataList || []).map(function (item, index, arr) {
|
|
321
|
+
var _arr;
|
|
322
|
+
return {
|
|
323
|
+
itemStyle: {
|
|
324
|
+
normal: {
|
|
325
|
+
color: stateColor[item.originValue]
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
color: stateColor[item.originValue],
|
|
329
|
+
name: item.value,
|
|
330
|
+
label: item.value,
|
|
331
|
+
value: [0, item.date, (_arr = arr[index + 1]) === null || _arr === void 0 ? void 0 : _arr.date]
|
|
332
|
+
};
|
|
333
|
+
})
|
|
334
|
+
}]);
|
|
335
|
+
}
|
|
336
|
+
return [{
|
|
337
|
+
type: item.showMode,
|
|
338
|
+
name: item.newName || item.name || '',
|
|
339
|
+
data: (item.yData || []).map(function (y, i) {
|
|
340
|
+
return {
|
|
341
|
+
value: y,
|
|
342
|
+
name: item.xData[i]
|
|
343
|
+
};
|
|
344
|
+
}),
|
|
345
|
+
animationEasing: 'linear',
|
|
346
|
+
animationDuration: 2000,
|
|
347
|
+
smooth: true,
|
|
348
|
+
// symbol: 'none',
|
|
349
|
+
symbolSize: 1,
|
|
350
|
+
xAxisIndex: 0,
|
|
351
|
+
yAxisIndex: index,
|
|
352
|
+
itemStyle: {
|
|
353
|
+
normal: {
|
|
354
|
+
lineStyle: {
|
|
355
|
+
color: blueColor,
|
|
356
|
+
width: 2
|
|
357
|
+
},
|
|
358
|
+
areaStyle: {
|
|
359
|
+
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
|
|
360
|
+
offset: 0,
|
|
361
|
+
color: areaColor[0]
|
|
362
|
+
}, {
|
|
363
|
+
offset: 1,
|
|
364
|
+
color: areaColor[1]
|
|
365
|
+
}])
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}];
|
|
370
|
+
})
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
var columns = [{
|
|
374
|
+
title: '监测项目',
|
|
375
|
+
dataIndex: 'name',
|
|
376
|
+
width: 120,
|
|
377
|
+
ellipsis: true,
|
|
378
|
+
fixed: 'left'
|
|
379
|
+
}, {
|
|
380
|
+
width: 80,
|
|
381
|
+
title: '监测值',
|
|
382
|
+
dataIndex: 'value',
|
|
383
|
+
align: 'right',
|
|
384
|
+
render: function render(text, record) {
|
|
385
|
+
return text ? "".concat(text).concat(record.unit || '') : '-';
|
|
386
|
+
}
|
|
387
|
+
}, {
|
|
388
|
+
width: 80,
|
|
389
|
+
title: '是否告警',
|
|
390
|
+
dataIndex: 'onAlarm',
|
|
391
|
+
render: function render(text) {
|
|
392
|
+
return /*#__PURE__*/_jsx(VmTag, {
|
|
393
|
+
title: /*#__PURE__*/_jsxs(Space, {
|
|
394
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
395
|
+
className: classnames('vtx-device-analysis-dot', {
|
|
396
|
+
error: text
|
|
397
|
+
})
|
|
398
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
399
|
+
children: text ? '是' : '否'
|
|
400
|
+
})]
|
|
401
|
+
}),
|
|
402
|
+
type: text ? 'red' : 'green'
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}, {
|
|
406
|
+
width: 80,
|
|
407
|
+
title: '阈值',
|
|
408
|
+
dataIndex: 'alarmDescription',
|
|
409
|
+
ellipsis: true,
|
|
410
|
+
render: function render(text) {
|
|
411
|
+
return text ? text : '-';
|
|
412
|
+
}
|
|
413
|
+
}, {
|
|
414
|
+
title: '刷新时间',
|
|
415
|
+
dataIndex: 'timeDesc',
|
|
416
|
+
sorter: function sorter(a, b) {
|
|
417
|
+
return a.time - b.time;
|
|
418
|
+
},
|
|
419
|
+
width: 160
|
|
420
|
+
}];
|
|
421
|
+
var getActiveModeFill = function getActiveModeFill(key) {
|
|
422
|
+
if (isDark) {
|
|
423
|
+
return showType === key ? '#fff' : '#009DFF';
|
|
424
|
+
}
|
|
425
|
+
return showType === key ? '#1677FF' : '#8C8C8C';
|
|
426
|
+
};
|
|
427
|
+
return /*#__PURE__*/_jsx("div", {
|
|
428
|
+
style: {
|
|
429
|
+
height: 348
|
|
430
|
+
},
|
|
431
|
+
children: /*#__PURE__*/_jsx(VmWrapper, {
|
|
432
|
+
title: '指标分析',
|
|
433
|
+
contentStyle: {
|
|
434
|
+
padding: '0 16px 16px'
|
|
435
|
+
},
|
|
436
|
+
filterType: 'rangePicker',
|
|
437
|
+
filterChange: function filterChange(date) {
|
|
438
|
+
setState({
|
|
439
|
+
startDate: date[0],
|
|
440
|
+
endDate: date[1]
|
|
441
|
+
});
|
|
442
|
+
},
|
|
443
|
+
pickerProps: {
|
|
444
|
+
disabled: danTimeType !== 'self',
|
|
445
|
+
showTime: {
|
|
446
|
+
defaultValue: [dayjs().startOf('date'), dayjs().endOf('date')]
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
extraLeft: /*#__PURE__*/_jsxs(Space, {
|
|
450
|
+
children: [/*#__PURE__*/_jsxs(Space, {
|
|
451
|
+
size: 0,
|
|
452
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
453
|
+
style: {
|
|
454
|
+
fontSize: 14
|
|
455
|
+
},
|
|
456
|
+
children: "\u6307\u6807\u5468\u671F\uFF1A"
|
|
457
|
+
}), /*#__PURE__*/_jsx(VmFilter.VMSelect, {
|
|
458
|
+
value: collectFrequency,
|
|
459
|
+
options: collectList.map(function (item) {
|
|
460
|
+
return {
|
|
461
|
+
label: item.name,
|
|
462
|
+
value: item.code
|
|
463
|
+
};
|
|
464
|
+
}),
|
|
465
|
+
style: {
|
|
466
|
+
width: 120
|
|
467
|
+
},
|
|
468
|
+
onChange: function onChange(e) {
|
|
469
|
+
return setState({
|
|
470
|
+
collectFrequency: e
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
})]
|
|
474
|
+
}), /*#__PURE__*/_jsx(TabsList, {
|
|
475
|
+
list: tabList,
|
|
476
|
+
activeKey: danTimeType,
|
|
477
|
+
setActiveKey: function setActiveKey(key) {
|
|
478
|
+
setState({
|
|
479
|
+
danTimeType: key
|
|
480
|
+
});
|
|
481
|
+
if (key !== 'self') {
|
|
482
|
+
var _endDate = dayjs().endOf('date');
|
|
483
|
+
var day = 0;
|
|
484
|
+
if (key === '3days') {
|
|
485
|
+
day = 3;
|
|
486
|
+
} else if (key === '7days') {
|
|
487
|
+
day = 7;
|
|
488
|
+
}
|
|
489
|
+
setState({
|
|
490
|
+
startDate: dayjs().subtract(day, 'day').startOf('date'),
|
|
491
|
+
endDate: _endDate
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
})]
|
|
496
|
+
}),
|
|
497
|
+
dateValue: [state.startDate, state.endDate],
|
|
498
|
+
children: /*#__PURE__*/_jsxs(Row, {
|
|
499
|
+
gutter: [20, 20],
|
|
500
|
+
style: {
|
|
501
|
+
height: '100%'
|
|
502
|
+
},
|
|
503
|
+
children: [/*#__PURE__*/_jsxs(Col, {
|
|
504
|
+
span: 12,
|
|
505
|
+
style: {
|
|
506
|
+
height: '100%'
|
|
507
|
+
},
|
|
508
|
+
children: [/*#__PURE__*/_jsx(VmTitle, {
|
|
509
|
+
title: '监测指标',
|
|
510
|
+
border: false
|
|
511
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
512
|
+
style: {
|
|
513
|
+
height: 'calc(100% - 48px',
|
|
514
|
+
width: '100%'
|
|
515
|
+
},
|
|
516
|
+
children: /*#__PURE__*/_jsx(VmTable, {
|
|
517
|
+
columns: columns,
|
|
518
|
+
dataSource: data,
|
|
519
|
+
pagination: false,
|
|
520
|
+
rowKey: 'monitorItemId',
|
|
521
|
+
isIndex: false,
|
|
522
|
+
rowSelection: {
|
|
523
|
+
fixed: true,
|
|
524
|
+
type: 'radio',
|
|
525
|
+
selectedRowKeys: monitorItemIds,
|
|
526
|
+
onChange: function onChange(selectedRowKeys) {
|
|
527
|
+
setMonitorItemIds(selectedRowKeys);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
})
|
|
531
|
+
})]
|
|
532
|
+
}), /*#__PURE__*/_jsxs(Col, {
|
|
533
|
+
span: 12,
|
|
534
|
+
style: {
|
|
535
|
+
height: '100%'
|
|
536
|
+
},
|
|
537
|
+
children: [/*#__PURE__*/_jsx(VmTitle, {
|
|
538
|
+
title: '监测趋势',
|
|
539
|
+
border: false,
|
|
540
|
+
extra: /*#__PURE__*/_jsx(VmExtraTab, {
|
|
541
|
+
value: showType,
|
|
542
|
+
onChange: function onChange(key) {
|
|
543
|
+
return setState({
|
|
544
|
+
showType: key
|
|
545
|
+
});
|
|
546
|
+
},
|
|
547
|
+
data: [{
|
|
548
|
+
key: 'chart',
|
|
549
|
+
title: /*#__PURE__*/_jsx(ListIcon, {
|
|
550
|
+
width: 14,
|
|
551
|
+
height: 14,
|
|
552
|
+
fill: getActiveModeFill('chart')
|
|
553
|
+
}),
|
|
554
|
+
name: '图表'
|
|
555
|
+
}, {
|
|
556
|
+
key: 'list',
|
|
557
|
+
title: /*#__PURE__*/_jsx(ChartIcon, {
|
|
558
|
+
width: 14,
|
|
559
|
+
height: 14,
|
|
560
|
+
fill: getActiveModeFill('list')
|
|
561
|
+
}),
|
|
562
|
+
name: '列表'
|
|
563
|
+
}]
|
|
564
|
+
})
|
|
565
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
566
|
+
style: {
|
|
567
|
+
height: 'calc(100% - 48px'
|
|
568
|
+
},
|
|
569
|
+
children: loading ? /*#__PURE__*/_jsx(Row, {
|
|
570
|
+
align: 'middle',
|
|
571
|
+
justify: 'center',
|
|
572
|
+
style: {
|
|
573
|
+
height: '100%'
|
|
574
|
+
},
|
|
575
|
+
children: /*#__PURE__*/_jsx(Spin, {
|
|
576
|
+
spinning: true
|
|
577
|
+
})
|
|
578
|
+
}) : isEmpty(newList) ? /*#__PURE__*/_jsx(VmEmpty, {}) : showType === 'chart' ? /*#__PURE__*/_jsx(ReactEcharts, {
|
|
579
|
+
option: getGroupDanOption(newList),
|
|
580
|
+
notMerge: true,
|
|
581
|
+
lazyUpdate: true,
|
|
582
|
+
style: {
|
|
583
|
+
height: '100%',
|
|
584
|
+
width: '100%'
|
|
585
|
+
}
|
|
586
|
+
}) : /*#__PURE__*/_jsx(VmTable, {
|
|
587
|
+
columns: [{
|
|
588
|
+
title: '刷新时间',
|
|
589
|
+
dataIndex: 'date',
|
|
590
|
+
sorter: function sorter(a, b) {
|
|
591
|
+
return a.date > b.date ? 1 : -1;
|
|
592
|
+
},
|
|
593
|
+
width: 160
|
|
594
|
+
}, {
|
|
595
|
+
title: "".concat(newList === null || newList === void 0 || (_newList$ = newList[0]) === null || _newList$ === void 0 ? void 0 : _newList$.monitorItemName).concat((newList === null || newList === void 0 || (_newList$2 = newList[0]) === null || _newList$2 === void 0 ? void 0 : _newList$2.unit) || ''),
|
|
596
|
+
dataIndex: 'originValue',
|
|
597
|
+
width: 160,
|
|
598
|
+
align: 'right'
|
|
599
|
+
}],
|
|
600
|
+
dataSource: ((_newList$3 = newList[0]) === null || _newList$3 === void 0 ? void 0 : _newList$3.dataList) || [],
|
|
601
|
+
size: "small",
|
|
602
|
+
pagination: true,
|
|
603
|
+
rowKey: 'monitorItemId'
|
|
604
|
+
})
|
|
605
|
+
})]
|
|
606
|
+
})]
|
|
607
|
+
})
|
|
608
|
+
})
|
|
609
|
+
});
|
|
610
|
+
};
|
|
611
|
+
export default MonitorAnalysis;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import classnames from 'classnames';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
var TabsList = function TabsList(_ref) {
|
|
4
|
+
var _ref$list = _ref.list,
|
|
5
|
+
list = _ref$list === void 0 ? [] : _ref$list,
|
|
6
|
+
activeKey = _ref.activeKey,
|
|
7
|
+
setActiveKey = _ref.setActiveKey;
|
|
8
|
+
return /*#__PURE__*/_jsx("div", {
|
|
9
|
+
className: 'vtx-device-analysis-tabs',
|
|
10
|
+
children: list.map(function (item) {
|
|
11
|
+
return /*#__PURE__*/_jsx("div", {
|
|
12
|
+
className: classnames('vtx-device-analysis-tabs-item', {
|
|
13
|
+
active: activeKey === item.value
|
|
14
|
+
}),
|
|
15
|
+
onClick: function onClick() {
|
|
16
|
+
return setActiveKey(item.value);
|
|
17
|
+
},
|
|
18
|
+
children: item.label
|
|
19
|
+
}, item.value);
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export default TabsList;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Col, Row } from 'antd';
|
|
2
|
+
import AlarmAnalysis from "./AlarmAnalysis";
|
|
3
|
+
import MonitorAnalysis from "./MonitorAnalysis";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
var DataAnalysis = function DataAnalysis(_ref) {
|
|
6
|
+
var id = _ref.id,
|
|
7
|
+
info = _ref.info;
|
|
8
|
+
return /*#__PURE__*/_jsxs(Row, {
|
|
9
|
+
gutter: [16, 16],
|
|
10
|
+
children: [/*#__PURE__*/_jsx(Col, {
|
|
11
|
+
span: 24,
|
|
12
|
+
children: /*#__PURE__*/_jsx(MonitorAnalysis, {
|
|
13
|
+
id: id
|
|
14
|
+
})
|
|
15
|
+
}), /*#__PURE__*/_jsx(Col, {
|
|
16
|
+
span: 24,
|
|
17
|
+
children: /*#__PURE__*/_jsx(AlarmAnalysis, {
|
|
18
|
+
id: id,
|
|
19
|
+
info: info
|
|
20
|
+
})
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
export default DataAnalysis;
|