mixdashboards 1.0.47 → 1.0.49
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/dist/{EChartComponentBase-CQYZ0922.js → EChartComponentBase-CafVdj74.js} +1 -1
- package/dist/{EChartComponentBase-DRY0bLOI.cjs → EChartComponentBase-Dz5E-lyI.cjs} +1 -1
- package/dist/{UniverSheet-CJP8jNCA.cjs → UniverSheet-BqLvs6V6.cjs} +1 -1
- package/dist/{UniverSheet-BWB0aXry.js → UniverSheet-CH1YywcZ.js} +2 -2
- package/dist/{accelerationChart-CiK-Qd4o.cjs → accelerationChart-BWRlw5-L.cjs} +1 -1
- package/dist/{accelerationChart-BE04sofp.js → accelerationChart-V4UmpPse.js} +3 -3
- package/dist/{actionItem-7rT4wvbt.js → actionItem-CBwfWvTO.js} +3 -3
- package/dist/{actionItem-BNzvi8fB.cjs → actionItem-Dsg6qYSp.cjs} +1 -1
- package/dist/{alarmLevelChart-DbIf9kQc.js → alarmLevelChart-CnKEZZZv.js} +2 -2
- package/dist/{alarmLevelChart-JTbC7581.cjs → alarmLevelChart-DN8hyTdg.cjs} +1 -1
- package/dist/{alertTable-CW-9nTxG.js → alertTable-BluC1smp.js} +2 -2
- package/dist/{alertTable-3Fq9oPQa.cjs → alertTable-CdkiAZIu.cjs} +1 -1
- package/dist/{annualRainfallChart-BFadflcO.cjs → annualRainfallChart-BeenDSmW.cjs} +1 -1
- package/dist/{annualRainfallChart-Cg2tZJFq.js → annualRainfallChart-COeieHTg.js} +2 -2
- package/dist/{api-DAUw_RyI.js → api-Cyx2Fha0.js} +3 -3
- package/dist/{api-CsM841lz.cjs → api-nw_9niqv.cjs} +1 -1
- package/dist/{aqi-CSNzCt6A.cjs → aqi-BXtF-SsB.cjs} +1 -1
- package/dist/{aqi-DMhNfLSS.js → aqi-naf_yg1B.js} +3 -3
- package/dist/{aqiIndass-LhWIw1L-.js → aqiIndass-CiHVV6y-.js} +2 -2
- package/dist/{aqiIndass-CbnX8jy1.cjs → aqiIndass-YO0txxEM.cjs} +1 -1
- package/dist/{arrayCard-Fl5xZbvQ.js → arrayCard-CPtHFB--.js} +2 -2
- package/dist/{arrayCard-D6Yzq7nX.cjs → arrayCard-USJyzspe.cjs} +1 -1
- package/dist/{audio-PoEUMLRp.js → audio-7HMku35Z.js} +4 -4
- package/dist/{audio-R7LCUpjr.cjs → audio-Uz_XIJyA.cjs} +1 -1
- package/dist/{bar-CJv74yw7.js → bar-Bq_RDVaa.js} +4 -4
- package/dist/{bar-CIWKC7cd.cjs → bar-CSideFNS.cjs} +1 -1
- package/dist/{bmp-B5d3cPx5.js → bmp-BF-OdMoW.js} +3 -3
- package/dist/{bmp-DVNypten.cjs → bmp-DZ9_aKMT.cjs} +1 -1
- package/dist/{box--lry72SE.cjs → box-C1n5r8hT.cjs} +1 -1
- package/dist/{box-Da5gDSqP.js → box-DfqNW1B6.js} +2 -2
- package/dist/{chartConfigPanel-BvbDCHoU.js → chartConfigPanel-8wROQoL0.js} +1 -1
- package/dist/{chartConfigPanel-B8FYxnZb.cjs → chartConfigPanel-C62JqDqE.cjs} +1 -1
- package/dist/{circleBar-2Si4M0J8.js → circleBar-C54UQvaf.js} +3 -3
- package/dist/{circleBar-B-e8HYux.cjs → circleBar-UrV2_yVK.cjs} +1 -1
- package/dist/{clock-DGtbfiIm.js → clock-CbebZdlU.js} +2 -2
- package/dist/{clock-CF9OvH6i.cjs → clock-DgkEPumE.cjs} +1 -1
- package/dist/{clt-BD_Q3tyx.js → clt-B32D8bK9.js} +3 -3
- package/dist/{clt-CXcGotkx.cjs → clt-DWBynZO1.cjs} +1 -1
- package/dist/{cmc-Bt7H4Q8b.cjs → cmc-BVrFcoih.cjs} +1 -1
- package/dist/{cmc-C_UjLQvo.js → cmc-CC-6njzU.js} +3 -3
- package/dist/{cmp-DWI9Y7Oz.js → cmp-BCvtkNwO.js} +3 -3
- package/dist/{cmp-CdfaXTm_.cjs → cmp-D6aHhSC6.cjs} +1 -1
- package/dist/{composite-Dc4QkCcc.js → composite-CWYjAAsg.js} +3 -3
- package/dist/{composite-C7BE3mkS.cjs → composite-kODICk08.cjs} +1 -1
- package/dist/{controlList-DQWfqJLF.cjs → controlList-BXvCyR2L.cjs} +1 -1
- package/dist/{controlList-B8dEMDkH.js → controlList-zYX8DbNE.js} +3 -3
- package/dist/{controlRecordList-CLfY8XsN.js → controlRecordList-Bc2M0iyo.js} +3 -3
- package/dist/{controlRecordList-B8xmY2wh.cjs → controlRecordList-Dly5aorA.cjs} +1 -1
- package/dist/{crd-dBlZavms.cjs → crd--3Oj3Y1t.cjs} +1 -1
- package/dist/{crd-BE7bxQCV.js → crd-CoB00gS6.js} +2 -2
- package/dist/{ctrBtn-CtS30Duz.cjs → ctrBtn-BusKAhHv.cjs} +1 -1
- package/dist/{ctrBtn-NbVm0_9a.js → ctrBtn-CUADz_pu.js} +4 -4
- package/dist/{ctrSet-BNVppkzh.js → ctrSet-BKVsejze.js} +4 -4
- package/dist/{ctrSet-AYfzoAjr.cjs → ctrSet-C0R2aIby.cjs} +1 -1
- package/dist/{ctrSwitch-SvqyuNMs.js → ctrSwitch-BqRBh40z.js} +4 -4
- package/dist/{ctrSwitch-DvgqH5Zq.cjs → ctrSwitch-uIqQRKaq.cjs} +1 -1
- package/dist/{dataManagement-DDAGR2Zs.cjs → dataManagement-BdP1iSeC.cjs} +1 -1
- package/dist/{dataManagement-D4yFedxJ.js → dataManagement-C6jHI7-1.js} +2 -2
- package/dist/{dataReport-DN0yZtS2.js → dataReport-C2XWn_Xv.js} +2 -2
- package/dist/{dataReport-lflcAgwv.cjs → dataReport-DNPD3MZl.cjs} +1 -1
- package/dist/{dataTable--ZzYF0m4.js → dataTable-5bUrqBWz.js} +1 -1
- package/dist/{dataTable-C1AeOvHe.cjs → dataTable-BvlEs83r.cjs} +1 -1
- package/dist/{datetime-B4lktfti.cjs → datetime-CE5wsyi7.cjs} +1 -1
- package/dist/{datetime-CRxM48pG.js → datetime-Dp8mPzSO.js} +2 -2
- package/dist/{deepClusterSlipSurface-CsXZnbol.cjs → deepClusterSlipSurface-BinAmtCz.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-jbVue8lK.js → deepClusterSlipSurface-D_7LRpHz.js} +3 -3
- package/dist/{deepDataMatrix-D08J4nfA.js → deepDataMatrix-BXTJm6UD.js} +2 -2
- package/dist/{deepDataMatrix-CdbDYkh1.cjs → deepDataMatrix-t6axw0An.cjs} +1 -1
- package/dist/{deepDisplacement3D-DTVDR3Em.cjs → deepDisplacement3D-BRutQ6Ut.cjs} +1 -1
- package/dist/{deepDisplacement3D-Dqh03kLT.js → deepDisplacement3D-Cy-FIGAq.js} +3 -3
- package/dist/{deepDisplacementChart-B72y4A4Q.js → deepDisplacementChart---DgDx8L.js} +2 -2
- package/dist/{deepDisplacementChart-CnAJ3arx.js → deepDisplacementChart-BWVcNgaX.js} +4 -4
- package/dist/{deepDisplacementChart-ccBRKTeg.cjs → deepDisplacementChart-DboPezyJ.cjs} +1 -1
- package/dist/{deepDisplacementChart-Be6UqmJN.cjs → deepDisplacementChart-eD2GOxML.cjs} +1 -1
- package/dist/{deepDisplacementView-DoJclaK2.cjs → deepDisplacementView-BNVTS7Ar.cjs} +1 -1
- package/dist/{deepDisplacementView-BRnskO-S.js → deepDisplacementView-CHFgG2wy.js} +1 -1
- package/dist/{deepNodeTemperatureChart-Cmvs1LI7.cjs → deepNodeTemperatureChart-CpJI7axl.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-CtPE4BFq.js → deepNodeTemperatureChart-N1z-KMmu.js} +3 -3
- package/dist/{deepTangentAngleChart-Dkh9kDJY.js → deepTangentAngleChart-ClnxPvUM.js} +3 -3
- package/dist/{deepTangentAngleChart-BqZzc_RS.cjs → deepTangentAngleChart-DxB4EaWm.cjs} +1 -1
- package/dist/{deepTemperatureField-Cm18SLto.js → deepTemperatureField-DT7iyND9.js} +3 -3
- package/dist/{deepTemperatureField-BByMhon_.cjs → deepTemperatureField-DWO8Dcjh.cjs} +1 -1
- package/dist/{deepTrendChart-BoDcH88s.js → deepTrendChart-C7_BfEiR.js} +3 -3
- package/dist/{deepTrendChart-FoMxS9EI.cjs → deepTrendChart-D9uQKgck.cjs} +1 -1
- package/dist/{deviceOnlineStatus-DsKQeLmt.cjs → deviceOnlineStatus-BA7D5fbt.cjs} +1 -1
- package/dist/{deviceOnlineStatus-DYQkhQsg.js → deviceOnlineStatus-DlrB6EXN.js} +2 -2
- package/dist/{deviceStatus-BCOou44x.js → deviceStatus-aPf8MflS.js} +2 -2
- package/dist/{deviceStatus-BWQtb9Mi.cjs → deviceStatus-mDl8zF_Z.cjs} +1 -1
- package/dist/{displacementDataTable-B85PTW_G.cjs → displacementDataTable-Co4In07D.cjs} +1 -1
- package/dist/{displacementDataTable-R8nTN3L8.js → displacementDataTable-Da1xkiXG.js} +2 -2
- package/dist/{displacementTrajectoryChart-BSEi-hRr.js → displacementTrajectoryChart-B85ad8vc.js} +3 -3
- package/dist/{displacementTrajectoryChart-lycYTQxe.cjs → displacementTrajectoryChart-FPrvrbUa.cjs} +1 -1
- package/dist/{displacementTrendChart-D8IuzbRv.js → displacementTrendChart-BRxIsjeK.js} +2 -2
- package/dist/{displacementTrendChart-BQO8Eznx.cjs → displacementTrendChart-DcBu8-_Z.cjs} +1 -1
- package/dist/{dxf-5s9RTKqm.cjs → dxf-EDkdonhJ.cjs} +1 -1
- package/dist/{dxf-BV__k04Q.js → dxf-FrPSVW4C.js} +4 -4
- package/dist/{dzc-BGPhJ-St.cjs → dzc-BBijV6-m.cjs} +1 -1
- package/dist/{dzc-D6aciipN.js → dzc-BOaL7miE.js} +3 -3
- package/dist/{element-resize-detector-B-0BgVLy.js → element-resize-detector-BCRzpPES.js} +4 -4
- package/dist/{element-resize-detector-BvkAwVg8.cjs → element-resize-detector-DYs3pJPp.cjs} +1 -1
- package/dist/{evn-COCxFd08.cjs → evn-CAWNNpK2.cjs} +1 -1
- package/dist/{evn-Dr19A1zo.js → evn-T-0VLXht.js} +2 -2
- package/dist/{evolutionChart-C9r2yUYj.cjs → evolutionChart-B8vzbfrk.cjs} +1 -1
- package/dist/{evolutionChart-pMtNKqkK.js → evolutionChart-DYf3V-rl.js} +3 -3
- package/dist/{fileViewer-BgkyDwyJ.js → fileViewer-BRVwWDA3.js} +4 -4
- package/dist/{fileViewer-DtOwluP2.cjs → fileViewer-D6rC0YFY.cjs} +1 -1
- package/dist/{filterBar-CDBwgkGb.cjs → filterBar-B3Ka4jw8.cjs} +1 -1
- package/dist/{filterBar-DMzt6Mud.js → filterBar-hfIbyNh_.js} +2 -2
- package/dist/{fireCombustionCurve-D5gRdu46.js → fireCombustionCurve-D1wKpm4i.js} +2 -2
- package/dist/{fireCombustionCurve-cvFl1WHh.cjs → fireCombustionCurve-DKQJzKh2.cjs} +1 -1
- package/dist/{fireFilterBar-CNMAFXr5.js → fireFilterBar-Bl0iCn48.js} +2 -2
- package/dist/{fireFilterBar-DPismk7o.cjs → fireFilterBar-D8TTM4KM.cjs} +1 -1
- package/dist/{gag-Axg1ovwC.js → gag-Vt7-rYYR.js} +2 -2
- package/dist/{gag-C34ZOxdk.cjs → gag-dKpxHBTV.cjs} +1 -1
- package/dist/{gasStationList-Bz9w4T9z.js → gasStationList-BDRHTLvR.js} +416 -357
- package/dist/gasStationList-g4AUNuxi.cjs +1 -0
- package/dist/{glbModel-CfO76ZcK.cjs → glbModel-BCgQzSz1.cjs} +1 -1
- package/dist/{glbModel-BzKQ2kUi.js → glbModel-BpnMbHQe.js} +2 -2
- package/dist/{gnssFilterBar-CGvbDUCu.cjs → gnssFilterBar-BgS-JH3k.cjs} +1 -1
- package/dist/{gnssFilterBar-GDvX4_p8.js → gnssFilterBar-CaGGhgEk.js} +2 -2
- package/dist/{gnssHistoryTable-DKFJnMPu.cjs → gnssHistoryTable-Bkt4Zvxa.cjs} +1 -1
- package/dist/{gnssHistoryTable-DTN1gZMt.js → gnssHistoryTable-CGY1ROb6.js} +3 -3
- package/dist/{gnssMapView-CT-XahN-.js → gnssMapView-C4-pk-1_.js} +2 -2
- package/dist/{gnssMapView-YpBcjDJ9.cjs → gnssMapView-DuNotJym.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-iZPRyPen.js → gnssTimeSeriesChart-MZbERhu9.js} +4 -4
- package/dist/{gnssTimeSeriesChart-BU5wQTYd.cjs → gnssTimeSeriesChart-y7L6j_y5.cjs} +1 -1
- package/dist/{gnssXYTrajectory-C-WzUbAW.js → gnssXYTrajectory-DL8WWe1C.js} +3 -3
- package/dist/{gnssXYTrajectory-R_i0mY-j.cjs → gnssXYTrajectory-DZFjqFPv.cjs} +1 -1
- package/dist/{grd-CGigUZ7q.js → grd-BgaxrUfI.js} +3 -3
- package/dist/{grd-BPXiohye.cjs → grd-DNJ1rlwR.cjs} +1 -1
- package/dist/{grdIndass-D800xVzH.js → grdIndass-Bxf2L3J5.js} +3 -3
- package/dist/{grdIndass-DKD_3XkD.cjs → grdIndass-DlwlkKKH.cjs} +1 -1
- package/dist/{grg-CNou8dMo.js → grg-78Sh9Nr7.js} +2 -2
- package/dist/{grg-BGSppQcI.cjs → grg-CmxBlYJ6.cjs} +1 -1
- package/dist/{gridview-B5B7gPOT.js → gridview-BWe_qLy-.js} +2 -2
- package/dist/{gridview-BhtVLKUD.cjs → gridview-FFx-3wNz.cjs} +1 -1
- package/dist/{groupCard-yQmb7VH_.js → groupCard-B2ORsgUN.js} +2 -2
- package/dist/{groupCard-BBmOnpyI.cjs → groupCard-BOqERSM4.cjs} +1 -1
- package/dist/{headerBar-CWGye11m.js → headerBar-DPlPX8uD.js} +3 -3
- package/dist/{headerBar-BNfQmsFC.cjs → headerBar-o2J2Dqkd.cjs} +1 -1
- package/dist/{history-BlHYyu1s.cjs → history-5W6pGCPq.cjs} +1 -1
- package/dist/{history-oKCbbOLM.js → history-DH68UK_U.js} +3 -3
- package/dist/{index-C8teBAQd.js → index-LgTfdmT4.js} +1795 -1754
- package/dist/{index-BSzyUGIT.cjs → index-ZwyqrmaH.cjs} +7 -7
- package/dist/{insarDeformChart-DE67w_u4.js → insarDeformChart-9Qss0VGu.js} +2 -2
- package/dist/{insarDeformChart-DSrGvm7x.cjs → insarDeformChart-BTwU5ktS.cjs} +1 -1
- package/dist/{insarImageViewer-Ctp0wqIt.cjs → insarImageViewer-B-ExpEa8.cjs} +1 -1
- package/dist/{insarImageViewer-B4-PsYRV.js → insarImageViewer-C7aTZp-m.js} +2 -2
- package/dist/{kds-Enim5bJp.cjs → kds-8n-a2GhL.cjs} +1 -1
- package/dist/{kds-Dx_GiIEm.js → kds-CS7G3BaQ.js} +2 -2
- package/dist/{layerTabs-D3YRlheV.cjs → layerTabs-1lOAiEhu.cjs} +1 -1
- package/dist/{layerTabs-BFiu4lIL.js → layerTabs-pJJzTbu9.js} +2 -2
- package/dist/{lin-uY94Ojnz.js → lin-Bk49Db_G.js} +3 -3
- package/dist/{lin-CkjPgG_B.cjs → lin-IHxWU55I.cjs} +1 -1
- package/dist/{linIndass-qABT3VEJ.cjs → linIndass-Cpf8pnLn.cjs} +1 -1
- package/dist/{linIndass-C8gREDKn.js → linIndass-Drxnj7KQ.js} +2 -2
- package/dist/{lst-D5g7DrtQ.js → lst-CL6bmgJ2.js} +2 -2
- package/dist/{lst-BFKnMtL5.cjs → lst-CPd37vza.cjs} +1 -1
- package/dist/{manualEntry-Bck0F-yh.cjs → manualEntry-CcCE4O6Q.cjs} +1 -1
- package/dist/{manualEntry-DVz9oTYB.js → manualEntry-D_doLqqH.js} +2 -2
- package/dist/{mapBackground-BFU29YnH.js → mapBackground-CvLXKuJx.js} +2 -2
- package/dist/{mapBackground-CiPISf2B.cjs → mapBackground-DEBggmVp.cjs} +1 -1
- package/dist/{mappingList-Bkx4vu-u.js → mappingList-BZODl4t5.js} +3 -3
- package/dist/{mappingList--PVo2aUQ.cjs → mappingList-qKR-0uhY.cjs} +1 -1
- package/dist/{markdownViewer-COnk_pk4.js → markdownViewer-CtN6ailN.js} +4 -4
- package/dist/{markdownViewer-RG3j8l1L.cjs → markdownViewer-DZ8gvoHk.cjs} +1 -1
- package/dist/{mix-control-modal-B2cEQKI8.js → mix-control-modal-BlWtiePl.js} +3 -3
- package/dist/{mix-control-modal-B1UN2Cjo.cjs → mix-control-modal-zbr85DkZ.cjs} +1 -1
- package/dist/{mixDataPermission-t4r0S4Or.js → mixDataPermission-C-Cu3_y0.js} +1 -1
- package/dist/{mixDataPermission-BG1BmNQe.cjs → mixDataPermission-Gcl_4czp.cjs} +1 -1
- package/dist/{mixGrid-CUvQlc4n.js → mixGrid-DJQ2jXcg.js} +3 -3
- package/dist/{mixGrid-_dbNIf6t.cjs → mixGrid-Dh9y_kW0.cjs} +1 -1
- package/dist/{mixMap-D6z1_hNV.js → mixMap-2REwmqmi.js} +3 -3
- package/dist/{mixMap-DCvXa0ab.cjs → mixMap-BRnDOkNF.cjs} +1 -1
- package/dist/{mixModel-BRW3rJIV.cjs → mixModel-C1CKMCLi.cjs} +1 -1
- package/dist/{mixModel-CulQbgWh.js → mixModel-CHtF97xc.js} +3 -3
- package/dist/{mixPie-DjHVr74J.js → mixPie-DwDffWz5.js} +3 -3
- package/dist/{mixPie-BcYeLQ0o.cjs → mixPie-sD-AjwaC.cjs} +1 -1
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +1 -1
- package/dist/{mjpegCamera-DlAcVOoi.js → mjpegCamera-Dbfd7eUC.js} +2 -2
- package/dist/{mjpegCamera-B7mjuPXA.cjs → mjpegCamera-RMS_dnv0.cjs} +1 -1
- package/dist/{monitorAlert-zPmD55Rs.cjs → monitorAlert-CjIQQ6fQ.cjs} +1 -1
- package/dist/{monitorAlert-B0KID2eA.js → monitorAlert-DagV3vuc.js} +2 -2
- package/dist/{monitorData-BidsO_6J.js → monitorData-CTkeA21g.js} +3 -3
- package/dist/{monitorData-CHMrdKJf.cjs → monitorData-DUansNO5.cjs} +1 -1
- package/dist/{monitorSpeedChart-DLZh-mSE.js → monitorSpeedChart-BFnREZYZ.js} +1 -1
- package/dist/{monitorSpeedChart-4D-maRjp.cjs → monitorSpeedChart-CjfFqWon.cjs} +1 -1
- package/dist/{mxa-DmZnrbe4.js → mxa-B6ezKf-C.js} +3 -3
- package/dist/{mxa-D4qd0Plz.cjs → mxa-CN6zXgZA.cjs} +1 -1
- package/dist/{myValue-B6YZ6dY0.cjs → myValue-BG_jI_HT.cjs} +1 -1
- package/dist/{myValue-BWMSYYbJ.js → myValue-C08vYRJC.js} +2 -2
- package/dist/{myValueList-DvjaY4Fk.js → myValueList-BKVL_kPb.js} +2 -2
- package/dist/{myValueList-DaNcKyP9.cjs → myValueList-Bwg3XCPF.cjs} +1 -1
- package/dist/{objectList-V3GkI15k.cjs → objectList-FArM7oEM.cjs} +1 -1
- package/dist/{objectList-B-DwKe6G.js → objectList-emtQyLbD.js} +4 -4
- package/dist/{photo-CMsOPCDi.cjs → photo-B9Veb_Am.cjs} +1 -1
- package/dist/{photo-BXxSVVs-.js → photo-DXbQg_FJ.js} +4 -4
- package/dist/{pie-Cq5U2vj8.js → pie-DZzf2lL7.js} +3 -3
- package/dist/{pie-DEAPOjlU.cjs → pie-U9hOnFzz.cjs} +1 -1
- package/dist/{pressBtn-CCxhhl94.cjs → pressBtn-BNr1R0gW.cjs} +1 -1
- package/dist/{pressBtn-C2Iq30mu.js → pressBtn-R5Wsj-Jw.js} +4 -4
- package/dist/{progressBar-7yCF8b0A.cjs → progressBar-CUSoF6f0.cjs} +1 -1
- package/dist/{progressBar-yWKY_v4S.js → progressBar-sLfJICdr.js} +2 -2
- package/dist/{progressCircle-D8JyF73W.cjs → progressCircle-B6P8B-t_.cjs} +1 -1
- package/dist/{progressCircle--w8mHGf0.js → progressCircle-BZgPxs_q.js} +2 -2
- package/dist/{qrcode-B2Ue7vYR.js → qrcode-C96PznAO.js} +2 -2
- package/dist/{qrcode-CXmICWJP.cjs → qrcode-DMrNxgq5.cjs} +1 -1
- package/dist/{raceBar-Bs0i8Afj.cjs → raceBar-BTExTEsZ.cjs} +1 -1
- package/dist/{raceBar-BjWSPr8P.js → raceBar-Dryx8Onl.js} +3 -3
- package/dist/{rad-xDBdI8mF.cjs → rad-DpkIOKs_.cjs} +1 -1
- package/dist/{rad-vI2aKcPX.js → rad-vw4O2ByZ.js} +2 -2
- package/dist/{rainfallFilterBar-0HQ-tE3G.js → rainfallFilterBar-BjAWqKtM.js} +2 -2
- package/dist/{rainfallFilterBar-CN0nk3fJ.cjs → rainfallFilterBar-CH3abw6C.cjs} +1 -1
- package/dist/{rainfallTimeCurve-vaLAn45Q.js → rainfallTimeCurve-BPDZGrlQ.js} +3 -3
- package/dist/{rainfallTimeCurve-ORf8Vjfg.cjs → rainfallTimeCurve-oJUJ2mt7.cjs} +1 -1
- package/dist/{rangeLin-BsFq4g_r.js → rangeLin-BFFy57TT.js} +2 -2
- package/dist/{rangeLin-DpeEuqHq.cjs → rangeLin-CBqKAU0P.cjs} +1 -1
- package/dist/{request-CipSkL_e.cjs → request-BcQP_dWt.cjs} +1 -1
- package/dist/{request-BKxONB4_.js → request-jIo7FwQD.js} +1 -1
- package/dist/{retainer1-fHIyhuCd.cjs → retainer1-CfcwA39J.cjs} +1 -1
- package/dist/{retainer1-Dff5PtOO.js → retainer1-goSPppQ-.js} +3 -3
- package/dist/{retainer2-CiQBrt5K.js → retainer2-BHdnsKrO.js} +3 -3
- package/dist/{retainer2-DVzzy6cB.cjs → retainer2-DwQmFU10.cjs} +1 -1
- package/dist/{riskRegionTable-C7wPe9Wi.js → riskRegionTable-B8-f5xx-.js} +2 -2
- package/dist/{riskRegionTable-S52o0BGS.cjs → riskRegionTable-CSJpPxPB.cjs} +1 -1
- package/dist/{sankey-CnfyQhE9.js → sankey-C0gaE3HM.js} +3 -3
- package/dist/{sankey-CaIBIfyD.cjs → sankey-DXCBHb16.cjs} +1 -1
- package/dist/{scd-DlNUR6eL.cjs → scd-CkEHu7nZ.cjs} +1 -1
- package/dist/{scd-DIMdDXIq.js → scd-Cwyft2g6.js} +2 -2
- package/dist/{sideMenu-zU_aIvID.js → sideMenu-BtVCCKw9.js} +2 -2
- package/dist/{sideMenu-Bkbku5u7.cjs → sideMenu-DUdDDJ9K.cjs} +1 -1
- package/dist/{slopeStability-DbSAX15K.cjs → slopeStability-Byb6AKti.cjs} +1 -1
- package/dist/{slopeStability-gOE7dn2Q.js → slopeStability-DwxDXTQG.js} +3 -3
- package/dist/{speedCurve-CSvi3dD_.js → speedCurve-BuNsy-ev.js} +3 -3
- package/dist/{speedCurve-U4Q4lhNV.cjs → speedCurve-DArreweP.cjs} +1 -1
- package/dist/{staticLine-DLQxHc40.cjs → staticLine-C50p0CZs.cjs} +1 -1
- package/dist/{staticLine-B9bZ_t-z.js → staticLine-DfkpF6ZW.js} +3 -3
- package/dist/{store-DEUtRQFz.cjs → store-ByTYoqyI.cjs} +1 -1
- package/dist/{store-CS3njfh9.js → store-D_TrU3nw.js} +2 -2
- package/dist/{swiper-7lbXP2Xv.js → swiper-CQiRByJd.js} +2 -2
- package/dist/{swiper-BWo-bX2U.cjs → swiper-L0Oo2dYD.cjs} +1 -1
- package/dist/{terminalConfigList-DSF7VA9Q.js → terminalConfigList-BhmfFm4f.js} +3 -3
- package/dist/{terminalConfigList-D_OHlni0.cjs → terminalConfigList-ChC43Bwq.cjs} +1 -1
- package/dist/{terminalList-BwF47jlu.cjs → terminalList-BQModRyk.cjs} +1 -1
- package/dist/{terminalList-DxSUKAey.js → terminalList-C6tswBt1.js} +3 -3
- package/dist/{textbox-DgjHYbNl.cjs → textbox-CSuiDl8k.cjs} +1 -1
- package/dist/{textbox-ANFqNmpB.js → textbox-CgOhFsYo.js} +3 -3
- package/dist/{timeQueryBar-DygP7vFr.cjs → timeQueryBar-BtCXHgrg.cjs} +1 -1
- package/dist/{timeQueryBar-CtVF9zsa.js → timeQueryBar-QEg1Flg9.js} +1 -1
- package/dist/{timeSeries-uWbV8gXH.js → timeSeries-B7NgbHfJ.js} +4 -4
- package/dist/{timeSeries-DpBC38Dd.cjs → timeSeries-DMINp9Fr.cjs} +1 -1
- package/dist/{timeSeriesCurve-CjS9xNfa.js → timeSeriesCurve-DEY5KQvu.js} +3 -3
- package/dist/{timeSeriesCurve-BSEfLBDp.cjs → timeSeriesCurve-wC9wHGI4.cjs} +1 -1
- package/dist/{toggleBtn-DSq8CzjF.js → toggleBtn-Brtfu0-e.js} +3 -3
- package/dist/{toggleBtn-Bk89Ssp4.cjs → toggleBtn-DO953U-q.cjs} +1 -1
- package/dist/{trajectoryConfigPanel-DmPGuqtg.js → trajectoryConfigPanel-BDdP3SdV.js} +1 -1
- package/dist/{trajectoryConfigPanel-CF1pM2pP.cjs → trajectoryConfigPanel-Bl_o9h2e.cjs} +1 -1
- package/dist/{trajectoryScatter-ChdtZPYx.js → trajectoryScatter-7-lJ5SMe.js} +3 -3
- package/dist/{trajectoryScatter-D9v1KK6I.cjs → trajectoryScatter-DVm5ljvY.cjs} +1 -1
- package/dist/{universalConfigPanel-D5EdU-OC.cjs → universalConfigPanel-Cm4TfqAK.cjs} +1 -1
- package/dist/{universalConfigPanel-DOr_O_6t.js → universalConfigPanel-DTLFrGXs.js} +1 -1
- package/dist/{universalTable-DlsTht70.cjs → universalTable-Bl9x3wEx.cjs} +1 -1
- package/dist/{universalTable-BAN6hSY_.js → universalTable-CCFr-GKz.js} +2 -2
- package/dist/{video-Pt7TPShk.cjs → video-DObKrYkw.cjs} +1 -1
- package/dist/{video-DNziJElR.js → video-gqqvz5Ge.js} +4 -4
- package/dist/{videoMonitor-Dt77p1d2.cjs → videoMonitor-B_Ur25fz.cjs} +1 -1
- package/dist/{videoMonitor-PFD2iawe.js → videoMonitor-CGMHzNdh.js} +2 -2
- package/dist/{vlu-BElCZvHd.js → vlu-6DSf0haZ.js} +2 -2
- package/dist/{vlu-4ykgONXu.cjs → vlu-Dbj9euY_.cjs} +1 -1
- package/dist/{weather-YG9UpLx7.cjs → weather-BsIBTn7G.cjs} +1 -1
- package/dist/{weather-Csspb97-.js → weather-CQBxQBld.js} +2 -2
- package/dist/{windLin-DPeoy6Jq.js → windLin-KIVk9hOD.js} +2 -2
- package/dist/{windLin-C0wheGq6.cjs → windLin-jVF-rhIx.cjs} +1 -1
- package/package.json +1 -1
- package/dist/gasStationList-sODxF5vW.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ie=Object.defineProperty,ue=Object.defineProperties;var de=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var me=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var Y=(v,i,a)=>i in v?ie(v,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):v[i]=a,j=(v,i)=>{for(var a in i||(i={}))me.call(i,a)&&Y(v,a,i[a]);if(Z)for(var a of Z(i))pe.call(i,a)&&Y(v,a,i[a]);return v},V=(v,i)=>ue(v,de(i));var G=(v,i,a)=>new Promise((d,g)=>{var N=y=>{try{C(a.next(y))}catch(x){g(x)}},u=y=>{try{C(a.throw(y))}catch(x){g(x)}},C=y=>y.done?d(y.value):Promise.resolve(y.value).then(N,u);C((a=a.apply(v,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),he=require("./vue-i18n-BvHMBi_b.cjs"),ve=require("@element-plus/icons-vue"),D=require("./index-BSzyUGIT.cjs"),fe=require("./EChartComponentBase-DRY0bLOI.cjs"),J=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),ge={class:"chart-header"},ye={class:"chart-title"},be={class:"chart-actions"},Ce=["onClick"],_e={class:"item-label"},we=["id"],Se={DEFAULT_ICON:J.DEFAULT_ICON,ACTIVE_ICON:J.ACTIVE_ICON,NAME_CN:"指标时序演变曲线",NAME_EN:"TimeSeriesCurve",ORDER:1},De={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:2.5,type:"number",label:"component.options.lineWidth"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},xe=[{name:"宽度累计变化量",fv:"",object_id:"",device:"",color:"#5470c6"},{name:"宽度日变化量",fv:"",object_id:"",device:"",color:"#91cc75"},{name:"x方向加速度",fv:"",object_id:"",device:"",color:"#fac858"},{name:"y方向加速度",fv:"",object_id:"",device:"",color:"#ee6666"},{name:"z方向加速度",fv:"",object_id:"",device:"",color:"#73c0de"},{name:"x方向倾角",fv:"",object_id:"",device:"",color:"#3ba272"},{name:"y方向倾角",fv:"",object_id:"",device:"",color:"#fc8452"},{name:"z方向倾角",fv:"",object_id:"",device:"",color:"#9a60b4"}],ke=["name","fv","object_id","device","color"],Ee=["mosaic","statistics","calculate"],Me={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Oe=50,Ne={DEFAULT:Se,OPTIONS:De,DATA:xe,PARAMS:ke,SOURCE:Ee,ITEMS:Oe,COMMON:Me},Ie=e.defineComponent(V(j({},Ne),{__name:"timeSeriesCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(v){var z,W;const{t:i}=he.useI18n(),a=v,d=e.ref([]),g=e.computed(()=>a.conf.data||[]);class N extends fe.EChartComponentBase{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.realTimeData=new Map,this.deviceNameMap=new Map,this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(t){this.currentObjectId=t}extractStyles(){return V(j({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",2.5),linkChannel:this.getOptionValue("linkChannel","crack")})}onPreview(){var r;const{common:t,data:o}=this.props.conf,m=this.getSource();if(t.multiObject&&Array.isArray(o)){const l=new Set;o.forEach(n=>{const c=this.resolveObjectId(n);!c||l.has(c)||(l.add(c),this.subscribeBySource(m,c,n.uid))})}else{const l=this.resolveObjectId(),n=(r=o==null?void 0:o[0])==null?void 0:r.uid;l&&(this.currentObjectId=l,this.subscribeBySource(m,l,n))}}onLinkEvent(t){x(t)}getChartOption(){const{data:t}=this.props.conf,o=this.Style.value,m=d.value.length===0?[]:t.filter(n=>d.value.includes(n.name));let r=[];if(this.props.mode==="edit")r=this.generateTimeLabels();else for(const[,n]of this.realTimeData)n.times.length>r.length&&(r=n.times);const l=m.filter(n=>n.fv||this.props.mode==="edit").map((n,c)=>{const p=n.device&&this.deviceNameMap.get(n.device)||"",f=p?`${p}-${n.name}`:n.name,h=n.color||this.deviceColors[c%this.deviceColors.length];let b;if(this.props.mode!=="edit"){const w=this.realTimeData.get(n.name);b=w?w.values:[]}else b=this.generateSeriesData(n,r);return{name:f,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:h,type:"solid",width:o.lineWidth},itemStyle:{color:h},data:b}});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:o.showLegend,type:"scroll",top:10,textStyle:{color:o.textColor}},grid:{top:60,left:60,right:40,bottom:o.showDataZoom?80:40},xAxis:{type:"category",data:r,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:o.textColor}},yAxis:{type:"value",name:"值",nameTextStyle:{color:o.textColor},axisLabel:{color:o.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:o.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:l}}generateTimeLabels(){const t=[];for(let o=24;o>=0;o--){const m=D.dayjs().subtract(o,"hour");t.push(m.format("MM-DD HH:mm"))}return t}generateSeriesData(t,o){const m=t.name,r=this.realTimeData.get(m);if(r&&r.times.length>0){const l=new Map;return r.times.forEach((n,c)=>l.set(n,r.values[c])),o.map(n=>{var c;return(c=l.get(n))!=null?c:null})}if(this.props.mode==="edit"){const l=Math.random()*10+5;return Array.from({length:o.length},(n,c)=>{const p=Math.sin(c*.5)*.3;return parseFloat((l*(.8+p)).toFixed(2))})}return new Array(o.length).fill(null)}setSocketData(t){if(!t)return;const{data:o}=this.props.conf;if(!o||!Array.isArray(o))return;const m=t.datetime?t.datetime.split(".")[0]:D.dayjs().format("MM-DD HH:mm:ss"),r=D.dayjs(m).format("MM-DD HH:mm:ss");o.forEach(n=>{if(!n.fv)return;if(n.device){const p=this.extractDataValue(t,n.device);p!=null&&this.deviceNameMap.set(n.device,String(p))}const c=this.extractDataValue(t,n.fv);if(c!=null){const p=parseFloat(c);if(!isNaN(p)){const f=n.name;let h=this.realTimeData.get(f);h||(h={times:[],values:[]},this.realTimeData.set(f,h)),h.times.push(r),h.values.push(p),h.times.length>200&&(h.times.shift(),h.values.shift()),n.value=p}}});const l=this.getChartInstance();l&&l.setOption(this.getChartOption())}}const u=new N(a,"timeSeriesCurve");u.setupLifecycle();const C=u.getStyle(),y=u.getEchartId(),x=s=>{console.log("[指标时序演变曲线] 收到联动事件:",s);const{payload:t}=s;if(!t)return;const o=t.objectId||t.object_id;o&&K(o)},K=s=>G(null,null,function*(){var p;if(!s||a.mode!=="preview"||u.getCurrentObjectId()===s)return;u.setCurrentObjectId(s),u.realTimeData.clear(),u.deviceNameMap.clear();const o=(p=u.session)==null?void 0:p.value;if(!o)return;const m=a.conf.id;o.componentRequests&&o.componentRequests.delete(m);const{data:r,common:l}=a.conf;Array.isArray(r)&&r.forEach(f=>{f.object_id=s}),l.multiObject||(l.object_id=s);try{const f=yield Promise.resolve().then(()=>require("./history-BlHYyu1s.cjs")),b=yield new f.default().getHistoryData(a,"timeSeriesCurve");b&&Array.isArray(b)&&r.forEach((w,le)=>{if(!w.fv)return;const M=b[le],$=(M==null?void 0:M.data)||M;if(!Array.isArray($))return;const ce=[...$].sort((S,k)=>new Date(S.time||S.datetime||"").getTime()-new Date(k.time||k.datetime||"").getTime()),I=[],F=[];ce.forEach(S=>{const k=S.time||S.datetime,P=S[w.fv];if(k&&P!=null){const U=parseFloat(P);isNaN(U)||(I.push(D.dayjs(k).format("MM-DD HH:mm:ss")),F.push(U))}}),I.length>0&&u.realTimeData.set(w.name,{times:I,values:F})}),console.log("[指标时序演变曲线] 历史数据加载完成")}catch(f){console.warn("[指标时序演变曲线] 历史数据获取失败:",f)}const n=u.getChartInstance();n&&n.setOption(u.getChartOption(),!0),o.registerComponent({id:m,request:null,onUpdate:(f,h)=>{f==="realtime"&&u.setSocketData(h)}});const c=u.getSource();u.subscribeBySource(c,s)}),Q=e.computed(()=>({background:C.value.bgColor,color:C.value.textColor})),X=e.computed(()=>i("component.crack.timeSeriesCurve")),ee=e.computed(()=>i("component.crack.exportImage")),te=e.computed(()=>i("component.crack.selectIndicators"));a.mode==="edit"&&g.value.length>0&&(d.value=[(z=g.value[0])==null?void 0:z.name,(W=g.value[1])==null?void 0:W.name].filter(Boolean));const _=e.ref(!1),E=e.ref(null),A=e.ref(null),T=e.ref({}),oe=e.computed(()=>d.value.length===0?"":d.value.length===g.value.length?"全部":d.value.join("、")),L=e.computed(()=>{const s=g.value;return s.length>0&&s.every(t=>d.value.includes(t.name))}),ne=e.computed(()=>{const s=g.value,t=s.filter(o=>d.value.includes(o.name)).length;return t>0&&t<s.length}),se=()=>{_.value=!_.value,_.value&&ae()};function ae(){if(!E.value)return;const s=E.value.getBoundingClientRect();T.value={position:"fixed",top:`${s.bottom+4}px`,left:`${s.left}px`,zIndex:"9999"}}const B=s=>{const t=E.value,o=A.value;t&&!t.contains(s.target)&&o&&!o.contains(s.target)&&(_.value=!1)};e.onMounted(()=>{document.addEventListener("click",B)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",B)});const q=()=>{L.value?d.value=[]:d.value=g.value.map(s=>s.name),R()},H=s=>{const t=d.value.indexOf(s.name);t>-1?d.value.splice(t,1):d.value.push(s.name),R()},R=()=>{const s=u.getChartInstance();s&&s.setOption(u.getChartOption(),!0)};e.watch(()=>a.conf.data,s=>{var t,o;s&&s.length>0&&d.value.length===0&&(d.value=[(t=s[0])==null?void 0:t.name,(o=s[1])==null?void 0:o.name].filter(Boolean))},{immediate:!0});const re=()=>{const s=u.getChartInstance();if(!s)return;const t=document.createElement("a");t.href=s.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),t.download=`${i("component.crack.timeSeriesCurve")}_${D.dayjs().format("YYYYMMDDHHmmss")}.png`,t.click()};return(s,t)=>{const o=O.ElIcon,m=O.ElInput,r=O.ElCheckbox,l=O.ElButton;return e.openBlock(),e.createElementBlock("div",{class:"mix-component crack-time-series",style:e.normalizeStyle(Q.value)},[e.createElementVNode("div",ge,[e.createElementVNode("span",ye,"📉 "+e.toDisplayString(X.value),1),e.createElementVNode("div",be,[e.createElementVNode("div",{class:"metrics-select-wrapper",ref_key:"metricsWrapperRef",ref:E},[e.createVNode(m,{"model-value":oe.value,placeholder:te.value,size:"small",style:{width:"220px"},readonly:"",onClick:se},{suffix:e.withCtx(()=>[e.createVNode(o,{class:e.normalizeClass(["metrics-arrow",{"is-open":_.value}])},{default:e.withCtx(()=>[e.createVNode(e.unref(ve.ArrowDown))]),_:1},8,["class"])]),_:1},8,["model-value","placeholder"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"metrics-dropdown",style:e.normalizeStyle(T.value),ref_key:"metricsDropdownRef",ref:A},[e.createElementVNode("div",{class:"metrics-dropdown-item",onClick:e.withModifiers(q,["stop"])},[e.createVNode(r,{"model-value":L.value,indeterminate:ne.value,onChange:q},null,8,["model-value","indeterminate"]),t[0]||(t[0]=e.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全部",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n.name,class:"metrics-dropdown-item",onClick:e.withModifiers(c=>H(n),["stop"])},[e.createVNode(r,{"model-value":d.value.includes(n.name),onChange:c=>H(n)},null,8,["model-value","onChange"]),e.createElementVNode("span",_e,e.toDisplayString(n.name),1)],8,Ce))),128))],4),[[e.vShow,_.value]])]))],512),e.createVNode(l,{size:"small",onClick:re},{default:e.withCtx(()=>[e.createTextVNode("💾 "+e.toDisplayString(ee.value),1)]),_:1})])]),e.createElementVNode("div",{id:e.unref(y),class:"chart-container"},null,8,we),e.renderSlot(s.$slots,"default",{},void 0,!0)],4)}}})),je=D._export_sfc(Ie,[["__scopeId","data-v-920e39d1"]]);exports.default=je;
|
|
1
|
+
"use strict";var ie=Object.defineProperty,ue=Object.defineProperties;var de=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var me=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var Y=(v,i,a)=>i in v?ie(v,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):v[i]=a,j=(v,i)=>{for(var a in i||(i={}))me.call(i,a)&&Y(v,a,i[a]);if(Z)for(var a of Z(i))pe.call(i,a)&&Y(v,a,i[a]);return v},V=(v,i)=>ue(v,de(i));var G=(v,i,a)=>new Promise((d,g)=>{var N=y=>{try{C(a.next(y))}catch(x){g(x)}},u=y=>{try{C(a.throw(y))}catch(x){g(x)}},C=y=>y.done?d(y.value):Promise.resolve(y.value).then(N,u);C((a=a.apply(v,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),he=require("./vue-i18n-BvHMBi_b.cjs"),ve=require("@element-plus/icons-vue"),D=require("./index-ZwyqrmaH.cjs"),fe=require("./EChartComponentBase-Dz5E-lyI.cjs"),J=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),ge={class:"chart-header"},ye={class:"chart-title"},be={class:"chart-actions"},Ce=["onClick"],_e={class:"item-label"},we=["id"],Se={DEFAULT_ICON:J.DEFAULT_ICON,ACTIVE_ICON:J.ACTIVE_ICON,NAME_CN:"指标时序演变曲线",NAME_EN:"TimeSeriesCurve",ORDER:1},De={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:2.5,type:"number",label:"component.options.lineWidth"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},xe=[{name:"宽度累计变化量",fv:"",object_id:"",device:"",color:"#5470c6"},{name:"宽度日变化量",fv:"",object_id:"",device:"",color:"#91cc75"},{name:"x方向加速度",fv:"",object_id:"",device:"",color:"#fac858"},{name:"y方向加速度",fv:"",object_id:"",device:"",color:"#ee6666"},{name:"z方向加速度",fv:"",object_id:"",device:"",color:"#73c0de"},{name:"x方向倾角",fv:"",object_id:"",device:"",color:"#3ba272"},{name:"y方向倾角",fv:"",object_id:"",device:"",color:"#fc8452"},{name:"z方向倾角",fv:"",object_id:"",device:"",color:"#9a60b4"}],ke=["name","fv","object_id","device","color"],Ee=["mosaic","statistics","calculate"],Me={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Oe=50,Ne={DEFAULT:Se,OPTIONS:De,DATA:xe,PARAMS:ke,SOURCE:Ee,ITEMS:Oe,COMMON:Me},Ie=e.defineComponent(V(j({},Ne),{__name:"timeSeriesCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(v){var z,W;const{t:i}=he.useI18n(),a=v,d=e.ref([]),g=e.computed(()=>a.conf.data||[]);class N extends fe.EChartComponentBase{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.realTimeData=new Map,this.deviceNameMap=new Map,this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(t){this.currentObjectId=t}extractStyles(){return V(j({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",2.5),linkChannel:this.getOptionValue("linkChannel","crack")})}onPreview(){var r;const{common:t,data:o}=this.props.conf,m=this.getSource();if(t.multiObject&&Array.isArray(o)){const l=new Set;o.forEach(n=>{const c=this.resolveObjectId(n);!c||l.has(c)||(l.add(c),this.subscribeBySource(m,c,n.uid))})}else{const l=this.resolveObjectId(),n=(r=o==null?void 0:o[0])==null?void 0:r.uid;l&&(this.currentObjectId=l,this.subscribeBySource(m,l,n))}}onLinkEvent(t){x(t)}getChartOption(){const{data:t}=this.props.conf,o=this.Style.value,m=d.value.length===0?[]:t.filter(n=>d.value.includes(n.name));let r=[];if(this.props.mode==="edit")r=this.generateTimeLabels();else for(const[,n]of this.realTimeData)n.times.length>r.length&&(r=n.times);const l=m.filter(n=>n.fv||this.props.mode==="edit").map((n,c)=>{const p=n.device&&this.deviceNameMap.get(n.device)||"",f=p?`${p}-${n.name}`:n.name,h=n.color||this.deviceColors[c%this.deviceColors.length];let b;if(this.props.mode!=="edit"){const w=this.realTimeData.get(n.name);b=w?w.values:[]}else b=this.generateSeriesData(n,r);return{name:f,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:h,type:"solid",width:o.lineWidth},itemStyle:{color:h},data:b}});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:o.showLegend,type:"scroll",top:10,textStyle:{color:o.textColor}},grid:{top:60,left:60,right:40,bottom:o.showDataZoom?80:40},xAxis:{type:"category",data:r,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:o.textColor}},yAxis:{type:"value",name:"值",nameTextStyle:{color:o.textColor},axisLabel:{color:o.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:o.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:l}}generateTimeLabels(){const t=[];for(let o=24;o>=0;o--){const m=D.dayjs().subtract(o,"hour");t.push(m.format("MM-DD HH:mm"))}return t}generateSeriesData(t,o){const m=t.name,r=this.realTimeData.get(m);if(r&&r.times.length>0){const l=new Map;return r.times.forEach((n,c)=>l.set(n,r.values[c])),o.map(n=>{var c;return(c=l.get(n))!=null?c:null})}if(this.props.mode==="edit"){const l=Math.random()*10+5;return Array.from({length:o.length},(n,c)=>{const p=Math.sin(c*.5)*.3;return parseFloat((l*(.8+p)).toFixed(2))})}return new Array(o.length).fill(null)}setSocketData(t){if(!t)return;const{data:o}=this.props.conf;if(!o||!Array.isArray(o))return;const m=t.datetime?t.datetime.split(".")[0]:D.dayjs().format("MM-DD HH:mm:ss"),r=D.dayjs(m).format("MM-DD HH:mm:ss");o.forEach(n=>{if(!n.fv)return;if(n.device){const p=this.extractDataValue(t,n.device);p!=null&&this.deviceNameMap.set(n.device,String(p))}const c=this.extractDataValue(t,n.fv);if(c!=null){const p=parseFloat(c);if(!isNaN(p)){const f=n.name;let h=this.realTimeData.get(f);h||(h={times:[],values:[]},this.realTimeData.set(f,h)),h.times.push(r),h.values.push(p),h.times.length>200&&(h.times.shift(),h.values.shift()),n.value=p}}});const l=this.getChartInstance();l&&l.setOption(this.getChartOption())}}const u=new N(a,"timeSeriesCurve");u.setupLifecycle();const C=u.getStyle(),y=u.getEchartId(),x=s=>{console.log("[指标时序演变曲线] 收到联动事件:",s);const{payload:t}=s;if(!t)return;const o=t.objectId||t.object_id;o&&K(o)},K=s=>G(null,null,function*(){var p;if(!s||a.mode!=="preview"||u.getCurrentObjectId()===s)return;u.setCurrentObjectId(s),u.realTimeData.clear(),u.deviceNameMap.clear();const o=(p=u.session)==null?void 0:p.value;if(!o)return;const m=a.conf.id;o.componentRequests&&o.componentRequests.delete(m);const{data:r,common:l}=a.conf;Array.isArray(r)&&r.forEach(f=>{f.object_id=s}),l.multiObject||(l.object_id=s);try{const f=yield Promise.resolve().then(()=>require("./history-5W6pGCPq.cjs")),b=yield new f.default().getHistoryData(a,"timeSeriesCurve");b&&Array.isArray(b)&&r.forEach((w,le)=>{if(!w.fv)return;const M=b[le],$=(M==null?void 0:M.data)||M;if(!Array.isArray($))return;const ce=[...$].sort((S,k)=>new Date(S.time||S.datetime||"").getTime()-new Date(k.time||k.datetime||"").getTime()),I=[],F=[];ce.forEach(S=>{const k=S.time||S.datetime,P=S[w.fv];if(k&&P!=null){const U=parseFloat(P);isNaN(U)||(I.push(D.dayjs(k).format("MM-DD HH:mm:ss")),F.push(U))}}),I.length>0&&u.realTimeData.set(w.name,{times:I,values:F})}),console.log("[指标时序演变曲线] 历史数据加载完成")}catch(f){console.warn("[指标时序演变曲线] 历史数据获取失败:",f)}const n=u.getChartInstance();n&&n.setOption(u.getChartOption(),!0),o.registerComponent({id:m,request:null,onUpdate:(f,h)=>{f==="realtime"&&u.setSocketData(h)}});const c=u.getSource();u.subscribeBySource(c,s)}),Q=e.computed(()=>({background:C.value.bgColor,color:C.value.textColor})),X=e.computed(()=>i("component.crack.timeSeriesCurve")),ee=e.computed(()=>i("component.crack.exportImage")),te=e.computed(()=>i("component.crack.selectIndicators"));a.mode==="edit"&&g.value.length>0&&(d.value=[(z=g.value[0])==null?void 0:z.name,(W=g.value[1])==null?void 0:W.name].filter(Boolean));const _=e.ref(!1),E=e.ref(null),A=e.ref(null),T=e.ref({}),oe=e.computed(()=>d.value.length===0?"":d.value.length===g.value.length?"全部":d.value.join("、")),L=e.computed(()=>{const s=g.value;return s.length>0&&s.every(t=>d.value.includes(t.name))}),ne=e.computed(()=>{const s=g.value,t=s.filter(o=>d.value.includes(o.name)).length;return t>0&&t<s.length}),se=()=>{_.value=!_.value,_.value&&ae()};function ae(){if(!E.value)return;const s=E.value.getBoundingClientRect();T.value={position:"fixed",top:`${s.bottom+4}px`,left:`${s.left}px`,zIndex:"9999"}}const B=s=>{const t=E.value,o=A.value;t&&!t.contains(s.target)&&o&&!o.contains(s.target)&&(_.value=!1)};e.onMounted(()=>{document.addEventListener("click",B)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",B)});const q=()=>{L.value?d.value=[]:d.value=g.value.map(s=>s.name),R()},H=s=>{const t=d.value.indexOf(s.name);t>-1?d.value.splice(t,1):d.value.push(s.name),R()},R=()=>{const s=u.getChartInstance();s&&s.setOption(u.getChartOption(),!0)};e.watch(()=>a.conf.data,s=>{var t,o;s&&s.length>0&&d.value.length===0&&(d.value=[(t=s[0])==null?void 0:t.name,(o=s[1])==null?void 0:o.name].filter(Boolean))},{immediate:!0});const re=()=>{const s=u.getChartInstance();if(!s)return;const t=document.createElement("a");t.href=s.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),t.download=`${i("component.crack.timeSeriesCurve")}_${D.dayjs().format("YYYYMMDDHHmmss")}.png`,t.click()};return(s,t)=>{const o=O.ElIcon,m=O.ElInput,r=O.ElCheckbox,l=O.ElButton;return e.openBlock(),e.createElementBlock("div",{class:"mix-component crack-time-series",style:e.normalizeStyle(Q.value)},[e.createElementVNode("div",ge,[e.createElementVNode("span",ye,"📉 "+e.toDisplayString(X.value),1),e.createElementVNode("div",be,[e.createElementVNode("div",{class:"metrics-select-wrapper",ref_key:"metricsWrapperRef",ref:E},[e.createVNode(m,{"model-value":oe.value,placeholder:te.value,size:"small",style:{width:"220px"},readonly:"",onClick:se},{suffix:e.withCtx(()=>[e.createVNode(o,{class:e.normalizeClass(["metrics-arrow",{"is-open":_.value}])},{default:e.withCtx(()=>[e.createVNode(e.unref(ve.ArrowDown))]),_:1},8,["class"])]),_:1},8,["model-value","placeholder"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"metrics-dropdown",style:e.normalizeStyle(T.value),ref_key:"metricsDropdownRef",ref:A},[e.createElementVNode("div",{class:"metrics-dropdown-item",onClick:e.withModifiers(q,["stop"])},[e.createVNode(r,{"model-value":L.value,indeterminate:ne.value,onChange:q},null,8,["model-value","indeterminate"]),t[0]||(t[0]=e.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全部",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n.name,class:"metrics-dropdown-item",onClick:e.withModifiers(c=>H(n),["stop"])},[e.createVNode(r,{"model-value":d.value.includes(n.name),onChange:c=>H(n)},null,8,["model-value","onChange"]),e.createElementVNode("span",_e,e.toDisplayString(n.name),1)],8,Ce))),128))],4),[[e.vShow,_.value]])]))],512),e.createVNode(l,{size:"small",onClick:re},{default:e.withCtx(()=>[e.createTextVNode("💾 "+e.toDisplayString(ee.value),1)]),_:1})])]),e.createElementVNode("div",{id:e.unref(y),class:"chart-container"},null,8,we),e.renderSlot(s.$slots,"default",{},void 0,!0)],4)}}})),je=D._export_sfc(Ie,[["__scopeId","data-v-920e39d1"]]);exports.default=je;
|
|
@@ -12,9 +12,9 @@ var M = (c, o, i) => o in c ? Z(c, o, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
}, A = (c, o) => I(c, U(o));
|
|
13
13
|
import { defineComponent as P, ref as F, reactive as G, openBlock as p, createElementBlock as C, normalizeStyle as d, unref as a, createElementVNode as u, Fragment as R, renderList as N, normalizeClass as q, toDisplayString as S, renderSlot as J, nextTick as K } from "vue";
|
|
14
14
|
import "html2canvas";
|
|
15
|
-
import { C as Q } from "./element-resize-detector-
|
|
16
|
-
import { _ as W } from "./index-
|
|
17
|
-
import { E as X } from "./EChartComponentBase-
|
|
15
|
+
import { C as Q } from "./element-resize-detector-BCRzpPES.js";
|
|
16
|
+
import { _ as W } from "./index-LgTfdmT4.js";
|
|
17
|
+
import { E as X } from "./EChartComponentBase-CafVdj74.js";
|
|
18
18
|
import { u as Y, i as e0, a as t0 } from "./installCanvasRenderer-CLT2hquJ.js";
|
|
19
19
|
import { i as a0 } from "./install-CBde4hAM.js";
|
|
20
20
|
import { i as r0 } from "./install-hfre7yvV.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty,A=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var _=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var k=(s,o,n)=>o in s?M(s,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[o]=n,E=(s,o)=>{for(var n in o||(o={}))R.call(o,n)&&k(s,n,o[n]);if(_)for(var n of _(o))$.call(o,n)&&k(s,n,o[n]);return s},N=(s,o)=>A(s,F(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const D=require("./element-resize-detector-BvkAwVg8.cjs"),j=require("./index-BSzyUGIT.cjs"),q=require("./EChartComponentBase-DRY0bLOI.cjs"),m=require("./installCanvasRenderer-CyhM1Qpl.cjs"),V=require("./install-DV5cEgNV.cjs"),Z=require("./install-CltTFs4e.cjs"),I=require("./install-C8buXQPI.cjs"),U=require("./install-B1IEhhn3.cjs"),H="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",P="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",G=["onClick"],J=["id"],K={class:"progress-wrap"},Q=["title"],W={DEFAULT_ICON:H,ACTIVE_ICON:P,NAME_CN:"切换",NAME_EN:"Toggle Button",ORDER:2},X={titleSize:14,textSize:12,barHeight:8,textColor:"#a8b4d9",bgColor:"#0a1635",barColor:"#1e3a5f",tabColor:"#1e3a5f",activeBgColor:"#6b7fd9",borderColor:"#1e3a5f",activeBorder:"#6b7fd9",radiusSize:8,type:{value:"none",type:"radio",option:[{value:"none",label:"component.radar.diamond"},{value:"circle",label:"component.radar.circle"}],label:"component.radar.shapeSelect"},tags:{value:[{label:"TAB1",flag:["S01","S02","S03"]},{label:"TAB2",flag:["S02","S03","S04"]}],type:"tags",label:"component.radar.tagsSetting"}},Y=[{name:"参数一",color:"#4162ff",fv:"S01",object_id:""},{name:"参数二",color:"#3bbc6a",fv:"S02",object_id:""},{name:"参数三",color:"#e24359",fv:"S03",object_id:""},{name:"参数四",color:"#ff8b41",fv:"S04",object_id:""}],ee=["name","fv","object_id","color"],te=["mosaic","statistics","calculate"],re={useAlias:!1,multiObject:!1,source:"mosaic"},le={DEFAULT:W,OPTIONS:X,DATA:Y,PARAMS:ee,SOURCE:te,COMMON:re},ae=e.defineComponent(N(E({},le),{__name:"toggleBtn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){m.use([V.install,Z.install,m.install,I.install,m.install$1,U.install]);const o=s,n=e.ref(0),u=e.reactive({indicator:[],series:[]}),d=e.ref(0);class T extends q.EChartComponentBase{extractStyles(){var r,a,i,c,f,g,h,p,S,b,y,x,w,z,B;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleSize:((a=t==null?void 0:t.titleSize)==null?void 0:a.value)||16,barHeight:((i=t==null?void 0:t.barHeight)==null?void 0:i.value)||8,textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#111",tabColor:((f=t==null?void 0:t.tabColor)==null?void 0:f.value)||"#f5f5f5",activeBgColor:((g=t==null?void 0:t.activeBgColor)==null?void 0:g.value)||"#4162ff",borderColor:((h=t==null?void 0:t.borderColor)==null?void 0:h.value)||"#e5e5e5",activeBorder:((p=t==null?void 0:t.activeBorder)==null?void 0:p.value)||"#4162ff",barColor:((S=t==null?void 0:t.barColor)==null?void 0:S.value)||"#e5e5e5",radiusSize:(y=(b=t==null?void 0:t.radiusSize)==null?void 0:b.value)!=null?y:8,textSize:(w=(x=t==null?void 0:t.textSize)==null?void 0:x.value)!=null?w:12,type:((z=t==null?void 0:t.type)==null?void 0:z.value)||!1,tags:((B=t==null?void 0:t.tags)==null?void 0:B.value)||[]}}getChartOption(){var r;const{name:t}=this.props.conf;return{radar:{shape:this.Style.value.type,axisNameGap:10,indicator:u.indicator,center:["50%","55%"],radius:70,axisLine:{lineStyle:{type:"dashed",color:"#383D42"}},splitLine:{show:!0,lineStyle:{width:1,color:"#4B5FAB"}},splitArea:{show:!0,areaStyle:{color:["transparent"]}},axisName:{fontSize:12,color:this.Style.value.textColor}},series:[{name:t!=null?t:"",type:"radar",data:(r=u.series)!=null?r:[],areaStyle:{},itemStyle:{color:"#4162ff"}}]}}init(){super.init(),e.nextTick(()=>{this.initChart(),C(d.value)})}setSocketData(t){if(!t)return;const{data:r}=this.props.conf;r.forEach(a=>{const i=this.extractDataValue(t,a.fv);a.value=i!=null?i:0}),C(d.value)}refreshChart(){var r;const t=this.getChartOption();(r=this.chartObj)==null||r.setOption(t,!0)}}const v=new T(o,"toggleBtn");v.setupLifecycle();const l=v.getStyle(),O=v.getEchartId(),C=L=>{const{data:t,options:r,name:a}=o.conf;d.value=L,u.indicator=[],u.series=[];let i={};i.name=a,i.value=[],n.value=Math.max(...t.map(c=>c.value||0)),t.forEach(c=>{var f,g;(g=(f=r.tags.value[d.value])==null?void 0:f.flag)!=null&&g.includes(c.fv)&&(u.indicator.push({name:c.name,max:n.value,value:c.value,min:0,color:c.color}),i.value.push(c.value))}),u.series.push(i),v.refreshChart()};return(L,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(l).bgColor,borderRadius:`${e.unref(l).radiusSize}px`})},[e.createElementVNode("div",{class:"toggle-wrap",style:e.normalizeStyle({borderTopLeftRadius:`${e.unref(l).radiusSize}px`,borderTopRightRadius:`${e.unref(l).radiusSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).tags,(r,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:e.normalizeClass(["btn-item",{active:d.value===a}]),style:e.normalizeStyle({backgroundColor:d.value===a?e.unref(l).activeBgColor:e.unref(l).tabColor,color:d.value===a?"#fff":e.unref(l).textColor,fontSize:`${e.unref(l).titleSize}px`,borderTopLeftRadius:a===0?`${e.unref(l).radiusSize}px`:"0",borderTopRightRadius:a===e.unref(l).tags.length-1?`${e.unref(l).radiusSize}px`:"0"}),onClick:i=>C(a)},e.toDisplayString(r.label),15,G))),128))],4),e.createElementVNode("div",{class:"radar-wrap",style:e.normalizeStyle({color:e.unref(l).textColor,fontSize:`${e.unref(l).textSize}px`})},[e.createElementVNode("div",{id:e.unref(O),class:"radar-chart"},null,8,J),e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.indicator,(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:"bar-item-crosswise",key:a},[e.createElementVNode("div",{class:"bar-title",title:r.name,style:e.normalizeStyle({color:e.unref(l).textColor})},e.toDisplayString(r.name),13,Q),e.createElementVNode("div",{class:"bar",style:e.normalizeStyle({backgroundColor:e.unref(l).barColor,height:`${e.unref(l).barHeight}px`})},[e.createElementVNode("div",{class:"progress",style:e.normalizeStyle({backgroundColor:r.color||e.unref(D.COLORS)[a],width:(r.value/n.value*100).toFixed(2)+"%"})},null,4)],4),e.createElementVNode("div",{class:"bar-value",style:e.normalizeStyle({color:e.unref(l).textColor})},e.toDisplayString(r.value||0),5)]))),128))])],4),e.renderSlot(L.$slots,"default",{},void 0,!0)],4))}})),oe=j._export_sfc(ae,[["__scopeId","data-v-9692ecf4"]]);exports.default=oe;
|
|
1
|
+
"use strict";var M=Object.defineProperty,A=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var _=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var k=(s,o,n)=>o in s?M(s,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[o]=n,E=(s,o)=>{for(var n in o||(o={}))R.call(o,n)&&k(s,n,o[n]);if(_)for(var n of _(o))$.call(o,n)&&k(s,n,o[n]);return s},N=(s,o)=>A(s,F(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const D=require("./element-resize-detector-DYs3pJPp.cjs"),j=require("./index-ZwyqrmaH.cjs"),q=require("./EChartComponentBase-Dz5E-lyI.cjs"),m=require("./installCanvasRenderer-CyhM1Qpl.cjs"),V=require("./install-DV5cEgNV.cjs"),Z=require("./install-CltTFs4e.cjs"),I=require("./install-C8buXQPI.cjs"),U=require("./install-B1IEhhn3.cjs"),H="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",P="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",G=["onClick"],J=["id"],K={class:"progress-wrap"},Q=["title"],W={DEFAULT_ICON:H,ACTIVE_ICON:P,NAME_CN:"切换",NAME_EN:"Toggle Button",ORDER:2},X={titleSize:14,textSize:12,barHeight:8,textColor:"#a8b4d9",bgColor:"#0a1635",barColor:"#1e3a5f",tabColor:"#1e3a5f",activeBgColor:"#6b7fd9",borderColor:"#1e3a5f",activeBorder:"#6b7fd9",radiusSize:8,type:{value:"none",type:"radio",option:[{value:"none",label:"component.radar.diamond"},{value:"circle",label:"component.radar.circle"}],label:"component.radar.shapeSelect"},tags:{value:[{label:"TAB1",flag:["S01","S02","S03"]},{label:"TAB2",flag:["S02","S03","S04"]}],type:"tags",label:"component.radar.tagsSetting"}},Y=[{name:"参数一",color:"#4162ff",fv:"S01",object_id:""},{name:"参数二",color:"#3bbc6a",fv:"S02",object_id:""},{name:"参数三",color:"#e24359",fv:"S03",object_id:""},{name:"参数四",color:"#ff8b41",fv:"S04",object_id:""}],ee=["name","fv","object_id","color"],te=["mosaic","statistics","calculate"],re={useAlias:!1,multiObject:!1,source:"mosaic"},le={DEFAULT:W,OPTIONS:X,DATA:Y,PARAMS:ee,SOURCE:te,COMMON:re},ae=e.defineComponent(N(E({},le),{__name:"toggleBtn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){m.use([V.install,Z.install,m.install,I.install,m.install$1,U.install]);const o=s,n=e.ref(0),u=e.reactive({indicator:[],series:[]}),d=e.ref(0);class T extends q.EChartComponentBase{extractStyles(){var r,a,i,c,f,g,h,p,S,b,y,x,w,z,B;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleSize:((a=t==null?void 0:t.titleSize)==null?void 0:a.value)||16,barHeight:((i=t==null?void 0:t.barHeight)==null?void 0:i.value)||8,textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#111",tabColor:((f=t==null?void 0:t.tabColor)==null?void 0:f.value)||"#f5f5f5",activeBgColor:((g=t==null?void 0:t.activeBgColor)==null?void 0:g.value)||"#4162ff",borderColor:((h=t==null?void 0:t.borderColor)==null?void 0:h.value)||"#e5e5e5",activeBorder:((p=t==null?void 0:t.activeBorder)==null?void 0:p.value)||"#4162ff",barColor:((S=t==null?void 0:t.barColor)==null?void 0:S.value)||"#e5e5e5",radiusSize:(y=(b=t==null?void 0:t.radiusSize)==null?void 0:b.value)!=null?y:8,textSize:(w=(x=t==null?void 0:t.textSize)==null?void 0:x.value)!=null?w:12,type:((z=t==null?void 0:t.type)==null?void 0:z.value)||!1,tags:((B=t==null?void 0:t.tags)==null?void 0:B.value)||[]}}getChartOption(){var r;const{name:t}=this.props.conf;return{radar:{shape:this.Style.value.type,axisNameGap:10,indicator:u.indicator,center:["50%","55%"],radius:70,axisLine:{lineStyle:{type:"dashed",color:"#383D42"}},splitLine:{show:!0,lineStyle:{width:1,color:"#4B5FAB"}},splitArea:{show:!0,areaStyle:{color:["transparent"]}},axisName:{fontSize:12,color:this.Style.value.textColor}},series:[{name:t!=null?t:"",type:"radar",data:(r=u.series)!=null?r:[],areaStyle:{},itemStyle:{color:"#4162ff"}}]}}init(){super.init(),e.nextTick(()=>{this.initChart(),C(d.value)})}setSocketData(t){if(!t)return;const{data:r}=this.props.conf;r.forEach(a=>{const i=this.extractDataValue(t,a.fv);a.value=i!=null?i:0}),C(d.value)}refreshChart(){var r;const t=this.getChartOption();(r=this.chartObj)==null||r.setOption(t,!0)}}const v=new T(o,"toggleBtn");v.setupLifecycle();const l=v.getStyle(),O=v.getEchartId(),C=L=>{const{data:t,options:r,name:a}=o.conf;d.value=L,u.indicator=[],u.series=[];let i={};i.name=a,i.value=[],n.value=Math.max(...t.map(c=>c.value||0)),t.forEach(c=>{var f,g;(g=(f=r.tags.value[d.value])==null?void 0:f.flag)!=null&&g.includes(c.fv)&&(u.indicator.push({name:c.name,max:n.value,value:c.value,min:0,color:c.color}),i.value.push(c.value))}),u.series.push(i),v.refreshChart()};return(L,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(l).bgColor,borderRadius:`${e.unref(l).radiusSize}px`})},[e.createElementVNode("div",{class:"toggle-wrap",style:e.normalizeStyle({borderTopLeftRadius:`${e.unref(l).radiusSize}px`,borderTopRightRadius:`${e.unref(l).radiusSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).tags,(r,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:e.normalizeClass(["btn-item",{active:d.value===a}]),style:e.normalizeStyle({backgroundColor:d.value===a?e.unref(l).activeBgColor:e.unref(l).tabColor,color:d.value===a?"#fff":e.unref(l).textColor,fontSize:`${e.unref(l).titleSize}px`,borderTopLeftRadius:a===0?`${e.unref(l).radiusSize}px`:"0",borderTopRightRadius:a===e.unref(l).tags.length-1?`${e.unref(l).radiusSize}px`:"0"}),onClick:i=>C(a)},e.toDisplayString(r.label),15,G))),128))],4),e.createElementVNode("div",{class:"radar-wrap",style:e.normalizeStyle({color:e.unref(l).textColor,fontSize:`${e.unref(l).textSize}px`})},[e.createElementVNode("div",{id:e.unref(O),class:"radar-chart"},null,8,J),e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.indicator,(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:"bar-item-crosswise",key:a},[e.createElementVNode("div",{class:"bar-title",title:r.name,style:e.normalizeStyle({color:e.unref(l).textColor})},e.toDisplayString(r.name),13,Q),e.createElementVNode("div",{class:"bar",style:e.normalizeStyle({backgroundColor:e.unref(l).barColor,height:`${e.unref(l).barHeight}px`})},[e.createElementVNode("div",{class:"progress",style:e.normalizeStyle({backgroundColor:r.color||e.unref(D.COLORS)[a],width:(r.value/n.value*100).toFixed(2)+"%"})},null,4)],4),e.createElementVNode("div",{class:"bar-value",style:e.normalizeStyle({color:e.unref(l).textColor})},e.toDisplayString(r.value||0),5)]))),128))])],4),e.renderSlot(L.$slots,"default",{},void 0,!0)],4))}})),oe=j._export_sfc(ae,[["__scopeId","data-v-9692ecf4"]]);exports.default=oe;
|
|
@@ -21,7 +21,7 @@ import "element-plus/es/components/icon/style/css";
|
|
|
21
21
|
import "element-plus/es/components/checkbox/style/css";
|
|
22
22
|
import "element-plus/es/components/date-picker/style/css";
|
|
23
23
|
import { defineComponent as be, useCssVars as Ce, computed as S, ref as ke, watch as X, onMounted as _e, openBlock as i, createElementBlock as r, normalizeStyle as Ve, Fragment as T, renderList as w, createElementVNode as y, toDisplayString as f, normalizeClass as N, createCommentVNode as _, createVNode as Y, withCtx as D, createTextVNode as L, unref as De, createBlock as M, renderSlot as Pe } from "vue";
|
|
24
|
-
import { u as Re, e as E, _ as Te } from "./index-
|
|
24
|
+
import { u as Re, e as E, _ as Te } from "./index-LgTfdmT4.js";
|
|
25
25
|
import { Delete as Ye } from "@element-plus/icons-vue";
|
|
26
26
|
import { A as Oe, D as Ie } from "./ele-ctrSet-icon-BtKGrCid.js";
|
|
27
27
|
const we = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var X=Object.defineProperty,J=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var S=(k,m,d)=>m in k?X(k,m,{enumerable:!0,configurable:!0,writable:!0,value:d}):k[m]=d,E=(k,m)=>{for(var d in m||(m={}))Z.call(m,d)&&S(k,d,m[d]);if(Y)for(var d of Y(m))x.call(m,d)&&S(k,d,m[d]);return k},j=(k,m)=>J(k,K(m));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),B=require("./index-BSzyUGIT.cjs"),ee=require("@element-plus/icons-vue"),q=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),te={key:0,class:"config-section time-range-section"},le={class:"section-header"},ae={class:"section-title"},ne={class:"time-range-body"},oe={key:0,class:"quick-range"},ce=["onClick"],se={key:1,class:"granularity-tabs"},re=["onClick"],ie={key:2,class:"date-inputs"},ue={key:1,class:"config-section time-list-section"},pe={class:"section-header"},de={class:"section-title"},me={key:0,class:"time-list-actions"},ye={class:"selected-count"},ge={key:1,class:"time-list"},ve={key:2,class:"config-section"},fe={class:"section-header"},ke={class:"section-title"},he={key:0,class:"node-list"},Ce={key:3,class:"config-section"},be={class:"section-header"},_e={class:"section-title"},Ve={key:0,class:"direction-tabs"},De=["onClick"],Be={key:4,class:"config-section"},Ee={class:"section-header"},Pe={class:"section-title"},Te={key:0,class:"range-inputs"},Ne={key:0,class:"range-unit"},Re={key:5,class:"config-section"},we={class:"section-header"},Le={class:"section-title"},Oe={key:0,class:"display-options"},Ie={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"露天矿控制面板",NAME_EN:"Openpit Control Panel",ORDER:15},Ye={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Se=[{type:"timeRange",label:"时间段",key:"timeRange",targetId:"",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day",multiple:!1,options:[{label:"选项1",value:1}],minPlaceholder:"",maxPlaceholder:"",unit:""}],je=[{key:"type",label:"component.openpitConfigPanel.type",type:"select",options:[{label:"component.openpitConfigPanel.typeOptions.timeRange",value:"timeRange"},{label:"component.openpitConfigPanel.typeOptions.timeList",value:"timeList"},{label:"component.openpitConfigPanel.typeOptions.selectList",value:"selectList"},{label:"component.openpitConfigPanel.typeOptions.direction",value:"direction"},{label:"component.openpitConfigPanel.typeOptions.range",value:"range"},{label:"component.openpitConfigPanel.typeOptions.switch",value:"switch"}]},{key:"label",label:"component.openpitConfigPanel.label",type:"string"},{key:"key",label:"component.openpitConfigPanel.key",type:"string"},{key:"targetId",label:"component.openpitConfigPanel.targetId",type:"string"},{key:"showQuickRange",label:"component.openpitConfigPanel.showQuickRange",type:"switch",dependent:"type",dependentValue:"timeRange"},{key:"dateType",label:"component.openpitConfigPanel.dateType",type:"select",options:[{label:"component.openpitConfigPanel.dateTypeOptions.date",value:"date"},{label:"component.openpitConfigPanel.dateTypeOptions.datetime",value:"datetime"}],dependent:"type",dependentValue:"timeRange"},{key:"defaultGranularity",label:"component.openpitConfigPanel.defaultGranularity",type:"select",options:[{label:"component.openpitConfigPanel.granularityOptionLabels.hour",value:"hour"},{label:"component.openpitConfigPanel.granularityOptionLabels.day",value:"day"}],dependent:"type",dependentValue:"timeRange"},{key:"timeList",label:"component.openpitConfigPanel.timeList",type:"string",dependent:"type",dependentValue:"timeList"},{key:"multiple",label:"component.openpitConfigPanel.multiple",type:"switch",dependent:"type",dependentValue:"selectList"},{key:"options",label:"component.openpitConfigPanel.options",type:"table",columns:[{key:"label",label:"label",type:"string"},{key:"value",label:"value",type:"string"}],dependent:"type",dependentValue:["selectList","direction","switch"]},{key:"minPlaceholder",label:"component.openpitConfigPanel.minPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"maxPlaceholder",label:"component.openpitConfigPanel.maxPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"unit",label:"component.openpitConfigPanel.unit",type:"string",dependent:"type",dependentValue:"range"}],qe=[],Me={useAlias:!1,multiObject:!1,source:""},Ae={DEFAULT:Ie,OPTIONS:Ye,DATA:Se,PARAMS:je,SOURCE:qe,COMMON:Me},Ue=e.defineComponent(j(E({},Ae),{__name:"trajectoryConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(k){e.useCssVars(t=>({ce9154a6:T.value.backgroundColor,v0a86116f:T.value.borderColor,v6d6e1a00:C.value.textColor,v81357e3e:C.value.borderColor,v4e6fb303:C.value.accentColor}));const m=B.useLinkStore(),d=k,C=e.computed(()=>{var u,p,i,_,y,V,c;const{options:t}=d.conf||{},l=((u=t==null?void 0:t.linkChannel)==null?void 0:u.value)||"deepDisplacement",s=((p=t==null?void 0:t.customChannel)==null?void 0:p.value)||"",r=l==="custom"&&s?s:l;return{bindId:((i=t==null?void 0:t.bindId)==null?void 0:i.value)||"",bgColor:((_=t==null?void 0:t.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((y=t==null?void 0:t.textColor)==null?void 0:y.value)||"#333333",accentColor:((V=t==null?void 0:t.accentColor)==null?void 0:V.value)||"#409eff",borderColor:((c=t==null?void 0:t.borderColor)==null?void 0:c.value)||"#e5e5e5",linkChannel:r}}),M=e.computed(()=>{const t=C.value.bindId||d.uid;if(!t){const l=`trajectoryConfigPanel_${Date.now()}`;return console.warn("[TrajectoryConfigPanel] 未配置ID,自动生成:",l),l}return t}),h=e.computed(()=>{var t;return(((t=d.conf)==null?void 0:t.data)||[]).filter(Boolean)}),a=e.ref({}),w=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],P=t=>(t==null?void 0:t.dateType)==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",A=t=>{const l=a.value[t];return l&&typeof l.granularity!="undefined"?l.granularity:"day"},L=(t,l,s)=>{const r=l.format(s);let u=l.subtract(7,"day").format(s);return t==="today"?u=l.startOf("day").format(s):t==="week"?u=l.subtract(7,"day").format(s):t==="month"?u=l.subtract(30,"day").format(s):t==="quarter"?u=l.subtract(90,"day").format(s):t==="year"&&(u=l.subtract(365,"day").format(s)),{startDate:u,endDate:r}},O=()=>{h.value.forEach((t,l)=>{var u,p,i,_,y,V,c;a.value[l]||(a.value[l]={});const s=B.dayjs(),r=t.dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(t.type==="timeRange"){const o=t.quickRangeOptions||w,f=t.defaultQuickRange||((u=o==null?void 0:o[0])==null?void 0:u.value)||"week",b=t.defaultGranularity||((i=(p=t.granularityOptions)==null?void 0:p[0])==null?void 0:i.value)||"",n=L(f,s,r);a.value[l]={quickRange:f,granularity:b,startDate:n.startDate,endDate:n.endDate}}else if(t.type==="timeList"){const o=h.value.findIndex(b=>b.type==="timeRange");let f=[];if(o>=0&&a.value[o]){const b=B.dayjs(a.value[o].startDate);let g=B.dayjs(a.value[o].endDate);for(;g.isAfter(b)||g.isSame(b,"day");)f.push(g.format(r)),g=g.subtract(1,"day")}a.value[l]={timeList:f,selectedTimes:[...f],selectAll:!0}}else if(t.type==="selectList")t.multiple?a.value[l]={selectedValues:[]}:a.value[l]={selectedValue:((y=(_=t.options)==null?void 0:_[0])==null?void 0:y.value)||""};else if(t.type==="direction")a.value[l]={selectedValue:((c=(V=t.options)==null?void 0:V[0])==null?void 0:c.value)||"total"};else if(t.type==="range")a.value[l]={min:"",max:""};else if(t.type==="switch"){const o={};(t.options||[]).forEach(f=>{o[f.value]=f.defaultValue!==!1}),a.value[l]=o}})},T=e.computed(()=>({backgroundColor:C.value.bgColor,color:C.value.textColor,borderColor:C.value.borderColor})),U=()=>{const t={};return h.value.forEach((l,s)=>{if(l.key&&a.value[s]){const r=a.value[s];l.type==="timeRange"?t[l.key]={startDate:r.startDate,endDate:r.endDate,quickRange:r.quickRange,granularity:r.granularity}:l.type==="timeList"?t[l.key]=r.selectedTimes||[]:l.type==="selectList"?t[l.key]=l.multiple?r.selectedValues:r.selectedValue:l.type==="direction"?t[l.key]=r.selectedValue:l.type==="range"?t[l.key]={min:r.min===""?null:parseFloat(r.min),max:r.max===""||r.max==="最大值"?null:parseFloat(r.max)}:l.type==="switch"&&(t[l.key]=E({},r))}}),t},N=()=>{const t=U(),l=M.value,s=h.value;console.log("[TrajectoryConfigPanel] ========== 广播配置 =========="),console.log("[TrajectoryConfigPanel] 当前面板ID:",l),console.log("[TrajectoryConfigPanel] props.uid:",d.uid),console.log("[TrajectoryConfigPanel] bindId配置:",C.value.bindId),console.log("[TrajectoryConfigPanel] 配置内容:",t),console.log("[TrajectoryConfigPanel] 配置模块数量:",s.length);const r=C.value.linkChannel||"deepDisplacement";l?(console.log(`[TrajectoryConfigPanel] 📡 广播配置到频道 ${r}:`,{objectId:l,type:"filter",filter:t}),m.publish(r,"trajectoryConfigPanel",E({objectId:l,type:"filter",filter:t},t))):console.warn("[TrajectoryConfigPanel] ⚠️ 无法广播:面板ID为空"),s.forEach((u,p)=>{const i=u.targetId;if(!i)return;i.split(",").map(y=>y.trim()).filter(y=>y).forEach(y=>{console.log(`[TrajectoryConfigPanel] 🎯 直接绑定到图表 [${p}]:`,y,t),m.publish(r,"trajectoryConfigPanel",E({objectId:y,type:"filter",filter:t},t))})}),console.log("[TrajectoryConfigPanel] ========== 广播完成 ==========")},I=(t,l)=>{const s=h.value[t];if(!s||s.type!=="timeRange"||!a.value[t])return;const r=B.dayjs(),u=s.dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";a.value[t].quickRange=l;const p=L(l,r,u);a.value[t].startDate=p.startDate,a.value[t].endDate=p.endDate,F(),v()},F=()=>{const t=h.value.findIndex(s=>s.type==="timeRange"),l=h.value.findIndex(s=>s.type==="timeList");if(t>=0&&l>=0&&a.value[t]){const s=h.value[t].dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",r=B.dayjs(a.value[t].startDate),u=B.dayjs(a.value[t].endDate),p=[];let i=u;for(;i.isAfter(r)||i.isSame(r,"day");)p.push(i.format(s)),i=i.subtract(1,"day");a.value[l]||(a.value[l]={}),a.value[l].timeList=p,a.value[l].selectedTimes=[...p],a.value[l].selectAll=!0}},Q=t=>{if(!a.value[t])return;const l=a.value[t].selectAll;a.value[t].selectedTimes=l?[...a.value[t].timeList]:[],v()},G=t=>{a.value[t]&&(a.value[t].selectedTimes=[],a.value[t].selectAll=!1,v())},z=t=>{if(!a.value[t])return;const l=a.value[t].timeList||[],s=a.value[t].selectedTimes||[];a.value[t].selectAll=s.length===l.length,v()},H=(t,l)=>{a.value[t]&&(a.value[t].selectedValue=l,v())},$=(t,l)=>{a.value[t]&&(a.value[t].granularity=l,v())},v=t=>{N()};e.watch(()=>{var t;return(t=d.conf)==null?void 0:t.data},()=>{O(),setTimeout(N,300)},{deep:!0,immediate:!0,flush:"sync"}),e.watch(()=>{var t;return(t=d.conf)==null?void 0:t.data},(t,l)=>{t&&t.forEach((s,r)=>{const u=l==null?void 0:l[r];if(s.type&&(!u||s.type!==u.type)){const p=W(s.type);Object.keys(p).forEach(i=>{(!s[i]||s[i]===""||Array.isArray(s[i])&&s[i].length===0)&&(s[i]=p[i])})}})},{deep:!0});const W=t=>({timeRange:{label:"时间段",key:"timeRange",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day"},timeList:{label:"时间列表",key:"timeList"},selectList:{label:"节点列表",key:"nodeList",multiple:!1,options:[{label:"选项1",value:1}]},direction:{label:"位移方向",key:"direction",options:[{label:"合",value:"total"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}]},range:{label:"数值区间",key:"range",minPlaceholder:"最小值",maxPlaceholder:"最大值",unit:""},switch:{label:"显示选项",key:"displayOptions",options:[{label:"开始点",value:"showStartPoint"},{label:"结束点",value:"showEndPoint"},{label:"轨迹线",value:"showTrajectory"},{label:"方向箭头",value:"showDirection"}]}})[t]||{};return e.onMounted(()=>{O();const t=h.value.findIndex(l=>l.type==="timeRange");t>=0&&I(t,"week"),setTimeout(N,300)}),(t,l)=>{const s=D.ElDatePicker,r=D.ElCheckbox,u=D.ElIcon,p=D.ElButton,i=D.ElCheckboxGroup,_=D.ElRadio,y=D.ElRadioGroup,V=D.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"trajectory-config-panel",style:e.normalizeStyle(T.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(c,o)=>{var f,b;return e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[c&&c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",le,[e.createElementVNode("span",ae,e.toDisplayString(c.label||"时间段"),1)]),e.createElementVNode("div",ne,[c.showQuickRange?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.quickRangeOptions||w,n=>{var g;return e.openBlock(),e.createElementBlock("span",{key:n.value,class:e.normalizeClass(["range-item",{active:((g=a.value[o])==null?void 0:g.quickRange)===n.value}]),onClick:R=>I(o,n.value)},e.toDisplayString(n.label),11,ce)}),128))])):e.createCommentVNode("",!0),(f=c.granularityOptions)!=null&&f.length?(e.openBlock(),e.createElementBlock("div",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.granularityOptions||[],(n,g)=>{var R;return e.openBlock(),e.createElementBlock("span",{key:(R=n==null?void 0:n.value)!=null?R:"g-"+o+"-"+g,class:e.normalizeClass(["granularity-item",{active:A(o)===(n&&n.value)}]),onClick:Qe=>n&&$(o,n.value)},e.toDisplayString(n==null?void 0:n.label),11,re)}),128))])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(s,{modelValue:a.value[o].startDate,"onUpdate:modelValue":n=>a.value[o].startDate=n,type:c.dateType||"date",placeholder:"开始时间",format:P(c),"value-format":P(c),size:"small",class:"date-picker",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(s,{modelValue:a.value[o].endDate,"onUpdate:modelValue":n=>a.value[o].endDate=n,type:c.dateType||"date",placeholder:"结束时间",format:P(c),"value-format":P(c),size:"small",class:"date-picker",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])])):c&&c.type==="timeList"?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",pe,[e.createElementVNode("span",de,e.toDisplayString(c.label||"采集时间列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(r,{modelValue:a.value[o].selectAll,"onUpdate:modelValue":n=>a.value[o].selectAll=n,onChange:n=>Q(o)},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(p,{size:"small",text:"",onClick:n=>G(o)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Delete))]),_:1}),l[1]||(l[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",ye,[l[2]||(l[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(((b=a.value[o].selectedTimes)==null?void 0:b.length)||0),1),l[3]||(l[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",ge,[e.createVNode(i,{modelValue:a.value[o].selectedTimes,"onUpdate:modelValue":n=>a.value[o].selectedTimes=n,onChange:n=>z(o)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value[o].timeList||[],n=>(e.openBlock(),e.createBlock(r,{key:n,value:n,class:"time-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])])):e.createCommentVNode("",!0)])):c&&c.type==="selectList"?(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("div",fe,[e.createElementVNode("span",ke,e.toDisplayString(c.label||"节点列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",he,[c.multiple?(e.openBlock(),e.createBlock(i,{key:1,modelValue:a.value[o].selectedValues,"onUpdate:modelValue":n=>a.value[o].selectedValues=n,onChange:n=>v()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(r,{key:n.value,value:n.value,class:"depth-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(y,{key:0,modelValue:a.value[o].selectedValue,"onUpdate:modelValue":n=>a.value[o].selectedValue=n,onChange:n=>v()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(_,{key:n.value,value:n.value,class:"depth-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])):e.createCommentVNode("",!0)])):c&&c.type==="direction"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",be,[e.createElementVNode("span",_e,e.toDisplayString(c.label||"位移方向"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createElementBlock("span",{key:n.value,class:e.normalizeClass(["direction-item",{active:a.value[o].selectedValue===n.value}]),onClick:g=>H(o,n.value)},e.toDisplayString(n.label),11,De))),128))])):e.createCommentVNode("",!0)])):c&&c.type==="range"?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("div",Ee,[e.createElementVNode("span",Pe,e.toDisplayString(c.label||"数值区间"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(V,{modelValue:a.value[o].min,"onUpdate:modelValue":n=>a.value[o].min=n,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),l[4]||(l[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(V,{modelValue:a.value[o].max,"onUpdate:modelValue":n=>a.value[o].max=n,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",Ne,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):c&&c.type==="switch"?(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",we,[e.createElementVNode("span",Le,e.toDisplayString(c.label||"显示选项"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(r,{key:n.value,modelValue:a.value[o][n.value],"onUpdate:modelValue":g=>a.value[o][n.value]=g,onChange:g=>v()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)],4)}}})),Fe=B._export_sfc(Ue,[["__scopeId","data-v-e9ece6ff"]]);exports.default=Fe;
|
|
1
|
+
"use strict";var X=Object.defineProperty,J=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var S=(k,m,d)=>m in k?X(k,m,{enumerable:!0,configurable:!0,writable:!0,value:d}):k[m]=d,E=(k,m)=>{for(var d in m||(m={}))Z.call(m,d)&&S(k,d,m[d]);if(Y)for(var d of Y(m))x.call(m,d)&&S(k,d,m[d]);return k},j=(k,m)=>J(k,K(m));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),B=require("./index-ZwyqrmaH.cjs"),ee=require("@element-plus/icons-vue"),q=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),te={key:0,class:"config-section time-range-section"},le={class:"section-header"},ae={class:"section-title"},ne={class:"time-range-body"},oe={key:0,class:"quick-range"},ce=["onClick"],se={key:1,class:"granularity-tabs"},re=["onClick"],ie={key:2,class:"date-inputs"},ue={key:1,class:"config-section time-list-section"},pe={class:"section-header"},de={class:"section-title"},me={key:0,class:"time-list-actions"},ye={class:"selected-count"},ge={key:1,class:"time-list"},ve={key:2,class:"config-section"},fe={class:"section-header"},ke={class:"section-title"},he={key:0,class:"node-list"},Ce={key:3,class:"config-section"},be={class:"section-header"},_e={class:"section-title"},Ve={key:0,class:"direction-tabs"},De=["onClick"],Be={key:4,class:"config-section"},Ee={class:"section-header"},Pe={class:"section-title"},Te={key:0,class:"range-inputs"},Ne={key:0,class:"range-unit"},Re={key:5,class:"config-section"},we={class:"section-header"},Le={class:"section-title"},Oe={key:0,class:"display-options"},Ie={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"露天矿控制面板",NAME_EN:"Openpit Control Panel",ORDER:15},Ye={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Se=[{type:"timeRange",label:"时间段",key:"timeRange",targetId:"",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day",multiple:!1,options:[{label:"选项1",value:1}],minPlaceholder:"",maxPlaceholder:"",unit:""}],je=[{key:"type",label:"component.openpitConfigPanel.type",type:"select",options:[{label:"component.openpitConfigPanel.typeOptions.timeRange",value:"timeRange"},{label:"component.openpitConfigPanel.typeOptions.timeList",value:"timeList"},{label:"component.openpitConfigPanel.typeOptions.selectList",value:"selectList"},{label:"component.openpitConfigPanel.typeOptions.direction",value:"direction"},{label:"component.openpitConfigPanel.typeOptions.range",value:"range"},{label:"component.openpitConfigPanel.typeOptions.switch",value:"switch"}]},{key:"label",label:"component.openpitConfigPanel.label",type:"string"},{key:"key",label:"component.openpitConfigPanel.key",type:"string"},{key:"targetId",label:"component.openpitConfigPanel.targetId",type:"string"},{key:"showQuickRange",label:"component.openpitConfigPanel.showQuickRange",type:"switch",dependent:"type",dependentValue:"timeRange"},{key:"dateType",label:"component.openpitConfigPanel.dateType",type:"select",options:[{label:"component.openpitConfigPanel.dateTypeOptions.date",value:"date"},{label:"component.openpitConfigPanel.dateTypeOptions.datetime",value:"datetime"}],dependent:"type",dependentValue:"timeRange"},{key:"defaultGranularity",label:"component.openpitConfigPanel.defaultGranularity",type:"select",options:[{label:"component.openpitConfigPanel.granularityOptionLabels.hour",value:"hour"},{label:"component.openpitConfigPanel.granularityOptionLabels.day",value:"day"}],dependent:"type",dependentValue:"timeRange"},{key:"timeList",label:"component.openpitConfigPanel.timeList",type:"string",dependent:"type",dependentValue:"timeList"},{key:"multiple",label:"component.openpitConfigPanel.multiple",type:"switch",dependent:"type",dependentValue:"selectList"},{key:"options",label:"component.openpitConfigPanel.options",type:"table",columns:[{key:"label",label:"label",type:"string"},{key:"value",label:"value",type:"string"}],dependent:"type",dependentValue:["selectList","direction","switch"]},{key:"minPlaceholder",label:"component.openpitConfigPanel.minPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"maxPlaceholder",label:"component.openpitConfigPanel.maxPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"unit",label:"component.openpitConfigPanel.unit",type:"string",dependent:"type",dependentValue:"range"}],qe=[],Me={useAlias:!1,multiObject:!1,source:""},Ae={DEFAULT:Ie,OPTIONS:Ye,DATA:Se,PARAMS:je,SOURCE:qe,COMMON:Me},Ue=e.defineComponent(j(E({},Ae),{__name:"trajectoryConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(k){e.useCssVars(t=>({ce9154a6:T.value.backgroundColor,v0a86116f:T.value.borderColor,v6d6e1a00:C.value.textColor,v81357e3e:C.value.borderColor,v4e6fb303:C.value.accentColor}));const m=B.useLinkStore(),d=k,C=e.computed(()=>{var u,p,i,_,y,V,c;const{options:t}=d.conf||{},l=((u=t==null?void 0:t.linkChannel)==null?void 0:u.value)||"deepDisplacement",s=((p=t==null?void 0:t.customChannel)==null?void 0:p.value)||"",r=l==="custom"&&s?s:l;return{bindId:((i=t==null?void 0:t.bindId)==null?void 0:i.value)||"",bgColor:((_=t==null?void 0:t.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((y=t==null?void 0:t.textColor)==null?void 0:y.value)||"#333333",accentColor:((V=t==null?void 0:t.accentColor)==null?void 0:V.value)||"#409eff",borderColor:((c=t==null?void 0:t.borderColor)==null?void 0:c.value)||"#e5e5e5",linkChannel:r}}),M=e.computed(()=>{const t=C.value.bindId||d.uid;if(!t){const l=`trajectoryConfigPanel_${Date.now()}`;return console.warn("[TrajectoryConfigPanel] 未配置ID,自动生成:",l),l}return t}),h=e.computed(()=>{var t;return(((t=d.conf)==null?void 0:t.data)||[]).filter(Boolean)}),a=e.ref({}),w=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],P=t=>(t==null?void 0:t.dateType)==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",A=t=>{const l=a.value[t];return l&&typeof l.granularity!="undefined"?l.granularity:"day"},L=(t,l,s)=>{const r=l.format(s);let u=l.subtract(7,"day").format(s);return t==="today"?u=l.startOf("day").format(s):t==="week"?u=l.subtract(7,"day").format(s):t==="month"?u=l.subtract(30,"day").format(s):t==="quarter"?u=l.subtract(90,"day").format(s):t==="year"&&(u=l.subtract(365,"day").format(s)),{startDate:u,endDate:r}},O=()=>{h.value.forEach((t,l)=>{var u,p,i,_,y,V,c;a.value[l]||(a.value[l]={});const s=B.dayjs(),r=t.dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(t.type==="timeRange"){const o=t.quickRangeOptions||w,f=t.defaultQuickRange||((u=o==null?void 0:o[0])==null?void 0:u.value)||"week",b=t.defaultGranularity||((i=(p=t.granularityOptions)==null?void 0:p[0])==null?void 0:i.value)||"",n=L(f,s,r);a.value[l]={quickRange:f,granularity:b,startDate:n.startDate,endDate:n.endDate}}else if(t.type==="timeList"){const o=h.value.findIndex(b=>b.type==="timeRange");let f=[];if(o>=0&&a.value[o]){const b=B.dayjs(a.value[o].startDate);let g=B.dayjs(a.value[o].endDate);for(;g.isAfter(b)||g.isSame(b,"day");)f.push(g.format(r)),g=g.subtract(1,"day")}a.value[l]={timeList:f,selectedTimes:[...f],selectAll:!0}}else if(t.type==="selectList")t.multiple?a.value[l]={selectedValues:[]}:a.value[l]={selectedValue:((y=(_=t.options)==null?void 0:_[0])==null?void 0:y.value)||""};else if(t.type==="direction")a.value[l]={selectedValue:((c=(V=t.options)==null?void 0:V[0])==null?void 0:c.value)||"total"};else if(t.type==="range")a.value[l]={min:"",max:""};else if(t.type==="switch"){const o={};(t.options||[]).forEach(f=>{o[f.value]=f.defaultValue!==!1}),a.value[l]=o}})},T=e.computed(()=>({backgroundColor:C.value.bgColor,color:C.value.textColor,borderColor:C.value.borderColor})),U=()=>{const t={};return h.value.forEach((l,s)=>{if(l.key&&a.value[s]){const r=a.value[s];l.type==="timeRange"?t[l.key]={startDate:r.startDate,endDate:r.endDate,quickRange:r.quickRange,granularity:r.granularity}:l.type==="timeList"?t[l.key]=r.selectedTimes||[]:l.type==="selectList"?t[l.key]=l.multiple?r.selectedValues:r.selectedValue:l.type==="direction"?t[l.key]=r.selectedValue:l.type==="range"?t[l.key]={min:r.min===""?null:parseFloat(r.min),max:r.max===""||r.max==="最大值"?null:parseFloat(r.max)}:l.type==="switch"&&(t[l.key]=E({},r))}}),t},N=()=>{const t=U(),l=M.value,s=h.value;console.log("[TrajectoryConfigPanel] ========== 广播配置 =========="),console.log("[TrajectoryConfigPanel] 当前面板ID:",l),console.log("[TrajectoryConfigPanel] props.uid:",d.uid),console.log("[TrajectoryConfigPanel] bindId配置:",C.value.bindId),console.log("[TrajectoryConfigPanel] 配置内容:",t),console.log("[TrajectoryConfigPanel] 配置模块数量:",s.length);const r=C.value.linkChannel||"deepDisplacement";l?(console.log(`[TrajectoryConfigPanel] 📡 广播配置到频道 ${r}:`,{objectId:l,type:"filter",filter:t}),m.publish(r,"trajectoryConfigPanel",E({objectId:l,type:"filter",filter:t},t))):console.warn("[TrajectoryConfigPanel] ⚠️ 无法广播:面板ID为空"),s.forEach((u,p)=>{const i=u.targetId;if(!i)return;i.split(",").map(y=>y.trim()).filter(y=>y).forEach(y=>{console.log(`[TrajectoryConfigPanel] 🎯 直接绑定到图表 [${p}]:`,y,t),m.publish(r,"trajectoryConfigPanel",E({objectId:y,type:"filter",filter:t},t))})}),console.log("[TrajectoryConfigPanel] ========== 广播完成 ==========")},I=(t,l)=>{const s=h.value[t];if(!s||s.type!=="timeRange"||!a.value[t])return;const r=B.dayjs(),u=s.dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";a.value[t].quickRange=l;const p=L(l,r,u);a.value[t].startDate=p.startDate,a.value[t].endDate=p.endDate,F(),v()},F=()=>{const t=h.value.findIndex(s=>s.type==="timeRange"),l=h.value.findIndex(s=>s.type==="timeList");if(t>=0&&l>=0&&a.value[t]){const s=h.value[t].dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",r=B.dayjs(a.value[t].startDate),u=B.dayjs(a.value[t].endDate),p=[];let i=u;for(;i.isAfter(r)||i.isSame(r,"day");)p.push(i.format(s)),i=i.subtract(1,"day");a.value[l]||(a.value[l]={}),a.value[l].timeList=p,a.value[l].selectedTimes=[...p],a.value[l].selectAll=!0}},Q=t=>{if(!a.value[t])return;const l=a.value[t].selectAll;a.value[t].selectedTimes=l?[...a.value[t].timeList]:[],v()},G=t=>{a.value[t]&&(a.value[t].selectedTimes=[],a.value[t].selectAll=!1,v())},z=t=>{if(!a.value[t])return;const l=a.value[t].timeList||[],s=a.value[t].selectedTimes||[];a.value[t].selectAll=s.length===l.length,v()},H=(t,l)=>{a.value[t]&&(a.value[t].selectedValue=l,v())},$=(t,l)=>{a.value[t]&&(a.value[t].granularity=l,v())},v=t=>{N()};e.watch(()=>{var t;return(t=d.conf)==null?void 0:t.data},()=>{O(),setTimeout(N,300)},{deep:!0,immediate:!0,flush:"sync"}),e.watch(()=>{var t;return(t=d.conf)==null?void 0:t.data},(t,l)=>{t&&t.forEach((s,r)=>{const u=l==null?void 0:l[r];if(s.type&&(!u||s.type!==u.type)){const p=W(s.type);Object.keys(p).forEach(i=>{(!s[i]||s[i]===""||Array.isArray(s[i])&&s[i].length===0)&&(s[i]=p[i])})}})},{deep:!0});const W=t=>({timeRange:{label:"时间段",key:"timeRange",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day"},timeList:{label:"时间列表",key:"timeList"},selectList:{label:"节点列表",key:"nodeList",multiple:!1,options:[{label:"选项1",value:1}]},direction:{label:"位移方向",key:"direction",options:[{label:"合",value:"total"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}]},range:{label:"数值区间",key:"range",minPlaceholder:"最小值",maxPlaceholder:"最大值",unit:""},switch:{label:"显示选项",key:"displayOptions",options:[{label:"开始点",value:"showStartPoint"},{label:"结束点",value:"showEndPoint"},{label:"轨迹线",value:"showTrajectory"},{label:"方向箭头",value:"showDirection"}]}})[t]||{};return e.onMounted(()=>{O();const t=h.value.findIndex(l=>l.type==="timeRange");t>=0&&I(t,"week"),setTimeout(N,300)}),(t,l)=>{const s=D.ElDatePicker,r=D.ElCheckbox,u=D.ElIcon,p=D.ElButton,i=D.ElCheckboxGroup,_=D.ElRadio,y=D.ElRadioGroup,V=D.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"trajectory-config-panel",style:e.normalizeStyle(T.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(c,o)=>{var f,b;return e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[c&&c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",le,[e.createElementVNode("span",ae,e.toDisplayString(c.label||"时间段"),1)]),e.createElementVNode("div",ne,[c.showQuickRange?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.quickRangeOptions||w,n=>{var g;return e.openBlock(),e.createElementBlock("span",{key:n.value,class:e.normalizeClass(["range-item",{active:((g=a.value[o])==null?void 0:g.quickRange)===n.value}]),onClick:R=>I(o,n.value)},e.toDisplayString(n.label),11,ce)}),128))])):e.createCommentVNode("",!0),(f=c.granularityOptions)!=null&&f.length?(e.openBlock(),e.createElementBlock("div",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.granularityOptions||[],(n,g)=>{var R;return e.openBlock(),e.createElementBlock("span",{key:(R=n==null?void 0:n.value)!=null?R:"g-"+o+"-"+g,class:e.normalizeClass(["granularity-item",{active:A(o)===(n&&n.value)}]),onClick:Qe=>n&&$(o,n.value)},e.toDisplayString(n==null?void 0:n.label),11,re)}),128))])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(s,{modelValue:a.value[o].startDate,"onUpdate:modelValue":n=>a.value[o].startDate=n,type:c.dateType||"date",placeholder:"开始时间",format:P(c),"value-format":P(c),size:"small",class:"date-picker",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(s,{modelValue:a.value[o].endDate,"onUpdate:modelValue":n=>a.value[o].endDate=n,type:c.dateType||"date",placeholder:"结束时间",format:P(c),"value-format":P(c),size:"small",class:"date-picker",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])])):c&&c.type==="timeList"?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",pe,[e.createElementVNode("span",de,e.toDisplayString(c.label||"采集时间列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(r,{modelValue:a.value[o].selectAll,"onUpdate:modelValue":n=>a.value[o].selectAll=n,onChange:n=>Q(o)},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(p,{size:"small",text:"",onClick:n=>G(o)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Delete))]),_:1}),l[1]||(l[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",ye,[l[2]||(l[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(((b=a.value[o].selectedTimes)==null?void 0:b.length)||0),1),l[3]||(l[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",ge,[e.createVNode(i,{modelValue:a.value[o].selectedTimes,"onUpdate:modelValue":n=>a.value[o].selectedTimes=n,onChange:n=>z(o)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value[o].timeList||[],n=>(e.openBlock(),e.createBlock(r,{key:n,value:n,class:"time-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])])):e.createCommentVNode("",!0)])):c&&c.type==="selectList"?(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("div",fe,[e.createElementVNode("span",ke,e.toDisplayString(c.label||"节点列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",he,[c.multiple?(e.openBlock(),e.createBlock(i,{key:1,modelValue:a.value[o].selectedValues,"onUpdate:modelValue":n=>a.value[o].selectedValues=n,onChange:n=>v()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(r,{key:n.value,value:n.value,class:"depth-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(y,{key:0,modelValue:a.value[o].selectedValue,"onUpdate:modelValue":n=>a.value[o].selectedValue=n,onChange:n=>v()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(_,{key:n.value,value:n.value,class:"depth-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])):e.createCommentVNode("",!0)])):c&&c.type==="direction"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",be,[e.createElementVNode("span",_e,e.toDisplayString(c.label||"位移方向"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createElementBlock("span",{key:n.value,class:e.normalizeClass(["direction-item",{active:a.value[o].selectedValue===n.value}]),onClick:g=>H(o,n.value)},e.toDisplayString(n.label),11,De))),128))])):e.createCommentVNode("",!0)])):c&&c.type==="range"?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("div",Ee,[e.createElementVNode("span",Pe,e.toDisplayString(c.label||"数值区间"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(V,{modelValue:a.value[o].min,"onUpdate:modelValue":n=>a.value[o].min=n,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),l[4]||(l[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(V,{modelValue:a.value[o].max,"onUpdate:modelValue":n=>a.value[o].max=n,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",Ne,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):c&&c.type==="switch"?(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",we,[e.createElementVNode("span",Le,e.toDisplayString(c.label||"显示选项"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(r,{key:n.value,modelValue:a.value[o][n.value],"onUpdate:modelValue":g=>a.value[o][n.value]=g,onChange:g=>v()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)],4)}}})),Fe=B._export_sfc(Ue,[["__scopeId","data-v-e9ece6ff"]]);exports.default=Fe;
|
|
@@ -11,9 +11,9 @@ var rt = (v, c, x) => c in v ? At(v, c, { enumerable: !0, configurable: !0, writ
|
|
|
11
11
|
return v;
|
|
12
12
|
}, ut = (v, c) => Tt(v, Pt(c));
|
|
13
13
|
import { defineComponent as Dt, computed as K, ref as $, watch as mt, watchEffect as Et, onMounted as Lt, onBeforeUnmount as zt, openBlock as Z, createElementBlock as G, normalizeStyle as q, unref as R, toDisplayString as ht, createCommentVNode as Kt, createElementVNode as w, normalizeClass as yt, Fragment as $t, renderList as Rt, renderSlot as jt, nextTick as gt } from "vue";
|
|
14
|
-
import { d as ft, C as Ht, i as Yt } from "./element-resize-detector-
|
|
15
|
-
import { u as Xt, _ as Bt } from "./index-
|
|
16
|
-
import { E as Ut } from "./EChartComponentBase-
|
|
14
|
+
import { d as ft, C as Ht, i as Yt } from "./element-resize-detector-BCRzpPES.js";
|
|
15
|
+
import { u as Xt, _ as Bt } from "./index-LgTfdmT4.js";
|
|
16
|
+
import { E as Ut } from "./EChartComponentBase-CafVdj74.js";
|
|
17
17
|
import { g as Zt } from "./titleStyle-BT5GlpAb.js";
|
|
18
18
|
import { A as Gt, D as Wt } from "./ele-circleBar-icon-DNBUxt0A.js";
|
|
19
19
|
import { u as qt, i as Jt, a as Qt } from "./installCanvasRenderer-CLT2hquJ.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ct=Object.defineProperty,bt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var it=Object.getOwnPropertySymbols;var kt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable;var lt=(x,u,d)=>u in x?Ct(x,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):x[u]=d,at=(x,u)=>{for(var d in u||(u={}))kt.call(u,d)&<(x,d,u[d]);if(it)for(var d of it(u))_t.call(u,d)&<(x,d,u[d]);return x},st=(x,u)=>bt(x,Ot(u));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),Y=require("./element-resize-detector-BvkAwVg8.cjs"),rt=require("./index-BSzyUGIT.cjs"),It=require("./EChartComponentBase-DRY0bLOI.cjs"),Vt=require("./titleStyle-NSnz6cUg.cjs"),ot=require("./ele-circleBar-icon-Da0-L9sa.cjs"),X=require("./installCanvasRenderer-CyhM1Qpl.cjs"),Tt=require("./install-C8buXQPI.cjs"),At=require("./install-ByPD0oOh.cjs"),Et=require("./install-CYwVETsi.cjs"),Pt={class:"mix-body"},Ft={class:"chart-wrap"},zt=["id"],Dt={class:"timeline-left"},wt={class:"timeline-track",ref:"trackRef"},Lt=["onClick"],Kt={DEFAULT_ICON:ot.DEFAULT_ICON,ACTIVE_ICON:ot.ACTIVE_ICON,NAME_CN:"动态轨迹分布图",NAME_EN:"TrajectoryScatter",ORDER:1},Rt={titleColor:"#111",textColor:"#111",bgColor:"#fff",radiusSize:8,textSize:12,isHideTitle:!1,top:30,bottom:50,left:50,right:30,xName:{value:"x",type:"string",label:"setting.trajectoryScatter_xName"},yName:{value:"y",type:"string",label:"setting.trajectoryScatter_yName"},showTrail:{value:!0,type:"switch",label:"setting.trajectoryScatter_showTrail"},trailLength:{value:30,type:"number",label:"setting.trajectoryScatter_trailLength",dependent:"showTrail"},points:{value:12,type:"number",label:"setting.trajectoryScatter_points"},autoPlay:{value:!0,type:"switch",label:"setting.trajectoryScatter_autoPlay"},interval:{value:1e3,type:"number",label:"setting.trajectoryScatter_interval",dependent:"autoPlay"},timelineHeight:{value:36,type:"number",label:"setting.trajectoryScatter_timelineHeight"},dotSize:{value:10,type:"number",label:"setting.trajectoryScatter_dotSize"},activeDotColor:{value:"#4162ff",type:"color",label:"setting.trajectoryScatter_activeDotColor"},dotColor:{value:"#c7c7c7",type:"color",label:"setting.trajectoryScatter_dotColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}},listenXKey:{value:"elevation",type:"string",label:"setting.trajectoryScatter_listenXKey"},listenYKey:{value:"speed",type:"string",label:"setting.trajectoryScatter_listenYKey"},listenTimeKey:{value:"",type:"string",label:"setting.trajectoryScatter_listenTimeKey"},useMock:{value:!0,type:"switch",label:"setting.trajectoryScatter_useMock"},mockCount:{value:12,type:"number",label:"setting.trajectoryScatter_mockCount",dependent:"useMock"},xMin:{value:"",type:"string",label:"setting.trajectoryScatter_xMin"},xMax:{value:"",type:"string",label:"setting.trajectoryScatter_xMax"},yMin:{value:"",type:"string",label:"setting.trajectoryScatter_yMin"},yMax:{value:"",type:"string",label:"setting.trajectoryScatter_yMax"},lockAxis:{value:!0,type:"switch",label:"setting.trajectoryScatter_lockAxis"}},ct=[{name:"轨迹点",fv_x:"elevation",fv_y:"speed",color:"#ff5a5f",object_id:""}],$t=["name","fv_x","fv_y","object_id","color"],jt=["mosaic","statistics","calculate"],Bt={useAlias:!1,multiObject:!0,source:"mosaic"},Ht={DEFAULT:Kt,OPTIONS:Rt,DATA:ct,PARAMS:$t,SOURCE:jt,COMMON:Bt},Yt=o.defineComponent(st(at({},Ht),{__name:"trajectoryScatter",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(x){X.use([Tt.install,X.install,X.install$1,At.install,Et.install]);const u=x,d=rt.useLinkStore();let K=null;class ut extends It.EChartComponentBase{extractStyles(){const e=this.getOptionValue("linkChannel","deepDisplacement"),n=this.getOptionValue("customChannel",""),i=e==="custom"&&n?n:e;return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),top:this.getOptionValue("top",30),bottom:this.getOptionValue("bottom",50),left:this.getOptionValue("left",50),right:this.getOptionValue("right",30),xName:this.getOptionValue("xName","x"),yName:this.getOptionValue("yName","y"),showTrail:this.getOptionValue("showTrail",!0),trailLength:this.getOptionValue("trailLength",30),points:this.getOptionValue("points",12),autoPlay:this.getOptionValue("autoPlay",!0),interval:this.getOptionValue("interval",1e3),timelineHeight:this.getOptionValue("timelineHeight",36),dotSize:this.getOptionValue("dotSize",10),activeDotColor:this.getOptionValue("activeDotColor","#4162ff"),dotColor:this.getOptionValue("dotColor","#c7c7c7"),linkChannel:i,listenXKey:this.getOptionValue("listenXKey","elevation"),listenYKey:this.getOptionValue("listenYKey","speed"),listenTimeKey:this.getOptionValue("listenTimeKey",""),useMock:this.getOptionValue("useMock",!0),mockCount:this.getOptionValue("mockCount",12),lockAxis:this.getOptionValue("lockAxis",!0),xMin:this.getOptionValue("xMin",""),xMax:this.getOptionValue("xMax",""),yMin:this.getOptionValue("yMin",""),yMax:this.getOptionValue("yMax","")}}init(){var e;this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=ct),o.nextTick(()=>this.initChart())}getChartOption(){var l,r,m,c,v,S;const{options:e}=this.props.conf,n=((l=e==null?void 0:e.xName)==null?void 0:l.value)||this.Style.value.xName,i=((r=e==null?void 0:e.yName)==null?void 0:r.value)||this.Style.value.yName,a=xt.value,s=(a==null?void 0:a.color)||Y.COLORS[0];return{grid:{top:this.Style.value.top,bottom:this.Style.value.bottom,left:this.Style.value.left,right:this.Style.value.right,containLabel:!0},tooltip:{trigger:"item"},xAxis:{type:"value",name:n,min:(m=M.value)==null?void 0:m.xMin,max:(c=M.value)==null?void 0:c.xMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},yAxis:{type:"value",name:i,min:(v=M.value)==null?void 0:v.yMin,max:(S=M.value)==null?void 0:S.yMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},series:[{name:"points",type:"scatter",data:yt.value,symbolSize:8,itemStyle:{color:s,opacity:.45}},{name:"current",type:"scatter",data:a?[[a.x,a.y]]:[],symbolSize:12,itemStyle:{color:s}},{name:"trail",type:"line",showSymbol:!1,smooth:!1,data:this.Style.value.showTrail?dt.value:[],lineStyle:{color:s,width:2,opacity:.6},silent:!0}]}}setHistoryData(e){et(e)}setSocketData(e){e&&et(e)}onLinkEvent(e){tt(e)}}const f=new ut(u,"trajectoryScatter"),mt=f.getEchartId();f.setupLifecycle();const p=f.getStyle(),ht=o.computed(()=>Vt.generateTitleStyle(u.conf.options)),A=o.ref([]),R=t=>typeof t=="number"&&Number.isFinite(t),yt=o.computed(()=>{var e,n;return(((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[]).map(i=>[Number(i==null?void 0:i.x),Number(i==null?void 0:i.y)]).filter(i=>R(i==null?void 0:i[0])&&R(i==null?void 0:i[1]))}),gt=o.computed(()=>{var n;const t=((n=u.conf)==null?void 0:n.runtime)||{},e=t.allPoints||t.points||[];return Array.isArray(e)?e:[]}),M=o.ref(null),U=o.ref(null),$=t=>{if(t===""||t===null||t===void 0)return null;const e=Number(t);return isNaN(e)?null:e},Z=(t,e,n)=>{var a,s,l,r,m,c;return n&&t&&t[n]!==void 0?t[n]:n&&e&&e[n]!==void 0?e[n]:(c=(m=(r=(l=(s=(a=t==null?void 0:t.time)!=null?a:t==null?void 0:t.timestamp)!=null?s:t==null?void 0:t.datetime)!=null?l:e==null?void 0:e.time)!=null?r:e==null?void 0:e.timestamp)!=null?m:e==null?void 0:e.datetime)!=null?c:e==null?void 0:e.datatime},vt=t=>{if(t==null)return"";const e=Number(t);if(Number.isFinite(e)&&String(t).length>=12)try{const i=new Date(e),a=i.getFullYear(),s=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),r=String(i.getHours()).padStart(2,"0"),m=String(i.getMinutes()).padStart(2,"0"),c=String(i.getSeconds()).padStart(2,"0");return`${a}-${s}-${l} ${r}:${m}:${c}`}catch(i){return String(t)}const n=String(t);if(n.includes(" ")||n.includes("T")){const i=n.replace("T"," "),[a,s]=i.split(" ");if(s){const[l,r,m]=s.split(":");if(l!==void 0&&r!==void 0&&m!==void 0)return`${a} ${l}:${r}:${m.slice(0,2)}`}}return n},ft=t=>{if(!(t!=null&&t.length))return null;let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(t.forEach(r=>{const m=Number(r==null?void 0:r.x),c=Number(r==null?void 0:r.y);isNaN(m)||(e=Math.min(e,m),n=Math.max(n,m)),isNaN(c)||(i=Math.min(i,c),a=Math.max(a,c))}),!isFinite(e)||!isFinite(n)||!isFinite(i)||!isFinite(a))return null;const s=(n-e)*.1||1,l=(a-i)*.1||1;return{xMin:e-s,xMax:n+s,yMin:i-l,yMax:a+l}},j=()=>{var m,c,v,S,F,N,C,b,O,k,_,I,V,T,g,h,y;const t=((m=u.conf)==null?void 0:m.options)||{};if(!((v=(c=t==null?void 0:t.lockAxis)==null?void 0:c.value)!=null?v:f.getStyle().value.lockAxis)){M.value=null;return}const n=$((F=(S=t==null?void 0:t.xMin)==null?void 0:S.value)!=null?F:f.getStyle().value.xMin),i=$((C=(N=t==null?void 0:t.xMax)==null?void 0:N.value)!=null?C:f.getStyle().value.xMax),a=$((O=(b=t==null?void 0:t.yMin)==null?void 0:b.value)!=null?O:f.getStyle().value.yMin),s=$((_=(k=t==null?void 0:t.yMax)==null?void 0:k.value)!=null?_:f.getStyle().value.yMax);if(n!==null||i!==null||a!==null||s!==null){M.value={xMin:n!==null?Math.min(n,0):void 0,xMax:i!==null?Math.max(i,0):void 0,yMin:a!==null?Math.min(a,0):void 0,yMax:s!==null?Math.max(s,0):void 0};return}if(M.value)return;const l=((V=(I=u.conf)==null?void 0:I.runtime)==null?void 0:V.points)||[],r=ft(l);if(!r){M.value={xMin:0,xMax:10,yMin:0,yMax:10};return}M.value={xMin:Math.min((T=r.xMin)!=null?T:0,0),xMax:Math.max((g=r.xMax)!=null?g:0,0),yMin:Math.min((h=r.yMin)!=null?h:0,0),yMax:Math.max((y=r.yMax)!=null?y:0,0)}},E=o.ref(0),z=o.ref(!1),xt=o.computed(()=>{var e,n;const t=((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[];return t[t.length-1]||null}),dt=o.computed(()=>{var i,a,s,l,r,m;const t=((a=(i=u.conf)==null?void 0:i.runtime)==null?void 0:a.points)||[],e=Number((m=(r=(l=(s=u.conf)==null?void 0:s.options)==null?void 0:l.trailLength)==null?void 0:r.value)!=null?m:p.value.trailLength),n=Math.max(0,t.length-Math.max(1,e));return t.slice(n).map(c=>[Number(c==null?void 0:c.x),Number(c==null?void 0:c.y)]).filter(c=>R(c==null?void 0:c[0])&&R(c==null?void 0:c[1]))}),D=()=>{const t=gt.value;A.value=t.map((e,n)=>{var i;return vt((i=e.t)!=null?i:n)}),E.value>=A.value.length&&(E.value=Math.max(0,A.value.length-1))},G=t=>{if(!t||t.seriesName!=="points"&&t.seriesName!=="current")return;const e=u.conf;if(!e.runtime)return;const n=e.runtime.allPoints,i=e.runtime.points||[];if(!Array.isArray(i)||!i.length)return;let a=0;if(Array.isArray(n)&&n.length>=i.length){const s=n.length-i.length,l=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s+l,n.length-1))}else{const s=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s,i.length-1))}P(),q(a)},w=()=>{o.nextTick(()=>{const t=f.getChartInstance();t&&(t.setOption(f.getChartOption(),!0),t.off("click",G),t.on("click",G))})},q=t=>{var l,r,m,c;const e=u.conf;e.runtime||(e.runtime={});const n=e.runtime.allPoints||[];if(!Array.isArray(n)||!n.length)return;const i=Math.max(1,Number((c=(m=(r=(l=e.options)==null?void 0:l.points)==null?void 0:r.value)!=null?m:p.value.points)!=null?c:200)),a=Math.max(0,Math.min(t,n.length-1)),s=Math.max(0,a-i+1);e.runtime.points=n.slice(s,a+1),E.value=a,j(),D(),w()},pt=t=>{P(),q(t)},P=()=>{z.value=!1,K&&(clearInterval(K),K=null)},W=()=>{var e,n,i,a;P(),z.value=!0;const t=Number((a=(i=(n=(e=u.conf)==null?void 0:e.options)==null?void 0:n.interval)==null?void 0:i.value)!=null?a:p.value.interval);K=setInterval(()=>{var r;const s=u.conf,l=((r=s==null?void 0:s.runtime)==null?void 0:r.allPoints)||[];if(!(!Array.isArray(l)||!l.length)){if(E.value>=l.length-1){P();return}q(E.value+1)}},Math.max(200,t))},St=()=>{A.value.length&&(z.value?P():W())},J=t=>{U.value!==t&&(U.value=t,M.value=null)},B=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=(s=(a=t==null?void 0:t.autoPlay)==null?void 0:a.value)!=null?s:p.value.autoPlay,n=A.value.length>1;if(e&&n){z.value||W();return}z.value&&P()},Q=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=((a=t==null?void 0:t.linkChannel)==null?void 0:a.value)||p.value.linkChannel||"deepDisplacement",n=((s=t==null?void 0:t.customChannel)==null?void 0:s.value)||"";return e==="custom"&&n?n:e};o.watch(()=>d.channels[Q()],t=>{t&&tt(t)},{deep:!0});const Mt=t=>{var i,a,s,l;const e=u.conf;e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),e.runtime.points.push(t);const n=Math.max(1,Number((l=(s=(a=(i=e.options)==null?void 0:i.points)==null?void 0:a.value)!=null?s:p.value.points)!=null?l:200));e.runtime.points.length>n&&e.runtime.points.shift()},tt=t=>{var N,C,b,O,k,_,I,V,T;if(J("link"),u.mode==="edit"||!t)return;const e=Q();if((N=t.topic)!=null&&N.channel&&e&&t.topic.channel!==e||!d.shouldHandle(t,"trajectoryScatter"))return;const n=t.payload||{},i=u.conf,a=(i==null?void 0:i.data)||[],s=(i==null?void 0:i.common)||{};if(a.length>0&&!(s!=null&&s.multiObject)){const g=Y.getObjectId(s,s==null?void 0:s.useAlias,u.uid)||((C=a[0])==null?void 0:C.object_id),h=(n==null?void 0:n.objectId)||(n==null?void 0:n.object_id);if(g&&h&&String(g)!==String(h))return}const l=((b=u.conf)==null?void 0:b.options)||{},r=((O=l==null?void 0:l.listenXKey)==null?void 0:O.value)||p.value.listenXKey||"elevation",m=((k=l==null?void 0:l.listenYKey)==null?void 0:k.value)||p.value.listenYKey||"speed",c=((_=l==null?void 0:l.listenTimeKey)==null?void 0:_.value)||p.value.listenTimeKey||"",v=Number(n==null?void 0:n[r]),S=Number(n==null?void 0:n[m]),F=Z(n,t.topic,c);if(!Number.isFinite(v)||!Number.isFinite(S)){console.warn("[trajectoryScatter] 联动数据无法解析为数字,已跳过该点:",{channel:e,xKey:r,yKey:m,tKey:c,xRaw:n==null?void 0:n[r],yRaw:n==null?void 0:n[m],payload:n});return}Mt({x:v,y:S,t:F,color:(T=(V=(I=u.conf)==null?void 0:I.data)==null?void 0:V[0])==null?void 0:T.color}),j(),D(),E.value=Math.max(0,A.value.length-1),w(),B()},et=t=>{var N,C,b,O,k,_,I,V,T;J("incoming");const e=u.conf,n=e.data||[],i=e.common||e.COMMON||e.common,a=e.options||{},s=(i==null?void 0:i.source)||"mosaic";let l=(N=t==null?void 0:t.payload)!=null?N:t;["statistics","calculate"].includes(s)&&(l=Y.formatStatisticsResult(l,n));const r=[],m=(n==null?void 0:n[0])||{},c=m.xFv||"x",v=m.yFv||"y",S=m.timeFv||"time",F=m.color;if((C=l==null?void 0:l.history)!=null&&C.length)l.history.forEach((g,h)=>{var nt;const y=(g==null?void 0:g[0])||g||{},L=Number(y==null?void 0:y[c]),H=Number(y==null?void 0:y[v]),Nt=(nt=y==null?void 0:y[S])!=null?nt:h;if(!Number.isFinite(L)||!Number.isFinite(H)){console.warn("[trajectoryScatter] history 点位字段无法解析为数字,已跳过:",{xKey:c,yKey:v,tKey:S,xRaw:y==null?void 0:y[c],yRaw:y==null?void 0:y[v],obj:y});return}r.push({x:L,y:H,t:Nt,color:F})});else if(l&&typeof l=="object"){const g=i!=null&&i.multiObject?"":Y.getObjectId(i,i==null?void 0:i.useAlias,u.uid),h=g&&((O=(b=l==null?void 0:l[g])==null?void 0:b[s])==null?void 0:O.data)||((k=l==null?void 0:l[s])==null?void 0:k.data)||(l==null?void 0:l.data)||l,y=Number(h==null?void 0:h[c]),L=Number(h==null?void 0:h[v]),H=Z(h,l,S);!Number.isFinite(y)||!Number.isFinite(L)?console.warn("[trajectoryScatter] 实时点位字段无法解析为数字,已跳过:",{objectId:g,source:s,xKey:c,yKey:v,tKey:S,xRaw:h==null?void 0:h[c],yRaw:h==null?void 0:h[v],objKeys:h&&typeof h=="object"?Object.keys(h).slice(0,50):void 0,obj:h,payload:l}):r.push({x:y,y:L,t:H,color:F})}if(e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),(_=l==null?void 0:l.history)!=null&&_.length)e.runtime.points=r;else if(r.length){e.runtime.points=[...e.runtime.points,...r];const g=Math.max(1,Number((T=(V=(I=a==null?void 0:a.points)==null?void 0:I.value)!=null?V:f.getStyle().value.points)!=null?T:200));e.runtime.points.length>g&&(e.runtime.points=e.runtime.points.slice(e.runtime.points.length-g))}D(),w(),B()};return o.watchEffect(()=>{u.conf.socketData&&f.setSocketData(u.conf.socketData)}),o.watch(()=>{var t;return(t=u.conf)==null?void 0:t.options},()=>{f.getStyle().value=f.extractStyles(),j(),D(),w(),B()},{deep:!0}),o.onMounted(()=>{const t=u.conf;t&&t.runtime&&(t.runtime.points=[],t.runtime.allPoints=[]),j(),D(),w(),B()}),o.onBeforeUnmount(()=>{P()}),(t,e)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(p).bgColor,borderRadius:`${o.unref(p).radiusSize}px`})},[o.unref(p).isHideTitle?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-title",style:o.normalizeStyle(ht.value)},o.toDisplayString(x.conf.caption||x.conf.name),5)),o.createElementVNode("div",Pt,[o.createElementVNode("div",Ft,[o.createElementVNode("div",{class:"echart-container",id:o.unref(mt)},null,8,zt)]),o.createElementVNode("div",{class:"timeline",style:o.normalizeStyle({height:`${o.unref(p).timelineHeight}px`})},[o.createElementVNode("div",Dt,[o.createElementVNode("div",{class:o.normalizeClass(["play",{active:z.value}]),onClick:St},"II",2)]),o.createElementVNode("div",wt,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(n,i)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(["time-item",{active:i===E.value}]),onClick:a=>pt(i)},o.toDisplayString(n),11,Lt))),128))],512)],4)]),o.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),qt=rt._export_sfc(Yt,[["__scopeId","data-v-20eb6dcc"]]);exports.default=qt;
|
|
1
|
+
"use strict";var Ct=Object.defineProperty,bt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var it=Object.getOwnPropertySymbols;var kt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable;var lt=(x,u,d)=>u in x?Ct(x,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):x[u]=d,at=(x,u)=>{for(var d in u||(u={}))kt.call(u,d)&<(x,d,u[d]);if(it)for(var d of it(u))_t.call(u,d)&<(x,d,u[d]);return x},st=(x,u)=>bt(x,Ot(u));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),Y=require("./element-resize-detector-DYs3pJPp.cjs"),rt=require("./index-ZwyqrmaH.cjs"),It=require("./EChartComponentBase-Dz5E-lyI.cjs"),Vt=require("./titleStyle-NSnz6cUg.cjs"),ot=require("./ele-circleBar-icon-Da0-L9sa.cjs"),X=require("./installCanvasRenderer-CyhM1Qpl.cjs"),Tt=require("./install-C8buXQPI.cjs"),At=require("./install-ByPD0oOh.cjs"),Et=require("./install-CYwVETsi.cjs"),Pt={class:"mix-body"},Ft={class:"chart-wrap"},zt=["id"],Dt={class:"timeline-left"},wt={class:"timeline-track",ref:"trackRef"},Lt=["onClick"],Kt={DEFAULT_ICON:ot.DEFAULT_ICON,ACTIVE_ICON:ot.ACTIVE_ICON,NAME_CN:"动态轨迹分布图",NAME_EN:"TrajectoryScatter",ORDER:1},Rt={titleColor:"#111",textColor:"#111",bgColor:"#fff",radiusSize:8,textSize:12,isHideTitle:!1,top:30,bottom:50,left:50,right:30,xName:{value:"x",type:"string",label:"setting.trajectoryScatter_xName"},yName:{value:"y",type:"string",label:"setting.trajectoryScatter_yName"},showTrail:{value:!0,type:"switch",label:"setting.trajectoryScatter_showTrail"},trailLength:{value:30,type:"number",label:"setting.trajectoryScatter_trailLength",dependent:"showTrail"},points:{value:12,type:"number",label:"setting.trajectoryScatter_points"},autoPlay:{value:!0,type:"switch",label:"setting.trajectoryScatter_autoPlay"},interval:{value:1e3,type:"number",label:"setting.trajectoryScatter_interval",dependent:"autoPlay"},timelineHeight:{value:36,type:"number",label:"setting.trajectoryScatter_timelineHeight"},dotSize:{value:10,type:"number",label:"setting.trajectoryScatter_dotSize"},activeDotColor:{value:"#4162ff",type:"color",label:"setting.trajectoryScatter_activeDotColor"},dotColor:{value:"#c7c7c7",type:"color",label:"setting.trajectoryScatter_dotColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}},listenXKey:{value:"elevation",type:"string",label:"setting.trajectoryScatter_listenXKey"},listenYKey:{value:"speed",type:"string",label:"setting.trajectoryScatter_listenYKey"},listenTimeKey:{value:"",type:"string",label:"setting.trajectoryScatter_listenTimeKey"},useMock:{value:!0,type:"switch",label:"setting.trajectoryScatter_useMock"},mockCount:{value:12,type:"number",label:"setting.trajectoryScatter_mockCount",dependent:"useMock"},xMin:{value:"",type:"string",label:"setting.trajectoryScatter_xMin"},xMax:{value:"",type:"string",label:"setting.trajectoryScatter_xMax"},yMin:{value:"",type:"string",label:"setting.trajectoryScatter_yMin"},yMax:{value:"",type:"string",label:"setting.trajectoryScatter_yMax"},lockAxis:{value:!0,type:"switch",label:"setting.trajectoryScatter_lockAxis"}},ct=[{name:"轨迹点",fv_x:"elevation",fv_y:"speed",color:"#ff5a5f",object_id:""}],$t=["name","fv_x","fv_y","object_id","color"],jt=["mosaic","statistics","calculate"],Bt={useAlias:!1,multiObject:!0,source:"mosaic"},Ht={DEFAULT:Kt,OPTIONS:Rt,DATA:ct,PARAMS:$t,SOURCE:jt,COMMON:Bt},Yt=o.defineComponent(st(at({},Ht),{__name:"trajectoryScatter",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(x){X.use([Tt.install,X.install,X.install$1,At.install,Et.install]);const u=x,d=rt.useLinkStore();let K=null;class ut extends It.EChartComponentBase{extractStyles(){const e=this.getOptionValue("linkChannel","deepDisplacement"),n=this.getOptionValue("customChannel",""),i=e==="custom"&&n?n:e;return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),top:this.getOptionValue("top",30),bottom:this.getOptionValue("bottom",50),left:this.getOptionValue("left",50),right:this.getOptionValue("right",30),xName:this.getOptionValue("xName","x"),yName:this.getOptionValue("yName","y"),showTrail:this.getOptionValue("showTrail",!0),trailLength:this.getOptionValue("trailLength",30),points:this.getOptionValue("points",12),autoPlay:this.getOptionValue("autoPlay",!0),interval:this.getOptionValue("interval",1e3),timelineHeight:this.getOptionValue("timelineHeight",36),dotSize:this.getOptionValue("dotSize",10),activeDotColor:this.getOptionValue("activeDotColor","#4162ff"),dotColor:this.getOptionValue("dotColor","#c7c7c7"),linkChannel:i,listenXKey:this.getOptionValue("listenXKey","elevation"),listenYKey:this.getOptionValue("listenYKey","speed"),listenTimeKey:this.getOptionValue("listenTimeKey",""),useMock:this.getOptionValue("useMock",!0),mockCount:this.getOptionValue("mockCount",12),lockAxis:this.getOptionValue("lockAxis",!0),xMin:this.getOptionValue("xMin",""),xMax:this.getOptionValue("xMax",""),yMin:this.getOptionValue("yMin",""),yMax:this.getOptionValue("yMax","")}}init(){var e;this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=ct),o.nextTick(()=>this.initChart())}getChartOption(){var l,r,m,c,v,S;const{options:e}=this.props.conf,n=((l=e==null?void 0:e.xName)==null?void 0:l.value)||this.Style.value.xName,i=((r=e==null?void 0:e.yName)==null?void 0:r.value)||this.Style.value.yName,a=xt.value,s=(a==null?void 0:a.color)||Y.COLORS[0];return{grid:{top:this.Style.value.top,bottom:this.Style.value.bottom,left:this.Style.value.left,right:this.Style.value.right,containLabel:!0},tooltip:{trigger:"item"},xAxis:{type:"value",name:n,min:(m=M.value)==null?void 0:m.xMin,max:(c=M.value)==null?void 0:c.xMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},yAxis:{type:"value",name:i,min:(v=M.value)==null?void 0:v.yMin,max:(S=M.value)==null?void 0:S.yMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},series:[{name:"points",type:"scatter",data:yt.value,symbolSize:8,itemStyle:{color:s,opacity:.45}},{name:"current",type:"scatter",data:a?[[a.x,a.y]]:[],symbolSize:12,itemStyle:{color:s}},{name:"trail",type:"line",showSymbol:!1,smooth:!1,data:this.Style.value.showTrail?dt.value:[],lineStyle:{color:s,width:2,opacity:.6},silent:!0}]}}setHistoryData(e){et(e)}setSocketData(e){e&&et(e)}onLinkEvent(e){tt(e)}}const f=new ut(u,"trajectoryScatter"),mt=f.getEchartId();f.setupLifecycle();const p=f.getStyle(),ht=o.computed(()=>Vt.generateTitleStyle(u.conf.options)),A=o.ref([]),R=t=>typeof t=="number"&&Number.isFinite(t),yt=o.computed(()=>{var e,n;return(((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[]).map(i=>[Number(i==null?void 0:i.x),Number(i==null?void 0:i.y)]).filter(i=>R(i==null?void 0:i[0])&&R(i==null?void 0:i[1]))}),gt=o.computed(()=>{var n;const t=((n=u.conf)==null?void 0:n.runtime)||{},e=t.allPoints||t.points||[];return Array.isArray(e)?e:[]}),M=o.ref(null),U=o.ref(null),$=t=>{if(t===""||t===null||t===void 0)return null;const e=Number(t);return isNaN(e)?null:e},Z=(t,e,n)=>{var a,s,l,r,m,c;return n&&t&&t[n]!==void 0?t[n]:n&&e&&e[n]!==void 0?e[n]:(c=(m=(r=(l=(s=(a=t==null?void 0:t.time)!=null?a:t==null?void 0:t.timestamp)!=null?s:t==null?void 0:t.datetime)!=null?l:e==null?void 0:e.time)!=null?r:e==null?void 0:e.timestamp)!=null?m:e==null?void 0:e.datetime)!=null?c:e==null?void 0:e.datatime},vt=t=>{if(t==null)return"";const e=Number(t);if(Number.isFinite(e)&&String(t).length>=12)try{const i=new Date(e),a=i.getFullYear(),s=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),r=String(i.getHours()).padStart(2,"0"),m=String(i.getMinutes()).padStart(2,"0"),c=String(i.getSeconds()).padStart(2,"0");return`${a}-${s}-${l} ${r}:${m}:${c}`}catch(i){return String(t)}const n=String(t);if(n.includes(" ")||n.includes("T")){const i=n.replace("T"," "),[a,s]=i.split(" ");if(s){const[l,r,m]=s.split(":");if(l!==void 0&&r!==void 0&&m!==void 0)return`${a} ${l}:${r}:${m.slice(0,2)}`}}return n},ft=t=>{if(!(t!=null&&t.length))return null;let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(t.forEach(r=>{const m=Number(r==null?void 0:r.x),c=Number(r==null?void 0:r.y);isNaN(m)||(e=Math.min(e,m),n=Math.max(n,m)),isNaN(c)||(i=Math.min(i,c),a=Math.max(a,c))}),!isFinite(e)||!isFinite(n)||!isFinite(i)||!isFinite(a))return null;const s=(n-e)*.1||1,l=(a-i)*.1||1;return{xMin:e-s,xMax:n+s,yMin:i-l,yMax:a+l}},j=()=>{var m,c,v,S,F,N,C,b,O,k,_,I,V,T,g,h,y;const t=((m=u.conf)==null?void 0:m.options)||{};if(!((v=(c=t==null?void 0:t.lockAxis)==null?void 0:c.value)!=null?v:f.getStyle().value.lockAxis)){M.value=null;return}const n=$((F=(S=t==null?void 0:t.xMin)==null?void 0:S.value)!=null?F:f.getStyle().value.xMin),i=$((C=(N=t==null?void 0:t.xMax)==null?void 0:N.value)!=null?C:f.getStyle().value.xMax),a=$((O=(b=t==null?void 0:t.yMin)==null?void 0:b.value)!=null?O:f.getStyle().value.yMin),s=$((_=(k=t==null?void 0:t.yMax)==null?void 0:k.value)!=null?_:f.getStyle().value.yMax);if(n!==null||i!==null||a!==null||s!==null){M.value={xMin:n!==null?Math.min(n,0):void 0,xMax:i!==null?Math.max(i,0):void 0,yMin:a!==null?Math.min(a,0):void 0,yMax:s!==null?Math.max(s,0):void 0};return}if(M.value)return;const l=((V=(I=u.conf)==null?void 0:I.runtime)==null?void 0:V.points)||[],r=ft(l);if(!r){M.value={xMin:0,xMax:10,yMin:0,yMax:10};return}M.value={xMin:Math.min((T=r.xMin)!=null?T:0,0),xMax:Math.max((g=r.xMax)!=null?g:0,0),yMin:Math.min((h=r.yMin)!=null?h:0,0),yMax:Math.max((y=r.yMax)!=null?y:0,0)}},E=o.ref(0),z=o.ref(!1),xt=o.computed(()=>{var e,n;const t=((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[];return t[t.length-1]||null}),dt=o.computed(()=>{var i,a,s,l,r,m;const t=((a=(i=u.conf)==null?void 0:i.runtime)==null?void 0:a.points)||[],e=Number((m=(r=(l=(s=u.conf)==null?void 0:s.options)==null?void 0:l.trailLength)==null?void 0:r.value)!=null?m:p.value.trailLength),n=Math.max(0,t.length-Math.max(1,e));return t.slice(n).map(c=>[Number(c==null?void 0:c.x),Number(c==null?void 0:c.y)]).filter(c=>R(c==null?void 0:c[0])&&R(c==null?void 0:c[1]))}),D=()=>{const t=gt.value;A.value=t.map((e,n)=>{var i;return vt((i=e.t)!=null?i:n)}),E.value>=A.value.length&&(E.value=Math.max(0,A.value.length-1))},G=t=>{if(!t||t.seriesName!=="points"&&t.seriesName!=="current")return;const e=u.conf;if(!e.runtime)return;const n=e.runtime.allPoints,i=e.runtime.points||[];if(!Array.isArray(i)||!i.length)return;let a=0;if(Array.isArray(n)&&n.length>=i.length){const s=n.length-i.length,l=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s+l,n.length-1))}else{const s=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s,i.length-1))}P(),q(a)},w=()=>{o.nextTick(()=>{const t=f.getChartInstance();t&&(t.setOption(f.getChartOption(),!0),t.off("click",G),t.on("click",G))})},q=t=>{var l,r,m,c;const e=u.conf;e.runtime||(e.runtime={});const n=e.runtime.allPoints||[];if(!Array.isArray(n)||!n.length)return;const i=Math.max(1,Number((c=(m=(r=(l=e.options)==null?void 0:l.points)==null?void 0:r.value)!=null?m:p.value.points)!=null?c:200)),a=Math.max(0,Math.min(t,n.length-1)),s=Math.max(0,a-i+1);e.runtime.points=n.slice(s,a+1),E.value=a,j(),D(),w()},pt=t=>{P(),q(t)},P=()=>{z.value=!1,K&&(clearInterval(K),K=null)},W=()=>{var e,n,i,a;P(),z.value=!0;const t=Number((a=(i=(n=(e=u.conf)==null?void 0:e.options)==null?void 0:n.interval)==null?void 0:i.value)!=null?a:p.value.interval);K=setInterval(()=>{var r;const s=u.conf,l=((r=s==null?void 0:s.runtime)==null?void 0:r.allPoints)||[];if(!(!Array.isArray(l)||!l.length)){if(E.value>=l.length-1){P();return}q(E.value+1)}},Math.max(200,t))},St=()=>{A.value.length&&(z.value?P():W())},J=t=>{U.value!==t&&(U.value=t,M.value=null)},B=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=(s=(a=t==null?void 0:t.autoPlay)==null?void 0:a.value)!=null?s:p.value.autoPlay,n=A.value.length>1;if(e&&n){z.value||W();return}z.value&&P()},Q=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=((a=t==null?void 0:t.linkChannel)==null?void 0:a.value)||p.value.linkChannel||"deepDisplacement",n=((s=t==null?void 0:t.customChannel)==null?void 0:s.value)||"";return e==="custom"&&n?n:e};o.watch(()=>d.channels[Q()],t=>{t&&tt(t)},{deep:!0});const Mt=t=>{var i,a,s,l;const e=u.conf;e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),e.runtime.points.push(t);const n=Math.max(1,Number((l=(s=(a=(i=e.options)==null?void 0:i.points)==null?void 0:a.value)!=null?s:p.value.points)!=null?l:200));e.runtime.points.length>n&&e.runtime.points.shift()},tt=t=>{var N,C,b,O,k,_,I,V,T;if(J("link"),u.mode==="edit"||!t)return;const e=Q();if((N=t.topic)!=null&&N.channel&&e&&t.topic.channel!==e||!d.shouldHandle(t,"trajectoryScatter"))return;const n=t.payload||{},i=u.conf,a=(i==null?void 0:i.data)||[],s=(i==null?void 0:i.common)||{};if(a.length>0&&!(s!=null&&s.multiObject)){const g=Y.getObjectId(s,s==null?void 0:s.useAlias,u.uid)||((C=a[0])==null?void 0:C.object_id),h=(n==null?void 0:n.objectId)||(n==null?void 0:n.object_id);if(g&&h&&String(g)!==String(h))return}const l=((b=u.conf)==null?void 0:b.options)||{},r=((O=l==null?void 0:l.listenXKey)==null?void 0:O.value)||p.value.listenXKey||"elevation",m=((k=l==null?void 0:l.listenYKey)==null?void 0:k.value)||p.value.listenYKey||"speed",c=((_=l==null?void 0:l.listenTimeKey)==null?void 0:_.value)||p.value.listenTimeKey||"",v=Number(n==null?void 0:n[r]),S=Number(n==null?void 0:n[m]),F=Z(n,t.topic,c);if(!Number.isFinite(v)||!Number.isFinite(S)){console.warn("[trajectoryScatter] 联动数据无法解析为数字,已跳过该点:",{channel:e,xKey:r,yKey:m,tKey:c,xRaw:n==null?void 0:n[r],yRaw:n==null?void 0:n[m],payload:n});return}Mt({x:v,y:S,t:F,color:(T=(V=(I=u.conf)==null?void 0:I.data)==null?void 0:V[0])==null?void 0:T.color}),j(),D(),E.value=Math.max(0,A.value.length-1),w(),B()},et=t=>{var N,C,b,O,k,_,I,V,T;J("incoming");const e=u.conf,n=e.data||[],i=e.common||e.COMMON||e.common,a=e.options||{},s=(i==null?void 0:i.source)||"mosaic";let l=(N=t==null?void 0:t.payload)!=null?N:t;["statistics","calculate"].includes(s)&&(l=Y.formatStatisticsResult(l,n));const r=[],m=(n==null?void 0:n[0])||{},c=m.xFv||"x",v=m.yFv||"y",S=m.timeFv||"time",F=m.color;if((C=l==null?void 0:l.history)!=null&&C.length)l.history.forEach((g,h)=>{var nt;const y=(g==null?void 0:g[0])||g||{},L=Number(y==null?void 0:y[c]),H=Number(y==null?void 0:y[v]),Nt=(nt=y==null?void 0:y[S])!=null?nt:h;if(!Number.isFinite(L)||!Number.isFinite(H)){console.warn("[trajectoryScatter] history 点位字段无法解析为数字,已跳过:",{xKey:c,yKey:v,tKey:S,xRaw:y==null?void 0:y[c],yRaw:y==null?void 0:y[v],obj:y});return}r.push({x:L,y:H,t:Nt,color:F})});else if(l&&typeof l=="object"){const g=i!=null&&i.multiObject?"":Y.getObjectId(i,i==null?void 0:i.useAlias,u.uid),h=g&&((O=(b=l==null?void 0:l[g])==null?void 0:b[s])==null?void 0:O.data)||((k=l==null?void 0:l[s])==null?void 0:k.data)||(l==null?void 0:l.data)||l,y=Number(h==null?void 0:h[c]),L=Number(h==null?void 0:h[v]),H=Z(h,l,S);!Number.isFinite(y)||!Number.isFinite(L)?console.warn("[trajectoryScatter] 实时点位字段无法解析为数字,已跳过:",{objectId:g,source:s,xKey:c,yKey:v,tKey:S,xRaw:h==null?void 0:h[c],yRaw:h==null?void 0:h[v],objKeys:h&&typeof h=="object"?Object.keys(h).slice(0,50):void 0,obj:h,payload:l}):r.push({x:y,y:L,t:H,color:F})}if(e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),(_=l==null?void 0:l.history)!=null&&_.length)e.runtime.points=r;else if(r.length){e.runtime.points=[...e.runtime.points,...r];const g=Math.max(1,Number((T=(V=(I=a==null?void 0:a.points)==null?void 0:I.value)!=null?V:f.getStyle().value.points)!=null?T:200));e.runtime.points.length>g&&(e.runtime.points=e.runtime.points.slice(e.runtime.points.length-g))}D(),w(),B()};return o.watchEffect(()=>{u.conf.socketData&&f.setSocketData(u.conf.socketData)}),o.watch(()=>{var t;return(t=u.conf)==null?void 0:t.options},()=>{f.getStyle().value=f.extractStyles(),j(),D(),w(),B()},{deep:!0}),o.onMounted(()=>{const t=u.conf;t&&t.runtime&&(t.runtime.points=[],t.runtime.allPoints=[]),j(),D(),w(),B()}),o.onBeforeUnmount(()=>{P()}),(t,e)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(p).bgColor,borderRadius:`${o.unref(p).radiusSize}px`})},[o.unref(p).isHideTitle?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-title",style:o.normalizeStyle(ht.value)},o.toDisplayString(x.conf.caption||x.conf.name),5)),o.createElementVNode("div",Pt,[o.createElementVNode("div",Ft,[o.createElementVNode("div",{class:"echart-container",id:o.unref(mt)},null,8,zt)]),o.createElementVNode("div",{class:"timeline",style:o.normalizeStyle({height:`${o.unref(p).timelineHeight}px`})},[o.createElementVNode("div",Dt,[o.createElementVNode("div",{class:o.normalizeClass(["play",{active:z.value}]),onClick:St},"II",2)]),o.createElementVNode("div",wt,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(n,i)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(["time-item",{active:i===E.value}]),onClick:a=>pt(i)},o.toDisplayString(n),11,Lt))),128))],512)],4)]),o.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),qt=rt._export_sfc(Yt,[["__scopeId","data-v-20eb6dcc"]]);exports.default=qt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var O=Object.defineProperty,z=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var U=(m,i,v)=>i in m?O(m,i,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[i]=v,b=(m,i)=>{for(var v in i||(i={}))G.call(i,v)&&U(m,v,i[v]);if(q)for(var v of q(i))Q.call(i,v)&&U(m,v,i[v]);return m},N=(m,i)=>z(m,j(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),E=require("./index-BSzyUGIT.cjs"),F=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),W=require("@element-plus/icons-vue"),J={key:0,class:"config-section"},K={class:"section-header"},X={class:"section-title"},Z={key:0,class:"granularity-switch"},$=["onClick"],x=["onClick"],ee={key:0,class:"quick-range"},le=["onClick"],te={key:1,class:"date-inputs"},ae={key:1,class:"config-section"},oe={class:"section-header"},ne={class:"section-title"},se={key:0,class:"list-actions"},ce={class:"selected-count"},re={class:"select-list"},ue={key:2,class:"config-section"},de={class:"section-header"},ie={class:"section-title"},ve={class:"switch-options"},pe={key:3,class:"config-section"},me={class:"section-header"},fe={class:"section-title"},ke={class:"range-inputs"},ge={key:0,class:"range-unit"},he={key:4,class:"config-section"},ye={DEFAULT_ICON:F.DEFAULT_ICON,ACTIVE_ICON:F.ACTIVE_ICON,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20},Ce={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},bindMode:{value:"channel",type:"select",label:"绑定模式",options:[{label:"频道模式",value:"channel"},{label:"直接绑定",value:"direct"}]},linkChannel:{value:"deepDisplacement",type:"select",label:"联动频道",options:[{label:"深部位移",value:"deepDisplacement"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},_e=[{type:"timeRange",label:"时间段",key:"timeRange",targetIds:"",showGranularity:!0,showQuickRange:!0,dateType:"datetime",dateFormat:"YYYY-MM-DD HH:mm:ss"},{type:"selectList",label:"节点列表",key:"nodeList",targetIds:"",multiple:!1,options:[{label:"-123米",value:-123},{label:"-126米",value:-126},{label:"-129米",value:-129}]}],Ve=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],be=[],Ee={useAlias:!1,multiObject:!1,source:""},De={DEFAULT:ye,OPTIONS:Ce,DATA:_e,PARAMS:Ve,SOURCE:be,COMMON:Ee},Be=e.defineComponent(N(b({},De),{__name:"universalConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(m){e.useCssVars(l=>({v4ab6e686:D.value.backgroundColor,v1e19f6c8:D.value.borderColor,v59892072:p.value.textColor,v16aba7e8:p.value.borderColor,b493cbec:p.value.accentColor}));const i=E.useLinkStore(),v=m,p=e.computed(()=>{var u,d,f,_,V,y,s,n;const{options:l}=v.conf||{},t=((u=l==null?void 0:l.linkChannel)==null?void 0:u.value)||"deepDisplacement",r=((d=l==null?void 0:l.customChannel)==null?void 0:d.value)||"",c=t==="custom"&&r?r:t;return{bindId:((f=l==null?void 0:l.bindId)==null?void 0:f.value)||"",bgColor:((_=l==null?void 0:l.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((V=l==null?void 0:l.textColor)==null?void 0:V.value)||"#333333",accentColor:((y=l==null?void 0:l.accentColor)==null?void 0:y.value)||"#409eff",borderColor:((s=l==null?void 0:l.borderColor)==null?void 0:s.value)||"#e5e5e5",bindMode:((n=l==null?void 0:l.bindMode)==null?void 0:n.value)||"channel",linkChannel:c}}),S=e.computed(()=>p.value.bindId||v.uid||""),g=e.computed(()=>{var l;return(((l=v.conf)==null?void 0:l.data)||[]).filter(Boolean)}),a=e.ref({}),R=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],D=e.computed(()=>({backgroundColor:p.value.bgColor,color:p.value.textColor,borderColor:p.value.borderColor})),I=l=>{const t=a.value[l];return t&&typeof t.granularity!="undefined"?t.granularity:"day"},Y=()=>{a.value={},g.value.forEach((l,t)=>{var r,c,u;if(a.value[t]={},l.type==="timeRange"){a.value[t]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const d=E.dayjs();a.value[t].endDate=d.format(l.dateFormat||"YYYY-MM-DD HH:mm:ss"),a.value[t].startDate=d.subtract(7,"day").format(l.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(l.type==="selectList")a.value[t]={selectedValues:l.multiple?[]:"",selectedValue:l.multiple?void 0:((c=(r=l.options)==null?void 0:r[0])==null?void 0:c.value)||"",selectAll:!1},l.multiple&&l.options&&(a.value[t].selectedValues=l.options.map(d=>d.value),a.value[t].selectAll=!0);else if(l.type==="switch"){const d={};(u=l.options)==null||u.forEach(f=>{d[f.value]=f.defaultValue!==!1}),a.value[t]=d}else l.type==="range"&&(a.value[t]={min:"",max:""})})},w=()=>{const l={};return g.value.forEach((t,r)=>{if(t.key&&a.value[r]){const c=a.value[r];t.type==="timeRange"?l[t.key]={granularity:c.granularity,startDate:c.startDate,endDate:c.endDate,quickRange:c.quickRange}:t.type==="selectList"?l[t.key]=t.multiple?c.selectedValues:c.selectedValue:t.type==="switch"?l[t.key]=b({},c):t.type==="range"&&(l[t.key]={min:c.min===""?null:parseFloat(c.min),max:c.max===""?null:parseFloat(c.max)})}}),l},B=()=>{const l=w(),t=S.value,r=p.value.bindMode,c=p.value.linkChannel;t&&(console.log("[UniversalConfigPanel] 广播配置:",{id:t,bindMode:r,linkChannel:c,config:l}),r==="channel"?i.publish(c,"universalConfigPanel",{objectId:t,type:"config",fv:l}):g.value.forEach(u=>{if(!u.targetIds)return;u.targetIds.split(",").map(f=>f.trim()).filter(Boolean).forEach(f=>{i.publish(c,"universalConfigPanel",{objectId:f,type:"bindConfig",fv:N(b({},l),{[u.key]:l[u.key]})})})}))},M=(l,t)=>{a.value[l]&&(a.value[l].granularity=t,k())},A=(l,t)=>{if(!a.value[l])return;const r=g.value[l],c=E.dayjs(),u=r.dateFormat||"YYYY-MM-DD HH:mm:ss";a.value[l].quickRange=t,a.value[l].endDate=c.format(u),t==="week"?a.value[l].startDate=c.subtract(7,"day").format(u):t==="month"?a.value[l].startDate=c.subtract(30,"day").format(u):t==="quarter"&&(a.value[l].startDate=c.subtract(90,"day").format(u)),k()},k=l=>{B()},H=l=>{var r;const t=g.value[l];!t.multiple||!a.value[l]||(a.value[l].selectAll?a.value[l].selectedValues=((r=t.options)==null?void 0:r.map(c=>c.value))||[]:a.value[l].selectedValues=[],k())},P=l=>{a.value[l]&&(a.value[l].selectedValues=[],a.value[l].selectAll=!1,k())},T=l=>{var r;const t=g.value[l];t.multiple&&a.value[l]&&(a.value[l].selectAll=a.value[l].selectedValues.length===(((r=t.options)==null?void 0:r.length)||0)),k()},L=l=>{var c;const t=g.value[l],r=w();p.value.bindMode==="channel"?i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:S.value,type:"action",action:t.key,fv:r}):(((c=t.targetIds)==null?void 0:c.split(",").map(d=>d.trim()).filter(Boolean))||[]).forEach(d=>{i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:d,type:"action",action:t.key,fv:r})})};return e.watch(g,()=>{Y(),setTimeout(B,300)},{immediate:!0,deep:!0,flush:"sync"}),e.onMounted(()=>{Y(),setTimeout(B,300)}),(l,t)=>{const r=h.ElDatePicker,c=h.ElCheckbox,u=h.ElIcon,d=h.ElButton,f=h.ElCheckboxGroup,_=h.ElRadio,V=h.ElRadioGroup,y=h.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"universal-config-panel",style:e.normalizeStyle(D.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(s,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[s&&s.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",K,[e.createElementVNode("span",X,e.toDisplayString(s.label||"时间段"),1),s.showGranularity&&a.value[n]?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:I(n)==="day"}]),onClick:o=>M(n,"day")}," 日均 ",10,$),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:I(n)==="hour"}]),onClick:o=>M(n,"hour")}," 小时 ",10,x)])):e.createCommentVNode("",!0)]),s.showQuickRange&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(R,o=>{var C;return e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:((C=a.value[n])==null?void 0:C.quickRange)===o.value}]),onClick:Se=>A(n,o.value)},e.toDisplayString(o.label),11,le)}),64))])):e.createCommentVNode("",!0),a.value[n]?(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(r,{modelValue:a.value[n].startDate,"onUpdate:modelValue":o=>a.value[n].startDate=o,type:s.dateType||"datetime",placeholder:"开始时间",format:s.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":s.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(r,{modelValue:a.value[n].endDate,"onUpdate:modelValue":o=>a.value[n].endDate=o,type:s.dateType||"datetime",placeholder:"结束时间",format:s.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":s.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])):s&&s.type==="selectList"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",oe,[e.createElementVNode("span",ne,e.toDisplayString(s.label||"选择列表"),1)]),s.multiple?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(c,{modelValue:a.value[n].selectAll,"onUpdate:modelValue":o=>a.value[n].selectAll=o,onChange:o=>H(n)},{default:e.withCtx(()=>[...t[0]||(t[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(d,{size:"small",text:"",onClick:o=>P(n)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(W.Delete))]),_:1}),t[1]||(t[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",ce,[t[2]||(t[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(a.value[n].selectedValues&&a.value[n].selectedValues.length||0),1),t[3]||(t[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",re,[s.multiple?(e.openBlock(),e.createBlock(f,{key:0,modelValue:a.value[n].selectedValues,"onUpdate:modelValue":o=>a.value[n].selectedValues=o,onChange:o=>T(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(c,{key:o.value,value:o.value,class:"list-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(V,{key:1,modelValue:a.value[n].selectedValue,"onUpdate:modelValue":o=>a.value[n].selectedValue=o,onChange:o=>T(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(_,{key:o.value,value:o.value,class:"list-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])])):s&&s.type==="switch"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",de,[e.createElementVNode("span",ie,e.toDisplayString(s.label||"开关"),1)]),e.createElementVNode("div",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(c,{key:o.value,modelValue:a.value[n][o.value],"onUpdate:modelValue":C=>a.value[n][o.value]=C,onChange:C=>k()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):s&&s.type==="range"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",me,[e.createElementVNode("span",fe,e.toDisplayString(s.label||"范围设置"),1)]),e.createElementVNode("div",ke,[e.createVNode(y,{modelValue:a.value[n].min,"onUpdate:modelValue":o=>a.value[n].min=o,size:"small",placeholder:s.minPlaceholder||"最小值",class:"range-input",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),t[4]||(t[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(y,{modelValue:a.value[n].max,"onUpdate:modelValue":o=>a.value[n].max=o,size:"small",placeholder:s.maxPlaceholder||"最大值",class:"range-input",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),s.unit?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(s.unit),1)):e.createCommentVNode("",!0)])])):s&&s.type==="button"?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(d,{size:"small",onClick:o=>L(n),class:"action-btn",type:s.buttonType||"primary"},{default:e.withCtx(()=>[s.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.icon)))]),_:2},1024)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(s.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ne=E._export_sfc(Be,[["__scopeId","data-v-50871f8e"]]);exports.default=Ne;
|
|
1
|
+
"use strict";var O=Object.defineProperty,z=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var U=(m,i,v)=>i in m?O(m,i,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[i]=v,b=(m,i)=>{for(var v in i||(i={}))G.call(i,v)&&U(m,v,i[v]);if(q)for(var v of q(i))Q.call(i,v)&&U(m,v,i[v]);return m},N=(m,i)=>z(m,j(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),E=require("./index-ZwyqrmaH.cjs"),F=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),W=require("@element-plus/icons-vue"),J={key:0,class:"config-section"},K={class:"section-header"},X={class:"section-title"},Z={key:0,class:"granularity-switch"},$=["onClick"],x=["onClick"],ee={key:0,class:"quick-range"},le=["onClick"],te={key:1,class:"date-inputs"},ae={key:1,class:"config-section"},oe={class:"section-header"},ne={class:"section-title"},se={key:0,class:"list-actions"},ce={class:"selected-count"},re={class:"select-list"},ue={key:2,class:"config-section"},de={class:"section-header"},ie={class:"section-title"},ve={class:"switch-options"},pe={key:3,class:"config-section"},me={class:"section-header"},fe={class:"section-title"},ke={class:"range-inputs"},ge={key:0,class:"range-unit"},he={key:4,class:"config-section"},ye={DEFAULT_ICON:F.DEFAULT_ICON,ACTIVE_ICON:F.ACTIVE_ICON,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20},Ce={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},bindMode:{value:"channel",type:"select",label:"绑定模式",options:[{label:"频道模式",value:"channel"},{label:"直接绑定",value:"direct"}]},linkChannel:{value:"deepDisplacement",type:"select",label:"联动频道",options:[{label:"深部位移",value:"deepDisplacement"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},_e=[{type:"timeRange",label:"时间段",key:"timeRange",targetIds:"",showGranularity:!0,showQuickRange:!0,dateType:"datetime",dateFormat:"YYYY-MM-DD HH:mm:ss"},{type:"selectList",label:"节点列表",key:"nodeList",targetIds:"",multiple:!1,options:[{label:"-123米",value:-123},{label:"-126米",value:-126},{label:"-129米",value:-129}]}],Ve=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],be=[],Ee={useAlias:!1,multiObject:!1,source:""},De={DEFAULT:ye,OPTIONS:Ce,DATA:_e,PARAMS:Ve,SOURCE:be,COMMON:Ee},Be=e.defineComponent(N(b({},De),{__name:"universalConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(m){e.useCssVars(l=>({v4ab6e686:D.value.backgroundColor,v1e19f6c8:D.value.borderColor,v59892072:p.value.textColor,v16aba7e8:p.value.borderColor,b493cbec:p.value.accentColor}));const i=E.useLinkStore(),v=m,p=e.computed(()=>{var u,d,f,_,V,y,s,n;const{options:l}=v.conf||{},t=((u=l==null?void 0:l.linkChannel)==null?void 0:u.value)||"deepDisplacement",r=((d=l==null?void 0:l.customChannel)==null?void 0:d.value)||"",c=t==="custom"&&r?r:t;return{bindId:((f=l==null?void 0:l.bindId)==null?void 0:f.value)||"",bgColor:((_=l==null?void 0:l.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((V=l==null?void 0:l.textColor)==null?void 0:V.value)||"#333333",accentColor:((y=l==null?void 0:l.accentColor)==null?void 0:y.value)||"#409eff",borderColor:((s=l==null?void 0:l.borderColor)==null?void 0:s.value)||"#e5e5e5",bindMode:((n=l==null?void 0:l.bindMode)==null?void 0:n.value)||"channel",linkChannel:c}}),S=e.computed(()=>p.value.bindId||v.uid||""),g=e.computed(()=>{var l;return(((l=v.conf)==null?void 0:l.data)||[]).filter(Boolean)}),a=e.ref({}),R=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],D=e.computed(()=>({backgroundColor:p.value.bgColor,color:p.value.textColor,borderColor:p.value.borderColor})),I=l=>{const t=a.value[l];return t&&typeof t.granularity!="undefined"?t.granularity:"day"},Y=()=>{a.value={},g.value.forEach((l,t)=>{var r,c,u;if(a.value[t]={},l.type==="timeRange"){a.value[t]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const d=E.dayjs();a.value[t].endDate=d.format(l.dateFormat||"YYYY-MM-DD HH:mm:ss"),a.value[t].startDate=d.subtract(7,"day").format(l.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(l.type==="selectList")a.value[t]={selectedValues:l.multiple?[]:"",selectedValue:l.multiple?void 0:((c=(r=l.options)==null?void 0:r[0])==null?void 0:c.value)||"",selectAll:!1},l.multiple&&l.options&&(a.value[t].selectedValues=l.options.map(d=>d.value),a.value[t].selectAll=!0);else if(l.type==="switch"){const d={};(u=l.options)==null||u.forEach(f=>{d[f.value]=f.defaultValue!==!1}),a.value[t]=d}else l.type==="range"&&(a.value[t]={min:"",max:""})})},w=()=>{const l={};return g.value.forEach((t,r)=>{if(t.key&&a.value[r]){const c=a.value[r];t.type==="timeRange"?l[t.key]={granularity:c.granularity,startDate:c.startDate,endDate:c.endDate,quickRange:c.quickRange}:t.type==="selectList"?l[t.key]=t.multiple?c.selectedValues:c.selectedValue:t.type==="switch"?l[t.key]=b({},c):t.type==="range"&&(l[t.key]={min:c.min===""?null:parseFloat(c.min),max:c.max===""?null:parseFloat(c.max)})}}),l},B=()=>{const l=w(),t=S.value,r=p.value.bindMode,c=p.value.linkChannel;t&&(console.log("[UniversalConfigPanel] 广播配置:",{id:t,bindMode:r,linkChannel:c,config:l}),r==="channel"?i.publish(c,"universalConfigPanel",{objectId:t,type:"config",fv:l}):g.value.forEach(u=>{if(!u.targetIds)return;u.targetIds.split(",").map(f=>f.trim()).filter(Boolean).forEach(f=>{i.publish(c,"universalConfigPanel",{objectId:f,type:"bindConfig",fv:N(b({},l),{[u.key]:l[u.key]})})})}))},M=(l,t)=>{a.value[l]&&(a.value[l].granularity=t,k())},A=(l,t)=>{if(!a.value[l])return;const r=g.value[l],c=E.dayjs(),u=r.dateFormat||"YYYY-MM-DD HH:mm:ss";a.value[l].quickRange=t,a.value[l].endDate=c.format(u),t==="week"?a.value[l].startDate=c.subtract(7,"day").format(u):t==="month"?a.value[l].startDate=c.subtract(30,"day").format(u):t==="quarter"&&(a.value[l].startDate=c.subtract(90,"day").format(u)),k()},k=l=>{B()},H=l=>{var r;const t=g.value[l];!t.multiple||!a.value[l]||(a.value[l].selectAll?a.value[l].selectedValues=((r=t.options)==null?void 0:r.map(c=>c.value))||[]:a.value[l].selectedValues=[],k())},P=l=>{a.value[l]&&(a.value[l].selectedValues=[],a.value[l].selectAll=!1,k())},T=l=>{var r;const t=g.value[l];t.multiple&&a.value[l]&&(a.value[l].selectAll=a.value[l].selectedValues.length===(((r=t.options)==null?void 0:r.length)||0)),k()},L=l=>{var c;const t=g.value[l],r=w();p.value.bindMode==="channel"?i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:S.value,type:"action",action:t.key,fv:r}):(((c=t.targetIds)==null?void 0:c.split(",").map(d=>d.trim()).filter(Boolean))||[]).forEach(d=>{i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:d,type:"action",action:t.key,fv:r})})};return e.watch(g,()=>{Y(),setTimeout(B,300)},{immediate:!0,deep:!0,flush:"sync"}),e.onMounted(()=>{Y(),setTimeout(B,300)}),(l,t)=>{const r=h.ElDatePicker,c=h.ElCheckbox,u=h.ElIcon,d=h.ElButton,f=h.ElCheckboxGroup,_=h.ElRadio,V=h.ElRadioGroup,y=h.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"universal-config-panel",style:e.normalizeStyle(D.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(s,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[s&&s.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",K,[e.createElementVNode("span",X,e.toDisplayString(s.label||"时间段"),1),s.showGranularity&&a.value[n]?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:I(n)==="day"}]),onClick:o=>M(n,"day")}," 日均 ",10,$),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:I(n)==="hour"}]),onClick:o=>M(n,"hour")}," 小时 ",10,x)])):e.createCommentVNode("",!0)]),s.showQuickRange&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(R,o=>{var C;return e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:((C=a.value[n])==null?void 0:C.quickRange)===o.value}]),onClick:Se=>A(n,o.value)},e.toDisplayString(o.label),11,le)}),64))])):e.createCommentVNode("",!0),a.value[n]?(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(r,{modelValue:a.value[n].startDate,"onUpdate:modelValue":o=>a.value[n].startDate=o,type:s.dateType||"datetime",placeholder:"开始时间",format:s.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":s.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(r,{modelValue:a.value[n].endDate,"onUpdate:modelValue":o=>a.value[n].endDate=o,type:s.dateType||"datetime",placeholder:"结束时间",format:s.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":s.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])):s&&s.type==="selectList"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",oe,[e.createElementVNode("span",ne,e.toDisplayString(s.label||"选择列表"),1)]),s.multiple?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(c,{modelValue:a.value[n].selectAll,"onUpdate:modelValue":o=>a.value[n].selectAll=o,onChange:o=>H(n)},{default:e.withCtx(()=>[...t[0]||(t[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(d,{size:"small",text:"",onClick:o=>P(n)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(W.Delete))]),_:1}),t[1]||(t[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",ce,[t[2]||(t[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(a.value[n].selectedValues&&a.value[n].selectedValues.length||0),1),t[3]||(t[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",re,[s.multiple?(e.openBlock(),e.createBlock(f,{key:0,modelValue:a.value[n].selectedValues,"onUpdate:modelValue":o=>a.value[n].selectedValues=o,onChange:o=>T(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(c,{key:o.value,value:o.value,class:"list-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(V,{key:1,modelValue:a.value[n].selectedValue,"onUpdate:modelValue":o=>a.value[n].selectedValue=o,onChange:o=>T(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(_,{key:o.value,value:o.value,class:"list-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])])):s&&s.type==="switch"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",de,[e.createElementVNode("span",ie,e.toDisplayString(s.label||"开关"),1)]),e.createElementVNode("div",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(c,{key:o.value,modelValue:a.value[n][o.value],"onUpdate:modelValue":C=>a.value[n][o.value]=C,onChange:C=>k()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):s&&s.type==="range"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",me,[e.createElementVNode("span",fe,e.toDisplayString(s.label||"范围设置"),1)]),e.createElementVNode("div",ke,[e.createVNode(y,{modelValue:a.value[n].min,"onUpdate:modelValue":o=>a.value[n].min=o,size:"small",placeholder:s.minPlaceholder||"最小值",class:"range-input",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),t[4]||(t[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(y,{modelValue:a.value[n].max,"onUpdate:modelValue":o=>a.value[n].max=o,size:"small",placeholder:s.maxPlaceholder||"最大值",class:"range-input",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),s.unit?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(s.unit),1)):e.createCommentVNode("",!0)])])):s&&s.type==="button"?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(d,{size:"small",onClick:o=>L(n),class:"action-btn",type:s.buttonType||"primary"},{default:e.withCtx(()=>[s.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.icon)))]),_:2},1024)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(s.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ne=E._export_sfc(Be,[["__scopeId","data-v-50871f8e"]]);exports.default=Ne;
|
|
@@ -21,7 +21,7 @@ import "element-plus/es/components/icon/style/css";
|
|
|
21
21
|
import "element-plus/es/components/checkbox/style/css";
|
|
22
22
|
import "element-plus/es/components/date-picker/style/css";
|
|
23
23
|
import { defineComponent as ie, useCssVars as ve, computed as A, ref as pe, watch as me, onMounted as fe, openBlock as c, createElementBlock as v, normalizeStyle as he, Fragment as I, renderList as w, createElementVNode as p, toDisplayString as y, normalizeClass as T, createCommentVNode as D, createVNode as k, withCtx as C, createTextVNode as V, unref as ge, createBlock as Y, resolveDynamicComponent as ye, renderSlot as _e } from "vue";
|
|
24
|
-
import { u as Ce, e as j, _ as be } from "./index-
|
|
24
|
+
import { u as Ce, e as j, _ as be } from "./index-LgTfdmT4.js";
|
|
25
25
|
import { A as ke, D as Ve } from "./ele-ctrSet-icon-BtKGrCid.js";
|
|
26
26
|
import { Delete as De } from "@element-plus/icons-vue";
|
|
27
27
|
const Ye = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var ue=Object.defineProperty,se=Object.defineProperties;var ce=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var ie=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var j=(p,s,v)=>s in p?ue(p,s,{enumerable:!0,configurable:!0,writable:!0,value:v}):p[s]=v,q=(p,s)=>{for(var v in s||(s={}))ie.call(s,v)&&j(p,v,s[v]);if(U)for(var v of U(s))de.call(s,v)&&j(p,v,s[v]);return p},P=(p,s)=>se(p,ce(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio-button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/button/style/css");const t=require("vue"),W=require("./index-
|
|
1
|
+
"use strict";var ue=Object.defineProperty,se=Object.defineProperties;var ce=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var ie=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var j=(p,s,v)=>s in p?ue(p,s,{enumerable:!0,configurable:!0,writable:!0,value:v}):p[s]=v,q=(p,s)=>{for(var v in s||(s={}))ie.call(s,v)&&j(p,v,s[v]);if(U)for(var v of U(s))de.call(s,v)&&j(p,v,s[v]);return p},P=(p,s)=>se(p,ce(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio-button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/button/style/css");const t=require("vue"),W=require("./index-ZwyqrmaH.cjs"),pe=require("./EChartComponentBase-Dz5E-lyI.cjs"),Y=require("./ele-lst-icon-CrxnHZ-A.cjs"),ve={class:"table-header"},me={class:"title"},fe={class:"header-right"},ye={class:"row-count"},be={key:0,class:"toolbar"},he={key:0,class:"toolbar-left"},ge={key:1,class:"toolbar-right"},ke={class:"table-body"},_e=["colspan","rowspan"],we={key:0},Ce=["colspan"],Se={class:"pager"},Ee={DEFAULT_ICON:Y.DEFAULT_ICON,ACTIVE_ICON:Y.ACTIVE_ICON,NAME_CN:"通用表组件",NAME_EN:"UniversalTable",ORDER:28},Ne={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},pageSize:{value:10,type:"number",label:"每页条数"},depthStart:{value:120,type:"number",label:"深度起始值",showWhen:{filterMode:["depth","both"]}},depthEnd:{value:140,type:"number",label:"深度结束值",showWhen:{filterMode:["depth","both"]}},depthStep:{value:10,type:"number",label:"深度间隔",showWhen:{filterMode:["depth","both"]}},metricOptions:{value:[{key:"全部",label:"全部"},{key:"s",label:"合位移"},{key:"x",label:"X位移"},{key:"y",label:"Y位移"},{key:"temp",label:"温度"}],type:"columns",label:"指标选项(名称/值)",showWhen:{filterMode:["metric","both"]}},filterMode:{value:"depth",type:"select",label:"筛选模式",options:[{label:"用深度",value:"depth"},{label:"用指标",value:"metric"},{label:"都用",value:"both"},{label:"都不用",value:"none"}]},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},xe=[{key:"index",label:"序号",colType:"基础列",width:"70px",order:1},{key:"time",label:"时间",colType:"基础列",fv:"reporttime",width:"170px",order:2},{key:"node",label:"节点",colType:"基础列",fv:"node",width:"100px",order:3},{key:"disp_s",label:"合",group:"累计位移(mm)",colType:"指标列",direction:"s",fv:"s_130",width:"90px",order:10},{key:"disp_x",label:"X",group:"累计位移(mm)",colType:"指标列",direction:"x",fv:"x_130",width:"90px",order:11},{key:"disp_y",label:"Y",group:"累计位移(mm)",colType:"指标列",direction:"y",fv:"y_130",width:"90px",order:12},{key:"rate_s",label:"合",group:"累计速率(mm/d)",colType:"指标列",direction:"s",fv:"sv_130",width:"90px",order:20},{key:"rate_x",label:"X",group:"累计速率(mm/d)",colType:"指标列",direction:"x",fv:"xv_130",width:"90px",order:21},{key:"rate_y",label:"Y",group:"累计速率(mm/d)",colType:"指标列",direction:"y",fv:"yv_130",width:"90px",order:22}],Ve=[{key:"key",label:"配置键名",type:"string"},{key:"label",label:"显示名称",type:"string"},{key:"group",label:"group",type:"string"},{key:"colType",label:"类型",type:"select",options:[{label:"基础列",value:"基础列"},{label:"指标列",value:"指标列"}]},{key:"direction",label:"方向",type:"select",options:[{label:"合(s)",value:"s"},{label:"X",value:"x"},{label:"Y",value:"y"}],dependent:"colType",dependentValue:"指标列"},{key:"fv",label:"FV",type:"string"},{key:"width",label:"宽度",type:"string"},{key:"order",label:"order",type:"number"}],Be=["mosaic","statistics","calculate"],De={useAlias:!1,multiObject:!0,source:"mosaic"},Te={DEFAULT:Ee,OPTIONS:Ne,DATA:xe,PARAMS:Ve,SOURCE:Be,COMMON:De},Ae=t.defineComponent(P(q({},Te),{__name:"universalTable",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){const s=p;class v extends pe.EChartComponentBase{extractStyles(){var a,o,c,u,i;const l=((a=this.props.conf)==null?void 0:a.options)||{},n=((o=l==null?void 0:l.linkChannel)==null?void 0:o.value)||"deepDisplacement",r=((c=l==null?void 0:l.customChannel)==null?void 0:c.value)||"";return{bgColor:((u=l==null?void 0:l.bgColor)==null?void 0:u.value)||"#fff",textColor:((i=l==null?void 0:l.textColor)==null?void 0:i.value)||"#333",linkChannel:n==="custom"&&r?r:n}}getChartOption(){return{}}setSocketData(l){if(!l)return;const n=re(l);if(n.length){if(n.length>1){C.value=n;return}C.value=[...C.value.slice(-499),n[0]]}}}const w=new v(s,"universalTable");w.setupLifecycle();const x=w.getStyle(),X=W.useLinkStore(),y=t.ref(1),G=t.ref("s"),K=t.ref(!1),V=t.ref([]),h=t.ref(null),C=t.ref([]),m=t.ref(""),f=t.ref("全部"),B=t.computed(()=>{var e,l,n;return Number(((n=(l=(e=s.conf)==null?void 0:e.options)==null?void 0:l.pageSize)==null?void 0:n.value)||10)}),L=t.computed(()=>{var l;return[...((l=s.conf)==null?void 0:l.data)||[]]}),Z=e=>{const l=String(e.colType||"基础列");return l==="指标列"||l==="metric"},R=e=>{const n=String(e||"").match(/_(\d+)$/);return n?n[1]:""},H=t.computed(()=>{const e=new Set;return L.value.forEach(l=>{const n=R(l.fv);n&&e.add(n)}),Array.from(e).sort((l,n)=>Number(l)-Number(n))}),J=e=>{const n=String(e||"").match(/^([a-zA-Z]+)_\d+$/);return n?n[1]:""},g=t.computed(()=>{var l,n,r;const e=String(((r=(n=(l=s.conf)==null?void 0:l.options)==null?void 0:n.filterMode)==null?void 0:r.value)||"depth");return e==="metric"||e==="both"||e==="none"?e:"depth"}),D=t.computed(()=>{var r,a,o,c,u,i,d,b,S;const e=Number((o=(a=(r=s.conf)==null?void 0:r.options)==null?void 0:a.depthStart)==null?void 0:o.value),l=Number((i=(u=(c=s.conf)==null?void 0:c.options)==null?void 0:u.depthEnd)==null?void 0:i.value),n=Number((S=(b=(d=s.conf)==null?void 0:d.options)==null?void 0:b.depthStep)==null?void 0:S.value);if(Number.isFinite(e)&&Number.isFinite(l)&&Number.isFinite(n)&&n>0){const N=[];if(e<=l)for(let _=e;_<=l;_+=n)N.push(String(_));else for(let _=e;_>=l;_-=n)N.push(String(_));if(N.length)return N}return H.value}),T=t.computed(()=>{var l,n,r;const e=((r=(n=(l=s.conf)==null?void 0:l.options)==null?void 0:n.metricOptions)==null?void 0:r.value)||[];if(Array.isArray(e)&&e.length){const a=e.map(o=>{var c,u,i,d,b,S;return{label:String((i=(u=(c=o==null?void 0:o.label)!=null?c:o==null?void 0:o.value)!=null?u:o==null?void 0:o.key)!=null?i:""),value:String((S=(b=(d=o==null?void 0:o.key)!=null?d:o==null?void 0:o.value)!=null?b:o==null?void 0:o.label)!=null?S:"")}}).filter(o=>o.value);if(a.length)return a}return[{label:"全部",value:"全部"},{label:"合位移",value:"s"},{label:"X位移",value:"x"},{label:"Y位移",value:"y"}]}),M=t.computed(()=>g.value==="none"||g.value==="metric"?!1:D.value.length>0),I=t.computed(()=>g.value==="none"||g.value==="depth"?!1:T.value.length>0);t.watch(D,e=>{e.length&&(!m.value||!e.includes(m.value))&&(m.value=e[0])},{immediate:!0}),t.watch(T,e=>{if(!e.length)return;const l=e.map(n=>String(n.value));(!f.value||!l.includes(f.value))&&(f.value=l[0])},{immediate:!0});const k=t.computed(()=>L.value.filter(e=>{if(!Z(e))return!0;const l=R(e.fv),n=J(e.fv);return g.value==="depth"?!(m.value&&l&&l!==m.value):g.value==="metric"?!(f.value!=="全部"&&n!==f.value):g.value==="both"?!(m.value&&l&&l!==m.value||f.value!=="全部"&&n!==f.value):!0})),Q=t.computed(()=>{const e=[],l=[],n=k.value.filter(a=>!a.group),r=new Map;return k.value.filter(a=>!!a.group).forEach(a=>{const o=String(a.group);r.has(o)||r.set(o,[]),r.get(o).push(a)}),n.forEach(a=>{e.push({key:`top-${a.key}`,label:a.label,colspan:1,rowspan:r.size>0?2:1,width:a.width})}),Array.from(r.entries()).forEach(([a,o])=>{e.push({key:`top-group-${a}`,label:a,colspan:o.length,rowspan:1}),o.forEach(c=>l.push({key:`sub-${c.key}`,label:c.label,colspan:1,rowspan:1,width:c.width}))}),r.size===0?[e]:[e,l]}),ee=()=>x.value.linkChannel,te=t.computed(()=>({background:x.value.bgColor,color:x.value.textColor})),A=e=>String((e==null?void 0:e.reporttime)||(e==null?void 0:e.create_time)||(e==null?void 0:e.time)||(e==null?void 0:e.datetime)||""),O=e=>String((e==null?void 0:e.node)||(e==null?void 0:e.nodeId)||(e==null?void 0:e.point_id)||"-"),le=e=>{var a,o,c,u;if(!((a=h.value)!=null&&a.startDate)&&!((o=h.value)!=null&&o.endDate))return!0;const l=new Date(e).getTime();if(Number.isNaN(l))return!0;const n=(c=h.value)!=null&&c.startDate?new Date(h.value.startDate).getTime():Number.NEGATIVE_INFINITY,r=(u=h.value)!=null&&u.endDate?new Date(h.value.endDate).getTime():Number.POSITIVE_INFINITY;return l>=n&&l<=r},ne=t.computed(()=>C.value.filter(e=>!(!le(A(e))||V.value.length&&!V.value.includes(O(e))))),F=t.computed(()=>ne.value.map((e,l)=>{const n={__rowKey:`${A(e)}-${O(e)}-${l}`,index:l+1,time:A(e)||"-",node:O(e)||"-"};return k.value.forEach(r=>{var o;if(["index","time","node"].includes(r.key))return;const a=r.fv||r.key;n[r.key]=(o=e==null?void 0:e[a])!=null?o:"-"}),n})),$=t.computed(()=>Math.max(1,Math.ceil(F.value.length/B.value))),z=t.computed(()=>{const e=(y.value-1)*B.value;return F.value.slice(e,e+B.value)}),oe=()=>{const e=k.value.map(c=>c.label),l=F.value.map(c=>k.value.map(u=>{var i;return String((i=c[u.key])!=null?i:"-")})),n=[e,...l].map(c=>c.join(",")).join(`
|
|
2
2
|
`),r=new Blob([n],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=`universal-table-${Date.now()}.csv`,o.click(),URL.revokeObjectURL(a)},ae=e=>{const l=e.payload||{};if(l.type!=="filter")return;const n=l.filter||l,r=String(n.direction||n.displacementDirection||"").toLowerCase();(r==="s"||r==="x"||r==="y")&&(G.value=r,K.value=!0);const a=n.nodeList||n.selectedNodes||n.selectList;Array.isArray(a)&&(V.value=a.map(c=>String(c)));const o=n.timeRange||n.dateRange||null;h.value=o&&(o.startDate||o.endDate)?o:null,y.value=1},re=e=>{var l,n,r,a;return e?Array.isArray(e)?e:Array.isArray(e==null?void 0:e.data)?e.data:Array.isArray(e==null?void 0:e.history)?e.history.map(o=>(o==null?void 0:o[0])||o).filter(Boolean):Array.isArray((l=e==null?void 0:e.mosaic)==null?void 0:l.data)?e.mosaic.data:Array.isArray((n=e==null?void 0:e.statistics)==null?void 0:n.data)?e.statistics.data:(r=e==null?void 0:e.mosaic)!=null&&r.data&&typeof e.mosaic.data=="object"?[e.mosaic.data]:(a=e==null?void 0:e.statistics)!=null&&a.data&&typeof e.statistics.data=="object"?[e.statistics.data]:e!=null&&e.data&&typeof e.data=="object"?[e.data]:typeof e=="object"?[e]:[]:[]};return t.watch(()=>X.channels[ee()],e=>{e&&ae(e)},{deep:!0}),t.watchEffect(()=>{var e;(e=s.conf)!=null&&e.socketData&&w.setSocketData(s.conf.socketData)}),t.watch(()=>{var e;return(e=s.conf)==null?void 0:e.options},()=>{w.getStyle().value=w.extractStyles()},{deep:!0}),t.watch(()=>s.conf,()=>{y.value=1},{deep:!0}),(e,l)=>{const n=E.ElButton,r=E.ElOption,a=E.ElSelect,o=E.ElRadioButton,c=E.ElRadioGroup;return t.openBlock(),t.createElementBlock("div",{class:"mix-component universal-table",style:t.normalizeStyle(te.value)},[t.createElementVNode("div",ve,[t.createElementVNode("div",me,t.toDisplayString(p.conf.caption||p.conf.name||"通用表组件"),1),t.createElementVNode("div",fe,[t.createElementVNode("span",ye,"rows: "+t.toDisplayString(C.value.length),1),t.createVNode(n,{size:"small",class:"export-btn",onClick:oe},{default:t.withCtx(()=>[...l[4]||(l[4]=[t.createTextVNode("导出",-1)])]),_:1})])]),M.value||I.value?(t.openBlock(),t.createElementBlock("div",be,[M.value?(t.openBlock(),t.createElementBlock("div",he,[l[5]||(l[5]=t.createElementVNode("span",{class:"toolbar-label"},"深度",-1)),t.createVNode(a,{modelValue:m.value,"onUpdate:modelValue":l[0]||(l[0]=u=>m.value=u),size:"small",style:{width:"110px"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.value,u=>(t.openBlock(),t.createBlock(r,{key:u,label:`${u}m`,value:u},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),I.value?(t.openBlock(),t.createElementBlock("div",ge,[t.createVNode(c,{modelValue:f.value,"onUpdate:modelValue":l[1]||(l[1]=u=>f.value=u),size:"small"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(T.value,u=>(t.openBlock(),t.createBlock(o,{key:String(u.value),label:String(u.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(String(u.label)),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",ke,[t.createElementVNode("table",null,[t.createElementVNode("thead",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Q.value,(u,i)=>(t.openBlock(),t.createElementBlock("tr",{key:`hr-${i}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u,d=>(t.openBlock(),t.createElementBlock("th",{key:d.key,colspan:d.colspan,rowspan:d.rowspan,style:t.normalizeStyle({width:d.width||"auto"})},t.toDisplayString(d.label),13,_e))),128))]))),128))]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,(u,i)=>(t.openBlock(),t.createElementBlock("tr",{key:`${u.__rowKey}-${i}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,d=>{var b;return t.openBlock(),t.createElementBlock("td",{key:d.key},t.toDisplayString((b=u[d.key])!=null?b:"-"),1)}),128))]))),128)),z.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",we,[t.createElementVNode("td",{colspan:k.value.length||1,class:"empty"},"暂无数据",8,Ce)]))])])]),t.createElementVNode("div",Se,[t.createVNode(n,{size:"small",disabled:y.value<=1,onClick:l[2]||(l[2]=u=>y.value--)},{default:t.withCtx(()=>[...l[6]||(l[6]=[t.createTextVNode("上一页",-1)])]),_:1},8,["disabled"]),t.createElementVNode("span",null,t.toDisplayString(y.value)+" / "+t.toDisplayString($.value),1),t.createVNode(n,{size:"small",disabled:y.value>=$.value,onClick:l[3]||(l[3]=u=>y.value++)},{default:t.withCtx(()=>[...l[7]||(l[7]=[t.createTextVNode("下一页",-1)])]),_:1},8,["disabled"])]),t.renderSlot(e.$slots,"default",{},void 0,!0)],4)}}})),Oe=W._export_sfc(Ae,[["__scopeId","data-v-ddb95c12"]]);exports.default=Oe;
|
|
@@ -18,8 +18,8 @@ import "element-plus/es/components/select/style/css";
|
|
|
18
18
|
import "element-plus/es/components/option/style/css";
|
|
19
19
|
import "element-plus/es/components/button/style/css";
|
|
20
20
|
import { defineComponent as Te, ref as _, computed as d, watch as M, watchEffect as Ae, openBlock as i, createElementBlock as p, normalizeStyle as le, createElementVNode as b, toDisplayString as D, createVNode as V, withCtx as N, createTextVNode as $, Fragment as T, renderList as A, createBlock as ae, createCommentVNode as I, renderSlot as Ee } from "vue";
|
|
21
|
-
import { u as Oe, _ as Re } from "./index-
|
|
22
|
-
import { E as Me } from "./EChartComponentBase-
|
|
21
|
+
import { u as Oe, _ as Re } from "./index-LgTfdmT4.js";
|
|
22
|
+
import { E as Me } from "./EChartComponentBase-CafVdj74.js";
|
|
23
23
|
import { A as Ve, D as Fe } from "./ele-lst-icon-CKpeRKmk.js";
|
|
24
24
|
const $e = { class: "table-header" }, Ie = { class: "title" }, Le = { class: "header-right" }, ze = { class: "row-count" }, Ue = {
|
|
25
25
|
key: 0,
|