@vtx/modals2 5.0.29 → 5.0.31
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.
- package/lib/_components/vm-map/index.js +0 -2
- package/lib/vtx-car-modal/content/Jzlj/Dispose/Pies.js +2 -2
- package/lib/vtx-qyry-modal/api.js +1 -2
- package/lib/vtx-staff-modal/api.js +64 -28
- package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +2 -1
- package/lib/vtx-staff-modal/components/BaseInfo/WorkStatic.js +118 -33
- package/lib/vtx-staff-modal/components/BaseInfo/index.js +13 -81
- package/package.json +1 -1
- package/lib/vtx-staff-modal/components/BaseInfo/WorkStaticDay.js +0 -48
|
@@ -21,8 +21,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
21
21
|
export default function VmOlMap(_ref) {
|
|
22
22
|
var _mapInfo$olProps, _points$data2, _polygons$data2, _newPoints$data3;
|
|
23
23
|
var mapCenter = _ref.mapCenter,
|
|
24
|
-
_ref$mapType = _ref.mapType,
|
|
25
|
-
mapType = _ref$mapType === void 0 ? 'bmap' : _ref$mapType,
|
|
26
24
|
_ref$mapPoints = _ref.mapPoints,
|
|
27
25
|
mapPoints = _ref$mapPoints === void 0 ? [] : _ref$mapPoints,
|
|
28
26
|
_ref$newMapPoints = _ref.newMapPoints,
|
|
@@ -47,7 +47,7 @@ export default function Pies(_ref) {
|
|
|
47
47
|
});
|
|
48
48
|
var info = startDataList[index] || {};
|
|
49
49
|
var value = info.value;
|
|
50
|
-
return "{name|".concat(name.slice(0, 6)).concat(name.length > 6 ? '...' : '', "}(\u5173\u8054").concat(value, "\u5904\u7F6E\u8BC1)");
|
|
50
|
+
return "{name|".concat(name.slice(0, 6)).concat(name.length > 6 ? '...' : '', "}(\u5173\u8054").concat(value !== null && value !== void 0 ? value : 0, "\u5904\u7F6E\u8BC1)");
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
})
|
|
@@ -68,7 +68,7 @@ export default function Pies(_ref) {
|
|
|
68
68
|
});
|
|
69
69
|
var info = endDataList[index] || {};
|
|
70
70
|
var value = info.value;
|
|
71
|
-
return "{name|".concat(name.slice(0, 6)).concat(name.length > 6 ? '...' : '', "}(\u5173\u8054").concat(value, "\u5904\u7F6E\u8BC1)");
|
|
71
|
+
return "{name|".concat(name.slice(0, 6)).concat(name.length > 6 ? '...' : '', "}(\u5173\u8054").concat(value !== null && value !== void 0 ? value : 0, "\u5904\u7F6E\u8BC1)");
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
})
|
|
@@ -97,8 +97,7 @@ var BaseService = {
|
|
|
97
97
|
},
|
|
98
98
|
lng: mapInfoRes.data.lngDone,
|
|
99
99
|
lat: mapInfoRes.data.latDone,
|
|
100
|
-
|
|
101
|
-
url: mapInfoRes !== null && mapInfoRes !== void 0 && (_mapInfoRes$data2 = mapInfoRes.data) !== null && _mapInfoRes$data2 !== void 0 && _mapInfoRes$data2.icon ? "/cloudFile/common/downloadFile?id=".concat(mapInfoRes === null || mapInfoRes === void 0 || (_mapInfoRes$data3 = mapInfoRes.data) === null || _mapInfoRes$data3 === void 0 ? void 0 : _mapInfoRes$data3.icon, "&token=").concat(getVtxToken('token')) : isDark ? new MapIcon.CommonIcon2({
|
|
100
|
+
url: mapInfoRes !== null && mapInfoRes !== void 0 && (_mapInfoRes$data2 = mapInfoRes.data) !== null && _mapInfoRes$data2 !== void 0 && _mapInfoRes$data2.icon ? "/cloudFile/common/downloadFile?id=".concat(mapInfoRes === null || mapInfoRes === void 0 || (_mapInfoRes$data3 = mapInfoRes.data) === null || _mapInfoRes$data3 === void 0 ? void 0 : _mapInfoRes$data3.icon, "&token=").concat(getVtxToken('token')) : isDark ? new MapIcon.CommonIcon({
|
|
102
101
|
canvasIcon: 'PERSONNEL',
|
|
103
102
|
color: (mapInfoRes === null || mapInfoRes === void 0 || (_mapInfoRes$data4 = mapInfoRes.data) === null || _mapInfoRes$data4 === void 0 ? void 0 : _mapInfoRes$data4.statusCode) === 'Normal' ? '#119FFB' : '#999999'
|
|
104
103
|
}).getImgUrl() : new MapIcon.CommonIcon({
|
|
@@ -1,4 +1,7 @@
|
|
|
1
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 _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; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2
5
|
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
6
|
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
7
|
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; }
|
|
@@ -104,8 +107,8 @@ var BaseService = {
|
|
|
104
107
|
},
|
|
105
108
|
lng: mapInfoRes.data.lngDone,
|
|
106
109
|
lat: mapInfoRes.data.latDone,
|
|
107
|
-
labelClass: 'vtx-map-carCode',
|
|
108
|
-
url: mapInfoRes !== null && mapInfoRes !== void 0 && (_mapInfoRes$data3 = mapInfoRes.data) !== null && _mapInfoRes$data3 !== void 0 && _mapInfoRes$data3.icon ? "/cloudFile/common/downloadFile?id=".concat(mapInfoRes === null || mapInfoRes === void 0 || (_mapInfoRes$data4 = mapInfoRes.data) === null || _mapInfoRes$data4 === void 0 ? void 0 : _mapInfoRes$data4.icon, "&token=").concat(getVtxToken('token')) : isDark ? new MapIcon.
|
|
110
|
+
// labelClass: 'vtx-map-carCode',
|
|
111
|
+
url: mapInfoRes !== null && mapInfoRes !== void 0 && (_mapInfoRes$data3 = mapInfoRes.data) !== null && _mapInfoRes$data3 !== void 0 && _mapInfoRes$data3.icon ? "/cloudFile/common/downloadFile?id=".concat(mapInfoRes === null || mapInfoRes === void 0 || (_mapInfoRes$data4 = mapInfoRes.data) === null || _mapInfoRes$data4 === void 0 ? void 0 : _mapInfoRes$data4.icon, "&token=").concat(getVtxToken('token')) : isDark ? new MapIcon.CommonIcon({
|
|
109
112
|
canvasIcon: 'PERSONNEL',
|
|
110
113
|
color: (mapInfoRes === null || mapInfoRes === void 0 || (_mapInfoRes$data5 = mapInfoRes.data) === null || _mapInfoRes$data5 === void 0 ? void 0 : _mapInfoRes$data5.statusCode) === 'Normal' ? '#119FFB' : '#999999'
|
|
111
114
|
}).getImgUrl() : new MapIcon.CommonIcon({
|
|
@@ -175,9 +178,42 @@ var BaseService = {
|
|
|
175
178
|
workInfoRes: (workInfoRes === null || workInfoRes === void 0 ? void 0 : workInfoRes.data) || {}
|
|
176
179
|
};
|
|
177
180
|
},
|
|
181
|
+
useStaffStatic: function useStaffStatic(staffId, startDate, endDate, service) {
|
|
182
|
+
var _useRequest7 = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
183
|
+
var _res$data;
|
|
184
|
+
var res;
|
|
185
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
186
|
+
while (1) switch (_context.prev = _context.next) {
|
|
187
|
+
case 0:
|
|
188
|
+
_context.next = 2;
|
|
189
|
+
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/staffStatic/page"), {
|
|
190
|
+
data: {
|
|
191
|
+
staffId: staffId,
|
|
192
|
+
startTime: "".concat(startDate, " 00:00:00"),
|
|
193
|
+
endTime: "".concat(endDate, " 23:59:59"),
|
|
194
|
+
pageNo: 0,
|
|
195
|
+
pageSize: 1
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
case 2:
|
|
199
|
+
res = _context.sent;
|
|
200
|
+
return _context.abrupt("return", (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.rows) === null || _res$data === void 0 ? void 0 : _res$data[0]) || {});
|
|
201
|
+
case 4:
|
|
202
|
+
case "end":
|
|
203
|
+
return _context.stop();
|
|
204
|
+
}
|
|
205
|
+
}, _callee);
|
|
206
|
+
})), {
|
|
207
|
+
refreshDeps: [staffId, startDate, endDate]
|
|
208
|
+
}),
|
|
209
|
+
workInfoRes = _useRequest7.data;
|
|
210
|
+
return {
|
|
211
|
+
workInfoRes: workInfoRes || {}
|
|
212
|
+
};
|
|
213
|
+
},
|
|
178
214
|
// 今日作业
|
|
179
215
|
useTodayWork: function useTodayWork(staffId, startDate, endDate, page, service) {
|
|
180
|
-
var
|
|
216
|
+
var _useRequest8 = useRequest(function () {
|
|
181
217
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/kanban/kanbanShiftWorkInfoPage"), {
|
|
182
218
|
data: {
|
|
183
219
|
staffId: staffId,
|
|
@@ -190,14 +226,14 @@ var BaseService = {
|
|
|
190
226
|
}, {
|
|
191
227
|
refreshDeps: [staffId, startDate, endDate, page]
|
|
192
228
|
}),
|
|
193
|
-
todayWorkRes =
|
|
229
|
+
todayWorkRes = _useRequest8.data;
|
|
194
230
|
return {
|
|
195
231
|
todayWorkRes: (todayWorkRes === null || todayWorkRes === void 0 ? void 0 : todayWorkRes.data) || []
|
|
196
232
|
};
|
|
197
233
|
},
|
|
198
234
|
// 作业统计
|
|
199
235
|
useWorkStatic: function useWorkStatic(staffId, startDate, endDate, service) {
|
|
200
|
-
var
|
|
236
|
+
var _useRequest9 = useRequest(function () {
|
|
201
237
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/kanban/kanbanWorkInfoStatistics"), {
|
|
202
238
|
data: {
|
|
203
239
|
staffId: staffId,
|
|
@@ -208,14 +244,14 @@ var BaseService = {
|
|
|
208
244
|
}, {
|
|
209
245
|
refreshDeps: [staffId, startDate, endDate]
|
|
210
246
|
}),
|
|
211
|
-
workStaticRes =
|
|
247
|
+
workStaticRes = _useRequest9.data;
|
|
212
248
|
return {
|
|
213
249
|
workStaticRes: (workStaticRes === null || workStaticRes === void 0 ? void 0 : workStaticRes.data) || {}
|
|
214
250
|
};
|
|
215
251
|
},
|
|
216
252
|
// 里程分析
|
|
217
253
|
useMileAnalysis: function useMileAnalysis(staffId, startDate, endDate) {
|
|
218
|
-
var
|
|
254
|
+
var _useRequest10 = useRequest(function () {
|
|
219
255
|
return request.get('/cloud/zyry-reborn/api/v101/kanban/kanbanWorkMileageAnalysis', {
|
|
220
256
|
data: {
|
|
221
257
|
staffId: staffId,
|
|
@@ -226,14 +262,14 @@ var BaseService = {
|
|
|
226
262
|
}, {
|
|
227
263
|
refreshDeps: [staffId, startDate, endDate]
|
|
228
264
|
}),
|
|
229
|
-
mileAnalysisRes =
|
|
265
|
+
mileAnalysisRes = _useRequest10.data;
|
|
230
266
|
return {
|
|
231
267
|
mileAnalysisRes: (mileAnalysisRes === null || mileAnalysisRes === void 0 ? void 0 : mileAnalysisRes.data) || {}
|
|
232
268
|
};
|
|
233
269
|
},
|
|
234
270
|
useStatisticsByMonth: function useStatisticsByMonth(id, month, service) {
|
|
235
271
|
//日历
|
|
236
|
-
var
|
|
272
|
+
var _useRequest11 = useRequest(function () {
|
|
237
273
|
return request.get("/cloud/".concat(service ? 'rygl' : 'zyry-reborn', "/api/v101/attendanceRecord/statisticsByMonth"), {
|
|
238
274
|
data: {
|
|
239
275
|
staffId: id,
|
|
@@ -243,7 +279,7 @@ var BaseService = {
|
|
|
243
279
|
}, {
|
|
244
280
|
refreshDeps: [id, month]
|
|
245
281
|
}),
|
|
246
|
-
data =
|
|
282
|
+
data = _useRequest11.data;
|
|
247
283
|
return {
|
|
248
284
|
data: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
249
285
|
};
|
|
@@ -253,7 +289,7 @@ var AlarmService = {
|
|
|
253
289
|
// 报警类型
|
|
254
290
|
useAlarmType: function useAlarmType(staffId, startTime, endTime, service) {
|
|
255
291
|
var _alarmTypeRes$data;
|
|
256
|
-
var
|
|
292
|
+
var _useRequest12 = useRequest(function () {
|
|
257
293
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/alarmInfo/pageAlarmCount"), {
|
|
258
294
|
data: {
|
|
259
295
|
staffId: staffId,
|
|
@@ -264,7 +300,7 @@ var AlarmService = {
|
|
|
264
300
|
}, {
|
|
265
301
|
refreshDeps: [staffId, startTime, endTime]
|
|
266
302
|
}),
|
|
267
|
-
alarmTypeRes =
|
|
303
|
+
alarmTypeRes = _useRequest12.data;
|
|
268
304
|
return {
|
|
269
305
|
alarmTypeRes: (alarmTypeRes === null || alarmTypeRes === void 0 || (_alarmTypeRes$data = alarmTypeRes.data) === null || _alarmTypeRes$data === void 0 ? void 0 : _alarmTypeRes$data.length) > 0 ? alarmTypeRes.data.map(function (ele) {
|
|
270
306
|
return _objectSpread({
|
|
@@ -278,7 +314,7 @@ var AlarmService = {
|
|
|
278
314
|
},
|
|
279
315
|
// 报警类型分析
|
|
280
316
|
useAlarmAnalysis: function useAlarmAnalysis(staffId, startDate, endDate, service) {
|
|
281
|
-
var
|
|
317
|
+
var _useRequest13 = useRequest(function () {
|
|
282
318
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/kanban/kanbanAlarmAnalysis"), {
|
|
283
319
|
data: {
|
|
284
320
|
staffId: staffId,
|
|
@@ -289,14 +325,14 @@ var AlarmService = {
|
|
|
289
325
|
}, {
|
|
290
326
|
refreshDeps: [staffId, startDate, endDate]
|
|
291
327
|
}),
|
|
292
|
-
alarmAnalysisRes =
|
|
328
|
+
alarmAnalysisRes = _useRequest13.data;
|
|
293
329
|
return {
|
|
294
330
|
alarmAnalysisRes: (alarmAnalysisRes === null || alarmAnalysisRes === void 0 ? void 0 : alarmAnalysisRes.data) || {}
|
|
295
331
|
};
|
|
296
332
|
},
|
|
297
333
|
// 报警列表
|
|
298
334
|
useAlarmRecord: function useAlarmRecord(staffId, alarmTypeCode, startTime, endTime, pageNo, sortBy, order, service) {
|
|
299
|
-
var
|
|
335
|
+
var _useRequest14 = useRequest(function () {
|
|
300
336
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/alarmInfo/page"), {
|
|
301
337
|
data: {
|
|
302
338
|
staffId: staffId,
|
|
@@ -312,7 +348,7 @@ var AlarmService = {
|
|
|
312
348
|
}, {
|
|
313
349
|
refreshDeps: [staffId, alarmTypeCode, startTime, endTime, pageNo, sortBy, order]
|
|
314
350
|
}),
|
|
315
|
-
alarmRecordRes =
|
|
351
|
+
alarmRecordRes = _useRequest14.data;
|
|
316
352
|
return {
|
|
317
353
|
alarmRecordRes: (alarmRecordRes === null || alarmRecordRes === void 0 ? void 0 : alarmRecordRes.data) || {}
|
|
318
354
|
};
|
|
@@ -321,7 +357,7 @@ var AlarmService = {
|
|
|
321
357
|
// 考勤信息
|
|
322
358
|
var AttendanceService = {
|
|
323
359
|
useTimeAnalysis: function useTimeAnalysis(staffId, startDate, endDate, service) {
|
|
324
|
-
var
|
|
360
|
+
var _useRequest15 = useRequest(function () {
|
|
325
361
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/kanban/kanbanAttendanceTimeAnalysis"), {
|
|
326
362
|
data: {
|
|
327
363
|
staffId: staffId,
|
|
@@ -332,14 +368,14 @@ var AttendanceService = {
|
|
|
332
368
|
}, {
|
|
333
369
|
refreshDeps: [staffId, startDate, endDate]
|
|
334
370
|
}),
|
|
335
|
-
attendTimeAnalysisRes =
|
|
371
|
+
attendTimeAnalysisRes = _useRequest15.data;
|
|
336
372
|
return {
|
|
337
373
|
attendTimeAnalysisRes: (attendTimeAnalysisRes === null || attendTimeAnalysisRes === void 0 ? void 0 : attendTimeAnalysisRes.data) || {}
|
|
338
374
|
};
|
|
339
375
|
},
|
|
340
376
|
useAnalysis: function useAnalysis(staffId, startDate, endDate, service) {
|
|
341
377
|
var _attendAnalysisRes$da;
|
|
342
|
-
var
|
|
378
|
+
var _useRequest16 = useRequest(function () {
|
|
343
379
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/kanban/kanbanAttendanceAnalysis"), {
|
|
344
380
|
data: {
|
|
345
381
|
staffId: staffId,
|
|
@@ -350,7 +386,7 @@ var AttendanceService = {
|
|
|
350
386
|
}, {
|
|
351
387
|
refreshDeps: [staffId, startDate, endDate]
|
|
352
388
|
}),
|
|
353
|
-
attendAnalysisRes =
|
|
389
|
+
attendAnalysisRes = _useRequest16.data;
|
|
354
390
|
return {
|
|
355
391
|
attendAnalysisRes: (attendAnalysisRes === null || attendAnalysisRes === void 0 || (_attendAnalysisRes$da = attendAnalysisRes.data) === null || _attendAnalysisRes$da === void 0 ? void 0 : _attendAnalysisRes$da.length) > 0 ? attendAnalysisRes.data.map(function (ele) {
|
|
356
392
|
return _objectSpread({
|
|
@@ -361,7 +397,7 @@ var AttendanceService = {
|
|
|
361
397
|
};
|
|
362
398
|
},
|
|
363
399
|
useAttendRecord: function useAttendRecord(staffId, startTime, endTime, pageNo, service) {
|
|
364
|
-
var
|
|
400
|
+
var _useRequest17 = useRequest(function () {
|
|
365
401
|
return request.get("/cloud/".concat(service ? 'rygl' : 'zyry-reborn', "/api/v101/attendanceRecord"), {
|
|
366
402
|
data: {
|
|
367
403
|
staffId: staffId,
|
|
@@ -374,7 +410,7 @@ var AttendanceService = {
|
|
|
374
410
|
}, {
|
|
375
411
|
refreshDeps: [staffId, startTime, endTime, pageNo]
|
|
376
412
|
}),
|
|
377
|
-
attendRecordRes =
|
|
413
|
+
attendRecordRes = _useRequest17.data;
|
|
378
414
|
return {
|
|
379
415
|
attendRecordRes: (attendRecordRes === null || attendRecordRes === void 0 ? void 0 : attendRecordRes.data) || {}
|
|
380
416
|
};
|
|
@@ -382,7 +418,7 @@ var AttendanceService = {
|
|
|
382
418
|
};
|
|
383
419
|
var EquipmentService = {
|
|
384
420
|
useDevice: function useDevice(staffId, service) {
|
|
385
|
-
var
|
|
421
|
+
var _useRequest18 = useRequest(function () {
|
|
386
422
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/device/getByStaffId"), {
|
|
387
423
|
data: {
|
|
388
424
|
staffId: staffId
|
|
@@ -391,8 +427,8 @@ var EquipmentService = {
|
|
|
391
427
|
}, {
|
|
392
428
|
refreshDeps: [staffId]
|
|
393
429
|
}),
|
|
394
|
-
deviceRes =
|
|
395
|
-
var
|
|
430
|
+
deviceRes = _useRequest18.data;
|
|
431
|
+
var _useRequest19 = useRequest(function () {
|
|
396
432
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/positionRealtime/getByStaffId"), {
|
|
397
433
|
data: {
|
|
398
434
|
staffId: staffId
|
|
@@ -401,14 +437,14 @@ var EquipmentService = {
|
|
|
401
437
|
}, {
|
|
402
438
|
refreshDeps: [staffId]
|
|
403
439
|
}),
|
|
404
|
-
monitorRes =
|
|
440
|
+
monitorRes = _useRequest19.data;
|
|
405
441
|
return {
|
|
406
442
|
deviceRes: (deviceRes === null || deviceRes === void 0 ? void 0 : deviceRes.data) || {},
|
|
407
443
|
monitorRes: (monitorRes === null || monitorRes === void 0 ? void 0 : monitorRes.data) || {}
|
|
408
444
|
};
|
|
409
445
|
},
|
|
410
446
|
useDeviceStatus: function useDeviceStatus(id, service) {
|
|
411
|
-
var
|
|
447
|
+
var _useRequest20 = useRequest(function () {
|
|
412
448
|
return request.get("/cloud/".concat(service || 'zyry-reborn', "/api/v101/positionRealtime/deviceStatus"), {
|
|
413
449
|
data: {
|
|
414
450
|
id: id
|
|
@@ -418,7 +454,7 @@ var EquipmentService = {
|
|
|
418
454
|
ready: !!id,
|
|
419
455
|
refreshDeps: [id]
|
|
420
456
|
}),
|
|
421
|
-
deviceStatusRes =
|
|
457
|
+
deviceStatusRes = _useRequest20.data;
|
|
422
458
|
return {
|
|
423
459
|
deviceStatusRes: (deviceStatusRes === null || deviceStatusRes === void 0 ? void 0 : deviceStatusRes.data) || '-'
|
|
424
460
|
};
|
|
@@ -118,7 +118,8 @@ var ListZymx = function ListZymx(props) {
|
|
|
118
118
|
total: (todayWorkRes === null || todayWorkRes === void 0 ? void 0 : todayWorkRes.total) || 0,
|
|
119
119
|
defaultPageSize: 20,
|
|
120
120
|
onChange: pageChange
|
|
121
|
-
})
|
|
121
|
+
}),
|
|
122
|
+
dataSource: (todayWorkRes === null || todayWorkRes === void 0 ? void 0 : todayWorkRes.rows) || []
|
|
122
123
|
};
|
|
123
124
|
return /*#__PURE__*/_jsx(VmTable, _objectSpread({
|
|
124
125
|
columns: columns,
|
|
@@ -2,41 +2,126 @@
|
|
|
2
2
|
* 区域进场量分析
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Col, Row } from 'antd';
|
|
6
|
+
import dayjs from 'dayjs';
|
|
7
|
+
import { VmEmpty, VmFactor, VmPieCharts } from "../../../_components";
|
|
8
|
+
import useSettings from "../../../_hooks/useSettings";
|
|
9
|
+
import { BaseService } from "../../api";
|
|
10
|
+
import mileageLight from "../../imgs/mileage.png";
|
|
11
|
+
import mileageDark from "../../imgs/mileage_dark.png";
|
|
12
|
+
import onlineLight from "../../imgs/online.png";
|
|
13
|
+
import onlineDark from "../../imgs/online_dark.png";
|
|
14
|
+
import allTimeLight from "../../imgs/all_time.png";
|
|
15
|
+
import allTimeDark from "../../imgs/all_time_dark.png";
|
|
16
|
+
import avgLight from "../../imgs/avg.png";
|
|
17
|
+
import avgDark from "../../imgs/avg_dark.png";
|
|
6
18
|
import "./index.less";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
20
|
function WorkStaticDay(_ref) {
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
var type = _ref.type,
|
|
22
|
+
service = _ref.service,
|
|
23
|
+
id = _ref.id;
|
|
24
|
+
var _useSettings = useSettings(),
|
|
25
|
+
isDark = _useSettings.isDark;
|
|
26
|
+
var _BaseService$useStaff = BaseService.useStaffStatic(id, type === 'day' ? dayjs().format('YYYY-MM-DD') : dayjs().startOf('M').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD'), service),
|
|
27
|
+
workInfoRes = _BaseService$useStaff.workInfoRes;
|
|
28
|
+
var _ref2 = workInfoRes || {},
|
|
29
|
+
_ref2$totalMileage = _ref2.totalMileage,
|
|
30
|
+
totalMileage = _ref2$totalMileage === void 0 ? 0 : _ref2$totalMileage,
|
|
31
|
+
onlineHour = _ref2.onlineHour,
|
|
32
|
+
validWorkHour = _ref2.validWorkHour,
|
|
33
|
+
outShiftHour = _ref2.outShiftHour,
|
|
34
|
+
violateStayHour = _ref2.violateStayHour,
|
|
35
|
+
outPostHour = _ref2.outPostHour;
|
|
36
|
+
var avgWorkHour = 0;
|
|
37
|
+
var detail = [];
|
|
38
|
+
if (Number(validWorkHour)) {
|
|
39
|
+
avgWorkHour = (Number(validWorkHour) / dayjs().date()).toFixed(2) || 0;
|
|
40
|
+
detail.push({
|
|
41
|
+
name: '有效作业',
|
|
42
|
+
value: Number(validWorkHour)
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
if (Number(outShiftHour)) {
|
|
46
|
+
detail.push({
|
|
47
|
+
name: '脱岗',
|
|
48
|
+
value: Number(outShiftHour)
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (Number(violateStayHour)) {
|
|
52
|
+
detail.push({
|
|
53
|
+
name: '违规滞留',
|
|
54
|
+
value: Number(violateStayHour)
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (Number(outPostHour)) {
|
|
58
|
+
detail.push({
|
|
59
|
+
name: '异常离线',
|
|
60
|
+
value: Number(outPostHour)
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return /*#__PURE__*/_jsxs(Row, {
|
|
64
|
+
children: [/*#__PURE__*/_jsx(Col, {
|
|
65
|
+
span: 9,
|
|
66
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
67
|
+
className: "staff-base-right-static",
|
|
68
|
+
children: [type === 'day' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
69
|
+
children: [/*#__PURE__*/_jsx(VmFactor, {
|
|
70
|
+
name: "\u4ECA\u65E5\u884C\u8D70",
|
|
71
|
+
unit: "km",
|
|
72
|
+
value: totalMileage || 0,
|
|
73
|
+
img: isDark ? mileageDark : mileageLight,
|
|
74
|
+
fontType: "blue"
|
|
75
|
+
}), /*#__PURE__*/_jsx(VmFactor, {
|
|
76
|
+
name: "\u4ECA\u65E5\u5728\u7EBF",
|
|
77
|
+
unit: "h",
|
|
78
|
+
value: onlineHour || '--',
|
|
79
|
+
img: isDark ? onlineDark : onlineLight,
|
|
80
|
+
style: {
|
|
81
|
+
marginBottom: 12
|
|
82
|
+
},
|
|
83
|
+
fontType: "green"
|
|
84
|
+
})]
|
|
85
|
+
}), type === 'month' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
86
|
+
children: [/*#__PURE__*/_jsx(VmFactor, {
|
|
87
|
+
name: "\u603B\u6709\u6548\u4F5C\u4E1A\u65F6\u957F",
|
|
88
|
+
unit: "h",
|
|
89
|
+
value: validWorkHour || 0,
|
|
90
|
+
img: isDark ? allTimeDark : allTimeLight,
|
|
91
|
+
fontType: "blue"
|
|
92
|
+
}), /*#__PURE__*/_jsx(VmFactor, {
|
|
93
|
+
name: "\u65E5\u5747\u6709\u6548\u4F5C\u4E1A\u65F6\u957F",
|
|
94
|
+
unit: "h",
|
|
95
|
+
value: avgWorkHour || '--',
|
|
96
|
+
img: isDark ? avgDark : avgLight,
|
|
97
|
+
fontType: "green",
|
|
98
|
+
style: {
|
|
99
|
+
marginBottom: 12
|
|
100
|
+
}
|
|
101
|
+
})]
|
|
102
|
+
})]
|
|
103
|
+
})
|
|
104
|
+
}), /*#__PURE__*/_jsx(Col, {
|
|
105
|
+
span: 15,
|
|
106
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
107
|
+
className: "staff-base-right--right",
|
|
108
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
109
|
+
className: "staff-base-static-chart",
|
|
110
|
+
children: detail.length ? /*#__PURE__*/_jsx(VmPieCharts, {
|
|
111
|
+
unit: "h",
|
|
112
|
+
name: "",
|
|
113
|
+
innerRadius: ['50%', '65%'],
|
|
114
|
+
outerRadius: ['65%', '70%'],
|
|
115
|
+
dataList: detail,
|
|
116
|
+
legendConfig: {
|
|
117
|
+
right: 20
|
|
118
|
+
}
|
|
119
|
+
}) : /*#__PURE__*/_jsx(VmEmpty, {
|
|
120
|
+
type: "NO_CHART"
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
})]
|
|
40
125
|
});
|
|
41
126
|
}
|
|
42
127
|
export default WorkStaticDay;
|
|
@@ -11,26 +11,15 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
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
13
|
import { useSetState } from 'ahooks';
|
|
14
|
-
import { Col, Row } from 'antd';
|
|
15
14
|
import dayjs from 'dayjs';
|
|
16
|
-
import { VmExtraTab,
|
|
15
|
+
import { VmExtraTab, VmInfoCollection, VmMap, VmTitle, VmWrapper } from "../../../_components";
|
|
17
16
|
import useSettings from "../../../_hooks/useSettings";
|
|
18
17
|
import { BaseService } from "../../api";
|
|
19
|
-
import mileageLight from "../../imgs/mileage.png";
|
|
20
|
-
import mileageDark from "../../imgs/mileage_dark.png";
|
|
21
|
-
import onlineLight from "../../imgs/online.png";
|
|
22
|
-
import onlineDark from "../../imgs/online_dark.png";
|
|
23
|
-
import allTimeLight from "../../imgs/all_time.png";
|
|
24
|
-
import allTimeDark from "../../imgs/all_time_dark.png";
|
|
25
|
-
import avgLight from "../../imgs/avg.png";
|
|
26
|
-
import avgDark from "../../imgs/avg_dark.png";
|
|
27
18
|
import "./index.less";
|
|
28
19
|
import ListZymx from "./ListZymx";
|
|
29
20
|
import WorkStatic from "./WorkStatic";
|
|
30
|
-
import
|
|
31
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
22
|
var BaseInfo = function BaseInfo(props) {
|
|
33
|
-
var _workInfoRes$totalMil;
|
|
34
23
|
var id = props.id,
|
|
35
24
|
baseInfo = props.baseInfo,
|
|
36
25
|
realInfo = props.realInfo,
|
|
@@ -39,25 +28,19 @@ var BaseInfo = function BaseInfo(props) {
|
|
|
39
28
|
service = _props$service === void 0 ? '' : _props$service;
|
|
40
29
|
var _useSettings = useSettings(),
|
|
41
30
|
theme = _useSettings.theme,
|
|
42
|
-
isDark = _useSettings.isDark,
|
|
43
31
|
mapInfo = _useSettings.mapInfo;
|
|
44
32
|
var _useSetState = useSetState({
|
|
45
|
-
activeKey: '
|
|
33
|
+
activeKey: 'day',
|
|
46
34
|
contentStyle: {}
|
|
47
35
|
}),
|
|
48
36
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
49
37
|
state = _useSetState2[0],
|
|
50
38
|
setState = _useSetState2[1];
|
|
51
|
-
var activeKey = state.activeKey
|
|
52
|
-
contentStyle = state.contentStyle;
|
|
39
|
+
var activeKey = state.activeKey;
|
|
53
40
|
var mapPoints = realInfo.mapPoints,
|
|
54
41
|
pointLngLat = realInfo.pointLngLat,
|
|
55
42
|
mapPolygons = realInfo.mapPolygons,
|
|
56
43
|
realtimeInfo = realInfo.realtimeInfo;
|
|
57
|
-
var _BaseService$useWorkI = BaseService.useWorkInfo(id, dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD'), service),
|
|
58
|
-
workInfoRes = _BaseService$useWorkI.workInfoRes;
|
|
59
|
-
var _BaseService$useWorkS = BaseService.useWorkStatic(id, dayjs().startOf('M').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD'), service),
|
|
60
|
-
workStaticRes = _BaseService$useWorkS.workStaticRes;
|
|
61
44
|
var baseTabContent = /*#__PURE__*/_jsx(VmInfoCollection, {
|
|
62
45
|
data: baseInfo,
|
|
63
46
|
gap: 8,
|
|
@@ -80,7 +63,7 @@ var BaseInfo = function BaseInfo(props) {
|
|
|
80
63
|
children: (center === null || center === void 0 ? void 0 : center.length) > 0 && /*#__PURE__*/_jsx(VmMap, _objectSpread({
|
|
81
64
|
mapCenter: center,
|
|
82
65
|
mapType: (mapInfo === null || mapInfo === void 0 ? void 0 : mapInfo.mapType) || 'bmap',
|
|
83
|
-
|
|
66
|
+
mapPoints: mapPoints,
|
|
84
67
|
mapPolygons: mapPolygons,
|
|
85
68
|
geometryType: "polygon",
|
|
86
69
|
address: realtimeInfo === null || realtimeInfo === void 0 ? void 0 : realtimeInfo.address
|
|
@@ -94,73 +77,22 @@ var BaseInfo = function BaseInfo(props) {
|
|
|
94
77
|
extra: /*#__PURE__*/_jsx(VmExtraTab, {
|
|
95
78
|
data: [{
|
|
96
79
|
title: '今日',
|
|
97
|
-
key: '
|
|
80
|
+
key: 'day'
|
|
98
81
|
}, {
|
|
99
82
|
title: '本月',
|
|
100
|
-
key: '
|
|
83
|
+
key: 'month'
|
|
101
84
|
}],
|
|
102
85
|
onChange: function onChange(key) {
|
|
103
86
|
setState({
|
|
104
87
|
activeKey: key
|
|
105
88
|
});
|
|
106
|
-
}
|
|
89
|
+
},
|
|
90
|
+
value: activeKey
|
|
107
91
|
}),
|
|
108
|
-
children: /*#__PURE__*/_jsx(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
children: /*#__PURE__*/_jsxs("div", {
|
|
113
|
-
className: "staff-base-right-static",
|
|
114
|
-
children: [activeKey === '1' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
115
|
-
children: [/*#__PURE__*/_jsx(VmFactor, {
|
|
116
|
-
name: "\u4ECA\u65E5\u884C\u8D70",
|
|
117
|
-
unit: "km",
|
|
118
|
-
value: (workInfoRes === null || workInfoRes === void 0 || (_workInfoRes$totalMil = workInfoRes.totalMileage) === null || _workInfoRes$totalMil === void 0 ? void 0 : _workInfoRes$totalMil.toFixed(2)) || 0,
|
|
119
|
-
img: isDark ? mileageDark : mileageLight,
|
|
120
|
-
fontType: "blue"
|
|
121
|
-
}), /*#__PURE__*/_jsx(VmFactor, {
|
|
122
|
-
name: "\u4ECA\u65E5\u5728\u7EBF",
|
|
123
|
-
unit: "",
|
|
124
|
-
value: (workInfoRes === null || workInfoRes === void 0 ? void 0 : workInfoRes.onlineTimeStr) || '--',
|
|
125
|
-
img: isDark ? onlineDark : onlineLight,
|
|
126
|
-
style: {
|
|
127
|
-
marginBottom: 12
|
|
128
|
-
},
|
|
129
|
-
fontType: "green"
|
|
130
|
-
})]
|
|
131
|
-
}), activeKey === '2' && /*#__PURE__*/_jsxs(_Fragment, {
|
|
132
|
-
children: [/*#__PURE__*/_jsx(VmFactor, {
|
|
133
|
-
name: "\u603B\u6709\u6548\u4F5C\u4E1A\u65F6\u957F",
|
|
134
|
-
unit: "",
|
|
135
|
-
value: (workStaticRes === null || workStaticRes === void 0 ? void 0 : workStaticRes.totalOnLineTimeStr) || 0,
|
|
136
|
-
img: isDark ? allTimeDark : allTimeLight,
|
|
137
|
-
fontType: "blue"
|
|
138
|
-
}), /*#__PURE__*/_jsx(VmFactor, {
|
|
139
|
-
name: "\u65E5\u5747\u6709\u6548\u4F5C\u4E1A\u65F6\u957F",
|
|
140
|
-
unit: "",
|
|
141
|
-
value: (workStaticRes === null || workStaticRes === void 0 ? void 0 : workStaticRes.avgOnLineTimeStr) || '--',
|
|
142
|
-
img: isDark ? avgDark : avgLight,
|
|
143
|
-
fontType: "green",
|
|
144
|
-
style: {
|
|
145
|
-
marginBottom: 12
|
|
146
|
-
}
|
|
147
|
-
})]
|
|
148
|
-
})]
|
|
149
|
-
})
|
|
150
|
-
}), /*#__PURE__*/_jsx(Col, {
|
|
151
|
-
span: 15,
|
|
152
|
-
children: /*#__PURE__*/_jsxs("div", {
|
|
153
|
-
className: "staff-base-right--right",
|
|
154
|
-
children: [activeKey === '1' && /*#__PURE__*/_jsx(WorkStaticDay, {
|
|
155
|
-
id: id,
|
|
156
|
-
service: service
|
|
157
|
-
}), activeKey === '2' && /*#__PURE__*/_jsx(WorkStatic, {
|
|
158
|
-
id: id,
|
|
159
|
-
workStaticRes: workStaticRes
|
|
160
|
-
})]
|
|
161
|
-
})
|
|
162
|
-
})]
|
|
163
|
-
})
|
|
92
|
+
children: /*#__PURE__*/_jsx(WorkStatic, {
|
|
93
|
+
type: activeKey,
|
|
94
|
+
service: service,
|
|
95
|
+
id: id
|
|
164
96
|
})
|
|
165
97
|
}), /*#__PURE__*/_jsx("div", {
|
|
166
98
|
className: "staff-zymx",
|
package/package.json
CHANGED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 区域进场量分析
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import dayjs from 'dayjs';
|
|
6
|
-
import { VmEmpty, VmPieCharts } from "../../../_components";
|
|
7
|
-
import { BaseService } from "../../api";
|
|
8
|
-
import "./index.less";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
function WorkStaticDay(_ref) {
|
|
11
|
-
var _workStaticRes$detail, _workStaticRes$detail2;
|
|
12
|
-
var id = _ref.id,
|
|
13
|
-
_ref$service = _ref.service,
|
|
14
|
-
service = _ref$service === void 0 ? '' : _ref$service;
|
|
15
|
-
var _BaseService$useWorkS = BaseService.useWorkStatic(id, dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD'), service),
|
|
16
|
-
workStaticRes = _BaseService$useWorkS.workStaticRes;
|
|
17
|
-
return /*#__PURE__*/_jsx("div", {
|
|
18
|
-
className: "staff-base-static-chart",
|
|
19
|
-
children: workStaticRes !== null && workStaticRes !== void 0 && (_workStaticRes$detail = workStaticRes.details) !== null && _workStaticRes$detail !== void 0 && _workStaticRes$detail.length ? /*#__PURE__*/_jsx(VmPieCharts, {
|
|
20
|
-
unit: "",
|
|
21
|
-
name: "",
|
|
22
|
-
innerRadius: ['50%', '65%'],
|
|
23
|
-
outerRadius: ['65%', '70%'],
|
|
24
|
-
dataList: (workStaticRes === null || workStaticRes === void 0 || (_workStaticRes$detail2 = workStaticRes.details) === null || _workStaticRes$detail2 === void 0 ? void 0 : _workStaticRes$detail2.length) > 0 ? workStaticRes === null || workStaticRes === void 0 ? void 0 : workStaticRes.details.map(function (ele) {
|
|
25
|
-
return {
|
|
26
|
-
name: ele.statusName,
|
|
27
|
-
value: ele.duration / 1000,
|
|
28
|
-
durationStr: ele.durationStr
|
|
29
|
-
};
|
|
30
|
-
}) : [],
|
|
31
|
-
legendConfig: {
|
|
32
|
-
formatter: function formatter(name) {
|
|
33
|
-
var value = workStaticRes === null || workStaticRes === void 0 ? void 0 : workStaticRes.details.find(function (item) {
|
|
34
|
-
return item.statusName === name;
|
|
35
|
-
});
|
|
36
|
-
if (value) {
|
|
37
|
-
return "\t\t".concat(name, "\t\t").concat(value.durationStr, "\t\t");
|
|
38
|
-
} else {
|
|
39
|
-
return '';
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}) : /*#__PURE__*/_jsx(VmEmpty, {
|
|
44
|
-
type: "NO_CHART"
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
export default WorkStaticDay;
|