mixdashboards 1.0.39 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EChartComponentBase-BaQpBzVC.cjs → EChartComponentBase-BTqBoBn8.cjs} +1 -1
- package/dist/{EChartComponentBase-BQOhWkz2.js → EChartComponentBase-GBbKjtlb.js} +1 -1
- package/dist/{UniverSheet-KlvmL1Yw.cjs → UniverSheet-B9dCqA-W.cjs} +1 -1
- package/dist/{UniverSheet-MSHzUXq0.js → UniverSheet-DIkltx8i.js} +2 -2
- package/dist/{accelerationChart-B1HPMmd2.js → accelerationChart-B7grHeml.js} +3 -3
- package/dist/{accelerationChart-DZj2V2vD.cjs → accelerationChart-CvNoIyue.cjs} +1 -1
- package/dist/{actionItem-BYCPoQK7.cjs → actionItem-BKNfuprM.cjs} +1 -1
- package/dist/{actionItem-Bb2xiYlY.js → actionItem-BrTSUE0J.js} +3 -3
- package/dist/{alarmLevelChart-CCioESvL.js → alarmLevelChart-CmjyIsWH.js} +2 -2
- package/dist/{alarmLevelChart-Bb0mAbwQ.cjs → alarmLevelChart-DBqGvaXQ.cjs} +1 -1
- package/dist/{alertTable-CQwr8YYt.js → alertTable-C8beWyfK.js} +2 -2
- package/dist/{alertTable-oaX5eJC0.cjs → alertTable-CZ2ufzg9.cjs} +1 -1
- package/dist/{annualRainfallChart-C21jEMBe.js → annualRainfallChart-D3Pck4he.js} +2 -2
- package/dist/{annualRainfallChart-pO8q6aUJ.cjs → annualRainfallChart-D3YQwScd.cjs} +1 -1
- package/dist/{api-P_s372dW.cjs → api-C0okiLNC.cjs} +1 -1
- package/dist/{api-C0GhBpqd.js → api-DhQsrEGY.js} +4 -4
- package/dist/{aqi-DlY2r7OA.cjs → aqi-91QfhWTq.cjs} +1 -1
- package/dist/{aqi-iLwQH4rc.js → aqi-DnrkU6z-.js} +10 -10
- package/dist/{aqiIndass-DBeVSBdy.js → aqiIndass-CzA5PVzc.js} +15 -15
- package/dist/{aqiIndass-BaIVBfdC.cjs → aqiIndass-D2h-731s.cjs} +1 -1
- package/dist/arrayCard-C-V_01r7.cjs +1 -0
- package/dist/arrayCard-mprI5bQN.js +94 -0
- package/dist/{audio-CThzVIDU.cjs → audio-CdVI14ea.cjs} +1 -1
- package/dist/{audio-CAP4D-J2.js → audio-Xj66qRvv.js} +5 -5
- package/dist/{bar-BjR566__.cjs → bar-DQ6kQXTC.cjs} +1 -1
- package/dist/{bar-D8C06GO4.js → bar-ub8ERs66.js} +4 -4
- package/dist/{bmp-Cjizh2x6.js → bmp-bXQBGW16.js} +3 -3
- package/dist/{bmp-DsmTzyce.cjs → bmp-xuWyQ9_n.cjs} +1 -1
- package/dist/{box-qgu_67OD.cjs → box-C9s5aZjl.cjs} +1 -1
- package/dist/{box-DqewT3MF.js → box-Dx6V-j_J.js} +2 -2
- package/dist/{chartConfigPanel-DwAUq3pf.js → chartConfigPanel-Bd47rczI.js} +1 -1
- package/dist/{chartConfigPanel-BiQArCoQ.cjs → chartConfigPanel-CLbbeZzN.cjs} +1 -1
- package/dist/{circleBar-CO89T7kj.cjs → circleBar-BsmKIein.cjs} +1 -1
- package/dist/{circleBar-DGHDWQih.js → circleBar-D8I2e0Ov.js} +8 -8
- package/dist/{clock-CT8YXEU3.js → clock-7kw9zMJ0.js} +2 -2
- package/dist/{clock-32hGccm4.cjs → clock-bnKjuzzp.cjs} +1 -1
- package/dist/{clt-5bP_g1O-.cjs → clt-7F8jS0WQ.cjs} +1 -1
- package/dist/{clt-FfIEfGtn.js → clt-BGGFfbQ5.js} +3 -3
- package/dist/{cmc-dbuLkE8o.cjs → cmc-B2ja2VKe.cjs} +1 -1
- package/dist/{cmc-B2nQFZIS.js → cmc-DTiGNWEl.js} +3 -3
- package/dist/{cmp-QQlYcnqo.js → cmp-BXx9BxO1.js} +12 -12
- package/dist/{cmp-l3U9fIrz.cjs → cmp-D9MzneF0.cjs} +1 -1
- package/dist/{composite-DjhrBgG1.js → composite-C6PQB2RS.js} +8 -8
- package/dist/{composite-DlY2_x6P.cjs → composite-Dh9pPcWq.cjs} +1 -1
- package/dist/config-D3MEjLGn.js +9 -0
- package/dist/config-UTUPYJ45.cjs +1 -0
- package/dist/{controlList-BdF8xNAi.js → controlList-VioXoP_4.js} +3 -3
- package/dist/{controlList-De6PXdOc.cjs → controlList-uLJtFu1P.cjs} +1 -1
- package/dist/{controlRecordList-CKpAr1ON.js → controlRecordList-DY7qKQp1.js} +3 -3
- package/dist/{controlRecordList-u5a7chIX.cjs → controlRecordList-GtFLhcc9.cjs} +1 -1
- package/dist/{crd-BVAf41oX.js → crd-Bf8Rmcf5.js} +2 -2
- package/dist/{crd-BoaXQhFQ.cjs → crd-DdsOuCBh.cjs} +1 -1
- package/dist/{ctrBtn-ZPRYWE66.js → ctrBtn-BSzyUEkN.js} +4 -4
- package/dist/{ctrBtn-C9kQiqY1.cjs → ctrBtn-GKFfJlE2.cjs} +1 -1
- package/dist/{ctrSet-C87dxLfQ.js → ctrSet--1TrVZDc.js} +4 -4
- package/dist/{ctrSet-CNCrnLSs.cjs → ctrSet-CDr5scQE.cjs} +1 -1
- package/dist/{ctrSwitch-CkC_Axtp.js → ctrSwitch-ezGEAkLG.js} +4 -4
- package/dist/{ctrSwitch-CVEtbdfb.cjs → ctrSwitch-kHoyJDax.cjs} +1 -1
- package/dist/{dataManagement-n711sd1g.cjs → dataManagement-DxTZAlJy.cjs} +1 -1
- package/dist/{dataManagement-CjlNfeYq.js → dataManagement-oWoI1QPO.js} +2 -2
- package/dist/{dataReport-ByjswEqq.js → dataReport-BATqcXj4.js} +2 -2
- package/dist/{dataReport-BsVjW3p7.cjs → dataReport-Dygq1jQV.cjs} +1 -1
- package/dist/{dataTable-K7j4fhnq.cjs → dataTable-CotUzlhz.cjs} +1 -1
- package/dist/{dataTable-DX500R1i.js → dataTable-DIKwnInT.js} +1 -1
- package/dist/{datetime-DVbJtALf.js → datetime-CK042aN0.js} +2 -2
- package/dist/{datetime-DYXWKrXI.cjs → datetime-DLASaAKw.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-CQUE05cK.js → deepClusterSlipSurface-C52_bDho.js} +6 -6
- package/dist/{deepClusterSlipSurface-B7nkEM9A.cjs → deepClusterSlipSurface-D8v4xJGF.cjs} +1 -1
- package/dist/{deepDataMatrix-DHZA0IAm.cjs → deepDataMatrix-C-NrtGtk.cjs} +1 -1
- package/dist/{deepDataMatrix-ai5rB6ET.js → deepDataMatrix-CdB1ZO5Q.js} +2 -2
- package/dist/{deepDisplacement3D-BsUzvbQb.js → deepDisplacement3D-C3Salw1w.js} +3 -3
- package/dist/{deepDisplacement3D-BFqKqSYg.cjs → deepDisplacement3D-CzM-wm4q.cjs} +1 -1
- package/dist/{deepDisplacementChart-Ba67v6um.cjs → deepDisplacementChart-BqZ4nUgg.cjs} +1 -1
- package/dist/{deepDisplacementChart-2JZNrhrw.cjs → deepDisplacementChart-ByIJTYX6.cjs} +1 -1
- package/dist/{deepDisplacementChart-igl4rW1K.js → deepDisplacementChart-GcH8IGA4.js} +2 -2
- package/dist/{deepDisplacementChart-BCIuCMdK.js → deepDisplacementChart-ndHgH60B.js} +4 -4
- package/dist/{deepDisplacementView-BedWJsx7.js → deepDisplacementView-Bo_pmf0R.js} +1 -1
- package/dist/{deepDisplacementView-wQxyKzB-.cjs → deepDisplacementView-Bq_G0GlS.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-DLeb9jKp.js → deepNodeTemperatureChart-CXgft_WM.js} +6 -6
- package/dist/{deepNodeTemperatureChart-albL8hKa.cjs → deepNodeTemperatureChart-Dsl1Zm8T.cjs} +1 -1
- package/dist/{deepTangentAngleChart-C6xOiITk.js → deepTangentAngleChart-D-WoGKz7.js} +7 -7
- package/dist/{deepTangentAngleChart-DukevXaM.cjs → deepTangentAngleChart-iLt3bK8f.cjs} +1 -1
- package/dist/{deepTemperatureField-B-y94GPV.js → deepTemperatureField-BFB8bQde.js} +7 -7
- package/dist/{deepTemperatureField-De4xKoHw.cjs → deepTemperatureField-DnpuZuD8.cjs} +1 -1
- package/dist/{deepTrendChart-MmuYSXtu.cjs → deepTrendChart-BghE13XG.cjs} +1 -1
- package/dist/{deepTrendChart-DCkV2HNv.js → deepTrendChart-E-mAzsST.js} +6 -6
- package/dist/{deviceOnlineStatus-CFuCTx7_.js → deviceOnlineStatus-CkZijkjC.js} +2 -2
- package/dist/{deviceOnlineStatus-B5cCjhNA.cjs → deviceOnlineStatus-TQ-Fv8ye.cjs} +1 -1
- package/dist/{deviceStatus-DsEtKiGo.cjs → deviceStatus-BkKc9wqU.cjs} +1 -1
- package/dist/{deviceStatus-B2ibBDSi.js → deviceStatus-BvJr98D0.js} +2 -2
- package/dist/{displacementDataTable-BDqG1IvI.js → displacementDataTable-BJ5S7te1.js} +2 -2
- package/dist/{displacementDataTable-oLnUdafv.cjs → displacementDataTable-DJUK3mBu.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-CBhPwZhe.cjs → displacementTrajectoryChart-C2estBCm.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-Crf55oKi.js → displacementTrajectoryChart-DGS9Mn7o.js} +3 -3
- package/dist/{displacementTrendChart-CWihCuIJ.cjs → displacementTrendChart-CgsIcHCK.cjs} +1 -1
- package/dist/{displacementTrendChart-10n_lC9j.js → displacementTrendChart-Ddgpsnta.js} +2 -2
- package/dist/{dxf-D8zHpz5g.js → dxf-B0EL1hyB.js} +5 -5
- package/dist/{dxf-DDh_DcQy.cjs → dxf-DbxtgQWv.cjs} +1 -1
- package/dist/{dzc-DLCdTCwW.js → dzc-ACr2bZGl.js} +10 -10
- package/dist/{dzc-uNTDJqpi.cjs → dzc-Bdm2nr1F.cjs} +1 -1
- package/dist/{arrayCard-DNNUEPvW.js → ele-arrayCard-icon-CAk9ojr4.js} +3 -91
- package/dist/ele-arrayCard-icon-QOabvV0y.cjs +1 -0
- package/dist/{element-resize-detector-Bo5uDQAu.cjs → element-resize-detector-BlMXyWIR.cjs} +1 -1
- package/dist/{element-resize-detector-DJcsrJ8s.js → element-resize-detector-DeMhGbNi.js} +4 -4
- package/dist/{evn-YwCALVXj.js → evn-D0llPvjK.js} +2 -2
- package/dist/{evn-DuL5oVRl.cjs → evn-Moewbl2h.cjs} +1 -1
- package/dist/{evolutionChart-4noZSdLX.js → evolutionChart-Cz_GOcB8.js} +3 -3
- package/dist/{evolutionChart-AeL67MAt.cjs → evolutionChart-DBwL00ZJ.cjs} +1 -1
- package/dist/{fileViewer-bsrjlJkC.cjs → fileViewer-BtjOAdM9.cjs} +1 -1
- package/dist/{fileViewer-DiH3PM0r.js → fileViewer-D-WNR3vF.js} +5 -5
- package/dist/{filterBar-Ct1BFhrS.cjs → filterBar-4Q9XSiAY.cjs} +1 -1
- package/dist/{filterBar-CWEguwYc.js → filterBar-DLYmU350.js} +2 -2
- package/dist/{fireCombustionCurve-DYPC4zKJ.js → fireCombustionCurve-BU3pplHd.js} +2 -2
- package/dist/{fireCombustionCurve-DyiQn-WA.cjs → fireCombustionCurve-CWggQsw1.cjs} +1 -1
- package/dist/{fireFilterBar-Bdm2ljuO.cjs → fireFilterBar-EKwzMAFp.cjs} +1 -1
- package/dist/{fireFilterBar-DGHPNTwF.js → fireFilterBar-ROtoXZex.js} +2 -2
- package/dist/{gag-HiNaL81R.cjs → gag-CvMEVCbE.cjs} +1 -1
- package/dist/{gag-kvkKzJuO.js → gag-D8mNPZnH.js} +5 -5
- package/dist/gasStationList-CWg8IYCo.cjs +1 -0
- package/dist/gasStationList-qVKS-fgC.js +984 -0
- package/dist/{glbModel-DtBI72ap.cjs → glbModel-CQBEujd2.cjs} +1 -1
- package/dist/{glbModel-CUz6CyVF.js → glbModel-U_yKQZWm.js} +2 -2
- package/dist/{gnssFilterBar-TBtirXIB.js → gnssFilterBar-o7zpW7jS.js} +2 -2
- package/dist/{gnssFilterBar-BQgY5x1W.cjs → gnssFilterBar-pvMsIjFy.cjs} +1 -1
- package/dist/{gnssHistoryTable-U8O7nyO7.js → gnssHistoryTable-BYg9jtl5.js} +3 -3
- package/dist/{gnssHistoryTable-D1ZLJOgh.cjs → gnssHistoryTable-Ddcw3-NB.cjs} +1 -1
- package/dist/{gnssMapView-42zmAd9q.cjs → gnssMapView--c2UXuOb.cjs} +1 -1
- package/dist/{gnssMapView-CaBfWeT1.js → gnssMapView-DMcq2u2c.js} +2 -2
- package/dist/{gnssTimeSeriesChart-CV2w_Aik.cjs → gnssTimeSeriesChart-984dcBPA.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-BrXYvuh6.js → gnssTimeSeriesChart-BtUSps0z.js} +4 -4
- package/dist/{gnssXYTrajectory-BmzSYjQ_.cjs → gnssXYTrajectory-D9JmAqC0.cjs} +1 -1
- package/dist/{gnssXYTrajectory-D2DoYnze.js → gnssXYTrajectory-DvIpI-GX.js} +3 -3
- package/dist/{grd-DW8cSFVR.cjs → grd-Cb8vd52d.cjs} +1 -1
- package/dist/{grd-B0GUjLm9.js → grd-DcxFaMyv.js} +3 -3
- package/dist/{grdIndass-DduUKZJm.js → grdIndass-BPLTUWIc.js} +3 -3
- package/dist/{grdIndass-BeBXVsos.cjs → grdIndass-FkNJ9pl6.cjs} +1 -1
- package/dist/{grg-CeX0pirQ.js → grg-Baot_Pdv.js} +6 -6
- package/dist/{grg-fnpcXtju.cjs → grg-CoDiLjcl.cjs} +1 -1
- package/dist/{gridview-DpABhCIw.cjs → gridview-BwDeg0tI.cjs} +1 -1
- package/dist/{gridview-BPwWXza9.js → gridview-DN8V84hl.js} +2 -2
- package/dist/{groupCard-De1E15mW.js → groupCard-D5wLscZo.js} +2 -2
- package/dist/{groupCard-WNE6gAAl.cjs → groupCard-DChtdioU.cjs} +1 -1
- package/dist/{headerBar-CZ3qcLHo.js → headerBar-DLvSZsMl.js} +3 -3
- package/dist/{headerBar-Qi1EXrr6.cjs → headerBar-m57S9WlE.cjs} +1 -1
- package/dist/{history-DAmBl4_5.cjs → history-C4gipwnp.cjs} +1 -1
- package/dist/{history-BkZhlpdY.js → history-DN0IVkYL.js} +3 -3
- package/dist/index-EnNA0nIi.cjs +582 -0
- package/dist/{index-kShjySl9.js → index-zPaMBZk-.js} +1047 -1065
- package/dist/{insarDeformChart-CnuSL1d9.js → insarDeformChart-DZl03mOe.js} +2 -2
- package/dist/{insarDeformChart-BGr2xe7w.cjs → insarDeformChart-DkiLrhem.cjs} +1 -1
- package/dist/{insarImageViewer-DRgGdQmN.cjs → insarImageViewer-ZcqHEEZr.cjs} +1 -1
- package/dist/{insarImageViewer-EmVThmVQ.js → insarImageViewer-kqYV5A1S.js} +2 -2
- package/dist/{kds-DTYWOq4K.cjs → kds-Ba0yzyNm.cjs} +1 -1
- package/dist/{kds-CpIQFgeY.js → kds-BbyaSB3L.js} +10 -10
- package/dist/{layerTabs-BATcBkTA.cjs → layerTabs-D2M3EVxt.cjs} +1 -1
- package/dist/{layerTabs-uze6K91A.js → layerTabs-SRHmamTF.js} +2 -2
- package/dist/{lin-Ba6fHkYf.cjs → lin-0U8FQZHZ.cjs} +1 -1
- package/dist/{lin-DU_EuPRg.js → lin-DxnORLL5.js} +8 -8
- package/dist/{linIndass-urYe5inp.cjs → linIndass-CX9Z02-e.cjs} +1 -1
- package/dist/{linIndass-XHKElG7L.js → linIndass-DXtxVxcr.js} +7 -7
- package/dist/{lst-C7aee1cU.js → lst-BKALUOuy.js} +2 -2
- package/dist/{lst-CpmoEQDY.cjs → lst-Bk2nvLuQ.cjs} +1 -1
- package/dist/{manualEntry-D9m_WPw3.js → manualEntry-DHH0Yrr3.js} +2 -2
- package/dist/{manualEntry-CJPiO5nh.cjs → manualEntry-DRK0QRnb.cjs} +1 -1
- package/dist/{mapBackground-6g_71Fwa.js → mapBackground-BXj8T-bG.js} +2 -2
- package/dist/{mapBackground-CF_TqNBy.cjs → mapBackground-DTuXORjO.cjs} +1 -1
- package/dist/{mappingList-CR55Tq4t.cjs → mappingList-M9OukdCu.cjs} +1 -1
- package/dist/{mappingList-luT5YE0d.js → mappingList-N-lL8mnV.js} +3 -3
- package/dist/{markdownViewer-D1hDk2Y7.cjs → markdownViewer-CcLL2hzV.cjs} +1 -1
- package/dist/{markdownViewer-CnguoUr8.js → markdownViewer-CgabPFUn.js} +5 -5
- package/dist/{mix-control-modal-CHiX3hQs.js → mix-control-modal-DRL4otx8.js} +3 -3
- package/dist/{mix-control-modal-BDHAB4Tw.cjs → mix-control-modal-Lhzopftt.cjs} +1 -1
- package/dist/{mixDataPermission-BaqV0Z6N.js → mixDataPermission-B5fpqFgm.js} +4 -3
- package/dist/{mixDataPermission-BTA1jNd1.cjs → mixDataPermission-CWt9H_Ib.cjs} +1 -1
- package/dist/{mixGrid-3BqQCvg8.cjs → mixGrid-DTwH6At3.cjs} +1 -1
- package/dist/{mixGrid-C0eEvwPy.js → mixGrid-wE427LB0.js} +3 -3
- package/dist/{mixMap-7upgYwWk.js → mixMap-Bo7_Womf.js} +3 -3
- package/dist/{mixMap-Bw-We4Cm.cjs → mixMap-DKDtSARk.cjs} +1 -1
- package/dist/{mixModel-BqE_Kd4c.js → mixModel-CdMcRi5k.js} +10 -10
- package/dist/{mixModel-CgV4XptM.cjs → mixModel-Dufgy8XG.cjs} +1 -1
- package/dist/{mixPie-9LfMCTQV.cjs → mixPie-BoUARcVT.cjs} +1 -1
- package/dist/{mixPie-B-HeglUn.js → mixPie-Dr9Toi5T.js} +7 -7
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +1 -1
- package/dist/{mjpegCamera-Cfw3rzT5.js → mjpegCamera-BBqBIpmz.js} +2 -2
- package/dist/{mjpegCamera-nxKfhobY.cjs → mjpegCamera-C20yRxub.cjs} +1 -1
- package/dist/{monitorAlert-Bt0baNh4.cjs → monitorAlert-BgRCm9Vs.cjs} +1 -1
- package/dist/{monitorAlert-Bg5vzzyG.js → monitorAlert-DVfJ6uNR.js} +2 -2
- package/dist/{monitorData-CzPVIk_4.cjs → monitorData-Dz_cHcBR.cjs} +1 -1
- package/dist/{monitorData-BvAMeOrp.js → monitorData-zfcYQmc8.js} +3 -3
- package/dist/{monitorSpeedChart-0bDuU3Kj.js → monitorSpeedChart-DYV_S1um.js} +1 -1
- package/dist/{monitorSpeedChart-C52QjA5K.cjs → monitorSpeedChart-jAf_Agnm.cjs} +1 -1
- package/dist/{mxa-eLAgZPMC.cjs → mxa-DGkX2ysU.cjs} +1 -1
- package/dist/{mxa-BW80xKCc.js → mxa-mziDHRQU.js} +7 -7
- package/dist/myValue-6J41vLFg.cjs +1 -0
- package/dist/myValue-s0IC6eg0.js +149 -0
- package/dist/myValueList-Dl-JfGq6.cjs +1 -0
- package/dist/myValueList-cOT1nYnO.js +451 -0
- package/dist/{objectList-Cf9GMyXN.js → objectList-DGBiB_w6.js} +100 -95
- package/dist/objectList-DK5_HGK_.cjs +1 -0
- package/dist/photo-CBfgcj6v.cjs +1 -0
- package/dist/photo-C_1tDAZa.js +342 -0
- package/dist/{pie-DxoBrm0D.cjs → pie-DAEzlPEp.cjs} +1 -1
- package/dist/{pie-BDLg-Rls.js → pie-p9CvjJ_m.js} +7 -7
- package/dist/{pressBtn-t0g4vk7s.cjs → pressBtn-DMMLEAFZ.cjs} +1 -1
- package/dist/{pressBtn-CXG1eSWC.js → pressBtn-DlhDUUdy.js} +4 -4
- package/dist/{progressBar-BXaFKSCq.js → progressBar-C3K0DYlI.js} +2 -2
- package/dist/{progressBar-CJEWkZ42.cjs → progressBar-ZksfXpzu.cjs} +1 -1
- package/dist/{progressCircle-DpOI5D5z.js → progressCircle-BBLr8loP.js} +2 -2
- package/dist/{progressCircle-uQ7vaMKM.cjs → progressCircle-eFwDltuC.cjs} +1 -1
- package/dist/{qrcode-CX8aymYZ.js → qrcode-DgwPQO8V.js} +297 -298
- package/dist/qrcode-F7MtRi3K.cjs +1 -0
- package/dist/{raceBar-Cv0-0ogd.cjs → raceBar-Cp-9uqpX.cjs} +1 -1
- package/dist/{raceBar-DFaH342G.js → raceBar-CyW79eH-.js} +7 -7
- package/dist/{rad-CFswUTwi.cjs → rad-CLvi3eWj.cjs} +1 -1
- package/dist/{rad-NS2G_nMg.js → rad-CbFS-xjy.js} +7 -7
- package/dist/{rainfallFilterBar-D_Ye_NeB.js → rainfallFilterBar-B0G4jUib.js} +2 -2
- package/dist/{rainfallFilterBar-BI45QvJm.cjs → rainfallFilterBar-DldKT-I5.cjs} +1 -1
- package/dist/{rainfallTimeCurve-BHWqX47Q.js → rainfallTimeCurve-BlyxLbcV.js} +3 -3
- package/dist/{rainfallTimeCurve-Ke1JvSWq.cjs → rainfallTimeCurve-C5r3fOW8.cjs} +1 -1
- package/dist/{rangeLin-D6VZ2U3C.cjs → rangeLin-B2vKFJHK.cjs} +1 -1
- package/dist/{rangeLin-GMYEgLeP.js → rangeLin-CLAcLUai.js} +7 -7
- package/dist/{request-Bn100qAJ.cjs → request-4n94CBXg.cjs} +1 -1
- package/dist/{request-BD0x5Hkt.js → request-DT13bnc0.js} +1 -1
- package/dist/{retainer1-h-Whr2c9.js → retainer1-Dy2VHVgc.js} +3 -3
- package/dist/{retainer1-D2XmjXYH.cjs → retainer1-EFUFSxMm.cjs} +1 -1
- package/dist/{retainer2-ByQdiRjq.js → retainer2-3ITxlgwH.js} +3 -3
- package/dist/{retainer2-cF-trL2g.cjs → retainer2-BKVJLvBo.cjs} +1 -1
- package/dist/{riskRegionTable-CQxAkG7k.js → riskRegionTable-BQ88G7F7.js} +2 -2
- package/dist/{riskRegionTable-cKnxra4_.cjs → riskRegionTable-C2GOEi0n.cjs} +1 -1
- package/dist/{sankey-Bk1IcVJQ.js → sankey-ehJmtfKp.js} +9 -9
- package/dist/{sankey-MRirEgU0.cjs → sankey-utV5RADH.cjs} +1 -1
- package/dist/{scd-BDRpzmsa.js → scd-D-Y1EEoF.js} +2 -2
- package/dist/{scd-J-mN3eI5.cjs → scd-Nx15OHeb.cjs} +1 -1
- package/dist/{sideMenu-l8X2E00H.cjs → sideMenu-Ci3pDMFm.cjs} +1 -1
- package/dist/{sideMenu-BgTMtnMq.js → sideMenu-D6MgOAkf.js} +2 -2
- package/dist/{slopeStability-BPf7m0fJ.cjs → slopeStability-B9WvyL3-.cjs} +1 -1
- package/dist/{slopeStability-C5RqZ1im.js → slopeStability-Bu2a83d7.js} +3 -3
- package/dist/{speedCurve-C3pK-zZy.js → speedCurve-BR_xyp4X.js} +3 -3
- package/dist/{speedCurve-CluwNAZl.cjs → speedCurve-DrndMOKB.cjs} +1 -1
- package/dist/{staticLine-C6tGGXcN.cjs → staticLine-BLUdDtae.cjs} +1 -1
- package/dist/{staticLine-DXWOLj15.js → staticLine-DYQUjE_3.js} +7 -7
- package/dist/{store-DzDtVfSX.js → store-BpVoYd93.js} +2 -2
- package/dist/{store-BJW2NQkK.cjs → store-KXsdwyLp.cjs} +1 -1
- package/dist/{swiper-DGqDoUkX.cjs → swiper-53BGkj5I.cjs} +1 -1
- package/dist/{swiper-IMlGje3t.js → swiper-S8NYmcYS.js} +3 -3
- package/dist/{terminalConfigList-D6xDHsnb.cjs → terminalConfigList-DFDsxg1q.cjs} +1 -1
- package/dist/{terminalConfigList-SAyXi-BK.js → terminalConfigList-DaEpZiog.js} +3 -3
- package/dist/{terminalList-ml2C18MY.cjs → terminalList-BgNFp3E0.cjs} +1 -1
- package/dist/{terminalList-CjSHshiR.js → terminalList-mKVmYqJm.js} +3 -3
- package/dist/{textbox-BLV-SY8e.js → textbox-Bazh9LRC.js} +4 -4
- package/dist/{textbox-AQtCe25j.cjs → textbox-DAyhC67s.cjs} +1 -1
- package/dist/{timeQueryBar-BuKakMy8.cjs → timeQueryBar-2cbPr7zw.cjs} +1 -1
- package/dist/{timeQueryBar-BeMu_DYr.js → timeQueryBar-BnVnJk5K.js} +1 -1
- package/dist/{timeSeries-DP5iZKVM.js → timeSeries-BF-2qAA7.js} +4 -4
- package/dist/{timeSeries-DfGgFWiF.cjs → timeSeries-DEeo2zjY.cjs} +1 -1
- package/dist/{timeSeriesCurve-B0Mw6eNK.cjs → timeSeriesCurve-BMhNq3WC.cjs} +1 -1
- package/dist/{timeSeriesCurve-BSgtPqYw.js → timeSeriesCurve-CkCeP5mK.js} +3 -3
- package/dist/{toggleBtn-O2Y75Uen.js → toggleBtn-BnIia9MT.js} +7 -7
- package/dist/{toggleBtn-Dh64vVWo.cjs → toggleBtn-hg6nIH97.cjs} +1 -1
- package/dist/{trajectoryConfigPanel--C1h3tK6.js → trajectoryConfigPanel-CfnLHqWP.js} +1 -1
- package/dist/{trajectoryConfigPanel-P_Qa4omj.cjs → trajectoryConfigPanel-agVnGJJ6.cjs} +1 -1
- package/dist/{trajectoryScatter-VLrmImlq.js → trajectoryScatter-BBL5uJSS.js} +6 -6
- package/dist/{trajectoryScatter-BbpbgNb8.cjs → trajectoryScatter-BzFxJkJn.cjs} +1 -1
- package/dist/{universalConfigPanel-DBg76b4F.js → universalConfigPanel-BueS1CeL.js} +1 -1
- package/dist/{universalConfigPanel-C0lDSzOB.cjs → universalConfigPanel-Db87fd8H.cjs} +1 -1
- package/dist/{universalTable-DGK02ywi.js → universalTable-5QpYwmyj.js} +2 -2
- package/dist/{universalTable-Bzq9VqzA.cjs → universalTable-BXfm_1je.cjs} +1 -1
- package/dist/{video-DCzzaEmV.js → video-C75mXLnF.js} +5 -5
- package/dist/{video-CyRoSQf1.cjs → video-QWpkqafn.cjs} +1 -1
- package/dist/{videoMonitor-ByaQeIWR.js → videoMonitor-DSOQbTy9.js} +2 -2
- package/dist/{videoMonitor-BjD-ZFS0.cjs → videoMonitor-Dlvtlmf3.cjs} +1 -1
- package/dist/{vlu-h-9twmCr.js → vlu-BRrxfbLm.js} +2 -2
- package/dist/{vlu-CYZjYHaV.cjs → vlu-DqqX7UrQ.cjs} +1 -1
- package/dist/{weather-C_aC0XJ1.js → weather-B4twNcEf.js} +3 -3
- package/dist/{weather-B7B5E1EJ.cjs → weather-GNGvUFJc.cjs} +1 -1
- package/dist/{windLin-DPNzX7JN.cjs → windLin-DPr5J4_t.cjs} +1 -1
- package/dist/{windLin-B7V4NUV8.js → windLin-DSh910GU.js} +9 -9
- package/package.json +10 -9
- package/dist/arrayCard-OlVAAsZq.cjs +0 -1
- package/dist/config-BLSroAzs.cjs +0 -1
- package/dist/config-Cc2W4vke.js +0 -9
- package/dist/index-Mh5Dw2sd.cjs +0 -585
- package/dist/objectList-CpqQxG8L.cjs +0 -1
- package/dist/photo-BODEtaYh.cjs +0 -1
- package/dist/photo-BfLkWAo8.js +0 -256
- package/dist/qrcode-DHCRfp0M.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ie=Object.defineProperty,ue=Object.defineProperties;var de=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var me=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var Y=(v,i,a)=>i in v?ie(v,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):v[i]=a,j=(v,i)=>{for(var a in i||(i={}))me.call(i,a)&&Y(v,a,i[a]);if(Z)for(var a of Z(i))pe.call(i,a)&&Y(v,a,i[a]);return v},V=(v,i)=>ue(v,de(i));var G=(v,i,a)=>new Promise((d,g)=>{var N=y=>{try{C(a.next(y))}catch(x){g(x)}},u=y=>{try{C(a.throw(y))}catch(x){g(x)}},C=y=>y.done?d(y.value):Promise.resolve(y.value).then(N,u);C((a=a.apply(v,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),he=require("./vue-i18n-BvHMBi_b.cjs"),ve=require("@element-plus/icons-vue"),D=require("./index-Mh5Dw2sd.cjs"),fe=require("./EChartComponentBase-BaQpBzVC.cjs"),J=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),ge={class:"chart-header"},ye={class:"chart-title"},be={class:"chart-actions"},Ce=["onClick"],_e={class:"item-label"},we=["id"],Se={DEFAULT_ICON:J.DEFAULT_ICON,ACTIVE_ICON:J.ACTIVE_ICON,NAME_CN:"指标时序演变曲线",NAME_EN:"TimeSeriesCurve",ORDER:1},De={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:2.5,type:"number",label:"component.options.lineWidth"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},xe=[{name:"宽度累计变化量",fv:"",object_id:"",device:"",color:"#5470c6"},{name:"宽度日变化量",fv:"",object_id:"",device:"",color:"#91cc75"},{name:"x方向加速度",fv:"",object_id:"",device:"",color:"#fac858"},{name:"y方向加速度",fv:"",object_id:"",device:"",color:"#ee6666"},{name:"z方向加速度",fv:"",object_id:"",device:"",color:"#73c0de"},{name:"x方向倾角",fv:"",object_id:"",device:"",color:"#3ba272"},{name:"y方向倾角",fv:"",object_id:"",device:"",color:"#fc8452"},{name:"z方向倾角",fv:"",object_id:"",device:"",color:"#9a60b4"}],ke=["name","fv","object_id","device","color"],Ee=["mosaic","statistics","calculate"],Me={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Oe=50,Ne={DEFAULT:Se,OPTIONS:De,DATA:xe,PARAMS:ke,SOURCE:Ee,ITEMS:Oe,COMMON:Me},Ie=e.defineComponent(V(j({},Ne),{__name:"timeSeriesCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(v){var z,W;const{t:i}=he.useI18n(),a=v,d=e.ref([]),g=e.computed(()=>a.conf.data||[]);class N extends fe.EChartComponentBase{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.realTimeData=new Map,this.deviceNameMap=new Map,this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(t){this.currentObjectId=t}extractStyles(){return V(j({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",2.5),linkChannel:this.getOptionValue("linkChannel","crack")})}onPreview(){var r;const{common:t,data:o}=this.props.conf,m=this.getSource();if(t.multiObject&&Array.isArray(o)){const l=new Set;o.forEach(n=>{const c=this.resolveObjectId(n);!c||l.has(c)||(l.add(c),this.subscribeBySource(m,c,n.uid))})}else{const l=this.resolveObjectId(),n=(r=o==null?void 0:o[0])==null?void 0:r.uid;l&&(this.currentObjectId=l,this.subscribeBySource(m,l,n))}}onLinkEvent(t){x(t)}getChartOption(){const{data:t}=this.props.conf,o=this.Style.value,m=d.value.length===0?[]:t.filter(n=>d.value.includes(n.name));let r=[];if(this.props.mode==="edit")r=this.generateTimeLabels();else for(const[,n]of this.realTimeData)n.times.length>r.length&&(r=n.times);const l=m.filter(n=>n.fv||this.props.mode==="edit").map((n,c)=>{const p=n.device&&this.deviceNameMap.get(n.device)||"",f=p?`${p}-${n.name}`:n.name,h=n.color||this.deviceColors[c%this.deviceColors.length];let b;if(this.props.mode!=="edit"){const w=this.realTimeData.get(n.name);b=w?w.values:[]}else b=this.generateSeriesData(n,r);return{name:f,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:h,type:"solid",width:o.lineWidth},itemStyle:{color:h},data:b}});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:o.showLegend,type:"scroll",top:10,textStyle:{color:o.textColor}},grid:{top:60,left:60,right:40,bottom:o.showDataZoom?80:40},xAxis:{type:"category",data:r,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:o.textColor}},yAxis:{type:"value",name:"值",nameTextStyle:{color:o.textColor},axisLabel:{color:o.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:o.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:l}}generateTimeLabels(){const t=[];for(let o=24;o>=0;o--){const m=D.dayjs().subtract(o,"hour");t.push(m.format("MM-DD HH:mm"))}return t}generateSeriesData(t,o){const m=t.name,r=this.realTimeData.get(m);if(r&&r.times.length>0){const l=new Map;return r.times.forEach((n,c)=>l.set(n,r.values[c])),o.map(n=>{var c;return(c=l.get(n))!=null?c:null})}if(this.props.mode==="edit"){const l=Math.random()*10+5;return Array.from({length:o.length},(n,c)=>{const p=Math.sin(c*.5)*.3;return parseFloat((l*(.8+p)).toFixed(2))})}return new Array(o.length).fill(null)}setSocketData(t){if(!t)return;const{data:o}=this.props.conf;if(!o||!Array.isArray(o))return;const m=t.datetime?t.datetime.split(".")[0]:D.dayjs().format("MM-DD HH:mm:ss"),r=D.dayjs(m).format("MM-DD HH:mm:ss");o.forEach(n=>{if(!n.fv)return;if(n.device){const p=this.extractDataValue(t,n.device);p!=null&&this.deviceNameMap.set(n.device,String(p))}const c=this.extractDataValue(t,n.fv);if(c!=null){const p=parseFloat(c);if(!isNaN(p)){const f=n.name;let h=this.realTimeData.get(f);h||(h={times:[],values:[]},this.realTimeData.set(f,h)),h.times.push(r),h.values.push(p),h.times.length>200&&(h.times.shift(),h.values.shift()),n.value=p}}});const l=this.getChartInstance();l&&l.setOption(this.getChartOption())}}const u=new N(a,"timeSeriesCurve");u.setupLifecycle();const C=u.getStyle(),y=u.getEchartId(),x=s=>{console.log("[指标时序演变曲线] 收到联动事件:",s);const{payload:t}=s;if(!t)return;const o=t.objectId||t.object_id;o&&K(o)},K=s=>G(null,null,function*(){var p;if(!s||a.mode!=="preview"||u.getCurrentObjectId()===s)return;u.setCurrentObjectId(s),u.realTimeData.clear(),u.deviceNameMap.clear();const o=(p=u.session)==null?void 0:p.value;if(!o)return;const m=a.conf.id;o.componentRequests&&o.componentRequests.delete(m);const{data:r,common:l}=a.conf;Array.isArray(r)&&r.forEach(f=>{f.object_id=s}),l.multiObject||(l.object_id=s);try{const f=yield Promise.resolve().then(()=>require("./history-DAmBl4_5.cjs")),b=yield new f.default().getHistoryData(a,"timeSeriesCurve");b&&Array.isArray(b)&&r.forEach((w,le)=>{if(!w.fv)return;const M=b[le],$=(M==null?void 0:M.data)||M;if(!Array.isArray($))return;const ce=[...$].sort((S,k)=>new Date(S.time||S.datetime||"").getTime()-new Date(k.time||k.datetime||"").getTime()),I=[],F=[];ce.forEach(S=>{const k=S.time||S.datetime,P=S[w.fv];if(k&&P!=null){const U=parseFloat(P);isNaN(U)||(I.push(D.dayjs(k).format("MM-DD HH:mm:ss")),F.push(U))}}),I.length>0&&u.realTimeData.set(w.name,{times:I,values:F})}),console.log("[指标时序演变曲线] 历史数据加载完成")}catch(f){console.warn("[指标时序演变曲线] 历史数据获取失败:",f)}const n=u.getChartInstance();n&&n.setOption(u.getChartOption(),!0),o.registerComponent({id:m,request:null,onUpdate:(f,h)=>{f==="realtime"&&u.setSocketData(h)}});const c=u.getSource();u.subscribeBySource(c,s)}),Q=e.computed(()=>({background:C.value.bgColor,color:C.value.textColor})),X=e.computed(()=>i("component.crack.timeSeriesCurve")),ee=e.computed(()=>i("component.crack.exportImage")),te=e.computed(()=>i("component.crack.selectIndicators"));a.mode==="edit"&&g.value.length>0&&(d.value=[(z=g.value[0])==null?void 0:z.name,(W=g.value[1])==null?void 0:W.name].filter(Boolean));const _=e.ref(!1),E=e.ref(null),A=e.ref(null),T=e.ref({}),oe=e.computed(()=>d.value.length===0?"":d.value.length===g.value.length?"全部":d.value.join("、")),L=e.computed(()=>{const s=g.value;return s.length>0&&s.every(t=>d.value.includes(t.name))}),ne=e.computed(()=>{const s=g.value,t=s.filter(o=>d.value.includes(o.name)).length;return t>0&&t<s.length}),se=()=>{_.value=!_.value,_.value&&ae()};function ae(){if(!E.value)return;const s=E.value.getBoundingClientRect();T.value={position:"fixed",top:`${s.bottom+4}px`,left:`${s.left}px`,zIndex:"9999"}}const B=s=>{const t=E.value,o=A.value;t&&!t.contains(s.target)&&o&&!o.contains(s.target)&&(_.value=!1)};e.onMounted(()=>{document.addEventListener("click",B)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",B)});const q=()=>{L.value?d.value=[]:d.value=g.value.map(s=>s.name),R()},H=s=>{const t=d.value.indexOf(s.name);t>-1?d.value.splice(t,1):d.value.push(s.name),R()},R=()=>{const s=u.getChartInstance();s&&s.setOption(u.getChartOption(),!0)};e.watch(()=>a.conf.data,s=>{var t,o;s&&s.length>0&&d.value.length===0&&(d.value=[(t=s[0])==null?void 0:t.name,(o=s[1])==null?void 0:o.name].filter(Boolean))},{immediate:!0});const re=()=>{const s=u.getChartInstance();if(!s)return;const t=document.createElement("a");t.href=s.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),t.download=`${i("component.crack.timeSeriesCurve")}_${D.dayjs().format("YYYYMMDDHHmmss")}.png`,t.click()};return(s,t)=>{const o=O.ElIcon,m=O.ElInput,r=O.ElCheckbox,l=O.ElButton;return e.openBlock(),e.createElementBlock("div",{class:"mix-component crack-time-series",style:e.normalizeStyle(Q.value)},[e.createElementVNode("div",ge,[e.createElementVNode("span",ye,"📉 "+e.toDisplayString(X.value),1),e.createElementVNode("div",be,[e.createElementVNode("div",{class:"metrics-select-wrapper",ref_key:"metricsWrapperRef",ref:E},[e.createVNode(m,{"model-value":oe.value,placeholder:te.value,size:"small",style:{width:"220px"},readonly:"",onClick:se},{suffix:e.withCtx(()=>[e.createVNode(o,{class:e.normalizeClass(["metrics-arrow",{"is-open":_.value}])},{default:e.withCtx(()=>[e.createVNode(e.unref(ve.ArrowDown))]),_:1},8,["class"])]),_:1},8,["model-value","placeholder"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"metrics-dropdown",style:e.normalizeStyle(T.value),ref_key:"metricsDropdownRef",ref:A},[e.createElementVNode("div",{class:"metrics-dropdown-item",onClick:e.withModifiers(q,["stop"])},[e.createVNode(r,{"model-value":L.value,indeterminate:ne.value,onChange:q},null,8,["model-value","indeterminate"]),t[0]||(t[0]=e.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全部",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n.name,class:"metrics-dropdown-item",onClick:e.withModifiers(c=>H(n),["stop"])},[e.createVNode(r,{"model-value":d.value.includes(n.name),onChange:c=>H(n)},null,8,["model-value","onChange"]),e.createElementVNode("span",_e,e.toDisplayString(n.name),1)],8,Ce))),128))],4),[[e.vShow,_.value]])]))],512),e.createVNode(l,{size:"small",onClick:re},{default:e.withCtx(()=>[e.createTextVNode("💾 "+e.toDisplayString(ee.value),1)]),_:1})])]),e.createElementVNode("div",{id:e.unref(y),class:"chart-container"},null,8,we),e.renderSlot(s.$slots,"default",{},void 0,!0)],4)}}})),je=D._export_sfc(Ie,[["__scopeId","data-v-920e39d1"]]);exports.default=je;
|
|
1
|
+
"use strict";var ie=Object.defineProperty,ue=Object.defineProperties;var de=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var me=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var Y=(v,i,a)=>i in v?ie(v,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):v[i]=a,j=(v,i)=>{for(var a in i||(i={}))me.call(i,a)&&Y(v,a,i[a]);if(Z)for(var a of Z(i))pe.call(i,a)&&Y(v,a,i[a]);return v},V=(v,i)=>ue(v,de(i));var G=(v,i,a)=>new Promise((d,g)=>{var N=y=>{try{C(a.next(y))}catch(x){g(x)}},u=y=>{try{C(a.throw(y))}catch(x){g(x)}},C=y=>y.done?d(y.value):Promise.resolve(y.value).then(N,u);C((a=a.apply(v,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),he=require("./vue-i18n-BvHMBi_b.cjs"),ve=require("@element-plus/icons-vue"),D=require("./index-EnNA0nIi.cjs"),fe=require("./EChartComponentBase-BTqBoBn8.cjs"),J=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),ge={class:"chart-header"},ye={class:"chart-title"},be={class:"chart-actions"},Ce=["onClick"],_e={class:"item-label"},we=["id"],Se={DEFAULT_ICON:J.DEFAULT_ICON,ACTIVE_ICON:J.ACTIVE_ICON,NAME_CN:"指标时序演变曲线",NAME_EN:"TimeSeriesCurve",ORDER:1},De={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:2.5,type:"number",label:"component.options.lineWidth"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},xe=[{name:"宽度累计变化量",fv:"",object_id:"",device:"",color:"#5470c6"},{name:"宽度日变化量",fv:"",object_id:"",device:"",color:"#91cc75"},{name:"x方向加速度",fv:"",object_id:"",device:"",color:"#fac858"},{name:"y方向加速度",fv:"",object_id:"",device:"",color:"#ee6666"},{name:"z方向加速度",fv:"",object_id:"",device:"",color:"#73c0de"},{name:"x方向倾角",fv:"",object_id:"",device:"",color:"#3ba272"},{name:"y方向倾角",fv:"",object_id:"",device:"",color:"#fc8452"},{name:"z方向倾角",fv:"",object_id:"",device:"",color:"#9a60b4"}],ke=["name","fv","object_id","device","color"],Ee=["mosaic","statistics","calculate"],Me={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Oe=50,Ne={DEFAULT:Se,OPTIONS:De,DATA:xe,PARAMS:ke,SOURCE:Ee,ITEMS:Oe,COMMON:Me},Ie=e.defineComponent(V(j({},Ne),{__name:"timeSeriesCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(v){var z,W;const{t:i}=he.useI18n(),a=v,d=e.ref([]),g=e.computed(()=>a.conf.data||[]);class N extends fe.EChartComponentBase{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.realTimeData=new Map,this.deviceNameMap=new Map,this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(t){this.currentObjectId=t}extractStyles(){return V(j({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",2.5),linkChannel:this.getOptionValue("linkChannel","crack")})}onPreview(){var r;const{common:t,data:o}=this.props.conf,m=this.getSource();if(t.multiObject&&Array.isArray(o)){const l=new Set;o.forEach(n=>{const c=this.resolveObjectId(n);!c||l.has(c)||(l.add(c),this.subscribeBySource(m,c,n.uid))})}else{const l=this.resolveObjectId(),n=(r=o==null?void 0:o[0])==null?void 0:r.uid;l&&(this.currentObjectId=l,this.subscribeBySource(m,l,n))}}onLinkEvent(t){x(t)}getChartOption(){const{data:t}=this.props.conf,o=this.Style.value,m=d.value.length===0?[]:t.filter(n=>d.value.includes(n.name));let r=[];if(this.props.mode==="edit")r=this.generateTimeLabels();else for(const[,n]of this.realTimeData)n.times.length>r.length&&(r=n.times);const l=m.filter(n=>n.fv||this.props.mode==="edit").map((n,c)=>{const p=n.device&&this.deviceNameMap.get(n.device)||"",f=p?`${p}-${n.name}`:n.name,h=n.color||this.deviceColors[c%this.deviceColors.length];let b;if(this.props.mode!=="edit"){const w=this.realTimeData.get(n.name);b=w?w.values:[]}else b=this.generateSeriesData(n,r);return{name:f,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:h,type:"solid",width:o.lineWidth},itemStyle:{color:h},data:b}});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:o.showLegend,type:"scroll",top:10,textStyle:{color:o.textColor}},grid:{top:60,left:60,right:40,bottom:o.showDataZoom?80:40},xAxis:{type:"category",data:r,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:o.textColor}},yAxis:{type:"value",name:"值",nameTextStyle:{color:o.textColor},axisLabel:{color:o.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:o.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:l}}generateTimeLabels(){const t=[];for(let o=24;o>=0;o--){const m=D.dayjs().subtract(o,"hour");t.push(m.format("MM-DD HH:mm"))}return t}generateSeriesData(t,o){const m=t.name,r=this.realTimeData.get(m);if(r&&r.times.length>0){const l=new Map;return r.times.forEach((n,c)=>l.set(n,r.values[c])),o.map(n=>{var c;return(c=l.get(n))!=null?c:null})}if(this.props.mode==="edit"){const l=Math.random()*10+5;return Array.from({length:o.length},(n,c)=>{const p=Math.sin(c*.5)*.3;return parseFloat((l*(.8+p)).toFixed(2))})}return new Array(o.length).fill(null)}setSocketData(t){if(!t)return;const{data:o}=this.props.conf;if(!o||!Array.isArray(o))return;const m=t.datetime?t.datetime.split(".")[0]:D.dayjs().format("MM-DD HH:mm:ss"),r=D.dayjs(m).format("MM-DD HH:mm:ss");o.forEach(n=>{if(!n.fv)return;if(n.device){const p=this.extractDataValue(t,n.device);p!=null&&this.deviceNameMap.set(n.device,String(p))}const c=this.extractDataValue(t,n.fv);if(c!=null){const p=parseFloat(c);if(!isNaN(p)){const f=n.name;let h=this.realTimeData.get(f);h||(h={times:[],values:[]},this.realTimeData.set(f,h)),h.times.push(r),h.values.push(p),h.times.length>200&&(h.times.shift(),h.values.shift()),n.value=p}}});const l=this.getChartInstance();l&&l.setOption(this.getChartOption())}}const u=new N(a,"timeSeriesCurve");u.setupLifecycle();const C=u.getStyle(),y=u.getEchartId(),x=s=>{console.log("[指标时序演变曲线] 收到联动事件:",s);const{payload:t}=s;if(!t)return;const o=t.objectId||t.object_id;o&&K(o)},K=s=>G(null,null,function*(){var p;if(!s||a.mode!=="preview"||u.getCurrentObjectId()===s)return;u.setCurrentObjectId(s),u.realTimeData.clear(),u.deviceNameMap.clear();const o=(p=u.session)==null?void 0:p.value;if(!o)return;const m=a.conf.id;o.componentRequests&&o.componentRequests.delete(m);const{data:r,common:l}=a.conf;Array.isArray(r)&&r.forEach(f=>{f.object_id=s}),l.multiObject||(l.object_id=s);try{const f=yield Promise.resolve().then(()=>require("./history-C4gipwnp.cjs")),b=yield new f.default().getHistoryData(a,"timeSeriesCurve");b&&Array.isArray(b)&&r.forEach((w,le)=>{if(!w.fv)return;const M=b[le],$=(M==null?void 0:M.data)||M;if(!Array.isArray($))return;const ce=[...$].sort((S,k)=>new Date(S.time||S.datetime||"").getTime()-new Date(k.time||k.datetime||"").getTime()),I=[],F=[];ce.forEach(S=>{const k=S.time||S.datetime,P=S[w.fv];if(k&&P!=null){const U=parseFloat(P);isNaN(U)||(I.push(D.dayjs(k).format("MM-DD HH:mm:ss")),F.push(U))}}),I.length>0&&u.realTimeData.set(w.name,{times:I,values:F})}),console.log("[指标时序演变曲线] 历史数据加载完成")}catch(f){console.warn("[指标时序演变曲线] 历史数据获取失败:",f)}const n=u.getChartInstance();n&&n.setOption(u.getChartOption(),!0),o.registerComponent({id:m,request:null,onUpdate:(f,h)=>{f==="realtime"&&u.setSocketData(h)}});const c=u.getSource();u.subscribeBySource(c,s)}),Q=e.computed(()=>({background:C.value.bgColor,color:C.value.textColor})),X=e.computed(()=>i("component.crack.timeSeriesCurve")),ee=e.computed(()=>i("component.crack.exportImage")),te=e.computed(()=>i("component.crack.selectIndicators"));a.mode==="edit"&&g.value.length>0&&(d.value=[(z=g.value[0])==null?void 0:z.name,(W=g.value[1])==null?void 0:W.name].filter(Boolean));const _=e.ref(!1),E=e.ref(null),A=e.ref(null),T=e.ref({}),oe=e.computed(()=>d.value.length===0?"":d.value.length===g.value.length?"全部":d.value.join("、")),L=e.computed(()=>{const s=g.value;return s.length>0&&s.every(t=>d.value.includes(t.name))}),ne=e.computed(()=>{const s=g.value,t=s.filter(o=>d.value.includes(o.name)).length;return t>0&&t<s.length}),se=()=>{_.value=!_.value,_.value&&ae()};function ae(){if(!E.value)return;const s=E.value.getBoundingClientRect();T.value={position:"fixed",top:`${s.bottom+4}px`,left:`${s.left}px`,zIndex:"9999"}}const B=s=>{const t=E.value,o=A.value;t&&!t.contains(s.target)&&o&&!o.contains(s.target)&&(_.value=!1)};e.onMounted(()=>{document.addEventListener("click",B)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",B)});const q=()=>{L.value?d.value=[]:d.value=g.value.map(s=>s.name),R()},H=s=>{const t=d.value.indexOf(s.name);t>-1?d.value.splice(t,1):d.value.push(s.name),R()},R=()=>{const s=u.getChartInstance();s&&s.setOption(u.getChartOption(),!0)};e.watch(()=>a.conf.data,s=>{var t,o;s&&s.length>0&&d.value.length===0&&(d.value=[(t=s[0])==null?void 0:t.name,(o=s[1])==null?void 0:o.name].filter(Boolean))},{immediate:!0});const re=()=>{const s=u.getChartInstance();if(!s)return;const t=document.createElement("a");t.href=s.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),t.download=`${i("component.crack.timeSeriesCurve")}_${D.dayjs().format("YYYYMMDDHHmmss")}.png`,t.click()};return(s,t)=>{const o=O.ElIcon,m=O.ElInput,r=O.ElCheckbox,l=O.ElButton;return e.openBlock(),e.createElementBlock("div",{class:"mix-component crack-time-series",style:e.normalizeStyle(Q.value)},[e.createElementVNode("div",ge,[e.createElementVNode("span",ye,"📉 "+e.toDisplayString(X.value),1),e.createElementVNode("div",be,[e.createElementVNode("div",{class:"metrics-select-wrapper",ref_key:"metricsWrapperRef",ref:E},[e.createVNode(m,{"model-value":oe.value,placeholder:te.value,size:"small",style:{width:"220px"},readonly:"",onClick:se},{suffix:e.withCtx(()=>[e.createVNode(o,{class:e.normalizeClass(["metrics-arrow",{"is-open":_.value}])},{default:e.withCtx(()=>[e.createVNode(e.unref(ve.ArrowDown))]),_:1},8,["class"])]),_:1},8,["model-value","placeholder"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"metrics-dropdown",style:e.normalizeStyle(T.value),ref_key:"metricsDropdownRef",ref:A},[e.createElementVNode("div",{class:"metrics-dropdown-item",onClick:e.withModifiers(q,["stop"])},[e.createVNode(r,{"model-value":L.value,indeterminate:ne.value,onChange:q},null,8,["model-value","indeterminate"]),t[0]||(t[0]=e.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全部",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n.name,class:"metrics-dropdown-item",onClick:e.withModifiers(c=>H(n),["stop"])},[e.createVNode(r,{"model-value":d.value.includes(n.name),onChange:c=>H(n)},null,8,["model-value","onChange"]),e.createElementVNode("span",_e,e.toDisplayString(n.name),1)],8,Ce))),128))],4),[[e.vShow,_.value]])]))],512),e.createVNode(l,{size:"small",onClick:re},{default:e.withCtx(()=>[e.createTextVNode("💾 "+e.toDisplayString(ee.value),1)]),_:1})])]),e.createElementVNode("div",{id:e.unref(y),class:"chart-container"},null,8,we),e.renderSlot(s.$slots,"default",{},void 0,!0)],4)}}})),je=D._export_sfc(Ie,[["__scopeId","data-v-920e39d1"]]);exports.default=je;
|
|
@@ -35,8 +35,8 @@ import "element-plus/es/components/icon/style/css";
|
|
|
35
35
|
import { defineComponent as ke, ref as O, computed as b, onMounted as Me, onBeforeUnmount as Oe, watch as Ie, openBlock as A, createElementBlock as B, normalizeStyle as oe, createElementVNode as y, toDisplayString as H, createVNode as x, withCtx as R, normalizeClass as Ee, unref as ne, createBlock as je, Teleport as Ae, withDirectives as Te, withModifiers as se, Fragment as Ne, renderList as Le, vShow as Ve, createTextVNode as Be, renderSlot as He } from "vue";
|
|
36
36
|
import { u as Re } from "./vue-i18n-5Nahpzrm.js";
|
|
37
37
|
import { ArrowDown as ze } from "@element-plus/icons-vue";
|
|
38
|
-
import { d as I, _ as We } from "./index-
|
|
39
|
-
import { E as $e } from "./EChartComponentBase-
|
|
38
|
+
import { d as I, _ as We } from "./index-zPaMBZk-.js";
|
|
39
|
+
import { E as $e } from "./EChartComponentBase-GBbKjtlb.js";
|
|
40
40
|
import { A as Fe, D as Ze } from "./ele-vlu-icon-Bg6EHZdJ.js";
|
|
41
41
|
const Pe = { class: "chart-header" }, Ue = { class: "chart-title" }, Ye = { class: "chart-actions" }, qe = ["onClick"], Ge = { class: "item-label" }, Je = ["id"], Ke = {
|
|
42
42
|
DEFAULT_ICON: Ze,
|
|
@@ -278,7 +278,7 @@ const Pe = { class: "chart-header" }, Ue = { class: "chart-title" }, Ye = { clas
|
|
|
278
278
|
f.object_id = n;
|
|
279
279
|
}), i.multiObject || (i.object_id = n);
|
|
280
280
|
try {
|
|
281
|
-
const f = yield import("./history-
|
|
281
|
+
const f = yield import("./history-DN0IVkYL.js"), C = yield new f.default().getHistoryData(s, "timeSeriesCurve");
|
|
282
282
|
C && Array.isArray(C) && a.forEach((D, fe) => {
|
|
283
283
|
if (!D.fv) return;
|
|
284
284
|
const j = C[fe], G = (j == null ? void 0 : j.data) || j;
|
|
@@ -12,12 +12,12 @@ var M = (c, o, i) => o in c ? Z(c, o, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
}, A = (c, o) => I(c, U(o));
|
|
13
13
|
import { defineComponent as P, ref as F, reactive as G, openBlock as p, createElementBlock as C, normalizeStyle as d, unref as a, createElementVNode as u, Fragment as R, renderList as N, normalizeClass as q, toDisplayString as S, renderSlot as J, nextTick as K } from "vue";
|
|
14
14
|
import "html2canvas";
|
|
15
|
-
import { C as Q } from "./element-resize-detector-
|
|
16
|
-
import { _ as W } from "./index-
|
|
17
|
-
import { E as X } from "./EChartComponentBase-
|
|
18
|
-
import {
|
|
19
|
-
import { i as
|
|
20
|
-
import {
|
|
15
|
+
import { C as Q } from "./element-resize-detector-DeMhGbNi.js";
|
|
16
|
+
import { _ as W } from "./index-zPaMBZk-.js";
|
|
17
|
+
import { E as X } from "./EChartComponentBase-GBbKjtlb.js";
|
|
18
|
+
import { u as Y, i as e0, a as t0 } from "./installCanvasRenderer-CLT2hquJ.js";
|
|
19
|
+
import { i as a0 } from "./install-CBde4hAM.js";
|
|
20
|
+
import { i as r0 } from "./install-hfre7yvV.js";
|
|
21
21
|
import { i as l0 } from "./install-BBrAry2m.js";
|
|
22
22
|
import { i as o0 } from "./install-9_V0b6vf.js";
|
|
23
23
|
const i0 = "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", s0 = "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", c0 = ["onClick"], n0 = ["id"], d0 = { class: "progress-wrap" }, u0 = ["title"], f0 = {
|
|
@@ -73,7 +73,7 @@ const i0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
|
|
|
73
73
|
theme: { type: String, default: "light" }
|
|
74
74
|
},
|
|
75
75
|
setup(c) {
|
|
76
|
-
|
|
76
|
+
Y([a0, r0, e0, l0, t0, o0]);
|
|
77
77
|
const o = c, i = F(0), f = G({
|
|
78
78
|
indicator: [],
|
|
79
79
|
series: []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty,A=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var _=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var k=(s,o,n)=>o in s?M(s,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[o]=n,E=(s,o)=>{for(var n in o||(o={}))R.call(o,n)&&k(s,n,o[n]);if(_)for(var n of _(o))$.call(o,n)&&k(s,n,o[n]);return s},N=(s,o)=>A(s,F(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const D=require("./element-resize-detector-Bo5uDQAu.cjs"),j=require("./index-Mh5Dw2sd.cjs"),q=require("./EChartComponentBase-BaQpBzVC.cjs"),V=require("./install-DV5cEgNV.cjs"),Z=require("./install-CltTFs4e.cjs"),m=require("./installCanvasRenderer-CyhM1Qpl.cjs"),I=require("./install-C8buXQPI.cjs"),U=require("./install-B1IEhhn3.cjs"),H="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",P="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",G=["onClick"],J=["id"],K={class:"progress-wrap"},Q=["title"],W={DEFAULT_ICON:H,ACTIVE_ICON:P,NAME_CN:"切换",NAME_EN:"Toggle Button",ORDER:2},X={titleSize:14,textSize:12,barHeight:8,textColor:"#a8b4d9",bgColor:"#0a1635",barColor:"#1e3a5f",tabColor:"#1e3a5f",activeBgColor:"#6b7fd9",borderColor:"#1e3a5f",activeBorder:"#6b7fd9",radiusSize:8,type:{value:"none",type:"radio",option:[{value:"none",label:"component.radar.diamond"},{value:"circle",label:"component.radar.circle"}],label:"component.radar.shapeSelect"},tags:{value:[{label:"TAB1",flag:["S01","S02","S03"]},{label:"TAB2",flag:["S02","S03","S04"]}],type:"tags",label:"component.radar.tagsSetting"}},Y=[{name:"参数一",color:"#4162ff",fv:"S01",object_id:""},{name:"参数二",color:"#3bbc6a",fv:"S02",object_id:""},{name:"参数三",color:"#e24359",fv:"S03",object_id:""},{name:"参数四",color:"#ff8b41",fv:"S04",object_id:""}],ee=["name","fv","object_id","color"],te=["mosaic","statistics","calculate"],re={useAlias:!1,multiObject:!1,source:"mosaic"},le={DEFAULT:W,OPTIONS:X,DATA:Y,PARAMS:ee,SOURCE:te,COMMON:re},ae=e.defineComponent(N(E({},le),{__name:"toggleBtn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){m.use([V.install,Z.install,m.install,I.install,m.install$1,U.install]);const o=s,n=e.ref(0),u=e.reactive({indicator:[],series:[]}),d=e.ref(0);class T extends q.EChartComponentBase{extractStyles(){var r,a,i,c,f,g,h,p,S,b,y,x,w,z,B;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleSize:((a=t==null?void 0:t.titleSize)==null?void 0:a.value)||16,barHeight:((i=t==null?void 0:t.barHeight)==null?void 0:i.value)||8,textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#111",tabColor:((f=t==null?void 0:t.tabColor)==null?void 0:f.value)||"#f5f5f5",activeBgColor:((g=t==null?void 0:t.activeBgColor)==null?void 0:g.value)||"#4162ff",borderColor:((h=t==null?void 0:t.borderColor)==null?void 0:h.value)||"#e5e5e5",activeBorder:((p=t==null?void 0:t.activeBorder)==null?void 0:p.value)||"#4162ff",barColor:((S=t==null?void 0:t.barColor)==null?void 0:S.value)||"#e5e5e5",radiusSize:(y=(b=t==null?void 0:t.radiusSize)==null?void 0:b.value)!=null?y:8,textSize:(w=(x=t==null?void 0:t.textSize)==null?void 0:x.value)!=null?w:12,type:((z=t==null?void 0:t.type)==null?void 0:z.value)||!1,tags:((B=t==null?void 0:t.tags)==null?void 0:B.value)||[]}}getChartOption(){var r;const{name:t}=this.props.conf;return{radar:{shape:this.Style.value.type,axisNameGap:10,indicator:u.indicator,center:["50%","55%"],radius:70,axisLine:{lineStyle:{type:"dashed",color:"#383D42"}},splitLine:{show:!0,lineStyle:{width:1,color:"#4B5FAB"}},splitArea:{show:!0,areaStyle:{color:["transparent"]}},axisName:{fontSize:12,color:this.Style.value.textColor}},series:[{name:t!=null?t:"",type:"radar",data:(r=u.series)!=null?r:[],areaStyle:{},itemStyle:{color:"#4162ff"}}]}}init(){super.init(),e.nextTick(()=>{this.initChart(),C(d.value)})}setSocketData(t){if(!t)return;const{data:r}=this.props.conf;r.forEach(a=>{const i=this.extractDataValue(t,a.fv);a.value=i!=null?i:0}),C(d.value)}refreshChart(){var r;const t=this.getChartOption();(r=this.chartObj)==null||r.setOption(t,!0)}}const v=new T(o,"toggleBtn");v.setupLifecycle();const l=v.getStyle(),O=v.getEchartId(),C=L=>{const{data:t,options:r,name:a}=o.conf;d.value=L,u.indicator=[],u.series=[];let i={};i.name=a,i.value=[],n.value=Math.max(...t.map(c=>c.value||0)),t.forEach(c=>{var f,g;(g=(f=r.tags.value[d.value])==null?void 0:f.flag)!=null&&g.includes(c.fv)&&(u.indicator.push({name:c.name,max:n.value,value:c.value,min:0,color:c.color}),i.value.push(c.value))}),u.series.push(i),v.refreshChart()};return(L,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(l).bgColor,borderRadius:`${e.unref(l).radiusSize}px`})},[e.createElementVNode("div",{class:"toggle-wrap",style:e.normalizeStyle({borderTopLeftRadius:`${e.unref(l).radiusSize}px`,borderTopRightRadius:`${e.unref(l).radiusSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).tags,(r,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:e.normalizeClass(["btn-item",{active:d.value===a}]),style:e.normalizeStyle({backgroundColor:d.value===a?e.unref(l).activeBgColor:e.unref(l).tabColor,color:d.value===a?"#fff":e.unref(l).textColor,fontSize:`${e.unref(l).titleSize}px`,borderTopLeftRadius:a===0?`${e.unref(l).radiusSize}px`:"0",borderTopRightRadius:a===e.unref(l).tags.length-1?`${e.unref(l).radiusSize}px`:"0"}),onClick:i=>C(a)},e.toDisplayString(r.label),15,G))),128))],4),e.createElementVNode("div",{class:"radar-wrap",style:e.normalizeStyle({color:e.unref(l).textColor,fontSize:`${e.unref(l).textSize}px`})},[e.createElementVNode("div",{id:e.unref(O),class:"radar-chart"},null,8,J),e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.indicator,(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:"bar-item-crosswise",key:a},[e.createElementVNode("div",{class:"bar-title",title:r.name,style:e.normalizeStyle({color:e.unref(l).textColor})},e.toDisplayString(r.name),13,Q),e.createElementVNode("div",{class:"bar",style:e.normalizeStyle({backgroundColor:e.unref(l).barColor,height:`${e.unref(l).barHeight}px`})},[e.createElementVNode("div",{class:"progress",style:e.normalizeStyle({backgroundColor:r.color||e.unref(D.COLORS)[a],width:(r.value/n.value*100).toFixed(2)+"%"})},null,4)],4),e.createElementVNode("div",{class:"bar-value",style:e.normalizeStyle({color:e.unref(l).textColor})},e.toDisplayString(r.value||0),5)]))),128))])],4),e.renderSlot(L.$slots,"default",{},void 0,!0)],4))}})),oe=j._export_sfc(ae,[["__scopeId","data-v-9692ecf4"]]);exports.default=oe;
|
|
1
|
+
"use strict";var M=Object.defineProperty,A=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var _=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var k=(s,o,n)=>o in s?M(s,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[o]=n,E=(s,o)=>{for(var n in o||(o={}))R.call(o,n)&&k(s,n,o[n]);if(_)for(var n of _(o))$.call(o,n)&&k(s,n,o[n]);return s},N=(s,o)=>A(s,F(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const D=require("./element-resize-detector-BlMXyWIR.cjs"),j=require("./index-EnNA0nIi.cjs"),q=require("./EChartComponentBase-BTqBoBn8.cjs"),m=require("./installCanvasRenderer-CyhM1Qpl.cjs"),V=require("./install-DV5cEgNV.cjs"),Z=require("./install-CltTFs4e.cjs"),I=require("./install-C8buXQPI.cjs"),U=require("./install-B1IEhhn3.cjs"),H="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",P="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",G=["onClick"],J=["id"],K={class:"progress-wrap"},Q=["title"],W={DEFAULT_ICON:H,ACTIVE_ICON:P,NAME_CN:"切换",NAME_EN:"Toggle Button",ORDER:2},X={titleSize:14,textSize:12,barHeight:8,textColor:"#a8b4d9",bgColor:"#0a1635",barColor:"#1e3a5f",tabColor:"#1e3a5f",activeBgColor:"#6b7fd9",borderColor:"#1e3a5f",activeBorder:"#6b7fd9",radiusSize:8,type:{value:"none",type:"radio",option:[{value:"none",label:"component.radar.diamond"},{value:"circle",label:"component.radar.circle"}],label:"component.radar.shapeSelect"},tags:{value:[{label:"TAB1",flag:["S01","S02","S03"]},{label:"TAB2",flag:["S02","S03","S04"]}],type:"tags",label:"component.radar.tagsSetting"}},Y=[{name:"参数一",color:"#4162ff",fv:"S01",object_id:""},{name:"参数二",color:"#3bbc6a",fv:"S02",object_id:""},{name:"参数三",color:"#e24359",fv:"S03",object_id:""},{name:"参数四",color:"#ff8b41",fv:"S04",object_id:""}],ee=["name","fv","object_id","color"],te=["mosaic","statistics","calculate"],re={useAlias:!1,multiObject:!1,source:"mosaic"},le={DEFAULT:W,OPTIONS:X,DATA:Y,PARAMS:ee,SOURCE:te,COMMON:re},ae=e.defineComponent(N(E({},le),{__name:"toggleBtn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){m.use([V.install,Z.install,m.install,I.install,m.install$1,U.install]);const o=s,n=e.ref(0),u=e.reactive({indicator:[],series:[]}),d=e.ref(0);class T extends q.EChartComponentBase{extractStyles(){var r,a,i,c,f,g,h,p,S,b,y,x,w,z,B;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleSize:((a=t==null?void 0:t.titleSize)==null?void 0:a.value)||16,barHeight:((i=t==null?void 0:t.barHeight)==null?void 0:i.value)||8,textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#111",tabColor:((f=t==null?void 0:t.tabColor)==null?void 0:f.value)||"#f5f5f5",activeBgColor:((g=t==null?void 0:t.activeBgColor)==null?void 0:g.value)||"#4162ff",borderColor:((h=t==null?void 0:t.borderColor)==null?void 0:h.value)||"#e5e5e5",activeBorder:((p=t==null?void 0:t.activeBorder)==null?void 0:p.value)||"#4162ff",barColor:((S=t==null?void 0:t.barColor)==null?void 0:S.value)||"#e5e5e5",radiusSize:(y=(b=t==null?void 0:t.radiusSize)==null?void 0:b.value)!=null?y:8,textSize:(w=(x=t==null?void 0:t.textSize)==null?void 0:x.value)!=null?w:12,type:((z=t==null?void 0:t.type)==null?void 0:z.value)||!1,tags:((B=t==null?void 0:t.tags)==null?void 0:B.value)||[]}}getChartOption(){var r;const{name:t}=this.props.conf;return{radar:{shape:this.Style.value.type,axisNameGap:10,indicator:u.indicator,center:["50%","55%"],radius:70,axisLine:{lineStyle:{type:"dashed",color:"#383D42"}},splitLine:{show:!0,lineStyle:{width:1,color:"#4B5FAB"}},splitArea:{show:!0,areaStyle:{color:["transparent"]}},axisName:{fontSize:12,color:this.Style.value.textColor}},series:[{name:t!=null?t:"",type:"radar",data:(r=u.series)!=null?r:[],areaStyle:{},itemStyle:{color:"#4162ff"}}]}}init(){super.init(),e.nextTick(()=>{this.initChart(),C(d.value)})}setSocketData(t){if(!t)return;const{data:r}=this.props.conf;r.forEach(a=>{const i=this.extractDataValue(t,a.fv);a.value=i!=null?i:0}),C(d.value)}refreshChart(){var r;const t=this.getChartOption();(r=this.chartObj)==null||r.setOption(t,!0)}}const v=new T(o,"toggleBtn");v.setupLifecycle();const l=v.getStyle(),O=v.getEchartId(),C=L=>{const{data:t,options:r,name:a}=o.conf;d.value=L,u.indicator=[],u.series=[];let i={};i.name=a,i.value=[],n.value=Math.max(...t.map(c=>c.value||0)),t.forEach(c=>{var f,g;(g=(f=r.tags.value[d.value])==null?void 0:f.flag)!=null&&g.includes(c.fv)&&(u.indicator.push({name:c.name,max:n.value,value:c.value,min:0,color:c.color}),i.value.push(c.value))}),u.series.push(i),v.refreshChart()};return(L,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(l).bgColor,borderRadius:`${e.unref(l).radiusSize}px`})},[e.createElementVNode("div",{class:"toggle-wrap",style:e.normalizeStyle({borderTopLeftRadius:`${e.unref(l).radiusSize}px`,borderTopRightRadius:`${e.unref(l).radiusSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).tags,(r,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:e.normalizeClass(["btn-item",{active:d.value===a}]),style:e.normalizeStyle({backgroundColor:d.value===a?e.unref(l).activeBgColor:e.unref(l).tabColor,color:d.value===a?"#fff":e.unref(l).textColor,fontSize:`${e.unref(l).titleSize}px`,borderTopLeftRadius:a===0?`${e.unref(l).radiusSize}px`:"0",borderTopRightRadius:a===e.unref(l).tags.length-1?`${e.unref(l).radiusSize}px`:"0"}),onClick:i=>C(a)},e.toDisplayString(r.label),15,G))),128))],4),e.createElementVNode("div",{class:"radar-wrap",style:e.normalizeStyle({color:e.unref(l).textColor,fontSize:`${e.unref(l).textSize}px`})},[e.createElementVNode("div",{id:e.unref(O),class:"radar-chart"},null,8,J),e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.indicator,(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:"bar-item-crosswise",key:a},[e.createElementVNode("div",{class:"bar-title",title:r.name,style:e.normalizeStyle({color:e.unref(l).textColor})},e.toDisplayString(r.name),13,Q),e.createElementVNode("div",{class:"bar",style:e.normalizeStyle({backgroundColor:e.unref(l).barColor,height:`${e.unref(l).barHeight}px`})},[e.createElementVNode("div",{class:"progress",style:e.normalizeStyle({backgroundColor:r.color||e.unref(D.COLORS)[a],width:(r.value/n.value*100).toFixed(2)+"%"})},null,4)],4),e.createElementVNode("div",{class:"bar-value",style:e.normalizeStyle({color:e.unref(l).textColor})},e.toDisplayString(r.value||0),5)]))),128))])],4),e.renderSlot(L.$slots,"default",{},void 0,!0)],4))}})),oe=j._export_sfc(ae,[["__scopeId","data-v-9692ecf4"]]);exports.default=oe;
|
|
@@ -21,7 +21,7 @@ import "element-plus/es/components/icon/style/css";
|
|
|
21
21
|
import "element-plus/es/components/checkbox/style/css";
|
|
22
22
|
import "element-plus/es/components/date-picker/style/css";
|
|
23
23
|
import { defineComponent as be, useCssVars as Ce, computed as S, ref as ke, watch as X, onMounted as _e, openBlock as i, createElementBlock as r, normalizeStyle as Ve, Fragment as T, renderList as w, createElementVNode as y, toDisplayString as f, normalizeClass as N, createCommentVNode as _, createVNode as Y, withCtx as D, createTextVNode as L, unref as De, createBlock as M, renderSlot as Pe } from "vue";
|
|
24
|
-
import { u as Re, d as E, _ as Te } from "./index-
|
|
24
|
+
import { u as Re, d as E, _ as Te } from "./index-zPaMBZk-.js";
|
|
25
25
|
import { Delete as Ye } from "@element-plus/icons-vue";
|
|
26
26
|
import { A as Oe, D as Ie } from "./ele-ctrSet-icon-BtKGrCid.js";
|
|
27
27
|
const we = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var X=Object.defineProperty,J=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var S=(k,m,d)=>m in k?X(k,m,{enumerable:!0,configurable:!0,writable:!0,value:d}):k[m]=d,E=(k,m)=>{for(var d in m||(m={}))Z.call(m,d)&&S(k,d,m[d]);if(Y)for(var d of Y(m))x.call(m,d)&&S(k,d,m[d]);return k},j=(k,m)=>J(k,K(m));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),B=require("./index-Mh5Dw2sd.cjs"),ee=require("@element-plus/icons-vue"),q=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),te={key:0,class:"config-section time-range-section"},le={class:"section-header"},ae={class:"section-title"},ne={class:"time-range-body"},oe={key:0,class:"quick-range"},ce=["onClick"],se={key:1,class:"granularity-tabs"},re=["onClick"],ie={key:2,class:"date-inputs"},ue={key:1,class:"config-section time-list-section"},pe={class:"section-header"},de={class:"section-title"},me={key:0,class:"time-list-actions"},ye={class:"selected-count"},ge={key:1,class:"time-list"},ve={key:2,class:"config-section"},fe={class:"section-header"},ke={class:"section-title"},he={key:0,class:"node-list"},Ce={key:3,class:"config-section"},be={class:"section-header"},_e={class:"section-title"},Ve={key:0,class:"direction-tabs"},De=["onClick"],Be={key:4,class:"config-section"},Ee={class:"section-header"},Pe={class:"section-title"},Te={key:0,class:"range-inputs"},Ne={key:0,class:"range-unit"},Re={key:5,class:"config-section"},we={class:"section-header"},Le={class:"section-title"},Oe={key:0,class:"display-options"},Ie={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"露天矿控制面板",NAME_EN:"Openpit Control Panel",ORDER:15},Ye={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Se=[{type:"timeRange",label:"时间段",key:"timeRange",targetId:"",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day",multiple:!1,options:[{label:"选项1",value:1}],minPlaceholder:"",maxPlaceholder:"",unit:""}],je=[{key:"type",label:"component.openpitConfigPanel.type",type:"select",options:[{label:"component.openpitConfigPanel.typeOptions.timeRange",value:"timeRange"},{label:"component.openpitConfigPanel.typeOptions.timeList",value:"timeList"},{label:"component.openpitConfigPanel.typeOptions.selectList",value:"selectList"},{label:"component.openpitConfigPanel.typeOptions.direction",value:"direction"},{label:"component.openpitConfigPanel.typeOptions.range",value:"range"},{label:"component.openpitConfigPanel.typeOptions.switch",value:"switch"}]},{key:"label",label:"component.openpitConfigPanel.label",type:"string"},{key:"key",label:"component.openpitConfigPanel.key",type:"string"},{key:"targetId",label:"component.openpitConfigPanel.targetId",type:"string"},{key:"showQuickRange",label:"component.openpitConfigPanel.showQuickRange",type:"switch",dependent:"type",dependentValue:"timeRange"},{key:"dateType",label:"component.openpitConfigPanel.dateType",type:"select",options:[{label:"component.openpitConfigPanel.dateTypeOptions.date",value:"date"},{label:"component.openpitConfigPanel.dateTypeOptions.datetime",value:"datetime"}],dependent:"type",dependentValue:"timeRange"},{key:"defaultGranularity",label:"component.openpitConfigPanel.defaultGranularity",type:"select",options:[{label:"component.openpitConfigPanel.granularityOptionLabels.hour",value:"hour"},{label:"component.openpitConfigPanel.granularityOptionLabels.day",value:"day"}],dependent:"type",dependentValue:"timeRange"},{key:"timeList",label:"component.openpitConfigPanel.timeList",type:"string",dependent:"type",dependentValue:"timeList"},{key:"multiple",label:"component.openpitConfigPanel.multiple",type:"switch",dependent:"type",dependentValue:"selectList"},{key:"options",label:"component.openpitConfigPanel.options",type:"table",columns:[{key:"label",label:"label",type:"string"},{key:"value",label:"value",type:"string"}],dependent:"type",dependentValue:["selectList","direction","switch"]},{key:"minPlaceholder",label:"component.openpitConfigPanel.minPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"maxPlaceholder",label:"component.openpitConfigPanel.maxPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"unit",label:"component.openpitConfigPanel.unit",type:"string",dependent:"type",dependentValue:"range"}],qe=[],Me={useAlias:!1,multiObject:!1,source:""},Ae={DEFAULT:Ie,OPTIONS:Ye,DATA:Se,PARAMS:je,SOURCE:qe,COMMON:Me},Ue=e.defineComponent(j(E({},Ae),{__name:"trajectoryConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(k){e.useCssVars(t=>({ce9154a6:T.value.backgroundColor,v0a86116f:T.value.borderColor,v6d6e1a00:C.value.textColor,v81357e3e:C.value.borderColor,v4e6fb303:C.value.accentColor}));const m=B.useLinkStore(),d=k,C=e.computed(()=>{var u,p,i,_,y,V,c;const{options:t}=d.conf||{},l=((u=t==null?void 0:t.linkChannel)==null?void 0:u.value)||"deepDisplacement",s=((p=t==null?void 0:t.customChannel)==null?void 0:p.value)||"",r=l==="custom"&&s?s:l;return{bindId:((i=t==null?void 0:t.bindId)==null?void 0:i.value)||"",bgColor:((_=t==null?void 0:t.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((y=t==null?void 0:t.textColor)==null?void 0:y.value)||"#333333",accentColor:((V=t==null?void 0:t.accentColor)==null?void 0:V.value)||"#409eff",borderColor:((c=t==null?void 0:t.borderColor)==null?void 0:c.value)||"#e5e5e5",linkChannel:r}}),M=e.computed(()=>{const t=C.value.bindId||d.uid;if(!t){const l=`trajectoryConfigPanel_${Date.now()}`;return console.warn("[TrajectoryConfigPanel] 未配置ID,自动生成:",l),l}return t}),h=e.computed(()=>{var t;return(((t=d.conf)==null?void 0:t.data)||[]).filter(Boolean)}),a=e.ref({}),w=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],P=t=>(t==null?void 0:t.dateType)==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",A=t=>{const l=a.value[t];return l&&typeof l.granularity!="undefined"?l.granularity:"day"},L=(t,l,s)=>{const r=l.format(s);let u=l.subtract(7,"day").format(s);return t==="today"?u=l.startOf("day").format(s):t==="week"?u=l.subtract(7,"day").format(s):t==="month"?u=l.subtract(30,"day").format(s):t==="quarter"?u=l.subtract(90,"day").format(s):t==="year"&&(u=l.subtract(365,"day").format(s)),{startDate:u,endDate:r}},O=()=>{h.value.forEach((t,l)=>{var u,p,i,_,y,V,c;a.value[l]||(a.value[l]={});const s=B.dayjs(),r=t.dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(t.type==="timeRange"){const o=t.quickRangeOptions||w,f=t.defaultQuickRange||((u=o==null?void 0:o[0])==null?void 0:u.value)||"week",b=t.defaultGranularity||((i=(p=t.granularityOptions)==null?void 0:p[0])==null?void 0:i.value)||"",n=L(f,s,r);a.value[l]={quickRange:f,granularity:b,startDate:n.startDate,endDate:n.endDate}}else if(t.type==="timeList"){const o=h.value.findIndex(b=>b.type==="timeRange");let f=[];if(o>=0&&a.value[o]){const b=B.dayjs(a.value[o].startDate);let g=B.dayjs(a.value[o].endDate);for(;g.isAfter(b)||g.isSame(b,"day");)f.push(g.format(r)),g=g.subtract(1,"day")}a.value[l]={timeList:f,selectedTimes:[...f],selectAll:!0}}else if(t.type==="selectList")t.multiple?a.value[l]={selectedValues:[]}:a.value[l]={selectedValue:((y=(_=t.options)==null?void 0:_[0])==null?void 0:y.value)||""};else if(t.type==="direction")a.value[l]={selectedValue:((c=(V=t.options)==null?void 0:V[0])==null?void 0:c.value)||"total"};else if(t.type==="range")a.value[l]={min:"",max:""};else if(t.type==="switch"){const o={};(t.options||[]).forEach(f=>{o[f.value]=f.defaultValue!==!1}),a.value[l]=o}})},T=e.computed(()=>({backgroundColor:C.value.bgColor,color:C.value.textColor,borderColor:C.value.borderColor})),U=()=>{const t={};return h.value.forEach((l,s)=>{if(l.key&&a.value[s]){const r=a.value[s];l.type==="timeRange"?t[l.key]={startDate:r.startDate,endDate:r.endDate,quickRange:r.quickRange,granularity:r.granularity}:l.type==="timeList"?t[l.key]=r.selectedTimes||[]:l.type==="selectList"?t[l.key]=l.multiple?r.selectedValues:r.selectedValue:l.type==="direction"?t[l.key]=r.selectedValue:l.type==="range"?t[l.key]={min:r.min===""?null:parseFloat(r.min),max:r.max===""||r.max==="最大值"?null:parseFloat(r.max)}:l.type==="switch"&&(t[l.key]=E({},r))}}),t},N=()=>{const t=U(),l=M.value,s=h.value;console.log("[TrajectoryConfigPanel] ========== 广播配置 =========="),console.log("[TrajectoryConfigPanel] 当前面板ID:",l),console.log("[TrajectoryConfigPanel] props.uid:",d.uid),console.log("[TrajectoryConfigPanel] bindId配置:",C.value.bindId),console.log("[TrajectoryConfigPanel] 配置内容:",t),console.log("[TrajectoryConfigPanel] 配置模块数量:",s.length);const r=C.value.linkChannel||"deepDisplacement";l?(console.log(`[TrajectoryConfigPanel] 📡 广播配置到频道 ${r}:`,{objectId:l,type:"filter",filter:t}),m.publish(r,"trajectoryConfigPanel",E({objectId:l,type:"filter",filter:t},t))):console.warn("[TrajectoryConfigPanel] ⚠️ 无法广播:面板ID为空"),s.forEach((u,p)=>{const i=u.targetId;if(!i)return;i.split(",").map(y=>y.trim()).filter(y=>y).forEach(y=>{console.log(`[TrajectoryConfigPanel] 🎯 直接绑定到图表 [${p}]:`,y,t),m.publish(r,"trajectoryConfigPanel",E({objectId:y,type:"filter",filter:t},t))})}),console.log("[TrajectoryConfigPanel] ========== 广播完成 ==========")},I=(t,l)=>{const s=h.value[t];if(!s||s.type!=="timeRange"||!a.value[t])return;const r=B.dayjs(),u=s.dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";a.value[t].quickRange=l;const p=L(l,r,u);a.value[t].startDate=p.startDate,a.value[t].endDate=p.endDate,F(),v()},F=()=>{const t=h.value.findIndex(s=>s.type==="timeRange"),l=h.value.findIndex(s=>s.type==="timeList");if(t>=0&&l>=0&&a.value[t]){const s=h.value[t].dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",r=B.dayjs(a.value[t].startDate),u=B.dayjs(a.value[t].endDate),p=[];let i=u;for(;i.isAfter(r)||i.isSame(r,"day");)p.push(i.format(s)),i=i.subtract(1,"day");a.value[l]||(a.value[l]={}),a.value[l].timeList=p,a.value[l].selectedTimes=[...p],a.value[l].selectAll=!0}},Q=t=>{if(!a.value[t])return;const l=a.value[t].selectAll;a.value[t].selectedTimes=l?[...a.value[t].timeList]:[],v()},G=t=>{a.value[t]&&(a.value[t].selectedTimes=[],a.value[t].selectAll=!1,v())},z=t=>{if(!a.value[t])return;const l=a.value[t].timeList||[],s=a.value[t].selectedTimes||[];a.value[t].selectAll=s.length===l.length,v()},H=(t,l)=>{a.value[t]&&(a.value[t].selectedValue=l,v())},$=(t,l)=>{a.value[t]&&(a.value[t].granularity=l,v())},v=t=>{N()};e.watch(()=>{var t;return(t=d.conf)==null?void 0:t.data},()=>{O(),setTimeout(N,300)},{deep:!0,immediate:!0,flush:"sync"}),e.watch(()=>{var t;return(t=d.conf)==null?void 0:t.data},(t,l)=>{t&&t.forEach((s,r)=>{const u=l==null?void 0:l[r];if(s.type&&(!u||s.type!==u.type)){const p=W(s.type);Object.keys(p).forEach(i=>{(!s[i]||s[i]===""||Array.isArray(s[i])&&s[i].length===0)&&(s[i]=p[i])})}})},{deep:!0});const W=t=>({timeRange:{label:"时间段",key:"timeRange",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day"},timeList:{label:"时间列表",key:"timeList"},selectList:{label:"节点列表",key:"nodeList",multiple:!1,options:[{label:"选项1",value:1}]},direction:{label:"位移方向",key:"direction",options:[{label:"合",value:"total"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}]},range:{label:"数值区间",key:"range",minPlaceholder:"最小值",maxPlaceholder:"最大值",unit:""},switch:{label:"显示选项",key:"displayOptions",options:[{label:"开始点",value:"showStartPoint"},{label:"结束点",value:"showEndPoint"},{label:"轨迹线",value:"showTrajectory"},{label:"方向箭头",value:"showDirection"}]}})[t]||{};return e.onMounted(()=>{O();const t=h.value.findIndex(l=>l.type==="timeRange");t>=0&&I(t,"week"),setTimeout(N,300)}),(t,l)=>{const s=D.ElDatePicker,r=D.ElCheckbox,u=D.ElIcon,p=D.ElButton,i=D.ElCheckboxGroup,_=D.ElRadio,y=D.ElRadioGroup,V=D.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"trajectory-config-panel",style:e.normalizeStyle(T.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(c,o)=>{var f,b;return e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[c&&c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",le,[e.createElementVNode("span",ae,e.toDisplayString(c.label||"时间段"),1)]),e.createElementVNode("div",ne,[c.showQuickRange?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.quickRangeOptions||w,n=>{var g;return e.openBlock(),e.createElementBlock("span",{key:n.value,class:e.normalizeClass(["range-item",{active:((g=a.value[o])==null?void 0:g.quickRange)===n.value}]),onClick:R=>I(o,n.value)},e.toDisplayString(n.label),11,ce)}),128))])):e.createCommentVNode("",!0),(f=c.granularityOptions)!=null&&f.length?(e.openBlock(),e.createElementBlock("div",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.granularityOptions||[],(n,g)=>{var R;return e.openBlock(),e.createElementBlock("span",{key:(R=n==null?void 0:n.value)!=null?R:"g-"+o+"-"+g,class:e.normalizeClass(["granularity-item",{active:A(o)===(n&&n.value)}]),onClick:Qe=>n&&$(o,n.value)},e.toDisplayString(n==null?void 0:n.label),11,re)}),128))])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(s,{modelValue:a.value[o].startDate,"onUpdate:modelValue":n=>a.value[o].startDate=n,type:c.dateType||"date",placeholder:"开始时间",format:P(c),"value-format":P(c),size:"small",class:"date-picker",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(s,{modelValue:a.value[o].endDate,"onUpdate:modelValue":n=>a.value[o].endDate=n,type:c.dateType||"date",placeholder:"结束时间",format:P(c),"value-format":P(c),size:"small",class:"date-picker",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])])):c&&c.type==="timeList"?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",pe,[e.createElementVNode("span",de,e.toDisplayString(c.label||"采集时间列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(r,{modelValue:a.value[o].selectAll,"onUpdate:modelValue":n=>a.value[o].selectAll=n,onChange:n=>Q(o)},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(p,{size:"small",text:"",onClick:n=>G(o)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Delete))]),_:1}),l[1]||(l[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",ye,[l[2]||(l[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(((b=a.value[o].selectedTimes)==null?void 0:b.length)||0),1),l[3]||(l[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",ge,[e.createVNode(i,{modelValue:a.value[o].selectedTimes,"onUpdate:modelValue":n=>a.value[o].selectedTimes=n,onChange:n=>z(o)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value[o].timeList||[],n=>(e.openBlock(),e.createBlock(r,{key:n,value:n,class:"time-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])])):e.createCommentVNode("",!0)])):c&&c.type==="selectList"?(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("div",fe,[e.createElementVNode("span",ke,e.toDisplayString(c.label||"节点列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",he,[c.multiple?(e.openBlock(),e.createBlock(i,{key:1,modelValue:a.value[o].selectedValues,"onUpdate:modelValue":n=>a.value[o].selectedValues=n,onChange:n=>v()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(r,{key:n.value,value:n.value,class:"depth-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(y,{key:0,modelValue:a.value[o].selectedValue,"onUpdate:modelValue":n=>a.value[o].selectedValue=n,onChange:n=>v()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(_,{key:n.value,value:n.value,class:"depth-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])):e.createCommentVNode("",!0)])):c&&c.type==="direction"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",be,[e.createElementVNode("span",_e,e.toDisplayString(c.label||"位移方向"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createElementBlock("span",{key:n.value,class:e.normalizeClass(["direction-item",{active:a.value[o].selectedValue===n.value}]),onClick:g=>H(o,n.value)},e.toDisplayString(n.label),11,De))),128))])):e.createCommentVNode("",!0)])):c&&c.type==="range"?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("div",Ee,[e.createElementVNode("span",Pe,e.toDisplayString(c.label||"数值区间"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(V,{modelValue:a.value[o].min,"onUpdate:modelValue":n=>a.value[o].min=n,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),l[4]||(l[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(V,{modelValue:a.value[o].max,"onUpdate:modelValue":n=>a.value[o].max=n,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",Ne,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):c&&c.type==="switch"?(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",we,[e.createElementVNode("span",Le,e.toDisplayString(c.label||"显示选项"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(r,{key:n.value,modelValue:a.value[o][n.value],"onUpdate:modelValue":g=>a.value[o][n.value]=g,onChange:g=>v()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)],4)}}})),Fe=B._export_sfc(Ue,[["__scopeId","data-v-e9ece6ff"]]);exports.default=Fe;
|
|
1
|
+
"use strict";var X=Object.defineProperty,J=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var S=(k,m,d)=>m in k?X(k,m,{enumerable:!0,configurable:!0,writable:!0,value:d}):k[m]=d,E=(k,m)=>{for(var d in m||(m={}))Z.call(m,d)&&S(k,d,m[d]);if(Y)for(var d of Y(m))x.call(m,d)&&S(k,d,m[d]);return k},j=(k,m)=>J(k,K(m));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),B=require("./index-EnNA0nIi.cjs"),ee=require("@element-plus/icons-vue"),q=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),te={key:0,class:"config-section time-range-section"},le={class:"section-header"},ae={class:"section-title"},ne={class:"time-range-body"},oe={key:0,class:"quick-range"},ce=["onClick"],se={key:1,class:"granularity-tabs"},re=["onClick"],ie={key:2,class:"date-inputs"},ue={key:1,class:"config-section time-list-section"},pe={class:"section-header"},de={class:"section-title"},me={key:0,class:"time-list-actions"},ye={class:"selected-count"},ge={key:1,class:"time-list"},ve={key:2,class:"config-section"},fe={class:"section-header"},ke={class:"section-title"},he={key:0,class:"node-list"},Ce={key:3,class:"config-section"},be={class:"section-header"},_e={class:"section-title"},Ve={key:0,class:"direction-tabs"},De=["onClick"],Be={key:4,class:"config-section"},Ee={class:"section-header"},Pe={class:"section-title"},Te={key:0,class:"range-inputs"},Ne={key:0,class:"range-unit"},Re={key:5,class:"config-section"},we={class:"section-header"},Le={class:"section-title"},Oe={key:0,class:"display-options"},Ie={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"露天矿控制面板",NAME_EN:"Openpit Control Panel",ORDER:15},Ye={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Se=[{type:"timeRange",label:"时间段",key:"timeRange",targetId:"",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day",multiple:!1,options:[{label:"选项1",value:1}],minPlaceholder:"",maxPlaceholder:"",unit:""}],je=[{key:"type",label:"component.openpitConfigPanel.type",type:"select",options:[{label:"component.openpitConfigPanel.typeOptions.timeRange",value:"timeRange"},{label:"component.openpitConfigPanel.typeOptions.timeList",value:"timeList"},{label:"component.openpitConfigPanel.typeOptions.selectList",value:"selectList"},{label:"component.openpitConfigPanel.typeOptions.direction",value:"direction"},{label:"component.openpitConfigPanel.typeOptions.range",value:"range"},{label:"component.openpitConfigPanel.typeOptions.switch",value:"switch"}]},{key:"label",label:"component.openpitConfigPanel.label",type:"string"},{key:"key",label:"component.openpitConfigPanel.key",type:"string"},{key:"targetId",label:"component.openpitConfigPanel.targetId",type:"string"},{key:"showQuickRange",label:"component.openpitConfigPanel.showQuickRange",type:"switch",dependent:"type",dependentValue:"timeRange"},{key:"dateType",label:"component.openpitConfigPanel.dateType",type:"select",options:[{label:"component.openpitConfigPanel.dateTypeOptions.date",value:"date"},{label:"component.openpitConfigPanel.dateTypeOptions.datetime",value:"datetime"}],dependent:"type",dependentValue:"timeRange"},{key:"defaultGranularity",label:"component.openpitConfigPanel.defaultGranularity",type:"select",options:[{label:"component.openpitConfigPanel.granularityOptionLabels.hour",value:"hour"},{label:"component.openpitConfigPanel.granularityOptionLabels.day",value:"day"}],dependent:"type",dependentValue:"timeRange"},{key:"timeList",label:"component.openpitConfigPanel.timeList",type:"string",dependent:"type",dependentValue:"timeList"},{key:"multiple",label:"component.openpitConfigPanel.multiple",type:"switch",dependent:"type",dependentValue:"selectList"},{key:"options",label:"component.openpitConfigPanel.options",type:"table",columns:[{key:"label",label:"label",type:"string"},{key:"value",label:"value",type:"string"}],dependent:"type",dependentValue:["selectList","direction","switch"]},{key:"minPlaceholder",label:"component.openpitConfigPanel.minPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"maxPlaceholder",label:"component.openpitConfigPanel.maxPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"unit",label:"component.openpitConfigPanel.unit",type:"string",dependent:"type",dependentValue:"range"}],qe=[],Me={useAlias:!1,multiObject:!1,source:""},Ae={DEFAULT:Ie,OPTIONS:Ye,DATA:Se,PARAMS:je,SOURCE:qe,COMMON:Me},Ue=e.defineComponent(j(E({},Ae),{__name:"trajectoryConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(k){e.useCssVars(t=>({ce9154a6:T.value.backgroundColor,v0a86116f:T.value.borderColor,v6d6e1a00:C.value.textColor,v81357e3e:C.value.borderColor,v4e6fb303:C.value.accentColor}));const m=B.useLinkStore(),d=k,C=e.computed(()=>{var u,p,i,_,y,V,c;const{options:t}=d.conf||{},l=((u=t==null?void 0:t.linkChannel)==null?void 0:u.value)||"deepDisplacement",s=((p=t==null?void 0:t.customChannel)==null?void 0:p.value)||"",r=l==="custom"&&s?s:l;return{bindId:((i=t==null?void 0:t.bindId)==null?void 0:i.value)||"",bgColor:((_=t==null?void 0:t.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((y=t==null?void 0:t.textColor)==null?void 0:y.value)||"#333333",accentColor:((V=t==null?void 0:t.accentColor)==null?void 0:V.value)||"#409eff",borderColor:((c=t==null?void 0:t.borderColor)==null?void 0:c.value)||"#e5e5e5",linkChannel:r}}),M=e.computed(()=>{const t=C.value.bindId||d.uid;if(!t){const l=`trajectoryConfigPanel_${Date.now()}`;return console.warn("[TrajectoryConfigPanel] 未配置ID,自动生成:",l),l}return t}),h=e.computed(()=>{var t;return(((t=d.conf)==null?void 0:t.data)||[]).filter(Boolean)}),a=e.ref({}),w=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],P=t=>(t==null?void 0:t.dateType)==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",A=t=>{const l=a.value[t];return l&&typeof l.granularity!="undefined"?l.granularity:"day"},L=(t,l,s)=>{const r=l.format(s);let u=l.subtract(7,"day").format(s);return t==="today"?u=l.startOf("day").format(s):t==="week"?u=l.subtract(7,"day").format(s):t==="month"?u=l.subtract(30,"day").format(s):t==="quarter"?u=l.subtract(90,"day").format(s):t==="year"&&(u=l.subtract(365,"day").format(s)),{startDate:u,endDate:r}},O=()=>{h.value.forEach((t,l)=>{var u,p,i,_,y,V,c;a.value[l]||(a.value[l]={});const s=B.dayjs(),r=t.dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(t.type==="timeRange"){const o=t.quickRangeOptions||w,f=t.defaultQuickRange||((u=o==null?void 0:o[0])==null?void 0:u.value)||"week",b=t.defaultGranularity||((i=(p=t.granularityOptions)==null?void 0:p[0])==null?void 0:i.value)||"",n=L(f,s,r);a.value[l]={quickRange:f,granularity:b,startDate:n.startDate,endDate:n.endDate}}else if(t.type==="timeList"){const o=h.value.findIndex(b=>b.type==="timeRange");let f=[];if(o>=0&&a.value[o]){const b=B.dayjs(a.value[o].startDate);let g=B.dayjs(a.value[o].endDate);for(;g.isAfter(b)||g.isSame(b,"day");)f.push(g.format(r)),g=g.subtract(1,"day")}a.value[l]={timeList:f,selectedTimes:[...f],selectAll:!0}}else if(t.type==="selectList")t.multiple?a.value[l]={selectedValues:[]}:a.value[l]={selectedValue:((y=(_=t.options)==null?void 0:_[0])==null?void 0:y.value)||""};else if(t.type==="direction")a.value[l]={selectedValue:((c=(V=t.options)==null?void 0:V[0])==null?void 0:c.value)||"total"};else if(t.type==="range")a.value[l]={min:"",max:""};else if(t.type==="switch"){const o={};(t.options||[]).forEach(f=>{o[f.value]=f.defaultValue!==!1}),a.value[l]=o}})},T=e.computed(()=>({backgroundColor:C.value.bgColor,color:C.value.textColor,borderColor:C.value.borderColor})),U=()=>{const t={};return h.value.forEach((l,s)=>{if(l.key&&a.value[s]){const r=a.value[s];l.type==="timeRange"?t[l.key]={startDate:r.startDate,endDate:r.endDate,quickRange:r.quickRange,granularity:r.granularity}:l.type==="timeList"?t[l.key]=r.selectedTimes||[]:l.type==="selectList"?t[l.key]=l.multiple?r.selectedValues:r.selectedValue:l.type==="direction"?t[l.key]=r.selectedValue:l.type==="range"?t[l.key]={min:r.min===""?null:parseFloat(r.min),max:r.max===""||r.max==="最大值"?null:parseFloat(r.max)}:l.type==="switch"&&(t[l.key]=E({},r))}}),t},N=()=>{const t=U(),l=M.value,s=h.value;console.log("[TrajectoryConfigPanel] ========== 广播配置 =========="),console.log("[TrajectoryConfigPanel] 当前面板ID:",l),console.log("[TrajectoryConfigPanel] props.uid:",d.uid),console.log("[TrajectoryConfigPanel] bindId配置:",C.value.bindId),console.log("[TrajectoryConfigPanel] 配置内容:",t),console.log("[TrajectoryConfigPanel] 配置模块数量:",s.length);const r=C.value.linkChannel||"deepDisplacement";l?(console.log(`[TrajectoryConfigPanel] 📡 广播配置到频道 ${r}:`,{objectId:l,type:"filter",filter:t}),m.publish(r,"trajectoryConfigPanel",E({objectId:l,type:"filter",filter:t},t))):console.warn("[TrajectoryConfigPanel] ⚠️ 无法广播:面板ID为空"),s.forEach((u,p)=>{const i=u.targetId;if(!i)return;i.split(",").map(y=>y.trim()).filter(y=>y).forEach(y=>{console.log(`[TrajectoryConfigPanel] 🎯 直接绑定到图表 [${p}]:`,y,t),m.publish(r,"trajectoryConfigPanel",E({objectId:y,type:"filter",filter:t},t))})}),console.log("[TrajectoryConfigPanel] ========== 广播完成 ==========")},I=(t,l)=>{const s=h.value[t];if(!s||s.type!=="timeRange"||!a.value[t])return;const r=B.dayjs(),u=s.dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";a.value[t].quickRange=l;const p=L(l,r,u);a.value[t].startDate=p.startDate,a.value[t].endDate=p.endDate,F(),v()},F=()=>{const t=h.value.findIndex(s=>s.type==="timeRange"),l=h.value.findIndex(s=>s.type==="timeList");if(t>=0&&l>=0&&a.value[t]){const s=h.value[t].dateType==="datetime"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",r=B.dayjs(a.value[t].startDate),u=B.dayjs(a.value[t].endDate),p=[];let i=u;for(;i.isAfter(r)||i.isSame(r,"day");)p.push(i.format(s)),i=i.subtract(1,"day");a.value[l]||(a.value[l]={}),a.value[l].timeList=p,a.value[l].selectedTimes=[...p],a.value[l].selectAll=!0}},Q=t=>{if(!a.value[t])return;const l=a.value[t].selectAll;a.value[t].selectedTimes=l?[...a.value[t].timeList]:[],v()},G=t=>{a.value[t]&&(a.value[t].selectedTimes=[],a.value[t].selectAll=!1,v())},z=t=>{if(!a.value[t])return;const l=a.value[t].timeList||[],s=a.value[t].selectedTimes||[];a.value[t].selectAll=s.length===l.length,v()},H=(t,l)=>{a.value[t]&&(a.value[t].selectedValue=l,v())},$=(t,l)=>{a.value[t]&&(a.value[t].granularity=l,v())},v=t=>{N()};e.watch(()=>{var t;return(t=d.conf)==null?void 0:t.data},()=>{O(),setTimeout(N,300)},{deep:!0,immediate:!0,flush:"sync"}),e.watch(()=>{var t;return(t=d.conf)==null?void 0:t.data},(t,l)=>{t&&t.forEach((s,r)=>{const u=l==null?void 0:l[r];if(s.type&&(!u||s.type!==u.type)){const p=W(s.type);Object.keys(p).forEach(i=>{(!s[i]||s[i]===""||Array.isArray(s[i])&&s[i].length===0)&&(s[i]=p[i])})}})},{deep:!0});const W=t=>({timeRange:{label:"时间段",key:"timeRange",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day"},timeList:{label:"时间列表",key:"timeList"},selectList:{label:"节点列表",key:"nodeList",multiple:!1,options:[{label:"选项1",value:1}]},direction:{label:"位移方向",key:"direction",options:[{label:"合",value:"total"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}]},range:{label:"数值区间",key:"range",minPlaceholder:"最小值",maxPlaceholder:"最大值",unit:""},switch:{label:"显示选项",key:"displayOptions",options:[{label:"开始点",value:"showStartPoint"},{label:"结束点",value:"showEndPoint"},{label:"轨迹线",value:"showTrajectory"},{label:"方向箭头",value:"showDirection"}]}})[t]||{};return e.onMounted(()=>{O();const t=h.value.findIndex(l=>l.type==="timeRange");t>=0&&I(t,"week"),setTimeout(N,300)}),(t,l)=>{const s=D.ElDatePicker,r=D.ElCheckbox,u=D.ElIcon,p=D.ElButton,i=D.ElCheckboxGroup,_=D.ElRadio,y=D.ElRadioGroup,V=D.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"trajectory-config-panel",style:e.normalizeStyle(T.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(c,o)=>{var f,b;return e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[c&&c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",le,[e.createElementVNode("span",ae,e.toDisplayString(c.label||"时间段"),1)]),e.createElementVNode("div",ne,[c.showQuickRange?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.quickRangeOptions||w,n=>{var g;return e.openBlock(),e.createElementBlock("span",{key:n.value,class:e.normalizeClass(["range-item",{active:((g=a.value[o])==null?void 0:g.quickRange)===n.value}]),onClick:R=>I(o,n.value)},e.toDisplayString(n.label),11,ce)}),128))])):e.createCommentVNode("",!0),(f=c.granularityOptions)!=null&&f.length?(e.openBlock(),e.createElementBlock("div",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.granularityOptions||[],(n,g)=>{var R;return e.openBlock(),e.createElementBlock("span",{key:(R=n==null?void 0:n.value)!=null?R:"g-"+o+"-"+g,class:e.normalizeClass(["granularity-item",{active:A(o)===(n&&n.value)}]),onClick:Qe=>n&&$(o,n.value)},e.toDisplayString(n==null?void 0:n.label),11,re)}),128))])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(s,{modelValue:a.value[o].startDate,"onUpdate:modelValue":n=>a.value[o].startDate=n,type:c.dateType||"date",placeholder:"开始时间",format:P(c),"value-format":P(c),size:"small",class:"date-picker",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(s,{modelValue:a.value[o].endDate,"onUpdate:modelValue":n=>a.value[o].endDate=n,type:c.dateType||"date",placeholder:"结束时间",format:P(c),"value-format":P(c),size:"small",class:"date-picker",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])])):c&&c.type==="timeList"?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",pe,[e.createElementVNode("span",de,e.toDisplayString(c.label||"采集时间列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(r,{modelValue:a.value[o].selectAll,"onUpdate:modelValue":n=>a.value[o].selectAll=n,onChange:n=>Q(o)},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(p,{size:"small",text:"",onClick:n=>G(o)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Delete))]),_:1}),l[1]||(l[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",ye,[l[2]||(l[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(((b=a.value[o].selectedTimes)==null?void 0:b.length)||0),1),l[3]||(l[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",ge,[e.createVNode(i,{modelValue:a.value[o].selectedTimes,"onUpdate:modelValue":n=>a.value[o].selectedTimes=n,onChange:n=>z(o)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value[o].timeList||[],n=>(e.openBlock(),e.createBlock(r,{key:n,value:n,class:"time-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])])):e.createCommentVNode("",!0)])):c&&c.type==="selectList"?(e.openBlock(),e.createElementBlock("div",ve,[e.createElementVNode("div",fe,[e.createElementVNode("span",ke,e.toDisplayString(c.label||"节点列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",he,[c.multiple?(e.openBlock(),e.createBlock(i,{key:1,modelValue:a.value[o].selectedValues,"onUpdate:modelValue":n=>a.value[o].selectedValues=n,onChange:n=>v()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(r,{key:n.value,value:n.value,class:"depth-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(y,{key:0,modelValue:a.value[o].selectedValue,"onUpdate:modelValue":n=>a.value[o].selectedValue=n,onChange:n=>v()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(_,{key:n.value,value:n.value,class:"depth-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])):e.createCommentVNode("",!0)])):c&&c.type==="direction"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",be,[e.createElementVNode("span",_e,e.toDisplayString(c.label||"位移方向"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createElementBlock("span",{key:n.value,class:e.normalizeClass(["direction-item",{active:a.value[o].selectedValue===n.value}]),onClick:g=>H(o,n.value)},e.toDisplayString(n.label),11,De))),128))])):e.createCommentVNode("",!0)])):c&&c.type==="range"?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("div",Ee,[e.createElementVNode("span",Pe,e.toDisplayString(c.label||"数值区间"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(V,{modelValue:a.value[o].min,"onUpdate:modelValue":n=>a.value[o].min=n,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),l[4]||(l[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(V,{modelValue:a.value[o].max,"onUpdate:modelValue":n=>a.value[o].max=n,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:n=>v()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",Ne,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):c&&c.type==="switch"?(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",we,[e.createElementVNode("span",Le,e.toDisplayString(c.label||"显示选项"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],n=>(e.openBlock(),e.createBlock(r,{key:n.value,modelValue:a.value[o][n.value],"onUpdate:modelValue":g=>a.value[o][n.value]=g,onChange:g=>v()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)],4)}}})),Fe=B._export_sfc(Ue,[["__scopeId","data-v-e9ece6ff"]]);exports.default=Fe;
|
|
@@ -11,13 +11,13 @@ var rt = (v, c, x) => c in v ? At(v, c, { enumerable: !0, configurable: !0, writ
|
|
|
11
11
|
return v;
|
|
12
12
|
}, ut = (v, c) => Tt(v, Pt(c));
|
|
13
13
|
import { defineComponent as Dt, computed as K, ref as $, watch as mt, watchEffect as Et, onMounted as Lt, onBeforeUnmount as zt, openBlock as Z, createElementBlock as G, normalizeStyle as q, unref as R, toDisplayString as ht, createCommentVNode as Kt, createElementVNode as w, normalizeClass as yt, Fragment as $t, renderList as Rt, renderSlot as jt, nextTick as gt } from "vue";
|
|
14
|
-
import { d as ft, C as Ht, i as Yt } from "./element-resize-detector-
|
|
15
|
-
import { u as Xt, _ as Bt } from "./index-
|
|
16
|
-
import { E as Ut } from "./EChartComponentBase-
|
|
14
|
+
import { d as ft, C as Ht, i as Yt } from "./element-resize-detector-DeMhGbNi.js";
|
|
15
|
+
import { u as Xt, _ as Bt } from "./index-zPaMBZk-.js";
|
|
16
|
+
import { E as Ut } from "./EChartComponentBase-GBbKjtlb.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
|
-
import {
|
|
20
|
-
import {
|
|
19
|
+
import { u as qt, i as Jt, a as Qt } from "./installCanvasRenderer-CLT2hquJ.js";
|
|
20
|
+
import { i as te } from "./install-BBrAry2m.js";
|
|
21
21
|
import { i as ee } from "./install-FDYiy_gL.js";
|
|
22
22
|
import { i as ne } from "./install-8XfFtnlL.js";
|
|
23
23
|
const ie = { class: "mix-body" }, le = { class: "chart-wrap" }, ae = ["id"], se = { class: "timeline-left" }, oe = {
|
|
@@ -107,7 +107,7 @@ const ie = { class: "mix-body" }, le = { class: "chart-wrap" }, ae = ["id"], se
|
|
|
107
107
|
theme: { type: String, default: "light" }
|
|
108
108
|
},
|
|
109
109
|
setup(v) {
|
|
110
|
-
|
|
110
|
+
qt([te, Jt, Qt, ee, ne]);
|
|
111
111
|
const c = v, x = Xt();
|
|
112
112
|
let j = null;
|
|
113
113
|
class xt extends Ut {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ct=Object.defineProperty,bt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var it=Object.getOwnPropertySymbols;var kt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable;var lt=(x,u,d)=>u in x?Ct(x,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):x[u]=d,at=(x,u)=>{for(var d in u||(u={}))kt.call(u,d)&<(x,d,u[d]);if(it)for(var d of it(u))_t.call(u,d)&<(x,d,u[d]);return x},st=(x,u)=>bt(x,Ot(u));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),Y=require("./element-resize-detector-Bo5uDQAu.cjs"),rt=require("./index-Mh5Dw2sd.cjs"),It=require("./EChartComponentBase-BaQpBzVC.cjs"),Vt=require("./titleStyle-NSnz6cUg.cjs"),ot=require("./ele-circleBar-icon-Da0-L9sa.cjs"),Tt=require("./install-C8buXQPI.cjs"),X=require("./installCanvasRenderer-CyhM1Qpl.cjs"),At=require("./install-ByPD0oOh.cjs"),Et=require("./install-CYwVETsi.cjs"),Pt={class:"mix-body"},Ft={class:"chart-wrap"},zt=["id"],Dt={class:"timeline-left"},wt={class:"timeline-track",ref:"trackRef"},Lt=["onClick"],Kt={DEFAULT_ICON:ot.DEFAULT_ICON,ACTIVE_ICON:ot.ACTIVE_ICON,NAME_CN:"动态轨迹分布图",NAME_EN:"TrajectoryScatter",ORDER:1},Rt={titleColor:"#111",textColor:"#111",bgColor:"#fff",radiusSize:8,textSize:12,isHideTitle:!1,top:30,bottom:50,left:50,right:30,xName:{value:"x",type:"string",label:"setting.trajectoryScatter_xName"},yName:{value:"y",type:"string",label:"setting.trajectoryScatter_yName"},showTrail:{value:!0,type:"switch",label:"setting.trajectoryScatter_showTrail"},trailLength:{value:30,type:"number",label:"setting.trajectoryScatter_trailLength",dependent:"showTrail"},points:{value:12,type:"number",label:"setting.trajectoryScatter_points"},autoPlay:{value:!0,type:"switch",label:"setting.trajectoryScatter_autoPlay"},interval:{value:1e3,type:"number",label:"setting.trajectoryScatter_interval",dependent:"autoPlay"},timelineHeight:{value:36,type:"number",label:"setting.trajectoryScatter_timelineHeight"},dotSize:{value:10,type:"number",label:"setting.trajectoryScatter_dotSize"},activeDotColor:{value:"#4162ff",type:"color",label:"setting.trajectoryScatter_activeDotColor"},dotColor:{value:"#c7c7c7",type:"color",label:"setting.trajectoryScatter_dotColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}},listenXKey:{value:"elevation",type:"string",label:"setting.trajectoryScatter_listenXKey"},listenYKey:{value:"speed",type:"string",label:"setting.trajectoryScatter_listenYKey"},listenTimeKey:{value:"",type:"string",label:"setting.trajectoryScatter_listenTimeKey"},useMock:{value:!0,type:"switch",label:"setting.trajectoryScatter_useMock"},mockCount:{value:12,type:"number",label:"setting.trajectoryScatter_mockCount",dependent:"useMock"},xMin:{value:"",type:"string",label:"setting.trajectoryScatter_xMin"},xMax:{value:"",type:"string",label:"setting.trajectoryScatter_xMax"},yMin:{value:"",type:"string",label:"setting.trajectoryScatter_yMin"},yMax:{value:"",type:"string",label:"setting.trajectoryScatter_yMax"},lockAxis:{value:!0,type:"switch",label:"setting.trajectoryScatter_lockAxis"}},ct=[{name:"轨迹点",fv_x:"elevation",fv_y:"speed",color:"#ff5a5f",object_id:""}],$t=["name","fv_x","fv_y","object_id","color"],jt=["mosaic","statistics","calculate"],Bt={useAlias:!1,multiObject:!0,source:"mosaic"},Ht={DEFAULT:Kt,OPTIONS:Rt,DATA:ct,PARAMS:$t,SOURCE:jt,COMMON:Bt},Yt=o.defineComponent(st(at({},Ht),{__name:"trajectoryScatter",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(x){X.use([Tt.install,X.install,X.install$1,At.install,Et.install]);const u=x,d=rt.useLinkStore();let K=null;class ut extends It.EChartComponentBase{extractStyles(){const e=this.getOptionValue("linkChannel","deepDisplacement"),n=this.getOptionValue("customChannel",""),i=e==="custom"&&n?n:e;return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),top:this.getOptionValue("top",30),bottom:this.getOptionValue("bottom",50),left:this.getOptionValue("left",50),right:this.getOptionValue("right",30),xName:this.getOptionValue("xName","x"),yName:this.getOptionValue("yName","y"),showTrail:this.getOptionValue("showTrail",!0),trailLength:this.getOptionValue("trailLength",30),points:this.getOptionValue("points",12),autoPlay:this.getOptionValue("autoPlay",!0),interval:this.getOptionValue("interval",1e3),timelineHeight:this.getOptionValue("timelineHeight",36),dotSize:this.getOptionValue("dotSize",10),activeDotColor:this.getOptionValue("activeDotColor","#4162ff"),dotColor:this.getOptionValue("dotColor","#c7c7c7"),linkChannel:i,listenXKey:this.getOptionValue("listenXKey","elevation"),listenYKey:this.getOptionValue("listenYKey","speed"),listenTimeKey:this.getOptionValue("listenTimeKey",""),useMock:this.getOptionValue("useMock",!0),mockCount:this.getOptionValue("mockCount",12),lockAxis:this.getOptionValue("lockAxis",!0),xMin:this.getOptionValue("xMin",""),xMax:this.getOptionValue("xMax",""),yMin:this.getOptionValue("yMin",""),yMax:this.getOptionValue("yMax","")}}init(){var e;this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=ct),o.nextTick(()=>this.initChart())}getChartOption(){var l,r,m,c,v,S;const{options:e}=this.props.conf,n=((l=e==null?void 0:e.xName)==null?void 0:l.value)||this.Style.value.xName,i=((r=e==null?void 0:e.yName)==null?void 0:r.value)||this.Style.value.yName,a=xt.value,s=(a==null?void 0:a.color)||Y.COLORS[0];return{grid:{top:this.Style.value.top,bottom:this.Style.value.bottom,left:this.Style.value.left,right:this.Style.value.right,containLabel:!0},tooltip:{trigger:"item"},xAxis:{type:"value",name:n,min:(m=M.value)==null?void 0:m.xMin,max:(c=M.value)==null?void 0:c.xMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},yAxis:{type:"value",name:i,min:(v=M.value)==null?void 0:v.yMin,max:(S=M.value)==null?void 0:S.yMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},series:[{name:"points",type:"scatter",data:yt.value,symbolSize:8,itemStyle:{color:s,opacity:.45}},{name:"current",type:"scatter",data:a?[[a.x,a.y]]:[],symbolSize:12,itemStyle:{color:s}},{name:"trail",type:"line",showSymbol:!1,smooth:!1,data:this.Style.value.showTrail?dt.value:[],lineStyle:{color:s,width:2,opacity:.6},silent:!0}]}}setHistoryData(e){et(e)}setSocketData(e){e&&et(e)}onLinkEvent(e){tt(e)}}const f=new ut(u,"trajectoryScatter"),mt=f.getEchartId();f.setupLifecycle();const p=f.getStyle(),ht=o.computed(()=>Vt.generateTitleStyle(u.conf.options)),A=o.ref([]),R=t=>typeof t=="number"&&Number.isFinite(t),yt=o.computed(()=>{var e,n;return(((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[]).map(i=>[Number(i==null?void 0:i.x),Number(i==null?void 0:i.y)]).filter(i=>R(i==null?void 0:i[0])&&R(i==null?void 0:i[1]))}),gt=o.computed(()=>{var n;const t=((n=u.conf)==null?void 0:n.runtime)||{},e=t.allPoints||t.points||[];return Array.isArray(e)?e:[]}),M=o.ref(null),U=o.ref(null),$=t=>{if(t===""||t===null||t===void 0)return null;const e=Number(t);return isNaN(e)?null:e},Z=(t,e,n)=>{var a,s,l,r,m,c;return n&&t&&t[n]!==void 0?t[n]:n&&e&&e[n]!==void 0?e[n]:(c=(m=(r=(l=(s=(a=t==null?void 0:t.time)!=null?a:t==null?void 0:t.timestamp)!=null?s:t==null?void 0:t.datetime)!=null?l:e==null?void 0:e.time)!=null?r:e==null?void 0:e.timestamp)!=null?m:e==null?void 0:e.datetime)!=null?c:e==null?void 0:e.datatime},vt=t=>{if(t==null)return"";const e=Number(t);if(Number.isFinite(e)&&String(t).length>=12)try{const i=new Date(e),a=i.getFullYear(),s=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),r=String(i.getHours()).padStart(2,"0"),m=String(i.getMinutes()).padStart(2,"0"),c=String(i.getSeconds()).padStart(2,"0");return`${a}-${s}-${l} ${r}:${m}:${c}`}catch(i){return String(t)}const n=String(t);if(n.includes(" ")||n.includes("T")){const i=n.replace("T"," "),[a,s]=i.split(" ");if(s){const[l,r,m]=s.split(":");if(l!==void 0&&r!==void 0&&m!==void 0)return`${a} ${l}:${r}:${m.slice(0,2)}`}}return n},ft=t=>{if(!(t!=null&&t.length))return null;let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(t.forEach(r=>{const m=Number(r==null?void 0:r.x),c=Number(r==null?void 0:r.y);isNaN(m)||(e=Math.min(e,m),n=Math.max(n,m)),isNaN(c)||(i=Math.min(i,c),a=Math.max(a,c))}),!isFinite(e)||!isFinite(n)||!isFinite(i)||!isFinite(a))return null;const s=(n-e)*.1||1,l=(a-i)*.1||1;return{xMin:e-s,xMax:n+s,yMin:i-l,yMax:a+l}},j=()=>{var m,c,v,S,F,N,C,b,O,k,_,I,V,T,g,h,y;const t=((m=u.conf)==null?void 0:m.options)||{};if(!((v=(c=t==null?void 0:t.lockAxis)==null?void 0:c.value)!=null?v:f.getStyle().value.lockAxis)){M.value=null;return}const n=$((F=(S=t==null?void 0:t.xMin)==null?void 0:S.value)!=null?F:f.getStyle().value.xMin),i=$((C=(N=t==null?void 0:t.xMax)==null?void 0:N.value)!=null?C:f.getStyle().value.xMax),a=$((O=(b=t==null?void 0:t.yMin)==null?void 0:b.value)!=null?O:f.getStyle().value.yMin),s=$((_=(k=t==null?void 0:t.yMax)==null?void 0:k.value)!=null?_:f.getStyle().value.yMax);if(n!==null||i!==null||a!==null||s!==null){M.value={xMin:n!==null?Math.min(n,0):void 0,xMax:i!==null?Math.max(i,0):void 0,yMin:a!==null?Math.min(a,0):void 0,yMax:s!==null?Math.max(s,0):void 0};return}if(M.value)return;const l=((V=(I=u.conf)==null?void 0:I.runtime)==null?void 0:V.points)||[],r=ft(l);if(!r){M.value={xMin:0,xMax:10,yMin:0,yMax:10};return}M.value={xMin:Math.min((T=r.xMin)!=null?T:0,0),xMax:Math.max((g=r.xMax)!=null?g:0,0),yMin:Math.min((h=r.yMin)!=null?h:0,0),yMax:Math.max((y=r.yMax)!=null?y:0,0)}},E=o.ref(0),z=o.ref(!1),xt=o.computed(()=>{var e,n;const t=((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[];return t[t.length-1]||null}),dt=o.computed(()=>{var i,a,s,l,r,m;const t=((a=(i=u.conf)==null?void 0:i.runtime)==null?void 0:a.points)||[],e=Number((m=(r=(l=(s=u.conf)==null?void 0:s.options)==null?void 0:l.trailLength)==null?void 0:r.value)!=null?m:p.value.trailLength),n=Math.max(0,t.length-Math.max(1,e));return t.slice(n).map(c=>[Number(c==null?void 0:c.x),Number(c==null?void 0:c.y)]).filter(c=>R(c==null?void 0:c[0])&&R(c==null?void 0:c[1]))}),D=()=>{const t=gt.value;A.value=t.map((e,n)=>{var i;return vt((i=e.t)!=null?i:n)}),E.value>=A.value.length&&(E.value=Math.max(0,A.value.length-1))},G=t=>{if(!t||t.seriesName!=="points"&&t.seriesName!=="current")return;const e=u.conf;if(!e.runtime)return;const n=e.runtime.allPoints,i=e.runtime.points||[];if(!Array.isArray(i)||!i.length)return;let a=0;if(Array.isArray(n)&&n.length>=i.length){const s=n.length-i.length,l=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s+l,n.length-1))}else{const s=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s,i.length-1))}P(),q(a)},w=()=>{o.nextTick(()=>{const t=f.getChartInstance();t&&(t.setOption(f.getChartOption(),!0),t.off("click",G),t.on("click",G))})},q=t=>{var l,r,m,c;const e=u.conf;e.runtime||(e.runtime={});const n=e.runtime.allPoints||[];if(!Array.isArray(n)||!n.length)return;const i=Math.max(1,Number((c=(m=(r=(l=e.options)==null?void 0:l.points)==null?void 0:r.value)!=null?m:p.value.points)!=null?c:200)),a=Math.max(0,Math.min(t,n.length-1)),s=Math.max(0,a-i+1);e.runtime.points=n.slice(s,a+1),E.value=a,j(),D(),w()},pt=t=>{P(),q(t)},P=()=>{z.value=!1,K&&(clearInterval(K),K=null)},W=()=>{var e,n,i,a;P(),z.value=!0;const t=Number((a=(i=(n=(e=u.conf)==null?void 0:e.options)==null?void 0:n.interval)==null?void 0:i.value)!=null?a:p.value.interval);K=setInterval(()=>{var r;const s=u.conf,l=((r=s==null?void 0:s.runtime)==null?void 0:r.allPoints)||[];if(!(!Array.isArray(l)||!l.length)){if(E.value>=l.length-1){P();return}q(E.value+1)}},Math.max(200,t))},St=()=>{A.value.length&&(z.value?P():W())},J=t=>{U.value!==t&&(U.value=t,M.value=null)},B=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=(s=(a=t==null?void 0:t.autoPlay)==null?void 0:a.value)!=null?s:p.value.autoPlay,n=A.value.length>1;if(e&&n){z.value||W();return}z.value&&P()},Q=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=((a=t==null?void 0:t.linkChannel)==null?void 0:a.value)||p.value.linkChannel||"deepDisplacement",n=((s=t==null?void 0:t.customChannel)==null?void 0:s.value)||"";return e==="custom"&&n?n:e};o.watch(()=>d.channels[Q()],t=>{t&&tt(t)},{deep:!0});const Mt=t=>{var i,a,s,l;const e=u.conf;e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),e.runtime.points.push(t);const n=Math.max(1,Number((l=(s=(a=(i=e.options)==null?void 0:i.points)==null?void 0:a.value)!=null?s:p.value.points)!=null?l:200));e.runtime.points.length>n&&e.runtime.points.shift()},tt=t=>{var N,C,b,O,k,_,I,V,T;if(J("link"),u.mode==="edit"||!t)return;const e=Q();if((N=t.topic)!=null&&N.channel&&e&&t.topic.channel!==e||!d.shouldHandle(t,"trajectoryScatter"))return;const n=t.payload||{},i=u.conf,a=(i==null?void 0:i.data)||[],s=(i==null?void 0:i.common)||{};if(a.length>0&&!(s!=null&&s.multiObject)){const g=Y.getObjectId(s,s==null?void 0:s.useAlias,u.uid)||((C=a[0])==null?void 0:C.object_id),h=(n==null?void 0:n.objectId)||(n==null?void 0:n.object_id);if(g&&h&&String(g)!==String(h))return}const l=((b=u.conf)==null?void 0:b.options)||{},r=((O=l==null?void 0:l.listenXKey)==null?void 0:O.value)||p.value.listenXKey||"elevation",m=((k=l==null?void 0:l.listenYKey)==null?void 0:k.value)||p.value.listenYKey||"speed",c=((_=l==null?void 0:l.listenTimeKey)==null?void 0:_.value)||p.value.listenTimeKey||"",v=Number(n==null?void 0:n[r]),S=Number(n==null?void 0:n[m]),F=Z(n,t.topic,c);if(!Number.isFinite(v)||!Number.isFinite(S)){console.warn("[trajectoryScatter] 联动数据无法解析为数字,已跳过该点:",{channel:e,xKey:r,yKey:m,tKey:c,xRaw:n==null?void 0:n[r],yRaw:n==null?void 0:n[m],payload:n});return}Mt({x:v,y:S,t:F,color:(T=(V=(I=u.conf)==null?void 0:I.data)==null?void 0:V[0])==null?void 0:T.color}),j(),D(),E.value=Math.max(0,A.value.length-1),w(),B()},et=t=>{var N,C,b,O,k,_,I,V,T;J("incoming");const e=u.conf,n=e.data||[],i=e.common||e.COMMON||e.common,a=e.options||{},s=(i==null?void 0:i.source)||"mosaic";let l=(N=t==null?void 0:t.payload)!=null?N:t;["statistics","calculate"].includes(s)&&(l=Y.formatStatisticsResult(l,n));const r=[],m=(n==null?void 0:n[0])||{},c=m.xFv||"x",v=m.yFv||"y",S=m.timeFv||"time",F=m.color;if((C=l==null?void 0:l.history)!=null&&C.length)l.history.forEach((g,h)=>{var nt;const y=(g==null?void 0:g[0])||g||{},L=Number(y==null?void 0:y[c]),H=Number(y==null?void 0:y[v]),Nt=(nt=y==null?void 0:y[S])!=null?nt:h;if(!Number.isFinite(L)||!Number.isFinite(H)){console.warn("[trajectoryScatter] history 点位字段无法解析为数字,已跳过:",{xKey:c,yKey:v,tKey:S,xRaw:y==null?void 0:y[c],yRaw:y==null?void 0:y[v],obj:y});return}r.push({x:L,y:H,t:Nt,color:F})});else if(l&&typeof l=="object"){const g=i!=null&&i.multiObject?"":Y.getObjectId(i,i==null?void 0:i.useAlias,u.uid),h=g&&((O=(b=l==null?void 0:l[g])==null?void 0:b[s])==null?void 0:O.data)||((k=l==null?void 0:l[s])==null?void 0:k.data)||(l==null?void 0:l.data)||l,y=Number(h==null?void 0:h[c]),L=Number(h==null?void 0:h[v]),H=Z(h,l,S);!Number.isFinite(y)||!Number.isFinite(L)?console.warn("[trajectoryScatter] 实时点位字段无法解析为数字,已跳过:",{objectId:g,source:s,xKey:c,yKey:v,tKey:S,xRaw:h==null?void 0:h[c],yRaw:h==null?void 0:h[v],objKeys:h&&typeof h=="object"?Object.keys(h).slice(0,50):void 0,obj:h,payload:l}):r.push({x:y,y:L,t:H,color:F})}if(e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),(_=l==null?void 0:l.history)!=null&&_.length)e.runtime.points=r;else if(r.length){e.runtime.points=[...e.runtime.points,...r];const g=Math.max(1,Number((T=(V=(I=a==null?void 0:a.points)==null?void 0:I.value)!=null?V:f.getStyle().value.points)!=null?T:200));e.runtime.points.length>g&&(e.runtime.points=e.runtime.points.slice(e.runtime.points.length-g))}D(),w(),B()};return o.watchEffect(()=>{u.conf.socketData&&f.setSocketData(u.conf.socketData)}),o.watch(()=>{var t;return(t=u.conf)==null?void 0:t.options},()=>{f.getStyle().value=f.extractStyles(),j(),D(),w(),B()},{deep:!0}),o.onMounted(()=>{const t=u.conf;t&&t.runtime&&(t.runtime.points=[],t.runtime.allPoints=[]),j(),D(),w(),B()}),o.onBeforeUnmount(()=>{P()}),(t,e)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(p).bgColor,borderRadius:`${o.unref(p).radiusSize}px`})},[o.unref(p).isHideTitle?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-title",style:o.normalizeStyle(ht.value)},o.toDisplayString(x.conf.caption||x.conf.name),5)),o.createElementVNode("div",Pt,[o.createElementVNode("div",Ft,[o.createElementVNode("div",{class:"echart-container",id:o.unref(mt)},null,8,zt)]),o.createElementVNode("div",{class:"timeline",style:o.normalizeStyle({height:`${o.unref(p).timelineHeight}px`})},[o.createElementVNode("div",Dt,[o.createElementVNode("div",{class:o.normalizeClass(["play",{active:z.value}]),onClick:St},"II",2)]),o.createElementVNode("div",wt,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(n,i)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(["time-item",{active:i===E.value}]),onClick:a=>pt(i)},o.toDisplayString(n),11,Lt))),128))],512)],4)]),o.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),qt=rt._export_sfc(Yt,[["__scopeId","data-v-20eb6dcc"]]);exports.default=qt;
|
|
1
|
+
"use strict";var Ct=Object.defineProperty,bt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var it=Object.getOwnPropertySymbols;var kt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable;var lt=(x,u,d)=>u in x?Ct(x,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):x[u]=d,at=(x,u)=>{for(var d in u||(u={}))kt.call(u,d)&<(x,d,u[d]);if(it)for(var d of it(u))_t.call(u,d)&<(x,d,u[d]);return x},st=(x,u)=>bt(x,Ot(u));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),Y=require("./element-resize-detector-BlMXyWIR.cjs"),rt=require("./index-EnNA0nIi.cjs"),It=require("./EChartComponentBase-BTqBoBn8.cjs"),Vt=require("./titleStyle-NSnz6cUg.cjs"),ot=require("./ele-circleBar-icon-Da0-L9sa.cjs"),X=require("./installCanvasRenderer-CyhM1Qpl.cjs"),Tt=require("./install-C8buXQPI.cjs"),At=require("./install-ByPD0oOh.cjs"),Et=require("./install-CYwVETsi.cjs"),Pt={class:"mix-body"},Ft={class:"chart-wrap"},zt=["id"],Dt={class:"timeline-left"},wt={class:"timeline-track",ref:"trackRef"},Lt=["onClick"],Kt={DEFAULT_ICON:ot.DEFAULT_ICON,ACTIVE_ICON:ot.ACTIVE_ICON,NAME_CN:"动态轨迹分布图",NAME_EN:"TrajectoryScatter",ORDER:1},Rt={titleColor:"#111",textColor:"#111",bgColor:"#fff",radiusSize:8,textSize:12,isHideTitle:!1,top:30,bottom:50,left:50,right:30,xName:{value:"x",type:"string",label:"setting.trajectoryScatter_xName"},yName:{value:"y",type:"string",label:"setting.trajectoryScatter_yName"},showTrail:{value:!0,type:"switch",label:"setting.trajectoryScatter_showTrail"},trailLength:{value:30,type:"number",label:"setting.trajectoryScatter_trailLength",dependent:"showTrail"},points:{value:12,type:"number",label:"setting.trajectoryScatter_points"},autoPlay:{value:!0,type:"switch",label:"setting.trajectoryScatter_autoPlay"},interval:{value:1e3,type:"number",label:"setting.trajectoryScatter_interval",dependent:"autoPlay"},timelineHeight:{value:36,type:"number",label:"setting.trajectoryScatter_timelineHeight"},dotSize:{value:10,type:"number",label:"setting.trajectoryScatter_dotSize"},activeDotColor:{value:"#4162ff",type:"color",label:"setting.trajectoryScatter_activeDotColor"},dotColor:{value:"#c7c7c7",type:"color",label:"setting.trajectoryScatter_dotColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}},listenXKey:{value:"elevation",type:"string",label:"setting.trajectoryScatter_listenXKey"},listenYKey:{value:"speed",type:"string",label:"setting.trajectoryScatter_listenYKey"},listenTimeKey:{value:"",type:"string",label:"setting.trajectoryScatter_listenTimeKey"},useMock:{value:!0,type:"switch",label:"setting.trajectoryScatter_useMock"},mockCount:{value:12,type:"number",label:"setting.trajectoryScatter_mockCount",dependent:"useMock"},xMin:{value:"",type:"string",label:"setting.trajectoryScatter_xMin"},xMax:{value:"",type:"string",label:"setting.trajectoryScatter_xMax"},yMin:{value:"",type:"string",label:"setting.trajectoryScatter_yMin"},yMax:{value:"",type:"string",label:"setting.trajectoryScatter_yMax"},lockAxis:{value:!0,type:"switch",label:"setting.trajectoryScatter_lockAxis"}},ct=[{name:"轨迹点",fv_x:"elevation",fv_y:"speed",color:"#ff5a5f",object_id:""}],$t=["name","fv_x","fv_y","object_id","color"],jt=["mosaic","statistics","calculate"],Bt={useAlias:!1,multiObject:!0,source:"mosaic"},Ht={DEFAULT:Kt,OPTIONS:Rt,DATA:ct,PARAMS:$t,SOURCE:jt,COMMON:Bt},Yt=o.defineComponent(st(at({},Ht),{__name:"trajectoryScatter",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(x){X.use([Tt.install,X.install,X.install$1,At.install,Et.install]);const u=x,d=rt.useLinkStore();let K=null;class ut extends It.EChartComponentBase{extractStyles(){const e=this.getOptionValue("linkChannel","deepDisplacement"),n=this.getOptionValue("customChannel",""),i=e==="custom"&&n?n:e;return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),top:this.getOptionValue("top",30),bottom:this.getOptionValue("bottom",50),left:this.getOptionValue("left",50),right:this.getOptionValue("right",30),xName:this.getOptionValue("xName","x"),yName:this.getOptionValue("yName","y"),showTrail:this.getOptionValue("showTrail",!0),trailLength:this.getOptionValue("trailLength",30),points:this.getOptionValue("points",12),autoPlay:this.getOptionValue("autoPlay",!0),interval:this.getOptionValue("interval",1e3),timelineHeight:this.getOptionValue("timelineHeight",36),dotSize:this.getOptionValue("dotSize",10),activeDotColor:this.getOptionValue("activeDotColor","#4162ff"),dotColor:this.getOptionValue("dotColor","#c7c7c7"),linkChannel:i,listenXKey:this.getOptionValue("listenXKey","elevation"),listenYKey:this.getOptionValue("listenYKey","speed"),listenTimeKey:this.getOptionValue("listenTimeKey",""),useMock:this.getOptionValue("useMock",!0),mockCount:this.getOptionValue("mockCount",12),lockAxis:this.getOptionValue("lockAxis",!0),xMin:this.getOptionValue("xMin",""),xMax:this.getOptionValue("xMax",""),yMin:this.getOptionValue("yMin",""),yMax:this.getOptionValue("yMax","")}}init(){var e;this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=ct),o.nextTick(()=>this.initChart())}getChartOption(){var l,r,m,c,v,S;const{options:e}=this.props.conf,n=((l=e==null?void 0:e.xName)==null?void 0:l.value)||this.Style.value.xName,i=((r=e==null?void 0:e.yName)==null?void 0:r.value)||this.Style.value.yName,a=xt.value,s=(a==null?void 0:a.color)||Y.COLORS[0];return{grid:{top:this.Style.value.top,bottom:this.Style.value.bottom,left:this.Style.value.left,right:this.Style.value.right,containLabel:!0},tooltip:{trigger:"item"},xAxis:{type:"value",name:n,min:(m=M.value)==null?void 0:m.xMin,max:(c=M.value)==null?void 0:c.xMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},yAxis:{type:"value",name:i,min:(v=M.value)==null?void 0:v.yMin,max:(S=M.value)==null?void 0:S.yMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},series:[{name:"points",type:"scatter",data:yt.value,symbolSize:8,itemStyle:{color:s,opacity:.45}},{name:"current",type:"scatter",data:a?[[a.x,a.y]]:[],symbolSize:12,itemStyle:{color:s}},{name:"trail",type:"line",showSymbol:!1,smooth:!1,data:this.Style.value.showTrail?dt.value:[],lineStyle:{color:s,width:2,opacity:.6},silent:!0}]}}setHistoryData(e){et(e)}setSocketData(e){e&&et(e)}onLinkEvent(e){tt(e)}}const f=new ut(u,"trajectoryScatter"),mt=f.getEchartId();f.setupLifecycle();const p=f.getStyle(),ht=o.computed(()=>Vt.generateTitleStyle(u.conf.options)),A=o.ref([]),R=t=>typeof t=="number"&&Number.isFinite(t),yt=o.computed(()=>{var e,n;return(((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[]).map(i=>[Number(i==null?void 0:i.x),Number(i==null?void 0:i.y)]).filter(i=>R(i==null?void 0:i[0])&&R(i==null?void 0:i[1]))}),gt=o.computed(()=>{var n;const t=((n=u.conf)==null?void 0:n.runtime)||{},e=t.allPoints||t.points||[];return Array.isArray(e)?e:[]}),M=o.ref(null),U=o.ref(null),$=t=>{if(t===""||t===null||t===void 0)return null;const e=Number(t);return isNaN(e)?null:e},Z=(t,e,n)=>{var a,s,l,r,m,c;return n&&t&&t[n]!==void 0?t[n]:n&&e&&e[n]!==void 0?e[n]:(c=(m=(r=(l=(s=(a=t==null?void 0:t.time)!=null?a:t==null?void 0:t.timestamp)!=null?s:t==null?void 0:t.datetime)!=null?l:e==null?void 0:e.time)!=null?r:e==null?void 0:e.timestamp)!=null?m:e==null?void 0:e.datetime)!=null?c:e==null?void 0:e.datatime},vt=t=>{if(t==null)return"";const e=Number(t);if(Number.isFinite(e)&&String(t).length>=12)try{const i=new Date(e),a=i.getFullYear(),s=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),r=String(i.getHours()).padStart(2,"0"),m=String(i.getMinutes()).padStart(2,"0"),c=String(i.getSeconds()).padStart(2,"0");return`${a}-${s}-${l} ${r}:${m}:${c}`}catch(i){return String(t)}const n=String(t);if(n.includes(" ")||n.includes("T")){const i=n.replace("T"," "),[a,s]=i.split(" ");if(s){const[l,r,m]=s.split(":");if(l!==void 0&&r!==void 0&&m!==void 0)return`${a} ${l}:${r}:${m.slice(0,2)}`}}return n},ft=t=>{if(!(t!=null&&t.length))return null;let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(t.forEach(r=>{const m=Number(r==null?void 0:r.x),c=Number(r==null?void 0:r.y);isNaN(m)||(e=Math.min(e,m),n=Math.max(n,m)),isNaN(c)||(i=Math.min(i,c),a=Math.max(a,c))}),!isFinite(e)||!isFinite(n)||!isFinite(i)||!isFinite(a))return null;const s=(n-e)*.1||1,l=(a-i)*.1||1;return{xMin:e-s,xMax:n+s,yMin:i-l,yMax:a+l}},j=()=>{var m,c,v,S,F,N,C,b,O,k,_,I,V,T,g,h,y;const t=((m=u.conf)==null?void 0:m.options)||{};if(!((v=(c=t==null?void 0:t.lockAxis)==null?void 0:c.value)!=null?v:f.getStyle().value.lockAxis)){M.value=null;return}const n=$((F=(S=t==null?void 0:t.xMin)==null?void 0:S.value)!=null?F:f.getStyle().value.xMin),i=$((C=(N=t==null?void 0:t.xMax)==null?void 0:N.value)!=null?C:f.getStyle().value.xMax),a=$((O=(b=t==null?void 0:t.yMin)==null?void 0:b.value)!=null?O:f.getStyle().value.yMin),s=$((_=(k=t==null?void 0:t.yMax)==null?void 0:k.value)!=null?_:f.getStyle().value.yMax);if(n!==null||i!==null||a!==null||s!==null){M.value={xMin:n!==null?Math.min(n,0):void 0,xMax:i!==null?Math.max(i,0):void 0,yMin:a!==null?Math.min(a,0):void 0,yMax:s!==null?Math.max(s,0):void 0};return}if(M.value)return;const l=((V=(I=u.conf)==null?void 0:I.runtime)==null?void 0:V.points)||[],r=ft(l);if(!r){M.value={xMin:0,xMax:10,yMin:0,yMax:10};return}M.value={xMin:Math.min((T=r.xMin)!=null?T:0,0),xMax:Math.max((g=r.xMax)!=null?g:0,0),yMin:Math.min((h=r.yMin)!=null?h:0,0),yMax:Math.max((y=r.yMax)!=null?y:0,0)}},E=o.ref(0),z=o.ref(!1),xt=o.computed(()=>{var e,n;const t=((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[];return t[t.length-1]||null}),dt=o.computed(()=>{var i,a,s,l,r,m;const t=((a=(i=u.conf)==null?void 0:i.runtime)==null?void 0:a.points)||[],e=Number((m=(r=(l=(s=u.conf)==null?void 0:s.options)==null?void 0:l.trailLength)==null?void 0:r.value)!=null?m:p.value.trailLength),n=Math.max(0,t.length-Math.max(1,e));return t.slice(n).map(c=>[Number(c==null?void 0:c.x),Number(c==null?void 0:c.y)]).filter(c=>R(c==null?void 0:c[0])&&R(c==null?void 0:c[1]))}),D=()=>{const t=gt.value;A.value=t.map((e,n)=>{var i;return vt((i=e.t)!=null?i:n)}),E.value>=A.value.length&&(E.value=Math.max(0,A.value.length-1))},G=t=>{if(!t||t.seriesName!=="points"&&t.seriesName!=="current")return;const e=u.conf;if(!e.runtime)return;const n=e.runtime.allPoints,i=e.runtime.points||[];if(!Array.isArray(i)||!i.length)return;let a=0;if(Array.isArray(n)&&n.length>=i.length){const s=n.length-i.length,l=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s+l,n.length-1))}else{const s=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s,i.length-1))}P(),q(a)},w=()=>{o.nextTick(()=>{const t=f.getChartInstance();t&&(t.setOption(f.getChartOption(),!0),t.off("click",G),t.on("click",G))})},q=t=>{var l,r,m,c;const e=u.conf;e.runtime||(e.runtime={});const n=e.runtime.allPoints||[];if(!Array.isArray(n)||!n.length)return;const i=Math.max(1,Number((c=(m=(r=(l=e.options)==null?void 0:l.points)==null?void 0:r.value)!=null?m:p.value.points)!=null?c:200)),a=Math.max(0,Math.min(t,n.length-1)),s=Math.max(0,a-i+1);e.runtime.points=n.slice(s,a+1),E.value=a,j(),D(),w()},pt=t=>{P(),q(t)},P=()=>{z.value=!1,K&&(clearInterval(K),K=null)},W=()=>{var e,n,i,a;P(),z.value=!0;const t=Number((a=(i=(n=(e=u.conf)==null?void 0:e.options)==null?void 0:n.interval)==null?void 0:i.value)!=null?a:p.value.interval);K=setInterval(()=>{var r;const s=u.conf,l=((r=s==null?void 0:s.runtime)==null?void 0:r.allPoints)||[];if(!(!Array.isArray(l)||!l.length)){if(E.value>=l.length-1){P();return}q(E.value+1)}},Math.max(200,t))},St=()=>{A.value.length&&(z.value?P():W())},J=t=>{U.value!==t&&(U.value=t,M.value=null)},B=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=(s=(a=t==null?void 0:t.autoPlay)==null?void 0:a.value)!=null?s:p.value.autoPlay,n=A.value.length>1;if(e&&n){z.value||W();return}z.value&&P()},Q=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=((a=t==null?void 0:t.linkChannel)==null?void 0:a.value)||p.value.linkChannel||"deepDisplacement",n=((s=t==null?void 0:t.customChannel)==null?void 0:s.value)||"";return e==="custom"&&n?n:e};o.watch(()=>d.channels[Q()],t=>{t&&tt(t)},{deep:!0});const Mt=t=>{var i,a,s,l;const e=u.conf;e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),e.runtime.points.push(t);const n=Math.max(1,Number((l=(s=(a=(i=e.options)==null?void 0:i.points)==null?void 0:a.value)!=null?s:p.value.points)!=null?l:200));e.runtime.points.length>n&&e.runtime.points.shift()},tt=t=>{var N,C,b,O,k,_,I,V,T;if(J("link"),u.mode==="edit"||!t)return;const e=Q();if((N=t.topic)!=null&&N.channel&&e&&t.topic.channel!==e||!d.shouldHandle(t,"trajectoryScatter"))return;const n=t.payload||{},i=u.conf,a=(i==null?void 0:i.data)||[],s=(i==null?void 0:i.common)||{};if(a.length>0&&!(s!=null&&s.multiObject)){const g=Y.getObjectId(s,s==null?void 0:s.useAlias,u.uid)||((C=a[0])==null?void 0:C.object_id),h=(n==null?void 0:n.objectId)||(n==null?void 0:n.object_id);if(g&&h&&String(g)!==String(h))return}const l=((b=u.conf)==null?void 0:b.options)||{},r=((O=l==null?void 0:l.listenXKey)==null?void 0:O.value)||p.value.listenXKey||"elevation",m=((k=l==null?void 0:l.listenYKey)==null?void 0:k.value)||p.value.listenYKey||"speed",c=((_=l==null?void 0:l.listenTimeKey)==null?void 0:_.value)||p.value.listenTimeKey||"",v=Number(n==null?void 0:n[r]),S=Number(n==null?void 0:n[m]),F=Z(n,t.topic,c);if(!Number.isFinite(v)||!Number.isFinite(S)){console.warn("[trajectoryScatter] 联动数据无法解析为数字,已跳过该点:",{channel:e,xKey:r,yKey:m,tKey:c,xRaw:n==null?void 0:n[r],yRaw:n==null?void 0:n[m],payload:n});return}Mt({x:v,y:S,t:F,color:(T=(V=(I=u.conf)==null?void 0:I.data)==null?void 0:V[0])==null?void 0:T.color}),j(),D(),E.value=Math.max(0,A.value.length-1),w(),B()},et=t=>{var N,C,b,O,k,_,I,V,T;J("incoming");const e=u.conf,n=e.data||[],i=e.common||e.COMMON||e.common,a=e.options||{},s=(i==null?void 0:i.source)||"mosaic";let l=(N=t==null?void 0:t.payload)!=null?N:t;["statistics","calculate"].includes(s)&&(l=Y.formatStatisticsResult(l,n));const r=[],m=(n==null?void 0:n[0])||{},c=m.xFv||"x",v=m.yFv||"y",S=m.timeFv||"time",F=m.color;if((C=l==null?void 0:l.history)!=null&&C.length)l.history.forEach((g,h)=>{var nt;const y=(g==null?void 0:g[0])||g||{},L=Number(y==null?void 0:y[c]),H=Number(y==null?void 0:y[v]),Nt=(nt=y==null?void 0:y[S])!=null?nt:h;if(!Number.isFinite(L)||!Number.isFinite(H)){console.warn("[trajectoryScatter] history 点位字段无法解析为数字,已跳过:",{xKey:c,yKey:v,tKey:S,xRaw:y==null?void 0:y[c],yRaw:y==null?void 0:y[v],obj:y});return}r.push({x:L,y:H,t:Nt,color:F})});else if(l&&typeof l=="object"){const g=i!=null&&i.multiObject?"":Y.getObjectId(i,i==null?void 0:i.useAlias,u.uid),h=g&&((O=(b=l==null?void 0:l[g])==null?void 0:b[s])==null?void 0:O.data)||((k=l==null?void 0:l[s])==null?void 0:k.data)||(l==null?void 0:l.data)||l,y=Number(h==null?void 0:h[c]),L=Number(h==null?void 0:h[v]),H=Z(h,l,S);!Number.isFinite(y)||!Number.isFinite(L)?console.warn("[trajectoryScatter] 实时点位字段无法解析为数字,已跳过:",{objectId:g,source:s,xKey:c,yKey:v,tKey:S,xRaw:h==null?void 0:h[c],yRaw:h==null?void 0:h[v],objKeys:h&&typeof h=="object"?Object.keys(h).slice(0,50):void 0,obj:h,payload:l}):r.push({x:y,y:L,t:H,color:F})}if(e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),(_=l==null?void 0:l.history)!=null&&_.length)e.runtime.points=r;else if(r.length){e.runtime.points=[...e.runtime.points,...r];const g=Math.max(1,Number((T=(V=(I=a==null?void 0:a.points)==null?void 0:I.value)!=null?V:f.getStyle().value.points)!=null?T:200));e.runtime.points.length>g&&(e.runtime.points=e.runtime.points.slice(e.runtime.points.length-g))}D(),w(),B()};return o.watchEffect(()=>{u.conf.socketData&&f.setSocketData(u.conf.socketData)}),o.watch(()=>{var t;return(t=u.conf)==null?void 0:t.options},()=>{f.getStyle().value=f.extractStyles(),j(),D(),w(),B()},{deep:!0}),o.onMounted(()=>{const t=u.conf;t&&t.runtime&&(t.runtime.points=[],t.runtime.allPoints=[]),j(),D(),w(),B()}),o.onBeforeUnmount(()=>{P()}),(t,e)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(p).bgColor,borderRadius:`${o.unref(p).radiusSize}px`})},[o.unref(p).isHideTitle?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-title",style:o.normalizeStyle(ht.value)},o.toDisplayString(x.conf.caption||x.conf.name),5)),o.createElementVNode("div",Pt,[o.createElementVNode("div",Ft,[o.createElementVNode("div",{class:"echart-container",id:o.unref(mt)},null,8,zt)]),o.createElementVNode("div",{class:"timeline",style:o.normalizeStyle({height:`${o.unref(p).timelineHeight}px`})},[o.createElementVNode("div",Dt,[o.createElementVNode("div",{class:o.normalizeClass(["play",{active:z.value}]),onClick:St},"II",2)]),o.createElementVNode("div",wt,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(n,i)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(["time-item",{active:i===E.value}]),onClick:a=>pt(i)},o.toDisplayString(n),11,Lt))),128))],512)],4)]),o.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),qt=rt._export_sfc(Yt,[["__scopeId","data-v-20eb6dcc"]]);exports.default=qt;
|
|
@@ -21,7 +21,7 @@ import "element-plus/es/components/icon/style/css";
|
|
|
21
21
|
import "element-plus/es/components/checkbox/style/css";
|
|
22
22
|
import "element-plus/es/components/date-picker/style/css";
|
|
23
23
|
import { defineComponent as ie, useCssVars as ve, computed as A, ref as pe, watch as me, onMounted as fe, openBlock as c, createElementBlock as v, normalizeStyle as he, Fragment as I, renderList as w, createElementVNode as p, toDisplayString as y, normalizeClass as T, createCommentVNode as D, createVNode as k, withCtx as C, createTextVNode as V, unref as ge, createBlock as Y, resolveDynamicComponent as ye, renderSlot as _e } from "vue";
|
|
24
|
-
import { u as Ce, d as j, _ as be } from "./index-
|
|
24
|
+
import { u as Ce, d as j, _ as be } from "./index-zPaMBZk-.js";
|
|
25
25
|
import { A as ke, D as Ve } from "./ele-ctrSet-icon-BtKGrCid.js";
|
|
26
26
|
import { Delete as De } from "@element-plus/icons-vue";
|
|
27
27
|
const Ye = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var O=Object.defineProperty,z=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var U=(m,i,v)=>i in m?O(m,i,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[i]=v,b=(m,i)=>{for(var v in i||(i={}))G.call(i,v)&&U(m,v,i[v]);if(q)for(var v of q(i))Q.call(i,v)&&U(m,v,i[v]);return m},N=(m,i)=>z(m,j(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),E=require("./index-Mh5Dw2sd.cjs"),F=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),W=require("@element-plus/icons-vue"),J={key:0,class:"config-section"},K={class:"section-header"},X={class:"section-title"},Z={key:0,class:"granularity-switch"},$=["onClick"],x=["onClick"],ee={key:0,class:"quick-range"},le=["onClick"],te={key:1,class:"date-inputs"},ae={key:1,class:"config-section"},oe={class:"section-header"},ne={class:"section-title"},se={key:0,class:"list-actions"},ce={class:"selected-count"},re={class:"select-list"},ue={key:2,class:"config-section"},de={class:"section-header"},ie={class:"section-title"},ve={class:"switch-options"},pe={key:3,class:"config-section"},me={class:"section-header"},fe={class:"section-title"},ke={class:"range-inputs"},ge={key:0,class:"range-unit"},he={key:4,class:"config-section"},ye={DEFAULT_ICON:F.DEFAULT_ICON,ACTIVE_ICON:F.ACTIVE_ICON,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20},Ce={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},bindMode:{value:"channel",type:"select",label:"绑定模式",options:[{label:"频道模式",value:"channel"},{label:"直接绑定",value:"direct"}]},linkChannel:{value:"deepDisplacement",type:"select",label:"联动频道",options:[{label:"深部位移",value:"deepDisplacement"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},_e=[{type:"timeRange",label:"时间段",key:"timeRange",targetIds:"",showGranularity:!0,showQuickRange:!0,dateType:"datetime",dateFormat:"YYYY-MM-DD HH:mm:ss"},{type:"selectList",label:"节点列表",key:"nodeList",targetIds:"",multiple:!1,options:[{label:"-123米",value:-123},{label:"-126米",value:-126},{label:"-129米",value:-129}]}],Ve=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],be=[],Ee={useAlias:!1,multiObject:!1,source:""},De={DEFAULT:ye,OPTIONS:Ce,DATA:_e,PARAMS:Ve,SOURCE:be,COMMON:Ee},Be=e.defineComponent(N(b({},De),{__name:"universalConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(m){e.useCssVars(l=>({v4ab6e686:D.value.backgroundColor,v1e19f6c8:D.value.borderColor,v59892072:p.value.textColor,v16aba7e8:p.value.borderColor,b493cbec:p.value.accentColor}));const i=E.useLinkStore(),v=m,p=e.computed(()=>{var u,d,f,_,V,y,s,n;const{options:l}=v.conf||{},t=((u=l==null?void 0:l.linkChannel)==null?void 0:u.value)||"deepDisplacement",r=((d=l==null?void 0:l.customChannel)==null?void 0:d.value)||"",c=t==="custom"&&r?r:t;return{bindId:((f=l==null?void 0:l.bindId)==null?void 0:f.value)||"",bgColor:((_=l==null?void 0:l.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((V=l==null?void 0:l.textColor)==null?void 0:V.value)||"#333333",accentColor:((y=l==null?void 0:l.accentColor)==null?void 0:y.value)||"#409eff",borderColor:((s=l==null?void 0:l.borderColor)==null?void 0:s.value)||"#e5e5e5",bindMode:((n=l==null?void 0:l.bindMode)==null?void 0:n.value)||"channel",linkChannel:c}}),S=e.computed(()=>p.value.bindId||v.uid||""),g=e.computed(()=>{var l;return(((l=v.conf)==null?void 0:l.data)||[]).filter(Boolean)}),a=e.ref({}),R=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],D=e.computed(()=>({backgroundColor:p.value.bgColor,color:p.value.textColor,borderColor:p.value.borderColor})),I=l=>{const t=a.value[l];return t&&typeof t.granularity!="undefined"?t.granularity:"day"},Y=()=>{a.value={},g.value.forEach((l,t)=>{var r,c,u;if(a.value[t]={},l.type==="timeRange"){a.value[t]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const d=E.dayjs();a.value[t].endDate=d.format(l.dateFormat||"YYYY-MM-DD HH:mm:ss"),a.value[t].startDate=d.subtract(7,"day").format(l.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(l.type==="selectList")a.value[t]={selectedValues:l.multiple?[]:"",selectedValue:l.multiple?void 0:((c=(r=l.options)==null?void 0:r[0])==null?void 0:c.value)||"",selectAll:!1},l.multiple&&l.options&&(a.value[t].selectedValues=l.options.map(d=>d.value),a.value[t].selectAll=!0);else if(l.type==="switch"){const d={};(u=l.options)==null||u.forEach(f=>{d[f.value]=f.defaultValue!==!1}),a.value[t]=d}else l.type==="range"&&(a.value[t]={min:"",max:""})})},w=()=>{const l={};return g.value.forEach((t,r)=>{if(t.key&&a.value[r]){const c=a.value[r];t.type==="timeRange"?l[t.key]={granularity:c.granularity,startDate:c.startDate,endDate:c.endDate,quickRange:c.quickRange}:t.type==="selectList"?l[t.key]=t.multiple?c.selectedValues:c.selectedValue:t.type==="switch"?l[t.key]=b({},c):t.type==="range"&&(l[t.key]={min:c.min===""?null:parseFloat(c.min),max:c.max===""?null:parseFloat(c.max)})}}),l},B=()=>{const l=w(),t=S.value,r=p.value.bindMode,c=p.value.linkChannel;t&&(console.log("[UniversalConfigPanel] 广播配置:",{id:t,bindMode:r,linkChannel:c,config:l}),r==="channel"?i.publish(c,"universalConfigPanel",{objectId:t,type:"config",fv:l}):g.value.forEach(u=>{if(!u.targetIds)return;u.targetIds.split(",").map(f=>f.trim()).filter(Boolean).forEach(f=>{i.publish(c,"universalConfigPanel",{objectId:f,type:"bindConfig",fv:N(b({},l),{[u.key]:l[u.key]})})})}))},M=(l,t)=>{a.value[l]&&(a.value[l].granularity=t,k())},A=(l,t)=>{if(!a.value[l])return;const r=g.value[l],c=E.dayjs(),u=r.dateFormat||"YYYY-MM-DD HH:mm:ss";a.value[l].quickRange=t,a.value[l].endDate=c.format(u),t==="week"?a.value[l].startDate=c.subtract(7,"day").format(u):t==="month"?a.value[l].startDate=c.subtract(30,"day").format(u):t==="quarter"&&(a.value[l].startDate=c.subtract(90,"day").format(u)),k()},k=l=>{B()},H=l=>{var r;const t=g.value[l];!t.multiple||!a.value[l]||(a.value[l].selectAll?a.value[l].selectedValues=((r=t.options)==null?void 0:r.map(c=>c.value))||[]:a.value[l].selectedValues=[],k())},P=l=>{a.value[l]&&(a.value[l].selectedValues=[],a.value[l].selectAll=!1,k())},T=l=>{var r;const t=g.value[l];t.multiple&&a.value[l]&&(a.value[l].selectAll=a.value[l].selectedValues.length===(((r=t.options)==null?void 0:r.length)||0)),k()},L=l=>{var c;const t=g.value[l],r=w();p.value.bindMode==="channel"?i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:S.value,type:"action",action:t.key,fv:r}):(((c=t.targetIds)==null?void 0:c.split(",").map(d=>d.trim()).filter(Boolean))||[]).forEach(d=>{i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:d,type:"action",action:t.key,fv:r})})};return e.watch(g,()=>{Y(),setTimeout(B,300)},{immediate:!0,deep:!0,flush:"sync"}),e.onMounted(()=>{Y(),setTimeout(B,300)}),(l,t)=>{const r=h.ElDatePicker,c=h.ElCheckbox,u=h.ElIcon,d=h.ElButton,f=h.ElCheckboxGroup,_=h.ElRadio,V=h.ElRadioGroup,y=h.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"universal-config-panel",style:e.normalizeStyle(D.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(s,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[s&&s.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",K,[e.createElementVNode("span",X,e.toDisplayString(s.label||"时间段"),1),s.showGranularity&&a.value[n]?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:I(n)==="day"}]),onClick:o=>M(n,"day")}," 日均 ",10,$),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:I(n)==="hour"}]),onClick:o=>M(n,"hour")}," 小时 ",10,x)])):e.createCommentVNode("",!0)]),s.showQuickRange&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(R,o=>{var C;return e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:((C=a.value[n])==null?void 0:C.quickRange)===o.value}]),onClick:Se=>A(n,o.value)},e.toDisplayString(o.label),11,le)}),64))])):e.createCommentVNode("",!0),a.value[n]?(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(r,{modelValue:a.value[n].startDate,"onUpdate:modelValue":o=>a.value[n].startDate=o,type:s.dateType||"datetime",placeholder:"开始时间",format:s.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":s.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(r,{modelValue:a.value[n].endDate,"onUpdate:modelValue":o=>a.value[n].endDate=o,type:s.dateType||"datetime",placeholder:"结束时间",format:s.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":s.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])):s&&s.type==="selectList"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",oe,[e.createElementVNode("span",ne,e.toDisplayString(s.label||"选择列表"),1)]),s.multiple?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(c,{modelValue:a.value[n].selectAll,"onUpdate:modelValue":o=>a.value[n].selectAll=o,onChange:o=>H(n)},{default:e.withCtx(()=>[...t[0]||(t[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(d,{size:"small",text:"",onClick:o=>P(n)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(W.Delete))]),_:1}),t[1]||(t[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",ce,[t[2]||(t[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(a.value[n].selectedValues&&a.value[n].selectedValues.length||0),1),t[3]||(t[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",re,[s.multiple?(e.openBlock(),e.createBlock(f,{key:0,modelValue:a.value[n].selectedValues,"onUpdate:modelValue":o=>a.value[n].selectedValues=o,onChange:o=>T(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(c,{key:o.value,value:o.value,class:"list-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(V,{key:1,modelValue:a.value[n].selectedValue,"onUpdate:modelValue":o=>a.value[n].selectedValue=o,onChange:o=>T(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(_,{key:o.value,value:o.value,class:"list-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])])):s&&s.type==="switch"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",de,[e.createElementVNode("span",ie,e.toDisplayString(s.label||"开关"),1)]),e.createElementVNode("div",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(c,{key:o.value,modelValue:a.value[n][o.value],"onUpdate:modelValue":C=>a.value[n][o.value]=C,onChange:C=>k()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):s&&s.type==="range"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",me,[e.createElementVNode("span",fe,e.toDisplayString(s.label||"范围设置"),1)]),e.createElementVNode("div",ke,[e.createVNode(y,{modelValue:a.value[n].min,"onUpdate:modelValue":o=>a.value[n].min=o,size:"small",placeholder:s.minPlaceholder||"最小值",class:"range-input",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),t[4]||(t[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(y,{modelValue:a.value[n].max,"onUpdate:modelValue":o=>a.value[n].max=o,size:"small",placeholder:s.maxPlaceholder||"最大值",class:"range-input",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),s.unit?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(s.unit),1)):e.createCommentVNode("",!0)])])):s&&s.type==="button"?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(d,{size:"small",onClick:o=>L(n),class:"action-btn",type:s.buttonType||"primary"},{default:e.withCtx(()=>[s.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.icon)))]),_:2},1024)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(s.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ne=E._export_sfc(Be,[["__scopeId","data-v-50871f8e"]]);exports.default=Ne;
|
|
1
|
+
"use strict";var O=Object.defineProperty,z=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var U=(m,i,v)=>i in m?O(m,i,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[i]=v,b=(m,i)=>{for(var v in i||(i={}))G.call(i,v)&&U(m,v,i[v]);if(q)for(var v of q(i))Q.call(i,v)&&U(m,v,i[v]);return m},N=(m,i)=>z(m,j(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),E=require("./index-EnNA0nIi.cjs"),F=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),W=require("@element-plus/icons-vue"),J={key:0,class:"config-section"},K={class:"section-header"},X={class:"section-title"},Z={key:0,class:"granularity-switch"},$=["onClick"],x=["onClick"],ee={key:0,class:"quick-range"},le=["onClick"],te={key:1,class:"date-inputs"},ae={key:1,class:"config-section"},oe={class:"section-header"},ne={class:"section-title"},se={key:0,class:"list-actions"},ce={class:"selected-count"},re={class:"select-list"},ue={key:2,class:"config-section"},de={class:"section-header"},ie={class:"section-title"},ve={class:"switch-options"},pe={key:3,class:"config-section"},me={class:"section-header"},fe={class:"section-title"},ke={class:"range-inputs"},ge={key:0,class:"range-unit"},he={key:4,class:"config-section"},ye={DEFAULT_ICON:F.DEFAULT_ICON,ACTIVE_ICON:F.ACTIVE_ICON,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20},Ce={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},bindMode:{value:"channel",type:"select",label:"绑定模式",options:[{label:"频道模式",value:"channel"},{label:"直接绑定",value:"direct"}]},linkChannel:{value:"deepDisplacement",type:"select",label:"联动频道",options:[{label:"深部位移",value:"deepDisplacement"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},_e=[{type:"timeRange",label:"时间段",key:"timeRange",targetIds:"",showGranularity:!0,showQuickRange:!0,dateType:"datetime",dateFormat:"YYYY-MM-DD HH:mm:ss"},{type:"selectList",label:"节点列表",key:"nodeList",targetIds:"",multiple:!1,options:[{label:"-123米",value:-123},{label:"-126米",value:-126},{label:"-129米",value:-129}]}],Ve=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],be=[],Ee={useAlias:!1,multiObject:!1,source:""},De={DEFAULT:ye,OPTIONS:Ce,DATA:_e,PARAMS:Ve,SOURCE:be,COMMON:Ee},Be=e.defineComponent(N(b({},De),{__name:"universalConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(m){e.useCssVars(l=>({v4ab6e686:D.value.backgroundColor,v1e19f6c8:D.value.borderColor,v59892072:p.value.textColor,v16aba7e8:p.value.borderColor,b493cbec:p.value.accentColor}));const i=E.useLinkStore(),v=m,p=e.computed(()=>{var u,d,f,_,V,y,s,n;const{options:l}=v.conf||{},t=((u=l==null?void 0:l.linkChannel)==null?void 0:u.value)||"deepDisplacement",r=((d=l==null?void 0:l.customChannel)==null?void 0:d.value)||"",c=t==="custom"&&r?r:t;return{bindId:((f=l==null?void 0:l.bindId)==null?void 0:f.value)||"",bgColor:((_=l==null?void 0:l.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((V=l==null?void 0:l.textColor)==null?void 0:V.value)||"#333333",accentColor:((y=l==null?void 0:l.accentColor)==null?void 0:y.value)||"#409eff",borderColor:((s=l==null?void 0:l.borderColor)==null?void 0:s.value)||"#e5e5e5",bindMode:((n=l==null?void 0:l.bindMode)==null?void 0:n.value)||"channel",linkChannel:c}}),S=e.computed(()=>p.value.bindId||v.uid||""),g=e.computed(()=>{var l;return(((l=v.conf)==null?void 0:l.data)||[]).filter(Boolean)}),a=e.ref({}),R=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],D=e.computed(()=>({backgroundColor:p.value.bgColor,color:p.value.textColor,borderColor:p.value.borderColor})),I=l=>{const t=a.value[l];return t&&typeof t.granularity!="undefined"?t.granularity:"day"},Y=()=>{a.value={},g.value.forEach((l,t)=>{var r,c,u;if(a.value[t]={},l.type==="timeRange"){a.value[t]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const d=E.dayjs();a.value[t].endDate=d.format(l.dateFormat||"YYYY-MM-DD HH:mm:ss"),a.value[t].startDate=d.subtract(7,"day").format(l.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(l.type==="selectList")a.value[t]={selectedValues:l.multiple?[]:"",selectedValue:l.multiple?void 0:((c=(r=l.options)==null?void 0:r[0])==null?void 0:c.value)||"",selectAll:!1},l.multiple&&l.options&&(a.value[t].selectedValues=l.options.map(d=>d.value),a.value[t].selectAll=!0);else if(l.type==="switch"){const d={};(u=l.options)==null||u.forEach(f=>{d[f.value]=f.defaultValue!==!1}),a.value[t]=d}else l.type==="range"&&(a.value[t]={min:"",max:""})})},w=()=>{const l={};return g.value.forEach((t,r)=>{if(t.key&&a.value[r]){const c=a.value[r];t.type==="timeRange"?l[t.key]={granularity:c.granularity,startDate:c.startDate,endDate:c.endDate,quickRange:c.quickRange}:t.type==="selectList"?l[t.key]=t.multiple?c.selectedValues:c.selectedValue:t.type==="switch"?l[t.key]=b({},c):t.type==="range"&&(l[t.key]={min:c.min===""?null:parseFloat(c.min),max:c.max===""?null:parseFloat(c.max)})}}),l},B=()=>{const l=w(),t=S.value,r=p.value.bindMode,c=p.value.linkChannel;t&&(console.log("[UniversalConfigPanel] 广播配置:",{id:t,bindMode:r,linkChannel:c,config:l}),r==="channel"?i.publish(c,"universalConfigPanel",{objectId:t,type:"config",fv:l}):g.value.forEach(u=>{if(!u.targetIds)return;u.targetIds.split(",").map(f=>f.trim()).filter(Boolean).forEach(f=>{i.publish(c,"universalConfigPanel",{objectId:f,type:"bindConfig",fv:N(b({},l),{[u.key]:l[u.key]})})})}))},M=(l,t)=>{a.value[l]&&(a.value[l].granularity=t,k())},A=(l,t)=>{if(!a.value[l])return;const r=g.value[l],c=E.dayjs(),u=r.dateFormat||"YYYY-MM-DD HH:mm:ss";a.value[l].quickRange=t,a.value[l].endDate=c.format(u),t==="week"?a.value[l].startDate=c.subtract(7,"day").format(u):t==="month"?a.value[l].startDate=c.subtract(30,"day").format(u):t==="quarter"&&(a.value[l].startDate=c.subtract(90,"day").format(u)),k()},k=l=>{B()},H=l=>{var r;const t=g.value[l];!t.multiple||!a.value[l]||(a.value[l].selectAll?a.value[l].selectedValues=((r=t.options)==null?void 0:r.map(c=>c.value))||[]:a.value[l].selectedValues=[],k())},P=l=>{a.value[l]&&(a.value[l].selectedValues=[],a.value[l].selectAll=!1,k())},T=l=>{var r;const t=g.value[l];t.multiple&&a.value[l]&&(a.value[l].selectAll=a.value[l].selectedValues.length===(((r=t.options)==null?void 0:r.length)||0)),k()},L=l=>{var c;const t=g.value[l],r=w();p.value.bindMode==="channel"?i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:S.value,type:"action",action:t.key,fv:r}):(((c=t.targetIds)==null?void 0:c.split(",").map(d=>d.trim()).filter(Boolean))||[]).forEach(d=>{i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:d,type:"action",action:t.key,fv:r})})};return e.watch(g,()=>{Y(),setTimeout(B,300)},{immediate:!0,deep:!0,flush:"sync"}),e.onMounted(()=>{Y(),setTimeout(B,300)}),(l,t)=>{const r=h.ElDatePicker,c=h.ElCheckbox,u=h.ElIcon,d=h.ElButton,f=h.ElCheckboxGroup,_=h.ElRadio,V=h.ElRadioGroup,y=h.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"universal-config-panel",style:e.normalizeStyle(D.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(s,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[s&&s.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",K,[e.createElementVNode("span",X,e.toDisplayString(s.label||"时间段"),1),s.showGranularity&&a.value[n]?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:I(n)==="day"}]),onClick:o=>M(n,"day")}," 日均 ",10,$),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:I(n)==="hour"}]),onClick:o=>M(n,"hour")}," 小时 ",10,x)])):e.createCommentVNode("",!0)]),s.showQuickRange&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(R,o=>{var C;return e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:((C=a.value[n])==null?void 0:C.quickRange)===o.value}]),onClick:Se=>A(n,o.value)},e.toDisplayString(o.label),11,le)}),64))])):e.createCommentVNode("",!0),a.value[n]?(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(r,{modelValue:a.value[n].startDate,"onUpdate:modelValue":o=>a.value[n].startDate=o,type:s.dateType||"datetime",placeholder:"开始时间",format:s.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":s.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(r,{modelValue:a.value[n].endDate,"onUpdate:modelValue":o=>a.value[n].endDate=o,type:s.dateType||"datetime",placeholder:"结束时间",format:s.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":s.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])):s&&s.type==="selectList"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",oe,[e.createElementVNode("span",ne,e.toDisplayString(s.label||"选择列表"),1)]),s.multiple?(e.openBlock(),e.createElementBlock("div",se,[e.createVNode(c,{modelValue:a.value[n].selectAll,"onUpdate:modelValue":o=>a.value[n].selectAll=o,onChange:o=>H(n)},{default:e.withCtx(()=>[...t[0]||(t[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(d,{size:"small",text:"",onClick:o=>P(n)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(W.Delete))]),_:1}),t[1]||(t[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",ce,[t[2]||(t[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(a.value[n].selectedValues&&a.value[n].selectedValues.length||0),1),t[3]||(t[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",re,[s.multiple?(e.openBlock(),e.createBlock(f,{key:0,modelValue:a.value[n].selectedValues,"onUpdate:modelValue":o=>a.value[n].selectedValues=o,onChange:o=>T(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(c,{key:o.value,value:o.value,class:"list-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(V,{key:1,modelValue:a.value[n].selectedValue,"onUpdate:modelValue":o=>a.value[n].selectedValue=o,onChange:o=>T(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(_,{key:o.value,value:o.value,class:"list-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])])):s&&s.type==="switch"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",de,[e.createElementVNode("span",ie,e.toDisplayString(s.label||"开关"),1)]),e.createElementVNode("div",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,o=>(e.openBlock(),e.createBlock(c,{key:o.value,modelValue:a.value[n][o.value],"onUpdate:modelValue":C=>a.value[n][o.value]=C,onChange:C=>k()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):s&&s.type==="range"&&a.value[n]?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",me,[e.createElementVNode("span",fe,e.toDisplayString(s.label||"范围设置"),1)]),e.createElementVNode("div",ke,[e.createVNode(y,{modelValue:a.value[n].min,"onUpdate:modelValue":o=>a.value[n].min=o,size:"small",placeholder:s.minPlaceholder||"最小值",class:"range-input",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),t[4]||(t[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(y,{modelValue:a.value[n].max,"onUpdate:modelValue":o=>a.value[n].max=o,size:"small",placeholder:s.maxPlaceholder||"最大值",class:"range-input",onChange:o=>k()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),s.unit?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(s.unit),1)):e.createCommentVNode("",!0)])])):s&&s.type==="button"?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(d,{size:"small",onClick:o=>L(n),class:"action-btn",type:s.buttonType||"primary"},{default:e.withCtx(()=>[s.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.icon)))]),_:2},1024)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(s.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ne=E._export_sfc(Be,[["__scopeId","data-v-50871f8e"]]);exports.default=Ne;
|
|
@@ -18,8 +18,8 @@ import "element-plus/es/components/select/style/css";
|
|
|
18
18
|
import "element-plus/es/components/option/style/css";
|
|
19
19
|
import "element-plus/es/components/button/style/css";
|
|
20
20
|
import { defineComponent as Te, ref as _, computed as d, watch as M, watchEffect as Ae, openBlock as i, createElementBlock as p, normalizeStyle as le, createElementVNode as b, toDisplayString as D, createVNode as V, withCtx as N, createTextVNode as $, Fragment as T, renderList as A, createBlock as ae, createCommentVNode as I, renderSlot as Ee } from "vue";
|
|
21
|
-
import { u as Oe, _ as Re } from "./index-
|
|
22
|
-
import { E as Me } from "./EChartComponentBase-
|
|
21
|
+
import { u as Oe, _ as Re } from "./index-zPaMBZk-.js";
|
|
22
|
+
import { E as Me } from "./EChartComponentBase-GBbKjtlb.js";
|
|
23
23
|
import { A as Ve, D as Fe } from "./ele-lst-icon-CKpeRKmk.js";
|
|
24
24
|
const $e = { class: "table-header" }, Ie = { class: "title" }, Le = { class: "header-right" }, ze = { class: "row-count" }, Ue = {
|
|
25
25
|
key: 0,
|