@vtx/modals2 5.0.8 → 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 +125 -38
  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 -33
  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 +124 -30
  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
@@ -4,50 +4,178 @@ 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
- import { VmLineCharts, VmTable } from '@/_components';
8
- import { VMDatePicker, VMSelect } from '@/_components/vm-filter';
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';
9
15
  import { Tabs } from 'antd';
16
+ import dayjs from 'dayjs';
17
+ import { useEffect, useState } from 'react';
18
+ import { VmLineCharts, VmTable } from "../../../_components";
19
+ import { VMDatePicker, VMRangePicker, VMSelect } from "../../../_components/vm-filter";
10
20
  import Jbxx from "./Jbxx";
11
- import Sjjg from "./Sjjg";
21
+ import Ptss from "./Ptss";
22
+
23
+ //公厕详情
12
24
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
+ var getDetail = function getDetail(params) {
26
+ return request.get('/cloud/zhgc-reborn/api/gis/pop/getById', {
27
+ data: params
28
+ });
29
+ };
30
+ //公厕配置字段
31
+ var getFields = function getFields(params) {
32
+ return request.get('/cloud/jcss-reborn/facility/type/view/detail', {
33
+ data: params
34
+ });
35
+ };
36
+
37
+ //监测指标
38
+ var getMonitorType = function getMonitorType(params) {
39
+ return request.get('/cloud/zhgc-reborn/api/kanban/getMonitorType', {
40
+ data: params
41
+ });
42
+ };
43
+ var monitorItemEcharts = function monitorItemEcharts(params) {
44
+ return request.get('/cloud/zhgc-reborn/api/kanban/monitorItemEcharts', {
45
+ data: params
46
+ });
47
+ };
48
+ var getAlarmList = function getAlarmList(params) {
49
+ return request.post('/cloud/device/alarmInfo/list', {
50
+ data: JSON.stringify(params)
51
+ });
52
+ };
13
53
  export default (function (props) {
54
+ var _monitorTypeList$filt;
55
+ var theme = props.theme,
56
+ id = props.id;
57
+ var _useState = useState({}),
58
+ _useState2 = _slicedToArray(_useState, 2),
59
+ gcDetail = _useState2[0],
60
+ setGcDetail = _useState2[1];
61
+ var _useState3 = useState([]),
62
+ _useState4 = _slicedToArray(_useState3, 2),
63
+ fields = _useState4[0],
64
+ setFields = _useState4[1];
65
+ var _useState5 = useState('data'),
66
+ _useState6 = _slicedToArray(_useState5, 2),
67
+ activeKey = _useState6[0],
68
+ setActiveKey = _useState6[1];
69
+ var _useSetState = useSetState({
70
+ monitorTypeList: [],
71
+ monitorTypeCode: '',
72
+ frequency: '',
73
+ startDate: '',
74
+ endDate: '',
75
+ echartsData: {
76
+ legends: [],
77
+ names: [],
78
+ values: [],
79
+ maxData: 0,
80
+ levelData: []
81
+ },
82
+ date: dayjs().format('YYYY-MM-DD'),
83
+ alarmList: []
84
+ }),
85
+ _useSetState2 = _slicedToArray(_useSetState, 2),
86
+ state = _useSetState2[0],
87
+ setState = _useSetState2[1];
88
+ var monitorTypeList = state.monitorTypeList,
89
+ monitorTypeCode = state.monitorTypeCode,
90
+ frequency = state.frequency,
91
+ startDate = state.startDate,
92
+ endDate = state.endDate,
93
+ echartsData = state.echartsData,
94
+ date = state.date,
95
+ alarmList = state.alarmList;
96
+ useEffect(function () {
97
+ if (id) {
98
+ getDetail({
99
+ id: id
100
+ }).then(function (res) {
101
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
102
+ setGcDetail(res.data || {});
103
+ }
104
+ });
105
+ getFields({
106
+ code: 'wr'
107
+ }).then(function (res) {
108
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
109
+ setFields(res.data.baseFields.concat(res.data.customFields));
110
+ }
111
+ });
112
+ getMonitorType({
113
+ facilityId: id
114
+ }).then(function (res) {
115
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
116
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
117
+ var _res$data$, _res$data$2;
118
+ var _monitorTypeCode = (_res$data$ = res.data[0]) === null || _res$data$ === void 0 ? void 0 : _res$data$.monitorTypeCode;
119
+ setState({
120
+ monitorTypeList: res.data,
121
+ monitorTypeCode: (_res$data$2 = res.data[0]) === null || _res$data$2 === void 0 ? void 0 : _res$data$2.monitorTypeCode,
122
+ frequency: _monitorTypeCode === 'GC_PERSON_NUM' || _monitorTypeCode === 'GC_ELECTRICITY_USE' || _monitorTypeCode === 'GC_WATER_USE' ? 'hour' : 'day',
123
+ startDate: dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
124
+ endDate: dayjs().format('YYYY-MM-DD HH:mm:ss')
125
+ });
126
+ }
127
+ }
128
+ });
129
+ }
130
+ }, [id]);
131
+ var store = _objectSpread(_objectSpread({}, props), {}, {
132
+ gcDetail: gcDetail,
133
+ fields: fields
134
+ });
14
135
  var columns = [{
15
136
  title: '监测指标',
16
- dataIndex: 'shiftDate',
17
- key: 'shiftDate',
137
+ dataIndex: 'factorName',
138
+ key: 'factorName',
18
139
  width: 100
19
140
  }, {
20
141
  title: '报警等级',
21
- dataIndex: 'shiftDate',
22
- key: 'shiftDate',
142
+ dataIndex: 'alarmLevelName',
143
+ key: 'alarmLevelName',
23
144
  width: 100
24
145
  }, {
25
146
  title: '监测开始时间',
26
- dataIndex: 'shiftDate',
27
- key: 'shiftDate',
147
+ dataIndex: 'alarmStartTime',
148
+ key: 'alarmStartTime',
28
149
  width: 100
29
150
  }, {
30
151
  title: '监测结束时间',
31
- dataIndex: 'shiftDate',
32
- key: 'shiftDate',
152
+ dataIndex: 'alarmEndTime',
153
+ key: 'alarmEndTime',
33
154
  width: 100
34
155
  }];
35
156
  var tableProps = {
36
157
  columns: columns,
37
- height: 240,
158
+ height: 220,
38
159
  isIndex: false,
39
- pagination: false
160
+ pagination: false,
161
+ dataSource: alarmList
40
162
  };
41
163
  var items = [{
42
164
  label: '监测数据',
43
165
  key: 'data',
44
166
  children: /*#__PURE__*/_jsx(VmLineCharts, {
45
- height: 240,
46
- xAxis: ['2025-11-20', '2025-11-21', '2025-11-22', '2025-11-23', '2025-11-24'],
47
- dataList: [{
48
- data: [10, 20, 30, 40, 50]
49
- }],
50
- unit: "\u6B21"
167
+ height: 260,
168
+ xAxis: echartsData.names || [],
169
+ dataList: (echartsData.values || []).map(function (item, index) {
170
+ return {
171
+ name: echartsData.legends[index],
172
+ data: item,
173
+ smooth: true
174
+ };
175
+ }),
176
+ unit: ((_monitorTypeList$filt = monitorTypeList.filter(function (item) {
177
+ return item.monitorTypeCode === monitorTypeCode;
178
+ })[0]) === null || _monitorTypeList$filt === void 0 ? void 0 : _monitorTypeList$filt.unit) || ''
51
179
  })
52
180
  },
53
181
  // 务必填写 key
@@ -79,6 +207,100 @@ export default (function (props) {
79
207
  name: '前日',
80
208
  value: 'yesterdayB'
81
209
  }];
210
+ var getFrequency = function getFrequency() {
211
+ if (monitorTypeCode === 'GC_PERSON_NUM' || monitorTypeCode === 'GC_ELECTRICITY_USE' || monitorTypeCode === 'GC_WATER_USE') {
212
+ return frequencyListA;
213
+ } else {
214
+ return frequencyListB;
215
+ }
216
+ };
217
+ useEffect(function () {
218
+ switch (frequency) {
219
+ case 'hour':
220
+ setState({
221
+ startDate: dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
222
+ endDate: dayjs().format('YYYY-MM-DD HH:mm:ss')
223
+ });
224
+ break;
225
+ case 'month':
226
+ setState({
227
+ startDate: dayjs().startOf('month').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
228
+ endDate: dayjs().format('YYYY-MM-DD HH:mm:ss')
229
+ });
230
+ break;
231
+ case 'day':
232
+ setState({
233
+ startDate: dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
234
+ endDate: dayjs().format('YYYY-MM-DD HH:mm:ss')
235
+ });
236
+ break;
237
+ case 'yesterday':
238
+ setState({
239
+ startDate: dayjs().subtract(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
240
+ endDate: dayjs().subtract(1, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss')
241
+ });
242
+ break;
243
+ case 'yesterdayB':
244
+ setState({
245
+ startDate: dayjs().subtract(2, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
246
+ endDate: dayjs().subtract(2, 'day').endOf('day').format('YYYY-MM-DD HH:mm:ss')
247
+ });
248
+ break;
249
+ }
250
+ }, [frequency]);
251
+ useEffect(function () {
252
+ if (monitorTypeCode) {
253
+ if (monitorTypeCode === 'GC_PERSON_NUM' || monitorTypeCode === 'GC_ELECTRICITY_USE' || monitorTypeCode === 'GC_WATER_USE') {
254
+ setState({
255
+ frequency: 'hour',
256
+ startDate: dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
257
+ endDate: dayjs().format('YYYY-MM-DD HH:mm:ss')
258
+ });
259
+ } else {
260
+ setState({
261
+ frequency: 'day',
262
+ startDate: dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
263
+ endDate: dayjs().format('YYYY-MM-DD HH:mm:ss')
264
+ });
265
+ }
266
+ }
267
+ }, [monitorTypeCode]);
268
+ useEffect(function () {
269
+ startDate && endDate && activeKey === 'data' && getData();
270
+ }, [startDate, endDate, activeKey]);
271
+ var getData = function getData() {
272
+ monitorItemEcharts({
273
+ facilityId: gcDetail.id,
274
+ startDate: startDate,
275
+ endDate: endDate,
276
+ monitorTypeCode: monitorTypeCode,
277
+ frequency: frequency === 'month' ? 'month' : 'hour'
278
+ }).then(function (res) {
279
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
280
+ setState({
281
+ echartsData: res.data
282
+ });
283
+ }
284
+ });
285
+ };
286
+ var getList = function getList() {
287
+ return getAlarmList({
288
+ facilityIds: [gcDetail.id],
289
+ alarmStatuses: ['OCCURRING'],
290
+ alarmTypes: ['FACTOR'],
291
+ alarmStartTimeBegin: dayjs(date).startOf('day').format('YYYY-MM-DD HH:mm:ss'),
292
+ alarmStartTimeEnd: dayjs(date).endOf('day').format('YYYY-MM-DD HH:mm:ss')
293
+ }).then(function (res) {
294
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
295
+ setState({
296
+ alarmList: res.data
297
+ });
298
+ }
299
+ });
300
+ };
301
+ useEffect(function () {
302
+ date && activeKey === 'list' && getList();
303
+ }, [date, activeKey]);
82
304
  return /*#__PURE__*/_jsxs("div", {
83
305
  className: "wr-base-content",
84
306
  children: [/*#__PURE__*/_jsxs("div", {
@@ -86,38 +308,102 @@ export default (function (props) {
86
308
  children: [/*#__PURE__*/_jsx("div", {
87
309
  className: "wr-base-title",
88
310
  children: "\u57FA\u672C\u4FE1\u606F"
89
- }), /*#__PURE__*/_jsx(Jbxx, _objectSpread({}, props))]
311
+ }), /*#__PURE__*/_jsx(Jbxx, _objectSpread({}, store))]
90
312
  }), /*#__PURE__*/_jsxs("div", {
91
313
  className: "wr-base-right",
92
314
  children: [/*#__PURE__*/_jsxs("div", {
93
315
  className: "wr-base-sjjg",
94
316
  children: [/*#__PURE__*/_jsx("div", {
95
317
  className: "wr-base-title",
96
- children: "\u6570\u636E\u76D1\u7BA1"
97
- }), /*#__PURE__*/_jsx(Sjjg, _objectSpread({}, props))]
98
- }), /*#__PURE__*/_jsxs("div", {
318
+ children: "\u914D\u5957\u8BBE\u65BD"
319
+ }), /*#__PURE__*/_jsx(Ptss, _objectSpread({}, store))]
320
+ }), gcDetail.hasDevice && /*#__PURE__*/_jsxs("div", {
99
321
  className: "wr-base-jcbj",
100
322
  children: [/*#__PURE__*/_jsx(Tabs, {
101
- items: items
102
- }), /*#__PURE__*/_jsxs("div", {
323
+ items: items,
324
+ onChange: function onChange(value) {
325
+ return setActiveKey(value);
326
+ }
327
+ }), activeKey === 'data' && /*#__PURE__*/_jsxs("div", {
103
328
  className: "wr-jcbj-search",
104
- children: [frequencyListB.map(function (item) {
329
+ children: [getFrequency().map(function (item) {
105
330
  return /*#__PURE__*/_jsx("div", {
331
+ style: {
332
+ cursor: 'pointer',
333
+ color: item.value === frequency ? theme === 'blue' ? '#009DFF' : '#1677FF' : theme === 'blue' ? '#fff' : '#1f1f1f'
334
+ },
335
+ onClick: function onClick() {
336
+ return setState({
337
+ frequency: item.value
338
+ });
339
+ },
106
340
  children: item.name
107
- }, item.key);
108
- }), /*#__PURE__*/_jsx(VMDatePicker, {
341
+ }, item.value);
342
+ }), startDate && (frequency === 'month' ? /*#__PURE__*/_jsx(VMRangePicker, {
343
+ style: {
344
+ width: 200
345
+ },
346
+ picker: "month",
347
+ value: [dayjs(startDate), dayjs(endDate)],
348
+ disabledDate: function disabledDate(current) {
349
+ return current && current > dayjs().endOf('month');
350
+ },
351
+ onChange: function onChange(date) {
352
+ return setState({
353
+ startDate: dayjs(date[0]).startOf('month').format('YYYY-MM-DD HH:mm:ss'),
354
+ endDate: dayjs(date[1]).endOf('month').format('YYYY-MM-DD HH:mm:ss')
355
+ });
356
+ }
357
+ }) : /*#__PURE__*/_jsx(VMDatePicker, {
109
358
  style: {
110
359
  width: 140
360
+ },
361
+ value: dayjs(startDate),
362
+ disabledDate: function disabledDate(current) {
363
+ return current && current > dayjs().endOf('day');
364
+ },
365
+ onChange: function onChange(date) {
366
+ return setState({
367
+ startDate: dayjs(date).startOf('day').format('YYYY-MM-DD HH:mm:ss'),
368
+ endDate: dayjs(date).endOf('day').format('YYYY-MM-DD HH:mm:ss')
369
+ });
111
370
  }
112
- }), /*#__PURE__*/_jsx(VMSelect, {
371
+ })), /*#__PURE__*/_jsx(VMSelect, {
113
372
  style: {
114
373
  width: 140
115
374
  },
116
- options: [{
117
- label: '日',
118
- value: 'day'
119
- }]
375
+ options: monitorTypeList.map(function (item) {
376
+ return {
377
+ label: item.monitorTypeName,
378
+ value: item.monitorTypeCode
379
+ };
380
+ }),
381
+ value: monitorTypeCode,
382
+ onChange: function onChange(value) {
383
+ return setState({
384
+ monitorTypeCode: value,
385
+ frequency: '',
386
+ startDate: '',
387
+ endDate: ''
388
+ });
389
+ }
120
390
  })]
391
+ }), activeKey === 'list' && /*#__PURE__*/_jsx("div", {
392
+ className: "wr-jcbj-search",
393
+ children: /*#__PURE__*/_jsx(VMDatePicker, {
394
+ style: {
395
+ width: 140
396
+ },
397
+ value: dayjs(date),
398
+ disabledDate: function disabledDate(current) {
399
+ return current && current > dayjs().endOf('day');
400
+ },
401
+ onChange: function onChange(_, dateStr) {
402
+ return setState({
403
+ date: dateStr
404
+ });
405
+ }
406
+ })
121
407
  })]
122
408
  })]
123
409
  })]