@vtx/modals2 5.0.40 → 5.0.42
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-table/index.js +4 -4
- package/lib/vtx-car-modal/api.js +32 -1
- package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +3 -0
- package/lib/vtx-car-modal/content/Jzlj/Collection/Chart.js +8 -5
- package/lib/vtx-car-modal/content/Jzlj/Collection/index.js +5 -3
- package/lib/vtx-jzlj-xnc-modal/components/Overview/index.js +1 -1
- package/lib/vtx-road-modal/api.js +1 -1
- package/lib/vtx-staff-modal/api.js +2 -2
- package/lib/vtx-staff-modal/components/AlarmInfo/Charts.js +2 -15
- package/lib/vtx-staff-modal/components/Attendance/Record.js +64 -17
- package/lib/vtx-staff-modal/components/BaseInfo/WorkStatic.js +5 -5
- package/lib/vtx-staff-modal/components/BaseInfo/index.js +1 -1
- package/lib/vtx-staff-modal/components/Equipment/index.js +1 -1
- package/lib/vtx-wr-modal/components/Base/Ptss.js +22 -0
- package/lib/vtx-wr-modal/components/Base/Sjjg.js +1 -1
- package/lib/vtx-wr-modal/components/Base/index.js +9 -6
- package/lib/vtx-wr-modal/components/Base/index.less +1 -2
- package/package.json +1 -1
package/lib/vtx-car-modal/api.js
CHANGED
|
@@ -13,7 +13,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
13
13
|
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; }
|
|
14
14
|
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); } }
|
|
15
15
|
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); }); }; }
|
|
16
|
-
import { getVtxToken } from '@vtx/utils';
|
|
16
|
+
import { getVtxToken, request } from '@vtx/utils';
|
|
17
17
|
import { useRequest } from 'ahooks';
|
|
18
18
|
import http from "../_util/http";
|
|
19
19
|
var prefix = process.env.PREFIX || '';
|
|
@@ -1349,4 +1349,35 @@ export var JzljService = {
|
|
|
1349
1349
|
visibleList: visibleList
|
|
1350
1350
|
};
|
|
1351
1351
|
}
|
|
1352
|
+
};
|
|
1353
|
+
|
|
1354
|
+
// 单位
|
|
1355
|
+
export var useUnit = function useUnit() {
|
|
1356
|
+
var _data$data4, _unitStr2;
|
|
1357
|
+
var groupCode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'XTPZ';
|
|
1358
|
+
var _useRequest53 = useRequest(function () {
|
|
1359
|
+
return request.get("/cloud/jzlj/web/api/tenant/system/config/getConfig", {
|
|
1360
|
+
data: {}
|
|
1361
|
+
});
|
|
1362
|
+
}, {
|
|
1363
|
+
refreshDeps: [groupCode]
|
|
1364
|
+
}),
|
|
1365
|
+
data = _useRequest53.data;
|
|
1366
|
+
var obj = {};
|
|
1367
|
+
var originalData = data === null || data === void 0 || (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : _data$data4[groupCode];
|
|
1368
|
+
for (var group in originalData) {
|
|
1369
|
+
if (originalData.hasOwnProperty(group)) {
|
|
1370
|
+
for (var item in originalData[group]) {
|
|
1371
|
+
var _originalData$group2;
|
|
1372
|
+
obj[item] = (_originalData$group2 = originalData[group]) === null || _originalData$group2 === void 0 ? void 0 : _originalData$group2[item];
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
var jointOrderWeightUnitTypeName = obj === null || obj === void 0 ? void 0 : obj.jointOrderWeightUnitTypeName;
|
|
1377
|
+
var nameSplitArr = jointOrderWeightUnitTypeName === null || jointOrderWeightUnitTypeName === void 0 ? void 0 : jointOrderWeightUnitTypeName.split('(');
|
|
1378
|
+
var unitStr = (nameSplitArr === null || nameSplitArr === void 0 ? void 0 : nameSplitArr[1]) || '吨)';
|
|
1379
|
+
unitStr = (_unitStr2 = unitStr) === null || _unitStr2 === void 0 ? void 0 : _unitStr2.replace(')', '');
|
|
1380
|
+
return {
|
|
1381
|
+
unitStr: unitStr
|
|
1382
|
+
};
|
|
1352
1383
|
};
|
|
@@ -225,6 +225,9 @@ var WorkRecord = function WorkRecord() {
|
|
|
225
225
|
});
|
|
226
226
|
},
|
|
227
227
|
dateValue: [state.startDate, state.endDate],
|
|
228
|
+
disabledDate: function disabledDate(current) {
|
|
229
|
+
return current && current > dayjs().endOf('day');
|
|
230
|
+
},
|
|
228
231
|
children: /*#__PURE__*/_jsxs(Row, {
|
|
229
232
|
children: [/*#__PURE__*/_jsx(Col, {
|
|
230
233
|
span: 12,
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
import { mean } from 'lodash';
|
|
1
2
|
import { VmBarCharts, VmEmpty, VmFactorList, VmWrapper } from "../../../../_components";
|
|
2
3
|
import useSettings from "../../../../_hooks/useSettings";
|
|
3
|
-
import "
|
|
4
|
-
import { mean } from 'lodash';
|
|
4
|
+
import { useUnit } from "../../../api";
|
|
5
5
|
import pjrcc_dark from "../../../imgs/jzlj/pjrcc_dark.png";
|
|
6
6
|
import pjrcc_light from "../../../imgs/jzlj/pjrcc_light.png";
|
|
7
7
|
import pjryl_dark from "../../../imgs/jzlj/pjryl_dark.png";
|
|
8
8
|
import pjryl_light from "../../../imgs/jzlj/pjryl_light.png";
|
|
9
|
+
import "./index.less";
|
|
9
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
11
|
export default function Chart(_ref) {
|
|
11
12
|
var _ref$dataList = _ref.dataList,
|
|
12
13
|
dataList = _ref$dataList === void 0 ? [] : _ref$dataList;
|
|
13
14
|
var _useSettings = useSettings(),
|
|
14
15
|
isDark = _useSettings.isDark;
|
|
16
|
+
var _useUnit = useUnit(),
|
|
17
|
+
unitStr = _useUnit.unitStr;
|
|
15
18
|
var ylData = dataList.map(function (item) {
|
|
16
19
|
return item.weight;
|
|
17
20
|
});
|
|
@@ -22,7 +25,7 @@ export default function Chart(_ref) {
|
|
|
22
25
|
var ccDataAvg = ccData !== null && ccData !== void 0 && ccData.length ? mean(ccData).toFixed(2) : '0';
|
|
23
26
|
var dataList_top = [{
|
|
24
27
|
name: '平均日运量',
|
|
25
|
-
unit:
|
|
28
|
+
unit: unitStr,
|
|
26
29
|
value: ylDataAvg,
|
|
27
30
|
img: isDark ? pjryl_dark : pjryl_light,
|
|
28
31
|
fontType: 'blue',
|
|
@@ -79,8 +82,8 @@ export default function Chart(_ref) {
|
|
|
79
82
|
name: '(次)'
|
|
80
83
|
}, {
|
|
81
84
|
key: "\u2000",
|
|
82
|
-
unit:
|
|
83
|
-
name:
|
|
85
|
+
unit: unitStr,
|
|
86
|
+
name: "(".concat(unitStr, ")")
|
|
84
87
|
}],
|
|
85
88
|
lineList: [{
|
|
86
89
|
name: '车次',
|
|
@@ -20,7 +20,7 @@ import dayjs from 'dayjs';
|
|
|
20
20
|
import { useContext, useEffect } from 'react';
|
|
21
21
|
import { VmFactorList, VmFilter, VmTable, VmTag, VmWrapper } from "../../../../_components";
|
|
22
22
|
import useSettings from "../../../../_hooks/useSettings";
|
|
23
|
-
import { JzljService } from "../../../api";
|
|
23
|
+
import { JzljService, useUnit } from "../../../api";
|
|
24
24
|
import { CarContext } from "../../../index";
|
|
25
25
|
import "./index.less";
|
|
26
26
|
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
@@ -36,6 +36,8 @@ export default function Collection() {
|
|
|
36
36
|
setIframeModalInfo = _useContext.setIframeModalInfo;
|
|
37
37
|
var _useSettings = useSettings(),
|
|
38
38
|
isDark = _useSettings.isDark;
|
|
39
|
+
var _useUnit = useUnit(),
|
|
40
|
+
unitStr = _useUnit.unitStr;
|
|
39
41
|
var _useSetState = useSetState({
|
|
40
42
|
activeKey: 'chart',
|
|
41
43
|
stepThreeOperateTimeLeft: dayjs().subtract(6, 'day'),
|
|
@@ -122,7 +124,7 @@ export default function Collection() {
|
|
|
122
124
|
width: 180
|
|
123
125
|
}], ['建筑垃圾类别', 'garbageTypeName', {
|
|
124
126
|
width: 120
|
|
125
|
-
}], [
|
|
127
|
+
}], ["\u8FD0\u91CF(".concat(unitStr, ")"), 'receivedWeight', {
|
|
126
128
|
width: 120,
|
|
127
129
|
align: 'right'
|
|
128
130
|
}]]), [['操作', 'action', {
|
|
@@ -213,7 +215,7 @@ export default function Collection() {
|
|
|
213
215
|
totalWeight = _totalData$totalWeigh === void 0 ? 0 : _totalData$totalWeigh;
|
|
214
216
|
var totalList = [{
|
|
215
217
|
name: '总运量',
|
|
216
|
-
unit:
|
|
218
|
+
unit: unitStr,
|
|
217
219
|
value: totalWeight,
|
|
218
220
|
unitStyle: {
|
|
219
221
|
fontSize: 14
|
|
@@ -52,7 +52,7 @@ export default function Overview() {
|
|
|
52
52
|
var _overviewApis$useCzz = overviewApis.useCzz(id),
|
|
53
53
|
czzData = _overviewApis$useCzz.data;
|
|
54
54
|
infoData.push({
|
|
55
|
-
label:
|
|
55
|
+
label: "\u5269\u4F59\u91CF(".concat(unitStr, ")"),
|
|
56
56
|
key: 'syWeight',
|
|
57
57
|
value: (_czzData$syWeight = czzData === null || czzData === void 0 ? void 0 : czzData.syWeight) !== null && _czzData$syWeight !== void 0 ? _czzData$syWeight : '--'
|
|
58
58
|
});
|
|
@@ -85,7 +85,7 @@ export var BaseService = {
|
|
|
85
85
|
}),
|
|
86
86
|
jcssBaseInfoRes = _useRequest3.data;
|
|
87
87
|
var jcssInfo = jcssBaseInfoRes === null || jcssBaseInfoRes === void 0 ? void 0 : jcssBaseInfoRes.data;
|
|
88
|
-
var hasRule = (jcssInfo === null || jcssInfo === void 0 || (_jcssInfo$dataJson = jcssInfo.dataJson) === null || _jcssInfo$dataJson === void 0 || (_jcssInfo$dataJson = _jcssInfo$dataJson.
|
|
88
|
+
var hasRule = (jcssInfo === null || jcssInfo === void 0 || (_jcssInfo$dataJson = jcssInfo.dataJson) === null || _jcssInfo$dataJson === void 0 || (_jcssInfo$dataJson = _jcssInfo$dataJson.businessTypeId) === null || _jcssInfo$dataJson === void 0 ? void 0 : _jcssInfo$dataJson.indexOf('HW')) > -1;
|
|
89
89
|
return {
|
|
90
90
|
jcssInfo: jcssInfo,
|
|
91
91
|
hasRule: hasRule
|
|
@@ -303,12 +303,12 @@ var AlarmService = {
|
|
|
303
303
|
alarmTypeRes = _useRequest12.data;
|
|
304
304
|
return {
|
|
305
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) {
|
|
306
|
-
return _objectSpread({
|
|
306
|
+
return _objectSpread(_objectSpread({}, ele), {}, {
|
|
307
307
|
name: ele.alarmTypeName,
|
|
308
308
|
value: ele.count,
|
|
309
309
|
label: "".concat(ele.alarmTypeName, "(").concat(ele.count, ")"),
|
|
310
310
|
key: ele.alarmTypeCode || 'all'
|
|
311
|
-
}
|
|
311
|
+
});
|
|
312
312
|
}) : []
|
|
313
313
|
};
|
|
314
314
|
},
|
|
@@ -33,26 +33,13 @@ var Charts = function Charts(_ref) {
|
|
|
33
33
|
outerRadius: ['65%', '70%'],
|
|
34
34
|
dataList: (chartData === null || chartData === void 0 ? void 0 : chartData.filter(function (ele) {
|
|
35
35
|
return ele.alarmTypeCode;
|
|
36
|
-
})) || []
|
|
37
|
-
legendConfig: {
|
|
38
|
-
right: 160,
|
|
39
|
-
formatter: function formatter(name) {
|
|
40
|
-
var value = chartData.find(function (item) {
|
|
41
|
-
return item.name === name;
|
|
42
|
-
});
|
|
43
|
-
if (value) {
|
|
44
|
-
return "\t\t".concat(name, "\t\t").concat(value.value, "\u6B21\t\t").concat((value.value / total * 100).toFixed(2), "%");
|
|
45
|
-
} else {
|
|
46
|
-
return '';
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
36
|
+
})) || []
|
|
50
37
|
}) : /*#__PURE__*/_jsx(VmEmpty, {
|
|
51
38
|
type: "NO_CHART"
|
|
52
39
|
})
|
|
53
40
|
}), /*#__PURE__*/_jsx("div", {
|
|
54
41
|
className: "staff-alarm-charts-item",
|
|
55
|
-
children: (
|
|
42
|
+
children: (values === null || values === void 0 ? void 0 : values.length) > 0 ? /*#__PURE__*/_jsx(VmLineCharts, {
|
|
56
43
|
height: 216,
|
|
57
44
|
unit: "\u6B21",
|
|
58
45
|
name: "\u62A5\u8B66\u6B21\u6570",
|
|
@@ -14,6 +14,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
14
14
|
* 考勤记录
|
|
15
15
|
*/
|
|
16
16
|
import { useSetState } from 'ahooks';
|
|
17
|
+
import { Tag } from 'antd';
|
|
17
18
|
import dayjs from 'dayjs';
|
|
18
19
|
import { VmExtraTab, VmTable, VmWrapper } from "../../../_components";
|
|
19
20
|
import { AttendanceService } from "../../api";
|
|
@@ -47,15 +48,24 @@ export default function Record(props) {
|
|
|
47
48
|
var getColor = function getColor(code) {
|
|
48
49
|
var color = '';
|
|
49
50
|
switch (code) {
|
|
50
|
-
case '
|
|
51
|
-
color = '
|
|
51
|
+
case 'Normal':
|
|
52
|
+
color = 'green';
|
|
53
|
+
break;
|
|
54
|
+
case 'Late':
|
|
55
|
+
case 'Early':
|
|
56
|
+
color = 'red';
|
|
57
|
+
break;
|
|
58
|
+
case 'Leave':
|
|
59
|
+
case 'Absent':
|
|
60
|
+
color = 'orange';
|
|
52
61
|
break;
|
|
53
62
|
default:
|
|
54
|
-
color = '
|
|
63
|
+
color = 'warning';
|
|
55
64
|
break;
|
|
56
65
|
}
|
|
57
66
|
return color;
|
|
58
67
|
};
|
|
68
|
+
var isClockInOut = shiftClockWay === 'CLOCK_IN_OUT';
|
|
59
69
|
var columns = [{
|
|
60
70
|
title: '所属机构',
|
|
61
71
|
dataIndex: 'deptName',
|
|
@@ -65,7 +75,8 @@ export default function Record(props) {
|
|
|
65
75
|
}, {
|
|
66
76
|
title: '姓名',
|
|
67
77
|
dataIndex: 'staffName',
|
|
68
|
-
key: 'staffName'
|
|
78
|
+
key: 'staffName',
|
|
79
|
+
ellipsis: true
|
|
69
80
|
}, {
|
|
70
81
|
title: '班次',
|
|
71
82
|
dataIndex: 'shiftName',
|
|
@@ -88,7 +99,7 @@ export default function Record(props) {
|
|
|
88
99
|
key: 'shiftWorkElementNames',
|
|
89
100
|
width: 100,
|
|
90
101
|
ellipsis: true
|
|
91
|
-
}, {
|
|
102
|
+
}, isClockInOut && {
|
|
92
103
|
title: '上班时间',
|
|
93
104
|
dataIndex: 'clockInTime',
|
|
94
105
|
key: 'clockInTime',
|
|
@@ -96,18 +107,23 @@ export default function Record(props) {
|
|
|
96
107
|
render: function render(text) {
|
|
97
108
|
return text ? text : '-';
|
|
98
109
|
}
|
|
99
|
-
}, {
|
|
110
|
+
}, isClockInOut && {
|
|
100
111
|
title: '上班状态',
|
|
101
112
|
dataIndex: 'clockInStatusName',
|
|
102
113
|
key: 'clockInStatusName',
|
|
103
114
|
width: 80,
|
|
104
|
-
render: function render(text) {
|
|
105
|
-
return
|
|
106
|
-
|
|
107
|
-
|
|
115
|
+
render: function render(text, record) {
|
|
116
|
+
return record.clockInStatusCode ? /*#__PURE__*/_jsx("div", {
|
|
117
|
+
style: {
|
|
118
|
+
color: getColor(record.clockInStatusCode)
|
|
119
|
+
},
|
|
120
|
+
children: /*#__PURE__*/_jsx(Tag, {
|
|
121
|
+
color: getColor(record.clockInStatusCode),
|
|
122
|
+
children: text
|
|
123
|
+
})
|
|
108
124
|
}) : '--';
|
|
109
125
|
}
|
|
110
|
-
}, {
|
|
126
|
+
}, isClockInOut && {
|
|
111
127
|
title: '下班时间',
|
|
112
128
|
dataIndex: 'clockOutTime',
|
|
113
129
|
key: 'clockOutTime',
|
|
@@ -115,24 +131,55 @@ export default function Record(props) {
|
|
|
115
131
|
render: function render(text) {
|
|
116
132
|
return text ? text : '-';
|
|
117
133
|
}
|
|
118
|
-
}, {
|
|
134
|
+
}, isClockInOut && {
|
|
119
135
|
title: '下班状态',
|
|
120
136
|
dataIndex: 'clockOutStatusName',
|
|
121
137
|
key: 'clockOutStatusName',
|
|
122
138
|
width: 80,
|
|
123
|
-
render: function render(text) {
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
|
|
139
|
+
render: function render(text, record) {
|
|
140
|
+
return record.clockOutStatusCode ? /*#__PURE__*/_jsx("div", {
|
|
141
|
+
style: {
|
|
142
|
+
color: getColor(record.clockOutStatusCode)
|
|
143
|
+
},
|
|
144
|
+
children: /*#__PURE__*/_jsx(Tag, {
|
|
145
|
+
color: getColor(record.clockOutStatusCode),
|
|
146
|
+
children: text
|
|
147
|
+
})
|
|
127
148
|
}) : '--';
|
|
128
149
|
}
|
|
150
|
+
}, !isClockInOut && {
|
|
151
|
+
title: '打卡时间',
|
|
152
|
+
dataIndex: 'clockInTime',
|
|
153
|
+
key: 'clockInTime',
|
|
154
|
+
width: 140,
|
|
155
|
+
render: function render(text) {
|
|
156
|
+
return text ? text : '-';
|
|
157
|
+
}
|
|
158
|
+
}, !isClockInOut && {
|
|
159
|
+
title: '打卡状态',
|
|
160
|
+
dataIndex: 'clockInStatusName',
|
|
161
|
+
key: 'clockInStatusName',
|
|
162
|
+
width: 80,
|
|
163
|
+
render: function render(text, record) {
|
|
164
|
+
return /*#__PURE__*/_jsx("div", {
|
|
165
|
+
style: {
|
|
166
|
+
color: getColor(record.clockInStatusCode)
|
|
167
|
+
},
|
|
168
|
+
children: /*#__PURE__*/_jsx(Tag, {
|
|
169
|
+
color: getColor(record.clockInStatusCode),
|
|
170
|
+
children: text
|
|
171
|
+
})
|
|
172
|
+
});
|
|
173
|
+
}
|
|
129
174
|
}, {
|
|
130
175
|
title: '用工类型',
|
|
131
176
|
dataIndex: 'workTypeName',
|
|
132
177
|
key: 'workTypeName',
|
|
133
178
|
width: 80,
|
|
134
179
|
ellipsis: true
|
|
135
|
-
}]
|
|
180
|
+
}].filter(function (item) {
|
|
181
|
+
return !!item;
|
|
182
|
+
});
|
|
136
183
|
var pageChange = function pageChange(page) {
|
|
137
184
|
setState({
|
|
138
185
|
pagination: _objectSpread(_objectSpread({}, pagination), {}, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 区域进场量分析
|
|
1
|
+
/**
|
|
2
|
+
* 区域进场量分析
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { Col, Row } from 'antd';
|
|
@@ -26,8 +26,8 @@ function WorkStaticDay(_ref) {
|
|
|
26
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
27
|
workInfoRes = _BaseService$useStaff.workInfoRes;
|
|
28
28
|
var _ref2 = workInfoRes || {},
|
|
29
|
-
_ref2$
|
|
30
|
-
|
|
29
|
+
_ref2$totalMileageStr = _ref2.totalMileageStr,
|
|
30
|
+
totalMileageStr = _ref2$totalMileageStr === void 0 ? 0 : _ref2$totalMileageStr,
|
|
31
31
|
onlineHour = _ref2.onlineHour,
|
|
32
32
|
validWorkHour = _ref2.validWorkHour,
|
|
33
33
|
outShiftHour = _ref2.outShiftHour,
|
|
@@ -69,7 +69,7 @@ function WorkStaticDay(_ref) {
|
|
|
69
69
|
children: [/*#__PURE__*/_jsx(VmFactor, {
|
|
70
70
|
name: "\u4ECA\u65E5\u884C\u8D70",
|
|
71
71
|
unit: "km",
|
|
72
|
-
value:
|
|
72
|
+
value: totalMileageStr || 0,
|
|
73
73
|
img: isDark ? mileageDark : mileageLight,
|
|
74
74
|
fontType: "blue"
|
|
75
75
|
}), /*#__PURE__*/_jsx(VmFactor, {
|
|
@@ -63,7 +63,7 @@ var BaseInfo = function BaseInfo(props) {
|
|
|
63
63
|
children: (center === null || center === void 0 ? void 0 : center.length) > 0 && /*#__PURE__*/_jsx(VmMap, _objectSpread({
|
|
64
64
|
mapCenter: center,
|
|
65
65
|
mapType: (mapInfo === null || mapInfo === void 0 ? void 0 : mapInfo.mapType) || 'bmap',
|
|
66
|
-
|
|
66
|
+
newMapPoints: mapPoints,
|
|
67
67
|
mapPolygons: mapPolygons,
|
|
68
68
|
geometryType: "polygon",
|
|
69
69
|
address: info === null || info === void 0 ? void 0 : info.address
|
|
@@ -137,7 +137,7 @@ var Equipment = function Equipment(props) {
|
|
|
137
137
|
className: "staff-equip-map",
|
|
138
138
|
children: /*#__PURE__*/_jsx(VmMap, _objectSpread({
|
|
139
139
|
mapCenter: pointLngLat !== null && pointLngLat !== void 0 && pointLngLat.length ? pointLngLat : mapInfo === null || mapInfo === void 0 ? void 0 : mapInfo.mapCenter,
|
|
140
|
-
|
|
140
|
+
newMapPoints: mapPoints
|
|
141
141
|
}, customMapInfo))
|
|
142
142
|
})
|
|
143
143
|
})]
|
|
@@ -23,6 +23,9 @@ export default (function (props) {
|
|
|
23
23
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
24
24
|
children: [/*#__PURE__*/_jsx("div", {
|
|
25
25
|
className: "wr-base-ptss",
|
|
26
|
+
style: {
|
|
27
|
+
padding: gcDetail.hasDevice ? '10px 136px 0' : '30px 136px 30px'
|
|
28
|
+
},
|
|
26
29
|
children: ptss.map(function (item) {
|
|
27
30
|
return /*#__PURE__*/_jsxs("div", {
|
|
28
31
|
className: "wr-ptss-item",
|
|
@@ -37,6 +40,7 @@ export default (function (props) {
|
|
|
37
40
|
}), /*#__PURE__*/_jsxs("div", {
|
|
38
41
|
style: {
|
|
39
42
|
display: 'flex',
|
|
43
|
+
flexDirection: gcDetail.hasDevice ? 'row' : 'column',
|
|
40
44
|
justifyContent: 'space-between',
|
|
41
45
|
gap: '20px',
|
|
42
46
|
padding: '0 16px'
|
|
@@ -44,10 +48,16 @@ export default (function (props) {
|
|
|
44
48
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
45
49
|
className: "wr-base-kws",
|
|
46
50
|
style: {
|
|
51
|
+
flex: gcDetail.hasDevice ? 1 : 'auto',
|
|
52
|
+
height: gcDetail.hasDevice ? 'auto' : '200px',
|
|
47
53
|
background: theme === 'blue' ? 'rgba(51, 166, 255, 0.2)' : '#F3F8FF'
|
|
48
54
|
},
|
|
49
55
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
50
56
|
className: "wr-kws-total",
|
|
57
|
+
style: {
|
|
58
|
+
justifyContent: gcDetail.hasDevice ? 'space-between' : 'center',
|
|
59
|
+
gap: gcDetail.hasDevice ? '0' : '60px'
|
|
60
|
+
},
|
|
51
61
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
52
62
|
className: "wr-kws-tip",
|
|
53
63
|
children: [/*#__PURE__*/_jsx("img", {
|
|
@@ -98,6 +108,9 @@ export default (function (props) {
|
|
|
98
108
|
})]
|
|
99
109
|
}), /*#__PURE__*/_jsxs("div", {
|
|
100
110
|
className: "wr-kws-each",
|
|
111
|
+
style: {
|
|
112
|
+
padding: gcDetail.hasDevice ? '0' : '40px 80px'
|
|
113
|
+
},
|
|
101
114
|
children: [showKeys.includes('urinalNums') && /*#__PURE__*/_jsxs("div", {
|
|
102
115
|
children: [/*#__PURE__*/_jsx("span", {
|
|
103
116
|
style: {
|
|
@@ -151,10 +164,16 @@ export default (function (props) {
|
|
|
151
164
|
}), /*#__PURE__*/_jsxs("div", {
|
|
152
165
|
className: "wr-base-kws",
|
|
153
166
|
style: {
|
|
167
|
+
flex: gcDetail.hasDevice ? 1 : 'auto',
|
|
168
|
+
height: gcDetail.hasDevice ? 'auto' : '200px',
|
|
154
169
|
background: theme === 'blue' ? 'rgba(255,152,175,0.2)' : '#FFF2F5'
|
|
155
170
|
},
|
|
156
171
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
157
172
|
className: "wr-kws-total",
|
|
173
|
+
style: {
|
|
174
|
+
justifyContent: gcDetail.hasDevice ? 'space-between' : 'center',
|
|
175
|
+
gap: gcDetail.hasDevice ? '0' : '60px'
|
|
176
|
+
},
|
|
158
177
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
159
178
|
className: "wr-kws-tip",
|
|
160
179
|
children: [/*#__PURE__*/_jsx("img", {
|
|
@@ -205,6 +224,9 @@ export default (function (props) {
|
|
|
205
224
|
})]
|
|
206
225
|
}), /*#__PURE__*/_jsxs("div", {
|
|
207
226
|
className: "wr-kws-each",
|
|
227
|
+
style: {
|
|
228
|
+
padding: gcDetail.hasDevice ? '0' : '40px 80px'
|
|
229
|
+
},
|
|
208
230
|
children: [showKeys.includes('womanSquatNums') && /*#__PURE__*/_jsxs("div", {
|
|
209
231
|
children: [/*#__PURE__*/_jsx("span", {
|
|
210
232
|
style: {
|
|
@@ -150,7 +150,7 @@ export default (function (props) {
|
|
|
150
150
|
style: {
|
|
151
151
|
fontSize: '18px'
|
|
152
152
|
},
|
|
153
|
-
children: (_each$value = each.value) !== null && _each$value !== void 0 ? _each$value : '--'
|
|
153
|
+
children: each.factorCode === 'PERSON_NUM' && Number(each.value) ? Number(each.value).toFixed(0) : (_each$value = each.value) !== null && _each$value !== void 0 ? _each$value : '--'
|
|
154
154
|
}), "\xA0", (_each$unit = each.unit) !== null && _each$unit !== void 0 ? _each$unit : '--']
|
|
155
155
|
}), /*#__PURE__*/_jsxs("div", {
|
|
156
156
|
className: "each-factor-value",
|
|
@@ -156,7 +156,7 @@ export default (function (props) {
|
|
|
156
156
|
}];
|
|
157
157
|
var tableProps = {
|
|
158
158
|
columns: columns,
|
|
159
|
-
height:
|
|
159
|
+
height: 270,
|
|
160
160
|
isIndex: false,
|
|
161
161
|
pagination: false,
|
|
162
162
|
dataSource: alarmList
|
|
@@ -165,7 +165,7 @@ export default (function (props) {
|
|
|
165
165
|
label: '监测数据',
|
|
166
166
|
key: 'data',
|
|
167
167
|
children: /*#__PURE__*/_jsx(VmLineCharts, {
|
|
168
|
-
height:
|
|
168
|
+
height: 300,
|
|
169
169
|
xAxis: echartsData.names || [],
|
|
170
170
|
dataList: (echartsData.values || []).map(function (item, index) {
|
|
171
171
|
return {
|
|
@@ -267,8 +267,8 @@ export default (function (props) {
|
|
|
267
267
|
}
|
|
268
268
|
}, [monitorTypeCode]);
|
|
269
269
|
useEffect(function () {
|
|
270
|
-
startDate && endDate && activeKey === 'data' && getData();
|
|
271
|
-
}, [startDate, endDate, activeKey]);
|
|
270
|
+
startDate && endDate && activeKey === 'data' && (gcDetail === null || gcDetail === void 0 ? void 0 : gcDetail.id) && getData();
|
|
271
|
+
}, [startDate, endDate, activeKey, gcDetail]);
|
|
272
272
|
var getData = function getData() {
|
|
273
273
|
monitorItemEcharts({
|
|
274
274
|
facilityId: gcDetail.id,
|
|
@@ -300,8 +300,8 @@ export default (function (props) {
|
|
|
300
300
|
});
|
|
301
301
|
};
|
|
302
302
|
useEffect(function () {
|
|
303
|
-
date && activeKey === 'list' && getList();
|
|
304
|
-
}, [date, activeKey]);
|
|
303
|
+
date && activeKey === 'list' && (gcDetail === null || gcDetail === void 0 ? void 0 : gcDetail.id) && getList();
|
|
304
|
+
}, [date, activeKey, gcDetail]);
|
|
305
305
|
return /*#__PURE__*/_jsxs("div", {
|
|
306
306
|
className: "wr-base-content",
|
|
307
307
|
children: [detail.fallDownAlarm && /*#__PURE__*/_jsx("div", {
|
|
@@ -325,6 +325,9 @@ export default (function (props) {
|
|
|
325
325
|
className: "wr-base-right",
|
|
326
326
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
327
327
|
className: "wr-base-sjjg",
|
|
328
|
+
style: {
|
|
329
|
+
height: gcDetail.hasDevice ? '270px' : '100%'
|
|
330
|
+
},
|
|
328
331
|
children: [/*#__PURE__*/_jsx("div", {
|
|
329
332
|
className: "wr-base-title",
|
|
330
333
|
children: "\u914D\u5957\u8BBE\u65BD"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
}
|
|
87
87
|
.wr-base-jcbj {
|
|
88
88
|
width: 100%;
|
|
89
|
-
height:
|
|
89
|
+
height: 375px;
|
|
90
90
|
padding-bottom: 16px;
|
|
91
91
|
overflow: hidden;
|
|
92
92
|
overflow-y: auto;
|
|
@@ -213,7 +213,6 @@
|
|
|
213
213
|
}
|
|
214
214
|
.wr-base-kws {
|
|
215
215
|
flex: 1;
|
|
216
|
-
height: 134px;
|
|
217
216
|
border-radius: 8px;
|
|
218
217
|
margin: 12px 0;
|
|
219
218
|
padding: 14px;
|