@vtx/modals2 5.0.5 → 5.0.7

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 (97) hide show
  1. package/lib/_components/vm-filter/style/index.less +4 -2
  2. package/lib/_components/vm-map/index.js +1 -1
  3. package/lib/_components/vm-pie-charts/index.js +8 -4
  4. package/lib/index.js +1 -0
  5. package/lib/vtx-car-modal/index.js +4 -1
  6. package/lib/vtx-default-modal/components/BaseInfo/index.js +3 -1
  7. package/lib/vtx-default-modal/index.js +9 -5
  8. package/lib/vtx-housing-estate-modal/components/Alarm/CYLJTF.js +61 -0
  9. package/lib/vtx-housing-estate-modal/components/Alarm/Distribute.js +7 -4
  10. package/lib/vtx-housing-estate-modal/components/Alarm/FLZL.js +44 -0
  11. package/lib/vtx-housing-estate-modal/components/Alarm/FLZL_TREND.js +104 -0
  12. package/lib/vtx-housing-estate-modal/components/Alarm/FSYZQS.js +13 -1
  13. package/lib/vtx-housing-estate-modal/components/Alarm/GDCLXL.js +4 -2
  14. package/lib/vtx-housing-estate-modal/components/Alarm/HTLJPH.js +162 -0
  15. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX.js +43 -0
  16. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_FB.js +183 -0
  17. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_GD.js +97 -0
  18. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_PIE.js +65 -0
  19. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_TREND.js +103 -0
  20. package/lib/vtx-housing-estate-modal/components/Alarm/index.js +13 -4
  21. package/lib/vtx-housing-estate-modal/components/Alarm/index.less +62 -0
  22. package/lib/vtx-housing-estate-modal/components/WGGS/index.js +12 -0
  23. package/lib/vtx-housing-estate-modal/imgs/BOTTLE.png +0 -0
  24. package/lib/vtx-housing-estate-modal/imgs/CAN.png +0 -0
  25. package/lib/vtx-housing-estate-modal/imgs/KRAFT_PAPER_BOX.png +0 -0
  26. package/lib/vtx-housing-estate-modal/imgs/NAPKIN.png +0 -0
  27. package/lib/vtx-housing-estate-modal/imgs/NAPKIN_light.png +0 -0
  28. package/lib/vtx-housing-estate-modal/imgs/PLASTIC_BAG.png +0 -0
  29. package/lib/vtx-housing-estate-modal/imgs/garbage_default.png +0 -0
  30. package/lib/vtx-staff-modal/index.js +4 -1
  31. package/lib/vtx-wr-modal/components/Appraise/assets/blue/bgR.png +0 -0
  32. package/lib/vtx-wr-modal/components/Appraise/assets/blue/bgY.png +0 -0
  33. package/lib/vtx-wr-modal/components/Appraise/assets/blue/pjcs.png +0 -0
  34. package/lib/vtx-wr-modal/components/Appraise/assets/blue/pjfs.png +0 -0
  35. package/lib/vtx-wr-modal/components/Appraise/assets/light/bgR.png +0 -0
  36. package/lib/vtx-wr-modal/components/Appraise/assets/light/bgY.png +0 -0
  37. package/lib/vtx-wr-modal/components/Appraise/assets/light/pjcs.png +0 -0
  38. package/lib/vtx-wr-modal/components/Appraise/assets/light/pjfs.png +0 -0
  39. package/lib/vtx-wr-modal/components/Appraise/index.js +153 -0
  40. package/lib/vtx-wr-modal/components/Appraise/index.less +74 -0
  41. package/lib/vtx-wr-modal/components/Base/Jbxx.js +243 -0
  42. package/lib/vtx-wr-modal/components/Base/Sjjg.js +86 -0
  43. package/lib/vtx-wr-modal/components/Base/assets/blue/aq.png +0 -0
  44. package/lib/vtx-wr-modal/components/Base/assets/blue/cq.png +0 -0
  45. package/lib/vtx-wr-modal/components/Base/assets/blue/dw.png +0 -0
  46. package/lib/vtx-wr-modal/components/Base/assets/blue/female.png +0 -0
  47. package/lib/vtx-wr-modal/components/Base/assets/blue/hasNursery.png +0 -0
  48. package/lib/vtx-wr-modal/components/Base/assets/blue/hasNurseryN.png +0 -0
  49. package/lib/vtx-wr-modal/components/Base/assets/blue/hasSign.png +0 -0
  50. package/lib/vtx-wr-modal/components/Base/assets/blue/hasSignN.png +0 -0
  51. package/lib/vtx-wr-modal/components/Base/assets/blue/hasThird.png +0 -0
  52. package/lib/vtx-wr-modal/components/Base/assets/blue/hasThirdN.png +0 -0
  53. package/lib/vtx-wr-modal/components/Base/assets/blue/lhq.png +0 -0
  54. package/lib/vtx-wr-modal/components/Base/assets/blue/male.png +0 -0
  55. package/lib/vtx-wr-modal/components/Base/assets/blue/rll.png +0 -0
  56. package/lib/vtx-wr-modal/components/Base/assets/blue/sd.png +0 -0
  57. package/lib/vtx-wr-modal/components/Base/assets/blue/ty.png +0 -0
  58. package/lib/vtx-wr-modal/components/Base/assets/blue/wd.png +0 -0
  59. package/lib/vtx-wr-modal/components/Base/assets/blue/wza.png +0 -0
  60. package/lib/vtx-wr-modal/components/Base/assets/blue/xbd.png +0 -0
  61. package/lib/vtx-wr-modal/components/Base/assets/blue/ydl.png +0 -0
  62. package/lib/vtx-wr-modal/components/Base/assets/blue/ysl.png +0 -0
  63. package/lib/vtx-wr-modal/components/Base/assets/blue/zw.png +0 -0
  64. package/lib/vtx-wr-modal/components/Base/assets/light/aq.png +0 -0
  65. package/lib/vtx-wr-modal/components/Base/assets/light/cq.png +0 -0
  66. package/lib/vtx-wr-modal/components/Base/assets/light/dw.png +0 -0
  67. package/lib/vtx-wr-modal/components/Base/assets/light/female.png +0 -0
  68. package/lib/vtx-wr-modal/components/Base/assets/light/hasNursery.png +0 -0
  69. package/lib/vtx-wr-modal/components/Base/assets/light/hasNurseryN.png +0 -0
  70. package/lib/vtx-wr-modal/components/Base/assets/light/hasSign.png +0 -0
  71. package/lib/vtx-wr-modal/components/Base/assets/light/hasSignN.png +0 -0
  72. package/lib/vtx-wr-modal/components/Base/assets/light/hasThird.png +0 -0
  73. package/lib/vtx-wr-modal/components/Base/assets/light/hasThirdN.png +0 -0
  74. package/lib/vtx-wr-modal/components/Base/assets/light/lhq.png +0 -0
  75. package/lib/vtx-wr-modal/components/Base/assets/light/male.png +0 -0
  76. package/lib/vtx-wr-modal/components/Base/assets/light/rll.png +0 -0
  77. package/lib/vtx-wr-modal/components/Base/assets/light/sd.png +0 -0
  78. package/lib/vtx-wr-modal/components/Base/assets/light/ty.png +0 -0
  79. package/lib/vtx-wr-modal/components/Base/assets/light/wd.png +0 -0
  80. package/lib/vtx-wr-modal/components/Base/assets/light/wza.png +0 -0
  81. package/lib/vtx-wr-modal/components/Base/assets/light/xbd.png +0 -0
  82. package/lib/vtx-wr-modal/components/Base/assets/light/ydl.png +0 -0
  83. package/lib/vtx-wr-modal/components/Base/assets/light/ysl.png +0 -0
  84. package/lib/vtx-wr-modal/components/Base/assets/light/zw.png +0 -0
  85. package/lib/vtx-wr-modal/components/Base/index.js +125 -0
  86. package/lib/vtx-wr-modal/components/Base/index.less +327 -0
  87. package/lib/vtx-wr-modal/components/Score/assets/blue/df.png +0 -0
  88. package/lib/vtx-wr-modal/components/Score/assets/blue/rs.png +0 -0
  89. package/lib/vtx-wr-modal/components/Score/assets/light/df.png +0 -0
  90. package/lib/vtx-wr-modal/components/Score/assets/light/rs.png +0 -0
  91. package/lib/vtx-wr-modal/components/Score/index.js +111 -0
  92. package/lib/vtx-wr-modal/components/Score/index.less +68 -0
  93. package/lib/vtx-wr-modal/components/index.js +4 -0
  94. package/lib/vtx-wr-modal/index.js +40 -0
  95. package/lib/vtx-wr-modal/style/index.js +4 -0
  96. package/lib/vtx-wr-modal/style/index.less +1 -0
  97. package/package.json +1 -1
@@ -65,7 +65,7 @@
65
65
  .ant-select-selection-placeholder {
66
66
  color: var(--color);
67
67
  }
68
-
68
+
69
69
  &:hover {
70
70
  .ant-select-selector {
71
71
  border: 1px solid var(--hover-color) !important;
@@ -131,7 +131,9 @@
131
131
  .ant-picker-panel {
132
132
  border-bottom: 1px solid #95fff933 !important;
133
133
  }
134
-
134
+ .ant-picker-cell-disabled .ant-picker-cell-inner {
135
+ color: #c2c2c2b3 !important;
136
+ }
135
137
  .ant-picker-footer {
136
138
  border-top: 1px solid #95fff933 !important;
137
139
  }
@@ -137,7 +137,7 @@ export default function VmOlMap(_ref) {
137
137
  var points = formatData(mapPoints);
138
138
  var polygons = formatData(mapPolygons, geometryType);
139
139
  function fitView() {
140
- if (mapRef.current && ((mapPoints === null || mapPoints === void 0 ? void 0 : mapPoints.length) > 0 || (mapPolygons === null || mapPolygons === void 0 ? void 0 : mapPolygons.length) > 0)) {
140
+ if (mapRef.current.hasOwnProperty('tk') && ((mapPoints === null || mapPoints === void 0 ? void 0 : mapPoints.length) > 0 || (mapPolygons === null || mapPolygons === void 0 ? void 0 : mapPolygons.length) > 0)) {
141
141
  var _mapRef$current, _polygons$data, _points$data;
142
142
  (_mapRef$current = mapRef.current) === null || _mapRef$current === void 0 || _mapRef$current.fitView({
143
143
  geometryInfo: ((polygons === null || polygons === void 0 || (_polygons$data = polygons.data) === null || _polygons$data === void 0 ? void 0 : _polygons$data[0]) || (points === null || points === void 0 || (_points$data = points.data) === null || _points$data === void 0 ? void 0 : _points$data[0])).geometryInfo
@@ -33,14 +33,18 @@ var PieCharts = function PieCharts(_ref) {
33
33
  _ref$outerRadius = _ref.outerRadius,
34
34
  outerRadius = _ref$outerRadius === void 0 ? ['45%', '50%'] : _ref$outerRadius,
35
35
  _ref$center = _ref.center,
36
- center = _ref$center === void 0 ? null : _ref$center;
36
+ center = _ref$center === void 0 ? null : _ref$center,
37
+ _ref$colors = _ref.colors,
38
+ colors = _ref$colors === void 0 ? null : _ref$colors,
39
+ _ref$colors2 = _ref.colors2,
40
+ colors2 = _ref$colors2 === void 0 ? null : _ref$colors2;
37
41
  var _useSettings = useSettings(),
38
42
  chartFontColor = _useSettings.chartFontColor,
39
43
  isDark = _useSettings.isDark;
40
- var colorList = ['#36A1FF', '#53CB74', '#FABB43', '#FF8746', '#31C5E9', '#6FD7C7', '#B894F9', '#fc4f66', '#5d75ff'];
41
- var colorList2 = ['#e1f1ff', '#e5f7ea', '#fef5e3', '#ffede3', '#e0f6fc', '#e9f9f7', '#f4effe', '#ffe5e8', '#e7eaff'];
44
+ var colorList = colors || ['#36A1FF', '#53CB74', '#FABB43', '#FF8746', '#31C5E9', '#6FD7C7', '#B894F9', '#fc4f66', '#5d75ff'];
45
+ var colorList2 = colors2 || ['#e1f1ff', '#e5f7ea', '#fef5e3', '#ffede3', '#e0f6fc', '#e9f9f7', '#f4effe', '#ffe5e8', '#e7eaff'];
42
46
  if (isDark) {
43
- colorList2 = ['#0d4e7e', '#115368', '#2b505d', '#2b465c', '#0c5176', '#155472', '#214a7a', '#2b4166', '#14487d'];
47
+ colorList2 = colors2 || ['#0d4e7e', '#115368', '#2b505d', '#2b465c', '#0c5176', '#155472', '#214a7a', '#2b4166', '#14487d'];
44
48
  }
45
49
  var option = {
46
50
  tooltip: {
package/lib/index.js CHANGED
@@ -9,6 +9,7 @@ export { default as VtxRoadModal } from "./vtx-road-modal";
9
9
  export { default as VtxZzzModal } from "./vtx-zzz-modal";
10
10
  export { default as VtxShxqModal } from "./vtx-shxq-modal";
11
11
  export { default as VtxTfdModal } from "./vtx-tfd-modal";
12
+ export { default as VtxWrModal } from "./vtx-wr-modal";
12
13
  export { default as VtxCpModal } from "./vtx-cp-modal";
13
14
  export { default as VtxCcUnitModal } from "./vtx-cc-unit-modal";
14
15
  export { default as VtxRestaurantModal } from "./vtx-restaurant-modal";
@@ -91,7 +91,9 @@ var VtxCarModal = function VtxCarModal(props) {
91
91
  _props$defaultCode = props.defaultCode,
92
92
  defaultCode = _props$defaultCode === void 0 ? '' : _props$defaultCode,
93
93
  _props$iframeUrl = props.iframeUrl,
94
- iframeUrl = _props$iframeUrl === void 0 ? '' : _props$iframeUrl;
94
+ iframeUrl = _props$iframeUrl === void 0 ? '' : _props$iframeUrl,
95
+ _props$width = props.width,
96
+ width = _props$width === void 0 ? null : _props$width;
95
97
  var _BaseService$useBaseI = BaseService.useBaseInfo(id),
96
98
  detail = _BaseService$useBaseI.detail,
97
99
  info = _BaseService$useBaseI.info;
@@ -250,6 +252,7 @@ var VtxCarModal = function VtxCarModal(props) {
250
252
  children: /*#__PURE__*/_jsx(VtxBaseModal, {
251
253
  title: title,
252
254
  subTitle: '',
255
+ width: width,
253
256
  id: id,
254
257
  type: "car",
255
258
  source: source,
@@ -44,7 +44,9 @@ var BaseInfo = function BaseInfo(props) {
44
44
  return {
45
45
  id: "mapPoints_".concat(index),
46
46
  lng: item[0],
47
- lat: item[1]
47
+ lat: item[1],
48
+ icon: info === null || info === void 0 ? void 0 : info.gisIconCode,
49
+ color: info === null || info === void 0 ? void 0 : info.gisIconColor
48
50
  };
49
51
  })) || [];
50
52
  }
@@ -62,11 +62,15 @@ var VtxDefaultModal = function VtxDefaultModal(props) {
62
62
  return ele.key !== 'metering';
63
63
  });
64
64
  }
65
- // if (tabsList.findIndex((ele) => ele.key === 'video') > -1) {
66
- // if (channels?.length < 1) {
67
- // tabsList = tabsList.filter((ele) => ele.key !== 'video');
68
- // }
69
- // }
65
+ if (tabsList.findIndex(function (ele) {
66
+ return ele.key === 'video';
67
+ }) > -1) {
68
+ if ((channels === null || channels === void 0 ? void 0 : channels.length) < 1) {
69
+ tabsList = tabsList.filter(function (ele) {
70
+ return ele.key !== 'video';
71
+ });
72
+ }
73
+ }
70
74
  return tabsList;
71
75
  }, [JSON.stringify(tabsData), JSON.stringify(channels), JSON.stringify(detail)]);
72
76
  var param = {
@@ -0,0 +1,61 @@
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 dayjs from 'dayjs';
8
+ import { useState } from 'react';
9
+ import { VmFilter, VmPieCharts, VmTitle } from "../../../_components";
10
+ import { alarmService } from "../../api";
11
+ import "./index.less";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ var FSSD = function FSSD(_ref) {
14
+ var _ref$classPrefix = _ref.classPrefix,
15
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
16
+ id = _ref.id;
17
+ var _useState = useState(dayjs()),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ times = _useState2[0],
20
+ setTimes = _useState2[1];
21
+ var throwPercent = alarmService.useChuyuFail({
22
+ housingEstateId: id,
23
+ beginTime: times.format('YYYY-MM-DD 00:00:00'),
24
+ endTime: times.format('YYYY-MM-DD 23:59:59')
25
+ });
26
+ return /*#__PURE__*/_jsxs("div", {
27
+ children: [/*#__PURE__*/_jsxs("div", {
28
+ className: "".concat(classPrefix, "-row"),
29
+ children: [/*#__PURE__*/_jsx(VmTitle, {
30
+ title: "\u53A8\u4F59\u5783\u573E\u6295\u653E\u5206\u6790",
31
+ border: false
32
+ }), /*#__PURE__*/_jsx(VmFilter.VMDatePicker, {
33
+ value: times,
34
+ onChange: function onChange(value) {
35
+ return setTimes(value);
36
+ }
37
+ })]
38
+ }), /*#__PURE__*/_jsx(VmPieCharts, {
39
+ dataList: [{
40
+ name: '未破袋投放',
41
+ value: (throwPercent === null || throwPercent === void 0 ? void 0 : throwPercent.trashBagCount) || 0
42
+ }, {
43
+ name: '混合投放',
44
+ value: (throwPercent === null || throwPercent === void 0 ? void 0 : throwPercent.mixedThrowCount) || 0
45
+ }],
46
+ title: "\u603B\u6570(\u6B21)",
47
+ total: (throwPercent === null || throwPercent === void 0 ? void 0 : throwPercent.trashBagCount) + (throwPercent === null || throwPercent === void 0 ? void 0 : throwPercent.mixedThrowCount) + 0,
48
+ name: "\u53A8\u4F59\u5783\u573E\u6295\u653E"
49
+ // loading={loading}
50
+ ,
51
+ unit: "\u6B21",
52
+ height: 150,
53
+ legendConfig: {
54
+ right: '12%'
55
+ },
56
+ innerRadius: ['65%', '85%'],
57
+ outerRadius: ['85%', '95%']
58
+ })]
59
+ });
60
+ };
61
+ export default FSSD;
@@ -6,6 +6,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
6
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
7
  import ReactEcharts from 'echarts-for-react';
8
8
  import groupBy from 'lodash/groupBy';
9
+ import useSettings from "../../../_hooks/useSettings";
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
10
11
  var xAxis = _toConsumableArray(new Array(24)).map(function (_, index) {
11
12
  return add0(index);
@@ -31,7 +32,7 @@ function transferData(data) {
31
32
  chartData: chartData
32
33
  };
33
34
  }
34
- var getGaugeOption = function getGaugeOption(_ref) {
35
+ var getGaugeOption = function getGaugeOption(_ref, isDark) {
35
36
  var _ref$data = _ref.data,
36
37
  data = _ref$data === void 0 ? [] : _ref$data;
37
38
  var _transferData = transferData(data),
@@ -67,7 +68,7 @@ var getGaugeOption = function getGaugeOption(_ref) {
67
68
  },
68
69
  axisLabel: {
69
70
  interval: 0,
70
- color: '#fff'
71
+ color: isDark ? '#fff' : '#000'
71
72
  },
72
73
  axisTick: {
73
74
  show: false
@@ -80,7 +81,7 @@ var getGaugeOption = function getGaugeOption(_ref) {
80
81
  show: true
81
82
  },
82
83
  axisLabel: {
83
- color: '#fff',
84
+ color: isDark ? '#fff' : '#000',
84
85
  interval: 0
85
86
  },
86
87
  axisTick: {
@@ -119,8 +120,10 @@ var getGaugeOption = function getGaugeOption(_ref) {
119
120
  };
120
121
  };
121
122
  var Distribute = function Distribute(props) {
123
+ var _useSettings = useSettings(),
124
+ isDark = _useSettings.isDark;
122
125
  return /*#__PURE__*/_jsx(ReactEcharts, {
123
- option: getGaugeOption(props),
126
+ option: getGaugeOption(props, isDark),
124
127
  style: {
125
128
  height: '100%'
126
129
  }
@@ -0,0 +1,44 @@
1
+ import { Col, Row } from 'antd';
2
+ import CYLJTF from "./CYLJTF";
3
+ import FLZL_TREND from "./FLZL_TREND";
4
+ import GDCLXL from "./GDCLXL";
5
+ import HTLJPH from "./HTLJPH";
6
+ import "./index.less";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ var FLZLFX = function FLZLFX(_ref) {
9
+ var _ref$classPrefix = _ref.classPrefix,
10
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
11
+ id = _ref.id;
12
+ return /*#__PURE__*/_jsx("div", {
13
+ children: /*#__PURE__*/_jsxs(Row, {
14
+ gutter: [128, 24],
15
+ children: [/*#__PURE__*/_jsx(Col, {
16
+ span: 12,
17
+ children: /*#__PURE__*/_jsx(GDCLXL, {
18
+ classPrefix: classPrefix,
19
+ id: id,
20
+ businessPackage: "THROW"
21
+ })
22
+ }), /*#__PURE__*/_jsx(Col, {
23
+ span: 12,
24
+ children: /*#__PURE__*/_jsx(CYLJTF, {
25
+ classPrefix: classPrefix,
26
+ id: id
27
+ })
28
+ }), /*#__PURE__*/_jsx(Col, {
29
+ span: 12,
30
+ children: /*#__PURE__*/_jsx(HTLJPH, {
31
+ classPrefix: classPrefix,
32
+ id: id
33
+ })
34
+ }), /*#__PURE__*/_jsx(Col, {
35
+ span: 12,
36
+ children: /*#__PURE__*/_jsx(FLZL_TREND, {
37
+ classPrefix: classPrefix,
38
+ id: id
39
+ })
40
+ })]
41
+ })
42
+ });
43
+ };
44
+ export default FLZLFX;
@@ -0,0 +1,104 @@
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 dayjs from 'dayjs';
14
+ import groupBy from 'lodash/groupBy';
15
+ import { useState } from 'react';
16
+ import { VmFilter, VmLineCharts, VmTitle } from "../../../_components";
17
+ import { overViewService } from "../../api";
18
+ import "./index.less";
19
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
+ var TREND = function TREND(_ref) {
21
+ var _ref$classPrefix = _ref.classPrefix,
22
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
23
+ id = _ref.id;
24
+ var _useState = useState([dayjs().subtract(6, 'days'), dayjs()]),
25
+ _useState2 = _slicedToArray(_useState, 2),
26
+ times = _useState2[0],
27
+ setTimes = _useState2[1];
28
+ // 近一周趋势
29
+ var alarmByDateData = overViewService.useAlarmSumByDate({
30
+ housingEstateId: id,
31
+ businessPackage: 'THROW',
32
+ beginTime: times[0].format('YYYY-MM-DD 00:00:00'),
33
+ endTime: times[1].format('YYYY-MM-DD 23:59:59')
34
+ });
35
+ var lineData = (alarmByDateData || []).map(function (item) {
36
+ return {
37
+ name: item.alarmTypeName || '',
38
+ count: item.count || 0,
39
+ day: item.day || ''
40
+ };
41
+ });
42
+ var disabledDate = function disabledDate(current) {
43
+ var _times = _slicedToArray(times, 2),
44
+ startDate = _times[0],
45
+ endDate = _times[1];
46
+ if (!startDate || !endDate) {
47
+ return false;
48
+ }
49
+ var tooLate = startDate && current.diff(startDate, 'days') > 7;
50
+ var tooEarly = endDate && endDate.diff(current, 'days') > 7;
51
+ return !!tooEarly || !!tooLate;
52
+ };
53
+ return /*#__PURE__*/_jsxs("div", {
54
+ children: [/*#__PURE__*/_jsxs("div", {
55
+ className: "".concat(classPrefix, "-row"),
56
+ children: [/*#__PURE__*/_jsx(VmTitle, {
57
+ title: "\u53D1\u751F\u6B21\u6570\u4E00\u5468\u8D8B\u52BF",
58
+ border: false
59
+ }), /*#__PURE__*/_jsx(VmFilter.VMRangePicker, {
60
+ value: times,
61
+ onChange: function onChange(dates) {
62
+ return dates && setTimes(dates);
63
+ },
64
+ disabledDate: disabledDate,
65
+ style: {
66
+ width: '280px'
67
+ }
68
+ })]
69
+ }), /*#__PURE__*/_jsx(VmLineCharts, _objectSpread(_objectSpread({
70
+ height: "250px"
71
+ }, transferLineData(lineData)), {}, {
72
+ // loading={loading}
73
+ unit: "\u6B21",
74
+ legendOption: {
75
+ width: '95%',
76
+ top: 24
77
+ }
78
+ }))]
79
+ });
80
+ };
81
+ export default TREND;
82
+ var transferLineData = function transferLineData(data) {
83
+ var groupByThrowPoint = groupBy(data || [], 'name');
84
+ var groupByDay = groupBy(data || [], 'day');
85
+ var lineData = [];
86
+ // eslint-disable-next-line guard-for-in
87
+ for (var key in groupByThrowPoint) {
88
+ var item = groupByThrowPoint[key];
89
+ lineData.push({
90
+ name: item[0].name || '',
91
+ data: item.map(function (item) {
92
+ return item.count || 0;
93
+ })
94
+ });
95
+ }
96
+ // 去除日期中的年
97
+ var xAxis = Object.keys(groupByDay).map(function (item) {
98
+ return item.substring(5);
99
+ });
100
+ return {
101
+ xAxis: xAxis,
102
+ dataList: lineData
103
+ };
104
+ };
@@ -37,6 +37,17 @@ var FSCSFB = function FSCSFB(_ref) {
37
37
  name: ele.alarmTypeName
38
38
  });
39
39
  }));
40
+ var disabledDate = function disabledDate(current) {
41
+ var _times = _slicedToArray(times, 2),
42
+ startDate = _times[0],
43
+ endDate = _times[1];
44
+ if (!startDate || !endDate) {
45
+ return false;
46
+ }
47
+ var tooLate = startDate && current.diff(startDate, 'days') > 7;
48
+ var tooEarly = endDate && endDate.diff(current, 'days') > 7;
49
+ return !!tooEarly || !!tooLate;
50
+ };
40
51
  return /*#__PURE__*/_jsxs("div", {
41
52
  children: [/*#__PURE__*/_jsxs("div", {
42
53
  className: "".concat(classPrefix, "-row"),
@@ -51,7 +62,8 @@ var FSCSFB = function FSCSFB(_ref) {
51
62
  return;
52
63
  }
53
64
  setTimes(date);
54
- }
65
+ },
66
+ disabledDate: disabledDate
55
67
  })]
56
68
  }), /*#__PURE__*/_jsx(VmLineCharts, {
57
69
  xAxis: (data === null || data === void 0 ? void 0 : data.xAxis) || [],
@@ -16,7 +16,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  var GDCLXL = function GDCLXL(_ref) {
17
17
  var _ref$classPrefix = _ref.classPrefix,
18
18
  classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
19
- id = _ref.id;
19
+ id = _ref.id,
20
+ _ref$businessPackage = _ref.businessPackage,
21
+ businessPackage = _ref$businessPackage === void 0 ? 'LANDING' : _ref$businessPackage;
20
22
  var _useSettings = useSettings(),
21
23
  isDark = _useSettings.isDark;
22
24
  var _useState = useState(dayjs()),
@@ -26,7 +28,7 @@ var GDCLXL = function GDCLXL(_ref) {
26
28
  // 工单处理效率
27
29
  var efficiencyData = overViewService.useResolveEfficiency({
28
30
  housingEstateId: id,
29
- businessPackage: 'LANDING',
31
+ businessPackage: businessPackage,
30
32
  beginTime: date.format('YYYY-MM-DD 00:00:00'),
31
33
  endTime: date.format('YYYY-MM-DD 23:59:59')
32
34
  });
@@ -0,0 +1,162 @@
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 { Radio } from 'antd';
8
+ import dayjs from 'dayjs';
9
+ import EChartsReact from 'echarts-for-react';
10
+ import { useState } from 'react';
11
+ import { VmEmpty, VmTitle } from "../../../_components";
12
+ import { alarmService } from "../../api";
13
+ import "./index.less";
14
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
15
+ var symbols = {
16
+ 'PLASTIC-BAG': require("../../imgs/PLASTIC_BAG.png"),
17
+ NAPKIN: require("../../imgs/NAPKIN.png"),
18
+ BOTTLE: require("../../imgs/BOTTLE.png"),
19
+ CAN: require("../../imgs/CAN.png"),
20
+ KRAFT_PAPER_BOX: require("../../imgs/KRAFT_PAPER_BOX.png"),
21
+ DEFAULT: require("../../imgs/garbage_default.png")
22
+ };
23
+ var HTLJPH = function HTLJPH(_ref) {
24
+ var _ref$classPrefix = _ref.classPrefix,
25
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
26
+ id = _ref.id;
27
+ var _useState = useState('current'),
28
+ _useState2 = _slicedToArray(_useState, 2),
29
+ currentTabKey = _useState2[0],
30
+ setCurrentTabKey = _useState2[1];
31
+ var thisWeek = currentTabKey === 'current';
32
+ var getPictorialBarOption = function getPictorialBarOption(_ref2) {
33
+ var _ref2$title = _ref2.title,
34
+ title = _ref2$title === void 0 ? '本周' : _ref2$title,
35
+ _ref2$data = _ref2.data,
36
+ data = _ref2$data === void 0 ? [] : _ref2$data;
37
+ return {
38
+ tooltip: {
39
+ trigger: 'axis',
40
+ axisPointer: {
41
+ type: 'shadow'
42
+ }
43
+ },
44
+ grid: {
45
+ containLabel: true,
46
+ left: 20
47
+ },
48
+ yAxis: {
49
+ data: data.map(function (item) {
50
+ return item.name;
51
+ }),
52
+ inverse: true,
53
+ axisLine: {
54
+ show: false
55
+ },
56
+ axisTick: {
57
+ show: false
58
+ },
59
+ axisLabel: {
60
+ margin: 30,
61
+ fontSize: 14
62
+ },
63
+ axisPointer: {
64
+ label: {
65
+ show: true,
66
+ margin: 30
67
+ }
68
+ }
69
+ },
70
+ xAxis: {
71
+ splitLine: {
72
+ show: false
73
+ },
74
+ axisLabel: {
75
+ show: false
76
+ },
77
+ axisTick: {
78
+ show: false
79
+ },
80
+ axisLine: {
81
+ show: false
82
+ }
83
+ },
84
+ animationDurationUpdate: 500,
85
+ series: [{
86
+ name: title,
87
+ id: 'bar1',
88
+ type: 'pictorialBar',
89
+ label: {
90
+ show: true,
91
+ position: 'right',
92
+ offset: [10, 0],
93
+ fontSize: 16,
94
+ color: '#fff'
95
+ },
96
+ symbolRepeat: true,
97
+ symbolSize: ['80%', '60%'],
98
+ barCategoryGap: '40%',
99
+ // universalTransition: {
100
+ // enabled: true,
101
+ // delay: function (idx, total) {
102
+ // return (idx / total) * 1000;
103
+ // }
104
+ // },
105
+ data: data.map(function (item) {
106
+ return {
107
+ value: item.count,
108
+ symbol: "image://".concat(item.symbol)
109
+ };
110
+ })
111
+ }]
112
+ };
113
+ };
114
+ // 混投垃圾排行
115
+ var mixRank = alarmService.useMixSumRank({
116
+ housingEstateId: id,
117
+ beginTime: thisWeek ? dayjs().startOf('days').format('YYYY-MM-DD 00:00:00') : dayjs().subtract(1, 'weeks').startOf('days').format('YYYY-MM-DD 00:00:00'),
118
+ endTime: thisWeek ? dayjs().endOf('weeks').format('YYYY-MM-DD 23:59:59') : dayjs().subtract(1, 'weeks').endOf('weeks').format('YYYY-MM-DD 23:59:59')
119
+ });
120
+ var barData = (mixRank || []).map(function (item) {
121
+ return {
122
+ name: item.garbageTypeName,
123
+ count: thisWeek ? item.thisWeekCount : item.lastWeekCount,
124
+ symbol: symbols[item.garbageTypeCode] || symbols.DEFAULT
125
+ };
126
+ });
127
+ return /*#__PURE__*/_jsxs(_Fragment, {
128
+ children: [/*#__PURE__*/_jsxs("div", {
129
+ className: "".concat(classPrefix, "-row"),
130
+ children: [/*#__PURE__*/_jsx(VmTitle, {
131
+ title: "\u6DF7\u6295\u5783\u573E\u6392\u884C",
132
+ border: false
133
+ }), /*#__PURE__*/_jsx("div", {
134
+ className: "".concat(classPrefix, "-btns"),
135
+ children: /*#__PURE__*/_jsxs(Radio.Group, {
136
+ value: currentTabKey,
137
+ onChange: function onChange(e) {
138
+ return setCurrentTabKey(e.target.value);
139
+ },
140
+ children: [/*#__PURE__*/_jsx(Radio.Button, {
141
+ value: "current",
142
+ children: "\u672C\u5468"
143
+ }), /*#__PURE__*/_jsx(Radio.Button, {
144
+ value: "last",
145
+ children: "\u4E0A\u5468"
146
+ })]
147
+ })
148
+ })]
149
+ }), /*#__PURE__*/_jsx("div", {
150
+ className: "".concat(classPrefix, "-overflow-rank"),
151
+ children: !(barData !== null && barData !== void 0 && barData.length) ? /*#__PURE__*/_jsx(VmEmpty, {
152
+ type: "NO_CHART"
153
+ }) : /*#__PURE__*/_jsx(EChartsReact, {
154
+ option: getPictorialBarOption({
155
+ title: thisWeek ? '本周' : '上周',
156
+ data: barData
157
+ })
158
+ })
159
+ })]
160
+ });
161
+ };
162
+ export default HTLJPH;
@@ -0,0 +1,43 @@
1
+ import { Col, Row } from 'antd';
2
+ import MYFX_TREND from "./MYFX_TREND";
3
+ import MYFX_FB from "./MYFX_FB";
4
+ import MYFX_GD from "./MYFX_GD";
5
+ import MYFX_PIE from "./MYFX_PIE";
6
+ import "./index.less";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ var FLZLFX = function FLZLFX(_ref) {
9
+ var _ref$classPrefix = _ref.classPrefix,
10
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
11
+ id = _ref.id;
12
+ return /*#__PURE__*/_jsx("div", {
13
+ children: /*#__PURE__*/_jsxs(Row, {
14
+ gutter: [128, 24],
15
+ children: [/*#__PURE__*/_jsx(Col, {
16
+ span: 12,
17
+ children: /*#__PURE__*/_jsx(MYFX_GD, {
18
+ classPrefix: classPrefix,
19
+ id: id
20
+ })
21
+ }), /*#__PURE__*/_jsx(Col, {
22
+ span: 12,
23
+ children: /*#__PURE__*/_jsx(MYFX_PIE, {
24
+ classPrefix: classPrefix,
25
+ id: id
26
+ })
27
+ }), /*#__PURE__*/_jsx(Col, {
28
+ span: 12,
29
+ children: /*#__PURE__*/_jsx(MYFX_FB, {
30
+ classPrefix: classPrefix,
31
+ id: id
32
+ })
33
+ }), /*#__PURE__*/_jsx(Col, {
34
+ span: 12,
35
+ children: /*#__PURE__*/_jsx(MYFX_TREND, {
36
+ classPrefix: classPrefix,
37
+ id: id
38
+ })
39
+ })]
40
+ })
41
+ });
42
+ };
43
+ export default FLZLFX;