@vtx/modals2 5.0.9 → 5.0.10

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 (119) hide show
  1. package/lib/index.js +2 -1
  2. package/lib/vtx-base-modal/index.js +15 -2
  3. package/lib/vtx-housing-estate-modal/components/Sbzj/index.js +139 -0
  4. package/lib/vtx-housing-estate-modal/components/Sbzj/index.less +73 -0
  5. package/lib/vtx-housing-estate-modal/components/index.js +1 -0
  6. package/lib/vtx-housing-estate-modal/imgs/aibox.png +0 -0
  7. package/lib/vtx-housing-estate-modal/imgs/aibox_light.png +0 -0
  8. package/lib/vtx-housing-estate-modal/imgs/android.png +0 -0
  9. package/lib/vtx-housing-estate-modal/imgs/android_light.png +0 -0
  10. package/lib/vtx-housing-estate-modal/imgs/sbzj_tfd.png +0 -0
  11. package/lib/vtx-housing-estate-modal/imgs/sbzj_tfd_light.png +0 -0
  12. package/lib/vtx-housing-estate-modal/imgs/sbzj_video.png +0 -0
  13. package/lib/vtx-housing-estate-modal/imgs/sbzj_video_light.png +0 -0
  14. package/lib/vtx-sdyd-tfd-modal/api.js +575 -0
  15. package/lib/vtx-sdyd-tfd-modal/components/Alarm/CYLJTF.js +61 -0
  16. package/lib/vtx-sdyd-tfd-modal/components/Alarm/Distribute.js +132 -0
  17. package/lib/vtx-sdyd-tfd-modal/components/Alarm/FLZL.js +44 -0
  18. package/lib/vtx-sdyd-tfd-modal/components/Alarm/FLZL_TREND.js +104 -0
  19. package/lib/vtx-sdyd-tfd-modal/components/Alarm/FSCSFB.js +67 -0
  20. package/lib/vtx-sdyd-tfd-modal/components/Alarm/FSSD.js +65 -0
  21. package/lib/vtx-sdyd-tfd-modal/components/Alarm/FSYZQS.js +79 -0
  22. package/lib/vtx-sdyd-tfd-modal/components/Alarm/GDCLXL.js +111 -0
  23. package/lib/vtx-sdyd-tfd-modal/components/Alarm/HTLJPH.js +162 -0
  24. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX.js +43 -0
  25. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_FB.js +183 -0
  26. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_GD.js +97 -0
  27. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_PIE.js +65 -0
  28. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_TREND.js +103 -0
  29. package/lib/vtx-sdyd-tfd-modal/components/Alarm/index.js +104 -0
  30. package/lib/vtx-sdyd-tfd-modal/components/Alarm/index.less +116 -0
  31. package/lib/vtx-sdyd-tfd-modal/components/OverView/Hot.js +179 -0
  32. package/lib/vtx-sdyd-tfd-modal/components/OverView/Left.js +123 -0
  33. package/lib/vtx-sdyd-tfd-modal/components/OverView/Manage.js +172 -0
  34. package/lib/vtx-sdyd-tfd-modal/components/OverView/RightBottom.js +177 -0
  35. package/lib/vtx-sdyd-tfd-modal/components/OverView/index.js +56 -0
  36. package/lib/vtx-sdyd-tfd-modal/components/OverView/index.less +242 -0
  37. package/lib/vtx-sdyd-tfd-modal/components/Sbzj/index.js +138 -0
  38. package/lib/vtx-sdyd-tfd-modal/components/Sbzj/index.less +78 -0
  39. package/lib/vtx-sdyd-tfd-modal/components/TFRD/index.js +133 -0
  40. package/lib/vtx-sdyd-tfd-modal/components/TFRD/index.less +12 -0
  41. package/lib/vtx-sdyd-tfd-modal/components/WGGS/Content.js +63 -0
  42. package/lib/vtx-sdyd-tfd-modal/components/WGGS/index.js +61 -0
  43. package/lib/vtx-sdyd-tfd-modal/components/WGGS/index.less +49 -0
  44. package/lib/vtx-sdyd-tfd-modal/components/WGXW/Content.js +117 -0
  45. package/lib/vtx-sdyd-tfd-modal/components/WGXW/index.js +52 -0
  46. package/lib/vtx-sdyd-tfd-modal/components/WGXW/index.less +97 -0
  47. package/lib/vtx-sdyd-tfd-modal/components/index.js +6 -0
  48. package/lib/vtx-sdyd-tfd-modal/config.js +63 -0
  49. package/lib/vtx-sdyd-tfd-modal/imgs/BOTTLE.png +0 -0
  50. package/lib/vtx-sdyd-tfd-modal/imgs/CAN.png +0 -0
  51. package/lib/vtx-sdyd-tfd-modal/imgs/KRAFT_PAPER_BOX.png +0 -0
  52. package/lib/vtx-sdyd-tfd-modal/imgs/NAPKIN.png +0 -0
  53. package/lib/vtx-sdyd-tfd-modal/imgs/NAPKIN_light.png +0 -0
  54. package/lib/vtx-sdyd-tfd-modal/imgs/PLASTIC_BAG.png +0 -0
  55. package/lib/vtx-sdyd-tfd-modal/imgs/aibox.png +0 -0
  56. package/lib/vtx-sdyd-tfd-modal/imgs/aibox_light.png +0 -0
  57. package/lib/vtx-sdyd-tfd-modal/imgs/android.png +0 -0
  58. package/lib/vtx-sdyd-tfd-modal/imgs/android_light.png +0 -0
  59. package/lib/vtx-sdyd-tfd-modal/imgs/avatar.png +0 -0
  60. package/lib/vtx-sdyd-tfd-modal/imgs/avatar_light.png +0 -0
  61. package/lib/vtx-sdyd-tfd-modal/imgs/ddypz.png +0 -0
  62. package/lib/vtx-sdyd-tfd-modal/imgs/ddypz_light.png +0 -0
  63. package/lib/vtx-sdyd-tfd-modal/imgs/garbage_default.png +0 -0
  64. package/lib/vtx-sdyd-tfd-modal/imgs/gzxjcx.png +0 -0
  65. package/lib/vtx-sdyd-tfd-modal/imgs/hjglcx.png +0 -0
  66. package/lib/vtx-sdyd-tfd-modal/imgs/hmd.png +0 -0
  67. package/lib/vtx-sdyd-tfd-modal/imgs/hmd_light.png +0 -0
  68. package/lib/vtx-sdyd-tfd-modal/imgs/manage_bg.png +0 -0
  69. package/lib/vtx-sdyd-tfd-modal/imgs/manage_bg_light.png +0 -0
  70. package/lib/vtx-sdyd-tfd-modal/imgs/rank.png +0 -0
  71. package/lib/vtx-sdyd-tfd-modal/imgs/rank_light.png +0 -0
  72. package/lib/vtx-sdyd-tfd-modal/imgs/sbzj_tfd.png +0 -0
  73. package/lib/vtx-sdyd-tfd-modal/imgs/sbzj_tfd_light.png +0 -0
  74. package/lib/vtx-sdyd-tfd-modal/imgs/sbzj_video.png +0 -0
  75. package/lib/vtx-sdyd-tfd-modal/imgs/sbzj_video_light.png +0 -0
  76. package/lib/vtx-sdyd-tfd-modal/imgs/tfcs.png +0 -0
  77. package/lib/vtx-sdyd-tfd-modal/imgs/tfcs_light.png +0 -0
  78. package/lib/vtx-sdyd-tfd-modal/imgs/tfd.png +0 -0
  79. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_ht.png +0 -0
  80. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_ht_light.png +0 -0
  81. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_light.png +0 -0
  82. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_manyi.png +0 -0
  83. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_manyi_light.png +0 -0
  84. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_twtf.png +0 -0
  85. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_twtf_light.png +0 -0
  86. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_wpd.png +0 -0
  87. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_wpd_light.png +0 -0
  88. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_wstf.png +0 -0
  89. package/lib/vtx-sdyd-tfd-modal/imgs/tfd_wstf_light.png +0 -0
  90. package/lib/vtx-sdyd-tfd-modal/imgs/tfhs.png +0 -0
  91. package/lib/vtx-sdyd-tfd-modal/imgs/tfhs_light.png +0 -0
  92. package/lib/vtx-sdyd-tfd-modal/imgs/wgmsr.png +0 -0
  93. package/lib/vtx-sdyd-tfd-modal/imgs/wgmsr_light.png +0 -0
  94. package/lib/vtx-sdyd-tfd-modal/imgs/yyxj.png +0 -0
  95. package/lib/vtx-sdyd-tfd-modal/imgs/yyxj_light.png +0 -0
  96. package/lib/vtx-sdyd-tfd-modal/index.js +113 -0
  97. package/lib/vtx-sdyd-tfd-modal/style/index.js +4 -0
  98. package/lib/vtx-sdyd-tfd-modal/style/index.less +1 -0
  99. package/lib/vtx-wr-modal/components/Appraise/index.js +123 -36
  100. package/lib/vtx-wr-modal/components/Appraise/index.less +40 -43
  101. package/lib/vtx-wr-modal/components/Base/Jbxx.js +151 -227
  102. package/lib/vtx-wr-modal/components/Base/Ptss.js +215 -0
  103. package/lib/vtx-wr-modal/components/Base/Sjjg.js +163 -76
  104. package/lib/vtx-wr-modal/components/Base/assets/blue/dswsj.png +0 -0
  105. package/lib/vtx-wr-modal/components/Base/assets/blue/tywsj.png +0 -0
  106. package/lib/vtx-wr-modal/components/Base/assets/light/dswsj.png +0 -0
  107. package/lib/vtx-wr-modal/components/Base/assets/light/tywsj.png +0 -0
  108. package/lib/vtx-wr-modal/components/Base/index.js +319 -32
  109. package/lib/vtx-wr-modal/components/Base/index.less +237 -227
  110. package/lib/vtx-wr-modal/components/Build/index.js +169 -0
  111. package/lib/vtx-wr-modal/components/Build/index.less +104 -0
  112. package/lib/vtx-wr-modal/components/File/index.js +107 -0
  113. package/lib/vtx-wr-modal/components/File/index.less +41 -0
  114. package/lib/vtx-wr-modal/components/Score/index.js +122 -28
  115. package/lib/vtx-wr-modal/components/Score/index.less +36 -36
  116. package/lib/vtx-wr-modal/components/index.js +3 -1
  117. package/lib/vtx-wr-modal/index.js +79 -15
  118. package/lib/vtx-wr-modal/style/index.js +2 -0
  119. package/package.json +12 -11
@@ -0,0 +1,138 @@
1
+ import { Col, Row } from 'antd';
2
+ import dayjs from 'dayjs';
3
+ import { VmInfoCollection, VmWrapper } from "../../../_components";
4
+ import useSettings from "../../../_hooks/useSettings";
5
+ import { deviceServce } from "../../api";
6
+ import "./index.less";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ var Sbzj = function Sbzj(_ref) {
9
+ var _ref$classPrefix = _ref.classPrefix,
10
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
11
+ id = _ref.id,
12
+ title = _ref.title;
13
+ var _useSettings = useSettings(),
14
+ isDark = _useSettings.isDark;
15
+ var prefix = "".concat(classPrefix, "-sbzj");
16
+ var data = deviceServce.useGetList({
17
+ throwPointId: id
18
+ });
19
+ // const data = [
20
+ // { name: 'AI BOX', img: 'aibox' },
21
+ // { name: '安卓屏', img: 'android' },
22
+ // { name: '屋外摄像头', img: 'sbzj_video' },
23
+ // { name: '屋内摄像头', img: 'sbzj_video' },
24
+ // { name: '屋顶摄像头', img: 'sbzj_video' },
25
+ // { name: '摄像头', img: 'sbzj_video' },
26
+ // ];
27
+ var imgs = {
28
+ AI_BOX: 'aibox',
29
+ ANDROID_SCREEN: 'android',
30
+ SHUTTER_DOOR: 'jlm',
31
+ LIGHT: 'deng',
32
+ CAMERA: 'sbzj_video'
33
+ };
34
+ console.log(data);
35
+ return /*#__PURE__*/_jsxs("div", {
36
+ className: "".concat(prefix),
37
+ children: [/*#__PURE__*/_jsx(VmWrapper, {
38
+ title: "\u8BBE\u5907\u603B\u89C8",
39
+ style: {
40
+ marginBottom: 16
41
+ },
42
+ children: /*#__PURE__*/_jsxs("div", {
43
+ className: "".concat(prefix, "-overview"),
44
+ children: [/*#__PURE__*/_jsxs("div", {
45
+ className: "".concat(prefix, "-overview-top"),
46
+ children: [/*#__PURE__*/_jsx("img", {
47
+ src: require("../../imgs/sbzj_tfd".concat(isDark ? '' : '_light', ".png"))
48
+ }), /*#__PURE__*/_jsx("div", {
49
+ children: title
50
+ }), /*#__PURE__*/_jsx("div", {
51
+ className: "".concat(prefix, "-overview-top-dashed")
52
+ })]
53
+ }), /*#__PURE__*/_jsx("div", {
54
+ className: "".concat(prefix, "-overview-dashedBox")
55
+ }), /*#__PURE__*/_jsx("div", {
56
+ className: "".concat(prefix, "-overview-devices"),
57
+ children: data === null || data === void 0 ? void 0 : data.map(function (ele, index) {
58
+ var img = imgs[ele.deviceType] || 'sbzj_video';
59
+ return /*#__PURE__*/_jsxs("div", {
60
+ className: "".concat(prefix, "-overview-devices-item"),
61
+ children: [/*#__PURE__*/_jsx("img", {
62
+ src: require("../../imgs/".concat(img).concat(isDark ? '' : '_light', ".png"))
63
+ }), /*#__PURE__*/_jsx("div", {
64
+ className: "".concat(prefix, "-overview-devices-item-name"),
65
+ children: ele.name
66
+ }), index !== 0 && index !== data.length - 1 && /*#__PURE__*/_jsx("div", {
67
+ className: "".concat(prefix, "-overview-devices-item-dashed")
68
+ })]
69
+ }, ele.img);
70
+ })
71
+ })]
72
+ })
73
+ }), /*#__PURE__*/_jsx(VmWrapper, {
74
+ title: "\u8BBE\u5907\u4FE1\u606F",
75
+ children: /*#__PURE__*/_jsx(Row, {
76
+ gutter: [32, 20],
77
+ children: data === null || data === void 0 ? void 0 : data.map(function (ele, index) {
78
+ return /*#__PURE__*/_jsx(Col, {
79
+ span: 12,
80
+ children: /*#__PURE__*/_jsx(VmWrapper, {
81
+ title: ele.name,
82
+ children: /*#__PURE__*/_jsx(VmInfoCollection, {
83
+ width: "50%",
84
+ horizontal: true,
85
+ data: [{
86
+ label: '累计工作时长',
87
+ value: ele.cumulativeWorkingTimeStr,
88
+ key: '1'
89
+ }, {
90
+ label: '可用率',
91
+ value: "".concat(keepTwoNumRate(ele.availability), "%"),
92
+ key: '2'
93
+ }, {
94
+ label: '最后心跳时间',
95
+ value: ele.lastHeartTime,
96
+ key: '3'
97
+ }, {
98
+ label: '在线状态',
99
+ value: ele.status === 'online' ? '上线' : '下线',
100
+ key: '4',
101
+ color: ele.status === 'online' ? '#00B85C' : ''
102
+ }, {
103
+ label: '最后上传数据时间',
104
+ value: ele.lastDataTime,
105
+ key: '5'
106
+ }, {
107
+ label: '无数据时长',
108
+ value: ele.lastDataTime ? noDataTime(ele.lastDataTime) : '--',
109
+ key: '6',
110
+ color: ele.status === 'online' ? '#FF9500' : ''
111
+ }]
112
+ })
113
+ })
114
+ }, index);
115
+ })
116
+ })
117
+ })]
118
+ });
119
+ };
120
+ export default Sbzj;
121
+ export var keepTwoNumRate = function keepTwoNumRate(num) {
122
+ var rate = num * 100;
123
+ var str = "".concat(rate);
124
+ if (str.includes('.')) {
125
+ var answerStr = rate.toFixed(2);
126
+ var i = 1;
127
+ while (['.', '0'].includes(answerStr[answerStr.length - 1]) && i <= 3) {
128
+ i++;
129
+ answerStr = answerStr.substring(0, answerStr.length - 1);
130
+ }
131
+ return answerStr;
132
+ } else {
133
+ return "".concat(rate);
134
+ }
135
+ };
136
+ var noDataTime = function noDataTime(time) {
137
+ return dayjs(dayjs().diff(dayjs(time))).format('H小时mm分钟');
138
+ };
@@ -0,0 +1,78 @@
1
+ @import '../../style/index';
2
+
3
+ .@{prefix-cls}-sbzj {
4
+ &-overview {
5
+ width: 860px;
6
+ height: 240px;
7
+ margin: 0 auto;
8
+ position: relative;
9
+ padding: 20px 0;
10
+
11
+ &-top {
12
+ height: 64px;
13
+ display: flex;
14
+ justify-content: center;
15
+ text-align: center;
16
+ align-items: center;
17
+ gap: 15px;
18
+ position: relative;
19
+ color: var(--modal-title-color);
20
+
21
+ img {
22
+ width: 44px;
23
+ height: 44px;
24
+ }
25
+
26
+ &-dashed {
27
+ width: 1px;
28
+ height: 20px;
29
+ position: absolute;
30
+ left: 50%;
31
+ bottom: -20px;
32
+ border-radius: 8px;
33
+ border: 1px dashed #0fb964;
34
+ }
35
+ }
36
+ &-dashedBox {
37
+ width: 100%;
38
+ height: 20px;
39
+ margin-top: 20px;
40
+ border-top-left-radius: 8px;
41
+ border-top-right-radius: 8px;
42
+ border: 1px dashed #21ea85;
43
+ border-bottom: 0px;
44
+ }
45
+ &-devices {
46
+ width: calc(100% + 100px);
47
+ display: flex;
48
+ justify-content: space-between;
49
+ align-items: flex-start; /* 底部对齐 */
50
+ transform: translateX(-50px);
51
+
52
+ &-item {
53
+ width: 100px;
54
+ text-align: center;
55
+ color: var(--modal-title-color);
56
+ position: relative;
57
+
58
+ &-name {
59
+ overflow: hidden;
60
+ }
61
+
62
+ img {
63
+ width: 44px;
64
+ height: 44px;
65
+ }
66
+
67
+ &-dashed {
68
+ width: 1px;
69
+ height: 20px;
70
+ position: absolute;
71
+ left: 50%;
72
+ top: -20px;
73
+ border: 0.1px dashed #21ea85;
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,133 @@
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 { useAntdTable } from 'ahooks';
14
+ import dayjs from 'dayjs';
15
+ import { useState } from 'react';
16
+ import { VmFactor, VmTable, VmWrapper } from "../../../_components";
17
+ import useSettings from "../../../_hooks/useSettings";
18
+ import { queryPage, throwRecordService } from "../../api";
19
+ import "./index.less";
20
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
+ var columns = [{
22
+ title: '投放人',
23
+ dataIndex: 'personName',
24
+ render: function render(text) {
25
+ return text || '--';
26
+ }
27
+ }, {
28
+ title: '门牌号',
29
+ dataIndex: 'householdNo',
30
+ render: function render(text) {
31
+ return text || '--';
32
+ }
33
+ }, {
34
+ title: '分类主体',
35
+ dataIndex: 'housingEstateName',
36
+ render: function render(text) {
37
+ return text || '--';
38
+ }
39
+ }, {
40
+ title: '行政区划',
41
+ dataIndex: 'xzqhName',
42
+ render: function render(text) {
43
+ return text || '--';
44
+ }
45
+ }, {
46
+ title: '投放点',
47
+ dataIndex: 'throwPointName',
48
+ render: function render(text) {
49
+ return text || '--';
50
+ }
51
+ }, {
52
+ title: '分类质量',
53
+ dataIndex: 'qualityValue',
54
+ render: function render(text, record) {
55
+ return /*#__PURE__*/_jsx("div", {
56
+ className: "classifyCircle ".concat(record.qualityCode === 'PASS' ? 'GOOD' : 'BAD'),
57
+ children: text
58
+ });
59
+ }
60
+ }, {
61
+ title: '投放时间',
62
+ dataIndex: 'endDatetime',
63
+ render: function render(text) {
64
+ return text || '--';
65
+ }
66
+ }];
67
+ var TFRD = function TFRD(_ref) {
68
+ var _ref$classPrefix = _ref.classPrefix,
69
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
70
+ id = _ref.id;
71
+ var _useSettings = useSettings(),
72
+ isDark = _useSettings.isDark;
73
+ var prefix = "".concat(classPrefix, "-tfrd");
74
+ var _useState = useState([dayjs(), dayjs()]),
75
+ _useState2 = _slicedToArray(_useState, 2),
76
+ times = _useState2[0],
77
+ setTimes = _useState2[1];
78
+ var queryParams = {
79
+ throwPointId: id,
80
+ startDatetime: times[0].format('YYYY-MM-DD 00:00:00'),
81
+ endDatetime: times[1].format('YYYY-MM-DD 23:59:59')
82
+ };
83
+ var summary = throwRecordService.useGetCount(queryParams);
84
+ var getTableData = function getTableData(_ref2) {
85
+ var current = _ref2.current,
86
+ pageSize = _ref2.pageSize;
87
+ return queryPage('/cloud/sdyd/throwRecord/page', _objectSpread({
88
+ page: current - 1,
89
+ size: pageSize
90
+ }, queryParams));
91
+ };
92
+ var _useAntdTable = useAntdTable(getTableData, {
93
+ defaultPageSize: 10,
94
+ refreshDeps: [id, times[0], times[1]]
95
+ }),
96
+ tableProps = _useAntdTable.tableProps;
97
+ var onDateChange = function onDateChange(date) {
98
+ setTimes(date);
99
+ };
100
+ return /*#__PURE__*/_jsx("div", {
101
+ className: prefix,
102
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
103
+ title: "\u5C45\u6C11\u6295\u653E\u70ED\u5EA6\u5206\u6790",
104
+ filterType: "rangePicker",
105
+ dateValue: times,
106
+ filterChange: onDateChange,
107
+ children: [/*#__PURE__*/_jsx("div", {
108
+ className: "".concat(prefix, "-top"),
109
+ children: [{
110
+ name: '投放户数',
111
+ unit: '户',
112
+ value: (summary === null || summary === void 0 ? void 0 : summary.householdCount) || 0,
113
+ fontType: 'blue',
114
+ key: 'tfhs'
115
+ }, {
116
+ name: '投放次数',
117
+ unit: '次',
118
+ value: (summary === null || summary === void 0 ? void 0 : summary.totalCount) || 0,
119
+ fontType: 'green',
120
+ key: 'tfcs'
121
+ }].map(function (ele) {
122
+ return /*#__PURE__*/_jsx(VmFactor, _objectSpread(_objectSpread({}, ele), {}, {
123
+ img: require("../../imgs/".concat(ele.key).concat(isDark ? '' : '_light', ".png"))
124
+ }), ele.key);
125
+ })
126
+ }), /*#__PURE__*/_jsx(VmTable, _objectSpread({
127
+ height: 370,
128
+ columns: columns
129
+ }, tableProps))]
130
+ })
131
+ });
132
+ };
133
+ export default TFRD;
@@ -0,0 +1,12 @@
1
+ @import '../../style/index';
2
+
3
+ .@{prefix-cls}-tfrd {
4
+ height: 100%;
5
+ &-top {
6
+ margin-bottom: 16px;
7
+ display: flex;
8
+ justify-content: center;
9
+ align-items: center;
10
+ gap: 120px;
11
+ }
12
+ }
@@ -0,0 +1,63 @@
1
+ import { VtxImage } from '@vtx/components';
2
+ import { getVtxToken } from '@vtx/utils';
3
+ import { Spin } from 'antd';
4
+ import { VmEmpty } from "../../../_components";
5
+ import useSettings from "../../../_hooks/useSettings";
6
+ import { throwFailPersonService } from "../../api";
7
+ import "./index.less";
8
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
9
+ var WGGSContent = function WGGSContent(_ref) {
10
+ var _ref$classPrefix = _ref.classPrefix,
11
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
12
+ id = _ref.id,
13
+ startTime = _ref.startTime,
14
+ endTime = _ref.endTime;
15
+ var _useSettings = useSettings(),
16
+ isDark = _useSettings.isDark;
17
+ var _throwFailPersonServi = throwFailPersonService.useGetList({
18
+ beginTime: startTime,
19
+ endTime: endTime,
20
+ throwPointId: id
21
+ }),
22
+ data = _throwFailPersonServi.data,
23
+ loading = _throwFailPersonServi.loading;
24
+ var _ref2 = data || {},
25
+ _ref2$rows = _ref2.rows,
26
+ rows = _ref2$rows === void 0 ? [] : _ref2$rows;
27
+ return /*#__PURE__*/_jsx(_Fragment, {
28
+ children: !rows.length && !loading ? /*#__PURE__*/_jsx("div", {
29
+ style: {
30
+ height: 500
31
+ },
32
+ children: /*#__PURE__*/_jsx(VmEmpty, {})
33
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
34
+ children: [/*#__PURE__*/_jsx(Spin, {
35
+ spinning: loading,
36
+ className: "".concat(classPrefix, "-content-spin")
37
+ }), /*#__PURE__*/_jsx("div", {
38
+ className: "".concat(classPrefix, "-content ").concat(isDark ? 'dark' : ''),
39
+ children: rows.map(function (item) {
40
+ var _JSON$parse$, _tempDetectObjects$fi;
41
+ var photoId = (_JSON$parse$ = JSON.parse(item.personPhoto2 || '[]')[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.id;
42
+ var tempDetectObjects = JSON.parse(item.detectObjects || '[]');
43
+ var photoAfterArr = (_tempDetectObjects$fi = tempDetectObjects.find(function (item) {
44
+ return item.pic === 'dropPic2';
45
+ })) === null || _tempDetectObjects$fi === void 0 ? void 0 : _tempDetectObjects$fi.info;
46
+ var str = "/cloud/sdyd/markBox?fileId=".concat(photoId, "&detectObjects=").concat(photoAfterArr ? JSON.stringify(photoAfterArr) : '', "&token=").concat(getVtxToken('token'));
47
+ return /*#__PURE__*/_jsxs("div", {
48
+ className: "".concat(classPrefix, "-content-item"),
49
+ children: [/*#__PURE__*/_jsx("div", {
50
+ className: "".concat(classPrefix, "-content-item-img"),
51
+ children: /*#__PURE__*/_jsx(VtxImage, {
52
+ src: str
53
+ })
54
+ }), /*#__PURE__*/_jsx("p", {
55
+ children: item.throwPointName
56
+ })]
57
+ }, item.throwFailId);
58
+ })
59
+ })]
60
+ })
61
+ });
62
+ };
63
+ export default WGGSContent;
@@ -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 { message } from 'antd';
8
+ import dayjs from 'dayjs';
9
+ import { useState } from 'react';
10
+ import { VmWrapper } from "../../../_components";
11
+ import WGGSContent from "./Content";
12
+ import "./index.less";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ var WGGS = function WGGS(_ref) {
15
+ var _ref$classPrefix = _ref.classPrefix,
16
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
17
+ id = _ref.id;
18
+ var prefix = "".concat(classPrefix, "-wggs");
19
+ var _useState = useState('all'),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ tab = _useState2[0],
22
+ setTab = _useState2[1];
23
+ var _useState3 = useState([dayjs().subtract(1, 'days'), dayjs()]),
24
+ _useState4 = _slicedToArray(_useState3, 2),
25
+ times = _useState4[0],
26
+ setTimes = _useState4[1];
27
+ var disabledDate = function disabledDate(current) {
28
+ var _times = _slicedToArray(times, 2),
29
+ startDate = _times[0],
30
+ endDate = _times[1];
31
+ if (!startDate || !endDate) {
32
+ return false;
33
+ }
34
+ var tooLate = startDate && current.diff(startDate, 'days') > 7;
35
+ var tooEarly = endDate && endDate.diff(current, 'days') > 7;
36
+ return !!tooEarly || !!tooLate;
37
+ };
38
+ return /*#__PURE__*/_jsx(VmWrapper, {
39
+ activeKey: tab,
40
+ filterType: "rangePicker",
41
+ dateValue: times,
42
+ disabledDate: disabledDate,
43
+ headerStyle: {
44
+ height: 48
45
+ },
46
+ filterChange: function filterChange(date) {
47
+ if (date[1].diff(date[0], 'd') > 7) {
48
+ message.warning('时间跨度不能超过7天');
49
+ return;
50
+ }
51
+ setTimes(date);
52
+ },
53
+ children: /*#__PURE__*/_jsx(WGGSContent, {
54
+ classPrefix: prefix,
55
+ id: id,
56
+ startTime: times[0].format('YYYY-MM-DD 00:00:00'),
57
+ endTime: times[1].format('YYYY-MM-DD 23:59:59')
58
+ })
59
+ });
60
+ };
61
+ export default WGGS;
@@ -0,0 +1,49 @@
1
+ @import '../../style/index';
2
+
3
+ .@{prefix-cls}-wggs {
4
+ &-content {
5
+ --wggs-border-color: rgba(0, 0, 0, 0.1);
6
+ --wggs-bg-color: transparent;
7
+
8
+ &.dark {
9
+ --wggs-border-color: #1064a7;
10
+ --wggs-bg-color: rgba(0, 155, 233, 0.1);
11
+ }
12
+
13
+ &-spin {
14
+ position: absolute;
15
+ margin: 150px 0 0 50%;
16
+ transform: translateX(-50%);
17
+ }
18
+
19
+ display: grid;
20
+ grid-template-columns: 1fr 1fr 1fr 1fr;
21
+ gap: 16px;
22
+ overflow: auto;
23
+ color: var(--modal-title-color);
24
+ position: relative;
25
+ &-item {
26
+ padding-bottom: 0;
27
+ display: flex;
28
+ flex-direction: column;
29
+ height: 173px;
30
+ background: var(--wggs-bg-color);
31
+ border: 1px solid var(--wggs-border-color);
32
+ border-radius: 8px;
33
+ &-img {
34
+ flex: 1;
35
+ img {
36
+ border-radius: 8px 8px 0 0;
37
+ width: 100%;
38
+ height: 133px;
39
+ }
40
+ }
41
+ & > p {
42
+ padding-left: 12px;
43
+ height: 40px;
44
+ line-height: 39px;
45
+ font-size: 14px;
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,117 @@
1
+ import { VtxImage } from '@vtx/components';
2
+ import { getVtxToken } from '@vtx/utils';
3
+ import { Spin } from 'antd';
4
+ import { VmEmpty, VmTag } from "../../../_components";
5
+ import useSettings from "../../../_hooks/useSettings";
6
+ import { throwFailBehaviorService } from "../../api";
7
+ import "./index.less";
8
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
9
+ var WGGSContent = function WGGSContent(_ref) {
10
+ var _data$map;
11
+ var _ref$classPrefix = _ref.classPrefix,
12
+ classPrefix = _ref$classPrefix === void 0 ? '' : _ref$classPrefix,
13
+ id = _ref.id,
14
+ throwAberrantCode = _ref.throwAberrantCode,
15
+ startTime = _ref.startTime,
16
+ endTime = _ref.endTime;
17
+ var _useSettings = useSettings(),
18
+ isDark = _useSettings.isDark;
19
+ var _throwFailBehaviorSer = throwFailBehaviorService.useGetList({
20
+ throwPointId: id,
21
+ startDatetime: startTime,
22
+ endDatetime: endTime,
23
+ throwAberrantCode: throwAberrantCode === 'all' ? '' : throwAberrantCode
24
+ }),
25
+ data = _throwFailBehaviorSer.data,
26
+ loading = _throwFailBehaviorSer.loading;
27
+ var ThrowAberrantEnum = {
28
+ MIXED_THROW: '#26A666',
29
+ TRASH_BAG: '#F9667E',
30
+ WRONG_TIME_OUT: '#7470F9',
31
+ RIGHT_TIME_OUT: '#FFAA00',
32
+ QITA_MIXED_THROW: '#479DE3',
33
+ ON_LID: '#FFAA00'
34
+ };
35
+ var RectificationStatusEnum = {
36
+ TO_BE_DISPATCHED: 'yellow',
37
+ // '待派发',
38
+ TO_BE_RESOLVED: 'gray',
39
+ // '待处理',
40
+ TO_BE_AUDITED: 'yellow',
41
+ // '待审核',
42
+ PASSED: 'green',
43
+ // '整改通过',
44
+ FAILED: 'red',
45
+ // '整改不通过',
46
+ IGNORED: 'blue' // '已忽略',
47
+ };
48
+
49
+ // const ThrowAberrantColor = {
50
+ // '#7470F9': 'purple',
51
+ // '#F9667E': 'red',
52
+ // '#FFAA00': 'yellow',
53
+ // '#26A666': 'green',
54
+ // '#479DE3': 'cyan',
55
+ // };
56
+
57
+ return !(data !== null && data !== void 0 && data.length) && !loading ? /*#__PURE__*/_jsx("div", {
58
+ style: {
59
+ height: 500
60
+ },
61
+ children: /*#__PURE__*/_jsx(VmEmpty, {})
62
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
63
+ children: [/*#__PURE__*/_jsx(Spin, {
64
+ spinning: loading,
65
+ className: "".concat(classPrefix, "-content-spin")
66
+ }), /*#__PURE__*/_jsx("div", {
67
+ className: "".concat(classPrefix, "-content ").concat(isDark ? 'dark' : ''),
68
+ children: data === null || data === void 0 || (_data$map = data.map) === null || _data$map === void 0 ? void 0 : _data$map.call(data, function (item) {
69
+ var _JSON$parse$, _tempDetectObjects$fi;
70
+ var photoId = (_JSON$parse$ = JSON.parse(item.photoAfter || '[]')[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.id;
71
+ var tempDetectObjects = JSON.parse(item.detectObjects || '[]');
72
+ var photoAfterArr = (_tempDetectObjects$fi = tempDetectObjects.find(function (item) {
73
+ return item.pic === 'dropPic2';
74
+ })) === null || _tempDetectObjects$fi === void 0 ? void 0 : _tempDetectObjects$fi.info;
75
+ var str = "/cloud/sdyd/markBox?fileId=".concat(photoId, "&detectObjects=").concat(photoAfterArr ? JSON.stringify(photoAfterArr) : '', "&token=").concat(getVtxToken('token'));
76
+ return /*#__PURE__*/_jsxs("div", {
77
+ className: "".concat(classPrefix, "-content-item"),
78
+ children: [/*#__PURE__*/_jsx("div", {
79
+ className: "".concat(classPrefix, "-content-item-img"),
80
+ children: /*#__PURE__*/_jsx(VtxImage, {
81
+ src: str
82
+ })
83
+ }), /*#__PURE__*/_jsxs("p", {
84
+ children: [/*#__PURE__*/_jsxs("div", {
85
+ className: "".concat(classPrefix, "-content-item-info1"),
86
+ children: [/*#__PURE__*/_jsx("span", {
87
+ children: item.throwPointName
88
+ }), /*#__PURE__*/_jsx("span", {
89
+ className: "".concat(classPrefix, "-content-item-").concat(item.rectificationStatus),
90
+ children: /*#__PURE__*/_jsx(VmTag, {
91
+ title: item.rectificationStatusDesc,
92
+ type: RectificationStatusEnum[item.rectificationStatus] || 'yellow'
93
+ })
94
+ })]
95
+ }), /*#__PURE__*/_jsxs("div", {
96
+ className: "".concat(classPrefix, "-content-item-info2"),
97
+ children: [/*#__PURE__*/_jsx("span", {
98
+ children: item.datetime
99
+ }), /*#__PURE__*/_jsx("div", {
100
+ style: {
101
+ color: ThrowAberrantEnum[item.aberrantCode]
102
+ },
103
+ children: item.aberrantName
104
+ })]
105
+ }), /*#__PURE__*/_jsxs("div", {
106
+ className: "".concat(classPrefix, "-content-item-info3"),
107
+ children: [/*#__PURE__*/_jsx("img", {
108
+ src: require("../../imgs/avatar".concat(isDark ? '' : '_light', ".png"))
109
+ }), item.personName || '暂无关联用户']
110
+ })]
111
+ })]
112
+ }, item.id);
113
+ })
114
+ })]
115
+ });
116
+ };
117
+ export default WGGSContent;