@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
|
@@ -12,12 +12,14 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { useSetState } from 'ahooks';
|
|
14
14
|
import { VmIframeModal } from "../_components";
|
|
15
|
+
import Appraisal from "../_components/vm-appraisal-info";
|
|
16
|
+
import VmCustom from "../_components/vm-custom";
|
|
15
17
|
import useGetConfig from "../_hooks/useGetConfig";
|
|
16
18
|
import VtxBaseModal from "../vtx-base-modal";
|
|
19
|
+
import { translateLocaleText } from "./../hooks/useTranslation.js";
|
|
17
20
|
import { BaseService } from "./api";
|
|
18
|
-
import { BaseInfo, Calendar,
|
|
21
|
+
import { BaseInfo, Calendar, LaneBaseInfo, LaneCalendar, LaneStatistical, Statistical } from "./components";
|
|
19
22
|
import "./style/index";
|
|
20
|
-
import { translateLocaleText } from "./../hooks/useTranslation.js";
|
|
21
23
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
24
|
var TABS_BASE = 'base';
|
|
23
25
|
var TABS_STATIC = 'statistical';
|
|
@@ -25,8 +27,8 @@ var TABS_CALENDAR = 'calendar';
|
|
|
25
27
|
var TABS_LANE_BASE = 'lane-base';
|
|
26
28
|
var TABS_LANE_STATIC = 'lane-statistical';
|
|
27
29
|
var TABS_LANE_CALENDAR = 'lane-calendar';
|
|
30
|
+
var TABS_APPRAISAL = 'appraisal';
|
|
28
31
|
var VtxRoadModal = function VtxRoadModal(props) {
|
|
29
|
-
var _contents;
|
|
30
32
|
var id = props.id,
|
|
31
33
|
title = props.title,
|
|
32
34
|
subTitle = props.subTitle,
|
|
@@ -50,8 +52,10 @@ var VtxRoadModal = function VtxRoadModal(props) {
|
|
|
50
52
|
title: translateLocaleText("t('vtxroadmodal.statisticalInformation')")
|
|
51
53
|
});
|
|
52
54
|
}
|
|
55
|
+
// 配置尚未返回或未配置页签时,沿用道路弹窗原有的默认页签。
|
|
53
56
|
var _useGetConfig = useGetConfig('tr', tabs),
|
|
54
57
|
tabsData = _useGetConfig.tabsData;
|
|
58
|
+
var tabsList = tabsData || [];
|
|
55
59
|
var _useSetState = useSetState({
|
|
56
60
|
src: '',
|
|
57
61
|
visible: false,
|
|
@@ -84,7 +88,19 @@ var VtxRoadModal = function VtxRoadModal(props) {
|
|
|
84
88
|
var laneCalendarContent = /*#__PURE__*/_jsx(LaneCalendar, {
|
|
85
89
|
id: id
|
|
86
90
|
});
|
|
87
|
-
var contents =
|
|
91
|
+
var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, baseContent), TABS_STATIC, statisticalContent), TABS_CALENDAR, calendarContent), TABS_LANE_BASE, laneBaseContent), TABS_LANE_STATIC, laneStatisticalContent), TABS_LANE_CALENDAR, laneCalendarContent), TABS_APPRAISAL, /*#__PURE__*/_jsx(Appraisal, {
|
|
92
|
+
id: id
|
|
93
|
+
}));
|
|
94
|
+
|
|
95
|
+
// 自定义页签可配置多个。
|
|
96
|
+
tabsList.forEach(function (tab) {
|
|
97
|
+
if (tab.url) {
|
|
98
|
+
contents[tab.key] = /*#__PURE__*/_jsx(VmCustom, {
|
|
99
|
+
id: id,
|
|
100
|
+
url: tab.url
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
});
|
|
88
104
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
89
105
|
children: [visible && /*#__PURE__*/_jsx(VtxBaseModal, {
|
|
90
106
|
title: title,
|
|
@@ -93,7 +109,7 @@ var VtxRoadModal = function VtxRoadModal(props) {
|
|
|
93
109
|
theme: theme,
|
|
94
110
|
visible: visible,
|
|
95
111
|
onCancel: onCancel,
|
|
96
|
-
tabs:
|
|
112
|
+
tabs: tabsList,
|
|
97
113
|
tabChose: tabChose,
|
|
98
114
|
startDate: startDate,
|
|
99
115
|
endDate: endDate,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export var buildIframeQuery = function buildIframeQuery() {
|
|
2
|
+
var routeQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
3
|
+
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4
|
+
var searchParams = new URLSearchParams(routeQuery || '');
|
|
5
|
+
Object.keys(params).forEach(function (key) {
|
|
6
|
+
var value = params[key];
|
|
7
|
+
if (value !== undefined && value !== null) {
|
|
8
|
+
searchParams.set(key, value);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return searchParams.toString().replace(/\+/g, '%20');
|
|
12
|
+
};
|
|
@@ -43,8 +43,8 @@ var BaseService = {
|
|
|
43
43
|
value: info === null || info === void 0 ? void 0 : info.divisionName
|
|
44
44
|
}, {
|
|
45
45
|
label: translateLocaleText("t('vtxshxqmodal.type2')"),
|
|
46
|
-
key: '
|
|
47
|
-
value: info === null || info === void 0 ? void 0 : info.
|
|
46
|
+
key: 'facilityClassName',
|
|
47
|
+
value: info === null || info === void 0 ? void 0 : info.facilityClassName
|
|
48
48
|
}, {
|
|
49
49
|
label: translateLocaleText("t('vtxshxqmodal.pointQuantityItems')"),
|
|
50
50
|
key: 'throwPointNum',
|
|
@@ -201,14 +201,14 @@ var ThrowService = {
|
|
|
201
201
|
loading: loading
|
|
202
202
|
};
|
|
203
203
|
},
|
|
204
|
-
usePage: function usePage(id, startTime, endTime, page, size, source) {
|
|
204
|
+
usePage: function usePage(id, startTime, endTime, page, size, source, sort) {
|
|
205
205
|
var _useRequest8 = useRequest(function () {
|
|
206
206
|
return request.get('/cloud/ljfljc/api/v101/trow/record/detail/page', {
|
|
207
|
-
data: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, source === 'tfd' ? 'throwPointId' : 'subjectId', id), "startTime", startTime), "endTime", endTime), "desensitization", true), "page", page), "size", size)
|
|
207
|
+
data: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, source === 'tfd' ? 'throwPointId' : 'subjectId', id), "startTime", startTime), "endTime", endTime), "desensitization", true), "page", page), "size", size), "sort", sort)
|
|
208
208
|
});
|
|
209
209
|
}, {
|
|
210
210
|
ready: !!id,
|
|
211
|
-
refreshDeps: [id, startTime, endTime, page, size]
|
|
211
|
+
refreshDeps: [id, startTime, endTime, page, size, source, sort]
|
|
212
212
|
}),
|
|
213
213
|
pageRes = _useRequest8.data,
|
|
214
214
|
loading = _useRequest8.loading;
|
|
@@ -11,8 +11,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { translateLocaleText } from "./../../../hooks/useTranslation.js";
|
|
14
|
-
/**
|
|
15
|
-
* 作业明细-列表
|
|
14
|
+
/**
|
|
15
|
+
* 作业明细-列表
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { useSetState } from 'ahooks';
|
|
@@ -31,19 +31,21 @@ var ListZymx = function ListZymx(props) {
|
|
|
31
31
|
current: 1,
|
|
32
32
|
pageSize: 10,
|
|
33
33
|
total: 0
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
sort: ''
|
|
35
36
|
}),
|
|
36
37
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
37
38
|
state = _useSetState2[0],
|
|
38
39
|
setState = _useSetState2[1];
|
|
39
|
-
var pagination = state.pagination
|
|
40
|
+
var pagination = state.pagination,
|
|
41
|
+
sort = state.sort;
|
|
40
42
|
var _ThrowService$useThro = ThrowService.useThrowConfig(),
|
|
41
43
|
configObj = _ThrowService$useThro.configObj;
|
|
42
44
|
var weightFlag = JSON.parse(((_configObj$THROW_WEIG = configObj['THROW_WEIGHT']) === null || _configObj$THROW_WEIG === void 0 ? void 0 : _configObj$THROW_WEIG.configValue) || '[]');
|
|
43
45
|
var qualityFlag = JSON.parse(((_configObj$THROW_QUAL = configObj['THROW_QUALITY']) === null || _configObj$THROW_QUAL === void 0 ? void 0 : _configObj$THROW_QUAL.configValue) || '[]');
|
|
44
46
|
var integralFlag = JSON.parse(((_configObj$INTEGRAL_I = configObj['INTEGRAL_INFO']) === null || _configObj$INTEGRAL_I === void 0 ? void 0 : _configObj$INTEGRAL_I.configValue) || '[]');
|
|
45
47
|
var subjectFlag = (_configObj$THROW_SUBJ = configObj['THROW_SUBJECT_DIMENSION']) === null || _configObj$THROW_SUBJ === void 0 ? void 0 : _configObj$THROW_SUBJ.configValue;
|
|
46
|
-
var _ThrowService$usePage = ThrowService.usePage(id, startTime, endTime, pagination.current - 1, pagination.pageSize, source),
|
|
48
|
+
var _ThrowService$usePage = ThrowService.usePage(id, startTime, endTime, pagination.current - 1, pagination.pageSize, source, sort),
|
|
47
49
|
data = _ThrowService$usePage.data,
|
|
48
50
|
loading = _ThrowService$usePage.loading;
|
|
49
51
|
var columns = [].concat(_toConsumableArray(subjectFlag === 'THROW_RESIDENT' ? [{
|
|
@@ -77,7 +79,8 @@ var ListZymx = function ListZymx(props) {
|
|
|
77
79
|
title: translateLocaleText("t('vtxshxqmodal.weightKg')"),
|
|
78
80
|
dataIndex: 'weight',
|
|
79
81
|
key: 'weight',
|
|
80
|
-
width: 120
|
|
82
|
+
width: 120,
|
|
83
|
+
align: 'right'
|
|
81
84
|
}, qualityFlag && {
|
|
82
85
|
title: translateLocaleText("t('vtxsdydtfdmodal.classificationQuality')"),
|
|
83
86
|
dataIndex: 'evaluation',
|
|
@@ -103,7 +106,8 @@ var ListZymx = function ListZymx(props) {
|
|
|
103
106
|
title: translateLocaleText("t('vtxshxqmodal.hours4')"),
|
|
104
107
|
dataIndex: 'time',
|
|
105
108
|
key: 'time',
|
|
106
|
-
width: 120
|
|
109
|
+
width: 120,
|
|
110
|
+
sorter: true
|
|
107
111
|
}]);
|
|
108
112
|
var pageChange = function pageChange(page) {
|
|
109
113
|
setState({
|
|
@@ -112,6 +116,14 @@ var ListZymx = function ListZymx(props) {
|
|
|
112
116
|
})
|
|
113
117
|
});
|
|
114
118
|
};
|
|
119
|
+
var handleTableChange = function handleTableChange(sorter) {
|
|
120
|
+
setState({
|
|
121
|
+
pagination: _objectSpread(_objectSpread({}, pagination), {}, {
|
|
122
|
+
current: 1
|
|
123
|
+
}),
|
|
124
|
+
sort: sorter !== null && sorter !== void 0 && sorter.order ? "".concat(sorter.field, ",").concat(sorter.order === 'ascend' ? 'asc' : 'desc') : ''
|
|
125
|
+
});
|
|
126
|
+
};
|
|
115
127
|
var tableProps = {
|
|
116
128
|
height: '100%',
|
|
117
129
|
isIndex: false,
|
|
@@ -121,7 +133,8 @@ var ListZymx = function ListZymx(props) {
|
|
|
121
133
|
total: (data === null || data === void 0 ? void 0 : data.total) || 0,
|
|
122
134
|
defaultPageSize: 20,
|
|
123
135
|
onChange: pageChange
|
|
124
|
-
})
|
|
136
|
+
}),
|
|
137
|
+
handleTableChange: handleTableChange
|
|
125
138
|
};
|
|
126
139
|
return /*#__PURE__*/_jsx("div", {
|
|
127
140
|
className: "shxq-thr-table",
|
|
@@ -3,19 +3,26 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
3
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
|
+
import Appraisal from "../_components/vm-appraisal-info";
|
|
6
7
|
import VmCustom from "../_components/vm-custom";
|
|
8
|
+
import VmRepairMaintain from "../_components/vm-repair-maintain";
|
|
9
|
+
import VmVideo, { insertVideoTab } from "../_components/vm-video";
|
|
10
|
+
import useGetChannels from "../_hooks/useGetChannels";
|
|
7
11
|
import useGetConfig from "../_hooks/useGetConfig";
|
|
8
12
|
import VtxBaseModal from "../vtx-base-modal";
|
|
13
|
+
import { translateLocaleText } from "./../hooks/useTranslation.js";
|
|
9
14
|
import { BaseService } from "./api";
|
|
10
15
|
import { AlarmRecord, BaseInfo, Tfd, ThrowCalendar, ThrowRecord } from "./components";
|
|
11
16
|
import "./style";
|
|
12
|
-
import { translateLocaleText } from "./../hooks/useTranslation.js";
|
|
13
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
18
|
var TABS_BASE = 'base';
|
|
15
19
|
var TABS_CALENDAR = 'calendar';
|
|
16
20
|
var TABS_THROW = 'throw';
|
|
17
21
|
var TABS_ALARM = 'alarm';
|
|
18
22
|
var TABS_TFD = 'tfd';
|
|
23
|
+
var TABS_APPRAISAL = 'appraisal';
|
|
24
|
+
var TABS_VIDEO = 'video';
|
|
25
|
+
var TABS_RM = 'rm';
|
|
19
26
|
var tabs = [{
|
|
20
27
|
key: TABS_BASE,
|
|
21
28
|
title: translateLocaleText("t('vtxdefaultmodal.overviewInformation')")
|
|
@@ -56,11 +63,15 @@ var VtxShxqModal = function VtxShxqModal(props) {
|
|
|
56
63
|
baseInfo = _BaseService$useBaseI.baseInfo;
|
|
57
64
|
var _useGetConfig = useGetConfig(info.typeCode, tabs),
|
|
58
65
|
tabsData = _useGetConfig.tabsData;
|
|
66
|
+
var _useGetChannels = useGetChannels("".concat(info === null || info === void 0 ? void 0 : info.typeCode, "_").concat(info === null || info === void 0 ? void 0 : info.code), !!(info !== null && info !== void 0 && info.typeCode) && (tabsData === null || tabsData === void 0 ? void 0 : tabsData.findIndex(function (ele) {
|
|
67
|
+
return ele.key === 'video';
|
|
68
|
+
})) > -1),
|
|
69
|
+
channels = _useGetChannels.channels;
|
|
59
70
|
var tabsList = useMemo(function () {
|
|
60
71
|
var tabsList = tabsData;
|
|
61
|
-
return tabsList;
|
|
62
|
-
}, [JSON.stringify(tabsData)]);
|
|
63
|
-
var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, /*#__PURE__*/_jsx(BaseInfo, {
|
|
72
|
+
return insertVideoTab(tabsList, channels);
|
|
73
|
+
}, [JSON.stringify(tabsData), JSON.stringify(channels)]);
|
|
74
|
+
var contents = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_BASE, /*#__PURE__*/_jsx(BaseInfo, {
|
|
64
75
|
id: id,
|
|
65
76
|
info: info,
|
|
66
77
|
baseInfo: baseInfo,
|
|
@@ -76,6 +87,12 @@ var VtxShxqModal = function VtxShxqModal(props) {
|
|
|
76
87
|
})), TABS_TFD, /*#__PURE__*/_jsx(Tfd, {
|
|
77
88
|
id: id,
|
|
78
89
|
service: "rykq"
|
|
90
|
+
})), TABS_APPRAISAL, /*#__PURE__*/_jsx(Appraisal, {
|
|
91
|
+
id: id
|
|
92
|
+
})), TABS_RM, /*#__PURE__*/_jsx(VmRepairMaintain, {
|
|
93
|
+
id: id
|
|
94
|
+
})), TABS_VIDEO, /*#__PURE__*/_jsx(VmVideo, {
|
|
95
|
+
channels: channels
|
|
79
96
|
}));
|
|
80
97
|
|
|
81
98
|
// 自定义页签可配置多个,
|
|
@@ -2,6 +2,7 @@ import { translateLocaleText } from "./../../../hooks/useTranslation.js";
|
|
|
2
2
|
import { VmEmpty, VmLineCharts, VmPieCharts } from "../../../_components";
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
var Charts = function Charts(_ref) {
|
|
5
|
+
var _chartData$filter;
|
|
5
6
|
var chartData = _ref.chartData,
|
|
6
7
|
lineData = _ref.lineData;
|
|
7
8
|
var legends = lineData.legends,
|
|
@@ -17,7 +18,9 @@ var Charts = function Charts(_ref) {
|
|
|
17
18
|
});
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
|
-
var total = chartData === null || chartData === void 0
|
|
21
|
+
var total = chartData === null || chartData === void 0 || (_chartData$filter = chartData.filter(function (item) {
|
|
22
|
+
return item.alarmTypeCode;
|
|
23
|
+
})) === null || _chartData$filter === void 0 ? void 0 : _chartData$filter.reduce(function (acc, cur) {
|
|
21
24
|
return acc + cur.value;
|
|
22
25
|
}, 0);
|
|
23
26
|
return /*#__PURE__*/_jsxs("div", {
|
package/lib/vtx-tfd-modal/api.js
CHANGED
|
@@ -42,9 +42,9 @@ var BaseService = {
|
|
|
42
42
|
}, {
|
|
43
43
|
label: translateLocaleText("t('vtxtfdmodal.hours')"),
|
|
44
44
|
key: 'householdNum',
|
|
45
|
-
value: info
|
|
45
|
+
value: info !== null && info !== void 0 && info.timePeriods && _typeof(info.timePeriods) === 'object' ? (_info$timePeriods = info.timePeriods) === null || _info$timePeriods === void 0 || (_info$timePeriods = _info$timePeriods.map(function (ele) {
|
|
46
46
|
return "".concat(ele.startTime, "~").concat(ele.endTime);
|
|
47
|
-
})) === null || _info$timePeriods === void 0 ? void 0 : _info$timePeriods.join('、')
|
|
47
|
+
})) === null || _info$timePeriods === void 0 ? void 0 : _info$timePeriods.join('、') : info === null || info === void 0 ? void 0 : info.timePeriods
|
|
48
48
|
}, {
|
|
49
49
|
label: translateLocaleText("t('vtxtfdmodal.supervisor')"),
|
|
50
50
|
key: 'supervisorName',
|
|
@@ -5,8 +5,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
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
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { translateLocaleText } from "./../../../hooks/useTranslation.js";
|
|
8
|
-
/**
|
|
9
|
-
* 监测指标趋势分析
|
|
8
|
+
/**
|
|
9
|
+
* 监测指标趋势分析
|
|
10
10
|
*/
|
|
11
11
|
import { useSetState } from 'ahooks';
|
|
12
12
|
import dayjs from 'dayjs';
|
|
@@ -12,15 +12,24 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { request } from '@vtx/utils';
|
|
14
14
|
import { useEffect, useState } from 'react';
|
|
15
|
+
import Appraisal from "../_components/vm-appraisal-info";
|
|
15
16
|
import VmCustom from "../_components/vm-custom";
|
|
17
|
+
import VmRepairMaintain from "../_components/vm-repair-maintain";
|
|
18
|
+
import VmVideo, { insertVideoTab } from "../_components/vm-video";
|
|
19
|
+
import useGetChannels from "../_hooks/useGetChannels";
|
|
20
|
+
import useGetConfig from "../_hooks/useGetConfig";
|
|
21
|
+
import { CommonService } from "../_service";
|
|
16
22
|
import VtxBaseModal from "../vtx-base-modal";
|
|
17
23
|
import VtxDefaultModal from "../vtx-default-modal";
|
|
24
|
+
import { translateLocaleText } from "./../hooks/useTranslation.js";
|
|
18
25
|
import { Appraise, Base, Build, File, Score } from "./components";
|
|
19
26
|
import "./style";
|
|
20
|
-
import {
|
|
27
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
|
+
var TABS_APPRAISAL = 'appraisal';
|
|
29
|
+
var TABS_VIDEO = 'video';
|
|
30
|
+
var TABS_RM = 'rm';
|
|
21
31
|
|
|
22
32
|
//弹窗配置
|
|
23
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
33
|
var getByCode = function getByCode(params) {
|
|
25
34
|
return request.get('/cloud/jcss-reborn/facility/type/config/getByCode', {
|
|
26
35
|
data: params
|
|
@@ -32,6 +41,10 @@ var smallPop = function smallPop(params) {
|
|
|
32
41
|
data: params
|
|
33
42
|
});
|
|
34
43
|
};
|
|
44
|
+
var tabs = [{
|
|
45
|
+
key: 'base',
|
|
46
|
+
title: translateLocaleText("t('vtxdefaultmodal.basicInformation')")
|
|
47
|
+
}];
|
|
35
48
|
export default (function (props) {
|
|
36
49
|
var _config$;
|
|
37
50
|
var visible = props.visible,
|
|
@@ -49,19 +62,28 @@ export default (function (props) {
|
|
|
49
62
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
50
63
|
config = _useState4[0],
|
|
51
64
|
setConfig = _useState4[1];
|
|
65
|
+
var _CommonService$useBas = CommonService.useBaseInfo(id),
|
|
66
|
+
info = _CommonService$useBas.info;
|
|
67
|
+
var _useGetConfig = useGetConfig(info === null || info === void 0 ? void 0 : info.typeCode, tabs),
|
|
68
|
+
tabsData = _useGetConfig.tabsData;
|
|
69
|
+
var _useGetChannels = useGetChannels("".concat((info === null || info === void 0 ? void 0 : info.typeCode) || 'wr', "_").concat(info === null || info === void 0 ? void 0 : info.code), !!(info !== null && info !== void 0 && info.code) && (tabsData === null || tabsData === void 0 ? void 0 : tabsData.findIndex(function (ele) {
|
|
70
|
+
return ele.key === 'video';
|
|
71
|
+
})) > -1),
|
|
72
|
+
channels = _useGetChannels.channels;
|
|
52
73
|
useEffect(function () {
|
|
53
74
|
getByCode({
|
|
54
75
|
code: 'wr'
|
|
55
76
|
}).then(function (res) {
|
|
56
77
|
if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
|
|
57
|
-
|
|
78
|
+
var tabsConfig = (res.data.popupConfigJson || []).filter(function (item) {
|
|
58
79
|
return item.display;
|
|
59
80
|
}).map(function (item) {
|
|
60
81
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
61
82
|
key: item.code,
|
|
62
83
|
title: item.name
|
|
63
84
|
});
|
|
64
|
-
})
|
|
85
|
+
});
|
|
86
|
+
setConfig(tabsConfig);
|
|
65
87
|
}
|
|
66
88
|
});
|
|
67
89
|
}, []);
|
|
@@ -74,7 +96,13 @@ export default (function (props) {
|
|
|
74
96
|
}
|
|
75
97
|
});
|
|
76
98
|
}, [id]);
|
|
77
|
-
var contentList = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},
|
|
99
|
+
var contentList = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TABS_APPRAISAL, /*#__PURE__*/_jsx(Appraisal, {
|
|
100
|
+
id: id
|
|
101
|
+
})), TABS_VIDEO, /*#__PURE__*/_jsx(VmVideo, {
|
|
102
|
+
channels: channels
|
|
103
|
+
})), TABS_RM, /*#__PURE__*/_jsx(VmRepairMaintain, {
|
|
104
|
+
id: id
|
|
105
|
+
})), 'base', /*#__PURE__*/_jsx(Base, _objectSpread(_objectSpread({}, props), {}, {
|
|
78
106
|
detail: detail
|
|
79
107
|
}))), 'appraise', /*#__PURE__*/_jsx(Appraise, _objectSpread({}, props))), 'score', /*#__PURE__*/_jsx(Score, _objectSpread({}, props))), 'build', /*#__PURE__*/_jsx(Build, _objectSpread({}, props))), 'file', /*#__PURE__*/_jsx(File, _objectSpread({}, props)));
|
|
80
108
|
|
|
@@ -97,7 +125,7 @@ export default (function (props) {
|
|
|
97
125
|
title: title,
|
|
98
126
|
id: id,
|
|
99
127
|
onCancel: onCancel,
|
|
100
|
-
tabs: config,
|
|
128
|
+
tabs: insertVideoTab(config, channels),
|
|
101
129
|
contents: contentList,
|
|
102
130
|
tabChose: (_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.key,
|
|
103
131
|
modalShow: modalShow,
|
|
@@ -11,6 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { VtxUpload } from "@vtx/components";
|
|
14
|
+
import { translateLocaleText } from "../../../hooks/useTranslation.js";
|
|
14
15
|
import htmr from "htmr";
|
|
15
16
|
import React, { useState } from "react";
|
|
16
17
|
import { useSetState } from 'ahooks';
|
|
@@ -100,7 +101,9 @@ export default function viewRichText(_ref) {
|
|
|
100
101
|
style[key] = config[key];
|
|
101
102
|
} else {
|
|
102
103
|
if (key == 'label') {
|
|
103
|
-
obj.placeholder = "
|
|
104
|
+
obj.placeholder = translateLocaleText("t('common.placeholder.inputWithLabel')", {
|
|
105
|
+
label: config[key] || ''
|
|
106
|
+
});
|
|
104
107
|
}
|
|
105
108
|
obj[key] = config[key];
|
|
106
109
|
}
|
|
@@ -14,6 +14,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
14
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
15
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
16
16
|
import { View, LabeledFieldView, createLabeledInputText, ButtonView, submitHandler, icons, LabelView } from "../../ckeditor/ckeditor";
|
|
17
|
+
import { translateLocaleText } from "../../../../../hooks/useTranslation.js";
|
|
17
18
|
var FormView = /*#__PURE__*/function (_View) {
|
|
18
19
|
_inherits(FormView, _View);
|
|
19
20
|
var _super = _createSuper(FormView);
|
|
@@ -21,10 +22,10 @@ var FormView = /*#__PURE__*/function (_View) {
|
|
|
21
22
|
var _this;
|
|
22
23
|
_classCallCheck(this, FormView);
|
|
23
24
|
_this = _super.call(this, locale);
|
|
24
|
-
_this.attrLabel = _this._createLabel("
|
|
25
|
-
_this.labelInputView = _this._createInput('
|
|
26
|
-
_this.nameInputView = _this._createInput('
|
|
27
|
-
_this.orderInputView = _this._createInput('
|
|
25
|
+
_this.attrLabel = _this._createLabel(translateLocaleText("t('vtxzfmodal.ck.attribute')"));
|
|
26
|
+
_this.labelInputView = _this._createInput(translateLocaleText("t('vtxzfmodal.ck.fieldName')"));
|
|
27
|
+
_this.nameInputView = _this._createInput(translateLocaleText("t('vtxzfmodal.ck.field')"));
|
|
28
|
+
_this.orderInputView = _this._createInput(translateLocaleText("t('vtxzfmodal.ck.orderNo')"));
|
|
28
29
|
|
|
29
30
|
// Create the save and cancel buttons.
|
|
30
31
|
_this.saveButtonView = _this._createButton('Save', icons.check, 'ck-button-save');
|
|
@@ -22,6 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
22
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
23
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
24
|
import { Plugin, Widget, ButtonView, ContextualBalloon, Command, clickOutsideHandler, viewToModelPositionOutsideModelElement, toWidget } from "../../ckeditor/ckeditor";
|
|
25
|
+
import { translateLocaleText } from "../../../../../hooks/useTranslation.js";
|
|
25
26
|
import OpenPanelCommand from "../OpenPanelCommand";
|
|
26
27
|
import FormView from "./FormView";
|
|
27
28
|
import "./index.less";
|
|
@@ -51,7 +52,7 @@ var InputEditing = /*#__PURE__*/function (_Plugin2) {
|
|
|
51
52
|
_createClass(InputEditing, [{
|
|
52
53
|
key: "init",
|
|
53
54
|
value: function init() {
|
|
54
|
-
console.log('
|
|
55
|
+
console.log('editable text editing initialized');
|
|
55
56
|
this._defineSchema();
|
|
56
57
|
this._defineConverters();
|
|
57
58
|
this.editor.commands.add('insertEditableDiv', new InsertEditableDivCommand(this.editor));
|
|
@@ -127,7 +128,9 @@ var InputEditing = /*#__PURE__*/function (_Plugin2) {
|
|
|
127
128
|
style += "width: ".concat(config[key], "px;");
|
|
128
129
|
} else {
|
|
129
130
|
if (key == 'label') {
|
|
130
|
-
obj.placeholder = "
|
|
131
|
+
obj.placeholder = translateLocaleText("t('common.placeholder.inputWithLabel')", {
|
|
132
|
+
label: config[key] || ''
|
|
133
|
+
});
|
|
131
134
|
}
|
|
132
135
|
obj[key] = config[key];
|
|
133
136
|
}
|
|
@@ -174,7 +177,9 @@ function renderView(modelElement, props) {
|
|
|
174
177
|
style += "width: ".concat(value, ";");
|
|
175
178
|
} else {
|
|
176
179
|
if (key == 'label') {
|
|
177
|
-
obj.placeholder = "
|
|
180
|
+
obj.placeholder = translateLocaleText("t('common.placeholder.inputWithLabel')", {
|
|
181
|
+
label: value || ''
|
|
182
|
+
});
|
|
178
183
|
}
|
|
179
184
|
obj[key] = value;
|
|
180
185
|
}
|
|
@@ -204,7 +209,7 @@ var InputUI = /*#__PURE__*/function (_Plugin3) {
|
|
|
204
209
|
key: "init",
|
|
205
210
|
value: function init() {
|
|
206
211
|
var _this = this;
|
|
207
|
-
console.log('
|
|
212
|
+
console.log('editable text UI initialized');
|
|
208
213
|
var editor = this.editor;
|
|
209
214
|
var t = editor.t;
|
|
210
215
|
this._balloon = this.editor.plugins.get(ContextualBalloon);
|
|
@@ -213,7 +218,7 @@ var InputUI = /*#__PURE__*/function (_Plugin3) {
|
|
|
213
218
|
editor.ui.componentFactory.add('editableDiv', function (locale) {
|
|
214
219
|
var buttonView = new ButtonView(locale);
|
|
215
220
|
buttonView.set({
|
|
216
|
-
label: t('
|
|
221
|
+
label: translateLocaleText("t('vtxzfmodal.ck.editableText')"),
|
|
217
222
|
withText: true,
|
|
218
223
|
tooltip: false
|
|
219
224
|
});
|
|
@@ -14,6 +14,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
14
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
15
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
16
16
|
import { View, LabeledFieldView, createLabeledInputText, ButtonView, submitHandler, icons, LabelView } from "../../ckeditor/ckeditor";
|
|
17
|
+
import { translateLocaleText } from "../../../../../hooks/useTranslation.js";
|
|
17
18
|
var FormView = /*#__PURE__*/function (_View) {
|
|
18
19
|
_inherits(FormView, _View);
|
|
19
20
|
var _super = _createSuper(FormView);
|
|
@@ -21,12 +22,12 @@ var FormView = /*#__PURE__*/function (_View) {
|
|
|
21
22
|
var _this;
|
|
22
23
|
_classCallCheck(this, FormView);
|
|
23
24
|
_this = _super.call(this, locale);
|
|
24
|
-
_this.attrLabel = _this._createLabel("
|
|
25
|
-
_this.styleLabel = _this._createLabel("
|
|
26
|
-
_this.labelInputView = _this._createInput('
|
|
27
|
-
_this.nameInputView = _this._createInput('
|
|
28
|
-
_this.orderInputView = _this._createInput('
|
|
29
|
-
_this.widthInputView = _this._createInput('
|
|
25
|
+
_this.attrLabel = _this._createLabel(translateLocaleText("t('vtxzfmodal.ck.attribute')"));
|
|
26
|
+
_this.styleLabel = _this._createLabel(translateLocaleText("t('vtxzfmodal.ck.style')"));
|
|
27
|
+
_this.labelInputView = _this._createInput(translateLocaleText("t('vtxzfmodal.ck.fieldName')"));
|
|
28
|
+
_this.nameInputView = _this._createInput(translateLocaleText("t('vtxzfmodal.ck.field')"));
|
|
29
|
+
_this.orderInputView = _this._createInput(translateLocaleText("t('vtxzfmodal.ck.orderNo')"));
|
|
30
|
+
_this.widthInputView = _this._createInput(translateLocaleText("t('vtxzfmodal.ck.width')"));
|
|
30
31
|
|
|
31
32
|
// Create the save and cancel buttons.
|
|
32
33
|
_this.saveButtonView = _this._createButton('Save', icons.check, 'ck-button-save');
|
|
@@ -22,6 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
22
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
23
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
24
|
import { Plugin, Widget, ButtonView, ContextualBalloon, Command, clickOutsideHandler, toWidget } from "../../ckeditor/ckeditor";
|
|
25
|
+
import { translateLocaleText } from "../../../../../hooks/useTranslation.js";
|
|
25
26
|
import OpenPanelCommand from "../OpenPanelCommand";
|
|
26
27
|
import FormView from "./FormView";
|
|
27
28
|
import "./index.less";
|
|
@@ -51,7 +52,7 @@ var DateEditing = /*#__PURE__*/function (_Plugin2) {
|
|
|
51
52
|
_createClass(DateEditing, [{
|
|
52
53
|
key: "init",
|
|
53
54
|
value: function init() {
|
|
54
|
-
console.log('
|
|
55
|
+
console.log('custom date input editing initialized');
|
|
55
56
|
this._defineSchema();
|
|
56
57
|
this._defineConverters();
|
|
57
58
|
this.editor.commands.add('insertCustomDate', new InsertCustomDateCommand(this.editor));
|
|
@@ -118,7 +119,9 @@ var DateEditing = /*#__PURE__*/function (_Plugin2) {
|
|
|
118
119
|
style += "width: ".concat(config[key], "px;");
|
|
119
120
|
} else {
|
|
120
121
|
if (key == 'label') {
|
|
121
|
-
obj.placeholder = "
|
|
122
|
+
obj.placeholder = translateLocaleText("t('common.placeholder.inputWithLabel')", {
|
|
123
|
+
label: config[key] || ''
|
|
124
|
+
});
|
|
122
125
|
}
|
|
123
126
|
obj[key] = config[key];
|
|
124
127
|
}
|
|
@@ -162,7 +165,9 @@ function renderView(modelElement, props) {
|
|
|
162
165
|
style += "width: ".concat(value, ";");
|
|
163
166
|
} else {
|
|
164
167
|
if (key == 'label') {
|
|
165
|
-
obj.placeholder = "
|
|
168
|
+
obj.placeholder = translateLocaleText("t('common.placeholder.inputWithLabel')", {
|
|
169
|
+
label: value || ''
|
|
170
|
+
});
|
|
166
171
|
}
|
|
167
172
|
obj[key] = value;
|
|
168
173
|
}
|
|
@@ -195,7 +200,7 @@ var DateUI = /*#__PURE__*/function (_Plugin3) {
|
|
|
195
200
|
key: "init",
|
|
196
201
|
value: function init() {
|
|
197
202
|
var _this = this;
|
|
198
|
-
console.log('
|
|
203
|
+
console.log('custom date input UI initialized');
|
|
199
204
|
var editor = this.editor;
|
|
200
205
|
var t = editor.t;
|
|
201
206
|
this._balloon = this.editor.plugins.get(ContextualBalloon);
|
|
@@ -204,7 +209,7 @@ var DateUI = /*#__PURE__*/function (_Plugin3) {
|
|
|
204
209
|
editor.ui.componentFactory.add('customDate', function (locale) {
|
|
205
210
|
var buttonView = new ButtonView(locale);
|
|
206
211
|
buttonView.set({
|
|
207
|
-
label: t('
|
|
212
|
+
label: translateLocaleText("t('vtxzfmodal.ck.date')"),
|
|
208
213
|
withText: true,
|
|
209
214
|
tooltip: false
|
|
210
215
|
});
|
|
@@ -22,6 +22,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
22
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
23
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
24
|
import { Plugin, Widget, ButtonView, ContextualBalloon, Command, clickOutsideHandler, toWidget } from "../../ckeditor/ckeditor";
|
|
25
|
+
import { translateLocaleText } from "../../../../../hooks/useTranslation.js";
|
|
25
26
|
import OpenPanelCommand from "../OpenPanelCommand";
|
|
26
27
|
import FormView from "./FormView";
|
|
27
28
|
import "./index.less";
|
|
@@ -51,7 +52,7 @@ var InputEditing = /*#__PURE__*/function (_Plugin2) {
|
|
|
51
52
|
_createClass(InputEditing, [{
|
|
52
53
|
key: "init",
|
|
53
54
|
value: function init() {
|
|
54
|
-
console.log('
|
|
55
|
+
console.log('custom input editing initialized');
|
|
55
56
|
this._defineSchema();
|
|
56
57
|
this._defineConverters();
|
|
57
58
|
this.editor.commands.add('insertCustomInput', new InsertCustomInputCommand(this.editor));
|
|
@@ -118,7 +119,9 @@ var InputEditing = /*#__PURE__*/function (_Plugin2) {
|
|
|
118
119
|
style += "width: ".concat(config[key], "px;");
|
|
119
120
|
} else {
|
|
120
121
|
if (key == 'label') {
|
|
121
|
-
obj.placeholder = "
|
|
122
|
+
obj.placeholder = translateLocaleText("t('common.placeholder.inputWithLabel')", {
|
|
123
|
+
label: config[key] || ''
|
|
124
|
+
});
|
|
122
125
|
}
|
|
123
126
|
obj[key] = config[key];
|
|
124
127
|
}
|
|
@@ -160,7 +163,9 @@ function renderView(modelElement, props) {
|
|
|
160
163
|
style += "width: ".concat(value, ";");
|
|
161
164
|
} else {
|
|
162
165
|
if (key == 'label') {
|
|
163
|
-
obj.placeholder = "
|
|
166
|
+
obj.placeholder = translateLocaleText("t('common.placeholder.inputWithLabel')", {
|
|
167
|
+
label: value || ''
|
|
168
|
+
});
|
|
164
169
|
}
|
|
165
170
|
obj[key] = value;
|
|
166
171
|
}
|
|
@@ -191,7 +196,7 @@ var InputUI = /*#__PURE__*/function (_Plugin3) {
|
|
|
191
196
|
key: "init",
|
|
192
197
|
value: function init() {
|
|
193
198
|
var _this = this;
|
|
194
|
-
console.log('
|
|
199
|
+
console.log('custom input UI initialized');
|
|
195
200
|
var editor = this.editor;
|
|
196
201
|
var t = editor.t;
|
|
197
202
|
this._balloon = this.editor.plugins.get(ContextualBalloon);
|
|
@@ -200,7 +205,7 @@ var InputUI = /*#__PURE__*/function (_Plugin3) {
|
|
|
200
205
|
editor.ui.componentFactory.add('customInput', function (locale) {
|
|
201
206
|
var buttonView = new ButtonView(locale);
|
|
202
207
|
buttonView.set({
|
|
203
|
-
label: t('
|
|
208
|
+
label: translateLocaleText("t('vtxzfmodal.ck.textInput')"),
|
|
204
209
|
withText: true,
|
|
205
210
|
tooltip: false
|
|
206
211
|
});
|