@vtx/modals2 6.0.0-beta.5 → 6.0.0-beta.6
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/index.js +1 -0
- package/lib/_components/vm-appraisal-info/api.js +55 -0
- package/lib/_components/vm-appraisal-info/imgs/count.png +0 -0
- package/lib/_components/vm-appraisal-info/imgs/count_light.png +0 -0
- package/lib/_components/vm-appraisal-info/imgs/subtract.png +0 -0
- package/lib/_components/vm-appraisal-info/imgs/subtract_light.png +0 -0
- package/lib/_components/vm-appraisal-info/index.js +230 -0
- package/lib/_components/vm-appraisal-info/index.less +7 -0
- package/lib/_components/vm-card-statistics/index.less +27 -27
- package/lib/_components/vm-factor-list/index.less +11 -11
- package/lib/_components/vm-filter/style/index.less +7 -11
- package/lib/_components/vm-repair-maintain/index.js +32 -0
- package/lib/_components/vm-video/HistoryGrid.js +2 -0
- package/lib/_components/vm-video/RealtimeGrid.js +2 -0
- package/lib/_components/vm-video/index.js +45 -18
- package/lib/_hooks/useGetChannels.js +20 -6
- package/lib/_util/http.js +26 -0
- package/lib/vtx-base-modal/Tabs/index.js +2 -1
- package/lib/vtx-car-modal/components/Info/index.js +1 -1
- package/lib/vtx-car-modal/components/Info/index.less +6 -6
- package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
- package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
- package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -6
- package/lib/vtx-cp-modal/index.js +12 -12
- package/lib/vtx-default-modal/index.js +5 -4
- package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -66
- package/lib/vtx-df-modal/index.js +3 -13
- package/lib/vtx-kh-modal/components/Record/index.js +1 -205
- package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -16
- package/lib/vtx-road-modal/components/BaseInfo/Work.js +9 -1
- package/lib/vtx-road-modal/components/LaneBaseInfo/Work.js +8 -1
- package/lib/vtx-road-modal/index.js +6 -3
- package/lib/vtx-road-modal/utils/url.js +12 -0
- package/lib/vtx-shxq-modal/index.js +18 -3
- package/lib/vtx-wr-modal/index.js +23 -4
- package/lib/vtx-zzz-modal/index.js +6 -12
- package/package.json +92 -92
package/lib/_util/http.js
CHANGED
|
@@ -78,6 +78,32 @@ var Http = /*#__PURE__*/function () {
|
|
|
78
78
|
} : {})
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 判断接口是否存在
|
|
84
|
+
* @param {*} url
|
|
85
|
+
*/
|
|
86
|
+
}, {
|
|
87
|
+
key: "exists",
|
|
88
|
+
value: function exists(url) {
|
|
89
|
+
var _url = baseUrlPrefix + url;
|
|
90
|
+
var token = getVtxToken('token');
|
|
91
|
+
return axios.head(_url, {
|
|
92
|
+
validateStatus: function validateStatus() {
|
|
93
|
+
return true;
|
|
94
|
+
},
|
|
95
|
+
headers: {
|
|
96
|
+
Authorization: token ? "Bearer ".concat(token) : '',
|
|
97
|
+
tenantId: getVtxToken('tenantId'),
|
|
98
|
+
userId: getVtxToken('userId')
|
|
99
|
+
}
|
|
100
|
+
}).then(function (res) {
|
|
101
|
+
return res.status !== 404;
|
|
102
|
+
}).catch(function (error) {
|
|
103
|
+
var _error$response;
|
|
104
|
+
return (error === null || error === void 0 || (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) !== 404;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
81
107
|
/**
|
|
82
108
|
* get 请求
|
|
83
109
|
* @param {*} url
|
|
@@ -124,7 +124,8 @@ var Tabs = function Tabs(props) {
|
|
|
124
124
|
children: tabs.map(function (tab, index) {
|
|
125
125
|
var width = 26,
|
|
126
126
|
height = 26;
|
|
127
|
-
var
|
|
127
|
+
var suffixKey = "".concat(tab.key || '').split('-').slice(1).join('-');
|
|
128
|
+
var ComponentIcon = iconRender[tab.key] || iconRender[suffixKey] || SummaryIcon;
|
|
128
129
|
return /*#__PURE__*/_jsxs("div", {
|
|
129
130
|
onClick: function onClick() {
|
|
130
131
|
onChange(tab.key);
|
|
@@ -110,7 +110,7 @@ var Info = function Info(_ref) {
|
|
|
110
110
|
var list = [{
|
|
111
111
|
name: translateLocaleText("t('vtxcarmodal.today')"),
|
|
112
112
|
unit: 'km',
|
|
113
|
-
value: (info === null || info === void 0 ? void 0 : info.
|
|
113
|
+
value: (info === null || info === void 0 ? void 0 : info.accuMileage) || 0,
|
|
114
114
|
img: showListImg ? isDark ? darkRunIcon : runIcon : null,
|
|
115
115
|
fontType: 'blue'
|
|
116
116
|
}, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.vm-car-map-wrap {
|
|
2
|
-
flex: 1;
|
|
3
|
-
min-height: 0;
|
|
4
|
-
width: 100%;
|
|
5
|
-
margin-top: 10px;
|
|
6
|
-
}
|
|
1
|
+
.vm-car-map-wrap {
|
|
2
|
+
flex: 1;
|
|
3
|
+
min-height: 0;
|
|
4
|
+
width: 100%;
|
|
5
|
+
margin-top: 10px;
|
|
6
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.vtx-car-oil-wrap {
|
|
2
|
-
height: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
gap: 16px;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
}
|
|
1
|
+
.vtx-car-oil-wrap {
|
|
2
|
+
height: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.vtx-car-water-wrap {
|
|
2
|
-
height: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
gap: 16px;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
}
|
|
1
|
+
.vtx-car-water-wrap {
|
|
2
|
+
height: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.vm-cc-unit-map-wrap {
|
|
2
|
-
flex: 1;
|
|
3
|
-
min-height: 230px;
|
|
4
|
-
width: 100%;
|
|
5
|
-
margin-top: 10px;
|
|
6
|
-
}
|
|
1
|
+
.vm-cc-unit-map-wrap {
|
|
2
|
+
flex: 1;
|
|
3
|
+
min-height: 230px;
|
|
4
|
+
width: 100%;
|
|
5
|
+
margin-top: 10px;
|
|
6
|
+
}
|
|
@@ -3,8 +3,10 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
|
+
import Appraisal from "../_components/vm-appraisal-info";
|
|
6
7
|
import VmCustom from "../_components/vm-custom";
|
|
7
8
|
import VmRepairMaintain from "../_components/vm-repair-maintain";
|
|
9
|
+
import VmVideo, { insertVideoTab } from "../_components/vm-video";
|
|
8
10
|
import useGetChannels from "../_hooks/useGetChannels";
|
|
9
11
|
import useGetConfig from "../_hooks/useGetConfig";
|
|
10
12
|
import VtxBaseModal from "../vtx-base-modal";
|
|
@@ -20,6 +22,7 @@ var TABS_WARNNING = 'warning';
|
|
|
20
22
|
var TABS_EXECEPTION = 'exeception';
|
|
21
23
|
var TABS_RM = 'default-rm';
|
|
22
24
|
var TABS_VIDEO = 'video';
|
|
25
|
+
var TABS_APPRAISAL = 'appraisal';
|
|
23
26
|
var VtxCpModal = function VtxCpModal(props) {
|
|
24
27
|
var id = props.id,
|
|
25
28
|
title = props.title,
|
|
@@ -59,21 +62,12 @@ var VtxCpModal = function VtxCpModal(props) {
|
|
|
59
62
|
var tabsList = tabsData;
|
|
60
63
|
if (!(facConfig !== null && facConfig !== void 0 && (_facConfig$data = facConfig.data) !== null && _facConfig$data !== void 0 && _facConfig$data.beenCollect)) {
|
|
61
64
|
tabsList = tabsList.filter(function (ele) {
|
|
62
|
-
return !['
|
|
65
|
+
return !['sy', 'warning', 'exeception'].includes(ele.key);
|
|
63
66
|
});
|
|
64
67
|
}
|
|
65
|
-
|
|
66
|
-
return ele.key === 'cp-video';
|
|
67
|
-
}) > -1) {
|
|
68
|
-
if ((channels === null || channels === void 0 ? void 0 : channels.length) < 1) {
|
|
69
|
-
tabsList = tabsList.filter(function (ele) {
|
|
70
|
-
return ele.key !== 'cp-video';
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return tabsList;
|
|
68
|
+
return insertVideoTab(tabsList, channels);
|
|
75
69
|
}, [JSON.stringify(tabsData), JSON.stringify(channels), JSON.stringify(facConfig)]);
|
|
76
|
-
var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, /*#__PURE__*/_jsx(BaseInfo, {
|
|
70
|
+
var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, /*#__PURE__*/_jsx(BaseInfo, {
|
|
77
71
|
id: id,
|
|
78
72
|
baseInfo: baseInfo,
|
|
79
73
|
info: info,
|
|
@@ -84,8 +78,14 @@ var VtxCpModal = function VtxCpModal(props) {
|
|
|
84
78
|
id: id
|
|
85
79
|
})), TABS_EXECEPTION, /*#__PURE__*/_jsx(ExeceptionInfo, {
|
|
86
80
|
id: id
|
|
81
|
+
})), TABS_APPRAISAL, /*#__PURE__*/_jsx(Appraisal, {
|
|
82
|
+
id: id
|
|
83
|
+
})), "rm", /*#__PURE__*/_jsx(VmRepairMaintain, {
|
|
84
|
+
id: id
|
|
87
85
|
})), TABS_RM, /*#__PURE__*/_jsx(VmRepairMaintain, {
|
|
88
86
|
id: id
|
|
87
|
+
})), TABS_VIDEO, /*#__PURE__*/_jsx(VmVideo, {
|
|
88
|
+
channels: channels
|
|
89
89
|
}));
|
|
90
90
|
// 自定义页签可配置多个,包含custom即可
|
|
91
91
|
if (tabsData !== null && tabsData !== void 0 && tabsData.length) {
|
|
@@ -15,7 +15,7 @@ import useGetConfig from "../_hooks/useGetConfig";
|
|
|
15
15
|
import { CommonService } from "../_service";
|
|
16
16
|
import VtxBaseModal from "../vtx-base-modal";
|
|
17
17
|
import Metering from "../vtx-df-modal/components/Metering";
|
|
18
|
-
import Appraisal from "../
|
|
18
|
+
import Appraisal from "../_components/vm-appraisal-info";
|
|
19
19
|
import { BaseInfo } from "./components";
|
|
20
20
|
import "./style";
|
|
21
21
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -27,6 +27,7 @@ var TABS_METERING = 'metering';
|
|
|
27
27
|
var VtxDefaultModal = function VtxDefaultModal(props) {
|
|
28
28
|
var _info$geometryInfo, _info$geometryInfo2, _info$geometryInfo3;
|
|
29
29
|
var id = props.id,
|
|
30
|
+
facilityId = props.facilityId,
|
|
30
31
|
title = props.title,
|
|
31
32
|
subTitle = props.subTitle,
|
|
32
33
|
theme = props.theme,
|
|
@@ -94,17 +95,17 @@ var VtxDefaultModal = function VtxDefaultModal(props) {
|
|
|
94
95
|
id: id
|
|
95
96
|
})), TABS_RM, /*#__PURE__*/_jsx(VmRepairMaintain, {
|
|
96
97
|
id: id
|
|
97
|
-
})), TABS_VIDEO, /*#__PURE__*/_jsx(VmVideo, {
|
|
98
|
-
channels: channels
|
|
99
98
|
})), TABS_METERING, /*#__PURE__*/_jsx(Metering, {
|
|
100
99
|
id: id
|
|
100
|
+
})), TABS_VIDEO, /*#__PURE__*/_jsx(VmVideo, {
|
|
101
|
+
channels: channels
|
|
101
102
|
}));
|
|
102
103
|
// 自定义页签可配置多个,包含custom即可
|
|
103
104
|
if (tabsData !== null && tabsData !== void 0 && tabsData.length) {
|
|
104
105
|
tabsData.forEach(function (ele) {
|
|
105
106
|
if (ele.url) {
|
|
106
107
|
contents[ele.key] = /*#__PURE__*/_jsx(VmCustom, {
|
|
107
|
-
id: id,
|
|
108
|
+
id: ele.url.indexOf('type=1') > -1 ? facilityId : id,
|
|
108
109
|
url: ele === null || ele === void 0 ? void 0 : ele.url
|
|
109
110
|
});
|
|
110
111
|
}
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
.vtx-device-analysis-dot {
|
|
2
|
-
width: 6px;
|
|
3
|
-
height: 6px;
|
|
4
|
-
background: var(--green-color);
|
|
5
|
-
border-radius: 50%;
|
|
6
|
-
&.error {
|
|
7
|
-
background: var(--red-color);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.vtx-device-analysis-tabs {
|
|
12
|
-
display: flex;
|
|
13
|
-
gap: 16px;
|
|
14
|
-
color: var(--modal-title-color);
|
|
15
|
-
font-size: 14px;
|
|
16
|
-
&-item {
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
&.active {
|
|
19
|
-
color: var(--blue-color);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.vtx-device-alarm-summary {
|
|
25
|
-
width: 368px;
|
|
26
|
-
height: 104px;
|
|
27
|
-
padding: 20px;
|
|
28
|
-
margin-bottom: 20px;
|
|
29
|
-
color: var(--modal-title-color);
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: space-between;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
background-image: url("../../imgs/current.png");
|
|
35
|
-
background-size: 100% 100%;
|
|
36
|
-
border-radius: 8px;
|
|
37
|
-
border: 1px solid transparent;
|
|
38
|
-
&-lable {
|
|
39
|
-
font-size: 16px;
|
|
40
|
-
font-weight: 600;
|
|
41
|
-
}
|
|
42
|
-
&-value {
|
|
43
|
-
font-weight: 600;
|
|
44
|
-
font-size: 24px;
|
|
45
|
-
color: var(--red-color);
|
|
46
|
-
}
|
|
47
|
-
&.dark {
|
|
48
|
-
background-image: url("../../imgs/current_dark.png");
|
|
49
|
-
&:last-child {
|
|
50
|
-
background-image: url("../../imgs/history_dark.png");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
&.active {
|
|
54
|
-
border:1px solid var(--red-color);
|
|
55
|
-
}
|
|
56
|
-
&:last-child {
|
|
57
|
-
margin-bottom: 0;
|
|
58
|
-
background-image: url("../../imgs/history.png");
|
|
59
|
-
.vtx-device-alarm-summary-value {
|
|
60
|
-
color: var(--yellow-color);
|
|
61
|
-
}
|
|
62
|
-
&.active {
|
|
63
|
-
border:1px solid var(--yellow-color);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
.vtx-device-analysis-dot {
|
|
2
|
+
width: 6px;
|
|
3
|
+
height: 6px;
|
|
4
|
+
background: var(--green-color);
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
&.error {
|
|
7
|
+
background: var(--red-color);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.vtx-device-analysis-tabs {
|
|
12
|
+
display: flex;
|
|
13
|
+
gap: 16px;
|
|
14
|
+
color: var(--modal-title-color);
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
&-item {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
&.active {
|
|
19
|
+
color: var(--blue-color);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.vtx-device-alarm-summary {
|
|
25
|
+
width: 368px;
|
|
26
|
+
height: 104px;
|
|
27
|
+
padding: 20px;
|
|
28
|
+
margin-bottom: 20px;
|
|
29
|
+
color: var(--modal-title-color);
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
background-image: url("../../imgs/current.png");
|
|
35
|
+
background-size: 100% 100%;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
border: 1px solid transparent;
|
|
38
|
+
&-lable {
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
}
|
|
42
|
+
&-value {
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
font-size: 24px;
|
|
45
|
+
color: var(--red-color);
|
|
46
|
+
}
|
|
47
|
+
&.dark {
|
|
48
|
+
background-image: url("../../imgs/current_dark.png");
|
|
49
|
+
&:last-child {
|
|
50
|
+
background-image: url("../../imgs/history_dark.png");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
&.active {
|
|
54
|
+
border:1px solid var(--red-color);
|
|
55
|
+
}
|
|
56
|
+
&:last-child {
|
|
57
|
+
margin-bottom: 0;
|
|
58
|
+
background-image: url("../../imgs/history.png");
|
|
59
|
+
.vtx-device-alarm-summary-value {
|
|
60
|
+
color: var(--yellow-color);
|
|
61
|
+
}
|
|
62
|
+
&.active {
|
|
63
|
+
border:1px solid var(--yellow-color);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -8,7 +8,7 @@ import { BaseInfo, BaseInfoZdReborn, Calendar, CalendarZdReborn, Metering, Meter
|
|
|
8
8
|
import { translateLocaleText } from "./../hooks/useTranslation.js";
|
|
9
9
|
// import Appraisal from '../vm-appraisal-info';
|
|
10
10
|
import VmRepairMaintain from "../_components/vm-repair-maintain";
|
|
11
|
-
import VmVideo from "../_components/vm-video";
|
|
11
|
+
import VmVideo, { insertVideoTab } from "../_components/vm-video";
|
|
12
12
|
import useGetChannels from "../_hooks/useGetChannels";
|
|
13
13
|
import { CommonService } from "../_service";
|
|
14
14
|
import { BaseService } from "./api";
|
|
@@ -67,22 +67,12 @@ var VtxDfModal = function VtxDfModal(props) {
|
|
|
67
67
|
var tabsList = tabsData;
|
|
68
68
|
if (!(detail !== null && detail !== void 0 && detail.beenWeigh)) {
|
|
69
69
|
tabsList = tabsList.filter(function (ele) {
|
|
70
|
-
return ele.key !== '
|
|
70
|
+
return ele.key !== 'metering';
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
return ele.key === 'df-video';
|
|
75
|
-
}) > -1) {
|
|
76
|
-
if ((channels === null || channels === void 0 ? void 0 : channels.length) < 1) {
|
|
77
|
-
tabsList = tabsList.filter(function (ele) {
|
|
78
|
-
return ele.key !== 'df-video';
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return tabsList;
|
|
73
|
+
return insertVideoTab(tabsList, channels);
|
|
83
74
|
}, [JSON.stringify(tabsData), JSON.stringify(channels), JSON.stringify(detail)]);
|
|
84
75
|
var ZLBase = zdReborn ? BaseInfoZdReborn : BaseInfo;
|
|
85
|
-
console.log(zdReborn);
|
|
86
76
|
var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, !(detail !== null && detail !== void 0 && detail.beenWeigh) && !(realtimeMonitor !== null && realtimeMonitor !== void 0 && realtimeMonitor.length) ? /*#__PURE__*/_jsx(DefaultBaseInfo, {
|
|
87
77
|
id: id,
|
|
88
78
|
info: info,
|
|
@@ -1,205 +1 @@
|
|
|
1
|
-
|
|
2
|
-
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
|
-
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
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
11
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
-
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; } }
|
|
16
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
-
import { translateLocaleText } from "./../../../hooks/useTranslation.js";
|
|
18
|
-
/**
|
|
19
|
-
* 考核信息-列表
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
import { VtxImage } from '@vtx/components';
|
|
23
|
-
import { useSetState } from 'ahooks';
|
|
24
|
-
import dayjs from 'dayjs';
|
|
25
|
-
import { VmFactor, VmFilter, VmTable, VmWrapper } from "../../../_components";
|
|
26
|
-
import useSettings from "../../../_hooks/useSettings";
|
|
27
|
-
import { BaseService, ReocrdService } from "../../api2";
|
|
28
|
-
import "./index.less";
|
|
29
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
|
-
var List = function List(props) {
|
|
31
|
-
var _useSettings = useSettings(),
|
|
32
|
-
isDark = _useSettings.isDark;
|
|
33
|
-
var id = props.id;
|
|
34
|
-
var _useSetState = useSetState({
|
|
35
|
-
pagination: {
|
|
36
|
-
current: 1,
|
|
37
|
-
pageSize: 10,
|
|
38
|
-
total: 0
|
|
39
|
-
},
|
|
40
|
-
startDate: dayjs().startOf('M'),
|
|
41
|
-
endDate: dayjs(),
|
|
42
|
-
checkActivityCode: '1',
|
|
43
|
-
sort: ''
|
|
44
|
-
}),
|
|
45
|
-
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
46
|
-
state = _useSetState2[0],
|
|
47
|
-
setState = _useSetState2[1];
|
|
48
|
-
var pagination = state.pagination,
|
|
49
|
-
startDate = state.startDate,
|
|
50
|
-
endDate = state.endDate,
|
|
51
|
-
checkActivityCode = state.checkActivityCode,
|
|
52
|
-
sort = state.sort;
|
|
53
|
-
var _BaseService$useKhInf = BaseService.useKhInfo(id, startDate.format('YYYY-MM-DD'), endDate.format('YYYY-MM-DD'), checkActivityCode === '1' ? '' : checkActivityCode),
|
|
54
|
-
khRes = _BaseService$useKhInf.khRes;
|
|
55
|
-
var _ReocrdService$useRec = ReocrdService.useRecordInfo(id, startDate.format('YYYY-MM-DD'), endDate.format('YYYY-MM-DD'), checkActivityCode === '1' ? '' : checkActivityCode, pagination.current - 1, sort),
|
|
56
|
-
records = _ReocrdService$useRec.records,
|
|
57
|
-
loading = _ReocrdService$useRec.loading;
|
|
58
|
-
var columns = [{
|
|
59
|
-
title: translateLocaleText("t('vtxkhmodal.image')"),
|
|
60
|
-
dataIndex: 'photos',
|
|
61
|
-
key: 'photos',
|
|
62
|
-
width: 120,
|
|
63
|
-
render: function render(text) {
|
|
64
|
-
var photos = JSON.parse(text || '[]');
|
|
65
|
-
var a = [].concat(_toConsumableArray(photos), _toConsumableArray(photos), _toConsumableArray(photos), _toConsumableArray(photos));
|
|
66
|
-
return (photos === null || photos === void 0 ? void 0 : photos.length) > 0 ? /*#__PURE__*/_jsx(VtxImage.PreviewGroup, {
|
|
67
|
-
children: a.map(function (ele, index) {
|
|
68
|
-
return /*#__PURE__*/_jsx(VtxImage, {
|
|
69
|
-
src: "".concat(process.env.PREFIX || '', "/cloudFile/common/downloadFile?id=").concat(ele.id),
|
|
70
|
-
style: {
|
|
71
|
-
width: 80,
|
|
72
|
-
height: 80,
|
|
73
|
-
visibility: index > 0 ? 'hidden' : 'visible'
|
|
74
|
-
},
|
|
75
|
-
alt: ele.name
|
|
76
|
-
}, index);
|
|
77
|
-
})
|
|
78
|
-
}) : '--';
|
|
79
|
-
}
|
|
80
|
-
}, {
|
|
81
|
-
title: translateLocaleText("t('vtxkhmodal.hours')"),
|
|
82
|
-
dataIndex: 'checkDate',
|
|
83
|
-
key: 'checkDate',
|
|
84
|
-
width: 150,
|
|
85
|
-
ellipsis: true
|
|
86
|
-
}, {
|
|
87
|
-
title: translateLocaleText("t('vtxkhmodal.assessmentActivity')"),
|
|
88
|
-
dataIndex: 'checkActivityName',
|
|
89
|
-
key: 'checkActivityName',
|
|
90
|
-
width: 200
|
|
91
|
-
}, {
|
|
92
|
-
title: translateLocaleText("t('vtxkhmodal.assessor')"),
|
|
93
|
-
dataIndex: 'checkUserName',
|
|
94
|
-
key: 'checkUserName'
|
|
95
|
-
}, {
|
|
96
|
-
title: translateLocaleText("t('vtxkhmodal.group')"),
|
|
97
|
-
dataIndex: 'ruleGroupName',
|
|
98
|
-
key: 'ruleGroupName'
|
|
99
|
-
}, {
|
|
100
|
-
title: translateLocaleText("t('vtxkhmodal.assessmentStandard')"),
|
|
101
|
-
dataIndex: 'ruleName',
|
|
102
|
-
key: 'ruleName',
|
|
103
|
-
width: 150
|
|
104
|
-
}, {
|
|
105
|
-
title: translateLocaleText("t('vtxkhmodal.score')"),
|
|
106
|
-
dataIndex: 'deductPoints',
|
|
107
|
-
key: 'deductPoints',
|
|
108
|
-
align: 'right'
|
|
109
|
-
}];
|
|
110
|
-
var pageChange = function pageChange(page) {
|
|
111
|
-
setState({
|
|
112
|
-
pagination: _objectSpread(_objectSpread({}, pagination), {}, {
|
|
113
|
-
current: page
|
|
114
|
-
})
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
var tableProps = {
|
|
118
|
-
pagination: _objectSpread(_objectSpread({}, pagination), {}, {
|
|
119
|
-
total: records.total,
|
|
120
|
-
defaultPageSize: 10,
|
|
121
|
-
onChange: pageChange
|
|
122
|
-
}),
|
|
123
|
-
height: 384,
|
|
124
|
-
loading: loading,
|
|
125
|
-
dataSource: records.rows,
|
|
126
|
-
onChange: function onChange(_pagination, _filters, sorter) {
|
|
127
|
-
if (sorter.order) {
|
|
128
|
-
var order = sorter.order === 'ascend' ? 'asc' : 'desc';
|
|
129
|
-
setState({
|
|
130
|
-
sort: "".concat(sorter.field, ",").concat(order)
|
|
131
|
-
});
|
|
132
|
-
} else {
|
|
133
|
-
setState({
|
|
134
|
-
sort: ''
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
var filterChange = function filterChange(dateValue) {
|
|
140
|
-
setState({
|
|
141
|
-
startDate: dateValue[0],
|
|
142
|
-
endDate: dateValue[1]
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
return /*#__PURE__*/_jsxs(VmWrapper, {
|
|
146
|
-
title: translateLocaleText("t('vtxkhmodal.details')"),
|
|
147
|
-
filterType: "rangePicker",
|
|
148
|
-
dateValue: [startDate, endDate],
|
|
149
|
-
filterChange: filterChange,
|
|
150
|
-
extraLeft: /*#__PURE__*/_jsx(VmFilter.VMSelect, {
|
|
151
|
-
options: [{
|
|
152
|
-
value: '1',
|
|
153
|
-
label: translateLocaleText("t('export.all')")
|
|
154
|
-
}, {
|
|
155
|
-
value: 'RCDC',
|
|
156
|
-
label: translateLocaleText("t('vtxkhmodal.day')")
|
|
157
|
-
}, {
|
|
158
|
-
value: 'ZXDC',
|
|
159
|
-
label: translateLocaleText("t('vtxkhmodal.specialSupervision')")
|
|
160
|
-
}, {
|
|
161
|
-
value: 'DSFCP',
|
|
162
|
-
label: translateLocaleText("t('vtxkhmodal.thirdPartyEvaluation')")
|
|
163
|
-
}, {
|
|
164
|
-
value: 'RCXC',
|
|
165
|
-
label: translateLocaleText("t('vtxkhmodal.day2')")
|
|
166
|
-
}],
|
|
167
|
-
style: {
|
|
168
|
-
width: 132
|
|
169
|
-
},
|
|
170
|
-
value: checkActivityCode,
|
|
171
|
-
onChange: function onChange(e) {
|
|
172
|
-
return setState({
|
|
173
|
-
checkActivityCode: e
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
}),
|
|
177
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
178
|
-
className: "kh-record-summary",
|
|
179
|
-
children: [{
|
|
180
|
-
name: translateLocaleText("t('vtxkhmodal.times')"),
|
|
181
|
-
value: khRes === null || khRes === void 0 ? void 0 : khRes.monthCheckTims,
|
|
182
|
-
key: 'count',
|
|
183
|
-
unit: translateLocaleText("t('common.timesUnit')"),
|
|
184
|
-
fontType: 'blue'
|
|
185
|
-
}, {
|
|
186
|
-
name: translateLocaleText("t('vtxkhmodal.totalDeductedPoints')"),
|
|
187
|
-
value: khRes === null || khRes === void 0 ? void 0 : khRes.monthDeductPoint,
|
|
188
|
-
key: 'subtract',
|
|
189
|
-
unit: translateLocaleText("t('vtxkhmodal.scoreUnit')"),
|
|
190
|
-
fontType: 'red'
|
|
191
|
-
}].map(function (ele) {
|
|
192
|
-
return /*#__PURE__*/_jsx(VmFactor, _objectSpread(_objectSpread({}, ele), {}, {
|
|
193
|
-
img: require("../../imgs/".concat(ele.key).concat(isDark ? '' : '_light', ".png")),
|
|
194
|
-
unitStyle: {
|
|
195
|
-
fontSize: 14
|
|
196
|
-
}
|
|
197
|
-
}), ele.key);
|
|
198
|
-
})
|
|
199
|
-
}), /*#__PURE__*/_jsx(VmTable, _objectSpread({
|
|
200
|
-
columns: columns,
|
|
201
|
-
rowKey: "id"
|
|
202
|
-
}, tableProps))]
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
|
-
export default List;
|
|
1
|
+
export { default } from "../../../_components/vm-appraisal-info";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
.vtx-restaurant-rule_item {
|
|
2
|
-
border-radius: 8px 8px 8px 8px;
|
|
3
|
-
border: 1px solid var(--gray-line-color);
|
|
4
|
-
padding: 16px 16px 8px;
|
|
5
|
-
margin-top: 12px;
|
|
6
|
-
position: relative;
|
|
7
|
-
.vtx-restaurant-border {
|
|
8
|
-
width: 100%;
|
|
9
|
-
position: absolute;
|
|
10
|
-
left: 0;
|
|
11
|
-
top: -2px;
|
|
12
|
-
height: 44px;
|
|
13
|
-
border-radius: 8px 8px 0px 0px;
|
|
14
|
-
border-top: 2px solid var(--blue-color);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
.vtx-restaurant-rule_item {
|
|
2
|
+
border-radius: 8px 8px 8px 8px;
|
|
3
|
+
border: 1px solid var(--gray-line-color);
|
|
4
|
+
padding: 16px 16px 8px;
|
|
5
|
+
margin-top: 12px;
|
|
6
|
+
position: relative;
|
|
7
|
+
.vtx-restaurant-border {
|
|
8
|
+
width: 100%;
|
|
9
|
+
position: absolute;
|
|
10
|
+
left: 0;
|
|
11
|
+
top: -2px;
|
|
12
|
+
height: 44px;
|
|
13
|
+
border-radius: 8px 8px 0px 0px;
|
|
14
|
+
border-top: 2px solid var(--blue-color);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -20,6 +20,7 @@ import { VmEmpty, VmProgress, VmTable, VmTag, VmWrapper } from "../../../_compon
|
|
|
20
20
|
import useSettings from "../../../_hooks/useSettings";
|
|
21
21
|
import { BaseService } from "../../api";
|
|
22
22
|
import { translateLocaleText } from "./../../../hooks/useTranslation.js";
|
|
23
|
+
import { buildIframeQuery } from "../../utils/url";
|
|
23
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
25
|
var Work = function Work(props) {
|
|
25
26
|
var id = props.id,
|
|
@@ -127,7 +128,14 @@ var Work = function Work(props) {
|
|
|
127
128
|
if (prefixList.length === 2) {
|
|
128
129
|
prefix = "/".concat(prefixList[0]);
|
|
129
130
|
}
|
|
130
|
-
var
|
|
131
|
+
var query = buildIframeQuery(location.href.split('?')[1], {
|
|
132
|
+
carId: record.carId,
|
|
133
|
+
theme: theme === 'blue' ? 'dark' : theme,
|
|
134
|
+
startTime: dayjs(date).format('YYYY-MM-DD 00:00:00'),
|
|
135
|
+
endTime: dayjs(date).format('YYYY-MM-DD 23:59:59'),
|
|
136
|
+
roadId: record.roadId
|
|
137
|
+
});
|
|
138
|
+
var src = "".concat(prefix, "/carHistory/#/zyqsHistory?").concat(query);
|
|
131
139
|
setIframeModalInfo({
|
|
132
140
|
title: translateLocaleText("t('vtxroadmodal.vehicleTrack')"),
|
|
133
141
|
visible: true,
|
|
@@ -18,6 +18,7 @@ import { useMemo, useState } from 'react';
|
|
|
18
18
|
import { VmBarCharts, VmEmpty, VmProgress, VmTable, VmTag, VmWrapper } from "../../../_components";
|
|
19
19
|
import useSettings from "../../../_hooks/useSettings";
|
|
20
20
|
import { LaneService } from "../../api";
|
|
21
|
+
import { buildIframeQuery } from "../../utils/url";
|
|
21
22
|
import { translateLocaleText } from "./../../../hooks/useTranslation.js";
|
|
22
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
24
|
export var getPercentInfo = function getPercentInfo(percent) {
|
|
@@ -220,7 +221,13 @@ var Work = function Work(props) {
|
|
|
220
221
|
if (prefixList.length === 2) {
|
|
221
222
|
prefix = "/".concat(prefixList[0]);
|
|
222
223
|
}
|
|
223
|
-
var
|
|
224
|
+
var query = buildIframeQuery(location.href.split('?')[1], {
|
|
225
|
+
carId: record.workCarId,
|
|
226
|
+
theme: theme === 'blue' ? 'dark' : theme,
|
|
227
|
+
startTime: dayjs(date).format('YYYY-MM-DD 00:00:00'),
|
|
228
|
+
endTime: dayjs(date).format('YYYY-MM-DD 23:59:59')
|
|
229
|
+
});
|
|
230
|
+
var src = "".concat(prefix, "/carHistory/#/zyqsLaneHistory?").concat(query);
|
|
224
231
|
setIframeModalInfo({
|
|
225
232
|
title: translateLocaleText("t('vtxroadmodal.vehicleTrack')"),
|
|
226
233
|
visible: true,
|