@vtx/modals2 5.0.24 → 5.0.26

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 (58) hide show
  1. package/lib/index.js +2 -1
  2. package/lib/vtx-car-modal/api.js +241 -1
  3. package/lib/vtx-car-modal/components/Info/index.js +34 -9
  4. package/lib/vtx-car-modal/content/Common/BaseInfo/index.js +1 -1
  5. package/lib/vtx-car-modal/content/Jzlj/Alarm/Bottom.js +276 -0
  6. package/lib/vtx-car-modal/content/Jzlj/Alarm/index.js +155 -0
  7. package/lib/vtx-car-modal/content/Jzlj/Alarm/index.less +34 -0
  8. package/lib/vtx-car-modal/content/Jzlj/BaseInfo/index.js +256 -0
  9. package/lib/vtx-car-modal/content/Jzlj/BaseInfo/index.less +20 -0
  10. package/lib/vtx-car-modal/content/Jzlj/Collection/Chart.js +99 -0
  11. package/lib/vtx-car-modal/content/Jzlj/Collection/index.js +357 -0
  12. package/lib/vtx-car-modal/content/Jzlj/Collection/index.less +57 -0
  13. package/lib/vtx-car-modal/content/Jzlj/Dispose/Pies.js +77 -0
  14. package/lib/vtx-car-modal/content/Jzlj/Dispose/index.js +282 -0
  15. package/lib/vtx-car-modal/content/Jzlj/Dispose/index.less +53 -0
  16. package/lib/vtx-car-modal/content/Jzlj/RunCalendar/index.js +175 -0
  17. package/lib/vtx-car-modal/content/Jzlj/RunCalendar/index.less +12 -0
  18. package/lib/vtx-car-modal/content/Jzlj/index.js +12 -0
  19. package/lib/vtx-car-modal/content/Ljsy/BaseInfo/index.js +1 -1
  20. package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +1 -0
  21. package/lib/vtx-car-modal/content/index.js +2 -1
  22. package/lib/vtx-car-modal/imgs/jzlj/pjrcc_dark.png +0 -0
  23. package/lib/vtx-car-modal/imgs/jzlj/pjrcc_light.png +0 -0
  24. package/lib/vtx-car-modal/imgs/jzlj/pjryl_dark.png +0 -0
  25. package/lib/vtx-car-modal/imgs/jzlj/pjryl_light.png +0 -0
  26. package/lib/vtx-car-modal/imgs/jzlj/rl_lds_dark.png +0 -0
  27. package/lib/vtx-car-modal/imgs/jzlj/rl_lds_light.png +0 -0
  28. package/lib/vtx-car-modal/imgs/jzlj/rl_yl_dark.png +0 -0
  29. package/lib/vtx-car-modal/imgs/jzlj/rl_yl_light.png +0 -0
  30. package/lib/vtx-car-modal/index.js +65 -9
  31. package/lib/vtx-jzlj-df-tpd-modal/components/Collection/index.js +1 -1
  32. package/lib/vtx-jzlj-gcxm-modal/components/Collection/index.js +1 -1
  33. package/lib/vtx-jzlj-xnc-modal/components/Collection/index.js +1 -1
  34. package/lib/vtx-jzlj-ysqy-modal/api.js +37 -0
  35. package/lib/vtx-jzlj-ysqy-modal/components/Overview/index.js +79 -0
  36. package/lib/vtx-jzlj-ysqy-modal/components/Overview/index.less +17 -0
  37. package/lib/vtx-jzlj-ysqy-modal/components/index.js +2 -0
  38. package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_czz_dark.png +0 -0
  39. package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_czz_light.png +0 -0
  40. package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_syl_dark.png +0 -0
  41. package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_syl_light.png +0 -0
  42. package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_zsbl_dark.png +0 -0
  43. package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_zsbl_light.png +0 -0
  44. package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_zyyl_dark.png +0 -0
  45. package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_zyyl_light.png +0 -0
  46. package/lib/vtx-jzlj-ysqy-modal/imgs/overview_ctyl_pjrcc_dark.png +0 -0
  47. package/lib/vtx-jzlj-ysqy-modal/imgs/overview_ctyl_pjrcc_light.png +0 -0
  48. package/lib/vtx-jzlj-ysqy-modal/imgs/overview_ctyl_pjryl_dark.png +0 -0
  49. package/lib/vtx-jzlj-ysqy-modal/imgs/overview_ctyl_pjryl_light.png +0 -0
  50. package/lib/vtx-jzlj-ysqy-modal/imgs/overview_czz_zl_dark.png +0 -0
  51. package/lib/vtx-jzlj-ysqy-modal/imgs/overview_czz_zl_light.png +0 -0
  52. package/lib/vtx-jzlj-ysqy-modal/imgs/overview_czz_zs_dark.png +0 -0
  53. package/lib/vtx-jzlj-ysqy-modal/imgs/overview_czz_zs_light.png +0 -0
  54. package/lib/vtx-jzlj-ysqy-modal/index.js +72 -0
  55. package/lib/vtx-jzlj-ysqy-modal/style/index.js +1 -0
  56. package/lib/vtx-jzlj-ysqy-modal/style/index.less +1 -0
  57. package/lib/vtx-shxq-modal/api.js +2 -1
  58. package/package.json +1 -1
@@ -0,0 +1,282 @@
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 { useContext } from 'react';
16
+ import { VmFilter, VmTable, VmTag, VmWrapper } from "../../../../_components";
17
+ import { JzljService } from "../../../api";
18
+ import { CarContext } from "../../../index";
19
+ import "./index.less";
20
+ import Pies from "./Pies";
21
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
+ export default function Dispose() {
23
+ var _useContext = useContext(CarContext),
24
+ id = _useContext.id,
25
+ info = _useContext.info,
26
+ setIframeModalInfo = _useContext.setIframeModalInfo;
27
+ var _useSetState = useSetState({
28
+ activeKey: 'chart',
29
+ code: undefined,
30
+ endingPointName: undefined,
31
+ startingPointName: undefined,
32
+ effectiveStatusCode: undefined,
33
+ pieData: []
34
+ }),
35
+ _useSetState2 = _slicedToArray(_useSetState, 2),
36
+ state = _useSetState2[0],
37
+ setState = _useSetState2[1];
38
+ var activeKey = state.activeKey,
39
+ code = state.code,
40
+ endingPointName = state.endingPointName,
41
+ startingPointName = state.startingPointName,
42
+ effectiveStatusCode = state.effectiveStatusCode,
43
+ pieData = state.pieData;
44
+ var effectiveStatusList = JzljService.fetchJzljEnum('EffectiveStatusEnum');
45
+ var columns = [['运输单位', 'transportUnitName', {
46
+ width: 160,
47
+ ellipsis: true
48
+ }], ['运输起点', 'startingPointName', {
49
+ width: 160,
50
+ ellipsis: true
51
+ }], ['运输终点', 'endingPointName', {
52
+ width: 160,
53
+ ellipsis: true
54
+ }], ['运输垃圾类型', 'garbageTypeName', {
55
+ width: 100
56
+ }], ['运输量(吨)', 'transportWeight', {
57
+ width: 80,
58
+ align: 'right'
59
+ }], ['申报有效期', 'effectiveDate', {
60
+ width: 150
61
+ }], ['生效状态', 'effectiveStatusName', {
62
+ width: 100,
63
+ render: function render(text, record) {
64
+ var colorMap = {
65
+ wsx: 'yellow',
66
+ sxz: 'green',
67
+ ysx: 'red',
68
+ yzz: 'gray'
69
+ };
70
+ var color = colorMap[record.effectiveStatusCode] || 'yellow';
71
+ return /*#__PURE__*/_jsx(VmTag, {
72
+ title: text,
73
+ type: color
74
+ });
75
+ }
76
+ }], ['操作', 'action', {
77
+ width: 60,
78
+ render: function render(_, record) {
79
+ return /*#__PURE__*/_jsx("a", {
80
+ onClick: function onClick() {
81
+ setIframeModalInfo({
82
+ visible: true,
83
+ title: '处置证信息',
84
+ src: "/jzlj/#/disposalApprovalFill?id=".concat(record.id)
85
+ });
86
+ },
87
+ children: "\u67E5\u770B"
88
+ });
89
+ }
90
+ }]].map(function (item) {
91
+ return _objectSpread({
92
+ title: item[0],
93
+ dataIndex: item[1],
94
+ key: item[1]
95
+ }, item[2]);
96
+ });
97
+ var getTableData = function getTableData(_ref) {
98
+ var current = _ref.current,
99
+ pageSize = _ref.pageSize;
100
+ var formData = {
101
+ code: code,
102
+ endingPointName: endingPointName,
103
+ startingPointName: startingPointName,
104
+ effectiveStatusCode: effectiveStatusCode
105
+ };
106
+ JzljService.czzPie(_objectSpread({
107
+ id: id
108
+ }, formData)).then(function (res) {
109
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
110
+ setState({
111
+ pieData: (res === null || res === void 0 ? void 0 : res.data) || []
112
+ });
113
+ }
114
+ });
115
+ return JzljService.czzPage(_objectSpread(_objectSpread({}, formData), {}, {
116
+ carCode: info === null || info === void 0 ? void 0 : info.carCode,
117
+ page: current - 1,
118
+ size: pageSize
119
+ })).then(function (res) {
120
+ var _res$data, _res$data2;
121
+ return {
122
+ total: (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.total) || 0,
123
+ list: (res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.rows) || []
124
+ };
125
+ });
126
+ };
127
+ var _useAntdTable = useAntdTable(getTableData, {
128
+ defaultPageSize: 10
129
+ }),
130
+ tableProps = _useAntdTable.tableProps,
131
+ search = _useAntdTable.search;
132
+ var submit = search.submit,
133
+ reset = search.reset;
134
+ var myReset = function myReset() {
135
+ setState({
136
+ code: undefined,
137
+ endingPointName: undefined,
138
+ startingPointName: undefined,
139
+ effectiveStatusCode: undefined
140
+ });
141
+ reset();
142
+ };
143
+ var myTableProps = _objectSpread(_objectSpread({}, tableProps), {}, {
144
+ rowKey: 'id',
145
+ columns: columns
146
+ });
147
+ var searchList = [{
148
+ title: '处置证编号',
149
+ weight: 1,
150
+ dom: /*#__PURE__*/_jsx(VmFilter.VMInput, {
151
+ style: {
152
+ width: 120
153
+ },
154
+ value: code,
155
+ onValChange: function onValChange(val) {
156
+ setState({
157
+ code: val
158
+ });
159
+ }
160
+ })
161
+ }, {
162
+ title: '终点',
163
+ weight: 1,
164
+ dom: /*#__PURE__*/_jsx(VmFilter.VMInput, {
165
+ style: {
166
+ width: 120
167
+ },
168
+ value: endingPointName,
169
+ onValChange: function onValChange(val) {
170
+ setState({
171
+ endingPointName: val
172
+ });
173
+ }
174
+ })
175
+ }, {
176
+ title: '起点',
177
+ weight: 1,
178
+ dom: /*#__PURE__*/_jsx(VmFilter.VMInput, {
179
+ style: {
180
+ width: 120
181
+ },
182
+ value: startingPointName,
183
+ onValChange: function onValChange(val) {
184
+ setState({
185
+ startingPointName: val
186
+ });
187
+ }
188
+ })
189
+ }, {
190
+ title: '生效状态',
191
+ weight: 1,
192
+ dom: /*#__PURE__*/_jsx(VmFilter.VMSelect, {
193
+ options: effectiveStatusList.map(function (item) {
194
+ return {
195
+ value: item.value,
196
+ label: item.text
197
+ };
198
+ }),
199
+ style: {
200
+ width: 120
201
+ },
202
+ placeholder: "\u8BF7\u9009\u62E9",
203
+ value: effectiveStatusCode,
204
+ allowClear: true,
205
+ onChange: function onChange(val) {
206
+ setState({
207
+ effectiveStatusCode: val
208
+ });
209
+ }
210
+ })
211
+ }];
212
+ return /*#__PURE__*/_jsxs("div", {
213
+ className: "jzlj-car-dispose",
214
+ children: [/*#__PURE__*/_jsx("div", {
215
+ style: {
216
+ height: '56px'
217
+ },
218
+ children: /*#__PURE__*/_jsx(VmWrapper, {
219
+ title: "\u5904\u7F6E\u6838\u51C6\u4FE1\u606F",
220
+ showContent: false,
221
+ needChange: true,
222
+ headerStyle: {
223
+ borderBottom: 'unset'
224
+ },
225
+ activeKey: activeKey,
226
+ onChange: function onChange(key) {
227
+ return setState({
228
+ activeKey: key
229
+ });
230
+ }
231
+ })
232
+ }), /*#__PURE__*/_jsxs("div", {
233
+ className: "jzlj-car-dispose-myTable",
234
+ children: [/*#__PURE__*/_jsx("div", {
235
+ className: "jzlj-car-dispose-myTable-search",
236
+ children: /*#__PURE__*/_jsx(VmWrapper, {
237
+ showTitle: false,
238
+ children: /*#__PURE__*/_jsxs("div", {
239
+ className: "jzlj-car-dispose-myTable-search-main",
240
+ children: [/*#__PURE__*/_jsx("div", {
241
+ className: "jzlj-car-dispose-myTable-search-main-left",
242
+ children: searchList.map(function (item) {
243
+ return /*#__PURE__*/_jsxs("span", {
244
+ style: {
245
+ display: 'flex',
246
+ alignItems: 'center'
247
+ },
248
+ children: [/*#__PURE__*/_jsx("span", {
249
+ style: {
250
+ marginRight: 8
251
+ },
252
+ children: item.title
253
+ }), /*#__PURE__*/_jsx("span", {
254
+ children: item.dom
255
+ })]
256
+ }, item.title);
257
+ })
258
+ }), /*#__PURE__*/_jsxs("div", {
259
+ className: "jzlj-car-dispose-myTable-search-main-right",
260
+ children: [/*#__PURE__*/_jsx(Button, {
261
+ type: "primary",
262
+ onClick: submit,
263
+ children: "\u67E5\u8BE2"
264
+ }), /*#__PURE__*/_jsx(Button, {
265
+ onClick: myReset,
266
+ children: "\u91CD\u7F6E"
267
+ })]
268
+ })]
269
+ })
270
+ })
271
+ }), /*#__PURE__*/_jsx("div", {
272
+ className: "jzlj-car-dispose-myTable-main",
273
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
274
+ showTitle: false,
275
+ children: [activeKey === 'list' && /*#__PURE__*/_jsx(VmTable, _objectSpread({}, myTableProps)), activeKey === 'chart' && /*#__PURE__*/_jsx(Pies, {
276
+ pieData: pieData
277
+ })]
278
+ })
279
+ })]
280
+ })]
281
+ });
282
+ }
@@ -0,0 +1,53 @@
1
+ .jzlj-car-dispose {
2
+ width: 100%;
3
+ height: 100%;
4
+
5
+ &-pies-main {
6
+ margin-top: 16px;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: space-around;
10
+ height: 100%;
11
+ gap: 16px;
12
+
13
+ &-item {
14
+ height: 100%;
15
+ flex: 1;
16
+ }
17
+ }
18
+
19
+ &-myTable {
20
+ height: calc(100% - 56px - 18px);
21
+ margin-top: 16px;
22
+
23
+ &-search {
24
+ height: 65px;
25
+ margin-top: 16px;
26
+
27
+ &-main {
28
+ width: 100%;
29
+ height: 100%;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: space-between;
33
+
34
+ &-left {
35
+ display: flex;
36
+ align-items: center;
37
+ gap: 16px;
38
+ }
39
+
40
+ &-right {
41
+ display: flex;
42
+ align-items: center;
43
+ gap: 8px;
44
+ }
45
+ }
46
+ }
47
+
48
+ &-main {
49
+ height: calc(100% - 65px - 16px);
50
+ margin-top: 16px;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,175 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import dayjs from 'dayjs';
14
+ import { keyBy } from 'lodash';
15
+ import { useContext, useState } from 'react';
16
+ import { VmBarCharts, VmCalendar, VmCalendarInner, VmTable, VmWrapper } from "../../../../_components";
17
+ import useSettings from "../../../../_hooks/useSettings";
18
+ import { JzljService } from "../../../api";
19
+ import lds_dark from "../../../imgs/jzlj/rl_lds_dark.png";
20
+ import lds_light from "../../../imgs/jzlj/rl_lds_light.png";
21
+ import yl_dark from "../../../imgs/jzlj/rl_yl_dark.png";
22
+ import yl_light from "../../../imgs/jzlj/rl_yl_light.png";
23
+ import { CarContext } from "../../../index";
24
+ import "./index.less";
25
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
26
+ export default function RunCalendar() {
27
+ var _useSettings = useSettings(),
28
+ isDark = _useSettings.isDark;
29
+ var _useState = useState('calendar'),
30
+ _useState2 = _slicedToArray(_useState, 2),
31
+ type = _useState2[0],
32
+ setType = _useState2[1];
33
+ var _useContext = useContext(CarContext),
34
+ id = _useContext.id;
35
+ var _useState3 = useState(dayjs()),
36
+ _useState4 = _slicedToArray(_useState3, 2),
37
+ month = _useState4[0],
38
+ setMonth = _useState4[1];
39
+ var _JzljService$useYxfx = JzljService.useYxfx({
40
+ id: id,
41
+ startDate: month.startOf('M').format('YYYY-MM-DD'),
42
+ endDate: month.endOf('M').format('YYYY-MM-DD')
43
+ }),
44
+ _JzljService$useYxfx$ = _JzljService$useYxfx.yxfxData,
45
+ yxfxData = _JzljService$useYxfx$ === void 0 ? [] : _JzljService$useYxfx$,
46
+ loading = _JzljService$useYxfx.loading;
47
+ var keyByDate = keyBy(yxfxData || [], 'date');
48
+ var lds_icon = lds_light;
49
+ var yl_icon = yl_light;
50
+ if (isDark) {
51
+ lds_icon = lds_dark;
52
+ yl_icon = yl_dark;
53
+ }
54
+ var columns = [{
55
+ title: '日期',
56
+ dataIndex: 'date',
57
+ key: 'date',
58
+ width: 100
59
+ }, {
60
+ title: '联单数(次)',
61
+ dataIndex: 'count',
62
+ key: 'count',
63
+ width: 100
64
+ }, {
65
+ title: '运量(吨)',
66
+ dataIndex: 'weight',
67
+ key: 'weight',
68
+ width: 100
69
+ }];
70
+ var tableProps = {
71
+ pagination: false,
72
+ height: 440,
73
+ dataSource: yxfxData
74
+ };
75
+ var dateCellRender = function dateCellRender(value) {
76
+ var date = dayjs(value).format('YYYY-MM-DD');
77
+ var item = keyByDate[date];
78
+ if (!item) {
79
+ return null;
80
+ }
81
+ return /*#__PURE__*/_jsxs(_Fragment, {
82
+ children: [/*#__PURE__*/_jsx(VmCalendarInner, {
83
+ type: "blue",
84
+ img: lds_icon,
85
+ value: item.count + ' 次',
86
+ style: {
87
+ width: '139px',
88
+ justifyContent: 'space-between',
89
+ margin: '8px 0'
90
+ }
91
+ }), /*#__PURE__*/_jsx(VmCalendarInner, {
92
+ type: "green",
93
+ img: yl_icon,
94
+ value: item.weight + ' 吨',
95
+ style: {
96
+ width: '139px',
97
+ justifyContent: 'space-between'
98
+ }
99
+ })]
100
+ });
101
+ };
102
+ return /*#__PURE__*/_jsx("div", {
103
+ className: "vtx-jzlj-car-run-calendar",
104
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
105
+ title: '作业分析',
106
+ needChange: true,
107
+ showCalendar: true,
108
+ onChange: setType,
109
+ filterType: "monthPicker",
110
+ dateValue: month,
111
+ filterChange: setMonth,
112
+ disabledDate: function disabledDate(current) {
113
+ return current && current > dayjs().endOf('M');
114
+ },
115
+ children: [type === 'calendar' && /*#__PURE__*/_jsxs(_Fragment, {
116
+ children: [/*#__PURE__*/_jsx("div", {
117
+ className: "vtx-jzlj-car-run-calendar-head",
118
+ children: [{
119
+ name: '联单数(次)',
120
+ img: lds_icon,
121
+ type: 'blue'
122
+ }, {
123
+ name: '运量(吨)',
124
+ img: yl_icon,
125
+ type: 'green'
126
+ }].map(function (item, index) {
127
+ return /*#__PURE__*/_jsx(VmCalendarInner, _objectSpread(_objectSpread({}, item), {}, {
128
+ value: item.name
129
+ }), index);
130
+ })
131
+ }), /*#__PURE__*/_jsx("div", {
132
+ style: {
133
+ flex: 1,
134
+ minHeight: 0
135
+ },
136
+ children: /*#__PURE__*/_jsx(VmCalendar, {
137
+ dateCellRender: dateCellRender,
138
+ value: month
139
+ })
140
+ })]
141
+ }), type === 'list' && /*#__PURE__*/_jsx(VmTable, _objectSpread({
142
+ columns: columns,
143
+ rowKey: "id"
144
+ }, tableProps)), type === 'chart' && /*#__PURE__*/_jsx(VmBarCharts, {
145
+ dataList: [{
146
+ name: '联单数',
147
+ data: yxfxData.map(function (item) {
148
+ return "\u2000".concat(item.count);
149
+ })
150
+ }],
151
+ xAxis: yxfxData.map(function (item) {
152
+ return item.date;
153
+ }),
154
+ yAxisList: [{
155
+ key: "\u2000",
156
+ unit: '次',
157
+ name: '联单数(次)'
158
+ }, {
159
+ key: '',
160
+ unit: '吨',
161
+ name: '运量(吨)'
162
+ }],
163
+ unit: '吨',
164
+ lineList: [{
165
+ name: '运量',
166
+ data: yxfxData.map(function (item) {
167
+ return item.weight;
168
+ }),
169
+ yAxisIndex: 1
170
+ }],
171
+ loading: loading
172
+ })]
173
+ })
174
+ });
175
+ }
@@ -0,0 +1,12 @@
1
+ .vtx-jzlj-car-run-calendar {
2
+ width: 100%;
3
+ height: 100%;
4
+
5
+ .vtx-jzlj-car-run-calendar-head {
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ gap: 16px;
10
+ margin-bottom: 10px;
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ import Alarm from "./Alarm";
2
+ import BaseInfo from "./BaseInfo";
3
+ import Collection from "./Collection";
4
+ import Dispose from "./Dispose";
5
+ import RunCalendar from "./RunCalendar";
6
+ export default {
7
+ BaseInfo: BaseInfo,
8
+ Dispose: Dispose,
9
+ Collection: Collection,
10
+ Alarm: Alarm,
11
+ RunCalendar: RunCalendar
12
+ };
@@ -10,13 +10,13 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
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
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
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import { transformRgb } from "../../../../_util";
14
13
  import { Col, Row } from 'antd';
15
14
  import dayjs from 'dayjs';
16
15
  import * as echarts from 'echarts';
17
16
  import { useContext, useState } from 'react';
18
17
  import { VmBarCharts, VmFactor, VmLineCharts, VmProgress, VmWrapper } from "../../../../_components";
19
18
  import useSettings from "../../../../_hooks/useSettings";
19
+ import { transformRgb } from "../../../../_util";
20
20
  import { LjsyService } from "../../../api";
21
21
  import Info from "../../../components/Info";
22
22
  import darkTrashIcon from "../../../imgs/factor/dark_trash.png";
@@ -10,6 +10,7 @@ import * as echarts from 'echarts';
10
10
  import { useContext, useState } from 'react';
11
11
  import { VmBarCharts, VmFactor, VmLineCharts, VmWrapper } from "../../../../_components";
12
12
  import useSettings from "../../../../_hooks/useSettings";
13
+ import { transformRgb } from "../../../../_util";
13
14
  import { LjzyService } from "../../../api";
14
15
  import Info from "../../../components/Info";
15
16
  import carNumIcon from "../../../imgs/factor/car_num.png";
@@ -1,7 +1,8 @@
1
1
  import Cc from "./Cc";
2
2
  import Common from "./Common";
3
3
  import JXH from "./JXH";
4
+ import Jzlj from "./Jzlj";
4
5
  import Ljsy from "./Ljsy";
5
6
  import Ljzy from "./Ljzy";
6
7
  import Unmanned from "./Unmanned";
7
- export { Cc, Common, JXH, Ljsy, Ljzy, Unmanned };
8
+ export { Cc, Common, JXH, Jzlj, Ljsy, Ljzy, Unmanned };