@vtx/cs-map-layer 1.0.17 → 1.0.18
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.
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
1
2
|
import { getVtxToken } from '@vtx/utils';
|
|
2
3
|
import classnames from 'classnames';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import React from 'react';
|
|
6
|
+
import { Tooltip } from "antd";
|
|
5
7
|
function CustomContent(props) {
|
|
6
8
|
var _ref = getVtxToken() || {},
|
|
7
9
|
token = _ref.token,
|
|
@@ -64,8 +66,16 @@ function CustomContent(props) {
|
|
|
64
66
|
}), /*#__PURE__*/React.createElement("span", {
|
|
65
67
|
className: classnames(handleClassName('keyIndicators-item-left-name'))
|
|
66
68
|
}, v.name || ''), /*#__PURE__*/React.createElement("span", null, v.unit ? "\uFF08".concat(v.unit, "\uFF09") : '', ":"), /*#__PURE__*/React.createElement("span", {
|
|
67
|
-
className: classnames(handleClassName('keyIndicators-item-left-value')
|
|
68
|
-
|
|
69
|
+
className: classnames(handleClassName('keyIndicators-item-left-value'), {
|
|
70
|
+
'is-alarm': v.onAlarm
|
|
71
|
+
})
|
|
72
|
+
}, v.value || v.value == 0 ? v.value : '', v.onAlarm ? /*#__PURE__*/React.createElement(React.Fragment, null, " (".concat(v.alarmLevel, "\u7EA7\u62A5\u8B66) "), /*#__PURE__*/React.createElement(Tooltip, {
|
|
73
|
+
title: v.alarmDescription
|
|
74
|
+
}, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
75
|
+
style: {
|
|
76
|
+
color: '#fff'
|
|
77
|
+
}
|
|
78
|
+
}))) : '')));
|
|
69
79
|
})) : null));
|
|
70
80
|
}
|
|
71
81
|
CustomContent.propTypes = {
|
|
@@ -1,3 +1,9 @@
|
|
|
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); }
|
|
1
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
9
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -96,13 +102,12 @@ var DeviceTemplate = function DeviceTemplate(props) {
|
|
|
96
102
|
res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 || _res$data2.map(function (item) {
|
|
97
103
|
var _item$factorValues;
|
|
98
104
|
item === null || item === void 0 || (_item$factorValues = item.factorValues) === null || _item$factorValues === void 0 || _item$factorValues.map(function (v) {
|
|
99
|
-
data.push({
|
|
100
|
-
// name: v?.factorName,
|
|
105
|
+
data.push(_objectSpread(_objectSpread({}, v), {}, {
|
|
101
106
|
name: v === null || v === void 0 ? void 0 : v.monitorItemName,
|
|
102
107
|
unit: v === null || v === void 0 ? void 0 : v.unit,
|
|
103
108
|
value: v === null || v === void 0 ? void 0 : v.formatValue,
|
|
104
109
|
updateTime: v === null || v === void 0 ? void 0 : v.timeDesc
|
|
105
|
-
});
|
|
110
|
+
}));
|
|
106
111
|
});
|
|
107
112
|
});
|
|
108
113
|
}
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
&-name {
|
|
165
165
|
white-space: nowrap;
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
|
|
168
168
|
&-value {
|
|
169
169
|
margin-left: 8px;
|
|
170
170
|
}
|
|
@@ -546,6 +546,11 @@
|
|
|
546
546
|
|
|
547
547
|
&-value {
|
|
548
548
|
margin-left: 8px;
|
|
549
|
+
|
|
550
|
+
&.is-alarm {
|
|
551
|
+
color: #FF2F2F;
|
|
552
|
+
flex: 1;
|
|
553
|
+
}
|
|
549
554
|
}
|
|
550
555
|
}
|
|
551
556
|
|
|
@@ -559,4 +564,4 @@
|
|
|
559
564
|
}
|
|
560
565
|
}
|
|
561
566
|
}
|
|
562
|
-
}
|
|
567
|
+
}
|