mixdashboards 1.0.49 → 1.0.50
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-CafVdj74.js → EChartComponentBase-BjiCJlIa.js} +1 -1
- package/dist/{EChartComponentBase-Dz5E-lyI.cjs → EChartComponentBase-CUbabNTX.cjs} +1 -1
- package/dist/{UniverSheet-CH1YywcZ.js → UniverSheet-B2ysdSZW.js} +2 -2
- package/dist/{UniverSheet-BqLvs6V6.cjs → UniverSheet-C97ENJKg.cjs} +1 -1
- package/dist/{accelerationChart-V4UmpPse.js → accelerationChart-BtHLKXou.js} +3 -3
- package/dist/{accelerationChart-BWRlw5-L.cjs → accelerationChart-CqZGLCTa.cjs} +1 -1
- package/dist/{actionItem-Dsg6qYSp.cjs → actionItem-Ba4CZB9l.cjs} +1 -1
- package/dist/{actionItem-CBwfWvTO.js → actionItem-D6ScXj3z.js} +3 -3
- package/dist/{alarmLevelChart-CnKEZZZv.js → alarmLevelChart-CAA_fUgy.js} +2 -2
- package/dist/{alarmLevelChart-DN8hyTdg.cjs → alarmLevelChart-DyThrs-J.cjs} +1 -1
- package/dist/{alertTable-CdkiAZIu.cjs → alertTable-DICnr2gs.cjs} +1 -1
- package/dist/{alertTable-BluC1smp.js → alertTable-_z8F5EWM.js} +2 -2
- package/dist/{annualRainfallChart-COeieHTg.js → annualRainfallChart-B0TXYlAe.js} +2 -2
- package/dist/{annualRainfallChart-BeenDSmW.cjs → annualRainfallChart-CbND_8XT.cjs} +1 -1
- package/dist/api-BR57NNEB.cjs +1 -0
- package/dist/api-CcAArQi7.js +164 -0
- package/dist/{aqi-BXtF-SsB.cjs → aqi-BOEGQCuM.cjs} +1 -1
- package/dist/{aqi-naf_yg1B.js → aqi-RDZu5nYt.js} +3 -3
- package/dist/{aqiIndass-CiHVV6y-.js → aqiIndass-BPAt5nQk.js} +2 -2
- package/dist/{aqiIndass-YO0txxEM.cjs → aqiIndass-CgURee9t.cjs} +1 -1
- package/dist/{arrayCard-CPtHFB--.js → arrayCard-BLUoVrsd.js} +2 -2
- package/dist/{arrayCard-USJyzspe.cjs → arrayCard-Wnr9xzrq.cjs} +1 -1
- package/dist/{audio-7HMku35Z.js → audio-DC_D2YUu.js} +4 -4
- package/dist/{audio-Uz_XIJyA.cjs → audio-DuS_h70S.cjs} +1 -1
- package/dist/{bar-Bq_RDVaa.js → bar-BeO49AzX.js} +4 -4
- package/dist/{bar-CSideFNS.cjs → bar-bZbB0yMx.cjs} +1 -1
- package/dist/{bmp-DZ9_aKMT.cjs → bmp-6zTErjQZ.cjs} +1 -1
- package/dist/{bmp-BF-OdMoW.js → bmp-CLKbvXOI.js} +3 -3
- package/dist/{box-DfqNW1B6.js → box-BxXWmt0X.js} +2 -2
- package/dist/{box-C1n5r8hT.cjs → box-eQDyV3hk.cjs} +1 -1
- package/dist/{chartConfigPanel-8wROQoL0.js → chartConfigPanel-BvnnoSQ2.js} +1 -1
- package/dist/{chartConfigPanel-C62JqDqE.cjs → chartConfigPanel-CE3d4OpP.cjs} +1 -1
- package/dist/{circleBar-C54UQvaf.js → circleBar-Cl5i_iPg.js} +3 -3
- package/dist/{circleBar-UrV2_yVK.cjs → circleBar-I4Mh4_kk.cjs} +1 -1
- package/dist/{clock-CbebZdlU.js → clock-4HEPNmup.js} +2 -2
- package/dist/{clock-DgkEPumE.cjs → clock-7KHM_O_j.cjs} +1 -1
- package/dist/{clt-B32D8bK9.js → clt-Cicmq_zn.js} +3 -3
- package/dist/{clt-DWBynZO1.cjs → clt-z0rh02ts.cjs} +1 -1
- package/dist/{cmc-BVrFcoih.cjs → cmc-BFOFyDhF.cjs} +1 -1
- package/dist/{cmc-CC-6njzU.js → cmc-DoKSe6kA.js} +3 -3
- package/dist/{cmp-BCvtkNwO.js → cmp-88WnAeeC.js} +3 -3
- package/dist/{cmp-D6aHhSC6.cjs → cmp-fxk3vvRJ.cjs} +1 -1
- package/dist/{composite-CWYjAAsg.js → composite-CJi4KbAS.js} +3 -3
- package/dist/{composite-kODICk08.cjs → composite-CpD_yPEG.cjs} +1 -1
- package/dist/{controlList-BXvCyR2L.cjs → controlList-DT21uV7S.cjs} +1 -1
- package/dist/{controlList-zYX8DbNE.js → controlList-Ds98eQhx.js} +3 -3
- package/dist/{controlRecordList-Dly5aorA.cjs → controlRecordList-BEXUdUlk.cjs} +1 -1
- package/dist/{controlRecordList-Bc2M0iyo.js → controlRecordList-YlkbvMFI.js} +3 -3
- package/dist/{crd--3Oj3Y1t.cjs → crd-C852SplB.cjs} +1 -1
- package/dist/{crd-CoB00gS6.js → crd-Cr3HLog9.js} +2 -2
- package/dist/{ctrBtn-CUADz_pu.js → ctrBtn-N0CQxGOu.js} +4 -4
- package/dist/{ctrBtn-BusKAhHv.cjs → ctrBtn-OUtZpJrN.cjs} +1 -1
- package/dist/{ctrSet-C0R2aIby.cjs → ctrSet-BRFaMtA6.cjs} +1 -1
- package/dist/{ctrSet-BKVsejze.js → ctrSet-Br9GbDQP.js} +4 -4
- package/dist/{ctrSwitch-BqRBh40z.js → ctrSwitch-CZi4Q2qY.js} +4 -4
- package/dist/{ctrSwitch-uIqQRKaq.cjs → ctrSwitch-Cbd5L15F.cjs} +1 -1
- package/dist/{dataManagement-BdP1iSeC.cjs → dataManagement-Bh9BM8p4.cjs} +1 -1
- package/dist/{dataManagement-C6jHI7-1.js → dataManagement-BnQyWMyj.js} +2 -2
- package/dist/{dataReport-DNPD3MZl.cjs → dataReport-Dsgpg9HI.cjs} +1 -1
- package/dist/{dataReport-C2XWn_Xv.js → dataReport-v01I_59R.js} +2 -2
- package/dist/{dataTable-5bUrqBWz.js → dataTable-BM4F69di.js} +1 -1
- package/dist/{dataTable-BvlEs83r.cjs → dataTable-DOVR0yGL.cjs} +1 -1
- package/dist/{datetime-CE5wsyi7.cjs → datetime-COHpK691.cjs} +1 -1
- package/dist/{datetime-Dp8mPzSO.js → datetime-DmYFqkn-.js} +2 -2
- package/dist/{deepClusterSlipSurface-BinAmtCz.cjs → deepClusterSlipSurface-02MBgHpP.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-D_7LRpHz.js → deepClusterSlipSurface-CdInWoSj.js} +3 -3
- package/dist/{deepDataMatrix-t6axw0An.cjs → deepDataMatrix-C6uYc1Ii.cjs} +1 -1
- package/dist/{deepDataMatrix-BXTJm6UD.js → deepDataMatrix-Dx6S0Ud4.js} +2 -2
- package/dist/{deepDisplacement3D-BRutQ6Ut.cjs → deepDisplacement3D-Cd3SYFTm.cjs} +1 -1
- package/dist/{deepDisplacement3D-Cy-FIGAq.js → deepDisplacement3D-e3cZoBIa.js} +3 -3
- package/dist/{deepDisplacementChart-BWVcNgaX.js → deepDisplacementChart-BRg-5xLU.js} +4 -4
- package/dist/{deepDisplacementChart-eD2GOxML.cjs → deepDisplacementChart-BdnmYVpg.cjs} +1 -1
- package/dist/{deepDisplacementChart---DgDx8L.js → deepDisplacementChart-Df_wRTax.js} +2 -2
- package/dist/{deepDisplacementChart-DboPezyJ.cjs → deepDisplacementChart-DyZzw3I1.cjs} +1 -1
- package/dist/{deepDisplacementView-CHFgG2wy.js → deepDisplacementView-7PEeLnmE.js} +1 -1
- package/dist/{deepDisplacementView-BNVTS7Ar.cjs → deepDisplacementView-DDmT4y42.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-CpJI7axl.cjs → deepNodeTemperatureChart-B7HLWtyp.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-N1z-KMmu.js → deepNodeTemperatureChart-DpZK2y_K.js} +3 -3
- package/dist/{deepTangentAngleChart-ClnxPvUM.js → deepTangentAngleChart-D2_fQpm1.js} +3 -3
- package/dist/{deepTangentAngleChart-DxB4EaWm.cjs → deepTangentAngleChart-jTYFJpUS.cjs} +1 -1
- package/dist/{deepTemperatureField-DT7iyND9.js → deepTemperatureField-Bj0tQot1.js} +3 -3
- package/dist/{deepTemperatureField-DWO8Dcjh.cjs → deepTemperatureField-C9oKBaWc.cjs} +1 -1
- package/dist/{deepTrendChart-C7_BfEiR.js → deepTrendChart-Cox4B6GG.js} +3 -3
- package/dist/{deepTrendChart-D9uQKgck.cjs → deepTrendChart-MgsjLjQP.cjs} +1 -1
- package/dist/{deviceOnlineStatus-BA7D5fbt.cjs → deviceOnlineStatus-Ckr78uqa.cjs} +1 -1
- package/dist/{deviceOnlineStatus-DlrB6EXN.js → deviceOnlineStatus-KoRHRByt.js} +2 -2
- package/dist/{deviceStatus-mDl8zF_Z.cjs → deviceStatus-C6zUE1Ch.cjs} +1 -1
- package/dist/{deviceStatus-aPf8MflS.js → deviceStatus-CLyOrzWr.js} +2 -2
- package/dist/{displacementDataTable-Da1xkiXG.js → displacementDataTable-B__8-EMW.js} +2 -2
- package/dist/{displacementDataTable-Co4In07D.cjs → displacementDataTable-CnMmwp_T.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-B85ad8vc.js → displacementTrajectoryChart-BD6_q2AN.js} +3 -3
- package/dist/{displacementTrajectoryChart-FPrvrbUa.cjs → displacementTrajectoryChart-EjHI5pSK.cjs} +1 -1
- package/dist/{displacementTrendChart-BRxIsjeK.js → displacementTrendChart-C2_U9d0k.js} +2 -2
- package/dist/{displacementTrendChart-DcBu8-_Z.cjs → displacementTrendChart-C9-Wcthw.cjs} +1 -1
- package/dist/{dxf-FrPSVW4C.js → dxf-BTdzQ1WR.js} +4 -4
- package/dist/{dxf-EDkdonhJ.cjs → dxf-BnW_56W9.cjs} +1 -1
- package/dist/{dzc-BBijV6-m.cjs → dzc-DIgGeG0y.cjs} +1 -1
- package/dist/{dzc-BOaL7miE.js → dzc-DWHQjxWE.js} +3 -3
- package/dist/{element-resize-detector-DYs3pJPp.cjs → element-resize-detector-Cl7PwC4K.cjs} +1 -1
- package/dist/{element-resize-detector-BCRzpPES.js → element-resize-detector-CoRhuer9.js} +4 -4
- package/dist/{evn-T-0VLXht.js → evn-CZWFRKvU.js} +2 -2
- package/dist/{evn-CAWNNpK2.cjs → evn-D964RzSY.cjs} +1 -1
- package/dist/{evolutionChart-B8vzbfrk.cjs → evolutionChart-CAZZ33t-.cjs} +1 -1
- package/dist/{evolutionChart-DYf3V-rl.js → evolutionChart-Co5KN4kk.js} +3 -3
- package/dist/{fileViewer-D6rC0YFY.cjs → fileViewer-8Tb-6ZXx.cjs} +1 -1
- package/dist/{fileViewer-BRVwWDA3.js → fileViewer-CIgKOZJY.js} +4 -4
- package/dist/{filterBar-hfIbyNh_.js → filterBar-DN3gl-1y.js} +2 -2
- package/dist/{filterBar-B3Ka4jw8.cjs → filterBar-DzSWAegi.cjs} +1 -1
- package/dist/{fireCombustionCurve-D1wKpm4i.js → fireCombustionCurve-2gyNx_37.js} +2 -2
- package/dist/{fireCombustionCurve-DKQJzKh2.cjs → fireCombustionCurve-BoPafSTF.cjs} +1 -1
- package/dist/{fireFilterBar-D8TTM4KM.cjs → fireFilterBar-BRlStM-R.cjs} +1 -1
- package/dist/{fireFilterBar-Bl0iCn48.js → fireFilterBar-DmyGJmXo.js} +2 -2
- package/dist/{gag-dKpxHBTV.cjs → gag-Bv61Z9xd.cjs} +1 -1
- package/dist/{gag-Vt7-rYYR.js → gag-D8OE6QuC.js} +2 -2
- package/dist/{gasStationList-g4AUNuxi.cjs → gasStationList-Db7hnhSp.cjs} +1 -1
- package/dist/{gasStationList-BDRHTLvR.js → gasStationList-pE2Ix1jL.js} +3 -3
- package/dist/{glbModel-BpnMbHQe.js → glbModel-BOccEfV7.js} +2 -2
- package/dist/{glbModel-BCgQzSz1.cjs → glbModel-CveO7gRY.cjs} +1 -1
- package/dist/{gnssFilterBar-BgS-JH3k.cjs → gnssFilterBar-DbvuQETH.cjs} +1 -1
- package/dist/{gnssFilterBar-CaGGhgEk.js → gnssFilterBar-o46kht8b.js} +2 -2
- package/dist/{gnssHistoryTable-CGY1ROb6.js → gnssHistoryTable-BR8BagaW.js} +3 -3
- package/dist/{gnssHistoryTable-Bkt4Zvxa.cjs → gnssHistoryTable-D4md3vW9.cjs} +1 -1
- package/dist/{gnssMapView-DuNotJym.cjs → gnssMapView-BONePEA0.cjs} +1 -1
- package/dist/{gnssMapView-C4-pk-1_.js → gnssMapView-CBuI36is.js} +2 -2
- package/dist/{gnssTimeSeriesChart-MZbERhu9.js → gnssTimeSeriesChart-BnkwIXD3.js} +4 -4
- package/dist/{gnssTimeSeriesChart-y7L6j_y5.cjs → gnssTimeSeriesChart-k759R4Jz.cjs} +1 -1
- package/dist/{gnssXYTrajectory-DZFjqFPv.cjs → gnssXYTrajectory-D8lgUVnP.cjs} +1 -1
- package/dist/{gnssXYTrajectory-DL8WWe1C.js → gnssXYTrajectory-XRvGqirG.js} +3 -3
- package/dist/{grd-BgaxrUfI.js → grd-GmODod_I.js} +3 -3
- package/dist/{grd-DNJ1rlwR.cjs → grd-b9meYGso.cjs} +1 -1
- package/dist/{grdIndass-Bxf2L3J5.js → grdIndass-CMhE_Am5.js} +3 -3
- package/dist/{grdIndass-DlwlkKKH.cjs → grdIndass-DOjsX9Xe.cjs} +1 -1
- package/dist/{grg-78Sh9Nr7.js → grg-Bof7f3MI.js} +2 -2
- package/dist/{grg-CmxBlYJ6.cjs → grg-BsVjC-sq.cjs} +1 -1
- package/dist/{gridview-FFx-3wNz.cjs → gridview-CQreGJwJ.cjs} +1 -1
- package/dist/{gridview-BWe_qLy-.js → gridview-CZUzJi9i.js} +2 -2
- package/dist/{groupCard-B2ORsgUN.js → groupCard-B7bg93K0.js} +2 -2
- package/dist/{groupCard-BOqERSM4.cjs → groupCard-D8CtEB-E.cjs} +1 -1
- package/dist/{headerBar-DPlPX8uD.js → headerBar-CvH7Zc7X.js} +3 -3
- package/dist/{headerBar-o2J2Dqkd.cjs → headerBar-eKaZGrw3.cjs} +1 -1
- package/dist/{history-DH68UK_U.js → history-D-BYETka.js} +52 -48
- package/dist/history-dKfXo4HD.cjs +1 -0
- package/dist/{index-ZwyqrmaH.cjs → index-CtAaj9XN.cjs} +11 -2
- package/dist/{index-LgTfdmT4.js → index-yidMosRJ.js} +11 -2
- package/dist/{insarDeformChart-9Qss0VGu.js → insarDeformChart-DkoK7BBR.js} +2 -2
- package/dist/{insarDeformChart-BTwU5ktS.cjs → insarDeformChart-z8yO9-05.cjs} +1 -1
- package/dist/{insarImageViewer-C7aTZp-m.js → insarImageViewer-D3dKgLZO.js} +2 -2
- package/dist/{insarImageViewer-B-ExpEa8.cjs → insarImageViewer-DA8knTHO.cjs} +1 -1
- package/dist/{kds-8n-a2GhL.cjs → kds-CEwnUrkv.cjs} +1 -1
- package/dist/{kds-CS7G3BaQ.js → kds-CHs9Tu_R.js} +2 -2
- package/dist/{layerTabs-pJJzTbu9.js → layerTabs-DatJpr1M.js} +2 -2
- package/dist/{layerTabs-1lOAiEhu.cjs → layerTabs-Dd9Jh_Fv.cjs} +1 -1
- package/dist/{lin-IHxWU55I.cjs → lin-B7j-nXP9.cjs} +1 -1
- package/dist/{lin-Bk49Db_G.js → lin-BE41AMlf.js} +3 -3
- package/dist/{linIndass-Drxnj7KQ.js → linIndass-By1yFIUk.js} +2 -2
- package/dist/{linIndass-Cpf8pnLn.cjs → linIndass-C1p1Cmnn.cjs} +1 -1
- package/dist/{lst-CPd37vza.cjs → lst-C9GGJBSY.cjs} +1 -1
- package/dist/{lst-CL6bmgJ2.js → lst-CZ-zfn6U.js} +2 -2
- package/dist/{manualEntry-CcCE4O6Q.cjs → manualEntry-BGHJBf0t.cjs} +1 -1
- package/dist/{manualEntry-D_doLqqH.js → manualEntry-D9hLFJDz.js} +2 -2
- package/dist/{mapBackground-DEBggmVp.cjs → mapBackground-BtWWW32y.cjs} +1 -1
- package/dist/{mapBackground-CvLXKuJx.js → mapBackground-xNQTZByG.js} +2 -2
- package/dist/{mappingList-BZODl4t5.js → mappingList-CRrWBRN6.js} +3 -3
- package/dist/{mappingList-qKR-0uhY.cjs → mappingList-oTl8MueE.cjs} +1 -1
- package/dist/{markdownViewer-CtN6ailN.js → markdownViewer-CL61hROd.js} +4 -4
- package/dist/{markdownViewer-DZ8gvoHk.cjs → markdownViewer-CX24h3nv.cjs} +1 -1
- package/dist/{mix-control-modal-BlWtiePl.js → mix-control-modal-D6EEQCGG.js} +3 -3
- package/dist/{mix-control-modal-zbr85DkZ.cjs → mix-control-modal-dT4E6Haz.cjs} +1 -1
- package/dist/{mixDataPermission-C-Cu3_y0.js → mixDataPermission-B9cjyL0A.js} +1 -1
- package/dist/{mixDataPermission-Gcl_4czp.cjs → mixDataPermission-DCwcPNX3.cjs} +1 -1
- package/dist/{mixGrid-DJQ2jXcg.js → mixGrid-GUG7sL3_.js} +3 -3
- package/dist/{mixGrid-Dh9y_kW0.cjs → mixGrid-uKQuF0o0.cjs} +1 -1
- package/dist/{mixMap-BRnDOkNF.cjs → mixMap-BdG5zgn9.cjs} +1 -1
- package/dist/{mixMap-2REwmqmi.js → mixMap-m7d9IzZE.js} +3 -3
- package/dist/{mixModel-C1CKMCLi.cjs → mixModel-C8zjwy8B.cjs} +1 -1
- package/dist/{mixModel-CHtF97xc.js → mixModel-CC6G9D0O.js} +3 -3
- package/dist/{mixPie-sD-AjwaC.cjs → mixPie-2gzUWb-u.cjs} +1 -1
- package/dist/{mixPie-DwDffWz5.js → mixPie-Bj81XmbV.js} +3 -3
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.js +1 -1
- package/dist/{mjpegCamera-Dbfd7eUC.js → mjpegCamera-Br5ey7tT.js} +2 -2
- package/dist/{mjpegCamera-RMS_dnv0.cjs → mjpegCamera-CILgaHwA.cjs} +1 -1
- package/dist/{monitorAlert-CjIQQ6fQ.cjs → monitorAlert-BmzetgZD.cjs} +1 -1
- package/dist/{monitorAlert-DagV3vuc.js → monitorAlert-CobYzZGr.js} +2 -2
- package/dist/{monitorData-CTkeA21g.js → monitorData-1r6SI7q1.js} +3 -3
- package/dist/{monitorData-DUansNO5.cjs → monitorData-DJbzjlS_.cjs} +1 -1
- package/dist/{monitorSpeedChart-CjfFqWon.cjs → monitorSpeedChart-DBaNR_i8.cjs} +1 -1
- package/dist/{monitorSpeedChart-BFnREZYZ.js → monitorSpeedChart-DkdUR1aJ.js} +1 -1
- package/dist/{mxa-B6ezKf-C.js → mxa-D-jbIMK7.js} +3 -3
- package/dist/{mxa-CN6zXgZA.cjs → mxa-QPAMK1uo.cjs} +1 -1
- package/dist/{myValue-C08vYRJC.js → myValue-BAiot_SS.js} +2 -2
- package/dist/{myValue-BG_jI_HT.cjs → myValue-Djvdf93P.cjs} +1 -1
- package/dist/{myValueList-BKVL_kPb.js → myValueList-BQAhr_60.js} +2 -2
- package/dist/{myValueList-Bwg3XCPF.cjs → myValueList-BVoHmkwi.cjs} +1 -1
- package/dist/{objectList-emtQyLbD.js → objectList-DC6ZXVnE.js} +4 -4
- package/dist/{objectList-FArM7oEM.cjs → objectList-ZBsMNei9.cjs} +1 -1
- package/dist/{photo-B9Veb_Am.cjs → photo-BfbD83cP.cjs} +1 -1
- package/dist/{photo-DXbQg_FJ.js → photo-DB7ScxzD.js} +4 -4
- package/dist/{pie-U9hOnFzz.cjs → pie-BWZlNdAH.cjs} +1 -1
- package/dist/{pie-DZzf2lL7.js → pie-CG9x9JkC.js} +3 -3
- package/dist/{pressBtn-BNr1R0gW.cjs → pressBtn-B9R9kSLo.cjs} +1 -1
- package/dist/{pressBtn-R5Wsj-Jw.js → pressBtn-Dx47q_TJ.js} +4 -4
- package/dist/{progressBar-sLfJICdr.js → progressBar-BiODeN_6.js} +2 -2
- package/dist/{progressBar-CUSoF6f0.cjs → progressBar-Cc0NRBqW.cjs} +1 -1
- package/dist/{progressCircle-BZgPxs_q.js → progressCircle-CUhyErYl.js} +2 -2
- package/dist/{progressCircle-B6P8B-t_.cjs → progressCircle-DafFwMdt.cjs} +1 -1
- package/dist/{qrcode-C96PznAO.js → qrcode-BcG6Yp9v.js} +2 -2
- package/dist/{qrcode-DMrNxgq5.cjs → qrcode-CpIFW2ZU.cjs} +1 -1
- package/dist/{raceBar-Dryx8Onl.js → raceBar-3TwLjyCx.js} +3 -3
- package/dist/{raceBar-BTExTEsZ.cjs → raceBar-DcyXXcCw.cjs} +1 -1
- package/dist/{rad-vw4O2ByZ.js → rad-B9uXwQSO.js} +2 -2
- package/dist/{rad-DpkIOKs_.cjs → rad-tTO9rh8e.cjs} +1 -1
- package/dist/{rainfallFilterBar-CH3abw6C.cjs → rainfallFilterBar-B0MHbvVF.cjs} +1 -1
- package/dist/{rainfallFilterBar-BjAWqKtM.js → rainfallFilterBar-B5me6wiw.js} +2 -2
- package/dist/{rainfallTimeCurve-oJUJ2mt7.cjs → rainfallTimeCurve-C0fnVsZL.cjs} +1 -1
- package/dist/{rainfallTimeCurve-BPDZGrlQ.js → rainfallTimeCurve-DhMUUl4b.js} +3 -3
- package/dist/{rangeLin-BFFy57TT.js → rangeLin-Bjba28V0.js} +2 -2
- package/dist/{rangeLin-CBqKAU0P.cjs → rangeLin-CcAP_o6E.cjs} +1 -1
- package/dist/{request-jIo7FwQD.js → request-CQBzobr7.js} +1 -1
- package/dist/{request-BcQP_dWt.cjs → request-DWe5EztR.cjs} +1 -1
- package/dist/{retainer1-CfcwA39J.cjs → retainer1-D0WcsB4O.cjs} +1 -1
- package/dist/{retainer1-goSPppQ-.js → retainer1-DnbR3o0S.js} +3 -3
- package/dist/{retainer2-DwQmFU10.cjs → retainer2-BsGq3sf6.cjs} +1 -1
- package/dist/{retainer2-BHdnsKrO.js → retainer2-HC4a_Rcx.js} +3 -3
- package/dist/{riskRegionTable-B8-f5xx-.js → riskRegionTable-DTArCYea.js} +2 -2
- package/dist/{riskRegionTable-CSJpPxPB.cjs → riskRegionTable-FoEiUsM-.cjs} +1 -1
- package/dist/{sankey-DXCBHb16.cjs → sankey-C5gmAMhu.cjs} +1 -1
- package/dist/{sankey-C0gaE3HM.js → sankey-D3TV79p7.js} +3 -3
- package/dist/{scd-Cwyft2g6.js → scd-Bl3rOGmw.js} +2 -2
- package/dist/{scd-CkEHu7nZ.cjs → scd-Db6KXaan.cjs} +1 -1
- package/dist/{sideMenu-DUdDDJ9K.cjs → sideMenu-BDM1P1cW.cjs} +1 -1
- package/dist/{sideMenu-BtVCCKw9.js → sideMenu-BJfA1uhH.js} +2 -2
- package/dist/{slopeStability-DwxDXTQG.js → slopeStability-DaP323la.js} +3 -3
- package/dist/{slopeStability-Byb6AKti.cjs → slopeStability-Z2V2od39.cjs} +1 -1
- package/dist/{speedCurve-BuNsy-ev.js → speedCurve-B_EYlvSe.js} +3 -3
- package/dist/{speedCurve-DArreweP.cjs → speedCurve-Dp3uVVyX.cjs} +1 -1
- package/dist/{staticLine-DfkpF6ZW.js → staticLine-CHiOuPX8.js} +3 -3
- package/dist/{staticLine-C50p0CZs.cjs → staticLine-Cnx32607.cjs} +1 -1
- package/dist/{store-D_TrU3nw.js → store-CHqnWEik.js} +2 -2
- package/dist/{store-ByTYoqyI.cjs → store-DehrZfaE.cjs} +1 -1
- package/dist/{swiper-L0Oo2dYD.cjs → swiper-BR2IFoJz.cjs} +1 -1
- package/dist/{swiper-CQiRByJd.js → swiper-C3dOtddc.js} +2 -2
- package/dist/{terminalConfigList-ChC43Bwq.cjs → terminalConfigList-DSu4f9n4.cjs} +1 -1
- package/dist/{terminalConfigList-BhmfFm4f.js → terminalConfigList-DVWWVeq4.js} +3 -3
- package/dist/{terminalList-C6tswBt1.js → terminalList-B8VgdttS.js} +3 -3
- package/dist/{terminalList-BQModRyk.cjs → terminalList-CKIaOeIR.cjs} +1 -1
- package/dist/{textbox-CgOhFsYo.js → textbox-Dj_XimAG.js} +3 -3
- package/dist/{textbox-CSuiDl8k.cjs → textbox-Dzmi2rz_.cjs} +1 -1
- package/dist/{timeQueryBar-QEg1Flg9.js → timeQueryBar-C2VHV9c7.js} +1 -1
- package/dist/{timeQueryBar-BtCXHgrg.cjs → timeQueryBar-crAWaYhQ.cjs} +1 -1
- package/dist/{timeSeries-DMINp9Fr.cjs → timeSeries-BRyc4h11.cjs} +1 -1
- package/dist/{timeSeries-B7NgbHfJ.js → timeSeries-CWuU-ogt.js} +4 -4
- package/dist/{timeSeriesCurve-wC9wHGI4.cjs → timeSeriesCurve-BMhQZA1X.cjs} +1 -1
- package/dist/{timeSeriesCurve-DEY5KQvu.js → timeSeriesCurve-Dk6FzaEp.js} +3 -3
- package/dist/{toggleBtn-DO953U-q.cjs → toggleBtn-B89o860W.cjs} +1 -1
- package/dist/{toggleBtn-Brtfu0-e.js → toggleBtn-ogVA3WOs.js} +3 -3
- package/dist/{trajectoryConfigPanel-BDdP3SdV.js → trajectoryConfigPanel-D01N49lh.js} +1 -1
- package/dist/{trajectoryConfigPanel-Bl_o9h2e.cjs → trajectoryConfigPanel-vGNgzSs6.cjs} +1 -1
- package/dist/{trajectoryScatter-DVm5ljvY.cjs → trajectoryScatter-CYFXE4dK.cjs} +1 -1
- package/dist/{trajectoryScatter-7-lJ5SMe.js → trajectoryScatter-DFhmjKpF.js} +3 -3
- package/dist/{universalConfigPanel-Cm4TfqAK.cjs → universalConfigPanel-DZHD2pZU.cjs} +1 -1
- package/dist/{universalConfigPanel-DTLFrGXs.js → universalConfigPanel-NB63CQv0.js} +1 -1
- package/dist/{universalTable-Bl9x3wEx.cjs → universalTable-BAlYZc6X.cjs} +1 -1
- package/dist/{universalTable-CCFr-GKz.js → universalTable-qpOc4526.js} +2 -2
- package/dist/{video-DObKrYkw.cjs → video-De2pwq7u.cjs} +1 -1
- package/dist/{video-gqqvz5Ge.js → video-rA9ArC4S.js} +4 -4
- package/dist/{videoMonitor-CGMHzNdh.js → videoMonitor-BSwBaLTE.js} +2 -2
- package/dist/{videoMonitor-B_Ur25fz.cjs → videoMonitor-CtoFDowr.cjs} +1 -1
- package/dist/{vlu-6DSf0haZ.js → vlu-B75MzAeW.js} +2 -2
- package/dist/{vlu-Dbj9euY_.cjs → vlu-BzBMTMWw.cjs} +1 -1
- package/dist/{weather-BsIBTn7G.cjs → weather-BNvwdR4t.cjs} +1 -1
- package/dist/{weather-CQBxQBld.js → weather-CJfwwOVu.js} +2 -2
- package/dist/{windLin-jVF-rhIx.cjs → windLin-SLR46lyF.cjs} +1 -1
- package/dist/{windLin-KIVk9hOD.js → windLin-yLs-b3_q.js} +2 -2
- package/package.json +1 -1
- package/dist/api-Cyx2Fha0.js +0 -125
- package/dist/api-nw_9niqv.cjs +0 -1
- package/dist/history-5W6pGCPq.cjs +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var E=Object.defineProperty,q=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var v=(l,e,n)=>e in l?E(l,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[e]=n,m=(l,e)=>{for(var n in e||(e={}))D.call(e,n)&&v(l,n,e[n]);if(C)for(var n of C(e))I.call(e,n)&&v(l,n,e[n]);return l},h=(l,e)=>q(l,z(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),A=require("./element-resize-detector-
|
|
1
|
+
"use strict";var E=Object.defineProperty,q=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var v=(l,e,n)=>e in l?E(l,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[e]=n,m=(l,e)=>{for(var n in e||(e={}))D.call(e,n)&&v(l,n,e[n]);if(C)for(var n of C(e))I.call(e,n)&&v(l,n,e[n]);return l},h=(l,e)=>q(l,z(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),A=require("./element-resize-detector-Cl7PwC4K.cjs"),L=require("./index-CtAaj9XN.cjs"),N=require("./EChartComponentBase-CUbabNTX.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),b=require("./ele-aqi-icon-BMm9WgFH.cjs"),S=require("./installCanvasRenderer-CyhM1Qpl.cjs"),T=require("./installMarkLine-Bv53Iw9G.cjs"),M=require("./install-DV5cEgNV.cjs"),$=require("./install-z6wShIZI.cjs"),V=require("./install-CIT6k8Ga.cjs"),j=require("./install-CltTFs4e.cjs"),k=require("./install-C8buXQPI.cjs"),P=require("./install-CYwVETsi.cjs"),U={class:"mix-body"},w=["id"],B={DEFAULT_ICON:b.DEFAULT_ICON,ACTIVE_ICON:b.ACTIVE_ICON,NAME_CN:"指数",NAME_EN:"Index Chart",ORDER:2},F={titleColor:"#111",textColor:"#111",bgColor:"#fff",lineColor:"#d64545",radiusSize:8,textSize:12,top:20,bottom:40,left:20,right:30,points:100,isSmooth:!1,isHideTitle:!1},G=[{name:"参数一",fv:"",object_id:""}],H=["name","fv","object_id","colorArea","source"],Z=["mosaic","statistics","calculate"],J=[{color:"#00ff00",value:50}],K=1,Q={useAlias:!1,null:{type:"0",value:""},multiObject:!1,source:"mosaic",rate:{checked:!1,value:1}},W={DEFAULT:B,OPTIONS:F,DATA:G,PARAMS:H,SOURCE:Z,COLOR_AREA:J,ITEMS:K,COMMON:Q},X=a.defineComponent(h(m({},W),{__name:"aqi",props:{conf:{type:Object,default:()=>({data:[],area:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(l){S.use([T.install,M.install,$.install,V.install,j.install,S.install,k.install,S.install$1,P.install]);const e=l;class n extends N.EChartComponentBase{extractStyles(){return h(m({},super.extractStyles()),{lineColor:this.getOptionValue("lineColor","#d64545"),isSmooth:this.getOptionValue("isSmooth",!1)})}getChartOption(){var s;const t=this.Style.value,{conf:r}=this.props;return r.area=r.area||[{color:"#00ff00",value:50}],{tooltip:{trigger:"axis",textStyle:{fontSize:t.textSize}},legend:{show:!0,data:[((s=r==null?void 0:r.data[0])==null?void 0:s.name)||""],right:20,top:0,textStyle:{color:t.textColor,fontSize:t.textSize}},grid:{top:t.top,bottom:t.bottom,left:t.left,right:t.right,containLabel:!0},dataZoom:[{type:"slider",start:80,end:100,height:20,bottom:15,left:60,right:60,textStyle:{color:t.textColor},labelFormatter:(i,o)=>o.includes(" ")?o.replace(" ",`
|
|
2
2
|
`):o},{type:"inside",start:0,end:20}],visualMap:{show:!1,pieces:this.getPieces(),outOfRange:{color:"#999"}},xAxis:[{type:"category",boundaryGap:!1,data:this.getTimeAxis(),axisLabel:{formatter:i=>i.includes(" ")?i.replace(" ",`
|
|
3
3
|
`):i,color:t.textColor,fontSize:t.textSize},axisLine:{lineStyle:{color:t.textColor}}}],yAxis:{type:"value",boundaryGap:[0,"20%"],splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:t.textColor,fontSize:t.textSize},axisLine:{lineStyle:{color:t.textColor}}},series:this.formatSeries()}}getPieces(){const{area:t}=this.props.conf;if(!(t!=null&&t.length))return[];const r=[...t].filter(s=>s.value!=null).sort((s,i)=>s.value-i.value);return r.map((s,i)=>({gt:i===0?0:r[i-1].value,lte:s.value,color:s.color}))}formatSeries(){var o;const t=this.Style.value,{data:r,area:s}=this.props.conf,i=(s||[]).filter(c=>c.value!=null).sort((c,u)=>c.value-u.value);return[{name:((o=r[0])==null?void 0:o.name)||"",type:"line",smooth:t.isSmooth,sampling:"average",markLine:{silent:!1,lineStyle:{color:t.lineColor},label:{color:t.textColor},data:i.map(c=>({yAxis:c.value}))},data:A.getRandomArr({num:t.points,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()})}]}setSocketData(t){if(!this.hasData()||!this.chartObj||!t)return;const{data:r,common:s}=this.props.conf,i=s.source||"mosaic",o=this.chartObj.getOption();r.forEach((u,d)=>{const f=this.extractDataValue(t,u.fv),g=["statistics","calculate"].includes(i)?t.start_time:t.datetime;g!=null&&(d===0&&o.xAxis[0].data.push(g),o.series[d].data.push(f))});const c=A.addRealtimeData(o.xAxis[0].data,o.series.map(u=>u.data));o.xAxis[0].data=c.times.slice(-this.Style.value.points),o.series.forEach((u,d)=>{var f;u.data=((f=c.data[d])==null?void 0:f.slice(-this.Style.value.points))||[]}),this.updateChart(o)}}const p=new n(e,"aqi");p.setupLifecycle();const y=p.getStyle(),_=p.getEchartId(),O=a.computed(()=>R.generateTitleStyle(e.conf.options));return(x,t)=>(a.openBlock(),a.createElementBlock("div",{class:"mix-component",style:a.normalizeStyle({background:a.unref(y).bgColor,borderRadius:`${a.unref(y).radiusSize}px`})},[a.createElementVNode("div",{class:"mix-title",style:a.normalizeStyle(O.value)},a.toDisplayString(l.conf.caption||l.conf.name),5),a.createElementVNode("div",U,[a.createElementVNode("div",{class:"w-full h-full",id:a.unref(_)},null,8,w)]),a.renderSlot(x.$slots,"default",{},void 0,!0)],4))}})),Y=L._export_sfc(X,[["__scopeId","data-v-9f578f6a"]]);exports.default=Y;
|
|
@@ -11,9 +11,9 @@ var v = (a, e, l) => e in a ? O(a, e, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return a;
|
|
12
12
|
}, d = (a, e) => E(a, D(e));
|
|
13
13
|
import { defineComponent as R, computed as $, openBlock as I, createElementBlock as N, normalizeStyle as A, unref as h, createElementVNode as S, toDisplayString as T, renderSlot as M } from "vue";
|
|
14
|
-
import { a as j, c as k } from "./element-resize-detector-
|
|
15
|
-
import { _ as q } from "./index-
|
|
16
|
-
import { E as V } from "./EChartComponentBase-
|
|
14
|
+
import { a as j, c as k } from "./element-resize-detector-CoRhuer9.js";
|
|
15
|
+
import { _ as q } from "./index-yidMosRJ.js";
|
|
16
|
+
import { E as V } from "./EChartComponentBase-BjiCJlIa.js";
|
|
17
17
|
import { g as w } from "./titleStyle-BT5GlpAb.js";
|
|
18
18
|
import { A as P, D as U } from "./ele-aqi-icon-DsYfU5th.js";
|
|
19
19
|
import { u as B, i as F, a as G } from "./installCanvasRenderer-CLT2hquJ.js";
|
|
@@ -11,7 +11,7 @@ var w = (c, i, s) => i in c ? B(c, i, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return c;
|
|
12
12
|
}, T = (c, i) => H(c, P(i));
|
|
13
13
|
import { defineComponent as U, ref as X, inject as Y, computed as Z, watchEffect as j, openBlock as J, createElementBlock as K, normalizeStyle as $, unref as x, createElementVNode as _, toDisplayString as Q, renderSlot as W, nextTick as tt } from "vue";
|
|
14
|
-
import { B as et, e as ot, h as C, f as at, a as lt, u as it, p as st, j as rt } from "./element-resize-detector-
|
|
14
|
+
import { B as et, e as ot, h as C, f as at, a as lt, u as it, p as st, j as rt } from "./element-resize-detector-CoRhuer9.js";
|
|
15
15
|
import { g as nt } from "./titleStyle-BT5GlpAb.js";
|
|
16
16
|
import { A as ut, D as ct } from "./ele-aqi-icon-DsYfU5th.js";
|
|
17
17
|
import { i as dt } from "./installMarkLine-BgE0YACE.js";
|
|
@@ -23,7 +23,7 @@ import { i as St } from "./install-CBde4hAM.js";
|
|
|
23
23
|
import { i as yt } from "./install-hfre7yvV.js";
|
|
24
24
|
import { i as xt } from "./install-BBrAry2m.js";
|
|
25
25
|
import { i as Ct, d as _t } from "./echarts-BVht3HHb.js";
|
|
26
|
-
import { _ as At } from "./index-
|
|
26
|
+
import { _ as At } from "./index-yidMosRJ.js";
|
|
27
27
|
const bt = {
|
|
28
28
|
DEFAULT_ICON: ct,
|
|
29
29
|
ACTIVE_ICON: ut,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var P=Object.defineProperty,B=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var z=(d,r,s)=>r in d?P(d,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):d[r]=s,I=(d,r)=>{for(var s in r||(r={}))U.call(r,s)&&z(d,s,r[s]);if(E)for(var s of E(r))G.call(r,s)&&z(d,s,r[s]);return d},T=(d,r)=>B(d,F(r));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),p=require("./element-resize-detector-
|
|
1
|
+
"use strict";var P=Object.defineProperty,B=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var z=(d,r,s)=>r in d?P(d,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):d[r]=s,I=(d,r)=>{for(var s in r||(r={}))U.call(r,s)&&z(d,s,r[s]);if(E)for(var s of E(r))G.call(r,s)&&z(d,s,r[s]);return d},T=(d,r)=>B(d,F(r));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),p=require("./element-resize-detector-Cl7PwC4K.cjs"),X=require("./titleStyle-NSnz6cUg.cjs"),N=require("./ele-aqi-icon-BMm9WgFH.cjs"),Y=require("./installMarkLine-Bv53Iw9G.cjs"),Z=require("./install-z6wShIZI.cjs"),j=require("./install-CIT6k8Ga.cjs"),J=require("./install-CYwVETsi.cjs"),_=require("./installCanvasRenderer-CyhM1Qpl.cjs"),K=require("./install-DV5cEgNV.cjs"),Q=require("./install-CltTFs4e.cjs"),W=require("./install-C8buXQPI.cjs"),w=require("./echarts-BB8O2KSA.cjs"),ee=require("./index-CtAaj9XN.cjs"),te={DEFAULT_ICON:N.DEFAULT_ICON,ACTIVE_ICON:N.ACTIVE_ICON,NAME_CN:"分级曲线",NAME_EN:"Grading Curve",ORDER:2},oe={titleColor:"#111",bgColor:"#fff",textColor:"#111",lineColor:"#d64545",radiusSize:8,textSize:12,top:20,bottom:40,left:20,right:30,points:100,isSmooth:!1,isHideTitle:!1},V=[{name:"参数一",项目编号:"",object_id:""}],le=["name","项目编号","object_id","colorArea"],ae=["index","deviation","stability","balance","increment","risk"],ie=[{color:"#00ff00",value:50}],re=1,se={useAlias:!1,null:{type:"0",value:""},source:"index"},ne={DEFAULT:te,OPTIONS:oe,DATA:V,PARAMS:le,SOURCE:ae,COLOR_AREA:ie,ITEMS:re,COMMON:se},ue=t.defineComponent(T(I({},ne),{__name:"aqiIndass",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(d){_.use([Y.install,K.install,Z.install,j.install,Q.install,_.install,W.install,_.install$1,J.install]);const r=t.ref(t.inject("session",null)),s="aqi_"+Math.random().toString(16).substring(4,12);let o=null,y=null;const l=d;class L extends p.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),lineColor:this.getOptionValue("lineColor","#d64545"),radiusSize:this.getOptionValue("radiusSize",4),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),points:this.getOptionValue("points",100)}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:V,t.nextTick(()=>{let n=document.querySelector("#"+s);n&&(o||(o=w.init(n),y=p.elementResizeDetectorMaker({strategy:"scroll"}),y.listenTo(n,()=>o==null?void 0:o.resize())),o.setOption(k(),!0))})}onPreview(){D.preview()}cleanup(){y&&y.uninstall(document.querySelector("#"+s)),o&&o.clear(),o&&w.dispose(o),o=null,D.unregister()}}const A=new L(l,"aqiIndass");A.setupLifecycle();const i=A.getStyle(),R=t.computed(()=>X.generateTitleStyle(l.conf.options)),k=()=>{var a,u,m,c,v,S,h,O;const{conf:e}=l,n=p.hasDataSource(e);var f={tooltip:{trigger:"axis"},legend:{show:!0,data:[(e==null?void 0:e.data[0].name)||""],right:20,top:0,textStyle:{color:i.value.textColor,fontSize:i.value.textSize},itemStyle:{color:i.value.lineColor},lineStyle:{color:i.value.lineColor}},grid:{top:((u=(a=e==null?void 0:e.options)==null?void 0:a.top)==null?void 0:u.value)||30,bottom:((c=(m=e==null?void 0:e.options)==null?void 0:m.bottom)==null?void 0:c.value)||20,left:((S=(v=e==null?void 0:e.options)==null?void 0:v.left)==null?void 0:S.value)||40,right:((O=(h=e==null?void 0:e.options)==null?void 0:h.right)==null?void 0:O.value)||20,containLabel:!0},dataZoom:[{type:"slider",start:80,end:100,height:20,bottom:15,left:60,right:60,handleStyle:{color:"#fff",shadowBlur:2,shadowOffsetX:2,shadowOffsetY:2},textStyle:{color:i.value.textColor},borderStyle:{color:"#000"},throttle:200,labelFormatter:function(x,C){if(!/^[1-9]\d{3}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(C))return C;let g=C.split(" ");return g[0]+`
|
|
2
2
|
`+g[1]}},{type:"inside",start:0,end:20}],visualMap:{show:!1,pieces:M(),outOfRange:{color:"#999"}},xAxis:[{type:"category",boundaryGap:!1,data:p.getxAxisDataTime(i.value.points,l.mode,n),axisLabel:{formatter:function(x,C){if(!/^[1-9]\d{3}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(x))return x;let g=x.split(" ");return g[0]+`
|
|
3
3
|
`+g[1]},color:i.value.textColor,fontSize:i.value.textSize}}],yAxis:{type:"value",boundaryGap:[0,"20%"],splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{formatter:"{value}",color:i.value.textColor,fontSize:i.value.textSize},axisLine:{lineStyle:{color:i.value.textColor}},splitNumber:4},series:$()};return f},M=()=>{const{area:e}=l.conf;let n=e.filter(a=>a.value!==null&&a.value!==void 0);n.sort((a,u)=>a.value-u.value);let f=[];return n.forEach((a,u)=>{u===0?f.push({gt:0,lte:a.value,color:a.color}):f.push({gt:n[u-1].value,lte:a.value,color:a.color})}),f},$=()=>{var m;const{options:e,data:n,area:f}=l.conf,a=p.hasDataSource(l.conf),u=f.filter(c=>c.value!==null&&c.value!==void 0);return u.sort((c,v)=>c.value-v.value),[{name:n[0].name||"",type:"line",smooth:(m=e==null?void 0:e.isSmooth)==null?void 0:m.value,sampling:"average",markLine:{silent:!1,lineStyle:{color:i.value.lineColor},label:{color:i.value.textColor},data:u.map(c=>({yAxis:c.value}))},data:p.getRandomArr({num:i.value.points,max:200,min:0,mode:l.mode,hasDataSource:a})}]},H=e=>{if(!p.hasDataSource(l.conf))return;const{data:n}=l.conf;let f=p.handleNullData(e,l,"history"),a=[],u=[];if(!f.history.length)return;f.history.forEach((c,v)=>{u.push([]),u[v]=c.map(S=>{var h;return(h=S[n[v].fv])!=null?h:"--"}),a[v]=c.map(S=>S.time)});let m=o==null?void 0:o.getOption();m&&(m.xAxis[0].data=a[0],m.series.forEach((c,v)=>{c.data=u[v]}),o==null||o.setOption(m))},q=e=>{p.hasDataSource(l.conf)},D={preview:()=>p.preview(l,r.value,H,q,"aqiIndass"),unregister:()=>p.unregister(l,r.value)};t.watchEffect(()=>{l.conf.socketData&&q(l.conf.socketData)});const b=l.conf;return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"mix-component",style:t.normalizeStyle({background:t.unref(i).bgColor,borderRadius:`${t.unref(i).radiusSize}px`})},[t.createElementVNode("div",{class:"mix-title",style:t.normalizeStyle(R.value)},t.toDisplayString(t.unref(b).caption||t.unref(b).name),5),t.createElementVNode("div",{class:"mix-body"},[t.createElementVNode("div",{class:"w-full h-full",id:s})]),t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}})),ce=ee._export_sfc(ue,[["__scopeId","data-v-72d20e76"]]);exports.default=ce;
|
|
@@ -11,8 +11,8 @@ var g = (o, t, e) => t in o ? E(o, t, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return o;
|
|
12
12
|
}, _ = (o, t) => T(o, N(t));
|
|
13
13
|
import { defineComponent as R, computed as D, openBlock as p, createElementBlock as d, normalizeStyle as f, unref as i, createElementVNode as x, toDisplayString as O, Fragment as I, renderList as j, normalizeClass as k, renderSlot as B } from "vue";
|
|
14
|
-
import { B as L } from "./element-resize-detector-
|
|
15
|
-
import { _ as F } from "./index-
|
|
14
|
+
import { B as L } from "./element-resize-detector-CoRhuer9.js";
|
|
15
|
+
import { _ as F } from "./index-yidMosRJ.js";
|
|
16
16
|
import { g as H } from "./titleStyle-BT5GlpAb.js";
|
|
17
17
|
import { A as U, D as $ } from "./ele-arrayCard-icon-CAk9ojr4.js";
|
|
18
18
|
const w = { class: "mix-body" }, P = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty,E=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var S=(r,t,o)=>t in r?A(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o,y=(r,t)=>{for(var o in t||(t={}))z.call(t,o)&&S(r,o,t[o]);if(m)for(var o of m(t))T.call(t,o)&&S(r,o,t[o]);return r},C=(r,t)=>E(r,b(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./element-resize-detector-
|
|
1
|
+
"use strict";var A=Object.defineProperty,E=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var S=(r,t,o)=>t in r?A(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o,y=(r,t)=>{for(var o in t||(t={}))z.call(t,o)&&S(r,o,t[o]);if(m)for(var o of m(t))T.call(t,o)&&S(r,o,t[o]);return r},C=(r,t)=>E(r,b(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./element-resize-detector-Cl7PwC4K.cjs"),N=require("./index-CtAaj9XN.cjs"),I=require("./titleStyle-NSnz6cUg.cjs"),g=require("./ele-arrayCard-icon-QOabvV0y.cjs"),M={class:"mix-body"},V={DEFAULT_ICON:g.DEFAULT_ICON,ACTIVE_ICON:g.ACTIVE_ICON,NAME_CN:"统计",NAME_EN:"Array Card",ORDER:5},k={titleColor:"#111",bgColor:"#fff",textColor:"#111",textSize:48,radiusSize:8,isHideTitle:!0},_=[{fv:"",object_id:""}],D=["fv","object_id"],R=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],B=1,j={useAlias:!1,source:"mosaic",multiObject:!1,hideMultiObject:!0},q={DEFAULT:V,OPTIONS:k,DATA:_,PARAMS:D,SOURCE:R,ITEMS:B,COMMON:j},L=e.defineComponent(C(y({},q),{__name:"arrayCard",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){const t=r;class o extends v.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),textSize:this.getOptionValue("textSize",48),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!0)}}init(){var l;this.Style.value=this.extractStyles(),this.applyTheme(),(l=this.props.conf.data)!=null&&l.length||(this.props.conf.data=_)}}const d=new o(t,"arrayCard");d.setupLifecycle();const n=d.getStyle(),u=t.conf,h=e.computed(()=>I.generateTitleStyle(t.conf.options)),O=i=>{var p;const l=((p=i==null?void 0:i[0])==null?void 0:p.value)||0,s=String(Math.floor(Number(l)||0)),a=[];let c=0;for(;c<s.length;)a.push(s.slice(c,c+3)),c+=3;return a.flatMap((f,x)=>x>0?[",",f]:[f])};return(i,l)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(n).bgColor,borderRadius:`${e.unref(n).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(h.value)},e.toDisplayString(e.unref(u).caption||e.unref(u).name),5),e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O(e.unref(u).data),(s,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:e.normalizeClass(["digit-item",{separator:s==","}]),style:e.normalizeStyle({fontSize:`${e.unref(n).textSize}px`,color:e.unref(n).textColor})},e.toDisplayString(s),7))),128))]),e.renderSlot(i.$slots,"default",{},void 0,!0)],4))}})),F=N._export_sfc(L,[["__scopeId","data-v-ace26503"]]);exports.default=F;
|
|
@@ -27,12 +27,12 @@ var B = (s, n, o) => new Promise((b, w) => {
|
|
|
27
27
|
p((o = o.apply(s, n)).next());
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as Q, ref as C, getCurrentInstance as X, computed as Y, onMounted as ee, onBeforeUnmount as te, openBlock as u, createElementBlock as d, normalizeStyle as oe, unref as S, createElementVNode as l, normalizeClass as ae, toDisplayString as x, createCommentVNode as m, withDirectives as le, withKeys as se, vModelText as ne, renderSlot as re } from "vue";
|
|
30
|
-
import { B as ie } from "./element-resize-detector-
|
|
31
|
-
import { f as ue, g as de, _ as ce } from "./index-
|
|
32
|
-
import { a as pe } from "./api-
|
|
30
|
+
import { B as ie } from "./element-resize-detector-CoRhuer9.js";
|
|
31
|
+
import { f as ue, g as de, _ as ce } from "./index-yidMosRJ.js";
|
|
32
|
+
import { a as pe } from "./api-CcAArQi7.js";
|
|
33
33
|
import { F as me } from "./config-BrMFHyZe.js";
|
|
34
34
|
import { ElMessage as g } from "element-plus";
|
|
35
|
-
import { u as fe } from "./store-
|
|
35
|
+
import { u as fe } from "./store-CHqnWEik.js";
|
|
36
36
|
import { A as ve, D as ye } from "./ele-vdo-icon-DcWebTR5.js";
|
|
37
37
|
const he = { class: "mix-body" }, ge = { class: "upload-content" }, Ae = { class: "upload-title" }, Ce = {
|
|
38
38
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var $=Object.defineProperty,H=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var T=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var b=(n,r,a)=>r in n?$(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a,M=(n,r)=>{for(var a in r||(r={}))j.call(r,a)&&b(n,a,r[a]);if(T)for(var a of T(r))W.call(r,a)&&b(n,a,r[a]);return n},O=(n,r)=>H(n,z(r));var x=(n,r,a)=>new Promise((C,g)=>{var p=s=>{try{u(a.next(s))}catch(E){g(E)}},i=s=>{try{u(a.throw(s))}catch(E){g(E)}},u=s=>s.done?C(s.value):Promise.resolve(s.value).then(p,i);u((a=a.apply(n,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Z=require("./element-resize-detector-
|
|
1
|
+
"use strict";var $=Object.defineProperty,H=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var T=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var b=(n,r,a)=>r in n?$(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a,M=(n,r)=>{for(var a in r||(r={}))j.call(r,a)&&b(n,a,r[a]);if(T)for(var a of T(r))W.call(r,a)&&b(n,a,r[a]);return n},O=(n,r)=>H(n,z(r));var x=(n,r,a)=>new Promise((C,g)=>{var p=s=>{try{u(a.next(s))}catch(E){g(E)}},i=s=>{try{u(a.throw(s))}catch(E){g(E)}},u=s=>s.done?C(s.value):Promise.resolve(s.value).then(p,i);u((a=a.apply(n,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Z=require("./element-resize-detector-Cl7PwC4K.cjs"),_=require("./index-CtAaj9XN.cjs"),G=require("./api-BR57NNEB.cjs"),K=require("./config-DbZfhrwE.cjs"),v=require("element-plus"),J=require("./store-DehrZfaE.cjs"),D=require("./ele-vdo-icon-Bgp9gaT6.cjs"),Q={class:"mix-body"},X={class:"upload-content"},Y={class:"upload-title"},ee={key:0,class:"upload-hint"},te={key:1,class:"upload-formats"},oe={key:1,class:"stream-input-area"},ae={class:"stream-content"},le={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},ne={key:0,class:"stream-input-container"},re=["disabled"],se={key:1,class:"stream-hint"},ie={key:2,class:"stream-hint"},ce={key:2,class:"player-container"},ue={key:0,class:"audio-controls"},de={class:"file-info"},pe={class:"file-name"},me={class:"audio-container"},fe=["src","controls","autoplay","loop","muted"],ve={DEFAULT_ICON:D.DEFAULT_ICON,ACTIVE_ICON:D.ACTIVE_ICON,NAME_CN:"音频播放器",NAME_EN:"Audio Player",ORDER:2},ye={sourceType:{value:"upload",type:"select",label:"component.audio.sourceType",options:[{label:"component.audio.uploadFile",value:"upload"},{label:"component.audio.audioStream",value:"stream"}]},autoplay:!1,loop:!1,muted:!1,controls:!0,fileUrl:{value:"",type:"string",label:"component.audio.fileUrl",placeholder:"component.audio.uploadPlaceholder"},fileName:{value:"",type:"string",label:"component.audio.fileName",placeholder:"component.audio.uploadPlaceholder"},streamUrl:{value:"",type:"string",label:"component.audio.streamUrl",placeholder:"component.audio.streamPlaceholder"}},ge=[],Ee=[],he=[],Ve=null,Ne={DEFAULT:ve,OPTIONS:ye,DATA:ge,PARAMS:Ee,SOURCE:he,COMMON:Ve},Ce=e.defineComponent(O(M({},Ne),{__name:"audio",props:{conf:{type:Object,required:!0},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const r=J.useCounterStore(),a=n;class C extends Z.BaseComponent{extractStyles(){return{radiusSize:this.getOptionValue("radiusSize",0),autoplay:this.getOptionValue("autoplay",!1),loop:this.getOptionValue("loop",!1),muted:this.getOptionValue("muted",!1),controls:this.getOptionValue("controls",!0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),I()}}const g=new C(a,"audio");g.setupLifecycle();const p=g.getStyle(),i=e.ref(""),u=e.ref(""),s=e.ref(null),E=e.ref(null),w=e.ref(!1),m=e.ref(""),y=e.getCurrentInstance(),V=e.computed(()=>{var o,t,l;return((l=(t=(o=a.conf)==null?void 0:o.options)==null?void 0:t.sourceType)==null?void 0:l.value)||"upload"}),I=()=>{var o,t,l,c,d,f,N;V.value==="upload"&&((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,u.value=((c=a.conf.options.fileName)==null?void 0:c.value)||""),V.value==="stream"&&((N=(f=(d=a.conf)==null?void 0:d.options)==null?void 0:f.streamUrl)!=null&&N.value)&&(m.value=a.conf.options.streamUrl.value,k())},R=()=>{var o;(o=s.value)==null||o.click()},S=o=>x(null,null,function*(){var c,d;const t=o.target.files[0];if(!t)return;if(!t.type.startsWith("audio/")){v.ElMessage.warning("请选择有效的音频文件");return}const l=URL.createObjectURL(t);i.value=l,u.value=t.name;try{w.value=!0;const f=yield _.fileToDataUrl(t),N=_.getFileExtension(t.name),h=yield G.api.post("upload",{dashboard_uid:r.pageData.id,file_data:f,file_type:N,user_id:((c=r.session.userInfo)==null?void 0:c.id)||""},!0);if(h.code===200&&((d=h.result)!=null&&d.relative_path)){const L=K.FILE_URL+h.result.relative_path;URL.revokeObjectURL(l),i.value=L,A("fileUrl",L),A("fileName",h.result.file_name||t.name),v.ElMessage.success("音频上传成功")}else throw new Error(h.msg||"上传失败")}catch(f){console.error("音频上传失败:",f),v.ElMessage.error("音频上传失败: "+(f.message||"未知错误"))}finally{w.value=!1,s.value&&(s.value.value="")}}),k=()=>{if(!m.value.trim()){v.ElMessage.warning("请输入音频流地址");return}const o=m.value.trim();A("streamUrl",o),i.value=o,u.value="音频流",v.ElMessage.success("音频流连接成功")},A=(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)},U=o=>{o.preventDefault(),o.stopPropagation()},B=o=>{var l;o.preventDefault(),o.stopPropagation();const t=(l=o.dataTransfer)==null?void 0:l.files;if(t&&t.length>0){const c=t[0];if(c!=null&&c.type.startsWith("audio/")){const d=new DataTransfer;d.items.add(c),s.value&&(s.value.files=d.files,S({target:s.value}))}else v.ElMessage.warning("请选择有效的音频文件")}},P=()=>{i.value="",u.value="",m.value=""},q=()=>{console.log("Audio metadata loaded")},F=o=>{console.error("Audio error:",o),v.ElMessage.error("音频加载失败,请检查URL或文件")};return e.onMounted(()=>{var o,t;if(a.mode!=="preview"){const l=(t=(o=y==null?void 0:y.proxy)==null?void 0:o.$el)==null?void 0:t.querySelector(".upload-area");l&&(l.addEventListener("dragover",U),l.addEventListener("drop",B))}}),e.onBeforeUnmount(()=>{var t,l;const o=(l=(t=y==null?void 0:y.proxy)==null?void 0:t.$el)==null?void 0:l.querySelector(".upload-area");o&&(o.removeEventListener("dragover",U),o.removeEventListener("drop",B))}),(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({borderRadius:`${e.unref(p).radiusSize}px`})},[e.createElementVNode("div",Q,[!i.value&&V.value==="upload"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["upload-area",{"preview-mode":n.mode==="preview"}]),onClick:t[0]||(t[0]=l=>n.mode!=="preview"&&R())},[e.createElementVNode("input",{ref_key:"fileInputRef",ref:s,type:"file",accept:"audio/*",onChange:S,style:{display:"none"}},null,544),e.createElementVNode("div",X,[t[3]||(t[3]=e.createElementVNode("div",{class:"upload-icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"32",height:"32",fill:"currentColor"},[e.createElementVNode("path",{d:"M12,3V13.55C11.41,13.21 10.73,13 10,13A3,3 0 0,0 7,16A3,3 0 0,0 10,19A3,3 0 0,0 13,16V7H18V5H12V3Z"})])],-1)),e.createElementVNode("h3",Y,e.toDisplayString(n.mode==="preview"?o.$t("component.audio.noFile"):o.$t("component.audio.uploadText")),1),n.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",ee,e.toDisplayString(o.$t("component.audio.uploadHint")),1)):e.createCommentVNode("",!0),n.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",te,[...t[2]||(t[2]=[e.createElementVNode("span",{class:"format-tag"},"MP3",-1),e.createElementVNode("span",{class:"format-tag"},"WAV",-1),e.createElementVNode("span",{class:"format-tag"},"OGG",-1),e.createElementVNode("span",{class:"format-tag"},"AAC",-1)])])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),!i.value&&V.value==="stream"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[(e.openBlock(),e.createElementBlock("svg",le,[...t[4]||(t[4]=[e.createElementVNode("path",{d:"M12,2A3,3 0 0,1 15,5V11A3,3 0 0,1 12,14A3,3 0 0,1 9,11V5A3,3 0 0,1 12,2M19,11C19,14.53 16.39,17.44 13,17.93V21H11V17.93C7.61,17.44 5,14.53 5,11H7A5,5 0 0,0 12,16A5,5 0 0,0 17,11H19Z"},null,-1)])])),t[5]||(t[5]=e.createElementVNode("p",{class:"stream-text"},"音频流播放",-1)),n.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",ne,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>m.value=l),type:"text",class:"stream-url-input",placeholder:"请输入音频流地址,如:http://xxx/radio/stream.mp3",onKeyup:e.withKeys(k,["enter"])},null,544),[[e.vModelText,m.value]]),e.createElementVNode("button",{class:"connect-btn",onClick:k,disabled:!m.value.trim()}," 连接 ",8,re)])):e.createCommentVNode("",!0),n.mode!=="preview"?(e.openBlock(),e.createElementBlock("p",se,"支持格式: HTTP音频流")):e.createCommentVNode("",!0),n.mode==="preview"?(e.openBlock(),e.createElementBlock("p",ie,"未配置音频流地址")):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",ce,[n.mode!=="preview"?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",de,[e.createElementVNode("span",pe,e.toDisplayString(u.value||i.value),1),e.createElementVNode("button",{class:"change-file-btn",onClick:P,title:"更换文件"},[...t[6]||(t[6]=[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",me,[e.createElementVNode("audio",{ref_key:"audioRef",ref:E,src:i.value,controls:e.unref(p).controls,autoplay:e.unref(p).autoplay,loop:e.unref(p).loop,muted:e.unref(p).muted,onLoadedmetadata:q,onError:F,class:"audio-element"}," 您的浏览器不支持音频播放 ",40,fe)])])):e.createCommentVNode("",!0)]),e.renderSlot(o.$slots,"default",{},void 0,!0)],4))}})),ke=_._export_sfc(Ce,[["__scopeId","data-v-050c7953"]]);exports.default=ke;
|
|
@@ -11,11 +11,11 @@ var E = (r, o, l) => o in r ? z(r, o, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return r;
|
|
12
12
|
}, y = (r, o) => I(r, T(o));
|
|
13
13
|
import { defineComponent as $, onMounted as j, onUnmounted as V, computed as B, openBlock as M, createElementBlock as W, normalizeStyle as U, unref as S, createElementVNode as C, toDisplayString as X, renderSlot as P } from "vue";
|
|
14
|
-
import { g as F, C as G, a as H, b as K, c as q } from "./element-resize-detector-
|
|
15
|
-
import { u as J, _ as Q } from "./index-
|
|
16
|
-
import { E as Y } from "./EChartComponentBase-
|
|
14
|
+
import { g as F, C as G, a as H, b as K, c as q } from "./element-resize-detector-CoRhuer9.js";
|
|
15
|
+
import { u as J, _ as Q } from "./index-yidMosRJ.js";
|
|
16
|
+
import { E as Y } from "./EChartComponentBase-BjiCJlIa.js";
|
|
17
17
|
import { g as Z } from "./titleStyle-BT5GlpAb.js";
|
|
18
|
-
import { u as tt } from "./store-
|
|
18
|
+
import { u as tt } from "./store-CHqnWEik.js";
|
|
19
19
|
import { A as et, D as ot } from "./ele-bar-icon-C-GiCs2a.js";
|
|
20
20
|
import { i as at } from "./install-CBde4hAM.js";
|
|
21
21
|
import { i as st } from "./install-hfre7yvV.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var k=Object.defineProperty,q=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var U=(c,o,r)=>o in c?k(c,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[o]=r,g=(c,o)=>{for(var r in o||(o={}))$.call(o,r)&&U(c,r,o[r]);if(D)for(var r of D(o))w.call(o,r)&&U(c,r,o[r]);return c},C=(c,o)=>q(c,R(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),b=require("./element-resize-detector-
|
|
1
|
+
"use strict";var k=Object.defineProperty,q=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var U=(c,o,r)=>o in c?k(c,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[o]=r,g=(c,o)=>{for(var r in o||(o={}))$.call(o,r)&&U(c,r,o[r]);if(D)for(var r of D(o))w.call(o,r)&&U(c,r,o[r]);return c},C=(c,o)=>q(c,R(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),b=require("./element-resize-detector-Cl7PwC4K.cjs"),N=require("./index-CtAaj9XN.cjs"),V=require("./EChartComponentBase-CUbabNTX.cjs"),j=require("./titleStyle-NSnz6cUg.cjs"),B=require("./store-DehrZfaE.cjs"),L=require("./ele-bar-icon-V94clxg_.cjs"),M=require("./install-DV5cEgNV.cjs"),W=require("./install-CltTFs4e.cjs"),_=require("./installCanvasRenderer-CyhM1Qpl.cjs"),P=require("./install-C8buXQPI.cjs"),X=require("./install-Ch5d8i37.cjs"),F={class:"mix-body"},G=["id"],H={DEFAULT_ICON:L.DEFAULT_ICON,ACTIVE_ICON:L.ACTIVE_ICON,NAME_CN:"基础柱状图",NAME_EN:"Bar Chart",ORDER:1},K={titleColor:"#111",textColor:"#111",bgColor:"#fff",top:30,bottom:40,left:40,right:20,radiusSize:8,textSize:12,barWidth:30,points:10,isHideTitle:!1,showLabel:!1},J=[{name:"参数一",fv:"",object_id:"",color:"#4162ff"}],Q=["name","fv","object_id","color"],Y=["mosaic","statistics","calculate"],Z={source:"mosaic",useAlias:!1,multiObject:!1,null:{type:"0",value:""}},tt={DEFAULT:H,OPTIONS:K,DATA:J,PARAMS:Q,SOURCE:Y,COMMON:Z},et=s.defineComponent(C(g({},tt),{__name:"bar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(c){_.use([M.install,W.install,_.install,P.install,_.install$1,X.install]);const o=c,r=N.useLinkStore();class I extends V.EChartComponentBase{extractStyles(){return C(g({},super.extractStyles()),{barWidth:this.getOptionValue("barWidth",30),showLabel:this.getOptionValue("showLabel",!1)})}getChartOption(){const t=this.Style.value,i=this.props.conf;return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},textStyle:{align:"left",fontSize:t.textSize}},grid:{top:t.top,bottom:t.bottom,left:t.left,right:t.right,containLabel:!1},legend:{show:!0,data:i.data.map(a=>a.name),right:20,top:0,textStyle:{color:t.textColor,fontSize:t.textSize}},xAxis:[{type:"category",data:this.getXAxisData(),axisTick:{alignWithLabel:!0},axisLine:{lineStyle:{color:t.textColor}},axisLabel:{formatter:a=>{if(!/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(a))return a;const[l,e]=a.split(" ");return`${l}
|
|
2
2
|
${e}`},color:t.textColor,fontSize:t.textSize}}],yAxis:[{type:"value",nameGap:10,nameTextStyle:{align:"right"},splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:t.textColor,fontSize:t.textSize},axisLine:{lineStyle:{color:t.textColor}},splitNumber:4}],series:this.formatSeries()}}getXAxisData(){var l,e;const{data:t,common:i}=this.props.conf,a=(i==null?void 0:i.source)||"mosaic";return["statistics","calculate"].includes(a)&&!((e=(l=t[0])==null?void 0:l.periodUnit)!=null&&e.includes("near"))?b.getBarXAxis(t[0].periodUnit):this.getTimeAxis()}formatSeries(){const t=this.props.conf,i=this.Style.value;return t.data.map((a,l)=>{const e=a.color||b.COLORS[l];return{type:"bar",data:b.getRandomArr({num:i.points,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()}),name:a.name,itemStyle:{color:e},label:{show:i.showLabel,position:"top",color:e},barWidth:i.barWidth+"%"}})}setSocketData(t){var S;if(!this.hasData()||!this.chartObj||!t)return;const{data:i,common:a}=this.props.conf,l=a.source||"mosaic",e=this.chartObj.getOption();console.log("[bar] setSocketData called",{SOURCE:l,res:t,data:i,periodUnit:(S=i[0])==null?void 0:S.periodUnit}),i.forEach((n,u)=>{let d,p;if(["statistics","calculate"].includes(l)&&n.periodUnit&&!n.periodUnit.includes("near")){console.log("[bar] 固定周期模式",{item:n,periodUnit:n.periodUnit}),d=this.extractDataValue(t,n.fv);const E=n.periodUnit.split("-");p=b.getXAxisNearTime(t.start_time,E[E.length-1]);const y=e.xAxis[0].data.indexOf(p);console.log("[bar] 固定周期数据",{value:d,time:p,index:y,xAxisData:e.xAxis[0].data}),y>=0&&(e.series[u].data[y]=d)}else["statistics","calculate"].includes(l)&&n.periodUnit&&n.periodUnit.includes("near")?(console.log("[bar] 最近周期模式"),d=this.extractDataValue(t,n.fv),p=t.start_time,p!=null&&(u===0&&e.xAxis[0].data.push(p),e.series[u].data.push(d))):(console.log("[bar] 追加模式(马赛克或默认)"),d=this.extractDataValue(t,n.fv),p=["statistics","calculate"].includes(l)?t.start_time:t.datetime,p!=null&&(u===0&&e.xAxis[0].data.push(p),e.series[u].data.push(d)))});const m=b.addRealtimeData(e.xAxis[0].data,e.series.map(n=>n.data)),x=Number(this.Style.value.points)||10;e.xAxis[0].data=m.times.slice(-x),e.series.forEach((n,u)=>{var d;n.data=((d=m.data[u])==null?void 0:d.slice(-x))||[]}),this.updateChart(e)}}const f=new I(o,"bar");f.setupLifecycle();const A=B.useCounterStore();s.onMounted(()=>{var h;if(A.registerInstance(o.uid,f),o.mode==="preview"){const t=((h=f.getChartInstance)==null?void 0:h.call(f))||f.chartObj;t==null||t.off("click"),t==null||t.on("click",i=>{var l,e,m,x,S,n;const a=i==null?void 0:i.seriesName;if(typeof a=="string"&&a){const u=((e=(l=o.conf)==null?void 0:l.options)==null?void 0:e.linkChannel)==="custom"?(x=(m=o.conf)==null?void 0:m.options)==null?void 0:x.customChannel:(n=(S=o.conf)==null?void 0:S.options)==null?void 0:n.linkChannel;r.publish(u||"bar","bar",{objectId:"",deviceId:"",type:"select",fieldKey:a,fv:g({key:a},i),source:"bar"})}})}}),s.onUnmounted(()=>{A.unregisterInstance(o.uid)});const O=f.getStyle(),z=f.getEchartId(),v=o.conf,T=s.computed(()=>j.generateTitleStyle(o.conf.options));return(h,t)=>(s.openBlock(),s.createElementBlock("div",{class:"mix-component",style:s.normalizeStyle({background:s.unref(O).bgColor,borderRadius:`${s.unref(O).radiusSize}px`})},[s.createElementVNode("div",{class:"mix-title",style:s.normalizeStyle(T.value)},s.toDisplayString(s.unref(v).caption||s.unref(v).name),5),s.createElementVNode("div",F,[s.createElementVNode("div",{class:"w-full h-full",id:s.unref(z)},null,8,G)]),s.renderSlot(h.$slots,"default",{},void 0,!0)],4))}})),ot=N._export_sfc(et,[["__scopeId","data-v-0fc03873"]]);exports.default=ot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var P=Object.defineProperty,F=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var O=(a,l,s)=>l in a?P(a,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[l]=s,w=(a,l)=>{for(var s in l||(l={}))U.call(l,s)&&O(a,s,l[s]);if(B)for(var s of B(l))Z.call(l,s)&&O(a,s,l[s]);return a},z=(a,l)=>F(a,H(l));var M=(a,l,s)=>new Promise((m,p)=>{var y=c=>{try{g(s.next(c))}catch(_){p(_)}},S=c=>{try{g(s.throw(c))}catch(_){p(_)}},g=c=>c.done?m(c.value):Promise.resolve(c.value).then(y,S);g((s=s.apply(a,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),K=require("./element-resize-detector-
|
|
1
|
+
"use strict";var P=Object.defineProperty,F=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var O=(a,l,s)=>l in a?P(a,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[l]=s,w=(a,l)=>{for(var s in l||(l={}))U.call(l,s)&&O(a,s,l[s]);if(B)for(var s of B(l))Z.call(l,s)&&O(a,s,l[s]);return a},z=(a,l)=>F(a,H(l));var M=(a,l,s)=>new Promise((m,p)=>{var y=c=>{try{g(s.next(c))}catch(_){p(_)}},S=c=>{try{g(s.throw(c))}catch(_){p(_)}},g=c=>c.done?m(c.value):Promise.resolve(c.value).then(y,S);g((s=s.apply(a,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),K=require("./element-resize-detector-Cl7PwC4K.cjs"),G=require("./index-CtAaj9XN.cjs"),J=require("./titleStyle-NSnz6cUg.cjs"),N=require("./no-image-icon-CPA7RKkF.cjs"),Q=require("@element-plus/icons-vue"),I=require("./api-BR57NNEB.cjs"),$=require("./ele-bmp-icon-BBI0-SX7.cjs"),X={class:"mix-body"},Y={key:0},ee={class:"w-[80px] h-[80px]"},te=["src"],oe={class:"bdmap-base-info"},ne={class:"flex"},se={class:"name"},le={class:"value"},ae={class:"flex"},ie={class:"name"},re={class:"value"},ce={class:"flex"},de={class:"name"},ue={class:"value"},pe={key:1,class:"w-[100%] h-[100%] p-[12px] text-[13px] text-[#999]"},me={DEFAULT_ICON:$.DEFAULT_ICON,ACTIVE_ICON:$.ACTIVE_ICON,NAME_CN:"百度地图",NAME_EN:"Baidu Map",ORDER:2},ge={titleColor:"#111",bgColor:"#fff",radiusSize:8,isHideTitle:!1,lng:113.933782,lat:22.582649,zoom:10},fe={baiduMapAk:""},ve={DEFAULT:me,OPTIONS:ge,COMMON:fe},ye=e.defineComponent(z(w({},ve),{__name:"bmp",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(a){const{proxy:l}=e.getCurrentInstance(),s="bmp_"+Math.random().toString(16).substring(4,12);let m=null,p=null;const y=a;class S extends K.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#73bff9"),titleColor:this.getOptionValue("titleColor","#111"),radiusSize:this.getOptionValue("radiusSize",4),zoom:this.getOptionValue("zoom",10),lng:this.getOptionValue("lng",113.933782),lat:this.getOptionValue("lat",22.582649),isHideTitle:this.getOptionValue("isHideTitle",!1)}}init(){var u;this.Style.value=this.extractStyles(),this.applyTheme(),i.zoom=this.Style.value.zoom,i.center.lat=this.Style.value.lat,i.center.lng=this.Style.value.lng;const t=((u=this.props.conf)==null?void 0:u.common)||{};if(i.ak=t.baiduMapAk||"",p&&m){const n=new p.Point(this.Style.value.lng,this.Style.value.lat);m.centerAndZoom(n,this.Style.value.zoom)}}}const g=new S(y,"bmp");g.setupLifecycle();const c=g.getStyle(),_=e.computed(()=>J.generateTitleStyle(y.conf.options)),i=e.reactive({zoom:10,ak:"",center:{lat:22.582649,lng:113.933782}}),f=e.ref([]),d=e.ref({}),E=e.ref(0),V=e.ref(0),h=e.ref(!1),A=({BMap:o,map:t})=>{m=t,p=o,y.mode==="preview"&&D()},D=()=>M(null,null,function*(){const{result:o}=yield I.api.post("get_object_list"),t=/^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,6})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,6}|180)$/,u=/^(\-|\+)?([0-8]?\d{1}\.\d{0,6}|90\.0{0,6}|[0-8]?\d{1}|90)$/;f.value=[];let n=!1;o.data.forEach(r=>{let k="";if(r.gis||r.gis.split(", ").length>1){const v=r.gis.split(", ");if(t.test(v[1])&&u.test(v[0])&&Number(v[1])&&Number(v[0])){const x=N.wgs84tobd09(Number(v[1]),Number(v[0]));k=x[1]+","+x[0]}else k=r.custom_gis}else k=r.custom_gis;const b=k.split(",");b.length>=2&&!n&&(i.center.lng=Number(b[1]),i.center.lat=Number(b[0]),n=!0),k.length>1&&f.value.push({center:{lng:b[1],lat:b[0]},image:r.image,address:r.address||r.province+r.city,name:r.name,uid:r.uid,desc:r.description})}),!n&&f.value[0]&&(i.center=f.value[0].center);const C=new p.Point(i.center.lng,i.center.lat);m.centerAndZoom(C,c.value.zoom)}),q=(o,t)=>{E.value=o.pixel.y+10+"px",V.value=o.pixel.x+10+"px",d.value=t,t.address||j(t),h.value=!0},T=o=>console.log(o),L=e.computed(()=>d.value.image?l.config.file_url+"/"+d.value.image:N.nullImage),j=o=>{const t=`${o.center.lat},${o.center.lng}`,u={ak:i.ak,location:t,coordtype:"bd09ll",output:"json",extensions_poi:1};I.api.getLocation("/bdMapAddress",u).then(n=>{n.status===0&&(d.value.address=n.result.formatted_address_poi||n.result.formatted_address)})},R=o=>{if(o){let t=location.href;t.indexOf("?object_id=")>-1&&(t=t.split("?object_id=")[0]),location.href=t+"?object_id="+o,location.reload()}};return(o,t)=>{const u=W.ElIcon;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(c).bgColor,borderRadius:`${e.unref(c).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(_.value)},e.toDisplayString(a.conf.caption||a.conf.name),5),e.createElementVNode("div",X,[i.ak?(e.openBlock(),e.createElementBlock("div",{key:0,class:"map-wrap",id:s},[e.createVNode(e.unref(N.BaiduMap),{class:"bm-view relative",center:i.center,"map-click":!1,zoom:i.zoom,ak:i.ak,v:"3.0",type:"API",onMovestart:t[2]||(t[2]=n=>h.value=!1),onZoomstart:t[3]||(t[3]=n=>h.value=!1),onClick:t[4]||(t[4]=n=>T("close")),"scroll-wheel-zoom":!0,onReady:A},{default:e.withCtx(()=>[f.value.length?(e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(e.unref(N.MarkerClusterer),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,n=>(e.openBlock(),e.createBlock(e.unref(N.BmMarker),{onClick:C=>q(C,n),key:n.uid,position:n.center},null,8,["onClick","position"]))),128))]),_:1})])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"index-bdmap-equipment",style:e.normalizeStyle({top:E.value,left:V.value}),onClick:t[1]||(t[1]=n=>R(d.value))},[e.createElementVNode("div",ee,[e.createElementVNode("img",{src:L.value,class:"w-[100%] h-[100%]"},null,8,te)]),e.createElementVNode("div",oe,[e.createElementVNode("div",ne,[e.createElementVNode("span",se,e.toDisplayString(o.$t("component.map.deviceNumber"))+":",1),e.createElementVNode("span",le,e.toDisplayString(d.value.uid),1)]),e.createElementVNode("div",ae,[e.createElementVNode("span",ie,e.toDisplayString(o.$t("component.map.deviceName"))+":",1),e.createElementVNode("span",re,e.toDisplayString(d.value.name),1)]),e.createElementVNode("div",ce,[e.createElementVNode("span",de,e.toDisplayString(o.$t("component.map.address"))+":",1),e.createElementVNode("span",ue,e.toDisplayString(d.value.address),1)])]),e.createVNode(u,{class:"close-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.Close),{onClick:t[0]||(t[0]=e.withModifiers(n=>h.value=!1,["stop"]))})]),_:1})],4)):e.createCommentVNode("",!0)]),_:1},8,["center","zoom","ak"])])):(e.openBlock(),e.createElementBlock("div",pe,e.toDisplayString(o.$t("component.map.apiKeyRequired")),1))]),e.renderSlot(o.$slots,"default",{},void 0,!0)],4)}}})),_e=G._export_sfc(ye,[["__scopeId","data-v-7c9a461b"]]);exports.default=_e;
|
|
@@ -30,12 +30,12 @@ import { ElIcon as te } from "element-plus/es";
|
|
|
30
30
|
import "element-plus/es/components/base/style/css";
|
|
31
31
|
import "element-plus/es/components/icon/style/css";
|
|
32
32
|
import { defineComponent as oe, getCurrentInstance as se, computed as R, reactive as ne, ref as w, openBlock as f, createElementBlock as y, normalizeStyle as $, unref as b, createElementVNode as i, toDisplayString as p, createVNode as N, withCtx as A, Fragment as ae, renderList as le, createBlock as ie, createCommentVNode as P, withModifiers as re, renderSlot as ce } from "vue";
|
|
33
|
-
import { B as de } from "./element-resize-detector-
|
|
34
|
-
import { _ as ue } from "./index-
|
|
33
|
+
import { B as de } from "./element-resize-detector-CoRhuer9.js";
|
|
34
|
+
import { _ as ue } from "./index-yidMosRJ.js";
|
|
35
35
|
import { g as pe } from "./titleStyle-BT5GlpAb.js";
|
|
36
36
|
import { n as me, B as fe, M as ge, a as ve, w as _e } from "./no-image-icon-n2ZlEjxS.js";
|
|
37
37
|
import { Close as he } from "@element-plus/icons-vue";
|
|
38
|
-
import { a as F } from "./api-
|
|
38
|
+
import { a as F } from "./api-CcAArQi7.js";
|
|
39
39
|
import { A as ye, D as be } from "./ele-bmp-icon-Pdolk1J5.js";
|
|
40
40
|
const ke = { class: "mix-body" }, Ce = { key: 0 }, Se = { class: "w-[80px] h-[80px]" }, xe = ["src"], Me = { class: "bdmap-base-info" }, we = { class: "flex" }, Ne = { class: "name" }, Oe = { class: "value" }, ze = { class: "flex" }, $e = { class: "name" }, Ae = { class: "value" }, Be = { class: "flex" }, Ee = { class: "name" }, Ie = { class: "value" }, Ve = {
|
|
41
41
|
key: 1,
|
|
@@ -35,8 +35,8 @@ import "element-plus/es/components/button/style/css";
|
|
|
35
35
|
import "element-plus/es/components/icon/style/css";
|
|
36
36
|
import { defineComponent as he, shallowRef as ve, ref as k, onMounted as ge, computed as fe, watch as ye, openBlock as d, createElementBlock as m, normalizeStyle as j, Fragment as D, renderList as A, withModifiers as I, normalizeClass as H, createBlock as q, resolveDynamicComponent as Ce, createVNode as x, withCtx as S, unref as G, createElementVNode as O, toDisplayString as Q, createCommentVNode as X, renderSlot as xe } from "vue";
|
|
37
37
|
import { Plus as be, Close as we } from "@element-plus/icons-vue";
|
|
38
|
-
import { B as _e } from "./element-resize-detector-
|
|
39
|
-
import { i as F, _ as ke } from "./index-
|
|
38
|
+
import { B as _e } from "./element-resize-detector-CoRhuer9.js";
|
|
39
|
+
import { i as F, _ as ke } from "./index-yidMosRJ.js";
|
|
40
40
|
const Se = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Oe = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon-active'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", $e = ["onClick"], Ne = ["onClick"], Te = {
|
|
41
41
|
key: 1,
|
|
42
42
|
class: "slot-placeholder"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Z=Object.defineProperty,j=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var F=(a,n,r)=>n in a?Z(a,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[n]=r,f=(a,n)=>{for(var r in n||(n={}))G.call(n,r)&&F(a,r,n[r]);if(D)for(var r of D(n))Q.call(n,r)&&F(a,r,n[r]);return a},y=(a,n)=>j(a,H(n));var A=(a,n,r)=>new Promise((S,v)=>{var V=u=>{try{x(r.next(u))}catch(w){v(w)}},C=u=>{try{x(r.throw(u))}catch(w){v(w)}},x=u=>u.done?S(u.value):Promise.resolve(u.value).then(V,C);x((r=r.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/collapse/style/css");require("element-plus/es/components/collapse-item/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),I=require("@element-plus/icons-vue"),X=require("./element-resize-detector-DYs3pJPp.cjs"),B=require("./index-ZwyqrmaH.cjs"),Y="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",K="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon-active'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ee=["onClick"],te=["onClick"],oe={key:1,class:"slot-placeholder"},ne={key:2,class:"slot-actions"},le={class:"component-selector"},ae={class:"component-grid"},re=["onClick"],ie={class:"comp-icon"},ce=["src","alt"],se={class:"comp-name"},de={DEFAULT_ICON:Y,ACTIVE_ICON:K,NAME_CN:"组合盒子",NAME_EN:"Box",ORDER:0},ue={layoutType:{value:"horizontal",type:"select",label:"布局方式",options:[{label:"水平排列",value:"horizontal"},{label:"垂直排列",value:"vertical"},{label:"自由布局",value:"free"},{label:"网格布局",value:"grid"}]},slotCount:{value:2,type:"number",label:"插槽数量",min:1,max:12},gridCols:{value:2,type:"number",label:"网格列数",min:1,max:6},gap:{value:8,type:"number",label:"间距(px)",min:0,max:50},padding:{value:8,type:"number",label:"内边距(px)",min:0,max:50},backgroundColor:{value:"transparent",type:"color",label:"背景色"},borderWidth:{value:0,type:"number",label:"边框宽度",min:0,max:10},borderColor:{value:"#e5e7eb",type:"color",label:"边框颜色"},borderRadius:{value:4,type:"number",label:"圆角(px)",min:0,max:50},slotsConfig:{value:"[]",type:"textarea",label:"插槽配置(JSON)",placeholder:'[{"x":0,"y":0,"w":50,"h":100},{"x":50,"y":0,"w":50,"h":100}]'}},pe=[],me=[],he=[],ge={},ve={DEFAULT:de,OPTIONS:ue,DATA:pe,PARAMS:me,SOURCE:he,COMMON:ge},fe=e.defineComponent(y(f({},ve),{__name:"box",props:{conf:{type:Object,default:()=>({data:[],options:{}})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(a){const n=a,r=e.shallowRef({}),S=e.ref({}),v=e.ref(!1),V=e.ref([]),C=e.ref(-1),x=e.ref(-1);let u={};e.onMounted(()=>A(null,null,function*(){r.value=yield B.elements.loadComponents(),S.value=yield B.elements.getElementsMap(),u=yield B.elements.getAllExposedProps()}));class w extends X.BaseComponent{extractStyles(){return{layoutType:this.getOptionValue("layoutType","horizontal"),slotCount:this.getOptionValue("slotCount",2),gridCols:this.getOptionValue("gridCols",2),gap:this.getOptionValue("gap",8),padding:this.getOptionValue("padding",8),backgroundColor:this.getOptionValue("backgroundColor","transparent"),borderWidth:this.getOptionValue("borderWidth",0),borderColor:this.getOptionValue("borderColor","#e5e7eb"),borderRadius:this.getOptionValue("borderRadius",4),slotsConfig:this.getOptionValue("slotsConfig","[]")}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),$()}}const T=new w(n,"box");T.setupLifecycle();const m=T.getStyle(),b=e.ref([]),$=()=>{var N,E,l,c,s,L,z,M;const t=((N=m.value)==null?void 0:N.slotCount)||2,o=((E=m.value)==null?void 0:E.layoutType)||"horizontal",i=((l=n.conf)==null?void 0:l.slots)||[];let h=[];try{const d=((c=m.value)==null?void 0:c.slotsConfig)||"[]";h=JSON.parse(d)}catch(d){h=[]}const k=[];for(let d=0;d<t;d++){const p=i[d],g=h[d];let O={x:0,y:0,w:100,h:100};o==="free"&&g?O={x:(s=g.x)!=null?s:0,y:(L=g.y)!=null?L:0,w:(z=g.w)!=null?z:50,h:(M=g.h)!=null?M:100}:o==="horizontal"?O={x:100/t*d,y:0,w:100/t,h:100}:o==="vertical"&&(O={x:0,y:100/t*d,w:100,h:100/t}),k.push(y(f({id:(p==null?void 0:p.id)||`slot-${Date.now()}-${d}`,name:(p==null?void 0:p.name)||(g==null?void 0:g.name)||`插槽 ${d+1}`},O),{component:(p==null?void 0:p.component)||null}))}b.value=k,n.conf&&(n.conf.slots=k)},q=e.computed(()=>{const t=m.value,o=(t==null?void 0:t.layoutType)||"horizontal",i={width:"100%",height:"100%",backgroundColor:(t==null?void 0:t.backgroundColor)||"transparent",borderWidth:`${(t==null?void 0:t.borderWidth)||0}px`,borderStyle:(t==null?void 0:t.borderWidth)>0?"solid":"none",borderColor:(t==null?void 0:t.borderColor)||"#e5e7eb",borderRadius:`${(t==null?void 0:t.borderRadius)||4}px`,padding:`${(t==null?void 0:t.padding)||8}px`,boxSizing:"border-box",overflow:"hidden"};return o==="horizontal"?y(f({},i),{display:"flex",flexDirection:"row",gap:`${(t==null?void 0:t.gap)||8}px`}):o==="vertical"?y(f({},i),{display:"flex",flexDirection:"column",gap:`${(t==null?void 0:t.gap)||8}px`}):o==="grid"?y(f({},i),{display:"grid",gridTemplateColumns:`repeat(${(t==null?void 0:t.gridCols)||2}, 1fr)`,gap:`${(t==null?void 0:t.gap)||8}px`}):y(f({},i),{position:"relative"})}),R=t=>{var i;const o=((i=m.value)==null?void 0:i.layoutType)||"horizontal";return o==="free"?{position:"absolute",left:`${t.x}%`,top:`${t.y}%`,width:`${t.w}%`,height:`${t.h}%`}:{flex:o==="horizontal"||o==="vertical"?1:void 0,minWidth:0,minHeight:0,overflow:"hidden"}},P=(t,o)=>{n.mode==="edit"&&(t.component||(C.value=o,v.value=!0))},J=(t,o)=>{var h;if(n.mode!=="edit"||!t.component)return;x.value=o;const i=new CustomEvent("box-component-selected",{bubbles:!0,detail:{component:t.component,boxId:(h=n.conf)==null?void 0:h.id,slotIndex:o}});document.dispatchEvent(i)},U=t=>{if(C.value<0)return;const o=u[t.type]||{},i={id:`box-comp-${Date.now()}`,type:t.type,i:`box-comp-${Date.now()}`,x:0,y:0,w:1,h:1,options:JSON.parse(JSON.stringify(o.OPTIONS||{})),data:JSON.parse(JSON.stringify(o.DATA||[])),common:JSON.parse(JSON.stringify(o.COMMON||{}))};b.value[C.value].component=i,n.conf&&(n.conf.slots=b.value),v.value=!1,C.value=-1},W=t=>{b.value[t].component=null,n.conf&&(n.conf.slots=b.value)};return e.watch(()=>{var t,o,i;return[(t=m.value)==null?void 0:t.slotCount,(o=m.value)==null?void 0:o.layoutType,(i=m.value)==null?void 0:i.slotsConfig]},()=>{$()},{deep:!0}),(t,o)=>{const i=_.ElIcon,h=_.ElButton,k=_.ElCollapseItem,N=_.ElCollapse,E=_.ElDialog;return e.openBlock(),e.createElementBlock("div",{class:"box-container",style:e.normalizeStyle(q.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(l,c)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:e.normalizeClass(["box-slot",{"slot-empty":!l.component,"slot-hover":a.mode==="edit"&&!l.component}]),style:e.normalizeStyle(R(l)),onClick:e.withModifiers(s=>P(l,c),["stop"])},[l.component&&r.value[l.component.type]?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["slot-component-wrapper",{"slot-component-selected":a.mode==="edit"&&x.value===c}]),onClick:e.withModifiers(s=>J(l,c),["stop"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value[l.component.type]),{conf:l.component,theme:a.theme,mode:a.mode,class:"slot-component"},null,8,["conf","theme","mode"]))],10,te)):a.mode==="edit"?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(i,{size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Plus))]),_:1}),e.createElementVNode("span",null,e.toDisplayString(l.name||`插槽 ${c+1}`),1)])):e.createCommentVNode("",!0),a.mode==="edit"&&l.component?(e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(h,{type:"danger",size:"small",circle:"",onClick:e.withModifiers(s=>W(c),["stop"])},{default:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(e.unref(I.Close))]),_:1})]),_:1},8,["onClick"])])):e.createCommentVNode("",!0)],14,ee))),128)),e.renderSlot(t.$slots,"default",{},void 0,!0),e.createVNode(E,{modelValue:v.value,"onUpdate:modelValue":o[1]||(o[1]=l=>v.value=l),title:"选择组件",width:"600px","append-to-body":!0,"close-on-click-modal":!0,"destroy-on-close":""},{default:e.withCtx(()=>[e.createElementVNode("div",le,[e.createVNode(N,{modelValue:V.value,"onUpdate:modelValue":o[0]||(o[0]=l=>V.value=l)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(l,c)=>(e.openBlock(),e.createBlock(k,{key:c,title:l.name,name:c},{default:e.withCtx(()=>[e.createElementVNode("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.data,s=>(e.openBlock(),e.createElementBlock("div",{key:s.type,class:"component-item",onClick:L=>U(s)},[e.createElementVNode("div",ie,[e.createElementVNode("img",{src:s.default_icon,alt:s.name},null,8,ce)]),e.createElementVNode("div",se,e.toDisplayString(s.name),1)],8,re))),128))])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"])],4)}}})),ye=B._export_sfc(fe,[["__scopeId","data-v-42684798"]]);exports.default=ye;
|
|
1
|
+
"use strict";var Z=Object.defineProperty,j=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var F=(a,n,r)=>n in a?Z(a,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[n]=r,f=(a,n)=>{for(var r in n||(n={}))G.call(n,r)&&F(a,r,n[r]);if(D)for(var r of D(n))Q.call(n,r)&&F(a,r,n[r]);return a},y=(a,n)=>j(a,H(n));var A=(a,n,r)=>new Promise((S,v)=>{var V=u=>{try{x(r.next(u))}catch(w){v(w)}},C=u=>{try{x(r.throw(u))}catch(w){v(w)}},x=u=>u.done?S(u.value):Promise.resolve(u.value).then(V,C);x((r=r.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/collapse/style/css");require("element-plus/es/components/collapse-item/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),I=require("@element-plus/icons-vue"),X=require("./element-resize-detector-Cl7PwC4K.cjs"),B=require("./index-CtAaj9XN.cjs"),Y="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",K="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e组合盒子%3c/title%3e%3cg%20id='box-icon-active'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(0.000000,%200.500000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3c!--%20外框%20--%3e%3cpath%20d='M14,0%20C15.1045695,0%2016,0.8954305%2016,2%20L16,14%20C16,15.1045695%2015.1045695,16%2014,16%20L2,16%20C0.8954305,16%200,15.1045695%200,14%20L0,2%20C0,0.8954305%200.8954305,0%202,0%20L14,0%20Z%20M14,1.2%20L2,1.2%20C1.55817,1.2%201.2,1.55817%201.2,2%20L1.2,14%20C1.2,14.44183%201.55817,14.8%202,14.8%20L14,14.8%20C14.44183,14.8%2014.8,14.44183%2014.8,14%20L14.8,2%20C14.8,1.55817%2014.44183,1.2%2014,1.2%20Z'/%3e%3c!--%20左侧插槽%20--%3e%3crect%20x='2.5'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c!--%20右侧插槽%20--%3e%3crect%20x='9'%20y='2.5'%20width='4.5'%20height='11'%20rx='0.5'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ee=["onClick"],te=["onClick"],oe={key:1,class:"slot-placeholder"},ne={key:2,class:"slot-actions"},le={class:"component-selector"},ae={class:"component-grid"},re=["onClick"],ie={class:"comp-icon"},ce=["src","alt"],se={class:"comp-name"},de={DEFAULT_ICON:Y,ACTIVE_ICON:K,NAME_CN:"组合盒子",NAME_EN:"Box",ORDER:0},ue={layoutType:{value:"horizontal",type:"select",label:"布局方式",options:[{label:"水平排列",value:"horizontal"},{label:"垂直排列",value:"vertical"},{label:"自由布局",value:"free"},{label:"网格布局",value:"grid"}]},slotCount:{value:2,type:"number",label:"插槽数量",min:1,max:12},gridCols:{value:2,type:"number",label:"网格列数",min:1,max:6},gap:{value:8,type:"number",label:"间距(px)",min:0,max:50},padding:{value:8,type:"number",label:"内边距(px)",min:0,max:50},backgroundColor:{value:"transparent",type:"color",label:"背景色"},borderWidth:{value:0,type:"number",label:"边框宽度",min:0,max:10},borderColor:{value:"#e5e7eb",type:"color",label:"边框颜色"},borderRadius:{value:4,type:"number",label:"圆角(px)",min:0,max:50},slotsConfig:{value:"[]",type:"textarea",label:"插槽配置(JSON)",placeholder:'[{"x":0,"y":0,"w":50,"h":100},{"x":50,"y":0,"w":50,"h":100}]'}},pe=[],me=[],he=[],ge={},ve={DEFAULT:de,OPTIONS:ue,DATA:pe,PARAMS:me,SOURCE:he,COMMON:ge},fe=e.defineComponent(y(f({},ve),{__name:"box",props:{conf:{type:Object,default:()=>({data:[],options:{}})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(a){const n=a,r=e.shallowRef({}),S=e.ref({}),v=e.ref(!1),V=e.ref([]),C=e.ref(-1),x=e.ref(-1);let u={};e.onMounted(()=>A(null,null,function*(){r.value=yield B.elements.loadComponents(),S.value=yield B.elements.getElementsMap(),u=yield B.elements.getAllExposedProps()}));class w extends X.BaseComponent{extractStyles(){return{layoutType:this.getOptionValue("layoutType","horizontal"),slotCount:this.getOptionValue("slotCount",2),gridCols:this.getOptionValue("gridCols",2),gap:this.getOptionValue("gap",8),padding:this.getOptionValue("padding",8),backgroundColor:this.getOptionValue("backgroundColor","transparent"),borderWidth:this.getOptionValue("borderWidth",0),borderColor:this.getOptionValue("borderColor","#e5e7eb"),borderRadius:this.getOptionValue("borderRadius",4),slotsConfig:this.getOptionValue("slotsConfig","[]")}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),$()}}const T=new w(n,"box");T.setupLifecycle();const m=T.getStyle(),b=e.ref([]),$=()=>{var N,E,l,c,s,L,z,M;const t=((N=m.value)==null?void 0:N.slotCount)||2,o=((E=m.value)==null?void 0:E.layoutType)||"horizontal",i=((l=n.conf)==null?void 0:l.slots)||[];let h=[];try{const d=((c=m.value)==null?void 0:c.slotsConfig)||"[]";h=JSON.parse(d)}catch(d){h=[]}const k=[];for(let d=0;d<t;d++){const p=i[d],g=h[d];let O={x:0,y:0,w:100,h:100};o==="free"&&g?O={x:(s=g.x)!=null?s:0,y:(L=g.y)!=null?L:0,w:(z=g.w)!=null?z:50,h:(M=g.h)!=null?M:100}:o==="horizontal"?O={x:100/t*d,y:0,w:100/t,h:100}:o==="vertical"&&(O={x:0,y:100/t*d,w:100,h:100/t}),k.push(y(f({id:(p==null?void 0:p.id)||`slot-${Date.now()}-${d}`,name:(p==null?void 0:p.name)||(g==null?void 0:g.name)||`插槽 ${d+1}`},O),{component:(p==null?void 0:p.component)||null}))}b.value=k,n.conf&&(n.conf.slots=k)},q=e.computed(()=>{const t=m.value,o=(t==null?void 0:t.layoutType)||"horizontal",i={width:"100%",height:"100%",backgroundColor:(t==null?void 0:t.backgroundColor)||"transparent",borderWidth:`${(t==null?void 0:t.borderWidth)||0}px`,borderStyle:(t==null?void 0:t.borderWidth)>0?"solid":"none",borderColor:(t==null?void 0:t.borderColor)||"#e5e7eb",borderRadius:`${(t==null?void 0:t.borderRadius)||4}px`,padding:`${(t==null?void 0:t.padding)||8}px`,boxSizing:"border-box",overflow:"hidden"};return o==="horizontal"?y(f({},i),{display:"flex",flexDirection:"row",gap:`${(t==null?void 0:t.gap)||8}px`}):o==="vertical"?y(f({},i),{display:"flex",flexDirection:"column",gap:`${(t==null?void 0:t.gap)||8}px`}):o==="grid"?y(f({},i),{display:"grid",gridTemplateColumns:`repeat(${(t==null?void 0:t.gridCols)||2}, 1fr)`,gap:`${(t==null?void 0:t.gap)||8}px`}):y(f({},i),{position:"relative"})}),R=t=>{var i;const o=((i=m.value)==null?void 0:i.layoutType)||"horizontal";return o==="free"?{position:"absolute",left:`${t.x}%`,top:`${t.y}%`,width:`${t.w}%`,height:`${t.h}%`}:{flex:o==="horizontal"||o==="vertical"?1:void 0,minWidth:0,minHeight:0,overflow:"hidden"}},P=(t,o)=>{n.mode==="edit"&&(t.component||(C.value=o,v.value=!0))},J=(t,o)=>{var h;if(n.mode!=="edit"||!t.component)return;x.value=o;const i=new CustomEvent("box-component-selected",{bubbles:!0,detail:{component:t.component,boxId:(h=n.conf)==null?void 0:h.id,slotIndex:o}});document.dispatchEvent(i)},U=t=>{if(C.value<0)return;const o=u[t.type]||{},i={id:`box-comp-${Date.now()}`,type:t.type,i:`box-comp-${Date.now()}`,x:0,y:0,w:1,h:1,options:JSON.parse(JSON.stringify(o.OPTIONS||{})),data:JSON.parse(JSON.stringify(o.DATA||[])),common:JSON.parse(JSON.stringify(o.COMMON||{}))};b.value[C.value].component=i,n.conf&&(n.conf.slots=b.value),v.value=!1,C.value=-1},W=t=>{b.value[t].component=null,n.conf&&(n.conf.slots=b.value)};return e.watch(()=>{var t,o,i;return[(t=m.value)==null?void 0:t.slotCount,(o=m.value)==null?void 0:o.layoutType,(i=m.value)==null?void 0:i.slotsConfig]},()=>{$()},{deep:!0}),(t,o)=>{const i=_.ElIcon,h=_.ElButton,k=_.ElCollapseItem,N=_.ElCollapse,E=_.ElDialog;return e.openBlock(),e.createElementBlock("div",{class:"box-container",style:e.normalizeStyle(q.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(l,c)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:e.normalizeClass(["box-slot",{"slot-empty":!l.component,"slot-hover":a.mode==="edit"&&!l.component}]),style:e.normalizeStyle(R(l)),onClick:e.withModifiers(s=>P(l,c),["stop"])},[l.component&&r.value[l.component.type]?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["slot-component-wrapper",{"slot-component-selected":a.mode==="edit"&&x.value===c}]),onClick:e.withModifiers(s=>J(l,c),["stop"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value[l.component.type]),{conf:l.component,theme:a.theme,mode:a.mode,class:"slot-component"},null,8,["conf","theme","mode"]))],10,te)):a.mode==="edit"?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(i,{size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(I.Plus))]),_:1}),e.createElementVNode("span",null,e.toDisplayString(l.name||`插槽 ${c+1}`),1)])):e.createCommentVNode("",!0),a.mode==="edit"&&l.component?(e.openBlock(),e.createElementBlock("div",ne,[e.createVNode(h,{type:"danger",size:"small",circle:"",onClick:e.withModifiers(s=>W(c),["stop"])},{default:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(e.unref(I.Close))]),_:1})]),_:1},8,["onClick"])])):e.createCommentVNode("",!0)],14,ee))),128)),e.renderSlot(t.$slots,"default",{},void 0,!0),e.createVNode(E,{modelValue:v.value,"onUpdate:modelValue":o[1]||(o[1]=l=>v.value=l),title:"选择组件",width:"600px","append-to-body":!0,"close-on-click-modal":!0,"destroy-on-close":""},{default:e.withCtx(()=>[e.createElementVNode("div",le,[e.createVNode(N,{modelValue:V.value,"onUpdate:modelValue":o[0]||(o[0]=l=>V.value=l)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(l,c)=>(e.openBlock(),e.createBlock(k,{key:c,title:l.name,name:c},{default:e.withCtx(()=>[e.createElementVNode("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.data,s=>(e.openBlock(),e.createElementBlock("div",{key:s.type,class:"component-item",onClick:L=>U(s)},[e.createElementVNode("div",ie,[e.createElementVNode("img",{src:s.default_icon,alt:s.name},null,8,ce)]),e.createElementVNode("div",se,e.toDisplayString(s.name),1)],8,re))),128))])]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"])],4)}}})),ye=B._export_sfc(fe,[["__scopeId","data-v-42684798"]]);exports.default=ye;
|
|
@@ -22,7 +22,7 @@ import "element-plus/es/components/checkbox/style/css";
|
|
|
22
22
|
import "element-plus/es/components/date-picker/style/css";
|
|
23
23
|
import { defineComponent as Ie, useCssVars as Ee, computed as B, ref as u, onMounted as Se, openBlock as r, createElementBlock as c, Fragment as x, renderList as U, createElementVNode as o, toDisplayString as f, normalizeClass as A, createVNode as a, withCtx as p, createTextVNode as m, unref as ae, createBlock as we, createCommentVNode as Re, renderSlot as Te } from "vue";
|
|
24
24
|
import { Delete as Ue, Upload as Ae } from "@element-plus/icons-vue";
|
|
25
|
-
import { u as Ne, e as G, _ as Oe } from "./index-
|
|
25
|
+
import { u as Ne, e as G, _ as Oe } from "./index-yidMosRJ.js";
|
|
26
26
|
import { A as Pe, D as ze } from "./ele-ctrSet-icon-BtKGrCid.js";
|
|
27
27
|
const Le = { class: "chart-config-panel" }, je = {
|
|
28
28
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var se=Object.defineProperty,re=Object.defineProperties;var ie=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var ce=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var Q=(c,a,r)=>a in c?se(c,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[a]=r,q=(c,a)=>{for(var r in a||(a={}))ce.call(a,r)&&Q(c,r,a[r]);if(G)for(var r of G(a))de.call(a,r)&&Q(c,r,a[r]);return c},R=(c,a)=>re(c,ie(a));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/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),X=require("@element-plus/icons-vue"),b=require("./index-ZwyqrmaH.cjs"),H=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),ue={class:"chart-config-panel"},pe={key:0,class:"config-section"},ve={class:"section-header"},me={class:"section-title"},fe={class:"granularity-switch"},ge={class:"quick-range"},Ve=["onClick"],Ce={class:"date-inputs"},ye={key:1,class:"config-section"},Ne={class:"section-header"},be={class:"section-title"},ke={class:"time-list-actions"},_e={class:"selected-count"},he={class:"time-list"},Ee={key:2,class:"config-section"},De={class:"section-title"},xe={key:3,class:"config-section"},Ye={class:"section-title"},Se={class:"direction-tabs"},Be=["onClick"],we={key:4,class:"config-section"},Me={class:"section-title"},Te={class:"range-inputs"},Ie={key:5,class:"config-section"},qe={class:"section-title"},Re={class:"range-inputs"},Ue={key:6,class:"config-section"},Ae={class:"section-title"},Oe={class:"function-options"},ze={key:7,class:"config-section"},Fe={DEFAULT_ICON:H.DEFAULT_ICON,ACTIVE_ICON:H.ACTIVE_ICON,NAME_CN:"图表配置面板",NAME_EN:"Chart Config Panel",ORDER:14},Le={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"}},Pe=[{type:"timeRange",label:"时间段",targetId:""},{type:"timeList",label:"采集时间列表",targetId:""},{type:"direction",label:"位移方向",targetId:""},{type:"dispSwitch",label:"累计/相对切换",targetId:""}],je=["type","label","targetId"],$e=[],Ge={useAlias:!1,multiObject:!1,source:""},Qe={DEFAULT:Fe,OPTIONS:Le,DATA:Pe,PARAMS:je,SOURCE:$e,COMMON:Ge},Xe=e.defineComponent(R(q({},Qe),{__name:"chartConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(c){e.useCssVars(l=>({v6460e860:y.value.bgColor,v15b6596e:y.value.borderColor,v2f19ff68:y.value.textColor,f7a1752a:y.value.accentColor}));const a=b.useLinkStore(),r=c,y=e.computed(()=>{var t,i,n,u,g;const{options:l}=r.conf||{};return{bindId:((t=l==null?void 0:l.bindId)==null?void 0:t.value)||"",bgColor:((i=l==null?void 0:l.bgColor)==null?void 0:i.value)||"#ffffff",textColor:((n=l==null?void 0:l.textColor)==null?void 0:n.value)||"#333333",accentColor:((u=l==null?void 0:l.accentColor)==null?void 0:u.value)||"#409eff",borderColor:((g=l==null?void 0:l.borderColor)==null?void 0:g.value)||"#e5e5e5"}}),U=e.computed(()=>{var l;return((l=r.conf)==null?void 0:l.data)||[]}),A=e.computed(()=>y.value.bindId||r.uid||""),k=e.ref("day"),O=e.ref("week"),p=e.ref(""),f=e.ref(""),J=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],_=e.ref([]),v=e.ref([]),N=e.ref(!0),Y=e.ref("relative"),S=e.ref("total"),K=[{label:"合",value:"total"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}],B=e.ref(""),w=e.ref(""),M=e.ref(""),T=e.ref(""),h=e.ref(!0),E=e.ref(!0),z=()=>({granularity:k.value,startDate:p.value,endDate:f.value,selectedTimes:v.value,chartType:Y.value,direction:S.value,dispRange:{min:parseFloat(B.value)||null,max:parseFloat(w.value)||null},relativeDispRange:{min:parseFloat(M.value)||null,max:parseFloat(T.value)||null},showDisp:h.value,showRelativeDisp:E.value}),d=()=>{const l=z(),t=U.value,i=A.value;i&&(console.log("[ConfigPanel] 广播配置 (uid):",i,l),a.publish("deepDisplacement","chartConfigPanel",{objectId:i,type:"config",fv:l})),t.forEach(n=>{const u=n.targetId;u&&(n.type==="dispSwitch"?u.split(",").map(V=>V.trim()).forEach((V,C)=>{if(!V)return;const I=C===0?h.value:E.value;a.publish("deepDisplacement","chartConfigPanel",{objectId:V,type:"bindConfig",fv:R(q({},l),{visible:I})})}):a.publish("deepDisplacement","chartConfigPanel",{objectId:u,type:"bindConfig",fv:l}))})},F=l=>{k.value=l,d()},L=l=>{O.value=l;const t=b.dayjs();f.value=t.format("YYYY-MM-DD"),l==="week"?p.value=t.subtract(7,"day").format("YYYY-MM-DD"):l==="month"?p.value=t.subtract(30,"day").format("YYYY-MM-DD"):l==="quarter"&&(p.value=t.subtract(90,"day").format("YYYY-MM-DD")),j(),d()},P=()=>{p.value&&f.value&&(j(),d())},j=()=>{const l=b.dayjs(p.value),t=b.dayjs(f.value),i=[];let n=t;for(;n.isAfter(l)||n.isSame(l);)i.push(n.format("YYYY-MM-DD")),n=n.subtract(1,"day");_.value=i,v.value=[...i],N.value=!0},W=l=>{v.value=l?[..._.value]:[],d()},Z=()=>{v.value=[],N.value=!1,d()},ee=()=>{N.value=v.value.length===_.value.length,d()},te=()=>{d()},le=l=>{S.value=l,d()},D=()=>{d()},$=()=>{d()},oe=()=>{const l=A.value;l&&a.publish("deepDisplacement",{objectId:l,type:"export",fv:{type:"chart",config:z()},source:"chartConfigPanel"})};return e.onMounted(()=>{L("week"),setTimeout(d,300)}),(l,t)=>{const i=m.ElDatePicker,n=m.ElCheckbox,u=m.ElIcon,g=m.ElButton,V=m.ElCheckboxGroup,C=m.ElRadio,I=m.ElRadioGroup,x=m.ElInput;return e.openBlock(),e.createElementBlock("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(s,ae)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ae},[s.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",ve,[e.createElementVNode("span",me,e.toDisplayString(s.label||"时间段"),1),e.createElementVNode("div",fe,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:k.value==="day"}]),onClick:t[0]||(t[0]=o=>F("day"))},"日均",2),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:k.value==="hour"}]),onClick:t[1]||(t[1]=o=>F("hour"))},"小时",2)])]),e.createElementVNode("div",ge,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(J,o=>e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:O.value===o.value}]),onClick:ne=>L(o.value)},e.toDisplayString(o.label),11,Ve)),64))]),e.createElementVNode("div",Ce,[e.createVNode(i,{modelValue:p.value,"onUpdate:modelValue":t[2]||(t[2]=o=>p.value=o),type:"date",placeholder:"开始日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",size:"small",class:"date-picker",onChange:P},null,8,["modelValue"]),e.createVNode(i,{modelValue:f.value,"onUpdate:modelValue":t[3]||(t[3]=o=>f.value=o),type:"date",placeholder:"结束日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",size:"small",class:"date-picker",onChange:P},null,8,["modelValue"])])])):s.type==="timeList"?(e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("div",Ne,[e.createElementVNode("span",be,e.toDisplayString(s.label||"采集时间列表"),1)]),e.createElementVNode("div",ke,[e.createVNode(n,{modelValue:N.value,"onUpdate:modelValue":t[4]||(t[4]=o=>N.value=o),onChange:W},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue"]),e.createVNode(g,{size:"small",text:"",onClick:Z},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(X.Delete))]),_:1}),t[14]||(t[14]=e.createTextVNode("清空",-1))]),_:1}),e.createElementVNode("span",_e,[t[15]||(t[15]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(v.value.length),1),t[16]||(t[16]=e.createTextVNode(" 项",-1))])]),e.createElementVNode("div",he,[e.createVNode(V,{modelValue:v.value,"onUpdate:modelValue":t[5]||(t[5]=o=>v.value=o),onChange:ee},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,o=>(e.openBlock(),e.createBlock(n,{key:o,value:o,class:"time-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])):s.type==="chartType"?(e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",De,e.toDisplayString(s.label||"图类型"),1),e.createVNode(I,{modelValue:Y.value,"onUpdate:modelValue":t[6]||(t[6]=o=>Y.value=o),class:"chart-type-group",onChange:te},{default:e.withCtx(()=>[e.createVNode(C,{value:"relative"},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode("相对位移",-1)])]),_:1}),e.createVNode(C,{value:"cluster"},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode("滑面聚类判识",-1)])]),_:1}),e.createVNode(C,{value:"borehole"},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode("钻孔柱状图",-1)])]),_:1}),e.createVNode(C,{value:"sensor"},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode("传感器分布图",-1)])]),_:1})]),_:1},8,["modelValue"])])):s.type==="direction"?(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("div",Ye,e.toDisplayString(s.label||"位移方向"),1),e.createElementVNode("div",Se,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(K,o=>e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["direction-item",{active:S.value===o.value}]),onClick:ne=>le(o.value)},e.toDisplayString(o.label),11,Be)),64))])])):s.type==="dispRange"?(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",Me,e.toDisplayString(s.label||"累计位移区间"),1),e.createElementVNode("div",Te,[e.createVNode(x,{modelValue:B.value,"onUpdate:modelValue":t[7]||(t[7]=o=>B.value=o),size:"small",placeholder:"最小值",class:"range-input",onChange:D},null,8,["modelValue"]),t[21]||(t[21]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(x,{modelValue:w.value,"onUpdate:modelValue":t[8]||(t[8]=o=>w.value=o),size:"small",placeholder:"最大值",class:"range-input",onChange:D},null,8,["modelValue"]),t[22]||(t[22]=e.createElementVNode("span",{class:"range-unit"},"mm",-1))])])):s.type==="relativeDispRange"?(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",qe,e.toDisplayString(s.label||"相对位移区间"),1),e.createElementVNode("div",Re,[e.createVNode(x,{modelValue:M.value,"onUpdate:modelValue":t[9]||(t[9]=o=>M.value=o),size:"small",placeholder:"最小值",class:"range-input",onChange:D},null,8,["modelValue"]),t[23]||(t[23]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(x,{modelValue:T.value,"onUpdate:modelValue":t[10]||(t[10]=o=>T.value=o),size:"small",placeholder:"最大值",class:"range-input",onChange:D},null,8,["modelValue"]),t[24]||(t[24]=e.createElementVNode("span",{class:"range-unit"},"mm",-1))])])):s.type==="dispSwitch"?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",Ae,e.toDisplayString(s.label||"功能"),1),e.createElementVNode("div",Oe,[e.createVNode(n,{modelValue:h.value,"onUpdate:modelValue":t[11]||(t[11]=o=>h.value=o),onChange:$},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("累计位移",-1)])]),_:1},8,["modelValue"]),e.createVNode(n,{modelValue:E.value,"onUpdate:modelValue":t[12]||(t[12]=o=>E.value=o),onChange:$},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("相对位移",-1)])]),_:1},8,["modelValue"])])])):s.type==="export"?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(g,{size:"small",onClick:oe,class:"export-btn"},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(X.Upload))]),_:1}),e.createTextVNode(e.toDisplayString(s.label||"导出图"),1)]),_:2},1024)])):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)])}}})),He=b._export_sfc(Xe,[["__scopeId","data-v-1a145f90"]]);exports.default=He;
|
|
1
|
+
"use strict";var se=Object.defineProperty,re=Object.defineProperties;var ie=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var ce=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var Q=(c,a,r)=>a in c?se(c,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[a]=r,q=(c,a)=>{for(var r in a||(a={}))ce.call(a,r)&&Q(c,r,a[r]);if(G)for(var r of G(a))de.call(a,r)&&Q(c,r,a[r]);return c},R=(c,a)=>re(c,ie(a));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/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),X=require("@element-plus/icons-vue"),b=require("./index-CtAaj9XN.cjs"),H=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),ue={class:"chart-config-panel"},pe={key:0,class:"config-section"},ve={class:"section-header"},me={class:"section-title"},fe={class:"granularity-switch"},ge={class:"quick-range"},Ve=["onClick"],Ce={class:"date-inputs"},ye={key:1,class:"config-section"},Ne={class:"section-header"},be={class:"section-title"},ke={class:"time-list-actions"},_e={class:"selected-count"},he={class:"time-list"},Ee={key:2,class:"config-section"},De={class:"section-title"},xe={key:3,class:"config-section"},Ye={class:"section-title"},Se={class:"direction-tabs"},Be=["onClick"],we={key:4,class:"config-section"},Me={class:"section-title"},Te={class:"range-inputs"},Ie={key:5,class:"config-section"},qe={class:"section-title"},Re={class:"range-inputs"},Ue={key:6,class:"config-section"},Ae={class:"section-title"},Oe={class:"function-options"},ze={key:7,class:"config-section"},Fe={DEFAULT_ICON:H.DEFAULT_ICON,ACTIVE_ICON:H.ACTIVE_ICON,NAME_CN:"图表配置面板",NAME_EN:"Chart Config Panel",ORDER:14},Le={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"}},Pe=[{type:"timeRange",label:"时间段",targetId:""},{type:"timeList",label:"采集时间列表",targetId:""},{type:"direction",label:"位移方向",targetId:""},{type:"dispSwitch",label:"累计/相对切换",targetId:""}],je=["type","label","targetId"],$e=[],Ge={useAlias:!1,multiObject:!1,source:""},Qe={DEFAULT:Fe,OPTIONS:Le,DATA:Pe,PARAMS:je,SOURCE:$e,COMMON:Ge},Xe=e.defineComponent(R(q({},Qe),{__name:"chartConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(c){e.useCssVars(l=>({v6460e860:y.value.bgColor,v15b6596e:y.value.borderColor,v2f19ff68:y.value.textColor,f7a1752a:y.value.accentColor}));const a=b.useLinkStore(),r=c,y=e.computed(()=>{var t,i,n,u,g;const{options:l}=r.conf||{};return{bindId:((t=l==null?void 0:l.bindId)==null?void 0:t.value)||"",bgColor:((i=l==null?void 0:l.bgColor)==null?void 0:i.value)||"#ffffff",textColor:((n=l==null?void 0:l.textColor)==null?void 0:n.value)||"#333333",accentColor:((u=l==null?void 0:l.accentColor)==null?void 0:u.value)||"#409eff",borderColor:((g=l==null?void 0:l.borderColor)==null?void 0:g.value)||"#e5e5e5"}}),U=e.computed(()=>{var l;return((l=r.conf)==null?void 0:l.data)||[]}),A=e.computed(()=>y.value.bindId||r.uid||""),k=e.ref("day"),O=e.ref("week"),p=e.ref(""),f=e.ref(""),J=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],_=e.ref([]),v=e.ref([]),N=e.ref(!0),Y=e.ref("relative"),S=e.ref("total"),K=[{label:"合",value:"total"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}],B=e.ref(""),w=e.ref(""),M=e.ref(""),T=e.ref(""),h=e.ref(!0),E=e.ref(!0),z=()=>({granularity:k.value,startDate:p.value,endDate:f.value,selectedTimes:v.value,chartType:Y.value,direction:S.value,dispRange:{min:parseFloat(B.value)||null,max:parseFloat(w.value)||null},relativeDispRange:{min:parseFloat(M.value)||null,max:parseFloat(T.value)||null},showDisp:h.value,showRelativeDisp:E.value}),d=()=>{const l=z(),t=U.value,i=A.value;i&&(console.log("[ConfigPanel] 广播配置 (uid):",i,l),a.publish("deepDisplacement","chartConfigPanel",{objectId:i,type:"config",fv:l})),t.forEach(n=>{const u=n.targetId;u&&(n.type==="dispSwitch"?u.split(",").map(V=>V.trim()).forEach((V,C)=>{if(!V)return;const I=C===0?h.value:E.value;a.publish("deepDisplacement","chartConfigPanel",{objectId:V,type:"bindConfig",fv:R(q({},l),{visible:I})})}):a.publish("deepDisplacement","chartConfigPanel",{objectId:u,type:"bindConfig",fv:l}))})},F=l=>{k.value=l,d()},L=l=>{O.value=l;const t=b.dayjs();f.value=t.format("YYYY-MM-DD"),l==="week"?p.value=t.subtract(7,"day").format("YYYY-MM-DD"):l==="month"?p.value=t.subtract(30,"day").format("YYYY-MM-DD"):l==="quarter"&&(p.value=t.subtract(90,"day").format("YYYY-MM-DD")),j(),d()},P=()=>{p.value&&f.value&&(j(),d())},j=()=>{const l=b.dayjs(p.value),t=b.dayjs(f.value),i=[];let n=t;for(;n.isAfter(l)||n.isSame(l);)i.push(n.format("YYYY-MM-DD")),n=n.subtract(1,"day");_.value=i,v.value=[...i],N.value=!0},W=l=>{v.value=l?[..._.value]:[],d()},Z=()=>{v.value=[],N.value=!1,d()},ee=()=>{N.value=v.value.length===_.value.length,d()},te=()=>{d()},le=l=>{S.value=l,d()},D=()=>{d()},$=()=>{d()},oe=()=>{const l=A.value;l&&a.publish("deepDisplacement",{objectId:l,type:"export",fv:{type:"chart",config:z()},source:"chartConfigPanel"})};return e.onMounted(()=>{L("week"),setTimeout(d,300)}),(l,t)=>{const i=m.ElDatePicker,n=m.ElCheckbox,u=m.ElIcon,g=m.ElButton,V=m.ElCheckboxGroup,C=m.ElRadio,I=m.ElRadioGroup,x=m.ElInput;return e.openBlock(),e.createElementBlock("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(s,ae)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ae},[s.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",ve,[e.createElementVNode("span",me,e.toDisplayString(s.label||"时间段"),1),e.createElementVNode("div",fe,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:k.value==="day"}]),onClick:t[0]||(t[0]=o=>F("day"))},"日均",2),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:k.value==="hour"}]),onClick:t[1]||(t[1]=o=>F("hour"))},"小时",2)])]),e.createElementVNode("div",ge,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(J,o=>e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:O.value===o.value}]),onClick:ne=>L(o.value)},e.toDisplayString(o.label),11,Ve)),64))]),e.createElementVNode("div",Ce,[e.createVNode(i,{modelValue:p.value,"onUpdate:modelValue":t[2]||(t[2]=o=>p.value=o),type:"date",placeholder:"开始日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",size:"small",class:"date-picker",onChange:P},null,8,["modelValue"]),e.createVNode(i,{modelValue:f.value,"onUpdate:modelValue":t[3]||(t[3]=o=>f.value=o),type:"date",placeholder:"结束日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",size:"small",class:"date-picker",onChange:P},null,8,["modelValue"])])])):s.type==="timeList"?(e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("div",Ne,[e.createElementVNode("span",be,e.toDisplayString(s.label||"采集时间列表"),1)]),e.createElementVNode("div",ke,[e.createVNode(n,{modelValue:N.value,"onUpdate:modelValue":t[4]||(t[4]=o=>N.value=o),onChange:W},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue"]),e.createVNode(g,{size:"small",text:"",onClick:Z},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(X.Delete))]),_:1}),t[14]||(t[14]=e.createTextVNode("清空",-1))]),_:1}),e.createElementVNode("span",_e,[t[15]||(t[15]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(v.value.length),1),t[16]||(t[16]=e.createTextVNode(" 项",-1))])]),e.createElementVNode("div",he,[e.createVNode(V,{modelValue:v.value,"onUpdate:modelValue":t[5]||(t[5]=o=>v.value=o),onChange:ee},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,o=>(e.openBlock(),e.createBlock(n,{key:o,value:o,class:"time-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])):s.type==="chartType"?(e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",De,e.toDisplayString(s.label||"图类型"),1),e.createVNode(I,{modelValue:Y.value,"onUpdate:modelValue":t[6]||(t[6]=o=>Y.value=o),class:"chart-type-group",onChange:te},{default:e.withCtx(()=>[e.createVNode(C,{value:"relative"},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode("相对位移",-1)])]),_:1}),e.createVNode(C,{value:"cluster"},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode("滑面聚类判识",-1)])]),_:1}),e.createVNode(C,{value:"borehole"},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode("钻孔柱状图",-1)])]),_:1}),e.createVNode(C,{value:"sensor"},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode("传感器分布图",-1)])]),_:1})]),_:1},8,["modelValue"])])):s.type==="direction"?(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("div",Ye,e.toDisplayString(s.label||"位移方向"),1),e.createElementVNode("div",Se,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(K,o=>e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["direction-item",{active:S.value===o.value}]),onClick:ne=>le(o.value)},e.toDisplayString(o.label),11,Be)),64))])])):s.type==="dispRange"?(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",Me,e.toDisplayString(s.label||"累计位移区间"),1),e.createElementVNode("div",Te,[e.createVNode(x,{modelValue:B.value,"onUpdate:modelValue":t[7]||(t[7]=o=>B.value=o),size:"small",placeholder:"最小值",class:"range-input",onChange:D},null,8,["modelValue"]),t[21]||(t[21]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(x,{modelValue:w.value,"onUpdate:modelValue":t[8]||(t[8]=o=>w.value=o),size:"small",placeholder:"最大值",class:"range-input",onChange:D},null,8,["modelValue"]),t[22]||(t[22]=e.createElementVNode("span",{class:"range-unit"},"mm",-1))])])):s.type==="relativeDispRange"?(e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",qe,e.toDisplayString(s.label||"相对位移区间"),1),e.createElementVNode("div",Re,[e.createVNode(x,{modelValue:M.value,"onUpdate:modelValue":t[9]||(t[9]=o=>M.value=o),size:"small",placeholder:"最小值",class:"range-input",onChange:D},null,8,["modelValue"]),t[23]||(t[23]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(x,{modelValue:T.value,"onUpdate:modelValue":t[10]||(t[10]=o=>T.value=o),size:"small",placeholder:"最大值",class:"range-input",onChange:D},null,8,["modelValue"]),t[24]||(t[24]=e.createElementVNode("span",{class:"range-unit"},"mm",-1))])])):s.type==="dispSwitch"?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",Ae,e.toDisplayString(s.label||"功能"),1),e.createElementVNode("div",Oe,[e.createVNode(n,{modelValue:h.value,"onUpdate:modelValue":t[11]||(t[11]=o=>h.value=o),onChange:$},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("累计位移",-1)])]),_:1},8,["modelValue"]),e.createVNode(n,{modelValue:E.value,"onUpdate:modelValue":t[12]||(t[12]=o=>E.value=o),onChange:$},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("相对位移",-1)])]),_:1},8,["modelValue"])])])):s.type==="export"?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(g,{size:"small",onClick:oe,class:"export-btn"},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(X.Upload))]),_:1}),e.createTextVNode(e.toDisplayString(s.label||"导出图"),1)]),_:2},1024)])):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)])}}})),He=b._export_sfc(Xe,[["__scopeId","data-v-1a145f90"]]);exports.default=He;
|
|
@@ -11,9 +11,9 @@ var j = (l, i, a) => i in l ? H(l, i, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return l;
|
|
12
12
|
}, k = (l, i) => I(l, D(i));
|
|
13
13
|
import { defineComponent as F, computed as M, openBlock as _, createElementBlock as z, normalizeStyle as x, unref as d, createElementVNode as b, toDisplayString as T, Fragment as P, renderList as U, renderSlot as W, nextTick as q } from "vue";
|
|
14
|
-
import { C as E } from "./element-resize-detector-
|
|
15
|
-
import { u as K, _ as G } from "./index-
|
|
16
|
-
import { E as J } from "./EChartComponentBase-
|
|
14
|
+
import { C as E } from "./element-resize-detector-CoRhuer9.js";
|
|
15
|
+
import { u as K, _ as G } from "./index-yidMosRJ.js";
|
|
16
|
+
import { E as J } from "./EChartComponentBase-BjiCJlIa.js";
|
|
17
17
|
import { g as Q } from "./titleStyle-BT5GlpAb.js";
|
|
18
18
|
import { A as X, D as Y } from "./ele-circleBar-icon-DNBUxt0A.js";
|
|
19
19
|
import { i as Z } from "./install-BzdOSCzO.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var $=Object.defineProperty,q=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;var z=(a,i,r)=>i in a?$(a,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[i]=r,x=(a,i)=>{for(var r in i||(i={}))A.call(i,r)&&z(a,r,i[r]);if(O)for(var r of O(i))D.call(i,r)&&z(a,r,i[r]);return a},N=(a,i)=>q(a,w(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),E=require("./element-resize-detector-
|
|
1
|
+
"use strict";var $=Object.defineProperty,q=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;var z=(a,i,r)=>i in a?$(a,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[i]=r,x=(a,i)=>{for(var r in i||(i={}))A.call(i,r)&&z(a,r,i[r]);if(O)for(var r of O(i))D.call(i,r)&&z(a,r,i[r]);return a},N=(a,i)=>q(a,w(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),E=require("./element-resize-detector-Cl7PwC4K.cjs"),T=require("./index-CtAaj9XN.cjs"),H=require("./EChartComponentBase-CUbabNTX.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),_=require("./ele-circleBar-icon-Da0-L9sa.cjs"),L=require("./install-nDY6w-GK.cjs"),g=require("./installCanvasRenderer-CyhM1Qpl.cjs"),F=require("./install-DV5cEgNV.cjs"),M=require("./install-CltTFs4e.cjs"),P=require("./echarts-BB8O2KSA.cjs"),U={class:"mix-body"},W=["id"],K={class:"bar-wrap"},G={DEFAULT_ICON:_.DEFAULT_ICON,ACTIVE_ICON:_.ACTIVE_ICON,NAME_CN:"环形图",NAME_EN:"CircleBar",ORDER:2},J={titleColor:"#111",textColor:"#111",bgColor:"#fff",barColor:"#e5e5e5",radiusSize:8,textSize:12,barHeight:10,isHideTitle:!1,showTotal:!0,fixed:{value:2,type:"number",label:"component.options.circleBar_fixed",dependent:"showTotal"},totalText:{value:"总数",type:"string",label:"component.options.circleBar_totalText",dependent:"showTotal"}},V=[{name:"参数一",fv:"",color:"#4162ff",object_id:"",default:"10",value:10},{name:"参数二",fv:"",color:"#3bbc6a",object_id:"",default:"10",value:10},{name:"参数三",fv:"",color:"#e24359",object_id:"",default:"10",value:10}],Q=["name","fv","object_id","color","default"],X=["mosaic","statistics","calculate"],Y={useAlias:!1,multiObject:!1,source:"mosaic"},Z={DEFAULT:G,OPTIONS:J,DATA:V,PARAMS:Q,SOURCE:X,COMMON:Y},ee=t.defineComponent(N(x({},Z),{__name:"circleBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(a){g.use([F.install,M.install,g.install,g.install$1,L.install]);const i=a,r=T.useLinkStore();let b=0;class k extends H.EChartComponentBase{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),barColor:this.getOptionValue("barColor","#e5e5e5"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",12),barHeight:this.getOptionValue("barHeight",10),isHideTitle:this.getOptionValue("isHideTitle",!1)}}init(){var l;this.Style.value=this.extractStyles(),this.applyTheme(),(l=this.props.conf.data)!=null&&l.length||(this.props.conf.data=V),this.props.conf.data.forEach(e=>{e.default!==void 0&&e.default!==""&&(e.value=Number(e.default)||0)}),b=this.props.conf.data.reduce((e,o)=>e+Number(o.value||0),0),t.nextTick(()=>this.initChart())}initChart(){var e,o,s;const l=document.querySelector(`#${this.echartId}`);l&&(this.chartObj||(this.chartObj=P.init(l),this.setupResizeListener(l)),(e=this.chartObj)==null||e.setOption(this.getChartOption(),!0),this.props.mode==="preview"&&((o=this.chartObj)==null||o.off("click"),(s=this.chartObj)==null||s.on("click",h=>{var m,S,u,f,n,d;const c=h==null?void 0:h.name;if(typeof c=="string"&&c){const v=((S=(m=this.props.conf)==null?void 0:m.options)==null?void 0:S.linkChannel)==="custom"?(f=(u=this.props.conf)==null?void 0:u.options)==null?void 0:f.customChannel:(d=(n=this.props.conf)==null?void 0:n.options)==null?void 0:d.linkChannel;r.publish(v||"circleBar","circleBar",{objectId:"",deviceId:"",type:"select",fieldKey:c,fv:x({key:c},h),source:"circleBar"})}})))}getChartOption(){var c,m,S,u,f,n;const{data:l,options:e,name:o}=this.props.conf,s=l.map((d,v)=>d.color||E.COLORS[v]),h=l.map(d=>({value:d.value||0,name:d.name}));return{title:{zlevel:0,show:(c=e==null?void 0:e.showTotal)==null?void 0:c.value,text:[`{value|${b.toFixed(((m=e==null?void 0:e.fixed)==null?void 0:m.value)||2)}}`,`{name|${((S=e==null?void 0:e.totalText)==null?void 0:S.value)||"总数"}}`].join(`
|
|
2
2
|
`),textStyle:{rich:{value:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize,fontWeight:"bold",lineHeight:this.Style.value.textSize+8},name:{color:this.Style.value.textColor,lineHeight:this.Style.value.textSize+8,fontSize:this.Style.value.textSize}}},top:"center",left:"center"},color:s,series:[{name:o,type:"pie",radius:["50%","85%"],center:["50%","50%"],data:h,label:{position:"center",show:!1,color:"inherit"},emphasis:{scale:0,label:{show:(u=e==null?void 0:e.showTotal)==null?void 0:u.value,fontSize:((f=e==null?void 0:e.textSize)==null?void 0:f.value)||12,fontWeight:"bold",formatter:`{d}%
|
|
3
3
|
{b}`,lineHeight:(((n=e==null?void 0:e.textSize)==null?void 0:n.value)||12)+8}}}]}}setSocketData(l){var h,c,m,S;if(!l||!this.chartObj)return;const{data:e,options:o}=this.props.conf,s=this.chartObj.getOption();e.forEach((u,f)=>{var d,v;const n=this.extractDataValue(l,u.fv);u.value=n!=null?n:0,(v=(d=s.series)==null?void 0:d[0])!=null&&v.data&&(s.series[0].data[f].value=n!=null?n:0)}),b=e.reduce((u,f)=>u+Number(f.value||0),0),(h=s.title)!=null&&h[0]&&(s.title[0].text=[`{value|${b.toFixed(((c=o==null?void 0:o.fixed)==null?void 0:c.value)||2)}}`,`{name|${((m=o==null?void 0:o.totalText)==null?void 0:m.value)||"总数"}}`].join(`
|
|
4
4
|
`)),(S=this.chartObj)==null||S.setOption(s)}}const C=new k(i,"circleBar"),B=C.getEchartId();C.setupLifecycle();const p=C.getStyle(),j=t.computed(()=>R.generateTitleStyle(i.conf.options)),I=y=>{const l=Number(y),e=Number(b);return!isNaN(l)&&!isNaN(e)&&e!==0?(l/e*100).toFixed(2)+"%":"0%"};return(y,l)=>(t.openBlock(),t.createElementBlock("div",{class:"mix-component",style:t.normalizeStyle({background:t.unref(p).bgColor,borderRadius:`${t.unref(p).radiusSize}px`})},[t.createElementVNode("div",{class:"mix-title",style:t.normalizeStyle(j.value)},t.toDisplayString(a.conf.caption||a.conf.name),5),t.createElementVNode("div",U,[t.createElementVNode("div",{class:"echart-container",id:t.unref(B)},null,8,W),t.createElementVNode("div",K,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.conf.data,(e,o)=>(t.openBlock(),t.createElementBlock("div",{class:"bar-item level flex",key:o},[t.createElementVNode("div",{class:"label",style:t.normalizeStyle({color:t.unref(p).textColor,fontSize:`${t.unref(p).textSize}px`})},t.toDisplayString(e.name),5),t.createElementVNode("div",{class:"bar",style:t.normalizeStyle({height:t.unref(p).barHeight+"px",backgroundColor:t.unref(p).barColor})},[t.createElementVNode("div",{class:"percent",style:t.normalizeStyle({backgroundColor:e.color||t.unref(E.COLORS)[o],width:I(e.value)})},null,4)],4),t.createElementVNode("div",{class:"value",style:t.normalizeStyle({color:t.unref(p).textColor,fontSize:`${t.unref(p).textSize}px`})},t.toDisplayString(e.value),5)]))),128))])]),t.renderSlot(y.$slots,"default",{},void 0,!0)],4))}})),te=T._export_sfc(ee,[["__scopeId","data-v-813c8d42"]]);exports.default=te;
|
|
@@ -11,8 +11,8 @@ var z = (s, n, i) => n in s ? ie(s, n, { enumerable: !0, configurable: !0, writa
|
|
|
11
11
|
return s;
|
|
12
12
|
}, I = (s, n) => se(s, re(n));
|
|
13
13
|
import { defineComponent as de, ref as m, computed as t, onMounted as he, openBlock as u, createElementBlock as c, normalizeStyle as g, createElementVNode as d, toDisplayString as y, createCommentVNode as k, Fragment as F, renderList as P, renderSlot as ve } from "vue";
|
|
14
|
-
import { B as me } from "./element-resize-detector-
|
|
15
|
-
import { _ as ge } from "./index-
|
|
14
|
+
import { B as me } from "./element-resize-detector-CoRhuer9.js";
|
|
15
|
+
import { _ as ge } from "./index-yidMosRJ.js";
|
|
16
16
|
import { A as pe, D as fe } from "./ele-dateTime-icon-BEGFlwID.js";
|
|
17
17
|
const ye = {
|
|
18
18
|
key: 0,
|