coolcare-lite-scada-component 2.0.34 → 2.0.35
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,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { memo } from 'react';
|
|
3
|
-
import { Tooltip } from 'antd';
|
|
4
3
|
import { getValueByExpression, reactShapeNodeAreEqual } from "../utils";
|
|
5
4
|
import { usePointWatch, useEleEventHandle } from "../../hooks";
|
|
6
5
|
import styles from "./index.css";
|
|
@@ -35,34 +34,46 @@ var ElePointImageComponent = function ElePointImageComponent(_ref) {
|
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
var pointData = usePointWatch(configPoint, payload === null || payload === void 0 ? void 0 : (_payload$mittMeta2 = payload.mittMeta) === null || _payload$mittMeta2 === void 0 ? void 0 : _payload$mittMeta2.namespace);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
37
|
+
|
|
38
|
+
// let tooltipTitle = null;
|
|
39
|
+
// if (!configPoint) {
|
|
40
|
+
// tooltipTitle = '未绑定点位';
|
|
41
|
+
// } else {
|
|
42
|
+
// tooltipTitle = (
|
|
43
|
+
// <div>
|
|
44
|
+
// <div>点位名称:{pointData?.pointName || '-'}</div>
|
|
45
|
+
// <div>
|
|
46
|
+
// 点位值:{pointData?.value ?? '-'} {pointData?.unit ?? '-'}
|
|
47
|
+
// </div>
|
|
48
|
+
// <div>更新时间:{pointData?.updateTime || '-'}</div>
|
|
49
|
+
// </div>
|
|
50
|
+
// );
|
|
51
|
+
// }
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
/*#__PURE__*/
|
|
55
|
+
// <Tooltip title={tooltipTitle}>
|
|
56
|
+
React.createElement("div", {
|
|
57
|
+
onClick: function onClick(e) {
|
|
58
|
+
return eventHandles.current.onClick(e);
|
|
59
|
+
},
|
|
60
|
+
onContextMenu: function onContextMenu(e) {
|
|
61
|
+
return eventHandles.current.onContextMenu(e);
|
|
62
|
+
},
|
|
63
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
64
|
+
return eventHandles.current.onMouseEnter(e);
|
|
65
|
+
},
|
|
66
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
67
|
+
return eventHandles.current.onMouseLeave(e);
|
|
68
|
+
},
|
|
69
|
+
className: styles.wrap
|
|
70
|
+
}, (payload === null || payload === void 0 ? void 0 : payload.imgSrc) ? /*#__PURE__*/React.createElement("img", {
|
|
71
|
+
className: styles.img,
|
|
72
|
+
src: getImageSrc(payload.imgSrc, pointData === null || pointData === void 0 ? void 0 : pointData.value, configPoint === null || configPoint === void 0 ? void 0 : configPoint.expressions),
|
|
73
|
+
draggable: false,
|
|
74
|
+
alt: ""
|
|
75
|
+
}) : null)
|
|
76
|
+
// </Tooltip>
|
|
77
|
+
);
|
|
67
78
|
};
|
|
68
79
|
export default /*#__PURE__*/memo(ElePointImageComponent, reactShapeNodeAreEqual);
|