@vtx/modals2 6.0.0-beta.2 → 6.0.0-beta.21
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-card-statistics/index.less +27 -27
- package/lib/_components/vm-factor/index.js +2 -1
- package/lib/_components/vm-factor-list/index.less +11 -11
- 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 +6 -2
- 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/Header/index.less +1 -0
- package/lib/vtx-base-modal/Tabs/index.js +2 -1
- package/lib/vtx-base-modal/index.js +2 -1
- package/lib/vtx-base-modal/style/index.less +4 -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/components/Info/index.less +6 -6
- 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/OilConsumption/index.less +6 -6
- 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/WaterConsumption/index.less +6 -6
- 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-cc-unit-modal/components/BaseInfo/index.less +6 -6
- 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-device-modal/components/DataAnalysis/index.less +66 -66
- 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/Basic/index.less +16 -16
- 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/components/Base/Jbxx.js +3 -46
- package/lib/vtx-wr-modal/components/Base/Ptss.js +41 -7
- package/lib/vtx-wr-modal/components/Base/index.js +44 -13
- package/lib/vtx-wr-modal/components/Base/index.less +87 -4
- 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 +92 -92
|
@@ -1,16 +1,16 @@
|
|
|
1
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
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
4
|
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); }
|
|
10
5
|
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; }
|
|
11
6
|
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
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
|
+
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); }
|
|
13
|
+
import { getVtxToken, request } from '@vtx/utils';
|
|
14
14
|
import { useSetState } from 'ahooks';
|
|
15
15
|
import { Alert, Tabs } from 'antd';
|
|
16
16
|
import dayjs from 'dayjs';
|
|
@@ -27,6 +27,12 @@ var getDetail = function getDetail(params) {
|
|
|
27
27
|
data: params
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
|
+
//基础设施详情
|
|
31
|
+
var getJcssDetail = function getJcssDetail(params) {
|
|
32
|
+
return request.get('/cloud/jcss-reborn/facility/get', {
|
|
33
|
+
data: params
|
|
34
|
+
});
|
|
35
|
+
};
|
|
30
36
|
//公厕配置字段
|
|
31
37
|
var getFields = function getFields(params) {
|
|
32
38
|
return request.get('/cloud/jcss-reborn/facility/type/view/detail', {
|
|
@@ -50,6 +56,19 @@ var getAlarmList = function getAlarmList(params) {
|
|
|
50
56
|
data: JSON.stringify(params)
|
|
51
57
|
});
|
|
52
58
|
};
|
|
59
|
+
var getImgList = function getImgList(photoIds, typePhotoIds) {
|
|
60
|
+
var photoList = photoIds || typePhotoIds;
|
|
61
|
+
if (!photoList) {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
return (typeof photoList === 'string' ? JSON.parse(photoList) : photoList).map(function (item, index) {
|
|
65
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
66
|
+
index: index + 1,
|
|
67
|
+
name: item.name.split('.')[0],
|
|
68
|
+
url: "/vortex/rest/cloud/np/file/downloadFileThumbnail/".concat(item.id, "?token=").concat(getVtxToken('token'), "&outputQuality=0.5&scale=0.5")
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
};
|
|
53
72
|
export default (function (props) {
|
|
54
73
|
var _monitorTypeList$filt;
|
|
55
74
|
var theme = props.theme,
|
|
@@ -96,11 +115,22 @@ export default (function (props) {
|
|
|
96
115
|
alarmList = state.alarmList;
|
|
97
116
|
useEffect(function () {
|
|
98
117
|
if (id) {
|
|
99
|
-
getDetail({
|
|
118
|
+
Promise.all([getDetail({
|
|
100
119
|
id: id
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
|
|
120
|
+
}), getJcssDetail({
|
|
121
|
+
id: id,
|
|
122
|
+
coordType: 'bd09'
|
|
123
|
+
})]).then(function (_ref) {
|
|
124
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
125
|
+
detailRes = _ref2[0],
|
|
126
|
+
jcssRes = _ref2[1];
|
|
127
|
+
if ((detailRes === null || detailRes === void 0 ? void 0 : detailRes.result) === 0) {
|
|
128
|
+
var detailData = detailRes.data || {};
|
|
129
|
+
var jcssDetail = (jcssRes === null || jcssRes === void 0 ? void 0 : jcssRes.result) === 0 ? jcssRes.data || {} : {};
|
|
130
|
+
setGcDetail(_objectSpread(_objectSpread({}, detailData), {}, {
|
|
131
|
+
jcssDetail: jcssDetail,
|
|
132
|
+
imgList: getImgList(detailData.photoIds, jcssDetail.typePhotoIds)
|
|
133
|
+
}));
|
|
104
134
|
}
|
|
105
135
|
});
|
|
106
136
|
getFields({
|
|
@@ -156,7 +186,7 @@ export default (function (props) {
|
|
|
156
186
|
}];
|
|
157
187
|
var tableProps = {
|
|
158
188
|
columns: columns,
|
|
159
|
-
height:
|
|
189
|
+
height: 220,
|
|
160
190
|
isIndex: false,
|
|
161
191
|
pagination: false,
|
|
162
192
|
dataSource: alarmList
|
|
@@ -165,7 +195,7 @@ export default (function (props) {
|
|
|
165
195
|
label: translateLocaleText("t('vtxwrmodal.monitoringData')"),
|
|
166
196
|
key: 'data',
|
|
167
197
|
children: /*#__PURE__*/_jsx(VmLineCharts, {
|
|
168
|
-
height:
|
|
198
|
+
height: 260,
|
|
169
199
|
xAxis: echartsData.names || [],
|
|
170
200
|
dataList: (echartsData.values || []).map(function (item, index) {
|
|
171
201
|
return {
|
|
@@ -326,7 +356,8 @@ export default (function (props) {
|
|
|
326
356
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
327
357
|
className: "wr-base-sjjg",
|
|
328
358
|
style: {
|
|
329
|
-
height: gcDetail.hasDevice ? '270px' : '
|
|
359
|
+
height: gcDetail.hasDevice ? '270px' : 'auto',
|
|
360
|
+
flex: gcDetail.hasDevice ? '0 0 270px' : '1 1 auto'
|
|
330
361
|
},
|
|
331
362
|
children: [/*#__PURE__*/_jsx("div", {
|
|
332
363
|
className: "wr-base-title",
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
height: 100%;
|
|
4
4
|
display: flex;
|
|
5
5
|
justify-content: space-between;
|
|
6
|
+
gap: 16px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
min-width: 0;
|
|
6
9
|
position: relative;
|
|
7
10
|
.wr-base-alart {
|
|
8
11
|
width: 100%;
|
|
@@ -23,6 +26,8 @@
|
|
|
23
26
|
}
|
|
24
27
|
.wr-base-left {
|
|
25
28
|
width: 448px;
|
|
29
|
+
flex: 0 1 448px;
|
|
30
|
+
min-width: 0;
|
|
26
31
|
height: 100%;
|
|
27
32
|
border-radius: 8px;
|
|
28
33
|
box-sizing: border-box;
|
|
@@ -32,6 +37,10 @@
|
|
|
32
37
|
height: calc(100% - 50px);
|
|
33
38
|
overflow: hidden;
|
|
34
39
|
overflow-y: auto;
|
|
40
|
+
scrollbar-width: none;
|
|
41
|
+
&::-webkit-scrollbar {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
35
44
|
.wr-base-img {
|
|
36
45
|
width: 100%;
|
|
37
46
|
height: 207px;
|
|
@@ -75,24 +84,51 @@
|
|
|
75
84
|
}
|
|
76
85
|
.wr-base-right {
|
|
77
86
|
width: 704px;
|
|
87
|
+
flex: 1 1 704px;
|
|
88
|
+
min-width: 0;
|
|
89
|
+
min-height: 0;
|
|
90
|
+
box-sizing: border-box;
|
|
78
91
|
height: 100%;
|
|
79
92
|
overflow: hidden;
|
|
80
93
|
overflow-y: auto;
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
scrollbar-width: none;
|
|
97
|
+
&::-webkit-scrollbar {
|
|
98
|
+
display: none;
|
|
99
|
+
}
|
|
81
100
|
.wr-base-sjjg {
|
|
82
101
|
width: 100%;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
min-width: 0;
|
|
104
|
+
min-height: 0;
|
|
83
105
|
height: 270px;
|
|
84
106
|
padding-bottom: 16px;
|
|
85
107
|
border-radius: 8px;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
overflow-y: auto;
|
|
110
|
+
scrollbar-width: none;
|
|
111
|
+
&::-webkit-scrollbar {
|
|
112
|
+
display: none;
|
|
113
|
+
}
|
|
86
114
|
}
|
|
87
115
|
.wr-base-jcbj {
|
|
88
116
|
width: 100%;
|
|
89
|
-
|
|
90
|
-
|
|
117
|
+
box-sizing: border-box;
|
|
118
|
+
min-width: 0;
|
|
119
|
+
min-height: 0;
|
|
120
|
+
height: auto;
|
|
121
|
+
flex: 1 1 auto;
|
|
122
|
+
padding-bottom: 8px;
|
|
91
123
|
overflow: hidden;
|
|
92
124
|
overflow-y: auto;
|
|
93
125
|
border-radius: 8px;
|
|
94
126
|
margin-top: 15px;
|
|
95
127
|
position: relative;
|
|
128
|
+
scrollbar-width: none;
|
|
129
|
+
&::-webkit-scrollbar {
|
|
130
|
+
display: none;
|
|
131
|
+
}
|
|
96
132
|
.ant-tabs-nav {
|
|
97
133
|
margin-bottom: 0;
|
|
98
134
|
padding-left: 16px;
|
|
@@ -211,6 +247,49 @@
|
|
|
211
247
|
}
|
|
212
248
|
}
|
|
213
249
|
}
|
|
250
|
+
.wr-base-universal {
|
|
251
|
+
padding: 16px 16px 0;
|
|
252
|
+
box-sizing: border-box;
|
|
253
|
+
height: auto;
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: flex-start;
|
|
256
|
+
.wr-base-universal-card {
|
|
257
|
+
width: 100%;
|
|
258
|
+
min-height: 76px;
|
|
259
|
+
border-radius: 8px;
|
|
260
|
+
padding: 14px 20px;
|
|
261
|
+
box-sizing: border-box;
|
|
262
|
+
display: flex;
|
|
263
|
+
align-items: center;
|
|
264
|
+
justify-content: space-between;
|
|
265
|
+
.wr-universal-title {
|
|
266
|
+
display: flex;
|
|
267
|
+
gap: 10px;
|
|
268
|
+
align-items: center;
|
|
269
|
+
img {
|
|
270
|
+
width: 44px;
|
|
271
|
+
height: 44px;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
.wr-universal-total {
|
|
275
|
+
display: flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
gap: 8px;
|
|
278
|
+
.wr-universal-tip {
|
|
279
|
+
width: 6px;
|
|
280
|
+
height: 6px;
|
|
281
|
+
border-radius: 3px;
|
|
282
|
+
background: #ffc30f;
|
|
283
|
+
box-shadow: 0 0 5px rgba(255, 195, 15, 0.8);
|
|
284
|
+
}
|
|
285
|
+
.wr-universal-used {
|
|
286
|
+
color: #1ce548;
|
|
287
|
+
font-size: 24px;
|
|
288
|
+
font-weight: bold;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
214
293
|
.wr-base-kws {
|
|
215
294
|
flex: 1;
|
|
216
295
|
border-radius: 8px;
|
|
@@ -323,8 +402,12 @@
|
|
|
323
402
|
height: calc(100% - 44px);
|
|
324
403
|
overflow: hidden;
|
|
325
404
|
overflow-y: auto;
|
|
405
|
+
scrollbar-width: none;
|
|
406
|
+
&::-webkit-scrollbar {
|
|
407
|
+
display: none;
|
|
408
|
+
}
|
|
326
409
|
.each-value {
|
|
327
|
-
width:
|
|
410
|
+
width: calc((100% - 12px) / 3);
|
|
328
411
|
display: flex;
|
|
329
412
|
flex-direction: column;
|
|
330
413
|
align-items: center;
|
|
@@ -332,7 +415,7 @@
|
|
|
332
415
|
font-weight: bold;
|
|
333
416
|
}
|
|
334
417
|
.each-factor-value {
|
|
335
|
-
width:
|
|
418
|
+
width: 100%;
|
|
336
419
|
text-align: center;
|
|
337
420
|
overflow: hidden;
|
|
338
421
|
text-overflow: ellipsis;
|
|
@@ -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
|
});
|
|
@@ -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,11 +22,11 @@ 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('
|
|
28
|
-
_this.urlInputView = _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')"));
|
|
29
|
+
_this.urlInputView = _this._createInput(translateLocaleText("t('vtxzfmodal.ck.dataSource')"));
|
|
29
30
|
|
|
30
31
|
// Create the save and cancel buttons.
|
|
31
32
|
_this.saveButtonView = _this._createButton('Save', icons.check, 'ck-button-save');
|