@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/_components/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { default as VmCalendar, VmCalendarInner, VmCalendarPercent } from "./vm-
|
|
|
3
3
|
export { default as VmCardStatistics } from "./vm-card-statistics";
|
|
4
4
|
export { default as VmCustom } from "./vm-custom";
|
|
5
5
|
export { default as VmEmpty } from "./vm-empty";
|
|
6
|
+
export { default as VmAppraisalInfo } from "./vm-appraisal-info";
|
|
6
7
|
export { default as VmExtraTab } from "./vm-extra-tab";
|
|
7
8
|
export { default as VmFactor } from "./vm-factor";
|
|
8
9
|
export { default as VmFactorList } from "./vm-factor-list";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { request } from '@vtx/utils';
|
|
2
|
+
import { useRequest } from 'ahooks';
|
|
3
|
+
var BaseService = {
|
|
4
|
+
useKhInfo: function useKhInfo(id, startDate, endDate, checkActivityCode) {
|
|
5
|
+
var _useRequest = useRequest(function () {
|
|
6
|
+
return request.get('/cloud/zykh-reborn/kanban/resourceInfo', {
|
|
7
|
+
data: {
|
|
8
|
+
resourceId: id,
|
|
9
|
+
coordType: 'wgs84',
|
|
10
|
+
startDate: startDate,
|
|
11
|
+
endDate: endDate,
|
|
12
|
+
checkActivityCode: checkActivityCode
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}, {
|
|
16
|
+
ready: !!id,
|
|
17
|
+
refreshDeps: [id, startDate, endDate, checkActivityCode]
|
|
18
|
+
}),
|
|
19
|
+
res = _useRequest.data;
|
|
20
|
+
return {
|
|
21
|
+
khRes: (res === null || res === void 0 ? void 0 : res.data) || {}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var ReocrdService = {
|
|
26
|
+
useRecordInfo: function useRecordInfo(id, startDate, endDate, checkActivityCode, page, sort) {
|
|
27
|
+
var _useRequest2 = useRequest(function () {
|
|
28
|
+
return request.get('/cloud/zykh-reborn/kanban/recordRulePage', {
|
|
29
|
+
data: {
|
|
30
|
+
resourceId: id,
|
|
31
|
+
startDate: startDate,
|
|
32
|
+
endDate: endDate,
|
|
33
|
+
checkActivityCode: checkActivityCode,
|
|
34
|
+
page: page,
|
|
35
|
+
size: 10,
|
|
36
|
+
sort: sort
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}, {
|
|
40
|
+
ready: !!id,
|
|
41
|
+
refreshDeps: [id, startDate, endDate, checkActivityCode, page, sort]
|
|
42
|
+
}),
|
|
43
|
+
recordRes = _useRequest2.data,
|
|
44
|
+
loading = _useRequest2.loading;
|
|
45
|
+
var records = (recordRes === null || recordRes === void 0 ? void 0 : recordRes.data) || {
|
|
46
|
+
total: 0,
|
|
47
|
+
rows: []
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
records: records,
|
|
51
|
+
loading: loading
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export { BaseService, ReocrdService };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,230 @@
|
|
|
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 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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
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; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12
|
+
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."); }
|
|
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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
+
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; }
|
|
17
|
+
import { VtxImage } from '@vtx/components';
|
|
18
|
+
import { useSetState } from 'ahooks';
|
|
19
|
+
import dayjs from 'dayjs';
|
|
20
|
+
import { translateLocaleText } from "../../hooks/useTranslation.js";
|
|
21
|
+
import useSettings from "../../_hooks/useSettings";
|
|
22
|
+
import VmFactor from "../vm-factor";
|
|
23
|
+
import VmFilter from "../vm-filter";
|
|
24
|
+
import VmTable from "../vm-table";
|
|
25
|
+
import VmWrapper from "../vm-wrapper";
|
|
26
|
+
import { BaseService, ReocrdService } from "./api";
|
|
27
|
+
import "./index.less";
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
export var APPRAISAL_TAB_KEY = 'appraisal';
|
|
30
|
+
export var getAppraisalTab = function getAppraisalTab() {
|
|
31
|
+
return {
|
|
32
|
+
key: APPRAISAL_TAB_KEY,
|
|
33
|
+
title: translateLocaleText("t('vtxwrmodal.assessmentInformation')")
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export var isAppraisalTab = function isAppraisalTab(tab) {
|
|
37
|
+
return (tab === null || tab === void 0 ? void 0 : tab.key) === APPRAISAL_TAB_KEY || "".concat((tab === null || tab === void 0 ? void 0 : tab.key) || '').endsWith('-appraisal');
|
|
38
|
+
};
|
|
39
|
+
export var insertAppraisalTab = function insertAppraisalTab() {
|
|
40
|
+
var tabs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
41
|
+
if (!Array.isArray(tabs) || tabs.length === 0) {
|
|
42
|
+
return tabs;
|
|
43
|
+
}
|
|
44
|
+
if (tabs.some(isAppraisalTab)) {
|
|
45
|
+
return tabs;
|
|
46
|
+
}
|
|
47
|
+
var customIndex = tabs.findIndex(function (tab) {
|
|
48
|
+
return !!(tab !== null && tab !== void 0 && tab.url);
|
|
49
|
+
});
|
|
50
|
+
if (customIndex === -1) {
|
|
51
|
+
return [].concat(_toConsumableArray(tabs), [getAppraisalTab()]);
|
|
52
|
+
}
|
|
53
|
+
return [].concat(_toConsumableArray(tabs.slice(0, customIndex)), [getAppraisalTab()], _toConsumableArray(tabs.slice(customIndex)));
|
|
54
|
+
};
|
|
55
|
+
var AppraisalInfo = function AppraisalInfo(props) {
|
|
56
|
+
var _useSettings = useSettings(),
|
|
57
|
+
isDark = _useSettings.isDark;
|
|
58
|
+
var id = props.id;
|
|
59
|
+
var _useSetState = useSetState({
|
|
60
|
+
pagination: {
|
|
61
|
+
current: 1,
|
|
62
|
+
pageSize: 10,
|
|
63
|
+
total: 0
|
|
64
|
+
},
|
|
65
|
+
startDate: dayjs().startOf('M'),
|
|
66
|
+
endDate: dayjs(),
|
|
67
|
+
checkActivityCode: '1',
|
|
68
|
+
sort: ''
|
|
69
|
+
}),
|
|
70
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
71
|
+
state = _useSetState2[0],
|
|
72
|
+
setState = _useSetState2[1];
|
|
73
|
+
var pagination = state.pagination,
|
|
74
|
+
startDate = state.startDate,
|
|
75
|
+
endDate = state.endDate,
|
|
76
|
+
checkActivityCode = state.checkActivityCode,
|
|
77
|
+
sort = state.sort;
|
|
78
|
+
var _BaseService$useKhInf = BaseService.useKhInfo(id, startDate.format('YYYY-MM-DD'), endDate.format('YYYY-MM-DD'), checkActivityCode === '1' ? '' : checkActivityCode),
|
|
79
|
+
khRes = _BaseService$useKhInf.khRes;
|
|
80
|
+
var _ReocrdService$useRec = ReocrdService.useRecordInfo(id, startDate.format('YYYY-MM-DD'), endDate.format('YYYY-MM-DD'), checkActivityCode === '1' ? '' : checkActivityCode, pagination.current - 1, sort),
|
|
81
|
+
records = _ReocrdService$useRec.records,
|
|
82
|
+
loading = _ReocrdService$useRec.loading;
|
|
83
|
+
var columns = [{
|
|
84
|
+
title: translateLocaleText("t('vtxkhmodal.image')"),
|
|
85
|
+
dataIndex: 'photos',
|
|
86
|
+
key: 'photos',
|
|
87
|
+
width: 120,
|
|
88
|
+
render: function render(text) {
|
|
89
|
+
var photos = JSON.parse(text || '[]');
|
|
90
|
+
var a = [].concat(_toConsumableArray(photos), _toConsumableArray(photos), _toConsumableArray(photos), _toConsumableArray(photos));
|
|
91
|
+
return (photos === null || photos === void 0 ? void 0 : photos.length) > 0 ? /*#__PURE__*/_jsx(VtxImage.PreviewGroup, {
|
|
92
|
+
children: a.map(function (ele, index) {
|
|
93
|
+
return /*#__PURE__*/_jsx(VtxImage, {
|
|
94
|
+
src: "".concat(process.env.PREFIX || '', "/cloudFile/common/downloadFile?id=").concat(ele.id),
|
|
95
|
+
style: {
|
|
96
|
+
width: 80,
|
|
97
|
+
height: 80,
|
|
98
|
+
visibility: index > 0 ? 'hidden' : 'visible'
|
|
99
|
+
},
|
|
100
|
+
alt: ele.name
|
|
101
|
+
}, index);
|
|
102
|
+
})
|
|
103
|
+
}) : '--';
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
title: translateLocaleText("t('vtxkhmodal.hours')"),
|
|
107
|
+
dataIndex: 'checkDate',
|
|
108
|
+
key: 'checkDate',
|
|
109
|
+
width: 150,
|
|
110
|
+
ellipsis: true
|
|
111
|
+
}, {
|
|
112
|
+
title: translateLocaleText("t('vtxkhmodal.assessmentActivity')"),
|
|
113
|
+
dataIndex: 'checkActivityName',
|
|
114
|
+
key: 'checkActivityName',
|
|
115
|
+
width: 200
|
|
116
|
+
}, {
|
|
117
|
+
title: translateLocaleText("t('vtxkhmodal.assessor')"),
|
|
118
|
+
dataIndex: 'checkUserName',
|
|
119
|
+
key: 'checkUserName'
|
|
120
|
+
}, {
|
|
121
|
+
title: translateLocaleText("t('vtxkhmodal.group')"),
|
|
122
|
+
dataIndex: 'ruleGroupName',
|
|
123
|
+
key: 'ruleGroupName'
|
|
124
|
+
}, {
|
|
125
|
+
title: translateLocaleText("t('vtxkhmodal.assessmentStandard')"),
|
|
126
|
+
dataIndex: 'ruleName',
|
|
127
|
+
key: 'ruleName',
|
|
128
|
+
width: 150
|
|
129
|
+
}, {
|
|
130
|
+
title: translateLocaleText("t('vtxkhmodal.score')"),
|
|
131
|
+
dataIndex: 'deductPoints',
|
|
132
|
+
key: 'deductPoints',
|
|
133
|
+
align: 'right'
|
|
134
|
+
}];
|
|
135
|
+
var pageChange = function pageChange(page) {
|
|
136
|
+
setState({
|
|
137
|
+
pagination: _objectSpread(_objectSpread({}, pagination), {}, {
|
|
138
|
+
current: page
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
var tableProps = {
|
|
143
|
+
pagination: _objectSpread(_objectSpread({}, pagination), {}, {
|
|
144
|
+
total: records.total,
|
|
145
|
+
defaultPageSize: 10,
|
|
146
|
+
onChange: pageChange
|
|
147
|
+
}),
|
|
148
|
+
height: 384,
|
|
149
|
+
loading: loading,
|
|
150
|
+
dataSource: records.rows,
|
|
151
|
+
onChange: function onChange(_pagination, _filters, sorter) {
|
|
152
|
+
if (sorter.order) {
|
|
153
|
+
var order = sorter.order === 'ascend' ? 'asc' : 'desc';
|
|
154
|
+
setState({
|
|
155
|
+
sort: "".concat(sorter.field, ",").concat(order)
|
|
156
|
+
});
|
|
157
|
+
} else {
|
|
158
|
+
setState({
|
|
159
|
+
sort: ''
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
var filterChange = function filterChange(dateValue) {
|
|
165
|
+
setState({
|
|
166
|
+
startDate: dateValue[0],
|
|
167
|
+
endDate: dateValue[1]
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
return /*#__PURE__*/_jsxs(VmWrapper, {
|
|
171
|
+
title: translateLocaleText("t('vtxkhmodal.details')"),
|
|
172
|
+
filterType: "rangePicker",
|
|
173
|
+
dateValue: [startDate, endDate],
|
|
174
|
+
filterChange: filterChange,
|
|
175
|
+
extraLeft: /*#__PURE__*/_jsx(VmFilter.VMSelect, {
|
|
176
|
+
options: [{
|
|
177
|
+
value: '1',
|
|
178
|
+
label: translateLocaleText("t('export.all')")
|
|
179
|
+
}, {
|
|
180
|
+
value: 'RCDC',
|
|
181
|
+
label: translateLocaleText("t('vtxkhmodal.day')")
|
|
182
|
+
}, {
|
|
183
|
+
value: 'ZXDC',
|
|
184
|
+
label: translateLocaleText("t('vtxkhmodal.specialSupervision')")
|
|
185
|
+
}, {
|
|
186
|
+
value: 'DSFCP',
|
|
187
|
+
label: translateLocaleText("t('vtxkhmodal.thirdPartyEvaluation')")
|
|
188
|
+
}, {
|
|
189
|
+
value: 'RCXC',
|
|
190
|
+
label: translateLocaleText("t('vtxkhmodal.day2')")
|
|
191
|
+
}],
|
|
192
|
+
style: {
|
|
193
|
+
width: 132
|
|
194
|
+
},
|
|
195
|
+
value: checkActivityCode,
|
|
196
|
+
onChange: function onChange(e) {
|
|
197
|
+
return setState({
|
|
198
|
+
checkActivityCode: e
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}),
|
|
202
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
203
|
+
className: "kh-record-summary",
|
|
204
|
+
children: [{
|
|
205
|
+
name: translateLocaleText("t('vtxkhmodal.times')"),
|
|
206
|
+
value: khRes === null || khRes === void 0 ? void 0 : khRes.monthCheckTims,
|
|
207
|
+
key: 'count',
|
|
208
|
+
unit: translateLocaleText("t('common.timesUnit')"),
|
|
209
|
+
fontType: 'blue'
|
|
210
|
+
}, {
|
|
211
|
+
name: translateLocaleText("t('vtxkhmodal.totalDeductedPoints')"),
|
|
212
|
+
value: khRes === null || khRes === void 0 ? void 0 : khRes.monthDeductPoint,
|
|
213
|
+
key: 'subtract',
|
|
214
|
+
unit: translateLocaleText("t('vtxkhmodal.scoreUnit')"),
|
|
215
|
+
fontType: 'red'
|
|
216
|
+
}].map(function (ele) {
|
|
217
|
+
return /*#__PURE__*/_jsx(VmFactor, _objectSpread(_objectSpread({}, ele), {}, {
|
|
218
|
+
img: require("./imgs/".concat(ele.key).concat(isDark ? '' : '_light', ".png")),
|
|
219
|
+
unitStyle: {
|
|
220
|
+
fontSize: 14
|
|
221
|
+
}
|
|
222
|
+
}), ele.key);
|
|
223
|
+
})
|
|
224
|
+
}), /*#__PURE__*/_jsx(VmTable, _objectSpread({
|
|
225
|
+
columns: columns,
|
|
226
|
+
rowKey: "id"
|
|
227
|
+
}, tableProps))]
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
export default AppraisalInfo;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
.vm-car-statistics {
|
|
2
|
-
width: 208px;
|
|
3
|
-
height: 84px;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
justify-content: space-between;
|
|
7
|
-
padding: 20px;
|
|
8
|
-
background-size: 100% 100%;
|
|
9
|
-
&-label {
|
|
10
|
-
color: var(--img-text-color);
|
|
11
|
-
}
|
|
12
|
-
&-value, &-unit {
|
|
13
|
-
color: #1f1f1f;
|
|
14
|
-
}
|
|
15
|
-
&.vm-car-statistics-dark {
|
|
16
|
-
.vm-car-statistics-value,.vm-car-statistics-unit {
|
|
17
|
-
background: linear-gradient(180deg, #ffffff 0%, #119FFB 100%);
|
|
18
|
-
background-clip: text;
|
|
19
|
-
-webkit-text-fill-color: transparent;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
&-value {
|
|
23
|
-
font-size: 20px;
|
|
24
|
-
font-weight: bold;
|
|
25
|
-
margin-right: 4px;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
.vm-car-statistics {
|
|
2
|
+
width: 208px;
|
|
3
|
+
height: 84px;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
padding: 20px;
|
|
8
|
+
background-size: 100% 100%;
|
|
9
|
+
&-label {
|
|
10
|
+
color: var(--img-text-color);
|
|
11
|
+
}
|
|
12
|
+
&-value, &-unit {
|
|
13
|
+
color: #1f1f1f;
|
|
14
|
+
}
|
|
15
|
+
&.vm-car-statistics-dark {
|
|
16
|
+
.vm-car-statistics-value,.vm-car-statistics-unit {
|
|
17
|
+
background: linear-gradient(180deg, #ffffff 0%, #119FFB 100%);
|
|
18
|
+
background-clip: text;
|
|
19
|
+
-webkit-text-fill-color: transparent;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
&-value {
|
|
23
|
+
font-size: 20px;
|
|
24
|
+
font-weight: bold;
|
|
25
|
+
margin-right: 4px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.vm-factor-list-wrap {
|
|
2
|
-
display: flex;
|
|
3
|
-
padding: 12px 16px;
|
|
4
|
-
height: 68px;
|
|
5
|
-
background: #F3F8FF;
|
|
6
|
-
border-radius: 8px;
|
|
7
|
-
gap: 26px;
|
|
8
|
-
&.dark {
|
|
9
|
-
background: rgba(0,136,240,0.15);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
.vm-factor-list-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
padding: 12px 16px;
|
|
4
|
+
height: 68px;
|
|
5
|
+
background: #F3F8FF;
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
gap: 26px;
|
|
8
|
+
&.dark {
|
|
9
|
+
background: rgba(0,136,240,0.15);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -58,28 +58,24 @@
|
|
|
58
58
|
--border-color: #0b6baf;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
border: 1px solid var(--border-color) !important;
|
|
65
|
-
}
|
|
61
|
+
background: var(--bg-color) !important;
|
|
62
|
+
border-radius: 6px !important;
|
|
63
|
+
border: 1px solid var(--border-color) !important;
|
|
66
64
|
.ant-select-selection-placeholder {
|
|
67
65
|
color: var(--color);
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
&:hover {
|
|
71
|
-
.ant-select
|
|
69
|
+
.ant-select {
|
|
72
70
|
border: 1px solid var(--hover-color) !important;
|
|
73
71
|
}
|
|
74
72
|
}
|
|
75
73
|
&.dark {
|
|
76
|
-
.ant-select-
|
|
77
|
-
|
|
78
|
-
color: white;
|
|
79
|
-
}
|
|
74
|
+
.ant-select-content-value {
|
|
75
|
+
color: white;
|
|
80
76
|
}
|
|
81
77
|
|
|
82
|
-
.ant-select-
|
|
78
|
+
.ant-select-suffix {
|
|
83
79
|
color: white;
|
|
84
80
|
}
|
|
85
81
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
1
7
|
import { translateLocaleText } from "./../../hooks/useTranslation.js";
|
|
2
8
|
/**
|
|
3
9
|
* 通用-维保信息
|
|
@@ -13,6 +19,32 @@ import RmRecord from "./RmRecord";
|
|
|
13
19
|
import RmType from "./RmType";
|
|
14
20
|
import "./style";
|
|
15
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
export var REPAIR_MAINTAIN_TAB_KEY = 'rm';
|
|
23
|
+
export var getRepairMaintainTab = function getRepairMaintainTab() {
|
|
24
|
+
return {
|
|
25
|
+
key: REPAIR_MAINTAIN_TAB_KEY,
|
|
26
|
+
title: translateLocaleText("t('vtxcarmodal.maintenanceInformation')")
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export var isRepairMaintainTab = function isRepairMaintainTab(tab) {
|
|
30
|
+
return (tab === null || tab === void 0 ? void 0 : tab.key) === REPAIR_MAINTAIN_TAB_KEY || (tab === null || tab === void 0 ? void 0 : tab.key) === 'default-rm' || "".concat((tab === null || tab === void 0 ? void 0 : tab.key) || '').endsWith('-rm');
|
|
31
|
+
};
|
|
32
|
+
export var insertRepairMaintainTab = function insertRepairMaintainTab() {
|
|
33
|
+
var tabs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
34
|
+
if (!Array.isArray(tabs) || tabs.length === 0) {
|
|
35
|
+
return tabs;
|
|
36
|
+
}
|
|
37
|
+
if (tabs.some(isRepairMaintainTab)) {
|
|
38
|
+
return tabs;
|
|
39
|
+
}
|
|
40
|
+
var customIndex = tabs.findIndex(function (tab) {
|
|
41
|
+
return !!(tab !== null && tab !== void 0 && tab.url);
|
|
42
|
+
});
|
|
43
|
+
if (customIndex === -1) {
|
|
44
|
+
return [].concat(_toConsumableArray(tabs), [getRepairMaintainTab()]);
|
|
45
|
+
}
|
|
46
|
+
return [].concat(_toConsumableArray(tabs.slice(0, customIndex)), [getRepairMaintainTab()], _toConsumableArray(tabs.slice(customIndex)));
|
|
47
|
+
};
|
|
16
48
|
var RepaireMaintain = function RepaireMaintain(props) {
|
|
17
49
|
var id = props.id;
|
|
18
50
|
var date = dayjs().format('YYYY-MM-DD');
|
|
@@ -31,6 +31,8 @@ var GridItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
31
31
|
ref: ref,
|
|
32
32
|
beenHasVideo: channel.beenHasVideo // 对讲
|
|
33
33
|
,
|
|
34
|
+
beenHasAudio: channel.beenHasAudio // 音频
|
|
35
|
+
,
|
|
34
36
|
url: url,
|
|
35
37
|
type: channel === null || channel === void 0 ? void 0 : channel.player,
|
|
36
38
|
deviceIp: channel.deviceIp,
|
|
@@ -29,6 +29,8 @@ var GridItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
29
29
|
ref: ref,
|
|
30
30
|
beenHasVideo: channel.beenHasVideo // 对讲
|
|
31
31
|
,
|
|
32
|
+
beenHasAudio: channel.beenHasAudio // 音频
|
|
33
|
+
,
|
|
32
34
|
url: channel.url,
|
|
33
35
|
type: channel === null || channel === void 0 ? void 0 : channel.player,
|
|
34
36
|
deviceIp: channel.deviceIp,
|
|
@@ -26,6 +26,29 @@ import "./index.less";
|
|
|
26
26
|
import RealtimeGrid from "./RealtimeGrid";
|
|
27
27
|
import { translateLocaleText } from "./../../hooks/useTranslation.js";
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
|
+
export var VIDEO_TAB_KEY = 'video';
|
|
30
|
+
export var getVideoTab = function getVideoTab() {
|
|
31
|
+
return {
|
|
32
|
+
key: VIDEO_TAB_KEY,
|
|
33
|
+
title: translateLocaleText("t('vtxdevicemodal.video')")
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export var isVideoTab = function isVideoTab(tab) {
|
|
37
|
+
return (tab === null || tab === void 0 ? void 0 : tab.key) === VIDEO_TAB_KEY || "".concat((tab === null || tab === void 0 ? void 0 : tab.key) || '').endsWith('video');
|
|
38
|
+
};
|
|
39
|
+
export var insertVideoTab = function insertVideoTab() {
|
|
40
|
+
var tabs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
41
|
+
var channels = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
42
|
+
if (!Array.isArray(tabs) || tabs.length === 0) {
|
|
43
|
+
return tabs;
|
|
44
|
+
}
|
|
45
|
+
if (!(channels !== null && channels !== void 0 && channels.length)) {
|
|
46
|
+
return tabs.filter(function (tab) {
|
|
47
|
+
return !isVideoTab(tab);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return tabs;
|
|
51
|
+
};
|
|
29
52
|
var VmVideo = function VmVideo(_ref) {
|
|
30
53
|
var _ref$channels = _ref.channels,
|
|
31
54
|
channels = _ref$channels === void 0 ? [] : _ref$channels;
|
|
@@ -62,6 +85,8 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
62
85
|
endTime = state.endTime,
|
|
63
86
|
history = state.history;
|
|
64
87
|
useEffect(function () {
|
|
88
|
+
var s,
|
|
89
|
+
e = '';
|
|
65
90
|
if (dateType === 'custom') {
|
|
66
91
|
setState({
|
|
67
92
|
datePickerDisabled: false
|
|
@@ -70,23 +95,25 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
70
95
|
setState({
|
|
71
96
|
datePickerDisabled: true
|
|
72
97
|
});
|
|
73
|
-
if (dateType === 'dayBeforeYesterday') {
|
|
74
|
-
setState({
|
|
75
|
-
startTime: dayjs().subtract(2, 'day').format('YYYY-MM-DD 00:00:00'),
|
|
76
|
-
endTime: dayjs().subtract(2, 'day').format('YYYY-MM-DD 23:59:59')
|
|
77
|
-
});
|
|
78
|
-
} else if (dateType === 'yesterday') {
|
|
79
|
-
setState({
|
|
80
|
-
startTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD 00:00:00'),
|
|
81
|
-
endTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD 23:59:59')
|
|
82
|
-
});
|
|
83
|
-
} else if (dateType === 'today') {
|
|
84
|
-
setState({
|
|
85
|
-
startTime: dayjs().format('YYYY-MM-DD 00:00:00'),
|
|
86
|
-
endTime: dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
98
|
}
|
|
99
|
+
if (dateType === 'dayBeforeYesterday') {
|
|
100
|
+
s = dayjs().subtract(2, 'day').format('YYYY-MM-DD 00:00:00');
|
|
101
|
+
e = dayjs().subtract(2, 'day').format('YYYY-MM-DD 23:59:59');
|
|
102
|
+
} else if (dateType === 'yesterday') {
|
|
103
|
+
s = dayjs().subtract(1, 'day').format('YYYY-MM-DD 00:00:00');
|
|
104
|
+
e = dayjs().subtract(1, 'day').format('YYYY-MM-DD 23:59:59');
|
|
105
|
+
} else {
|
|
106
|
+
s = dayjs().format('YYYY-MM-DD 00:00:00');
|
|
107
|
+
e = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
108
|
+
}
|
|
109
|
+
setState({
|
|
110
|
+
startTime: s,
|
|
111
|
+
endTime: e
|
|
112
|
+
});
|
|
113
|
+
form.setFieldsValue({
|
|
114
|
+
beginTime: dayjs(s),
|
|
115
|
+
endTime: dayjs(e)
|
|
116
|
+
});
|
|
90
117
|
}, [dateType]);
|
|
91
118
|
useEffect(function () {
|
|
92
119
|
if (channels !== null && channels !== void 0 && channels.length && tabKey === '1') {
|
|
@@ -200,8 +227,8 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
200
227
|
requiredMark: false,
|
|
201
228
|
colon: true,
|
|
202
229
|
initialValues: {
|
|
203
|
-
beginTime: startTime ? dayjs(startTime) : dayjs().
|
|
204
|
-
endTime: endTime ? dayjs(endTime) : dayjs().
|
|
230
|
+
beginTime: startTime ? dayjs(startTime) : dayjs().startOf('day'),
|
|
231
|
+
endTime: endTime ? dayjs(endTime) : dayjs().endOf('day')
|
|
205
232
|
},
|
|
206
233
|
autoComplete: "off",
|
|
207
234
|
children: [/*#__PURE__*/_jsx(Form.Item, {
|
|
@@ -1,13 +1,27 @@
|
|
|
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); }); }; }
|
|
1
5
|
import { useRequest } from 'ahooks';
|
|
2
6
|
import http from "../_util/http";
|
|
3
7
|
export default (function (billId, ready) {
|
|
4
|
-
var _useRequest = useRequest(function () {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
var _useRequest = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9
|
+
var url;
|
|
10
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12
|
+
case 0:
|
|
13
|
+
url = "".concat(process.env.PREFIX || '', "/cloud/vis/base/np/videoDevice/loadVideoChannelByBillId.smvc");
|
|
14
|
+
return _context.abrupt("return", http.get(url, {
|
|
15
|
+
body: {
|
|
16
|
+
billId: billId
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
case 2:
|
|
20
|
+
case "end":
|
|
21
|
+
return _context.stop();
|
|
8
22
|
}
|
|
9
|
-
});
|
|
10
|
-
}, {
|
|
23
|
+
}, _callee);
|
|
24
|
+
})), {
|
|
11
25
|
ready: ready,
|
|
12
26
|
refreshDeps: [billId]
|
|
13
27
|
}),
|