@vtx/modals2 5.0.46 → 5.0.48

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.
Files changed (35) hide show
  1. package/lib/_components/vm-card-statistics/index.less +27 -27
  2. package/lib/_components/vm-factor-list/index.less +11 -11
  3. package/lib/_components/vm-map/index.js +9 -0
  4. package/lib/_components/vm-popover/index.less +7 -7
  5. package/lib/_service/index.js +18 -1
  6. package/lib/vtx-base-modal/Header/index.less +98 -98
  7. package/lib/vtx-base-modal/Tabs/index.less +68 -68
  8. package/lib/vtx-car-modal/components/Info/index.less +6 -6
  9. package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
  10. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
  11. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -6
  12. package/lib/vtx-default-modal/index.js +3 -3
  13. package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -66
  14. package/lib/vtx-df-modal/api-zd-reborn.js +246 -0
  15. package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jcqsfx.js +71 -0
  16. package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jczbqs.js +96 -0
  17. package/lib/vtx-df-modal/components/BaseInfoZdReborn/Qyjcl.js +41 -0
  18. package/lib/vtx-df-modal/components/BaseInfoZdReborn/RealtimeMonitor.js +149 -0
  19. package/lib/vtx-df-modal/components/BaseInfoZdReborn/Situation.js +47 -0
  20. package/lib/vtx-df-modal/components/BaseInfoZdReborn/index.js +140 -0
  21. package/lib/vtx-df-modal/components/BaseInfoZdReborn/index.less +161 -0
  22. package/lib/vtx-df-modal/components/Calendar/zd-reborn.js +142 -0
  23. package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJccc.js +62 -0
  24. package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJcqs.js +83 -0
  25. package/lib/vtx-df-modal/components/MeteringZdReborn/List.js +125 -0
  26. package/lib/vtx-df-modal/components/MeteringZdReborn/index.js +185 -0
  27. package/lib/vtx-df-modal/components/MeteringZdReborn/index.less +68 -0
  28. package/lib/vtx-df-modal/components/index.js +4 -1
  29. package/lib/vtx-df-modal/index.js +20 -8
  30. package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -16
  31. package/lib/vtx-restaurant-modal/config.js +52 -52
  32. package/lib/vtx-road-modal/components/Statistical/index.less +32 -32
  33. package/lib/vtx-staff-modal/components/BaseInfo/WorkStatic.js +2 -2
  34. package/lib/vtx-zzz-modal/index.js +4 -4
  35. package/package.json +81 -78
@@ -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;
@@ -0,0 +1,125 @@
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
+ /**
14
+ * 考核信息-列表
15
+ */
16
+
17
+ import { useSetState } from 'ahooks';
18
+ import { VmTable } from "../../../_components";
19
+ import { MeteringService } from "../../api-zd-reborn";
20
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
+ var List = function List(props) {
22
+ var deviceId = props.deviceId,
23
+ startDate = props.startDate,
24
+ endDate = props.endDate;
25
+ var _useSetState = useSetState({
26
+ pagination: {
27
+ current: 1,
28
+ pageSize: 10,
29
+ total: 0
30
+ }
31
+ }),
32
+ _useSetState2 = _slicedToArray(_useSetState, 2),
33
+ state = _useSetState2[0],
34
+ setState = _useSetState2[1];
35
+ var pagination = state.pagination;
36
+ var _MeteringService$useR = MeteringService.useRecord(deviceId, "".concat(startDate, " 00:00:00"), "".concat(endDate, " 23:59:59"), pagination.current),
37
+ records = _MeteringService$useR.records;
38
+ var _MeteringService$useS = MeteringService.useSummary(deviceId, "".concat(startDate, " 00:00:00"), "".concat(endDate, " 23:59:59")),
39
+ summary = _MeteringService$useS.summary;
40
+ var columns = [{
41
+ title: '车牌号',
42
+ dataIndex: 'carNo',
43
+ key: 'carNo'
44
+ }, {
45
+ title: '货物名称',
46
+ dataIndex: 'productName',
47
+ key: 'productName',
48
+ width: 150,
49
+ ellipsis: true
50
+ }, {
51
+ title: '发货单位',
52
+ dataIndex: 'sourceUnit',
53
+ key: 'sourceUnit',
54
+ width: 200,
55
+ ellipsis: true
56
+ }, {
57
+ title: '区域',
58
+ dataIndex: 'area',
59
+ key: 'area'
60
+ }, {
61
+ title: '毛重(吨)',
62
+ dataIndex: 'grossWeight',
63
+ key: 'grossWeight',
64
+ align: 'right',
65
+ render: function render(text) {
66
+ return /*#__PURE__*/_jsx("span", {
67
+ className: "grossWeight-color",
68
+ children: text
69
+ });
70
+ }
71
+ }, {
72
+ title: '皮重(吨)',
73
+ dataIndex: 'tareWeight',
74
+ key: 'tareWeight',
75
+ align: 'right',
76
+ render: function render(text) {
77
+ return /*#__PURE__*/_jsx("span", {
78
+ className: "tareWeight-color",
79
+ children: text
80
+ });
81
+ }
82
+ }, {
83
+ title: '净重(吨)',
84
+ dataIndex: 'netWeight',
85
+ key: 'netWeight',
86
+ align: 'right',
87
+ render: function render(text) {
88
+ return /*#__PURE__*/_jsx("span", {
89
+ className: "netWeight-color",
90
+ children: text
91
+ });
92
+ }
93
+ }, {
94
+ title: '称重时间',
95
+ dataIndex: 'grossTimeStr',
96
+ key: 'grossTimeStr',
97
+ width: 150
98
+ }];
99
+ var pageChange = function pageChange(page) {
100
+ setState({
101
+ pagination: _objectSpread(_objectSpread({}, pagination), {}, {
102
+ current: page
103
+ })
104
+ });
105
+ };
106
+ var tableProps = {
107
+ pagination: _objectSpread(_objectSpread({}, pagination), {}, {
108
+ total: records.total,
109
+ defaultPageSize: 10,
110
+ onChange: pageChange
111
+ }),
112
+ height: 384,
113
+ dataSource: records.rows
114
+ };
115
+ return /*#__PURE__*/_jsxs("div", {
116
+ children: [/*#__PURE__*/_jsxs("div", {
117
+ className: "df-appraisal-content-list-static",
118
+ children: ["\u6C47\u603B(\u6BDB\u91CD:", (summary === null || summary === void 0 ? void 0 : summary.grossWeightTotal) || 0, "\u5428\uFF0C\u76AE\u91CD:", (summary === null || summary === void 0 ? void 0 : summary.tareWeightTotal) || 0, "\u5428\uFF0C\u51C0\u91CD:", (summary === null || summary === void 0 ? void 0 : summary.netWeightTotal) || 0, "\u5428\uFF0C\u8F66\u6B21:", (summary === null || summary === void 0 ? void 0 : summary.count) || 0, ")"]
119
+ }), /*#__PURE__*/_jsx(VmTable, _objectSpread({
120
+ columns: columns,
121
+ rowKey: "id"
122
+ }, tableProps))]
123
+ });
124
+ };
125
+ export default List;
@@ -0,0 +1,185 @@
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
+ /**
8
+ * 终端-计量信息
9
+ */
10
+
11
+ import { useSetState } from 'ahooks';
12
+ import { Col, Row } from 'antd';
13
+ import dayjs from 'dayjs';
14
+ import { VmFactor, VmProgress, VmWrapper } from "../../../_components";
15
+ import useSettings from "../../../_hooks/useSettings";
16
+ import { CommonService } from "../../../_service";
17
+ import { BaseService, CalendarService } from "../../api-zd-reborn";
18
+ import ChartJccc from "./ChartJccc";
19
+ import ChartJcqs from "./ChartJcqs";
20
+ import "./index.less";
21
+ import List from "./List";
22
+ import rjjclIcon from "../../imgs/rjjcl.svg";
23
+ import sjnlIcon from "../../imgs/sjnl.svg";
24
+ import zjcccIcon from "../../imgs/zjccc.svg";
25
+ import zjclIcon from "../../imgs/zjcl.svg";
26
+ import rjjclDark from "../../imgs/rjjcl_dark.svg";
27
+ import sjnlDark from "../../imgs/sjnl_dark.svg";
28
+ import zjcccDark from "../../imgs/zjccc_dark.svg";
29
+ import zjclDark from "../../imgs/zjcl_dark.svg";
30
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
+ var Metering = function Metering(props) {
32
+ var id = props.id,
33
+ deviceId = props.deviceId;
34
+ var _useSettings = useSettings(),
35
+ isDark = _useSettings.isDark,
36
+ sDate = _useSettings.startDate,
37
+ eDate = _useSettings.endDate;
38
+ var _useSetState = useSetState({
39
+ startDate: sDate ? sDate : dayjs().subtract(30, 'days').format('YYYY-MM-DD'),
40
+ endDate: eDate ? eDate : dayjs().format('YYYY-MM-DD'),
41
+ tabKey: '1'
42
+ }),
43
+ _useSetState2 = _slicedToArray(_useSetState, 2),
44
+ state = _useSetState2[0],
45
+ setState = _useSetState2[1];
46
+ var startDate = state.startDate,
47
+ endDate = state.endDate,
48
+ tabKey = state.tabKey;
49
+ var _CommonService$useBas = CommonService.useBaseInfo(id),
50
+ code = _CommonService$useBas.code;
51
+ var _CalendarService$useF = CalendarService.useFetchData(deviceId, startDate, endDate),
52
+ data1 = _CalendarService$useF.data1;
53
+ var _BaseService$useSitua = BaseService.useSituationSummary(deviceId, startDate, endDate),
54
+ situationRes = _BaseService$useSitua.situationRes;
55
+ var handleDateChange = function handleDateChange(start, end) {
56
+ setState({
57
+ startDate: start,
58
+ endDate: end
59
+ });
60
+ };
61
+ var disabledDate = function disabledDate(current) {
62
+ var sdate = dayjs(startDate);
63
+ var eDate = dayjs(endDate);
64
+ var tooLate = sdate && current.diff(sdate, 'month') > 2;
65
+ var tooEarly = eDate && eDate.diff(current, 'month') > 2;
66
+ return !!tooEarly || !!tooLate;
67
+ };
68
+ var rate = ((situationRes === null || situationRes === void 0 ? void 0 : situationRes.dailyInWeight) || 0) / ((situationRes === null || situationRes === void 0 ? void 0 : situationRes.handleAbility) || 1) * 100;
69
+ return /*#__PURE__*/_jsxs("div", {
70
+ className: "metering",
71
+ children: [/*#__PURE__*/_jsx(Row, {
72
+ gutter: [16, 16],
73
+ children: /*#__PURE__*/_jsx(Col, {
74
+ span: 24,
75
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
76
+ title: "\u8FDB\u573A\u6C47\u603B\u5206\u6790",
77
+ onChange: function onChange(key) {
78
+ setState({
79
+ tabKey: key
80
+ });
81
+ },
82
+ needChange: true,
83
+ dateValue: [dayjs(startDate), dayjs(endDate)],
84
+ disabledDate: disabledDate,
85
+ filterType: "rangePicker",
86
+ defaultValue: [dayjs().subtract(1, 'M'), dayjs()],
87
+ filterChange: function filterChange(dates) {
88
+ return dates && handleDateChange(dayjs(dates[0]).format('YYYY-MM-DD'), dayjs(dates[1]).format('YYYY-MM-DD'));
89
+ },
90
+ children: [tabKey === 'chart' && /*#__PURE__*/_jsxs("div", {
91
+ className: "metering-content-main",
92
+ children: [/*#__PURE__*/_jsx(VmFactor, {
93
+ name: "\u603B\u8FDB\u573A\u91CF",
94
+ unit: "\u5428",
95
+ fontType: "blue",
96
+ value: (situationRes === null || situationRes === void 0 ? void 0 : situationRes.inWeight) || 0,
97
+ img: isDark ? zjclDark : zjclIcon
98
+ }), /*#__PURE__*/_jsx(VmFactor, {
99
+ img: isDark ? zjcccDark : zjcccIcon,
100
+ name: "\u603B\u8FDB\u573A\u8F66\u6B21",
101
+ fontType: "green",
102
+ value: (situationRes === null || situationRes === void 0 ? void 0 : situationRes.carNum) || 0,
103
+ unit: "\u6B21"
104
+ }), /*#__PURE__*/_jsx(VmFactor, {
105
+ img: isDark ? rjjclDark : rjjclIcon,
106
+ name: "\u65E5\u5747\u8FDB\u573A\u91CF",
107
+ fontType: "cyan",
108
+ value: (situationRes === null || situationRes === void 0 ? void 0 : situationRes.dailyInWeight) || 0,
109
+ unit: "\u5428"
110
+ }), /*#__PURE__*/_jsx(VmFactor, {
111
+ img: isDark ? sjnlDark : sjnlIcon,
112
+ name: "\u8BBE\u8BA1\u80FD\u529B",
113
+ fontType: "yellow",
114
+ value: (situationRes === null || situationRes === void 0 ? void 0 : situationRes.handleAbility) || 0,
115
+ unit: "\u5428/\u65E5"
116
+ }), /*#__PURE__*/_jsxs("div", {
117
+ className: "metering-content-main-avg",
118
+ children: [/*#__PURE__*/_jsx("div", {
119
+ className: "metering-content-main-avg-line"
120
+ }), /*#__PURE__*/_jsxs("div", {
121
+ className: "metering-content-main-avg-item",
122
+ children: [/*#__PURE__*/_jsx("div", {
123
+ children: "\u65E5\u5747\u8D1F\u8377"
124
+ }), /*#__PURE__*/_jsxs("div", {
125
+ className: "metering-content-main-avg-value",
126
+ children: [rate === null || rate === void 0 ? void 0 : rate.toFixed(2), /*#__PURE__*/_jsx("span", {
127
+ children: "%"
128
+ })]
129
+ })]
130
+ }), /*#__PURE__*/_jsx(VmProgress.Line, {
131
+ rate: rate
132
+ })]
133
+ })]
134
+ }), tabKey === 'list' && /*#__PURE__*/_jsx(List, {
135
+ deviceId: deviceId,
136
+ startDate: startDate,
137
+ endDate: endDate
138
+ })]
139
+ })
140
+ })
141
+ }), tabKey === 'chart' && /*#__PURE__*/_jsx("div", {
142
+ className: "metering-content-charts",
143
+ children: /*#__PURE__*/_jsxs(Row, {
144
+ gutter: [10, 10],
145
+ children: [/*#__PURE__*/_jsx(Col, {
146
+ span: 12,
147
+ children: /*#__PURE__*/_jsx(ChartJcqs, {
148
+ data: data1,
149
+ handleAbility: situationRes === null || situationRes === void 0 ? void 0 : situationRes.handleAbility
150
+ })
151
+ }), /*#__PURE__*/_jsx(Col, {
152
+ span: 12,
153
+ children: /*#__PURE__*/_jsx(ChartJccc, {
154
+ deviceId: deviceId,
155
+ startDate: startDate,
156
+ endDate: endDate
157
+ })
158
+ })]
159
+ })
160
+ })]
161
+ });
162
+ };
163
+ export var MainItem = function MainItem(props) {
164
+ var src = props.src,
165
+ name = props.name,
166
+ value = props.value,
167
+ unit = props.unit;
168
+ return /*#__PURE__*/_jsxs("div", {
169
+ className: "metering-content-main-item",
170
+ children: [/*#__PURE__*/_jsx("img", {
171
+ src: src
172
+ }), /*#__PURE__*/_jsxs("div", {
173
+ children: [/*#__PURE__*/_jsx("div", {
174
+ className: "metering-content-main-item--name",
175
+ children: name
176
+ }), /*#__PURE__*/_jsxs("div", {
177
+ className: "metering-content-main-item--value",
178
+ children: [/*#__PURE__*/_jsx("span", {
179
+ children: value
180
+ }), unit]
181
+ })]
182
+ })]
183
+ });
184
+ };
185
+ export default Metering;
@@ -0,0 +1,68 @@
1
+ .metering {
2
+ &-content {
3
+ &-main {
4
+ padding: 16px;
5
+ font-size: 14px;
6
+ display: flex;
7
+ justify-content: space-between;
8
+ align-content: center;
9
+
10
+ &-avg {
11
+ width: 280px;
12
+ position: relative;
13
+ padding-left: 16px;
14
+ &-line {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ background-color: var(--bg-border-color2);
19
+ z-index: 1;
20
+ }
21
+ &-item {
22
+ display: flex;
23
+ justify-content: space-between;
24
+ align-items: center;
25
+ color: var(--img-text-color);
26
+ }
27
+ &-value {
28
+ font-family: D-DIN Exp-DINExp, D-DIN Exp-DINExp;
29
+ background: var(--info-b-color);
30
+ font-size: 20px;
31
+ background-clip: text;
32
+ -webkit-text-fill-color: transparent;
33
+ span {
34
+ font-size: 14px;
35
+ }
36
+ }
37
+ }
38
+ }
39
+
40
+ &-charts {
41
+ margin-top: 12px;
42
+
43
+ &-desc {
44
+ padding: 8px;
45
+ background: rgba(255, 135, 70, 0.1);
46
+ border-radius: 8px;
47
+ margin: 12px 0;
48
+ color: #ff8746;
49
+ overflow: hidden;
50
+ text-overflow: ellipsis;
51
+ white-space: nowrap;
52
+ }
53
+ }
54
+ }
55
+ .df-appraisal-content-list-static {
56
+ color: var(--modal-title-color);
57
+ margin-bottom: 12px;
58
+ }
59
+ .grossWeight-color {
60
+ color: var(--list-cell-active1);
61
+ }
62
+ .tareWeight-color {
63
+ color: var(--list-cell-active2);
64
+ }
65
+ .netWeight-color {
66
+ color: var(--list-cell-active3);
67
+ }
68
+ }
@@ -1,5 +1,8 @@
1
1
  import BaseInfo from "./BaseInfo";
2
+ import BaseInfoZdReborn from "./BaseInfoZdReborn";
2
3
  import Calendar from "./Calendar";
4
+ import CalendarZdReborn from "./Calendar/zd-reborn";
3
5
  import Metering from "./Metering";
6
+ import MeteringZdReborn from "./MeteringZdReborn";
4
7
  import WorkCondition from "./WorkCondition";
5
- export { BaseInfo, Calendar, Metering, WorkCondition };
8
+ export { BaseInfo, BaseInfoZdReborn, Calendar, CalendarZdReborn, Metering, MeteringZdReborn, WorkCondition };
@@ -4,7 +4,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
4
4
  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); }
5
5
  import { useMemo } from 'react';
6
6
  import { BaseInfo as DefaultBaseInfo } from "../vtx-default-modal/components";
7
- import { BaseInfo, Calendar, Metering, WorkCondition } from "./components";
7
+ import { BaseInfo, BaseInfoZdReborn, Calendar, CalendarZdReborn, Metering, MeteringZdReborn, WorkCondition } from "./components";
8
8
  // import Appraisal from '../vm-appraisal-info';
9
9
  import VmRepairMaintain from "../_components/vm-repair-maintain";
10
10
  import VmVideo from "../_components/vm-video";
@@ -36,8 +36,10 @@ var VtxDfModal = function VtxDfModal(props) {
36
36
  customMapInfo = props.customMapInfo,
37
37
  tabChose = props.tabChose,
38
38
  _props$showCollect = props.showCollect,
39
- showCollect = _props$showCollect === void 0 ? true : _props$showCollect;
40
- var _CommonService$useBas = CommonService.useBaseInfo(id),
39
+ showCollect = _props$showCollect === void 0 ? true : _props$showCollect,
40
+ _props$zdReborn = props.zdReborn,
41
+ zdReborn = _props$zdReborn === void 0 ? false : _props$zdReborn;
42
+ var _CommonService$useBas = CommonService.useBaseInfo(id, (customMapInfo === null || customMapInfo === void 0 ? void 0 : customMapInfo.coordinate) || 'wgs84'),
41
43
  info = _CommonService$useBas.info,
42
44
  photos = _CommonService$useBas.photos;
43
45
  var tabs = [{
@@ -52,8 +54,8 @@ var VtxDfModal = function VtxDfModal(props) {
52
54
  }];
53
55
  var _useGetConfig = useGetConfig(info === null || info === void 0 ? void 0 : info.typeCode, tabs),
54
56
  tabsData = _useGetConfig.tabsData;
55
- var _CommonService$useLmD = CommonService.useLmDetail(id),
56
- detail = _CommonService$useLmD.detail;
57
+ var _CommonService = CommonService[zdReborn ? 'useLmDetailZdReborn' : 'useLmDetail'](id),
58
+ detail = _CommonService.detail;
57
59
  var _BaseService$useRealt = BaseService.useRealtimeMonitor(info === null || info === void 0 ? void 0 : info.code),
58
60
  realtimeMonitor = _BaseService$useRealt.realtimeMonitor;
59
61
  var _useGetChannels = useGetChannels("".concat(info === null || info === void 0 ? void 0 : info.typeCode, "_").concat(info === null || info === void 0 ? void 0 : info.code), !!(info !== null && info !== void 0 && info.typeCode)),
@@ -78,24 +80,34 @@ var VtxDfModal = function VtxDfModal(props) {
78
80
  }
79
81
  return tabsList;
80
82
  }, [JSON.stringify(tabsData), JSON.stringify(channels), JSON.stringify(detail)]);
83
+ var ZLBase = zdReborn ? BaseInfoZdReborn : BaseInfo;
84
+ console.log(zdReborn);
81
85
  var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, !(detail !== null && detail !== void 0 && detail.beenWeigh) && !(realtimeMonitor !== null && realtimeMonitor !== void 0 && realtimeMonitor.length) ? /*#__PURE__*/_jsx(DefaultBaseInfo, {
82
86
  id: id,
83
87
  info: info,
84
88
  photos: photos,
85
89
  mapCenter: mapCenter,
86
90
  customMapInfo: customMapInfo
87
- }) : /*#__PURE__*/_jsx(BaseInfo, {
91
+ }) : /*#__PURE__*/_jsx(ZLBase, {
88
92
  code: info === null || info === void 0 ? void 0 : info.code,
89
93
  hasLm: detail === null || detail === void 0 ? void 0 : detail.beenWeigh,
90
94
  realtimeMonitor: realtimeMonitor,
91
95
  info: info,
96
+ detail: detail,
92
97
  photos: photos
93
- })), TABS_METERING, /*#__PURE__*/_jsx(Metering, {
98
+ })), TABS_METERING, zdReborn ? /*#__PURE__*/_jsx(MeteringZdReborn, {
99
+ id: id,
100
+ deviceId: detail === null || detail === void 0 ? void 0 : detail.deviceId
101
+ }) : /*#__PURE__*/_jsx(Metering, {
94
102
  id: id
95
103
  })), TABS_WC, /*#__PURE__*/_jsx(WorkCondition, {
96
104
  id: id,
97
105
  code: info === null || info === void 0 ? void 0 : info.code
98
- })), TABS_Calendar, /*#__PURE__*/_jsx(Calendar, {
106
+ })), TABS_Calendar, zdReborn ? /*#__PURE__*/_jsx(CalendarZdReborn, {
107
+ code: info === null || info === void 0 ? void 0 : info.code,
108
+ deviceId: detail === null || detail === void 0 ? void 0 : detail.deviceId,
109
+ handleAbility: detail === null || detail === void 0 ? void 0 : detail.handleAbility
110
+ }) : /*#__PURE__*/_jsx(Calendar, {
99
111
  code: info === null || info === void 0 ? void 0 : info.code
100
112
  })), TABS_RM, /*#__PURE__*/_jsx(VmRepairMaintain, {
101
113
  id: id
@@ -1,16 +1,16 @@
1
- .vtx-restaurant-rule_item {
2
- border-radius: 8px 8px 8px 8px;
3
- border: 1px solid var(--gray-line-color);
4
- padding: 16px 16px 8px;
5
- margin-top: 12px;
6
- position: relative;
7
- .vtx-restaurant-border {
8
- width: 100%;
9
- position: absolute;
10
- left: 0;
11
- top: -2px;
12
- height: 44px;
13
- border-radius: 8px 8px 0px 0px;
14
- border-top: 2px solid var(--blue-color);
15
- }
16
- }
1
+ .vtx-restaurant-rule_item {
2
+ border-radius: 8px 8px 8px 8px;
3
+ border: 1px solid var(--gray-line-color);
4
+ padding: 16px 16px 8px;
5
+ margin-top: 12px;
6
+ position: relative;
7
+ .vtx-restaurant-border {
8
+ width: 100%;
9
+ position: absolute;
10
+ left: 0;
11
+ top: -2px;
12
+ height: 44px;
13
+ border-radius: 8px 8px 0px 0px;
14
+ border-top: 2px solid var(--blue-color);
15
+ }
16
+ }