@vtx/modals2 6.0.0-beta.2 → 6.0.0-beta.20
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 +205 -0
- package/lib/_components/vm-appraisal-info/index.less +7 -0
- package/lib/_components/vm-bar-charts/index.js +4 -4
- package/lib/_components/vm-factor/index.js +2 -1
- package/lib/_components/vm-filter/style/index.less +7 -11
- package/lib/_components/vm-info-collection/index.js +3 -2
- package/lib/_components/vm-line-charts/index.js +4 -1
- package/lib/_components/vm-progress/index.js +2 -1
- package/lib/_components/vm-repair-maintain/index.js +34 -2
- package/lib/_components/vm-tag/index.js +2 -1
- package/lib/_components/vm-title/index.js +2 -1
- package/lib/_components/vm-video/HistoryGrid.js +53 -3
- package/lib/_components/vm-video/RealtimeGrid.js +24 -3
- package/lib/_components/vm-video/index.js +99 -37
- package/lib/_components/vm-video/index.less +18 -14
- package/lib/_components/vm-wrapper/index.js +1 -1
- package/lib/_components/vm-wrapper/style/index.less +4 -2
- package/lib/_hooks/useGetChannels.js +20 -6
- package/lib/_hooks/useUmsService.js +36 -0
- package/lib/_service/index.js +7 -33
- package/lib/_util/http.js +36 -8
- package/lib/_util/iconSvgHtml.js +15 -5
- package/lib/_util/index.js +6 -5
- package/lib/locales/en.json +141 -1
- package/lib/locales/zh-CN.json +143 -3
- package/lib/vtx-base-modal/Tabs/index.js +2 -1
- package/lib/vtx-base-modal/index.js +2 -1
- package/lib/vtx-car-modal/api.js +596 -114
- package/lib/vtx-car-modal/components/Info/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/EleUse/index.js +218 -0
- package/lib/vtx-car-modal/content/Common/EleUse/index.less +19 -0
- package/lib/vtx-car-modal/content/Common/OilUse/index.js +230 -0
- package/lib/vtx-car-modal/content/Common/OilUse/index.less +19 -0
- package/lib/vtx-car-modal/content/Common/OperationAnalysis/index.js +376 -0
- package/lib/vtx-car-modal/content/Common/OperationAnalysis/index.less +169 -0
- package/lib/vtx-car-modal/content/Common/WaterUse/index.js +201 -0
- package/lib/vtx-car-modal/content/Common/WaterUse/index.less +19 -0
- package/lib/vtx-car-modal/content/Common/index.js +9 -1
- package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Detail.js +2 -1
- package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +9 -8
- package/lib/vtx-car-modal/content/Ljzy/StaticInfo/index.js +11 -11
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Detail.js +5 -4
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Summary.js +8 -6
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/index.js +7 -4
- package/lib/vtx-car-modal/imgs/czb_bg.png +0 -0
- package/lib/vtx-car-modal/imgs/czb_bg_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/bglyh.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/bglyh_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdcs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdcs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdje.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdje_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdpc.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdpc_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dccdje.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dccdje_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jscs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jscs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jsje.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jsje_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jsl.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jsl_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jspc.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jspc_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jycs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jycs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jyje.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jyje_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jyl.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jyl_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/ljwbcs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/ljwbcs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/njzfy.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/njzfy_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/qzxze.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/qzxze_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/sgcs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/sgcs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/sgfy.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/sgfy_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/syxze.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/syxze_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wbzfy.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wbzfy_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzcs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzcs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzkf.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzkf_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzkfee.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzkfee_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/xslc.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/xslc_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/ydcb.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/ydcb_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/yhcb.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/yhcb_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/yscb.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/yscb_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/zjl.png +0 -0
- package/lib/vtx-car-modal/imgs/zjl_dark.png +0 -0
- package/lib/vtx-car-modal/index.js +40 -9
- package/lib/vtx-cc-cp-modal/components/Calendar/index.js +3 -3
- package/lib/vtx-cp-modal/components/BaseInfo/CarWork.js +2 -5
- package/lib/vtx-cp-modal/components/BaseInfo/TodayWork.js +7 -1
- package/lib/vtx-cp-modal/components/ExeceptionInfo/AlarmRecord.js +8 -4
- package/lib/vtx-cp-modal/components/SyInfo/Ljcsl.js +2 -2
- package/lib/vtx-cp-modal/index.js +12 -12
- package/lib/vtx-default-modal/index.js +7 -6
- package/lib/vtx-df-modal/components/BaseInfo/Jczbqs.js +2 -2
- package/lib/vtx-df-modal/components/BaseInfo/Qyjcl.js +11 -5
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jczbqs.js +2 -2
- package/lib/vtx-df-modal/components/Calendar/index.js +9 -2
- package/lib/vtx-df-modal/components/Calendar/zd-reborn.js +9 -2
- package/lib/vtx-df-modal/components/WorkCondition/Table.js +2 -2
- package/lib/vtx-df-modal/index.js +20 -25
- package/lib/vtx-kh-modal/components/Record/index.js +1 -205
- package/lib/vtx-qyry-modal/index.js +1 -1
- package/lib/vtx-restaurant-modal/components/Calendar/index.js +3 -3
- package/lib/vtx-restaurant-modal/components/DetailInfo/index.js +3 -0
- package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +50 -33
- package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +3 -3
- package/lib/vtx-restaurant-modal/config.js +11 -3
- 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/components/LaneCalendar/index.js +3 -0
- package/lib/vtx-road-modal/index.js +21 -5
- package/lib/vtx-road-modal/utils/url.js +12 -0
- package/lib/vtx-shxq-modal/api.js +5 -5
- package/lib/vtx-shxq-modal/components/ThrowCalendar/List.js +2 -2
- package/lib/vtx-shxq-modal/components/ThrowRecord/List.js +19 -6
- package/lib/vtx-shxq-modal/index.js +21 -4
- package/lib/vtx-staff-modal/components/AlarmInfo/Charts.js +4 -1
- package/lib/vtx-tfd-modal/api.js +2 -2
- package/lib/vtx-tfd-modal/components/BaseInfo/Jczbqs.js +2 -2
- package/lib/vtx-wr-modal/index.js +34 -6
- package/lib/vtx-zf-modal/components/CkEditorCustom/view.js +4 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/editableDiv/FormView.js +5 -4
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/editableDiv/index.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/FormView.js +7 -6
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/date.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/index.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/FormView.js +6 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/checkbox.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/index.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/sign/FormView.js +7 -6
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/sign/index.js +12 -7
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/textarea/FormView.js +6 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/textarea/index.js +10 -5
- package/lib/vtx-zzz-modal/index.js +30 -23
- package/package.json +6 -6
|
@@ -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,42 +95,47 @@ 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') {
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
120
|
+
var defaultCheckedChannels = channels.map(function (channel, index) {
|
|
121
|
+
return _objectSpread(_objectSpread({}, channel), {}, {
|
|
122
|
+
checked: index < 4
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
Promise.all(channels.slice(0, 4).map(function (ele) {
|
|
97
126
|
return getPreviewUrl({
|
|
98
127
|
channelNum: ele.channelNum,
|
|
99
128
|
deviceId: ele.videoDeviceId
|
|
100
129
|
});
|
|
101
130
|
})).then(function (res) {
|
|
102
|
-
setCheckedChannels(
|
|
103
|
-
|
|
131
|
+
setCheckedChannels(defaultCheckedChannels.map(function (channel, index) {
|
|
132
|
+
var _res$index;
|
|
133
|
+
return _objectSpread(_objectSpread(_objectSpread({}, channel), index < 4 ? (_res$index = res[index]) === null || _res$index === void 0 ? void 0 : _res$index.data : {}), {}, {
|
|
104
134
|
checked: index < 4
|
|
105
135
|
});
|
|
106
136
|
}));
|
|
107
137
|
});
|
|
108
|
-
}
|
|
138
|
+
}
|
|
109
139
|
if (tabKey === '2') {
|
|
110
140
|
var _channels$;
|
|
111
141
|
form.setFieldsValue({
|
|
@@ -158,13 +188,27 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
158
188
|
onChange: function onChange(e) {
|
|
159
189
|
var list = cloneDeep(checkedChannels);
|
|
160
190
|
if (e.target.checked) {
|
|
191
|
+
var selectedCount = list.filter(function (channel) {
|
|
192
|
+
return channel.checked;
|
|
193
|
+
}).length + 1;
|
|
194
|
+
if (selectedCount > 9) {
|
|
195
|
+
message.warning('同时播放通道不能超过9路');
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (selectedCount > Number(mode)) {
|
|
199
|
+
setMode(selectedCount <= 4 ? '4' : '9');
|
|
200
|
+
}
|
|
161
201
|
getPreviewUrl({
|
|
162
202
|
channelNum: ele.channelNum,
|
|
163
|
-
deviceId: ele.deviceId
|
|
203
|
+
deviceId: ele.videoDeviceId || ele.deviceId
|
|
164
204
|
}).then(function (res) {
|
|
165
|
-
|
|
205
|
+
var _res$data, _res$data2;
|
|
206
|
+
var currentChannel = list[index];
|
|
207
|
+
list[index] = _objectSpread(_objectSpread(_objectSpread({}, currentChannel), res.data), {}, {
|
|
208
|
+
channelName: currentChannel.channelName || ((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.channelName),
|
|
209
|
+
deviceName: currentChannel.deviceName || ((_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.deviceName),
|
|
166
210
|
checked: true
|
|
167
|
-
}
|
|
211
|
+
});
|
|
168
212
|
setCheckedChannels(list);
|
|
169
213
|
});
|
|
170
214
|
} else {
|
|
@@ -200,8 +244,8 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
200
244
|
requiredMark: false,
|
|
201
245
|
colon: true,
|
|
202
246
|
initialValues: {
|
|
203
|
-
beginTime: startTime ? dayjs(startTime) : dayjs().
|
|
204
|
-
endTime: endTime ? dayjs(endTime) : dayjs().
|
|
247
|
+
beginTime: startTime ? dayjs(startTime) : dayjs().startOf('day'),
|
|
248
|
+
endTime: endTime ? dayjs(endTime) : dayjs().endOf('day')
|
|
205
249
|
},
|
|
206
250
|
autoComplete: "off",
|
|
207
251
|
children: [/*#__PURE__*/_jsx(Form.Item, {
|
|
@@ -353,15 +397,23 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
353
397
|
key: '9'
|
|
354
398
|
}],
|
|
355
399
|
onChange: function onChange(key) {
|
|
356
|
-
|
|
400
|
+
var selectedCount = checkedChannels.filter(function (channel) {
|
|
401
|
+
return channel.checked;
|
|
402
|
+
}).length;
|
|
403
|
+
setMode(selectedCount > Number(key) ? selectedCount <= 4 ? '4' : '9' : key);
|
|
357
404
|
}
|
|
358
405
|
}) : /*#__PURE__*/_jsx(_Fragment, {})
|
|
359
406
|
}), /*#__PURE__*/_jsx("div", {
|
|
360
407
|
className: "vm-video-content _".concat(mode),
|
|
361
|
-
children: tabKey === '1' ? getGridItems(mode, checkedChannels
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
408
|
+
children: tabKey === '1' ? getGridItems(mode, checkedChannels, setCheckedChannels) : /*#__PURE__*/_jsx(HistoryGrid, {
|
|
409
|
+
channel: history,
|
|
410
|
+
startTime: startTime,
|
|
411
|
+
endTime: endTime,
|
|
412
|
+
onClose: function onClose() {
|
|
413
|
+
setState({
|
|
414
|
+
history: {}
|
|
415
|
+
});
|
|
416
|
+
}
|
|
365
417
|
})
|
|
366
418
|
})]
|
|
367
419
|
})]
|
|
@@ -369,18 +421,28 @@ var VmVideo = function VmVideo(_ref) {
|
|
|
369
421
|
};
|
|
370
422
|
export default VmVideo;
|
|
371
423
|
var getGridItems = function getGridItems(latestGrid, channels, setCheckedChannels) {
|
|
424
|
+
var selectedChannels = channels.filter(function (channel) {
|
|
425
|
+
return channel.checked;
|
|
426
|
+
});
|
|
372
427
|
var items = [];
|
|
373
428
|
var _loop = function _loop(i) {
|
|
374
429
|
var element = /*#__PURE__*/_jsx(RealtimeGrid, {
|
|
375
|
-
channel:
|
|
430
|
+
channel: selectedChannels[i] || {
|
|
376
431
|
channelNum: '',
|
|
377
432
|
channelId: ''
|
|
378
433
|
},
|
|
379
434
|
onClose: function onClose() {
|
|
380
435
|
var list = cloneDeep(channels);
|
|
381
|
-
list
|
|
382
|
-
|
|
383
|
-
|
|
436
|
+
var channelIndex = list.findIndex(function (channel) {
|
|
437
|
+
var _selectedChannels$i;
|
|
438
|
+
return channel.channelNum === ((_selectedChannels$i = selectedChannels[i]) === null || _selectedChannels$i === void 0 ? void 0 : _selectedChannels$i.channelNum);
|
|
439
|
+
});
|
|
440
|
+
if (channelIndex === -1) {
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
list[channelIndex].checked = false;
|
|
444
|
+
list[channelIndex].url = '';
|
|
445
|
+
list[channelIndex].player = '';
|
|
384
446
|
setCheckedChannels(list);
|
|
385
447
|
},
|
|
386
448
|
scale: 1
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
padding-top: 12px;
|
|
60
60
|
overflow-y: auto;
|
|
61
61
|
|
|
62
|
-
.channels--item {
|
|
63
|
-
svg {
|
|
64
|
-
|
|
65
|
-
margin-right: 2px;
|
|
66
|
-
}
|
|
67
|
-
.ant-checkbox {
|
|
68
|
-
|
|
62
|
+
.channels--item {
|
|
63
|
+
svg {
|
|
64
|
+
display: block;
|
|
65
|
+
margin-right: 2px;
|
|
66
|
+
}
|
|
67
|
+
.ant-checkbox {
|
|
68
|
+
top: 0;
|
|
69
69
|
}
|
|
70
70
|
.ant-checkbox-checked .ant-checkbox-inner {
|
|
71
71
|
background-color: var(--check-bg);
|
|
@@ -78,13 +78,17 @@
|
|
|
78
78
|
width: 15px;
|
|
79
79
|
height: 15px;
|
|
80
80
|
}
|
|
81
|
-
.ant-checkbox-wrapper {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
.ant-checkbox-wrapper {
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
font-size: 15px;
|
|
85
|
+
// color: var(--modal-title-color);
|
|
86
|
+
}
|
|
87
|
+
.ant-checkbox + span {
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
padding: 0 4px;
|
|
91
|
+
}
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
--wborder-color: #f1f0f0;
|
|
5
5
|
--wfilter-bg: #f5f5f5;
|
|
6
6
|
--wtype-bg: #fff;
|
|
7
|
-
--tab-active-color: #
|
|
7
|
+
--tab-active-color: #1677ff;
|
|
8
8
|
|
|
9
9
|
&.dark {
|
|
10
10
|
--wbg-color: rgba(0, 155, 233, 10%);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--wborder-color: #1064a7;
|
|
13
13
|
--wfilter-bg: #0b588e;
|
|
14
14
|
--wtype-bg: #0168b0;
|
|
15
|
-
--tab-active-color: #
|
|
15
|
+
--tab-active-color: #009dff;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&-tabs-wrap {
|
|
@@ -55,6 +55,8 @@
|
|
|
55
55
|
&-head {
|
|
56
56
|
padding: 11px 16px;
|
|
57
57
|
border-bottom: 1px solid var(--wborder-color);
|
|
58
|
+
border-top-left-radius: 8px;
|
|
59
|
+
border-top-right-radius: 8px;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
.extra {
|
|
@@ -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
|
}),
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
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 _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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { request } from '@vtx/utils';
|
|
8
|
+
import { useRequest } from 'ahooks';
|
|
9
|
+
import { useState } from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* 获取终端、人员服务配置信息
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export var useZdService = function useZdService() {
|
|
15
|
+
var _useState = useState({
|
|
16
|
+
zdService: 'zd',
|
|
17
|
+
ryService: 'staff'
|
|
18
|
+
}),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
serviceConfig = _useState2[0],
|
|
21
|
+
setServiceConfig = _useState2[1];
|
|
22
|
+
useRequest(function () {
|
|
23
|
+
return request.get('/cloud/management/api/v101/user/config/component/get', {
|
|
24
|
+
data: {
|
|
25
|
+
componentCode: 'POPUP_MODAL_SERVICE'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}, {
|
|
29
|
+
onSuccess: function onSuccess(data) {
|
|
30
|
+
var _data$data;
|
|
31
|
+
var json = data === null || data === void 0 || (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.configInfo;
|
|
32
|
+
if (json) setServiceConfig(JSON.parse(json));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return serviceConfig;
|
|
36
|
+
};
|
package/lib/_service/index.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
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
1
|
import { request } from '@vtx/utils';
|
|
8
2
|
import { useRequest } from 'ahooks';
|
|
9
3
|
var CommonService = {
|
|
10
4
|
useBaseInfo: function useBaseInfo(id) {
|
|
11
|
-
var _baseInfoRes$data, _baseInfoRes$data2, _tabConfig$data;
|
|
12
5
|
var coordType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'wgs84';
|
|
13
6
|
var _useRequest = useRequest(function () {
|
|
14
7
|
return request.get('/cloud/jcss-reborn/facility/get', {
|
|
@@ -22,36 +15,17 @@ var CommonService = {
|
|
|
22
15
|
}),
|
|
23
16
|
baseInfoRes = _useRequest.data;
|
|
24
17
|
var info = baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data;
|
|
25
|
-
var _useRequest2 = useRequest(function () {
|
|
26
|
-
return request.get('/cloud/jcss-reborn/facility/type/config/getByCode', {
|
|
27
|
-
data: {
|
|
28
|
-
code: baseInfoRes.data.typeCode
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}, {
|
|
32
|
-
ready: !!(baseInfoRes !== null && baseInfoRes !== void 0 && (_baseInfoRes$data = baseInfoRes.data) !== null && _baseInfoRes$data !== void 0 && _baseInfoRes$data.typeCode),
|
|
33
|
-
refreshDeps: [baseInfoRes === null || baseInfoRes === void 0 || (_baseInfoRes$data2 = baseInfoRes.data) === null || _baseInfoRes$data2 === void 0 ? void 0 : _baseInfoRes$data2.typeCode]
|
|
34
|
-
}),
|
|
35
|
-
tabConfig = _useRequest2.data;
|
|
36
18
|
var photos = info !== null && info !== void 0 && info.photoIds ? JSON.parse(info.photoIds) : info !== null && info !== void 0 && info.typePhotoIds ? JSON.parse(info.typePhotoIds) : [];
|
|
37
19
|
return {
|
|
38
20
|
photos: photos,
|
|
39
21
|
code: info === null || info === void 0 ? void 0 : info.code,
|
|
40
|
-
info: info
|
|
41
|
-
tabConfig: (tabConfig === null || tabConfig === void 0 || (_tabConfig$data = tabConfig.data) === null || _tabConfig$data === void 0 || (_tabConfig$data = _tabConfig$data.popupConfigJson) === null || _tabConfig$data === void 0 ? void 0 : _tabConfig$data.filter(function (ele) {
|
|
42
|
-
return ele.display;
|
|
43
|
-
}).map(function (ele) {
|
|
44
|
-
return _objectSpread(_objectSpread({}, ele), {}, {
|
|
45
|
-
key: ele.code,
|
|
46
|
-
title: ele.name
|
|
47
|
-
});
|
|
48
|
-
})) || []
|
|
22
|
+
info: info
|
|
49
23
|
};
|
|
50
24
|
},
|
|
51
25
|
//基础设施详情展示字段
|
|
52
26
|
useGetFields: function useGetFields(code) {
|
|
53
27
|
var _data$data$baseFields;
|
|
54
|
-
var
|
|
28
|
+
var _useRequest2 = useRequest(function () {
|
|
55
29
|
return request.get('/cloud/jcss-reborn/facility/type/view/detail', {
|
|
56
30
|
data: {
|
|
57
31
|
code: code
|
|
@@ -61,14 +35,14 @@ var CommonService = {
|
|
|
61
35
|
refreshDeps: [code],
|
|
62
36
|
ready: !!code
|
|
63
37
|
}),
|
|
64
|
-
data =
|
|
38
|
+
data = _useRequest2.data;
|
|
65
39
|
return data !== null && data !== void 0 && data.data ? ((_data$data$baseFields = data.data.baseFields) === null || _data$data$baseFields === void 0 ? void 0 : _data$data$baseFields.filter(function (ele) {
|
|
66
40
|
return !['photoIds', 'geometryInfo', 'orderIndex', 'geoPointLocation', 'geoLineLocation', 'geoPolygonLocation'].includes(ele.key);
|
|
67
41
|
}).concat(data.data.customFields)) || [] : [];
|
|
68
42
|
},
|
|
69
43
|
// 计量详情
|
|
70
44
|
useLmDetail: function useLmDetail(id, hasConfig) {
|
|
71
|
-
var
|
|
45
|
+
var _useRequest3 = useRequest(function () {
|
|
72
46
|
return request.get('/cloud/zd/base/api/cp/commonFactory/getCommonFactoryById.smvc', {
|
|
73
47
|
data: {
|
|
74
48
|
factoryId: id
|
|
@@ -78,14 +52,14 @@ var CommonService = {
|
|
|
78
52
|
refreshDeps: [id],
|
|
79
53
|
ready: hasConfig
|
|
80
54
|
}),
|
|
81
|
-
res =
|
|
55
|
+
res = _useRequest3.data;
|
|
82
56
|
return {
|
|
83
57
|
detail: (res === null || res === void 0 ? void 0 : res.data) || {}
|
|
84
58
|
};
|
|
85
59
|
},
|
|
86
60
|
// 计量详情
|
|
87
61
|
useLmDetailZdReborn: function useLmDetailZdReborn(id) {
|
|
88
|
-
var
|
|
62
|
+
var _useRequest4 = useRequest(function () {
|
|
89
63
|
return request.post('/cloud/zd-reborn/api/base/commonFactory/getCommonFactoryById?factoryId=' + id, {
|
|
90
64
|
data: JSON.stringify({
|
|
91
65
|
factoryId: id
|
|
@@ -94,7 +68,7 @@ var CommonService = {
|
|
|
94
68
|
}, {
|
|
95
69
|
refreshDeps: [id]
|
|
96
70
|
}),
|
|
97
|
-
res =
|
|
71
|
+
res = _useRequest4.data;
|
|
98
72
|
return {
|
|
99
73
|
detail: (res === null || res === void 0 ? void 0 : res.data) || {}
|
|
100
74
|
};
|
package/lib/_util/http.js
CHANGED
|
@@ -15,6 +15,7 @@ import { message } from 'antd';
|
|
|
15
15
|
import isObject from 'lodash/isObject';
|
|
16
16
|
import pickBy from 'lodash/pickBy';
|
|
17
17
|
import qs from 'qs';
|
|
18
|
+
import { translateLocaleText } from "../hooks/useTranslation.js";
|
|
18
19
|
var SECOND = 30;
|
|
19
20
|
var MILL_SECOND = 1000;
|
|
20
21
|
var baseUrlPrefix = process.env.PREFIX ? "/".concat(process.env.PREFIX) : '';
|
|
@@ -77,6 +78,32 @@ var Http = /*#__PURE__*/function () {
|
|
|
77
78
|
} : {})
|
|
78
79
|
});
|
|
79
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
|
+
}
|
|
80
107
|
/**
|
|
81
108
|
* get 请求
|
|
82
109
|
* @param {*} url
|
|
@@ -224,16 +251,17 @@ var Http = /*#__PURE__*/function () {
|
|
|
224
251
|
value: function _responseHandler(response) {
|
|
225
252
|
var status = response.status,
|
|
226
253
|
data = response.data,
|
|
227
|
-
statusText = response.statusText
|
|
254
|
+
statusText = response.statusText,
|
|
255
|
+
config = response.config;
|
|
228
256
|
if (status >= 200 && status < 300) {
|
|
229
257
|
if (data.result === 0) {
|
|
230
258
|
return data;
|
|
231
259
|
} else {
|
|
232
|
-
var _config,
|
|
233
|
-
if ((
|
|
260
|
+
var _config$url, _config$url2;
|
|
261
|
+
if ((config === null || config === void 0 || (_config$url = config.url) === null || _config$url === void 0 ? void 0 : _config$url.indexOf('zdjg/jg/data/getJgDataStatistics')) > -1 || (config === null || config === void 0 || (_config$url2 = config.url) === null || _config$url2 === void 0 ? void 0 : _config$url2.indexOf('/cloud/zd/base/api/cp/commonFactory')) > -1) {
|
|
234
262
|
return;
|
|
235
263
|
}
|
|
236
|
-
message.error(data.msg || '
|
|
264
|
+
message.error(data.msg || translateLocaleText("t('common.requestInfoError')"));
|
|
237
265
|
return;
|
|
238
266
|
}
|
|
239
267
|
}
|
|
@@ -257,18 +285,18 @@ var Http = /*#__PURE__*/function () {
|
|
|
257
285
|
var msg;
|
|
258
286
|
switch (error.response.status) {
|
|
259
287
|
case 404:
|
|
260
|
-
msg = '
|
|
288
|
+
msg = translateLocaleText("t('common.apiRequestNotFound404')");
|
|
261
289
|
break;
|
|
262
290
|
case 500:
|
|
263
|
-
msg = '
|
|
291
|
+
msg = translateLocaleText("t('common.serverApiException500')");
|
|
264
292
|
break;
|
|
265
293
|
default:
|
|
266
|
-
msg = '
|
|
294
|
+
msg = translateLocaleText("t('common.requestErrorRetry')");
|
|
267
295
|
break;
|
|
268
296
|
}
|
|
269
297
|
message.error(msg);
|
|
270
298
|
} else {
|
|
271
|
-
message.error('
|
|
299
|
+
message.error(translateLocaleText("t('common.serviceUnavailable')"));
|
|
272
300
|
}
|
|
273
301
|
}
|
|
274
302
|
|
package/lib/_util/iconSvgHtml.js
CHANGED
|
@@ -810,7 +810,9 @@ export function ContractIcon(props) {
|
|
|
810
810
|
children: /*#__PURE__*/_jsx("path", {
|
|
811
811
|
d: "M4.82316875,12.941502C4.30343485,12.951171,3.87399985,12.538216,3.86333515,12.018501C3.86333515,11.507168,4.29233505,11.093334,4.82316875,11.093334L16.32600175,11.093334C16.85466975,11.093334,17.28366875,11.507168,17.28366875,12.0185C17.27300075,12.537355,16.84489675,12.949962,16.32600175,12.941501L4.82100295,12.941501L4.82316875,12.941502ZM4.82316875,8.3200006C4.30260515,8.3296623,3.87282085,7.915401,3.86333515,7.394834C3.86333515,6.8856673,4.29233505,6.4718337,4.82316875,6.4718337L18.24133675,6.4718337C18.77216875,6.4718337,19.20116975,6.8835006,19.20116975,7.394834C19.19168275,7.9154,18.76189975,8.3296623,18.24133675,8.3200006L4.82316875,8.3200006ZM13.73033475,17.833834C13.97585775,17.59341,14.32923875,17.498903,14.66200175,17.584667C14.99783475,17.669167,15.26000175,17.920502,15.34666775,18.245501C15.43323675,18.569584,15.33313175,18.914951,15.08666775,19.142502L12.19200275,21.928835C11.76270275,22.338182,11.07093575,22.274923,10.72300275,21.7945L9.44033625,19.983168L7.41450215,21.917999C6.98227885,22.328838,6.28631685,22.26129,5.94116875,21.775L4.67366885,19.939833L2.62400225,21.915833C2.44210675,22.090031,2.19985845,22.187086,1.94800225,22.186666C1.11383545,22.186666,0.48983544,21.820499,0.20816877,21.140165C0.043502118,20.739332,0.021835437,20.442499,0.02833543811,19.645164L0.02833543811,2.7733335C0.0305018902,1.2415001,1.31966855,0,2.90783525,0L20.16100075,0C21.74916875,0,23.03616875,1.2415001,23.03616875,2.7733335L23.03616875,12.0185C23.02549975,12.537354,22.59739675,12.949961,22.07850275,12.941501C21.55960875,12.949961,21.13150375,12.537354,21.12083475,12.0185L21.12083475,2.7733335C21.11134875,2.2527671,20.68156475,1.8385054,20.16100075,1.8481669L2.90566845,1.8481669C2.38594485,1.8397157,1.95749245,2.2536278,1.94800185,2.7733335L1.94800185,19.955002L4.14500185,17.836002C4.57680945,17.422989,5.27462105,17.489595,5.62050195,17.976837L6.89016815,19.816338L8.90733525,17.888004C9.33641915,17.480339,10.02626995,17.543514,10.37416875,18.022337L11.65466875,19.831503L13.73033475,17.836004L13.73033475,17.833834ZM24.03066875,15.186168L25.40866675,16.471001C26.16931175,17.167906,26.19105375,18.359816,25.45633275,19.084L19.13616575,25.428001C18.68347375,25.87487,18.04213675,26.074379,17.41583475,25.963167L15.02383375,25.542833L14.50383375,23.252668C14.36925875,22.645517,14.55673775,22.011854,14.99999975,21.575668L21.31800075,15.231668C21.67673675,14.876896,22.15901375,14.674976,22.66350175,14.668334C23.16797475,14.657775,23.65702075,14.842526,24.02850175,15.184001L24.03066875,15.186168ZM17.75816875,24.143167L24.07616775,17.799168L22.69816775,16.514334L16.37800175,22.860502L16.62500175,23.943836L17.75816875,24.143167ZM0.98816973,24.034836L9.61583615,24.034836C10.14450275,24.034836,10.57350375,24.448668,10.57350375,24.960001C10.56401275,25.479708,10.13555975,25.89362,9.61583615,25.885168L0.98816848,25.885168C0.46844533,25.89362,0.039992822,25.479708,0.0305018146,24.960001C0.0305018146,24.448668,0.4595018,24.034836,0.98816973,24.034836Z",
|
|
812
812
|
fillOpacity: "1",
|
|
813
|
-
style:
|
|
813
|
+
style: {
|
|
814
|
+
'mixBlendMode': 'passthrough'
|
|
815
|
+
}
|
|
814
816
|
})
|
|
815
817
|
}));
|
|
816
818
|
}
|
|
@@ -855,7 +857,9 @@ export function PointIcon(props) {
|
|
|
855
857
|
}), /*#__PURE__*/_jsx("path", {
|
|
856
858
|
d: "M15.363120125,5.8500242687499995C14.742929425,5.20358991875,13.885618225,4.83851003647,12.989787125,4.8393573760986C12.146656525000001,4.83840680122,11.338169125,5.17471646875,10.744452955,5.77335762875C10.144453045,6.37335776875,9.814453125,7.17202426875,9.814453125,8.02002426875C9.814453125,8.33077666875,10.066367625,8.58269116875,10.377119545,8.58269116875C10.687871935,8.58269116875,10.939786425,8.33077666875,10.939786425,8.02002426875C10.941246525,6.88695286875,11.858054124999999,5.96805976875,12.991119825,5.96402426875L12.995786625000001,5.96402426875C13.582453725,5.96402426875,14.147786125,6.2046909687500005,14.545786825,6.62535766875C14.899120325,6.99669076875,15.079119725,7.46869086875,15.052453025,7.958024468750001C15.030452725,8.373357768750001,15.009786625,8.76535796875,13.807119325,9.968691368750001C13.083786025,10.692024668750001,12.429119125,11.412691568749999,12.341119325000001,12.29402496875C12.311284024999999,12.60308506875,12.536863825000001,12.87813186875,12.845786125,12.90935896875C12.864452825,12.91069216875,12.883786225,12.91269106875,12.902452925,12.91269106875C13.191775325,12.91234586875,13.433677625,12.69264456875,13.461786225,12.40469126875C13.507119225,11.944024568749999,13.931786525,11.43602416875,14.601786624999999,10.76535746875C15.999119725,9.36869096875,16.138453525,8.72202446875,16.175120325,8.02002386875C16.221119925,7.21735716875,15.931787525,6.44669056875,15.363120125,5.8500242687499995ZM12.214453725,14.48135756875C12.202481725,14.86245546875,12.508168225,15.17789446875,12.889453925,15.17789446875C13.270739525,15.17789446875,13.576426525,14.86245546875,13.564454125000001,14.48135756875C13.552996625,14.11682126875,13.254170425,13.82723806875,12.889453925,13.82723806875C12.524737325,13.82723806875,12.225911625,14.11681936875,12.214453725,14.48135756875Z",
|
|
857
859
|
fillOpacity: "1",
|
|
858
|
-
style:
|
|
860
|
+
style: {
|
|
861
|
+
'mixBlendMode': 'passthrough'
|
|
862
|
+
}
|
|
859
863
|
})]
|
|
860
864
|
}));
|
|
861
865
|
}
|
|
@@ -875,7 +879,9 @@ export function CollectionIcon(props) {
|
|
|
875
879
|
children: /*#__PURE__*/_jsx("path", {
|
|
876
880
|
d: "M8.5979662,7.4920964C8.5979662,7.0073862,8.2177906,6.6078672,7.7336779,6.5838313L5.7543974,6.5838313C4.1351061,6.5714412,2.5988955,7.2995858,1.5833125,8.5608745C0.55927664,9.8209248,0,11.5893574,0,13.648614L0,19.946068C0,20.449417,0.44015074,20.825811,0.93958473,20.825811L2.99213,20.825811C3.3836236,22.193243,4.6621299,23.2307,6.1738548,23.2307C7.6855798,23.2307,8.9618492,22.192684,9.3555794,20.825811L16.46175,20.825811C16.858276,22.193243,18.131748,23.2307,19.643475,23.2307C21.155201,23.2307,22.433704,22.192684,22.827995,20.825811L25.116556,20.825811C25.609859,20.838156,26.015345,20.43951,26.011396,19.946068L26.011396,5.6515172C26.006363,3.6610515,24.399561,2,22.408537,2L13.925989,2C11.937761,2,10.290691,3.6610515,10.290691,5.6515172L10.294922,6.5837402L5.7543974,6.5838313C5.5628862,6.5837965,5.5628972,8.400373,5.7543974,8.400362000000001L10.294922,8.4003906L10.295165,19.008722L9.353343,19.008722C8.9417601,17.591361,7.6475,16.613101,6.171618,16.603832C4.661571,16.603832,3.3836238,17.641289999999998,2.9893339,19.008722L1.8120563,19.008722L1.8120563,13.648614C1.8120563,10.4691267,3.378031,8.400362000000001,5.7543974,8.400362000000001C6.4020724,8.2848897,8.5979662,8.342354799999999,8.5979662,7.4920964ZM6.1716175,21.451082C5.3401318,21.45232,4.6651917,20.779051,4.6643672,19.947563C4.6635427,19.116077,5.3371463,18.441471,6.1686335,18.441057C7.0001211,18.440647,7.6743937,19.114584,7.6743937,19.94607C7.6743946,20.776392,7.0019398,21.449848,6.1716175,21.451082ZM19.639,21.451082C18.809416,21.447067,18.140017,20.771578,18.143515,19.941992C18.147013,19.112406,18.822086,18.442583,19.651674,18.44556C20.48126,18.44854,21.151505,19.123192,21.149046,19.95278C21.146584,20.78384,20.470053,21.455109,19.639,21.451082ZM24.193188,19.008722L22.823521,19.008722C22.411322,17.590593,21.115793,16.612235,19.639,16.603832C18.128952,16.603832,16.853243,17.641289999999998,16.457273,19.008722L12.109457,19.008722L12.109457,5.6515172C12.109457,4.6548862,12.933831,3.8142934,13.928224,3.8142934L22.410772,3.8142934C23.407404,3.8142934,24.193188,4.6532083,24.193188,5.6515172L24.193188,19.008722Z",
|
|
877
881
|
fillOpacity: "1",
|
|
878
|
-
style:
|
|
882
|
+
style: {
|
|
883
|
+
'mixBlendMode': 'passthrough'
|
|
884
|
+
}
|
|
879
885
|
})
|
|
880
886
|
}));
|
|
881
887
|
}
|
|
@@ -895,7 +901,9 @@ export function FactoryIcon(props) {
|
|
|
895
901
|
children: /*#__PURE__*/_jsx("path", {
|
|
896
902
|
d: "M8.6463909,0C9.3159323,0.0000090988951,9.8816862,0.49643576,9.9687262,1.1602947L12.95215,23.832714C13.056844,24.631304,12.43522,25.339764,11.629816,25.339766L1.3338681,25.339766C0.52845418,25.339756,-0.093172394,24.631294,0.011532409,23.832716L2.9949565,1.1602957C3.0820065,0.49642721,3.6477618,0,4.3172917,0L8.6463909,0ZM21.286932,12.003047C21.868433,12.002933,22.382977,12.379599,22.55859,12.933949L25.936781,23.603323C26.209028,24.462711,25.567934,25.339037,24.666456,25.339766L16.317673,25.339766C15.646761,25.339874,15.080209,24.841572,14.99467,24.176138L13.622321,13.506763C13.519822,12.709434,14.140766,12.003317,14.944657,12.003047L21.286932,12.003047ZM8.0609093,2.0005076L4.9021072,2.0005076L2.0940607,23.339258L10.868956,23.339258L8.0609093,2.0005076ZM20.798141,14.003554L15.702183,14.003554L16.902485,23.339258L23.754225,23.339258L20.798141,14.003554ZM17.449961,6.6683583L16.484381,10.669375L14.483873,10.669375L15.44945,6.6683598L17.449961,6.6683583ZM21.450975,6.6683583L20.485395,10.669375L18.484888,10.669375L19.450468,6.6683598L21.450975,6.6683583Z",
|
|
897
903
|
fillOpacity: "1",
|
|
898
|
-
style:
|
|
904
|
+
style: {
|
|
905
|
+
'mixBlendMode': 'passthrough'
|
|
906
|
+
}
|
|
899
907
|
})
|
|
900
908
|
}));
|
|
901
909
|
}
|
|
@@ -915,7 +923,9 @@ export function AssetIcon(props) {
|
|
|
915
923
|
children: /*#__PURE__*/_jsx("path", {
|
|
916
924
|
d: "M24.998001,1C25.550287,1,25.998003,1.44771549,25.998001,2L26.000002,11C26.000002,11.552285,25.552284,12.000002,25,12L1,12C0.44771549,12.000002,2.9343826e-7,11.552285,0,11L0,2C-0.000001173753,1.44849515,0.44649625,1.0011030345,0.99799997,1L24.998001,1ZM23.998001,3L1.998,3L2,10L24,10L24,3L23.998001,3ZM10.998,5.5L10.998,7.5000005L4.9980001,7.5000005L4.9980001,5.5L10.998,5.5ZM25,14.000001C25.552284,14.000001,26.000002,14.447716,26.000002,15.000001L26.000002,24C26.000002,24.552286,25.552284,25.000004,25,25L1,25C0.44771579,25.000004,2.9343826e-7,24.552286,0,24L0,15.000001C2.9343826e-7,14.447716,0.44771519,14.000001,1,14.000001L25,14.000001ZM24,16.000000999999997L2,16.000000999999997L2,23L24,23L24,16.000000999999997ZM11,18.5L11,20.5L4.9980001,20.5L4.9980001,18.5L10.998,18.5L11,18.5Z",
|
|
917
925
|
fillOpacity: "1",
|
|
918
|
-
style:
|
|
926
|
+
style: {
|
|
927
|
+
'mixBlendMode': 'passthrough'
|
|
928
|
+
}
|
|
919
929
|
})
|
|
920
930
|
}));
|
|
921
931
|
}
|