@vtx/modals2 5.0.17 → 5.0.19

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 (113) hide show
  1. package/lib/_components/vm-bar-charts/index.js +5 -2
  2. package/lib/_components/vm-empty/index.js +4 -1
  3. package/lib/_components/vm-empty/style/index.less +4 -0
  4. package/lib/_components/vm-filter/index.js +4 -2
  5. package/lib/_components/vm-pie-charts/index.js +8 -1
  6. package/lib/_components/vm-table/style/index.less +12 -4
  7. package/lib/index.js +3 -1
  8. package/lib/vtx-default-modal/components/BaseInfo/index.less +1 -1
  9. package/lib/vtx-default-modal/index.js +0 -1
  10. package/lib/vtx-jzlj-df-tpd-modal/api.js +212 -0
  11. package/lib/vtx-jzlj-df-tpd-modal/components/Base/index.js +24 -0
  12. package/lib/vtx-jzlj-df-tpd-modal/components/Collection/Chart.js +96 -0
  13. package/lib/vtx-jzlj-df-tpd-modal/components/Collection/index.js +341 -0
  14. package/lib/vtx-jzlj-df-tpd-modal/components/Collection/index.less +57 -0
  15. package/lib/vtx-jzlj-df-tpd-modal/components/Dispose/FlowMap.js +208 -0
  16. package/lib/vtx-jzlj-df-tpd-modal/components/Dispose/index.js +378 -0
  17. package/lib/vtx-jzlj-df-tpd-modal/components/Dispose/index.less +65 -0
  18. package/lib/vtx-jzlj-df-tpd-modal/components/Overview/CTL.js +88 -0
  19. package/lib/vtx-jzlj-df-tpd-modal/components/Overview/CTYL.js +104 -0
  20. package/lib/vtx-jzlj-df-tpd-modal/components/Overview/CZZ.js +86 -0
  21. package/lib/vtx-jzlj-df-tpd-modal/components/Overview/index.js +92 -0
  22. package/lib/vtx-jzlj-df-tpd-modal/components/Overview/index.less +65 -0
  23. package/lib/vtx-jzlj-df-tpd-modal/components/index.js +5 -0
  24. package/lib/vtx-jzlj-df-tpd-modal/imgs/dispose_czz_dark.png +0 -0
  25. package/lib/vtx-jzlj-df-tpd-modal/imgs/dispose_czz_light.png +0 -0
  26. package/lib/vtx-jzlj-df-tpd-modal/imgs/dispose_syl_dark.png +0 -0
  27. package/lib/vtx-jzlj-df-tpd-modal/imgs/dispose_syl_light.png +0 -0
  28. package/lib/vtx-jzlj-df-tpd-modal/imgs/dispose_zsbl_dark.png +0 -0
  29. package/lib/vtx-jzlj-df-tpd-modal/imgs/dispose_zsbl_light.png +0 -0
  30. package/lib/vtx-jzlj-df-tpd-modal/imgs/dispose_zyyl_dark.png +0 -0
  31. package/lib/vtx-jzlj-df-tpd-modal/imgs/dispose_zyyl_light.png +0 -0
  32. package/lib/vtx-jzlj-df-tpd-modal/imgs/overview_ctyl_pjrcc_dark.png +0 -0
  33. package/lib/vtx-jzlj-df-tpd-modal/imgs/overview_ctyl_pjrcc_light.png +0 -0
  34. package/lib/vtx-jzlj-df-tpd-modal/imgs/overview_ctyl_pjryl_dark.png +0 -0
  35. package/lib/vtx-jzlj-df-tpd-modal/imgs/overview_ctyl_pjryl_light.png +0 -0
  36. package/lib/vtx-jzlj-df-tpd-modal/imgs/overview_czz_zl_dark.png +0 -0
  37. package/lib/vtx-jzlj-df-tpd-modal/imgs/overview_czz_zl_light.png +0 -0
  38. package/lib/vtx-jzlj-df-tpd-modal/imgs/overview_czz_zs_dark.png +0 -0
  39. package/lib/vtx-jzlj-df-tpd-modal/imgs/overview_czz_zs_light.png +0 -0
  40. package/lib/vtx-jzlj-df-tpd-modal/index.js +117 -0
  41. package/lib/vtx-jzlj-df-tpd-modal/style/index.js +1 -0
  42. package/lib/vtx-jzlj-df-tpd-modal/style/index.less +1 -0
  43. package/lib/vtx-jzlj-gcxm-modal/api.js +294 -0
  44. package/lib/vtx-jzlj-gcxm-modal/components/Alarm/Bottom.js +276 -0
  45. package/lib/vtx-jzlj-gcxm-modal/components/Alarm/index.js +185 -0
  46. package/lib/vtx-jzlj-gcxm-modal/components/Alarm/index.less +34 -0
  47. package/lib/vtx-jzlj-gcxm-modal/components/Base/index.js +6 -3
  48. package/lib/vtx-jzlj-gcxm-modal/components/Collection/Chart.js +96 -0
  49. package/lib/vtx-jzlj-gcxm-modal/components/Collection/index.js +341 -0
  50. package/lib/vtx-jzlj-gcxm-modal/components/Collection/index.less +57 -0
  51. package/lib/vtx-jzlj-gcxm-modal/components/Dispose/FlowMap.js +208 -0
  52. package/lib/vtx-jzlj-gcxm-modal/components/Dispose/index.js +394 -0
  53. package/lib/vtx-jzlj-gcxm-modal/components/Dispose/index.less +65 -0
  54. package/lib/vtx-jzlj-gcxm-modal/components/Overview/CTL.js +87 -0
  55. package/lib/vtx-jzlj-gcxm-modal/components/Overview/CTYL.js +104 -0
  56. package/lib/vtx-jzlj-gcxm-modal/components/Overview/CZZ.js +130 -0
  57. package/lib/vtx-jzlj-gcxm-modal/components/Overview/index.js +96 -0
  58. package/lib/vtx-jzlj-gcxm-modal/components/Overview/index.less +65 -0
  59. package/lib/vtx-jzlj-gcxm-modal/components/index.js +5 -1
  60. package/lib/vtx-jzlj-gcxm-modal/imgs/dispose_czz_dark.png +0 -0
  61. package/lib/vtx-jzlj-gcxm-modal/imgs/dispose_czz_light.png +0 -0
  62. package/lib/vtx-jzlj-gcxm-modal/imgs/dispose_syl_dark.png +0 -0
  63. package/lib/vtx-jzlj-gcxm-modal/imgs/dispose_syl_light.png +0 -0
  64. package/lib/vtx-jzlj-gcxm-modal/imgs/dispose_zsbl_dark.png +0 -0
  65. package/lib/vtx-jzlj-gcxm-modal/imgs/dispose_zsbl_light.png +0 -0
  66. package/lib/vtx-jzlj-gcxm-modal/imgs/dispose_zyyl_dark.png +0 -0
  67. package/lib/vtx-jzlj-gcxm-modal/imgs/dispose_zyyl_light.png +0 -0
  68. package/lib/vtx-jzlj-gcxm-modal/imgs/overview_ctyl_pjrcc_dark.png +0 -0
  69. package/lib/vtx-jzlj-gcxm-modal/imgs/overview_ctyl_pjrcc_light.png +0 -0
  70. package/lib/vtx-jzlj-gcxm-modal/imgs/overview_ctyl_pjryl_dark.png +0 -0
  71. package/lib/vtx-jzlj-gcxm-modal/imgs/overview_ctyl_pjryl_light.png +0 -0
  72. package/lib/vtx-jzlj-gcxm-modal/imgs/overview_czz_zl_dark.png +0 -0
  73. package/lib/vtx-jzlj-gcxm-modal/imgs/overview_czz_zl_light.png +0 -0
  74. package/lib/vtx-jzlj-gcxm-modal/imgs/overview_czz_zs_dark.png +0 -0
  75. package/lib/vtx-jzlj-gcxm-modal/imgs/overview_czz_zs_light.png +0 -0
  76. package/lib/vtx-jzlj-gcxm-modal/index.js +65 -24
  77. package/lib/vtx-jzlj-xnc-modal/api.js +212 -0
  78. package/lib/vtx-jzlj-xnc-modal/components/Base/index.js +23 -0
  79. package/lib/vtx-jzlj-xnc-modal/components/Collection/Chart.js +96 -0
  80. package/lib/vtx-jzlj-xnc-modal/components/Collection/index.js +341 -0
  81. package/lib/vtx-jzlj-xnc-modal/components/Collection/index.less +57 -0
  82. package/lib/vtx-jzlj-xnc-modal/components/Dispose/FlowMap.js +208 -0
  83. package/lib/vtx-jzlj-xnc-modal/components/Dispose/index.js +378 -0
  84. package/lib/vtx-jzlj-xnc-modal/components/Dispose/index.less +65 -0
  85. package/lib/vtx-jzlj-xnc-modal/components/Overview/CTL.js +88 -0
  86. package/lib/vtx-jzlj-xnc-modal/components/Overview/CTYL.js +104 -0
  87. package/lib/vtx-jzlj-xnc-modal/components/Overview/CZZ.js +116 -0
  88. package/lib/vtx-jzlj-xnc-modal/components/Overview/index.js +103 -0
  89. package/lib/vtx-jzlj-xnc-modal/components/Overview/index.less +65 -0
  90. package/lib/vtx-jzlj-xnc-modal/components/index.js +5 -0
  91. package/lib/vtx-jzlj-xnc-modal/imgs/dispose_czz_dark.png +0 -0
  92. package/lib/vtx-jzlj-xnc-modal/imgs/dispose_czz_light.png +0 -0
  93. package/lib/vtx-jzlj-xnc-modal/imgs/dispose_syl_dark.png +0 -0
  94. package/lib/vtx-jzlj-xnc-modal/imgs/dispose_syl_light.png +0 -0
  95. package/lib/vtx-jzlj-xnc-modal/imgs/dispose_zsbl_dark.png +0 -0
  96. package/lib/vtx-jzlj-xnc-modal/imgs/dispose_zsbl_light.png +0 -0
  97. package/lib/vtx-jzlj-xnc-modal/imgs/dispose_zyyl_dark.png +0 -0
  98. package/lib/vtx-jzlj-xnc-modal/imgs/dispose_zyyl_light.png +0 -0
  99. package/lib/vtx-jzlj-xnc-modal/imgs/overview_ctyl_pjrcc_dark.png +0 -0
  100. package/lib/vtx-jzlj-xnc-modal/imgs/overview_ctyl_pjrcc_light.png +0 -0
  101. package/lib/vtx-jzlj-xnc-modal/imgs/overview_ctyl_pjryl_dark.png +0 -0
  102. package/lib/vtx-jzlj-xnc-modal/imgs/overview_ctyl_pjryl_light.png +0 -0
  103. package/lib/vtx-jzlj-xnc-modal/imgs/overview_czz_zl_dark.png +0 -0
  104. package/lib/vtx-jzlj-xnc-modal/imgs/overview_czz_zl_light.png +0 -0
  105. package/lib/vtx-jzlj-xnc-modal/imgs/overview_czz_zs_dark.png +0 -0
  106. package/lib/vtx-jzlj-xnc-modal/imgs/overview_czz_zs_light.png +0 -0
  107. package/lib/vtx-jzlj-xnc-modal/index.js +114 -0
  108. package/lib/vtx-jzlj-xnc-modal/style/index.js +1 -0
  109. package/lib/vtx-jzlj-xnc-modal/style/index.less +1 -0
  110. package/lib/vtx-qyry-modal/api.js +1 -0
  111. package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +11 -2
  112. package/lib/vtx-tfd-modal/index.js +18 -2
  113. package/package.json +1 -1
@@ -0,0 +1,57 @@
1
+ .collection {
2
+ width: 100%;
3
+ height: 100%;
4
+
5
+ &-flowMap {
6
+ height: calc(100% - 56px - 18px);
7
+ margin-top: 16px;
8
+ border-radius: 8px;
9
+
10
+ .ol-map-container {
11
+ border-radius: 8px;
12
+ }
13
+
14
+ .ol-viewport {
15
+ border-radius: 8px;
16
+ }
17
+ }
18
+
19
+ &-myTable {
20
+ height: 100%;
21
+
22
+ &-total {
23
+ height: 85px;
24
+ }
25
+
26
+ &-search {
27
+ width: 100%;
28
+ height: 56px;
29
+ padding: 0 16px;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: space-between;
33
+ border-bottom: 1px solid #f1f0f0;
34
+
35
+ &.dark {
36
+ border-bottom: 1px solid rgba(12, 154, 255, 0.15);
37
+ }
38
+
39
+ &-left {
40
+ display: flex;
41
+ align-items: center;
42
+ gap: 16px;
43
+ }
44
+
45
+ &-right {
46
+ display: flex;
47
+ align-items: center;
48
+ gap: 8px;
49
+ }
50
+ }
51
+
52
+ &-main {
53
+ height: calc(100% - 85px - 65px);
54
+ padding: 0 16px;
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,208 @@
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 * as turf from '@turf/turf';
14
+ import { MapIcon } from '@vtx/map-icon';
15
+ import { FeatureLayer, FlyLineLayer, Legend, Map } from '@vtx/ol-map';
16
+ import { useEffect, useRef, useState } from 'react';
17
+ import useSettings from "../../../_hooks/useSettings";
18
+ import "./index.less";
19
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
+ export default function FlowMap(_ref) {
21
+ var _mapInfo$olProps, _turf$center2;
22
+ var _ref$flowData = _ref.flowData,
23
+ flowData = _ref$flowData === void 0 ? [] : _ref$flowData,
24
+ _ref$info = _ref.info,
25
+ info = _ref$info === void 0 ? {} : _ref$info;
26
+ console.log('%c🤪 ~ file: FlowMap.js:8 : ', 'color: #8873C5', flowData);
27
+ var _ref2 = info || {},
28
+ id = _ref2.id,
29
+ geometryInfo = _ref2.geometryInfo;
30
+ var _ref3 = geometryInfo || {},
31
+ type = _ref3.type,
32
+ lngLats = _ref3.lngLats;
33
+ var _useSettings = useSettings(),
34
+ isDark = _useSettings.isDark,
35
+ mapInfo = _useSettings.mapInfo;
36
+ var mapRef = useRef({});
37
+ var _useState = useState([]),
38
+ _useState2 = _slicedToArray(_useState, 2),
39
+ defaultCenter = _useState2[0],
40
+ setDefaultCenter = _useState2[1];
41
+ // 自定义图层逻辑,需要引入ol.js和olScreen.js
42
+ var layers = [];
43
+ mapInfo === null || mapInfo === void 0 || (_mapInfo$olProps = mapInfo.olProps) === null || _mapInfo$olProps === void 0 || _mapInfo$olProps.olCoverage.forEach(function (item) {
44
+ var _window;
45
+ if (item.coverage && (_window = window) !== null && _window !== void 0 && _window.ol) {
46
+ var _window2;
47
+ var temp = null;
48
+ if (item.type === 'superMap') {
49
+ temp = new window.ol.layer.Tile({
50
+ source: new window.ol.source.TileSuperMapRest({
51
+ url: item.coverage
52
+ })
53
+ });
54
+ } else if ((_window2 = window) !== null && _window2 !== void 0 && _window2.OL_SCREEN) {
55
+ // eslint-disable-next-line no-eval
56
+ temp = eval(window.OL_SCREEN[item.coverage].initLayer);
57
+ }
58
+ if (temp) {
59
+ layers = layers.concat(temp);
60
+ }
61
+ }
62
+ });
63
+ useEffect(function () {
64
+ if (mapInfo !== null && mapInfo !== void 0 && mapInfo.longitude) {
65
+ setDefaultCenter([mapInfo.longitude, mapInfo.latitude]);
66
+ }
67
+ }, [mapInfo]);
68
+ var mapProps = {
69
+ createdMap: function createdMap(viewer) {
70
+ var _mapRef$current;
71
+ mapRef.current = viewer;
72
+ mapRef === null || mapRef === void 0 || (_mapRef$current = mapRef.current) === null || _mapRef$current === void 0 || _mapRef$current.fitView();
73
+ },
74
+ center: defaultCenter.length > 0 ? defaultCenter.map(function (v) {
75
+ return Number(v);
76
+ }) : null,
77
+ // zoom: 16,
78
+ dark: isDark,
79
+ tk: '1adbb6e47668cb33757cd799548bf1f4',
80
+ customBaseLayers: layers.length > 0 ? function () {
81
+ return layers;
82
+ } : null
83
+ };
84
+ var startData = lngLats ? [{
85
+ name: info === null || info === void 0 ? void 0 : info.name,
86
+ geometryInfo: geometryInfo
87
+ }] : [],
88
+ endData = [],
89
+ endCenters = [];
90
+ flowData.map(function (item) {
91
+ var _item$endingPointAddr;
92
+ if (item !== null && item !== void 0 && (_item$endingPointAddr = item.endingPointAddress) !== null && _item$endingPointAddr !== void 0 && _item$endingPointAddr.lngLats) {
93
+ var _item$endingPointAddr2, _turf$center;
94
+ endData.push({
95
+ name: item.endingPointName,
96
+ geometryInfo: {
97
+ type: 'polygon',
98
+ lngLats: item.endingPointAddress.lngLats,
99
+ coordType: 'wgs84'
100
+ }
101
+ });
102
+ var endFeatures = turf.points((_item$endingPointAddr2 = item.endingPointAddress) === null || _item$endingPointAddr2 === void 0 || (_item$endingPointAddr2 = _item$endingPointAddr2.lngLats) === null || _item$endingPointAddr2 === void 0 ? void 0 : _item$endingPointAddr2.split(';').map(function (item) {
103
+ return item.split(',').map(function (item) {
104
+ return Number(item);
105
+ });
106
+ }));
107
+ endCenters.push((_turf$center = turf.center(endFeatures)) === null || _turf$center === void 0 || (_turf$center = _turf$center.geometry) === null || _turf$center === void 0 || (_turf$center = _turf$center.coordinates) === null || _turf$center === void 0 ? void 0 : _turf$center.join());
108
+ }
109
+ });
110
+ var startFeatures = turf.points(lngLats === null || lngLats === void 0 ? void 0 : lngLats.split(';').map(function (item) {
111
+ return item.split(',').map(function (item) {
112
+ return Number(item);
113
+ });
114
+ }));
115
+ var startCenter = (_turf$center2 = turf.center(startFeatures)) === null || _turf$center2 === void 0 || (_turf$center2 = _turf$center2.geometry) === null || _turf$center2 === void 0 || (_turf$center2 = _turf$center2.coordinates) === null || _turf$center2 === void 0 ? void 0 : _turf$center2.join();
116
+ var flyLineData = endCenters.map(function (item) {
117
+ return {
118
+ geometryInfo: {
119
+ coordType: 'wgs84',
120
+ lngLats: "".concat(startCenter, ";").concat(item),
121
+ type: 'polyline'
122
+ }
123
+ };
124
+ });
125
+ useEffect(function () {
126
+ if (mapRef !== null && mapRef !== void 0 && mapRef.current) {
127
+ var _mapRef$current2;
128
+ mapRef === null || mapRef === void 0 || (_mapRef$current2 = mapRef.current) === null || _mapRef$current2 === void 0 || _mapRef$current2.fitView([].concat(endData, startData), {
129
+ padding: [0, 0, 0, 0]
130
+ });
131
+ }
132
+ }, [mapRef === null || mapRef === void 0 ? void 0 : mapRef.current, JSON.stringify(endData), JSON.stringify(startData)]);
133
+
134
+ // if (!defaultCenter.length) {
135
+ // return null;
136
+ // }
137
+
138
+ return /*#__PURE__*/_jsx("div", {
139
+ className: "dispose-flowMap",
140
+ children: /*#__PURE__*/_jsxs(Map, _objectSpread(_objectSpread({}, mapProps), {}, {
141
+ children: [/*#__PURE__*/_jsx(Legend, {
142
+ style: {
143
+ left: 16,
144
+ bottom: 16
145
+ }
146
+ }), /*#__PURE__*/_jsx(FeatureLayer, {
147
+ data: startData,
148
+ style: {
149
+ type: 'Polygon',
150
+ style: {
151
+ stroke: {
152
+ color: '#3ab4b4',
153
+ opacity: 1,
154
+ width: 2
155
+ },
156
+ fill: {
157
+ color: '#3ab4b4',
158
+ opacity: 0.4
159
+ }
160
+ }
161
+ },
162
+ id: "start",
163
+ labelField: "name",
164
+ name: "\u8D77\u70B9",
165
+ legend: {
166
+ image: new MapIcon.Icon({
167
+ canvasIcon: 'AREA',
168
+ color: '#3ab4b4'
169
+ }).getImgUrl()
170
+ }
171
+ }), /*#__PURE__*/_jsx(FeatureLayer, {
172
+ data: endData,
173
+ style: {
174
+ type: 'Polygon',
175
+ style: {
176
+ stroke: {
177
+ color: '#2968eb',
178
+ opacity: 1,
179
+ width: 2
180
+ },
181
+ fill: {
182
+ color: '#2968eb',
183
+ opacity: 0.4
184
+ }
185
+ }
186
+ },
187
+ id: "end",
188
+ labelField: "name",
189
+ name: "\u7EC8\u70B9",
190
+ legend: {
191
+ image: new MapIcon.Icon({
192
+ canvasIcon: 'AREA',
193
+ color: '#2968eb'
194
+ }).getImgUrl()
195
+ }
196
+ }), (flyLineData === null || flyLineData === void 0 ? void 0 : flyLineData.length) > 0 && /*#__PURE__*/_jsx(FlyLineLayer, {
197
+ color: "#0080ff",
198
+ id: "fly_line_czz",
199
+ width: 3,
200
+ flyWidth: 6,
201
+ lineStyle: {
202
+ color: '#0080ff'
203
+ },
204
+ data: flyLineData
205
+ })]
206
+ }))
207
+ });
208
+ }
@@ -0,0 +1,394 @@
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, useSetState } from 'ahooks';
14
+ import { Button } from 'antd';
15
+ import React from 'react';
16
+ import { JzljGcxmContext } from "../..";
17
+ import { VmFactorList, VmFilter, VmTable, VmTag, VmWrapper } from "../../../_components";
18
+ import useSettings from "../../../_hooks/useSettings";
19
+ import { disposeApis, fetchJzljEnum, getByParamTypeCode, overviewApis } from "../../api";
20
+ import FlowMap from "./FlowMap";
21
+ import "./index.less";
22
+ import dispose_czz_dark from "../../imgs/dispose_czz_dark.png";
23
+ import dispose_czz_light from "../../imgs/dispose_czz_light.png";
24
+ import dispose_syl_dark from "../../imgs/dispose_syl_dark.png";
25
+ import dispose_syl_light from "../../imgs/dispose_syl_light.png";
26
+ import dispose_zsbl_dark from "../../imgs/dispose_zsbl_dark.png";
27
+ import dispose_zsbl_light from "../../imgs/dispose_zsbl_light.png";
28
+ import dispose_zyyl_dark from "../../imgs/dispose_zyyl_dark.png";
29
+ import dispose_zyyl_light from "../../imgs/dispose_zyyl_light.png";
30
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
31
+ export default function Dispose() {
32
+ var _React$useContext = React.useContext(JzljGcxmContext),
33
+ id = _React$useContext.id,
34
+ theme = _React$useContext.theme,
35
+ _React$useContext$inf = _React$useContext.info,
36
+ info = _React$useContext$inf === void 0 ? {} : _React$useContext$inf,
37
+ setIframeModalInfo = _React$useContext.setIframeModalInfo;
38
+ var _useSettings = useSettings(),
39
+ isDark = _useSettings.isDark;
40
+ var _useSetState = useSetState({
41
+ activeKey: 'chart',
42
+ transportUnitName: undefined,
43
+ endingPointName: undefined,
44
+ effectiveStatusCode: undefined,
45
+ garbageTypeCode: undefined,
46
+ flowData: []
47
+ }),
48
+ _useSetState2 = _slicedToArray(_useSetState, 2),
49
+ state = _useSetState2[0],
50
+ setState = _useSetState2[1];
51
+ var activeKey = state.activeKey,
52
+ transportUnitName = state.transportUnitName,
53
+ endingPointName = state.endingPointName,
54
+ effectiveStatusCode = state.effectiveStatusCode,
55
+ garbageTypeCode = state.garbageTypeCode,
56
+ flowData = state.flowData;
57
+ var effectiveStatusList = fetchJzljEnum('EffectiveStatusEnum');
58
+ var garbageTypeList = getByParamTypeCode('param_jzlj_disposal_garbage_type');
59
+ var columns = [['运输单位', 'transportUnitName', {
60
+ width: 160,
61
+ ellipsis: true
62
+ }], ['运输终点', 'endingPointName', {
63
+ width: 160,
64
+ ellipsis: true
65
+ }], ['运输垃圾类型', 'garbageTypeName', {
66
+ width: 100
67
+ }], ['运输量(吨)', 'transportWeight', {
68
+ width: 80,
69
+ align: 'right'
70
+ }], ['申报有效期', 'effectiveDate', {
71
+ width: 150
72
+ }], ['运输车辆(辆)', 'effectiveCarCount', {
73
+ width: 100,
74
+ align: 'right'
75
+ }], ['生效状态', 'effectiveStatusName', {
76
+ width: 100,
77
+ render: function render(text, record) {
78
+ var colorMap = {
79
+ wsx: 'yellow',
80
+ sxz: 'green',
81
+ ysx: 'red',
82
+ yzz: 'gray'
83
+ };
84
+ var color = colorMap[record.effectiveStatusCode] || 'yellow';
85
+ return /*#__PURE__*/_jsx(VmTag, {
86
+ title: text,
87
+ type: color
88
+ });
89
+ }
90
+ }], ['操作', 'action', {
91
+ width: 60,
92
+ render: function render(_, record) {
93
+ return /*#__PURE__*/_jsx("a", {
94
+ onClick: function onClick() {
95
+ setIframeModalInfo({
96
+ visible: true,
97
+ title: '处置证信息',
98
+ src: "/jzlj/#/disposalApprovalFill?id=".concat(record.id)
99
+ });
100
+ },
101
+ children: "\u67E5\u770B"
102
+ });
103
+ }
104
+ }]].map(function (item) {
105
+ return _objectSpread({
106
+ title: item[0],
107
+ dataIndex: item[1],
108
+ key: item[1]
109
+ }, item[2]);
110
+ });
111
+ var getTableData = function getTableData(_ref) {
112
+ var current = _ref.current,
113
+ pageSize = _ref.pageSize;
114
+ var formData = {
115
+ transportUnitName: transportUnitName,
116
+ endingPointName: endingPointName,
117
+ effectiveStatusCode: effectiveStatusCode,
118
+ garbageTypeCode: garbageTypeCode
119
+ };
120
+ disposeApis.list(_objectSpread(_objectSpread({}, formData), {}, {
121
+ startingPointId: id
122
+ })).then(function (res) {
123
+ setState({
124
+ flowData: (res === null || res === void 0 ? void 0 : res.data) || []
125
+ });
126
+ });
127
+ return disposeApis.page(_objectSpread(_objectSpread({}, formData), {}, {
128
+ startingPointId: id,
129
+ page: current - 1,
130
+ size: pageSize
131
+ })).then(function (res) {
132
+ var _res$data, _res$data2;
133
+ return {
134
+ total: (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.total) || 0,
135
+ list: (res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.rows) || []
136
+ };
137
+ });
138
+ };
139
+ var _useAntdTable = useAntdTable(getTableData, {
140
+ defaultPageSize: 10
141
+ }),
142
+ tableProps = _useAntdTable.tableProps,
143
+ search = _useAntdTable.search;
144
+ var submit = search.submit,
145
+ reset = search.reset;
146
+ var myReset = function myReset() {
147
+ setState({
148
+ transportUnitName: undefined,
149
+ endingPointName: undefined,
150
+ effectiveStatusCode: undefined,
151
+ garbageTypeCode: undefined
152
+ });
153
+ reset();
154
+ };
155
+ var myTableProps = _objectSpread(_objectSpread({}, tableProps), {}, {
156
+ rowKey: 'id',
157
+ columns: columns
158
+ });
159
+ var _overviewApis$useCzz = overviewApis.useCzz(id),
160
+ _overviewApis$useCzz$ = _overviewApis$useCzz.data,
161
+ totalData = _overviewApis$useCzz$ === void 0 ? {} : _overviewApis$useCzz$;
162
+ var _overviewApis$useCtl = overviewApis.useCtl(id),
163
+ _overviewApis$useCtl$ = _overviewApis$useCtl.data,
164
+ ctlData = _overviewApis$useCtl$ === void 0 ? {} : _overviewApis$useCtl$;
165
+ var _totalData$totalCzzCo = totalData.totalCzzCount,
166
+ totalCzzCount = _totalData$totalCzzCo === void 0 ? 0 : _totalData$totalCzzCo,
167
+ _totalData$yysWeight = totalData.yysWeight,
168
+ yysWeight = _totalData$yysWeight === void 0 ? 0 : _totalData$yysWeight,
169
+ _totalData$syWeight = totalData.syWeight,
170
+ syWeight = _totalData$syWeight === void 0 ? 0 : _totalData$syWeight;
171
+ var _ctlData$totalWeight = ctlData.totalWeight,
172
+ totalWeight = _ctlData$totalWeight === void 0 ? 0 : _ctlData$totalWeight;
173
+ var totalList = [{
174
+ name: '处置证数量',
175
+ unit: '单',
176
+ value: totalCzzCount,
177
+ unitStyle: {
178
+ fontSize: 14
179
+ },
180
+ style: {
181
+ flex: 1,
182
+ justifyContent: 'center',
183
+ alignItems: 'center'
184
+ },
185
+ img: isDark ? dispose_czz_dark : dispose_czz_light,
186
+ fontType: 'blue'
187
+ }, {
188
+ name: '总申报量',
189
+ unit: '吨',
190
+ value: totalWeight,
191
+ unitStyle: {
192
+ fontSize: 14
193
+ },
194
+ style: {
195
+ flex: 1,
196
+ justifyContent: 'center',
197
+ alignItems: 'center'
198
+ },
199
+ img: isDark ? dispose_zsbl_dark : dispose_zsbl_light,
200
+ fontType: 'green'
201
+ }, {
202
+ name: '总已运量',
203
+ unit: '吨',
204
+ value: yysWeight,
205
+ unitStyle: {
206
+ fontSize: 14
207
+ },
208
+ style: {
209
+ flex: 1,
210
+ justifyContent: 'center',
211
+ alignItems: 'center'
212
+ },
213
+ img: isDark ? dispose_zyyl_dark : dispose_zyyl_light,
214
+ fontType: 'purple'
215
+ }, {
216
+ name: '剩余量',
217
+ unit: '吨',
218
+ value: syWeight,
219
+ unitStyle: {
220
+ fontSize: 14
221
+ },
222
+ style: {
223
+ flex: 1,
224
+ justifyContent: 'center',
225
+ alignItems: 'center'
226
+ },
227
+ img: isDark ? dispose_syl_dark : dispose_syl_light,
228
+ fontType: 'yellow'
229
+ }];
230
+ var searchList = [{
231
+ title: '运输单位',
232
+ weight: 1,
233
+ dom: /*#__PURE__*/_jsx(VmFilter.VMInput, {
234
+ style: {
235
+ width: 120
236
+ },
237
+ value: transportUnitName,
238
+ onValChange: function onValChange(val) {
239
+ setState({
240
+ transportUnitName: val
241
+ });
242
+ }
243
+ })
244
+ }, {
245
+ title: '运输终点',
246
+ weight: 1,
247
+ dom: /*#__PURE__*/_jsx(VmFilter.VMInput, {
248
+ style: {
249
+ width: 120
250
+ },
251
+ value: endingPointName,
252
+ onValChange: function onValChange(val) {
253
+ setState({
254
+ endingPointName: val
255
+ });
256
+ }
257
+ })
258
+ }, {
259
+ title: '生效状态',
260
+ weight: 1,
261
+ dom: /*#__PURE__*/_jsx(VmFilter.VMSelect, {
262
+ options: effectiveStatusList.map(function (item) {
263
+ return {
264
+ value: item.value,
265
+ label: item.text
266
+ };
267
+ }),
268
+ style: {
269
+ width: 120
270
+ },
271
+ placeholder: "\u8BF7\u9009\u62E9",
272
+ value: effectiveStatusCode,
273
+ allowClear: true,
274
+ onChange: function onChange(val) {
275
+ setState({
276
+ effectiveStatusCode: val
277
+ });
278
+ }
279
+ })
280
+ }, {
281
+ title: '运输垃圾类型',
282
+ weight: 1,
283
+ dom: /*#__PURE__*/_jsx(VmFilter.VMSelect, {
284
+ options: garbageTypeList.map(function (item) {
285
+ return {
286
+ value: item.parmCode,
287
+ label: item.parmName
288
+ };
289
+ }),
290
+ style: {
291
+ width: 120
292
+ },
293
+ placeholder: "\u8BF7\u9009\u62E9",
294
+ value: garbageTypeCode,
295
+ onChange: function onChange(val) {
296
+ setState({
297
+ garbageTypeCode: val
298
+ });
299
+ }
300
+ })
301
+ }];
302
+ return /*#__PURE__*/_jsxs("div", {
303
+ className: "dispose",
304
+ children: [/*#__PURE__*/_jsx("div", {
305
+ children: /*#__PURE__*/_jsx(VmWrapper, {
306
+ showContent: false,
307
+ needChange: true,
308
+ headerStyle: {
309
+ height: '56px',
310
+ padding: 0,
311
+ borderBottom: 'unset'
312
+ },
313
+ extraStyle: {
314
+ left: '16px',
315
+ right: 'unset',
316
+ top: '50%',
317
+ transform: 'translateY(-50%)'
318
+ },
319
+ activeKey: activeKey,
320
+ onChange: function onChange(key) {
321
+ return setState({
322
+ activeKey: key
323
+ });
324
+ }
325
+ })
326
+ }), /*#__PURE__*/_jsx(_Fragment, {
327
+ children: activeKey === 'chart' ? /*#__PURE__*/_jsx(FlowMap, {
328
+ flowData: flowData,
329
+ info: info
330
+ }) : /*#__PURE__*/_jsxs("div", {
331
+ className: "dispose-myTable",
332
+ children: [/*#__PURE__*/_jsx("div", {
333
+ className: "dispose-myTable-total",
334
+ children: /*#__PURE__*/_jsx(VmWrapper, {
335
+ showTitle: false,
336
+ contentStyle: {
337
+ padding: 0
338
+ },
339
+ children: /*#__PURE__*/_jsx(VmFactorList, {
340
+ list: totalList,
341
+ style: {
342
+ background: 'unset',
343
+ height: '100%'
344
+ }
345
+ })
346
+ })
347
+ }), /*#__PURE__*/_jsx("div", {
348
+ className: "dispose-myTable-search",
349
+ children: /*#__PURE__*/_jsx(VmWrapper, {
350
+ showTitle: false,
351
+ children: /*#__PURE__*/_jsxs("div", {
352
+ className: "dispose-myTable-search-main",
353
+ children: [/*#__PURE__*/_jsx("div", {
354
+ className: "dispose-myTable-search-main-left",
355
+ children: searchList.map(function (item) {
356
+ return /*#__PURE__*/_jsxs("span", {
357
+ style: {
358
+ display: 'flex',
359
+ alignItems: 'center'
360
+ },
361
+ children: [/*#__PURE__*/_jsx("span", {
362
+ style: {
363
+ marginRight: 8
364
+ },
365
+ children: item.title
366
+ }), /*#__PURE__*/_jsx("span", {
367
+ children: item.dom
368
+ })]
369
+ }, item.title);
370
+ })
371
+ }), /*#__PURE__*/_jsxs("div", {
372
+ className: "dispose-myTable-search-main-right",
373
+ children: [/*#__PURE__*/_jsx(Button, {
374
+ type: "primary",
375
+ onClick: submit,
376
+ children: "\u67E5\u8BE2"
377
+ }), /*#__PURE__*/_jsx(Button, {
378
+ onClick: myReset,
379
+ children: "\u91CD\u7F6E"
380
+ })]
381
+ })]
382
+ })
383
+ })
384
+ }), /*#__PURE__*/_jsx("div", {
385
+ className: "dispose-myTable-main",
386
+ children: /*#__PURE__*/_jsx(VmWrapper, {
387
+ showTitle: false,
388
+ children: /*#__PURE__*/_jsx(VmTable, _objectSpread({}, myTableProps))
389
+ })
390
+ })]
391
+ })
392
+ })]
393
+ });
394
+ }