@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,104 @@
1
+ .wr-build-content {
2
+ width: 100%;
3
+ height: 100%;
4
+ border-radius: 8px;
5
+ .wr-build-title {
6
+ padding: 12px 16px;
7
+ font-size: 16px;
8
+ box-sizing: border-box;
9
+ display: flex;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ margin-bottom: 25px;
13
+ }
14
+ .wr-build-inner {
15
+ width: 100%;
16
+ height: calc(100% - 100px);
17
+ overflow: hidden;
18
+ overflow-y: auto;
19
+ }
20
+ .wr-build-panel {
21
+ padding: 0 50px;
22
+ .wr-step-title {
23
+ display: flex;
24
+ gap: 12px;
25
+ align-items: center;
26
+ .wr-step-time {
27
+ width: 80px;
28
+ }
29
+ .wr-step-circle {
30
+ width: 14px;
31
+ height: 14px;
32
+ border-radius: 8px;
33
+ background: rgba(22, 119, 255, 0.2);
34
+ padding: 4px;
35
+ box-sizing: border-box;
36
+ .wr-circle-inner {
37
+ width: 100%;
38
+ height: 100%;
39
+ background: #1677ff;
40
+ border-radius: 100%;
41
+ }
42
+ }
43
+ .wr-step-text {
44
+ padding: 4px 20px 4px 12px;
45
+ color: #fff;
46
+ background: linear-gradient(270deg, #36a1ff 0%, #1677ff 100%);
47
+ border-radius: 0px 80px 80px 0px;
48
+ }
49
+ }
50
+ .wr-step-content {
51
+ width: calc(100% - 99px);
52
+ height: auto;
53
+ margin-left: 99px;
54
+ padding: 14px 19px;
55
+ display: flex;
56
+ flex-wrap: wrap;
57
+ .wr-step-line {
58
+ flex-shrink: 0;
59
+ overflow: hidden;
60
+ text-overflow: ellipsis;
61
+ white-space: nowrap;
62
+ }
63
+ }
64
+ }
65
+ }
66
+
67
+ .vm-modal-dark {
68
+ .wr-build-content {
69
+ color: #fff;
70
+ border: 1px solid #1064a7;
71
+ background: rgba(0, 155, 233, 0.1);
72
+ color: #fff;
73
+ .wr-build-title {
74
+ border-bottom: 1px solid rgba(12, 154, 255, 0.15);
75
+ }
76
+ .wr-step-time {
77
+ color: #fff;
78
+ }
79
+ .wr-step-content {
80
+ border-left: 1px solid rgba(255, 255, 255, 0.1);
81
+ .wr-step-label {
82
+ color: #2facff;
83
+ }
84
+ }
85
+ }
86
+ }
87
+
88
+ .vm-modal-light {
89
+ .wr-build-content {
90
+ background: #fff;
91
+ .wr-build-title {
92
+ border-bottom: 1px solid #f1f0f0;
93
+ }
94
+ .wr-step-time {
95
+ color: #5e6169;
96
+ }
97
+ .wr-step-content {
98
+ border-left: 1px solid rgba(0, 0, 0, 0.1);
99
+ .wr-step-label {
100
+ color: #8c8c8c;
101
+ }
102
+ }
103
+ }
104
+ }
@@ -0,0 +1,107 @@
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 { DownloadOutlined } from '@ant-design/icons';
14
+ import { getVtxToken, request } from '@vtx/utils';
15
+ import { Button } from 'antd';
16
+ import uniq from 'lodash/uniq';
17
+ import { useEffect, useState } from 'react';
18
+ import { VmTable } from "../../../_components";
19
+ import { renderFile } from "../Build";
20
+
21
+ //公厕配置字段
22
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
+ var changeFiles = function changeFiles(params) {
24
+ return request.get('/cloud/jcss-reborn/status/approval/facility/changeFiles', {
25
+ data: params
26
+ });
27
+ };
28
+ export default (function (props) {
29
+ var id = props.id;
30
+ var _useState = useState([]),
31
+ _useState2 = _slicedToArray(_useState, 2),
32
+ list = _useState2[0],
33
+ setList = _useState2[1];
34
+ useEffect(function () {
35
+ id && changeFiles({
36
+ jcssId: id
37
+ }).then(function (res) {
38
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
39
+ setList(res.data);
40
+ }
41
+ });
42
+ }, [id]);
43
+ var columns = [{
44
+ title: '序号',
45
+ dataIndex: 'orderIndex',
46
+ key: 'orderIndex',
47
+ width: 20
48
+ }, {
49
+ title: '附件名称',
50
+ dataIndex: 'typeName',
51
+ key: 'typeName',
52
+ width: 50,
53
+ ellipsis: true
54
+ }, {
55
+ title: '文件名',
56
+ dataIndex: 'files',
57
+ key: 'files',
58
+ width: 100,
59
+ render: function render(text) {
60
+ return text !== null && text !== void 0 && text.length ? renderFile(text) : '--';
61
+ },
62
+ ellipsis: true
63
+ }, {
64
+ title: '状态',
65
+ dataIndex: 'afterFacilityStatus',
66
+ key: 'afterFacilityStatus',
67
+ width: 20
68
+ }];
69
+ var tableProps = {
70
+ columns: columns,
71
+ height: 240,
72
+ isIndex: false,
73
+ pagination: false,
74
+ dataSource: list.map(function (item, index) {
75
+ return _objectSpread(_objectSpread({}, item), {}, {
76
+ orderIndex: index + 1
77
+ });
78
+ })
79
+ };
80
+ var downLoadFiles = function downLoadFiles() {
81
+ window.open("/cloud/jcss-reborn/status/approval/facility/downFiles?jcssId=".concat(id, "&ids=").concat(uniq(list.map(function (item) {
82
+ return item.recordId;
83
+ })).join(','), "&token=").concat(getVtxToken('token')));
84
+ };
85
+ return /*#__PURE__*/_jsxs("div", {
86
+ className: "wr-file-content",
87
+ children: [/*#__PURE__*/_jsxs("div", {
88
+ className: "wr-file-title",
89
+ children: [/*#__PURE__*/_jsx("div", {
90
+ children: "\u6587\u6863\u5217\u8868"
91
+ }), !!list.length && /*#__PURE__*/_jsx(Button, {
92
+ type: "primary",
93
+ shape: "round",
94
+ icon: /*#__PURE__*/_jsx(DownloadOutlined, {}),
95
+ onClick: function onClick() {
96
+ return downLoadFiles();
97
+ },
98
+ children: "\u4E0B\u8F7D\u5168\u90E8"
99
+ })]
100
+ }), /*#__PURE__*/_jsx("div", {
101
+ className: "wr-file-inner",
102
+ children: /*#__PURE__*/_jsx(VmTable, _objectSpread(_objectSpread({}, tableProps), {}, {
103
+ height: "460px"
104
+ }))
105
+ })]
106
+ });
107
+ });
@@ -0,0 +1,41 @@
1
+ .wr-file-content {
2
+ width: 100%;
3
+ height: 100%;
4
+ border-radius: 8px;
5
+ .wr-file-title {
6
+ padding: 12px 16px;
7
+ font-size: 16px;
8
+ box-sizing: border-box;
9
+ display: flex;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ margin-bottom: 25px;
13
+ }
14
+ .wr-file-inner {
15
+ width: 100%;
16
+ height: calc(100% - 100px);
17
+ overflow: hidden;
18
+ overflow-y: auto;
19
+ }
20
+ }
21
+
22
+ .vm-modal-dark {
23
+ .wr-file-content {
24
+ color: #fff;
25
+ border: 1px solid #1064a7;
26
+ background: rgba(0, 155, 233, 0.1);
27
+ color: #fff;
28
+ .wr-file-title {
29
+ border-bottom: 1px solid rgba(12, 154, 255, 0.15);
30
+ }
31
+ }
32
+ }
33
+
34
+ .vm-modal-light {
35
+ .wr-file-content {
36
+ background: #fff;
37
+ .wr-file-title {
38
+ border-bottom: 1px solid #f1f0f0;
39
+ }
40
+ }
41
+ }
@@ -4,38 +4,110 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
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
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
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 { request } from '@vtx/utils';
14
+ import { useSetState } from 'ahooks';
15
+ import dayjs from 'dayjs';
16
+ import { useEffect } from 'react';
17
+ import { TagCloud } from 'react-tagcloud';
7
18
  import { VmTable } from "../../../_components";
8
19
  import { VMRangePicker } from "../../../_components/vm-filter";
20
+
21
+ //公厕详情
9
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
+ var getDetail = function getDetail(params) {
24
+ return request.get('/cloud/zhgc-reborn/api/v101/evaluate/score/getByGcId', {
25
+ data: params
26
+ });
27
+ };
28
+
29
+ //表格
30
+ var getList = function getList(params) {
31
+ return request.get('/cloud/zhgc-reborn/api/v101/evaluate/month/score/list', {
32
+ data: params
33
+ });
34
+ };
10
35
  export default (function (props) {
11
- var theme = props.theme;
36
+ var _detail$score, _detail$evaluateCount;
37
+ var id = props.id,
38
+ theme = props.theme;
39
+ var _useSetState = useSetState({
40
+ detail: {
41
+ evaluateLabelCountList: [{}]
42
+ },
43
+ startDate: '',
44
+ endDate: '',
45
+ tableData: []
46
+ }),
47
+ _useSetState2 = _slicedToArray(_useSetState, 2),
48
+ state = _useSetState2[0],
49
+ setState = _useSetState2[1];
50
+ var detail = state.detail,
51
+ startDate = state.startDate,
52
+ endDate = state.endDate,
53
+ tableData = state.tableData;
54
+ useEffect(function () {
55
+ id && getDetail({
56
+ id: id
57
+ }).then(function (res) {
58
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
59
+ setState({
60
+ detail: res.data
61
+ });
62
+ }
63
+ });
64
+ }, [id]);
65
+ useEffect(function () {
66
+ id && getList({
67
+ gcId: id,
68
+ startMonth: startDate,
69
+ endMonth: endDate
70
+ }).then(function (res) {
71
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
72
+ setState({
73
+ tableData: res.data || []
74
+ });
75
+ }
76
+ });
77
+ }, [id, startDate, endDate]);
12
78
  var columns = [{
13
- title: '监测指标',
14
- dataIndex: 'shiftDate',
15
- key: 'shiftDate',
16
- width: 100
17
- }, {
18
- title: '报警等级',
19
- dataIndex: 'shiftDate',
20
- key: 'shiftDate',
79
+ title: '序号',
80
+ dataIndex: 'orderIndex',
81
+ key: 'orderIndex',
21
82
  width: 100
22
83
  }, {
23
- title: '监测开始时间',
24
- dataIndex: 'shiftDate',
25
- key: 'shiftDate',
84
+ title: '统计月份',
85
+ dataIndex: 'month',
86
+ key: 'month',
26
87
  width: 100
27
88
  }, {
28
- title: '监测结束时间',
29
- dataIndex: 'shiftDate',
30
- key: 'shiftDate',
89
+ title: '分数',
90
+ dataIndex: 'score',
91
+ key: 'score',
31
92
  width: 100
32
93
  }];
33
94
  var tableProps = {
34
95
  columns: columns,
35
96
  height: 240,
36
97
  isIndex: false,
37
- pagination: false
98
+ pagination: false,
99
+ dataSource: tableData.map(function (item, index) {
100
+ return _objectSpread(_objectSpread({}, item), {}, {
101
+ orderIndex: index + 1
102
+ });
103
+ })
38
104
  };
105
+ var data = (detail.evaluateLabelCountList || []).map(function (item) {
106
+ return {
107
+ value: "".concat(item.name, " ").concat(item.count),
108
+ count: item.count
109
+ };
110
+ });
39
111
  return /*#__PURE__*/_jsxs("div", {
40
112
  className: "wr-score-content",
41
113
  children: [/*#__PURE__*/_jsxs("div", {
@@ -43,11 +115,11 @@ export default (function (props) {
43
115
  style: {
44
116
  height: '290px'
45
117
  },
46
- children: [/*#__PURE__*/_jsxs("div", {
118
+ children: [/*#__PURE__*/_jsx("div", {
47
119
  className: "wr-score-title",
48
- children: [/*#__PURE__*/_jsx("div", {
120
+ children: /*#__PURE__*/_jsx("div", {
49
121
  children: "\u5F97\u5206\u60C5\u51B5"
50
- }), /*#__PURE__*/_jsx(VMRangePicker, {})]
122
+ })
51
123
  }), /*#__PURE__*/_jsxs("div", {
52
124
  className: "wr-score-content",
53
125
  children: [/*#__PURE__*/_jsx("div", {
@@ -67,8 +139,8 @@ export default (function (props) {
67
139
  style: {
68
140
  fontSize: '20px'
69
141
  },
70
- children: "200"
71
- }), "\xA0\u6B21"]
142
+ children: (_detail$score = detail.score) !== null && _detail$score !== void 0 ? _detail$score : 0
143
+ }), "\xA0\u5206"]
72
144
  })]
73
145
  })]
74
146
  }), /*#__PURE__*/_jsxs("div", {
@@ -84,14 +156,22 @@ export default (function (props) {
84
156
  style: {
85
157
  fontSize: '20px'
86
158
  },
87
- children: "200"
88
- }), "\xA0\u5206"]
159
+ children: (_detail$evaluateCount = detail.evaluateCount) !== null && _detail$evaluateCount !== void 0 ? _detail$evaluateCount : 0
160
+ }), "\xA0\u4EBA"]
89
161
  })]
90
162
  })]
91
163
  })]
92
164
  })
93
165
  }), /*#__PURE__*/_jsx("div", {
94
- className: "score-text"
166
+ className: "score-text",
167
+ children: !!data.length && /*#__PURE__*/_jsx(TagCloud, {
168
+ tags: data,
169
+ minSize: 25,
170
+ maxSize: 50,
171
+ colorOptions: {
172
+ colors: ['red', 'orange', 'yellow', 'green', 'blue', 'purple']
173
+ }
174
+ })
95
175
  })]
96
176
  })]
97
177
  }), /*#__PURE__*/_jsxs("div", {
@@ -100,12 +180,26 @@ export default (function (props) {
100
180
  height: '310px',
101
181
  marginTop: '10px'
102
182
  },
103
- children: [/*#__PURE__*/_jsx("div", {
183
+ children: [/*#__PURE__*/_jsxs("div", {
104
184
  className: "wr-score-title",
105
- children: /*#__PURE__*/_jsx("div", {
185
+ children: [/*#__PURE__*/_jsx("div", {
106
186
  children: "\u8BC4\u4EF7\u8BB0\u5F55"
107
- })
108
- }), /*#__PURE__*/_jsx(VmTable, _objectSpread({}, tableProps))]
187
+ }), /*#__PURE__*/_jsx(VMRangePicker, {
188
+ picker: "month",
189
+ value: startDate ? [dayjs(startDate), dayjs(endDate)] : null,
190
+ disabledDate: function disabledDate(current) {
191
+ return current && current > dayjs().endOf('month');
192
+ },
193
+ onChange: function onChange(_, dateStr) {
194
+ return setState({
195
+ startDate: dateStr[0],
196
+ endDate: dateStr[1]
197
+ });
198
+ }
199
+ })]
200
+ }), /*#__PURE__*/_jsx(VmTable, _objectSpread(_objectSpread({}, tableProps), {}, {
201
+ height: "200px"
202
+ }))]
109
203
  })]
110
204
  });
111
205
  });
@@ -1,47 +1,47 @@
1
- .vm-modal-dark,
2
- .vm-modal-light {
3
- .wr-score-content {
1
+ .wr-score-content {
2
+ width: 100%;
3
+ height: calc(100% - 60px);
4
+ .wr-score-title {
5
+ padding: 12px 16px;
6
+ font-size: 16px;
7
+ box-sizing: border-box;
8
+ display: flex;
9
+ justify-content: space-between;
10
+ align-items: center;
11
+ }
12
+ .wr-score-panel {
4
13
  width: 100%;
5
- height: calc(100% - 60px);
6
- .wr-score-title {
7
- padding: 12px 16px;
8
- font-size: 16px;
9
- box-sizing: border-box;
14
+ border-radius: 8px;
15
+ .wr-score-content {
10
16
  display: flex;
11
- justify-content: space-between;
12
- align-items: center;
13
- }
14
- .wr-score-panel {
15
- width: 100%;
16
- border-radius: 8px;
17
- .wr-score-content {
18
- display: flex;
19
- gap: 60px;
20
- justify-content: center;
21
- .score-chart {
22
- width: 580px;
17
+ gap: 60px;
18
+ justify-content: center;
19
+ .score-chart {
20
+ width: 480px;
21
+ height: 100%;
22
+ box-sizing: border-box;
23
+ .score-summary {
23
24
  height: 100%;
24
- box-sizing: border-box;
25
- .score-summary {
26
- height: 100%;
25
+ display: flex;
26
+ justify-content: center;
27
+ gap: 80px;
28
+ align-items: center;
29
+ .score-summary-item {
27
30
  display: flex;
28
- justify-content: center;
29
- gap: 80px;
30
31
  align-items: center;
31
- .score-summary-item {
32
- display: flex;
33
- align-items: center;
34
- img {
35
- width: 44px;
36
- height: 44px;
37
- margin-right: 16px;
38
- }
32
+ img {
33
+ width: 44px;
34
+ height: 44px;
35
+ margin-right: 16px;
39
36
  }
40
37
  }
41
38
  }
42
- .score-text {
43
- width: 380px;
44
- }
39
+ }
40
+ .score-text {
41
+ width: 480px;
42
+ display: flex;
43
+ justify-content: center;
44
+ align-items: center;
45
45
  }
46
46
  }
47
47
  }
@@ -1,4 +1,6 @@
1
1
  import Appraise from "./Appraise";
2
2
  import Base from "./Base";
3
+ import Build from "./Build";
4
+ import File from "./File";
3
5
  import Score from "./Score";
4
- export { Appraise, Base, Score };
6
+ export { Appraise, Base, Build, File, Score };
@@ -4,26 +4,74 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
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
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
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 { request } from '@vtx/utils';
14
+ import { useEffect, useState } from 'react';
7
15
  import VtxBaseModal from "../vtx-base-modal";
8
- import { Appraise, Base, Score } from "./components";
16
+ import { Appraise, Base, Build, File, Score } from "./components";
17
+ import "./style";
18
+
19
+ //弹窗配置
9
20
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
21
+ var getByCode = function getByCode(params) {
22
+ return request.get('/cloud/jcss-reborn/facility/type/config/getByCode', {
23
+ data: params
24
+ });
25
+ };
26
+ //公厕详情
27
+ var smallPop = function smallPop(params) {
28
+ return request.get('/cloud/zhgc-reborn/api/gis/pop/smallPop', {
29
+ data: params
30
+ });
31
+ };
10
32
  export default (function (props) {
33
+ var _config$;
11
34
  var visible = props.visible,
12
35
  theme = props.theme,
13
36
  title = props.title,
14
37
  id = props.id,
15
- onCancel = props.onCancel;
16
- var tabList = [{
17
- key: 'wr-base',
18
- title: '总览信息'
19
- }, {
20
- key: 'wr-appraise',
21
- title: '评价分析'
22
- }, {
23
- key: 'wr-score',
24
- title: '公厕得分'
25
- }];
26
- var contentList = _defineProperty(_defineProperty(_defineProperty({}, 'wr-base', /*#__PURE__*/_jsx(Base, _objectSpread({}, props))), 'wr-appraise', /*#__PURE__*/_jsx(Appraise, _objectSpread({}, props))), 'wr-score', /*#__PURE__*/_jsx(Score, _objectSpread({}, props)));
38
+ onCancel = props.onCancel,
39
+ _props$modalShow = props.modalShow,
40
+ modalShow = _props$modalShow === void 0 ? true : _props$modalShow;
41
+ var _useState = useState({}),
42
+ _useState2 = _slicedToArray(_useState, 2),
43
+ detail = _useState2[0],
44
+ setDetail = _useState2[1];
45
+ var _useState3 = useState([]),
46
+ _useState4 = _slicedToArray(_useState3, 2),
47
+ config = _useState4[0],
48
+ setConfig = _useState4[1];
49
+ useEffect(function () {
50
+ getByCode({
51
+ code: 'wr'
52
+ }).then(function (res) {
53
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
54
+ setConfig((res.data.popupConfigJson || []).filter(function (item) {
55
+ return item.display;
56
+ }).map(function (item) {
57
+ return {
58
+ key: item.code,
59
+ title: item.name
60
+ };
61
+ }));
62
+ }
63
+ });
64
+ }, []);
65
+ useEffect(function () {
66
+ id && smallPop({
67
+ id: id
68
+ }).then(function (res) {
69
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
70
+ setDetail(res.data || {});
71
+ }
72
+ });
73
+ }, [id]);
74
+ var contentList = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 'wr-base', /*#__PURE__*/_jsx(Base, _objectSpread({}, props))), 'wr-appraise', /*#__PURE__*/_jsx(Appraise, _objectSpread({}, props))), 'wr-score', /*#__PURE__*/_jsx(Score, _objectSpread({}, props))), 'wr-build', /*#__PURE__*/_jsx(Build, _objectSpread({}, props))), 'wr-file', /*#__PURE__*/_jsx(File, _objectSpread({}, props)));
27
75
  return /*#__PURE__*/_jsx(_Fragment, {
28
76
  children: visible && /*#__PURE__*/_jsx(VtxBaseModal, {
29
77
  type: "wr",
@@ -32,9 +80,25 @@ export default (function (props) {
32
80
  title: title,
33
81
  id: id,
34
82
  onCancel: onCancel,
35
- tabs: tabList,
83
+ tabs: config,
36
84
  contents: contentList,
37
- tabChose: "wr-score"
85
+ tabChose: (_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.key,
86
+ modalShow: modalShow,
87
+ tagList: [detail.withFacilityClass && {
88
+ color: 'blue',
89
+ value: detail.facilityClassName
90
+ }, detail.withFacilityStatus && {
91
+ color: 'green',
92
+ value: detail.facilityStatusName
93
+ }, detail.withDevice && {
94
+ color: 'green',
95
+ value: '已绑定设备'
96
+ }, !!detail.alarmNum && {
97
+ color: 'red',
98
+ value: "\u6B63\u5728\u62A5\u8B66 ".concat(detail.alarmNum)
99
+ }].filter(function (item) {
100
+ return !!item;
101
+ })
38
102
  })
39
103
  });
40
104
  });