@vtx/modals2 5.0.46 → 5.0.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.
- package/lib/_components/vm-card-statistics/index.less +27 -27
- package/lib/_components/vm-factor-list/index.less +11 -11
- package/lib/_components/vm-popover/index.less +7 -7
- package/lib/_service/index.js +16 -0
- package/lib/vtx-base-modal/Header/index.less +98 -98
- package/lib/vtx-base-modal/Tabs/index.less +68 -68
- package/lib/vtx-car-modal/components/Info/index.less +6 -6
- package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
- package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
- package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -6
- package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -66
- package/lib/vtx-df-modal/api-zd-reborn.js +246 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jcqsfx.js +71 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jczbqs.js +96 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Qyjcl.js +41 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/RealtimeMonitor.js +149 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Situation.js +47 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/index.js +140 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/index.less +161 -0
- package/lib/vtx-df-modal/components/Calendar/zd-reborn.js +142 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJccc.js +62 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJcqs.js +83 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/List.js +125 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/index.js +185 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/index.less +68 -0
- package/lib/vtx-df-modal/components/index.js +4 -1
- package/lib/vtx-df-modal/index.js +19 -7
- package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -16
- package/lib/vtx-restaurant-modal/config.js +52 -52
- package/lib/vtx-road-modal/components/Statistical/index.less +32 -32
- package/lib/vtx-staff-modal/components/BaseInfo/WorkStatic.js +2 -2
- package/package.json +78 -78
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { VtxImage } from '@vtx/components';
|
|
8
|
+
import { getVtxToken } from '@vtx/utils';
|
|
9
|
+
import { useSetState } from 'ahooks';
|
|
10
|
+
import { Col, Row } from 'antd';
|
|
11
|
+
import dayjs from 'dayjs';
|
|
12
|
+
import { useRef } from 'react';
|
|
13
|
+
import { VmEmpty, VmInfoCollection, VmWrapper } from "../../../_components";
|
|
14
|
+
import { CommonService } from "../../../_service";
|
|
15
|
+
import { getFieldRender } from "../../../_util";
|
|
16
|
+
import { BaseService } from "../../api-zd-reborn";
|
|
17
|
+
import "./index.less";
|
|
18
|
+
import Jcqsfx from "./Jcqsfx";
|
|
19
|
+
import Qyjcl from "./Qyjcl";
|
|
20
|
+
import RealtimeMonitor from "./RealtimeMonitor";
|
|
21
|
+
import Situation from "./Situation";
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
var BaseInfo = function BaseInfo(props) {
|
|
24
|
+
var info = props.info,
|
|
25
|
+
detail = props.detail,
|
|
26
|
+
photos = props.photos,
|
|
27
|
+
code = props.code,
|
|
28
|
+
hasLm = props.hasLm,
|
|
29
|
+
realtimeMonitor = props.realtimeMonitor;
|
|
30
|
+
var nowDate = dayjs().format('YYYY-MM-DD');
|
|
31
|
+
var _useSetState = useSetState({
|
|
32
|
+
startDate: dayjs().subtract(1, 'month').format('YYYY-MM-DD'),
|
|
33
|
+
endDate: nowDate
|
|
34
|
+
}),
|
|
35
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
36
|
+
state = _useSetState2[0],
|
|
37
|
+
setState = _useSetState2[1];
|
|
38
|
+
var imgRef = useRef(null);
|
|
39
|
+
var startDate = state.startDate,
|
|
40
|
+
endDate = state.endDate;
|
|
41
|
+
var fields = CommonService.useGetFields(info === null || info === void 0 ? void 0 : info.typeCode);
|
|
42
|
+
var _BaseService$useSitua = BaseService.useSituation(detail === null || detail === void 0 ? void 0 : detail.deviceId, nowDate),
|
|
43
|
+
situationRes = _BaseService$useSitua.situationRes;
|
|
44
|
+
var handleAbility = detail === null || detail === void 0 ? void 0 : detail.handleAbility;
|
|
45
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
46
|
+
className: "df-base-content",
|
|
47
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
48
|
+
className: "df-base-content-left",
|
|
49
|
+
children: /*#__PURE__*/_jsxs(VmWrapper, {
|
|
50
|
+
title: "\u57FA\u672C\u4FE1\u606F",
|
|
51
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
52
|
+
className: "base-top-img",
|
|
53
|
+
ref: imgRef,
|
|
54
|
+
children: photos.length ? /*#__PURE__*/_jsx("div", {
|
|
55
|
+
style: {
|
|
56
|
+
padding: '0 12px 12px'
|
|
57
|
+
},
|
|
58
|
+
children: /*#__PURE__*/_jsx(VtxImage, {
|
|
59
|
+
src: "/cloudFile/common/downloadFile?id=".concat(photos[0].id, "&token=").concat(getVtxToken('token')),
|
|
60
|
+
alt: photos[0].name,
|
|
61
|
+
isDark: true,
|
|
62
|
+
style: {
|
|
63
|
+
maxWidth: '340px',
|
|
64
|
+
height: 220,
|
|
65
|
+
overflow: 'hidden'
|
|
66
|
+
}
|
|
67
|
+
}, photos[0].id)
|
|
68
|
+
}) : /*#__PURE__*/_jsx(VmEmpty, {
|
|
69
|
+
type: "NO_PICTURE",
|
|
70
|
+
style: {
|
|
71
|
+
height: 220
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
75
|
+
className: "base-top--base",
|
|
76
|
+
children: /*#__PURE__*/_jsx(VmInfoCollection, {
|
|
77
|
+
data: getFieldRender(fields, info),
|
|
78
|
+
horizontal: true,
|
|
79
|
+
width: "50%",
|
|
80
|
+
ellipsis: true,
|
|
81
|
+
padding: '0 12px 12px'
|
|
82
|
+
})
|
|
83
|
+
})]
|
|
84
|
+
})
|
|
85
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
86
|
+
className: "df-base-content-right",
|
|
87
|
+
children: [hasLm && /*#__PURE__*/_jsxs(Row, {
|
|
88
|
+
gutter: [16, 16],
|
|
89
|
+
style: {
|
|
90
|
+
marginBottom: 10
|
|
91
|
+
},
|
|
92
|
+
children: [/*#__PURE__*/_jsx(Col, {
|
|
93
|
+
span: 8,
|
|
94
|
+
children: /*#__PURE__*/_jsx(VmWrapper, {
|
|
95
|
+
title: "\u5B9E\u65F6\u8FDB\u573A\u60C5\u51B5",
|
|
96
|
+
style: {
|
|
97
|
+
height: 280
|
|
98
|
+
},
|
|
99
|
+
children: /*#__PURE__*/_jsx(Situation, {
|
|
100
|
+
situationRes: situationRes
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
}), /*#__PURE__*/_jsx(Col, {
|
|
104
|
+
span: 16,
|
|
105
|
+
children: /*#__PURE__*/_jsx(VmWrapper, {
|
|
106
|
+
style: {
|
|
107
|
+
height: 280
|
|
108
|
+
},
|
|
109
|
+
title: "\u533A\u57DF\u8FDB\u573A\u91CF\u5206\u6790",
|
|
110
|
+
filterType: "rangePicker",
|
|
111
|
+
dateValue: [dayjs(startDate), dayjs(endDate)],
|
|
112
|
+
filterChange: function filterChange(dates) {
|
|
113
|
+
return dates && setState({
|
|
114
|
+
startDate: dayjs(dates[0]).format('YYYY-MM-DD'),
|
|
115
|
+
endDate: dayjs(dates[1]).format('YYYY-MM-DD')
|
|
116
|
+
});
|
|
117
|
+
},
|
|
118
|
+
children: /*#__PURE__*/_jsx(Qyjcl, {
|
|
119
|
+
deviceId: detail === null || detail === void 0 ? void 0 : detail.deviceId,
|
|
120
|
+
startDate: startDate,
|
|
121
|
+
endDate: endDate
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
})]
|
|
125
|
+
}), (realtimeMonitor === null || realtimeMonitor === void 0 ? void 0 : realtimeMonitor.length) > 0 ? /*#__PURE__*/_jsx(RealtimeMonitor, {
|
|
126
|
+
realtimeMonitor: realtimeMonitor,
|
|
127
|
+
hasLm: hasLm
|
|
128
|
+
}) : null, hasLm && !(realtimeMonitor !== null && realtimeMonitor !== void 0 && realtimeMonitor.length) ?
|
|
129
|
+
/*#__PURE__*/
|
|
130
|
+
// 仅有计量
|
|
131
|
+
_jsx(Jcqsfx, {
|
|
132
|
+
deviceId: detail === null || detail === void 0 ? void 0 : detail.deviceId,
|
|
133
|
+
startDate: startDate,
|
|
134
|
+
endDate: endDate,
|
|
135
|
+
handleAbility: handleAbility
|
|
136
|
+
}) : null]
|
|
137
|
+
})]
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
export default BaseInfo;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
.df-base-content {
|
|
2
|
+
height: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: start;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
|
|
7
|
+
&-left {
|
|
8
|
+
width: 400px;
|
|
9
|
+
height: 616px;
|
|
10
|
+
}
|
|
11
|
+
&-right {
|
|
12
|
+
width: calc(100% - 416px);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.base-top {
|
|
16
|
+
&-desc {
|
|
17
|
+
&-exec {
|
|
18
|
+
color: var(--info-danger);
|
|
19
|
+
height: 40px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-img {
|
|
24
|
+
img {
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--base {
|
|
30
|
+
max-height: 480px;
|
|
31
|
+
background-color: var(--content-bg-color);
|
|
32
|
+
overflow: auto;
|
|
33
|
+
margin-top: 12px;
|
|
34
|
+
}
|
|
35
|
+
&--jcqsfx {
|
|
36
|
+
margin-top: 14px;
|
|
37
|
+
}
|
|
38
|
+
&--chart {
|
|
39
|
+
height: 298px;
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.base-bottom {
|
|
45
|
+
margin-top: 10px;
|
|
46
|
+
|
|
47
|
+
&--right {
|
|
48
|
+
&-content {
|
|
49
|
+
width: 100%;
|
|
50
|
+
text-align: center;
|
|
51
|
+
overflow-y: auto;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.df-qyjcl {
|
|
57
|
+
height: 215px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.df-overview-trend {
|
|
61
|
+
width: 100%;
|
|
62
|
+
margin-top: 16px;
|
|
63
|
+
&-content {
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: 191px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.df-situation {
|
|
71
|
+
overflow-y: auto;
|
|
72
|
+
padding: 0 12px;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
flex: 1 1;
|
|
76
|
+
gap: 24px;
|
|
77
|
+
|
|
78
|
+
.df-situation-item-compare {
|
|
79
|
+
margin-left: 56px;
|
|
80
|
+
font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
|
|
81
|
+
font-size: 14px;
|
|
82
|
+
display: flex;
|
|
83
|
+
color: var(--img-text-color);
|
|
84
|
+
line-height: 14px;
|
|
85
|
+
margin-top: 10px;
|
|
86
|
+
|
|
87
|
+
img {
|
|
88
|
+
transform: translateY(2px);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.df-monitor {
|
|
94
|
+
&-head {
|
|
95
|
+
width: 100%;
|
|
96
|
+
padding-left: 16px;
|
|
97
|
+
|
|
98
|
+
&-item {
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: start;
|
|
101
|
+
align-items: start;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
|
|
104
|
+
img {
|
|
105
|
+
width: 36px;
|
|
106
|
+
height: 36px;
|
|
107
|
+
margin-right: 12px;
|
|
108
|
+
display: inline-block;
|
|
109
|
+
}
|
|
110
|
+
&-right {
|
|
111
|
+
text-align: left;
|
|
112
|
+
&-name {
|
|
113
|
+
color: var(--modal-title-color);
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
}
|
|
116
|
+
&-valueNormal {
|
|
117
|
+
color: #52c41a;
|
|
118
|
+
line-height: 22px;
|
|
119
|
+
padding-left: 2px;
|
|
120
|
+
|
|
121
|
+
&::before {
|
|
122
|
+
content: '';
|
|
123
|
+
display: inline-block;
|
|
124
|
+
margin: 0 10px 2px 0;
|
|
125
|
+
width: 6px;
|
|
126
|
+
height: 6px;
|
|
127
|
+
border-radius: 50%;
|
|
128
|
+
background: #0fb964;
|
|
129
|
+
box-shadow: 0px 0px 3px 2px rgba(15, 185, 100, 0.5);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&-valueAlarm {
|
|
134
|
+
color: var(--info-danger);
|
|
135
|
+
line-height: 22px;
|
|
136
|
+
padding-left: 2px;
|
|
137
|
+
|
|
138
|
+
&::before {
|
|
139
|
+
content: '';
|
|
140
|
+
display: inline-block;
|
|
141
|
+
margin: 0 10px 2px 0;
|
|
142
|
+
width: 6px;
|
|
143
|
+
height: 6px;
|
|
144
|
+
border-radius: 50%;
|
|
145
|
+
background: #f5222d;
|
|
146
|
+
box-shadow: 0px 0px 3px 2px rgba(245, 34, 45, 0.5);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
&-table {
|
|
153
|
+
height: 166px;
|
|
154
|
+
overflow-y: hidden;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.slick-track {
|
|
159
|
+
width: 340px;
|
|
160
|
+
overflow: hidden;
|
|
161
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
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
|
+
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
|
+
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
|
+
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; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import { useSetState } from 'ahooks';
|
|
14
|
+
import dayjs from 'dayjs';
|
|
15
|
+
import { VmCalendar, VmCalendarInner, VmWrapper } from "../../../_components";
|
|
16
|
+
import useSettings from "../../../_hooks/useSettings";
|
|
17
|
+
import { CalendarService } from "../../api-zd-reborn";
|
|
18
|
+
import blockA from "../../../_imgs/block_alarm.png";
|
|
19
|
+
import blockN from "../../../_imgs/block_normal.png";
|
|
20
|
+
import car from "../../imgs/c_car.png";
|
|
21
|
+
import jcl from "../../imgs/c_jcl.png";
|
|
22
|
+
import "./index.less";
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
var Charts = function Charts(_ref) {
|
|
25
|
+
var code = _ref.code,
|
|
26
|
+
deviceId = _ref.deviceId,
|
|
27
|
+
handleAbility = _ref.handleAbility;
|
|
28
|
+
var _useSettings = useSettings(),
|
|
29
|
+
isDark = _useSettings.isDark;
|
|
30
|
+
var _useSetState = useSetState({
|
|
31
|
+
date: dayjs(),
|
|
32
|
+
data: []
|
|
33
|
+
}),
|
|
34
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
35
|
+
state = _useSetState2[0],
|
|
36
|
+
setState = _useSetState2[1];
|
|
37
|
+
var date = state.date;
|
|
38
|
+
var _CalendarService$useF = CalendarService.useFetchData(deviceId, date.startOf('M').format('YYYY-MM-DD'), date.endOf('M').format('YYYY-MM-DD')),
|
|
39
|
+
data1 = _CalendarService$useF.data1;
|
|
40
|
+
var _CalendarService$useF2 = CalendarService.useFetchData2(code, date.startOf('M').format('YYYY-MM-DD 00:00:00'), date.endOf('M').format('YYYY-MM-DD 23:59:59')),
|
|
41
|
+
data2 = _CalendarService$useF2.data2;
|
|
42
|
+
var dateCellRender = function dateCellRender(value) {
|
|
43
|
+
var _data2$filter;
|
|
44
|
+
var obj1 = (data1 === null || data1 === void 0 ? void 0 : data1.find(function (ele) {
|
|
45
|
+
return ele.date === value.format('YYYY-MM-DD');
|
|
46
|
+
})) || {}; // carNums、netWeight
|
|
47
|
+
var obj2 = (data2 === null || data2 === void 0 || (_data2$filter = data2.filter(function (ele) {
|
|
48
|
+
return !dayjs(ele.date).isAfter(dayjs(), 'day');
|
|
49
|
+
}) // 筛选出当前日期之前的数据
|
|
50
|
+
) === null || _data2$filter === void 0 ? void 0 : _data2$filter.find(function (ele) {
|
|
51
|
+
return ele.date === value.format('YYYY-MM-DD');
|
|
52
|
+
})) || {}; // alarmNum、beenNormal
|
|
53
|
+
var hasLm = (obj1 === null || obj1 === void 0 ? void 0 : obj1.todayTotalInWeight) > 0;
|
|
54
|
+
var isOverWeight = (obj1 === null || obj1 === void 0 ? void 0 : obj1.todayTotalInWeight) / 1000 > handleAbility; // 进厂量是否超过设计能力
|
|
55
|
+
var isNormal = obj2 === null || obj2 === void 0 ? void 0 : obj2.beenNormal;
|
|
56
|
+
var showTip = Object.prototype.hasOwnProperty.call(obj2, 'beenNormal');
|
|
57
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
58
|
+
className: "df-calendar-cell",
|
|
59
|
+
children: [!!data2 && /*#__PURE__*/_jsxs("div", {
|
|
60
|
+
className: "df-calendar-cell-head",
|
|
61
|
+
style: {
|
|
62
|
+
color: isNormal ? '#0FB964' : '#F5222D',
|
|
63
|
+
top: hasLm ? '-30px' : '-22px'
|
|
64
|
+
},
|
|
65
|
+
children: [showTip && /*#__PURE__*/_jsx("img", {
|
|
66
|
+
src: isNormal ? blockN : blockA
|
|
67
|
+
}), showTip ? isNormal ? '正常' : '异常' : '']
|
|
68
|
+
}), hasLm && /*#__PURE__*/_jsxs(_Fragment, {
|
|
69
|
+
children: [/*#__PURE__*/_jsx(VmCalendarInner, {
|
|
70
|
+
type: "blue",
|
|
71
|
+
img: jcl,
|
|
72
|
+
isAlarm: isOverWeight,
|
|
73
|
+
value: (((obj1 === null || obj1 === void 0 ? void 0 : obj1.todayTotalInWeight) || 0) / 1000).toFixed(2),
|
|
74
|
+
style: {
|
|
75
|
+
width: '139px',
|
|
76
|
+
justifyContent: 'space-between',
|
|
77
|
+
margin: '8px 0',
|
|
78
|
+
color: '#0FB964'
|
|
79
|
+
}
|
|
80
|
+
}), /*#__PURE__*/_jsx(VmCalendarInner, {
|
|
81
|
+
type: "green",
|
|
82
|
+
img: car,
|
|
83
|
+
value: (obj1 === null || obj1 === void 0 ? void 0 : obj1.todayTotalInCar) || 0,
|
|
84
|
+
style: {
|
|
85
|
+
width: '139px',
|
|
86
|
+
justifyContent: 'space-between'
|
|
87
|
+
}
|
|
88
|
+
})]
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
return /*#__PURE__*/_jsx("div", {
|
|
93
|
+
className: "df-calendar ".concat(isDark ? 'dark' : ''),
|
|
94
|
+
children: /*#__PURE__*/_jsxs(VmWrapper, {
|
|
95
|
+
title: "\u8FD0\u884C\u603B\u89C8",
|
|
96
|
+
needChange: false,
|
|
97
|
+
filterType: "monthPicker",
|
|
98
|
+
dateValue: date,
|
|
99
|
+
filterChange: function filterChange(dates) {
|
|
100
|
+
return dates && setState({
|
|
101
|
+
date: dates
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
disabledDate: function disabledDate(current) {
|
|
105
|
+
return current && current > dayjs().endOf('M');
|
|
106
|
+
},
|
|
107
|
+
contentStyle: {
|
|
108
|
+
marginBottom: 16,
|
|
109
|
+
height: '440px'
|
|
110
|
+
},
|
|
111
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
112
|
+
className: "df-calendar-head",
|
|
113
|
+
children: [{
|
|
114
|
+
name: '进场量(吨)',
|
|
115
|
+
img: jcl,
|
|
116
|
+
type: 'blue'
|
|
117
|
+
}, {
|
|
118
|
+
name: '车次',
|
|
119
|
+
img: car,
|
|
120
|
+
type: 'green'
|
|
121
|
+
}, {
|
|
122
|
+
name: '工况正常',
|
|
123
|
+
imgType: 'normal'
|
|
124
|
+
}, {
|
|
125
|
+
name: '工况异常',
|
|
126
|
+
imgType: 'alarm'
|
|
127
|
+
}].map(function (item, index) {
|
|
128
|
+
return /*#__PURE__*/_jsx(VmCalendarInner, _objectSpread(_objectSpread({}, item), {}, {
|
|
129
|
+
value: item.name
|
|
130
|
+
}), index);
|
|
131
|
+
})
|
|
132
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
133
|
+
className: "df-calendar-content",
|
|
134
|
+
children: /*#__PURE__*/_jsx(VmCalendar, {
|
|
135
|
+
dateCellRender: dateCellRender,
|
|
136
|
+
value: date
|
|
137
|
+
})
|
|
138
|
+
})]
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
export default Charts;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 计量信息-图表-进场车次时间分布
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as echarts from 'echarts';
|
|
6
|
+
import { VmBarCharts, VmEmpty, VmWrapper } from "../../../_components";
|
|
7
|
+
import { BaseService } from "../../api-zd-reborn";
|
|
8
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
var ChartJccc = function ChartJccc(_ref) {
|
|
10
|
+
var _jcccsjfbRes$extraDat, _jcccsjfbRes$extraDat2, _jcccsjfbRes$values;
|
|
11
|
+
var deviceId = _ref.deviceId,
|
|
12
|
+
startDate = _ref.startDate,
|
|
13
|
+
endDate = _ref.endDate;
|
|
14
|
+
var _BaseService$useJcccs = BaseService.useJcccsjfb(deviceId, startDate, endDate),
|
|
15
|
+
jcccsjfbRes = _BaseService$useJcccs.jcccsjfbRes;
|
|
16
|
+
var dates = (jcccsjfbRes === null || jcccsjfbRes === void 0 || (_jcccsjfbRes$extraDat = jcccsjfbRes.extraData) === null || _jcccsjfbRes$extraDat === void 0 || (_jcccsjfbRes$extraDat = _jcccsjfbRes$extraDat.maxPeriods) === null || _jcccsjfbRes$extraDat === void 0 ? void 0 : _jcccsjfbRes$extraDat.length) > 0 ? jcccsjfbRes.extraData.maxPeriods.map(function (ele) {
|
|
17
|
+
return ele.date;
|
|
18
|
+
}) : [];
|
|
19
|
+
var count = (jcccsjfbRes === null || jcccsjfbRes === void 0 || (_jcccsjfbRes$extraDat2 = jcccsjfbRes.extraData) === null || _jcccsjfbRes$extraDat2 === void 0 || (_jcccsjfbRes$extraDat2 = _jcccsjfbRes$extraDat2.maxPeriods) === null || _jcccsjfbRes$extraDat2 === void 0 ? void 0 : _jcccsjfbRes$extraDat2.length) > 0 ? jcccsjfbRes.extraData.maxPeriods.map(function (ele) {
|
|
20
|
+
return ele.count;
|
|
21
|
+
}) : [];
|
|
22
|
+
return /*#__PURE__*/_jsxs(VmWrapper, {
|
|
23
|
+
title: "\u8FDB\u573A\u8F66\u6B21\u65F6\u95F4\u5206\u5E03",
|
|
24
|
+
needChange: false,
|
|
25
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
26
|
+
className: "metering-content-charts-desc",
|
|
27
|
+
title: "\u8FDB\u573A\u9AD8\u5CF0\u96C6\u4E2D\u5728".concat((dates === null || dates === void 0 ? void 0 : dates.join('点、')) || 0, "\u70B9\uFF0C\u8FDB\u573A\u8F66\u6B21\u5206\u522B\u4E3A").concat((count === null || count === void 0 ? void 0 : count.join('次、')) || '-', "\u6B21\uFF0C\n \u6CE8\u610F\u5408\u7406\u8C03\u5EA6\uFF0C \u7F13\u89E3\u5382\u533A\u6392\u961F\u60C5\u51B5\u3002"),
|
|
28
|
+
children: ["\u8FDB\u573A\u9AD8\u5CF0\u96C6\u4E2D\u5728", (dates === null || dates === void 0 ? void 0 : dates.join('点、')) || 0, "\u70B9\uFF0C\u8FDB\u573A\u8F66\u6B21\u5206\u522B\u4E3A", (count === null || count === void 0 ? void 0 : count.join('次、')) || '-', "\u6B21\uFF0C\u6CE8\u610F\u5408\u7406\u8C03\u5EA6\uFF0C \u7F13\u89E3\u5382\u533A\u6392\u961F\u60C5\u51B5\u3002"]
|
|
29
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
30
|
+
style: {
|
|
31
|
+
height: '298px',
|
|
32
|
+
width: '100%'
|
|
33
|
+
},
|
|
34
|
+
children: ((_jcccsjfbRes$values = jcccsjfbRes.values) === null || _jcccsjfbRes$values === void 0 ? void 0 : _jcccsjfbRes$values.length) > 0 ? /*#__PURE__*/_jsx(VmBarCharts, {
|
|
35
|
+
unit: "\u6B21",
|
|
36
|
+
height: 0,
|
|
37
|
+
xAxis: (jcccsjfbRes === null || jcccsjfbRes === void 0 ? void 0 : jcccsjfbRes.names) || [],
|
|
38
|
+
yAxisList: [{
|
|
39
|
+
name: '次',
|
|
40
|
+
unit: '次'
|
|
41
|
+
}],
|
|
42
|
+
dataList: [{
|
|
43
|
+
data: jcccsjfbRes !== null && jcccsjfbRes !== void 0 && jcccsjfbRes.values ? jcccsjfbRes.values[0] : [],
|
|
44
|
+
name: '',
|
|
45
|
+
color: 'green',
|
|
46
|
+
itemStyle: {
|
|
47
|
+
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
|
|
48
|
+
offset: 1,
|
|
49
|
+
color: '#1B89FF'
|
|
50
|
+
}, {
|
|
51
|
+
offset: 0,
|
|
52
|
+
color: '#51d0ff6e'
|
|
53
|
+
}])
|
|
54
|
+
}
|
|
55
|
+
}]
|
|
56
|
+
}) : /*#__PURE__*/_jsx(VmEmpty, {
|
|
57
|
+
type: "NO_CHART"
|
|
58
|
+
})
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
export default ChartJccc;
|
|
@@ -0,0 +1,83 @@
|
|
|
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 _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); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
7
|
+
/**
|
|
8
|
+
* 计量信息-图表-进场趋势分析
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import * as echarts from 'echarts';
|
|
12
|
+
import { max } from 'lodash';
|
|
13
|
+
import { VmEmpty, VmLineCharts, VmWrapper } from "../../../_components";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
var ChartJcqs = function ChartJcqs(props) {
|
|
16
|
+
var _props$data, _props$data2, _props$data3, _props$data4;
|
|
17
|
+
var xData = (props === null || props === void 0 || (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.map(function (ele) {
|
|
18
|
+
return ele.date;
|
|
19
|
+
})) || [];
|
|
20
|
+
var values = (props === null || props === void 0 || (_props$data2 = props.data) === null || _props$data2 === void 0 ? void 0 : _props$data2.map(function (ele) {
|
|
21
|
+
return ele.todayTotalInWeight;
|
|
22
|
+
})) || [];
|
|
23
|
+
var maxNum = max([props === null || props === void 0 ? void 0 : props.handleAbility].concat(_toConsumableArray((props === null || props === void 0 || (_props$data3 = props.data) === null || _props$data3 === void 0 ? void 0 : _props$data3.map(function (ele) {
|
|
24
|
+
return ele.todayTotalInWeight;
|
|
25
|
+
})) || []))) || 0;
|
|
26
|
+
console.log(props);
|
|
27
|
+
return /*#__PURE__*/_jsx(VmWrapper, {
|
|
28
|
+
title: "\u8FDB\u573A\u8D8B\u52BF\u5206\u6790",
|
|
29
|
+
needChange: false,
|
|
30
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
31
|
+
style: {
|
|
32
|
+
height: 360
|
|
33
|
+
},
|
|
34
|
+
children: (props === null || props === void 0 || (_props$data4 = props.data) === null || _props$data4 === void 0 ? void 0 : _props$data4.length) > 0 ? /*#__PURE__*/_jsx(VmLineCharts, {
|
|
35
|
+
title: '进场量',
|
|
36
|
+
height: 360,
|
|
37
|
+
unit: "\u5428",
|
|
38
|
+
yMax: maxNum,
|
|
39
|
+
xAxis: xData,
|
|
40
|
+
dataList: [{
|
|
41
|
+
data: values,
|
|
42
|
+
name: '进场量',
|
|
43
|
+
areaStyle: {
|
|
44
|
+
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
|
|
45
|
+
offset: 0,
|
|
46
|
+
color: 'rgba(22, 119, 255, 0)'
|
|
47
|
+
}, {
|
|
48
|
+
offset: 0.5,
|
|
49
|
+
color: 'rgba(22, 119, 255, 0.5)'
|
|
50
|
+
}, {
|
|
51
|
+
offset: 1,
|
|
52
|
+
color: 'rgba(22, 119, 255, 1)'
|
|
53
|
+
}])
|
|
54
|
+
},
|
|
55
|
+
markLine: {
|
|
56
|
+
data: [{
|
|
57
|
+
yAxis: props === null || props === void 0 ? void 0 : props.handleAbility,
|
|
58
|
+
lineStyle: {
|
|
59
|
+
normal: {
|
|
60
|
+
color: '#F5222D'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
name: '设计能力(吨/日)'
|
|
64
|
+
}],
|
|
65
|
+
lineStyle: {
|
|
66
|
+
color: '#F5222D'
|
|
67
|
+
},
|
|
68
|
+
label: {
|
|
69
|
+
show: true,
|
|
70
|
+
position: 'insideEndTop',
|
|
71
|
+
formatter: '{b}: {c}',
|
|
72
|
+
color: '#F5222D',
|
|
73
|
+
fontWeight: 'normal'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}]
|
|
77
|
+
}) : /*#__PURE__*/_jsx(VmEmpty, {
|
|
78
|
+
type: "NO_CHART"
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
export default ChartJcqs;
|