@vtx/modals2 5.0.35 → 5.0.37
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/vtx-base-modal/index.js +3 -3
- package/lib/vtx-car-modal/index.js +2 -2
- package/lib/vtx-jzlj-xnc-modal/components/Overview/CZZ.js +9 -13
- package/lib/vtx-staff-modal/components/AlarmInfo/Charts.js +4 -1
- package/lib/vtx-staff-modal/components/AlarmInfo/List.js +1 -0
- package/lib/vtx-staff-modal/components/Attendance/Exeception.js +5 -2
- package/lib/vtx-staff-modal/components/Attendance/Record.js +29 -11
- package/lib/vtx-staff-modal/components/Attendance/WorkingHours.js +2 -2
- package/lib/vtx-staff-modal/components/Attendance/index.less +23 -1
- package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +2 -2
- package/lib/vtx-staff-modal/components/BaseInfo/index.js +3 -3
- package/package.json +1 -1
|
@@ -108,9 +108,9 @@ var VmBaseModal = function VmBaseModal(props) {
|
|
|
108
108
|
var value = useMemo(function () {
|
|
109
109
|
return {
|
|
110
110
|
theme: theme,
|
|
111
|
-
startDate: startDate ? dayjs(startDate) :
|
|
112
|
-
endDate: endDate ? dayjs(endDate) :
|
|
113
|
-
date: date ? dayjs(date) :
|
|
111
|
+
startDate: startDate ? dayjs(startDate) : undefined,
|
|
112
|
+
endDate: endDate ? dayjs(endDate) : undefined,
|
|
113
|
+
date: date ? dayjs(date) : undefined,
|
|
114
114
|
mapInfo: mapInfo,
|
|
115
115
|
tabPosition: tabPosition,
|
|
116
116
|
chartFontColor: theme === 'light' ? '#595959' : '#FFFFFF',
|
|
@@ -287,8 +287,8 @@ var VtxCarModal = function VtxCarModal(props) {
|
|
|
287
287
|
id: id,
|
|
288
288
|
info: info,
|
|
289
289
|
detail: detail,
|
|
290
|
-
startDate: startDate ? dayjs(startDate) :
|
|
291
|
-
endDate: endDate ? dayjs(endDate) :
|
|
290
|
+
startDate: startDate ? dayjs(startDate) : undefined,
|
|
291
|
+
endDate: endDate ? dayjs(endDate) : undefined,
|
|
292
292
|
showFields: showFields,
|
|
293
293
|
onTdClick: onTdClick,
|
|
294
294
|
onCancel: onCancel,
|
|
@@ -48,19 +48,15 @@ export default function CZZ(_ref) {
|
|
|
48
48
|
justifyContent: 'center',
|
|
49
49
|
textAlign: 'center'
|
|
50
50
|
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
justifyContent: 'center',
|
|
61
|
-
textAlign: 'center'
|
|
62
|
-
}
|
|
63
|
-
}];
|
|
51
|
+
}
|
|
52
|
+
// {
|
|
53
|
+
// name: '核准量',
|
|
54
|
+
// unit: unitStr,
|
|
55
|
+
// value: 0,
|
|
56
|
+
// unitStyle: { fontSize: 14 },
|
|
57
|
+
// style: { flex: 1, justifyContent: 'center', textAlign: 'center' },
|
|
58
|
+
// },
|
|
59
|
+
];
|
|
64
60
|
var dataList_yssy = [{
|
|
65
61
|
name: '已接收量',
|
|
66
62
|
unit: unitStr,
|
|
@@ -35,8 +35,11 @@ var Charts = function Charts(_ref) {
|
|
|
35
35
|
var value = chartData.find(function (item) {
|
|
36
36
|
return item.name === name;
|
|
37
37
|
});
|
|
38
|
+
var total = chartData.reduce(function (acc, cur) {
|
|
39
|
+
return acc + cur.value;
|
|
40
|
+
}, 0);
|
|
38
41
|
if (value) {
|
|
39
|
-
return "\t\t".concat(name, "\t\t").concat(value.value, "\u6B21\t\t");
|
|
42
|
+
return "\t\t".concat(name, "\t\t").concat(value.value, "\u6B21\t\t").concat((value.value / total * 100).toFixed(2), "%");
|
|
40
43
|
} else {
|
|
41
44
|
return '';
|
|
42
45
|
}
|
|
@@ -11,12 +11,13 @@ import { useSetState } from 'ahooks';
|
|
|
11
11
|
import dayjs from 'dayjs';
|
|
12
12
|
import { VmEmpty, VmPieCharts, VmWrapper } from "../../../_components";
|
|
13
13
|
import { AttendanceService } from "../../api";
|
|
14
|
+
import { sumBy } from 'lodash';
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
export default function Exeception(props) {
|
|
16
17
|
var id = props.id,
|
|
17
18
|
service = props.service;
|
|
18
19
|
var _useSetState = useSetState({
|
|
19
|
-
startDate: dayjs(),
|
|
20
|
+
startDate: dayjs().startOf('M'),
|
|
20
21
|
endDate: dayjs()
|
|
21
22
|
}),
|
|
22
23
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
@@ -24,7 +25,7 @@ export default function Exeception(props) {
|
|
|
24
25
|
setState = _useSetState2[1];
|
|
25
26
|
var startDate = state.startDate,
|
|
26
27
|
endDate = state.endDate;
|
|
27
|
-
var _AttendanceService$us = AttendanceService.useAnalysis(id, startDate.
|
|
28
|
+
var _AttendanceService$us = AttendanceService.useAnalysis(id, startDate.format('YYYY-MM-DD'), endDate.format('YYYY-MM-DD'), service),
|
|
28
29
|
attendAnalysisRes = _AttendanceService$us.attendAnalysisRes;
|
|
29
30
|
var handleDateChange = function handleDateChange(dates) {
|
|
30
31
|
setState({
|
|
@@ -47,6 +48,8 @@ export default function Exeception(props) {
|
|
|
47
48
|
innerRadius: ['50%', '65%'],
|
|
48
49
|
outerRadius: ['65%', '70%'],
|
|
49
50
|
dataList: attendAnalysisRes || [],
|
|
51
|
+
total: sumBy(attendAnalysisRes, 'value'),
|
|
52
|
+
title: "\u603B\u6570(\u6B21)",
|
|
50
53
|
legendConfig: {
|
|
51
54
|
right: 12
|
|
52
55
|
}
|
|
@@ -22,7 +22,7 @@ export default function Record(props) {
|
|
|
22
22
|
var id = props.id,
|
|
23
23
|
service = props.service;
|
|
24
24
|
var _useSetState = useSetState({
|
|
25
|
-
startDate: dayjs(),
|
|
25
|
+
startDate: dayjs().startOf('M'),
|
|
26
26
|
endDate: dayjs(),
|
|
27
27
|
pagination: {
|
|
28
28
|
current: 1,
|
|
@@ -36,12 +36,24 @@ export default function Record(props) {
|
|
|
36
36
|
var pagination = state.pagination,
|
|
37
37
|
startDate = state.startDate,
|
|
38
38
|
endDate = state.endDate;
|
|
39
|
-
var _AttendanceService$us = AttendanceService.useAttendRecord(id, "".concat(startDate.
|
|
39
|
+
var _AttendanceService$us = AttendanceService.useAttendRecord(id, "".concat(startDate.format('YYYY-MM-DD'), " 00:00:00"), "".concat(endDate.format('YYYY-MM-DD'), " 23:59:59"), pagination.current - 1, service),
|
|
40
40
|
attendRecordRes = _AttendanceService$us.attendRecordRes;
|
|
41
41
|
var records = {
|
|
42
42
|
total: (attendRecordRes === null || attendRecordRes === void 0 ? void 0 : attendRecordRes.total) || 0,
|
|
43
43
|
rows: (attendRecordRes === null || attendRecordRes === void 0 ? void 0 : attendRecordRes.rows) || []
|
|
44
44
|
};
|
|
45
|
+
var getColor = function getColor(code) {
|
|
46
|
+
var color = '';
|
|
47
|
+
switch (code) {
|
|
48
|
+
case '正常':
|
|
49
|
+
color = 'staff-attend-record-status1';
|
|
50
|
+
break;
|
|
51
|
+
default:
|
|
52
|
+
color = 'staff-attend-record-status2';
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
return color;
|
|
56
|
+
};
|
|
45
57
|
var columns = [{
|
|
46
58
|
title: '所属机构',
|
|
47
59
|
dataIndex: 'deptName',
|
|
@@ -86,10 +98,13 @@ export default function Record(props) {
|
|
|
86
98
|
title: '上班状态',
|
|
87
99
|
dataIndex: 'clockInStatusName',
|
|
88
100
|
key: 'clockInStatusName',
|
|
89
|
-
width: 80
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
101
|
+
width: 80,
|
|
102
|
+
render: function render(text) {
|
|
103
|
+
return text ? /*#__PURE__*/_jsx("div", {
|
|
104
|
+
className: getColor(text),
|
|
105
|
+
children: text
|
|
106
|
+
}) : '--';
|
|
107
|
+
}
|
|
93
108
|
}, {
|
|
94
109
|
title: '下班时间',
|
|
95
110
|
dataIndex: 'clockOutTime',
|
|
@@ -102,10 +117,13 @@ export default function Record(props) {
|
|
|
102
117
|
title: '下班状态',
|
|
103
118
|
dataIndex: 'clockOutStatusName',
|
|
104
119
|
key: 'clockOutStatusName',
|
|
105
|
-
width: 80
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
120
|
+
width: 80,
|
|
121
|
+
render: function render(text) {
|
|
122
|
+
return text ? /*#__PURE__*/_jsx("div", {
|
|
123
|
+
className: getColor(text),
|
|
124
|
+
children: text
|
|
125
|
+
}) : '--';
|
|
126
|
+
}
|
|
109
127
|
}, {
|
|
110
128
|
title: '用工类型',
|
|
111
129
|
dataIndex: 'workTypeName',
|
|
@@ -128,7 +146,7 @@ export default function Record(props) {
|
|
|
128
146
|
style: {
|
|
129
147
|
padding: '0 20px'
|
|
130
148
|
},
|
|
131
|
-
height:
|
|
149
|
+
height: 132,
|
|
132
150
|
dataSource: records.rows
|
|
133
151
|
};
|
|
134
152
|
var handleDateChange = function handleDateChange(dates) {
|
|
@@ -32,7 +32,7 @@ export default function WorkingHours(props) {
|
|
|
32
32
|
var id = props.id,
|
|
33
33
|
service = props.service;
|
|
34
34
|
var _useSetState = useSetState({
|
|
35
|
-
startDate: dayjs(),
|
|
35
|
+
startDate: dayjs().startOf('M'),
|
|
36
36
|
endDate: dayjs()
|
|
37
37
|
}),
|
|
38
38
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
@@ -40,7 +40,7 @@ export default function WorkingHours(props) {
|
|
|
40
40
|
setState = _useSetState2[1];
|
|
41
41
|
var startDate = state.startDate,
|
|
42
42
|
endDate = state.endDate;
|
|
43
|
-
var _AttendanceService$us = AttendanceService.useTimeAnalysis(id, startDate.
|
|
43
|
+
var _AttendanceService$us = AttendanceService.useTimeAnalysis(id, startDate.format('YYYY-MM-DD'), endDate.format('YYYY-MM-DD'), service),
|
|
44
44
|
attendTimeAnalysisRes = _AttendanceService$us.attendTimeAnalysisRes;
|
|
45
45
|
var names = attendTimeAnalysisRes.names,
|
|
46
46
|
values = attendTimeAnalysisRes.values;
|
|
@@ -29,10 +29,32 @@
|
|
|
29
29
|
gap: 12px;
|
|
30
30
|
}
|
|
31
31
|
&-right {
|
|
32
|
-
|
|
32
|
+
flex: 1;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
&-record {
|
|
36
36
|
width: 100%;
|
|
37
|
+
&-status1 {
|
|
38
|
+
&::before {
|
|
39
|
+
content: '';
|
|
40
|
+
display: inline-block;
|
|
41
|
+
width: 8px;
|
|
42
|
+
height: 8px;
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
margin-right: 6px;
|
|
45
|
+
background: #35eaff;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
&-status2 {
|
|
49
|
+
&::before {
|
|
50
|
+
content: '';
|
|
51
|
+
display: inline-block;
|
|
52
|
+
width: 8px;
|
|
53
|
+
height: 8px;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
margin-right: 6px;
|
|
56
|
+
background: #ffef41;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
37
59
|
}
|
|
38
60
|
}
|
|
@@ -85,7 +85,7 @@ var ListZymx = function ListZymx(props) {
|
|
|
85
85
|
render: function render(text, record) {
|
|
86
86
|
return text ? /*#__PURE__*/_jsx("span", {
|
|
87
87
|
title: "".concat(record.clockInTime || '', "-").concat(record.clockOutTime || ''),
|
|
88
|
-
children: "".concat(record.clockInTime || ''
|
|
88
|
+
children: "".concat(record.clockInTime || '').concat(record.clockOutTime ? '-' : '').concat(record.clockOutTime || '')
|
|
89
89
|
}) : '--';
|
|
90
90
|
}
|
|
91
91
|
}, {
|
|
@@ -112,7 +112,7 @@ var ListZymx = function ListZymx(props) {
|
|
|
112
112
|
});
|
|
113
113
|
};
|
|
114
114
|
var tableProps = {
|
|
115
|
-
height:
|
|
115
|
+
height: 160,
|
|
116
116
|
isIndex: false,
|
|
117
117
|
pagination: _objectSpread(_objectSpread({}, pagination), {}, {
|
|
118
118
|
total: (todayWorkRes === null || todayWorkRes === void 0 ? void 0 : todayWorkRes.total) || 0,
|
|
@@ -40,7 +40,7 @@ var BaseInfo = function BaseInfo(props) {
|
|
|
40
40
|
var mapPoints = realInfo.mapPoints,
|
|
41
41
|
pointLngLat = realInfo.pointLngLat,
|
|
42
42
|
mapPolygons = realInfo.mapPolygons,
|
|
43
|
-
|
|
43
|
+
info = realInfo.info;
|
|
44
44
|
var baseTabContent = /*#__PURE__*/_jsx(VmInfoCollection, {
|
|
45
45
|
data: baseInfo,
|
|
46
46
|
gap: 8,
|
|
@@ -57,7 +57,7 @@ var BaseInfo = function BaseInfo(props) {
|
|
|
57
57
|
title: "\u57FA\u672C\u4FE1\u606F",
|
|
58
58
|
children: [baseTabContent, /*#__PURE__*/_jsx(VmTitle, {
|
|
59
59
|
title: "\u5B9E\u65F6\u4FE1\u606F",
|
|
60
|
-
time:
|
|
60
|
+
time: info === null || info === void 0 ? void 0 : info.gpsTime
|
|
61
61
|
}), /*#__PURE__*/_jsx("div", {
|
|
62
62
|
className: "staff-base-map",
|
|
63
63
|
children: (center === null || center === void 0 ? void 0 : center.length) > 0 && /*#__PURE__*/_jsx(VmMap, _objectSpread({
|
|
@@ -66,7 +66,7 @@ var BaseInfo = function BaseInfo(props) {
|
|
|
66
66
|
mapPoints: mapPoints,
|
|
67
67
|
mapPolygons: mapPolygons,
|
|
68
68
|
geometryType: "polygon",
|
|
69
|
-
address:
|
|
69
|
+
address: info === null || info === void 0 ? void 0 : info.address
|
|
70
70
|
}, customMapInfo))
|
|
71
71
|
})]
|
|
72
72
|
})
|