coolcare-lite-scada-component 1.0.0
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/README.md +21 -0
- package/es/app.js +52 -0
- package/es/componentIndex.js +7 -0
- package/es/components/BoxShadowPicker/index.css +22 -0
- package/es/components/BoxShadowPicker/index.js +114 -0
- package/es/components/BoxShadowPicker/index.less.d.ts +9 -0
- package/es/components/Button/index.js +6 -0
- package/es/components/ColorPalette/index.js +12 -0
- package/es/components/ColorPicker/index.css +38 -0
- package/es/components/ColorPicker/index.js +103 -0
- package/es/components/ColorPicker/util.js +31 -0
- package/es/components/DeviceSelect/DeviceTable.js +320 -0
- package/es/components/DeviceSelect/index.css +6 -0
- package/es/components/DeviceSelect/index.js +112 -0
- package/es/components/DialogExpression/ImagePicker/index.css +13 -0
- package/es/components/DialogExpression/ImagePicker/index.js +44 -0
- package/es/components/DialogExpression/index.css +9 -0
- package/es/components/DialogExpression/index.js +270 -0
- package/es/components/DialogHistory/index.css +10 -0
- package/es/components/DialogHistory/index.js +383 -0
- package/es/components/DialogIconPicker/data.js +179 -0
- package/es/components/DialogIconPicker/index.css +30 -0
- package/es/components/DialogIconPicker/index.js +101 -0
- package/es/components/DialogImagePicker/Gallery/index.css +0 -0
- package/es/components/DialogImagePicker/Gallery/index.js +96 -0
- package/es/components/DialogImagePicker/GroupPanel/index.css +3 -0
- package/es/components/DialogImagePicker/GroupPanel/index.js +89 -0
- package/es/components/DialogImagePicker/index.css +25 -0
- package/es/components/DialogImagePicker/index.js +85 -0
- package/es/components/DialogPointWrite/PointItem.js +91 -0
- package/es/components/DialogPointWrite/index.js +124 -0
- package/es/components/ECharts/index.css +5 -0
- package/es/components/ECharts/index.js +94 -0
- package/es/components/ExpressionFormat/index.css +22 -0
- package/es/components/ExpressionFormat/index.js +50 -0
- package/es/components/FontFamilySelect/index.js +25 -0
- package/es/components/FontFamilySelect/list.js +2194 -0
- package/es/components/FontStyleForm/index.css +3 -0
- package/es/components/FontStyleForm/index.js +170 -0
- package/es/components/FormBindPoint/FreedomScene.js +207 -0
- package/es/components/FormBindPoint/ProductionOrDeviceScene.js +172 -0
- package/es/components/FormBindPoint/index.css +0 -0
- package/es/components/FormBindPoint/index.js +17 -0
- package/es/components/FormIconSelect/index.js +62 -0
- package/es/components/FormNodeData/index.js +82 -0
- package/es/components/FormNodeData/utils/valueUtil.js +8 -0
- package/es/components/Icon/index.js +6 -0
- package/es/components/ImageUploader/index.js +172 -0
- package/es/components/LockBtn/index.css +4 -0
- package/es/components/LockBtn/index.js +45 -0
- package/es/components/Margin_Padding/index.css +3 -0
- package/es/components/Margin_Padding/index.js +155 -0
- package/es/components/MouseTooltip/index.css +7 -0
- package/es/components/MouseTooltip/index.js +57 -0
- package/es/components/NeedBindPointHint/index.css +12 -0
- package/es/components/NeedBindPointHint/index.js +15 -0
- package/es/components/PaddingPicker/index.css +22 -0
- package/es/components/PaddingPicker/index.js +95 -0
- package/es/components/PageLoading/index.css +29 -0
- package/es/components/PageLoading/index.js +30 -0
- package/es/components/PointEnumNameFormat/index.css +4 -0
- package/es/components/PointEnumNameFormat/index.js +9 -0
- package/es/components/PointInfoTip/index.css +3 -0
- package/es/components/PointInfoTip/index.js +193 -0
- package/es/components/PointSelect/DevicePointTable.js +128 -0
- package/es/components/PointSelect/ProductPointTable.js +98 -0
- package/es/components/PointSelect/index.css +9 -0
- package/es/components/PointSelect/index.js +278 -0
- package/es/components/Prompt/index.js +126 -0
- package/es/components/SliderWithInput/index.css +11 -0
- package/es/components/SliderWithInput/index.js +67 -0
- package/es/components/Switch/index.js +69 -0
- package/es/components/TranslateButton/index.js +26 -0
- package/es/constant.js +16 -0
- package/es/edge/EdgeLinePort/PropsSet/Flow.js +173 -0
- package/es/edge/EdgeLinePort/PropsSet/Line.js +73 -0
- package/es/edge/EdgeLinePort/PropsSet/Marker.js +81 -0
- package/es/edge/EdgeLinePort/PropsSet/index.js +25 -0
- package/es/edge/EdgeLinePort/index.js +91 -0
- package/es/edge/EdgePipe/PropsSet/Flow.js +173 -0
- package/es/edge/EdgePipe/PropsSet/Pipe.js +73 -0
- package/es/edge/EdgePipe/PropsSet/index.js +34 -0
- package/es/edge/EdgePipe/index.css +10 -0
- package/es/edge/EdgePipe/index.js +181 -0
- package/es/edge/register.js +6 -0
- package/es/element/BasicShape/Circle/index.js +81 -0
- package/es/element/BasicShape/CommentBox/index.js +77 -0
- package/es/element/BasicShape/CommentBox2/index.js +78 -0
- package/es/element/BasicShape/Ellipse/index.js +80 -0
- package/es/element/BasicShape/Heart/index.js +75 -0
- package/es/element/BasicShape/Lightning/index.js +75 -0
- package/es/element/BasicShape/PropsForm/index.css +0 -0
- package/es/element/BasicShape/PropsForm/index.js +80 -0
- package/es/element/BasicShape/Rectangle/index.js +78 -0
- package/es/element/BasicShape/Star/index.js +75 -0
- package/es/element/BorderBox/BorderBox1/Component.js +74 -0
- package/es/element/BorderBox/BorderBox1/index.css +27 -0
- package/es/element/BorderBox/BorderBox1/index.js +51 -0
- package/es/element/BorderBox/BorderBox10/Component.js +61 -0
- package/es/element/BorderBox/BorderBox10/index.css +28 -0
- package/es/element/BorderBox/BorderBox10/index.js +51 -0
- package/es/element/BorderBox/BorderBox12/Component.js +109 -0
- package/es/element/BorderBox/BorderBox12/index.css +17 -0
- package/es/element/BorderBox/BorderBox12/index.js +51 -0
- package/es/element/BorderBox/BorderBox13/Component.js +55 -0
- package/es/element/BorderBox/BorderBox13/index.css +17 -0
- package/es/element/BorderBox/BorderBox13/index.js +51 -0
- package/es/element/BorderBox/BorderBox2/Component.js +65 -0
- package/es/element/BorderBox/BorderBox2/index.css +21 -0
- package/es/element/BorderBox/BorderBox2/index.js +51 -0
- package/es/element/BorderBox/BorderBox3/Component.js +55 -0
- package/es/element/BorderBox/BorderBox3/index.css +26 -0
- package/es/element/BorderBox/BorderBox3/index.js +51 -0
- package/es/element/BorderBox/BorderBox4/Component.js +81 -0
- package/es/element/BorderBox/BorderBox4/index.css +66 -0
- package/es/element/BorderBox/BorderBox4/index.js +51 -0
- package/es/element/BorderBox/BorderBox5/Component.js +65 -0
- package/es/element/BorderBox/BorderBox5/index.css +35 -0
- package/es/element/BorderBox/BorderBox5/index.js +51 -0
- package/es/element/BorderBox/BorderBox6/Component.js +95 -0
- package/es/element/BorderBox/BorderBox6/index.css +21 -0
- package/es/element/BorderBox/BorderBox6/index.js +51 -0
- package/es/element/BorderBox/BorderBox7/Component.js +70 -0
- package/es/element/BorderBox/BorderBox7/index.css +27 -0
- package/es/element/BorderBox/BorderBox7/index.js +51 -0
- package/es/element/BorderBox/BorderBox8/Component.js +113 -0
- package/es/element/BorderBox/BorderBox8/index.css +17 -0
- package/es/element/BorderBox/BorderBox8/index.js +51 -0
- package/es/element/BorderBox/BorderBox9/Component.js +137 -0
- package/es/element/BorderBox/BorderBox9/index.css +17 -0
- package/es/element/BorderBox/BorderBox9/index.js +51 -0
- package/es/element/BorderBox/PropsSet/ColorSet.js +60 -0
- package/es/element/BorderBox/PropsSet/index.js +21 -0
- package/es/element/BorderBox/util/index.js +7 -0
- package/es/element/BorderBox/util/typings.d.ts +9 -0
- package/es/element/Decoration/Decoration1/Component.js +126 -0
- package/es/element/Decoration/Decoration1/index.css +7 -0
- package/es/element/Decoration/Decoration1/index.js +51 -0
- package/es/element/Decoration/Decoration10/Component.js +171 -0
- package/es/element/Decoration/Decoration10/index.css +5 -0
- package/es/element/Decoration/Decoration10/index.js +51 -0
- package/es/element/Decoration/Decoration2/Component.js +81 -0
- package/es/element/Decoration/Decoration2/index.css +10 -0
- package/es/element/Decoration/Decoration2/index.js +51 -0
- package/es/element/Decoration/Decoration3/Component.js +81 -0
- package/es/element/Decoration/Decoration3/index.css +7 -0
- package/es/element/Decoration/Decoration3/index.js +51 -0
- package/es/element/Decoration/Decoration4/Component.js +54 -0
- package/es/element/Decoration/Decoration4/index.css +43 -0
- package/es/element/Decoration/Decoration4/index.js +51 -0
- package/es/element/Decoration/Decoration5/Component.js +86 -0
- package/es/element/Decoration/Decoration5/index.css +4 -0
- package/es/element/Decoration/Decoration5/index.js +51 -0
- package/es/element/Decoration/Decoration6/Component.js +120 -0
- package/es/element/Decoration/Decoration6/index.css +7 -0
- package/es/element/Decoration/Decoration6/index.js +51 -0
- package/es/element/Decoration/Decoration8/Component.js +62 -0
- package/es/element/Decoration/Decoration8/index.css +5 -0
- package/es/element/Decoration/Decoration8/index.js +51 -0
- package/es/element/Decoration/PropsSet/ColorSet.js +60 -0
- package/es/element/Decoration/PropsSet/index.js +21 -0
- package/es/element/Decoration/util/index.js +33 -0
- package/es/element/Decoration/util/typings.d.ts +9 -0
- package/es/element/EleButton/Component.js +49 -0
- package/es/element/EleButton/PropsSet/TextPropsSet/index.js +27 -0
- package/es/element/EleButton/PropsSet/index.js +25 -0
- package/es/element/EleButton/index.css +15 -0
- package/es/element/EleButton/index.js +66 -0
- package/es/element/EleClock/Component.js +60 -0
- package/es/element/EleClock/PropsSet/index.js +46 -0
- package/es/element/EleClock/index.css +7 -0
- package/es/element/EleClock/index.js +55 -0
- package/es/element/EleContainer/Component.js +22 -0
- package/es/element/EleContainer/PropsSet/OtherPropsSet/index.js +63 -0
- package/es/element/EleContainer/PropsSet/index.js +29 -0
- package/es/element/EleContainer/index.css +4 -0
- package/es/element/EleContainer/index.js +54 -0
- package/es/element/EleDeviceName/Component.js +81 -0
- package/es/element/EleDeviceName/PropsSet/FormBindDevice/index.js +52 -0
- package/es/element/EleDeviceName/PropsSet/index.js +26 -0
- package/es/element/EleDeviceName/index.css +11 -0
- package/es/element/EleDeviceName/index.js +57 -0
- package/es/element/EleDeviceState/Component.js +103 -0
- package/es/element/EleDeviceState/PropsSet/FormBindDevice/index.js +53 -0
- package/es/element/EleDeviceState/PropsSet/index.js +26 -0
- package/es/element/EleDeviceState/index.css +13 -0
- package/es/element/EleDeviceState/index.js +62 -0
- package/es/element/EleDeviceUpdateTime/Component.js +94 -0
- package/es/element/EleDeviceUpdateTime/PropsSet/FormBindDateFormat/index.js +32 -0
- package/es/element/EleDeviceUpdateTime/PropsSet/FormBindDevice/index.js +52 -0
- package/es/element/EleDeviceUpdateTime/PropsSet/index.js +27 -0
- package/es/element/EleDeviceUpdateTime/index.css +9 -0
- package/es/element/EleDeviceUpdateTime/index.js +57 -0
- package/es/element/EleFan/Component.js +74 -0
- package/es/element/EleFan/PropsSet/FormBindDevice/index.js +46 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/FaultQuestion.js +18 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/FrostQuestion.js +18 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/RefrigerationQuestion.js +18 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/SwitchQuestion.js +12 -0
- package/es/element/EleFan/PropsSet/FormBindPoint/index.js +519 -0
- package/es/element/EleFan/PropsSet/index.js +66 -0
- package/es/element/EleFan/Tooltip.js +8 -0
- package/es/element/EleFan/index.css +25 -0
- package/es/element/EleFan/index.js +113 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/FaultQuestion.js +18 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/FrostQuestion.js +18 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/RefrigerationQuestion.js +18 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/SwitchQuestion.js +12 -0
- package/es/element/EleFanBySvg/PropsSet/FormBindPoint/index.js +473 -0
- package/es/element/EleFanBySvg/PropsSet/index.js +25 -0
- package/es/element/EleFanBySvg/Tooltip.js +8 -0
- package/es/element/EleFanBySvg/index.js +320 -0
- package/es/element/EleGauge/Component.js +128 -0
- package/es/element/EleGauge/PropsSet/OtherPropsSet/index.js +92 -0
- package/es/element/EleGauge/PropsSet/index.js +29 -0
- package/es/element/EleGauge/index.css +7 -0
- package/es/element/EleGauge/index.js +66 -0
- package/es/element/EleIcon/Component.js +53 -0
- package/es/element/EleIcon/PropsSet/IconPropsSet/index.js +105 -0
- package/es/element/EleIcon/PropsSet/index.js +29 -0
- package/es/element/EleIcon/index.css +13 -0
- package/es/element/EleIcon/index.js +58 -0
- package/es/element/EleImage/PropsSet/ImagePropsSet/index.js +56 -0
- package/es/element/EleImage/PropsSet/index.js +21 -0
- package/es/element/EleImage/index.js +61 -0
- package/es/element/EleIndicatorLight/Component.js +57 -0
- package/es/element/EleIndicatorLight/PropsSet/ColorPropsSet/index.js +63 -0
- package/es/element/EleIndicatorLight/PropsSet/index.js +29 -0
- package/es/element/EleIndicatorLight/index.css +4 -0
- package/es/element/EleIndicatorLight/index.js +66 -0
- package/es/element/ElePointImage/Component.js +60 -0
- package/es/element/ElePointImage/PropsSet/ImagePropsSet/index.js +84 -0
- package/es/element/ElePointImage/PropsSet/index.js +29 -0
- package/es/element/ElePointImage/index.css +9 -0
- package/es/element/ElePointImage/index.js +58 -0
- package/es/element/ElePointList/Component.js +142 -0
- package/es/element/ElePointList/PropsSet/index.js +25 -0
- package/es/element/ElePointList/index.css +22 -0
- package/es/element/ElePointList/index.js +67 -0
- package/es/element/ElePointState/Component.js +71 -0
- package/es/element/ElePointState/PropsSet/IconPropsSet/index.js +140 -0
- package/es/element/ElePointState/PropsSet/index.js +29 -0
- package/es/element/ElePointState/index.css +10 -0
- package/es/element/ElePointState/index.js +60 -0
- package/es/element/ElePointValue/Component.js +79 -0
- package/es/element/ElePointValue/PropsSet/GlobalPropSet/index.js +60 -0
- package/es/element/ElePointValue/PropsSet/TitlePropsSet/index.js +42 -0
- package/es/element/ElePointValue/PropsSet/UnitPropsSet/index.js +54 -0
- package/es/element/ElePointValue/PropsSet/ValuePropsSet/index.js +119 -0
- package/es/element/ElePointValue/PropsSet/index.js +41 -0
- package/es/element/ElePointValue/index.css +30 -0
- package/es/element/ElePointValue/index.js +63 -0
- package/es/element/EleShine/Component.js +61 -0
- package/es/element/EleShine/PropsSet/OtherPropsSet/index.js +63 -0
- package/es/element/EleShine/PropsSet/index.js +29 -0
- package/es/element/EleShine/index.css +15 -0
- package/es/element/EleShine/index.js +70 -0
- package/es/element/EleState/Tooltip.js +8 -0
- package/es/element/EleState/index.js +115 -0
- package/es/element/EleSvg/index.js +35 -0
- package/es/element/EleSwitch/Component.js +66 -0
- package/es/element/EleSwitch/PropsSet/OtherPropsSet/index.js +49 -0
- package/es/element/EleSwitch/PropsSet/index.js +25 -0
- package/es/element/EleSwitch/index.css +6 -0
- package/es/element/EleSwitch/index.js +62 -0
- package/es/element/EleText/Component.js +19 -0
- package/es/element/EleText/index.css +6 -0
- package/es/element/EleText/index.js +69 -0
- package/es/element/PipeNodes/NodeBL/index.js +74 -0
- package/es/element/PipeNodes/NodeBR/index.js +75 -0
- package/es/element/PipeNodes/NodeBottom/index.js +82 -0
- package/es/element/PipeNodes/NodeCenter/index.js +89 -0
- package/es/element/PipeNodes/NodeHorizontal/index.js +72 -0
- package/es/element/PipeNodes/NodeLeft/index.js +81 -0
- package/es/element/PipeNodes/NodeRight/index.js +81 -0
- package/es/element/PipeNodes/NodeTL/index.js +74 -0
- package/es/element/PipeNodes/NodeTL.TEMP/index.js +151 -0
- package/es/element/PipeNodes/NodeTR/index.js +74 -0
- package/es/element/PipeNodes/NodeTop/index.js +81 -0
- package/es/element/PipeNodes/NodeVertical/index.js +72 -0
- package/es/element/PipeNodes/portStyle.js +18 -0
- package/es/element/PointCard/PointCard1/Component.js +97 -0
- package/es/element/PointCard/PointCard1/PropsSet/IconPropsSet/index.js +147 -0
- package/es/element/PointCard/PointCard1/PropsSet/PointValuePropsSet/index.js +120 -0
- package/es/element/PointCard/PointCard1/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointCard/PointCard1/PropsSet/index.js +37 -0
- package/es/element/PointCard/PointCard1/index.css +44 -0
- package/es/element/PointCard/PointCard1/index.js +88 -0
- package/es/element/PointCard/PointCard2/Component/PointItem.js +87 -0
- package/es/element/PointCard/PointCard2/Component/PointItemPlaceholder.js +33 -0
- package/es/element/PointCard/PointCard2/Component/index.css +30 -0
- package/es/element/PointCard/PointCard2/Component/index.js +53 -0
- package/es/element/PointCard/PointCard2/PropsSet/GlobalPropSet/index.js +14 -0
- package/es/element/PointCard/PointCard2/PropsSet/IconPropsSet/index.js +32 -0
- package/es/element/PointCard/PointCard2/PropsSet/PointItemSetDrawer/index.css +7 -0
- package/es/element/PointCard/PointCard2/PropsSet/PointItemSetDrawer/index.js +175 -0
- package/es/element/PointCard/PointCard2/PropsSet/TitlePropsSet/index.js +31 -0
- package/es/element/PointCard/PointCard2/PropsSet/index.js +52 -0
- package/es/element/PointCard/PointCard2/index.js +79 -0
- package/es/element/PointCard/PointCard3/Component.js +107 -0
- package/es/element/PointCard/PointCard3/PropsSet/IconPropsSet/index.js +178 -0
- package/es/element/PointCard/PointCard3/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointCard/PointCard3/PropsSet/index.js +33 -0
- package/es/element/PointCard/PointCard3/index.css +26 -0
- package/es/element/PointCard/PointCard3/index.js +79 -0
- package/es/element/PointCard/PointListCard/Component.js +169 -0
- package/es/element/PointCard/PointListCard/PropsSet/GlobalPropSet/index.js +14 -0
- package/es/element/PointCard/PointListCard/PropsSet/LabelPropsSet/index.js +31 -0
- package/es/element/PointCard/PointListCard/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointCard/PointListCard/PropsSet/ValuePropsSet/index.js +31 -0
- package/es/element/PointCard/PointListCard/PropsSet/index.js +41 -0
- package/es/element/PointCard/PointListCard/index.css +24 -0
- package/es/element/PointCard/PointListCard/index.js +87 -0
- package/es/element/PointControl/PointControl1/Component.js +110 -0
- package/es/element/PointControl/PointControl1/PropsSet/GlobalPropsSet/index.js +16 -0
- package/es/element/PointControl/PointControl1/PropsSet/PointValuePropsSet/index.js +31 -0
- package/es/element/PointControl/PointControl1/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointControl/PointControl1/PropsSet/index.js +33 -0
- package/es/element/PointControl/PointControl1/index.css +21 -0
- package/es/element/PointControl/PointControl1/index.js +83 -0
- package/es/element/PointControl/PointControl3/Component.js +123 -0
- package/es/element/PointControl/PointControl3/PropsSet/IconPropsSet/index.js +147 -0
- package/es/element/PointControl/PointControl3/PropsSet/SubTitlePropsSet/index.js +53 -0
- package/es/element/PointControl/PointControl3/PropsSet/SwitchPropsSet/index.js +49 -0
- package/es/element/PointControl/PointControl3/PropsSet/TitlePropsSet/index.js +43 -0
- package/es/element/PointControl/PointControl3/PropsSet/index.js +41 -0
- package/es/element/PointControl/PointControl3/index.css +8 -0
- package/es/element/PointControl/PointControl3/index.js +94 -0
- package/es/element/nodeBase.js +48 -0
- package/es/element/reactShapeBase.js +47 -0
- package/es/element/register.js +131 -0
- package/es/element/type.d.ts +143 -0
- package/es/element/utils/getValueByExpression.js +22 -0
- package/es/element/utils/handleEleEvent.js +60 -0
- package/es/element/utils/index.js +4 -0
- package/es/element/utils/pointWrite.js +197 -0
- package/es/element/utils/shapeReactComponentShouldUpdate.js +7 -0
- package/es/global.css +162 -0
- package/es/graph/graphCore.js +501 -0
- package/es/graph/tools/ToolTipTool.js +139 -0
- package/es/graph/tools/registerX6Tool.js +1 -0
- package/es/hooks/index.js +7 -0
- package/es/hooks/useCMDKey.js +19 -0
- package/es/hooks/useEleEventHandle.js +36 -0
- package/es/hooks/useFirstMountState.js +9 -0
- package/es/hooks/useForceUpdate.js +23 -0
- package/es/hooks/useMittNamespace.js +7 -0
- package/es/hooks/usePointWatch.js +30 -0
- package/es/hooks/useQuery.js +6 -0
- package/es/models/useEditor.js +185 -0
- package/es/models/useElePanel.js +23 -0
- package/es/pages/display/Player/index.css +15 -0
- package/es/pages/display/Player/index.js +434 -0
- package/es/pages/display/components/Empty/index.css +9 -0
- package/es/pages/display/components/Empty/index.js +22 -0
- package/es/pages/display/components/Tools/index.js +86 -0
- package/es/pages/display/index.css +4 -0
- package/es/pages/display/index.js +231 -0
- package/es/pages/document.ejs +77 -0
- package/es/pages/editor/Palette/PaletteDropdown/index.css +9 -0
- package/es/pages/editor/Palette/PaletteDropdown/index.js +178 -0
- package/es/pages/editor/Palette/index.css +13 -0
- package/es/pages/editor/Palette/index.js +86 -0
- package/es/pages/editor/PanelLeft/BasicShapeList/index.js +32 -0
- package/es/pages/editor/PanelLeft/BasicShapeList/listData.js +63 -0
- package/es/pages/editor/PanelLeft/BorderBoxEleList/index.css +9 -0
- package/es/pages/editor/PanelLeft/BorderBoxEleList/index.js +19 -0
- package/es/pages/editor/PanelLeft/BorderBoxEleList/index.less.d.ts +7 -0
- package/es/pages/editor/PanelLeft/BorderBoxEleList/listData.js +49 -0
- package/es/pages/editor/PanelLeft/DecorationEleList/index.css +12 -0
- package/es/pages/editor/PanelLeft/DecorationEleList/index.js +21 -0
- package/es/pages/editor/PanelLeft/DecorationEleList/index.less.d.ts +7 -0
- package/es/pages/editor/PanelLeft/DecorationEleList/listData.js +65 -0
- package/es/pages/editor/PanelLeft/GroupManageDialog/index.css +32 -0
- package/es/pages/editor/PanelLeft/GroupManageDialog/index.js +300 -0
- package/es/pages/editor/PanelLeft/ImgConfigDialog/index.css +0 -0
- package/es/pages/editor/PanelLeft/ImgConfigDialog/index.js +220 -0
- package/es/pages/editor/PanelLeft/ImgGroup/index.css +62 -0
- package/es/pages/editor/PanelLeft/ImgGroup/index.js +317 -0
- package/es/pages/editor/PanelLeft/MetaEleList/index.js +37 -0
- package/es/pages/editor/PanelLeft/MetaEleList/listData.js +88 -0
- package/es/pages/editor/PanelLeft/MineImgGroup/index.css +0 -0
- package/es/pages/editor/PanelLeft/MineImgGroup/index.js +163 -0
- package/es/pages/editor/PanelLeft/PipeEleList/index.css +0 -0
- package/es/pages/editor/PanelLeft/PipeEleList/index.js +33 -0
- package/es/pages/editor/PanelLeft/PipeEleList/listData.js +69 -0
- package/es/pages/editor/PanelLeft/PointCardEleList/index.js +31 -0
- package/es/pages/editor/PanelLeft/PointCardEleList/listData.js +37 -0
- package/es/pages/editor/PanelLeft/RecommendEleList/index.js +37 -0
- package/es/pages/editor/PanelLeft/RecommendEleList/listData.js +27 -0
- package/es/pages/editor/PanelLeft/SystemImgGroupList/index.css +6 -0
- package/es/pages/editor/PanelLeft/SystemImgGroupList/index.js +119 -0
- package/es/pages/editor/PanelLeft/index.css +100 -0
- package/es/pages/editor/PanelLeft/index.js +200 -0
- package/es/pages/editor/PanelLeft/index.less.d.ts +11 -0
- package/es/pages/editor/PanelRight/components/FormBindEvent/index.js +202 -0
- package/es/pages/editor/PanelRight/components/FormEleBorderStyle/index.js +145 -0
- package/es/pages/editor/PanelRight/components/FormEleLayout/index.css +8 -0
- package/es/pages/editor/PanelRight/components/FormEleLayout/index.js +214 -0
- package/es/pages/editor/PanelRight/components/FormElePadding/index.js +11 -0
- package/es/pages/editor/PanelRight/components/FormFillStyle/index.js +92 -0
- package/es/pages/editor/PanelRight/components/FormFontStyle/index.js +186 -0
- package/es/pages/editor/PanelRight/components/FormLayer/index.js +222 -0
- package/es/pages/editor/PanelRight/index.css +26 -0
- package/es/pages/editor/PanelRight/index.js +164 -0
- package/es/pages/editor/PanelRight/index.less.d.ts +7 -0
- package/es/pages/editor/PanelTop/FullScreen/index.js +31 -0
- package/es/pages/editor/PanelTop/HistoryControl/index.js +78 -0
- package/es/pages/editor/PanelTop/HotKeyDescribe/index.css +35 -0
- package/es/pages/editor/PanelTop/HotKeyDescribe/index.js +114 -0
- package/es/pages/editor/PanelTop/HotKeyDescribe/index.less.d.ts +10 -0
- package/es/pages/editor/PanelTop/Save/index.js +179 -0
- package/es/pages/editor/PanelTop/ZoomControl/index.css +0 -0
- package/es/pages/editor/PanelTop/ZoomControl/index.js +100 -0
- package/es/pages/editor/PanelTop/index.css +57 -0
- package/es/pages/editor/PanelTop/index.js +321 -0
- package/es/pages/editor/index.css +39 -0
- package/es/pages/editor/index.js +298 -0
- package/es/provider/index.js +2 -0
- package/es/provider/mittMeat.js +4 -0
- package/es/services/common/Uploader.js +45 -0
- package/es/services/common/index.js +8 -0
- package/es/services/common/typings.d.ts +15 -0
- package/es/services/gateway/CompanyConfiguration.js +87 -0
- package/es/services/gateway/Device.js +437 -0
- package/es/services/gateway/DeviceAuthorizationApply.js +111 -0
- package/es/services/gateway/DeviceGroup.js +137 -0
- package/es/services/gateway/Gateway.js +442 -0
- package/es/services/gateway/GatewayGroup.js +112 -0
- package/es/services/gateway/Point.js +137 -0
- package/es/services/gateway/UserDevice.js +112 -0
- package/es/services/gateway/index.js +22 -0
- package/es/services/gateway/typings.d.ts +1674 -0
- package/es/services/master/Func.js +33 -0
- package/es/services/master/Role.js +153 -0
- package/es/services/master/User.js +244 -0
- package/es/services/master/index.js +12 -0
- package/es/services/master/typings.d.ts +362 -0
- package/es/services/product/ConfigurationImg.js +87 -0
- package/es/services/product/ConfigurationImgGroup.js +87 -0
- package/es/services/product/DeviceType.js +37 -0
- package/es/services/product/Identifier.js +33 -0
- package/es/services/product/PointEnum.js +87 -0
- package/es/services/product/PointGroup.js +112 -0
- package/es/services/product/Product.js +351 -0
- package/es/services/product/ProductCompany.js +183 -0
- package/es/services/product/index.js +22 -0
- package/es/services/product/typings.d.ts +1045 -0
- package/es/services/project/ProjectGateway.js +62 -0
- package/es/services/project/ProjectResource.js +205 -0
- package/es/services/project/ProjectRole.js +302 -0
- package/es/services/project/ProjectUserPermission.js +217 -0
- package/es/services/project/Subarea.js +236 -0
- package/es/services/project/UserSubarea.js +62 -0
- package/es/services/project/index.js +18 -0
- package/es/services/project/typings.d.ts +1609 -0
- package/es/services/request.js +196 -0
- package/es/shims.x6.d.ts +15 -0
- package/es/typings.d.ts +182 -0
- package/es/utils/auth.js +90 -0
- package/es/utils/cssStyle.js +11 -0
- package/es/utils/decomposeMatrix.js +46 -0
- package/es/utils/events.js +7 -0
- package/es/utils/getMittMeta.js +14 -0
- package/es/utils/index.js +163 -0
- package/es/utils/isInIframe.js +8 -0
- package/es/utils/queryToObject.js +19 -0
- package/es/utils/svg.js +46 -0
- package/es/utils/type.js +3 -0
- package/es/x6Reset.css +36 -0
- package/package.json +84 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Collapse } from 'antd';
|
|
3
|
+
import { CaretRightOutlined } from '@ant-design/icons';
|
|
4
|
+
import FormBindPoint from "../../../components/FormBindPoint";
|
|
5
|
+
import { useForceUpdate } from "../../../hooks";
|
|
6
|
+
import GlobalPropsSet from "./GlobalPropSet";
|
|
7
|
+
import TitlePropsSet from "./TitlePropsSet";
|
|
8
|
+
import UnitPropsSet from "./UnitPropsSet";
|
|
9
|
+
import ValuePropsSet from "./ValuePropsSet";
|
|
10
|
+
var Panel = Collapse.Panel;
|
|
11
|
+
var PropsSet = function PropsSet() {
|
|
12
|
+
var forceUpdate = useForceUpdate();
|
|
13
|
+
return /*#__PURE__*/React.createElement(Collapse, {
|
|
14
|
+
defaultActiveKey: ['1', '2'],
|
|
15
|
+
ghost: true,
|
|
16
|
+
expandIcon: function expandIcon(_ref) {
|
|
17
|
+
var isActive = _ref.isActive;
|
|
18
|
+
return /*#__PURE__*/React.createElement(CaretRightOutlined, {
|
|
19
|
+
rotate: isActive ? 90 : 0
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Panel, {
|
|
23
|
+
header: "\u7ED1\u5B9A\u70B9\u4F4D",
|
|
24
|
+
key: "1"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(FormBindPoint, {
|
|
26
|
+
onChange: forceUpdate
|
|
27
|
+
})), /*#__PURE__*/React.createElement(Panel, {
|
|
28
|
+
header: "\u5168\u5C40",
|
|
29
|
+
key: "2"
|
|
30
|
+
}, /*#__PURE__*/React.createElement(GlobalPropsSet, null)), /*#__PURE__*/React.createElement(Panel, {
|
|
31
|
+
header: "\u70B9\u4F4D\u72B6\u6001",
|
|
32
|
+
key: "3"
|
|
33
|
+
}, /*#__PURE__*/React.createElement(ValuePropsSet, null)), /*#__PURE__*/React.createElement(Panel, {
|
|
34
|
+
header: "\u6807\u9898",
|
|
35
|
+
key: "4"
|
|
36
|
+
}, /*#__PURE__*/React.createElement(TitlePropsSet, null)), /*#__PURE__*/React.createElement(Panel, {
|
|
37
|
+
header: "\u540E\u7F00",
|
|
38
|
+
key: "5"
|
|
39
|
+
}, /*#__PURE__*/React.createElement(UnitPropsSet, null)));
|
|
40
|
+
};
|
|
41
|
+
export default PropsSet;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
padding: 3px 6px;
|
|
8
|
+
user-select: none;
|
|
9
|
+
}
|
|
10
|
+
.label {
|
|
11
|
+
margin-right: 4px;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
}
|
|
14
|
+
.value {
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
.unit {
|
|
19
|
+
margin-left: 4px;
|
|
20
|
+
font-size: 0.5em;
|
|
21
|
+
}
|
|
22
|
+
.flex-col {
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
}
|
|
25
|
+
.flex-col-reverse {
|
|
26
|
+
flex-direction: column-reverse;
|
|
27
|
+
}
|
|
28
|
+
.flex-row {
|
|
29
|
+
flex-direction: row;
|
|
30
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { Graph } from '@antv/x6';
|
|
16
|
+
import ElePointValueComponent from "./Component";
|
|
17
|
+
import { ReactShapeBase } from "../reactShapeBase";
|
|
18
|
+
export var shapeName = 'ele-point-value';
|
|
19
|
+
var ElePointValue = /*#__PURE__*/function (_ReactShapeBase) {
|
|
20
|
+
_inherits(ElePointValue, _ReactShapeBase);
|
|
21
|
+
var _super = _createSuper(ElePointValue);
|
|
22
|
+
function ElePointValue() {
|
|
23
|
+
var _this;
|
|
24
|
+
_classCallCheck(this, ElePointValue);
|
|
25
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
+
args[_key] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
29
|
+
_this.shapeName = shapeName;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
return _createClass(ElePointValue);
|
|
33
|
+
}(ReactShapeBase);
|
|
34
|
+
ElePointValue.shapeName = shapeName;
|
|
35
|
+
/** 注册的 react 组件名称 */
|
|
36
|
+
var registerComponentName = "".concat(ElePointValue.shapeName, "-component");
|
|
37
|
+
export var defaultConfig = {
|
|
38
|
+
shape: ElePointValue.shapeName,
|
|
39
|
+
width: 60,
|
|
40
|
+
height: 28,
|
|
41
|
+
data: {
|
|
42
|
+
pointList: [],
|
|
43
|
+
pointListLimit: 1,
|
|
44
|
+
label: {
|
|
45
|
+
text: ''
|
|
46
|
+
},
|
|
47
|
+
unit: {
|
|
48
|
+
isShow: true
|
|
49
|
+
},
|
|
50
|
+
value: {},
|
|
51
|
+
events: [{
|
|
52
|
+
type: 'click',
|
|
53
|
+
action: 'show-point-history'
|
|
54
|
+
}]
|
|
55
|
+
},
|
|
56
|
+
component: registerComponentName
|
|
57
|
+
};
|
|
58
|
+
ElePointValue.config(defaultConfig);
|
|
59
|
+
|
|
60
|
+
// 注册 react 组件
|
|
61
|
+
Graph.registerReactComponent(registerComponentName, /*#__PURE__*/React.createElement(ElePointValueComponent, null));
|
|
62
|
+
export { ElePointValueComponent };
|
|
63
|
+
export default ElePointValue;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { memo } from 'react';
|
|
9
|
+
import { Tooltip } from 'antd';
|
|
10
|
+
import { getValueByExpression } from "../utils";
|
|
11
|
+
import { reactShapeNodeAreEqual } from "../utils";
|
|
12
|
+
import { usePointWatch, useEleEventHandle } from "../../hooks";
|
|
13
|
+
import ExpressionFormat from "../../components/ExpressionFormat";
|
|
14
|
+
import styles from "./index.css";
|
|
15
|
+
var EleShineComponent = function EleShineComponent(_ref) {
|
|
16
|
+
var _payload$pointList, _payload$mittMeta$nam, _payload$mittMeta, _payload$mittMeta2;
|
|
17
|
+
var node = _ref.node;
|
|
18
|
+
var payload = node === null || node === void 0 ? void 0 : node.getData();
|
|
19
|
+
var configPoint = payload === null || payload === void 0 ? void 0 : (_payload$pointList = payload.pointList) === null || _payload$pointList === void 0 ? void 0 : _payload$pointList[0];
|
|
20
|
+
var eventHandles = useEleEventHandle({
|
|
21
|
+
events: payload === null || payload === void 0 ? void 0 : payload.events,
|
|
22
|
+
payload: {
|
|
23
|
+
points: [{
|
|
24
|
+
identifierName: configPoint === null || configPoint === void 0 ? void 0 : configPoint.identifierName,
|
|
25
|
+
deviceId: configPoint && 'deviceId' in configPoint ? configPoint.deviceId : undefined
|
|
26
|
+
}],
|
|
27
|
+
namespace: (_payload$mittMeta$nam = payload === null || payload === void 0 ? void 0 : (_payload$mittMeta = payload.mittMeta) === null || _payload$mittMeta === void 0 ? void 0 : _payload$mittMeta.namespace) !== null && _payload$mittMeta$nam !== void 0 ? _payload$mittMeta$nam : 0
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
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);
|
|
31
|
+
var tooltipTitle = null;
|
|
32
|
+
if (!configPoint) {
|
|
33
|
+
tooltipTitle = '未绑定点位';
|
|
34
|
+
} else {
|
|
35
|
+
var _pointData$value, _pointData$unit;
|
|
36
|
+
tooltipTitle = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u540D\u79F0\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.pointName) || '-'), /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u503C\uFF1A", (_pointData$value = pointData === null || pointData === void 0 ? void 0 : pointData.value) !== null && _pointData$value !== void 0 ? _pointData$value : '-', " ", (_pointData$unit = pointData === null || pointData === void 0 ? void 0 : pointData.unit) !== null && _pointData$unit !== void 0 ? _pointData$unit : '-'), /*#__PURE__*/React.createElement("div", null, "\u66F4\u65B0\u65F6\u95F4\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.updateTime) || '-'), /*#__PURE__*/React.createElement(ExpressionFormat, {
|
|
37
|
+
bodyStyle: {
|
|
38
|
+
color: '#ff4d4f'
|
|
39
|
+
},
|
|
40
|
+
expressions: (payload === null || payload === void 0 ? void 0 : payload.shineExpressions) || [],
|
|
41
|
+
valueType: "text"
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** 是否告警 */
|
|
46
|
+
var shineExpressionsValue = getValueByExpression(pointData === null || pointData === void 0 ? void 0 : pointData.value, payload === null || payload === void 0 ? void 0 : payload.shineExpressions);
|
|
47
|
+
if (window.scadaMode === 'edit') {
|
|
48
|
+
shineExpressionsValue = '告警';
|
|
49
|
+
}
|
|
50
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
51
|
+
title: tooltipTitle
|
|
52
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
onClick: eventHandles.onClick,
|
|
54
|
+
onContextMenu: eventHandles.onContextMenu,
|
|
55
|
+
onMouseEnter: eventHandles.onMouseEnter,
|
|
56
|
+
onMouseLeave: eventHandles.onMouseLeave,
|
|
57
|
+
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, payload === null || payload === void 0 ? void 0 : payload.fontStyles), payload === null || payload === void 0 ? void 0 : payload.borderStyles), payload === null || payload === void 0 ? void 0 : payload.fillStyles), payload === null || payload === void 0 ? void 0 : payload.margin_padding),
|
|
58
|
+
className: "".concat(styles.wrap, " ").concat(shineExpressionsValue === '告警' ? styles.shine : '')
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
export default /*#__PURE__*/memo(EleShineComponent, reactShapeNodeAreEqual);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { Form } from 'antd';
|
|
9
|
+
import { useState } from 'react';
|
|
10
|
+
import { useModel } from 'umi';
|
|
11
|
+
import DialogExpression from "../../../../components/DialogExpression";
|
|
12
|
+
import ExpressionFormat from "../../../../components/ExpressionFormat";
|
|
13
|
+
import NeedBindPointHint from "../../../../components/NeedBindPointHint";
|
|
14
|
+
import TranslateButton from "../../../../components/TranslateButton";
|
|
15
|
+
var ColorDataSet = function ColorDataSet() {
|
|
16
|
+
var _payload$pointList;
|
|
17
|
+
var _useState = useState(false),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
visibleDialogExpression = _useState2[0],
|
|
20
|
+
setVisibleDialogExpression = _useState2[1];
|
|
21
|
+
var _useModel = useModel('useEditor', function (model) {
|
|
22
|
+
return {
|
|
23
|
+
activeNode: model.activeNode
|
|
24
|
+
};
|
|
25
|
+
}),
|
|
26
|
+
activeNode = _useModel.activeNode;
|
|
27
|
+
var payload = activeNode === null || activeNode === void 0 ? void 0 : activeNode.getData();
|
|
28
|
+
var bindPoint = (_payload$pointList = payload.pointList) === null || _payload$pointList === void 0 ? void 0 : _payload$pointList[0];
|
|
29
|
+
var handleExpressionChange = function handleExpressionChange(expressions) {
|
|
30
|
+
activeNode === null || activeNode === void 0 ? void 0 : activeNode.setData({
|
|
31
|
+
shineExpressions: expressions
|
|
32
|
+
}, {
|
|
33
|
+
deep: false
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
if (!bindPoint) {
|
|
37
|
+
return /*#__PURE__*/React.createElement(NeedBindPointHint, null);
|
|
38
|
+
}
|
|
39
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form, {
|
|
40
|
+
size: "small",
|
|
41
|
+
labelCol: {
|
|
42
|
+
span: 7
|
|
43
|
+
}
|
|
44
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
45
|
+
label: "\u662F\u5426\u544A\u8B66"
|
|
46
|
+
}, /*#__PURE__*/React.createElement(TranslateButton, {
|
|
47
|
+
onClick: function onClick() {
|
|
48
|
+
return setVisibleDialogExpression(true);
|
|
49
|
+
}
|
|
50
|
+
}), /*#__PURE__*/React.createElement(ExpressionFormat, {
|
|
51
|
+
expressions: payload.shineExpressions || [],
|
|
52
|
+
valueType: "text"
|
|
53
|
+
}))), /*#__PURE__*/React.createElement(DialogExpression, {
|
|
54
|
+
valueType: "text",
|
|
55
|
+
visible: visibleDialogExpression,
|
|
56
|
+
expressions: (payload === null || payload === void 0 ? void 0 : payload.shineExpressions) || [],
|
|
57
|
+
onCancel: function onCancel() {
|
|
58
|
+
setVisibleDialogExpression(false);
|
|
59
|
+
},
|
|
60
|
+
onChange: handleExpressionChange
|
|
61
|
+
}));
|
|
62
|
+
};
|
|
63
|
+
export default ColorDataSet;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Collapse } from 'antd';
|
|
3
|
+
import { CaretRightOutlined } from '@ant-design/icons';
|
|
4
|
+
import FormBindPoint from "../../../components/FormBindPoint";
|
|
5
|
+
import OtherPropsSet from "./OtherPropsSet";
|
|
6
|
+
import { useForceUpdate } from "../../../hooks";
|
|
7
|
+
var Panel = Collapse.Panel;
|
|
8
|
+
var PropsSet = function PropsSet() {
|
|
9
|
+
var forceUpdate = useForceUpdate();
|
|
10
|
+
return /*#__PURE__*/React.createElement(Collapse, {
|
|
11
|
+
defaultActiveKey: ['1', '2'],
|
|
12
|
+
ghost: true,
|
|
13
|
+
expandIcon: function expandIcon(_ref) {
|
|
14
|
+
var isActive = _ref.isActive;
|
|
15
|
+
return /*#__PURE__*/React.createElement(CaretRightOutlined, {
|
|
16
|
+
rotate: isActive ? 90 : 0
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Panel, {
|
|
20
|
+
header: "\u7ED1\u5B9A\u70B9\u4F4D",
|
|
21
|
+
key: "1"
|
|
22
|
+
}, /*#__PURE__*/React.createElement(FormBindPoint, {
|
|
23
|
+
onChange: forceUpdate
|
|
24
|
+
})), /*#__PURE__*/React.createElement(Panel, {
|
|
25
|
+
header: "\u5176\u4ED6",
|
|
26
|
+
key: "2"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(OtherPropsSet, null)));
|
|
28
|
+
};
|
|
29
|
+
export default PropsSet;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { Graph } from '@antv/x6';
|
|
16
|
+
import EleShineComponent from "./Component";
|
|
17
|
+
import { ReactShapeBase } from "../reactShapeBase";
|
|
18
|
+
export var shapeName = 'ele-shine';
|
|
19
|
+
var EleShine = /*#__PURE__*/function (_ReactShapeBase) {
|
|
20
|
+
_inherits(EleShine, _ReactShapeBase);
|
|
21
|
+
var _super = _createSuper(EleShine);
|
|
22
|
+
function EleShine() {
|
|
23
|
+
var _this;
|
|
24
|
+
_classCallCheck(this, EleShine);
|
|
25
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26
|
+
args[_key] = arguments[_key];
|
|
27
|
+
}
|
|
28
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
29
|
+
_this.shapeName = shapeName;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
return _createClass(EleShine);
|
|
33
|
+
}(ReactShapeBase);
|
|
34
|
+
EleShine.shapeName = shapeName;
|
|
35
|
+
/** 注册的 react 组件名称 */
|
|
36
|
+
var registerComponentName = "".concat(EleShine.shapeName, "-component");
|
|
37
|
+
export var defaultConfig = {
|
|
38
|
+
shape: EleShine.shapeName,
|
|
39
|
+
width: 12,
|
|
40
|
+
height: 12,
|
|
41
|
+
data: {
|
|
42
|
+
pointListLimit: 1,
|
|
43
|
+
keepRatio: true,
|
|
44
|
+
borderStyles: {
|
|
45
|
+
borderRadius: '50%'
|
|
46
|
+
},
|
|
47
|
+
fillStyles: {
|
|
48
|
+
backgroundColor: '#ff4d4f'
|
|
49
|
+
},
|
|
50
|
+
shineExpressions: [{
|
|
51
|
+
symbolValue1: 0,
|
|
52
|
+
symbol1: '<=',
|
|
53
|
+
symbolValue2: 0,
|
|
54
|
+
symbol2: '<=',
|
|
55
|
+
value: '告警',
|
|
56
|
+
valueDisabledEdit: true
|
|
57
|
+
}],
|
|
58
|
+
events: [{
|
|
59
|
+
type: 'click',
|
|
60
|
+
action: 'show-point-history'
|
|
61
|
+
}]
|
|
62
|
+
},
|
|
63
|
+
component: registerComponentName
|
|
64
|
+
};
|
|
65
|
+
EleShine.config(defaultConfig);
|
|
66
|
+
|
|
67
|
+
// 注册 react 组件
|
|
68
|
+
Graph.registerReactComponent(registerComponentName, /*#__PURE__*/React.createElement(EleShineComponent, null));
|
|
69
|
+
export { EleShineComponent };
|
|
70
|
+
export default EleShine;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
var Tooltip = function Tooltip(_ref) {
|
|
3
|
+
var _data$switchPoint, _data$refrigerationPo, _data$frostPoint;
|
|
4
|
+
var node = _ref.node;
|
|
5
|
+
var data = node.getData();
|
|
6
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "\u98CE\u673A\u70B9\u4F4D\uFF1A", (_data$switchPoint = data.switchPoint) === null || _data$switchPoint === void 0 ? void 0 : _data$switchPoint.id), /*#__PURE__*/React.createElement("div", null, "\u5236\u51B7\u70B9\u4F4D\uFF1A", (_data$refrigerationPo = data.refrigerationPoint) === null || _data$refrigerationPo === void 0 ? void 0 : _data$refrigerationPo.id), /*#__PURE__*/React.createElement("div", null, "\u5316\u971C\u70B9\u4F4D\uFF1A", (_data$frostPoint = data.frostPoint) === null || _data$frostPoint === void 0 ? void 0 : _data$frostPoint.id));
|
|
7
|
+
};
|
|
8
|
+
export default Tooltip;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
import { NodeBase } from "../nodeBase";
|
|
15
|
+
// import emitter from '@/utils/events';
|
|
16
|
+
// import type { Events } from '@/utils/events';
|
|
17
|
+
// import { isInRange } from '@/utils';
|
|
18
|
+
|
|
19
|
+
// import Tooltip from './Tooltip';
|
|
20
|
+
var EleState = /*#__PURE__*/function (_NodeBase) {
|
|
21
|
+
_inherits(EleState, _NodeBase);
|
|
22
|
+
var _super = _createSuper(EleState);
|
|
23
|
+
// tooltipContent = Tooltip;
|
|
24
|
+
|
|
25
|
+
function EleState(metadata) {
|
|
26
|
+
var _this;
|
|
27
|
+
_classCallCheck(this, EleState);
|
|
28
|
+
_this = _super.call(this, metadata);
|
|
29
|
+
_this.shapeName = 'ele-state';
|
|
30
|
+
_this.listenPointDataUpdate();
|
|
31
|
+
_this.listenSelfRemoved();
|
|
32
|
+
return _this;
|
|
33
|
+
}
|
|
34
|
+
_createClass(EleState, [{
|
|
35
|
+
key: "listenPointDataUpdate",
|
|
36
|
+
value: function listenPointDataUpdate() {}
|
|
37
|
+
}, {
|
|
38
|
+
key: "listenSelfRemoved",
|
|
39
|
+
value: function listenSelfRemoved() {}
|
|
40
|
+
}], [{
|
|
41
|
+
key: "isEleState",
|
|
42
|
+
value: function isEleState(instance) {
|
|
43
|
+
return instance instanceof EleState;
|
|
44
|
+
}
|
|
45
|
+
}]);
|
|
46
|
+
return EleState;
|
|
47
|
+
}(NodeBase);
|
|
48
|
+
EleState.shapeName = 'ele-state';
|
|
49
|
+
export { EleState as default };
|
|
50
|
+
export var defaultConfig = {
|
|
51
|
+
width: 32,
|
|
52
|
+
height: 32,
|
|
53
|
+
markup: [{
|
|
54
|
+
tagName: 'rect',
|
|
55
|
+
selector: 'body'
|
|
56
|
+
}, {
|
|
57
|
+
tagName: 'text',
|
|
58
|
+
selector: 'label'
|
|
59
|
+
}, {
|
|
60
|
+
tagName: 'image',
|
|
61
|
+
selector: 'blade'
|
|
62
|
+
}],
|
|
63
|
+
attrs: {
|
|
64
|
+
body: {
|
|
65
|
+
// fill: '#DDDDDD',
|
|
66
|
+
fill: {
|
|
67
|
+
type: 'linearGradient',
|
|
68
|
+
stops: [{
|
|
69
|
+
offset: '0%',
|
|
70
|
+
color: '#1890FF'
|
|
71
|
+
}, {
|
|
72
|
+
offset: '100%',
|
|
73
|
+
color: '#35C3FF'
|
|
74
|
+
}],
|
|
75
|
+
attrs: {
|
|
76
|
+
x1: '0%',
|
|
77
|
+
y1: '0%',
|
|
78
|
+
x2: '0%',
|
|
79
|
+
y2: '100%'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
refWidth: '100%',
|
|
83
|
+
refHeight: '100%',
|
|
84
|
+
strokeWidth: 0,
|
|
85
|
+
rx: 6,
|
|
86
|
+
ry: 6
|
|
87
|
+
},
|
|
88
|
+
image: {
|
|
89
|
+
refX: '20%',
|
|
90
|
+
refY: '20%',
|
|
91
|
+
refWidth: '60%',
|
|
92
|
+
refHeight: '60%',
|
|
93
|
+
fill: 'red',
|
|
94
|
+
xlinkHref: 'https://utopia1994.oss-cn-shanghai.aliyuncs.com/img-bed/202111021014940.svg'
|
|
95
|
+
},
|
|
96
|
+
label: {
|
|
97
|
+
text: '温度',
|
|
98
|
+
fontSize: 12,
|
|
99
|
+
refY: '130%',
|
|
100
|
+
refX: '50%',
|
|
101
|
+
fill: 'rgba(0, 0, 0, 0.85)',
|
|
102
|
+
// 字体颜色
|
|
103
|
+
textAnchor: 'middle'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
data: {
|
|
107
|
+
keepRatio: true,
|
|
108
|
+
pointListLimit: 1,
|
|
109
|
+
events: [{
|
|
110
|
+
type: 'click',
|
|
111
|
+
action: 'show-point-history'
|
|
112
|
+
}]
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
EleState.config(defaultConfig);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
import { Markup, Node } from '@antv/x6';
|
|
15
|
+
var svg = "<svg class=\"icon\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"64\" height=\"64\">\n <defs>\n <style/>\n </defs>\n <path d=\"M524.05 909.55c-102.4 0-204.8-42.16-277.09-114.44S132.52 620.42 132.52 518.02s36.14-204.8 114.44-277.08S421.65 126.5 524.05 126.5s198.77 42.17 277.08 114.45 114.45 174.68 114.45 277.08-42.17 204.8-114.45 277.09-174.68 114.44-277.08 114.44zm0-740.9c-192.76 0-349.37 156.62-349.37 349.37S331.3 867.4 524.05 867.4 873.4 710.78 873.4 518.02 716.8 168.66 524.05 168.66z\" fill=\"#515151\"/>\n <path d=\"M771.01 505.98c-6.02 0-12.05-6.03-12.05-12.05 0-72.28-24.09-132.52-78.3-168.66-6.02-6.02-6.02-12.05-6.02-12.05l12.04-6.02c30.12 18.07 54.21 42.16 66.26 72.28 18.07 30.12 24.1 72.28 24.1 114.45 0 6.02-6.03 12.05-6.03 12.05zm-66.26-18.07c-6.02 0-12.04-6.03-12.04-12.05 0-36.14-12.05-72.28-42.17-84.33-6.02-6.02-6.02-12.05-6.02-12.05l12.04-6.02c30.12 18.07 54.22 60.23 48.2 102.4 6.02 12.05 6.02 12.05 0 12.05zm-102.4-174.69c-24.1-12.04-54.2-18.07-84.33-18.07v-18.07c30.12 0 60.24 6.03 90.36 18.07 6.02 0-6.03 18.07-6.03 18.07zM277.08 487.91c-6.02 0-12.04 0-12.04-6.03 0-18.07 0-36.14 6.02-48.19 12.05-60.23 54.21-114.44 108.42-150.58 6.03-6.03 12.05 0 12.05 6.02 6.02 6.02 0 12.05-6.02 12.05-48.2 24.1-84.33 78.3-96.38 132.51 0 18.07-6.02 30.12-6.02 48.2 0 6.02 0 6.02-6.03 6.02zm60.24-24.1c-6.03 0-12.05-6.02-12.05-12.05 0-12.04 0-18.07 6.02-30.11 6.03-30.12 30.12-60.24 60.24-78.3 6.02-6.03 12.05 0 12.05 6.01 6.02 6.03 0 12.05-6.03 12.05-24.1 12.05-42.16 42.17-48.19 66.26v24.1c0 6.02-6.02 12.04-12.04 12.04zM512 783.06c-48.19 0-90.35-12.05-132.52-42.17-6.02-6.02-6.02-12.04 0-12.04s12.05-6.03 12.05 0c36.14 24.1 78.3 36.14 120.47 36.14 36.14 0 66.26-6.03 96.38-24.1 6.02 0 12.04 0 12.04 6.03s0 12.04-6.02 12.04c-30.12 18.08-66.26 24.1-102.4 24.1z\" fill=\"#515151\"/>\n <path d=\"M505.98 740.9c-24.1 0-42.17-6.03-60.24-18.08-6.02-6.02-6.02-12.04 0-12.04 6.02-6.03 12.05-6.03 12.05 0 18.07 12.04 36.14 18.07 54.21 18.07 12.05 0 30.12-6.03 42.16-12.05 6.03 0 12.05 0 12.05 6.02s0 12.05-6.02 12.05c-18.07 0-36.14 6.02-54.21 6.02z\" fill=\"#515151\"/>\n <path d=\"M897.5 999.9H138.55c-54.21 0-102.4-42.16-102.4-102.4V132.53c0-54.21 42.17-102.4 102.4-102.4h764.99c54.21 0 102.4 42.16 102.4 102.4V897.5c-6.02 54.2-54.21 102.4-108.42 102.4zM138.55 78.3c-30.12 0-60.23 24.1-60.23 60.24v764.99c0 30.12 24.09 60.23 60.23 60.23h764.99c30.12 0 60.23-24.09 60.23-60.23V132.52c0-30.12-24.09-60.24-60.23-60.24-6.02 6.03-764.99 6.03-764.99 6.03z\" fill=\"#515151\"/>\n <path d=\"M596.33 307.2c30.12 96.38-42.17 204.8-78.3 216.85 18.06-138.54-36.15-120.47-54.22-174.69-6.02-30.11-6.02-72.28 42.17-84.32 42.16-12.05 72.28 0 90.35 42.16z\" fill=\"#515151\"/>\n <path d=\"M493.93 548.14l6.02-30.12c6.03-42.16 6.03-66.26 0-84.33-12.04-18.07-18.07-24.09-24.1-36.14-12.04-12.04-24.09-24.1-30.1-42.16-18.08-54.21 6.01-96.38 54.2-114.45 54.21-18.07 96.38 6.02 114.45 60.24 18.07 66.26 0 126.5-18.07 156.6-18.07 42.17-48.19 72.3-72.28 84.34l-30.12 6.02zm-12.05-204.8c6.03 12.05 12.05 18.07 24.1 24.1 6.02 12.04 18.07 24.09 30.11 54.2 0 12.05 6.03 30.12 6.03 48.2 6.02-12.05 12.04-18.08 18.07-36.15 12.05-24.09 30.12-72.28 12.05-126.49-12.05-30.12-30.12-42.16-60.24-30.12-18.07 12.05-36.14 24.1-30.12 66.26z\" fill=\"#515151\"/>\n <path d=\"M656.56 698.73c-96.37-30.12-150.58-144.57-138.54-180.7 108.43 90.35 120.47 36.13 174.69 48.18 24.09 6.03 60.23 30.12 48.18 84.33-12.04 36.14-42.16 60.24-84.33 48.19z\" fill=\"#515151\"/>\n <path d=\"M680.66 722.82c-6.02 0-18.07 0-30.12-6.02-66.26-18.07-102.4-66.26-120.47-96.38-30.12-36.14-42.16-78.3-36.14-108.42 0-6.02 6.02-12.05 12.05-12.05s12.04 0 18.07 6.03c36.14 24.1 60.23 36.14 78.3 42.16 18.07 6.02 24.1 0 36.14 0 12.05-6.02 30.12-6.02 54.22 0 54.2 18.07 78.3 54.21 60.23 108.42-6.02 42.17-36.14 66.26-72.28 66.26zm-18.07-42.16c30.12 6.02 48.19-6.02 60.23-36.14 6.03-18.07 6.03-42.17-36.14-60.24h-36.14c-12.05 6.03-36.14 6.03-60.23 0-12.05 0-30.12-6.02-48.2-18.07l18.08 36.14c18.07 24.1 48.19 60.24 102.4 78.3z\" fill=\"#515151\"/>\n <path d=\"M295.15 560.19c72.29-72.28 198.78-66.26 222.87-36.14-132.51 54.2-84.33 90.35-126.5 132.51-18.06 18.08-54.2 42.17-96.37 6.03-24.1-36.14-30.11-66.26 0-102.4z\" fill=\"#515151\"/>\n <path d=\"M343.34 698.73c-18.07 0-42.16-6.02-60.23-24.1-36.15-42.16-42.17-90.35 0-126.49 48.18-48.19 108.42-60.23 144.56-60.23 48.19-6.03 90.35 6.02 108.42 24.09 6.03 0 6.03 6.02 6.03 12.05s-6.03 12.04-12.05 18.07c-36.14 18.07-60.23 30.12-72.28 42.16-12.05 12.05-12.05 24.1-18.07 36.14-6.03 12.05-6.03 30.12-24.1 48.2-24.1 18.06-48.18 30.1-72.28 30.1zm-30.12-126.5c-24.1 24.1-18.07 48.2 0 66.26 12.05 12.05 36.14 30.12 66.26 0 6.03-12.04 12.05-18.07 12.05-30.11 6.02-18.07 12.05-36.14 30.12-54.22 12.04-12.04 24.1-24.09 42.16-30.11h-42.16c-24.1 0-72.29 12.04-108.43 48.19z\" fill=\"#515151\"/>\n <path d=\"M463.81 518.02c0 30.12 24.1 54.22 54.21 54.22s54.22-24.1 54.22-54.22-24.1-54.2-54.22-54.2c-30.11 6.02-54.2 24.09-54.2 54.2z\" fill=\"#515151\"/>\n <path d=\"M518.02 590.3c-42.16 0-72.28-30.11-72.28-72.28s30.12-72.28 72.28-72.28 72.29 36.14 72.29 72.28-30.12 72.29-72.29 72.29zm0-102.4c-18.07 0-30.11 12.05-30.11 30.12s12.04 30.12 30.11 30.12 30.12-12.05 30.12-30.12-12.05-30.11-30.12-30.11zM108.42 150.6c0 24.1 18.07 42.16 42.17 42.16s42.16-18.07 42.16-42.16-18.07-42.17-42.16-42.17c-24.1 0-42.17 18.07-42.17 42.17zm746.92 42.16c0 12.05 12.05 18.07 18.07 18.07s18.07-12.04 18.07-18.07-12.04-18.07-18.07-18.07-18.07 6.03-18.07 18.07z\" fill=\"#515151\"/>\n <path d=\"M132.52 192.75c0 12.05 12.04 18.07 18.07 18.07 12.05 0 18.07-12.04 18.07-18.07 0-12.04-12.05-18.07-18.07-18.07-12.05 0-18.07 6.03-18.07 18.07zm704.75-42.16c0 24.1 18.07 42.16 42.17 42.16 24.09 0 42.16-18.07 42.16-42.16 0-24.1-18.07-42.17-42.16-42.17-24.1 0-42.17 18.07-42.17 42.17z\" fill=\"#515151\"/>\n</svg>\n";
|
|
16
|
+
var _Markup$xml2json = Markup.xml2json(svg),
|
|
17
|
+
markup = _Markup$xml2json.markup,
|
|
18
|
+
attrs = _Markup$xml2json.attrs;
|
|
19
|
+
var EleSvg = /*#__PURE__*/function (_Node) {
|
|
20
|
+
_inherits(EleSvg, _Node);
|
|
21
|
+
var _super = _createSuper(EleSvg);
|
|
22
|
+
function EleSvg() {
|
|
23
|
+
_classCallCheck(this, EleSvg);
|
|
24
|
+
return _super.apply(this, arguments);
|
|
25
|
+
}
|
|
26
|
+
return _createClass(EleSvg);
|
|
27
|
+
}(Node);
|
|
28
|
+
EleSvg.shapeName = 'ele-svg';
|
|
29
|
+
export { EleSvg as default };
|
|
30
|
+
EleSvg.config({
|
|
31
|
+
width: 40,
|
|
32
|
+
height: 40,
|
|
33
|
+
markup: markup,
|
|
34
|
+
attrs: attrs
|
|
35
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { memo, useState, useEffect } from 'react';
|
|
9
|
+
import { Tooltip } from 'antd';
|
|
10
|
+
import Switch from "../../components/Switch";
|
|
11
|
+
import { usePointWatch } from "../../hooks";
|
|
12
|
+
import { isNumber } from "../../utils";
|
|
13
|
+
import { pointWrite } from "../utils";
|
|
14
|
+
import styles from "./index.css";
|
|
15
|
+
var EleSwitchComponent = function EleSwitchComponent(_ref) {
|
|
16
|
+
var _payload$pointList, _payload$mittMeta;
|
|
17
|
+
var node = _ref.node;
|
|
18
|
+
var _useState = useState(false),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
value = _useState2[0],
|
|
21
|
+
setValue = _useState2[1];
|
|
22
|
+
var payload = node === null || node === void 0 ? void 0 : node.getData();
|
|
23
|
+
var configPoint = payload === null || payload === void 0 ? void 0 : (_payload$pointList = payload.pointList) === null || _payload$pointList === void 0 ? void 0 : _payload$pointList[0];
|
|
24
|
+
var pointData = usePointWatch(configPoint, payload === null || payload === void 0 ? void 0 : (_payload$mittMeta = payload.mittMeta) === null || _payload$mittMeta === void 0 ? void 0 : _payload$mittMeta.namespace);
|
|
25
|
+
var tooltipTitle = null;
|
|
26
|
+
if (!configPoint) {
|
|
27
|
+
tooltipTitle = '未绑定点位';
|
|
28
|
+
} else {
|
|
29
|
+
var _pointData$value, _pointData$unit;
|
|
30
|
+
tooltipTitle = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u540D\u79F0\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.pointName) || '-'), /*#__PURE__*/React.createElement("div", null, "\u70B9\u4F4D\u503C\uFF1A", (_pointData$value = pointData === null || pointData === void 0 ? void 0 : pointData.value) !== null && _pointData$value !== void 0 ? _pointData$value : '-', " ", (_pointData$unit = pointData === null || pointData === void 0 ? void 0 : pointData.unit) !== null && _pointData$unit !== void 0 ? _pointData$unit : '-'), /*#__PURE__*/React.createElement("div", null, "\u66F4\u65B0\u65F6\u95F4\uFF1A", (pointData === null || pointData === void 0 ? void 0 : pointData.updateTime) || '-'));
|
|
31
|
+
}
|
|
32
|
+
var handleChange = function handleChange(val) {
|
|
33
|
+
if (window.scadaMode === 'edit' || !configPoint || !(payload === null || payload === void 0 ? void 0 : payload.pointWriteable)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
var checkedValue = payload.checkedValue,
|
|
37
|
+
unCheckedValue = payload.unCheckedValue;
|
|
38
|
+
pointWrite({
|
|
39
|
+
identifierName: configPoint.identifierName,
|
|
40
|
+
pointId: 'pointId' in configPoint ? configPoint.pointId : undefined,
|
|
41
|
+
deviceId: 'deviceId' in configPoint ? configPoint.deviceId : undefined,
|
|
42
|
+
value: val ? checkedValue : unCheckedValue
|
|
43
|
+
});
|
|
44
|
+
setValue(val);
|
|
45
|
+
};
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
if (isNumber(pointData === null || pointData === void 0 ? void 0 : pointData.value) && isNumber(payload === null || payload === void 0 ? void 0 : payload.checkedValue) && (pointData === null || pointData === void 0 ? void 0 : pointData.value) === (payload === null || payload === void 0 ? void 0 : payload.checkedValue)) {
|
|
48
|
+
setValue(true);
|
|
49
|
+
} else {
|
|
50
|
+
setValue(false);
|
|
51
|
+
}
|
|
52
|
+
}, [pointData === null || pointData === void 0 ? void 0 : pointData.value, payload === null || payload === void 0 ? void 0 : payload.checkedValue]);
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: styles.wrap
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
56
|
+
title: tooltipTitle
|
|
57
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
58
|
+
onChange: handleChange,
|
|
59
|
+
unCheckedColor: payload === null || payload === void 0 ? void 0 : payload.unCheckedColor,
|
|
60
|
+
checkedColor: payload === null || payload === void 0 ? void 0 : payload.checkedColor,
|
|
61
|
+
value: value,
|
|
62
|
+
width: "100%",
|
|
63
|
+
height: "100%"
|
|
64
|
+
})));
|
|
65
|
+
};
|
|
66
|
+
export default /*#__PURE__*/memo(EleSwitchComponent);
|