@vtx/modals2 2.10.46 → 2.10.48

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 (67) hide show
  1. package/lib/style/css.js +1 -0
  2. package/lib/style/css.js.map +1 -1
  3. package/lib/style/index.js +1 -0
  4. package/lib/style/index.js.map +1 -1
  5. package/lib/util/index.js +10 -0
  6. package/lib/util/index.js.map +1 -1
  7. package/lib/vm-alarm-info/Components/AlarmRank.js +87 -0
  8. package/lib/vm-alarm-info/Components/AlarmRank.js.map +1 -0
  9. package/lib/vm-alarm-info/Components/AlarmRecord.js +126 -41
  10. package/lib/vm-alarm-info/Components/AlarmRecord.js.map +1 -1
  11. package/lib/vm-alarm-info/Components/AlarmStatistics.js +132 -64
  12. package/lib/vm-alarm-info/Components/AlarmStatistics.js.map +1 -1
  13. package/lib/vm-alarm-info/Components/CurrentAlarm.js +67 -13
  14. package/lib/vm-alarm-info/Components/CurrentAlarm.js.map +1 -1
  15. package/lib/vm-alarm-info/Components/index.css +22 -0
  16. package/lib/vm-alarm-info/Components/index.less +27 -0
  17. package/lib/vm-alarm-info/api.js +102 -47
  18. package/lib/vm-alarm-info/api.js.map +1 -1
  19. package/lib/vm-alarm-info/index.js +32 -9
  20. package/lib/vm-alarm-info/index.js.map +1 -1
  21. package/lib/vm-common-components/components/vm-chart/index.js +4 -2
  22. package/lib/vm-common-components/components/vm-chart/index.js.map +1 -1
  23. package/lib/vm-common-components/components/vm-nodata/index.js +4 -0
  24. package/lib/vm-common-components/components/vm-nodata/index.js.map +1 -1
  25. package/lib/vm-common-components/components/vm-water-wave/index.js +3 -2
  26. package/lib/vm-common-components/components/vm-water-wave/index.js.map +1 -1
  27. package/lib/vm-table/index.js +1 -5
  28. package/lib/vm-table/index.js.map +1 -1
  29. package/lib/vtx-hz-facility-modal/api.js +654 -465
  30. package/lib/vtx-hz-facility-modal/api.js.map +1 -1
  31. package/lib/vtx-hz-facility-modal/components/BJGK/index.js +6 -2
  32. package/lib/vtx-hz-facility-modal/components/BJGK/index.js.map +1 -1
  33. package/lib/vtx-hz-facility-modal/components/BaseInfo/index.js +8 -4
  34. package/lib/vtx-hz-facility-modal/components/BaseInfo/index.js.map +1 -1
  35. package/lib/vtx-hz-facility-modal/components/DetectedData/index.js +151 -52
  36. package/lib/vtx-hz-facility-modal/components/DetectedData/index.js.map +1 -1
  37. package/lib/vtx-hz-facility-modal/components/FacilityFile1/index.js +10 -4
  38. package/lib/vtx-hz-facility-modal/components/FacilityFile1/index.js.map +1 -1
  39. package/lib/vtx-hz-facility-modal/components/FacilityFile2/index.js +19 -8
  40. package/lib/vtx-hz-facility-modal/components/FacilityFile2/index.js.map +1 -1
  41. package/lib/vtx-hz-facility-modal/components/Flaw/index.js +6 -2
  42. package/lib/vtx-hz-facility-modal/components/Flaw/index.js.map +1 -1
  43. package/lib/vtx-hz-facility-modal/components/HealthRadar/index.js +7 -3
  44. package/lib/vtx-hz-facility-modal/components/HealthRadar/index.js.map +1 -1
  45. package/lib/vtx-hz-facility-modal/components/MonitorData/index.js +32 -31
  46. package/lib/vtx-hz-facility-modal/components/MonitorData/index.js.map +1 -1
  47. package/lib/vtx-hz-facility-modal/components/OverViewInfo1/index.js +101 -62
  48. package/lib/vtx-hz-facility-modal/components/OverViewInfo1/index.js.map +1 -1
  49. package/lib/vtx-hz-facility-modal/components/OverViewInfo2/index.js +16 -7
  50. package/lib/vtx-hz-facility-modal/components/OverViewInfo2/index.js.map +1 -1
  51. package/lib/vtx-hz-facility-modal/components/OverViewInfo3/index.js +10 -4
  52. package/lib/vtx-hz-facility-modal/components/OverViewInfo3/index.js.map +1 -1
  53. package/lib/vtx-hz-facility-modal/components/OverViewInfo4/index.js +8 -3
  54. package/lib/vtx-hz-facility-modal/components/OverViewInfo4/index.js.map +1 -1
  55. package/lib/vtx-hz-facility-modal/components/RealTime/index.js +8 -4
  56. package/lib/vtx-hz-facility-modal/components/RealTime/index.js.map +1 -1
  57. package/lib/vtx-hz-facility-modal/components/RecordOrder/index.js +7 -3
  58. package/lib/vtx-hz-facility-modal/components/RecordOrder/index.js.map +1 -1
  59. package/lib/vtx-hz-facility-modal/components/RecordTask/index.js +9 -3
  60. package/lib/vtx-hz-facility-modal/components/RecordTask/index.js.map +1 -1
  61. package/lib/vtx-hz-facility-modal/components/RelevanceDevice/index.js +6 -2
  62. package/lib/vtx-hz-facility-modal/components/RelevanceDevice/index.js.map +1 -1
  63. package/lib/vtx-hz-facility-modal/components/YWGL/index.js +3 -2
  64. package/lib/vtx-hz-facility-modal/components/YWGL/index.js.map +1 -1
  65. package/lib/vtx-hz-facility-modal/index.js +20 -14
  66. package/lib/vtx-hz-facility-modal/index.js.map +1 -1
  67. package/package.json +1 -1
@@ -23,32 +23,31 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
23
23
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
24
24
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
25
25
  var token = (0, _utils.getUrlParam)('token') || (0, _utils.getUrlParam)('access_token') || localStorage.getItem('token') || localStorage.getItem('access_token') || sessionStorage.getItem('token') || sessionStorage.getItem('access_token');
26
- var getDetectData = function getDetectData(current, size, id, reportType) {
26
+ var getDetectData = function getDetectData(current, size, id, reportType, facilityType) {
27
27
  return (0, _tslib.__awaiter)(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
28
- var _a, _b, _c, _d, res;
29
28
  return _regeneratorRuntime().wrap(function _callee$(_context) {
30
29
  while (1) switch (_context.prev = _context.next) {
31
30
  case 0:
32
- _context.next = 2;
33
- return _axios["default"].post('/cloud/zhsw-gsfw/api/manualDataEntry/page', {
31
+ return _context.abrupt("return", _axios["default"].post('/cloud/zhsw-gsfw/api/manualDataEntry/page', {
34
32
  current: current,
35
33
  size: size,
36
34
  facilityId: id,
37
- reportType: reportType
35
+ reportType: reportType,
36
+ facilityType: facilityType
38
37
  }, {
39
38
  headers: {
40
39
  Authorization: token ? "Bearer ".concat(token) : '',
41
40
  'Cache-Control': 'no-cache',
42
41
  'content-type': 'application/json;charset=UTF-8'
43
42
  }
44
- });
45
- case 2:
46
- res = _context.sent;
47
- return _context.abrupt("return", {
48
- list: ((_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.records) || [],
49
- total: ((_d = (_c = res === null || res === void 0 ? void 0 : res.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.total) || 0
50
- });
51
- case 4:
43
+ }).then(function (res) {
44
+ var _a, _b, _c, _d;
45
+ return {
46
+ list: ((_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.records) || [],
47
+ total: ((_d = (_c = res === null || res === void 0 ? void 0 : res.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.total) || 0
48
+ };
49
+ }));
50
+ case 1:
52
51
  case "end":
53
52
  return _context.stop();
54
53
  }
@@ -98,7 +97,8 @@ var Service = {
98
97
  };
99
98
  });
100
99
  return {
101
- baseInfo: baseInfo
100
+ baseInfo: baseInfo,
101
+ loading: false
102
102
  };
103
103
  },
104
104
  getTableData: function getTableData(_ref) {
@@ -151,107 +151,116 @@ var Service = {
151
151
  refreshDeps: [info]
152
152
  }),
153
153
  data = _useRequest3.data;
154
- var video = (data === null || data === void 0 ? void 0 : data.data) ? JSON.parse(data === null || data === void 0 ? void 0 : data.data) : [];
155
- if ((_a = info === null || info === void 0 ? void 0 : info.monitorItems) === null || _a === void 0 ? void 0 : _a.length) {
156
- var monitorItems = info.monitorItems.map(function (item) {
157
- return item.value;
158
- });
159
- info.monitorItemsName = monitorItems.join(',');
154
+ if (data) {
155
+ var video = (data === null || data === void 0 ? void 0 : data.data) ? JSON.parse(data === null || data === void 0 ? void 0 : data.data) : [];
156
+ if ((_a = info === null || info === void 0 ? void 0 : info.monitorItems) === null || _a === void 0 ? void 0 : _a.length) {
157
+ var monitorItems = info.monitorItems.map(function (item) {
158
+ return item.value;
159
+ });
160
+ info.monitorItemsName = monitorItems.join(',');
161
+ }
162
+ var baseInfo = [{
163
+ label: '设备编码',
164
+ key: 'code',
165
+ value: info === null || info === void 0 ? void 0 : info.code
166
+ }, {
167
+ label: '设备名称',
168
+ key: 'name',
169
+ value: info === null || info === void 0 ? void 0 : info.name
170
+ }, {
171
+ label: '设备类型',
172
+ key: 'deviceTypeName',
173
+ value: info === null || info === void 0 ? void 0 : info.deviceTypeName
174
+ }, {
175
+ label: '设备型号',
176
+ key: 'modelName',
177
+ value: info === null || info === void 0 ? void 0 : info.modelName
178
+ }, {
179
+ label: '设备厂家',
180
+ key: 'factoryName',
181
+ value: info === null || info === void 0 ? void 0 : info.factoryName
182
+ }, {
183
+ label: '安装位置',
184
+ key: 'facilityName',
185
+ value: info === null || info === void 0 ? void 0 : info.facilityName
186
+ }, {
187
+ label: '设备ID',
188
+ key: 'iotId',
189
+ value: info === null || info === void 0 ? void 0 : info.iotId
190
+ }, {
191
+ label: '监测项目',
192
+ key: 'monitorItems',
193
+ value: info === null || info === void 0 ? void 0 : info.monitorItemsName
194
+ }, {
195
+ label: '资产编号',
196
+ key: 'assetNumber',
197
+ value: info === null || info === void 0 ? void 0 : info.assetNumber
198
+ }, {
199
+ label: '设备位号',
200
+ key: 'tagNumber',
201
+ value: info === null || info === void 0 ? void 0 : info.tagNumber
202
+ }, {
203
+ label: '性能参数',
204
+ key: 'performanceParameter',
205
+ value: info === null || info === void 0 ? void 0 : info.performanceParameter
206
+ }, {
207
+ label: '主要材质',
208
+ key: 'mainMaterial',
209
+ value: info === null || info === void 0 ? void 0 : info.mainMaterial
210
+ }, {
211
+ label: '出厂编号',
212
+ key: 'factoryNumber',
213
+ value: info === null || info === void 0 ? void 0 : info.factoryNumber
214
+ }, {
215
+ label: '出厂日期',
216
+ key: 'factoryDate',
217
+ value: info === null || info === void 0 ? void 0 : info.factoryDate
218
+ }, {
219
+ label: '设备供应商',
220
+ key: 'supplier',
221
+ value: info === null || info === void 0 ? void 0 : info.supplier
222
+ }, {
223
+ label: '启用时间',
224
+ key: 'enableDate',
225
+ value: info === null || info === void 0 ? void 0 : info.enableDate
226
+ }, {
227
+ label: '寿命周期',
228
+ key: 'expectServiceLifeUnit',
229
+ value: getTransformUnit[info === null || info === void 0 ? void 0 : info.expectServiceLifeUnit]
230
+ }, {
231
+ label: '预计使用寿命',
232
+ key: 'expectServiceLifeNumber',
233
+ value: info === null || info === void 0 ? void 0 : info.expectServiceLifeNumber
234
+ }, {
235
+ label: '所属单位',
236
+ key: 'manageUnitName',
237
+ value: info === null || info === void 0 ? void 0 : info.manageUnitName
238
+ }, {
239
+ label: '设备负责人',
240
+ key: 'responsiblePersonName',
241
+ value: info === null || info === void 0 ? void 0 : info.responsiblePersonName
242
+ }, {
243
+ label: '联系方式',
244
+ key: 'phone',
245
+ value: info === null || info === void 0 ? void 0 : info.phone
246
+ }];
247
+ return {
248
+ baseInfo: baseInfo,
249
+ info: Object.assign(Object.assign({}, info), {
250
+ expectServiceLifeUnitStr: getTransformUnit[info === null || info === void 0 ? void 0 : info.expectServiceLifeUnit],
251
+ expectServiceLifeUnit: (info === null || info === void 0 ? void 0 : info.expectServiceLifeUnit) == 'MONYH' ? 'MONTH' : info === null || info === void 0 ? void 0 : info.expectServiceLifeUnit,
252
+ hasVideo: video.length > 0 ? true : false,
253
+ hasDevice: true
254
+ }),
255
+ baseInfoLoading: false
256
+ };
257
+ } else {
258
+ return {
259
+ baseInfo: [],
260
+ info: null,
261
+ baseInfoLoading: true
262
+ };
160
263
  }
161
- var baseInfo = [{
162
- label: '设备编码',
163
- key: 'code',
164
- value: info === null || info === void 0 ? void 0 : info.code
165
- }, {
166
- label: '设备名称',
167
- key: 'name',
168
- value: info === null || info === void 0 ? void 0 : info.name
169
- }, {
170
- label: '设备类型',
171
- key: 'deviceTypeName',
172
- value: info === null || info === void 0 ? void 0 : info.deviceTypeName
173
- }, {
174
- label: '设备型号',
175
- key: 'modelName',
176
- value: info === null || info === void 0 ? void 0 : info.modelName
177
- }, {
178
- label: '设备厂家',
179
- key: 'factoryName',
180
- value: info === null || info === void 0 ? void 0 : info.factoryName
181
- }, {
182
- label: '安装位置',
183
- key: 'facilityName',
184
- value: info === null || info === void 0 ? void 0 : info.facilityName
185
- }, {
186
- label: '设备ID',
187
- key: 'iotId',
188
- value: info === null || info === void 0 ? void 0 : info.iotId
189
- }, {
190
- label: '监测项目',
191
- key: 'monitorItems',
192
- value: info === null || info === void 0 ? void 0 : info.monitorItemsName
193
- }, {
194
- label: '资产编号',
195
- key: 'assetNumber',
196
- value: info === null || info === void 0 ? void 0 : info.assetNumber
197
- }, {
198
- label: '设备位号',
199
- key: 'tagNumber',
200
- value: info === null || info === void 0 ? void 0 : info.tagNumber
201
- }, {
202
- label: '性能参数',
203
- key: 'performanceParameter',
204
- value: info === null || info === void 0 ? void 0 : info.performanceParameter
205
- }, {
206
- label: '主要材质',
207
- key: 'mainMaterial',
208
- value: info === null || info === void 0 ? void 0 : info.mainMaterial
209
- }, {
210
- label: '出厂编号',
211
- key: 'factoryNumber',
212
- value: info === null || info === void 0 ? void 0 : info.factoryNumber
213
- }, {
214
- label: '出厂日期',
215
- key: 'factoryDate',
216
- value: info === null || info === void 0 ? void 0 : info.factoryDate
217
- }, {
218
- label: '设备供应商',
219
- key: 'supplier',
220
- value: info === null || info === void 0 ? void 0 : info.supplier
221
- }, {
222
- label: '启用时间',
223
- key: 'enableDate',
224
- value: info === null || info === void 0 ? void 0 : info.enableDate
225
- }, {
226
- label: '寿命周期',
227
- key: 'expectServiceLifeUnit',
228
- value: getTransformUnit[info === null || info === void 0 ? void 0 : info.expectServiceLifeUnit]
229
- }, {
230
- label: '预计使用寿命',
231
- key: 'expectServiceLifeNumber',
232
- value: info === null || info === void 0 ? void 0 : info.expectServiceLifeNumber
233
- }, {
234
- label: '所属单位',
235
- key: 'manageUnitName',
236
- value: info === null || info === void 0 ? void 0 : info.manageUnitName
237
- }, {
238
- label: '设备负责人',
239
- key: 'responsiblePersonName',
240
- value: info === null || info === void 0 ? void 0 : info.responsiblePersonName
241
- }, {
242
- label: '联系方式',
243
- key: 'phone',
244
- value: info === null || info === void 0 ? void 0 : info.phone
245
- }];
246
- return {
247
- baseInfo: baseInfo,
248
- info: Object.assign(Object.assign({}, info), {
249
- expectServiceLifeUnitStr: getTransformUnit[info === null || info === void 0 ? void 0 : info.expectServiceLifeUnit],
250
- expectServiceLifeUnit: (info === null || info === void 0 ? void 0 : info.expectServiceLifeUnit) == 'MONYH' ? 'MONTH' : info === null || info === void 0 ? void 0 : info.expectServiceLifeUnit,
251
- hasVideo: video.length > 0 ? true : false,
252
- hasDevice: true
253
- })
254
- };
255
264
  },
256
265
  //实时信息
257
266
  UseRealInfo: function UseRealInfo(_ref5) {
@@ -270,43 +279,52 @@ var Service = {
270
279
  }),
271
280
  baseInfoReal = _useRequest4.data;
272
281
  var realdata = baseInfoReal === null || baseInfoReal === void 0 ? void 0 : baseInfoReal.data;
273
- var monitorItemArray = [];
274
- var realInfo = (_b = (_a = realdata === null || realdata === void 0 ? void 0 : realdata[0]) === null || _a === void 0 ? void 0 : _a.factorValues) === null || _b === void 0 ? void 0 : _b.map(function (item) {
275
- var name = monitorItemArray.find(function (i) {
276
- i.label == item.monitorItemName;
277
- });
278
- var info = {
279
- onAlarm: item.onAlarm,
280
- label: item.name,
281
- key: item.id,
282
- value: item.value,
283
- unit: item.unit,
284
- color: item.onAlarm ? 'red' : ''
285
- };
286
- if (name) {
287
- monitorItemArray = monitorItemArray === null || monitorItemArray === void 0 ? void 0 : monitorItemArray.map(function (i) {
288
- if (i.label == item.monitorItemName) {
289
- return Object.assign(Object.assign({}, i), {
290
- list: [].concat(_toConsumableArray(i.list), [info])
291
- });
292
- } else {
293
- return i.name;
294
- }
282
+ if (baseInfoReal) {
283
+ var monitorItemArray = [];
284
+ var realInfo = (_b = (_a = realdata === null || realdata === void 0 ? void 0 : realdata[0]) === null || _a === void 0 ? void 0 : _a.factorValues) === null || _b === void 0 ? void 0 : _b.map(function (item) {
285
+ var name = monitorItemArray.find(function (i) {
286
+ i.label == item.monitorItemName;
295
287
  });
296
- } else {
297
- monitorItemArray.push({
298
- label: item.monitorItemName,
288
+ var info = {
289
+ onAlarm: item.onAlarm,
290
+ label: item.name,
299
291
  key: item.id,
300
- value: item.monitorTypeName,
301
- list: [info]
302
- });
303
- }
304
- return info;
305
- });
306
- return {
307
- realInfo: realInfo,
308
- monitorItemArray: monitorItemArray
309
- };
292
+ value: item.value,
293
+ unit: item.unit,
294
+ color: item.onAlarm ? 'red' : ''
295
+ };
296
+ if (name) {
297
+ monitorItemArray = monitorItemArray === null || monitorItemArray === void 0 ? void 0 : monitorItemArray.map(function (i) {
298
+ if (i.label == item.monitorItemName) {
299
+ return Object.assign(Object.assign({}, i), {
300
+ list: [].concat(_toConsumableArray(i.list), [info])
301
+ });
302
+ } else {
303
+ return i.name;
304
+ }
305
+ });
306
+ } else {
307
+ monitorItemArray.push({
308
+ label: item.monitorItemName,
309
+ key: item.id,
310
+ value: item.monitorTypeName,
311
+ list: [info]
312
+ });
313
+ }
314
+ return info;
315
+ });
316
+ return {
317
+ realInfo: realInfo,
318
+ monitorItemArray: monitorItemArray,
319
+ loading: false
320
+ };
321
+ } else {
322
+ return {
323
+ realInfo: [],
324
+ monitorItemArray: [],
325
+ loading: true
326
+ };
327
+ }
310
328
  },
311
329
  //运维概览状态统计
312
330
  UseStatusInfo: function UseStatusInfo(_ref6) {
@@ -349,9 +367,17 @@ var Service = {
349
367
  }),
350
368
  baseInfoYwgl = _useRequest6.data;
351
369
  var deviceHisStatusInfo = baseInfoYwgl === null || baseInfoYwgl === void 0 ? void 0 : baseInfoYwgl.data;
352
- return {
353
- deviceHisStatusInfo: deviceHisStatusInfo
354
- };
370
+ if (deviceHisStatusInfo) {
371
+ return {
372
+ deviceHisStatusInfo: deviceHisStatusInfo,
373
+ loading: false
374
+ };
375
+ } else {
376
+ return {
377
+ deviceHisStatusInfo: {},
378
+ loading: true
379
+ };
380
+ }
355
381
  },
356
382
  //运维概览table
357
383
  UseYWGLTableInfo: function UseYWGLTableInfo(_ref8) {
@@ -372,16 +398,25 @@ var Service = {
372
398
  refreshDeps: [id, statusType, current]
373
399
  }),
374
400
  baseInfoYwgl = _useRequest7.data;
375
- var ywglTable = (_b = (_a = baseInfoYwgl === null || baseInfoYwgl === void 0 ? void 0 : baseInfoYwgl.data) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.map(function (item) {
376
- return Object.assign(Object.assign(Object.assign({}, item), item.object), {
377
- id: item.id,
378
- key: item.id
401
+ if (baseInfoYwgl) {
402
+ var ywglTable = (_b = (_a = baseInfoYwgl === null || baseInfoYwgl === void 0 ? void 0 : baseInfoYwgl.data) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.map(function (item) {
403
+ return Object.assign(Object.assign(Object.assign({}, item), item.object), {
404
+ id: item.id,
405
+ key: item.id
406
+ });
379
407
  });
380
- });
381
- return {
382
- ywglTable: ywglTable,
383
- ywglTotal: (_c = ywglTable === null || ywglTable === void 0 ? void 0 : ywglTable.data) === null || _c === void 0 ? void 0 : _c.total
384
- };
408
+ return {
409
+ ywglTable: ywglTable,
410
+ ywglTotal: (_c = ywglTable === null || ywglTable === void 0 ? void 0 : ywglTable.data) === null || _c === void 0 ? void 0 : _c.total,
411
+ loading: false
412
+ };
413
+ } else {
414
+ return {
415
+ ywglTable: [],
416
+ ywglTotal: 0,
417
+ loading: true
418
+ };
419
+ }
385
420
  },
386
421
  //报警概括
387
422
  alarmInfo: function alarmInfo(_ref9) {
@@ -402,43 +437,50 @@ var Service = {
402
437
  refreshDeps: [id, timeType, startTimeLocalDate, endTimeLocalDate]
403
438
  }),
404
439
  alarmData = _useRequest8.data;
405
- var alarmDataInfo = alarmData === null || alarmData === void 0 ? void 0 : alarmData.data;
406
- var hb = getValue(alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.hbTotal, alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.total);
407
- var tb = getValue(alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.tbTotal, alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.total);
408
- var xAxis = []; //x轴
409
- var tbArray = [];
410
- var hbArray = [];
411
- var factorArray = []; //监测数值
412
- var failureArray = []; //故障
413
- var offlineArray = []; //离线
414
- alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.alarms.forEach(function (item) {
415
- var ahb = getValue(item === null || item === void 0 ? void 0 : item.hbTotal, item === null || item === void 0 ? void 0 : item.factor);
416
- var atb = getValue(item === null || item === void 0 ? void 0 : item.tbTotal, item === null || item === void 0 ? void 0 : item.factor);
417
- xAxis = [].concat(_toConsumableArray(xAxis), [item.time]);
418
- tbArray = [].concat(_toConsumableArray(tbArray), [ahb * 100]);
419
- hbArray = [].concat(_toConsumableArray(hbArray), [atb * 100]);
420
- factorArray = [].concat(_toConsumableArray(factorArray), [item.factor]);
421
- failureArray = [].concat(_toConsumableArray(failureArray), [item.failure]);
422
- offlineArray = [].concat(_toConsumableArray(offlineArray), [item.offline]);
423
- });
424
- return {
425
- alarmDataInfo: Object.assign(Object.assign({}, alarmDataInfo), {
426
- hb: hb,
427
- tb: tb,
428
- xAxis: xAxis,
429
- tbArray: tbArray,
430
- hbArray: hbArray,
431
- factorArray: factorArray,
432
- failureArray: failureArray,
433
- offlineArray: offlineArray
434
- })
435
- };
440
+ if (alarmData) {
441
+ var alarmDataInfo = alarmData === null || alarmData === void 0 ? void 0 : alarmData.data;
442
+ var hb = getValue(alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.hbTotal, alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.total);
443
+ var tb = getValue(alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.tbTotal, alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.total);
444
+ var xAxis = []; //x轴
445
+ var tbArray = [];
446
+ var hbArray = [];
447
+ var factorArray = []; //监测数值
448
+ var failureArray = []; //故障
449
+ var offlineArray = []; //离线
450
+ alarmDataInfo === null || alarmDataInfo === void 0 ? void 0 : alarmDataInfo.alarms.forEach(function (item) {
451
+ var ahb = getValue(item === null || item === void 0 ? void 0 : item.hbTotal, item === null || item === void 0 ? void 0 : item.factor);
452
+ var atb = getValue(item === null || item === void 0 ? void 0 : item.tbTotal, item === null || item === void 0 ? void 0 : item.factor);
453
+ xAxis = [].concat(_toConsumableArray(xAxis), [item.time]);
454
+ tbArray = [].concat(_toConsumableArray(tbArray), [ahb * 100]);
455
+ hbArray = [].concat(_toConsumableArray(hbArray), [atb * 100]);
456
+ factorArray = [].concat(_toConsumableArray(factorArray), [item.factor]);
457
+ failureArray = [].concat(_toConsumableArray(failureArray), [item.failure]);
458
+ offlineArray = [].concat(_toConsumableArray(offlineArray), [item.offline]);
459
+ });
460
+ return {
461
+ alarmDataInfo: Object.assign(Object.assign({}, alarmDataInfo), {
462
+ hb: hb,
463
+ tb: tb,
464
+ xAxis: xAxis,
465
+ tbArray: tbArray,
466
+ hbArray: hbArray,
467
+ factorArray: factorArray,
468
+ failureArray: failureArray,
469
+ offlineArray: offlineArray
470
+ }),
471
+ loading: false
472
+ };
473
+ } else {
474
+ return {
475
+ alarmDataInfo: {},
476
+ loading: true
477
+ };
478
+ }
436
479
  },
437
480
  UseDetectInfo: function UseDetectInfo(_ref10) {
438
481
  var id = _ref10.id,
439
482
  reportType = _ref10.reportType,
440
483
  facilityType = _ref10.facilityType;
441
- var _a, _b;
442
484
  var _useRequest9 = (0, _ahooks.useRequest)(function () {
443
485
  return _request["default"].post('/cloud/zhsw-gsfw/api/manualDataEntry/statistics', {
444
486
  body: JSON.stringify({
@@ -464,8 +506,9 @@ var Service = {
464
506
  }),
465
507
  list = _useRequest10.data;
466
508
  return {
467
- statistics: ((_a = statistics === null || statistics === void 0 ? void 0 : statistics.data) === null || _a === void 0 ? void 0 : _a.data) || {},
468
- list: ((_b = list === null || list === void 0 ? void 0 : list.data) === null || _b === void 0 ? void 0 : _b.data) || []
509
+ statistics: (statistics === null || statistics === void 0 ? void 0 : statistics.data) || {},
510
+ list: (list === null || list === void 0 ? void 0 : list.data) || [],
511
+ loading: false
469
512
  };
470
513
  }
471
514
  };
@@ -487,43 +530,52 @@ var facilityService = {
487
530
  }),
488
531
  baseInfoRes = _useRequest11.data;
489
532
  var info = baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data;
490
- var baseInfo = [{
491
- label: '水源地编码',
492
- key: 'code',
493
- value: info === null || info === void 0 ? void 0 : info.code
494
- }, {
495
- label: '水源地名称',
496
- key: 'name',
497
- value: info === null || info === void 0 ? void 0 : info.name
498
- }, {
499
- label: '总库容',
500
- key: 'totalStorageCapacity',
501
- value: info === null || info === void 0 ? void 0 : info.totalStorageCapacity
502
- }, {
503
- label: '供应水厂',
504
- key: 'waterSupplyPlantsStr',
505
- value: info === null || info === void 0 ? void 0 : info.waterSupplyPlantsStr
506
- }, {
507
- label: '水质等级',
508
- key: 'qualityLevel',
509
- value: info === null || info === void 0 ? void 0 : info.qualityLevel
510
- }, {
511
- label: '地址',
512
- key: 'address',
513
- value: info === null || info === void 0 ? void 0 : info.address
514
- }, {
515
- label: '管理单位',
516
- key: 'orgName',
517
- value: info === null || info === void 0 ? void 0 : info.orgName
518
- }, {
519
- label: '责任人',
520
- key: 'dutyUserName',
521
- value: info === null || info === void 0 ? void 0 : info.dutyUserName
522
- }];
523
- return {
524
- baseInfo: baseInfo,
525
- info: info
526
- };
533
+ if (info) {
534
+ var baseInfo = [{
535
+ label: '水源地编码',
536
+ key: 'code',
537
+ value: info === null || info === void 0 ? void 0 : info.code
538
+ }, {
539
+ label: '水源地名称',
540
+ key: 'name',
541
+ value: info === null || info === void 0 ? void 0 : info.name
542
+ }, {
543
+ label: '总库容',
544
+ key: 'totalStorageCapacity',
545
+ value: info === null || info === void 0 ? void 0 : info.totalStorageCapacity
546
+ }, {
547
+ label: '供应水厂',
548
+ key: 'waterSupplyPlantsStr',
549
+ value: info === null || info === void 0 ? void 0 : info.waterSupplyPlantsStr
550
+ }, {
551
+ label: '水质等级',
552
+ key: 'qualityLevel',
553
+ value: info === null || info === void 0 ? void 0 : info.qualityLevel
554
+ }, {
555
+ label: '地址',
556
+ key: 'address',
557
+ value: info === null || info === void 0 ? void 0 : info.address
558
+ }, {
559
+ label: '管理单位',
560
+ key: 'orgName',
561
+ value: info === null || info === void 0 ? void 0 : info.orgName
562
+ }, {
563
+ label: '责任人',
564
+ key: 'dutyUserName',
565
+ value: info === null || info === void 0 ? void 0 : info.dutyUserName
566
+ }];
567
+ return {
568
+ baseInfo: baseInfo,
569
+ info: info,
570
+ baseLoading: false
571
+ };
572
+ } else {
573
+ return {
574
+ baseInfo: [],
575
+ info: [],
576
+ baseLoading: true
577
+ };
578
+ }
527
579
  },
528
580
  //供水厂
529
581
  water_supply_plant: function water_supply_plant(_ref12) {
@@ -541,47 +593,56 @@ var facilityService = {
541
593
  }),
542
594
  baseInfoRes = _useRequest12.data;
543
595
  var info = baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data;
544
- var baseInfo = [{
545
- label: '编码',
546
- key: 'code',
547
- value: info === null || info === void 0 ? void 0 : info.code
548
- }, {
549
- label: '供水厂名称',
550
- key: 'name',
551
- value: info === null || info === void 0 ? void 0 : info.name
552
- }, {
553
- label: '计划日供水能力(万吨/天)',
554
- key: 'supplyCapacity',
555
- value: info === null || info === void 0 ? void 0 : info.supplyCapacity
556
- }, {
557
- label: '管理单位',
558
- key: 'orgName',
559
- value: info === null || info === void 0 ? void 0 : info.orgName
560
- }, {
561
- label: '责任人',
562
- key: 'dutyPeopleName',
563
- value: info === null || info === void 0 ? void 0 : info.dutyPeopleName
564
- }, {
565
- label: '设施地址',
566
- key: 'address',
567
- value: info === null || info === void 0 ? void 0 : info.address
568
- }, {
569
- label: '行政区划',
570
- key: 'divisionName',
571
- value: info === null || info === void 0 ? void 0 : info.divisionName
572
- }, {
573
- label: '所属公司',
574
- key: 'waterDivision',
575
- value: (_a = info === null || info === void 0 ? void 0 : info.waterDivision) === null || _a === void 0 ? void 0 : _a.name
576
- }, {
577
- label: '水厂介绍',
578
- key: 'introduce',
579
- value: info === null || info === void 0 ? void 0 : info.introduce
580
- }];
581
- return {
582
- baseInfo: baseInfo,
583
- info: info
584
- };
596
+ if (info) {
597
+ var baseInfo = [{
598
+ label: '编码',
599
+ key: 'code',
600
+ value: info === null || info === void 0 ? void 0 : info.code
601
+ }, {
602
+ label: '供水厂名称',
603
+ key: 'name',
604
+ value: info === null || info === void 0 ? void 0 : info.name
605
+ }, {
606
+ label: '计划日供水能力(万吨/天)',
607
+ key: 'supplyCapacity',
608
+ value: info === null || info === void 0 ? void 0 : info.supplyCapacity
609
+ }, {
610
+ label: '管理单位',
611
+ key: 'orgName',
612
+ value: info === null || info === void 0 ? void 0 : info.orgName
613
+ }, {
614
+ label: '责任人',
615
+ key: 'dutyPeopleName',
616
+ value: info === null || info === void 0 ? void 0 : info.dutyPeopleName
617
+ }, {
618
+ label: '设施地址',
619
+ key: 'address',
620
+ value: info === null || info === void 0 ? void 0 : info.address
621
+ }, {
622
+ label: '行政区划',
623
+ key: 'divisionName',
624
+ value: info === null || info === void 0 ? void 0 : info.divisionName
625
+ }, {
626
+ label: '所属公司',
627
+ key: 'waterDivision',
628
+ value: (_a = info === null || info === void 0 ? void 0 : info.waterDivision) === null || _a === void 0 ? void 0 : _a.name
629
+ }, {
630
+ label: '水厂介绍',
631
+ key: 'introduce',
632
+ value: info === null || info === void 0 ? void 0 : info.introduce
633
+ }];
634
+ return {
635
+ baseInfo: baseInfo,
636
+ info: info,
637
+ baseLoading: false
638
+ };
639
+ } else {
640
+ return {
641
+ baseInfo: [],
642
+ info: [],
643
+ baseLoading: true
644
+ };
645
+ }
585
646
  },
586
647
  //污水厂
587
648
  sewage_plant: function sewage_plant(_ref13) {
@@ -599,55 +660,64 @@ var facilityService = {
599
660
  }),
600
661
  baseInfoRes = _useRequest13.data;
601
662
  var info = baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data;
602
- var baseInfo = [{
603
- label: '编码',
604
- key: 'code',
605
- value: info === null || info === void 0 ? void 0 : info.code
606
- }, {
607
- label: '污水厂名称',
608
- key: 'name',
609
- value: info === null || info === void 0 ? void 0 : info.name
610
- }, {
611
- label: '关联管点',
612
- key: 'pointId',
613
- value: info === null || info === void 0 ? void 0 : info.pointId
614
- }, {
615
- label: '污水处理级别',
616
- key: 'dealLevelStr',
617
- value: info === null || info === void 0 ? void 0 : info.dealLevelStr
618
- }, {
619
- label: '污水处理工艺',
620
- key: 'dealProcessStr',
621
- value: info === null || info === void 0 ? void 0 : info.dealProcessStr
622
- }, {
623
- label: '日处理能力(万吨/天)',
624
- key: 'supplyCapacity',
625
- value: info === null || info === void 0 ? void 0 : info.supplyCapacity
626
- }, {
627
- label: '管理单位',
628
- key: 'orgName',
629
- value: info === null || info === void 0 ? void 0 : info.orgName
630
- }, {
631
- label: '责任人',
632
- key: 'dutyPeopleName',
633
- value: info === null || info === void 0 ? void 0 : info.dutyPeopleName
634
- }, {
635
- label: '行政区划',
636
- key: 'divisionName',
637
- value: info === null || info === void 0 ? void 0 : info.divisionName
638
- }, {
639
- label: '所属公司',
640
- key: 'waterDivision',
641
- value: (_a = info === null || info === void 0 ? void 0 : info.waterDivision) === null || _a === void 0 ? void 0 : _a.name
642
- }, {
643
- label: '水厂介绍',
644
- key: 'introduce',
645
- value: info === null || info === void 0 ? void 0 : info.introduce
646
- }];
647
- return {
648
- baseInfo: baseInfo,
649
- info: info
650
- };
663
+ if (info) {
664
+ var baseInfo = [{
665
+ label: '编码',
666
+ key: 'code',
667
+ value: info === null || info === void 0 ? void 0 : info.code
668
+ }, {
669
+ label: '污水厂名称',
670
+ key: 'name',
671
+ value: info === null || info === void 0 ? void 0 : info.name
672
+ }, {
673
+ label: '关联管点',
674
+ key: 'pointId',
675
+ value: info === null || info === void 0 ? void 0 : info.pointId
676
+ }, {
677
+ label: '污水处理级别',
678
+ key: 'dealLevelStr',
679
+ value: info === null || info === void 0 ? void 0 : info.dealLevelStr
680
+ }, {
681
+ label: '污水处理工艺',
682
+ key: 'dealProcessStr',
683
+ value: info === null || info === void 0 ? void 0 : info.dealProcessStr
684
+ }, {
685
+ label: '日处理能力(万吨/天)',
686
+ key: 'supplyCapacity',
687
+ value: info === null || info === void 0 ? void 0 : info.supplyCapacity
688
+ }, {
689
+ label: '管理单位',
690
+ key: 'orgName',
691
+ value: info === null || info === void 0 ? void 0 : info.orgName
692
+ }, {
693
+ label: '责任人',
694
+ key: 'dutyPeopleName',
695
+ value: info === null || info === void 0 ? void 0 : info.dutyPeopleName
696
+ }, {
697
+ label: '行政区划',
698
+ key: 'divisionName',
699
+ value: info === null || info === void 0 ? void 0 : info.divisionName
700
+ }, {
701
+ label: '所属公司',
702
+ key: 'waterDivision',
703
+ value: (_a = info === null || info === void 0 ? void 0 : info.waterDivision) === null || _a === void 0 ? void 0 : _a.name
704
+ }, {
705
+ label: '水厂介绍',
706
+ key: 'introduce',
707
+ value: info === null || info === void 0 ? void 0 : info.introduce
708
+ }];
709
+ return {
710
+ baseInfo: baseInfo,
711
+ info: info,
712
+ baseLoading: false
713
+ };
714
+ } else {
715
+ return {
716
+ baseInfo: [],
717
+ info: [],
718
+ baseLoading: true
719
+ };
720
+ }
651
721
  },
652
722
  //任务统计
653
723
  UseStatusInfo: function UseStatusInfo(_ref14) {
@@ -691,36 +761,46 @@ var facilityService = {
691
761
  refreshDeps: [id, type, state, YWJLCurrent, startTime, endTime, timeType]
692
762
  }),
693
763
  tableData = _useRequest15.data;
694
- var d = baseInfoYwgl === null || baseInfoYwgl === void 0 ? void 0 : baseInfoYwgl.data;
695
- var statusInfo = [];
696
- var codeObj = {
697
- 任务总数: 'all',
698
- 循环任务: 'type-1',
699
- 指派任务: 'type-2',
700
- 超时完成: 'state-4',
701
- 待完成: 'state-1',
702
- 按时完成: 'state-3'
703
- };
704
- for (var p in codeObj) {
705
- statusInfo.push({
706
- label: p,
707
- value: d === null || d === void 0 ? void 0 : d[p],
708
- code: codeObj[p]
764
+ if ((baseInfoYwgl === null || baseInfoYwgl === void 0 ? void 0 : baseInfoYwgl.data) && (tableData === null || tableData === void 0 ? void 0 : tableData.data)) {
765
+ var d = baseInfoYwgl === null || baseInfoYwgl === void 0 ? void 0 : baseInfoYwgl.data;
766
+ var statusInfo = [];
767
+ var codeObj = {
768
+ 任务总数: 'all',
769
+ 循环任务: 'type-1',
770
+ 指派任务: 'type-2',
771
+ 超时完成: 'state-4',
772
+ 待完成: 'state-1',
773
+ 按时完成: 'state-3'
774
+ };
775
+ for (var p in codeObj) {
776
+ statusInfo.push({
777
+ label: p,
778
+ value: d === null || d === void 0 ? void 0 : d[p],
779
+ code: codeObj[p]
780
+ });
781
+ }
782
+ var ywglTable = (_b = (_a = tableData === null || tableData === void 0 ? void 0 : tableData.data) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.map(function (item) {
783
+ var _a;
784
+ return Object.assign(Object.assign(Object.assign({}, item), item.object), {
785
+ staffName: (_a = item === null || item === void 0 ? void 0 : item.staffList) === null || _a === void 0 ? void 0 : _a[0].staffName,
786
+ id: item.id,
787
+ key: item.id
788
+ });
709
789
  });
790
+ return {
791
+ statusInfo: statusInfo,
792
+ ywglTable: ywglTable,
793
+ pages: (_c = tableData === null || tableData === void 0 ? void 0 : tableData.data) === null || _c === void 0 ? void 0 : _c.total,
794
+ loading: false
795
+ };
796
+ } else {
797
+ return {
798
+ statusInfo: [],
799
+ ywglTable: [],
800
+ pages: 0,
801
+ loading: true
802
+ };
710
803
  }
711
- var ywglTable = (_b = (_a = tableData === null || tableData === void 0 ? void 0 : tableData.data) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.map(function (item) {
712
- var _a;
713
- return Object.assign(Object.assign(Object.assign({}, item), item.object), {
714
- staffName: (_a = item === null || item === void 0 ? void 0 : item.staffList) === null || _a === void 0 ? void 0 : _a[0].staffName,
715
- id: item.id,
716
- key: item.id
717
- });
718
- });
719
- return {
720
- statusInfo: statusInfo,
721
- ywglTable: ywglTable,
722
- pages: (_c = tableData === null || tableData === void 0 ? void 0 : tableData.data) === null || _c === void 0 ? void 0 : _c.total
723
- };
724
804
  },
725
805
  //关联设备
726
806
  UseDeviceInfo: function UseDeviceInfo(_ref15) {
@@ -740,24 +820,33 @@ var facilityService = {
740
820
  refreshDeps: [id, deviceCurrent]
741
821
  }),
742
822
  deviceData = _useRequest16.data;
743
- var deviceList = (_a = (deviceData === null || deviceData === void 0 ? void 0 : deviceData.data.rows) || []) === null || _a === void 0 ? void 0 : _a.map(function (item) {
744
- var _a;
745
- var monitorItems = [];
746
- if ((_a = item === null || item === void 0 ? void 0 : item.monitorItems) === null || _a === void 0 ? void 0 : _a.length) {
747
- monitorItems = item.monitorItems.map(function (item) {
748
- return item.value;
823
+ if (deviceData === null || deviceData === void 0 ? void 0 : deviceData.data) {
824
+ var deviceList = (_a = (deviceData === null || deviceData === void 0 ? void 0 : deviceData.data.rows) || []) === null || _a === void 0 ? void 0 : _a.map(function (item) {
825
+ var _a;
826
+ var monitorItems = [];
827
+ if ((_a = item === null || item === void 0 ? void 0 : item.monitorItems) === null || _a === void 0 ? void 0 : _a.length) {
828
+ monitorItems = item.monitorItems.map(function (item) {
829
+ return item.value;
830
+ });
831
+ }
832
+ return Object.assign(Object.assign({}, item), {
833
+ id: item.id,
834
+ key: item.id,
835
+ monitorItemsName: monitorItems.join(',')
749
836
  });
750
- }
751
- return Object.assign(Object.assign({}, item), {
752
- id: item.id,
753
- key: item.id,
754
- monitorItemsName: monitorItems.join(',')
755
837
  });
756
- });
757
- return {
758
- deviceList: deviceList,
759
- deviceTotal: deviceData === null || deviceData === void 0 ? void 0 : deviceData.data.total
760
- };
838
+ return {
839
+ deviceList: deviceList,
840
+ deviceTotal: deviceData === null || deviceData === void 0 ? void 0 : deviceData.data.total,
841
+ loading: false
842
+ };
843
+ } else {
844
+ return {
845
+ deviceList: [],
846
+ deviceTotal: 0,
847
+ loading: true
848
+ };
849
+ }
761
850
  },
762
851
  //设施报警
763
852
  UseAlarmInfo: function UseAlarmInfo(_ref16) {
@@ -779,27 +868,38 @@ var facilityService = {
779
868
  }),
780
869
  alarmData = _useRequest17.data;
781
870
  var alarmInfo = alarmData === null || alarmData === void 0 ? void 0 : alarmData.data;
782
- return {
783
- alarmInfo: alarmInfo
784
- };
871
+ if (alarmData === null || alarmData === void 0 ? void 0 : alarmData.data) {
872
+ return {
873
+ alarmInfo: alarmInfo,
874
+ alarmInfoLoading: false
875
+ };
876
+ } else {
877
+ return {
878
+ alarmInfo: [],
879
+ alarmInfoLoading: true
880
+ };
881
+ }
785
882
  },
786
883
  //昨日供水量
787
884
  UseDataValueInfo: function UseDataValueInfo(_ref17) {
788
885
  var id = _ref17.id,
789
886
  startTime = _ref17.startTime,
790
- endTime = _ref17.endTime;
887
+ endTime = _ref17.endTime,
888
+ collectFrequency = _ref17.collectFrequency,
889
+ monitorItemCode = _ref17.monitorItemCode;
791
890
  var _useRequest18 = (0, _ahooks.useRequest)(function () {
792
891
  return _request["default"].get('/cloud/zhsw-jcyj/api/dataQuery/getDataValueTongHuanRate', {
793
892
  body: {
794
893
  facilityId: id,
795
- collectFrequency: 'hour',
894
+ collectFrequency: collectFrequency,
895
+ monitorItemCode: monitorItemCode,
796
896
  timeType: 1,
797
897
  startTime: startTime,
798
898
  endTime: endTime
799
899
  }
800
900
  });
801
901
  }, {
802
- refreshDeps: [id, startTime, endTime]
902
+ refreshDeps: [id, startTime, endTime, collectFrequency, monitorItemCode]
803
903
  }),
804
904
  dataValue = _useRequest18.data;
805
905
  var waterData = dataValue === null || dataValue === void 0 ? void 0 : dataValue.data;
@@ -873,13 +973,65 @@ var facilityService = {
873
973
  factorValue: factorValue
874
974
  };
875
975
  },
876
- //运维概览
877
- UseMaintenanceOverview: function UseMaintenanceOverview(_ref21) {
976
+ // 供水厂
977
+ UseStatisticsGSC: function UseStatisticsGSC(_ref21) {
878
978
  var id = _ref21.id,
879
979
  startTime = _ref21.startTime,
880
980
  endTime = _ref21.endTime,
881
- timeType = _ref21.timeType;
981
+ timeType = _ref21.timeType,
982
+ collectFrequency = _ref21.collectFrequency;
983
+ var _a, _b;
882
984
  var _useRequest22 = (0, _ahooks.useRequest)(function () {
985
+ return _request["default"].get("/cloud/zhsw-qxjc/api/managementCockpit/makingWaterStatistics", {
986
+ body: {
987
+ facilityId: id,
988
+ startTime: startTime,
989
+ endTime: endTime,
990
+ timeType: timeType,
991
+ collectFrequency: collectFrequency
992
+ }
993
+ });
994
+ }, {
995
+ refreshDeps: [id, startTime, endTime, timeType, collectFrequency]
996
+ }),
997
+ data = _useRequest22.data;
998
+ return {
999
+ YWGLstatistics: ((_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.facilityList) === null || _b === void 0 ? void 0 : _b[0]) || {}
1000
+ };
1001
+ },
1002
+ // 污水厂
1003
+ UseStatisticsWSC: function UseStatisticsWSC(_ref22) {
1004
+ var id = _ref22.id,
1005
+ startTime = _ref22.startTime,
1006
+ endTime = _ref22.endTime,
1007
+ timeType = _ref22.timeType,
1008
+ collectFrequency = _ref22.collectFrequency;
1009
+ var _a, _b;
1010
+ var _useRequest23 = (0, _ahooks.useRequest)(function () {
1011
+ return _request["default"].post("/cloud/zhsw-qxjc/api/managementCockpit/drainageSewageStatistics", {
1012
+ body: {
1013
+ facilityId: id,
1014
+ startTime: startTime,
1015
+ endTime: endTime,
1016
+ timeType: timeType,
1017
+ collectFrequency: collectFrequency
1018
+ }
1019
+ });
1020
+ }, {
1021
+ refreshDeps: [id, startTime, endTime, timeType, collectFrequency]
1022
+ }),
1023
+ data = _useRequest23.data;
1024
+ return {
1025
+ YWGLstatistics: ((_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sewageDealWaterInfo) === null || _b === void 0 ? void 0 : _b[0]) || {}
1026
+ };
1027
+ },
1028
+ //运维概览
1029
+ UseMaintenanceOverview: function UseMaintenanceOverview(_ref23) {
1030
+ var id = _ref23.id,
1031
+ startTime = _ref23.startTime,
1032
+ endTime = _ref23.endTime,
1033
+ timeType = _ref23.timeType;
1034
+ var _useRequest24 = (0, _ahooks.useRequest)(function () {
883
1035
  return _request["default"].post('/cloud/zhsw-sjgd/api/workOrderStatistics/maintenanceOverview', {
884
1036
  body: JSON.stringify({
885
1037
  facilityId: id,
@@ -892,18 +1044,26 @@ var facilityService = {
892
1044
  }, {
893
1045
  refreshDeps: [id, startTime, endTime, timeType]
894
1046
  }),
895
- dataValue = _useRequest22.data;
896
- var ywglData = (dataValue === null || dataValue === void 0 ? void 0 : dataValue.data) || [];
897
- return {
898
- ywglData: ywglData
899
- };
1047
+ dataValue = _useRequest24.data;
1048
+ if (dataValue) {
1049
+ var ywglData = (dataValue === null || dataValue === void 0 ? void 0 : dataValue.data) || [];
1050
+ return {
1051
+ ywglData: ywglData,
1052
+ loading: false
1053
+ };
1054
+ } else {
1055
+ return {
1056
+ ywglData: [],
1057
+ loading: true
1058
+ };
1059
+ }
900
1060
  },
901
- UseBaseInfo: function UseBaseInfo(_ref22) {
902
- var id = _ref22.id,
903
- source = _ref22.source;
1061
+ UseBaseInfo: function UseBaseInfo(_ref24) {
1062
+ var id = _ref24.id,
1063
+ source = _ref24.source;
904
1064
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22;
905
1065
  // 基本信息
906
- var _useRequest23 = (0, _ahooks.useRequest)(function () {
1066
+ var _useRequest25 = (0, _ahooks.useRequest)(function () {
907
1067
  return _request["default"].get('/cloud/jcss-reborn/facility/get', {
908
1068
  data: {
909
1069
  id: id,
@@ -914,8 +1074,8 @@ var facilityService = {
914
1074
  }, {
915
1075
  refreshDeps: [id]
916
1076
  }),
917
- baseInfoRes = _useRequest23.data;
918
- var _useRequest24 = (0, _ahooks.useRequest)(function () {
1077
+ baseInfoRes = _useRequest25.data;
1078
+ var _useRequest26 = (0, _ahooks.useRequest)(function () {
919
1079
  return _request["default"].get('/cloud/device/sdk/device/info/deviceList', {
920
1080
  body: {
921
1081
  objectId: id
@@ -924,7 +1084,7 @@ var facilityService = {
924
1084
  }, {
925
1085
  refreshDeps: [id]
926
1086
  }),
927
- data = _useRequest24.data;
1087
+ data = _useRequest26.data;
928
1088
  var hasDevice = (data === null || data === void 0 ? void 0 : data.data) && (data === null || data === void 0 ? void 0 : data.data.length) > 0 ? true : false;
929
1089
  var info = baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data;
930
1090
  var baseInfo = [{
@@ -1197,12 +1357,12 @@ var facilityService = {
1197
1357
  };
1198
1358
  },
1199
1359
  //工单统计
1200
- UseCountAllType: function UseCountAllType(_ref23) {
1201
- var id = _ref23.id,
1202
- startTime = _ref23.startTime,
1203
- endTime = _ref23.endTime,
1204
- timeType = _ref23.timeType;
1205
- var _useRequest25 = (0, _ahooks.useRequest)(function () {
1360
+ UseCountAllType: function UseCountAllType(_ref25) {
1361
+ var id = _ref25.id,
1362
+ startTime = _ref25.startTime,
1363
+ endTime = _ref25.endTime,
1364
+ timeType = _ref25.timeType;
1365
+ var _useRequest27 = (0, _ahooks.useRequest)(function () {
1206
1366
  return _request["default"].post('/cloud/zhsw-sjgd/api/workOrderStatistics/countAllType', {
1207
1367
  body: JSON.stringify({
1208
1368
  facilityId: id,
@@ -1215,22 +1375,22 @@ var facilityService = {
1215
1375
  }, {
1216
1376
  refreshDeps: [id, startTime, endTime, timeType]
1217
1377
  }),
1218
- dataValue = _useRequest25.data;
1378
+ dataValue = _useRequest27.data;
1219
1379
  var orderStatistics = (dataValue === null || dataValue === void 0 ? void 0 : dataValue.data) || [];
1220
1380
  return {
1221
1381
  orderStatistics: orderStatistics
1222
1382
  };
1223
1383
  },
1224
1384
  //工单统计
1225
- UseOrderInfo: function UseOrderInfo(_ref24) {
1226
- var id = _ref24.id,
1227
- param = _ref24.param,
1228
- YWJLCurrent = _ref24.YWJLCurrent,
1229
- startTime = _ref24.startTime,
1230
- endTime = _ref24.endTime,
1231
- timeType = _ref24.timeType;
1385
+ UseOrderInfo: function UseOrderInfo(_ref26) {
1386
+ var id = _ref26.id,
1387
+ param = _ref26.param,
1388
+ YWJLCurrent = _ref26.YWJLCurrent,
1389
+ startTime = _ref26.startTime,
1390
+ endTime = _ref26.endTime,
1391
+ timeType = _ref26.timeType;
1232
1392
  var _a, _b, _c;
1233
- var _useRequest26 = (0, _ahooks.useRequest)(function () {
1393
+ var _useRequest28 = (0, _ahooks.useRequest)(function () {
1234
1394
  return _request["default"].post('/cloud/zhsw-sjgd/api/workOrderStatistics/countAllType', {
1235
1395
  body: JSON.stringify({
1236
1396
  facilityId: id,
@@ -1243,9 +1403,9 @@ var facilityService = {
1243
1403
  }, {
1244
1404
  refreshDeps: [id, startTime, endTime, timeType]
1245
1405
  }),
1246
- countAllType = _useRequest26.data;
1406
+ countAllType = _useRequest28.data;
1247
1407
  //table
1248
- var _useRequest27 = (0, _ahooks.useRequest)(function () {
1408
+ var _useRequest29 = (0, _ahooks.useRequest)(function () {
1249
1409
  return _request["default"].get('/cloud/zhxt/case/supervises/urge/record/allCasePage', {
1250
1410
  body: Object.assign({
1251
1411
  facilityId: id,
@@ -1260,34 +1420,44 @@ var facilityService = {
1260
1420
  }, {
1261
1421
  refreshDeps: [id, param, YWJLCurrent, startTime, endTime, timeType]
1262
1422
  }),
1263
- tableData = _useRequest27.data;
1264
- var d = (countAllType === null || countAllType === void 0 ? void 0 : countAllType.data) || [];
1265
- var statusInfo = d.map(function (item) {
1266
- return Object.assign(Object.assign({}, item), {
1267
- label: item.name,
1268
- value: item.count,
1269
- code: item.paramCode ? "".concat(item.paramCode, "_").concat(item.paramValue) : 'all'
1423
+ tableData = _useRequest29.data;
1424
+ if ((countAllType === null || countAllType === void 0 ? void 0 : countAllType.data) && (tableData === null || tableData === void 0 ? void 0 : tableData.data)) {
1425
+ var d = (countAllType === null || countAllType === void 0 ? void 0 : countAllType.data) || [];
1426
+ var statusInfo = d.map(function (item) {
1427
+ return Object.assign(Object.assign({}, item), {
1428
+ label: item.name,
1429
+ value: item.count,
1430
+ code: item.paramCode ? "".concat(item.paramCode, "_").concat(item.paramValue) : 'all'
1431
+ });
1270
1432
  });
1271
- });
1272
- var ywglTable = (_b = (_a = tableData === null || tableData === void 0 ? void 0 : tableData.data) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.map(function (item) {
1273
- var _a;
1274
- return Object.assign(Object.assign(Object.assign({}, item), item.object), {
1275
- staffName: (_a = item === null || item === void 0 ? void 0 : item.staffList) === null || _a === void 0 ? void 0 : _a[0].staffName,
1276
- id: item.id,
1277
- key: item.id
1433
+ var ywglTable = (_b = (_a = tableData === null || tableData === void 0 ? void 0 : tableData.data) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.map(function (item) {
1434
+ var _a;
1435
+ return Object.assign(Object.assign(Object.assign({}, item), item.object), {
1436
+ staffName: (_a = item === null || item === void 0 ? void 0 : item.staffList) === null || _a === void 0 ? void 0 : _a[0].staffName,
1437
+ id: item.id,
1438
+ key: item.id
1439
+ });
1278
1440
  });
1279
- });
1280
- return {
1281
- statusInfo: statusInfo,
1282
- ywglTable: ywglTable,
1283
- pages: (_c = tableData === null || tableData === void 0 ? void 0 : tableData.data) === null || _c === void 0 ? void 0 : _c.total
1284
- };
1441
+ return {
1442
+ statusInfo: statusInfo,
1443
+ ywglTable: ywglTable,
1444
+ pages: (_c = tableData === null || tableData === void 0 ? void 0 : tableData.data) === null || _c === void 0 ? void 0 : _c.total,
1445
+ loading: false
1446
+ };
1447
+ } else {
1448
+ return {
1449
+ statusInfo: [],
1450
+ ywglTable: [],
1451
+ pages: 0,
1452
+ loading: true
1453
+ };
1454
+ }
1285
1455
  },
1286
1456
  //缺陷
1287
- UseFlaw: function UseFlaw(_ref25) {
1288
- var code = _ref25.code;
1457
+ UseFlaw: function UseFlaw(_ref27) {
1458
+ var code = _ref27.code;
1289
1459
  var _a;
1290
- var _useRequest28 = (0, _ahooks.useRequest)(function () {
1460
+ var _useRequest30 = (0, _ahooks.useRequest)(function () {
1291
1461
  return _request["default"].get('/cloud/zhsw-psfw/api/cctv/flaw/getDetail', {
1292
1462
  body: {
1293
1463
  lineCode: code
@@ -1296,15 +1466,23 @@ var facilityService = {
1296
1466
  }, {
1297
1467
  refreshDeps: [code]
1298
1468
  }),
1299
- dataValue = _useRequest28.data;
1300
- var tableData = ((_a = dataValue === null || dataValue === void 0 ? void 0 : dataValue.data) === null || _a === void 0 ? void 0 : _a.thins) || [];
1301
- return {
1302
- tableData: tableData
1303
- };
1469
+ dataValue = _useRequest30.data;
1470
+ if (dataValue) {
1471
+ var tableData = ((_a = dataValue === null || dataValue === void 0 ? void 0 : dataValue.data) === null || _a === void 0 ? void 0 : _a.thins) || [];
1472
+ return {
1473
+ tableData: tableData,
1474
+ loading: false
1475
+ };
1476
+ } else {
1477
+ return {
1478
+ tableData: [],
1479
+ loading: true
1480
+ };
1481
+ }
1304
1482
  },
1305
- UseSynthesisScore: function UseSynthesisScore(_ref26) {
1306
- var code = _ref26.code;
1307
- var _useRequest29 = (0, _ahooks.useRequest)(function () {
1483
+ UseSynthesisScore: function UseSynthesisScore(_ref28) {
1484
+ var code = _ref28.code;
1485
+ var _useRequest31 = (0, _ahooks.useRequest)(function () {
1308
1486
  return _request["default"].get('/cloud/zhsw-psfw/api/lineHealth/getSynthesisScore', {
1309
1487
  body: {
1310
1488
  lineCode: code
@@ -1313,38 +1491,49 @@ var facilityService = {
1313
1491
  }, {
1314
1492
  refreshDeps: [code]
1315
1493
  }),
1316
- data = _useRequest29.data;
1317
- var score = {};
1318
- var max = 0;
1319
- var zhdf = 0;
1320
- var indicator = [];
1321
- var healthScoreData = [];
1322
- data === null || data === void 0 ? void 0 : data.data.map(function (item) {
1323
- if (item.name !== '综合得分') {
1324
- if (Number(item.value) > 0) {
1325
- max = Number(item.value);
1494
+ data = _useRequest31.data;
1495
+ if (data) {
1496
+ var score = {};
1497
+ var max = 0;
1498
+ var zhdf = 0;
1499
+ var indicator = [];
1500
+ var healthScoreData = [];
1501
+ data === null || data === void 0 ? void 0 : data.data.map(function (item) {
1502
+ if (item.name !== '综合得分') {
1503
+ if (Number(item.value) > 0) {
1504
+ max = Number(item.value);
1505
+ }
1506
+ indicator.push({
1507
+ name: item.name,
1508
+ max: max
1509
+ });
1510
+ healthScoreData.push(Number(item.value) || 0);
1511
+ } else {
1512
+ zhdf = Number(item.value);
1326
1513
  }
1327
- indicator.push({
1328
- name: item.name,
1329
- max: max
1330
- });
1331
- healthScoreData.push(Number(item.value) || 0);
1332
- } else {
1333
- zhdf = Number(item.value);
1334
- }
1335
- score = Object.assign(Object.assign({}, score), _defineProperty({}, item.name, item.value));
1336
- });
1337
- return {
1338
- score: score,
1339
- indicator: indicator,
1340
- healthScoreData: healthScoreData,
1341
- zhdf: zhdf
1342
- };
1514
+ score = Object.assign(Object.assign({}, score), _defineProperty({}, item.name, item.value));
1515
+ });
1516
+ return {
1517
+ score: score,
1518
+ indicator: indicator,
1519
+ healthScoreData: healthScoreData,
1520
+ zhdf: zhdf,
1521
+ loading: false
1522
+ };
1523
+ } else {
1524
+ return {
1525
+ score: {},
1526
+ indicator: [],
1527
+ healthScoreData: [],
1528
+ zhdf: 0,
1529
+ loading: true
1530
+ };
1531
+ }
1343
1532
  },
1344
- sewerage_user: function sewerage_user(_ref27) {
1345
- var id = _ref27.id;
1533
+ sewerage_user: function sewerage_user(_ref29) {
1534
+ var id = _ref29.id;
1346
1535
  // 基本信息
1347
- var _useRequest30 = (0, _ahooks.useRequest)(function () {
1536
+ var _useRequest32 = (0, _ahooks.useRequest)(function () {
1348
1537
  return _request["default"].get('/cloud/zhsw-psfw/api/sewageUser/detail', {
1349
1538
  body: {
1350
1539
  id: id
@@ -1353,7 +1542,7 @@ var facilityService = {
1353
1542
  }, {
1354
1543
  refreshDeps: [id]
1355
1544
  }),
1356
- baseInfoRes = _useRequest30.data;
1545
+ baseInfoRes = _useRequest32.data;
1357
1546
  var info = baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data;
1358
1547
  return {
1359
1548
  info: info