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,4 +1,4 @@
|
|
|
1
|
-
"use strict";var bt=(n,t,e)=>new Promise((i,r)=>{var s=d=>{try{c(e.next(d))}catch(f){r(f)}},o=d=>{try{c(e.throw(d))}catch(f){r(f)}},c=d=>d.done?i(d.value):Promise.resolve(d.value).then(s,o);c((e=e.apply(n,t)).next())});const X=require("vue"),J=require("./index-Mh5Dw2sd.cjs"),Vt="object_alias_uid_mapping",ne=["#4162ff","#3bbc6a","#e24359","#fdcd61","#44b4ff","#8000ff","#ae00ae","#ff8102","#970000","#9b9b00","#939393","#007700","#397373"];function ae(n){if(!n||typeof n!="string"||n.startsWith("var("))return!1;let t=n.replace("#","").toLowerCase();t.length===8&&(t=t.substring(0,6));let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3>180}function se(n){if(!n||typeof n!="string")return!1;const t=n.replace("#","").toLowerCase();let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3<50}function oe(n,t){if(n==="dark"){const e=["bgColor","itemColor","oddColor","evenColor","backgroundColor","cardBgColor","barColor","splitColor","borderColor"],i=["titleColor","textColor","nameColor","valueColor","fontColor","labelColor"];e.forEach(r=>{const s=t[r];s&&typeof s=="string"&&ae(s)&&(t[r]="var(--el-bg-color)")}),i.forEach(r=>{const s=t[r];s&&typeof s=="string"&&se(s)&&(t[r]="var(--el-text-color-primary)")})}}const ce=[{value:"alway",label:"setting.control.alway"},{value:"once",label:"setting.control.once"},{value:"never",label:"setting.control.never"}],ue=(n,t,e=!1)=>{const i=[];if(t==="edit"||t==="preview"&&!e){const r=new Date;i.push(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00");for(let s=0;s<n-1;s++){const o=r.getHours();r.setHours(o-1),i.unshift(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00")}}return i},le=n=>{const{num:t,max:e,min:i,mode:r,hasDataSource:s=!1}=n,o=[];if(r==="edit"||r==="preview"&&!s){const c=t!=null?t:10,d=e!=null?e:200,f=i!=null?i:10;for(let u=0;u<c;u++)o.push(Math.floor(Math.random()*(d-f+1)+f))}return o},de=n=>{let t=[];switch(n){case"last-hour":case"hour":for(let e=0;e<60;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"last-day":case"day":for(let e=0;e<24;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"week":case"last-week":t=["周日","周一","周二","周三","周四","周五","周六"];break;case"last-month":case"month":for(let e=1;e<32;e++){const i=e>9?`${e}日`:`0${e}日`;t.push(i)}break;case"last-year":case"year":for(let e=1;e<13;e++){const i=e>9?`${e}月`:`0${e}月`;t.push(i)}break}return t},he=n=>["周日","周一","周二","周三","周四","周五","周六"][n],fe=(n,t)=>{switch(t){case"hour":return J.dayjs(n).format("mm:00");case"day":return J.dayjs(n).format("HH:00");case"week":return he(J.dayjs(n).day());case"month":return J.dayjs(n).format("DD日");case"year":return J.dayjs(n).format("MM月");default:return""}},Kt=(n,t)=>{let e=null;return function(...i){const r=this;e!==null&&clearTimeout(e),e=setTimeout(()=>{n.apply(r,i)},t)}},ft=(n,t,e)=>{const i=JSON.parse(sessionStorage.getItem(Vt)||"{}")||{};return t?n.object_alias&&i[n.object_alias]||e:n.object_id||e},pe=n=>{if(!n)return!1;const{data:t=[],common:e={}}=n;return e.source==="calculate"?Array.isArray(t)&&t.length>0?t.some(i=>i.uid&&i.uid!==""):!1:e.object_id&&e.object_id!==""||e.object_alias&&e.object_alias!==""?!0:Array.isArray(t)&&t.length>0?t.some(i=>i.object_id&&i.object_id!==""):!1},ve=n=>Number.isNaN(n)||!Number.isFinite(n),ge=n=>n==null||n==="",ut={null:ge,abnormal:ve},be=n=>n.res,ye=n=>{const{res:t,category:e,type:i,conf:r,uid:s}=n,{data:o,common:c}=r,d=c.source||"mosaic";if(e==="history"){const f=[],u=t.history[0].length;for(let y=0;y<u;y++){let D=!0;for(let g=0;g<t.history.length;g++){const b=o[g].fv;if(ut[i](t.history[g][y][b])){D=!1;break}}D&&f.push(y)}const v=[];for(let y=0;y<t.history.length;y++){const D=f.map(g=>t.history[y][g]);D.length>0&&v.push(D)}t.history=v}else{let f=!1;if(o.forEach(u=>{var D,g,b,m,x,L,E,P,p,a,w,h;const v=ft(u,c.useAlias,s);let y;["statistics","calculate"].includes(d)?y=(m=(b=(g=(D=t[v])==null?void 0:D[d])==null?void 0:g.data)==null?void 0:b[u.fv])==null?void 0:m.data:["statisticsRealtime","calculateRealtime"].includes(d)?y=(p=(P=(E=(L=(x=t[v])==null?void 0:x[d])==null?void 0:L.data)==null?void 0:E[u.fv])==null?void 0:P.data)==null?void 0:p.data:y=(h=(w=(a=t[v])==null?void 0:a[d])==null?void 0:w.data)==null?void 0:h[u.fv],f=ut[i](y)}),f)return null}return t},me=n=>{const{res:t,category:e,type:i,conf:r,uid:s}=n,{data:o,common:c}=r,d=c.source||"mosaic";if(e==="history"){const f=t.history[0].length;for(let u=0;u<f;u++)for(let v=0;v<t.history.length;v++){const y=o[v].fv;ut[i](t.history[v][u][y])&&(t.history[v][u][y]=c.null.value)}}else o.forEach(f=>{var v,y,D,g,b,m,x,L,E,P,p,a;const u=ft(f,c.useAlias,s);if(["statistics","calculate"].includes(d)){const w=(g=(D=(y=(v=t[u])==null?void 0:v[d])==null?void 0:y.data)==null?void 0:D[f.fv])==null?void 0:g.data;ut[i](w)&&(t[u][d].data[f.fv].data=c.null.value)}else if(["statisticsRealtime","calculateRealtime"].includes(d)){const w=(E=(L=(x=(m=(b=t[u])==null?void 0:b[d])==null?void 0:m.data)==null?void 0:x[f.fv])==null?void 0:L.data)==null?void 0:E.data;ut[i](w)&&(t[u][d].data[f.fv].data.data=c.null.value)}else{const w=(a=(p=(P=t[u])==null?void 0:P[d])==null?void 0:p.data)==null?void 0:a[f.fv];ut[i](w)&&(t[u][d].data[f.fv]=c.null.value)}});return t},Se=n=>n.res,we={0:be,1:ye,2:me,3:Se},Xt=(n,t,e)=>{var c;const{conf:i,uid:r}=t,s=(c=i.common)==null?void 0:c.null;if(!(s!=null&&s.type))return n;const o={res:n,category:e,type:"null",conf:i,uid:r};return we[s.type](o)},ke=(n,t)=>(n.history=t.map(()=>[]),n.all_data_group.forEach((e,i)=>{if(Array.isArray(e)&&e.length)e.forEach(r=>{n.history[i].push({time:r.start_time,[r.script_uid]:r.data})});else for(const r in e)n.history[i].push({time:r,[t[i].fv]:e[r]})}),n),Ee=(n,t)=>{const e=new Map;for(let o=0;o<n.length;o++)e.set(n[o],o);const i=[],r=t.map(()=>[]),s=new Set;for(let o=0;o<n.length;o++){const c=n[o];if(!s.has(c)){s.add(c);const d=e.get(c);i.push(c);for(let f=0;f<t.length;f++)r[f].push(t[f][d])}}return{times:i,data:r}},Jt=(n,t,e,i,r)=>bt(null,null,function*(){try{const o=yield new(yield Promise.resolve().then(()=>require("./history-DAmBl4_5.cjs"))).default().getHistoryData(n,r);e(o)}catch(s){console.error("获取历史数据时出错:",s)}finally{if(t){const{formatRequest:s}=yield Promise.resolve().then(()=>require("./request-Bn100qAJ.cjs")),o=s(n.conf,n.uid,r);t.registerComponent({id:n.conf.id,request:o,onUpdate:(c,d)=>{c==="realtime"&&i(d)}})}}}),Qt=(n,t)=>{t&&t.unregisterComponent(n.conf.id)};class xe{constructor(t,e){this.linkWatchStop=null,this.props=t,this.componentType=e,this.session=X.ref(X.inject("session",null)),this.Style=X.ref({}),this.linkStore=J.useLinkStore()}extractStyles(){return{}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}setHistoryData(t){}onPreview(){var r;const{common:t,data:e}=this.props.conf,i=this.getSource();if(t.multiObject&&Array.isArray(e)){const s=new Set;e.forEach(o=>{const c=this.resolveObjectId(o);!c||s.has(c)||(s.add(c),this.subscribeBySource(i,c,o.uid))}),console.log(`[${this.componentType}] 多对象模式:已订阅 ${s.size} 个对象`)}else{const s=this.resolveObjectId(),o=(r=e==null?void 0:e[0])==null?void 0:r.uid;this.subscribeBySource(i,s,o)}}setSocketData(t){if(!t)return;const{data:e}=this.props.conf;!e||!Array.isArray(e)||e.forEach(i=>{try{const r=this.extractDataValue(t,i.fv);i.value=r!=null?r:"--"}catch(r){i.value="--"}})}onLinkEvent(t){}getLinkChannel(){var t;return((t=this.Style.value)==null?void 0:t.linkChannel)||""}publish(t){const e=this.getLinkChannel();if(!e){console.warn(`[${this.componentType}] 未配置联动频道,无法发布事件`);return}this.linkStore.publish(e,this.componentType,t)}shouldHandleEvent(t){return!(!t||this.props.mode==="edit"||t.topic.source===this.componentType)}setupLinkWatch(){this.linkWatchStop&&this.linkWatchStop(),this.linkWatchStop=X.watch(()=>{const t=this.getLinkChannel();return t?this.linkStore.channels[t]:null},t=>{this.shouldHandleEvent(t)&&this.onLinkEvent(t)},{deep:!0,immediate:!0})}stopLinkWatch(){this.linkWatchStop&&(this.linkWatchStop(),this.linkWatchStop=null)}isLocalIotSubscribeMode(){return localStorage.getItem("dashboardUseLocalToken")==="1"||localStorage.getItem("dashboardUseLocalToken")==="true"}subscribe(t,e,i,r){if(!this.session.value){console.warn(`[${this.componentType}] Session 未初始化,无法订阅`);return}const s={event:t,block:e,object_id:i};r&&Object.assign(s,r);const o=this.isLocalIotSubscribeMode()?{action:"sub_event",block_mapping:"mmq",event:s}:{action:"sub_agent_event",event:s},c=this.props.conf.id;this.session.value.componentRequests&&(this.session.value.componentRequests.has(c)||this.session.value.componentRequests.set(c,[]),this.session.value.componentRequests.get(c).push(o)),this.session.value.send({type:"send_message",message:o})}subscribeFv(t){this.subscribe("recv_fv","mosaic",t)}subscribeRetainerOpen(t){this.subscribe("retainer_open","retainer",t)}subscribeRetainerClose(t){this.subscribe("retainer_close","retainer",t)}subscribeRetainerEvent(t){this.subscribe("retainer_event","retainer",t)}subscribeRetainer(t){this.subscribeRetainerOpen(t),this.subscribeRetainerClose(t),this.subscribeRetainerEvent(t)}subscribeStatisticsRealtimeResult(t){this.subscribe("statistics_realtime_result","statistics",t)}subscribeStatistics(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeStatisticsWithUid(t,e)}subscribeStatisticsWithUid(t,e){this.subscribe("statistics_result","statistics",t,{uid:e,type:"statistics"})}subscribeCalculate(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeCalculateWithUid(e)}subscribeCalculateWithUid(t){this.subscribe("statistics_result","statistics","",{uid:t,type:"calculate"})}subscribeBySource(t,e,i){switch(t){case"mosaic":this.subscribeFv(e);break;case"statisticsRealtime":this.subscribeStatisticsRealtimeResult(e);break;case"statistics":i?this.subscribeStatisticsWithUid(e,i):this.subscribeStatistics(e);break;case"calculate":i?this.subscribeCalculateWithUid(i):this.subscribeCalculate(e);break;default:console.warn(`[${this.componentType}] 未知的数据源类型: ${t}`)}}extractDataValue(t,e){var i;return!t||!t.event?null:t.event==="recv_fv"&&t.block==="mosaic"?!e||!t.data?null:t.data[e]:t.event==="statistics_realtime_result"&&t.block==="statistics"?(i=t.data)==null?void 0:i.data:t.event==="statistics_result"&&t.block==="statistics"?t.data:null}getOptionValue(t,e){var r,s;const i=(s=(r=this.props.conf)==null?void 0:r.options)==null?void 0:s[t];return i==null?e:typeof i=="object"&&"value"in i?i.value:i}applyTheme(){oe(this.props.theme,this.Style.value)}getSource(){var t,e;return((e=(t=this.props.conf)==null?void 0:t.common)==null?void 0:e.source)||"mosaic"}isStatistics(){return["statistics","calculate","statisticsRealtime","calculateRealtime"].includes(this.getSource())}resolveObjectId(t){const{common:e,data:i}=this.props.conf;if(e.multiObject&&t)return ft(t,e.useAlias,this.props.uid);const r=e.object_id?e:i[0]||{};return ft(r,e.useAlias,this.props.uid)}handleNull(t,e){return Xt(t,this.props,e)}getPreviewHelper(){return{preview:()=>Jt(this.props,this.session.value,t=>this.setHistoryData(t),t=>this.setSocketData(t),this.componentType),unregister:()=>Qt(this.props,this.session.value)}}getDebouncedInit(){return Kt(()=>this.init(),200)}cleanup(){}needsHistoryData(){return!0}setupLifecycle(){const t=this.getDebouncedInit(),e=this.getPreviewHelper();X.onMounted(()=>bt(this,null,function*(){if(this.init(),this.props.mode==="preview"){if(this.needsHistoryData())try{const r=yield new(yield Promise.resolve().then(()=>require("./history-DAmBl4_5.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(r)}catch(i){console.error(`[${this.componentType}] 获取历史数据失败:`,i)}this.session.value&&this.session.value.registerComponent({id:this.props.conf.id,request:null,onUpdate:(i,r)=>{i==="realtime"&&this.setSocketData(r)}}),this.onPreview()}this.setupLinkWatch()})),X.onBeforeUnmount(()=>{this.cleanup(),e.unregister(),this.stopLinkWatch()}),X.watch(()=>this.props.conf,()=>{this.props.mode==="edit"&&t()},{deep:!0}),X.watch(()=>this.props.theme,()=>{this.init()}),X.watch(()=>{var i;return(i=this.Style.value)==null?void 0:i.linkChannel},()=>{this.setupLinkWatch()})}getStyle(){return this.Style}getType(){return this.componentType}dispatchModal(t,e,i){this.props.mode==="preview"&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:t,layerId:e,sheetIndex:i!=null?i:-1}}))}triggerModalByKey(t){var i,r;if(this.props.mode!=="preview")return;const e=(i=this.props.conf)==null?void 0:i.modalBinding;if(e&&e.enabled&&e.mode==="key"){const o=(e.map||{})[t];if(!o||!o.layerId)return;const c=o.action||"toggle",d=(r=e.sheetIndex)!=null?r:-1;this.dispatchModal(c,o.layerId,d)}}}var yt={exports:{}},_t;function Zt(){if(_t)return yt.exports;_t=1;var n=yt.exports={};return n.forEach=function(t,e){for(var i=0;i<t.length;i++){var r=e(t[i]);if(r)return r}},yt.exports}var mt,zt;function Ce(){return zt||(zt=1,mt=function(n){var t=n.stateHandler.getState;function e(o){var c=t(o);return c&&!!c.isDetectable}function i(o){t(o).isDetectable=!0}function r(o){return!!t(o).busy}function s(o,c){t(o).busy=!!c}return{isDetectable:e,markAsDetectable:i,isBusy:r,markBusy:s}}),mt}var St,Mt;function De(){return Mt||(Mt=1,St=function(n){var t={};function e(o){var c=n.get(o);return c===void 0?[]:t[c]||[]}function i(o,c){var d=n.get(o);t[d]||(t[d]=[]),t[d].push(c)}function r(o,c){for(var d=e(o),f=0,u=d.length;f<u;++f)if(d[f]===c){d.splice(f,1);break}}function s(o){var c=e(o);c&&(c.length=0)}return{get:e,add:i,removeListener:r,removeAllListeners:s}}),St}var wt,qt;function Ie(){return qt||(qt=1,wt=function(){var n=1;function t(){return n++}return{generate:t}}),wt}var kt,Nt;function Le(){return Nt||(Nt=1,kt=function(n){var t=n.idGenerator,e=n.stateHandler.getState;function i(s){var o=e(s);return o&&o.id!==void 0?o.id:null}function r(s){var o=e(s);if(!o)throw new Error("setId required the element to have a resize detection state.");var c=t.generate();return o.id=c,c}return{get:i,set:r}}),kt}var Et,Wt;function Ae(){return Wt||(Wt=1,Et=function(n){function t(){}var e={log:t,warn:t,error:t};if(!n&&window.console){var i=function(r,s){r[s]=function(){var c=console[s];if(c.apply)c.apply(console,arguments);else for(var d=0;d<arguments.length;d++)c(arguments[d])}};i(e,"log"),i(e,"warn"),i(e,"error")}return e}),Et}var xt={exports:{}},Pt;function te(){if(Pt)return xt.exports;Pt=1;var n=xt.exports={};return n.isIE=function(t){function e(){var r=navigator.userAgent.toLowerCase();return r.indexOf("msie")!==-1||r.indexOf("trident")!==-1||r.indexOf(" edge/")!==-1}if(!e())return!1;if(!t)return!0;var i=(function(){var r,s=3,o=document.createElement("div"),c=o.getElementsByTagName("i");do o.innerHTML="<!--[if gt IE "+ ++s+"]><i></i><![endif]-->";while(c[0]);return s>4?s:r})();return t===i},n.isLegacyOpera=function(){return!!window.opera},xt.exports}var Ct={exports:{}},Bt;function He(){if(Bt)return Ct.exports;Bt=1;var n=Ct.exports={};n.getOption=t;function t(e,i,r){var s=e[i];return s==null&&r!==void 0?r:s}return Ct.exports}var Dt,Ut;function Te(){if(Ut)return Dt;Ut=1;var n=He();Dt=function(i){i=i||{};var r=i.reporter,s=n.getOption(i,"async",!0),o=n.getOption(i,"auto",!0);o&&!s&&(r&&r.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),s=!0);var c=t(),d,f=!1;function u(m,x){!f&&o&&s&&c.size()===0&&D(),c.add(m,x)}function v(){for(f=!0;c.size();){var m=c;c=t(),m.process()}f=!1}function y(m){f||(m===void 0&&(m=s),d&&(g(d),d=null),m?D():v())}function D(){d=b(v)}function g(m){var x=clearTimeout;return x(m)}function b(m){var x=function(L){return setTimeout(L,0)};return x(m)}return{add:u,force:y}};function t(){var e={},i=0,r=0,s=0;function o(f,u){u||(u=f,f=0),f>r?r=f:f<s&&(s=f),e[f]||(e[f]=[]),e[f].push(u),i++}function c(){for(var f=s;f<=r;f++)for(var u=e[f],v=0;v<u.length;v++){var y=u[v];y()}}function d(){return i}return{add:o,process:c,size:d}}return Dt}var It,$t;function Re(){if($t)return It;$t=1;var n="_erd";function t(r){return r[n]={},e(r)}function e(r){return r[n]}function i(r){delete r[n]}return It={initState:t,getState:e,cleanState:i},It}var Lt,Ft;function je(){if(Ft)return Lt;Ft=1;var n=te();return Lt=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function s(u,v){function y(){v(u)}if(n.isIE(8))r(u).object={proxy:y},u.attachEvent("onresize",y);else{var D=d(u);if(!D)throw new Error("Element is not detectable by this strategy.");D.contentDocument.defaultView.addEventListener("resize",y)}}function o(u){var v=t.important?" !important; ":"; ";return(u.join(v)+v).trim()}function c(u,v,y){y||(y=v,v=u,u=null),u=u||{},u.debug;function D(g,b){var m=o(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),x=!1,L=window.getComputedStyle(g),E=g.offsetWidth,P=g.offsetHeight;r(g).startSize={width:E,height:P};function p(){function a(){if(L.position==="static"){g.style.setProperty("position","relative",u.important?"important":"");var I=function(z,T,q,A){function B(lt){return lt.replace(/[^-\d\.]/g,"")}var U=q[A];U!=="auto"&&B(U)!=="0"&&(z.warn("An element that is positioned static has style."+A+"="+U+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+A+" will be set to 0. Element: ",T),T.style.setProperty(A,"0",u.important?"important":""))};I(e,g,L,"top"),I(e,g,L,"right"),I(e,g,L,"bottom"),I(e,g,L,"left")}}function w(){x||a();function I(T,q){if(!T.contentDocument){var A=r(T);A.checkForObjectDocumentTimeoutId&&window.clearTimeout(A.checkForObjectDocumentTimeoutId),A.checkForObjectDocumentTimeoutId=setTimeout(function(){A.checkForObjectDocumentTimeoutId=0,I(T,q)},100);return}q(T.contentDocument)}var z=this;I(z,function(q){b(g)})}L.position!==""&&(a(),x=!0);var h=document.createElement("object");h.style.cssText=m,h.tabIndex=-1,h.type="text/html",h.setAttribute("aria-hidden","true"),h.onload=w,n.isIE()||(h.data="about:blank"),r(g)&&(g.appendChild(h),r(g).object=h,n.isIE()&&(h.data="about:blank"))}i?i.add(p):p()}n.isIE(8)?y(v):D(v,y)}function d(u){return r(u).object}function f(u){if(r(u)){var v=d(u);v&&(n.isIE(8)?u.detachEvent("onresize",v.proxy):u.removeChild(v),r(u).checkForObjectDocumentTimeoutId&&window.clearTimeout(r(u).checkForObjectDocumentTimeoutId),delete r(u).object)}}return{makeDetectable:c,addListener:s,uninstall:f}},Lt}var At,Yt;function Oe(){if(Yt)return At;Yt=1;var n=Zt().forEach;return At=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;t.stateHandler.hasState;var s=t.idHandler;if(!i)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var o=v(),c="erd_scroll_detection_scrollbar_style",d="erd_scroll_detection_container";function f(p){y(p,c,d)}f(window.document);function u(p){var a=t.important?" !important; ":"; ";return(p.join(a)+a).trim()}function v(){var p=500,a=500,w=document.createElement("div");w.style.cssText=u(["position: absolute","width: "+p*2+"px","height: "+a*2+"px","visibility: hidden","margin: 0","padding: 0"]);var h=document.createElement("div");h.style.cssText=u(["position: absolute","width: "+p+"px","height: "+a+"px","overflow: scroll","visibility: none","top: "+-p*3+"px","left: "+-a*3+"px","visibility: hidden","margin: 0","padding: 0"]),h.appendChild(w),document.body.insertBefore(h,document.body.firstChild);var I=p-h.clientWidth,z=a-h.clientHeight;return document.body.removeChild(h),{width:I,height:z}}function y(p,a,w){function h(q,A){A=A||function(U){p.head.appendChild(U)};var B=p.createElement("style");return B.innerHTML=q,B.id=a,A(B),B}if(!p.getElementById(a)){var I=w+"_animation",z=w+"_animation_active",T=`/* Created by the element-resize-detector library. */
|
|
1
|
+
"use strict";var bt=(n,t,e)=>new Promise((i,r)=>{var s=d=>{try{c(e.next(d))}catch(f){r(f)}},o=d=>{try{c(e.throw(d))}catch(f){r(f)}},c=d=>d.done?i(d.value):Promise.resolve(d.value).then(s,o);c((e=e.apply(n,t)).next())});const X=require("vue"),J=require("./index-EnNA0nIi.cjs"),Vt="object_alias_uid_mapping",ne=["#4162ff","#3bbc6a","#e24359","#fdcd61","#44b4ff","#8000ff","#ae00ae","#ff8102","#970000","#9b9b00","#939393","#007700","#397373"];function ae(n){if(!n||typeof n!="string"||n.startsWith("var("))return!1;let t=n.replace("#","").toLowerCase();t.length===8&&(t=t.substring(0,6));let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3>180}function se(n){if(!n||typeof n!="string")return!1;const t=n.replace("#","").toLowerCase();let e,i,r;if(t.length===3)e=parseInt(t[0]+t[0],16),i=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);else if(t.length===6)e=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16);else return!1;return(e*299+i*587+r*114)/1e3<50}function oe(n,t){if(n==="dark"){const e=["bgColor","itemColor","oddColor","evenColor","backgroundColor","cardBgColor","barColor","splitColor","borderColor"],i=["titleColor","textColor","nameColor","valueColor","fontColor","labelColor"];e.forEach(r=>{const s=t[r];s&&typeof s=="string"&&ae(s)&&(t[r]="var(--el-bg-color)")}),i.forEach(r=>{const s=t[r];s&&typeof s=="string"&&se(s)&&(t[r]="var(--el-text-color-primary)")})}}const ce=[{value:"alway",label:"setting.control.alway"},{value:"once",label:"setting.control.once"},{value:"never",label:"setting.control.never"}],ue=(n,t,e=!1)=>{const i=[];if(t==="edit"||t==="preview"&&!e){const r=new Date;i.push(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00");for(let s=0;s<n-1;s++){const o=r.getHours();r.setHours(o-1),i.unshift(J.dayjs(r).format("YYYY-MM-DD HH")+":00:00")}}return i},le=n=>{const{num:t,max:e,min:i,mode:r,hasDataSource:s=!1}=n,o=[];if(r==="edit"||r==="preview"&&!s){const c=t!=null?t:10,d=e!=null?e:200,f=i!=null?i:10;for(let u=0;u<c;u++)o.push(Math.floor(Math.random()*(d-f+1)+f))}return o},de=n=>{let t=[];switch(n){case"last-hour":case"hour":for(let e=0;e<60;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"last-day":case"day":for(let e=0;e<24;e++){const i=e>9?`${e}:00`:`0${e}:00`;t.push(i)}break;case"week":case"last-week":t=["周日","周一","周二","周三","周四","周五","周六"];break;case"last-month":case"month":for(let e=1;e<32;e++){const i=e>9?`${e}日`:`0${e}日`;t.push(i)}break;case"last-year":case"year":for(let e=1;e<13;e++){const i=e>9?`${e}月`:`0${e}月`;t.push(i)}break}return t},he=n=>["周日","周一","周二","周三","周四","周五","周六"][n],fe=(n,t)=>{switch(t){case"hour":return J.dayjs(n).format("mm:00");case"day":return J.dayjs(n).format("HH:00");case"week":return he(J.dayjs(n).day());case"month":return J.dayjs(n).format("DD日");case"year":return J.dayjs(n).format("MM月");default:return""}},Kt=(n,t)=>{let e=null;return function(...i){const r=this;e!==null&&clearTimeout(e),e=setTimeout(()=>{n.apply(r,i)},t)}},ft=(n,t,e)=>{const i=JSON.parse(sessionStorage.getItem(Vt)||"{}")||{};return t?n.object_alias&&i[n.object_alias]||e:n.object_id||e},pe=n=>{if(!n)return!1;const{data:t=[],common:e={}}=n;return e.source==="calculate"?Array.isArray(t)&&t.length>0?t.some(i=>i.uid&&i.uid!==""):!1:e.object_id&&e.object_id!==""||e.object_alias&&e.object_alias!==""?!0:Array.isArray(t)&&t.length>0?t.some(i=>i.object_id&&i.object_id!==""):!1},ve=n=>Number.isNaN(n)||!Number.isFinite(n),ge=n=>n==null||n==="",ut={null:ge,abnormal:ve},be=n=>n.res,ye=n=>{const{res:t,category:e,type:i,conf:r,uid:s}=n,{data:o,common:c}=r,d=c.source||"mosaic";if(e==="history"){const f=[],u=t.history[0].length;for(let y=0;y<u;y++){let D=!0;for(let g=0;g<t.history.length;g++){const b=o[g].fv;if(ut[i](t.history[g][y][b])){D=!1;break}}D&&f.push(y)}const v=[];for(let y=0;y<t.history.length;y++){const D=f.map(g=>t.history[y][g]);D.length>0&&v.push(D)}t.history=v}else{let f=!1;if(o.forEach(u=>{var D,g,b,m,x,L,E,P,p,a,w,h;const v=ft(u,c.useAlias,s);let y;["statistics","calculate"].includes(d)?y=(m=(b=(g=(D=t[v])==null?void 0:D[d])==null?void 0:g.data)==null?void 0:b[u.fv])==null?void 0:m.data:["statisticsRealtime","calculateRealtime"].includes(d)?y=(p=(P=(E=(L=(x=t[v])==null?void 0:x[d])==null?void 0:L.data)==null?void 0:E[u.fv])==null?void 0:P.data)==null?void 0:p.data:y=(h=(w=(a=t[v])==null?void 0:a[d])==null?void 0:w.data)==null?void 0:h[u.fv],f=ut[i](y)}),f)return null}return t},me=n=>{const{res:t,category:e,type:i,conf:r,uid:s}=n,{data:o,common:c}=r,d=c.source||"mosaic";if(e==="history"){const f=t.history[0].length;for(let u=0;u<f;u++)for(let v=0;v<t.history.length;v++){const y=o[v].fv;ut[i](t.history[v][u][y])&&(t.history[v][u][y]=c.null.value)}}else o.forEach(f=>{var v,y,D,g,b,m,x,L,E,P,p,a;const u=ft(f,c.useAlias,s);if(["statistics","calculate"].includes(d)){const w=(g=(D=(y=(v=t[u])==null?void 0:v[d])==null?void 0:y.data)==null?void 0:D[f.fv])==null?void 0:g.data;ut[i](w)&&(t[u][d].data[f.fv].data=c.null.value)}else if(["statisticsRealtime","calculateRealtime"].includes(d)){const w=(E=(L=(x=(m=(b=t[u])==null?void 0:b[d])==null?void 0:m.data)==null?void 0:x[f.fv])==null?void 0:L.data)==null?void 0:E.data;ut[i](w)&&(t[u][d].data[f.fv].data.data=c.null.value)}else{const w=(a=(p=(P=t[u])==null?void 0:P[d])==null?void 0:p.data)==null?void 0:a[f.fv];ut[i](w)&&(t[u][d].data[f.fv]=c.null.value)}});return t},Se=n=>n.res,we={0:be,1:ye,2:me,3:Se},Xt=(n,t,e)=>{var c;const{conf:i,uid:r}=t,s=(c=i.common)==null?void 0:c.null;if(!(s!=null&&s.type))return n;const o={res:n,category:e,type:"null",conf:i,uid:r};return we[s.type](o)},ke=(n,t)=>(n.history=t.map(()=>[]),n.all_data_group.forEach((e,i)=>{if(Array.isArray(e)&&e.length)e.forEach(r=>{n.history[i].push({time:r.start_time,[r.script_uid]:r.data})});else for(const r in e)n.history[i].push({time:r,[t[i].fv]:e[r]})}),n),Ee=(n,t)=>{const e=new Map;for(let o=0;o<n.length;o++)e.set(n[o],o);const i=[],r=t.map(()=>[]),s=new Set;for(let o=0;o<n.length;o++){const c=n[o];if(!s.has(c)){s.add(c);const d=e.get(c);i.push(c);for(let f=0;f<t.length;f++)r[f].push(t[f][d])}}return{times:i,data:r}},Jt=(n,t,e,i,r)=>bt(null,null,function*(){try{const o=yield new(yield Promise.resolve().then(()=>require("./history-C4gipwnp.cjs"))).default().getHistoryData(n,r);e(o)}catch(s){console.error("获取历史数据时出错:",s)}finally{if(t){const{formatRequest:s}=yield Promise.resolve().then(()=>require("./request-4n94CBXg.cjs")),o=s(n.conf,n.uid,r);t.registerComponent({id:n.conf.id,request:o,onUpdate:(c,d)=>{c==="realtime"&&i(d)}})}}}),Qt=(n,t)=>{t&&t.unregisterComponent(n.conf.id)};class xe{constructor(t,e){this.linkWatchStop=null,this.props=t,this.componentType=e,this.session=X.ref(X.inject("session",null)),this.Style=X.ref({}),this.linkStore=J.useLinkStore()}extractStyles(){return{}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}setHistoryData(t){}onPreview(){var r;const{common:t,data:e}=this.props.conf,i=this.getSource();if(t.multiObject&&Array.isArray(e)){const s=new Set;e.forEach(o=>{const c=this.resolveObjectId(o);!c||s.has(c)||(s.add(c),this.subscribeBySource(i,c,o.uid))}),console.log(`[${this.componentType}] 多对象模式:已订阅 ${s.size} 个对象`)}else{const s=this.resolveObjectId(),o=(r=e==null?void 0:e[0])==null?void 0:r.uid;this.subscribeBySource(i,s,o)}}setSocketData(t){if(!t)return;const{data:e}=this.props.conf;!e||!Array.isArray(e)||e.forEach(i=>{try{const r=this.extractDataValue(t,i.fv);i.value=r!=null?r:"--"}catch(r){i.value="--"}})}onLinkEvent(t){}getLinkChannel(){var t;return((t=this.Style.value)==null?void 0:t.linkChannel)||""}publish(t){const e=this.getLinkChannel();if(!e){console.warn(`[${this.componentType}] 未配置联动频道,无法发布事件`);return}this.linkStore.publish(e,this.componentType,t)}shouldHandleEvent(t){return!(!t||this.props.mode==="edit"||t.topic.source===this.componentType)}setupLinkWatch(){this.linkWatchStop&&this.linkWatchStop(),this.linkWatchStop=X.watch(()=>{const t=this.getLinkChannel();return t?this.linkStore.channels[t]:null},t=>{this.shouldHandleEvent(t)&&this.onLinkEvent(t)},{deep:!0,immediate:!0})}stopLinkWatch(){this.linkWatchStop&&(this.linkWatchStop(),this.linkWatchStop=null)}isLocalIotSubscribeMode(){return localStorage.getItem("dashboardUseLocalToken")==="1"||localStorage.getItem("dashboardUseLocalToken")==="true"}subscribe(t,e,i,r){if(!this.session.value){console.warn(`[${this.componentType}] Session 未初始化,无法订阅`);return}const s={event:t,block:e,object_id:i};r&&Object.assign(s,r);const o=this.isLocalIotSubscribeMode()?{action:"sub_event",block_mapping:"mmq",event:s}:{action:"sub_agent_event",event:s},c=this.props.conf.id;this.session.value.componentRequests&&(this.session.value.componentRequests.has(c)||this.session.value.componentRequests.set(c,[]),this.session.value.componentRequests.get(c).push(o)),this.session.value.send({type:"send_message",message:o})}subscribeFv(t){this.subscribe("recv_fv","mosaic",t)}subscribeRetainerOpen(t){this.subscribe("retainer_open","retainer",t)}subscribeRetainerClose(t){this.subscribe("retainer_close","retainer",t)}subscribeRetainerEvent(t){this.subscribe("retainer_event","retainer",t)}subscribeRetainer(t){this.subscribeRetainerOpen(t),this.subscribeRetainerClose(t),this.subscribeRetainerEvent(t)}subscribeStatisticsRealtimeResult(t){this.subscribe("statistics_realtime_result","statistics",t)}subscribeStatistics(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeStatisticsWithUid(t,e)}subscribeStatisticsWithUid(t,e){this.subscribe("statistics_result","statistics",t,{uid:e,type:"statistics"})}subscribeCalculate(t){var i,r;const e=(r=(i=this.props.conf.data)==null?void 0:i[0])==null?void 0:r.uid;this.subscribeCalculateWithUid(e)}subscribeCalculateWithUid(t){this.subscribe("statistics_result","statistics","",{uid:t,type:"calculate"})}subscribeBySource(t,e,i){switch(t){case"mosaic":this.subscribeFv(e);break;case"statisticsRealtime":this.subscribeStatisticsRealtimeResult(e);break;case"statistics":i?this.subscribeStatisticsWithUid(e,i):this.subscribeStatistics(e);break;case"calculate":i?this.subscribeCalculateWithUid(i):this.subscribeCalculate(e);break;default:console.warn(`[${this.componentType}] 未知的数据源类型: ${t}`)}}extractDataValue(t,e){var i;return!t||!t.event?null:t.event==="recv_fv"&&t.block==="mosaic"?!e||!t.data?null:t.data[e]:t.event==="statistics_realtime_result"&&t.block==="statistics"?(i=t.data)==null?void 0:i.data:t.event==="statistics_result"&&t.block==="statistics"?t.data:null}getOptionValue(t,e){var r,s;const i=(s=(r=this.props.conf)==null?void 0:r.options)==null?void 0:s[t];return i==null?e:typeof i=="object"&&"value"in i?i.value:i}applyTheme(){oe(this.props.theme,this.Style.value)}getSource(){var t,e;return((e=(t=this.props.conf)==null?void 0:t.common)==null?void 0:e.source)||"mosaic"}isStatistics(){return["statistics","calculate","statisticsRealtime","calculateRealtime"].includes(this.getSource())}resolveObjectId(t){const{common:e,data:i}=this.props.conf;if(e.multiObject&&t)return ft(t,e.useAlias,this.props.uid);const r=e.object_id?e:i[0]||{};return ft(r,e.useAlias,this.props.uid)}handleNull(t,e){return Xt(t,this.props,e)}getPreviewHelper(){return{preview:()=>Jt(this.props,this.session.value,t=>this.setHistoryData(t),t=>this.setSocketData(t),this.componentType),unregister:()=>Qt(this.props,this.session.value)}}getDebouncedInit(){return Kt(()=>this.init(),200)}cleanup(){}needsHistoryData(){return!0}setupLifecycle(){const t=this.getDebouncedInit(),e=this.getPreviewHelper();X.onMounted(()=>bt(this,null,function*(){if(this.init(),this.props.mode==="preview"){if(this.needsHistoryData())try{const r=yield new(yield Promise.resolve().then(()=>require("./history-C4gipwnp.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(r)}catch(i){console.error(`[${this.componentType}] 获取历史数据失败:`,i)}this.session.value&&this.session.value.registerComponent({id:this.props.conf.id,request:null,onUpdate:(i,r)=>{i==="realtime"&&this.setSocketData(r)}}),this.onPreview()}this.setupLinkWatch()})),X.onBeforeUnmount(()=>{this.cleanup(),e.unregister(),this.stopLinkWatch()}),X.watch(()=>this.props.conf,()=>{this.props.mode==="edit"&&t()},{deep:!0}),X.watch(()=>this.props.theme,()=>{this.init()}),X.watch(()=>{var i;return(i=this.Style.value)==null?void 0:i.linkChannel},()=>{this.setupLinkWatch()})}getStyle(){return this.Style}getType(){return this.componentType}dispatchModal(t,e,i){this.props.mode==="preview"&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:t,layerId:e,sheetIndex:i!=null?i:-1}}))}triggerModalByKey(t){var i,r;if(this.props.mode!=="preview")return;const e=(i=this.props.conf)==null?void 0:i.modalBinding;if(e&&e.enabled&&e.mode==="key"){const o=(e.map||{})[t];if(!o||!o.layerId)return;const c=o.action||"toggle",d=(r=e.sheetIndex)!=null?r:-1;this.dispatchModal(c,o.layerId,d)}}}var yt={exports:{}},_t;function Zt(){if(_t)return yt.exports;_t=1;var n=yt.exports={};return n.forEach=function(t,e){for(var i=0;i<t.length;i++){var r=e(t[i]);if(r)return r}},yt.exports}var mt,zt;function Ce(){return zt||(zt=1,mt=function(n){var t=n.stateHandler.getState;function e(o){var c=t(o);return c&&!!c.isDetectable}function i(o){t(o).isDetectable=!0}function r(o){return!!t(o).busy}function s(o,c){t(o).busy=!!c}return{isDetectable:e,markAsDetectable:i,isBusy:r,markBusy:s}}),mt}var St,Mt;function De(){return Mt||(Mt=1,St=function(n){var t={};function e(o){var c=n.get(o);return c===void 0?[]:t[c]||[]}function i(o,c){var d=n.get(o);t[d]||(t[d]=[]),t[d].push(c)}function r(o,c){for(var d=e(o),f=0,u=d.length;f<u;++f)if(d[f]===c){d.splice(f,1);break}}function s(o){var c=e(o);c&&(c.length=0)}return{get:e,add:i,removeListener:r,removeAllListeners:s}}),St}var wt,qt;function Ie(){return qt||(qt=1,wt=function(){var n=1;function t(){return n++}return{generate:t}}),wt}var kt,Nt;function Le(){return Nt||(Nt=1,kt=function(n){var t=n.idGenerator,e=n.stateHandler.getState;function i(s){var o=e(s);return o&&o.id!==void 0?o.id:null}function r(s){var o=e(s);if(!o)throw new Error("setId required the element to have a resize detection state.");var c=t.generate();return o.id=c,c}return{get:i,set:r}}),kt}var Et,Wt;function Ae(){return Wt||(Wt=1,Et=function(n){function t(){}var e={log:t,warn:t,error:t};if(!n&&window.console){var i=function(r,s){r[s]=function(){var c=console[s];if(c.apply)c.apply(console,arguments);else for(var d=0;d<arguments.length;d++)c(arguments[d])}};i(e,"log"),i(e,"warn"),i(e,"error")}return e}),Et}var xt={exports:{}},Pt;function te(){if(Pt)return xt.exports;Pt=1;var n=xt.exports={};return n.isIE=function(t){function e(){var r=navigator.userAgent.toLowerCase();return r.indexOf("msie")!==-1||r.indexOf("trident")!==-1||r.indexOf(" edge/")!==-1}if(!e())return!1;if(!t)return!0;var i=(function(){var r,s=3,o=document.createElement("div"),c=o.getElementsByTagName("i");do o.innerHTML="<!--[if gt IE "+ ++s+"]><i></i><![endif]-->";while(c[0]);return s>4?s:r})();return t===i},n.isLegacyOpera=function(){return!!window.opera},xt.exports}var Ct={exports:{}},Bt;function He(){if(Bt)return Ct.exports;Bt=1;var n=Ct.exports={};n.getOption=t;function t(e,i,r){var s=e[i];return s==null&&r!==void 0?r:s}return Ct.exports}var Dt,Ut;function Te(){if(Ut)return Dt;Ut=1;var n=He();Dt=function(i){i=i||{};var r=i.reporter,s=n.getOption(i,"async",!0),o=n.getOption(i,"auto",!0);o&&!s&&(r&&r.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),s=!0);var c=t(),d,f=!1;function u(m,x){!f&&o&&s&&c.size()===0&&D(),c.add(m,x)}function v(){for(f=!0;c.size();){var m=c;c=t(),m.process()}f=!1}function y(m){f||(m===void 0&&(m=s),d&&(g(d),d=null),m?D():v())}function D(){d=b(v)}function g(m){var x=clearTimeout;return x(m)}function b(m){var x=function(L){return setTimeout(L,0)};return x(m)}return{add:u,force:y}};function t(){var e={},i=0,r=0,s=0;function o(f,u){u||(u=f,f=0),f>r?r=f:f<s&&(s=f),e[f]||(e[f]=[]),e[f].push(u),i++}function c(){for(var f=s;f<=r;f++)for(var u=e[f],v=0;v<u.length;v++){var y=u[v];y()}}function d(){return i}return{add:o,process:c,size:d}}return Dt}var It,$t;function Re(){if($t)return It;$t=1;var n="_erd";function t(r){return r[n]={},e(r)}function e(r){return r[n]}function i(r){delete r[n]}return It={initState:t,getState:e,cleanState:i},It}var Lt,Ft;function je(){if(Ft)return Lt;Ft=1;var n=te();return Lt=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function s(u,v){function y(){v(u)}if(n.isIE(8))r(u).object={proxy:y},u.attachEvent("onresize",y);else{var D=d(u);if(!D)throw new Error("Element is not detectable by this strategy.");D.contentDocument.defaultView.addEventListener("resize",y)}}function o(u){var v=t.important?" !important; ":"; ";return(u.join(v)+v).trim()}function c(u,v,y){y||(y=v,v=u,u=null),u=u||{},u.debug;function D(g,b){var m=o(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),x=!1,L=window.getComputedStyle(g),E=g.offsetWidth,P=g.offsetHeight;r(g).startSize={width:E,height:P};function p(){function a(){if(L.position==="static"){g.style.setProperty("position","relative",u.important?"important":"");var I=function(z,T,q,A){function B(lt){return lt.replace(/[^-\d\.]/g,"")}var U=q[A];U!=="auto"&&B(U)!=="0"&&(z.warn("An element that is positioned static has style."+A+"="+U+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+A+" will be set to 0. Element: ",T),T.style.setProperty(A,"0",u.important?"important":""))};I(e,g,L,"top"),I(e,g,L,"right"),I(e,g,L,"bottom"),I(e,g,L,"left")}}function w(){x||a();function I(T,q){if(!T.contentDocument){var A=r(T);A.checkForObjectDocumentTimeoutId&&window.clearTimeout(A.checkForObjectDocumentTimeoutId),A.checkForObjectDocumentTimeoutId=setTimeout(function(){A.checkForObjectDocumentTimeoutId=0,I(T,q)},100);return}q(T.contentDocument)}var z=this;I(z,function(q){b(g)})}L.position!==""&&(a(),x=!0);var h=document.createElement("object");h.style.cssText=m,h.tabIndex=-1,h.type="text/html",h.setAttribute("aria-hidden","true"),h.onload=w,n.isIE()||(h.data="about:blank"),r(g)&&(g.appendChild(h),r(g).object=h,n.isIE()&&(h.data="about:blank"))}i?i.add(p):p()}n.isIE(8)?y(v):D(v,y)}function d(u){return r(u).object}function f(u){if(r(u)){var v=d(u);v&&(n.isIE(8)?u.detachEvent("onresize",v.proxy):u.removeChild(v),r(u).checkForObjectDocumentTimeoutId&&window.clearTimeout(r(u).checkForObjectDocumentTimeoutId),delete r(u).object)}}return{makeDetectable:c,addListener:s,uninstall:f}},Lt}var At,Yt;function Oe(){if(Yt)return At;Yt=1;var n=Zt().forEach;return At=function(t){t=t||{};var e=t.reporter,i=t.batchProcessor,r=t.stateHandler.getState;t.stateHandler.hasState;var s=t.idHandler;if(!i)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var o=v(),c="erd_scroll_detection_scrollbar_style",d="erd_scroll_detection_container";function f(p){y(p,c,d)}f(window.document);function u(p){var a=t.important?" !important; ":"; ";return(p.join(a)+a).trim()}function v(){var p=500,a=500,w=document.createElement("div");w.style.cssText=u(["position: absolute","width: "+p*2+"px","height: "+a*2+"px","visibility: hidden","margin: 0","padding: 0"]);var h=document.createElement("div");h.style.cssText=u(["position: absolute","width: "+p+"px","height: "+a+"px","overflow: scroll","visibility: none","top: "+-p*3+"px","left: "+-a*3+"px","visibility: hidden","margin: 0","padding: 0"]),h.appendChild(w),document.body.insertBefore(h,document.body.firstChild);var I=p-h.clientWidth,z=a-h.clientHeight;return document.body.removeChild(h),{width:I,height:z}}function y(p,a,w){function h(q,A){A=A||function(U){p.head.appendChild(U)};var B=p.createElement("style");return B.innerHTML=q,B.id=a,A(B),B}if(!p.getElementById(a)){var I=w+"_animation",z=w+"_animation_active",T=`/* Created by the element-resize-detector library. */
|
|
2
2
|
`;T+="."+w+" > div::-webkit-scrollbar { "+u(["display: none"])+` }
|
|
3
3
|
|
|
4
4
|
`,T+="."+z+" { "+u(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+I,"animation-name: "+I])+` }
|
|
@@ -15,7 +15,7 @@ var bt = (n, t, e) => new Promise((i, r) => {
|
|
|
15
15
|
c((e = e.apply(n, t)).next());
|
|
16
16
|
});
|
|
17
17
|
import { ref as zt, inject as te, watch as pt, onMounted as ee, onBeforeUnmount as re } from "vue";
|
|
18
|
-
import { d as tt, u as ie, b as ne } from "./index-
|
|
18
|
+
import { d as tt, u as ie, b as ne } from "./index-zPaMBZk-.js";
|
|
19
19
|
const ae = "object_alias_uid_mapping", _e = ["#4162ff", "#3bbc6a", "#e24359", "#fdcd61", "#44b4ff", "#8000ff", "#ae00ae", "#ff8102", "#970000", "#9b9b00", "#939393", "#007700", "#397373"];
|
|
20
20
|
function se(n) {
|
|
21
21
|
if (!n || typeof n != "string" || n.startsWith("var("))
|
|
@@ -255,13 +255,13 @@ const Me = [
|
|
|
255
255
|
return { times: i, data: r };
|
|
256
256
|
}, me = (n, t, e, i, r) => bt(null, null, function* () {
|
|
257
257
|
try {
|
|
258
|
-
const o = yield new (yield import("./history-
|
|
258
|
+
const o = yield new (yield import("./history-DN0IVkYL.js")).default().getHistoryData(n, r);
|
|
259
259
|
e(o);
|
|
260
260
|
} catch (s) {
|
|
261
261
|
console.error("获取历史数据时出错:", s);
|
|
262
262
|
} finally {
|
|
263
263
|
if (t) {
|
|
264
|
-
const { formatRequest: s } = yield import("./request-
|
|
264
|
+
const { formatRequest: s } = yield import("./request-DT13bnc0.js"), o = s(n.conf, n.uid, r);
|
|
265
265
|
t.registerComponent({
|
|
266
266
|
id: n.conf.id,
|
|
267
267
|
request: o,
|
|
@@ -638,7 +638,7 @@ class Fe {
|
|
|
638
638
|
if (this.init(), this.props.mode === "preview") {
|
|
639
639
|
if (this.needsHistoryData())
|
|
640
640
|
try {
|
|
641
|
-
const r = yield new (yield import("./history-
|
|
641
|
+
const r = yield new (yield import("./history-DN0IVkYL.js")).default().getHistoryData(this.props, this.componentType);
|
|
642
642
|
this.setHistoryData(r);
|
|
643
643
|
} catch (i) {
|
|
644
644
|
console.error(`[${this.componentType}] 获取历史数据失败:`, i);
|
|
@@ -11,8 +11,8 @@ var v = (a, t, o) => t in a ? z(a, t, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return a;
|
|
12
12
|
}, h = (a, t) => O(a, b(t));
|
|
13
13
|
import { defineComponent as V, ref as D, computed as T, openBlock as M, createElementBlock as N, normalizeStyle as f, unref as n, createElementVNode as c, toDisplayString as d, renderSlot as j } from "vue";
|
|
14
|
-
import { B as I } from "./element-resize-detector-
|
|
15
|
-
import { d as L, _ as R } from "./index-
|
|
14
|
+
import { B as I } from "./element-resize-detector-DeMhGbNi.js";
|
|
15
|
+
import { d as L, _ as R } from "./index-zPaMBZk-.js";
|
|
16
16
|
import { g as U } from "./titleStyle-BT5GlpAb.js";
|
|
17
17
|
import { A as k, D as B } from "./ele-evn-icon-MWzAujnD.js";
|
|
18
18
|
const Y = { class: "mix-body" }, $ = { class: "mix-footer" }, y = "--", F = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var C=Object.defineProperty,z=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var S=(s,e,a)=>e in s?C(s,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[e]=a,p=(s,e)=>{for(var a in e||(e={}))O.call(e,a)&&S(s,a,e[a]);if(f)for(var a of f(e))V.call(e,a)&&S(s,a,e[a]);return s},m=(s,e)=>z(s,E(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),b=require("./element-resize-detector-
|
|
1
|
+
"use strict";var C=Object.defineProperty,z=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var S=(s,e,a)=>e in s?C(s,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[e]=a,p=(s,e)=>{for(var a in e||(e={}))O.call(e,a)&&S(s,a,e[a]);if(f)for(var a of f(e))V.call(e,a)&&S(s,a,e[a]);return s},m=(s,e)=>z(s,E(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),b=require("./element-resize-detector-BlMXyWIR.cjs"),_=require("./index-EnNA0nIi.cjs"),A=require("./titleStyle-NSnz6cUg.cjs"),v=require("./ele-evn-icon-DUQMS-9T.cjs"),D={class:"mix-body"},N={class:"mix-footer"},y="--",T={DEFAULT_ICON:v.DEFAULT_ICON,ACTIVE_ICON:v.ACTIVE_ICON,NAME_CN:"状态卡片",NAME_EN:"State",ORDER:3},I={nameSize:14,valueSize:36,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",textColor:"#111"},M=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}],j=["fv","status_fv"],L=["mosaic"],R={useAlias:!1,source:"mosaic",multiObject:!1,hideMultiObject:!0},U=1,q={DEFAULT:T,OPTIONS:I,DATA:M,PARAMS:j,SOURCE:L,ITEMS:U,COMMON:R},$=t.defineComponent(m(p({},q),{__name:"evn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){const e=s,a=t.ref(_.dayjs().format("YYYY-MM-DD HH:mm:ss"));class g extends b.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",14),valueSize:this.getOptionValue("valueSize",36),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){var o;this.Style.value=this.extractStyles(),this.applyTheme(),(o=this.props.conf.data)!=null&&o.length||(this.props.conf.data=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}])}setSocketData(o){if(!o)return;const{data:n}=this.props.conf;!n||!Array.isArray(n)||n.forEach(i=>{var l;try{i.value=(l=this.extractDataValue(o,i.fv))!=null?l:y,i.statusValue=this.extractDataValue(o,i.status_fv),o.datetime&&(a.value=o.datetime)}catch(F){i.value=y}})}}const u=new g(e,"evn");u.setupLifecycle();const r=u.getStyle(),d=e.conf,h=t.computed(()=>A.generateTitleStyle(e.conf.options)),x=()=>{var i;const{data:c}=e.conf,o=c[0];let n={color:"",text:""};return(i=o==null?void 0:o.status)==null||i.forEach(l=>{String(l.code)===String(o.statusValue)&&(n={text:l.text,color:l.color})}),n};return(c,o)=>{var n,i,l;return t.openBlock(),t.createElementBlock("div",{class:"mix-component",style:t.normalizeStyle({background:t.unref(r).bgColor,borderRadius:`${t.unref(r).radiusSize}px`})},[t.createElementVNode("div",{class:"mix-title",style:t.normalizeStyle(h.value)},t.toDisplayString(t.unref(d).caption||x().text),5),t.createElementVNode("div",D,[t.createElementVNode("div",{class:"body-value",style:t.normalizeStyle({fontSize:`${t.unref(r).valueSize}px`,color:t.unref(r).textColor})},t.toDisplayString((l=(i=(n=t.unref(d))==null?void 0:n.data)==null?void 0:i[0])==null?void 0:l.value),5)]),t.createElementVNode("div",N,[t.createElementVNode("div",{class:"footer-time",style:t.normalizeStyle({fontSize:`${t.unref(r).timeSize}px`,color:t.unref(r).titleColor})},t.toDisplayString(a.value),5)]),t.renderSlot(c.$slots,"default",{},void 0,!0)],4)}}})),k=_._export_sfc($,[["__scopeId","data-v-eb019c9b"]]);exports.default=k;
|
|
@@ -31,8 +31,8 @@ import "element-plus/es/components/base/style/css";
|
|
|
31
31
|
import "element-plus/es/components/button/style/css";
|
|
32
32
|
import { defineComponent as te, ref as U, computed as E, watch as oe, openBlock as ae, createElementBlock as se, normalizeStyle as ne, createElementVNode as N, toDisplayString as Y, createVNode as ce, withCtx as re, createTextVNode as le, unref as ie, renderSlot as ue } from "vue";
|
|
33
33
|
import { u as de } from "./vue-i18n-5Nahpzrm.js";
|
|
34
|
-
import { d as S, _ as he } from "./index-
|
|
35
|
-
import { E as fe } from "./EChartComponentBase-
|
|
34
|
+
import { d as S, _ as he } from "./index-zPaMBZk-.js";
|
|
35
|
+
import { E as fe } from "./EChartComponentBase-GBbKjtlb.js";
|
|
36
36
|
import "./index-ButoLLAe.js";
|
|
37
37
|
import { A as me, D as ve } from "./ele-vlu-icon-Bg6EHZdJ.js";
|
|
38
38
|
import { cn as pe } from "./echarts-BVht3HHb.js";
|
|
@@ -319,7 +319,7 @@ const be = { class: "chart-header" }, ye = { class: "chart-title" }, ge = { clas
|
|
|
319
319
|
c.object_id = s;
|
|
320
320
|
}), a.multiObject || (a.object_id = s);
|
|
321
321
|
try {
|
|
322
|
-
const c = yield import("./history-
|
|
322
|
+
const c = yield import("./history-DN0IVkYL.js"), D = yield new c.default().getHistoryData(r, "evolutionChart");
|
|
323
323
|
D && Array.isArray(D) && e.forEach((j, q) => {
|
|
324
324
|
if (!j.fv) return;
|
|
325
325
|
const L = `${s}-${j.name || j.fv || "default"}`, I = D[q], M = (I == null ? void 0 : I.data) || I;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var P=Object.defineProperty,W=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var B=(b,u,r)=>u in b?P(b,u,{enumerable:!0,configurable:!0,writable:!0,value:r}):b[u]=r,x=(b,u)=>{for(var r in u||(u={}))J.call(u,r)&&B(b,r,u[r]);if(q)for(var r of q(u))K.call(u,r)&&B(b,r,u[r]);return b},E=(b,u)=>W(b,G(u));var z=(b,u,r)=>new Promise((v,y)=>{var A=C=>{try{j(r.next(C))}catch(_){y(_)}},d=C=>{try{j(r.throw(C))}catch(_){y(_)}},j=C=>C.done?v(C.value):Promise.resolve(C.value).then(A,d);j((r=r.apply(b,u)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");const i=require("vue"),X=require("./vue-i18n-BvHMBi_b.cjs"),w=require("./index-Mh5Dw2sd.cjs"),ee=require("./EChartComponentBase-BaQpBzVC.cjs");require("./index-mAPVa0s4.cjs");const H=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),te=require("./echarts-BB8O2KSA.cjs"),oe={class:"chart-header"},ae={class:"chart-title"},se={class:"chart-actions"},ne=["id"],ce={DEFAULT_ICON:H.DEFAULT_ICON,ACTIVE_ICON:H.ACTIVE_ICON,NAME_CN:"裂缝演变图",NAME_EN:"EvolutionChart",ORDER:2},re={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:3,type:"number",label:"component.options.lineWidth"},showArea:{value:!0,type:"switch",label:"component.line.showArea"},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"}}},le=[{name:"宽度累计变化量",fv:"",fvDeviceName:"",object_id:""}],ie=["name","fv","fvDeviceName","object_id"],ue=["mosaic","statistics","calculate"],de={useAlias:!1,multiObject:!0,source:"mosaic"},he=1,ve={DEFAULT:ce,OPTIONS:re,DATA:le,PARAMS:ie,SOURCE:ue,ITEMS:he,COMMON:de},fe=i.defineComponent(E(x({},ve),{__name:"evolutionChart",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(b){const{t:u}=X.useI18n(),r=b,v=i.ref(new Map),y=i.ref(new Map);class A extends ee.EChartComponentBase{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.yAxisLabel="",this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(o){this.currentObjectId=o}extractStyles(){return E(x({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",3),showArea:this.getOptionValue("showArea",!0),linkChannel:this.getOptionValue("linkChannel","crack")})}setYAxisLabel(o){this.yAxisLabel=o}onPreview(){var l;const{common:o,data:s}=this.props.conf,f=this.getSource();if(o.multiObject&&Array.isArray(s)){const h=new Set;s.forEach(e=>{const a=this.resolveObjectId(e);if(!a||h.has(a))return;h.add(a),this.subscribeBySource(f,a,e.uid);const t=`${a}-${e.name||e.fv||"default"}`;v.value.has(t)||v.value.set(t,[])})}else{const h=this.resolveObjectId(),e=(l=s==null?void 0:s[0])==null?void 0:l.uid;h&&(this.currentObjectId=h,this.subscribeBySource(f,h,e),s.forEach(a=>{const t=`${h}-${a.name||a.fv||"default"}`;v.value.has(t)||v.value.set(t,[])}))}}onLinkEvent(o){_(o)}getChartOption(){const{data:o,common:s}=this.props.conf,f=this.Style.value;let l;if(this.props.mode==="edit"){l=[];for(let e=30;e>=0;e--)l.push(w.dayjs().subtract(e,"day").format("MM-DD"))}else{const e=new Set;o.forEach(a=>{const t=s.multiObject?this.resolveObjectId(a):this.currentObjectId||this.resolveObjectId();if(!t)return;const n=`${t}-${a.name||a.fv||"default"}`;(v.value.get(n)||[]).forEach(c=>e.add(c.time))}),l=Array.from(e).sort()}const h=o.filter(e=>s.multiObject?this.resolveObjectId(e):this.currentObjectId||this.resolveObjectId()).map((e,a)=>{const t=this.deviceColors[a%this.deviceColors.length],n=s.multiObject?this.resolveObjectId(e):this.currentObjectId||this.resolveObjectId(),m=`${n}-${e.name||e.fv||"default"}`,c=y.value.get(n)||n,p=e.name||e.fv||"default";console.log(`[裂缝演变图] 生成系列 ${a}:`,{object_id:n,deviceName:c,displayName:p,multiObject:s.multiObject,deviceNameMapSize:y.value.size,allDeviceNames:Array.from(y.value.entries())});let O;return e.fvDeviceName&&c!==n?O=`${c}-${p}`:s.multiObject?O=`${c}-${p}`:O=p,{name:O,type:"line",smooth:!0,showSymbol:!0,symbol:"circle",symbolSize:6,connectNulls:!0,lineStyle:{color:t,width:f.lineWidth},itemStyle:{color:t},areaStyle:f.showArea?{color:new te.LinearGradient(0,0,0,1,[{offset:0,color:`${t}4D`},{offset:1,color:`${t}0D`}])}:void 0,data:this.getEvolutionData(m,l)}});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:e=>{let a=`<div style="font-weight: bold;">${e[0].axisValue}</div>`;return e.forEach(t=>{var n;a+=`<div>${t.marker} ${t.seriesName}: ${(n=t.value)!=null?n:"--"} mm</div>`}),a}},legend:{show:f.showLegend,type:"scroll",top:10,textStyle:{color:f.textColor}},grid:{top:60,left:60,right:40,bottom:f.showDataZoom?80:40},xAxis:{type:"category",data:l,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:f.textColor}},yAxis:{type:"value",name:this.yAxisLabel||"宽度累计变化量(mm)",nameTextStyle:{color:f.textColor},axisLabel:{color:f.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:f.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:h}}generateTimeLabels(){return[]}getEvolutionData(o,s){if(this.props.mode==="edit"){const l=[];for(let a=30;a>=0;a--)l.push(w.dayjs().subtract(a,"day").format("MM-DD"));const h=.1,e=.02+Math.random()*.03;return Array.from({length:l.length},(a,t)=>{const n=h+e*t;return parseFloat(n.toFixed(2))})}return(v.value.get(o)||[]).map(l=>l.value)}setSocketData(o){console.log("[裂缝演变图] 收到实时数据:",o),console.log("[裂缝演变图] 数据结构:",JSON.stringify(o,null,2)),super.setSocketData(o);const{data:s,common:f}=this.props.conf,l=w.dayjs().format("MM-DD HH:mm:ss");s.forEach((e,a)=>{const t=f.multiObject?this.resolveObjectId(e):this.currentObjectId||this.resolveObjectId();if(!t){console.warn(`[裂缝演变图] 数据项 ${a} 缺少 object_id`);return}if(e.fvDeviceName){console.log(`[裂缝演变图] 尝试提取设备名称,字段: ${e.fvDeviceName}`);const m=this.extractDataValue(o,e.fvDeviceName);if(console.log(`[裂缝演变图] 提取结果: ${m}`),m)y.value.set(t,String(m)),console.log(`[裂缝演变图] 设置设备名称: ${t} -> ${m}`);else if(console.warn(`[裂缝演变图] 未能从字段 ${e.fvDeviceName} 提取设备名称`),o.data&&o.data[e.fvDeviceName]){const c=o.data[e.fvDeviceName];y.value.set(t,String(c)),console.log(`[裂缝演变图] 使用备用方式获取设备名称: ${t} -> ${c}`)}}let n=e.value;if((!n||n==="--")&&(n=this.extractDataValue(o,e.fv)),console.log(`[裂缝演变图] 数据项 ${a}:`,{object_id:t,fv:e.fv,fvDeviceName:e.fvDeviceName,name:e.name,value:n,rawValue:e.value,currentDeviceName:y.value.get(t)}),n!=null&&n!=="--"){const m=`${t}-${e.name||e.fv||"default"}`,c=v.value.get(m)||[],p=typeof n=="number"?n:parseFloat(n);if(isNaN(p)){console.warn(`[裂缝演变图] 无效的数值: ${n}`);return}c.push({time:l,value:p}),console.log(`[裂缝演变图] 添加数据点 ${m}:`,{time:l,value:p}),c.length>100&&c.shift(),v.value.set(m,c)}}),console.log("[裂缝演变图] 当前历史数据:",Array.from(v.value.entries())),console.log("[裂缝演变图] 当前设备名称映射:",Array.from(y.value.entries()));const h=this.getChartInstance();h&&h.setOption(this.getChartOption())}}const d=new A(r,"evolutionChart");d.setYAxisLabel(u("component.crack.widthCumulativeChangeUnit")),d.setupLifecycle();const j=d.getStyle(),C=d.getEchartId(),_=g=>z(null,null,function*(){var m;console.log("[裂缝演变图] 收到联动事件:",g);const{payload:o}=g;if(!o)return;const s=o.objectId||o.object_id;if(!s||r.mode!=="preview"||d.getCurrentObjectId()===s)return;d.setCurrentObjectId(s),v.value.clear(),y.value.clear();const l=(m=d.session)==null?void 0:m.value;if(!l)return;const h=r.conf.id;l.componentRequests&&l.componentRequests.delete(h);const{data:e,common:a}=r.conf;Array.isArray(e)&&e.forEach(c=>{c.object_id=s}),a.multiObject||(a.object_id=s);try{const c=yield Promise.resolve().then(()=>require("./history-DAmBl4_5.cjs")),O=yield new c.default().getHistoryData(r,"evolutionChart");O&&Array.isArray(O)&&e.forEach((S,Z)=>{if(!S.fv)return;const k=`${s}-${S.name||S.fv||"default"}`,N=O[Z],L=(N==null?void 0:N.data)||N;if(!Array.isArray(L)){v.value.set(k,[]);return}const $=[...L].sort((D,I)=>new Date(D.time||D.datetime||"").getTime()-new Date(I.time||I.datetime||"").getTime()),M=[];if($.forEach(D=>{const I=D.time||D.datetime,V=D[S.fv];if(I&&V!=null){const T=parseFloat(V);isNaN(T)||M.push({time:w.dayjs(I).format("MM-DD HH:mm:ss"),value:T})}}),v.value.set(k,M),S.fvDeviceName&&$.length>0){const D=$[0][S.fvDeviceName];D&&y.value.set(s,String(D))}}),console.log("[裂缝演变图] 历史数据加载完成")}catch(c){console.warn("[裂缝演变图] 历史数据获取失败:",c)}const t=d.getChartInstance();t&&t.setOption(d.getChartOption(),!0),l.registerComponent({id:h,request:null,onUpdate:(c,p)=>{c==="realtime"&&d.setSocketData(p)}});const n=d.getSource();d.subscribeBySource(n,s),e&&Array.isArray(e)&&e.forEach(c=>{const p=`${s}-${c.name||c.fv||"default"}`;v.value.has(p)||v.value.set(p,[])})}),R=i.computed(()=>({background:j.value.bgColor,color:j.value.textColor})),U=i.computed(()=>u("component.crack.evolutionChart")),F=i.computed(()=>u("component.crack.exportImage"));i.watch(()=>u("component.crack.widthCumulativeChangeUnit"),g=>{d.setYAxisLabel(g),d.init()});const Y=()=>{const g=d.getChartInstance();if(!g)return;const o=document.createElement("a");o.href=g.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),o.download=`${u("component.crack.evolutionChart")}_${w.dayjs().format("YYYYMMDDHHmmss")}.png`,o.click()};return(g,o)=>{const s=Q.ElButton;return i.openBlock(),i.createElementBlock("div",{class:"mix-component crack-evolution",style:i.normalizeStyle(R.value)},[i.createElementVNode("div",oe,[i.createElementVNode("span",ae,"📊 "+i.toDisplayString(U.value),1),i.createElementVNode("div",se,[i.createVNode(s,{size:"small",onClick:Y},{default:i.withCtx(()=>[i.createTextVNode("💾 "+i.toDisplayString(F.value),1)]),_:1})])]),i.createElementVNode("div",{id:i.unref(C),class:"chart-container"},null,8,ne),i.renderSlot(g.$slots,"default",{},void 0,!0)],4)}}})),me=w._export_sfc(fe,[["__scopeId","data-v-2cd3daa1"]]);exports.default=me;
|
|
1
|
+
"use strict";var P=Object.defineProperty,W=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var B=(b,u,r)=>u in b?P(b,u,{enumerable:!0,configurable:!0,writable:!0,value:r}):b[u]=r,x=(b,u)=>{for(var r in u||(u={}))J.call(u,r)&&B(b,r,u[r]);if(q)for(var r of q(u))K.call(u,r)&&B(b,r,u[r]);return b},E=(b,u)=>W(b,G(u));var z=(b,u,r)=>new Promise((v,y)=>{var A=C=>{try{j(r.next(C))}catch(_){y(_)}},d=C=>{try{j(r.throw(C))}catch(_){y(_)}},j=C=>C.done?v(C.value):Promise.resolve(C.value).then(A,d);j((r=r.apply(b,u)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");const i=require("vue"),X=require("./vue-i18n-BvHMBi_b.cjs"),w=require("./index-EnNA0nIi.cjs"),ee=require("./EChartComponentBase-BTqBoBn8.cjs");require("./index-mAPVa0s4.cjs");const H=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),te=require("./echarts-BB8O2KSA.cjs"),oe={class:"chart-header"},ae={class:"chart-title"},se={class:"chart-actions"},ne=["id"],ce={DEFAULT_ICON:H.DEFAULT_ICON,ACTIVE_ICON:H.ACTIVE_ICON,NAME_CN:"裂缝演变图",NAME_EN:"EvolutionChart",ORDER:2},re={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:3,type:"number",label:"component.options.lineWidth"},showArea:{value:!0,type:"switch",label:"component.line.showArea"},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"}}},le=[{name:"宽度累计变化量",fv:"",fvDeviceName:"",object_id:""}],ie=["name","fv","fvDeviceName","object_id"],ue=["mosaic","statistics","calculate"],de={useAlias:!1,multiObject:!0,source:"mosaic"},he=1,ve={DEFAULT:ce,OPTIONS:re,DATA:le,PARAMS:ie,SOURCE:ue,ITEMS:he,COMMON:de},fe=i.defineComponent(E(x({},ve),{__name:"evolutionChart",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(b){const{t:u}=X.useI18n(),r=b,v=i.ref(new Map),y=i.ref(new Map);class A extends ee.EChartComponentBase{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.yAxisLabel="",this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(o){this.currentObjectId=o}extractStyles(){return E(x({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",3),showArea:this.getOptionValue("showArea",!0),linkChannel:this.getOptionValue("linkChannel","crack")})}setYAxisLabel(o){this.yAxisLabel=o}onPreview(){var l;const{common:o,data:s}=this.props.conf,f=this.getSource();if(o.multiObject&&Array.isArray(s)){const h=new Set;s.forEach(e=>{const a=this.resolveObjectId(e);if(!a||h.has(a))return;h.add(a),this.subscribeBySource(f,a,e.uid);const t=`${a}-${e.name||e.fv||"default"}`;v.value.has(t)||v.value.set(t,[])})}else{const h=this.resolveObjectId(),e=(l=s==null?void 0:s[0])==null?void 0:l.uid;h&&(this.currentObjectId=h,this.subscribeBySource(f,h,e),s.forEach(a=>{const t=`${h}-${a.name||a.fv||"default"}`;v.value.has(t)||v.value.set(t,[])}))}}onLinkEvent(o){_(o)}getChartOption(){const{data:o,common:s}=this.props.conf,f=this.Style.value;let l;if(this.props.mode==="edit"){l=[];for(let e=30;e>=0;e--)l.push(w.dayjs().subtract(e,"day").format("MM-DD"))}else{const e=new Set;o.forEach(a=>{const t=s.multiObject?this.resolveObjectId(a):this.currentObjectId||this.resolveObjectId();if(!t)return;const n=`${t}-${a.name||a.fv||"default"}`;(v.value.get(n)||[]).forEach(c=>e.add(c.time))}),l=Array.from(e).sort()}const h=o.filter(e=>s.multiObject?this.resolveObjectId(e):this.currentObjectId||this.resolveObjectId()).map((e,a)=>{const t=this.deviceColors[a%this.deviceColors.length],n=s.multiObject?this.resolveObjectId(e):this.currentObjectId||this.resolveObjectId(),m=`${n}-${e.name||e.fv||"default"}`,c=y.value.get(n)||n,p=e.name||e.fv||"default";console.log(`[裂缝演变图] 生成系列 ${a}:`,{object_id:n,deviceName:c,displayName:p,multiObject:s.multiObject,deviceNameMapSize:y.value.size,allDeviceNames:Array.from(y.value.entries())});let O;return e.fvDeviceName&&c!==n?O=`${c}-${p}`:s.multiObject?O=`${c}-${p}`:O=p,{name:O,type:"line",smooth:!0,showSymbol:!0,symbol:"circle",symbolSize:6,connectNulls:!0,lineStyle:{color:t,width:f.lineWidth},itemStyle:{color:t},areaStyle:f.showArea?{color:new te.LinearGradient(0,0,0,1,[{offset:0,color:`${t}4D`},{offset:1,color:`${t}0D`}])}:void 0,data:this.getEvolutionData(m,l)}});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:e=>{let a=`<div style="font-weight: bold;">${e[0].axisValue}</div>`;return e.forEach(t=>{var n;a+=`<div>${t.marker} ${t.seriesName}: ${(n=t.value)!=null?n:"--"} mm</div>`}),a}},legend:{show:f.showLegend,type:"scroll",top:10,textStyle:{color:f.textColor}},grid:{top:60,left:60,right:40,bottom:f.showDataZoom?80:40},xAxis:{type:"category",data:l,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:f.textColor}},yAxis:{type:"value",name:this.yAxisLabel||"宽度累计变化量(mm)",nameTextStyle:{color:f.textColor},axisLabel:{color:f.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:f.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:h}}generateTimeLabels(){return[]}getEvolutionData(o,s){if(this.props.mode==="edit"){const l=[];for(let a=30;a>=0;a--)l.push(w.dayjs().subtract(a,"day").format("MM-DD"));const h=.1,e=.02+Math.random()*.03;return Array.from({length:l.length},(a,t)=>{const n=h+e*t;return parseFloat(n.toFixed(2))})}return(v.value.get(o)||[]).map(l=>l.value)}setSocketData(o){console.log("[裂缝演变图] 收到实时数据:",o),console.log("[裂缝演变图] 数据结构:",JSON.stringify(o,null,2)),super.setSocketData(o);const{data:s,common:f}=this.props.conf,l=w.dayjs().format("MM-DD HH:mm:ss");s.forEach((e,a)=>{const t=f.multiObject?this.resolveObjectId(e):this.currentObjectId||this.resolveObjectId();if(!t){console.warn(`[裂缝演变图] 数据项 ${a} 缺少 object_id`);return}if(e.fvDeviceName){console.log(`[裂缝演变图] 尝试提取设备名称,字段: ${e.fvDeviceName}`);const m=this.extractDataValue(o,e.fvDeviceName);if(console.log(`[裂缝演变图] 提取结果: ${m}`),m)y.value.set(t,String(m)),console.log(`[裂缝演变图] 设置设备名称: ${t} -> ${m}`);else if(console.warn(`[裂缝演变图] 未能从字段 ${e.fvDeviceName} 提取设备名称`),o.data&&o.data[e.fvDeviceName]){const c=o.data[e.fvDeviceName];y.value.set(t,String(c)),console.log(`[裂缝演变图] 使用备用方式获取设备名称: ${t} -> ${c}`)}}let n=e.value;if((!n||n==="--")&&(n=this.extractDataValue(o,e.fv)),console.log(`[裂缝演变图] 数据项 ${a}:`,{object_id:t,fv:e.fv,fvDeviceName:e.fvDeviceName,name:e.name,value:n,rawValue:e.value,currentDeviceName:y.value.get(t)}),n!=null&&n!=="--"){const m=`${t}-${e.name||e.fv||"default"}`,c=v.value.get(m)||[],p=typeof n=="number"?n:parseFloat(n);if(isNaN(p)){console.warn(`[裂缝演变图] 无效的数值: ${n}`);return}c.push({time:l,value:p}),console.log(`[裂缝演变图] 添加数据点 ${m}:`,{time:l,value:p}),c.length>100&&c.shift(),v.value.set(m,c)}}),console.log("[裂缝演变图] 当前历史数据:",Array.from(v.value.entries())),console.log("[裂缝演变图] 当前设备名称映射:",Array.from(y.value.entries()));const h=this.getChartInstance();h&&h.setOption(this.getChartOption())}}const d=new A(r,"evolutionChart");d.setYAxisLabel(u("component.crack.widthCumulativeChangeUnit")),d.setupLifecycle();const j=d.getStyle(),C=d.getEchartId(),_=g=>z(null,null,function*(){var m;console.log("[裂缝演变图] 收到联动事件:",g);const{payload:o}=g;if(!o)return;const s=o.objectId||o.object_id;if(!s||r.mode!=="preview"||d.getCurrentObjectId()===s)return;d.setCurrentObjectId(s),v.value.clear(),y.value.clear();const l=(m=d.session)==null?void 0:m.value;if(!l)return;const h=r.conf.id;l.componentRequests&&l.componentRequests.delete(h);const{data:e,common:a}=r.conf;Array.isArray(e)&&e.forEach(c=>{c.object_id=s}),a.multiObject||(a.object_id=s);try{const c=yield Promise.resolve().then(()=>require("./history-C4gipwnp.cjs")),O=yield new c.default().getHistoryData(r,"evolutionChart");O&&Array.isArray(O)&&e.forEach((S,Z)=>{if(!S.fv)return;const k=`${s}-${S.name||S.fv||"default"}`,N=O[Z],L=(N==null?void 0:N.data)||N;if(!Array.isArray(L)){v.value.set(k,[]);return}const $=[...L].sort((D,I)=>new Date(D.time||D.datetime||"").getTime()-new Date(I.time||I.datetime||"").getTime()),M=[];if($.forEach(D=>{const I=D.time||D.datetime,V=D[S.fv];if(I&&V!=null){const T=parseFloat(V);isNaN(T)||M.push({time:w.dayjs(I).format("MM-DD HH:mm:ss"),value:T})}}),v.value.set(k,M),S.fvDeviceName&&$.length>0){const D=$[0][S.fvDeviceName];D&&y.value.set(s,String(D))}}),console.log("[裂缝演变图] 历史数据加载完成")}catch(c){console.warn("[裂缝演变图] 历史数据获取失败:",c)}const t=d.getChartInstance();t&&t.setOption(d.getChartOption(),!0),l.registerComponent({id:h,request:null,onUpdate:(c,p)=>{c==="realtime"&&d.setSocketData(p)}});const n=d.getSource();d.subscribeBySource(n,s),e&&Array.isArray(e)&&e.forEach(c=>{const p=`${s}-${c.name||c.fv||"default"}`;v.value.has(p)||v.value.set(p,[])})}),R=i.computed(()=>({background:j.value.bgColor,color:j.value.textColor})),U=i.computed(()=>u("component.crack.evolutionChart")),F=i.computed(()=>u("component.crack.exportImage"));i.watch(()=>u("component.crack.widthCumulativeChangeUnit"),g=>{d.setYAxisLabel(g),d.init()});const Y=()=>{const g=d.getChartInstance();if(!g)return;const o=document.createElement("a");o.href=g.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),o.download=`${u("component.crack.evolutionChart")}_${w.dayjs().format("YYYYMMDDHHmmss")}.png`,o.click()};return(g,o)=>{const s=Q.ElButton;return i.openBlock(),i.createElementBlock("div",{class:"mix-component crack-evolution",style:i.normalizeStyle(R.value)},[i.createElementVNode("div",oe,[i.createElementVNode("span",ae,"📊 "+i.toDisplayString(U.value),1),i.createElementVNode("div",se,[i.createVNode(s,{size:"small",onClick:Y},{default:i.withCtx(()=>[i.createTextVNode("💾 "+i.toDisplayString(F.value),1)]),_:1})])]),i.createElementVNode("div",{id:i.unref(C),class:"chart-container"},null,8,ne),i.renderSlot(g.$slots,"default",{},void 0,!0)],4)}}})),me=w._export_sfc(fe,[["__scopeId","data-v-2cd3daa1"]]);exports.default=me;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var te=Object.defineProperty,oe=Object.defineProperties;var le=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var ne=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var R=(s,c,a)=>c in s?te(s,c,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[c]=a,I=(s,c)=>{for(var a in c||(c={}))ne.call(c,a)&&R(s,a,c[a]);if(P)for(var a of P(c))ae.call(c,a)&&R(s,a,c[a]);return s},q=(s,c)=>oe(s,le(c));var N=(s,c,a)=>new Promise((_,E)=>{var b=r=>{try{d(a.next(r))}catch(p){E(p)}},i=r=>{try{d(a.throw(r))}catch(p){E(p)}},d=r=>r.done?_(r.value):Promise.resolve(r.value).then(b,i);d((a=a.apply(s,c)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),re=require("./element-resize-detector-Bo5uDQAu.cjs"),D=require("./index-Mh5Dw2sd.cjs"),se=require("./api-P_s372dW.cjs"),ce=require("./config-BLSroAzs.cjs"),C=require("element-plus"),ie=require("./store-BJW2NQkK.cjs"),j=require("./ele-vdo-icon-Bgp9gaT6.cjs"),de={class:"mix-body"},pe={class:"upload-content"},ue={class:"upload-title"},me={key:0,class:"upload-hint"},ve={key:1,class:"upload-formats"},fe={key:1,class:"viewer-container"},Ve={key:0,class:"file-controls"},Ee={class:"file-info"},ye={class:"file-details"},he={class:"file-name"},ke={class:"file-type"},we={class:"control-buttons"},ge={class:"viewer-content"},xe={key:0,class:"pdf-viewer"},Ne=["src"],Be={key:1,class:"word-viewer"},Ce=["innerHTML"],_e={key:1,class:"loading-content"},be={key:2,class:"excel-viewer"},Se={key:0,class:"excel-content"},Te={key:0,class:"sheet-tabs"},Le=["onClick"],He={class:"excel-table-wrapper"},De={class:"excel-table"},Me={key:1,class:"loading-content"},Ue={key:3,class:"ppt-viewer"},Ae={class:"ppt-fallback"},Fe={class:"file-name-display"},Oe={key:4,class:"text-viewer"},Pe={class:"text-content"},Re={key:5,class:"unsupported-viewer"},Ie={class:"unsupported-content"},qe={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},je={DEFAULT_ICON:j.DEFAULT_ICON,ACTIVE_ICON:j.ACTIVE_ICON,NAME_CN:"文件查看器",NAME_EN:"File Viewer",ORDER:3},$e={fileUrl:{value:"",type:"string",label:"component.fileViewer.fileUrl",placeholder:"component.fileViewer.uploadPlaceholder"},fileName:{value:"",type:"string",label:"component.fileViewer.fileName",placeholder:"component.fileViewer.uploadPlaceholder"},fileType:{value:"",type:"string",label:"component.fileViewer.fileType",placeholder:"component.fileViewer.autoDetect"},showToolbar:!0},Xe=[],ze=[],Ze=[],We=null,Ge={DEFAULT:je,OPTIONS:$e,DATA:Xe,PARAMS:ze,SOURCE:Ze,COMMON:We},Je=e.defineComponent(q(I({},Ge),{__name:"fileViewer",props:{conf:{type:Object,required:!0},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(s){const c=ie.useCounterStore(),a=s;class _ extends re.BaseComponent{extractStyles(){return{radiusSize:this.getOptionValue("radiusSize",0),showToolbar:this.getOptionValue("showToolbar",!0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),z()}}const E=new _(a,"fileViewer");E.setupLifecycle();const b=E.getStyle(),i=e.ref(""),d=e.ref(""),r=e.ref(""),p=e.ref(null),M=e.ref(!1),y=e.ref(""),$=".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt";let m="";const h=e.ref(""),k=e.ref([]),B=e.ref([]),w=e.ref(0),v=e.getCurrentInstance();e.computed(()=>["doc","docx","xls","xlsx","ppt","pptx"].includes(r.value));const X=e.computed(()=>r.value==="pdf"&&i.value?i.value:""),S=o=>{var t;return o&&((t=o.split(".").pop())==null?void 0:t.toLowerCase())||""},z=()=>{var o,t,l,n,u;(l=(t=(o=a.conf)==null?void 0:o.options)==null?void 0:t.fileUrl)!=null&&l.value&&(i.value=a.conf.options.fileUrl.value,d.value=((n=a.conf.options.fileName)==null?void 0:n.value)||"",r.value=((u=a.conf.options.fileType)==null?void 0:u.value)||S(d.value),r.value==="txt"&&G())},Z=()=>{var o;(o=p.value)==null||o.click()},U=o=>N(null,null,function*(){var f,H,g;const t=o.target,l=(f=t==null?void 0:t.files)==null?void 0:f[0];if(!l)return;const n=S(l.name);if(!["pdf","doc","docx","xls","xlsx","ppt","pptx","txt"].includes(n)){C.ElMessage.warning("不支持的文件格式,请选择 PDF、Office 文档或文本文件");return}d.value=l.name,r.value=n,m&&URL.revokeObjectURL(m),m=URL.createObjectURL(l),i.value=m,n==="txt"?W(l):n==="docx"||n==="doc"?yield K(l):(n==="xlsx"||n==="xls")&&(yield Q(l));try{M.value=!0;const V=yield D.fileToDataUrl(l),Y=D.getFileExtension(l.name),x=yield se.api.post("upload",{dashboard_uid:c.pageData.id,file_data:V,file_type:Y,user_id:((H=c.session.userInfo)==null?void 0:H.id)||""},!0);if(x.code===200&&((g=x.result)!=null&&g.relative_path)){const ee=ce.FILE_URL+x.result.relative_path;T("fileUrl",ee),T("fileName",x.result.file_name||l.name),T("fileType",n),C.ElMessage.success("文件上传成功")}else throw new Error(x.msg||"上传失败")}catch(V){console.error("文件上传失败:",V),C.ElMessage.error("文件上传失败: "+((V==null?void 0:V.message)||"未知错误"))}finally{M.value=!1,p.value&&(p.value.value="")}}),W=o=>{const t=new FileReader;t.onload=l=>{var n;y.value=((n=l.target)==null?void 0:n.result)||"",i.value="text-content"},t.readAsText(o,"UTF-8")},G=()=>N(null,null,function*(){if(i.value&&r.value==="txt")try{const o=yield fetch(i.value);y.value=yield o.text()}catch(o){console.error("加载文本内容失败:",o),y.value="无法加载文本内容"}}),T=(o,t)=>{var l;(l=a.conf)!=null&&l.options&&(a.conf.options[o]||(a.conf.options[o]={value:"",type:"string",label:""}),a.conf.options[o].value=t)},A=o=>{o.preventDefault(),o.stopPropagation()},F=o=>{var n;o.preventDefault(),o.stopPropagation();const l=(n=o.dataTransfer)==null?void 0:n.files;if(l&&l.length>0){const u=l[0],f=S(u.name);if(["pdf","doc","docx","xls","xlsx","ppt","pptx","txt"].includes(f)){const g=new DataTransfer;g.items.add(u),p.value&&(p.value.files=g.files,U({target:p.value}))}else C.ElMessage.warning("不支持的文件格式")}},J=()=>{m&&URL.revokeObjectURL(m),i.value="",d.value="",r.value="",y.value="",m="",h.value="",k.value=[],B.value=[],w.value=0},O=o=>new Promise((t,l)=>{if(document.querySelector(`script[src="${o}"]`)){t();return}const n=document.createElement("script");n.src=o,n.onload=()=>t(),n.onerror=()=>l(new Error(`Failed to load script: ${o}`)),document.head.appendChild(n)}),K=o=>N(null,null,function*(){try{yield O("https://cdn.jsdelivr.net/npm/mammoth@1.6.0/mammoth.browser.min.js");const t=yield o.arrayBuffer(),l=yield window.mammoth.convertToHtml({arrayBuffer:t});h.value=l.value}catch(t){console.error("解析 Word 文档失败:",t),h.value='<p style="color: #ef4444; text-align: center;">文档解析失败,请下载后查看</p>'}}),Q=o=>N(null,null,function*(){try{yield O("https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js");const t=yield o.arrayBuffer(),l=window.XLSX.read(t,{type:"array"});B.value=l.SheetNames,k.value=l.SheetNames.map(n=>{const u=l.Sheets[n];return window.XLSX.utils.sheet_to_json(u,{header:1,defval:""})}),w.value=0}catch(t){console.error("解析 Excel 文档失败:",t),k.value=[]}}),L=()=>{const o=m||(i.value!=="text-content"?i.value:"");if(o){const t=document.createElement("a");t.href=o,t.download=d.value||"download",document.body.appendChild(t),t.click(),document.body.removeChild(t)}};return e.onMounted(()=>{var o,t;if(a.mode!=="preview"){const l=(t=(o=v==null?void 0:v.proxy)==null?void 0:o.$el)==null?void 0:t.querySelector(".upload-area");l&&(l.addEventListener("dragover",A),l.addEventListener("drop",F))}}),e.onBeforeUnmount(()=>{var t,l;m&&URL.revokeObjectURL(m);const o=(l=(t=v==null?void 0:v.proxy)==null?void 0:t.$el)==null?void 0:l.querySelector(".upload-area");o&&(o.removeEventListener("dragover",A),o.removeEventListener("drop",F))}),(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({borderRadius:`${e.unref(b).radiusSize}px`})},[e.createElementVNode("div",de,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["upload-area",{"preview-mode":s.mode==="preview"}]),onClick:t[0]||(t[0]=l=>s.mode!=="preview"&&Z())},[e.createElementVNode("input",{ref_key:"fileInputRef",ref:p,type:"file",accept:$,onChange:U,style:{display:"none"}},null,544),e.createElementVNode("div",pe,[t[2]||(t[2]=e.createElementVNode("div",{class:"upload-icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"32",height:"32",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})])],-1)),e.createElementVNode("h3",ue,e.toDisplayString(s.mode==="preview"?o.$t("component.fileViewer.noFile"):o.$t("component.fileViewer.uploadText")),1),s.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",me,e.toDisplayString(o.$t("component.fileViewer.uploadHint")),1)):e.createCommentVNode("",!0),s.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",ve,[...t[1]||(t[1]=[e.createStaticVNode('<span class="format-tag" data-v-a10575bc>PDF</span><span class="format-tag" data-v-a10575bc>DOC</span><span class="format-tag" data-v-a10575bc>DOCX</span><span class="format-tag" data-v-a10575bc>XLS</span><span class="format-tag" data-v-a10575bc>XLSX</span><span class="format-tag" data-v-a10575bc>PPT</span><span class="format-tag" data-v-a10575bc>PPTX</span><span class="format-tag" data-v-a10575bc>TXT</span>',8)])])):e.createCommentVNode("",!0)])],2)),i.value?(e.openBlock(),e.createElementBlock("div",fe,[s.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ee,[e.createElementVNode("div",ye,[e.createElementVNode("span",he,e.toDisplayString(d.value||i.value),1),e.createElementVNode("span",ke,e.toDisplayString(r.value.toUpperCase()),1)]),e.createElementVNode("div",we,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"control-btn",onClick:L,title:"下载文件"},[...t[3]||(t[3]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"control-btn",onClick:J,title:"更换文件"},[...t[4]||(t[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])])])])])):e.createCommentVNode("",!0),e.createElementVNode("div",ge,[r.value==="pdf"?(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("iframe",{src:X.value,class:"pdf-frame",frameborder:"0"},null,8,Ne)])):r.value==="docx"||r.value==="doc"?(e.openBlock(),e.createElementBlock("div",Be,[h.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"docx-content",innerHTML:h.value},null,8,Ce)):(e.openBlock(),e.createElementBlock("div",_e,[...t[5]||(t[5]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("p",null,"正在解析文档...",-1)])]))])):r.value==="xlsx"||r.value==="xls"?(e.openBlock(),e.createElementBlock("div",be,[k.value.length>0?(e.openBlock(),e.createElementBlock("div",Se,[B.value.length>1?(e.openBlock(),e.createElementBlock("div",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,class:e.normalizeClass(["sheet-tab",{active:w.value===n}]),onClick:u=>w.value=n},e.toDisplayString(l),11,Le))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",He,[e.createElementVNode("table",De,[e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value[w.value],(l,n)=>(e.openBlock(),e.createElementBlock("tr",{key:n},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l,(u,f)=>(e.openBlock(),e.createElementBlock("td",{key:f},e.toDisplayString(u),1))),128))]))),128))])])])])):(e.openBlock(),e.createElementBlock("div",Me,[...t[6]||(t[6]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("p",null,"正在解析表格...",-1)])]))])):r.value==="pptx"||r.value==="ppt"?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",Ae,[t[8]||(t[8]=e.createElementVNode("div",{class:"fallback-icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"64",height:"64",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20M8,12H16V14H8V12M8,16H13V18H8V16"})])],-1)),t[9]||(t[9]=e.createElementVNode("h3",null,"PowerPoint 演示文稿",-1)),e.createElementVNode("p",Fe,e.toDisplayString(d.value),1),t[10]||(t[10]=e.createElementVNode("p",{class:"ppt-tip"},"PPT 格式暂不支持在线预览,请下载后查看",-1)),e.createElementVNode("button",{class:"download-btn",onClick:L},[...t[7]||(t[7]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"})],-1),e.createTextVNode(" 下载文件 ",-1)])])])])):r.value==="txt"?(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("pre",Pe,e.toDisplayString(y.value),1)])):(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",Ie,[(e.openBlock(),e.createElementBlock("svg",qe,[...t[11]||(t[11]=[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"},null,-1)])])),t[13]||(t[13]=e.createElementVNode("h3",null,"无法预览此文件",-1)),e.createElementVNode("p",null,e.toDisplayString(r.value.toUpperCase())+" 格式暂不支持在线预览",1),e.createElementVNode("button",{class:"download-btn",onClick:L},[...t[12]||(t[12]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"})],-1),e.createTextVNode(" 下载文件 ",-1)])])])]))])])):e.createCommentVNode("",!0)]),e.renderSlot(o.$slots,"default",{},void 0,!0)],4))}})),Ke=D._export_sfc(Je,[["__scopeId","data-v-a10575bc"]]);exports.default=Ke;
|
|
1
|
+
"use strict";var te=Object.defineProperty,oe=Object.defineProperties;var le=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var ne=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var R=(s,c,a)=>c in s?te(s,c,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[c]=a,I=(s,c)=>{for(var a in c||(c={}))ne.call(c,a)&&R(s,a,c[a]);if(P)for(var a of P(c))ae.call(c,a)&&R(s,a,c[a]);return s},q=(s,c)=>oe(s,le(c));var N=(s,c,a)=>new Promise((_,E)=>{var b=r=>{try{d(a.next(r))}catch(p){E(p)}},i=r=>{try{d(a.throw(r))}catch(p){E(p)}},d=r=>r.done?_(r.value):Promise.resolve(r.value).then(b,i);d((a=a.apply(s,c)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),re=require("./element-resize-detector-BlMXyWIR.cjs"),D=require("./index-EnNA0nIi.cjs"),se=require("./api-C0okiLNC.cjs"),ce=require("./config-UTUPYJ45.cjs"),C=require("element-plus"),ie=require("./store-KXsdwyLp.cjs"),j=require("./ele-vdo-icon-Bgp9gaT6.cjs"),de={class:"mix-body"},pe={class:"upload-content"},ue={class:"upload-title"},me={key:0,class:"upload-hint"},ve={key:1,class:"upload-formats"},fe={key:1,class:"viewer-container"},Ve={key:0,class:"file-controls"},Ee={class:"file-info"},ye={class:"file-details"},he={class:"file-name"},ke={class:"file-type"},we={class:"control-buttons"},ge={class:"viewer-content"},xe={key:0,class:"pdf-viewer"},Ne=["src"],Be={key:1,class:"word-viewer"},Ce=["innerHTML"],_e={key:1,class:"loading-content"},be={key:2,class:"excel-viewer"},Se={key:0,class:"excel-content"},Te={key:0,class:"sheet-tabs"},Le=["onClick"],He={class:"excel-table-wrapper"},De={class:"excel-table"},Me={key:1,class:"loading-content"},Ue={key:3,class:"ppt-viewer"},Ae={class:"ppt-fallback"},Fe={class:"file-name-display"},Oe={key:4,class:"text-viewer"},Pe={class:"text-content"},Re={key:5,class:"unsupported-viewer"},Ie={class:"unsupported-content"},qe={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},je={DEFAULT_ICON:j.DEFAULT_ICON,ACTIVE_ICON:j.ACTIVE_ICON,NAME_CN:"文件查看器",NAME_EN:"File Viewer",ORDER:3},$e={fileUrl:{value:"",type:"string",label:"component.fileViewer.fileUrl",placeholder:"component.fileViewer.uploadPlaceholder"},fileName:{value:"",type:"string",label:"component.fileViewer.fileName",placeholder:"component.fileViewer.uploadPlaceholder"},fileType:{value:"",type:"string",label:"component.fileViewer.fileType",placeholder:"component.fileViewer.autoDetect"},showToolbar:!0},Xe=[],ze=[],Ze=[],We=null,Ge={DEFAULT:je,OPTIONS:$e,DATA:Xe,PARAMS:ze,SOURCE:Ze,COMMON:We},Je=e.defineComponent(q(I({},Ge),{__name:"fileViewer",props:{conf:{type:Object,required:!0},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(s){const c=ie.useCounterStore(),a=s;class _ extends re.BaseComponent{extractStyles(){return{radiusSize:this.getOptionValue("radiusSize",0),showToolbar:this.getOptionValue("showToolbar",!0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),z()}}const E=new _(a,"fileViewer");E.setupLifecycle();const b=E.getStyle(),i=e.ref(""),d=e.ref(""),r=e.ref(""),p=e.ref(null),M=e.ref(!1),y=e.ref(""),$=".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt";let m="";const h=e.ref(""),k=e.ref([]),B=e.ref([]),w=e.ref(0),v=e.getCurrentInstance();e.computed(()=>["doc","docx","xls","xlsx","ppt","pptx"].includes(r.value));const X=e.computed(()=>r.value==="pdf"&&i.value?i.value:""),S=o=>{var t;return o&&((t=o.split(".").pop())==null?void 0:t.toLowerCase())||""},z=()=>{var o,t,l,n,u;(l=(t=(o=a.conf)==null?void 0:o.options)==null?void 0:t.fileUrl)!=null&&l.value&&(i.value=a.conf.options.fileUrl.value,d.value=((n=a.conf.options.fileName)==null?void 0:n.value)||"",r.value=((u=a.conf.options.fileType)==null?void 0:u.value)||S(d.value),r.value==="txt"&&G())},Z=()=>{var o;(o=p.value)==null||o.click()},U=o=>N(null,null,function*(){var f,H,g;const t=o.target,l=(f=t==null?void 0:t.files)==null?void 0:f[0];if(!l)return;const n=S(l.name);if(!["pdf","doc","docx","xls","xlsx","ppt","pptx","txt"].includes(n)){C.ElMessage.warning("不支持的文件格式,请选择 PDF、Office 文档或文本文件");return}d.value=l.name,r.value=n,m&&URL.revokeObjectURL(m),m=URL.createObjectURL(l),i.value=m,n==="txt"?W(l):n==="docx"||n==="doc"?yield K(l):(n==="xlsx"||n==="xls")&&(yield Q(l));try{M.value=!0;const V=yield D.fileToDataUrl(l),Y=D.getFileExtension(l.name),x=yield se.api.post("upload",{dashboard_uid:c.pageData.id,file_data:V,file_type:Y,user_id:((H=c.session.userInfo)==null?void 0:H.id)||""},!0);if(x.code===200&&((g=x.result)!=null&&g.relative_path)){const ee=ce.FILE_URL+x.result.relative_path;T("fileUrl",ee),T("fileName",x.result.file_name||l.name),T("fileType",n),C.ElMessage.success("文件上传成功")}else throw new Error(x.msg||"上传失败")}catch(V){console.error("文件上传失败:",V),C.ElMessage.error("文件上传失败: "+((V==null?void 0:V.message)||"未知错误"))}finally{M.value=!1,p.value&&(p.value.value="")}}),W=o=>{const t=new FileReader;t.onload=l=>{var n;y.value=((n=l.target)==null?void 0:n.result)||"",i.value="text-content"},t.readAsText(o,"UTF-8")},G=()=>N(null,null,function*(){if(i.value&&r.value==="txt")try{const o=yield fetch(i.value);y.value=yield o.text()}catch(o){console.error("加载文本内容失败:",o),y.value="无法加载文本内容"}}),T=(o,t)=>{var l;(l=a.conf)!=null&&l.options&&(a.conf.options[o]||(a.conf.options[o]={value:"",type:"string",label:""}),a.conf.options[o].value=t)},A=o=>{o.preventDefault(),o.stopPropagation()},F=o=>{var n;o.preventDefault(),o.stopPropagation();const l=(n=o.dataTransfer)==null?void 0:n.files;if(l&&l.length>0){const u=l[0],f=S(u.name);if(["pdf","doc","docx","xls","xlsx","ppt","pptx","txt"].includes(f)){const g=new DataTransfer;g.items.add(u),p.value&&(p.value.files=g.files,U({target:p.value}))}else C.ElMessage.warning("不支持的文件格式")}},J=()=>{m&&URL.revokeObjectURL(m),i.value="",d.value="",r.value="",y.value="",m="",h.value="",k.value=[],B.value=[],w.value=0},O=o=>new Promise((t,l)=>{if(document.querySelector(`script[src="${o}"]`)){t();return}const n=document.createElement("script");n.src=o,n.onload=()=>t(),n.onerror=()=>l(new Error(`Failed to load script: ${o}`)),document.head.appendChild(n)}),K=o=>N(null,null,function*(){try{yield O("https://cdn.jsdelivr.net/npm/mammoth@1.6.0/mammoth.browser.min.js");const t=yield o.arrayBuffer(),l=yield window.mammoth.convertToHtml({arrayBuffer:t});h.value=l.value}catch(t){console.error("解析 Word 文档失败:",t),h.value='<p style="color: #ef4444; text-align: center;">文档解析失败,请下载后查看</p>'}}),Q=o=>N(null,null,function*(){try{yield O("https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js");const t=yield o.arrayBuffer(),l=window.XLSX.read(t,{type:"array"});B.value=l.SheetNames,k.value=l.SheetNames.map(n=>{const u=l.Sheets[n];return window.XLSX.utils.sheet_to_json(u,{header:1,defval:""})}),w.value=0}catch(t){console.error("解析 Excel 文档失败:",t),k.value=[]}}),L=()=>{const o=m||(i.value!=="text-content"?i.value:"");if(o){const t=document.createElement("a");t.href=o,t.download=d.value||"download",document.body.appendChild(t),t.click(),document.body.removeChild(t)}};return e.onMounted(()=>{var o,t;if(a.mode!=="preview"){const l=(t=(o=v==null?void 0:v.proxy)==null?void 0:o.$el)==null?void 0:t.querySelector(".upload-area");l&&(l.addEventListener("dragover",A),l.addEventListener("drop",F))}}),e.onBeforeUnmount(()=>{var t,l;m&&URL.revokeObjectURL(m);const o=(l=(t=v==null?void 0:v.proxy)==null?void 0:t.$el)==null?void 0:l.querySelector(".upload-area");o&&(o.removeEventListener("dragover",A),o.removeEventListener("drop",F))}),(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({borderRadius:`${e.unref(b).radiusSize}px`})},[e.createElementVNode("div",de,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["upload-area",{"preview-mode":s.mode==="preview"}]),onClick:t[0]||(t[0]=l=>s.mode!=="preview"&&Z())},[e.createElementVNode("input",{ref_key:"fileInputRef",ref:p,type:"file",accept:$,onChange:U,style:{display:"none"}},null,544),e.createElementVNode("div",pe,[t[2]||(t[2]=e.createElementVNode("div",{class:"upload-icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"32",height:"32",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})])],-1)),e.createElementVNode("h3",ue,e.toDisplayString(s.mode==="preview"?o.$t("component.fileViewer.noFile"):o.$t("component.fileViewer.uploadText")),1),s.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",me,e.toDisplayString(o.$t("component.fileViewer.uploadHint")),1)):e.createCommentVNode("",!0),s.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",ve,[...t[1]||(t[1]=[e.createStaticVNode('<span class="format-tag" data-v-a10575bc>PDF</span><span class="format-tag" data-v-a10575bc>DOC</span><span class="format-tag" data-v-a10575bc>DOCX</span><span class="format-tag" data-v-a10575bc>XLS</span><span class="format-tag" data-v-a10575bc>XLSX</span><span class="format-tag" data-v-a10575bc>PPT</span><span class="format-tag" data-v-a10575bc>PPTX</span><span class="format-tag" data-v-a10575bc>TXT</span>',8)])])):e.createCommentVNode("",!0)])],2)),i.value?(e.openBlock(),e.createElementBlock("div",fe,[s.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ee,[e.createElementVNode("div",ye,[e.createElementVNode("span",he,e.toDisplayString(d.value||i.value),1),e.createElementVNode("span",ke,e.toDisplayString(r.value.toUpperCase()),1)]),e.createElementVNode("div",we,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"control-btn",onClick:L,title:"下载文件"},[...t[3]||(t[3]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"control-btn",onClick:J,title:"更换文件"},[...t[4]||(t[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])])])])])):e.createCommentVNode("",!0),e.createElementVNode("div",ge,[r.value==="pdf"?(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("iframe",{src:X.value,class:"pdf-frame",frameborder:"0"},null,8,Ne)])):r.value==="docx"||r.value==="doc"?(e.openBlock(),e.createElementBlock("div",Be,[h.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"docx-content",innerHTML:h.value},null,8,Ce)):(e.openBlock(),e.createElementBlock("div",_e,[...t[5]||(t[5]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("p",null,"正在解析文档...",-1)])]))])):r.value==="xlsx"||r.value==="xls"?(e.openBlock(),e.createElementBlock("div",be,[k.value.length>0?(e.openBlock(),e.createElementBlock("div",Se,[B.value.length>1?(e.openBlock(),e.createElementBlock("div",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,class:e.normalizeClass(["sheet-tab",{active:w.value===n}]),onClick:u=>w.value=n},e.toDisplayString(l),11,Le))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",He,[e.createElementVNode("table",De,[e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value[w.value],(l,n)=>(e.openBlock(),e.createElementBlock("tr",{key:n},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l,(u,f)=>(e.openBlock(),e.createElementBlock("td",{key:f},e.toDisplayString(u),1))),128))]))),128))])])])])):(e.openBlock(),e.createElementBlock("div",Me,[...t[6]||(t[6]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("p",null,"正在解析表格...",-1)])]))])):r.value==="pptx"||r.value==="ppt"?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",Ae,[t[8]||(t[8]=e.createElementVNode("div",{class:"fallback-icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"64",height:"64",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20M8,12H16V14H8V12M8,16H13V18H8V16"})])],-1)),t[9]||(t[9]=e.createElementVNode("h3",null,"PowerPoint 演示文稿",-1)),e.createElementVNode("p",Fe,e.toDisplayString(d.value),1),t[10]||(t[10]=e.createElementVNode("p",{class:"ppt-tip"},"PPT 格式暂不支持在线预览,请下载后查看",-1)),e.createElementVNode("button",{class:"download-btn",onClick:L},[...t[7]||(t[7]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"})],-1),e.createTextVNode(" 下载文件 ",-1)])])])])):r.value==="txt"?(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("pre",Pe,e.toDisplayString(y.value),1)])):(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",Ie,[(e.openBlock(),e.createElementBlock("svg",qe,[...t[11]||(t[11]=[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"},null,-1)])])),t[13]||(t[13]=e.createElementVNode("h3",null,"无法预览此文件",-1)),e.createElementVNode("p",null,e.toDisplayString(r.value.toUpperCase())+" 格式暂不支持在线预览",1),e.createElementVNode("button",{class:"download-btn",onClick:L},[...t[12]||(t[12]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[e.createElementVNode("path",{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"})],-1),e.createTextVNode(" 下载文件 ",-1)])])])]))])])):e.createCommentVNode("",!0)]),e.renderSlot(o.$slots,"default",{},void 0,!0)],4))}})),Ke=D._export_sfc(Je,[["__scopeId","data-v-a10575bc"]]);exports.default=Ke;
|
|
@@ -27,12 +27,12 @@ var S = (c, d, a) => new Promise((E, _) => {
|
|
|
27
27
|
p((a = a.apply(c, d)).next());
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as fe, ref as h, getCurrentInstance as me, computed as G, onMounted as he, onBeforeUnmount as we, openBlock as r, createElementBlock as i, normalizeStyle as ye, unref as xe, createElementVNode as o, normalizeClass as J, toDisplayString as w, createCommentVNode as y, createStaticVNode as ge, Fragment as B, renderList as P, createTextVNode as K, renderSlot as Ve } from "vue";
|
|
30
|
-
import { B as _e } from "./element-resize-detector-
|
|
31
|
-
import { f as be, g as Ce, _ as Le } from "./index-
|
|
32
|
-
import { a as Te } from "./api-
|
|
33
|
-
import { F as ke } from "./config-
|
|
30
|
+
import { B as _e } from "./element-resize-detector-DeMhGbNi.js";
|
|
31
|
+
import { f as be, g as Ce, _ as Le } from "./index-zPaMBZk-.js";
|
|
32
|
+
import { a as Te } from "./api-DhQsrEGY.js";
|
|
33
|
+
import { F as ke } from "./config-D3MEjLGn.js";
|
|
34
34
|
import { ElMessage as A } from "element-plus";
|
|
35
|
-
import { u as He } from "./store-
|
|
35
|
+
import { u as He } from "./store-BpVoYd93.js";
|
|
36
36
|
import { A as Se, D as Ue } from "./ele-vdo-icon-DcWebTR5.js";
|
|
37
37
|
const Ae = { class: "mix-body" }, Ee = { class: "upload-content" }, Me = { class: "upload-title" }, De = {
|
|
38
38
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var J=Object.defineProperty,X=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var O=(s,r,n)=>r in s?J(s,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[r]=n,R=(s,r)=>{for(var n in r||(r={}))ee.call(r,n)&&O(s,n,r[n]);if(A)for(var n of A(r))te.call(r,n)&&O(s,n,r[n]);return s},H=(s,r)=>X(s,Z(r));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/date-picker/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");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue"),le=require("@element-plus/icons-vue"),oe=require("./element-resize-detector-Bo5uDQAu.cjs"),q=require("./index-Mh5Dw2sd.cjs"),I=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),ne={class:"filter-left-group"},ae={class:"filter-item"},re={class:"filter-item"},ie=["onClick"],se={class:"item-label"},ue={key:0,class:"item-region"},de={key:0,class:"monitor-dropdown-empty"},ce={class:"filter-item time-range"},me={DEFAULT_ICON:I.DEFAULT_ICON,ACTIVE_ICON:I.ACTIVE_ICON,NAME_CN:"筛选条件栏",NAME_EN:"FilterBar",ORDER:4},pe={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},borderColor:{value:"#e8ecef",type:"color",label:"边框颜色"},padding:{value:15,type:"number",label:"component.options.padding"},defaultQuickTime:{value:"today",type:"select",label:"默认快捷时间",options:[{label:"一天内",value:"today"},{label:"一周内",value:"week"},{label:"一个月内",value:"month"},{label:"一年内",value:"year"},{label:"无",value:""}]},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"}}},ve=[{name:"CRACK4",fv:"",object_id:"",region:"中央区"},{name:"CRACK15",fv:"",object_id:"",region:"北帮"},{name:"CRACK26",fv:"",object_id:"",region:"南帮"},{name:"CRACK37",fv:"",object_id:"",region:"西帮"},{name:"CRACK48",fv:"",object_id:"",region:"东帮"}],fe=["name","fv","object_id","region"],ye=[],ge={useAlias:!1,multiObject:!0,source:"mosaic"},Ce=50,be={DEFAULT:me,OPTIONS:pe,DATA:ve,PARAMS:fe,SOURCE:ye,ITEMS:Ce,COMMON:ge},ke=e.defineComponent(H(R({},be),{__name:"filterBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){const r=s,n=e.ref(""),a=e.ref([]),d=e.ref(""),g=e.ref(""),u=e.ref("today"),p=e.ref(!1),C=e.ref(null),w=e.ref(null),N=e.ref({}),v=e.computed(()=>{const l=r.conf.data;return!l||!Array.isArray(l)?[]:l.filter(t=>t.name)}),z=e.computed(()=>{const l=new Set;return v.value.forEach(t=>{t.region&&l.add(t.region)}),Array.from(l)}),f=e.computed(()=>n.value?v.value.filter(l=>l.region===n.value):v.value),x=e.computed(()=>a.value.length===0?"":a.value.join("、")),E=e.computed(()=>{const l=f.value;return l.length>0&&l.every(t=>a.value.includes(t.name))}),j=e.computed(()=>{const l=f.value,t=l.filter(i=>a.value.includes(i.name)).length;return t>0&&t<l.length});class L extends oe.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#ffffff"),textColor:this.getOptionValue("textColor","#333333"),borderColor:this.getOptionValue("borderColor","#e8ecef"),padding:this.getOptionValue("padding",15),linkChannel:this.getOptionValue("linkChannel","crack"),defaultQuickTime:this.getOptionValue("defaultQuickTime","today")}}init(){this.Style.value=this.extractStyles(),this.applyTheme();const t=this.Style.value.defaultQuickTime||"today";u.value=t,h(t),this.props.mode==="preview"&&v.value.length>0&&a.value.length===0&&(a.value=[v.value[0].name],c())}setSocketData(t){}}const V=new L(r,"filterBar");V.setupLifecycle();const b=V.getStyle(),$=e.computed(()=>({background:b.value.bgColor,color:b.value.textColor,padding:`${b.value.padding}px 25px`,borderBottom:`1px solid ${b.value.borderColor}`})),_=()=>{p.value=!p.value,p.value&&F()};function F(){if(!C.value)return;const l=C.value.getBoundingClientRect();N.value={position:"fixed",top:`${l.bottom+4}px`,left:`${l.left}px`,zIndex:"9999"}}const D=l=>{const t=C.value,i=w.value;t&&!t.contains(l.target)&&i&&!i.contains(l.target)&&(p.value=!1)};e.onMounted(()=>{document.addEventListener("click",D)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",D)});const Y=()=>{const l=f.value;if(E.value){const t=l.map(i=>i.name);a.value=a.value.filter(i=>!t.includes(i))}else{const t=new Set(a.value);l.forEach(i=>t.add(i.name)),a.value=Array.from(t)}c()},M=l=>{const t=a.value.indexOf(l.name);t>-1?a.value.splice(t,1):a.value.push(l.name),c()},U=()=>{c()};function h(l){const t=q.dayjs();switch(g.value=t.format("YYYY/MM/DD HH:mm"),l){case"today":d.value=t.subtract(1,"day").format("YYYY/MM/DD HH:mm");break;case"week":d.value=t.subtract(7,"day").format("YYYY/MM/DD HH:mm");break;case"month":d.value=t.subtract(1,"month").format("YYYY/MM/DD HH:mm");break;case"year":d.value=t.subtract(1,"year").format("YYYY/MM/DD HH:mm");break}}const k=l=>{u.value=l,h(l),c()},S=()=>{u.value="",c()},c=()=>{if(r.mode!=="preview")return;const l=v.value.filter(t=>a.value.includes(t.name));V.publish({type:"filter",region:n.value,selectedMonitors:a.value,selectedData:l,objectId:l.length===1?l[0].object_id:"",timeRange:u.value||"custom",dateRange:[d.value,g.value]})},Q=()=>{n.value="",a.value=[],u.value="today",h("today"),c()};return(l,t)=>{const i=m.ElOption,K=m.ElSelect,P=m.ElIcon,W=m.ElInput,B=m.ElCheckbox,y=m.ElButton,T=m.ElDatePicker;return e.openBlock(),e.createElementBlock("div",{class:"mix-component crack-filter-bar",style:e.normalizeStyle($.value)},[e.createElementVNode("div",ne,[e.createElementVNode("div",ae,[t[8]||(t[8]=e.createElementVNode("span",{class:"filter-label"},"区域位置:",-1)),e.createVNode(K,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=o=>n.value=o),placeholder:"全部区域",size:"default",style:{width:"120px"},onChange:U},{default:e.withCtx(()=>[e.createVNode(i,{label:"全部区域",value:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,o=>(e.openBlock(),e.createBlock(i,{key:o,label:o,value:o},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",re,[t[10]||(t[10]=e.createElementVNode("span",{class:"filter-label"},"监测点:",-1)),e.createElementVNode("div",{class:"monitor-select-wrapper",ref_key:"monitorWrapperRef",ref:C},[e.createVNode(W,{modelValue:x.value,"onUpdate:modelValue":t[1]||(t[1]=o=>x.value=o),placeholder:"输入编号(如11)或选择",size:"default",style:{width:"180px"},readonly:"",onClick:_,onFocus:_},{suffix:e.withCtx(()=>[e.createVNode(P,{class:e.normalizeClass(["dropdown-arrow",{"is-open":p.value}])},{default:e.withCtx(()=>[e.createVNode(e.unref(le.ArrowDown))]),_:1},8,["class"])]),_:1},8,["modelValue"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"monitor-dropdown",style:e.normalizeStyle(N.value),ref_key:"dropdownRef",ref:w},[e.createElementVNode("div",{class:"monitor-dropdown-item",onClick:e.withModifiers(Y,["stop"])},[e.createVNode(B,{"model-value":E.value,indeterminate:j.value,onChange:Y},null,8,["model-value","indeterminate"]),t[9]||(t[9]=e.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全选",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.name,class:"monitor-dropdown-item",onClick:e.withModifiers(G=>M(o),["stop"])},[e.createVNode(B,{"model-value":a.value.includes(o.name),onChange:G=>M(o)},null,8,["model-value","onChange"]),e.createElementVNode("span",se,[e.createTextVNode(e.toDisplayString(o.name)+" ",1),o.region?(e.openBlock(),e.createElementBlock("span",ue,"("+e.toDisplayString(o.region)+")",1)):e.createCommentVNode("",!0)])],8,ie))),128)),f.value.length===0?(e.openBlock(),e.createElementBlock("div",de," 暂无监测点,请在右侧数据面板配置 ")):e.createCommentVNode("",!0)],4),[[e.vShow,p.value]])]))],512)]),e.createVNode(y,{type:u.value==="today"?"primary":"default",size:"default",onClick:t[2]||(t[2]=o=>k("today"))},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createTextVNode("一天内",-1)])]),_:1},8,["type"]),e.createVNode(y,{type:u.value==="week"?"primary":"default",size:"default",onClick:t[3]||(t[3]=o=>k("week"))},{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode("一周内",-1)])]),_:1},8,["type"]),e.createVNode(y,{type:u.value==="month"?"primary":"default",size:"default",onClick:t[4]||(t[4]=o=>k("month"))},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("一个月内",-1)])]),_:1},8,["type"]),e.createVNode(y,{type:u.value==="year"?"primary":"default",size:"default",onClick:t[5]||(t[5]=o=>k("year"))},{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createTextVNode("一年内",-1)])]),_:1},8,["type"]),e.createElementVNode("div",ce,[t[15]||(t[15]=e.createElementVNode("span",{class:"filter-label"},"时间范围:",-1)),e.createVNode(T,{modelValue:d.value,"onUpdate:modelValue":t[6]||(t[6]=o=>d.value=o),type:"datetime",placeholder:"开始时间",size:"default",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm",style:{width:"175px"},onChange:S},null,8,["modelValue"]),t[16]||(t[16]=e.createElementVNode("span",{class:"time-separator"},"至",-1)),e.createVNode(T,{modelValue:g.value,"onUpdate:modelValue":t[7]||(t[7]=o=>g.value=o),type:"datetime",placeholder:"结束时间",size:"default",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm",style:{width:"175px"},onChange:S},null,8,["modelValue"])])]),e.createVNode(y,{type:"danger",size:"default",onClick:Q},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode("🗑 清除所有",-1)])]),_:1}),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ve=q._export_sfc(ke,[["__scopeId","data-v-fc4af166"]]);exports.default=Ve;
|
|
1
|
+
"use strict";var J=Object.defineProperty,X=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var O=(s,r,n)=>r in s?J(s,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[r]=n,R=(s,r)=>{for(var n in r||(r={}))ee.call(r,n)&&O(s,n,r[n]);if(A)for(var n of A(r))te.call(r,n)&&O(s,n,r[n]);return s},H=(s,r)=>X(s,Z(r));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/date-picker/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");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue"),le=require("@element-plus/icons-vue"),oe=require("./element-resize-detector-BlMXyWIR.cjs"),q=require("./index-EnNA0nIi.cjs"),I=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),ne={class:"filter-left-group"},ae={class:"filter-item"},re={class:"filter-item"},ie=["onClick"],se={class:"item-label"},ue={key:0,class:"item-region"},de={key:0,class:"monitor-dropdown-empty"},ce={class:"filter-item time-range"},me={DEFAULT_ICON:I.DEFAULT_ICON,ACTIVE_ICON:I.ACTIVE_ICON,NAME_CN:"筛选条件栏",NAME_EN:"FilterBar",ORDER:4},pe={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},borderColor:{value:"#e8ecef",type:"color",label:"边框颜色"},padding:{value:15,type:"number",label:"component.options.padding"},defaultQuickTime:{value:"today",type:"select",label:"默认快捷时间",options:[{label:"一天内",value:"today"},{label:"一周内",value:"week"},{label:"一个月内",value:"month"},{label:"一年内",value:"year"},{label:"无",value:""}]},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"}}},ve=[{name:"CRACK4",fv:"",object_id:"",region:"中央区"},{name:"CRACK15",fv:"",object_id:"",region:"北帮"},{name:"CRACK26",fv:"",object_id:"",region:"南帮"},{name:"CRACK37",fv:"",object_id:"",region:"西帮"},{name:"CRACK48",fv:"",object_id:"",region:"东帮"}],fe=["name","fv","object_id","region"],ye=[],ge={useAlias:!1,multiObject:!0,source:"mosaic"},Ce=50,be={DEFAULT:me,OPTIONS:pe,DATA:ve,PARAMS:fe,SOURCE:ye,ITEMS:Ce,COMMON:ge},ke=e.defineComponent(H(R({},be),{__name:"filterBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(s){const r=s,n=e.ref(""),a=e.ref([]),d=e.ref(""),g=e.ref(""),u=e.ref("today"),p=e.ref(!1),C=e.ref(null),w=e.ref(null),N=e.ref({}),v=e.computed(()=>{const l=r.conf.data;return!l||!Array.isArray(l)?[]:l.filter(t=>t.name)}),z=e.computed(()=>{const l=new Set;return v.value.forEach(t=>{t.region&&l.add(t.region)}),Array.from(l)}),f=e.computed(()=>n.value?v.value.filter(l=>l.region===n.value):v.value),x=e.computed(()=>a.value.length===0?"":a.value.join("、")),E=e.computed(()=>{const l=f.value;return l.length>0&&l.every(t=>a.value.includes(t.name))}),j=e.computed(()=>{const l=f.value,t=l.filter(i=>a.value.includes(i.name)).length;return t>0&&t<l.length});class L extends oe.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#ffffff"),textColor:this.getOptionValue("textColor","#333333"),borderColor:this.getOptionValue("borderColor","#e8ecef"),padding:this.getOptionValue("padding",15),linkChannel:this.getOptionValue("linkChannel","crack"),defaultQuickTime:this.getOptionValue("defaultQuickTime","today")}}init(){this.Style.value=this.extractStyles(),this.applyTheme();const t=this.Style.value.defaultQuickTime||"today";u.value=t,h(t),this.props.mode==="preview"&&v.value.length>0&&a.value.length===0&&(a.value=[v.value[0].name],c())}setSocketData(t){}}const V=new L(r,"filterBar");V.setupLifecycle();const b=V.getStyle(),$=e.computed(()=>({background:b.value.bgColor,color:b.value.textColor,padding:`${b.value.padding}px 25px`,borderBottom:`1px solid ${b.value.borderColor}`})),_=()=>{p.value=!p.value,p.value&&F()};function F(){if(!C.value)return;const l=C.value.getBoundingClientRect();N.value={position:"fixed",top:`${l.bottom+4}px`,left:`${l.left}px`,zIndex:"9999"}}const D=l=>{const t=C.value,i=w.value;t&&!t.contains(l.target)&&i&&!i.contains(l.target)&&(p.value=!1)};e.onMounted(()=>{document.addEventListener("click",D)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",D)});const Y=()=>{const l=f.value;if(E.value){const t=l.map(i=>i.name);a.value=a.value.filter(i=>!t.includes(i))}else{const t=new Set(a.value);l.forEach(i=>t.add(i.name)),a.value=Array.from(t)}c()},M=l=>{const t=a.value.indexOf(l.name);t>-1?a.value.splice(t,1):a.value.push(l.name),c()},U=()=>{c()};function h(l){const t=q.dayjs();switch(g.value=t.format("YYYY/MM/DD HH:mm"),l){case"today":d.value=t.subtract(1,"day").format("YYYY/MM/DD HH:mm");break;case"week":d.value=t.subtract(7,"day").format("YYYY/MM/DD HH:mm");break;case"month":d.value=t.subtract(1,"month").format("YYYY/MM/DD HH:mm");break;case"year":d.value=t.subtract(1,"year").format("YYYY/MM/DD HH:mm");break}}const k=l=>{u.value=l,h(l),c()},S=()=>{u.value="",c()},c=()=>{if(r.mode!=="preview")return;const l=v.value.filter(t=>a.value.includes(t.name));V.publish({type:"filter",region:n.value,selectedMonitors:a.value,selectedData:l,objectId:l.length===1?l[0].object_id:"",timeRange:u.value||"custom",dateRange:[d.value,g.value]})},Q=()=>{n.value="",a.value=[],u.value="today",h("today"),c()};return(l,t)=>{const i=m.ElOption,K=m.ElSelect,P=m.ElIcon,W=m.ElInput,B=m.ElCheckbox,y=m.ElButton,T=m.ElDatePicker;return e.openBlock(),e.createElementBlock("div",{class:"mix-component crack-filter-bar",style:e.normalizeStyle($.value)},[e.createElementVNode("div",ne,[e.createElementVNode("div",ae,[t[8]||(t[8]=e.createElementVNode("span",{class:"filter-label"},"区域位置:",-1)),e.createVNode(K,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=o=>n.value=o),placeholder:"全部区域",size:"default",style:{width:"120px"},onChange:U},{default:e.withCtx(()=>[e.createVNode(i,{label:"全部区域",value:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,o=>(e.openBlock(),e.createBlock(i,{key:o,label:o,value:o},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",re,[t[10]||(t[10]=e.createElementVNode("span",{class:"filter-label"},"监测点:",-1)),e.createElementVNode("div",{class:"monitor-select-wrapper",ref_key:"monitorWrapperRef",ref:C},[e.createVNode(W,{modelValue:x.value,"onUpdate:modelValue":t[1]||(t[1]=o=>x.value=o),placeholder:"输入编号(如11)或选择",size:"default",style:{width:"180px"},readonly:"",onClick:_,onFocus:_},{suffix:e.withCtx(()=>[e.createVNode(P,{class:e.normalizeClass(["dropdown-arrow",{"is-open":p.value}])},{default:e.withCtx(()=>[e.createVNode(e.unref(le.ArrowDown))]),_:1},8,["class"])]),_:1},8,["modelValue"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"monitor-dropdown",style:e.normalizeStyle(N.value),ref_key:"dropdownRef",ref:w},[e.createElementVNode("div",{class:"monitor-dropdown-item",onClick:e.withModifiers(Y,["stop"])},[e.createVNode(B,{"model-value":E.value,indeterminate:j.value,onChange:Y},null,8,["model-value","indeterminate"]),t[9]||(t[9]=e.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全选",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.name,class:"monitor-dropdown-item",onClick:e.withModifiers(G=>M(o),["stop"])},[e.createVNode(B,{"model-value":a.value.includes(o.name),onChange:G=>M(o)},null,8,["model-value","onChange"]),e.createElementVNode("span",se,[e.createTextVNode(e.toDisplayString(o.name)+" ",1),o.region?(e.openBlock(),e.createElementBlock("span",ue,"("+e.toDisplayString(o.region)+")",1)):e.createCommentVNode("",!0)])],8,ie))),128)),f.value.length===0?(e.openBlock(),e.createElementBlock("div",de," 暂无监测点,请在右侧数据面板配置 ")):e.createCommentVNode("",!0)],4),[[e.vShow,p.value]])]))],512)]),e.createVNode(y,{type:u.value==="today"?"primary":"default",size:"default",onClick:t[2]||(t[2]=o=>k("today"))},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createTextVNode("一天内",-1)])]),_:1},8,["type"]),e.createVNode(y,{type:u.value==="week"?"primary":"default",size:"default",onClick:t[3]||(t[3]=o=>k("week"))},{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode("一周内",-1)])]),_:1},8,["type"]),e.createVNode(y,{type:u.value==="month"?"primary":"default",size:"default",onClick:t[4]||(t[4]=o=>k("month"))},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("一个月内",-1)])]),_:1},8,["type"]),e.createVNode(y,{type:u.value==="year"?"primary":"default",size:"default",onClick:t[5]||(t[5]=o=>k("year"))},{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createTextVNode("一年内",-1)])]),_:1},8,["type"]),e.createElementVNode("div",ce,[t[15]||(t[15]=e.createElementVNode("span",{class:"filter-label"},"时间范围:",-1)),e.createVNode(T,{modelValue:d.value,"onUpdate:modelValue":t[6]||(t[6]=o=>d.value=o),type:"datetime",placeholder:"开始时间",size:"default",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm",style:{width:"175px"},onChange:S},null,8,["modelValue"]),t[16]||(t[16]=e.createElementVNode("span",{class:"time-separator"},"至",-1)),e.createVNode(T,{modelValue:g.value,"onUpdate:modelValue":t[7]||(t[7]=o=>g.value=o),type:"datetime",placeholder:"结束时间",size:"default",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm",style:{width:"175px"},onChange:S},null,8,["modelValue"])])]),e.createVNode(y,{type:"danger",size:"default",onClick:Q},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode("🗑 清除所有",-1)])]),_:1}),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ve=q._export_sfc(ke,[["__scopeId","data-v-fc4af166"]]);exports.default=Ve;
|
|
@@ -21,8 +21,8 @@ import "element-plus/es/components/select/style/css";
|
|
|
21
21
|
import "element-plus/es/components/option/style/css";
|
|
22
22
|
import { defineComponent as ke, ref as m, computed as y, onMounted as he, onBeforeUnmount as we, openBlock as c, createElementBlock as b, normalizeStyle as U, createElementVNode as s, createVNode as r, withCtx as p, Fragment as F, renderList as K, createBlock as P, normalizeClass as _e, unref as Ye, Teleport as De, withDirectives as Me, withModifiers as W, createTextVNode as k, toDisplayString as G, createCommentVNode as q, vShow as xe, renderSlot as Se } from "vue";
|
|
23
23
|
import { ArrowDown as Ae } from "@element-plus/icons-vue";
|
|
24
|
-
import { B as Ve } from "./element-resize-detector-
|
|
25
|
-
import { d as Ee, _ as Oe } from "./index-
|
|
24
|
+
import { B as Ve } from "./element-resize-detector-DeMhGbNi.js";
|
|
25
|
+
import { d as Ee, _ as Oe } from "./index-zPaMBZk-.js";
|
|
26
26
|
import { A as He, D as Re } from "./ele-vlu-icon-Bg6EHZdJ.js";
|
|
27
27
|
const Te = { class: "filter-left-group" }, Be = { class: "filter-item" }, Ne = { class: "filter-item" }, je = ["onClick"], ze = { class: "item-label" }, Ie = {
|
|
28
28
|
key: 0,
|
|
@@ -18,8 +18,8 @@ import "element-plus/es/components/checkbox/style/css";
|
|
|
18
18
|
import "element-plus/es/components/button/style/css";
|
|
19
19
|
import "element-plus/es/components/icon/style/css";
|
|
20
20
|
import { defineComponent as he, computed as h, ref as y, watch as $, onMounted as ge, onUnmounted as be, openBlock as x, createElementBlock as j, normalizeStyle as P, createElementVNode as u, createVNode as g, withCtx as b, createTextVNode as L, Fragment as q, renderList as G, createBlock as Ce, toDisplayString as Y, unref as N, normalizeClass as _e, renderSlot as ye } from "vue";
|
|
21
|
-
import { d as I, _ as xe } from "./index-
|
|
22
|
-
import { E as Se } from "./EChartComponentBase-
|
|
21
|
+
import { d as I, _ as xe } from "./index-zPaMBZk-.js";
|
|
22
|
+
import { E as Se } from "./EChartComponentBase-GBbKjtlb.js";
|
|
23
23
|
import { ArrowDown as ke, Download as je } from "@element-plus/icons-vue";
|
|
24
24
|
import { A as Ie, D as De } from "./ele-lin-icon-Dax-ZiWV.js";
|
|
25
25
|
const Ee = { class: "chart-panel" }, Ae = { class: "panel-header" }, we = { class: "header-right" }, Me = { class: "indicator-selector-panel" }, Oe = { class: "indicator-select-all" }, Fe = { class: "legend-bar" }, Le = { class: "legend-items" }, Ye = ["onClick"], Ne = { class: "legend-text" }, Ve = ["id"], Te = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var J=Object.defineProperty,K=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable;var O=(p,s,i)=>s in p?J(p,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[s]=i,M=(p,s)=>{for(var i in s||(s={}))X.call(s,i)&&O(p,i,s[i]);if(A)for(var i of A(s))ee.call(s,i)&&O(p,i,s[i]);return p},L=(p,s)=>K(p,Q(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/popover/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");const t=require("vue"),C=require("./index-Mh5Dw2sd.cjs"),te=require("./EChartComponentBase-BaQpBzVC.cjs"),F=require("@element-plus/icons-vue"),B=require("./ele-lin-icon-Dke_1AmT.cjs"),oe={class:"chart-panel"},ne={class:"panel-header"},le={class:"header-right"},ae={class:"indicator-selector-panel"},re={class:"indicator-select-all"},se={class:"legend-bar"},ce={class:"legend-items"},ie=["onClick"],ue={class:"legend-text"},de=["id"],fe={DEFAULT_ICON:B.DEFAULT_ICON,ACTIVE_ICON:B.ACTIVE_ICON,NAME_CN:"煤自燃关键指标时序曲线",NAME_EN:"Fire Combustion Curve",ORDER:2},me={bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},panelBgColor:{value:"#ffffff",type:"color",label:"面板背景色"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},gridColor:{value:"#f0f0f0",type:"color",label:"网格线颜色"},linkChannel:{value:"fire",type:"select",label:"component.linkChannel",options:[{label:"煤自燃监测",value:"fire"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},pe=[{name:"温度(℃)",fv:"",object_id:"",color:"#ee6666",deviceFv:""},{name:"一氧化碳浓度(ppm)",fv:"",object_id:"",color:"#fac858",deviceFv:""},{name:"氧气浓度(%)",fv:"",object_id:"",color:"#5470c6",deviceFv:""}],ve=["name","fv","object_id","color","deviceFv"],he=["mosaic","statistics","calculate"],ge={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},be=20,Ce={DEFAULT:fe,OPTIONS:me,DATA:pe,PARAMS:ve,SOURCE:he,ITEMS:be,COMMON:ge},_e=t.defineComponent(L(M({},Ce),{__name:"fireCombustionCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){const s=p,i=new Map,x=new Map;class T extends te.EChartComponentBase{extractStyles(){var n,a,c,r,f,g,D;const e=(n=this.props.conf)==null?void 0:n.options,l=((a=e==null?void 0:e.linkChannel)==null?void 0:a.value)||"fire",u=((c=e==null?void 0:e.customChannel)==null?void 0:c.value)||"";return{bgColor:((r=e==null?void 0:e.bgColor)==null?void 0:r.value)||"#f5f7fa",panelBgColor:((f=e==null?void 0:e.panelBgColor)==null?void 0:f.value)||"#ffffff",textColor:((g=e==null?void 0:e.textColor)==null?void 0:g.value)||"#333333",gridColor:((D=e==null?void 0:e.gridColor)==null?void 0:D.value)||"#f0f0f0",linkChannel:l==="custom"&&u?u:l}}getChartOption(){return j(this.Style.value)}setSocketData(e){var n;if(!e)return;const l=e.datetime?e.datetime.split(".")[0]:C.dayjs().format("YYYY/MM/DD HH:mm"),u=((n=this.props.conf)==null?void 0:n.data)||[];u.forEach(a=>{if(a.deviceFv){const c=this.extractDataValue(e,a.deviceFv);c!=null&&String(c).trim()&&x.set(a.name||a.fv,String(c).trim())}}),u.forEach(a=>{if(!a.fv)return;const c=this.extractDataValue(e,a.fv);if(c==null)return;const r=a.name||a.fv,f=i.get(r);f?(f.times.push(l),f.values.push(parseFloat(c)),f.times.length>200&&(f.times.shift(),f.values.shift())):i.set(r,{times:[l],values:[parseFloat(c)]})}),this.chartObj&&this.chartObj.setOption(j(this.Style.value),!1)}onLinkEvent(e){Z(e)}}const d=new T(s,"fireCombustionCurve");d.setupLifecycle();const S=d.getStyle(),Y=d.getEchartId(),E=t.computed(()=>{var o;return((o=s.conf)==null?void 0:o.data)||[]}),v=t.computed(()=>{const o=new Set;return E.value.filter(e=>e.name&&!o.has(e.name)?(o.add(e.name),!0):!1)}),m=t.ref([]);t.watch(v,o=>{o.length>0&&m.value.length===0&&(m.value=o.map(e=>e.fv||e.name))},{immediate:!0});const w=t.computed({get:()=>v.value.length>0&&m.value.length===v.value.length,set:()=>{}}),q=t.computed(()=>{const o=m.value.length;return o>0&&o<v.value.length}),z=t.computed(()=>{if(m.value.length===0)return"选择监测指标";if(m.value.length===v.value.length)return"全部指标";const e=v.value.filter(l=>m.value.includes(l.fv||l.name)).map(l=>l.name).join(", ");return e.length>14?e.substring(0,14)+"...":e}),U=o=>{m.value=o?v.value.map(e=>e.fv||e.name):[],y()},h=t.ref(new Set),H=t.computed(()=>v.value.filter(o=>m.value.includes(o.fv||o.name)).map(o=>{const e=x.get(o.name)||N.value;return{name:e?`${e}-${o.name}`:o.name,color:o.color||"#5470c6",visible:!h.value.has(o.name)}})),R=o=>{const e=o.name.includes("-")?o.name.split("-").slice(1).join("-"):o.name;h.value.has(e)?h.value.delete(e):h.value.add(e),h.value=new Set(h.value),y()},k=t.ref(""),$=t.computed(()=>{var o,e,l;return(e=(o=s.conf)==null?void 0:o.common)!=null&&e.object_id||(l=s.conf)!=null&&l.object_id?!0:E.value.some(u=>!!u.object_id)}),P=t.computed(()=>$.value||!!k.value),N=t.ref(""),_=t.ref(""),G=t.computed(()=>({backgroundColor:S.value.bgColor,color:S.value.textColor})),V=()=>{i.clear();const o=C.dayjs();E.value.forEach((e,l)=>{const u=[],n=[],a=[85,50,10],c=[3,5,1.5],r=a[l%3]||20,f=c[l%3]||3;for(let g=0;g<100;g++)u.push(o.subtract((100-g)*15,"minute").format("YYYY/MM/DD HH:mm")),n.push(+(r+(Math.random()-.5)*f+Math.sin(g/10)*f*.4).toFixed(2));i.set(e.name,{times:u,values:n})})},j=o=>{if(s.mode!=="edit"){if(!P.value)return{xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[]};if(i.size===0)return{xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[]}}let e=[];for(const[,n]of i)n.times.length>e.length&&(e=n.times);!e.length&&s.mode==="edit"&&(e=Array.from({length:50},(n,a)=>C.dayjs().subtract((50-a)*15,"minute").format("YYYY/MM/DD HH:mm")));const l={},u=v.value.filter(n=>m.value.includes(n.fv||n.name)).map(n=>{const a=x.get(n.name)||N.value,c=a?`${a}-${n.name}`:n.name;l[c]=!h.value.has(n.name);const r=i.get(n.name);return{name:c,type:"line",smooth:!0,showSymbol:!1,data:(r==null?void 0:r.values)||[],lineStyle:{color:n.color||"#5470c6",width:2.5,type:"solid"},itemStyle:{color:n.color||"#5470c6"}}});return{tooltip:{trigger:"axis",backgroundColor:"rgba(255,255,255,0.96)",borderColor:"#1c3d90",borderWidth:1,textStyle:{color:"#333",fontSize:12},axisPointer:{type:"cross"}},legend:{show:!1,selected:l},grid:{top:15,right:40,bottom:60,left:60},xAxis:{type:"category",data:e,axisLine:{lineStyle:{color:o.gridColor}},axisLabel:{color:o.textColor,fontSize:11,rotate:15,interval:"auto",formatter:n=>{var a;if(n&&n.length>6){const c=n.split(" ");return(((a=c[0])==null?void 0:a.split("/").slice(1).join("/"))||"")+(c[1]?" "+c[1]:"")}return n}},axisTick:{show:!1},boundaryGap:!1},yAxis:{type:"value",name:"监测数值",scale:!0,axisLine:{show:!1},axisLabel:{color:o.textColor,fontSize:11},splitLine:{lineStyle:{color:o.gridColor,type:"dashed"}}},dataZoom:[{type:"inside",xAxisIndex:0,filterMode:"none"},{type:"slider",height:18,bottom:8,borderColor:"transparent",backgroundColor:"#f0f0f0",fillerColor:"rgba(28, 61, 144, 0.2)",handleStyle:{color:"#1c3d90"},textStyle:{fontSize:10}}],series:u}},y=()=>{const o=d.getChartInstance();o&&o.setOption(j(S.value),!0)},W=()=>{const o=d.getChartInstance();if(!o)return;const e=document.createElement("a");e.href=o.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),e.download=`煤自燃关键指标时序曲线_${C.dayjs().format("YYYYMMDDHHmmss")}.png`,e.click()},Z=o=>{const{payload:e}=o;if(!e)return;if(e.type==="filter"){if(e.point&&(N.value=String(e.point)),e.objectId){const u=_.value;_.value=String(e.objectId),k.value=String(e.objectId),u!==_.value&&I(_.value)}(s.mode==="edit"||!e.objectId)&&(V(),y());return}const l=e.objectId||e.object_id;l&&(k.value=String(l),I(l))},I=o=>{var n;if(!o||s.mode!=="preview")return;i.clear();const e=(n=d.session)==null?void 0:n.value;if(!e)return;const l=s.conf.id;e.componentRequests&&e.componentRequests.delete(l),e.registerComponent({id:l,request:null,onUpdate:(a,c)=>{a==="realtime"&&d.setSocketData(c)}});const u=d.getSource();d.subscribeBySource(u,o)};return t.onMounted(()=>{d.init(),s.mode==="edit"&&V(),setTimeout(()=>{var o;return(o=d.getChartInstance())==null?void 0:o.resize()},200)}),t.onUnmounted(()=>{d.cleanup()}),t.watch(()=>s.conf,()=>{d.init(),s.mode==="edit"&&V()},{deep:!0}),(o,e)=>{const l=b.ElIcon,u=b.ElButton,n=b.ElCheckbox,a=b.ElCheckboxGroup,c=b.ElPopover;return t.openBlock(),t.createElementBlock("div",{class:"fire-combustion-curve",style:t.normalizeStyle(G.value)},[t.createElementVNode("div",oe,[t.createElementVNode("div",ne,[e[4]||(e[4]=t.createElementVNode("div",{class:"header-left"},[t.createElementVNode("span",{class:"indicator-dot"}),t.createElementVNode("span",{class:"panel-title"},"📊 煤自燃监测关键指标时序曲线")],-1)),t.createElementVNode("div",le,[t.createVNode(c,{placement:"bottom-start",width:220,trigger:"click"},{reference:t.withCtx(()=>[t.createVNode(u,{size:"small"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(z.value)+" ",1),t.createVNode(l,{class:"el-icon--right"},{default:t.withCtx(()=>[t.createVNode(t.unref(F.ArrowDown))]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",ae,[t.createElementVNode("div",re,[t.createVNode(n,{modelValue:w.value,"onUpdate:modelValue":e[0]||(e[0]=r=>w.value=r),indeterminate:q.value,onChange:U},{default:t.withCtx(()=>[...e[2]||(e[2]=[t.createTextVNode(" 全部指标 ",-1)])]),_:1},8,["modelValue","indeterminate"])]),t.createVNode(a,{modelValue:m.value,"onUpdate:modelValue":e[1]||(e[1]=r=>m.value=r),onChange:y},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,r=>(t.openBlock(),t.createBlock(n,{key:r.fv,label:r.fv,class:"indicator-checkbox-item"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])]),_:1}),t.createVNode(u,{size:"small",onClick:W},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createVNode(t.unref(F.Download))]),_:1}),e[3]||(e[3]=t.createElementVNode("span",null,"导出图像",-1))]),_:1})])]),t.createElementVNode("div",se,[t.createElementVNode("div",ce,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(H.value,r=>(t.openBlock(),t.createElementBlock("span",{key:r.name,class:t.normalizeClass(["legend-item",{disabled:!r.visible}]),onClick:f=>R(r)},[t.createElementVNode("span",{class:"legend-line",style:t.normalizeStyle({borderTopColor:r.visible?r.color:"#ccc"})},null,4),t.createElementVNode("span",ue,t.toDisplayString(r.name),1)],10,ie))),128))])]),t.createElementVNode("div",{id:t.unref(Y),class:"chart-container"},null,8,de)]),t.renderSlot(o.$slots,"default",{},void 0,!0)],4)}}})),ye=C._export_sfc(_e,[["__scopeId","data-v-df742467"]]);exports.default=ye;
|
|
1
|
+
"use strict";var J=Object.defineProperty,K=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable;var O=(p,s,i)=>s in p?J(p,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[s]=i,M=(p,s)=>{for(var i in s||(s={}))X.call(s,i)&&O(p,i,s[i]);if(A)for(var i of A(s))ee.call(s,i)&&O(p,i,s[i]);return p},L=(p,s)=>K(p,Q(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/popover/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");const t=require("vue"),C=require("./index-EnNA0nIi.cjs"),te=require("./EChartComponentBase-BTqBoBn8.cjs"),F=require("@element-plus/icons-vue"),B=require("./ele-lin-icon-Dke_1AmT.cjs"),oe={class:"chart-panel"},ne={class:"panel-header"},le={class:"header-right"},ae={class:"indicator-selector-panel"},re={class:"indicator-select-all"},se={class:"legend-bar"},ce={class:"legend-items"},ie=["onClick"],ue={class:"legend-text"},de=["id"],fe={DEFAULT_ICON:B.DEFAULT_ICON,ACTIVE_ICON:B.ACTIVE_ICON,NAME_CN:"煤自燃关键指标时序曲线",NAME_EN:"Fire Combustion Curve",ORDER:2},me={bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},panelBgColor:{value:"#ffffff",type:"color",label:"面板背景色"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},gridColor:{value:"#f0f0f0",type:"color",label:"网格线颜色"},linkChannel:{value:"fire",type:"select",label:"component.linkChannel",options:[{label:"煤自燃监测",value:"fire"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},pe=[{name:"温度(℃)",fv:"",object_id:"",color:"#ee6666",deviceFv:""},{name:"一氧化碳浓度(ppm)",fv:"",object_id:"",color:"#fac858",deviceFv:""},{name:"氧气浓度(%)",fv:"",object_id:"",color:"#5470c6",deviceFv:""}],ve=["name","fv","object_id","color","deviceFv"],he=["mosaic","statistics","calculate"],ge={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},be=20,Ce={DEFAULT:fe,OPTIONS:me,DATA:pe,PARAMS:ve,SOURCE:he,ITEMS:be,COMMON:ge},_e=t.defineComponent(L(M({},Ce),{__name:"fireCombustionCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){const s=p,i=new Map,x=new Map;class T extends te.EChartComponentBase{extractStyles(){var n,a,c,r,f,g,D;const e=(n=this.props.conf)==null?void 0:n.options,l=((a=e==null?void 0:e.linkChannel)==null?void 0:a.value)||"fire",u=((c=e==null?void 0:e.customChannel)==null?void 0:c.value)||"";return{bgColor:((r=e==null?void 0:e.bgColor)==null?void 0:r.value)||"#f5f7fa",panelBgColor:((f=e==null?void 0:e.panelBgColor)==null?void 0:f.value)||"#ffffff",textColor:((g=e==null?void 0:e.textColor)==null?void 0:g.value)||"#333333",gridColor:((D=e==null?void 0:e.gridColor)==null?void 0:D.value)||"#f0f0f0",linkChannel:l==="custom"&&u?u:l}}getChartOption(){return j(this.Style.value)}setSocketData(e){var n;if(!e)return;const l=e.datetime?e.datetime.split(".")[0]:C.dayjs().format("YYYY/MM/DD HH:mm"),u=((n=this.props.conf)==null?void 0:n.data)||[];u.forEach(a=>{if(a.deviceFv){const c=this.extractDataValue(e,a.deviceFv);c!=null&&String(c).trim()&&x.set(a.name||a.fv,String(c).trim())}}),u.forEach(a=>{if(!a.fv)return;const c=this.extractDataValue(e,a.fv);if(c==null)return;const r=a.name||a.fv,f=i.get(r);f?(f.times.push(l),f.values.push(parseFloat(c)),f.times.length>200&&(f.times.shift(),f.values.shift())):i.set(r,{times:[l],values:[parseFloat(c)]})}),this.chartObj&&this.chartObj.setOption(j(this.Style.value),!1)}onLinkEvent(e){Z(e)}}const d=new T(s,"fireCombustionCurve");d.setupLifecycle();const S=d.getStyle(),Y=d.getEchartId(),E=t.computed(()=>{var o;return((o=s.conf)==null?void 0:o.data)||[]}),v=t.computed(()=>{const o=new Set;return E.value.filter(e=>e.name&&!o.has(e.name)?(o.add(e.name),!0):!1)}),m=t.ref([]);t.watch(v,o=>{o.length>0&&m.value.length===0&&(m.value=o.map(e=>e.fv||e.name))},{immediate:!0});const w=t.computed({get:()=>v.value.length>0&&m.value.length===v.value.length,set:()=>{}}),q=t.computed(()=>{const o=m.value.length;return o>0&&o<v.value.length}),z=t.computed(()=>{if(m.value.length===0)return"选择监测指标";if(m.value.length===v.value.length)return"全部指标";const e=v.value.filter(l=>m.value.includes(l.fv||l.name)).map(l=>l.name).join(", ");return e.length>14?e.substring(0,14)+"...":e}),U=o=>{m.value=o?v.value.map(e=>e.fv||e.name):[],y()},h=t.ref(new Set),H=t.computed(()=>v.value.filter(o=>m.value.includes(o.fv||o.name)).map(o=>{const e=x.get(o.name)||N.value;return{name:e?`${e}-${o.name}`:o.name,color:o.color||"#5470c6",visible:!h.value.has(o.name)}})),R=o=>{const e=o.name.includes("-")?o.name.split("-").slice(1).join("-"):o.name;h.value.has(e)?h.value.delete(e):h.value.add(e),h.value=new Set(h.value),y()},k=t.ref(""),$=t.computed(()=>{var o,e,l;return(e=(o=s.conf)==null?void 0:o.common)!=null&&e.object_id||(l=s.conf)!=null&&l.object_id?!0:E.value.some(u=>!!u.object_id)}),P=t.computed(()=>$.value||!!k.value),N=t.ref(""),_=t.ref(""),G=t.computed(()=>({backgroundColor:S.value.bgColor,color:S.value.textColor})),V=()=>{i.clear();const o=C.dayjs();E.value.forEach((e,l)=>{const u=[],n=[],a=[85,50,10],c=[3,5,1.5],r=a[l%3]||20,f=c[l%3]||3;for(let g=0;g<100;g++)u.push(o.subtract((100-g)*15,"minute").format("YYYY/MM/DD HH:mm")),n.push(+(r+(Math.random()-.5)*f+Math.sin(g/10)*f*.4).toFixed(2));i.set(e.name,{times:u,values:n})})},j=o=>{if(s.mode!=="edit"){if(!P.value)return{xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[]};if(i.size===0)return{xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[]}}let e=[];for(const[,n]of i)n.times.length>e.length&&(e=n.times);!e.length&&s.mode==="edit"&&(e=Array.from({length:50},(n,a)=>C.dayjs().subtract((50-a)*15,"minute").format("YYYY/MM/DD HH:mm")));const l={},u=v.value.filter(n=>m.value.includes(n.fv||n.name)).map(n=>{const a=x.get(n.name)||N.value,c=a?`${a}-${n.name}`:n.name;l[c]=!h.value.has(n.name);const r=i.get(n.name);return{name:c,type:"line",smooth:!0,showSymbol:!1,data:(r==null?void 0:r.values)||[],lineStyle:{color:n.color||"#5470c6",width:2.5,type:"solid"},itemStyle:{color:n.color||"#5470c6"}}});return{tooltip:{trigger:"axis",backgroundColor:"rgba(255,255,255,0.96)",borderColor:"#1c3d90",borderWidth:1,textStyle:{color:"#333",fontSize:12},axisPointer:{type:"cross"}},legend:{show:!1,selected:l},grid:{top:15,right:40,bottom:60,left:60},xAxis:{type:"category",data:e,axisLine:{lineStyle:{color:o.gridColor}},axisLabel:{color:o.textColor,fontSize:11,rotate:15,interval:"auto",formatter:n=>{var a;if(n&&n.length>6){const c=n.split(" ");return(((a=c[0])==null?void 0:a.split("/").slice(1).join("/"))||"")+(c[1]?" "+c[1]:"")}return n}},axisTick:{show:!1},boundaryGap:!1},yAxis:{type:"value",name:"监测数值",scale:!0,axisLine:{show:!1},axisLabel:{color:o.textColor,fontSize:11},splitLine:{lineStyle:{color:o.gridColor,type:"dashed"}}},dataZoom:[{type:"inside",xAxisIndex:0,filterMode:"none"},{type:"slider",height:18,bottom:8,borderColor:"transparent",backgroundColor:"#f0f0f0",fillerColor:"rgba(28, 61, 144, 0.2)",handleStyle:{color:"#1c3d90"},textStyle:{fontSize:10}}],series:u}},y=()=>{const o=d.getChartInstance();o&&o.setOption(j(S.value),!0)},W=()=>{const o=d.getChartInstance();if(!o)return;const e=document.createElement("a");e.href=o.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),e.download=`煤自燃关键指标时序曲线_${C.dayjs().format("YYYYMMDDHHmmss")}.png`,e.click()},Z=o=>{const{payload:e}=o;if(!e)return;if(e.type==="filter"){if(e.point&&(N.value=String(e.point)),e.objectId){const u=_.value;_.value=String(e.objectId),k.value=String(e.objectId),u!==_.value&&I(_.value)}(s.mode==="edit"||!e.objectId)&&(V(),y());return}const l=e.objectId||e.object_id;l&&(k.value=String(l),I(l))},I=o=>{var n;if(!o||s.mode!=="preview")return;i.clear();const e=(n=d.session)==null?void 0:n.value;if(!e)return;const l=s.conf.id;e.componentRequests&&e.componentRequests.delete(l),e.registerComponent({id:l,request:null,onUpdate:(a,c)=>{a==="realtime"&&d.setSocketData(c)}});const u=d.getSource();d.subscribeBySource(u,o)};return t.onMounted(()=>{d.init(),s.mode==="edit"&&V(),setTimeout(()=>{var o;return(o=d.getChartInstance())==null?void 0:o.resize()},200)}),t.onUnmounted(()=>{d.cleanup()}),t.watch(()=>s.conf,()=>{d.init(),s.mode==="edit"&&V()},{deep:!0}),(o,e)=>{const l=b.ElIcon,u=b.ElButton,n=b.ElCheckbox,a=b.ElCheckboxGroup,c=b.ElPopover;return t.openBlock(),t.createElementBlock("div",{class:"fire-combustion-curve",style:t.normalizeStyle(G.value)},[t.createElementVNode("div",oe,[t.createElementVNode("div",ne,[e[4]||(e[4]=t.createElementVNode("div",{class:"header-left"},[t.createElementVNode("span",{class:"indicator-dot"}),t.createElementVNode("span",{class:"panel-title"},"📊 煤自燃监测关键指标时序曲线")],-1)),t.createElementVNode("div",le,[t.createVNode(c,{placement:"bottom-start",width:220,trigger:"click"},{reference:t.withCtx(()=>[t.createVNode(u,{size:"small"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(z.value)+" ",1),t.createVNode(l,{class:"el-icon--right"},{default:t.withCtx(()=>[t.createVNode(t.unref(F.ArrowDown))]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",ae,[t.createElementVNode("div",re,[t.createVNode(n,{modelValue:w.value,"onUpdate:modelValue":e[0]||(e[0]=r=>w.value=r),indeterminate:q.value,onChange:U},{default:t.withCtx(()=>[...e[2]||(e[2]=[t.createTextVNode(" 全部指标 ",-1)])]),_:1},8,["modelValue","indeterminate"])]),t.createVNode(a,{modelValue:m.value,"onUpdate:modelValue":e[1]||(e[1]=r=>m.value=r),onChange:y},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,r=>(t.openBlock(),t.createBlock(n,{key:r.fv,label:r.fv,class:"indicator-checkbox-item"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])]),_:1}),t.createVNode(u,{size:"small",onClick:W},{default:t.withCtx(()=>[t.createVNode(l,null,{default:t.withCtx(()=>[t.createVNode(t.unref(F.Download))]),_:1}),e[3]||(e[3]=t.createElementVNode("span",null,"导出图像",-1))]),_:1})])]),t.createElementVNode("div",se,[t.createElementVNode("div",ce,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(H.value,r=>(t.openBlock(),t.createElementBlock("span",{key:r.name,class:t.normalizeClass(["legend-item",{disabled:!r.visible}]),onClick:f=>R(r)},[t.createElementVNode("span",{class:"legend-line",style:t.normalizeStyle({borderTopColor:r.visible?r.color:"#ccc"})},null,4),t.createElementVNode("span",ue,t.toDisplayString(r.name),1)],10,ie))),128))])]),t.createElementVNode("div",{id:t.unref(Y),class:"chart-container"},null,8,de)]),t.renderSlot(o.$slots,"default",{},void 0,!0)],4)}}})),ye=C._export_sfc(_e,[["__scopeId","data-v-df742467"]]);exports.default=ye;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var F=Object.defineProperty,I=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var y=(i,a,r)=>a in i?F(i,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[a]=r,E=(i,a)=>{for(var r in a||(a={}))w.call(a,r)&&y(i,r,a[r]);if(C)for(var r of C(a))A.call(a,r)&&y(i,r,a[r]);return i},k=(i,a)=>I(i,j(a));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=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/date-picker/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue"),O=require("./element-resize-detector-
|
|
1
|
+
"use strict";var F=Object.defineProperty,I=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var y=(i,a,r)=>a in i?F(i,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[a]=r,E=(i,a)=>{for(var r in a||(a={}))w.call(a,r)&&y(i,r,a[r]);if(C)for(var r of C(a))A.call(a,r)&&y(i,r,a[r]);return i},k=(i,a)=>I(i,j(a));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=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/date-picker/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue"),O=require("./element-resize-detector-BlMXyWIR.cjs"),g=require("./index-EnNA0nIi.cjs"),V=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),H={class:"filter-bar"},x={class:"filter-item"},T={class:"filter-item"},q={class:"filter-item"},L={class:"time-range-btns"},z=["onClick"],U={class:"filter-item"},P={DEFAULT_ICON:V.DEFAULT_ICON,ACTIVE_ICON:V.ACTIVE_ICON,NAME_CN:"煤自燃筛选栏",NAME_EN:"Fire Filter Bar",ORDER:1},$={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},linkChannel:{value:"fire",type:"select",label:"component.linkChannel",options:[{label:"煤自燃监测",value:"fire"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Q=[{name:"FIRE115",object_id:"",region:"北帮"},{name:"FIRE116",object_id:"",region:"北帮"},{name:"FIRE201",object_id:"",region:"南帮"},{name:"FIRE305",object_id:"",region:"东帮"},{name:"FIRE410",object_id:"",region:"西帮"}],W=["name","object_id","region"],G=["mosaic"],J={useAlias:!1,multiObject:!0,source:"mosaic"},K=50,X={DEFAULT:P,OPTIONS:$,DATA:Q,PARAMS:W,SOURCE:G,ITEMS:K,COMMON:J},Z=e.defineComponent(k(E({},X),{__name:"fireFilterBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){const a=i;class r extends O.BaseComponent{extractStyles(){var m,p,n,v;const t=(m=this.props.conf)==null?void 0:m.options,s=((p=t==null?void 0:t.linkChannel)==null?void 0:p.value)||"fire",u=((n=t==null?void 0:t.customChannel)==null?void 0:n.value)||"";return{bgColor:((v=t==null?void 0:t.bgColor)==null?void 0:v.value)||"#ffffff",linkChannel:s==="custom"&&u?u:s}}}const b=new r(a,"fireFilterBar");b.setupLifecycle();const N=b.getStyle(),d=e.computed(()=>{var t;const l=(t=a.conf)==null?void 0:t.data;return!l||!Array.isArray(l)?[]:l.filter(s=>s.name)}),R=e.computed(()=>{const l=new Set;return d.value.forEach(t=>{t.region&&l.add(t.region)}),Array.from(l)}),_=e.computed(()=>{let l=d.value;return o.region&&(l=l.filter(t=>t.region===o.region)),l.map(t=>({label:t.name,value:t.name}))}),h=[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}],c=d.value[0],o=e.reactive({region:(c==null?void 0:c.region)||"",point:(c==null?void 0:c.name)||"",timeRange:"1d",dateRange:[g.dayjs().subtract(1,"day").format("YYYY/MM/DD HH:mm"),g.dayjs().format("YYYY/MM/DD HH:mm")]}),Y=()=>{var t;const l=_.value;o.point=((t=l[0])==null?void 0:t.value)||""},D=l=>{o.timeRange=l;const t=g.dayjs(),s=l==="1d"?t.subtract(1,"day"):l==="1w"?t.subtract(1,"week"):t.subtract(1,"month");o.dateRange=[s.format("YYYY/MM/DD HH:mm"),t.format("YYYY/MM/DD HH:mm")]},B=()=>{o.timeRange=""},M=()=>{if(a.mode==="edit"||!o.point)return;const l=d.value.find(t=>t.name===o.point);if(!(l!=null&&l.object_id)){console.warn("[煤自燃筛选栏] 所选监测点未配置 object_id,无法发送联动");return}b.publish({type:"filter",region:o.region,point:o.point,objectId:l.object_id,timeRange:o.timeRange,dateRange:[...o.dateRange]})},S=e.computed(()=>({backgroundColor:N.value.bgColor}));return(l,t)=>{const s=f.ElOption,u=f.ElSelect,m=f.ElDatePicker,p=f.ElButton;return e.openBlock(),e.createElementBlock("div",{class:"fire-filter-bar-wrap",style:e.normalizeStyle(S.value)},[e.createElementVNode("div",H,[e.createElementVNode("div",x,[t[3]||(t[3]=e.createElementVNode("span",{class:"filter-label"},"区域位置:",-1)),e.createVNode(u,{modelValue:o.region,"onUpdate:modelValue":t[0]||(t[0]=n=>o.region=n),placeholder:"全部区域",size:"small",style:{width:"120px"},onChange:Y},{default:e.withCtx(()=>[e.createVNode(s,{label:"全部区域",value:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,n=>(e.openBlock(),e.createBlock(s,{key:n,label:n,value:n},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",T,[t[4]||(t[4]=e.createElementVNode("span",{class:"filter-label"},"监测点:",-1)),e.createVNode(u,{modelValue:o.point,"onUpdate:modelValue":t[1]||(t[1]=n=>o.point=n),placeholder:"请选择",size:"small",style:{width:"120px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,n=>(e.openBlock(),e.createBlock(s,{key:n.value,label:n.label,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",q,[t[5]||(t[5]=e.createElementVNode("span",{class:"filter-label"},"时间范围:",-1)),e.createElementVNode("div",L,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,n=>e.createElementVNode("button",{key:n.value,class:e.normalizeClass(["range-btn",{active:o.timeRange===n.value}]),onClick:v=>D(n.value)},e.toDisplayString(n.label),11,z)),64))])]),e.createElementVNode("div",U,[e.createVNode(m,{modelValue:o.dateRange,"onUpdate:modelValue":t[2]||(t[2]=n=>o.dateRange=n),type:"datetimerange",size:"small",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",style:{width:"340px"},onChange:B},null,8,["modelValue"])]),e.createVNode(p,{type:"primary",size:"small",onClick:M},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("查询",-1)])]),_:1})]),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),ee=g._export_sfc(Z,[["__scopeId","data-v-e3e83c6f"]]);exports.default=ee;
|
|
@@ -17,8 +17,8 @@ import "element-plus/es/components/date-picker/style/css";
|
|
|
17
17
|
import "element-plus/es/components/select/style/css";
|
|
18
18
|
import "element-plus/es/components/option/style/css";
|
|
19
19
|
import { defineComponent as W, computed as b, reactive as q, openBlock as c, createElementBlock as v, normalizeStyle as G, createElementVNode as s, createVNode as d, withCtx as y, Fragment as R, renderList as Y, createBlock as F, normalizeClass as J, toDisplayString as K, createTextVNode as X, renderSlot as Z } from "vue";
|
|
20
|
-
import { B as ee } from "./element-resize-detector-
|
|
21
|
-
import { d as h, _ as te } from "./index-
|
|
20
|
+
import { B as ee } from "./element-resize-detector-DeMhGbNi.js";
|
|
21
|
+
import { d as h, _ as te } from "./index-zPaMBZk-.js";
|
|
22
22
|
import { A as le, D as ne } from "./ele-vlu-icon-Bg6EHZdJ.js";
|
|
23
23
|
const oe = { class: "filter-bar" }, ae = { class: "filter-item" }, re = { class: "filter-item" }, ie = { class: "filter-item" }, se = { class: "time-range-btns" }, me = ["onClick"], ce = { class: "filter-item" }, ue = {
|
|
24
24
|
DEFAULT_ICON: ne,
|