coolcare-lite-scada-component 2.0.13 → 2.0.14
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.
|
@@ -88,7 +88,7 @@ var ImageUploader = function ImageUploader(_ref) {
|
|
|
88
88
|
};
|
|
89
89
|
var customUploadRequest = /*#__PURE__*/function () {
|
|
90
90
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(options) {
|
|
91
|
-
var onSuccess, onError, file, size, _yield$uploadFile,
|
|
91
|
+
var onSuccess, onError, file, size, _yield$uploadFile, code, data;
|
|
92
92
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
93
93
|
while (1) switch (_context.prev = _context.next) {
|
|
94
94
|
case 0:
|
|
@@ -107,19 +107,19 @@ var ImageUploader = function ImageUploader(_ref) {
|
|
|
107
107
|
});
|
|
108
108
|
case 7:
|
|
109
109
|
_yield$uploadFile = _context.sent;
|
|
110
|
-
|
|
110
|
+
code = _yield$uploadFile.code;
|
|
111
111
|
data = _yield$uploadFile.data;
|
|
112
|
-
if (
|
|
112
|
+
if (code == 200 && data) {
|
|
113
113
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
114
|
-
url: data
|
|
114
|
+
url: data,
|
|
115
115
|
size: size,
|
|
116
116
|
name: file.name
|
|
117
117
|
});
|
|
118
118
|
// @ts-ignore
|
|
119
119
|
onSuccess({}, // @ts-ignore
|
|
120
120
|
_objectSpread(_objectSpread({}, options.file), {}, {
|
|
121
|
-
uid: data
|
|
122
|
-
url: data
|
|
121
|
+
uid: data,
|
|
122
|
+
url: data
|
|
123
123
|
}));
|
|
124
124
|
} else {
|
|
125
125
|
onError === null || onError === void 0 ? void 0 : onError(new Error('文件上传失败'));
|
|
@@ -27,7 +27,7 @@ var PointTooltipTitle = function PointTooltipTitle(_ref) {
|
|
|
27
27
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u540D\u79F0\uFF1A", (point === null || point === void 0 ? void 0 : point.pointName) || '-'), /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u503C\uFF1A", (_point$value = point === null || point === void 0 ? void 0 : point.value) !== null && _point$value !== void 0 ? _point$value : '-', " ", (_point$unit = point === null || point === void 0 ? void 0 : point.unit) !== null && _point$unit !== void 0 ? _point$unit : '-'), /*#__PURE__*/React.createElement("div", null, "\u66F4\u65B0\u65F6\u95F4\uFF1A", (point === null || point === void 0 ? void 0 : point.updateTime) || '-'));
|
|
28
28
|
};
|
|
29
29
|
var PointItem = function PointItem(_ref2) {
|
|
30
|
-
var _ref3, _point$pointName;
|
|
30
|
+
var _ref3, _point$unit2, _point$pointName;
|
|
31
31
|
var point = _ref2.point,
|
|
32
32
|
style = _ref2.style,
|
|
33
33
|
valueStyles = _ref2.valueStyles,
|
|
@@ -57,7 +57,7 @@ var PointItem = function PointItem(_ref2) {
|
|
|
57
57
|
style: _objectSpread({
|
|
58
58
|
marginBottom: 4
|
|
59
59
|
}, valueStyles)
|
|
60
|
-
}, 'value' in point ? (_ref3 = point.pointEnumItemKey || point.value) !== null && _ref3 !== void 0 ? _ref3 : '-' : '点位状态'), /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
}, 'value' in point ? ((_ref3 = point.pointEnumItemKey || point.value) !== null && _ref3 !== void 0 ? _ref3 : '-') + ((_point$unit2 = point.unit) !== null && _point$unit2 !== void 0 ? _point$unit2 : '') : '点位状态'), /*#__PURE__*/React.createElement("div", {
|
|
61
61
|
style: labelStyles
|
|
62
62
|
}, 'value' in point ? (_point$pointName = point === null || point === void 0 ? void 0 : point.pointName) !== null && _point$pointName !== void 0 ? _point$pointName : '-' : '点位名称')));
|
|
63
63
|
};
|