@vtx/modals2 5.0.4 → 5.0.5

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 (103) hide show
  1. package/lib/_components/vm-bar-charts/index.js +9 -5
  2. package/lib/_components/vm-extra-tab/style/index.less +6 -3
  3. package/lib/_components/vm-pie-charts/index.js +3 -1
  4. package/lib/_components/vm-tag/style/index.less +1 -0
  5. package/lib/_components/vm-video/HistoryGrid.js +52 -0
  6. package/lib/_components/vm-video/RealtimeGrid.js +8 -4
  7. package/lib/_components/vm-video/index.js +298 -112
  8. package/lib/_components/vm-video/index.less +10 -1
  9. package/lib/_service/index.js +5 -0
  10. package/lib/_util/index.js +0 -5
  11. package/lib/vtx-base-modal/Header/index.js +3 -1
  12. package/lib/vtx-base-modal/index.js +6 -3
  13. package/lib/vtx-car-modal/components/Info/index.js +2 -1
  14. package/lib/vtx-car-modal/content/Cc/AlarmInfo/StaticInfo.js +0 -1
  15. package/lib/vtx-car-modal/content/JXH/BaseInfo/index.js +131 -104
  16. package/lib/vtx-car-modal/content/JXH/StaticInfo/index.js +206 -158
  17. package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +19 -4
  18. package/lib/vtx-car-modal/content/Unmanned/Analysis/index.js +33 -0
  19. package/lib/vtx-car-modal/content/Unmanned/Calendar/index.js +255 -0
  20. package/lib/vtx-car-modal/content/Unmanned/Monitor/index.js +75 -0
  21. package/lib/vtx-car-modal/content/Unmanned/Monitor/index.less +22 -0
  22. package/lib/vtx-car-modal/content/Unmanned/WorkInfo/index.js +87 -0
  23. package/lib/vtx-car-modal/content/Unmanned/WorkInfo/index.less +0 -0
  24. package/lib/vtx-car-modal/content/Unmanned/index.js +10 -0
  25. package/lib/vtx-car-modal/content/index.js +2 -1
  26. package/lib/vtx-car-modal/imgs/butter.png +0 -0
  27. package/lib/vtx-car-modal/imgs/butter_dark.png +0 -0
  28. package/lib/vtx-car-modal/imgs/clock.png +0 -0
  29. package/lib/vtx-car-modal/imgs/clock_dark.png +0 -0
  30. package/lib/vtx-car-modal/imgs/clock_green.png +0 -0
  31. package/lib/vtx-car-modal/imgs/clock_green_dark.png +0 -0
  32. package/lib/vtx-car-modal/imgs/factor_bg.png +0 -0
  33. package/lib/vtx-car-modal/imgs/track.png +0 -0
  34. package/lib/vtx-car-modal/imgs/track_dark.png +0 -0
  35. package/lib/vtx-car-modal/imgs/track_green.png +0 -0
  36. package/lib/vtx-car-modal/imgs/track_green_dark.png +0 -0
  37. package/lib/vtx-car-modal/imgs/water.png +0 -0
  38. package/lib/vtx-car-modal/imgs/water_dark.png +0 -0
  39. package/lib/vtx-car-modal/index.js +9 -3
  40. package/lib/vtx-default-modal/components/BaseInfo/index.js +3 -2
  41. package/lib/vtx-default-modal/index.js +0 -1
  42. package/lib/vtx-device-modal/components/DataAnalysis/MonitorAnalysis.js +0 -1
  43. package/lib/vtx-df-modal/index.js +0 -2
  44. package/lib/vtx-housing-estate-modal/api.js +559 -0
  45. package/lib/vtx-housing-estate-modal/components/Alarm/Distribute.js +129 -0
  46. package/lib/vtx-housing-estate-modal/components/Alarm/FSCSFB.js +67 -0
  47. package/lib/vtx-housing-estate-modal/components/Alarm/FSSD.js +65 -0
  48. package/lib/vtx-housing-estate-modal/components/Alarm/FSYZQS.js +67 -0
  49. package/lib/vtx-housing-estate-modal/components/Alarm/GDCLXL.js +109 -0
  50. package/lib/vtx-housing-estate-modal/components/Alarm/index.js +99 -0
  51. package/lib/vtx-housing-estate-modal/components/Alarm/index.less +54 -0
  52. package/lib/vtx-housing-estate-modal/components/OverView/Hot.js +179 -0
  53. package/lib/vtx-housing-estate-modal/components/OverView/Left.js +85 -0
  54. package/lib/vtx-housing-estate-modal/components/OverView/Manage.js +172 -0
  55. package/lib/vtx-housing-estate-modal/components/OverView/RightBottom.js +177 -0
  56. package/lib/vtx-housing-estate-modal/components/OverView/index.js +56 -0
  57. package/lib/vtx-housing-estate-modal/components/OverView/index.less +163 -0
  58. package/lib/vtx-housing-estate-modal/components/TFRD/index.js +133 -0
  59. package/lib/vtx-housing-estate-modal/components/TFRD/index.less +12 -0
  60. package/lib/vtx-housing-estate-modal/components/WGGS/Content.js +66 -0
  61. package/lib/vtx-housing-estate-modal/components/WGGS/index.js +68 -0
  62. package/lib/vtx-housing-estate-modal/components/WGGS/index.less +49 -0
  63. package/lib/vtx-housing-estate-modal/components/WGXW/Content.js +119 -0
  64. package/lib/vtx-housing-estate-modal/components/WGXW/index.js +121 -0
  65. package/lib/vtx-housing-estate-modal/components/WGXW/index.less +97 -0
  66. package/lib/vtx-housing-estate-modal/components/index.js +5 -0
  67. package/lib/vtx-housing-estate-modal/config.js +77 -0
  68. package/lib/vtx-housing-estate-modal/imgs/avatar.png +0 -0
  69. package/lib/vtx-housing-estate-modal/imgs/avatar_light.png +0 -0
  70. package/lib/vtx-housing-estate-modal/imgs/ddypz.png +0 -0
  71. package/lib/vtx-housing-estate-modal/imgs/ddypz_light.png +0 -0
  72. package/lib/vtx-housing-estate-modal/imgs/gzxjcx.png +0 -0
  73. package/lib/vtx-housing-estate-modal/imgs/hjglcx.png +0 -0
  74. package/lib/vtx-housing-estate-modal/imgs/hmd.png +0 -0
  75. package/lib/vtx-housing-estate-modal/imgs/hmd_light.png +0 -0
  76. package/lib/vtx-housing-estate-modal/imgs/manage_bg.png +0 -0
  77. package/lib/vtx-housing-estate-modal/imgs/manage_bg_light.png +0 -0
  78. package/lib/vtx-housing-estate-modal/imgs/rank.png +0 -0
  79. package/lib/vtx-housing-estate-modal/imgs/rank_light.png +0 -0
  80. package/lib/vtx-housing-estate-modal/imgs/tfcs.png +0 -0
  81. package/lib/vtx-housing-estate-modal/imgs/tfcs_light.png +0 -0
  82. package/lib/vtx-housing-estate-modal/imgs/tfd.png +0 -0
  83. package/lib/vtx-housing-estate-modal/imgs/tfd_light.png +0 -0
  84. package/lib/vtx-housing-estate-modal/imgs/tfhs.png +0 -0
  85. package/lib/vtx-housing-estate-modal/imgs/tfhs_light.png +0 -0
  86. package/lib/vtx-housing-estate-modal/imgs/wgmsr.png +0 -0
  87. package/lib/vtx-housing-estate-modal/imgs/wgmsr_light.png +0 -0
  88. package/lib/vtx-housing-estate-modal/imgs/yyxj.png +0 -0
  89. package/lib/vtx-housing-estate-modal/imgs/yyxj_light.png +0 -0
  90. package/lib/vtx-housing-estate-modal/index.js +108 -0
  91. package/lib/vtx-housing-estate-modal/style/index.js +4 -0
  92. package/lib/vtx-housing-estate-modal/style/index.less +1 -0
  93. package/lib/vtx-road-modal/components/Calendar/index.js +1 -1
  94. package/lib/vtx-road-modal/components/Statistical/index.js +1 -1
  95. package/lib/vtx-shxq-modal/components/ThrowCalendar/index.js +0 -1
  96. package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +15 -5
  97. package/lib/vtx-staff-modal/index.js +4 -1
  98. package/lib/vtx-tfd-modal/components/BaseInfo/index.js +1 -8
  99. package/lib/vtx-zg-modal/components/BaseInfo/index.js +0 -1
  100. package/package.json +1 -1
  101. package/lib/resources/jessibuca/decoder.js +0 -3839
  102. package/lib/resources/jessibuca/decoder.wasm +0 -0
  103. package/lib/resources/jessibuca/jessibuca.js +0 -5350
@@ -0,0 +1,179 @@
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 { Col, Radio, Row } from 'antd';
14
+ import dayjs from 'dayjs';
15
+ import { useState } from 'react';
16
+ import { VmBarCharts, VmFactor, VmLineCharts, VmTitle, VmWrapper } from "../../../_components";
17
+ import { getImg } from "../../../vtx-shxq-modal/components/ThrowRecord";
18
+ import { overViewService } from "../../api";
19
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
+ var GarbageTypeColor = {
21
+ KEHUISHOU: '#6BB8FF',
22
+ CHUYU: '#46DA91',
23
+ QITA: '#C4C4C4',
24
+ YOUHAI: '#FF8288'
25
+ };
26
+ var garbageSummary = function garbageSummary(garbageIcons, data, type) {
27
+ var _data$find;
28
+ var color = '',
29
+ count = 0,
30
+ weight = 0,
31
+ title = '';
32
+ var obj = garbageIcons === null || garbageIcons === void 0 ? void 0 : garbageIcons.find(function (ele) {
33
+ return ele.code === type;
34
+ });
35
+ var obj2 = data === null || data === void 0 || (_data$find = data.find) === null || _data$find === void 0 ? void 0 : _data$find.call(data, function (item) {
36
+ return item.garbageTypeCode === type;
37
+ });
38
+ title = obj === null || obj === void 0 ? void 0 : obj.name;
39
+ color = obj.garbageCanColor;
40
+ count = (obj2 === null || obj2 === void 0 ? void 0 : obj2.throwCount) || 0;
41
+ weight = (obj2 === null || obj2 === void 0 ? void 0 : obj2.weight) || 0;
42
+ return {
43
+ name: title,
44
+ fontType: color,
45
+ value: [{
46
+ value: count,
47
+ unit: '次'
48
+ }, {
49
+ value: weight,
50
+ unit: 'kg'
51
+ }]
52
+ };
53
+ };
54
+ var Left = function Left(_ref) {
55
+ var _ref2, _ref2$map, _sumByHour$map, _sumByPoint$map;
56
+ var classPrefix = _ref.classPrefix,
57
+ id = _ref.id,
58
+ garbageIcons = _ref.garbageIcons;
59
+ var _useState = useState('point'),
60
+ _useState2 = _slicedToArray(_useState, 2),
61
+ chartType = _useState2[0],
62
+ setChartType = _useState2[1];
63
+ // 按垃圾类型统计
64
+ var sumByGarbageType = overViewService.useThrowSumByGarbageType({
65
+ housingEstateId: id
66
+ });
67
+ // 点位分布
68
+ var sumByPoint = overViewService.useThrowSumByPointOneWeek({
69
+ housingEstateId: id
70
+ });
71
+
72
+ // 24小时分布
73
+ var sumByHour = overViewService.useThrowSumByHour({
74
+ housingEstateId: id,
75
+ beginTime: dayjs().format('YYYY-MM-DD 00:00:00'),
76
+ endTime: dayjs().format('YYYY-MM-DD 23:59:59')
77
+ });
78
+ var weekData = overViewService.useThrowSumByDayAndPoint({
79
+ housingEstateId: id
80
+ });
81
+ var garbageTypeCodes = (sumByGarbageType || []).map(function (item) {
82
+ return item.garbageTypeCode;
83
+ });
84
+ return /*#__PURE__*/_jsx("div", {
85
+ className: "".concat(classPrefix, "-hot"),
86
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
87
+ title: "\u6295\u653E\u70ED\u5EA6",
88
+ children: [/*#__PURE__*/_jsx("div", {
89
+ className: "".concat(classPrefix, "-hot-summary"),
90
+ children: ['KEHUISHOU', 'CHUYU', 'QITA', 'YOUHAI'].filter(function (ele) {
91
+ return garbageTypeCodes.includes(ele);
92
+ }).map(function (ele) {
93
+ return /*#__PURE__*/_jsx(VmFactor, _objectSpread({
94
+ img: getImg(ele === 'KEHUISHOU' ? 'KHSW' : ele)
95
+ }, garbageSummary(garbageIcons, sumByGarbageType, ele)), ele);
96
+ })
97
+ }), /*#__PURE__*/_jsxs(Row, {
98
+ gutter: 48,
99
+ children: [/*#__PURE__*/_jsxs(Col, {
100
+ span: 12,
101
+ children: [/*#__PURE__*/_jsxs("div", {
102
+ className: "".concat(classPrefix, "-row"),
103
+ children: [/*#__PURE__*/_jsx(VmTitle, {
104
+ title: "\u6295\u653E\u70B9\u5206\u6790",
105
+ border: false
106
+ }), /*#__PURE__*/_jsx("div", {
107
+ className: "".concat(classPrefix, "-hot-btns"),
108
+ children: /*#__PURE__*/_jsxs(Radio.Group, {
109
+ value: chartType,
110
+ onChange: function onChange(e) {
111
+ return setChartType(e.target.value);
112
+ },
113
+ children: [/*#__PURE__*/_jsx(Radio.Button, {
114
+ value: "point",
115
+ children: "\u70B9\u4F4D\u5206\u5E03"
116
+ }), /*#__PURE__*/_jsx(Radio.Button, {
117
+ value: "hour",
118
+ children: "24h\u5206\u5E03"
119
+ })]
120
+ })
121
+ })]
122
+ }), /*#__PURE__*/_jsx(VmBarCharts, {
123
+ dataList: [{
124
+ name: '投放次数',
125
+ data: (_ref2 = chartType === 'hour' ? sumByHour : sumByPoint) === null || _ref2 === void 0 || (_ref2$map = _ref2.map) === null || _ref2$map === void 0 ? void 0 : _ref2$map.call(_ref2, function (item) {
126
+ return item.throwCount;
127
+ }),
128
+ color: 'geekblue'
129
+ }],
130
+ xAxis: chartType === 'hour' ? sumByHour === null || sumByHour === void 0 || (_sumByHour$map = sumByHour.map) === null || _sumByHour$map === void 0 ? void 0 : _sumByHour$map.call(sumByHour, function (item) {
131
+ var _item$date;
132
+ return (_item$date = item.date) === null || _item$date === void 0 ? void 0 : _item$date.substring(10);
133
+ }) : sumByPoint === null || sumByPoint === void 0 || (_sumByPoint$map = sumByPoint.map) === null || _sumByPoint$map === void 0 ? void 0 : _sumByPoint$map.call(sumByPoint, function (item) {
134
+ return item.throwPointName;
135
+ }),
136
+ unit: "\u6B21",
137
+ showLegend: false,
138
+ height: 192,
139
+ yAxisList: [{
140
+ key: '',
141
+ unit: '次',
142
+ name: '次'
143
+ }],
144
+ gridOptions: {
145
+ top: 36,
146
+ bottom: 24
147
+ }
148
+ })]
149
+ }), /*#__PURE__*/_jsxs(Col, {
150
+ span: 12,
151
+ children: [/*#__PURE__*/_jsx(VmTitle, {
152
+ title: "\u8FD1\u4E00\u5468\u8D8B\u52BF",
153
+ border: false
154
+ }), /*#__PURE__*/_jsx(VmLineCharts, {
155
+ xAxis: weekData === null || weekData === void 0 ? void 0 : weekData.map(function (ele) {
156
+ return ele.day;
157
+ }),
158
+ dataList: [{
159
+ name: 'v近一周趋势',
160
+ data: weekData === null || weekData === void 0 ? void 0 : weekData.map(function (ele) {
161
+ return ele.throwCount;
162
+ })
163
+ }],
164
+ unit: "\u6B21",
165
+ legendOption: {
166
+ width: '95%'
167
+ },
168
+ height: 192,
169
+ gridOption: {
170
+ top: 36,
171
+ bottom: 24
172
+ }
173
+ })]
174
+ })]
175
+ })]
176
+ })
177
+ });
178
+ };
179
+ export default Left;
@@ -0,0 +1,85 @@
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
+ import { VtxImage } from '@vtx/components';
8
+ import { getVtxToken } from '@vtx/utils';
9
+ import { VmEmpty, VmFactorList, VmInfoCollection, VmWrapper } from "../../../_components";
10
+ import useSettings from "../../../_hooks/useSettings";
11
+ import { OverViewLeftFields } from "../../config";
12
+ import DDYPZ from "../../imgs/ddypz.png";
13
+ import DDYPZ_LIGHT from "../../imgs/ddypz_light.png";
14
+ import TFD from "../../imgs/tfd.png";
15
+ import TFD_LIGHT from "../../imgs/tfd_light.png";
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
+ var Left = function Left(_ref) {
18
+ var classPrefix = _ref.classPrefix,
19
+ _ref$throwPoints = _ref.throwPoints,
20
+ throwPoints = _ref$throwPoints === void 0 ? [] : _ref$throwPoints,
21
+ basicInfo = _ref.basicInfo;
22
+ var _useSettings = useSettings(),
23
+ isDark = _useSettings.isDark;
24
+ var fieldsData = OverViewLeftFields.map(function (item) {
25
+ return _objectSpread(_objectSpread({}, item), {}, {
26
+ value: basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo[item.key]
27
+ });
28
+ });
29
+ // 户/点
30
+ var num1 = basicInfo !== null && basicInfo !== void 0 && basicInfo.householdNum && basicInfo !== null && basicInfo !== void 0 && basicInfo.throwPointNum ? Math.ceil((basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.householdNum) / (basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.throwPointNum)) : 0;
31
+ // 点/人
32
+ var num2 = basicInfo !== null && basicInfo !== void 0 && basicInfo.throwPointNum && basicInfo !== null && basicInfo !== void 0 && basicInfo.supervisorNum ? Math.ceil((basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.throwPointNum) / (basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.supervisorNum)) : 0;
33
+ var photos = JSON.parse((basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.photos) || '[]');
34
+ return /*#__PURE__*/_jsx("div", {
35
+ className: "".concat(classPrefix, "-left"),
36
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
37
+ title: "\u57FA\u672C\u4FE1\u606F",
38
+ children: [photos && /*#__PURE__*/_jsx("div", {
39
+ className: "".concat(classPrefix, "-left-img"),
40
+ children: photos.length ? /*#__PURE__*/_jsx(VtxImage.PreviewGroup, {
41
+ children: photos.map(function (item) {
42
+ return /*#__PURE__*/_jsx(VtxImage, {
43
+ src: "/cloudFile/common/downloadFile?id=".concat(item.id, "&token=").concat(getVtxToken('token')),
44
+ alt: item.name
45
+ }, item.id);
46
+ })
47
+ }) : /*#__PURE__*/_jsx(VmEmpty, {
48
+ type: "NO_PICTURE",
49
+ showText: false
50
+ })
51
+ }), /*#__PURE__*/_jsx(VmFactorList, {
52
+ list: [{
53
+ name: '投放点密度',
54
+ unit: '户/点',
55
+ value: num1,
56
+ img: isDark ? TFD : TFD_LIGHT,
57
+ fontType: 'blue',
58
+ unitStyle: {
59
+ fontSize: 14
60
+ }
61
+ }, {
62
+ name: '督导员配置',
63
+ unit: '点/人',
64
+ value: num2,
65
+ img: isDark ? DDYPZ : DDYPZ_LIGHT,
66
+ fontType: 'blue',
67
+ unitStyle: {
68
+ fontSize: 14
69
+ }
70
+ }]
71
+ }), /*#__PURE__*/_jsx(VmInfoCollection, {
72
+ data: fieldsData,
73
+ gap: 12,
74
+ horizontal: true,
75
+ labelStyle: {
76
+ minWidth: 'unset'
77
+ },
78
+ style: {
79
+ marginTop: 16
80
+ }
81
+ })]
82
+ })
83
+ });
84
+ };
85
+ export default Left;
@@ -0,0 +1,172 @@
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
+ import moment from 'moment';
8
+ import { VmFactor, VmWrapper } from "../../../_components";
9
+ import useSettings from "../../../_hooks/useSettings";
10
+ import { overViewService, useGetDivisionBusinessPackages } from "../../api";
11
+ import { getPercent } from "./RightBottom";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ var TopItem = function TopItem(_ref) {
14
+ var name = _ref.name,
15
+ content = _ref.content,
16
+ icon = _ref.icon,
17
+ textStyleType = _ref.textStyleType;
18
+ return /*#__PURE__*/_jsxs("div", {
19
+ className: "top-item",
20
+ children: [/*#__PURE__*/_jsxs("div", {
21
+ className: "img",
22
+ children: [/*#__PURE__*/_jsx("p", {
23
+ className: "name--".concat(textStyleType),
24
+ children: name
25
+ }), /*#__PURE__*/_jsx("img", {
26
+ src: icon
27
+ })]
28
+ }), /*#__PURE__*/_jsx("div", {
29
+ className: "statistic",
30
+ children: content.map(function (item) {
31
+ return /*#__PURE__*/_jsxs("div", {
32
+ style: {
33
+ width: 240
34
+ },
35
+ children: [/*#__PURE__*/_jsx("span", {
36
+ children: item.text
37
+ }), /*#__PURE__*/_jsx("span", {
38
+ className: "statistic-value--".concat(textStyleType),
39
+ children: item.value
40
+ })]
41
+ }, item.text);
42
+ })
43
+ })]
44
+ });
45
+ };
46
+ var Manage = function Manage(_ref2) {
47
+ var classPrefix = _ref2.classPrefix,
48
+ id = _ref2.id;
49
+ var _useSettings = useSettings(),
50
+ isDark = _useSettings.isDark;
51
+ var data = overViewService.useManagementData({
52
+ housingEstateId: id
53
+ });
54
+ var businessPackages = useGetDivisionBusinessPackages(id) || [];
55
+ // 今日已过时常
56
+ var todayPastHour = Number(((moment().valueOf() - moment().startOf('day').valueOf()) / 1000 / 60 / 60).toFixed(1));
57
+ var cleanGroundDuration = data !== null && data !== void 0 && data.dirtyGroundDuration ? (todayPastHour - (data === null || data === void 0 ? void 0 : data.dirtyGroundDuration) / 60).toFixed(1) : 0;
58
+ var noOverflowDuration = data !== null && data !== void 0 && data.overflowDuration ? (todayPastHour - (data === null || data === void 0 ? void 0 : data.overflowDuration) / 60).toFixed(1) : 0;
59
+ return /*#__PURE__*/_jsx("div", {
60
+ className: "".concat(classPrefix, "-manage"),
61
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
62
+ title: "\u8FD0\u8425\u7BA1\u7406",
63
+ children: [/*#__PURE__*/_jsx("div", {
64
+ className: "".concat(classPrefix, "-row"),
65
+ children: [{
66
+ name: '语音宣教',
67
+ value: data === null || data === void 0 ? void 0 : data.voiceEducateTimes,
68
+ unit: '次',
69
+ key: 'yyxj',
70
+ fontType: 'blue'
71
+ }, {
72
+ name: '违规陌生人',
73
+ value: data === null || data === void 0 ? void 0 : data.strangerNum,
74
+ unit: '人',
75
+ key: 'wgmsr',
76
+ fontType: 'red'
77
+ }, {
78
+ name: '灰名单',
79
+ value: data === null || data === void 0 ? void 0 : data.badLabelPersonNum,
80
+ unit: '人',
81
+ key: 'hmd',
82
+ fontType: 'gray'
83
+ }].map(function (ele, index) {
84
+ return /*#__PURE__*/_jsx(VmFactor, _objectSpread(_objectSpread({}, ele), {}, {
85
+ img: require("../../imgs/".concat(ele.key).concat(isDark ? '' : '_light', ".png")),
86
+ unitStyle: {
87
+ fontSize: 14
88
+ }
89
+ }), index);
90
+ })
91
+ }), /*#__PURE__*/_jsxs("div", {
92
+ className: "".concat(classPrefix, "-manage-bottom"),
93
+ children: [/*#__PURE__*/_jsxs("div", {
94
+ className: "".concat(classPrefix, "-manage-bottom-item"),
95
+ children: [/*#__PURE__*/_jsxs("div", {
96
+ className: "".concat(classPrefix, "-manage-bottom-item-left"),
97
+ children: ["\u73AF\u5883\u7BA1\u7406\u6210\u6548", /*#__PURE__*/_jsx("img", {
98
+ src: require("../../imgs/hjglcx.png")
99
+ })]
100
+ }), /*#__PURE__*/_jsxs("div", {
101
+ className: "".concat(classPrefix, "-manage-bottom-item-right"),
102
+ children: [/*#__PURE__*/_jsxs("div", {
103
+ className: "".concat(classPrefix, "-manage-bottom-item-right-item"),
104
+ children: ["\u4ECA\u65E5\u5730\u9762\u5E72\u51C0\u65F6\u957F\u5360\u6BD4", /*#__PURE__*/_jsx("div", {
105
+ className: "".concat(isDark ? 'white_blue' : 'blue'),
106
+ style: {
107
+ display: 'inline-block',
108
+ fontSize: 14,
109
+ marginLeft: 12
110
+ },
111
+ children: "".concat(cleanGroundDuration, "h/").concat(todayPastHour, "h")
112
+ }), /*#__PURE__*/_jsx("img", {
113
+ src: require("../../imgs/manage_bg".concat(isDark ? '' : '_light', ".png"))
114
+ })]
115
+ }), /*#__PURE__*/_jsxs("div", {
116
+ className: "".concat(classPrefix, "-manage-bottom-item-right-item"),
117
+ children: ["\u4ECA\u65E5\u65E0\u7206\u6876\u72B6\u6001\u65F6\u957F\u5360\u6BD4", /*#__PURE__*/_jsx("div", {
118
+ className: "".concat(isDark ? 'white_cyan' : 'cyan'),
119
+ style: {
120
+ display: 'inline-block',
121
+ fontSize: 14,
122
+ marginLeft: 12
123
+ },
124
+ children: "".concat(noOverflowDuration, "h/").concat(todayPastHour, "h")
125
+ }), /*#__PURE__*/_jsx("img", {
126
+ src: require("../../imgs/manage_bg".concat(isDark ? '' : '_light', ".png"))
127
+ })]
128
+ })]
129
+ })]
130
+ }), /*#__PURE__*/_jsxs("div", {
131
+ className: "".concat(classPrefix, "-manage-bottom-item"),
132
+ children: [/*#__PURE__*/_jsxs("div", {
133
+ className: "".concat(classPrefix, "-manage-bottom-item-left"),
134
+ children: ["\u516C\u4F17\u5BA3\u6559\u6210\u6548", /*#__PURE__*/_jsx("img", {
135
+ src: require("../../imgs/gzxjcx.png")
136
+ })]
137
+ }), /*#__PURE__*/_jsxs("div", {
138
+ className: "".concat(classPrefix, "-manage-bottom-item-right"),
139
+ children: [/*#__PURE__*/_jsxs("div", {
140
+ className: "".concat(classPrefix, "-manage-bottom-item-right-item"),
141
+ children: ["\u53A8\u4F59\u51C6\u786E\u7387", /*#__PURE__*/_jsxs("div", {
142
+ className: "".concat(isDark ? 'white_green' : 'green'),
143
+ style: {
144
+ display: 'inline-block',
145
+ fontSize: 14,
146
+ marginLeft: 12
147
+ },
148
+ children: [getPercent(data === null || data === void 0 ? void 0 : data.chuyuAccuracy), "%"]
149
+ }), /*#__PURE__*/_jsx("img", {
150
+ src: require("../../imgs/manage_bg".concat(isDark ? '' : '_light', ".png"))
151
+ })]
152
+ }), /*#__PURE__*/_jsxs("div", {
153
+ className: "".concat(classPrefix, "-manage-bottom-item-right-item"),
154
+ children: ["\u5C45\u6C11\u53C2\u4E0E\u7387", /*#__PURE__*/_jsxs("div", {
155
+ className: "".concat(isDark ? 'white_cyan' : 'cyan'),
156
+ style: {
157
+ display: 'inline-block',
158
+ fontSize: 14,
159
+ marginLeft: 12
160
+ },
161
+ children: [getPercent(data === null || data === void 0 ? void 0 : data.personParticipationRate), "%"]
162
+ }), /*#__PURE__*/_jsx("img", {
163
+ src: require("../../imgs/manage_bg".concat(isDark ? '' : '_light', ".png"))
164
+ })]
165
+ })]
166
+ })]
167
+ })]
168
+ })]
169
+ })
170
+ });
171
+ };
172
+ export default Manage;
@@ -0,0 +1,177 @@
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 { Progress } from 'antd';
14
+ import { sumBy } from 'lodash';
15
+ import groupBy from 'lodash/groupBy';
16
+ import { useState } from 'react';
17
+ import { VmLineCharts, VmPieCharts, VmWrapper } from "../../../_components";
18
+ import useSettings from "../../../_hooks/useSettings";
19
+ import { overViewService } from "../../api";
20
+ import { getFilterEcharts } from "../../config";
21
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
22
+ export function getMinHundred(num) {
23
+ return Math.ceil(num / 100) * 100 || 100;
24
+ }
25
+ export function getPercent(num) {
26
+ return num ? num * 100 : 0;
27
+ }
28
+ var RightBottom = function RightBottom(_ref) {
29
+ var classPrefix = _ref.classPrefix,
30
+ id = _ref.id,
31
+ serviceList = _ref.serviceList;
32
+ var _useSettings = useSettings(),
33
+ isDark = _useSettings.isDark;
34
+ var _useState = useState('efficiency'),
35
+ _useState2 = _slicedToArray(_useState, 2),
36
+ pieChartType = _useState2[0],
37
+ setPieChartType = _useState2[1];
38
+ // 事件类型分布
39
+ var alarmByTypeData = overViewService.useAlarmSumByType({
40
+ housingEstateId: id
41
+ });
42
+ // 近一周趋势
43
+ var alarmByDateData = overViewService.useAlarmSumByDate({
44
+ housingEstateId: id
45
+ });
46
+ // 工单处理效率
47
+ var efficiencyData = overViewService.useResolveEfficiency({
48
+ housingEstateId: id
49
+ });
50
+ var lineData = (getFilterEcharts(alarmByDateData, serviceList) || []).map(function (item) {
51
+ return {
52
+ name: item.alarmTypeName || '',
53
+ count: item.count || 0,
54
+ day: item.day || ''
55
+ };
56
+ });
57
+ var _pieData = getFilterEcharts(alarmByTypeData, serviceList) || [];
58
+ var strokeColor = {
59
+ alarm: {
60
+ '0%': '#FF575F',
61
+ '100%': '#F5222D'
62
+ },
63
+ normal: {
64
+ '0%': '#02E574',
65
+ '100%': '#0FB964'
66
+ }
67
+ };
68
+ return /*#__PURE__*/_jsx("div", {
69
+ className: "".concat(classPrefix, "-rightbottom"),
70
+ children: /*#__PURE__*/_jsx(VmWrapper, {
71
+ tabList: [{
72
+ label: 'AI工单处理',
73
+ key: 'efficiency'
74
+ }, {
75
+ label: '近一周趋势',
76
+ key: 'trend'
77
+ }],
78
+ activeKey: pieChartType,
79
+ onChangeTab: function onChangeTab(key) {
80
+ return setPieChartType(key);
81
+ },
82
+ children: pieChartType === 'efficiency' ? /*#__PURE__*/_jsxs(_Fragment, {
83
+ children: [/*#__PURE__*/_jsx(VmPieCharts, {
84
+ dataList: (_pieData === null || _pieData === void 0 ? void 0 : _pieData.map(function (item) {
85
+ return {
86
+ name: item.alarmTypeName || '--',
87
+ value: item.count
88
+ };
89
+ })) || [],
90
+ height: 120,
91
+ name: '事件类型',
92
+ title: "\u603B\u6570",
93
+ innerRadius: ['65%', '80%'],
94
+ outerRadius: ['80%', '95%'],
95
+ legendConfig: {
96
+ right: 0
97
+ },
98
+ spaceLength: 0,
99
+ total: sumBy(_pieData, 'count'),
100
+ unit: "\u8D77"
101
+ }), /*#__PURE__*/_jsx("div", {
102
+ className: "".concat(classPrefix, "-rightbottom-progress"),
103
+ children: [{
104
+ name: 'AI 工单关闭率',
105
+ value: getPercent(efficiencyData === null || efficiencyData === void 0 ? void 0 : efficiencyData.closeRate),
106
+ avg: getPercent(efficiencyData === null || efficiencyData === void 0 ? void 0 : efficiencyData.closeRateAverage),
107
+ unit: '%'
108
+ }, {
109
+ name: 'AI 工单处理时长',
110
+ value: ((efficiencyData === null || efficiencyData === void 0 ? void 0 : efficiencyData.resolveMinute) || 0) / ((efficiencyData === null || efficiencyData === void 0 ? void 0 : efficiencyData.resolveMinuteAverage) || 1),
111
+ avg: (efficiencyData === null || efficiencyData === void 0 ? void 0 : efficiencyData.resolveMinuteAverage) || 0,
112
+ unit: '分'
113
+ }, {
114
+ name: 'AI 工单及时关闭率',
115
+ value: getPercent(efficiencyData === null || efficiencyData === void 0 ? void 0 : efficiencyData.closeInTimeRate),
116
+ avg: getPercent(efficiencyData === null || efficiencyData === void 0 ? void 0 : efficiencyData.closeInTimeRateAverage),
117
+ unit: '%'
118
+ }].map(function (ele, index) {
119
+ return /*#__PURE__*/_jsxs("div", {
120
+ className: "".concat(classPrefix, "-rightbottom-progress-item"),
121
+ children: [/*#__PURE__*/_jsx("div", {
122
+ children: ele.name
123
+ }), /*#__PURE__*/_jsx(Progress, {
124
+ type: "dashboard",
125
+ percent: ele.value,
126
+ width: 120,
127
+ strokeWidth: 10,
128
+ gapDegree: 180,
129
+ strokeLinecap: "butt",
130
+ strokeColor: strokeColor[ele.value > ele.avg ? 'alarm' : 'normal'],
131
+ trailColor: isDark ? '#9B9FA8' : 'rgba(0, 0, 0, 0.1)',
132
+ showInfo: false
133
+ }), /*#__PURE__*/_jsxs("div", {
134
+ className: "".concat(classPrefix, "-rightbottom-progress-desc"),
135
+ children: ["\u5747\u503C", ele.avg, ele.unit, /*#__PURE__*/_jsxs("div", {
136
+ className: ele.value > ele.avg ? 'white_red' : 'white_green',
137
+ style: {
138
+ fontSize: 16
139
+ },
140
+ children: [ele.value, ele.unit]
141
+ })]
142
+ })]
143
+ }, index);
144
+ })
145
+ })]
146
+ }) : /*#__PURE__*/_jsx(VmLineCharts, _objectSpread(_objectSpread({}, transferLineData(lineData)), {}, {
147
+ unit: "\u8D77",
148
+ height: 238
149
+ }))
150
+ })
151
+ });
152
+ };
153
+ export default RightBottom;
154
+ export function transferLineData() {
155
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
156
+ var groupByThrowPoint = groupBy(data || [], 'name');
157
+ var groupByDay = groupBy(data || [], 'day');
158
+ var lineData = [];
159
+ // eslint-disable-next-line guard-for-in
160
+ for (var key in groupByThrowPoint) {
161
+ var item = groupByThrowPoint[key];
162
+ lineData.push({
163
+ name: item[0].name || '',
164
+ data: item.map(function (item) {
165
+ return item.count || 0;
166
+ })
167
+ });
168
+ }
169
+ // 去除日期中的年
170
+ var xAxis = Object.keys(groupByDay).map(function (item) {
171
+ return item.substring(5);
172
+ });
173
+ return {
174
+ xAxis: xAxis,
175
+ dataList: lineData
176
+ };
177
+ }