mixdashboards 1.0.78 → 1.0.80
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/{BaseComponent-Dwhb9Mde.js → BaseComponent-CEp8NJiX.js} +8 -8
- package/dist/{BaseComponent-bzb58Hhs.cjs → BaseComponent-DaYX7dUF.cjs} +1 -1
- package/dist/{EChartComponentBase-BmS2KONN.js → EChartComponentBase-B-VNAC8K.js} +2 -2
- package/dist/{EChartComponentBase-CMN_pOMr.cjs → EChartComponentBase-C2sxqwSE.cjs} +1 -1
- package/dist/{EmergencyPlanPanel-FtvC-aXY.js → EmergencyPlanPanel-CwWvSELn.js} +1 -1
- package/dist/{EmergencyPlanPanel-CVusdpDo.cjs → EmergencyPlanPanel-Dcj6mNDZ.cjs} +1 -1
- package/dist/{HistoryPlanDialog-CrYylrTC.cjs → HistoryPlanDialog-CHHKFCEb.cjs} +1 -1
- package/dist/{HistoryPlanDialog-DliuSi0p.js → HistoryPlanDialog-MDXWiel6.js} +1 -1
- package/dist/{MonitoringMap-CBnv001f.cjs → MonitoringMap-CfcXyLMN.cjs} +1 -1
- package/dist/{MonitoringMap-DB3R5nAJ.js → MonitoringMap-Disr1Wm4.js} +2 -2
- package/dist/{UniverSheet-DFyIjurx.js → UniverSheet-BcuvQ33A.js} +2 -2
- package/dist/{UniverSheet-jy9kOyPN.cjs → UniverSheet-M8Z5JVxm.cjs} +1 -1
- package/dist/{accelerationChart-Ceo371ch.cjs → accelerationChart-DoqDRcpd.cjs} +1 -1
- package/dist/{accelerationChart-Q_Q_QlU7.js → accelerationChart-Dq5_6weP.js} +14 -14
- package/dist/{actionItem-BzMI_4-S.js → actionItem-BryBezOd.js} +2 -2
- package/dist/{actionItem-DB74CPi2.cjs → actionItem-JVOxJr61.cjs} +1 -1
- package/dist/{alarmLevelChart-CxmiBIKh.cjs → alarmLevelChart-C4_IhtlF.cjs} +1 -1
- package/dist/{alarmLevelChart-Bp3SLCMe.js → alarmLevelChart-DUysIMGJ.js} +2 -2
- package/dist/{alertTable-B1w_i0VB.cjs → alertTable-DWQGvAmY.cjs} +1 -1
- package/dist/{alertTable-DXzTm7mA.js → alertTable-nLYwM6ix.js} +2 -2
- package/dist/{aliasObjectSelectorDemo-Dfanalux.js → aliasObjectSelectorDemo-Cgnw6vkp.js} +1 -1
- package/dist/{aliasObjectSelectorDemo-CRuq8zju.cjs → aliasObjectSelectorDemo-DdAJ_krx.cjs} +1 -1
- package/dist/{annualRainfallChart-DEeyac7q.cjs → annualRainfallChart-BVoSl6rW.cjs} +1 -1
- package/dist/{annualRainfallChart-D4Rhc84p.js → annualRainfallChart-C4P7sAvp.js} +2 -2
- package/dist/{aqi-BzCTxj0q.js → aqi-BZTi1MAr.js} +2 -2
- package/dist/{aqi-CBknBfTF.cjs → aqi-jvYPQWm2.cjs} +1 -1
- package/dist/{aqiIndass-CUs24FxP.cjs → aqiIndass-C028TDT1.cjs} +1 -1
- package/dist/{aqiIndass-BJGsJsmz.js → aqiIndass-CZfEX0GU.js} +18 -18
- package/dist/{areaDeformCurve-bSAkB3Pt.js → areaDeformCurve-B0DUtSgh.js} +2 -2
- package/dist/{areaDeformCurve-B8VGdoKK.cjs → areaDeformCurve-BXhSeaoy.cjs} +1 -1
- package/dist/{arrayCard-BkD5sytz.js → arrayCard-BlEclzhU.js} +2 -2
- package/dist/{arrayCard-kh5WRweD.cjs → arrayCard-CH1c-fdy.cjs} +1 -1
- package/dist/{audio-BTrvZwCy.js → audio-DssRoD8a.js} +2 -2
- package/dist/{audio-DwJN2gca.cjs → audio-kCcoKcES.cjs} +1 -1
- package/dist/{bar-DYIb4143.js → bar-C19ODKbU.js} +2 -2
- package/dist/{bar-DsyyzcxB.cjs → bar-Dijd0sQu.cjs} +1 -1
- package/dist/{bmp-DbEyuBZw.cjs → bmp-Bxw4TwUB.cjs} +1 -1
- package/dist/{bmp-Dt3mSkAr.js → bmp-DUTgixKN.js} +2 -2
- package/dist/{box-D7RsK5Qp.js → box-B44mc692.js} +2 -2
- package/dist/{box--u3HQFj9.cjs → box-CeE915Ww.cjs} +1 -1
- package/dist/{chartConfigPanel-DybQRqg6.cjs → chartConfigPanel-0O_o7wlV.cjs} +1 -1
- package/dist/{chartConfigPanel-CD-csrX-.js → chartConfigPanel-w0x44bWL.js} +1 -1
- package/dist/circleBar-BJoBZfyx.js +310 -0
- package/dist/circleBar-CVYAERg4.cjs +4 -0
- package/dist/{clock-Cj0HsizY.js → clock-C5FWG3xy.js} +2 -2
- package/dist/{clock-Dc9jgxHT.cjs → clock-CFE1WkOQ.cjs} +1 -1
- package/dist/{clt-uJT1jgHk.js → clt-Cycf8W0K.js} +2 -2
- package/dist/{clt-CBbtQxMc.cjs → clt-DEzN6BGU.cjs} +1 -1
- package/dist/{cmc-JJ6eTxB3.js → cmc-C9PYd5ym.js} +2 -2
- package/dist/{cmc-CeTCKLBx.cjs → cmc-DR3T47y4.cjs} +1 -1
- package/dist/{cmp-CGZ_2BdE.cjs → cmp-DsKyXUHa.cjs} +1 -1
- package/dist/{cmp-D9qlHJoW.js → cmp-Dsc6RprW.js} +2 -2
- package/dist/{conclusionCard-BsLeh3yq.js → conclusionCard-BGUQzWMI.js} +2 -2
- package/dist/{conclusionCard-CwLwj3zj.cjs → conclusionCard-sUyiTSA6.cjs} +1 -1
- package/dist/{controlList-l2ZYM6m5.cjs → controlList-B6EasOKV.cjs} +1 -1
- package/dist/{controlList-CYNS0ArB.js → controlList-DeLBnY0K.js} +2 -2
- package/dist/{controlRecordList-N79_cTON.cjs → controlRecordList-D63e4vQn.cjs} +1 -1
- package/dist/{controlRecordList-BZmCvISO.js → controlRecordList-DCz4Xt9n.js} +2 -2
- package/dist/{controlRecordListAPP-aDj520mp.js → controlRecordListAPP-D0cUYXLY.js} +2 -2
- package/dist/{controlRecordListAPP-DOzMDV4x.cjs → controlRecordListAPP-pfRdnvv1.cjs} +1 -1
- package/dist/{crd-bm_BHuoV.js → crd-B4ZnlIJq.js} +2 -2
- package/dist/{crd-CV4kMUTB.cjs → crd-DRUEk13j.cjs} +1 -1
- package/dist/{ctrBtn-DYceHTAq.js → ctrBtn-5odXmYf7.js} +17 -17
- package/dist/{ctrBtn-Cs6ZmfyJ.cjs → ctrBtn-Bm79a5Sj.cjs} +1 -1
- package/dist/{ctrSet-B6PlTSBE.js → ctrSet-B1dpatKF.js} +33 -33
- package/dist/ctrSet-BMnG-OkK.cjs +1 -0
- package/dist/{ctrSwitch-B9lHJgQn.cjs → ctrSwitch-A9LVcYIN.cjs} +1 -1
- package/dist/{ctrSwitch-E0FM_4f2.js → ctrSwitch-C5aPCuez.js} +39 -39
- package/dist/{dataManagement-bKmkV2VY.cjs → dataManagement-8NQDTifq.cjs} +1 -1
- package/dist/{dataManagement-BAHa-OHl.js → dataManagement-Dqf-T0x4.js} +2 -2
- package/dist/{dataReport-B60Rb4sb.js → dataReport-CT4_ly92.js} +2 -2
- package/dist/{dataReport-JcrjpK_j.cjs → dataReport-CiB4XAKO.cjs} +1 -1
- package/dist/{dataTable-BmvewFlr.js → dataTable-BWc0XycI.js} +1 -1
- package/dist/{dataTable-CX6uktOu.cjs → dataTable-BiyK3INj.cjs} +1 -1
- package/dist/{datetime-BPM_lGiY.cjs → datetime-BVigJCWY.cjs} +1 -1
- package/dist/{datetime-DARBbZJx.js → datetime-Du0fBPZ3.js} +2 -2
- package/dist/{deepClusterSlipSurface-BF77Vp7G.js → deepClusterSlipSurface-BJBW_lMx.js} +2 -2
- package/dist/{deepClusterSlipSurface-IywdiDlA.cjs → deepClusterSlipSurface-Dh-nEUwt.cjs} +1 -1
- package/dist/{deepDataMatrix-sRXkGqdm.cjs → deepDataMatrix-CGCLKdVW.cjs} +1 -1
- package/dist/{deepDataMatrix--zgQoWer.js → deepDataMatrix-CMJMtqVu.js} +2 -2
- package/dist/{deepDisplacement3D-BYt49pzj.js → deepDisplacement3D-BdzBAOZZ.js} +2 -2
- package/dist/{deepDisplacement3D-BET8Ftuc.cjs → deepDisplacement3D-DcwFkrri.cjs} +1 -1
- package/dist/{deepDisplacementChart-BGBhipUx.js → deepDisplacementChart-Be9lxAWP.js} +25 -25
- package/dist/{deepDisplacementChart-D7loYUI5.cjs → deepDisplacementChart-Ct7iZvof.cjs} +1 -1
- package/dist/{deepDisplacementChart-B2zPpsk6.js → deepDisplacementChart-D_dq-XPI.js} +16 -16
- package/dist/{deepDisplacementChart-BuuM485C.cjs → deepDisplacementChart-EjGt1LJp.cjs} +1 -1
- package/dist/{deepDisplacementView-Bwk9p_Qc.js → deepDisplacementView-1eSVkmqk.js} +1 -1
- package/dist/{deepDisplacementView-CTBH3IxP.cjs → deepDisplacementView-VyO91qP0.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-BqTigCTs.js → deepNodeTemperatureChart-BUvEk5T9.js} +2 -2
- package/dist/{deepNodeTemperatureChart-CTLHLf0w.cjs → deepNodeTemperatureChart-DPnQPYKr.cjs} +1 -1
- package/dist/{deepTangentAngleChart-5oxzMpMF.js → deepTangentAngleChart-5mJOFDsK.js} +2 -2
- package/dist/{deepTangentAngleChart-CHxB8OFL.cjs → deepTangentAngleChart-hJHt5aoD.cjs} +1 -1
- package/dist/{deepTemperatureField-Cr6YbuR_.cjs → deepTemperatureField-BAS3omfm.cjs} +1 -1
- package/dist/{deepTemperatureField-Bhk89D3D.js → deepTemperatureField-DlrB4dKP.js} +3 -3
- package/dist/{deepTrendChart-CAbdVR8d.js → deepTrendChart-CLNAoy8P.js} +2 -2
- package/dist/{deepTrendChart-Ch94j4W9.cjs → deepTrendChart-DAM_Ds5z.cjs} +1 -1
- package/dist/{deviceOnlineStatus-C5ODwFsY.js → deviceOnlineStatus-1UHPkOr2.js} +2 -2
- package/dist/{deviceOnlineStatus-DxsTb4Vb.cjs → deviceOnlineStatus-D_oS1F9j.cjs} +1 -1
- package/dist/{deviceStatus-DPfOQCSX.js → deviceStatus-CcPjyhrB.js} +10 -10
- package/dist/{deviceStatus-CjFTpCaU.cjs → deviceStatus-DdFB86J7.cjs} +1 -1
- package/dist/{displacementDataTable-DG36VWok.js → displacementDataTable-B7x4ogcW.js} +9 -9
- package/dist/{displacementDataTable-BIqBEkul.cjs → displacementDataTable-NlqtVyYg.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-DRltcPfa.cjs → displacementTrajectoryChart-BRy93sPt.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-Cpmj24Jn.js → displacementTrajectoryChart-C10Uroic.js} +11 -11
- package/dist/{displacementTrendChart-DpD79zii.cjs → displacementTrendChart-B5NRRQzD.cjs} +1 -1
- package/dist/{displacementTrendChart-D1yfRFQb.js → displacementTrendChart-D-_Ls7J4.js} +11 -11
- package/dist/{dxf-C_9cH0WU.cjs → dxf-B7DB_30i.cjs} +1 -1
- package/dist/{dxf-zbCakRgh.js → dxf-CqFFtWRq.js} +2 -2
- package/dist/{dzc-CfPVaIgj.js → dzc-BjA7dXWS.js} +2 -2
- package/dist/{dzc-CejqHneE.cjs → dzc-DT6Chp2Q.cjs} +1 -1
- package/dist/{emergencyPlan-dEwML5xC.cjs → emergencyPlan-DkErPudJ.cjs} +1 -1
- package/dist/{emergencyPlan-LbeRH-P9.js → emergencyPlan-IJ0wIcFl.js} +3 -3
- package/dist/{evn-DsD_MKQd.js → evn-DeaQXEPO.js} +2 -2
- package/dist/{evn-BvgQ3o3T.cjs → evn-Dh71UuO9.cjs} +1 -1
- package/dist/{evolutionChart-B4C9qB3I.js → evolutionChart-C3oCrBf3.js} +3 -3
- package/dist/{evolutionChart-Dt5-xRsy.cjs → evolutionChart-C7Ae0ZiT.cjs} +1 -1
- package/dist/{fileViewer-B0LdLy2P.js → fileViewer-8Us72XkI.js} +2 -2
- package/dist/{fileViewer-DZIREgL0.cjs → fileViewer-ERPHU_Zd.cjs} +1 -1
- package/dist/{filterBar-D_jcuqwP.cjs → filterBar-CW7bn1-p.cjs} +1 -1
- package/dist/{filterBar-Bt6w4_xK.js → filterBar-D9xz6-NL.js} +2 -2
- package/dist/{fireCombustionCurve-CHRd1nSv.cjs → fireCombustionCurve-CqiMMU_8.cjs} +1 -1
- package/dist/{fireCombustionCurve-C2rWY89D.js → fireCombustionCurve-DIUwJpXU.js} +3 -3
- package/dist/{fireFilterBar-CpwHRisZ.js → fireFilterBar-BG-StguC.js} +2 -2
- package/dist/{fireFilterBar-DX8qH1rr.cjs → fireFilterBar-Beqb_Dns.cjs} +1 -1
- package/dist/{fireHistoryTable-B38M6w5w.cjs → fireHistoryTable-CRzrvuo8.cjs} +1 -1
- package/dist/{fireHistoryTable-DcSgHt5q.js → fireHistoryTable-ChqoTAYc.js} +2 -2
- package/dist/{gag-qDNPdFJu.cjs → gag-Bx9QvvT7.cjs} +1 -1
- package/dist/{gag-BErw_nsf.js → gag-Cf3zHBXx.js} +2 -2
- package/dist/{gasStationList-BREZbC_k.js → gasStationList--rmQJ0jp.js} +2 -2
- package/dist/{gasStationList-NhJa4GO6.cjs → gasStationList-BjyCsqqM.cjs} +1 -1
- package/dist/{geo3dViewer-D9uSt0up.cjs → geo3dViewer-Ch6d1IMg.cjs} +1 -1
- package/dist/{geo3dViewer-zAN1eIza.js → geo3dViewer-mDKnyJMa.js} +3 -3
- package/dist/{glbModel-C4FiDMM5.cjs → glbModel-DAofoZCs.cjs} +1 -1
- package/dist/{glbModel-i6HvK0m8.js → glbModel-aQXnlO7p.js} +2 -2
- package/dist/{globalObjectSelector-BrVwJEgp.js → globalObjectSelector-AF67vBmT.js} +1 -1
- package/dist/{globalObjectSelector-CR74psMa.cjs → globalObjectSelector-C2t3Jtm6.cjs} +1 -1
- package/dist/{gnssFilterBar-BkfBQWXF.cjs → gnssFilterBar-4JNWA-CR.cjs} +1 -1
- package/dist/{gnssFilterBar-BEHXIIKI.js → gnssFilterBar-BgpevrmL.js} +2 -2
- package/dist/{gnssHistoryTable-DDWGE_ge.js → gnssHistoryTable-De2cn5dP.js} +2 -2
- package/dist/{gnssHistoryTable-CQ-7ESYj.cjs → gnssHistoryTable-xnzV8l_Q.cjs} +1 -1
- package/dist/{gnssMapView-C9iRAzym.js → gnssMapView-C9IqBqEw.js} +4 -4
- package/dist/{gnssMapView-P6ed3l_W.cjs → gnssMapView-D9V5XNlw.cjs} +2 -2
- package/dist/{gnssSectionProfile-CIZnF7VA.cjs → gnssSectionProfile-CxXhhOCd.cjs} +1 -1
- package/dist/{gnssSectionProfile-BIqyABEf.js → gnssSectionProfile-HfiKe0-s.js} +2 -2
- package/dist/{gnssTimeSeriesChart-BgIM5U-H.cjs → gnssTimeSeriesChart-C4onoU3C.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-DqH9JFBF.js → gnssTimeSeriesChart-CvoTHHqa.js} +2 -2
- package/dist/{gnssXYTrajectory-CH8864n6.cjs → gnssXYTrajectory-Dug2OwRw.cjs} +1 -1
- package/dist/{gnssXYTrajectory-BviUjxG9.js → gnssXYTrajectory-g_pRuL75.js} +2 -2
- package/dist/{grd-BhpBxrpa.cjs → grd-CYg3e2B0.cjs} +1 -1
- package/dist/{grd-DfkGlcW6.js → grd-DqKnlgw_.js} +20 -20
- package/dist/{grdIndass-ByznFwzc.js → grdIndass-CUE7Gb-W.js} +2 -2
- package/dist/{grdIndass-DhMfHz31.cjs → grdIndass-D3wFyDpD.cjs} +1 -1
- package/dist/{grg-CVBoetQY.js → grg-BpNY4dsd.js} +6 -6
- package/dist/{grg-uzBlEm_K.cjs → grg-Cu7muu3_.cjs} +1 -1
- package/dist/{gridview-Dt3i1t5d.js → gridview-BLabvs9I.js} +2 -2
- package/dist/{gridview-CyXCqWKq.cjs → gridview-BUsfJz0o.cjs} +1 -1
- package/dist/{groundwaterFilterBar-BbS81e9a.js → groundwaterFilterBar-BQFayVwl.js} +2 -2
- package/dist/{groundwaterFilterBar-C4xCPqa_.cjs → groundwaterFilterBar-f9qXTkoQ.cjs} +1 -1
- package/dist/{groundwaterProfileChart-DvjFvCm5.cjs → groundwaterProfileChart-AN7OLcKv.cjs} +2 -2
- package/dist/{groundwaterProfileChart-BBPFrt5W.js → groundwaterProfileChart-pVEgD-ec.js} +3 -3
- package/dist/{groundwaterTimeCurve-Cb3xlM78.cjs → groundwaterTimeCurve-BoJnmOYq.cjs} +1 -1
- package/dist/{groundwaterTimeCurve-CKlvc2nQ.js → groundwaterTimeCurve-DRoycHDe.js} +3 -3
- package/dist/{groupCard-BVdjzdqF.cjs → groupCard-Dq6TXOZt.cjs} +1 -1
- package/dist/{groupCard-BBzDl9uX.js → groupCard-fPMXeW8L.js} +2 -2
- package/dist/{headerBar-B5Z8UviF.cjs → headerBar-Da-XmgLi.cjs} +1 -1
- package/dist/{headerBar-Dty08mHR.js → headerBar-ap2M954P.js} +2 -2
- package/dist/{history-yI8XiwXi.cjs → history-3PgmioqY.cjs} +1 -1
- package/dist/{history-TkSKA8F1.js → history-BC8RESyu.js} +1 -1
- package/dist/{index-YNdVib_6.js → index-CqVPeq0-.js} +455 -453
- package/dist/index-OgmTZiO-.cjs +612 -0
- package/dist/{insarDeformChart-C9UkWIL9.js → insarDeformChart-CKBcUJCV.js} +2 -2
- package/dist/{insarDeformChart-Dr9Ve1vY.cjs → insarDeformChart-DABg6b8J.cjs} +1 -1
- package/dist/{insarImageViewer-DAKBn2vV.cjs → insarImageViewer-9FpJDh1K.cjs} +1 -1
- package/dist/{insarImageViewer-DZbq2xch.js → insarImageViewer-C1XBU0YL.js} +2 -2
- package/dist/{kds-BkH8cJCu.cjs → kds-B04fJsat.cjs} +1 -1
- package/dist/{kds-__I8-o5i.js → kds-D6TYb16w.js} +21 -21
- package/dist/{kpiCard-fRfv1QPb.cjs → kpiCard-Bfi2W9cH.cjs} +1 -1
- package/dist/{kpiCard-BzuF0qdE.js → kpiCard-D5S1M8Rs.js} +2 -2
- package/dist/{landslideMap-zD8SU2Lh.cjs → landslideMap-CWmIK6ca.cjs} +1 -1
- package/dist/{landslideMap-D84pku4Y.js → landslideMap-DXyIahAi.js} +3 -3
- package/dist/{landslideWarning-Cq-di-hN.cjs → landslideWarning-CPwRDf3u.cjs} +1 -1
- package/dist/{landslideWarning-0mckvEoZ.js → landslideWarning-DaI_F3dC.js} +5 -5
- package/dist/{layerTabs-COzqQ9mn.js → layerTabs-DJaWhtYa.js} +2 -2
- package/dist/{layerTabs-C2zq6a5M.cjs → layerTabs-DfVZUJvC.cjs} +1 -1
- package/dist/{leaflet-src-2tPn7QVH.js → leaflet-src-DU74PJcX.js} +1 -1
- package/dist/{leaflet-src-D8MF2j44.cjs → leaflet-src-gpxoqh6Y.cjs} +1 -1
- package/dist/{lerc-BHcVhBOn.cjs → lerc-ACN_ZV5f.cjs} +1 -1
- package/dist/{lerc-BCmG0CMS.js → lerc-ZmeF7NhV.js} +2 -2
- package/dist/{lin-niA_T9Ql.cjs → lin-BqSPUdmV.cjs} +1 -1
- package/dist/{lin-CQ6TCBCr.js → lin-DXM61jXV.js} +2 -2
- package/dist/{linIndass-J9rdji6E.js → linIndass-DQZjD3lL.js} +12 -12
- package/dist/{linIndass-nZx16Vos.cjs → linIndass-jqzXVoXv.cjs} +1 -1
- package/dist/{lst-DieyrYCh.js → lst-Bpf41jqR.js} +2 -2
- package/dist/{lst-Cw1XCAv0.cjs → lst-C9RrqCgo.cjs} +1 -1
- package/dist/{manualEntry-CCmyPMJm.js → manualEntry-BvKEwOnY.js} +2 -2
- package/dist/{manualEntry-ChhTpAF2.cjs → manualEntry-wG0RcQYe.cjs} +1 -1
- package/dist/{mapBackground-BzOdjhnZ.cjs → mapBackground-DOsGw2Dh.cjs} +1 -1
- package/dist/{mapBackground-CiiG2nHi.js → mapBackground-DxQdqWM2.js} +3 -3
- package/dist/{mappingList-CoBD8D27.js → mappingList-BRpK5eX_.js} +2 -2
- package/dist/{mappingList-D42mILiq.cjs → mappingList-C7qyzN6o.cjs} +1 -1
- package/dist/{markdownViewer-C3HUXDvf.js → markdownViewer-CZVNZ8jN.js} +2 -2
- package/dist/{markdownViewer-DHs9ekCh.cjs → markdownViewer-C_TA7AX-.cjs} +1 -1
- package/dist/{mix-control-modal-BEwriuWS.js → mix-control-modal-DITf1VAp.js} +1 -1
- package/dist/{mix-control-modal-DGd2S6Jd.cjs → mix-control-modal-DjG-ChQu.cjs} +1 -1
- package/dist/{mixGrid-Cnq99D09.cjs → mixGrid-Zk7NKpBw.cjs} +1 -1
- package/dist/{mixGrid-CBenxHD_.js → mixGrid-mbFlywYp.js} +2 -2
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +1 -1
- package/dist/{mixiotObjectListApi-e1qL7PHh.cjs → mixiotObjectListApi-CRPxZbIS.cjs} +1 -1
- package/dist/{mixiotObjectListApi-CKJLXcnf.js → mixiotObjectListApi-cTDvF31d.js} +1 -1
- package/dist/{mjpegCamera-D8lB701i.js → mjpegCamera-B3m55jok.js} +2 -2
- package/dist/{mjpegCamera-DDFrZo-x.cjs → mjpegCamera-Da5NZX0r.cjs} +1 -1
- package/dist/{monitorAlert-C-mo-lDe.cjs → monitorAlert-BqUYN_BF.cjs} +1 -1
- package/dist/{monitorAlert-Z1dFDfPh.js → monitorAlert-sn_3TrGJ.js} +9 -9
- package/dist/{monitorData-CNRfV5Wt.cjs → monitorData-B-dcmDx3.cjs} +1 -1
- package/dist/{monitorData-DZhO9Gos.js → monitorData-RhTZn3fI.js} +11 -11
- package/dist/{monitorSpeedChart-DrRdMdGD.cjs → monitorSpeedChart-_L0zgWxs.cjs} +1 -1
- package/dist/{monitorSpeedChart-C5pN46lO.js → monitorSpeedChart-uWpHlkZd.js} +1 -1
- package/dist/{mxa-COpw24fq.cjs → mxa-BNnKgDyq.cjs} +1 -1
- package/dist/{mxa-BFQ70ksk.js → mxa-ClEVeLaa.js} +2 -2
- package/dist/{myValue-Eb3asTOC.cjs → myValue-DoBpTp1-.cjs} +1 -1
- package/dist/{myValue-Dosl4Ro5.js → myValue-Drhoqp_w.js} +2 -2
- package/dist/{myValueList-mcqRZanE.cjs → myValueList-BT6mKnwJ.cjs} +1 -1
- package/dist/{myValueList-Dkc10vr6.js → myValueList-BfIDIHUe.js} +2 -2
- package/dist/{objectList-FWkZ6PAs.js → objectList-CATv4N0g.js} +3 -3
- package/dist/{objectList-D4owr3ED.cjs → objectList-CM1T-IQo.cjs} +1 -1
- package/dist/{objectListAPP-CdfeZTgm.js → objectListAPP-BG9iL6S_.js} +3 -3
- package/dist/{objectListAPP-Bzevu1od.cjs → objectListAPP-lNp3RQsA.cjs} +1 -1
- package/dist/percentBar-BOQp427o.js +369 -0
- package/dist/percentBar-By73saGo.cjs +5 -0
- package/dist/{photo-Dmxxqgrg.cjs → photo-CFomIdjq.cjs} +1 -1
- package/dist/{photo-DxXTYq73.js → photo-N8uk9UzU.js} +2 -2
- package/dist/{pie-BxpiCEYe.cjs → pie-BzkMCV5O.cjs} +1 -1
- package/dist/{pie-COixdWUz.js → pie-DuWuL4rb.js} +2 -2
- package/dist/{placeholder-Ole-Or58.cjs → placeholder-B9T7qNoD.cjs} +1 -1
- package/dist/{placeholder-CLLNLxRC.js → placeholder-DI_zsp-O.js} +1 -1
- package/dist/{pressBtn-DwKg9PbD.cjs → pressBtn-B_D3cFPd.cjs} +1 -1
- package/dist/{pressBtn-C7Y-B8Dz.js → pressBtn-D-j1_nDJ.js} +38 -38
- package/dist/{processTable-CTkwZWWJ.js → processTable-B-X05x32.js} +2 -2
- package/dist/{processTable-DDcKkjJx.cjs → processTable-B5WzGKQr.cjs} +1 -1
- package/dist/{progressBar-7qHg67Sf.cjs → progressBar-19d-9U9p.cjs} +1 -1
- package/dist/{progressBar-9npgJ9jD.js → progressBar-F61-3H3E.js} +2 -2
- package/dist/{progressCircle-DP08TX08.js → progressCircle-Dp4XWdE0.js} +2 -2
- package/dist/{progressCircle-Xgjnl1KF.cjs → progressCircle-RZ36ttud.cjs} +1 -1
- package/dist/{qrcode-D6wDMo-f.cjs → qrcode-D8C5cFka.cjs} +1 -1
- package/dist/{qrcode-ClTSNzEN.js → qrcode-PeEXEcDd.js} +2 -2
- package/dist/{raceBar-CTmsN8VC.js → raceBar-BnkzNqH0.js} +2 -2
- package/dist/{raceBar-C8mVFHnd.cjs → raceBar-DuCYwMoq.cjs} +1 -1
- package/dist/{rad-DWCSD35t.js → rad-BdQ-1k0K.js} +66 -56
- package/dist/{rad-Dxaakm82.cjs → rad-DND2sEzm.cjs} +1 -1
- package/dist/{radarMapViewer-eEBE3MS-.js → radarMapViewer-BUT7ZD47.js} +2 -2
- package/dist/{radarMapViewer-U7IQJjQs.cjs → radarMapViewer-BtwXLg65.cjs} +1 -1
- package/dist/{rainfallFilterBar-DJTDGu7Z.js → rainfallFilterBar-0IX3rYUD.js} +2 -2
- package/dist/{rainfallFilterBar-ow_wdOwq.cjs → rainfallFilterBar-BVD1fsJF.cjs} +1 -1
- package/dist/{rainfallTimeCurve-CwGmJhxu.js → rainfallTimeCurve-BIt0Ax0l.js} +3 -3
- package/dist/{rainfallTimeCurve-BL1I5Z2D.cjs → rainfallTimeCurve-DvYAvU9a.cjs} +1 -1
- package/dist/{rangeLin-BqcJpIva.js → rangeLin-BpAilzGc.js} +2 -2
- package/dist/{rangeLin-BEz9xapa.cjs → rangeLin-DKjgf_Ab.cjs} +1 -1
- package/dist/{realtimeEvolutionMap-NOkyU7G3.js → realtimeEvolutionMap-5rOyArZq.js} +2 -2
- package/dist/{realtimeEvolutionMap-mzXlR8gS.cjs → realtimeEvolutionMap-Feks0bxX.cjs} +1 -1
- package/dist/{regionBar-DDk-2UWS.js → regionBar-D2if9Cyv.js} +2 -2
- package/dist/{regionBar-CEfz0Yol.cjs → regionBar-oWO1HZta.cjs} +1 -1
- package/dist/{request-BIXfJXjX.js → request-BAa7KXPI.js} +1 -1
- package/dist/{request-BfG3yDz6.cjs → request-DRttaVjf.cjs} +1 -1
- package/dist/{retainer1-Cz5rXIJj.js → retainer1-Bz3hKsxS.js} +3 -3
- package/dist/{retainer1-Ch1oZMeA.cjs → retainer1-CA3lV3eb.cjs} +1 -1
- package/dist/{retainer2-DJ1R2GJE.cjs → retainer2-BnfP4WPr.cjs} +1 -1
- package/dist/{retainer2-DeelXgAZ.js → retainer2-UsoVsRXo.js} +3 -3
- package/dist/{retainerRecordList-DyhfjtfF.js → retainerRecordList-DbXRpaHy.js} +2 -2
- package/dist/{retainerRecordList-D3MsCnqy.cjs → retainerRecordList-jkXbz9xr.cjs} +1 -1
- package/dist/{retainerRecordListAPP-B_hCyRak.cjs → retainerRecordListAPP-CS4s1t0e.cjs} +1 -1
- package/dist/{retainerRecordListAPP-3Gr7db3D.js → retainerRecordListAPP-DI4f5Q6f.js} +2 -2
- package/dist/{ringTopN-fLinQVwX.cjs → ringTopN-BBryDUi9.cjs} +1 -1
- package/dist/{ringTopN-t9xaVCWg.js → ringTopN-BCZhDz0U.js} +2 -2
- package/dist/{riskRegionTable-CagcISBC.cjs → riskRegionTable-DtG9zTy5.cjs} +1 -1
- package/dist/{riskRegionTable-BThwQbTf.js → riskRegionTable-Dw573XX4.js} +2 -2
- package/dist/{sankey-BY_nwThw.cjs → sankey-BNmzRTH5.cjs} +1 -1
- package/dist/{sankey-Bwm0omQr.js → sankey-DHbOEbzP.js} +2 -2
- package/dist/{scd-DeYC1Rqx.js → scd-CNcTAStO.js} +2 -2
- package/dist/{scd-Bs1dG1w8.cjs → scd-Cf68XDF5.cjs} +1 -1
- package/dist/{sideMenu-CAEh3bwF.cjs → sideMenu-BW8ddV-x.cjs} +1 -1
- package/dist/{sideMenu-Db_Nc_xz.js → sideMenu-DKAAQcWF.js} +2 -2
- package/dist/{slopeStability-CVC68Qcj.js → slopeStability-Ds4exWb_.js} +10 -10
- package/dist/{slopeStability-BWg6jhBB.cjs → slopeStability-eVwuAmlY.cjs} +1 -1
- package/dist/{speedCurve-CK4CXHeC.js → speedCurve-B_j8P273.js} +2 -2
- package/dist/{speedCurve-DNNEIz4o.cjs → speedCurve-PtxSVJ8J.cjs} +1 -1
- package/dist/stackedBar-CC0JmrlS.cjs +2 -0
- package/dist/stackedBar-uMr9A877.js +325 -0
- package/dist/{stressFilterBar-DQ8nq8jV.js → stressFilterBar-B02kr6zY.js} +2 -2
- package/dist/{stressFilterBar-Cigl3IyR.cjs → stressFilterBar-Dh4fWQ90.cjs} +1 -1
- package/dist/{stressTimeCurve-BiduKfcg.cjs → stressTimeCurve-6eALY4dC.cjs} +1 -1
- package/dist/{stressTimeCurve-BEANw1F8.js → stressTimeCurve-D_Rc1PAY.js} +3 -3
- package/dist/{swiper-BgkvIN5U.js → swiper-BsAeDuw3.js} +2 -2
- package/dist/{swiper-MIRXMnxk.cjs → swiper-CMP_sa_i.cjs} +1 -1
- package/dist/{terminalConfigList-B3lqvQel.js → terminalConfigList-BjbgbZHU.js} +2 -2
- package/dist/{terminalConfigList-C3zRbQvM.cjs → terminalConfigList-C83kqf7d.cjs} +1 -1
- package/dist/{terminalList-ArxJ1jdO.cjs → terminalList-BnitlFL5.cjs} +1 -1
- package/dist/{terminalList-BevfdySj.js → terminalList-DPOBOIu3.js} +2 -2
- package/dist/{terminalListAPP-Cs0nnBfc.cjs → terminalListAPP-CSYL2-0G.cjs} +1 -1
- package/dist/{terminalListAPP-CbpVft_s.js → terminalListAPP-DI6ePX4Y.js} +2 -2
- package/dist/{textbox-CjkfmdaO.js → textbox-Dk4Q0jq3.js} +2 -2
- package/dist/{textbox-DC9YLTn5.cjs → textbox-OEvn1Q-J.cjs} +1 -1
- package/dist/{timeQueryBar-B69eldHQ.cjs → timeQueryBar-Bnqyhyy7.cjs} +1 -1
- package/dist/{timeQueryBar-CXd9yNgD.js → timeQueryBar-CoFozltp.js} +1 -1
- package/dist/{timeSeries-CLnLd-gX.js → timeSeries-BYWoWCYY.js} +3 -3
- package/dist/{timeSeries-fB14CgRy.cjs → timeSeries-Dw-90k-1.cjs} +1 -1
- package/dist/{timeSeriesCurve-DOaxDpjr.cjs → timeSeriesCurve-BkdQ_KeE.cjs} +1 -1
- package/dist/{timeSeriesCurve-CMcCzR13.js → timeSeriesCurve-iPezzxLC.js} +3 -3
- package/dist/{toggleBtn-BiUyrx_o.cjs → toggleBtn-BC4vsMGo.cjs} +1 -1
- package/dist/{toggleBtn-CWmuTxSD.js → toggleBtn-CAXFfijH.js} +2 -2
- package/dist/{trajectoryConfigPanel-D7IDlQIH.cjs → trajectoryConfigPanel-BXpItzqc.cjs} +1 -1
- package/dist/{trajectoryConfigPanel-DKLN3KY5.js → trajectoryConfigPanel-DlN8AZFo.js} +1 -1
- package/dist/{trajectoryScatter-TEactc8J.js → trajectoryScatter-CxDHL1um.js} +2 -2
- package/dist/{trajectoryScatter-CL-2FKZe.cjs → trajectoryScatter-_1LoFjV7.cjs} +1 -1
- package/dist/{universalConfigPanel-B8JIiLXp.cjs → universalConfigPanel-B6jchzUf.cjs} +1 -1
- package/dist/{universalConfigPanel-wicv4Ypw.js → universalConfigPanel-BlDmNWc0.js} +1 -1
- package/dist/{universalTable-BlTdL3c0.cjs → universalTable-C-oWFP8u.cjs} +1 -1
- package/dist/{universalTable-8e3LrZvD.js → universalTable-DbqMwXuL.js} +2 -2
- package/dist/{video-DpRcCZZQ.js → video-DHJ-flUN.js} +2 -2
- package/dist/{video-nPkrKQyL.cjs → video-HxDzMY56.cjs} +1 -1
- package/dist/{videoMonitor-DOVw5mE0.cjs → videoMonitor-CGlM7hRf.cjs} +1 -1
- package/dist/{videoMonitor-Z_7cZk5Y.js → videoMonitor-Golf73FP.js} +9 -9
- package/dist/{vlu-BQCrHSlq.js → vlu-Wd6itaBz.js} +2 -2
- package/dist/{vlu-DEIgGiO-.cjs → vlu-ZFZU2wAQ.cjs} +1 -1
- package/dist/{warningOverview-DXJNk5bT.cjs → warningOverview-BkDN-4f-.cjs} +1 -1
- package/dist/{warningOverview-C7J5aXTJ.js → warningOverview-DuBMKv_H.js} +3 -3
- package/dist/{weather-C1sjTcwC.js → weather-BRKZBZR9.js} +2 -2
- package/dist/{weather-B1Pfcn75.cjs → weather-C_9Xmi0b.cjs} +1 -1
- package/dist/{windLin-QKZKJ1h_.cjs → windLin-6KfyL12C.cjs} +1 -1
- package/dist/{windLin-vlM63Hu7.js → windLin-DCZqaY1W.js} +2 -2
- package/package.json +1 -1
- package/dist/circleBar-4md65KCX.js +0 -305
- package/dist/circleBar-DJY37bwB.cjs +0 -5
- package/dist/ctrSet-XqnGgYPn.cjs +0 -1
- package/dist/index-6QhTSPkL.cjs +0 -612
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var R=Object.defineProperty,$=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols,j=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,Z=Reflect.get;var M=(i,n,l)=>n in i?R(i,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[n]=l,N=(i,n)=>{for(var l in n||(n={}))q.call(n,l)&&M(i,l,n[l]);if(E)for(var l of E(n))V.call(n,l)&&M(i,l,n[l]);return i},O=(i,n)=>$(i,D(n));var T=(i,n,l)=>Z(j(i),l,n);var A=(i,n,l)=>new Promise((d,c)=>{var h=f=>{try{a(l.next(f))}catch(g){c(g)}},L=f=>{try{a(l.throw(f))}catch(g){c(g)}},a=f=>f.done?d(f.value):Promise.resolve(f.value).then(h,L);a((l=l.apply(i,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const F=require("./index-6QhTSPkL.cjs");require("element-plus");const I=require("./EChartComponentBase-CMN_pOMr.cjs"),b=require("./installCanvasRenderer-CyhM1Qpl.cjs"),H=require("./install-DV5cEgNV.cjs"),U=require("./install-CltTFs4e.cjs"),P=require("./install-C8buXQPI.cjs"),G=require("./install-B1IEhhn3.cjs"),J="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",K="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",Q=["onClick"],W=["id"],X={class:"progress-wrap"},Y=["title"],ee={DEFAULT_ICON:J,ACTIVE_ICON:K,NAME_CN:"切换",NAME_EN:"Toggle Button",ORDER:2,PLATFORM:["pc","screen","mobile"]},te={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"}},ae=[{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:""}],re=["name","fv","object_id","color"],le=["mosaic","statistics","calculate"],oe={useAlias:!1,multiObject:!1,source:"mosaic"},ne={DEFAULT:ee,OPTIONS:te,DATA:ae,PARAMS:re,SOURCE:le,COMMON:oe},ie=e.defineComponent(O(N({},ne),{__name:"toggleBtn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){b.use([H.install,U.install,b.install,P.install,b.install$1,G.install]);const n=i,l=e.ref(0),d=e.reactive({indicator:[],series:[]}),c=e.ref(0);class h extends I.EChartComponentBase{extractStyles(){var r,o,s,v,u,m,p,S,y,x,w,z,k,B,_;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleSize:((o=t==null?void 0:t.titleSize)==null?void 0:o.value)||16,barHeight:((s=t==null?void 0:t.barHeight)==null?void 0:s.value)||8,textColor:((v=t==null?void 0:t.textColor)==null?void 0:v.value)||"#111",tabColor:((u=t==null?void 0:t.tabColor)==null?void 0:u.value)||"#f5f5f5",activeBgColor:((m=t==null?void 0:t.activeBgColor)==null?void 0:m.value)||"#4162ff",borderColor:((p=t==null?void 0:t.borderColor)==null?void 0:p.value)||"#e5e5e5",activeBorder:((S=t==null?void 0:t.activeBorder)==null?void 0:S.value)||"#4162ff",barColor:((y=t==null?void 0:t.barColor)==null?void 0:y.value)||"#e5e5e5",radiusSize:(w=(x=t==null?void 0:t.radiusSize)==null?void 0:x.value)!=null?w:8,textSize:(k=(z=t==null?void 0:t.textSize)==null?void 0:z.value)!=null?k:12,type:((B=t==null?void 0:t.type)==null?void 0:B.value)||!1,tags:((_=t==null?void 0:t.tags)==null?void 0:_.value)||[]}}getChartOption(){var r;const{name:t}=this.props.conf;return{radar:{shape:this.Style.value.type,alignTicks:!1,splitNumber:5,axisNameGap:10,indicator:d.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=d.series)!=null?r:[],areaStyle:{},itemStyle:{color:"#4162ff"}}]}}init(){return A(this,null,function*(){yield T(h.prototype,this,"init").call(this),e.nextTick(()=>{this.initChart(),g(c.value)})})}setHistoryData(t){if(!t)return;const{data:r}=this.props.conf;t.forEach((o,s)=>{var v;r[s].value=(v=o.data[0])!=null?v:0}),g(c.value)}setSocketData(t){if(!t)return;const{data:r}=this.props.conf;r.forEach(o=>{const s=this.extractDataValue(t,o.fv);o.value=s!=null?s:0}),g(c.value)}refreshChart(){var r;const t=this.getChartOption();(r=this.chartObj)==null||r.setOption(t,!0)}}const L=new h(n,"toggleBtn");L.setupLifecycle();const a=L.getStyle(),f=L.getEchartId(),g=C=>{const{data:t,options:r,name:o}=n.conf;c.value=C,d.indicator=[],d.series=[];let s={};s.name=o,s.value=[];const v=Math.max(0,...t.map(u=>u.value||0));l.value=v<=0?1:Math.max(v,Math.ceil(v/10)*10),t.forEach(u=>{var m,p;(p=(m=r.tags.value[c.value])==null?void 0:m.flag)!=null&&p.includes(u.fv)&&(d.indicator.push({name:u.name,max:l.value,value:u.value,color:u.color}),s.value.push(u.value))}),d.series.push(s),L.refreshChart()};return(C,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(a).bgColor,borderRadius:`${e.unref(a).radiusSize}px`})},[e.createElementVNode("div",{class:"toggle-wrap",style:e.normalizeStyle({borderTopLeftRadius:`${e.unref(a).radiusSize}px`,borderTopRightRadius:`${e.unref(a).radiusSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).tags,(r,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass(["btn-item",{active:c.value===o}]),style:e.normalizeStyle({backgroundColor:c.value===o?e.unref(a).activeBgColor:e.unref(a).tabColor,color:c.value===o?"#fff":e.unref(a).textColor,fontSize:`${e.unref(a).titleSize}px`,borderTopLeftRadius:o===0?`${e.unref(a).radiusSize}px`:"0",borderTopRightRadius:o===e.unref(a).tags.length-1?`${e.unref(a).radiusSize}px`:"0"}),onClick:s=>g(Number(o))},e.toDisplayString(r.label),15,Q))),128))],4),e.createElementVNode("div",{class:"radar-wrap",style:e.normalizeStyle({color:e.unref(a).textColor,fontSize:`${e.unref(a).textSize}px`})},[e.createElementVNode("div",{id:e.unref(f),class:"radar-chart"},null,8,W),e.createElementVNode("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.indicator,(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:"bar-item-crosswise",key:o},[e.createElementVNode("div",{class:"bar-title",title:r.name,style:e.normalizeStyle({color:e.unref(a).textColor})},e.toDisplayString(r.name),13,Y),e.createElementVNode("div",{class:"bar",style:e.normalizeStyle({backgroundColor:e.unref(a).barColor,height:`${e.unref(a).barHeight}px`})},[e.createElementVNode("div",{class:"progress",style:e.normalizeStyle({backgroundColor:r.color||e.unref(F.COLORS)[o],width:(r.value/l.value*100).toFixed(2)+"%"})},null,4)],4),e.createElementVNode("div",{class:"bar-value",style:e.normalizeStyle({color:e.unref(a).textColor})},e.toDisplayString(r.value||0),5)]))),128))])],4),e.renderSlot(C.$slots,"default",{},void 0,!0)],4))}})),se=F._export_sfc(ie,[["__scopeId","data-v-352d89b4"]]);exports.default=se;
|
|
1
|
+
"use strict";var R=Object.defineProperty,$=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols,j=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,Z=Reflect.get;var M=(i,n,l)=>n in i?R(i,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[n]=l,N=(i,n)=>{for(var l in n||(n={}))q.call(n,l)&&M(i,l,n[l]);if(E)for(var l of E(n))V.call(n,l)&&M(i,l,n[l]);return i},O=(i,n)=>$(i,D(n));var T=(i,n,l)=>Z(j(i),l,n);var A=(i,n,l)=>new Promise((d,c)=>{var h=f=>{try{a(l.next(f))}catch(g){c(g)}},L=f=>{try{a(l.throw(f))}catch(g){c(g)}},a=f=>f.done?d(f.value):Promise.resolve(f.value).then(h,L);a((l=l.apply(i,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const F=require("./index-OgmTZiO-.cjs");require("element-plus");const I=require("./EChartComponentBase-C2sxqwSE.cjs"),b=require("./installCanvasRenderer-CyhM1Qpl.cjs"),H=require("./install-DV5cEgNV.cjs"),U=require("./install-CltTFs4e.cjs"),P=require("./install-C8buXQPI.cjs"),G=require("./install-B1IEhhn3.cjs"),J="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",K="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",Q=["onClick"],W=["id"],X={class:"progress-wrap"},Y=["title"],ee={DEFAULT_ICON:J,ACTIVE_ICON:K,NAME_CN:"切换",NAME_EN:"Toggle Button",ORDER:2,PLATFORM:["pc","screen","mobile"]},te={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"}},ae=[{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:""}],re=["name","fv","object_id","color"],le=["mosaic","statistics","calculate"],oe={useAlias:!1,multiObject:!1,source:"mosaic"},ne={DEFAULT:ee,OPTIONS:te,DATA:ae,PARAMS:re,SOURCE:le,COMMON:oe},ie=e.defineComponent(O(N({},ne),{__name:"toggleBtn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){b.use([H.install,U.install,b.install,P.install,b.install$1,G.install]);const n=i,l=e.ref(0),d=e.reactive({indicator:[],series:[]}),c=e.ref(0);class h extends I.EChartComponentBase{extractStyles(){var r,o,s,v,u,m,p,S,y,x,w,z,k,B,_;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleSize:((o=t==null?void 0:t.titleSize)==null?void 0:o.value)||16,barHeight:((s=t==null?void 0:t.barHeight)==null?void 0:s.value)||8,textColor:((v=t==null?void 0:t.textColor)==null?void 0:v.value)||"#111",tabColor:((u=t==null?void 0:t.tabColor)==null?void 0:u.value)||"#f5f5f5",activeBgColor:((m=t==null?void 0:t.activeBgColor)==null?void 0:m.value)||"#4162ff",borderColor:((p=t==null?void 0:t.borderColor)==null?void 0:p.value)||"#e5e5e5",activeBorder:((S=t==null?void 0:t.activeBorder)==null?void 0:S.value)||"#4162ff",barColor:((y=t==null?void 0:t.barColor)==null?void 0:y.value)||"#e5e5e5",radiusSize:(w=(x=t==null?void 0:t.radiusSize)==null?void 0:x.value)!=null?w:8,textSize:(k=(z=t==null?void 0:t.textSize)==null?void 0:z.value)!=null?k:12,type:((B=t==null?void 0:t.type)==null?void 0:B.value)||!1,tags:((_=t==null?void 0:t.tags)==null?void 0:_.value)||[]}}getChartOption(){var r;const{name:t}=this.props.conf;return{radar:{shape:this.Style.value.type,alignTicks:!1,splitNumber:5,axisNameGap:10,indicator:d.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=d.series)!=null?r:[],areaStyle:{},itemStyle:{color:"#4162ff"}}]}}init(){return A(this,null,function*(){yield T(h.prototype,this,"init").call(this),e.nextTick(()=>{this.initChart(),g(c.value)})})}setHistoryData(t){if(!t)return;const{data:r}=this.props.conf;t.forEach((o,s)=>{var v;r[s].value=(v=o.data[0])!=null?v:0}),g(c.value)}setSocketData(t){if(!t)return;const{data:r}=this.props.conf;r.forEach(o=>{const s=this.extractDataValue(t,o.fv);o.value=s!=null?s:0}),g(c.value)}refreshChart(){var r;const t=this.getChartOption();(r=this.chartObj)==null||r.setOption(t,!0)}}const L=new h(n,"toggleBtn");L.setupLifecycle();const a=L.getStyle(),f=L.getEchartId(),g=C=>{const{data:t,options:r,name:o}=n.conf;c.value=C,d.indicator=[],d.series=[];let s={};s.name=o,s.value=[];const v=Math.max(0,...t.map(u=>u.value||0));l.value=v<=0?1:Math.max(v,Math.ceil(v/10)*10),t.forEach(u=>{var m,p;(p=(m=r.tags.value[c.value])==null?void 0:m.flag)!=null&&p.includes(u.fv)&&(d.indicator.push({name:u.name,max:l.value,value:u.value,color:u.color}),s.value.push(u.value))}),d.series.push(s),L.refreshChart()};return(C,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(a).bgColor,borderRadius:`${e.unref(a).radiusSize}px`})},[e.createElementVNode("div",{class:"toggle-wrap",style:e.normalizeStyle({borderTopLeftRadius:`${e.unref(a).radiusSize}px`,borderTopRightRadius:`${e.unref(a).radiusSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).tags,(r,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass(["btn-item",{active:c.value===o}]),style:e.normalizeStyle({backgroundColor:c.value===o?e.unref(a).activeBgColor:e.unref(a).tabColor,color:c.value===o?"#fff":e.unref(a).textColor,fontSize:`${e.unref(a).titleSize}px`,borderTopLeftRadius:o===0?`${e.unref(a).radiusSize}px`:"0",borderTopRightRadius:o===e.unref(a).tags.length-1?`${e.unref(a).radiusSize}px`:"0"}),onClick:s=>g(Number(o))},e.toDisplayString(r.label),15,Q))),128))],4),e.createElementVNode("div",{class:"radar-wrap",style:e.normalizeStyle({color:e.unref(a).textColor,fontSize:`${e.unref(a).textSize}px`})},[e.createElementVNode("div",{id:e.unref(f),class:"radar-chart"},null,8,W),e.createElementVNode("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.indicator,(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:"bar-item-crosswise",key:o},[e.createElementVNode("div",{class:"bar-title",title:r.name,style:e.normalizeStyle({color:e.unref(a).textColor})},e.toDisplayString(r.name),13,Y),e.createElementVNode("div",{class:"bar",style:e.normalizeStyle({backgroundColor:e.unref(a).barColor,height:`${e.unref(a).barHeight}px`})},[e.createElementVNode("div",{class:"progress",style:e.normalizeStyle({backgroundColor:r.color||e.unref(F.COLORS)[o],width:(r.value/l.value*100).toFixed(2)+"%"})},null,4)],4),e.createElementVNode("div",{class:"bar-value",style:e.normalizeStyle({color:e.unref(a).textColor})},e.toDisplayString(r.value||0),5)]))),128))])],4),e.renderSlot(C.$slots,"default",{},void 0,!0)],4))}})),se=F._export_sfc(ie,[["__scopeId","data-v-352d89b4"]]);exports.default=se;
|
|
@@ -28,9 +28,9 @@ var D = (s, i, r) => new Promise((u, n) => {
|
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as K, ref as j, reactive as Q, openBlock as S, createElementBlock as x, normalizeStyle as L, unref as o, createElementVNode as p, Fragment as Z, renderList as I, normalizeClass as W, toDisplayString as w, renderSlot as X, nextTick as Y } from "vue";
|
|
30
30
|
import "html2canvas";
|
|
31
|
-
import { C as e0, _ as t0 } from "./index-
|
|
31
|
+
import { C as e0, _ as t0 } from "./index-CqVPeq0-.js";
|
|
32
32
|
import "element-plus";
|
|
33
|
-
import { E as a0 } from "./EChartComponentBase-
|
|
33
|
+
import { E as a0 } from "./EChartComponentBase-B-VNAC8K.js";
|
|
34
34
|
import { u as r0, i as l0, a as o0 } from "./installCanvasRenderer-oDYkyVFy.js";
|
|
35
35
|
import { i as i0 } from "./install-DdM8j5Ll.js";
|
|
36
36
|
import { i as s0 } from "./install-CEl1AYgZ.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var me=Object.defineProperty,ge=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var x=(_,v,f)=>v in _?me(_,v,{enumerable:!0,configurable:!0,writable:!0,value:f}):_[v]=f,Y=(_,v)=>{for(var f in v||(v={}))ve.call(v,f)&&x(_,f,v[f]);if(Q)for(var f of Q(v))fe.call(v,f)&&x(_,f,v[f]);return _},K=(_,v)=>ge(_,ye(v));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=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/select/style/css");require("element-plus/es/components/option/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-6QhTSPkL.cjs"),he=require("@element-plus/icons-vue"),W=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),ke={class:"section-header"},Ce={class:"section-title"},be={class:"time-range-body"},Ve={key:0,class:"quick-range"},_e=["onClick"],De={key:1,class:"granularity-tabs"},Be=["onClick"],Ee={key:2,class:"date-inputs"},Se={class:"section-header"},Ne={class:"section-title"},Te={key:0,class:"time-list-actions"},Oe={class:"selected-count"},Pe={key:1,class:"time-list-select"},we={class:"section-header"},Le={class:"section-title"},Ye={key:0,class:"select-list"},Re={class:"section-header"},Ae={class:"section-title"},Ie={key:0,class:"direction-tabs"},Me=["onClick"],qe={class:"section-header"},ze={class:"section-title"},je={key:0,class:"range-inputs"},Ue={key:0,class:"range-unit"},Ge={class:"section-header"},Fe={class:"section-title"},He={key:0,class:"display-options"},$e={DEFAULT_ICON:W.DEFAULT_ICON,ACTIVE_ICON:W.ACTIVE_ICON,NAME_CN:"露天矿控制面板",NAME_EN:"Openpit Control Panel",ORDER:15,PLATFORM:["pc","screen"]},Qe={layout:{value:"auto",type:"select",label:"布局模式",options:[{label:"自适应",value:"auto"},{label:"竖排",value:"vertical"},{label:"横排",value:"horizontal"}]},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"},hideSectionTitle:{value:!1,type:"switch",label:"隐藏分组标题"},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"}}},xe=[{type:"timeRange",label:"时间段",key:"timeRange",targetId:"",rangeAxis:"xAxis",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:""}],Ke=[{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:"rangeAxis",label:"component.openpitConfigPanel.rangeAxis",type:"select",options:[{label:"component.openpitConfigPanel.rangeAxisOptions.xAxis",value:"xAxis"},{label:"component.openpitConfigPanel.rangeAxisOptions.yAxis",value:"yAxis"},{label:"component.openpitConfigPanel.rangeAxisOptions.radius",value:"radius"}],dependent:"type",dependentValue:"range"},{key:"showQuickRange",label:"component.openpitConfigPanel.showQuickRange",type:"switch",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"},{key:"remark",label:"remark",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"}],We=[],Xe={useAlias:!1,multiObject:!1,source:""},Je={DEFAULT:$e,OPTIONS:Qe,DATA:xe,PARAMS:Ke,SOURCE:We,COMMON:Xe},Ze=e.defineComponent(K(Y({},Je),{__name:"trajectoryConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(_){e.useCssVars(t=>({v15a941b4:A.value.backgroundColor,v6c388130:A.value.borderColor,v1e47c9b2:k.value.textColor,v4ecefb48:k.value.borderColor,v444d252c:k.value.accentColor}));const v=B.useLinkStore(),f=_,N=e.ref(null);let M=0,E=null;const k=e.computed(()=>{var s,p,d,m,c,o,y,V;const{options:t}=f.conf||{},l=((s=t==null?void 0:t.linkChannel)==null?void 0:s.value)||"deepDisplacement",n=((p=t==null?void 0:t.customChannel)==null?void 0:p.value)||"",u=l==="custom"&&n?n:l,i=((d=t==null?void 0:t.layout)==null?void 0:d.value)||"auto";return{bgColor:((m=t==null?void 0:t.bgColor)==null?void 0:m.value)||"#ffffff",textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#333333",accentColor:((o=t==null?void 0:t.accentColor)==null?void 0:o.value)||"#409eff",borderColor:((y=t==null?void 0:t.borderColor)==null?void 0:y.value)||"#e5e5e5",hideSectionTitle:((V=t==null?void 0:t.hideSectionTitle)==null?void 0:V.value)===!0,layout:i,linkChannel:u}}),X=e.computed(()=>{const t=String(k.value.layout||"auto");return t==="horizontal"?"layout-horizontal":t==="vertical"?"layout-vertical":"layout-auto"}),J=e.computed(()=>{const t=f.uid;if(!t){const l=`trajectoryConfigPanel_${Date.now()}`;return console.warn("[TrajectoryConfigPanel] 缺少 uid,自动生成:",l),l}return t}),C=e.computed(()=>{var t;return((t=f.conf)==null?void 0:t.data)||[]}),a=e.ref({}),q=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],Z=(t,l)=>((l==null?void 0:l.granularity)||(t==null?void 0:t.defaultGranularity))==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",ee=(t,l)=>((l==null?void 0:l.granularity)||(t==null?void 0:t.defaultGranularity))==="hour"?"datetime":"date",P=(t,l)=>Z(l,a.value[t]),z=(t,l)=>ee(l,a.value[t]),R=(t,l,n)=>{const u=n.includes("HH"),i=u?l.endOf("day").format(n):l.format(n);let s=l.subtract(7,"day").format(n);return t==="today"?s=l.startOf("day").format(n):t==="week"?s=l.subtract(6,"day").startOf("day").format(n):t==="month"?s=l.subtract(29,"day").startOf("day").format(n):t==="quarter"?s=l.subtract(89,"day").startOf("day").format(n):t==="year"&&(s=l.subtract(364,"day").startOf("day").format(n)),{startDate:s,endDate:i}},te=t=>{var u,i;const l=C.value[t];if((l==null?void 0:l.type)==="timeRange")return((u=a.value[t])==null?void 0:u.granularity)||(l==null?void 0:l.defaultGranularity)||"day";const n=C.value.findIndex(s=>s.type==="timeRange");if(n>=0){const s=C.value[n];return((i=a.value[n])==null?void 0:i.granularity)||(s==null?void 0:s.defaultGranularity)||"day"}return"day"},le=t=>{if(!t)return null;if(/^\d+$/.test(t)){const n=Number(t),u=t.length<=10?n*1e3:n,i=new Date(u);return Number.isNaN(i.getTime())?null:i}const l=new Date(t);return Number.isNaN(l.getTime())?null:l},ae=(t,l)=>{if(t==null)return"";const n=String(t).trim();if(!n)return"";const u=typeof l=="number"?te(l):"day",i=le(n);if(!i)return u==="day"?n.slice(0,10):n;const s=i.getFullYear(),p=String(i.getMonth()+1).padStart(2,"0"),d=String(i.getDate()).padStart(2,"0");if(u==="day")return`${s}-${p}-${d}`;const m=String(i.getHours()).padStart(2,"0"),c=String(i.getMinutes()).padStart(2,"0"),o=String(i.getSeconds()).padStart(2,"0");return`${s}-${p}-${d} ${m}:${c}:${o}`},ne=(t,l)=>{if(!Array.isArray(t))return[];if(l!=="day")return t.map(i=>String(i));const n=new Set,u=[];return t.forEach(i=>{const s=String(i||"").trim();if(!s)return;let p=s.slice(0,10);if(/^\d+$/.test(s)){const d=Number(s),m=s.length<=10?d*1e3:d,c=new Date(m);if(!Number.isNaN(c.getTime())){const o=c.getFullYear(),y=String(c.getMonth()+1).padStart(2,"0"),V=String(c.getDate()).padStart(2,"0");p=`${o}-${y}-${V}`}}!p||p.length!==10||n.has(p)||(n.add(p),u.push(p))}),u},j=()=>{C.value.forEach((t,l)=>{var i,s,p,d,m,c,o,y,V,r;a.value[l]||(a.value[l]={});const n=B.dayjs(),u=((i=a.value[l])==null?void 0:i.granularity)==="hour"||t.defaultGranularity==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(t.type==="timeRange"){const g=t.quickRangeOptions||q,h=t.defaultQuickRange||((s=g==null?void 0:g[0])==null?void 0:s.value)||"week",T=t.defaultGranularity||((d=(p=t.granularityOptions)==null?void 0:p[0])==null?void 0:d.value)||"",D=R(h,n,u);a.value[l]={quickRange:h,granularity:T,startDate:D.startDate,endDate:D.endDate}}else if(t.type==="timeList"){const g=(m=N.value)!=null&&m.length?[...N.value]:(()=>{var H;const D=C.value.findIndex(L=>L.type==="timeRange");let F=[];if(D>=0&&a.value[D]){const L=B.dayjs(a.value[D].startDate),de=B.dayjs(a.value[D].endDate),$=(((H=a.value[D])==null?void 0:H.granularity)||C.value[D].defaultGranularity)==="hour"?"hour":"day";let O=de;for(;O.isAfter(L)||O.isSame(L,$);)F.push(O.format(u)),O=O.subtract(1,$)}return F})(),T=(((c=a.value[l])==null?void 0:c.selectedTimes)||[]).filter(D=>g.includes(D));a.value[l]={timeList:g,selectedTimes:T,selectAll:T.length>0&&T.length===g.length}}else if(t.type==="selectList")if(t.multiple){const g=(t.options||[]).map(h=>h.value);a.value[l]={selectedValues:g}}else a.value[l]={selectedValue:((y=(o=t.options)==null?void 0:o[0])==null?void 0:y.value)||""};else if(t.type==="direction")a.value[l]={selectedValue:((r=(V=t.options)==null?void 0:V[0])==null?void 0:r.value)||"s"};else if(t.type==="range")a.value[l]={min:"",max:""};else if(t.type==="switch"){const g={};(t.options||[]).forEach(h=>{g[h.value]=h.defaultValue!==!1}),a.value[l]=g}})},A=e.computed(()=>({backgroundColor:k.value.bgColor,color:k.value.textColor,borderColor:k.value.borderColor})),U=t=>{const l={};return C.value.forEach((n,u)=>{var p;if(!a.value[u]||n.type!=="range"&&!n.key)return;const i=String((p=n.targetId)!=null?p:"").trim();if(t!==void 0){if(i&&!i.split(",").map(m=>m.trim()).filter(m=>m).includes(t))return}else if(i)return;const s=a.value[u];if(n.type==="timeRange")l[n.key]={startDate:s.startDate,endDate:s.endDate,quickRange:s.quickRange,granularity:s.granularity};else if(n.type==="timeList")l[n.key]=s.selectedTimes||[];else if(n.type==="selectList")l[n.key]=n.multiple?s.selectedValues:s.selectedValue;else if(n.type==="direction")l[n.key]=s.selectedValue;else if(n.type==="range"){const d=String(n.rangeAxis||"xAxis"),m=n.key?String(n.key):"range",c=s.min===""?null:parseFloat(s.min),o=s.max===""||s.max==="最大值"?null:parseFloat(s.max),y={min:Number.isNaN(c)?null:c,max:Number.isNaN(o)?null:o,rangeAxis:d};l[`${m}__${d}`]=y,l[`range__${d}`]=y,d==="xAxis"&&(l.range=y)}else n.type==="switch"&&(l[n.key]=Y({},s))}),l},oe=()=>{const t=U(),l=J.value,n=C.value,u=k.value.linkChannel||"deepDisplacement",i=[];l&&i.push({objectId:l,config:t});const s=new Map;n.forEach(d=>{const m=d.targetId;if(!m)return;m.split(",").map(o=>o.trim()).filter(o=>o).forEach(o=>{s.has(o)||s.set(o,U(o));const y=s.get(o)||{};i.push({objectId:o,config:y})})});const p=++M;i.forEach((d,m)=>{setTimeout(()=>{if(p!==M)return;const c=Y({source:"trajectoryConfigPanel",type:"filter",objectId:d.objectId,filter:d.config,meta:{channel:u}},d.config);v.publish(u,"trajectoryConfigPanel",c)},m)})},w=()=>{E&&clearTimeout(E),E=setTimeout(()=>{oe(),E=null},200)},G=(t,l)=>{const n=C.value[t];if(!n||n.type!=="timeRange"||!a.value[t])return;const u=B.dayjs(),s=(a.value[t].granularity||n.defaultGranularity)==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";a.value[t].quickRange=l;const p=R(l,u,s);a.value[t].startDate=p.startDate,a.value[t].endDate=p.endDate,I(),b()},I=()=>{var d,m,c;const t=C.value.findIndex(o=>o.type==="timeRange"),l=C.value.findIndex(o=>o.type==="timeList");if(l<0)return;const n=t>=0&&a.value[t]&&(((d=a.value[t])==null?void 0:d.granularity)||((m=C.value[t])==null?void 0:m.defaultGranularity))||"day",u=(c=N.value)!=null&&c.length?[...N.value]:(()=>{if(t>=0&&a.value[t]){const o=n==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",y=B.dayjs(a.value[t].startDate),V=B.dayjs(a.value[t].endDate),r=n==="hour"?"hour":"day",g=[];let h=V;for(;h.isAfter(y)||h.isSame(y,r);)g.push(h.format(o)),h=h.subtract(1,r);return g}return[]})(),i=ne(u,n);a.value[l]||(a.value[l]={}),a.value[l].timeList=i;const p=(a.value[l].selectedTimes||[]).filter(o=>i.includes(o));a.value[l].selectedTimes=p,a.value[l].selectAll=p.length>0&&p.length===i.length},re=t=>{if(!a.value[t])return;const l=a.value[t].selectAll;a.value[t].selectedTimes=l?[...a.value[t].timeList]:[],b()},se=t=>{a.value[t]&&(a.value[t].selectedTimes=[],a.value[t].selectAll=!1,b())},ce=t=>{if(!a.value[t])return;const l=a.value[t].timeList||[],n=a.value[t].selectedTimes||[];a.value[t].selectAll=n.length===l.length,b()},ie=(t,l)=>{a.value[t]&&(a.value[t].selectedValue=l,b())},ue=(t,l)=>{if(!a.value[t])return;a.value[t].granularity=l;const n=B.dayjs(),u=l==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",i=a.value[t].quickRange||"week",s=R(i,n,u);a.value[t].startDate=s.startDate,a.value[t].endDate=s.endDate,I(),b()},b=t=>{w()};e.watch(()=>{var t;return(t=f.conf)==null?void 0:t.data},()=>{j(),setTimeout(w,300)},{deep:!0,immediate:!0}),e.watch(()=>v.channels[k.value.linkChannel],t=>{if(!t||!t.payload||!v.shouldHandle(t,"trajectoryConfigPanel"))return;const l=t.payload;(l==null?void 0:l.type)==="timeList"&&Array.isArray(l.timeList)&&(N.value=l.timeList.map(n=>String(n)),I(),w())},{deep:!0}),e.watch(()=>{var t;return(t=f.conf)==null?void 0:t.data},(t,l)=>{t&&t.forEach((n,u)=>{const i=l==null?void 0:l[u];if(n.type&&(!i||n.type!==i.type)){const s=pe(n.type);Object.keys(s).forEach(p=>{(!n[p]||n[p]===""||Array.isArray(n[p])&&n[p].length===0)&&(n[p]=s[p])})}})},{deep:!0});const pe=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:"s"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}]},range:{label:"数值区间",key:"range",minPlaceholder:"最小值",maxPlaceholder:"最大值",unit:"",rangeAxis:"xAxis"},switch:{label:"显示选项",key:"displayOptions",options:[{label:"开始点",value:"showStartPoint"},{label:"结束点",value:"showEndPoint"},{label:"轨迹线",value:"showTrajectory"},{label:"方向箭头",value:"showDirection"}]}})[t]||{};return e.onMounted(()=>{j();const t=C.value.findIndex(l=>l.type==="timeRange");t>=0&&G(t,"week"),setTimeout(w,300)}),e.onUnmounted(()=>{E&&(clearTimeout(E),E=null)}),(t,l)=>{const n=S.ElDatePicker,u=S.ElCheckbox,i=S.ElIcon,s=S.ElButton,p=S.ElOption,d=S.ElSelect,m=S.ElInput;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["trajectory-config-panel",X.value]),style:e.normalizeStyle(A.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(c,o)=>{var y,V;return e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["config-section time-range-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",ke,[e.createElementVNode("span",Ce,e.toDisplayString(c.label||"时间段"),1)]),e.createElementVNode("div",be,[c.showQuickRange?(e.openBlock(),e.createElementBlock("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.quickRangeOptions||q,r=>{var g;return e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["range-item",{active:((g=a.value[o])==null?void 0:g.quickRange)===r.value}]),onClick:h=>G(o,r.value)},e.toDisplayString(r.label),11,_e)}),128))])):e.createCommentVNode("",!0),(y=c.granularityOptions)!=null&&y.length?(e.openBlock(),e.createElementBlock("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.granularityOptions,r=>{var g;return e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["granularity-item",{active:((g=a.value[o])==null?void 0:g.granularity)===r.value}]),onClick:h=>ue(o,r.value)},e.toDisplayString(r.label),11,Be)}),128))])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(n,{modelValue:a.value[o].startDate,"onUpdate:modelValue":r=>a.value[o].startDate=r,type:z(o,c),placeholder:"开始时间",format:P(o,c),"value-format":P(o,c),size:"small",class:"date-picker",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(n,{modelValue:a.value[o].endDate,"onUpdate:modelValue":r=>a.value[o].endDate=r,type:z(o,c),placeholder:"结束时间",format:P(o,c),"value-format":P(o,c),size:"small",class:"date-picker",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])],2)):c.type==="timeList"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["config-section time-list-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Se,[e.createElementVNode("span",Ne,e.toDisplayString(c.label||"采集时间列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(u,{modelValue:a.value[o].selectAll,"onUpdate:modelValue":r=>a.value[o].selectAll=r,onChange:r=>re(o)},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(s,{size:"small",text:"",onClick:r=>se(o)},{default:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(e.unref(he.Delete))]),_:1}),l[1]||(l[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",Oe,[l[2]||(l[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(((V=a.value[o].selectedTimes)==null?void 0:V.length)||0),1),l[3]||(l[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(d,{modelValue:a.value[o].selectedTimes,"onUpdate:modelValue":r=>a.value[o].selectedTimes=r,multiple:"",filterable:"","collapse-tags":"","collapse-tags-tooltip":"",size:"small",class:"select-control select-control-wide",onChange:r=>ce(o)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value[o].timeList||[],r=>(e.openBlock(),e.createBlock(p,{key:r,label:ae(r,o),value:r},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])])):e.createCommentVNode("",!0)],2)):c.type==="selectList"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["config-section select-list-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",we,[e.createElementVNode("span",Le,e.toDisplayString(c.label||"节点列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ye,[c.multiple?(e.openBlock(),e.createBlock(d,{key:1,modelValue:a.value[o].selectedValues,"onUpdate:modelValue":r=>a.value[o].selectedValues=r,multiple:"",filterable:"","collapse-tags":"","collapse-tags-tooltip":"",size:"small",class:"select-control select-control-wide",onChange:r=>b()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(p,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(d,{key:0,modelValue:a.value[o].selectedValue,"onUpdate:modelValue":r=>a.value[o].selectedValue=r,filterable:"",clearable:"",size:"small",class:"select-control",onChange:r=>b()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(p,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])):e.createCommentVNode("",!0)],2)):c.type==="direction"?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["config-section direction-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Re,[e.createElementVNode("span",Ae,e.toDisplayString(c.label||"位移方向"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["direction-item",{active:a.value[o].selectedValue===r.value}]),onClick:g=>ie(o,r.value)},e.toDisplayString(r.label),11,Me))),128))])):e.createCommentVNode("",!0)],2)):c.type==="range"?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["config-section range-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",qe,[e.createElementVNode("span",ze,e.toDisplayString(c.label||"数值区间"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(m,{modelValue:a.value[o].min,"onUpdate:modelValue":r=>a.value[o].min=r,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),l[4]||(l[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(m,{modelValue:a.value[o].max,"onUpdate:modelValue":r=>a.value[o].max=r,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)):c.type==="switch"?(e.openBlock(),e.createElementBlock("div",{key:5,class:e.normalizeClass(["config-section switch-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Ge,[e.createElementVNode("span",Fe,e.toDisplayString(c.label||"显示选项"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(u,{key:r.value,modelValue:a.value[o][r.value],"onUpdate:modelValue":g=>a.value[o][r.value]=g,onChange:g=>b()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)],6)}}})),et=B._export_sfc(Ze,[["__scopeId","data-v-1bd1d47e"]]);exports.default=et;
|
|
1
|
+
"use strict";var me=Object.defineProperty,ge=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var x=(_,v,f)=>v in _?me(_,v,{enumerable:!0,configurable:!0,writable:!0,value:f}):_[v]=f,Y=(_,v)=>{for(var f in v||(v={}))ve.call(v,f)&&x(_,f,v[f]);if(Q)for(var f of Q(v))fe.call(v,f)&&x(_,f,v[f]);return _},K=(_,v)=>ge(_,ye(v));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=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/select/style/css");require("element-plus/es/components/option/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-OgmTZiO-.cjs"),he=require("@element-plus/icons-vue"),W=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),ke={class:"section-header"},Ce={class:"section-title"},be={class:"time-range-body"},Ve={key:0,class:"quick-range"},_e=["onClick"],De={key:1,class:"granularity-tabs"},Be=["onClick"],Ee={key:2,class:"date-inputs"},Se={class:"section-header"},Ne={class:"section-title"},Te={key:0,class:"time-list-actions"},Oe={class:"selected-count"},Pe={key:1,class:"time-list-select"},we={class:"section-header"},Le={class:"section-title"},Ye={key:0,class:"select-list"},Re={class:"section-header"},Ae={class:"section-title"},Ie={key:0,class:"direction-tabs"},Me=["onClick"],qe={class:"section-header"},ze={class:"section-title"},je={key:0,class:"range-inputs"},Ue={key:0,class:"range-unit"},Ge={class:"section-header"},Fe={class:"section-title"},He={key:0,class:"display-options"},$e={DEFAULT_ICON:W.DEFAULT_ICON,ACTIVE_ICON:W.ACTIVE_ICON,NAME_CN:"露天矿控制面板",NAME_EN:"Openpit Control Panel",ORDER:15,PLATFORM:["pc","screen"]},Qe={layout:{value:"auto",type:"select",label:"布局模式",options:[{label:"自适应",value:"auto"},{label:"竖排",value:"vertical"},{label:"横排",value:"horizontal"}]},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"},hideSectionTitle:{value:!1,type:"switch",label:"隐藏分组标题"},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"}}},xe=[{type:"timeRange",label:"时间段",key:"timeRange",targetId:"",rangeAxis:"xAxis",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:""}],Ke=[{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:"rangeAxis",label:"component.openpitConfigPanel.rangeAxis",type:"select",options:[{label:"component.openpitConfigPanel.rangeAxisOptions.xAxis",value:"xAxis"},{label:"component.openpitConfigPanel.rangeAxisOptions.yAxis",value:"yAxis"},{label:"component.openpitConfigPanel.rangeAxisOptions.radius",value:"radius"}],dependent:"type",dependentValue:"range"},{key:"showQuickRange",label:"component.openpitConfigPanel.showQuickRange",type:"switch",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"},{key:"remark",label:"remark",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"}],We=[],Xe={useAlias:!1,multiObject:!1,source:""},Je={DEFAULT:$e,OPTIONS:Qe,DATA:xe,PARAMS:Ke,SOURCE:We,COMMON:Xe},Ze=e.defineComponent(K(Y({},Je),{__name:"trajectoryConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(_){e.useCssVars(t=>({v15a941b4:A.value.backgroundColor,v6c388130:A.value.borderColor,v1e47c9b2:k.value.textColor,v4ecefb48:k.value.borderColor,v444d252c:k.value.accentColor}));const v=B.useLinkStore(),f=_,N=e.ref(null);let M=0,E=null;const k=e.computed(()=>{var s,p,d,m,c,o,y,V;const{options:t}=f.conf||{},l=((s=t==null?void 0:t.linkChannel)==null?void 0:s.value)||"deepDisplacement",n=((p=t==null?void 0:t.customChannel)==null?void 0:p.value)||"",u=l==="custom"&&n?n:l,i=((d=t==null?void 0:t.layout)==null?void 0:d.value)||"auto";return{bgColor:((m=t==null?void 0:t.bgColor)==null?void 0:m.value)||"#ffffff",textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#333333",accentColor:((o=t==null?void 0:t.accentColor)==null?void 0:o.value)||"#409eff",borderColor:((y=t==null?void 0:t.borderColor)==null?void 0:y.value)||"#e5e5e5",hideSectionTitle:((V=t==null?void 0:t.hideSectionTitle)==null?void 0:V.value)===!0,layout:i,linkChannel:u}}),X=e.computed(()=>{const t=String(k.value.layout||"auto");return t==="horizontal"?"layout-horizontal":t==="vertical"?"layout-vertical":"layout-auto"}),J=e.computed(()=>{const t=f.uid;if(!t){const l=`trajectoryConfigPanel_${Date.now()}`;return console.warn("[TrajectoryConfigPanel] 缺少 uid,自动生成:",l),l}return t}),C=e.computed(()=>{var t;return((t=f.conf)==null?void 0:t.data)||[]}),a=e.ref({}),q=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],Z=(t,l)=>((l==null?void 0:l.granularity)||(t==null?void 0:t.defaultGranularity))==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",ee=(t,l)=>((l==null?void 0:l.granularity)||(t==null?void 0:t.defaultGranularity))==="hour"?"datetime":"date",P=(t,l)=>Z(l,a.value[t]),z=(t,l)=>ee(l,a.value[t]),R=(t,l,n)=>{const u=n.includes("HH"),i=u?l.endOf("day").format(n):l.format(n);let s=l.subtract(7,"day").format(n);return t==="today"?s=l.startOf("day").format(n):t==="week"?s=l.subtract(6,"day").startOf("day").format(n):t==="month"?s=l.subtract(29,"day").startOf("day").format(n):t==="quarter"?s=l.subtract(89,"day").startOf("day").format(n):t==="year"&&(s=l.subtract(364,"day").startOf("day").format(n)),{startDate:s,endDate:i}},te=t=>{var u,i;const l=C.value[t];if((l==null?void 0:l.type)==="timeRange")return((u=a.value[t])==null?void 0:u.granularity)||(l==null?void 0:l.defaultGranularity)||"day";const n=C.value.findIndex(s=>s.type==="timeRange");if(n>=0){const s=C.value[n];return((i=a.value[n])==null?void 0:i.granularity)||(s==null?void 0:s.defaultGranularity)||"day"}return"day"},le=t=>{if(!t)return null;if(/^\d+$/.test(t)){const n=Number(t),u=t.length<=10?n*1e3:n,i=new Date(u);return Number.isNaN(i.getTime())?null:i}const l=new Date(t);return Number.isNaN(l.getTime())?null:l},ae=(t,l)=>{if(t==null)return"";const n=String(t).trim();if(!n)return"";const u=typeof l=="number"?te(l):"day",i=le(n);if(!i)return u==="day"?n.slice(0,10):n;const s=i.getFullYear(),p=String(i.getMonth()+1).padStart(2,"0"),d=String(i.getDate()).padStart(2,"0");if(u==="day")return`${s}-${p}-${d}`;const m=String(i.getHours()).padStart(2,"0"),c=String(i.getMinutes()).padStart(2,"0"),o=String(i.getSeconds()).padStart(2,"0");return`${s}-${p}-${d} ${m}:${c}:${o}`},ne=(t,l)=>{if(!Array.isArray(t))return[];if(l!=="day")return t.map(i=>String(i));const n=new Set,u=[];return t.forEach(i=>{const s=String(i||"").trim();if(!s)return;let p=s.slice(0,10);if(/^\d+$/.test(s)){const d=Number(s),m=s.length<=10?d*1e3:d,c=new Date(m);if(!Number.isNaN(c.getTime())){const o=c.getFullYear(),y=String(c.getMonth()+1).padStart(2,"0"),V=String(c.getDate()).padStart(2,"0");p=`${o}-${y}-${V}`}}!p||p.length!==10||n.has(p)||(n.add(p),u.push(p))}),u},j=()=>{C.value.forEach((t,l)=>{var i,s,p,d,m,c,o,y,V,r;a.value[l]||(a.value[l]={});const n=B.dayjs(),u=((i=a.value[l])==null?void 0:i.granularity)==="hour"||t.defaultGranularity==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(t.type==="timeRange"){const g=t.quickRangeOptions||q,h=t.defaultQuickRange||((s=g==null?void 0:g[0])==null?void 0:s.value)||"week",T=t.defaultGranularity||((d=(p=t.granularityOptions)==null?void 0:p[0])==null?void 0:d.value)||"",D=R(h,n,u);a.value[l]={quickRange:h,granularity:T,startDate:D.startDate,endDate:D.endDate}}else if(t.type==="timeList"){const g=(m=N.value)!=null&&m.length?[...N.value]:(()=>{var H;const D=C.value.findIndex(L=>L.type==="timeRange");let F=[];if(D>=0&&a.value[D]){const L=B.dayjs(a.value[D].startDate),de=B.dayjs(a.value[D].endDate),$=(((H=a.value[D])==null?void 0:H.granularity)||C.value[D].defaultGranularity)==="hour"?"hour":"day";let O=de;for(;O.isAfter(L)||O.isSame(L,$);)F.push(O.format(u)),O=O.subtract(1,$)}return F})(),T=(((c=a.value[l])==null?void 0:c.selectedTimes)||[]).filter(D=>g.includes(D));a.value[l]={timeList:g,selectedTimes:T,selectAll:T.length>0&&T.length===g.length}}else if(t.type==="selectList")if(t.multiple){const g=(t.options||[]).map(h=>h.value);a.value[l]={selectedValues:g}}else a.value[l]={selectedValue:((y=(o=t.options)==null?void 0:o[0])==null?void 0:y.value)||""};else if(t.type==="direction")a.value[l]={selectedValue:((r=(V=t.options)==null?void 0:V[0])==null?void 0:r.value)||"s"};else if(t.type==="range")a.value[l]={min:"",max:""};else if(t.type==="switch"){const g={};(t.options||[]).forEach(h=>{g[h.value]=h.defaultValue!==!1}),a.value[l]=g}})},A=e.computed(()=>({backgroundColor:k.value.bgColor,color:k.value.textColor,borderColor:k.value.borderColor})),U=t=>{const l={};return C.value.forEach((n,u)=>{var p;if(!a.value[u]||n.type!=="range"&&!n.key)return;const i=String((p=n.targetId)!=null?p:"").trim();if(t!==void 0){if(i&&!i.split(",").map(m=>m.trim()).filter(m=>m).includes(t))return}else if(i)return;const s=a.value[u];if(n.type==="timeRange")l[n.key]={startDate:s.startDate,endDate:s.endDate,quickRange:s.quickRange,granularity:s.granularity};else if(n.type==="timeList")l[n.key]=s.selectedTimes||[];else if(n.type==="selectList")l[n.key]=n.multiple?s.selectedValues:s.selectedValue;else if(n.type==="direction")l[n.key]=s.selectedValue;else if(n.type==="range"){const d=String(n.rangeAxis||"xAxis"),m=n.key?String(n.key):"range",c=s.min===""?null:parseFloat(s.min),o=s.max===""||s.max==="最大值"?null:parseFloat(s.max),y={min:Number.isNaN(c)?null:c,max:Number.isNaN(o)?null:o,rangeAxis:d};l[`${m}__${d}`]=y,l[`range__${d}`]=y,d==="xAxis"&&(l.range=y)}else n.type==="switch"&&(l[n.key]=Y({},s))}),l},oe=()=>{const t=U(),l=J.value,n=C.value,u=k.value.linkChannel||"deepDisplacement",i=[];l&&i.push({objectId:l,config:t});const s=new Map;n.forEach(d=>{const m=d.targetId;if(!m)return;m.split(",").map(o=>o.trim()).filter(o=>o).forEach(o=>{s.has(o)||s.set(o,U(o));const y=s.get(o)||{};i.push({objectId:o,config:y})})});const p=++M;i.forEach((d,m)=>{setTimeout(()=>{if(p!==M)return;const c=Y({source:"trajectoryConfigPanel",type:"filter",objectId:d.objectId,filter:d.config,meta:{channel:u}},d.config);v.publish(u,"trajectoryConfigPanel",c)},m)})},w=()=>{E&&clearTimeout(E),E=setTimeout(()=>{oe(),E=null},200)},G=(t,l)=>{const n=C.value[t];if(!n||n.type!=="timeRange"||!a.value[t])return;const u=B.dayjs(),s=(a.value[t].granularity||n.defaultGranularity)==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";a.value[t].quickRange=l;const p=R(l,u,s);a.value[t].startDate=p.startDate,a.value[t].endDate=p.endDate,I(),b()},I=()=>{var d,m,c;const t=C.value.findIndex(o=>o.type==="timeRange"),l=C.value.findIndex(o=>o.type==="timeList");if(l<0)return;const n=t>=0&&a.value[t]&&(((d=a.value[t])==null?void 0:d.granularity)||((m=C.value[t])==null?void 0:m.defaultGranularity))||"day",u=(c=N.value)!=null&&c.length?[...N.value]:(()=>{if(t>=0&&a.value[t]){const o=n==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",y=B.dayjs(a.value[t].startDate),V=B.dayjs(a.value[t].endDate),r=n==="hour"?"hour":"day",g=[];let h=V;for(;h.isAfter(y)||h.isSame(y,r);)g.push(h.format(o)),h=h.subtract(1,r);return g}return[]})(),i=ne(u,n);a.value[l]||(a.value[l]={}),a.value[l].timeList=i;const p=(a.value[l].selectedTimes||[]).filter(o=>i.includes(o));a.value[l].selectedTimes=p,a.value[l].selectAll=p.length>0&&p.length===i.length},re=t=>{if(!a.value[t])return;const l=a.value[t].selectAll;a.value[t].selectedTimes=l?[...a.value[t].timeList]:[],b()},se=t=>{a.value[t]&&(a.value[t].selectedTimes=[],a.value[t].selectAll=!1,b())},ce=t=>{if(!a.value[t])return;const l=a.value[t].timeList||[],n=a.value[t].selectedTimes||[];a.value[t].selectAll=n.length===l.length,b()},ie=(t,l)=>{a.value[t]&&(a.value[t].selectedValue=l,b())},ue=(t,l)=>{if(!a.value[t])return;a.value[t].granularity=l;const n=B.dayjs(),u=l==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",i=a.value[t].quickRange||"week",s=R(i,n,u);a.value[t].startDate=s.startDate,a.value[t].endDate=s.endDate,I(),b()},b=t=>{w()};e.watch(()=>{var t;return(t=f.conf)==null?void 0:t.data},()=>{j(),setTimeout(w,300)},{deep:!0,immediate:!0}),e.watch(()=>v.channels[k.value.linkChannel],t=>{if(!t||!t.payload||!v.shouldHandle(t,"trajectoryConfigPanel"))return;const l=t.payload;(l==null?void 0:l.type)==="timeList"&&Array.isArray(l.timeList)&&(N.value=l.timeList.map(n=>String(n)),I(),w())},{deep:!0}),e.watch(()=>{var t;return(t=f.conf)==null?void 0:t.data},(t,l)=>{t&&t.forEach((n,u)=>{const i=l==null?void 0:l[u];if(n.type&&(!i||n.type!==i.type)){const s=pe(n.type);Object.keys(s).forEach(p=>{(!n[p]||n[p]===""||Array.isArray(n[p])&&n[p].length===0)&&(n[p]=s[p])})}})},{deep:!0});const pe=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:"s"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}]},range:{label:"数值区间",key:"range",minPlaceholder:"最小值",maxPlaceholder:"最大值",unit:"",rangeAxis:"xAxis"},switch:{label:"显示选项",key:"displayOptions",options:[{label:"开始点",value:"showStartPoint"},{label:"结束点",value:"showEndPoint"},{label:"轨迹线",value:"showTrajectory"},{label:"方向箭头",value:"showDirection"}]}})[t]||{};return e.onMounted(()=>{j();const t=C.value.findIndex(l=>l.type==="timeRange");t>=0&&G(t,"week"),setTimeout(w,300)}),e.onUnmounted(()=>{E&&(clearTimeout(E),E=null)}),(t,l)=>{const n=S.ElDatePicker,u=S.ElCheckbox,i=S.ElIcon,s=S.ElButton,p=S.ElOption,d=S.ElSelect,m=S.ElInput;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["trajectory-config-panel",X.value]),style:e.normalizeStyle(A.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(c,o)=>{var y,V;return e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["config-section time-range-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",ke,[e.createElementVNode("span",Ce,e.toDisplayString(c.label||"时间段"),1)]),e.createElementVNode("div",be,[c.showQuickRange?(e.openBlock(),e.createElementBlock("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.quickRangeOptions||q,r=>{var g;return e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["range-item",{active:((g=a.value[o])==null?void 0:g.quickRange)===r.value}]),onClick:h=>G(o,r.value)},e.toDisplayString(r.label),11,_e)}),128))])):e.createCommentVNode("",!0),(y=c.granularityOptions)!=null&&y.length?(e.openBlock(),e.createElementBlock("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.granularityOptions,r=>{var g;return e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["granularity-item",{active:((g=a.value[o])==null?void 0:g.granularity)===r.value}]),onClick:h=>ue(o,r.value)},e.toDisplayString(r.label),11,Be)}),128))])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(n,{modelValue:a.value[o].startDate,"onUpdate:modelValue":r=>a.value[o].startDate=r,type:z(o,c),placeholder:"开始时间",format:P(o,c),"value-format":P(o,c),size:"small",class:"date-picker",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(n,{modelValue:a.value[o].endDate,"onUpdate:modelValue":r=>a.value[o].endDate=r,type:z(o,c),placeholder:"结束时间",format:P(o,c),"value-format":P(o,c),size:"small",class:"date-picker",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])],2)):c.type==="timeList"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["config-section time-list-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Se,[e.createElementVNode("span",Ne,e.toDisplayString(c.label||"采集时间列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(u,{modelValue:a.value[o].selectAll,"onUpdate:modelValue":r=>a.value[o].selectAll=r,onChange:r=>re(o)},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(s,{size:"small",text:"",onClick:r=>se(o)},{default:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(e.unref(he.Delete))]),_:1}),l[1]||(l[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",Oe,[l[2]||(l[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(((V=a.value[o].selectedTimes)==null?void 0:V.length)||0),1),l[3]||(l[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(d,{modelValue:a.value[o].selectedTimes,"onUpdate:modelValue":r=>a.value[o].selectedTimes=r,multiple:"",filterable:"","collapse-tags":"","collapse-tags-tooltip":"",size:"small",class:"select-control select-control-wide",onChange:r=>ce(o)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value[o].timeList||[],r=>(e.openBlock(),e.createBlock(p,{key:r,label:ae(r,o),value:r},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])])):e.createCommentVNode("",!0)],2)):c.type==="selectList"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["config-section select-list-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",we,[e.createElementVNode("span",Le,e.toDisplayString(c.label||"节点列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ye,[c.multiple?(e.openBlock(),e.createBlock(d,{key:1,modelValue:a.value[o].selectedValues,"onUpdate:modelValue":r=>a.value[o].selectedValues=r,multiple:"",filterable:"","collapse-tags":"","collapse-tags-tooltip":"",size:"small",class:"select-control select-control-wide",onChange:r=>b()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(p,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(d,{key:0,modelValue:a.value[o].selectedValue,"onUpdate:modelValue":r=>a.value[o].selectedValue=r,filterable:"",clearable:"",size:"small",class:"select-control",onChange:r=>b()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(p,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])):e.createCommentVNode("",!0)],2)):c.type==="direction"?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["config-section direction-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Re,[e.createElementVNode("span",Ae,e.toDisplayString(c.label||"位移方向"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["direction-item",{active:a.value[o].selectedValue===r.value}]),onClick:g=>ie(o,r.value)},e.toDisplayString(r.label),11,Me))),128))])):e.createCommentVNode("",!0)],2)):c.type==="range"?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["config-section range-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",qe,[e.createElementVNode("span",ze,e.toDisplayString(c.label||"数值区间"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(m,{modelValue:a.value[o].min,"onUpdate:modelValue":r=>a.value[o].min=r,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),l[4]||(l[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(m,{modelValue:a.value[o].max,"onUpdate:modelValue":r=>a.value[o].max=r,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)):c.type==="switch"?(e.openBlock(),e.createElementBlock("div",{key:5,class:e.normalizeClass(["config-section switch-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Ge,[e.createElementVNode("span",Fe,e.toDisplayString(c.label||"显示选项"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(u,{key:r.value,modelValue:a.value[o][r.value],"onUpdate:modelValue":g=>a.value[o][r.value]=g,onChange:g=>b()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)],6)}}})),et=B._export_sfc(Ze,[["__scopeId","data-v-1bd1d47e"]]);exports.default=et;
|
|
@@ -20,7 +20,7 @@ import "element-plus/es/components/icon/style/css";
|
|
|
20
20
|
import "element-plus/es/components/checkbox/style/css";
|
|
21
21
|
import "element-plus/es/components/date-picker/style/css";
|
|
22
22
|
import { defineComponent as Ne, useCssVars as Ee, ref as ie, computed as j, watch as W, onMounted as Ue, onUnmounted as je, openBlock as p, createElementBlock as g, normalizeStyle as Ge, normalizeClass as Y, Fragment as R, renderList as w, createElementVNode as k, toDisplayString as S, createCommentVNode as P, createVNode as A, withCtx as M, createTextVNode as G, unref as qe, createBlock as $, renderSlot as ze } from "vue";
|
|
23
|
-
import { l as He, d as I, _ as Qe } from "./index-
|
|
23
|
+
import { l as He, d as I, _ as Qe } from "./index-CqVPeq0-.js";
|
|
24
24
|
import { Delete as Be } from "@element-plus/icons-vue";
|
|
25
25
|
import { A as Fe, D as Ke } from "./ele-ctrSet-icon-BtKGrCid.js";
|
|
26
26
|
const We = { class: "section-header" }, Xe = { class: "section-title" }, Je = { class: "time-range-body" }, Ze = {
|
|
@@ -11,9 +11,9 @@ var rt = (f, c, x) => c in f ? At(f, c, { enumerable: !0, configurable: !0, writ
|
|
|
11
11
|
return f;
|
|
12
12
|
}, ut = (f, c) => Tt(f, Pt(c));
|
|
13
13
|
import { defineComponent as wt, computed as K, ref as $, watch as mt, watchEffect as Dt, onMounted as Et, onBeforeUnmount as zt, openBlock as Z, createElementBlock as G, normalizeStyle as q, unref as R, toDisplayString as ht, createCommentVNode as Kt, createElementVNode as L, normalizeClass as yt, Fragment as $t, renderList as Rt, renderSlot as jt, nextTick as gt } from "vue";
|
|
14
|
-
import { l as Ht, O as vt, C as Yt, N as Xt, _ as Bt } from "./index-
|
|
14
|
+
import { l as Ht, O as vt, C as Yt, N as Xt, _ as Bt } from "./index-CqVPeq0-.js";
|
|
15
15
|
import "element-plus";
|
|
16
|
-
import { E as Ut } from "./EChartComponentBase-
|
|
16
|
+
import { E as Ut } from "./EChartComponentBase-B-VNAC8K.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-oDYkyVFy.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Nt=Object.defineProperty,Ct=Object.defineProperties;var bt=Object.getOwnPropertyDescriptors;var it=Object.getOwnPropertySymbols;var Ot=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;var lt=(x,u,d)=>u in x?Nt(x,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):x[u]=d,at=(x,u)=>{for(var d in u||(u={}))Ot.call(u,d)&<(x,d,u[d]);if(it)for(var d of it(u))kt.call(u,d)&<(x,d,u[d]);return x},st=(x,u)=>Ct(x,bt(u));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),L=require("./index-6QhTSPkL.cjs");require("element-plus");const _t=require("./EChartComponentBase-CMN_pOMr.cjs"),It=require("./titleStyle-NSnz6cUg.cjs"),ot=require("./ele-circleBar-icon-Da0-L9sa.cjs"),X=require("./installCanvasRenderer-CyhM1Qpl.cjs"),Vt=require("./install-C8buXQPI.cjs"),Tt=require("./install-ByPD0oOh.cjs"),At=require("./install-CYwVETsi.cjs"),Et={class:"mix-body"},Pt={class:"chart-wrap"},Ft=["id"],zt={class:"timeline-left"},Lt={class:"timeline-track",ref:"trackRef"},wt=["onClick"],Dt={DEFAULT_ICON:ot.DEFAULT_ICON,ACTIVE_ICON:ot.ACTIVE_ICON,NAME_CN:"动态轨迹分布图",NAME_EN:"TrajectoryScatter",ORDER:1,PLATFORM:["pc","screen"]},Kt={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"}},rt=[{name:"轨迹点",fv_x:"elevation",fv_y:"speed",color:"#ff5a5f",object_id:""}],Rt=["name","fv_x","fv_y","object_id","color"],$t=["mosaic","statistics","calculate"],jt={useAlias:!1,multiObject:!0,source:"mosaic"},Bt={DEFAULT:Dt,OPTIONS:Kt,DATA:rt,PARAMS:Rt,SOURCE:$t,COMMON:jt},Ht=o.defineComponent(st(at({},Bt),{__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([Vt.install,X.install,X.install$1,Tt.install,At.install]);const u=x,d=L.useLinkStore();let R=null;class ct extends _t.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=rt),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=ft.value,s=(a==null?void 0:a.color)||L.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:ht.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?xt.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 ct(u,"trajectoryScatter"),ut=f.getEchartId();f.setupLifecycle();const p=f.getStyle(),mt=o.computed(()=>It.generateTitleStyle(u.conf.options)),A=o.ref([]),$=t=>typeof t=="number"&&Number.isFinite(t),ht=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=>$(i==null?void 0:i[0])&&$(i==null?void 0:i[1]))}),yt=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),j=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},gt=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},vt=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}},B=()=>{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=j((F=(S=t==null?void 0:t.xMin)==null?void 0:S.value)!=null?F:f.getStyle().value.xMin),i=j((C=(N=t==null?void 0:t.xMax)==null?void 0:N.value)!=null?C:f.getStyle().value.xMax),a=j((O=(b=t==null?void 0:t.yMin)==null?void 0:b.value)!=null?O:f.getStyle().value.yMin),s=j((_=(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=vt(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),ft=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}),xt=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=>$(c==null?void 0:c[0])&&$(c==null?void 0:c[1]))}),w=()=>{const t=yt.value;A.value=t.map((e,n)=>{var i;return gt((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)},D=()=>{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,B(),w(),D()},dt=t=>{P(),q(t)},P=()=>{z.value=!1,R&&(clearInterval(R),R=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);R=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))},pt=()=>{A.value.length&&(z.value?P():W())},J=t=>{U.value!==t&&(U.value=t,M.value=null)},H=()=>{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 St=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=L.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}St({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}),B(),w(),E.value=Math.max(0,A.value.length-1),D(),H()},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=L.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||{},K=Number(y==null?void 0:y[c]),Y=Number(y==null?void 0:y[v]),Mt=(nt=y==null?void 0:y[S])!=null?nt:h;if(!Number.isFinite(K)||!Number.isFinite(Y)){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:K,y:Y,t:Mt,color:F})});else if(l&&typeof l=="object"){const g=i!=null&&i.multiObject?"":L.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]),K=Number(h==null?void 0:h[v]),Y=Z(h,l,S);!Number.isFinite(y)||!Number.isFinite(K)?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:K,t:Y,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))}w(),D(),H()};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(),B(),w(),D(),H()},{deep:!0}),o.onMounted(()=>{const t=u.conf;t&&t.runtime&&(t.runtime.points=[],t.runtime.allPoints=[]),B(),w(),D(),H()}),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(mt.value)},o.toDisplayString(x.conf.caption||x.conf.name),5)),o.createElementVNode("div",Et,[o.createElementVNode("div",Pt,[o.createElementVNode("div",{class:"echart-container",id:o.unref(ut)},null,8,Ft)]),o.createElementVNode("div",{class:"timeline",style:o.normalizeStyle({height:`${o.unref(p).timelineHeight}px`})},[o.createElementVNode("div",zt,[o.createElementVNode("div",{class:o.normalizeClass(["play",{active:z.value}]),onClick:pt},"II",2)]),o.createElementVNode("div",Lt,[(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=>dt(i)},o.toDisplayString(n),11,wt))),128))],512)],4)]),o.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),Yt=L._export_sfc(Ht,[["__scopeId","data-v-48bacd17"]]);exports.default=Yt;
|
|
1
|
+
"use strict";var Nt=Object.defineProperty,Ct=Object.defineProperties;var bt=Object.getOwnPropertyDescriptors;var it=Object.getOwnPropertySymbols;var Ot=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;var lt=(x,u,d)=>u in x?Nt(x,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):x[u]=d,at=(x,u)=>{for(var d in u||(u={}))Ot.call(u,d)&<(x,d,u[d]);if(it)for(var d of it(u))kt.call(u,d)&<(x,d,u[d]);return x},st=(x,u)=>Ct(x,bt(u));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),L=require("./index-OgmTZiO-.cjs");require("element-plus");const _t=require("./EChartComponentBase-C2sxqwSE.cjs"),It=require("./titleStyle-NSnz6cUg.cjs"),ot=require("./ele-circleBar-icon-Da0-L9sa.cjs"),X=require("./installCanvasRenderer-CyhM1Qpl.cjs"),Vt=require("./install-C8buXQPI.cjs"),Tt=require("./install-ByPD0oOh.cjs"),At=require("./install-CYwVETsi.cjs"),Et={class:"mix-body"},Pt={class:"chart-wrap"},Ft=["id"],zt={class:"timeline-left"},Lt={class:"timeline-track",ref:"trackRef"},wt=["onClick"],Dt={DEFAULT_ICON:ot.DEFAULT_ICON,ACTIVE_ICON:ot.ACTIVE_ICON,NAME_CN:"动态轨迹分布图",NAME_EN:"TrajectoryScatter",ORDER:1,PLATFORM:["pc","screen"]},Kt={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"}},rt=[{name:"轨迹点",fv_x:"elevation",fv_y:"speed",color:"#ff5a5f",object_id:""}],Rt=["name","fv_x","fv_y","object_id","color"],$t=["mosaic","statistics","calculate"],jt={useAlias:!1,multiObject:!0,source:"mosaic"},Bt={DEFAULT:Dt,OPTIONS:Kt,DATA:rt,PARAMS:Rt,SOURCE:$t,COMMON:jt},Ht=o.defineComponent(st(at({},Bt),{__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([Vt.install,X.install,X.install$1,Tt.install,At.install]);const u=x,d=L.useLinkStore();let R=null;class ct extends _t.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=rt),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=ft.value,s=(a==null?void 0:a.color)||L.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:ht.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?xt.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 ct(u,"trajectoryScatter"),ut=f.getEchartId();f.setupLifecycle();const p=f.getStyle(),mt=o.computed(()=>It.generateTitleStyle(u.conf.options)),A=o.ref([]),$=t=>typeof t=="number"&&Number.isFinite(t),ht=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=>$(i==null?void 0:i[0])&&$(i==null?void 0:i[1]))}),yt=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),j=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},gt=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},vt=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}},B=()=>{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=j((F=(S=t==null?void 0:t.xMin)==null?void 0:S.value)!=null?F:f.getStyle().value.xMin),i=j((C=(N=t==null?void 0:t.xMax)==null?void 0:N.value)!=null?C:f.getStyle().value.xMax),a=j((O=(b=t==null?void 0:t.yMin)==null?void 0:b.value)!=null?O:f.getStyle().value.yMin),s=j((_=(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=vt(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),ft=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}),xt=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=>$(c==null?void 0:c[0])&&$(c==null?void 0:c[1]))}),w=()=>{const t=yt.value;A.value=t.map((e,n)=>{var i;return gt((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)},D=()=>{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,B(),w(),D()},dt=t=>{P(),q(t)},P=()=>{z.value=!1,R&&(clearInterval(R),R=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);R=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))},pt=()=>{A.value.length&&(z.value?P():W())},J=t=>{U.value!==t&&(U.value=t,M.value=null)},H=()=>{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 St=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=L.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}St({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}),B(),w(),E.value=Math.max(0,A.value.length-1),D(),H()},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=L.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||{},K=Number(y==null?void 0:y[c]),Y=Number(y==null?void 0:y[v]),Mt=(nt=y==null?void 0:y[S])!=null?nt:h;if(!Number.isFinite(K)||!Number.isFinite(Y)){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:K,y:Y,t:Mt,color:F})});else if(l&&typeof l=="object"){const g=i!=null&&i.multiObject?"":L.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]),K=Number(h==null?void 0:h[v]),Y=Z(h,l,S);!Number.isFinite(y)||!Number.isFinite(K)?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:K,t:Y,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))}w(),D(),H()};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(),B(),w(),D(),H()},{deep:!0}),o.onMounted(()=>{const t=u.conf;t&&t.runtime&&(t.runtime.points=[],t.runtime.allPoints=[]),B(),w(),D(),H()}),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(mt.value)},o.toDisplayString(x.conf.caption||x.conf.name),5)),o.createElementVNode("div",Et,[o.createElementVNode("div",Pt,[o.createElementVNode("div",{class:"echart-container",id:o.unref(ut)},null,8,Ft)]),o.createElementVNode("div",{class:"timeline",style:o.normalizeStyle({height:`${o.unref(p).timelineHeight}px`})},[o.createElementVNode("div",zt,[o.createElementVNode("div",{class:o.normalizeClass(["play",{active:z.value}]),onClick:pt},"II",2)]),o.createElementVNode("div",Lt,[(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=>dt(i)},o.toDisplayString(n),11,wt))),128))],512)],4)]),o.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),Yt=L._export_sfc(Ht,[["__scopeId","data-v-48bacd17"]]);exports.default=Yt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var z=Object.defineProperty,j=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var R=(m,i,v)=>i in m?z(m,i,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[i]=v,b=(m,i)=>{for(var v in i||(i={}))Q.call(i,v)&&R(m,v,i[v]);if(F)for(var v of F(i))W.call(i,v)&&R(m,v,i[v]);return m},N=(m,i)=>j(m,G(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-6QhTSPkL.cjs"),U=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),J=require("@element-plus/icons-vue"),K={key:0,class:"config-section"},X={class:"section-header"},Z={class:"section-title"},$={key:0,class:"granularity-switch"},x=["onClick"],ee=["onClick"],le={key:0,class:"quick-range"},te=["onClick"],ae={key:1,class:"date-inputs"},oe={key:1,class:"config-section"},ne={class:"section-header"},se={class:"section-title"},ce={key:0,class:"list-actions"},re={class:"selected-count"},ue={class:"select-list"},de={key:2,class:"config-section"},ie={class:"section-header"},ve={class:"section-title"},pe={class:"switch-options"},me={key:3,class:"config-section"},ke={class:"section-header"},fe={class:"section-title"},ge={class:"range-inputs"},he={key:0,class:"range-unit"},Ce={key:4,class:"config-section"},ye={DEFAULT_ICON:U.DEFAULT_ICON,ACTIVE_ICON:U.ACTIVE_ICON,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20,PLATFORM:["pc","screen","mobile"]},_e={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"}}},Ve=[{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}]}],be=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],Ee=[],De={useAlias:!1,multiObject:!1,source:""},Be={DEFAULT:ye,OPTIONS:_e,DATA:Ve,PARAMS:be,SOURCE:Ee,COMMON:De},Ne=e.defineComponent(N(b({},Be),{__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=>({v10edae52:D.value.backgroundColor,a9b6f6d8:D.value.borderColor,d418e10a:p.value.textColor,v0bdaaa9c:p.value.borderColor,ca35c684:p.value.accentColor}));const i=E.useLinkStore(),v=m,p=e.computed(()=>{var u,d,k,_,V,C,c,n;const{options:l}=v.conf||{},a=((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)||"",s=a==="custom"&&r?r:a;return{bindId:((k=l==null?void 0:l.bindId)==null?void 0:k.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:((C=l==null?void 0:l.accentColor)==null?void 0:C.value)||"#409eff",borderColor:((c=l==null?void 0:l.borderColor)==null?void 0:c.value)||"#e5e5e5",bindMode:((n=l==null?void 0:l.bindMode)==null?void 0:n.value)||"channel",linkChannel:s}}),I=e.computed(()=>p.value.bindId||v.uid||""),g=e.computed(()=>{var l;return((l=v.conf)==null?void 0:l.data)||[]}),t=e.ref({}),A=[{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})),S=()=>{t.value={},g.value.forEach((l,a)=>{var r,s,u;if(t.value[a]={},l.type==="timeRange"){t.value[a]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const d=E.dayjs();t.value[a].endDate=d.format(l.dateFormat||"YYYY-MM-DD HH:mm:ss"),t.value[a].startDate=d.subtract(7,"day").format(l.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(l.type==="selectList")t.value[a]={selectedValues:l.multiple?[]:"",selectedValue:l.multiple?void 0:((s=(r=l.options)==null?void 0:r[0])==null?void 0:s.value)||"",selectAll:!1},l.multiple&&l.options&&(t.value[a].selectedValues=l.options.map(d=>d.value),t.value[a].selectAll=!0);else if(l.type==="switch"){const d={};(u=l.options)==null||u.forEach(k=>{d[k.value]=k.defaultValue!==!1}),t.value[a]=d}else l.type==="range"&&(t.value[a]={min:"",max:""})})},Y=()=>{const l={};return g.value.forEach((a,r)=>{if(a.key&&t.value[r]){const s=t.value[r];a.type==="timeRange"?l[a.key]={granularity:s.granularity,startDate:s.startDate,endDate:s.endDate,quickRange:s.quickRange}:a.type==="selectList"?l[a.key]=a.multiple?s.selectedValues:s.selectedValue:a.type==="switch"?l[a.key]=b({},s):a.type==="range"&&(l[a.key]={min:s.min===""?null:parseFloat(s.min),max:s.max===""?null:parseFloat(s.max)})}}),l},B=()=>{const l=Y(),a=I.value,r=p.value.bindMode,s=p.value.linkChannel;a&&(console.log("[UniversalConfigPanel] 广播配置:",{id:a,bindMode:r,linkChannel:s,config:l}),r==="channel"?i.publish(s,"universalConfigPanel",{objectId:a,type:"config",fv:l}):g.value.forEach(u=>{if(!u.targetIds)return;u.targetIds.split(",").map(k=>k.trim()).filter(Boolean).forEach(k=>{i.publish(s,"universalConfigPanel",{objectId:k,type:"bindConfig",fv:N(b({},l),{[u.key]:l[u.key]})})})}))},w=(l,a)=>{t.value[l]&&(t.value[l].granularity=a,f())},P=(l,a)=>{if(!t.value[l])return;const r=g.value[l],s=E.dayjs(),u=r.dateFormat||"YYYY-MM-DD HH:mm:ss";t.value[l].quickRange=a,t.value[l].endDate=s.format(u),a==="week"?t.value[l].startDate=s.subtract(7,"day").format(u):a==="month"?t.value[l].startDate=s.subtract(30,"day").format(u):a==="quarter"&&(t.value[l].startDate=s.subtract(90,"day").format(u)),f()},f=l=>{B()},H=l=>{var r;const a=g.value[l];!a.multiple||!t.value[l]||(t.value[l].selectAll?t.value[l].selectedValues=((r=a.options)==null?void 0:r.map(s=>s.value))||[]:t.value[l].selectedValues=[],f())},L=l=>{t.value[l]&&(t.value[l].selectedValues=[],t.value[l].selectAll=!1,f())},M=l=>{var r;const a=g.value[l];a.multiple&&t.value[l]&&(t.value[l].selectAll=t.value[l].selectedValues.length===(((r=a.options)==null?void 0:r.length)||0)),f()},O=l=>{var s;const a=g.value[l],r=Y();p.value.bindMode==="channel"?i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:I.value,type:"action",action:a.key,fv:r}):(((s=a.targetIds)==null?void 0:s.split(",").map(d=>d.trim()).filter(Boolean))||[]).forEach(d=>{i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:d,type:"action",action:a.key,fv:r})})};return e.watch(g,()=>{S(),setTimeout(B,300)},{immediate:!1,deep:!0,flush:"sync"}),e.onMounted(()=>{S(),setTimeout(B,300)}),(l,a)=>{const r=h.ElDatePicker,s=h.ElCheckbox,u=h.ElIcon,d=h.ElButton,k=h.ElCheckboxGroup,_=h.ElRadio,V=h.ElRadioGroup,C=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,(c,n)=>{var T,q;return e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",X,[e.createElementVNode("span",Z,e.toDisplayString(c.label||"时间段"),1),c.showGranularity&&t.value[n]?(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:((T=t.value[n])==null?void 0:T.granularity)==="day"}]),onClick:o=>w(n,"day")}," 日均 ",10,x),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:((q=t.value[n])==null?void 0:q.granularity)==="hour"}]),onClick:o=>w(n,"hour")}," 小时 ",10,ee)])):e.createCommentVNode("",!0)]),c.showQuickRange&&t.value[n]?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(A,o=>{var y;return e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:((y=t.value[n])==null?void 0:y.quickRange)===o.value}]),onClick:Se=>P(n,o.value)},e.toDisplayString(o.label),11,te)}),64))])):e.createCommentVNode("",!0),t.value[n]?(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(r,{modelValue:t.value[n].startDate,"onUpdate:modelValue":o=>t.value[n].startDate=o,type:c.dateType||"datetime",placeholder:"开始时间",format:c.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":c.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(r,{modelValue:t.value[n].endDate,"onUpdate:modelValue":o=>t.value[n].endDate=o,type:c.dateType||"datetime",placeholder:"结束时间",format:c.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":c.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])):c.type==="selectList"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ne,[e.createElementVNode("span",se,e.toDisplayString(c.label||"选择列表"),1)]),c.multiple?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(s,{modelValue:t.value[n].selectAll,"onUpdate:modelValue":o=>t.value[n].selectAll=o,onChange:o=>H(n)},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(d,{size:"small",text:"",onClick:o=>L(n)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(J.Delete))]),_:1}),a[1]||(a[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",re,[a[2]||(a[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(t.value[n].selectedValues&&t.value[n].selectedValues.length||0),1),a[3]||(a[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",ue,[c.multiple?(e.openBlock(),e.createBlock(k,{key:0,modelValue:t.value[n].selectedValues,"onUpdate:modelValue":o=>t.value[n].selectedValues=o,onChange:o=>M(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(s,{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:t.value[n].selectedValue,"onUpdate:modelValue":o=>t.value[n].selectedValue=o,onChange:o=>M(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.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"]))])])):c.type==="switch"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("div",ie,[e.createElementVNode("span",ve,e.toDisplayString(c.label||"开关"),1)]),e.createElementVNode("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(s,{key:o.value,modelValue:t.value[n][o.value],"onUpdate:modelValue":y=>t.value[n][o.value]=y,onChange:y=>f()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):c.type==="range"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ke,[e.createElementVNode("span",fe,e.toDisplayString(c.label||"范围设置"),1)]),e.createElementVNode("div",ge,[e.createVNode(C,{modelValue:t.value[n].min,"onUpdate:modelValue":o=>t.value[n].min=o,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),a[4]||(a[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(C,{modelValue:t.value[n].max,"onUpdate:modelValue":o=>t.value[n].max=o,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",he,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])])):c.type==="button"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(d,{size:"small",onClick:o=>O(n),class:"action-btn",type:c.buttonType||"primary"},{default:e.withCtx(()=>[c.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon)))]),_:2},1024)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(c.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ie=E._export_sfc(Ne,[["__scopeId","data-v-60e3fc69"]]);exports.default=Ie;
|
|
1
|
+
"use strict";var z=Object.defineProperty,j=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var R=(m,i,v)=>i in m?z(m,i,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[i]=v,b=(m,i)=>{for(var v in i||(i={}))Q.call(i,v)&&R(m,v,i[v]);if(F)for(var v of F(i))W.call(i,v)&&R(m,v,i[v]);return m},N=(m,i)=>j(m,G(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-OgmTZiO-.cjs"),U=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),J=require("@element-plus/icons-vue"),K={key:0,class:"config-section"},X={class:"section-header"},Z={class:"section-title"},$={key:0,class:"granularity-switch"},x=["onClick"],ee=["onClick"],le={key:0,class:"quick-range"},te=["onClick"],ae={key:1,class:"date-inputs"},oe={key:1,class:"config-section"},ne={class:"section-header"},se={class:"section-title"},ce={key:0,class:"list-actions"},re={class:"selected-count"},ue={class:"select-list"},de={key:2,class:"config-section"},ie={class:"section-header"},ve={class:"section-title"},pe={class:"switch-options"},me={key:3,class:"config-section"},ke={class:"section-header"},fe={class:"section-title"},ge={class:"range-inputs"},he={key:0,class:"range-unit"},Ce={key:4,class:"config-section"},ye={DEFAULT_ICON:U.DEFAULT_ICON,ACTIVE_ICON:U.ACTIVE_ICON,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20,PLATFORM:["pc","screen","mobile"]},_e={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"}}},Ve=[{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}]}],be=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],Ee=[],De={useAlias:!1,multiObject:!1,source:""},Be={DEFAULT:ye,OPTIONS:_e,DATA:Ve,PARAMS:be,SOURCE:Ee,COMMON:De},Ne=e.defineComponent(N(b({},Be),{__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=>({v10edae52:D.value.backgroundColor,a9b6f6d8:D.value.borderColor,d418e10a:p.value.textColor,v0bdaaa9c:p.value.borderColor,ca35c684:p.value.accentColor}));const i=E.useLinkStore(),v=m,p=e.computed(()=>{var u,d,k,_,V,C,c,n;const{options:l}=v.conf||{},a=((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)||"",s=a==="custom"&&r?r:a;return{bindId:((k=l==null?void 0:l.bindId)==null?void 0:k.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:((C=l==null?void 0:l.accentColor)==null?void 0:C.value)||"#409eff",borderColor:((c=l==null?void 0:l.borderColor)==null?void 0:c.value)||"#e5e5e5",bindMode:((n=l==null?void 0:l.bindMode)==null?void 0:n.value)||"channel",linkChannel:s}}),I=e.computed(()=>p.value.bindId||v.uid||""),g=e.computed(()=>{var l;return((l=v.conf)==null?void 0:l.data)||[]}),t=e.ref({}),A=[{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})),S=()=>{t.value={},g.value.forEach((l,a)=>{var r,s,u;if(t.value[a]={},l.type==="timeRange"){t.value[a]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const d=E.dayjs();t.value[a].endDate=d.format(l.dateFormat||"YYYY-MM-DD HH:mm:ss"),t.value[a].startDate=d.subtract(7,"day").format(l.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(l.type==="selectList")t.value[a]={selectedValues:l.multiple?[]:"",selectedValue:l.multiple?void 0:((s=(r=l.options)==null?void 0:r[0])==null?void 0:s.value)||"",selectAll:!1},l.multiple&&l.options&&(t.value[a].selectedValues=l.options.map(d=>d.value),t.value[a].selectAll=!0);else if(l.type==="switch"){const d={};(u=l.options)==null||u.forEach(k=>{d[k.value]=k.defaultValue!==!1}),t.value[a]=d}else l.type==="range"&&(t.value[a]={min:"",max:""})})},Y=()=>{const l={};return g.value.forEach((a,r)=>{if(a.key&&t.value[r]){const s=t.value[r];a.type==="timeRange"?l[a.key]={granularity:s.granularity,startDate:s.startDate,endDate:s.endDate,quickRange:s.quickRange}:a.type==="selectList"?l[a.key]=a.multiple?s.selectedValues:s.selectedValue:a.type==="switch"?l[a.key]=b({},s):a.type==="range"&&(l[a.key]={min:s.min===""?null:parseFloat(s.min),max:s.max===""?null:parseFloat(s.max)})}}),l},B=()=>{const l=Y(),a=I.value,r=p.value.bindMode,s=p.value.linkChannel;a&&(console.log("[UniversalConfigPanel] 广播配置:",{id:a,bindMode:r,linkChannel:s,config:l}),r==="channel"?i.publish(s,"universalConfigPanel",{objectId:a,type:"config",fv:l}):g.value.forEach(u=>{if(!u.targetIds)return;u.targetIds.split(",").map(k=>k.trim()).filter(Boolean).forEach(k=>{i.publish(s,"universalConfigPanel",{objectId:k,type:"bindConfig",fv:N(b({},l),{[u.key]:l[u.key]})})})}))},w=(l,a)=>{t.value[l]&&(t.value[l].granularity=a,f())},P=(l,a)=>{if(!t.value[l])return;const r=g.value[l],s=E.dayjs(),u=r.dateFormat||"YYYY-MM-DD HH:mm:ss";t.value[l].quickRange=a,t.value[l].endDate=s.format(u),a==="week"?t.value[l].startDate=s.subtract(7,"day").format(u):a==="month"?t.value[l].startDate=s.subtract(30,"day").format(u):a==="quarter"&&(t.value[l].startDate=s.subtract(90,"day").format(u)),f()},f=l=>{B()},H=l=>{var r;const a=g.value[l];!a.multiple||!t.value[l]||(t.value[l].selectAll?t.value[l].selectedValues=((r=a.options)==null?void 0:r.map(s=>s.value))||[]:t.value[l].selectedValues=[],f())},L=l=>{t.value[l]&&(t.value[l].selectedValues=[],t.value[l].selectAll=!1,f())},M=l=>{var r;const a=g.value[l];a.multiple&&t.value[l]&&(t.value[l].selectAll=t.value[l].selectedValues.length===(((r=a.options)==null?void 0:r.length)||0)),f()},O=l=>{var s;const a=g.value[l],r=Y();p.value.bindMode==="channel"?i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:I.value,type:"action",action:a.key,fv:r}):(((s=a.targetIds)==null?void 0:s.split(",").map(d=>d.trim()).filter(Boolean))||[]).forEach(d=>{i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:d,type:"action",action:a.key,fv:r})})};return e.watch(g,()=>{S(),setTimeout(B,300)},{immediate:!1,deep:!0,flush:"sync"}),e.onMounted(()=>{S(),setTimeout(B,300)}),(l,a)=>{const r=h.ElDatePicker,s=h.ElCheckbox,u=h.ElIcon,d=h.ElButton,k=h.ElCheckboxGroup,_=h.ElRadio,V=h.ElRadioGroup,C=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,(c,n)=>{var T,q;return e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",X,[e.createElementVNode("span",Z,e.toDisplayString(c.label||"时间段"),1),c.showGranularity&&t.value[n]?(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:((T=t.value[n])==null?void 0:T.granularity)==="day"}]),onClick:o=>w(n,"day")}," 日均 ",10,x),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:((q=t.value[n])==null?void 0:q.granularity)==="hour"}]),onClick:o=>w(n,"hour")}," 小时 ",10,ee)])):e.createCommentVNode("",!0)]),c.showQuickRange&&t.value[n]?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(A,o=>{var y;return e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:((y=t.value[n])==null?void 0:y.quickRange)===o.value}]),onClick:Se=>P(n,o.value)},e.toDisplayString(o.label),11,te)}),64))])):e.createCommentVNode("",!0),t.value[n]?(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(r,{modelValue:t.value[n].startDate,"onUpdate:modelValue":o=>t.value[n].startDate=o,type:c.dateType||"datetime",placeholder:"开始时间",format:c.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":c.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(r,{modelValue:t.value[n].endDate,"onUpdate:modelValue":o=>t.value[n].endDate=o,type:c.dateType||"datetime",placeholder:"结束时间",format:c.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":c.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])):c.type==="selectList"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ne,[e.createElementVNode("span",se,e.toDisplayString(c.label||"选择列表"),1)]),c.multiple?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(s,{modelValue:t.value[n].selectAll,"onUpdate:modelValue":o=>t.value[n].selectAll=o,onChange:o=>H(n)},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(d,{size:"small",text:"",onClick:o=>L(n)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(J.Delete))]),_:1}),a[1]||(a[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",re,[a[2]||(a[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(t.value[n].selectedValues&&t.value[n].selectedValues.length||0),1),a[3]||(a[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",ue,[c.multiple?(e.openBlock(),e.createBlock(k,{key:0,modelValue:t.value[n].selectedValues,"onUpdate:modelValue":o=>t.value[n].selectedValues=o,onChange:o=>M(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(s,{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:t.value[n].selectedValue,"onUpdate:modelValue":o=>t.value[n].selectedValue=o,onChange:o=>M(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.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"]))])])):c.type==="switch"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("div",ie,[e.createElementVNode("span",ve,e.toDisplayString(c.label||"开关"),1)]),e.createElementVNode("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(s,{key:o.value,modelValue:t.value[n][o.value],"onUpdate:modelValue":y=>t.value[n][o.value]=y,onChange:y=>f()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):c.type==="range"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ke,[e.createElementVNode("span",fe,e.toDisplayString(c.label||"范围设置"),1)]),e.createElementVNode("div",ge,[e.createVNode(C,{modelValue:t.value[n].min,"onUpdate:modelValue":o=>t.value[n].min=o,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),a[4]||(a[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(C,{modelValue:t.value[n].max,"onUpdate:modelValue":o=>t.value[n].max=o,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",he,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])])):c.type==="button"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(d,{size:"small",onClick:o=>O(n),class:"action-btn",type:c.buttonType||"primary"},{default:e.withCtx(()=>[c.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon)))]),_:2},1024)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(c.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ie=E._export_sfc(Ne,[["__scopeId","data-v-60e3fc69"]]);exports.default=Ie;
|
|
@@ -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 ve, useCssVars as pe, computed as S, ref as me, watch as fe, onMounted as he, openBlock as c, createElementBlock as v, normalizeStyle as ge, Fragment as I, renderList as R, createElementVNode as p, toDisplayString as y, normalizeClass as T, createCommentVNode as D, createVNode as k, withCtx as C, createTextVNode as V, unref as ye, createBlock as Y, resolveDynamicComponent as _e, renderSlot as Ce } from "vue";
|
|
24
|
-
import { l as be, d as Q, _ as ke } from "./index-
|
|
24
|
+
import { l as be, d as Q, _ as ke } from "./index-CqVPeq0-.js";
|
|
25
25
|
import { A as Ve, D as De } from "./ele-ctrSet-icon-BtKGrCid.js";
|
|
26
26
|
import { Delete as Ye } from "@element-plus/icons-vue";
|
|
27
27
|
const Ie = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var he=Object.defineProperty,ye=Object.defineProperties;var be=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable;var K=(f,i,h)=>i in f?he(f,i,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[i]=h,Z=(f,i)=>{for(var h in i||(i={}))ge.call(i,h)&&K(f,h,i[h]);if(G)for(var h of G(i))ke.call(i,h)&&K(f,h,i[h]);return f},H=(f,i)=>ye(f,be(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/pagination/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"),Q=require("./index-6QhTSPkL.cjs");require("element-plus");const Ne=require("./EChartComponentBase-CMN_pOMr.cjs"),J=require("./ele-lst-icon-CrxnHZ-A.cjs"),_e={class:"table-header"},Se={class:"title"},we={class:"header-right"},Ee={class:"row-count"},xe={key:0,class:"toolbar"},Ce={key:0,class:"toolbar-left"},De={key:1,class:"toolbar-right"},Be={class:"table-body"},Te=["colspan","rowspan"],Ve={key:0},Ae=["colspan"],Fe={class:"pager"},Ie={DEFAULT_ICON:J.DEFAULT_ICON,ACTIVE_ICON:J.ACTIVE_ICON,NAME_CN:"通用表组件",NAME_EN:"UniversalTable",ORDER:28,PLATFORM:["pc","screen"]},Oe={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:"指标选项(名称/值)",showWidth:!1,showFv:!1,showColorRules:!1,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"}}},Me=[{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}],Re=[{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"}],Le=["mosaic","statistics","calculate"],$e={useAlias:!1,multiObject:!0,source:"mosaic"},qe={DEFAULT:Ie,OPTIONS:Oe,DATA:Me,PARAMS:Re,SOURCE:Le,COMMON:$e},ze=t.defineComponent(H(Z({},qe),{__name:"universalTable",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(f){const i=f;class h extends Ne.EChartComponentBase{extractStyles(){var r,o,u,c,s;const n=((r=this.props.conf)==null?void 0:r.options)||{},l=((o=n==null?void 0:n.linkChannel)==null?void 0:o.value)||"deepDisplacement",a=((u=n==null?void 0:n.customChannel)==null?void 0:u.value)||"";return{bgColor:((c=n==null?void 0:n.bgColor)==null?void 0:c.value)||"#fff",textColor:((s=n==null?void 0:n.textColor)==null?void 0:s.value)||"#333",linkChannel:l==="custom"&&a?a:l}}getChartOption(){return{}}setSocketData(n){if(!n)return;const l=fe(n);if(l.length){if(l.length>1){x.value=l;return}x.value=[...x.value.slice(-499),l[0]]}}}const E=new h(i,"universalTable");E.setupLifecycle();const F=E.getStyle(),ee=Q.useLinkStore(),g=t.ref(1),te=t.ref("s"),ne=t.ref(!1),B=t.ref([]),N=t.ref(null),x=t.ref([]),k=t.ref(""),_=t.ref("全部"),R=t.ref("hour"),C=t.computed(()=>{var e,n,l;return Number(((l=(n=(e=i.conf)==null?void 0:e.options)==null?void 0:n.pageSize)==null?void 0:l.value)||10)}),L=t.computed(()=>{var n;return[...((n=i.conf)==null?void 0:n.data)||[]]}),le=e=>{const n=String(e.colType||"基础列");return n==="指标列"||n==="metric"},$=e=>{const l=String(e||"").match(/_(\d+)$/);return l?l[1]:""},oe=t.computed(()=>{const e=new Set;return L.value.forEach(n=>{const l=$(n.fv);l&&e.add(l)}),Array.from(e).sort((n,l)=>Number(n)-Number(l))}),q=e=>{const l=String(e||"").match(/^([a-zA-Z]+)_\d+$/);return l?l[1]:""},y=t.computed(()=>{var n,l,a;const e=String(((a=(l=(n=i.conf)==null?void 0:n.options)==null?void 0:l.filterMode)==null?void 0:a.value)||"depth");return e==="metric"||e==="both"||e==="none"?e:"depth"}),I=t.computed(()=>{var a,r,o,u,c,s,m,d,v;const e=Number((o=(r=(a=i.conf)==null?void 0:a.options)==null?void 0:r.depthStart)==null?void 0:o.value),n=Number((s=(c=(u=i.conf)==null?void 0:u.options)==null?void 0:c.depthEnd)==null?void 0:s.value),l=Number((v=(d=(m=i.conf)==null?void 0:m.options)==null?void 0:d.depthStep)==null?void 0:v.value);if(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(l)&&l>0){const p=[];if(e<=n)for(let b=e;b<=n;b+=l)p.push(String(b));else for(let b=e;b>=n;b-=l)p.push(String(b));if(p.length)return p}return oe.value}),O=t.computed(()=>{var n,l,a;const e=((a=(l=(n=i.conf)==null?void 0:n.options)==null?void 0:l.metricOptions)==null?void 0:a.value)||[];if(Array.isArray(e)&&e.length){const r=e.map(o=>{var u,c,s,m,d,v;return{label:String((s=(c=(u=o==null?void 0:o.label)!=null?u:o==null?void 0:o.value)!=null?c:o==null?void 0:o.key)!=null?s:""),value:String((v=(d=(m=o==null?void 0:o.key)!=null?m:o==null?void 0:o.value)!=null?d:o==null?void 0:o.label)!=null?v:"")}}).filter(o=>o.value);if(r.length)return r}return[{label:"全部",value:"全部"},{label:"合位移",value:"s"},{label:"X位移",value:"x"},{label:"Y位移",value:"y"}]}),z=t.computed(()=>y.value==="none"||y.value==="metric"?!1:I.value.length>0),P=t.computed(()=>y.value==="none"||y.value==="depth"?!1:O.value.length>0);t.watch(I,e=>{e.length&&(!k.value||!e.includes(k.value))&&(k.value=e[0])},{immediate:!0}),t.watch(O,e=>{if(!e.length)return;const n=e.map(l=>String(l.value));(!_.value||!n.includes(_.value))&&(_.value=n[0])},{immediate:!0});const S=t.computed(()=>L.value.filter(e=>(!le(e)||(q(e.fv),y.value==="depth")||y.value==="metric"||y.value==="both",!0))),ae=t.computed(()=>{const e=[],n=[],l=S.value.filter(r=>!r.group),a=new Map;return S.value.filter(r=>!!r.group).forEach(r=>{const o=String(r.group);a.has(o)||a.set(o,[]),a.get(o).push(r)}),l.forEach(r=>{e.push({key:`top-${r.key}`,label:r.label,colspan:1,rowspan:a.size>0?2:1,width:r.width})}),Array.from(a.entries()).forEach(([r,o])=>{e.push({key:`top-group-${r}`,label:r,colspan:o.length,rowspan:1}),o.forEach(u=>n.push({key:`sub-${u.key}`,label:u.label,colspan:1,rowspan:1,width:u.width}))}),a.size===0?[e]:[e,n]}),re=()=>F.value.linkChannel,ue=t.computed(()=>({background:F.value.bgColor,color:F.value.textColor})),T=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)||""),V=e=>String((e==null?void 0:e.node)||(e==null?void 0:e.nodeId)||(e==null?void 0:e.point_id)||"-"),M=e=>{const n=String(e!=null?e:"").trim();if(!n)return Number.NaN;if(/^\d+$/.test(n)){const l=Number(n);return n.length<=10?l*1e3:l}return new Date(n).getTime()},se=e=>/^\d{4}-\d{2}-\d{2}$/.test(String(e!=null?e:"").trim()),ie=e=>{var r,o,u,c;if(!((r=N.value)!=null&&r.startDate)&&!((o=N.value)!=null&&o.endDate))return!0;const n=M(e);if(Number.isNaN(n))return!0;let l=Number.NEGATIVE_INFINITY;(u=N.value)!=null&&u.startDate&&(l=M(N.value.startDate),Number.isNaN(l)&&(l=Number.NEGATIVE_INFINITY));let a=Number.POSITIVE_INFINITY;return(c=N.value)!=null&&c.endDate&&(a=M(N.value.endDate),!Number.isNaN(a)&&se(N.value.endDate)&&(a+=1440*60*1e3-1),Number.isNaN(a)&&(a=Number.POSITIVE_INFINITY)),n>=l&&n<=a},U=t.computed(()=>x.value.filter(e=>!(!ie(T(e))||B.value.length&&!B.value.includes(V(e))))),ce=e=>{const n=String(e||"").trim();if(!n)return"";const l=new Date(n).getTime();if(Number.isNaN(l))return n.slice(0,10);const a=new Date(l),r=a.getFullYear(),o=String(a.getMonth()+1).padStart(2,"0"),u=String(a.getDate()).padStart(2,"0");return`${r}-${o}-${u}`},j=e=>{const n=y.value==="depth"||y.value==="both",l=y.value==="metric"||y.value==="both",a=q(e),r=$(e),o=l&&_.value&&_.value!=="全部"&&r?_.value:a,u=n&&k.value&&a?k.value:r;return o&&u?`${o}_${u}`:e},de=(e,n)=>{const l={__rowKey:`${T(e)}-${V(e)}-${n}`,index:n+1,time:T(e)||"-",node:V(e)||"-"};return S.value.forEach(a=>{var u;if(["index","time","node"].includes(a.key))return;const r=String(a.fv||a.key),o=j(r);l[a.key]=(u=e==null?void 0:e[o])!=null?u:"-"}),l},pe=e=>{const n=new Map;return e.forEach(l=>{const a=ce(T(l));a&&(n.has(a)||n.set(a,[]),n.get(a).push(l))}),Array.from(n.entries()).map(([l,a],r)=>{const o={__rowKey:`day-${l}-${r}`,index:r+1,time:l,node:a.length===1?V(a[0]):"-"};return S.value.forEach(u=>{if(["index","time","node"].includes(u.key))return;const c=String(u.fv||u.key),s=j(c);let m=0,d=0;a.forEach(v=>{const p=Number(v==null?void 0:v[s]);Number.isFinite(p)&&(m+=p,d+=1)}),o[u.key]=d>0?Number((m/d).toFixed(6)):"-"}),o})},D=t.computed(()=>R.value==="day"?pe(U.value):U.value.map((e,n)=>de(e,n))),Y=t.computed(()=>Math.max(1,Math.ceil(D.value.length/C.value))),W=t.computed(()=>{const e=(g.value-1)*C.value;return D.value.slice(e,e+C.value)}),me=()=>{const e=S.value.map(u=>u.label),n=D.value.map(u=>S.value.map(c=>{var s;return String((s=u[c.key])!=null?s:"-")})),l=[e,...n].map(u=>u.join(",")).join(`
|
|
1
|
+
"use strict";var he=Object.defineProperty,ye=Object.defineProperties;var be=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable;var K=(f,i,h)=>i in f?he(f,i,{enumerable:!0,configurable:!0,writable:!0,value:h}):f[i]=h,Z=(f,i)=>{for(var h in i||(i={}))ge.call(i,h)&&K(f,h,i[h]);if(G)for(var h of G(i))ke.call(i,h)&&K(f,h,i[h]);return f},H=(f,i)=>ye(f,be(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/pagination/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"),Q=require("./index-OgmTZiO-.cjs");require("element-plus");const Ne=require("./EChartComponentBase-C2sxqwSE.cjs"),J=require("./ele-lst-icon-CrxnHZ-A.cjs"),_e={class:"table-header"},Se={class:"title"},we={class:"header-right"},Ee={class:"row-count"},xe={key:0,class:"toolbar"},Ce={key:0,class:"toolbar-left"},De={key:1,class:"toolbar-right"},Be={class:"table-body"},Te=["colspan","rowspan"],Ve={key:0},Ae=["colspan"],Fe={class:"pager"},Ie={DEFAULT_ICON:J.DEFAULT_ICON,ACTIVE_ICON:J.ACTIVE_ICON,NAME_CN:"通用表组件",NAME_EN:"UniversalTable",ORDER:28,PLATFORM:["pc","screen"]},Oe={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:"指标选项(名称/值)",showWidth:!1,showFv:!1,showColorRules:!1,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"}}},Me=[{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}],Re=[{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"}],Le=["mosaic","statistics","calculate"],$e={useAlias:!1,multiObject:!0,source:"mosaic"},qe={DEFAULT:Ie,OPTIONS:Oe,DATA:Me,PARAMS:Re,SOURCE:Le,COMMON:$e},ze=t.defineComponent(H(Z({},qe),{__name:"universalTable",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(f){const i=f;class h extends Ne.EChartComponentBase{extractStyles(){var r,o,u,c,s;const n=((r=this.props.conf)==null?void 0:r.options)||{},l=((o=n==null?void 0:n.linkChannel)==null?void 0:o.value)||"deepDisplacement",a=((u=n==null?void 0:n.customChannel)==null?void 0:u.value)||"";return{bgColor:((c=n==null?void 0:n.bgColor)==null?void 0:c.value)||"#fff",textColor:((s=n==null?void 0:n.textColor)==null?void 0:s.value)||"#333",linkChannel:l==="custom"&&a?a:l}}getChartOption(){return{}}setSocketData(n){if(!n)return;const l=fe(n);if(l.length){if(l.length>1){x.value=l;return}x.value=[...x.value.slice(-499),l[0]]}}}const E=new h(i,"universalTable");E.setupLifecycle();const F=E.getStyle(),ee=Q.useLinkStore(),g=t.ref(1),te=t.ref("s"),ne=t.ref(!1),B=t.ref([]),N=t.ref(null),x=t.ref([]),k=t.ref(""),_=t.ref("全部"),R=t.ref("hour"),C=t.computed(()=>{var e,n,l;return Number(((l=(n=(e=i.conf)==null?void 0:e.options)==null?void 0:n.pageSize)==null?void 0:l.value)||10)}),L=t.computed(()=>{var n;return[...((n=i.conf)==null?void 0:n.data)||[]]}),le=e=>{const n=String(e.colType||"基础列");return n==="指标列"||n==="metric"},$=e=>{const l=String(e||"").match(/_(\d+)$/);return l?l[1]:""},oe=t.computed(()=>{const e=new Set;return L.value.forEach(n=>{const l=$(n.fv);l&&e.add(l)}),Array.from(e).sort((n,l)=>Number(n)-Number(l))}),q=e=>{const l=String(e||"").match(/^([a-zA-Z]+)_\d+$/);return l?l[1]:""},y=t.computed(()=>{var n,l,a;const e=String(((a=(l=(n=i.conf)==null?void 0:n.options)==null?void 0:l.filterMode)==null?void 0:a.value)||"depth");return e==="metric"||e==="both"||e==="none"?e:"depth"}),I=t.computed(()=>{var a,r,o,u,c,s,m,d,v;const e=Number((o=(r=(a=i.conf)==null?void 0:a.options)==null?void 0:r.depthStart)==null?void 0:o.value),n=Number((s=(c=(u=i.conf)==null?void 0:u.options)==null?void 0:c.depthEnd)==null?void 0:s.value),l=Number((v=(d=(m=i.conf)==null?void 0:m.options)==null?void 0:d.depthStep)==null?void 0:v.value);if(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(l)&&l>0){const p=[];if(e<=n)for(let b=e;b<=n;b+=l)p.push(String(b));else for(let b=e;b>=n;b-=l)p.push(String(b));if(p.length)return p}return oe.value}),O=t.computed(()=>{var n,l,a;const e=((a=(l=(n=i.conf)==null?void 0:n.options)==null?void 0:l.metricOptions)==null?void 0:a.value)||[];if(Array.isArray(e)&&e.length){const r=e.map(o=>{var u,c,s,m,d,v;return{label:String((s=(c=(u=o==null?void 0:o.label)!=null?u:o==null?void 0:o.value)!=null?c:o==null?void 0:o.key)!=null?s:""),value:String((v=(d=(m=o==null?void 0:o.key)!=null?m:o==null?void 0:o.value)!=null?d:o==null?void 0:o.label)!=null?v:"")}}).filter(o=>o.value);if(r.length)return r}return[{label:"全部",value:"全部"},{label:"合位移",value:"s"},{label:"X位移",value:"x"},{label:"Y位移",value:"y"}]}),z=t.computed(()=>y.value==="none"||y.value==="metric"?!1:I.value.length>0),P=t.computed(()=>y.value==="none"||y.value==="depth"?!1:O.value.length>0);t.watch(I,e=>{e.length&&(!k.value||!e.includes(k.value))&&(k.value=e[0])},{immediate:!0}),t.watch(O,e=>{if(!e.length)return;const n=e.map(l=>String(l.value));(!_.value||!n.includes(_.value))&&(_.value=n[0])},{immediate:!0});const S=t.computed(()=>L.value.filter(e=>(!le(e)||(q(e.fv),y.value==="depth")||y.value==="metric"||y.value==="both",!0))),ae=t.computed(()=>{const e=[],n=[],l=S.value.filter(r=>!r.group),a=new Map;return S.value.filter(r=>!!r.group).forEach(r=>{const o=String(r.group);a.has(o)||a.set(o,[]),a.get(o).push(r)}),l.forEach(r=>{e.push({key:`top-${r.key}`,label:r.label,colspan:1,rowspan:a.size>0?2:1,width:r.width})}),Array.from(a.entries()).forEach(([r,o])=>{e.push({key:`top-group-${r}`,label:r,colspan:o.length,rowspan:1}),o.forEach(u=>n.push({key:`sub-${u.key}`,label:u.label,colspan:1,rowspan:1,width:u.width}))}),a.size===0?[e]:[e,n]}),re=()=>F.value.linkChannel,ue=t.computed(()=>({background:F.value.bgColor,color:F.value.textColor})),T=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)||""),V=e=>String((e==null?void 0:e.node)||(e==null?void 0:e.nodeId)||(e==null?void 0:e.point_id)||"-"),M=e=>{const n=String(e!=null?e:"").trim();if(!n)return Number.NaN;if(/^\d+$/.test(n)){const l=Number(n);return n.length<=10?l*1e3:l}return new Date(n).getTime()},se=e=>/^\d{4}-\d{2}-\d{2}$/.test(String(e!=null?e:"").trim()),ie=e=>{var r,o,u,c;if(!((r=N.value)!=null&&r.startDate)&&!((o=N.value)!=null&&o.endDate))return!0;const n=M(e);if(Number.isNaN(n))return!0;let l=Number.NEGATIVE_INFINITY;(u=N.value)!=null&&u.startDate&&(l=M(N.value.startDate),Number.isNaN(l)&&(l=Number.NEGATIVE_INFINITY));let a=Number.POSITIVE_INFINITY;return(c=N.value)!=null&&c.endDate&&(a=M(N.value.endDate),!Number.isNaN(a)&&se(N.value.endDate)&&(a+=1440*60*1e3-1),Number.isNaN(a)&&(a=Number.POSITIVE_INFINITY)),n>=l&&n<=a},U=t.computed(()=>x.value.filter(e=>!(!ie(T(e))||B.value.length&&!B.value.includes(V(e))))),ce=e=>{const n=String(e||"").trim();if(!n)return"";const l=new Date(n).getTime();if(Number.isNaN(l))return n.slice(0,10);const a=new Date(l),r=a.getFullYear(),o=String(a.getMonth()+1).padStart(2,"0"),u=String(a.getDate()).padStart(2,"0");return`${r}-${o}-${u}`},j=e=>{const n=y.value==="depth"||y.value==="both",l=y.value==="metric"||y.value==="both",a=q(e),r=$(e),o=l&&_.value&&_.value!=="全部"&&r?_.value:a,u=n&&k.value&&a?k.value:r;return o&&u?`${o}_${u}`:e},de=(e,n)=>{const l={__rowKey:`${T(e)}-${V(e)}-${n}`,index:n+1,time:T(e)||"-",node:V(e)||"-"};return S.value.forEach(a=>{var u;if(["index","time","node"].includes(a.key))return;const r=String(a.fv||a.key),o=j(r);l[a.key]=(u=e==null?void 0:e[o])!=null?u:"-"}),l},pe=e=>{const n=new Map;return e.forEach(l=>{const a=ce(T(l));a&&(n.has(a)||n.set(a,[]),n.get(a).push(l))}),Array.from(n.entries()).map(([l,a],r)=>{const o={__rowKey:`day-${l}-${r}`,index:r+1,time:l,node:a.length===1?V(a[0]):"-"};return S.value.forEach(u=>{if(["index","time","node"].includes(u.key))return;const c=String(u.fv||u.key),s=j(c);let m=0,d=0;a.forEach(v=>{const p=Number(v==null?void 0:v[s]);Number.isFinite(p)&&(m+=p,d+=1)}),o[u.key]=d>0?Number((m/d).toFixed(6)):"-"}),o})},D=t.computed(()=>R.value==="day"?pe(U.value):U.value.map((e,n)=>de(e,n))),Y=t.computed(()=>Math.max(1,Math.ceil(D.value.length/C.value))),W=t.computed(()=>{const e=(g.value-1)*C.value;return D.value.slice(e,e+C.value)}),me=()=>{const e=S.value.map(u=>u.label),n=D.value.map(u=>S.value.map(c=>{var s;return String((s=u[c.key])!=null?s:"-")})),l=[e,...n].map(u=>u.join(",")).join(`
|
|
2
2
|
`),a=new Blob([l],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(a),o=document.createElement("a");o.href=r,o.download=`universal-table-${Date.now()}.csv`,o.click(),URL.revokeObjectURL(r)},ve=e=>{var s,m,d,v;const n=e.payload||{};if(n.type!=="filter")return;const l=n.filter||n,a=String(l.direction||l.displacementDirection||"").toLowerCase();(a==="s"||a==="x"||a==="y")&&(te.value=a,ne.value=!0);const r=p=>{const b=String(p!=null?p:"").trim();if(!b)return"";const X=b.match(/-?\d+(?:\.\d+)?/);if(!X)return"";const A=Math.abs(Number(X[0]));return Number.isFinite(A)?String(Number.isInteger(A)?A:Number(A.toFixed(2))):""},o=(v=(d=(m=(s=l.nodeList)!=null?s:l.selectedNodes)!=null?m:l.selectList)!=null?d:l.depth)!=null?v:l.selectedDepth;if(Array.isArray(o)){if(B.value=o.map(p=>String(p)),o.length===1){const p=r(o[0]);p&&(k.value=p)}}else if(o!=null&&o!==""){const p=r(o);p?k.value=p:B.value=[String(o)]}const u=l.timeRange||l.dateRange||null;N.value=u&&(u.startDate||u.endDate)?u:null;const c=String((u==null?void 0:u.granularity)||(l==null?void 0:l.granularity)||"").toLowerCase();(c==="day"||c==="hour")&&(R.value=c),g.value=1},fe=e=>{var n,l,a,r;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((n=e==null?void 0:e.mosaic)==null?void 0:n.data)?e.mosaic.data:Array.isArray((l=e==null?void 0:e.statistics)==null?void 0:l.data)?e.statistics.data:(a=e==null?void 0:e.mosaic)!=null&&a.data&&typeof e.mosaic.data=="object"?[e.mosaic.data]:(r=e==null?void 0:e.statistics)!=null&&r.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(()=>ee.channels[re()],e=>{e&&ve(e)},{deep:!0}),t.watchEffect(()=>{var e;(e=i.conf)!=null&&e.socketData&&E.setSocketData(i.conf.socketData)}),t.watch(()=>{var e;return(e=i.conf)==null?void 0:e.options},()=>{E.getStyle().value=E.extractStyles()},{deep:!0}),t.watch(()=>i.conf,()=>{g.value=1},{deep:!0}),t.watch([D,C],()=>{g.value>Y.value&&(g.value=Y.value),g.value<1&&(g.value=1)}),(e,n)=>{const l=w.ElButton,a=w.ElOption,r=w.ElSelect,o=w.ElRadioButton,u=w.ElRadioGroup,c=w.ElPagination;return t.openBlock(),t.createElementBlock("div",{class:"mix-component universal-table",style:t.normalizeStyle(ue.value)},[t.createElementVNode("div",_e,[t.createElementVNode("div",Se,t.toDisplayString(f.conf.caption||f.conf.name||"通用表组件"),1),t.createElementVNode("div",we,[t.createElementVNode("span",Ee,"rows: "+t.toDisplayString(x.value.length),1),t.createVNode(l,{size:"small",class:"export-btn",onClick:me},{default:t.withCtx(()=>[...n[3]||(n[3]=[t.createTextVNode("导出",-1)])]),_:1})])]),z.value||P.value?(t.openBlock(),t.createElementBlock("div",xe,[z.value?(t.openBlock(),t.createElementBlock("div",Ce,[n[4]||(n[4]=t.createElementVNode("span",{class:"toolbar-label"},"深度",-1)),t.createVNode(r,{modelValue:k.value,"onUpdate:modelValue":n[0]||(n[0]=s=>k.value=s),size:"small",style:{width:"110px"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.value,s=>(t.openBlock(),t.createBlock(a,{key:s,label:`${s}m`,value:s},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),P.value?(t.openBlock(),t.createElementBlock("div",De,[t.createVNode(u,{modelValue:_.value,"onUpdate:modelValue":n[1]||(n[1]=s=>_.value=s),size:"small"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(O.value,s=>(t.openBlock(),t.createBlock(o,{key:String(s.value),label:String(s.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(String(s.label)),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",Be,[t.createElementVNode("table",null,[t.createElementVNode("thead",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ae.value,(s,m)=>(t.openBlock(),t.createElementBlock("tr",{key:`hr-${m}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s,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,Te))),128))]))),128))]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value,(s,m)=>(t.openBlock(),t.createElementBlock("tr",{key:`${s.__rowKey}-${m}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.value,d=>{var v;return t.openBlock(),t.createElementBlock("td",{key:d.key},t.toDisplayString((v=s[d.key])!=null?v:"-"),1)}),128))]))),128)),W.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Ve,[t.createElementVNode("td",{colspan:S.value.length||1,class:"empty"},"暂无数据",8,Ae)]))])])]),t.createElementVNode("div",Fe,[t.createVNode(c,{"current-page":g.value,"onUpdate:currentPage":n[2]||(n[2]=s=>g.value=s),"page-size":C.value,total:D.value.length,layout:"prev, pager, jumper, next",small:""},null,8,["current-page","page-size","total"])]),t.renderSlot(e.$slots,"default",{},void 0,!0)],4)}}})),Pe=Q._export_sfc(ze,[["__scopeId","data-v-6b3133b5"]]);exports.default=Pe;
|
|
@@ -19,9 +19,9 @@ import "element-plus/es/components/select/style/css";
|
|
|
19
19
|
import "element-plus/es/components/option/style/css";
|
|
20
20
|
import "element-plus/es/components/button/style/css";
|
|
21
21
|
import { defineComponent as Le, ref as w, computed as m, watch as E, watchEffect as ze, openBlock as p, createElementBlock as h, normalizeStyle as ie, createElementVNode as _, toDisplayString as R, createVNode as P, withCtx as U, createTextVNode as ue, Fragment as T, renderList as A, createBlock as ce, createCommentVNode as j, renderSlot as Pe } from "vue";
|
|
22
|
-
import { l as Ue, _ as je } from "./index-
|
|
22
|
+
import { l as Ue, _ as je } from "./index-CqVPeq0-.js";
|
|
23
23
|
import "element-plus";
|
|
24
|
-
import { E as Ye } from "./EChartComponentBase-
|
|
24
|
+
import { E as Ye } from "./EChartComponentBase-B-VNAC8K.js";
|
|
25
25
|
import { A as Be, D as We } from "./ele-lst-icon-CKpeRKmk.js";
|
|
26
26
|
const Xe = { class: "table-header" }, Ge = { class: "title" }, Ke = { class: "header-right" }, Ze = { class: "row-count" }, qe = {
|
|
27
27
|
key: 0,
|
|
@@ -27,8 +27,8 @@ var ui = (a, e, t) => new Promise((i, s) => {
|
|
|
27
27
|
o((t = t.apply(a, e)).next());
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as Eo, ref as Pt, computed as mr, onMounted as yo, onBeforeUnmount as xo, openBlock as Ye, createElementBlock as ze, normalizeStyle as So, unref as Wt, createElementVNode as ke, normalizeClass as To, toDisplayString as Ot, createCommentVNode as ht, withDirectives as Ao, withKeys as Lo, vModelText as Io, renderSlot as Ro, nextTick as pr } from "vue";
|
|
30
|
-
import { B as bo } from "./BaseComponent-
|
|
31
|
-
import { k as Do, u as Co, i as Po, j as Oo, a as ko, F as wo, _ as Mo } from "./index-
|
|
30
|
+
import { B as bo } from "./BaseComponent-CEp8NJiX.js";
|
|
31
|
+
import { k as Do, u as Co, i as Po, j as Oo, a as ko, F as wo, _ as Mo } from "./index-CqVPeq0-.js";
|
|
32
32
|
import { ElMessage as Ze } from "element-plus";
|
|
33
33
|
import { A as Fo, D as Bo } from "./ele-vdo-icon-DcWebTR5.js";
|
|
34
34
|
var qi = { exports: {} }, _r;
|