mixdashboards 1.0.70 → 1.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseComponent-Cco_5i96.cjs → BaseComponent-CNXUpPY1.cjs} +1 -1
- package/dist/{BaseComponent-DQe7HYdV.js → BaseComponent-D5tlYehc.js} +3 -3
- package/dist/{EChartComponentBase-dEfA3X9b.js → EChartComponentBase-CAabYXSj.js} +2 -2
- package/dist/{EChartComponentBase-BaBnJ8bP.cjs → EChartComponentBase-D4wMej9X.cjs} +1 -1
- package/dist/{EmergencyPlanPanel-wz6hpU6V.cjs → EmergencyPlanPanel-D96XjhRq.cjs} +1 -1
- package/dist/{EmergencyPlanPanel-DSznPaVv.js → EmergencyPlanPanel-Th4ZNdCb.js} +1 -1
- package/dist/{HistoryPlanDialog-BTgBCdS8.js → HistoryPlanDialog-D2mQLhkO.js} +1 -1
- package/dist/{HistoryPlanDialog-B-LHlgcj.cjs → HistoryPlanDialog-rn2Bp0Gx.cjs} +1 -1
- package/dist/{MonitoringMap-C-2l_lqx.cjs → MonitoringMap-BZ98NYTJ.cjs} +1 -1
- package/dist/{MonitoringMap-DXBLJnDo.js → MonitoringMap-Coozb35G.js} +2 -2
- package/dist/{UniverSheet-C7dsXjKx.js → UniverSheet-CJCunVAM.js} +2 -2
- package/dist/{UniverSheet-LB-08tc-.cjs → UniverSheet-CntkzcVZ.cjs} +1 -1
- package/dist/{accelerationChart-D1SoP45I.cjs → accelerationChart-DLV-1mpA.cjs} +1 -1
- package/dist/{accelerationChart-SBxtVHbe.js → accelerationChart-DacjcSHD.js} +2 -2
- package/dist/{actionItem-DfIM5UH4.cjs → actionItem-CFxzHf4E.cjs} +1 -1
- package/dist/{actionItem-B8IcKGNl.js → actionItem-d-4p5HZK.js} +2 -2
- package/dist/{alarmLevelChart-H8iauEiv.cjs → alarmLevelChart-DCC6D1fH.cjs} +1 -1
- package/dist/{alarmLevelChart-CQz77Q40.js → alarmLevelChart-DddN1NVy.js} +2 -2
- package/dist/{alertTable-Cx-fC6uh.cjs → alertTable-BREZBeS5.cjs} +1 -1
- package/dist/{alertTable-Cv29mm-v.js → alertTable-Q-Waa5jf.js} +2 -2
- package/dist/{aliasObjectSelectorDemo-Bu8MwH5r.js → aliasObjectSelectorDemo-BZygQw9k.js} +1 -1
- package/dist/{aliasObjectSelectorDemo-etPGYsSr.cjs → aliasObjectSelectorDemo-DunKWEkT.cjs} +1 -1
- package/dist/{annualRainfallChart-BGQ985hs.cjs → annualRainfallChart-BJyoUBDn.cjs} +1 -1
- package/dist/{annualRainfallChart-DX58eJRx.js → annualRainfallChart-CthANCvn.js} +2 -2
- package/dist/appendCommonDesignerWhereAnd-DwefWNOa.js +11 -0
- package/dist/appendCommonDesignerWhereAnd-Q-EhDJXE.cjs +1 -0
- package/dist/{aqi-B2fpfbL7.cjs → aqi-BFW_8xYd.cjs} +1 -1
- package/dist/{aqi-DeaKS-k8.js → aqi-C_HnKsjh.js} +2 -2
- package/dist/{aqiIndass-B7qQDf8x.cjs → aqiIndass-B441j8CT.cjs} +1 -1
- package/dist/{aqiIndass-DhZefO08.js → aqiIndass-NVRa3lmj.js} +2 -2
- package/dist/{areaDeformCurve-Ocbn3_kI.cjs → areaDeformCurve-Dj405Jil.cjs} +1 -1
- package/dist/{areaDeformCurve-C4hXBtGd.js → areaDeformCurve-mQiOHdtN.js} +2 -2
- package/dist/{arrayCard-DlsKpcwB.cjs → arrayCard-B7zb1dFi.cjs} +1 -1
- package/dist/{arrayCard-BpUOS-ss.js → arrayCard-DZitcjMs.js} +2 -2
- package/dist/{audio-DxNmXkbs.cjs → audio-BfsYRWbm.cjs} +1 -1
- package/dist/{audio-C6CngKS8.js → audio-CDAMVEgC.js} +2 -2
- package/dist/{bar-DNPkWaNw.js → bar--JrlRud9.js} +2 -2
- package/dist/{bar-D1M8bJyN.cjs → bar-C7uQADV1.cjs} +1 -1
- package/dist/{bmp-Bzs9zJnc.cjs → bmp-DIkLqzRN.cjs} +1 -1
- package/dist/{bmp-YmFKfLFa.js → bmp-DrVcnYxy.js} +2 -2
- package/dist/{box-OJmqI3Q7.cjs → box-kXjrgG2u.cjs} +1 -1
- package/dist/{box-Dk54UC-q.js → box-szcLhted.js} +2 -2
- package/dist/{chartConfigPanel-GHB5Hl5O.js → chartConfigPanel-C32o1gyJ.js} +1 -1
- package/dist/{chartConfigPanel-CZoaPWy_.cjs → chartConfigPanel-DN4LMy8-.cjs} +1 -1
- package/dist/{circleBar-K137GzFV.js → circleBar-BmTjsLHo.js} +2 -2
- package/dist/{circleBar-B5IZlML0.cjs → circleBar-CeL2rqMJ.cjs} +1 -1
- package/dist/{clock-2JczyJVw.js → clock-CuQpD76K.js} +2 -2
- package/dist/{clock-CBL1_q-5.cjs → clock-EbmFBRb-.cjs} +1 -1
- package/dist/{clt-BORPsc1B.cjs → clt-C-9xGiKs.cjs} +1 -1
- package/dist/{clt-ChGE4ePR.js → clt-XCswxZ6i.js} +2 -2
- package/dist/{cmc-DcpgTPp1.cjs → cmc-CFa8Q3tu.cjs} +1 -1
- package/dist/{cmc-KJdEjBLk.js → cmc-CXmAv6fz.js} +2 -2
- package/dist/{cmp-CcyWf3Uh.cjs → cmp-DmpxjexT.cjs} +1 -1
- package/dist/{cmp-sOgqvBdl.js → cmp-Duz_v-LC.js} +2 -2
- package/dist/{composite-Ch7011-M.js → composite-CWgy-w61.js} +2 -2
- package/dist/{composite-CQKIpLlE.cjs → composite-DdHASMFQ.cjs} +1 -1
- package/dist/{conclusionCard-DzJV5dVQ.js → conclusionCard-BtB0rARK.js} +2 -2
- package/dist/{conclusionCard-DAvkvrFd.cjs → conclusionCard-Dlg5GWlE.cjs} +1 -1
- package/dist/{controlList-VNBp52-S.js → controlList-C0AQ8Yb8.js} +119 -113
- package/dist/controlList-C1vhlonT.cjs +1 -0
- package/dist/controlRecordList-BhK7KtLR.cjs +1 -0
- package/dist/{controlRecordList-BwgBUDph.js → controlRecordList-CSPKG1HU.js} +113 -107
- package/dist/{crd-CMq-eX9E.cjs → crd-CgxqxwKV.cjs} +1 -1
- package/dist/{crd-BgzuVyLH.js → crd-DQruf9o3.js} +2 -2
- package/dist/{ctrBtn-BBpiMhLv.cjs → ctrBtn-BSJ9c7Pt.cjs} +1 -1
- package/dist/{ctrBtn-BEFSVeUb.js → ctrBtn-jEWTt_f2.js} +3 -3
- package/dist/{ctrSet-CIqM9s8f.cjs → ctrSet-B9M4yI53.cjs} +1 -1
- package/dist/{ctrSet-CDe4sV-6.js → ctrSet-C4wCODMY.js} +3 -3
- package/dist/{ctrSwitch-TZ380RwZ.js → ctrSwitch-C6dUn_qm.js} +3 -3
- package/dist/{ctrSwitch-BT6EXPWY.cjs → ctrSwitch-ZvMCYKvG.cjs} +1 -1
- package/dist/{dataManagement-Dc_cJb_I.js → dataManagement-BQVZS7Hi.js} +2 -2
- package/dist/{dataManagement-CIt71PpI.cjs → dataManagement-CNrEa_zB.cjs} +1 -1
- package/dist/{dataReport-Brb3-u9M.cjs → dataReport-DRopth3A.cjs} +1 -1
- package/dist/{dataReport-CqEWzKs_.js → dataReport-vP1LBJjE.js} +2 -2
- package/dist/{dataTable-CxNmTfCe.js → dataTable-B1FQ3XIq.js} +1 -1
- package/dist/{dataTable-Dumu1ipq.cjs → dataTable-C2AgSR36.cjs} +1 -1
- package/dist/{datetime-CiUh6ijW.cjs → datetime-CAyDWKE8.cjs} +1 -1
- package/dist/{datetime-DznwpQpB.js → datetime-DU3rzi1v.js} +2 -2
- package/dist/{deepClusterSlipSurface-BM14AV0q.js → deepClusterSlipSurface-BHwB0eu9.js} +2 -2
- package/dist/{deepClusterSlipSurface-DV0J99z4.cjs → deepClusterSlipSurface-DzoyF6i1.cjs} +1 -1
- package/dist/{deepDataMatrix-CnZamNgJ.cjs → deepDataMatrix--AstWPiL.cjs} +1 -1
- package/dist/{deepDataMatrix-DlHVpRsU.js → deepDataMatrix-C3uKZmon.js} +2 -2
- package/dist/{deepDisplacement3D-DBPZVGVq.cjs → deepDisplacement3D-BBYgB-rK.cjs} +1 -1
- package/dist/{deepDisplacement3D-CFQGFzKB.js → deepDisplacement3D-CDNPul6D.js} +2 -2
- package/dist/{deepDisplacementChart-WRoRNeUp.cjs → deepDisplacementChart-BnT1ZdfR.cjs} +1 -1
- package/dist/{deepDisplacementChart-BIC1BdeL.js → deepDisplacementChart-C6GQHO-J.js} +3 -3
- package/dist/{deepDisplacementChart-CUHtskLG.js → deepDisplacementChart-C_pwwgIC.js} +2 -2
- package/dist/{deepDisplacementChart-DV1CAZdr.cjs → deepDisplacementChart-DOPij7KP.cjs} +1 -1
- package/dist/{deepDisplacementView-CqYa0axl.js → deepDisplacementView-C837RNer.js} +1 -1
- package/dist/{deepDisplacementView-Cvw33ulf.cjs → deepDisplacementView-u1IPcbxN.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-CXdObUS6.js → deepNodeTemperatureChart-BcH3ZNi4.js} +2 -2
- package/dist/{deepNodeTemperatureChart-Dv_OX5B4.cjs → deepNodeTemperatureChart-CD3JbqkA.cjs} +1 -1
- package/dist/{deepTangentAngleChart-DswXRUYT.cjs → deepTangentAngleChart-BCAauuDY.cjs} +1 -1
- package/dist/{deepTangentAngleChart-Bud2CMVY.js → deepTangentAngleChart-DSpCyIdq.js} +2 -2
- package/dist/{deepTemperatureField-GoQvQtaO.js → deepTemperatureField-B2qIHL1-.js} +3 -3
- package/dist/{deepTemperatureField-ChALQ2aa.cjs → deepTemperatureField-BxuKsrtc.cjs} +1 -1
- package/dist/{deepTrendChart-CDrMdwWQ.cjs → deepTrendChart-6L4cCHgh.cjs} +1 -1
- package/dist/{deepTrendChart-ChnQuB43.js → deepTrendChart-DFGSV17a.js} +2 -2
- package/dist/{deviceOnlineStatus-BfNCdYOx.js → deviceOnlineStatus-CiIFdo9I.js} +2 -2
- package/dist/{deviceOnlineStatus-Bn3LQ4Sr.cjs → deviceOnlineStatus-WkwzGom4.cjs} +1 -1
- package/dist/{deviceStatus-Brj4MjDf.cjs → deviceStatus-BoIv8fbr.cjs} +1 -1
- package/dist/{deviceStatus-B38Ae5a2.js → deviceStatus-Dd1pqVnO.js} +2 -2
- package/dist/{displacementDataTable-BUNOEGGA.cjs → displacementDataTable-BwcxrsuU.cjs} +1 -1
- package/dist/{displacementDataTable-CcPsYHhN.js → displacementDataTable-CGIHGxye.js} +2 -2
- package/dist/{displacementTrajectoryChart-CigBPamm.cjs → displacementTrajectoryChart-BOPIBgi5.cjs} +1 -1
- package/dist/{displacementTrajectoryChart--FVjlHL3.js → displacementTrajectoryChart-RL97CTML.js} +2 -2
- package/dist/{displacementTrendChart-IVjBPyEn.js → displacementTrendChart-Bqnv7hiP.js} +2 -2
- package/dist/{displacementTrendChart-BglcCr0q.cjs → displacementTrendChart-CI8i0oQY.cjs} +1 -1
- package/dist/{dxf-GBy0lc-E.cjs → dxf-BQoArgPS.cjs} +1 -1
- package/dist/{dxf-sH3BLfYm.js → dxf-DBu1iA-r.js} +2 -2
- package/dist/{dzc-Bl1t-Dk2.js → dzc-7tLxe18d.js} +2 -2
- package/dist/{dzc-HaFIs3kj.cjs → dzc-DMVPjosV.cjs} +1 -1
- package/dist/{emergencyPlan-Dm3xgpLZ.cjs → emergencyPlan-BRFhMubg.cjs} +1 -1
- package/dist/{emergencyPlan-BBCNfl7v.js → emergencyPlan-C9Edkw51.js} +3 -3
- package/dist/{evn-xtk2AfOE.cjs → evn-B05d7LtF.cjs} +1 -1
- package/dist/{evn-oE5QPAvh.js → evn-CeLoYCUr.js} +2 -2
- package/dist/{evolutionChart-IQgcbpZI.js → evolutionChart-DAlncdLU.js} +3 -3
- package/dist/{evolutionChart-BCALB3_C.cjs → evolutionChart-y2mkLVwU.cjs} +1 -1
- package/dist/{fileViewer-CNUWWWrf.js → fileViewer-BFMFEN2f.js} +2 -2
- package/dist/{fileViewer-Bm3pBZ7F.cjs → fileViewer-Dy2fdABW.cjs} +1 -1
- package/dist/{filterBar-8-3I-fv2.cjs → filterBar-CcrUdD-O.cjs} +1 -1
- package/dist/{filterBar-D0IMAQEi.js → filterBar-qJJKdxYE.js} +2 -2
- package/dist/{fireCombustionCurve-q_KJLBvC.cjs → fireCombustionCurve-B-6MZLul.cjs} +1 -1
- package/dist/{fireCombustionCurve-DIMaL6k_.js → fireCombustionCurve-DyRikhHw.js} +3 -3
- package/dist/{fireFilterBar-BduYgLR_.cjs → fireFilterBar-C9b_Ohvr.cjs} +1 -1
- package/dist/{fireFilterBar-mh__CAEd.js → fireFilterBar-DkjBGPXa.js} +2 -2
- package/dist/{fireHistoryTable-V7JBdrE2.cjs → fireHistoryTable-5sG5FDCD.cjs} +1 -1
- package/dist/{fireHistoryTable-BGIGhRzQ.js → fireHistoryTable-ldXil5up.js} +2 -2
- package/dist/{gag-ClHWS-GR.cjs → gag-CDX99Ta4.cjs} +1 -1
- package/dist/{gag-h6YZVeKt.js → gag-KZfFHn72.js} +2 -2
- package/dist/{gasStationList-D8fl4Or-.js → gasStationList-Btoo_olJ.js} +61 -54
- package/dist/gasStationList-Dl9qawf_.cjs +1 -0
- package/dist/{geo3dViewer-V0VzcLih.cjs → geo3dViewer-Cif9uFqd.cjs} +1 -1
- package/dist/{geo3dViewer-BMXatRLz.js → geo3dViewer-iZhkCiTP.js} +3 -3
- package/dist/{glbModel-CXvjMqNn.cjs → glbModel-2xydaxDT.cjs} +1 -1
- package/dist/{glbModel-B2byj6re.js → glbModel-MJZgDSJf.js} +2 -2
- package/dist/{globalObjectSelector-BgZLIHmK.cjs → globalObjectSelector-Bz2XhgxT.cjs} +1 -1
- package/dist/{globalObjectSelector-BZ3_5CPd.js → globalObjectSelector-CHtYGpi9.js} +1 -1
- package/dist/{gnssFilterBar-Cf7cWGlI.cjs → gnssFilterBar-BT19n0j_.cjs} +1 -1
- package/dist/{gnssFilterBar-CpF9e6YM.js → gnssFilterBar-CPis6bUI.js} +2 -2
- package/dist/{gnssHistoryTable-rdM2a20c.cjs → gnssHistoryTable-CrS2qO6S.cjs} +1 -1
- package/dist/{gnssHistoryTable-MRP8Beo0.js → gnssHistoryTable-kHZY48EZ.js} +2 -2
- package/dist/{gnssMapView-CaUtuUpJ.cjs → gnssMapView-BNIkieqL.cjs} +2 -2
- package/dist/{gnssMapView-BkoTIlXN.js → gnssMapView-DXP8yz0v.js} +4 -4
- package/dist/{gnssSectionProfile-Dg8ItwhD.js → gnssSectionProfile-DEUDEvJ1.js} +2 -2
- package/dist/{gnssSectionProfile-BBr8cQ5Q.cjs → gnssSectionProfile-_KbP1NXU.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-nqn-schc.cjs → gnssTimeSeriesChart-BgFoXAZv.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-BD_By4pr.js → gnssTimeSeriesChart-C_xqd0su.js} +2 -2
- package/dist/{gnssXYTrajectory-BEuA8xeM.cjs → gnssXYTrajectory-C1N3RWzp.cjs} +1 -1
- package/dist/{gnssXYTrajectory-BJc805eq.js → gnssXYTrajectory-GqgFw_qK.js} +2 -2
- package/dist/grd-DtDoJOOa.cjs +1 -0
- package/dist/{grd-CdgF9LSJ.js → grd-QCuVN1jE.js} +31 -30
- package/dist/{grdIndass-BE3WXRar.js → grdIndass-BEcfZTYw.js} +2 -2
- package/dist/{grdIndass-BCgyoujO.cjs → grdIndass-ci3JkvGZ.cjs} +1 -1
- package/dist/{grg-DC1jm6BJ.cjs → grg-C2qVuXYE.cjs} +1 -1
- package/dist/{grg-DOWXpsOd.js → grg-CMVrF5tB.js} +2 -2
- package/dist/{gridview-EqB4I5wC.cjs → gridview-BLAlr5uj.cjs} +1 -1
- package/dist/{gridview-CVmSPr7U.js → gridview-Cd3Tqzph.js} +2 -2
- package/dist/{groundwaterFilterBar-CWv6BCI6.cjs → groundwaterFilterBar-1E1j67JT.cjs} +1 -1
- package/dist/{groundwaterFilterBar-CviSH5Qr.js → groundwaterFilterBar-D7lrbzDC.js} +2 -2
- package/dist/{groundwaterProfileChart-D-Egf7gH.js → groundwaterProfileChart-Bjtqz-Zv.js} +3 -3
- package/dist/{groundwaterProfileChart-hbl7Skoa.cjs → groundwaterProfileChart-CS9xelz8.cjs} +2 -2
- package/dist/{groundwaterTimeCurve-B2S9jv9c.js → groundwaterTimeCurve-Bu6vgAaC.js} +3 -3
- package/dist/{groundwaterTimeCurve-BSKxN3Mw.cjs → groundwaterTimeCurve-DYiDLgVY.cjs} +1 -1
- package/dist/{groupCard-BSYmzKXi.cjs → groupCard-CPvAsuPb.cjs} +1 -1
- package/dist/{groupCard-fDda5bn9.js → groupCard-DQvEe6cc.js} +2 -2
- package/dist/{headerBar-BNC53vaM.js → headerBar-CGOtSvFn.js} +2 -2
- package/dist/{headerBar-Dv7imnYo.cjs → headerBar-OwCxpc4o.cjs} +1 -1
- package/dist/{history-BC29QEMC.cjs → history-9ToM-rJ6.cjs} +1 -1
- package/dist/{history-71NIpUTt.js → history-D6C3tSut.js} +1 -1
- package/dist/{index-BSsB7QzO.js → index-Bdq33405.js} +2026 -2039
- package/dist/{index-Do1YWdUS.cjs → index-D8dh_6Qd.cjs} +12 -12
- package/dist/{insarDeformChart-DBj0COZA.cjs → insarDeformChart-CSQ7fc2p.cjs} +1 -1
- package/dist/{insarDeformChart-DagNC51a.js → insarDeformChart-Ls-cdqaP.js} +2 -2
- package/dist/{insarImageViewer-D8lq9Hv9.js → insarImageViewer-Dnke9JDG.js} +2 -2
- package/dist/{insarImageViewer-D3Z46bMc.cjs → insarImageViewer-DvaRS1zr.cjs} +1 -1
- package/dist/{kds-dfE3zwZ-.js → kds-B4BKGG0r.js} +2 -2
- package/dist/{kds-3BWXq_Zj.cjs → kds-BjX5tXhF.cjs} +1 -1
- package/dist/{kpiCard-C7BwYNoj.js → kpiCard-C77vHJ_E.js} +2 -2
- package/dist/{kpiCard-DsIkae_A.cjs → kpiCard-oLpk5d4m.cjs} +1 -1
- package/dist/{landslideMap-BrLLkxBj.js → landslideMap-BEkbnCqP.js} +3 -3
- package/dist/{landslideMap-B6KMbgUh.cjs → landslideMap-CO8o7T8J.cjs} +1 -1
- package/dist/{landslideWarning-HDs4IJhS.cjs → landslideWarning-BZXa5qTB.cjs} +1 -1
- package/dist/{landslideWarning-CCB3FuKv.js → landslideWarning-C5upI2cf.js} +5 -5
- package/dist/{layerTabs-CIJNyC8N.cjs → layerTabs-BxRAsklw.cjs} +1 -1
- package/dist/{layerTabs-DmXSaX2o.js → layerTabs-DoGw1Jfv.js} +2 -2
- package/dist/{leaflet-src-CFMznK-4.cjs → leaflet-src-BUWIqhPn.cjs} +1 -1
- package/dist/{leaflet-src-Cz3-WkcA.js → leaflet-src-DFE_g2gF.js} +1 -1
- package/dist/{lerc-DOm8fUIl.cjs → lerc-BBgQP785.cjs} +1 -1
- package/dist/{lerc-CVXsRBRF.js → lerc-CXc9KSRL.js} +2 -2
- package/dist/{lin-CDBqcgpY.cjs → lin-ClO2MqZl.cjs} +1 -1
- package/dist/{lin-Br_VXsJO.js → lin-Difz8N88.js} +2 -2
- package/dist/{linIndass-B9ZXCjvV.cjs → linIndass-Bb7UA-zk.cjs} +1 -1
- package/dist/{linIndass-Bzid42kL.js → linIndass-DqXVOBh3.js} +2 -2
- package/dist/{lst-DHw7jJvt.js → lst-4RMMZZkY.js} +2 -2
- package/dist/{lst-D1Vdrqbd.cjs → lst-Dri1MTDI.cjs} +1 -1
- package/dist/{manualEntry-C3d0PuIP.js → manualEntry-B3_4Z-Lj.js} +2 -2
- package/dist/{manualEntry-DPiWw70L.cjs → manualEntry-D74dgZv8.cjs} +1 -1
- package/dist/{mapBackground-BmEmh-IX.js → mapBackground-B3OHQsXZ.js} +3 -3
- package/dist/{mapBackground-CW9t63hH.cjs → mapBackground-Bmt-oZt6.cjs} +1 -1
- package/dist/mappingList-CBN7ArkQ.cjs +1 -0
- package/dist/{mappingList-rtj1fZta.js → mappingList-DVj7H206.js} +142 -136
- package/dist/{markdownViewer-mV81tsCM.cjs → markdownViewer-BAuNEWRt.cjs} +1 -1
- package/dist/{markdownViewer-BW9CC15r.js → markdownViewer-fheM5uV4.js} +2 -2
- package/dist/{mix-control-modal-R-d17GgO.js → mix-control-modal-BBiKe4MM.js} +1 -1
- package/dist/{mix-control-modal-C-XaUBM9.cjs → mix-control-modal-BoYynGT2.cjs} +1 -1
- package/dist/{mixGrid-Dh1GWlPe.js → mixGrid-BUjP1qv2.js} +233 -225
- package/dist/mixGrid-DTj2pmFW.cjs +1 -0
- package/dist/{mixMap-JeV_KU8B.cjs → mixMap-B4T4R6kA.cjs} +1 -1
- package/dist/{mixMap-InWuappO.js → mixMap-DPIwyKuP.js} +2 -2
- package/dist/{mixModel-CPu_Nnzl.cjs → mixModel-BzilRtjf.cjs} +1 -1
- package/dist/{mixModel-DKGYpc0t.js → mixModel-CIdQp4V9.js} +2 -2
- package/dist/{mixPie-DuL4kFfE.js → mixPie-C6OhdOCV.js} +2 -2
- package/dist/{mixPie-B8iIy6vW.cjs → mixPie-DtQm-LGp.cjs} +1 -1
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +1 -1
- package/dist/{mjpegCamera-CLn1xHqz.js → mjpegCamera-Cd1vhZ5v.js} +2 -2
- package/dist/{mjpegCamera-CBDFxk1W.cjs → mjpegCamera-Lu3UHJ83.cjs} +1 -1
- package/dist/{monitorAlert-GYcH2lWI.cjs → monitorAlert-Ctt2kCxQ.cjs} +1 -1
- package/dist/{monitorAlert-v3YHyJ9n.js → monitorAlert-DIJtH557.js} +2 -2
- package/dist/{monitorData-CfcxdZcd.js → monitorData-B6jhpzVK.js} +2 -2
- package/dist/{monitorData-B7ZFUGOk.cjs → monitorData-D_tMbx_Y.cjs} +1 -1
- package/dist/{monitorSpeedChart-7xx0tfQ_.js → monitorSpeedChart-DF5zvxs9.js} +1 -1
- package/dist/{monitorSpeedChart-C7HwlTr8.cjs → monitorSpeedChart-EIcGs3NX.cjs} +1 -1
- package/dist/{mxa-CjPqkUmG.cjs → mxa-BfwIV49n.cjs} +1 -1
- package/dist/{mxa-CDGZ91O2.js → mxa-COxjxwpC.js} +2 -2
- package/dist/{myValue-DjPA08OX.js → myValue-Crba15Wc.js} +2 -2
- package/dist/{myValue-BS3GCO4s.cjs → myValue-FZPOucSS.cjs} +1 -1
- package/dist/{myValueList-CHkCKevc.cjs → myValueList-XIDK3ove.cjs} +1 -1
- package/dist/{myValueList-C7A5aAh9.js → myValueList-m2yaIcuf.js} +2 -2
- package/dist/objectList-BtbxHtJj.cjs +1 -0
- package/dist/{objectList-D0tDSws-.js → objectList-BwZJzrXs.js} +252 -229
- package/dist/{photo-Cu5K8SR1.cjs → photo-BITvEhKG.cjs} +1 -1
- package/dist/{photo-DBEKwlxs.js → photo-CjulDHTM.js} +2 -2
- package/dist/{pie-CNzWqzxt.js → pie-C9MU90ON.js} +2 -2
- package/dist/{pie-DNaiYJw-.cjs → pie-CSLVJv0Y.cjs} +1 -1
- package/dist/{placeholder-CmVISGcF.cjs → placeholder-3kajeeeb.cjs} +1 -1
- package/dist/{placeholder-sfIWt-Xp.js → placeholder-CRARTMF4.js} +1 -1
- package/dist/{pressBtn-DLQBhBFE.js → pressBtn-CkYcW1a8.js} +3 -3
- package/dist/{pressBtn-QGaltOl4.cjs → pressBtn-pUcQtd5n.cjs} +1 -1
- package/dist/{processTable-CgNob2sD.js → processTable-BgAhGGAq.js} +2 -2
- package/dist/{processTable-g9yoTp4_.cjs → processTable-CDulvQlu.cjs} +1 -1
- package/dist/{progressBar-Bdp-TJpQ.cjs → progressBar-BbDFps1r.cjs} +1 -1
- package/dist/{progressBar-BB2IqJY4.js → progressBar-CIPUVeaf.js} +2 -2
- package/dist/{progressCircle-F4z0eEN5.cjs → progressCircle-CgkZ1EC1.cjs} +1 -1
- package/dist/{progressCircle-BQ-JSIxI.js → progressCircle-DDc5zsd6.js} +2 -2
- package/dist/{qrcode-D0PnYT1n.js → qrcode-CCu677Ad.js} +2 -2
- package/dist/{qrcode-C4JX_M2R.cjs → qrcode-CQbWGVgq.cjs} +1 -1
- package/dist/raceBar-Cn8oPhCE.js +354 -0
- package/dist/raceBar-CzNGSYCt.cjs +4 -0
- package/dist/{rad-Bx3jcHPe.js → rad-D_cLWeMk.js} +2 -2
- package/dist/{rad-CpIyATZD.cjs → rad-Dk4PrnyI.cjs} +1 -1
- package/dist/{radarMapViewer-znDIY1Dj.js → radarMapViewer-BaAXjsWx.js} +2 -2
- package/dist/{radarMapViewer-CbGubI4Y.cjs → radarMapViewer-TJIPACdT.cjs} +1 -1
- package/dist/{rainfallFilterBar-3a9Q3HL_.js → rainfallFilterBar-Bhpadat8.js} +2 -2
- package/dist/{rainfallFilterBar-Du3Sgp7X.cjs → rainfallFilterBar-Myq0MBCf.cjs} +1 -1
- package/dist/{rainfallTimeCurve-D2w9bpwZ.cjs → rainfallTimeCurve-BUI-RlnG.cjs} +1 -1
- package/dist/{rainfallTimeCurve-BF2Ic5kC.js → rainfallTimeCurve-sDYapogL.js} +3 -3
- package/dist/{rangeLin-C32kwDdl.js → rangeLin-CdMOPwMP.js} +2 -2
- package/dist/{rangeLin-B_GwGg5T.cjs → rangeLin-DYCZ8wVc.cjs} +1 -1
- package/dist/{realtimeEvolutionMap-BYga2Sy1.cjs → realtimeEvolutionMap-BwyQdAhL.cjs} +1 -1
- package/dist/{realtimeEvolutionMap-CJGxgUkx.js → realtimeEvolutionMap-CIH_sZ29.js} +2 -2
- package/dist/{regionBar-CdddgYWu.cjs → regionBar-DsxqfirI.cjs} +1 -1
- package/dist/{regionBar-CZY8lddM.js → regionBar-VB-2GpR0.js} +2 -2
- package/dist/{request-DpwHQGd5.js → request-BHfDxLXZ.js} +1 -1
- package/dist/{request-C78CBVAN.cjs → request-DU8pRyvu.cjs} +1 -1
- package/dist/{retainer1-BuvX8Di7.cjs → retainer1-CSqjvY4k.cjs} +1 -1
- package/dist/{retainer1-D019fwD_.js → retainer1-C_109Weq.js} +3 -3
- package/dist/{retainer2-B-TexO-Y.js → retainer2-BiHUTumr.js} +3 -3
- package/dist/{retainer2-DCHahmfG.cjs → retainer2-Bqlwvr53.cjs} +1 -1
- package/dist/{retainerRecordList-BrYisw1I.js → retainerRecordList-Cgil_g8a.js} +217 -199
- package/dist/retainerRecordList-DWZ3WDiz.cjs +1 -0
- package/dist/{ringTopN-DiMEspqe.cjs → ringTopN-Bp0er_zV.cjs} +1 -1
- package/dist/{ringTopN-U-y_5F23.js → ringTopN-C9AH-t3T.js} +2 -2
- package/dist/{riskRegionTable-CBkZwBO7.cjs → riskRegionTable-B3bzMaR_.cjs} +1 -1
- package/dist/{riskRegionTable-aMJshw4k.js → riskRegionTable-Co1uxMzf.js} +2 -2
- package/dist/{sankey-B5cYZsvX.cjs → sankey-B4BJ4xIo.cjs} +1 -1
- package/dist/{sankey-DDfakV6y.js → sankey-Bag0ladh.js} +2 -2
- package/dist/{scd-Dw_bUW6m.js → scd-D9AiOiPg.js} +2 -2
- package/dist/{scd-DFHgvimo.cjs → scd-Dgd3KDpk.cjs} +1 -1
- package/dist/{sideMenu-CmpGVPM3.js → sideMenu-869HFB0p.js} +2 -2
- package/dist/{sideMenu-DJsAP45g.cjs → sideMenu-BQ5rrGBr.cjs} +1 -1
- package/dist/{slopeStability-CfzgDTeZ.cjs → slopeStability-D96aiykf.cjs} +1 -1
- package/dist/{slopeStability-D4eSUWT9.js → slopeStability-bZ0lHLjZ.js} +2 -2
- package/dist/{speedCurve-vIlHrolF.cjs → speedCurve-5nWqVAzz.cjs} +1 -1
- package/dist/{speedCurve-BbThyw5u.js → speedCurve-DZ52XKCk.js} +2 -2
- package/dist/{staticLine-uqwL7J2F.js → staticLine-CyPnmKCh.js} +2 -2
- package/dist/{staticLine-CFONgNJ0.cjs → staticLine-DUCg-0tI.cjs} +1 -1
- package/dist/{stressFilterBar-BC_6NNeh.js → stressFilterBar-BAUt2bGy.js} +2 -2
- package/dist/{stressFilterBar-CbK5TMGs.cjs → stressFilterBar-CorWdmpQ.cjs} +1 -1
- package/dist/{stressTimeCurve-DGa6Amlf.cjs → stressTimeCurve-Bci50Cwv.cjs} +1 -1
- package/dist/{stressTimeCurve-DL2UIABb.js → stressTimeCurve-IW4ArsyA.js} +3 -3
- package/dist/{swiper-D99S451G.cjs → swiper-BPS9C2GV.cjs} +1 -1
- package/dist/{swiper-DcI2laNu.js → swiper-RM0GoZkW.js} +2 -2
- package/dist/terminalConfigList-O881ke5o.cjs +1 -0
- package/dist/{terminalConfigList-CHP04a15.js → terminalConfigList-n7NE5NdJ.js} +217 -207
- package/dist/{terminalList-B4GdtArc.js → terminalList-Byb4eLcD.js} +245 -233
- package/dist/terminalList-C9TB2cJH.cjs +1 -0
- package/dist/{textbox-DWkIbuKy.cjs → textbox-BMWnbPvz.cjs} +1 -1
- package/dist/{textbox-DM7EtQFC.js → textbox-DM1AUWw8.js} +2 -2
- package/dist/{timeQueryBar-B6dhhKsw.cjs → timeQueryBar-C6ZheMvD.cjs} +1 -1
- package/dist/{timeQueryBar-4eYHDx7k.js → timeQueryBar-Tbd9M8UT.js} +1 -1
- package/dist/{timeSeries-D8S_d2lD.js → timeSeries-CdpEx6bf.js} +3 -3
- package/dist/{timeSeries-SKsJlO9O.cjs → timeSeries-DCV2YjC2.cjs} +1 -1
- package/dist/{timeSeriesCurve-HqTd55Tr.js → timeSeriesCurve-C1AmF6TP.js} +3 -3
- package/dist/{timeSeriesCurve-D_oEL3m7.cjs → timeSeriesCurve-DRlr5n3U.cjs} +1 -1
- package/dist/{toggleBtn-BOQw1iDG.cjs → toggleBtn-BGjXjIuK.cjs} +1 -1
- package/dist/{toggleBtn-D7cHFqWb.js → toggleBtn-XS9MjfKM.js} +2 -2
- package/dist/{trajectoryConfigPanel-CfDPGItH.js → trajectoryConfigPanel-BC90nD1T.js} +1 -1
- package/dist/{trajectoryConfigPanel-yZcJkv1P.cjs → trajectoryConfigPanel-DJ6fOeb1.cjs} +1 -1
- package/dist/{trajectoryScatter-aRV9sebu.cjs → trajectoryScatter-C7kfSkyS.cjs} +1 -1
- package/dist/{trajectoryScatter-CPFvxmxe.js → trajectoryScatter-DF_ESBn8.js} +2 -2
- package/dist/{universalConfigPanel-Drfltp0O.js → universalConfigPanel-DjNTwJkz.js} +1 -1
- package/dist/{universalConfigPanel-COMoO1kb.cjs → universalConfigPanel-PO1hdgjw.cjs} +1 -1
- package/dist/{universalTable-GfZa1yH9.js → universalTable-BY9vRraC.js} +2 -2
- package/dist/{universalTable-BwSUhV4N.cjs → universalTable-QAb6UKCq.cjs} +1 -1
- package/dist/{video-kK74GALx.cjs → video-8_Sf1uz0.cjs} +1 -1
- package/dist/{video-Dyp2zhVq.js → video-DDvDGDql.js} +2 -2
- package/dist/{videoMonitor-PXczYaaJ.cjs → videoMonitor-BKLD_aQs.cjs} +1 -1
- package/dist/{videoMonitor-BkelK0u9.js → videoMonitor-sce5N4Q5.js} +2 -2
- package/dist/{vlu-BBvampip.js → vlu-BKeYJtOO.js} +2 -2
- package/dist/{vlu-fvmCrEzu.cjs → vlu-C0XLDKKk.cjs} +1 -1
- package/dist/{warningOverview-CKMdru1u.cjs → warningOverview--n7crFnZ.cjs} +1 -1
- package/dist/{warningOverview-CH-TMirz.js → warningOverview-CG5mwtaO.js} +3 -3
- package/dist/{weather-dQzojon4.js → weather-BrX2a1an.js} +2 -2
- package/dist/{weather-BCLGeV-Q.cjs → weather-CWvAqxgX.cjs} +1 -1
- package/dist/{windLin-Bby_6ueU.cjs → windLin-BbbsSwuF.cjs} +1 -1
- package/dist/{windLin-9DCax9Ze.js → windLin-P4Gs2aBB.js} +2 -2
- package/package.json +120 -120
- package/dist/controlList-C9P4g5xx.cjs +0 -1
- package/dist/controlRecordList-a-h5hoBa.cjs +0 -1
- package/dist/gasStationList-BPa4_DUz.cjs +0 -1
- package/dist/grd-aUyI_B6g.cjs +0 -1
- package/dist/mappingList-B9PdmcFg.cjs +0 -1
- package/dist/mixGrid-DrmqVYse.cjs +0 -1
- package/dist/objectList-DxnLRd33.cjs +0 -1
- package/dist/raceBar-DYG9jwPy.js +0 -244
- package/dist/raceBar-GXOy9QCR.cjs +0 -3
- package/dist/retainerRecordList-DRZ-jXXI.cjs +0 -1
- package/dist/terminalConfigList-7DiStuBl.cjs +0 -1
- package/dist/terminalList-CjEIRV3W.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var te=Object.defineProperty,ie=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var F=(e,t,i)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,b=(e,t)=>{for(var i in t||(t={}))ae.call(t,i)&&F(e,i,t[i]);if($)for(var i of $(t))ne.call(t,i)&&F(e,i,t[i]);return e},E=(e,t)=>ie(e,oe(t));var c=(e,t,i)=>new Promise((r,o)=>{var s=_=>{try{a(i.next(_))}catch(g){o(g)}},u=_=>{try{a(i.throw(_))}catch(g){o(g)}},a=_=>_.done?r(_.value):Promise.resolve(_.value).then(s,u);a((i=i.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const re=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");const n=require("vue"),le=require("./vue-i18n-BvHMBi_b.cjs"),se=require("./BaseComponent-Cco_5i96.cjs"),y=require("./index-Do1YWdUS.cjs"),V=require("element-plus"),T=require("./ele-bmp-icon-BBI0-SX7.cjs");function L(e){return e.replace(/\/$/,"")}function ce(){return typeof window=="undefined"?!1:window.__MIXUI_MATERIAL_USE_MIXSERVICE_STORAGE__===!0}function de(){var r,o;const e="".trim();if(e)return L(e);if(ce()&&typeof window!="undefined"&&((r=window.location)!=null&&r.origin))return`${L(window.location.origin)}/mixservice/storage/yunfiles/material/file`;const t="".trim();if(t){const s=L(t);return s.toLowerCase().includes("yunfiles/material/file")?s:`${s}/mixdesignd/yunfiles/material/file`}if(typeof window!="undefined"&&((o=window.location)!=null&&o.origin))return`${L(window.location.origin)}/mixdesignd/yunfiles/material/file`;const i="".trim();if(i){const s=L(i);return s.toLowerCase().includes("yunfiles/material/file")?s:`${s}/mixdesignd/yunfiles/material/file`}return`${L("https://yunui.mixyun.top")}/mixdesignd/yunfiles/material/file`}function ue(e){if(!(e!=null&&e.trim()))return"";let t=String(e).trim().replace(/\\/g,"/");t=t.replace(/^\/+/,"");const i=t.toLowerCase(),r=a=>{const _=a.toLowerCase();if(i.startsWith(_))return t.slice(a.length).replace(/^\/+/,"");const g=i.indexOf("/"+_);return g>=0?t.slice(g+1+a.length).replace(/^\/+/,""):null};let o=r("mixdesignd/yunfiles/material/file/");if(o!=null||(o=r("mixservice/storage/yunfiles/material/file/"),o!=null)||(o=r("yunfiles/material/file/"),o!=null))return o;const s="mixservice/storage/material/mixyun_dashboard/",u=i.indexOf(s);return u>=0?t.slice(u+s.length).replace(/^\/+/,""):i.startsWith("mixdesignd/")&&(t=t.slice(11),t.toLowerCase().startsWith("yunfiles/material/file/"))?t.slice(23).replace(/^\/+/,""):t.replace(/^\/+/,"")}function q(e){return e.split("/").filter(Boolean).map(t=>{try{return encodeURIComponent(decodeURIComponent(t))}catch(i){return encodeURIComponent(t)}}).join("/")}function P(e){if(!(e!=null&&e.trim()))return"";const t=e.trim();if(t.startsWith("data:")||t.startsWith("blob:"))return t;if(t.startsWith("http://")||t.startsWith("https://"))try{const o=new URL(t),s=q(o.pathname.replace(/^\/+/,""));return o.pathname="/"+s,o.toString()}catch(o){return t}const i=q(ue(t));return i?`${de()}/${i}`.replace(/([^:])\/{2,}/g,"$1/"):""}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const he=Symbol(process.env.NODE_ENV!=="production"?"route location":"");process.env.NODE_ENV;function pe(e){return n.inject(he)}const A=e=>{const t=typeof e=="string"?Number(e):e;return t===0||t===200},_e=(e,t)=>{if(e&&String(e).trim()){const i=String(e).trim();if(i.startsWith("http://")||i.startsWith("https://"))try{return new URL(i).pathname||""}catch(r){return i}return i.startsWith("/")?i:`/${i}`}return t?`/yunfiles/material/file/${t}`:""},fe={uploadFile(e){return c(this,null,function*(){var r;const t=new FormData;t.append("file",e);const i=yield y.api.upload(t,!0);if(A(i.code)&&((r=i.result)!=null&&r.url))return i.result.url;throw new Error(i.msg||"文件上传失败")})},uploadMaterialGetPath(e,t){return c(this,null,function*(){var s,u;const r={material_data:e.includes(",")?e.split(",")[1]:e,material_type:t||"png"},o=yield y.api.post("upload_material",r,!0);if(A(o.code)&&o.result){const a=o.result,_=_e(a.material_path||a.relative_path||"",a.file_id);if(_)return E(b({},a),{material_path:_,material_size:(u=(s=a.material_size)!=null?s:a.file_size)!=null?u:0,material_type:a.material_type||a.mime_type||t||"png",name:a.name||a.file_name||""})}throw new Error(o.info||o.msg||"上传原图获取路径失败")})},createMaterial(e){return c(this,null,function*(){var i;const t=yield y.api.post("create_dashboard_material",e,!0);if(A(t.code)&&((i=t.result)!=null&&i.uid))return t.result;throw new Error(t.info||t.msg||"创建素材失败")})},uploadAndCreateMaterial(i){return c(this,arguments,function*(e,t={}){var u;const r=((u=e.name.split(".").pop())==null?void 0:u.toLowerCase())||"png",o=yield this._fileToBase64(e),s=yield this.uploadMaterialGetPath(o,r);if(s.uid)return{uid:s.uid};throw new Error("upload_material 未返回 uid")})},_fileToBase64(e){return new Promise((t,i)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>i(new Error("文件读取失败")),r.readAsDataURL(e)})},getMaterialList(){return c(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_dashboard_material_list",t)})},getMyMaterialList(){return c(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_my_dashboard_material_list",t)})},getMaterialItem(e){return c(this,null,function*(){return yield y.api.post("get_dashboard_material_item",{uid:e})})},updateMaterial(e){return c(this,null,function*(){return yield y.api.post("update_dashboard_material",e,!0)})},deleteMaterial(e){return c(this,null,function*(){return yield y.api.post("delete_dashboard_material",{uid:e},!0)})},deleteMaterialByPath(e){return c(this,null,function*(){var i;if(!e||!String(e).trim())return;const t=String(e).replace(/^\//,"");try{const r=yield this.getMyMaterialList({page_index:1,page_size:10,where_and:JSON.stringify([["material_path","=",t]])}),o=(i=r==null?void 0:r.result)==null?void 0:i.data;Array.isArray(o)&&o.length>0&&o[0].uid&&(yield this.deleteMaterial(o[0].uid))}catch(r){}})}},j={_buildWhereAnd(e){return JSON.stringify(e.filter(([,,t])=>t!=null))},_isEmptyId(e){return e==null||String(e).trim()===""},_isComponentLevel(e){return!this._isEmptyId(e.component_id)},_isLayerLevel(e){return this._isEmptyId(e.component_id)&&!this._isEmptyId(e.layer_id)},_isSheetLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&!this._isEmptyId(e.sheet_id)},_isDashboardLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&this._isEmptyId(e.sheet_id)},_listRelations(e){return c(this,null,function*(){var i;const t=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:e});return((i=t==null?void 0:t.result)==null?void 0:i.data)||[]})},_deleteByUid(e,t){return c(this,null,function*(){t&&(yield this.deleteMaterialRelation({dashboard_record_uid:e,uid:t}))})},_deleteByRelation(e){return c(this,null,function*(){e!=null&&e.dashboard_record_uid&&(yield this.deleteMaterialRelation({dashboard_record_uid:e.dashboard_record_uid,dashboard_id:e.dashboard_id,sheet_id:e.sheet_id,layer_id:e.layer_id,component_id:e.component_id,uid:e.uid}))})},_deleteRelationList(e,t){return c(this,null,function*(){for(const i of t)yield this._deleteByUid(e,i.uid)})},createMaterialRelation(e){return c(this,null,function*(){return yield y.api.post("create_dashboard_materials_relation",e,!0)})},deleteMaterialRelation(e){return c(this,null,function*(){return yield y.api.post("delete_dashboard_materials_relation",e,!0)})},getMaterialRelationList(){return c(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return!e.order_by&&!e.order_type&&e.order?t.order=e.order:delete t.order,yield y.api.post("get_my_dashboard_materials_relation_list",t)})},getMaterialRelationsByDashboard(i){return c(this,arguments,function*(e,t={}){const r=JSON.stringify([["dashboard_record_uid","=",e]]);return yield this.getMaterialRelationList(E(b({},t),{where_and:r}))})},getMaterialRelationByComponent(r,o){return c(this,arguments,function*(e,t,i={}){const s=JSON.stringify([["dashboard_record_uid","=",e],["component_id","=",t]]);return yield this.getMaterialRelationList(E(b({},i),{where_and:s}))})},getRelationsByMaterial(e){return c(this,null,function*(){var r;if(!e)return[];const t=JSON.stringify([["material_uid","=",e]]),i=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:t});return((r=i==null?void 0:i.result)==null?void 0:r.data)||[]})},getMaterialUsageSummary(e){return c(this,null,function*(){const t=yield this.getRelationsByMaterial(e),i=new Set;return t.forEach(r=>{const o=String(r.dashboard_record_uid||"").trim();o&&i.add(o)}),{relationCount:t.length,dashboardCount:i.size,relations:t}})},deleteAllRelationsByMaterial(e){return c(this,null,function*(){const t=yield this.getRelationsByMaterial(e);for(const i of t)!(i!=null&&i.uid)||!(i!=null&&i.dashboard_record_uid)||(yield this.deleteMaterialRelation({dashboard_record_uid:i.dashboard_record_uid,uid:i.uid}));return t.length})},deleteAllRelationsByDashboard(e){return c(this,null,function*(){return yield this.deleteRelationsByDashboardHierarchy(e)})},deleteRelationByComponent(e,t){return c(this,null,function*(){return yield this.deleteMaterialRelation({dashboard_record_uid:e,component_id:t})})},deleteComponentRelations(e,t,i,r){return c(this,null,function*(){if(!e||!t||!i||!r)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",i],["component_id","=",r]]),s=yield this._listRelations(o);for(const u of s)yield this._deleteByRelation(u)})},deleteLayerLevelRelations(e,t,i){return c(this,null,function*(){if(!e||!t||!i)return;const r=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",i]]),s=(yield this._listRelations(r)).filter(u=>this._isLayerLevel(u));for(const u of s)yield this._deleteByRelation(u)})},deleteSheetLevelRelations(e,t){return c(this,null,function*(){if(!e||!t)return;const i=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),o=(yield this._listRelations(i)).filter(s=>this._isSheetLevel(s));for(const s of o)yield this._deleteByRelation(s)})},deleteDashboardLevelRelations(e){return c(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),r=(yield this._listRelations(t)).filter(o=>this._isDashboardLevel(o));for(const o of r)yield this._deleteByRelation(o)})},deleteRelationsByLayerHierarchy(e,t,i){return c(this,null,function*(){if(!e||!t||!i)return;const r=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",i]]),o=yield this._listRelations(r),s=o.filter(a=>this._isComponentLevel(a)),u=o.filter(a=>this._isLayerLevel(a));for(const a of s)yield this._deleteByRelation(a);for(const a of u)yield this._deleteByRelation(a)})},deleteRelationsBySheetHierarchy(e,t){return c(this,null,function*(){if(!e||!t)return;const i=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),r=yield this._listRelations(i),o=r.filter(a=>this._isComponentLevel(a)),s=r.filter(a=>this._isLayerLevel(a)),u=r.filter(a=>this._isSheetLevel(a));for(const a of o)yield this._deleteByRelation(a);for(const a of s)yield this._deleteByRelation(a);for(const a of u)yield this._deleteByRelation(a)})},deleteRelationsByDashboardHierarchy(e){return c(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),i=yield this._listRelations(t),r=i.filter(a=>this._isComponentLevel(a)),o=i.filter(a=>this._isLayerLevel(a)),s=i.filter(a=>this._isSheetLevel(a)),u=i.filter(a=>this._isDashboardLevel(a));for(const a of r)yield this._deleteByRelation(a);for(const a of o)yield this._deleteByRelation(a);for(const a of s)yield this._deleteByRelation(a);for(const a of u)yield this._deleteByRelation(a)})}},me=n.ref(!1),ye=n.ref("all");function ge(e="all"){return ye.value=e,me.value=!0,new Promise(t=>{})}const ve={class:"mix-body"},we={class:"upload-content"},be={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},Re={class:"upload-text"},Se={key:0,class:"upload-actions"},Me={key:1,class:"viewer-container"},Le={key:0,class:"file-info"},Ee={class:"file-name"},Ne=["title"],Ce=["src","alt"],Be={DEFAULT_ICON:T.DEFAULT_ICON,ACTIVE_ICON:T.ACTIVE_ICON,NAME_CN:"图片查看器",NAME_EN:"Photo Viewer",ORDER:2},xe={imageDisplayMode:{value:"center",type:"select",options:[{label:"component.photo.center",value:"center"},{label:"component.photo.tile",value:"tile"},{label:"component.photo.stretch",value:"stretch"}],label:"component.options.imageDisplayMode"},fileUrl:{value:"",type:"string",label:"component.options.fileUrl",placeholder:"请上传素材"},fileName:{value:"",type:"string",label:"component.options.fileName",placeholder:"请上传素材"},materialUid:{value:"",type:"string",label:"component.options.materialUid",placeholder:"素材UID"}},Ae=[],Ue=[],Ie=[],De=null,ke={DEFAULT:Be,OPTIONS:xe,DATA:Ae,PARAMS:Ue,SOURCE:Ie,COMMON:De},Oe=n.defineComponent(E(b({},ke),{__name:"photo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(e){const{t}=le.useI18n(),i=y.useCounterStore(),r=pe(),o=e;class s extends se.BaseComponent{extractStyles(){return{imageDisplayMode:this.getOptionValue("imageDisplayMode","center"),radiusSize:this.getOptionValue("radiusSize",0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),J()}}const u=new s(o,"photo");u.setupLifecycle();const a=u.getStyle(),_=n.ref(null),g=n.ref(""),f=n.ref(""),R=n.ref(""),U=n.ref(!1),I=n.ref(!1),H=l=>P(l),J=()=>c(null,null,function*(){var d,h,p;const{conf:l}=o;(h=(d=l==null?void 0:l.options)==null?void 0:d.fileUrl)!=null&&h.value&&(g.value=H(l.options.fileUrl.value),yield k(),R.value=((p=l.options.fileName)==null?void 0:p.value)||"")}),D=l=>{l&&l.startsWith("blob:")&&URL.revokeObjectURL(l)},k=()=>c(null,null,function*(){if(g.value)try{const l=y.resolveHttpAuthToken();if(!l){f.value="";return}const d=yield fetch(g.value,{mode:"cors",credentials:"include",headers:{Authorization:`Bearer ${l}`}});if(!d.ok)throw new Error(`load image failed: ${d.status}`);const h=yield d.blob(),p=URL.createObjectURL(h);D(f.value),f.value=p}catch(l){console.error("[Photo] 拉取图片失败:",l),D(f.value),f.value=""}}),G=n.computed(()=>({width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})),X=n.computed(()=>{var d;const l=(d=a==null?void 0:a.value)==null?void 0:d.imageDisplayMode;return l==="tile"?{display:"none"}:l==="stretch"?{width:"100%",height:"100%",objectFit:"fill"}:{width:"100%",height:"100%",objectFit:"contain"}}),Z=n.computed(()=>{var l;return((l=a==null?void 0:a.value)==null?void 0:l.imageDisplayMode)!=="tile"||!f.value?{}:{width:"100%",height:"100%",backgroundImage:`url(${f.value})`,backgroundRepeat:"repeat",backgroundPosition:"center center"}}),O=n.computed(()=>{const l=r.params.id;return l?String(l):""}),z=l=>{var h;const d=((h=i.pageData)==null?void 0:h.sheets)||[];for(const p of d){const v=p.id,S=p.caption||p.name||p.id,N=p.layers||[];for(const w of N){const C=w.id,B=w.caption||w.name||w.id,x=w.components||[];for(const m of x)if((m==null?void 0:m.id)===l){const M=m.caption||m.name||m.id;return{sheetId:v,layerId:C,sheetName:S,layerName:B,componentName:M}}}}return{sheetId:"",layerId:"",sheetName:"",layerName:"",componentName:""}},K=l=>c(null,null,function*(){var v;if(!O.value)return;const d=o.uid||((v=o.conf)==null?void 0:v.id);if(!d||!l)return;const{sheetId:h,layerId:p}=z(d);try{yield j.deleteComponentRelations(O.value,h,p,d),yield j.createMaterialRelation({dashboard_record_uid:O.value,material_uid:l,sheet_id:h||void 0,layer_id:p||void 0,component_id:d})}catch(S){console.warn("[Photo] 同步素材关联失败:",S)}}),W=()=>c(null,null,function*(){try{const l=yield ge("image");if(l){if(console.log("[Photo] 选中的素材:",l),console.log("[Photo] material_path:",l.material_path),console.log("[Photo] thumbnail:",l.thumbnail),console.log("[Photo] file_id:",l.file_id),!l.material_path){V.ElMessage.warning("该素材缺少 material_path,无法获取原图"),console.warn("[Photo] 素材缺少 material_path");return}const d=String(l.material_path).trim(),h=P(d);console.log("[Photo] 原图URL:",h),g.value=h,yield k(),R.value=l.name,o.conf&&o.conf.options&&(o.conf.options.fileUrl||(o.conf.options.fileUrl={value:"",type:"string",label:""}),o.conf.options.fileName||(o.conf.options.fileName={value:"",type:"string",label:""}),o.conf.options.materialUid||(o.conf.options.materialUid={value:"",type:"string",label:""}),o.conf.options.fileUrl.value=d,o.conf.options.fileName.value=l.name,o.conf.options.materialUid.value=l.uid,console.log("[Photo] 配置已保存:",{fileUrl:o.conf.options.fileUrl.value,fileName:o.conf.options.fileName.value,materialUid:o.conf.options.materialUid.value})),console.log("[Photo] uploadedFileUrl.value:",f.value),V.ElMessage.success(t("component.photo.materialSelected")||"素材选择成功"),yield K(l.uid)}else console.log("[Photo] 用户取消选择")}catch(l){console.error("[Photo] 素材选择失败:",l),V.ElMessage.error("素材选择失败")}}),Q=()=>{D(f.value),f.value="",g.value="",R.value="",o.mode!=="preview"&&W()},Y=()=>{U.value=!1,_.value,console.log("图片加载成功")},ee=l=>{var v,S,N,w,C,B,x;if(console.error("图片加载失败:",l),U.value||I.value)return;const d=o.uid||((v=o.conf)==null?void 0:v.id)||"",h=d?z(d):null;h&&(h.sheetName||h.layerName||h.componentName)?`${h.sheetName||"-"}${h.layerName||"-"}${h.componentName||"-"}`:R.value;const p=String(((w=(N=(S=o.conf)==null?void 0:S.options)==null?void 0:N.materialUid)==null?void 0:w.value)||((x=(B=(C=o.conf)==null?void 0:C.options)==null?void 0:B.imageUid)==null?void 0:x.value)||"").trim();p&&(I.value=!0,fe.getMaterialItem(p).then(m=>{if(A(m==null?void 0:m.code)&&(m!=null&&m.result)){const M=m.result;M!=null&&M.material_path&&(g.value=P(String(M.material_path).trim()),k());return}U.value=!0}).catch(()=>{}).finally(()=>{I.value=!1}))};return n.onMounted(()=>{}),n.onBeforeUnmount(()=>{f.value&&f.value.startsWith("blob:")&&URL.revokeObjectURL(f.value)}),(l,d)=>{var p,v;const h=re.ElButton;return n.openBlock(),n.createElementBlock("div",{class:"mix-component",style:n.normalizeStyle({borderRadius:`${n.unref(a).radiusSize}px`})},[n.createElementVNode("div",ve,[f.value?(n.openBlock(),n.createElementBlock("div",Me,[o.mode!=="preview"?(n.openBlock(),n.createElementBlock("div",Le,[n.createElementVNode("span",Ee,n.toDisplayString(R.value),1),n.createElementVNode("button",{class:"change-file-btn",onClick:Q,title:n.unref(t)("component.photo.changeFile")||"更换文件"},[...d[1]||(d[1]=[n.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[n.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)])],8,Ne)])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"image-container",style:n.normalizeStyle(G.value)},[n.createElementVNode("img",{ref_key:"imageRef",ref:_,src:f.value,alt:R.value,style:n.normalizeStyle(X.value),onLoad:Y,onError:ee},null,44,Ce),((v=(p=n.unref(a))==null?void 0:p.value)==null?void 0:v.imageDisplayMode)==="tile"?(n.openBlock(),n.createElementBlock("div",{key:0,class:"tiled-background",style:n.normalizeStyle(Z.value)},null,4)):n.createCommentVNode("",!0)],4)])):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["upload-area",{"preview-mode":o.mode==="preview"}])},[n.createElementVNode("div",we,[(n.openBlock(),n.createElementBlock("svg",be,[...d[0]||(d[0]=[n.createElementVNode("path",{d:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"},null,-1)])])),n.createElementVNode("p",Re,n.toDisplayString(o.mode==="preview"?"未上传素材":n.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1),o.mode!=="preview"?(n.openBlock(),n.createElementBlock("div",Se,[n.createVNode(h,{type:"primary",size:"small",onClick:W},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1)]),_:1})])):n.createCommentVNode("",!0)])],2))]),n.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ve=y._export_sfc(Oe,[["__scopeId","data-v-c449a1c6"]]);exports.default=Ve;
|
|
1
|
+
"use strict";var te=Object.defineProperty,ie=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var F=(e,t,i)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,b=(e,t)=>{for(var i in t||(t={}))ae.call(t,i)&&F(e,i,t[i]);if($)for(var i of $(t))ne.call(t,i)&&F(e,i,t[i]);return e},E=(e,t)=>ie(e,oe(t));var c=(e,t,i)=>new Promise((r,o)=>{var s=_=>{try{a(i.next(_))}catch(g){o(g)}},u=_=>{try{a(i.throw(_))}catch(g){o(g)}},a=_=>_.done?r(_.value):Promise.resolve(_.value).then(s,u);a((i=i.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const re=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");const n=require("vue"),le=require("./vue-i18n-BvHMBi_b.cjs"),se=require("./BaseComponent-CNXUpPY1.cjs"),y=require("./index-D8dh_6Qd.cjs"),V=require("element-plus"),T=require("./ele-bmp-icon-BBI0-SX7.cjs");function L(e){return e.replace(/\/$/,"")}function ce(){return typeof window=="undefined"?!1:window.__MIXUI_MATERIAL_USE_MIXSERVICE_STORAGE__===!0}function de(){var r,o;const e="".trim();if(e)return L(e);if(ce()&&typeof window!="undefined"&&((r=window.location)!=null&&r.origin))return`${L(window.location.origin)}/mixservice/storage/yunfiles/material/file`;const t="".trim();if(t){const s=L(t);return s.toLowerCase().includes("yunfiles/material/file")?s:`${s}/mixdesignd/yunfiles/material/file`}if(typeof window!="undefined"&&((o=window.location)!=null&&o.origin))return`${L(window.location.origin)}/mixdesignd/yunfiles/material/file`;const i="".trim();if(i){const s=L(i);return s.toLowerCase().includes("yunfiles/material/file")?s:`${s}/mixdesignd/yunfiles/material/file`}return`${L("https://yunui.mixyun.top")}/mixdesignd/yunfiles/material/file`}function ue(e){if(!(e!=null&&e.trim()))return"";let t=String(e).trim().replace(/\\/g,"/");t=t.replace(/^\/+/,"");const i=t.toLowerCase(),r=a=>{const _=a.toLowerCase();if(i.startsWith(_))return t.slice(a.length).replace(/^\/+/,"");const g=i.indexOf("/"+_);return g>=0?t.slice(g+1+a.length).replace(/^\/+/,""):null};let o=r("mixdesignd/yunfiles/material/file/");if(o!=null||(o=r("mixservice/storage/yunfiles/material/file/"),o!=null)||(o=r("yunfiles/material/file/"),o!=null))return o;const s="mixservice/storage/material/mixyun_dashboard/",u=i.indexOf(s);return u>=0?t.slice(u+s.length).replace(/^\/+/,""):i.startsWith("mixdesignd/")&&(t=t.slice(11),t.toLowerCase().startsWith("yunfiles/material/file/"))?t.slice(23).replace(/^\/+/,""):t.replace(/^\/+/,"")}function q(e){return e.split("/").filter(Boolean).map(t=>{try{return encodeURIComponent(decodeURIComponent(t))}catch(i){return encodeURIComponent(t)}}).join("/")}function P(e){if(!(e!=null&&e.trim()))return"";const t=e.trim();if(t.startsWith("data:")||t.startsWith("blob:"))return t;if(t.startsWith("http://")||t.startsWith("https://"))try{const o=new URL(t),s=q(o.pathname.replace(/^\/+/,""));return o.pathname="/"+s,o.toString()}catch(o){return t}const i=q(ue(t));return i?`${de()}/${i}`.replace(/([^:])\/{2,}/g,"$1/"):""}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const he=Symbol(process.env.NODE_ENV!=="production"?"route location":"");process.env.NODE_ENV;function pe(e){return n.inject(he)}const A=e=>{const t=typeof e=="string"?Number(e):e;return t===0||t===200},_e=(e,t)=>{if(e&&String(e).trim()){const i=String(e).trim();if(i.startsWith("http://")||i.startsWith("https://"))try{return new URL(i).pathname||""}catch(r){return i}return i.startsWith("/")?i:`/${i}`}return t?`/yunfiles/material/file/${t}`:""},fe={uploadFile(e){return c(this,null,function*(){var r;const t=new FormData;t.append("file",e);const i=yield y.api.upload(t,!0);if(A(i.code)&&((r=i.result)!=null&&r.url))return i.result.url;throw new Error(i.msg||"文件上传失败")})},uploadMaterialGetPath(e,t){return c(this,null,function*(){var s,u;const r={material_data:e.includes(",")?e.split(",")[1]:e,material_type:t||"png"},o=yield y.api.post("upload_material",r,!0);if(A(o.code)&&o.result){const a=o.result,_=_e(a.material_path||a.relative_path||"",a.file_id);if(_)return E(b({},a),{material_path:_,material_size:(u=(s=a.material_size)!=null?s:a.file_size)!=null?u:0,material_type:a.material_type||a.mime_type||t||"png",name:a.name||a.file_name||""})}throw new Error(o.info||o.msg||"上传原图获取路径失败")})},createMaterial(e){return c(this,null,function*(){var i;const t=yield y.api.post("create_dashboard_material",e,!0);if(A(t.code)&&((i=t.result)!=null&&i.uid))return t.result;throw new Error(t.info||t.msg||"创建素材失败")})},uploadAndCreateMaterial(i){return c(this,arguments,function*(e,t={}){var u;const r=((u=e.name.split(".").pop())==null?void 0:u.toLowerCase())||"png",o=yield this._fileToBase64(e),s=yield this.uploadMaterialGetPath(o,r);if(s.uid)return{uid:s.uid};throw new Error("upload_material 未返回 uid")})},_fileToBase64(e){return new Promise((t,i)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>i(new Error("文件读取失败")),r.readAsDataURL(e)})},getMaterialList(){return c(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_dashboard_material_list",t)})},getMyMaterialList(){return c(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_my_dashboard_material_list",t)})},getMaterialItem(e){return c(this,null,function*(){return yield y.api.post("get_dashboard_material_item",{uid:e})})},updateMaterial(e){return c(this,null,function*(){return yield y.api.post("update_dashboard_material",e,!0)})},deleteMaterial(e){return c(this,null,function*(){return yield y.api.post("delete_dashboard_material",{uid:e},!0)})},deleteMaterialByPath(e){return c(this,null,function*(){var i;if(!e||!String(e).trim())return;const t=String(e).replace(/^\//,"");try{const r=yield this.getMyMaterialList({page_index:1,page_size:10,where_and:JSON.stringify([["material_path","=",t]])}),o=(i=r==null?void 0:r.result)==null?void 0:i.data;Array.isArray(o)&&o.length>0&&o[0].uid&&(yield this.deleteMaterial(o[0].uid))}catch(r){}})}},j={_buildWhereAnd(e){return JSON.stringify(e.filter(([,,t])=>t!=null))},_isEmptyId(e){return e==null||String(e).trim()===""},_isComponentLevel(e){return!this._isEmptyId(e.component_id)},_isLayerLevel(e){return this._isEmptyId(e.component_id)&&!this._isEmptyId(e.layer_id)},_isSheetLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&!this._isEmptyId(e.sheet_id)},_isDashboardLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&this._isEmptyId(e.sheet_id)},_listRelations(e){return c(this,null,function*(){var i;const t=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:e});return((i=t==null?void 0:t.result)==null?void 0:i.data)||[]})},_deleteByUid(e,t){return c(this,null,function*(){t&&(yield this.deleteMaterialRelation({dashboard_record_uid:e,uid:t}))})},_deleteByRelation(e){return c(this,null,function*(){e!=null&&e.dashboard_record_uid&&(yield this.deleteMaterialRelation({dashboard_record_uid:e.dashboard_record_uid,dashboard_id:e.dashboard_id,sheet_id:e.sheet_id,layer_id:e.layer_id,component_id:e.component_id,uid:e.uid}))})},_deleteRelationList(e,t){return c(this,null,function*(){for(const i of t)yield this._deleteByUid(e,i.uid)})},createMaterialRelation(e){return c(this,null,function*(){return yield y.api.post("create_dashboard_materials_relation",e,!0)})},deleteMaterialRelation(e){return c(this,null,function*(){return yield y.api.post("delete_dashboard_materials_relation",e,!0)})},getMaterialRelationList(){return c(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return!e.order_by&&!e.order_type&&e.order?t.order=e.order:delete t.order,yield y.api.post("get_my_dashboard_materials_relation_list",t)})},getMaterialRelationsByDashboard(i){return c(this,arguments,function*(e,t={}){const r=JSON.stringify([["dashboard_record_uid","=",e]]);return yield this.getMaterialRelationList(E(b({},t),{where_and:r}))})},getMaterialRelationByComponent(r,o){return c(this,arguments,function*(e,t,i={}){const s=JSON.stringify([["dashboard_record_uid","=",e],["component_id","=",t]]);return yield this.getMaterialRelationList(E(b({},i),{where_and:s}))})},getRelationsByMaterial(e){return c(this,null,function*(){var r;if(!e)return[];const t=JSON.stringify([["material_uid","=",e]]),i=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:t});return((r=i==null?void 0:i.result)==null?void 0:r.data)||[]})},getMaterialUsageSummary(e){return c(this,null,function*(){const t=yield this.getRelationsByMaterial(e),i=new Set;return t.forEach(r=>{const o=String(r.dashboard_record_uid||"").trim();o&&i.add(o)}),{relationCount:t.length,dashboardCount:i.size,relations:t}})},deleteAllRelationsByMaterial(e){return c(this,null,function*(){const t=yield this.getRelationsByMaterial(e);for(const i of t)!(i!=null&&i.uid)||!(i!=null&&i.dashboard_record_uid)||(yield this.deleteMaterialRelation({dashboard_record_uid:i.dashboard_record_uid,uid:i.uid}));return t.length})},deleteAllRelationsByDashboard(e){return c(this,null,function*(){return yield this.deleteRelationsByDashboardHierarchy(e)})},deleteRelationByComponent(e,t){return c(this,null,function*(){return yield this.deleteMaterialRelation({dashboard_record_uid:e,component_id:t})})},deleteComponentRelations(e,t,i,r){return c(this,null,function*(){if(!e||!t||!i||!r)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",i],["component_id","=",r]]),s=yield this._listRelations(o);for(const u of s)yield this._deleteByRelation(u)})},deleteLayerLevelRelations(e,t,i){return c(this,null,function*(){if(!e||!t||!i)return;const r=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",i]]),s=(yield this._listRelations(r)).filter(u=>this._isLayerLevel(u));for(const u of s)yield this._deleteByRelation(u)})},deleteSheetLevelRelations(e,t){return c(this,null,function*(){if(!e||!t)return;const i=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),o=(yield this._listRelations(i)).filter(s=>this._isSheetLevel(s));for(const s of o)yield this._deleteByRelation(s)})},deleteDashboardLevelRelations(e){return c(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),r=(yield this._listRelations(t)).filter(o=>this._isDashboardLevel(o));for(const o of r)yield this._deleteByRelation(o)})},deleteRelationsByLayerHierarchy(e,t,i){return c(this,null,function*(){if(!e||!t||!i)return;const r=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",i]]),o=yield this._listRelations(r),s=o.filter(a=>this._isComponentLevel(a)),u=o.filter(a=>this._isLayerLevel(a));for(const a of s)yield this._deleteByRelation(a);for(const a of u)yield this._deleteByRelation(a)})},deleteRelationsBySheetHierarchy(e,t){return c(this,null,function*(){if(!e||!t)return;const i=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),r=yield this._listRelations(i),o=r.filter(a=>this._isComponentLevel(a)),s=r.filter(a=>this._isLayerLevel(a)),u=r.filter(a=>this._isSheetLevel(a));for(const a of o)yield this._deleteByRelation(a);for(const a of s)yield this._deleteByRelation(a);for(const a of u)yield this._deleteByRelation(a)})},deleteRelationsByDashboardHierarchy(e){return c(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),i=yield this._listRelations(t),r=i.filter(a=>this._isComponentLevel(a)),o=i.filter(a=>this._isLayerLevel(a)),s=i.filter(a=>this._isSheetLevel(a)),u=i.filter(a=>this._isDashboardLevel(a));for(const a of r)yield this._deleteByRelation(a);for(const a of o)yield this._deleteByRelation(a);for(const a of s)yield this._deleteByRelation(a);for(const a of u)yield this._deleteByRelation(a)})}},me=n.ref(!1),ye=n.ref("all");function ge(e="all"){return ye.value=e,me.value=!0,new Promise(t=>{})}const ve={class:"mix-body"},we={class:"upload-content"},be={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},Re={class:"upload-text"},Se={key:0,class:"upload-actions"},Me={key:1,class:"viewer-container"},Le={key:0,class:"file-info"},Ee={class:"file-name"},Ne=["title"],Ce=["src","alt"],Be={DEFAULT_ICON:T.DEFAULT_ICON,ACTIVE_ICON:T.ACTIVE_ICON,NAME_CN:"图片查看器",NAME_EN:"Photo Viewer",ORDER:2},xe={imageDisplayMode:{value:"center",type:"select",options:[{label:"component.photo.center",value:"center"},{label:"component.photo.tile",value:"tile"},{label:"component.photo.stretch",value:"stretch"}],label:"component.options.imageDisplayMode"},fileUrl:{value:"",type:"string",label:"component.options.fileUrl",placeholder:"请上传素材"},fileName:{value:"",type:"string",label:"component.options.fileName",placeholder:"请上传素材"},materialUid:{value:"",type:"string",label:"component.options.materialUid",placeholder:"素材UID"}},Ae=[],Ue=[],Ie=[],De=null,ke={DEFAULT:Be,OPTIONS:xe,DATA:Ae,PARAMS:Ue,SOURCE:Ie,COMMON:De},Oe=n.defineComponent(E(b({},ke),{__name:"photo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(e){const{t}=le.useI18n(),i=y.useCounterStore(),r=pe(),o=e;class s extends se.BaseComponent{extractStyles(){return{imageDisplayMode:this.getOptionValue("imageDisplayMode","center"),radiusSize:this.getOptionValue("radiusSize",0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),J()}}const u=new s(o,"photo");u.setupLifecycle();const a=u.getStyle(),_=n.ref(null),g=n.ref(""),f=n.ref(""),R=n.ref(""),U=n.ref(!1),I=n.ref(!1),H=l=>P(l),J=()=>c(null,null,function*(){var d,h,p;const{conf:l}=o;(h=(d=l==null?void 0:l.options)==null?void 0:d.fileUrl)!=null&&h.value&&(g.value=H(l.options.fileUrl.value),yield k(),R.value=((p=l.options.fileName)==null?void 0:p.value)||"")}),D=l=>{l&&l.startsWith("blob:")&&URL.revokeObjectURL(l)},k=()=>c(null,null,function*(){if(g.value)try{const l=y.resolveHttpAuthToken();if(!l){f.value="";return}const d=yield fetch(g.value,{mode:"cors",credentials:"include",headers:{Authorization:`Bearer ${l}`}});if(!d.ok)throw new Error(`load image failed: ${d.status}`);const h=yield d.blob(),p=URL.createObjectURL(h);D(f.value),f.value=p}catch(l){console.error("[Photo] 拉取图片失败:",l),D(f.value),f.value=""}}),G=n.computed(()=>({width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})),X=n.computed(()=>{var d;const l=(d=a==null?void 0:a.value)==null?void 0:d.imageDisplayMode;return l==="tile"?{display:"none"}:l==="stretch"?{width:"100%",height:"100%",objectFit:"fill"}:{width:"100%",height:"100%",objectFit:"contain"}}),Z=n.computed(()=>{var l;return((l=a==null?void 0:a.value)==null?void 0:l.imageDisplayMode)!=="tile"||!f.value?{}:{width:"100%",height:"100%",backgroundImage:`url(${f.value})`,backgroundRepeat:"repeat",backgroundPosition:"center center"}}),O=n.computed(()=>{const l=r.params.id;return l?String(l):""}),z=l=>{var h;const d=((h=i.pageData)==null?void 0:h.sheets)||[];for(const p of d){const v=p.id,S=p.caption||p.name||p.id,N=p.layers||[];for(const w of N){const C=w.id,B=w.caption||w.name||w.id,x=w.components||[];for(const m of x)if((m==null?void 0:m.id)===l){const M=m.caption||m.name||m.id;return{sheetId:v,layerId:C,sheetName:S,layerName:B,componentName:M}}}}return{sheetId:"",layerId:"",sheetName:"",layerName:"",componentName:""}},K=l=>c(null,null,function*(){var v;if(!O.value)return;const d=o.uid||((v=o.conf)==null?void 0:v.id);if(!d||!l)return;const{sheetId:h,layerId:p}=z(d);try{yield j.deleteComponentRelations(O.value,h,p,d),yield j.createMaterialRelation({dashboard_record_uid:O.value,material_uid:l,sheet_id:h||void 0,layer_id:p||void 0,component_id:d})}catch(S){console.warn("[Photo] 同步素材关联失败:",S)}}),W=()=>c(null,null,function*(){try{const l=yield ge("image");if(l){if(console.log("[Photo] 选中的素材:",l),console.log("[Photo] material_path:",l.material_path),console.log("[Photo] thumbnail:",l.thumbnail),console.log("[Photo] file_id:",l.file_id),!l.material_path){V.ElMessage.warning("该素材缺少 material_path,无法获取原图"),console.warn("[Photo] 素材缺少 material_path");return}const d=String(l.material_path).trim(),h=P(d);console.log("[Photo] 原图URL:",h),g.value=h,yield k(),R.value=l.name,o.conf&&o.conf.options&&(o.conf.options.fileUrl||(o.conf.options.fileUrl={value:"",type:"string",label:""}),o.conf.options.fileName||(o.conf.options.fileName={value:"",type:"string",label:""}),o.conf.options.materialUid||(o.conf.options.materialUid={value:"",type:"string",label:""}),o.conf.options.fileUrl.value=d,o.conf.options.fileName.value=l.name,o.conf.options.materialUid.value=l.uid,console.log("[Photo] 配置已保存:",{fileUrl:o.conf.options.fileUrl.value,fileName:o.conf.options.fileName.value,materialUid:o.conf.options.materialUid.value})),console.log("[Photo] uploadedFileUrl.value:",f.value),V.ElMessage.success(t("component.photo.materialSelected")||"素材选择成功"),yield K(l.uid)}else console.log("[Photo] 用户取消选择")}catch(l){console.error("[Photo] 素材选择失败:",l),V.ElMessage.error("素材选择失败")}}),Q=()=>{D(f.value),f.value="",g.value="",R.value="",o.mode!=="preview"&&W()},Y=()=>{U.value=!1,_.value,console.log("图片加载成功")},ee=l=>{var v,S,N,w,C,B,x;if(console.error("图片加载失败:",l),U.value||I.value)return;const d=o.uid||((v=o.conf)==null?void 0:v.id)||"",h=d?z(d):null;h&&(h.sheetName||h.layerName||h.componentName)?`${h.sheetName||"-"}${h.layerName||"-"}${h.componentName||"-"}`:R.value;const p=String(((w=(N=(S=o.conf)==null?void 0:S.options)==null?void 0:N.materialUid)==null?void 0:w.value)||((x=(B=(C=o.conf)==null?void 0:C.options)==null?void 0:B.imageUid)==null?void 0:x.value)||"").trim();p&&(I.value=!0,fe.getMaterialItem(p).then(m=>{if(A(m==null?void 0:m.code)&&(m!=null&&m.result)){const M=m.result;M!=null&&M.material_path&&(g.value=P(String(M.material_path).trim()),k());return}U.value=!0}).catch(()=>{}).finally(()=>{I.value=!1}))};return n.onMounted(()=>{}),n.onBeforeUnmount(()=>{f.value&&f.value.startsWith("blob:")&&URL.revokeObjectURL(f.value)}),(l,d)=>{var p,v;const h=re.ElButton;return n.openBlock(),n.createElementBlock("div",{class:"mix-component",style:n.normalizeStyle({borderRadius:`${n.unref(a).radiusSize}px`})},[n.createElementVNode("div",ve,[f.value?(n.openBlock(),n.createElementBlock("div",Me,[o.mode!=="preview"?(n.openBlock(),n.createElementBlock("div",Le,[n.createElementVNode("span",Ee,n.toDisplayString(R.value),1),n.createElementVNode("button",{class:"change-file-btn",onClick:Q,title:n.unref(t)("component.photo.changeFile")||"更换文件"},[...d[1]||(d[1]=[n.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[n.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)])],8,Ne)])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"image-container",style:n.normalizeStyle(G.value)},[n.createElementVNode("img",{ref_key:"imageRef",ref:_,src:f.value,alt:R.value,style:n.normalizeStyle(X.value),onLoad:Y,onError:ee},null,44,Ce),((v=(p=n.unref(a))==null?void 0:p.value)==null?void 0:v.imageDisplayMode)==="tile"?(n.openBlock(),n.createElementBlock("div",{key:0,class:"tiled-background",style:n.normalizeStyle(Z.value)},null,4)):n.createCommentVNode("",!0)],4)])):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["upload-area",{"preview-mode":o.mode==="preview"}])},[n.createElementVNode("div",we,[(n.openBlock(),n.createElementBlock("svg",be,[...d[0]||(d[0]=[n.createElementVNode("path",{d:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"},null,-1)])])),n.createElementVNode("p",Re,n.toDisplayString(o.mode==="preview"?"未上传素材":n.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1),o.mode!=="preview"?(n.openBlock(),n.createElementBlock("div",Se,[n.createVNode(h,{type:"primary",size:"small",onClick:W},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1)]),_:1})])):n.createCommentVNode("",!0)])],2))]),n.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ve=y._export_sfc(Oe,[["__scopeId","data-v-c449a1c6"]]);exports.default=Ve;
|
|
@@ -31,8 +31,8 @@ import "element-plus/es/components/base/style/css";
|
|
|
31
31
|
import "element-plus/es/components/button/style/css";
|
|
32
32
|
import { inject as pe, ref as R, defineComponent as fe, computed as O, onMounted as me, onBeforeUnmount as ye, openBlock as L, createElementBlock as M, normalizeStyle as P, unref as A, createElementVNode as w, normalizeClass as ge, toDisplayString as T, createVNode as we, withCtx as ve, createTextVNode as be, createCommentVNode as j, renderSlot as Re } from "vue";
|
|
33
33
|
import { u as Le } from "./vue-i18n-5Nahpzrm.js";
|
|
34
|
-
import { B as Me } from "./BaseComponent-
|
|
35
|
-
import { a as y, u as Se, r as Ce, _ as Ne } from "./index-
|
|
34
|
+
import { B as Me } from "./BaseComponent-D5tlYehc.js";
|
|
35
|
+
import { a as y, u as Se, r as Ce, _ as Ne } from "./index-Bdq33405.js";
|
|
36
36
|
import { ElMessage as H } from "element-plus";
|
|
37
37
|
import { A as Ee, D as xe } from "./ele-bmp-icon-Pdolk1J5.js";
|
|
38
38
|
function E(e) {
|
|
@@ -11,8 +11,8 @@ var O = (l, a, r) => a in l ? L(l, a, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return l;
|
|
12
12
|
}, d = (l, a) => $(l, k(a));
|
|
13
13
|
import { defineComponent as z, computed as B, openBlock as I, createElementBlock as N, normalizeStyle as _, unref as m, createElementVNode as y, toDisplayString as R, renderSlot as D } from "vue";
|
|
14
|
-
import { k as T, C as H, _ as M } from "./index-
|
|
15
|
-
import { E as P } from "./EChartComponentBase-
|
|
14
|
+
import { k as T, C as H, _ as M } from "./index-Bdq33405.js";
|
|
15
|
+
import { E as P } from "./EChartComponentBase-CAabYXSj.js";
|
|
16
16
|
import { g as U } from "./titleStyle-BT5GlpAb.js";
|
|
17
17
|
import { A as F, D as G } from "./ele-pie-icon-RPfHJxqp.js";
|
|
18
18
|
import { u as K, i as X, a as q } from "./installCanvasRenderer-CLT2hquJ.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var $=Object.defineProperty,I=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var C=(r,a,c)=>a in r?$(r,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[a]=c,d=(r,a)=>{for(var c in a||(a={}))A.call(a,c)&&C(r,c,a[c]);if(w)for(var c of w(a))j.call(a,c)&&C(r,c,a[c]);return r},f=(r,a)=>I(r,N(a));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),b=require("./index-
|
|
1
|
+
"use strict";var $=Object.defineProperty,I=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var C=(r,a,c)=>a in r?$(r,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[a]=c,d=(r,a)=>{for(var c in a||(a={}))A.call(a,c)&&C(r,c,a[c]);if(w)for(var c of w(a))j.call(a,c)&&C(r,c,a[c]);return r},f=(r,a)=>I(r,N(a));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),b=require("./index-D8dh_6Qd.cjs"),k=require("./EChartComponentBase-D4wMej9X.cjs"),z=require("./titleStyle-NSnz6cUg.cjs"),S=require("./ele-pie-icon-BNhXPoUT.cjs"),y=require("./installCanvasRenderer-CyhM1Qpl.cjs"),B=require("./install-DV5cEgNV.cjs"),R=require("./install-CltTFs4e.cjs"),T=require("./install-nDY6w-GK.cjs"),D={class:"mix-body"},q=["id"],P={DEFAULT_ICON:S.DEFAULT_ICON,ACTIVE_ICON:S.ACTIVE_ICON,NAME_CN:"饼状图",NAME_EN:"Pie",ORDER:1},M={titleColor:"#111",textColor:"#111",bgColor:"#fff",radiusSize:8,textSize:12,type:{value:"pie",type:"radio",option:[{value:"pie",label:"component.options.pie_type_pie"},{value:"circle",label:"component.options.pie_type_circle"}],label:"component.options.pie_type"},radius:{value:50,type:"number",label:"component.options.pie_radius",dependent:"type",repel:"circle"},inside:{value:40,type:"number",label:"component.options.pie_inside",dependent:"type",repel:"pie"},outside:{value:75,type:"number",label:"component.options.pie_outside",dependent:"type",repel:"pie"},isHideTitle:!1,showLabel:!1,showLegend:!0,orient:{value:"horizontal",type:"radio",option:[{value:"horizontal",label:"component.options.orient_horizontal"},{value:"vertical",label:"component.options.orient_vertical"}],label:"component.options.orient",dependent:"showLegend"},showValue:!0,showRate:!1,wrap:!1,wrapByte:{value:5,type:"number",label:"component.options.pie_wrapByte",dependent:"wrap"}},H=[{name:"参数一",fv:"",object_id:"",color:"#4162ff"},{name:"参数二",fv:"",object_id:"",color:"#3bbc6a"},{name:"参数三",fv:"",object_id:"",color:"#e24359"}],U=["name","fv","object_id","color"],F=["mosaic","statistics","calculate"],G={useAlias:!1,multiObject:!1,source:"mosaic"},K={DEFAULT:P,OPTIONS:M,DATA:H,PARAMS:U,SOURCE:F,COMMON:G},X=l.defineComponent(f(d({},K),{__name:"pie",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){y.use([B.install,R.install,y.install,y.install$1,T.install]);const a=r,c=b.useLinkStore(),_={horizontal:{orient:"horizontal",bottom:"5%",left:"center"},vertical:{orient:"vertical",right:"5%",top:"5%"}};class V extends k.EChartComponentBase{initChart(){var e,o;super.initChart(),this.props.mode==="preview"&&((e=this.chartObj)==null||e.off("click"),(o=this.chartObj)==null||o.on("click",t=>{var i,s,p,u,h,O;const n=t==null?void 0:t.name;if(typeof n=="string"&&n){const L=((s=(i=this.props.conf)==null?void 0:i.options)==null?void 0:s.linkChannel)==="custom"?(u=(p=this.props.conf)==null?void 0:p.options)==null?void 0:u.customChannel:(O=(h=this.props.conf)==null?void 0:h.options)==null?void 0:O.linkChannel;c.publish(L||"pie","pie",{objectId:"",deviceId:"",type:"select",fieldKey:n,fv:d({key:n},t),source:"pie"})}}))}extractStyles(){return f(d({},super.extractStyles()),{type:this.getOptionValue("type","pie"),radius:this.getOptionValue("radius",50),inside:this.getOptionValue("inside",40),outside:this.getOptionValue("outside",75),showLabel:this.getOptionValue("showLabel",!1),showLegend:this.getOptionValue("showLegend",!0),orient:this.getOptionValue("orient","horizontal"),showValue:this.getOptionValue("showValue",!0),showRate:this.getOptionValue("showRate",!1),wrap:this.getOptionValue("wrap",!1),wrapByte:this.getOptionValue("wrapByte",5)})}getChartOption(){const e=this.Style.value,{data:o,name:t}=this.props.conf,n=o.map((i,s)=>i.color||b.COLORS[s]);return{title:{show:!1,text:t||"",x:"center"},color:n,tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:f(d({show:e.showLegend},_[e.orient]),{data:o.map(i=>i.name),textStyle:{color:e.textColor}}),series:this.formatSeries()}}formatSeries(){const e=this.Style.value,{data:o,name:t}=this.props.conf,n=o.map(s=>({value:0,name:s.name})),i=e.type==="pie"?`${e.radius}%`:[`${e.inside}%`,`${e.outside}%`];return[{name:t,type:"pie",radius:i,center:["50%","40%"],data:n,emphasis:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{color:e.textColor,lineHeight:16,fontSize:e.textSize,formatter:s=>this.formatLabel(s)}}]}formatLabel(e){const o=this.Style.value;let t=e.name;return o.showValue&&o.showRate?t=`${e.name}: ${e.value}(${e.percent}%)`:o.showValue?t=`${e.name}: ${e.value}`:o.showRate&&(t=`${e.name}${e.percent}%`),this.insertBreaks(t)}insertBreaks(e){const o=this.Style.value;if(!o.wrap)return e;const t=o.wrapByte||5;let n="",i=0,s=0;for(const p of e)p.charCodeAt(0)>=19968&&p.charCodeAt(0)<=40959?(s++,i+=2):i+=1,n+=p,(s>=t||i>=t*2)&&(n+=`
|
|
2
2
|
`,s=0,i=0);return n}setHistoryData(e){if(!e||!(e!=null&&e.length))return;const o=this.chartObj.getOption();o.series[0].data.forEach((t,n)=>{var i;t.value=(i=e[n].data[0])!=null?i:0}),this.updateChart(o)}setSocketData(e){if(!e||!this.chartObj)return;const{data:o}=this.props.conf,t=this.chartObj.getOption();o.forEach((n,i)=>{var p,u,h;const s=this.extractDataValue(e,n.fv);(h=(u=(p=t.series)==null?void 0:p[0])==null?void 0:u.data)!=null&&h[i]&&(t.series[0].data[i].value=s!=null?s:0)}),this.updateChart(t)}}const m=new V(a,"pie");m.setupLifecycle();const v=m.getStyle(),E=m.getEchartId(),x=l.computed(()=>z.generateTitleStyle(a.conf.options));return(g,e)=>(l.openBlock(),l.createElementBlock("div",{class:"mix-component",style:l.normalizeStyle({background:l.unref(v).bgColor,borderRadius:`${l.unref(v).radiusSize}px`})},[l.createElementVNode("div",{class:"mix-title",style:l.normalizeStyle(x.value)},l.toDisplayString(r.conf.caption||r.conf.name),5),l.createElementVNode("div",D,[l.createElementVNode("div",{class:"w-full h-full",id:l.unref(E)},null,8,q)]),l.renderSlot(g.$slots,"default",{},void 0,!0)],4))}})),J=b._export_sfc(X,[["__scopeId","data-v-c1c90a37"]]);exports.default=J;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var P=Object.defineProperty,W=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var O=(l,t,r)=>t in l?P(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,M=(l,t)=>{for(var r in t||(t={}))$.call(t,r)&&O(l,r,t[r]);if(D)for(var r of D(t))U.call(t,r)&&O(l,r,t[r]);return l},T=(l,t)=>W(l,A(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),z=require("./ele-box-icon-NZ0BTjhm.cjs"),j=require("./index-
|
|
1
|
+
"use strict";var P=Object.defineProperty,W=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var O=(l,t,r)=>t in l?P(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,M=(l,t)=>{for(var r in t||(t={}))$.call(t,r)&&O(l,r,t[r]);if(D)for(var r of D(t))U.call(t,r)&&O(l,r,t[r]);return l},T=(l,t)=>W(l,A(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),z=require("./ele-box-icon-NZ0BTjhm.cjs"),j=require("./index-D8dh_6Qd.cjs"),q=["data-placeholder-id","data-placeholder-name","data-x","data-y","data-w","data-h"],G={key:0,class:"mix-placeholder__label"},H={class:"mix-placeholder__title"},J={key:0,class:"mix-placeholder__name"},K={class:"mix-placeholder__meta"},Q={key:0,class:"mix-placeholder__pixel"},X={class:"mix-placeholder__pixel-pos"},Y={key:1,class:"mix-placeholder__desc"},Z={key:0,class:"mix-placeholder__name-runtime"},ee={DEFAULT_ICON:z.DEFAULT_ICON,ACTIVE_ICON:z.ACTIVE_ICON,NAME_CN:"占位符",NAME_EN:"Placeholder",ORDER:99},te={placeholderName:{value:"",type:"string",label:"占位符名称"},description:{value:"",type:"string",label:"描述"},bgColor:{value:"rgba(64, 158, 255, 0.08)",type:"color",label:"填充色"},borderColor:{value:"#409EFF",type:"color",label:"边框颜色"},borderWidth:{value:2,type:"number",label:"边框宽度",min:0,max:10},borderStyle:{value:"dashed",type:"radio",label:"边框样式",option:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"},{label:"点线",value:"dotted"}]},radiusSize:{value:4,type:"number",label:"圆角",min:0,max:50},showLabel:{value:!0,type:"checkbox",label:"显示标签"},showInPreview:{value:!1,type:"checkbox",label:"运行时显示边框"}},oe=[],le={},ae={DEFAULT:ee,OPTIONS:te,SOURCE:oe,COMMON:le},ne=e.defineComponent(T(M({},ae),{__name:"placeholder",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(l){const t=l,r=(o,a)=>{var c,i;const n=(i=(c=t.conf)==null?void 0:c.options)==null?void 0:i[o];return n==null?a:typeof n=="object"&&"value"in n?n.value:n},d=e.computed(()=>({placeholderName:r("placeholderName",""),description:r("description",""),bgColor:r("bgColor","rgba(64, 158, 255, 0.08)"),borderColor:r("borderColor","#409EFF"),borderWidth:Number(r("borderWidth",2))||0,borderStyle:r("borderStyle","dashed"),radiusSize:Number(r("radiusSize",4))||0,showLabel:r("showLabel",!0)!==!1,showInPreview:r("showInPreview",!1)===!0})),_=e.computed(()=>{var o,a;return d.value.placeholderName||((o=t.conf)==null?void 0:o.name)||((a=t.conf)==null?void 0:a.id)||""}),b=e.computed(()=>{var o,a;return d.value.placeholderName||((o=t.conf)==null?void 0:o.caption)||((a=t.conf)==null?void 0:a.name)||""}),F=e.computed(()=>({backgroundColor:d.value.bgColor,borderColor:d.value.borderColor,borderStyle:d.value.borderStyle,borderWidth:`${d.value.borderWidth}px`,borderRadius:`${d.value.radiusSize}px`})),L=e.computed(()=>({borderColor:d.value.borderColor,borderStyle:d.value.borderStyle,borderWidth:`${Math.max(1,d.value.borderWidth)}px`,borderRadius:`${d.value.radiusSize}px`,backgroundColor:"transparent"})),m=e.ref(null),S=e.useTemplateRef("rootRef"),N=()=>{const o=S.value;if(!o)return{gridItem:null,canvas:null};const a=o.closest(".vgl-item")||o.closest(".vue-grid-item"),n=o.closest(".canvas");return{gridItem:a,canvas:n}},x=()=>{const{gridItem:o,canvas:a}=N();if(!o||!a)return;const n=o.getBoundingClientRect(),c=a.getBoundingClientRect(),i=a.offsetWidth||1,u=c.width/i||1,s=u===0?1:u;m.value={left:Math.round((n.left-c.left)/s),top:Math.round((n.top-c.top)/s),width:Math.round(n.width/s),height:Math.round(n.height/s)}},y=o=>{var a,n,c,i,u,s,h,v,f;if(typeof window!="undefined")try{window.dispatchEvent(new CustomEvent(`mix-placeholder:${o}`,{detail:{id:((a=t.conf)==null?void 0:a.id)||"",name:_.value,grid:{x:(c=(n=t.conf)==null?void 0:n.x)!=null?c:0,y:(u=(i=t.conf)==null?void 0:i.y)!=null?u:0,w:(h=(s=t.conf)==null?void 0:s.w)!=null?h:0,h:(f=(v=t.conf)==null?void 0:v.h)!=null?f:0},pixel:m.value,mode:t.mode}}))}catch(g){}};let p=null;return e.onMounted(()=>{e.nextTick(()=>{x(),y("registered");const{gridItem:o}=N();o&&typeof ResizeObserver!="undefined"&&(p=new ResizeObserver(()=>{x(),y("updated")}),p.observe(o))})}),e.onBeforeUnmount(()=>{p==null||p.disconnect(),p=null,y("unregistered")}),e.watch(()=>{var o,a,n,c,i;return[(o=t.conf)==null?void 0:o.x,(a=t.conf)==null?void 0:a.y,(n=t.conf)==null?void 0:n.w,(c=t.conf)==null?void 0:c.h,(i=t.conf)==null?void 0:i.options,t.mode]},()=>{e.nextTick(()=>{x(),y("updated")})},{deep:!0}),(o,a)=>{var n,c,i,u,s,h,v,f,g,w,C,E,k,B,I,R,V;return e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:S,class:"mix-placeholder",style:e.normalizeStyle({pointerEvents:l.mode==="edit"?"auto":void 0}),"data-placeholder-id":((n=l.conf)==null?void 0:n.id)||"","data-placeholder-name":_.value,"data-x":(i=(c=l.conf)==null?void 0:c.x)!=null?i:0,"data-y":(s=(u=l.conf)==null?void 0:u.y)!=null?s:0,"data-w":(v=(h=l.conf)==null?void 0:h.w)!=null?v:0,"data-h":(g=(f=l.conf)==null?void 0:f.h)!=null?g:0},[l.mode==="edit"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-placeholder__frame mix-placeholder__frame--edit",style:e.normalizeStyle(F.value)},[d.value.showLabel?(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",H,[a[0]||(a[0]=e.createElementVNode("span",{class:"mix-placeholder__tag"},"占位符",-1)),b.value?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",K,[e.createElementVNode("span",null,"x:"+e.toDisplayString((C=(w=l.conf)==null?void 0:w.x)!=null?C:0),1),e.createElementVNode("span",null,"y:"+e.toDisplayString((k=(E=l.conf)==null?void 0:E.y)!=null?k:0),1),e.createElementVNode("span",null,"w:"+e.toDisplayString((I=(B=l.conf)==null?void 0:B.w)!=null?I:0),1),e.createElementVNode("span",null,"h:"+e.toDisplayString((V=(R=l.conf)==null?void 0:R.h)!=null?V:0),1)]),m.value?(e.openBlock(),e.createElementBlock("div",Q,[e.createTextVNode(e.toDisplayString(m.value.width)+"px × "+e.toDisplayString(m.value.height)+"px ",1),e.createElementVNode("span",X,"@("+e.toDisplayString(m.value.left)+", "+e.toDisplayString(m.value.top)+")",1)])):e.createCommentVNode("",!0),d.value.description?(e.openBlock(),e.createElementBlock("div",Y,e.toDisplayString(d.value.description),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],4)):d.value.showInPreview?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mix-placeholder__frame mix-placeholder__frame--runtime",style:e.normalizeStyle(L.value)},[d.value.showLabel&&b.value?(e.openBlock(),e.createElementBlock("span",Z,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],12,q)}}})),re=j._export_sfc(ne,[["__scopeId","data-v-3a1bcd36"]]);exports.default=re;
|
|
@@ -12,7 +12,7 @@ var $ = (o, e, r) => e in o ? q(o, e, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
}, D = (o, e) => G(o, H(e));
|
|
13
13
|
import { defineComponent as Q, computed as w, ref as X, useTemplateRef as Y, onMounted as Z, nextTick as U, onBeforeUnmount as ee, watch as te, openBlock as h, createElementBlock as m, normalizeStyle as R, createElementVNode as p, toDisplayString as i, createCommentVNode as b, createTextVNode as oe, renderSlot as le } from "vue";
|
|
14
14
|
import { A as ae, D as re } from "./ele-box-icon-Brlhb3oN.js";
|
|
15
|
-
import { _ as de } from "./index-
|
|
15
|
+
import { _ as de } from "./index-Bdq33405.js";
|
|
16
16
|
const ne = ["data-placeholder-id", "data-placeholder-name", "data-x", "data-y", "data-w", "data-h"], ce = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "mix-placeholder__label"
|
|
@@ -28,10 +28,10 @@ var H = (l, o, t) => new Promise((u, v) => {
|
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as i2, reactive as P, ref as b, computed as y, openBlock as h, createElementBlock as w, Fragment as U, createElementVNode as C, normalizeStyle as x, unref as p, toDisplayString as M, normalizeClass as V, createCommentVNode as J, renderList as c2, renderSlot as d2, createVNode as u2 } from "vue";
|
|
30
30
|
import "html2canvas";
|
|
31
|
-
import { B as m2 } from "./BaseComponent-
|
|
32
|
-
import { O as f2, A as G, a as C2, _ as p2 } from "./index-
|
|
31
|
+
import { B as m2 } from "./BaseComponent-D5tlYehc.js";
|
|
32
|
+
import { O as f2, A as G, a as C2, _ as p2 } from "./index-Bdq33405.js";
|
|
33
33
|
import { g as v2 } from "./titleStyle-BT5GlpAb.js";
|
|
34
|
-
import { _ as g2, g as L2 } from "./mix-control-modal-
|
|
34
|
+
import { _ as g2, g as L2 } from "./mix-control-modal-BBiKe4MM.js";
|
|
35
35
|
import { ElMessage as z } from "element-plus";
|
|
36
36
|
const h2 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%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='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-318.000000,%20-1207.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M332.736782,1207.3%20C333.600123,1207.3%20334.3,1207.99988%20334.3,1208.86322%20L334.3,1208.86322%20L334.3,1221.73678%20C334.3,1222.60012%20333.600123,1223.3%20332.736782,1223.3%20L332.736782,1223.3%20L319.863218,1223.3%20C318.999877,1223.3%20318.3,1222.60012%20318.3,1221.73678%20L318.3,1221.73678%20L318.3,1208.86322%20C318.3,1207.99988%20318.999877,1207.3%20319.863218,1207.3%20L319.863218,1207.3%20Z%20M332.736782,1208.58736%20L319.863218,1208.58736%20C319.710864,1208.58736%20319.587356,1208.71086%20319.587356,1208.86322%20L319.587356,1208.86322%20L319.587356,1221.73678%20C319.587356,1221.88914%20319.710864,1222.01264%20319.863218,1222.01264%20L319.863218,1222.01264%20L332.736782,1222.01264%20C332.889136,1222.01264%20333.012644,1221.88914%20333.012644,1221.73678%20L333.012644,1221.73678%20L333.012644,1208.86322%20C333.012644,1208.71086%20332.889136,1208.58736%20332.736782,1208.58736%20L332.736782,1208.58736%20Z%20M323.725287,1216.86322%20C324.893338,1216.86322%20325.84023,1217.81011%20325.84023,1218.97816%20C325.84023,1220.14621%20324.893338,1221.0931%20323.725287,1221.0931%20C322.557237,1221.0931%20321.610345,1220.14621%20321.610345,1218.97816%20C321.610345,1217.81011%20322.557237,1216.86322%20323.725287,1216.86322%20Z%20M328.874713,1216.86322%20C330.042763,1216.86322%20330.989655,1217.81011%20330.989655,1218.97816%20C330.989655,1220.14621%20330.042763,1221.0931%20328.874713,1221.0931%20C327.706662,1221.0931%20326.75977,1220.14621%20326.75977,1218.97816%20C326.75977,1217.81011%20327.706662,1216.86322%20328.874713,1216.86322%20Z%20M323.725287,1218.15057%20C323.268224,1218.15057%20322.897701,1218.5211%20322.897701,1218.97816%20C322.897701,1219.43522%20323.268224,1219.80575%20323.725287,1219.80575%20C324.182351,1219.80575%20324.552874,1219.43522%20324.552874,1218.97816%20C324.552874,1218.5211%20324.182351,1218.15057%20323.725287,1218.15057%20Z%20M328.874713,1218.15057%20C328.417649,1218.15057%20328.047126,1218.5211%20328.047126,1218.97816%20C328.047126,1219.43522%20328.417649,1219.80575%20328.874713,1219.80575%20C329.331776,1219.80575%20329.702299,1219.43522%20329.702299,1218.97816%20C329.702299,1218.5211%20329.331776,1218.15057%20328.874713,1218.15057%20Z%20M329.242529,1214.65632%20C329.598022,1214.65632%20329.886207,1214.94451%20329.886207,1215.3%20C329.886207,1215.62587%20329.644052,1215.89518%20329.329872,1215.9378%20L329.242529,1215.94368%20L323.357471,1215.94368%20C323.001978,1215.94368%20322.713793,1215.65549%20322.713793,1215.3%20C322.713793,1214.97413%20322.955948,1214.70482%20323.270128,1214.6622%20L323.357471,1214.65632%20L329.242529,1214.65632%20Z%20M331.081609,1209.5069%20C331.437103,1209.5069%20331.725287,1209.79508%20331.725287,1210.15057%20L331.725287,1210.15057%20L331.725287,1213.0931%20C331.725287,1213.4486%20331.437103,1213.73678%20331.081609,1213.73678%20L331.081609,1213.73678%20L321.518391,1213.73678%20C321.162897,1213.73678%20320.874713,1213.4486%20320.874713,1213.0931%20L320.874713,1213.0931%20L320.874713,1210.15057%20C320.874713,1209.79508%20321.162897,1209.5069%20321.518391,1209.5069%20L321.518391,1209.5069%20Z%20M330.437931,1210.79425%20L322.162069,1210.79425%20L322.162069,1212.44943%20L330.437931,1212.44943%20L330.437931,1210.79425%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", w2 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e双控%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-318.000000,%20-1207.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M332.736782,1207.3%20C333.600123,1207.3%20334.3,1207.99988%20334.3,1208.86322%20L334.3,1208.86322%20L334.3,1221.73678%20C334.3,1222.60012%20333.600123,1223.3%20332.736782,1223.3%20L332.736782,1223.3%20L319.863218,1223.3%20C318.999877,1223.3%20318.3,1222.60012%20318.3,1221.73678%20L318.3,1221.73678%20L318.3,1208.86322%20C318.3,1207.99988%20318.999877,1207.3%20319.863218,1207.3%20L319.863218,1207.3%20Z%20M332.736782,1208.58736%20L319.863218,1208.58736%20C319.710864,1208.58736%20319.587356,1208.71086%20319.587356,1208.86322%20L319.587356,1208.86322%20L319.587356,1221.73678%20C319.587356,1221.88914%20319.710864,1222.01264%20319.863218,1222.01264%20L319.863218,1222.01264%20L332.736782,1222.01264%20C332.889136,1222.01264%20333.012644,1221.88914%20333.012644,1221.73678%20L333.012644,1221.73678%20L333.012644,1208.86322%20C333.012644,1208.71086%20332.889136,1208.58736%20332.736782,1208.58736%20L332.736782,1208.58736%20Z%20M323.725287,1216.86322%20C324.893338,1216.86322%20325.84023,1217.81011%20325.84023,1218.97816%20C325.84023,1220.14621%20324.893338,1221.0931%20323.725287,1221.0931%20C322.557237,1221.0931%20321.610345,1220.14621%20321.610345,1218.97816%20C321.610345,1217.81011%20322.557237,1216.86322%20323.725287,1216.86322%20Z%20M328.874713,1216.86322%20C330.042763,1216.86322%20330.989655,1217.81011%20330.989655,1218.97816%20C330.989655,1220.14621%20330.042763,1221.0931%20328.874713,1221.0931%20C327.706662,1221.0931%20326.75977,1220.14621%20326.75977,1218.97816%20C326.75977,1217.81011%20327.706662,1216.86322%20328.874713,1216.86322%20Z%20M323.725287,1218.15057%20C323.268224,1218.15057%20322.897701,1218.5211%20322.897701,1218.97816%20C322.897701,1219.43522%20323.268224,1219.80575%20323.725287,1219.80575%20C324.182351,1219.80575%20324.552874,1219.43522%20324.552874,1218.97816%20C324.552874,1218.5211%20324.182351,1218.15057%20323.725287,1218.15057%20Z%20M328.874713,1218.15057%20C328.417649,1218.15057%20328.047126,1218.5211%20328.047126,1218.97816%20C328.047126,1219.43522%20328.417649,1219.80575%20328.874713,1219.80575%20C329.331776,1219.80575%20329.702299,1219.43522%20329.702299,1218.97816%20C329.702299,1218.5211%20329.331776,1218.15057%20328.874713,1218.15057%20Z%20M329.242529,1214.65632%20C329.598022,1214.65632%20329.886207,1214.94451%20329.886207,1215.3%20C329.886207,1215.62587%20329.644052,1215.89518%20329.329872,1215.9378%20L329.242529,1215.94368%20L323.357471,1215.94368%20C323.001978,1215.94368%20322.713793,1215.65549%20322.713793,1215.3%20C322.713793,1214.97413%20322.955948,1214.70482%20323.270128,1214.6622%20L323.357471,1214.65632%20L329.242529,1214.65632%20Z%20M331.081609,1209.5069%20C331.437103,1209.5069%20331.725287,1209.79508%20331.725287,1210.15057%20L331.725287,1210.15057%20L331.725287,1213.0931%20C331.725287,1213.4486%20331.437103,1213.73678%20331.081609,1213.73678%20L331.081609,1213.73678%20L321.518391,1213.73678%20C321.162897,1213.73678%20320.874713,1213.4486%20320.874713,1213.0931%20L320.874713,1213.0931%20L320.874713,1210.15057%20C320.874713,1209.79508%20321.162897,1209.5069%20321.518391,1209.5069%20L321.518391,1209.5069%20Z%20M330.437931,1210.79425%20L322.162069,1210.79425%20L322.162069,1212.44943%20L330.437931,1212.44943%20L330.437931,1210.79425%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", x2 = { class: "font-semibold" }, _2 = { class: "flex items-center" }, S2 = { class: "mix-body" }, b2 = { class: "w-full flex flex-wrap content-start" }, y2 = ["onMousedown", "onMouseup"], M2 = {
|
|
37
37
|
DEFAULT_ICON: h2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var H=Object.defineProperty,U=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols,J=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,W=Reflect.get;var O=(n,l,o)=>l in n?H(n,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[l]=o,Z=(n,l)=>{for(var o in l||(l={}))K.call(l,o)&&O(n,o,l[o]);if(A)for(var o of A(l))Y.call(l,o)&&O(n,o,l[o]);return n},B=(n,l)=>U(n,G(l));var F=(n,l,o)=>W(J(n),o,l);var I=(n,l,o)=>new Promise((m,p)=>{var v=i=>{try{f(o.next(i))}catch(r){p(r)}},C=i=>{try{f(o.throw(i))}catch(r){p(r)}},f=i=>i.done?m(i.value):Promise.resolve(i.value).then(v,C);f((o=o.apply(n,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const Q=require("./BaseComponent-Cco_5i96.cjs"),L=require("./index-Do1YWdUS.cjs"),X=require("./titleStyle-NSnz6cUg.cjs"),T=require("./mix-control-modal-C-XaUBM9.cjs"),x=require("element-plus"),e2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%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='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-318.000000,%20-1207.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M332.736782,1207.3%20C333.600123,1207.3%20334.3,1207.99988%20334.3,1208.86322%20L334.3,1208.86322%20L334.3,1221.73678%20C334.3,1222.60012%20333.600123,1223.3%20332.736782,1223.3%20L332.736782,1223.3%20L319.863218,1223.3%20C318.999877,1223.3%20318.3,1222.60012%20318.3,1221.73678%20L318.3,1221.73678%20L318.3,1208.86322%20C318.3,1207.99988%20318.999877,1207.3%20319.863218,1207.3%20L319.863218,1207.3%20Z%20M332.736782,1208.58736%20L319.863218,1208.58736%20C319.710864,1208.58736%20319.587356,1208.71086%20319.587356,1208.86322%20L319.587356,1208.86322%20L319.587356,1221.73678%20C319.587356,1221.88914%20319.710864,1222.01264%20319.863218,1222.01264%20L319.863218,1222.01264%20L332.736782,1222.01264%20C332.889136,1222.01264%20333.012644,1221.88914%20333.012644,1221.73678%20L333.012644,1221.73678%20L333.012644,1208.86322%20C333.012644,1208.71086%20332.889136,1208.58736%20332.736782,1208.58736%20L332.736782,1208.58736%20Z%20M323.725287,1216.86322%20C324.893338,1216.86322%20325.84023,1217.81011%20325.84023,1218.97816%20C325.84023,1220.14621%20324.893338,1221.0931%20323.725287,1221.0931%20C322.557237,1221.0931%20321.610345,1220.14621%20321.610345,1218.97816%20C321.610345,1217.81011%20322.557237,1216.86322%20323.725287,1216.86322%20Z%20M328.874713,1216.86322%20C330.042763,1216.86322%20330.989655,1217.81011%20330.989655,1218.97816%20C330.989655,1220.14621%20330.042763,1221.0931%20328.874713,1221.0931%20C327.706662,1221.0931%20326.75977,1220.14621%20326.75977,1218.97816%20C326.75977,1217.81011%20327.706662,1216.86322%20328.874713,1216.86322%20Z%20M323.725287,1218.15057%20C323.268224,1218.15057%20322.897701,1218.5211%20322.897701,1218.97816%20C322.897701,1219.43522%20323.268224,1219.80575%20323.725287,1219.80575%20C324.182351,1219.80575%20324.552874,1219.43522%20324.552874,1218.97816%20C324.552874,1218.5211%20324.182351,1218.15057%20323.725287,1218.15057%20Z%20M328.874713,1218.15057%20C328.417649,1218.15057%20328.047126,1218.5211%20328.047126,1218.97816%20C328.047126,1219.43522%20328.417649,1219.80575%20328.874713,1219.80575%20C329.331776,1219.80575%20329.702299,1219.43522%20329.702299,1218.97816%20C329.702299,1218.5211%20329.331776,1218.15057%20328.874713,1218.15057%20Z%20M329.242529,1214.65632%20C329.598022,1214.65632%20329.886207,1214.94451%20329.886207,1215.3%20C329.886207,1215.62587%20329.644052,1215.89518%20329.329872,1215.9378%20L329.242529,1215.94368%20L323.357471,1215.94368%20C323.001978,1215.94368%20322.713793,1215.65549%20322.713793,1215.3%20C322.713793,1214.97413%20322.955948,1214.70482%20323.270128,1214.6622%20L323.357471,1214.65632%20L329.242529,1214.65632%20Z%20M331.081609,1209.5069%20C331.437103,1209.5069%20331.725287,1209.79508%20331.725287,1210.15057%20L331.725287,1210.15057%20L331.725287,1213.0931%20C331.725287,1213.4486%20331.437103,1213.73678%20331.081609,1213.73678%20L331.081609,1213.73678%20L321.518391,1213.73678%20C321.162897,1213.73678%20320.874713,1213.4486%20320.874713,1213.0931%20L320.874713,1213.0931%20L320.874713,1210.15057%20C320.874713,1209.79508%20321.162897,1209.5069%20321.518391,1209.5069%20L321.518391,1209.5069%20Z%20M330.437931,1210.79425%20L322.162069,1210.79425%20L322.162069,1212.44943%20L330.437931,1212.44943%20L330.437931,1210.79425%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",t2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e双控%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-318.000000,%20-1207.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M332.736782,1207.3%20C333.600123,1207.3%20334.3,1207.99988%20334.3,1208.86322%20L334.3,1208.86322%20L334.3,1221.73678%20C334.3,1222.60012%20333.600123,1223.3%20332.736782,1223.3%20L332.736782,1223.3%20L319.863218,1223.3%20C318.999877,1223.3%20318.3,1222.60012%20318.3,1221.73678%20L318.3,1221.73678%20L318.3,1208.86322%20C318.3,1207.99988%20318.999877,1207.3%20319.863218,1207.3%20L319.863218,1207.3%20Z%20M332.736782,1208.58736%20L319.863218,1208.58736%20C319.710864,1208.58736%20319.587356,1208.71086%20319.587356,1208.86322%20L319.587356,1208.86322%20L319.587356,1221.73678%20C319.587356,1221.88914%20319.710864,1222.01264%20319.863218,1222.01264%20L319.863218,1222.01264%20L332.736782,1222.01264%20C332.889136,1222.01264%20333.012644,1221.88914%20333.012644,1221.73678%20L333.012644,1221.73678%20L333.012644,1208.86322%20C333.012644,1208.71086%20332.889136,1208.58736%20332.736782,1208.58736%20L332.736782,1208.58736%20Z%20M323.725287,1216.86322%20C324.893338,1216.86322%20325.84023,1217.81011%20325.84023,1218.97816%20C325.84023,1220.14621%20324.893338,1221.0931%20323.725287,1221.0931%20C322.557237,1221.0931%20321.610345,1220.14621%20321.610345,1218.97816%20C321.610345,1217.81011%20322.557237,1216.86322%20323.725287,1216.86322%20Z%20M328.874713,1216.86322%20C330.042763,1216.86322%20330.989655,1217.81011%20330.989655,1218.97816%20C330.989655,1220.14621%20330.042763,1221.0931%20328.874713,1221.0931%20C327.706662,1221.0931%20326.75977,1220.14621%20326.75977,1218.97816%20C326.75977,1217.81011%20327.706662,1216.86322%20328.874713,1216.86322%20Z%20M323.725287,1218.15057%20C323.268224,1218.15057%20322.897701,1218.5211%20322.897701,1218.97816%20C322.897701,1219.43522%20323.268224,1219.80575%20323.725287,1219.80575%20C324.182351,1219.80575%20324.552874,1219.43522%20324.552874,1218.97816%20C324.552874,1218.5211%20324.182351,1218.15057%20323.725287,1218.15057%20Z%20M328.874713,1218.15057%20C328.417649,1218.15057%20328.047126,1218.5211%20328.047126,1218.97816%20C328.047126,1219.43522%20328.417649,1219.80575%20328.874713,1219.80575%20C329.331776,1219.80575%20329.702299,1219.43522%20329.702299,1218.97816%20C329.702299,1218.5211%20329.331776,1218.15057%20328.874713,1218.15057%20Z%20M329.242529,1214.65632%20C329.598022,1214.65632%20329.886207,1214.94451%20329.886207,1215.3%20C329.886207,1215.62587%20329.644052,1215.89518%20329.329872,1215.9378%20L329.242529,1215.94368%20L323.357471,1215.94368%20C323.001978,1215.94368%20322.713793,1215.65549%20322.713793,1215.3%20C322.713793,1214.97413%20322.955948,1214.70482%20323.270128,1214.6622%20L323.357471,1214.65632%20L329.242529,1214.65632%20Z%20M331.081609,1209.5069%20C331.437103,1209.5069%20331.725287,1209.79508%20331.725287,1210.15057%20L331.725287,1210.15057%20L331.725287,1213.0931%20C331.725287,1213.4486%20331.437103,1213.73678%20331.081609,1213.73678%20L331.081609,1213.73678%20L321.518391,1213.73678%20C321.162897,1213.73678%20320.874713,1213.4486%20320.874713,1213.0931%20L320.874713,1213.0931%20L320.874713,1210.15057%20C320.874713,1209.79508%20321.162897,1209.5069%20321.518391,1209.5069%20L321.518391,1209.5069%20Z%20M330.437931,1210.79425%20L322.162069,1210.79425%20L322.162069,1212.44943%20L330.437931,1212.44943%20L330.437931,1210.79425%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",o2={class:"font-semibold"},l2={class:"flex items-center"},n2={class:"mix-body"},r2={class:"w-full flex flex-wrap content-start"},a2=["onMousedown","onMouseup"],s2={DEFAULT_ICON:e2,ACTIVE_ICON:t2,NAME_CN:"双控",NAME_EN:"Dual Control",ORDER:3},c2={bgColor:"#fff",titleColor:"#111",textColor:"#fff",titleSize:14,textSize:14,itemHeight:42,radiusSize:8,items:2,isHideTitle:!1,method:{value:"alway",type:"select",label:"component.switch.method",options:L.CONTROL_OPTIONS}},j=[{upper:{command:"Control_01",code:0},down:{command:"Control_01",code:1},name:"关机",color:"#c92309",code:0},{upper:{command:"Control_01",code:0},down:{command:"Control_01",code:1},name:"开机",color:"#217406",code:1}],i2=["name","color","upper","down"],d2={useAlias:!1,multiObject:!1,hideMultiObject:!0,statusFv:"",statusType:1,status:[{code:0,text:"离线",color:"#c92309"}]},u2=["mosaic"],m2={DEFAULT:s2,OPTIONS:c2,DATA:j,PARAMS:i2,SOURCE:u2,COMMON:d2},C2=e.defineComponent(B(Z({},m2),{__name:"pressBtn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"},password:{type:String,default:""},authorized:{type:Array,default:()=>[]}},setup(n){const l=n,o=e.reactive({authorized:[],password:""}),m=e.reactive({text:"",color:""}),p=e.ref(null),v=e.ref(!0),C=e.ref(!1);class f extends Q.BaseComponent{extractStyles(){var a,d,c,g,u,h,y,_,b,M,k,z,E,N;const{options:t}=this.props.conf;return{bgColor:((a=t==null?void 0:t.bgColor)==null?void 0:a.value)||"#fff",titleColor:((d=t==null?void 0:t.titleColor)==null?void 0:d.value)||"#111",textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#fff",titleSize:((g=t==null?void 0:t.titleSize)==null?void 0:g.value)||16,textSize:((u=t==null?void 0:t.textSize)==null?void 0:u.value)||14,itemHeight:((h=t==null?void 0:t.itemHeight)==null?void 0:h.value)||42,radiusSize:(_=(y=t==null?void 0:t.radiusSize)==null?void 0:y.value)!=null?_:8,items:(M=(b=t==null?void 0:t.items)==null?void 0:b.value)!=null?M:2,method:(z=(k=t==null?void 0:t.method)==null?void 0:k.value)!=null?z:"alway",isHideTitle:(N=(E=t==null?void 0:t.isHideTitle)==null?void 0:E.value)!=null?N:!1}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:j}onPreview(){return I(this,null,function*(){yield F(f.prototype,this,"onPreview").call(this);const t=yield T.getAuthorized(this.props);o.authorized=t.authorized,o.password=t.password})}setSocketData(t){var c,g;if(!t)return;const{common:a}=this.props.conf,d=this.extractDataValue(t,a.statusFv);if(d!=null){const u=a.status.find(h=>String(h.code)===String(d));m.text=(c=u==null?void 0:u.text)!=null?c:"",m.color=(g=u==null?void 0:u.color)!=null?g:""}}}const i=new f(l,"pressBtn");i.setupLifecycle();const r=i.getStyle(),V=e.computed(()=>X.generateTitleStyle(l.conf.options)),D=e.computed(()=>`${(100/r.value.items).toFixed(2)||100}%`),w=e.computed(()=>{const s=r.value.method||"alway";return s==="once"&&v.value||s==="alway"&&!C.value}),P=()=>{C.value||(p.value.modal.visible=!0)},R=()=>{C.value=!0,r.value.method==="once"&&(v.value=!1)},$=s=>{if(w.value)return;if(o.authorized.indexOf(s.down.command)===-1){x.ElMessage.error("您没有控制权限!");return}const{common:t}=l.conf,a=JSON.parse(sessionStorage.getItem(L.ALIAS_MAPPING_KEY)||"{}");let c={block_mapping:"pusher",action:"publish_command",object_id:t.useAlias?a[t.object_alias]:t.object_id||l.uid,command:s.down.command.toString(),value:s.down.code.toString()||"",control:o.password,rule:r.value.method};S(c,"down")},q=s=>{if(w.value)return;if(o.authorized.indexOf(s.upper.command)===-1){x.ElMessage.error("您没有控制权限!");return}const{common:t}=l.conf,a=JSON.parse(sessionStorage.getItem(L.ALIAS_MAPPING_KEY)||"{}");let c={block_mapping:"pusher",action:"publish_command",object_id:t.useAlias?a[t.object_alias]:t.object_id||l.uid,command:s.upper.command.toString(),value:s.upper.code.toString()||"",control:o.password,rule:r.value.method};S(c,"up")},S=(s,t)=>{L.api.platform(a=>{a.code===200&&(x.ElMessage.success(a.msg),v.value=!1,r.value.method==="alway"&&t==="up"&&(C.value=!1))},s)};return(s,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(r).bgColor,borderRadius:`${e.unref(r).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(V.value)},[e.createElementVNode("div",o2,e.toDisplayString(n.conf.caption||n.conf.name),1),e.createElementVNode("div",l2,[e.unref(r).method!=="never"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["verify-btn",{disabled:C.value}]),onClick:P},"验证密码",2)):e.createCommentVNode("",!0),m.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"status-btn",style:e.normalizeStyle({backgroundColor:m.color,color:e.unref(r).textColor})},e.toDisplayString(m.text),5)):e.createCommentVNode("",!0)])],4),e.createElementVNode("div",n2,[e.createElementVNode("div",r2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.conf.data,(a,d)=>(e.openBlock(),e.createElementBlock("div",{class:"btn-wrap",key:d,style:e.normalizeStyle({width:D.value,height:`${e.unref(r).itemHeight}px`,fontSize:`${e.unref(r).textSize}px`})},[e.createElementVNode("div",{class:e.normalizeClass(["btn-item",{disabled:w.value}]),style:e.normalizeStyle({backgroundColor:a.color,color:e.unref(r).textColor}),onMousedown:c=>$(a),onMouseup:c=>q(a)},e.toDisplayString(a.name),47,a2)],4))),128))])]),e.renderSlot(s.$slots,"default",{},void 0,!0)],4),e.createVNode(T._sfc_main,{ref_key:"controlRef",ref:p,onSubmit:R,password:o.password},null,8,["password"])],64))}})),f2=L._export_sfc(C2,[["__scopeId","data-v-dda3873e"]]);exports.default=f2;
|
|
1
|
+
"use strict";var H=Object.defineProperty,U=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols,J=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,W=Reflect.get;var O=(n,l,o)=>l in n?H(n,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[l]=o,Z=(n,l)=>{for(var o in l||(l={}))K.call(l,o)&&O(n,o,l[o]);if(A)for(var o of A(l))Y.call(l,o)&&O(n,o,l[o]);return n},B=(n,l)=>U(n,G(l));var F=(n,l,o)=>W(J(n),o,l);var I=(n,l,o)=>new Promise((m,p)=>{var v=i=>{try{f(o.next(i))}catch(r){p(r)}},C=i=>{try{f(o.throw(i))}catch(r){p(r)}},f=i=>i.done?m(i.value):Promise.resolve(i.value).then(v,C);f((o=o.apply(n,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const Q=require("./BaseComponent-CNXUpPY1.cjs"),L=require("./index-D8dh_6Qd.cjs"),X=require("./titleStyle-NSnz6cUg.cjs"),T=require("./mix-control-modal-BoYynGT2.cjs"),x=require("element-plus"),e2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%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='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-318.000000,%20-1207.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M332.736782,1207.3%20C333.600123,1207.3%20334.3,1207.99988%20334.3,1208.86322%20L334.3,1208.86322%20L334.3,1221.73678%20C334.3,1222.60012%20333.600123,1223.3%20332.736782,1223.3%20L332.736782,1223.3%20L319.863218,1223.3%20C318.999877,1223.3%20318.3,1222.60012%20318.3,1221.73678%20L318.3,1221.73678%20L318.3,1208.86322%20C318.3,1207.99988%20318.999877,1207.3%20319.863218,1207.3%20L319.863218,1207.3%20Z%20M332.736782,1208.58736%20L319.863218,1208.58736%20C319.710864,1208.58736%20319.587356,1208.71086%20319.587356,1208.86322%20L319.587356,1208.86322%20L319.587356,1221.73678%20C319.587356,1221.88914%20319.710864,1222.01264%20319.863218,1222.01264%20L319.863218,1222.01264%20L332.736782,1222.01264%20C332.889136,1222.01264%20333.012644,1221.88914%20333.012644,1221.73678%20L333.012644,1221.73678%20L333.012644,1208.86322%20C333.012644,1208.71086%20332.889136,1208.58736%20332.736782,1208.58736%20L332.736782,1208.58736%20Z%20M323.725287,1216.86322%20C324.893338,1216.86322%20325.84023,1217.81011%20325.84023,1218.97816%20C325.84023,1220.14621%20324.893338,1221.0931%20323.725287,1221.0931%20C322.557237,1221.0931%20321.610345,1220.14621%20321.610345,1218.97816%20C321.610345,1217.81011%20322.557237,1216.86322%20323.725287,1216.86322%20Z%20M328.874713,1216.86322%20C330.042763,1216.86322%20330.989655,1217.81011%20330.989655,1218.97816%20C330.989655,1220.14621%20330.042763,1221.0931%20328.874713,1221.0931%20C327.706662,1221.0931%20326.75977,1220.14621%20326.75977,1218.97816%20C326.75977,1217.81011%20327.706662,1216.86322%20328.874713,1216.86322%20Z%20M323.725287,1218.15057%20C323.268224,1218.15057%20322.897701,1218.5211%20322.897701,1218.97816%20C322.897701,1219.43522%20323.268224,1219.80575%20323.725287,1219.80575%20C324.182351,1219.80575%20324.552874,1219.43522%20324.552874,1218.97816%20C324.552874,1218.5211%20324.182351,1218.15057%20323.725287,1218.15057%20Z%20M328.874713,1218.15057%20C328.417649,1218.15057%20328.047126,1218.5211%20328.047126,1218.97816%20C328.047126,1219.43522%20328.417649,1219.80575%20328.874713,1219.80575%20C329.331776,1219.80575%20329.702299,1219.43522%20329.702299,1218.97816%20C329.702299,1218.5211%20329.331776,1218.15057%20328.874713,1218.15057%20Z%20M329.242529,1214.65632%20C329.598022,1214.65632%20329.886207,1214.94451%20329.886207,1215.3%20C329.886207,1215.62587%20329.644052,1215.89518%20329.329872,1215.9378%20L329.242529,1215.94368%20L323.357471,1215.94368%20C323.001978,1215.94368%20322.713793,1215.65549%20322.713793,1215.3%20C322.713793,1214.97413%20322.955948,1214.70482%20323.270128,1214.6622%20L323.357471,1214.65632%20L329.242529,1214.65632%20Z%20M331.081609,1209.5069%20C331.437103,1209.5069%20331.725287,1209.79508%20331.725287,1210.15057%20L331.725287,1210.15057%20L331.725287,1213.0931%20C331.725287,1213.4486%20331.437103,1213.73678%20331.081609,1213.73678%20L331.081609,1213.73678%20L321.518391,1213.73678%20C321.162897,1213.73678%20320.874713,1213.4486%20320.874713,1213.0931%20L320.874713,1213.0931%20L320.874713,1210.15057%20C320.874713,1209.79508%20321.162897,1209.5069%20321.518391,1209.5069%20L321.518391,1209.5069%20Z%20M330.437931,1210.79425%20L322.162069,1210.79425%20L322.162069,1212.44943%20L330.437931,1212.44943%20L330.437931,1210.79425%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",t2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e双控%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-318.000000,%20-1207.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M332.736782,1207.3%20C333.600123,1207.3%20334.3,1207.99988%20334.3,1208.86322%20L334.3,1208.86322%20L334.3,1221.73678%20C334.3,1222.60012%20333.600123,1223.3%20332.736782,1223.3%20L332.736782,1223.3%20L319.863218,1223.3%20C318.999877,1223.3%20318.3,1222.60012%20318.3,1221.73678%20L318.3,1221.73678%20L318.3,1208.86322%20C318.3,1207.99988%20318.999877,1207.3%20319.863218,1207.3%20L319.863218,1207.3%20Z%20M332.736782,1208.58736%20L319.863218,1208.58736%20C319.710864,1208.58736%20319.587356,1208.71086%20319.587356,1208.86322%20L319.587356,1208.86322%20L319.587356,1221.73678%20C319.587356,1221.88914%20319.710864,1222.01264%20319.863218,1222.01264%20L319.863218,1222.01264%20L332.736782,1222.01264%20C332.889136,1222.01264%20333.012644,1221.88914%20333.012644,1221.73678%20L333.012644,1221.73678%20L333.012644,1208.86322%20C333.012644,1208.71086%20332.889136,1208.58736%20332.736782,1208.58736%20L332.736782,1208.58736%20Z%20M323.725287,1216.86322%20C324.893338,1216.86322%20325.84023,1217.81011%20325.84023,1218.97816%20C325.84023,1220.14621%20324.893338,1221.0931%20323.725287,1221.0931%20C322.557237,1221.0931%20321.610345,1220.14621%20321.610345,1218.97816%20C321.610345,1217.81011%20322.557237,1216.86322%20323.725287,1216.86322%20Z%20M328.874713,1216.86322%20C330.042763,1216.86322%20330.989655,1217.81011%20330.989655,1218.97816%20C330.989655,1220.14621%20330.042763,1221.0931%20328.874713,1221.0931%20C327.706662,1221.0931%20326.75977,1220.14621%20326.75977,1218.97816%20C326.75977,1217.81011%20327.706662,1216.86322%20328.874713,1216.86322%20Z%20M323.725287,1218.15057%20C323.268224,1218.15057%20322.897701,1218.5211%20322.897701,1218.97816%20C322.897701,1219.43522%20323.268224,1219.80575%20323.725287,1219.80575%20C324.182351,1219.80575%20324.552874,1219.43522%20324.552874,1218.97816%20C324.552874,1218.5211%20324.182351,1218.15057%20323.725287,1218.15057%20Z%20M328.874713,1218.15057%20C328.417649,1218.15057%20328.047126,1218.5211%20328.047126,1218.97816%20C328.047126,1219.43522%20328.417649,1219.80575%20328.874713,1219.80575%20C329.331776,1219.80575%20329.702299,1219.43522%20329.702299,1218.97816%20C329.702299,1218.5211%20329.331776,1218.15057%20328.874713,1218.15057%20Z%20M329.242529,1214.65632%20C329.598022,1214.65632%20329.886207,1214.94451%20329.886207,1215.3%20C329.886207,1215.62587%20329.644052,1215.89518%20329.329872,1215.9378%20L329.242529,1215.94368%20L323.357471,1215.94368%20C323.001978,1215.94368%20322.713793,1215.65549%20322.713793,1215.3%20C322.713793,1214.97413%20322.955948,1214.70482%20323.270128,1214.6622%20L323.357471,1214.65632%20L329.242529,1214.65632%20Z%20M331.081609,1209.5069%20C331.437103,1209.5069%20331.725287,1209.79508%20331.725287,1210.15057%20L331.725287,1210.15057%20L331.725287,1213.0931%20C331.725287,1213.4486%20331.437103,1213.73678%20331.081609,1213.73678%20L331.081609,1213.73678%20L321.518391,1213.73678%20C321.162897,1213.73678%20320.874713,1213.4486%20320.874713,1213.0931%20L320.874713,1213.0931%20L320.874713,1210.15057%20C320.874713,1209.79508%20321.162897,1209.5069%20321.518391,1209.5069%20L321.518391,1209.5069%20Z%20M330.437931,1210.79425%20L322.162069,1210.79425%20L322.162069,1212.44943%20L330.437931,1212.44943%20L330.437931,1210.79425%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",o2={class:"font-semibold"},l2={class:"flex items-center"},n2={class:"mix-body"},r2={class:"w-full flex flex-wrap content-start"},a2=["onMousedown","onMouseup"],s2={DEFAULT_ICON:e2,ACTIVE_ICON:t2,NAME_CN:"双控",NAME_EN:"Dual Control",ORDER:3},c2={bgColor:"#fff",titleColor:"#111",textColor:"#fff",titleSize:14,textSize:14,itemHeight:42,radiusSize:8,items:2,isHideTitle:!1,method:{value:"alway",type:"select",label:"component.switch.method",options:L.CONTROL_OPTIONS}},j=[{upper:{command:"Control_01",code:0},down:{command:"Control_01",code:1},name:"关机",color:"#c92309",code:0},{upper:{command:"Control_01",code:0},down:{command:"Control_01",code:1},name:"开机",color:"#217406",code:1}],i2=["name","color","upper","down"],d2={useAlias:!1,multiObject:!1,hideMultiObject:!0,statusFv:"",statusType:1,status:[{code:0,text:"离线",color:"#c92309"}]},u2=["mosaic"],m2={DEFAULT:s2,OPTIONS:c2,DATA:j,PARAMS:i2,SOURCE:u2,COMMON:d2},C2=e.defineComponent(B(Z({},m2),{__name:"pressBtn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"},password:{type:String,default:""},authorized:{type:Array,default:()=>[]}},setup(n){const l=n,o=e.reactive({authorized:[],password:""}),m=e.reactive({text:"",color:""}),p=e.ref(null),v=e.ref(!0),C=e.ref(!1);class f extends Q.BaseComponent{extractStyles(){var a,d,c,g,u,h,y,_,b,M,k,z,E,N;const{options:t}=this.props.conf;return{bgColor:((a=t==null?void 0:t.bgColor)==null?void 0:a.value)||"#fff",titleColor:((d=t==null?void 0:t.titleColor)==null?void 0:d.value)||"#111",textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#fff",titleSize:((g=t==null?void 0:t.titleSize)==null?void 0:g.value)||16,textSize:((u=t==null?void 0:t.textSize)==null?void 0:u.value)||14,itemHeight:((h=t==null?void 0:t.itemHeight)==null?void 0:h.value)||42,radiusSize:(_=(y=t==null?void 0:t.radiusSize)==null?void 0:y.value)!=null?_:8,items:(M=(b=t==null?void 0:t.items)==null?void 0:b.value)!=null?M:2,method:(z=(k=t==null?void 0:t.method)==null?void 0:k.value)!=null?z:"alway",isHideTitle:(N=(E=t==null?void 0:t.isHideTitle)==null?void 0:E.value)!=null?N:!1}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:j}onPreview(){return I(this,null,function*(){yield F(f.prototype,this,"onPreview").call(this);const t=yield T.getAuthorized(this.props);o.authorized=t.authorized,o.password=t.password})}setSocketData(t){var c,g;if(!t)return;const{common:a}=this.props.conf,d=this.extractDataValue(t,a.statusFv);if(d!=null){const u=a.status.find(h=>String(h.code)===String(d));m.text=(c=u==null?void 0:u.text)!=null?c:"",m.color=(g=u==null?void 0:u.color)!=null?g:""}}}const i=new f(l,"pressBtn");i.setupLifecycle();const r=i.getStyle(),V=e.computed(()=>X.generateTitleStyle(l.conf.options)),D=e.computed(()=>`${(100/r.value.items).toFixed(2)||100}%`),w=e.computed(()=>{const s=r.value.method||"alway";return s==="once"&&v.value||s==="alway"&&!C.value}),P=()=>{C.value||(p.value.modal.visible=!0)},R=()=>{C.value=!0,r.value.method==="once"&&(v.value=!1)},$=s=>{if(w.value)return;if(o.authorized.indexOf(s.down.command)===-1){x.ElMessage.error("您没有控制权限!");return}const{common:t}=l.conf,a=JSON.parse(sessionStorage.getItem(L.ALIAS_MAPPING_KEY)||"{}");let c={block_mapping:"pusher",action:"publish_command",object_id:t.useAlias?a[t.object_alias]:t.object_id||l.uid,command:s.down.command.toString(),value:s.down.code.toString()||"",control:o.password,rule:r.value.method};S(c,"down")},q=s=>{if(w.value)return;if(o.authorized.indexOf(s.upper.command)===-1){x.ElMessage.error("您没有控制权限!");return}const{common:t}=l.conf,a=JSON.parse(sessionStorage.getItem(L.ALIAS_MAPPING_KEY)||"{}");let c={block_mapping:"pusher",action:"publish_command",object_id:t.useAlias?a[t.object_alias]:t.object_id||l.uid,command:s.upper.command.toString(),value:s.upper.code.toString()||"",control:o.password,rule:r.value.method};S(c,"up")},S=(s,t)=>{L.api.platform(a=>{a.code===200&&(x.ElMessage.success(a.msg),v.value=!1,r.value.method==="alway"&&t==="up"&&(C.value=!1))},s)};return(s,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(r).bgColor,borderRadius:`${e.unref(r).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(V.value)},[e.createElementVNode("div",o2,e.toDisplayString(n.conf.caption||n.conf.name),1),e.createElementVNode("div",l2,[e.unref(r).method!=="never"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["verify-btn",{disabled:C.value}]),onClick:P},"验证密码",2)):e.createCommentVNode("",!0),m.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"status-btn",style:e.normalizeStyle({backgroundColor:m.color,color:e.unref(r).textColor})},e.toDisplayString(m.text),5)):e.createCommentVNode("",!0)])],4),e.createElementVNode("div",n2,[e.createElementVNode("div",r2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.conf.data,(a,d)=>(e.openBlock(),e.createElementBlock("div",{class:"btn-wrap",key:d,style:e.normalizeStyle({width:D.value,height:`${e.unref(r).itemHeight}px`,fontSize:`${e.unref(r).textSize}px`})},[e.createElementVNode("div",{class:e.normalizeClass(["btn-item",{disabled:w.value}]),style:e.normalizeStyle({backgroundColor:a.color,color:e.unref(r).textColor}),onMousedown:c=>$(a),onMouseup:c=>q(a)},e.toDisplayString(a.name),47,a2)],4))),128))])]),e.renderSlot(s.$slots,"default",{},void 0,!0)],4),e.createVNode(T._sfc_main,{ref_key:"controlRef",ref:p,onSubmit:R,password:o.password},null,8,["password"])],64))}})),f2=L._export_sfc(C2,[["__scopeId","data-v-dda3873e"]]);exports.default=f2;
|
|
@@ -12,8 +12,8 @@ var V = (c, o, a) => o in c ? H(c, o, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
}, D = (c, o) => U(c, I(o));
|
|
13
13
|
import { defineComponent as Y, computed as C, ref as G, watch as W, openBlock as d, createElementBlock as v, normalizeStyle as m, unref as n, createElementVNode as i, toDisplayString as u, withDirectives as q, Fragment as E, renderList as j, vModelSelect as J, createCommentVNode as h, renderSlot as K } from "vue";
|
|
14
14
|
import { u as Q } from "./safeI18n-CXZgGKWp.js";
|
|
15
|
-
import { B as X } from "./BaseComponent-
|
|
16
|
-
import { _ as Z } from "./index-
|
|
15
|
+
import { B as X } from "./BaseComponent-D5tlYehc.js";
|
|
16
|
+
import { _ as Z } from "./index-Bdq33405.js";
|
|
17
17
|
import { g as tt } from "./titleStyle-BT5GlpAb.js";
|
|
18
18
|
import { A as et, D as lt } from "./ele-evn-icon-MWzAujnD.js";
|
|
19
19
|
const ot = { class: "title-text" }, nt = { class: "title-actions" }, st = ["value"], at = { class: "mix-body" }, it = { class: "pt-thead" }, ct = { class: "pt-th pt-col-stage" }, ut = { class: "pt-th pt-col-duration" }, pt = { class: "pt-th pt-col-status" }, rt = { class: "pt-td pt-col-stage" }, dt = { class: "pt-td pt-col-duration" }, vt = { class: "pt-td pt-col-status" }, _t = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var B=Object.defineProperty,L=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var C=(i,n,a)=>n in i?B(i,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[n]=a,k=(i,n)=>{for(var a in n||(n={}))z.call(n,a)&&C(i,a,n[a]);if(S)for(var a of S(n))F.call(n,a)&&C(i,a,n[a]);return i},w=(i,n)=>L(i,$(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./safeI18n-DR20q_h1.cjs"),A=require("./BaseComponent-
|
|
1
|
+
"use strict";var B=Object.defineProperty,L=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var C=(i,n,a)=>n in i?B(i,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[n]=a,k=(i,n)=>{for(var a in n||(n={}))z.call(n,a)&&C(i,a,n[a]);if(S)for(var a of S(n))F.call(n,a)&&C(i,a,n[a]);return i},w=(i,n)=>L(i,$(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./safeI18n-DR20q_h1.cjs"),A=require("./BaseComponent-CNXUpPY1.cjs"),I=require("./index-D8dh_6Qd.cjs"),M=require("./titleStyle-NSnz6cUg.cjs"),E=require("./ele-evn-icon-DUQMS-9T.cjs"),R={class:"title-text"},U={class:"title-actions"},H=["value"],q={class:"mix-body"},P={class:"pt-thead"},Y={class:"pt-th pt-col-stage"},G={class:"pt-th pt-col-duration"},W={class:"pt-th pt-col-status"},J={class:"pt-td pt-col-stage"},K={class:"pt-td pt-col-duration"},Q={class:"pt-td pt-col-status"},X={key:0,class:"pt-empty"},Z={DEFAULT_ICON:E.DEFAULT_ICON,ACTIVE_ICON:E.ACTIVE_ICON,NAME_CN:"流程效率表",NAME_EN:"Process Table",ORDER:12},ee={bgColor:"#fff",titleColor:"#111",textColor:"#666",radiusSize:8,textSize:13,rowHeight:44,isHideTitle:!1,description:"关注预警发出、任务下达、现场反馈到隐患关闭全过程。",showFilter:!0,defaultLevel:{value:"1",type:"select",label:"component.options.lw_defaultLevel",options:[{label:"component.options.lw_level_1",value:"1"},{label:"component.options.lw_level_2",value:"2"},{label:"component.options.lw_level_3",value:"3"},{label:"component.options.lw_level_4",value:"4"},{label:"component.options.lw_level_all",value:"all"}]},btnText:"数据下载",linkChannel:{value:"landslide",type:"select",label:"component.options.lw_linkChannel",options:[{label:"component.options.lw_linkChannel_landslide",value:"landslide"},{label:"component.options.lw_linkChannel_custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.options.lw_customChannel",showWhen:{linkChannel:"custom"}}},te=[{stage:"预警推送",fv:"",object_id:"",value:1.8,unit:"min",status:"正常",statusType:"normal",level:"1"},{stage:"调度确认",fv:"",object_id:"",value:6.5,unit:"min",status:"可优化",statusType:"warn",level:"1"},{stage:"现场响应",fv:"",object_id:"",value:12.4,unit:"min",status:"波动较大",statusType:"danger",level:"1"},{stage:"隐患关闭",fv:"",object_id:"",value:3.2,unit:"h",status:"持续跟踪",statusType:"info",level:"1"}],le=[{key:"stage",label:"component.options.lw_stage",type:"string"},"fv","object_id",{key:"unit",label:"component.options.lw_unitMinH",type:"string"},{key:"status",label:"component.options.lw_statusText",type:"string"},{key:"statusType",label:"component.options.lw_statusType",type:"select",options:[{label:"component.options.lw_statusType_normal",value:"normal"},{label:"component.options.lw_statusType_warn",value:"warn"},{label:"component.options.lw_statusType_danger",value:"danger"},{label:"component.options.lw_statusType_info",value:"info"}]},{key:"level",label:"component.options.lw_level",type:"select",options:[{label:"component.options.lw_levelShort_1",value:"1"},{label:"component.options.lw_levelShort_2",value:"2"},{label:"component.options.lw_levelShort_3",value:"3"},{label:"component.options.lw_levelShort_4",value:"4"}]}],oe=["mosaic","statistics","calculate"],ne={useAlias:!1,multiObject:!0,source:"statistics"},se={DEFAULT:Z,OPTIONS:ee,DATA:te,PARAMS:le,SOURCE:oe,COMMON:ne},ae=e.defineComponent(w(k({},se),{__name:"processTable",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){const n=i,a={normal:{bg:"#e7f7ec",color:"#1f9d4a"},warn:{bg:"#fff5e0",color:"#d97706"},danger:{bg:"#fde8e8",color:"#dc2626"},info:{bg:"#e0ecfd",color:"#2563eb"}};class T extends A.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#666"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",13),rowHeight:this.getOptionValue("rowHeight",44),description:this.getOptionValue("description",""),showFilter:this.getOptionValue("showFilter",!0),defaultLevel:this.getOptionValue("defaultLevel","1"),btnText:this.getOptionValue("btnText",""),linkChannel:this.getOptionValue("linkChannel","landslide"),customChannel:this.getOptionValue("customChannel","")}}getLinkChannel(){const t=this.Style.value;return(t==null?void 0:t.linkChannel)==="custom"?t.customChannel||"":(t==null?void 0:t.linkChannel)||""}setSocketData(t){var r;if(!t)return;(((r=this.props.conf)==null?void 0:r.data)||[]).forEach(m=>{const p=this.extractDataValue(t,m.fv);p!=null&&(m.value=Number(p)||0)})}}const g=new T(n,"processTable");g.setupLifecycle();const{t:c}=j.useSafeI18n(),s=g.getStyle(),b=n.conf,V=e.computed(()=>M.generateTitleStyle(n.conf.options)),x=e.computed(()=>[{label:c("component.options.lw_level_1"),value:"1"},{label:c("component.options.lw_level_2"),value:"2"},{label:c("component.options.lw_level_3"),value:"3"},{label:c("component.options.lw_level_4"),value:"4"},{label:c("component.options.lw_level_all"),value:"all"}]),u=e.ref(s.value.defaultLevel||"1");e.watch(()=>s.value.defaultLevel,l=>{l&&(u.value=l)});const v=e.computed(()=>{var t;const l=((t=n.conf)==null?void 0:t.data)||[];return u.value==="all"?l:l.filter(o=>String(o.level||"1")===String(u.value))});function h(l){const t=l==null?void 0:l.value;if(t==null||t==="")return"--";const o=(l==null?void 0:l.unit)||"",r=typeof t=="number"?Number.isInteger(t)?String(t):t.toFixed(1):String(t);return o?`${r} ${o}`:r}function N(l){const t=a[l]||a.info;return{background:t.bg,color:t.color}}function _(l){const t=String(l!=null?l:"");return/[",\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t}function O(){const l=new Date,t=o=>String(o).padStart(2,"0");return`${l.getFullYear()}${t(l.getMonth()+1)}${t(l.getDate())}_${t(l.getHours())}${t(l.getMinutes())}${t(l.getSeconds())}`}function D(){if(n.mode!=="preview")return;const l=v.value;if(!l.length)return;const t=["阶段","平均时长","状态"].join(","),o=l.map(f=>[_(f.stage),_(h(f)),_(f.status)].join(",")).join(`
|
|
2
2
|
`),r=t+`
|
|
3
3
|
`+o,m=u.value==="all"?"全部":`${u.value}级`,p=new Blob(["\uFEFF"+r],{type:"text/csv;charset=utf-8;"}),y=URL.createObjectURL(p),d=document.createElement("a");d.href=y,d.download=`流程效率表_${m}_${O()}.csv`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(y)}return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(s).bgColor,borderRadius:`${e.unref(s).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(V.value)},[e.createElementVNode("span",R,e.toDisplayString(e.unref(b).caption||e.unref(b).name),1),e.createElementVNode("div",U,[e.unref(s).showFilter?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,"onUpdate:modelValue":t[0]||(t[0]=o=>u.value=o),class:"pt-select"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,o=>(e.openBlock(),e.createElementBlock("option",{key:o.value,value:o.value},e.toDisplayString(o.label),9,H))),128))],512)),[[e.vModelSelect,u.value]]):e.createCommentVNode("",!0),e.unref(s).btnText?(e.openBlock(),e.createElementBlock("button",{key:1,class:"pt-btn",onClick:D},e.toDisplayString(e.unref(s).btnText),1)):e.createCommentVNode("",!0)])],4),e.createElementVNode("div",q,[e.unref(s).description?(e.openBlock(),e.createElementBlock("div",{key:0,class:"body-desc",style:e.normalizeStyle({fontSize:`${e.unref(s).textSize}px`,color:e.unref(s).textColor})},e.toDisplayString(e.unref(s).description),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"body-table",style:e.normalizeStyle({fontSize:`${e.unref(s).textSize}px`,color:e.unref(s).textColor})},[e.createElementVNode("div",P,[e.createElementVNode("div",Y,e.toDisplayString(e.unref(c)("component.options.lw_th_stage")),1),e.createElementVNode("div",G,e.toDisplayString(e.unref(c)("component.options.lw_th_duration")),1),e.createElementVNode("div",W,e.toDisplayString(e.unref(c)("component.options.lw_th_status")),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:"pt-tr",style:e.normalizeStyle({minHeight:`${e.unref(s).rowHeight}px`})},[e.createElementVNode("div",J,e.toDisplayString(o.stage||"--"),1),e.createElementVNode("div",K,e.toDisplayString(h(o)),1),e.createElementVNode("div",Q,[e.createElementVNode("span",{class:"pt-tag",style:e.normalizeStyle(N(o.statusType))},e.toDisplayString(o.status||"--"),5)])],4))),128)),v.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",X,e.toDisplayString(e.unref(c)("component.options.lw_noData")),1))],4)]),e.renderSlot(l.$slots,"default",{},void 0,!0)],4))}})),ie=I._export_sfc(ae,[["__scopeId","data-v-4bb64fc6"]]);exports.default=ie;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty,h=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var f=(r,o,l)=>o in r?m(r,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[o]=l,L=(r,o)=>{for(var l in o||(o={}))y.call(o,l)&&f(r,l,o[l]);if(p)for(var l of p(o))S.call(o,l)&&f(r,l,o[l]);return r},g=(r,o)=>h(r,v(o));var x=(r,o,l)=>new Promise((c,n)=>{var C=a=>{try{i(l.next(a))}catch(t){n(t)}},d=a=>{try{i(l.throw(a))}catch(t){n(t)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(C,d);i((l=l.apply(r,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/progress/style/css");const e=require("vue"),w=require("./BaseComponent-Cco_5i96.cjs"),_=require("./index-Do1YWdUS.cjs"),M=require("./titleStyle-NSnz6cUg.cjs"),O="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",k="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",E={class:"mix-body flex flex-col"},T={class:"flex-1"},z={DEFAULT_ICON:O,ACTIVE_ICON:k,NAME_CN:"条形进度",NAME_EN:"Progress Bar",ORDER:2},V={titleColor:"#111",textColor:"#111",bgColor:"#fff",barColor:"#ebeef5",radiusSize:8,textSize:14,labelWidth:48,barWidth:16,isHideTitle:!1},B=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value",object_id:""},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value",object_id:""}],Z=["name","fv","object_id","color","maxType","max"],N=["mosaic"],A={useAlias:!1,multiObject:!1,source:"mosaic"},F={DEFAULT:z,OPTIONS:V,DATA:B,PARAMS:Z,SOURCE:N,COMMON:A},D=e.defineComponent(g(L({},F),{__name:"progressBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){const o=r;class l extends w.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),barColor:this.getOptionValue("barColor","#ebeef5"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),textSize:this.getOptionValue("textSize",14),radiusSize:this.getOptionValue("radiusSize",8),labelWidth:this.getOptionValue("labelWidth",80),barWidth:this.getOptionValue("barWidth",16),isHideTitle:this.getOptionValue("isHideTitle",!1)}}init(){return x(this,null,function*(){var i;this.Style.value=this.extractStyles(),this.applyTheme(),(i=this.props.conf.data)!=null&&i.length||(this.props.conf.data=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value",object_id:""},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value",object_id:""}])})}setHistoryData(i){if(!i)return;const{data:a}=this.props.conf;!Array.isArray(a)||!a.length||a.forEach((t,s)=>{var u;t.value=(u=i[s].data[0])!=null?u:0,t.percent=t.value/t.max*100})}setSocketData(i){if(!i)return;const{data:a}=this.props.conf;a.forEach(t=>{t.value=this.extractDataValue(i,t.fv)||0;const s=t.maxType==="value"?t.max:this.extractDataValue(i,t.max)||0;t.percent=s==0?0:Number((t.value/s*100).toFixed(2))})}}const c=new l(o,"progressBar");c.setupLifecycle();const n=c.getStyle(),C=e.computed(()=>M.generateTitleStyle(o.conf.options));return(d,i)=>{const a=b.ElProgress;return 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(C.value)},e.toDisplayString(r.conf.caption||r.conf.name),5),e.createElementVNode("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.conf.data,(t,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"flex item"},[e.createElementVNode("div",{class:"label",style:e.normalizeStyle({fontSize:e.unref(n).textSize+"px",color:e.unref(n).textColor,width:e.unref(n).labelWidth+"px"})},e.toDisplayString(t.name),5),e.createElementVNode("div",T,[e.createVNode(a,{percentage:t.percent,"text-inside":!0,style:e.normalizeStyle({"--progress-bg-color":e.unref(n).barColor}),color:t.color,"stroke-width":e.unref(n).barWidth},null,8,["percentage","style","color","stroke-width"])]),e.createElementVNode("div",{class:"value",style:e.normalizeStyle({fontSize:e.unref(n).textSize+"px",color:e.unref(n).textColor})},e.toDisplayString(t.value),5)]))),128))]),e.renderSlot(d.$slots,"default",{},void 0,!0)],4)}}})),j=_._export_sfc(D,[["__scopeId","data-v-d195fc64"]]);exports.default=j;
|
|
1
|
+
"use strict";var m=Object.defineProperty,h=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var f=(r,o,l)=>o in r?m(r,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[o]=l,L=(r,o)=>{for(var l in o||(o={}))y.call(o,l)&&f(r,l,o[l]);if(p)for(var l of p(o))S.call(o,l)&&f(r,l,o[l]);return r},g=(r,o)=>h(r,v(o));var x=(r,o,l)=>new Promise((c,n)=>{var C=a=>{try{i(l.next(a))}catch(t){n(t)}},d=a=>{try{i(l.throw(a))}catch(t){n(t)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(C,d);i((l=l.apply(r,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/progress/style/css");const e=require("vue"),w=require("./BaseComponent-CNXUpPY1.cjs"),_=require("./index-D8dh_6Qd.cjs"),M=require("./titleStyle-NSnz6cUg.cjs"),O="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",k="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",E={class:"mix-body flex flex-col"},T={class:"flex-1"},z={DEFAULT_ICON:O,ACTIVE_ICON:k,NAME_CN:"条形进度",NAME_EN:"Progress Bar",ORDER:2},V={titleColor:"#111",textColor:"#111",bgColor:"#fff",barColor:"#ebeef5",radiusSize:8,textSize:14,labelWidth:48,barWidth:16,isHideTitle:!1},B=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value",object_id:""},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value",object_id:""}],Z=["name","fv","object_id","color","maxType","max"],N=["mosaic"],A={useAlias:!1,multiObject:!1,source:"mosaic"},F={DEFAULT:z,OPTIONS:V,DATA:B,PARAMS:Z,SOURCE:N,COMMON:A},D=e.defineComponent(g(L({},F),{__name:"progressBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){const o=r;class l extends w.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),barColor:this.getOptionValue("barColor","#ebeef5"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),textSize:this.getOptionValue("textSize",14),radiusSize:this.getOptionValue("radiusSize",8),labelWidth:this.getOptionValue("labelWidth",80),barWidth:this.getOptionValue("barWidth",16),isHideTitle:this.getOptionValue("isHideTitle",!1)}}init(){return x(this,null,function*(){var i;this.Style.value=this.extractStyles(),this.applyTheme(),(i=this.props.conf.data)!=null&&i.length||(this.props.conf.data=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value",object_id:""},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value",object_id:""}])})}setHistoryData(i){if(!i)return;const{data:a}=this.props.conf;!Array.isArray(a)||!a.length||a.forEach((t,s)=>{var u;t.value=(u=i[s].data[0])!=null?u:0,t.percent=t.value/t.max*100})}setSocketData(i){if(!i)return;const{data:a}=this.props.conf;a.forEach(t=>{t.value=this.extractDataValue(i,t.fv)||0;const s=t.maxType==="value"?t.max:this.extractDataValue(i,t.max)||0;t.percent=s==0?0:Number((t.value/s*100).toFixed(2))})}}const c=new l(o,"progressBar");c.setupLifecycle();const n=c.getStyle(),C=e.computed(()=>M.generateTitleStyle(o.conf.options));return(d,i)=>{const a=b.ElProgress;return 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(C.value)},e.toDisplayString(r.conf.caption||r.conf.name),5),e.createElementVNode("div",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.conf.data,(t,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"flex item"},[e.createElementVNode("div",{class:"label",style:e.normalizeStyle({fontSize:e.unref(n).textSize+"px",color:e.unref(n).textColor,width:e.unref(n).labelWidth+"px"})},e.toDisplayString(t.name),5),e.createElementVNode("div",T,[e.createVNode(a,{percentage:t.percent,"text-inside":!0,style:e.normalizeStyle({"--progress-bg-color":e.unref(n).barColor}),color:t.color,"stroke-width":e.unref(n).barWidth},null,8,["percentage","style","color","stroke-width"])]),e.createElementVNode("div",{class:"value",style:e.normalizeStyle({fontSize:e.unref(n).textSize+"px",color:e.unref(n).textColor})},e.toDisplayString(t.value),5)]))),128))]),e.renderSlot(d.$slots,"default",{},void 0,!0)],4)}}})),j=_._export_sfc(D,[["__scopeId","data-v-d195fc64"]]);exports.default=j;
|
|
@@ -30,8 +30,8 @@ import { ElProgress as T } from "element-plus/es";
|
|
|
30
30
|
import "element-plus/es/components/base/style/css";
|
|
31
31
|
import "element-plus/es/components/progress/style/css";
|
|
32
32
|
import { defineComponent as Z, computed as k, openBlock as L, createElementBlock as g, normalizeStyle as c, unref as s, createElementVNode as C, toDisplayString as x, Fragment as z, renderList as V, createVNode as E, renderSlot as A } from "vue";
|
|
33
|
-
import { B } from "./BaseComponent-
|
|
34
|
-
import { _ as F } from "./index-
|
|
33
|
+
import { B } from "./BaseComponent-D5tlYehc.js";
|
|
34
|
+
import { _ as F } from "./index-Bdq33405.js";
|
|
35
35
|
import { g as N } from "./titleStyle-BT5GlpAb.js";
|
|
36
36
|
const D = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", W = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", j = { class: "mix-body flex flex-col" }, I = { class: "flex-1" }, P = {
|
|
37
37
|
DEFAULT_ICON: D,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty,S=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var v=(a,o,l)=>o in a?b(a,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):a[o]=l,x=(a,o)=>{for(var l in o||(o={}))k.call(o,l)&&v(a,l,o[l]);if(f)for(var l of f(o))N.call(o,l)&&v(a,l,o[l]);return a},y=(a,o)=>S(a,w(o));var h=(a,o,l)=>new Promise((d,r)=>{var m=c=>{try{p(l.next(c))}catch(s){r(s)}},g=c=>{try{p(l.throw(c))}catch(s){r(s)}},p=c=>c.done?d(c.value):Promise.resolve(c.value).then(m,g);p((l=l.apply(a,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/progress/style/css");const e=require("vue"),V=require("./BaseComponent-Cco_5i96.cjs"),_=require("./index-Do1YWdUS.cjs"),z=require("./titleStyle-NSnz6cUg.cjs"),E="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e环形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-735.000000,%20-341.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M743.063004,342.931102%20C743.116316,343.282573%20742.87461,343.610715%20742.523139,343.664027%20C739.245615,344.16117%20736.791283,346.991546%20736.791283,350.341222%20C736.791283,353.692268%20739.24752,356.523394%20742.526687,357.018996%20C742.861546,357.069587%20743.201677,357.095181%20743.545242,357.095181%20C743.887612,357.095181%20744.226635,357.069756%20744.560421,357.019508%20C747.477621,356.580105%20749.784771,354.272574%20750.223659,351.355292%20C750.276546,351.003757%20750.604395,350.761654%20750.95593,350.81454%20C751.307466,350.867427%20751.549569,351.195276%20751.496682,351.546811%20C750.973739,355.022805%20748.228057,357.768941%20744.752113,358.292505%20C744.354903,358.352301%20743.951823,358.382531%20743.545242,358.382531%20C743.137244,358.382531%20742.732829,358.3521%20742.334339,358.291894%20C738.427868,357.701483%20735.503933,354.331278%20735.503933,350.341222%20C735.503933,346.352789%20738.425598,342.983478%20742.330079,342.391237%20C742.68155,342.337925%20743.009692,342.579631%20743.063004,342.931102%20Z%20M743.545242,346.738567%20C745.534982,346.738567%20747.14797,348.351556%20747.14797,350.341296%20C747.14797,352.331036%20745.534982,353.944024%20743.545242,353.944024%20C741.555502,353.944024%20739.942514,352.331036%20739.942514,350.341296%20C739.942514,348.351556%20741.555502,346.738567%20743.545242,346.738567%20Z%20M743.545242,348.025917%20C742.266485,348.025917%20741.229863,349.062539%20741.229863,350.341296%20C741.229863,351.620052%20742.266485,352.656675%20743.545242,352.656675%20C744.823999,352.656675%20745.860621,351.620052%20745.860621,350.341296%20C745.860621,349.062539%20744.823999,348.025917%20743.545242,348.025917%20Z%20M744.666769,342.383049%20L744.754011,342.390268%20C748.228261,342.914384%20750.972652,345.659076%20751.496359,349.133416%20C751.549346,349.484937%20751.307336,349.812855%20750.955816,349.865842%20C750.604295,349.918828%20750.276377,349.676819%20750.22339,349.325298%20C749.783861,346.409405%20747.477795,344.103086%20744.561978,343.663214%20C744.210463,343.610185%20743.968493,343.282238%20744.021521,342.930724%20C744.065712,342.637796%20744.300818,342.420939%20744.581381,342.387478%20L744.666769,342.383049%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",T="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e环形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-735.000000,%20-341.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M743.063004,342.931102%20C743.116316,343.282573%20742.87461,343.610715%20742.523139,343.664027%20C739.245615,344.16117%20736.791283,346.991546%20736.791283,350.341222%20C736.791283,353.692268%20739.24752,356.523394%20742.526687,357.018996%20C742.861546,357.069587%20743.201677,357.095181%20743.545242,357.095181%20C743.887612,357.095181%20744.226635,357.069756%20744.560421,357.019508%20C747.477621,356.580105%20749.784771,354.272574%20750.223659,351.355292%20C750.276546,351.003757%20750.604395,350.761654%20750.95593,350.81454%20C751.307466,350.867427%20751.549569,351.195276%20751.496682,351.546811%20C750.973739,355.022805%20748.228057,357.768941%20744.752113,358.292505%20C744.354903,358.352301%20743.951823,358.382531%20743.545242,358.382531%20C743.137244,358.382531%20742.732829,358.3521%20742.334339,358.291894%20C738.427868,357.701483%20735.503933,354.331278%20735.503933,350.341222%20C735.503933,346.352789%20738.425598,342.983478%20742.330079,342.391237%20C742.68155,342.337925%20743.009692,342.579631%20743.063004,342.931102%20Z%20M743.545242,346.738567%20C745.534982,346.738567%20747.14797,348.351556%20747.14797,350.341296%20C747.14797,352.331036%20745.534982,353.944024%20743.545242,353.944024%20C741.555502,353.944024%20739.942514,352.331036%20739.942514,350.341296%20C739.942514,348.351556%20741.555502,346.738567%20743.545242,346.738567%20Z%20M743.545242,348.025917%20C742.266485,348.025917%20741.229863,349.062539%20741.229863,350.341296%20C741.229863,351.620052%20742.266485,352.656675%20743.545242,352.656675%20C744.823999,352.656675%20745.860621,351.620052%20745.860621,350.341296%20C745.860621,349.062539%20744.823999,348.025917%20743.545242,348.025917%20Z%20M744.666769,342.383049%20L744.754011,342.390268%20C748.228261,342.914384%20750.972652,345.659076%20751.496359,349.133416%20C751.549346,349.484937%20751.307336,349.812855%20750.955816,349.865842%20C750.604295,349.918828%20750.276377,349.676819%20750.22339,349.325298%20C749.783861,346.409405%20747.477795,344.103086%20744.561978,343.663214%20C744.210463,343.610185%20743.968493,343.282238%20744.021521,342.930724%20C744.065712,342.637796%20744.300818,342.420939%20744.581381,342.387478%20L744.666769,342.383049%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",B={class:"mix-body flex flex-wrap"},M={DEFAULT_ICON:E,ACTIVE_ICON:T,NAME_CN:"环形进度",NAME_EN:"Progress Circle",ORDER:3},D={titleColor:"#111",textColor:"#111",bgColor:"#fff",barColor:"#ebeef5",radiusSize:8,textSize:14,barWidth:16,diameter:70,position:{value:"outer",type:"radio",option:[{value:"outer",label:"component.gauge.outer"},{value:"inner",label:"component.gauge.inner"}],label:"component.gauge.position"},type:{value:"value",type:"radio",option:[{value:"value",label:"component.gauge.value"},{value:"rate",label:"component.gauge.rate"}],label:"component.gauge.type"},isHideTitle:!1},A=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value",object_id:""},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value",object_id:""}],F=["name","fv","object_id","color","maxType","max"],j=["mosaic"],L={useAlias:!1,multiObject:!1,source:"mosaic"},Z={DEFAULT:M,OPTIONS:D,DATA:A,PARAMS:F,SOURCE:j,COMMON:L},q=e.defineComponent(y(x({},Z),{__name:"progressCircle",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(a){const o=a;class l extends V.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),barColor:this.getOptionValue("barColor","#ebeef5"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),textSize:this.getOptionValue("textSize",14),radiusSize:this.getOptionValue("radiusSize",8),barWidth:this.getOptionValue("barWidth",16),diameter:this.getOptionValue("diameter",70),position:this.getOptionValue("position","outer"),type:this.getOptionValue("type","value"),isHideTitle:this.getOptionValue("isHideTitle",!1)}}init(){return h(this,null,function*(){var t;this.Style.value=this.extractStyles(),this.applyTheme(),(t=this.props.conf.data)!=null&&t.length||(this.props.conf.data=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value",object_id:""},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value",object_id:""}])})}setHistoryData(t){if(!t)return;const{data:i}=this.props.conf;!Array.isArray(i)||!i.length||i.forEach((n,u)=>{var C;n.value=(C=t[u].data[0])!=null?C:0})}setSocketData(t){if(!t)return;const{data:i}=this.props.conf;i.forEach(n=>{n.value=this.extractDataValue(t,n.fv)||0;const u=n.maxType==="value"?n.max:this.extractDataValue(t,n.max)||0;n.percent=u==0?0:Number((n.value/u*100).toFixed(2))})}}const d=new l(o,"progressCircle");d.setupLifecycle();const r=d.getStyle(),m=e.computed(()=>{var i;const s=(i=r.value)==null?void 0:i.diameter,t=Number(s);return typeof t=="number"&&!Number.isNaN(t)&&t>0?t:70}),g=e.computed(()=>{var i;const s=(i=r.value)==null?void 0:i.barWidth,t=Number(s);return typeof t=="number"&&!Number.isNaN(t)&&t>=0?t:16}),p=e.computed(()=>z.generateTitleStyle(o.conf.options)),c=(s,t)=>r.value.type==="value"?t==null?void 0:t.value:s+"%";return(s,t)=>{const i=O.ElProgress;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(r).bgColor,borderRadius:`${e.unref(r).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(p.value)},e.toDisplayString(a.conf.caption||a.conf.name),5),e.createElementVNode("div",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.conf.data,(n,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"circle-item"},[e.createElementVNode("div",null,[e.createVNode(i,{percentage:n.percent,type:"circle",style:e.normalizeStyle({"--progress-bg-color":e.unref(r).barColor}),color:n.color,"stroke-width":g.value,width:m.value},{default:e.withCtx(({percentage:C})=>[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:e.unref(r).textSize+"px",color:e.unref(r).textColor})},e.toDisplayString(c(C,n)),5),e.unref(r).position==="inner"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mt-1.5",style:e.normalizeStyle({fontSize:e.unref(r).textSize+"px",color:e.unref(r).textColor})},e.toDisplayString(n.name),5)):e.createCommentVNode("",!0)]),_:2},1032,["percentage","style","color","stroke-width","width"]),e.unref(r).position==="outer"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"label",style:e.normalizeStyle({fontSize:e.unref(r).textSize+"px",color:e.unref(r).textColor})},e.toDisplayString(n.name),5)):e.createCommentVNode("",!0)])]))),128))]),e.renderSlot(s.$slots,"default",{},void 0,!0)],4)}}})),P=_._export_sfc(q,[["__scopeId","data-v-71494ea2"]]);exports.default=P;
|
|
1
|
+
"use strict";var b=Object.defineProperty,S=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var v=(a,o,l)=>o in a?b(a,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):a[o]=l,x=(a,o)=>{for(var l in o||(o={}))k.call(o,l)&&v(a,l,o[l]);if(f)for(var l of f(o))N.call(o,l)&&v(a,l,o[l]);return a},y=(a,o)=>S(a,w(o));var h=(a,o,l)=>new Promise((d,r)=>{var m=c=>{try{p(l.next(c))}catch(s){r(s)}},g=c=>{try{p(l.throw(c))}catch(s){r(s)}},p=c=>c.done?d(c.value):Promise.resolve(c.value).then(m,g);p((l=l.apply(a,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/progress/style/css");const e=require("vue"),V=require("./BaseComponent-CNXUpPY1.cjs"),_=require("./index-D8dh_6Qd.cjs"),z=require("./titleStyle-NSnz6cUg.cjs"),E="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e环形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-735.000000,%20-341.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M743.063004,342.931102%20C743.116316,343.282573%20742.87461,343.610715%20742.523139,343.664027%20C739.245615,344.16117%20736.791283,346.991546%20736.791283,350.341222%20C736.791283,353.692268%20739.24752,356.523394%20742.526687,357.018996%20C742.861546,357.069587%20743.201677,357.095181%20743.545242,357.095181%20C743.887612,357.095181%20744.226635,357.069756%20744.560421,357.019508%20C747.477621,356.580105%20749.784771,354.272574%20750.223659,351.355292%20C750.276546,351.003757%20750.604395,350.761654%20750.95593,350.81454%20C751.307466,350.867427%20751.549569,351.195276%20751.496682,351.546811%20C750.973739,355.022805%20748.228057,357.768941%20744.752113,358.292505%20C744.354903,358.352301%20743.951823,358.382531%20743.545242,358.382531%20C743.137244,358.382531%20742.732829,358.3521%20742.334339,358.291894%20C738.427868,357.701483%20735.503933,354.331278%20735.503933,350.341222%20C735.503933,346.352789%20738.425598,342.983478%20742.330079,342.391237%20C742.68155,342.337925%20743.009692,342.579631%20743.063004,342.931102%20Z%20M743.545242,346.738567%20C745.534982,346.738567%20747.14797,348.351556%20747.14797,350.341296%20C747.14797,352.331036%20745.534982,353.944024%20743.545242,353.944024%20C741.555502,353.944024%20739.942514,352.331036%20739.942514,350.341296%20C739.942514,348.351556%20741.555502,346.738567%20743.545242,346.738567%20Z%20M743.545242,348.025917%20C742.266485,348.025917%20741.229863,349.062539%20741.229863,350.341296%20C741.229863,351.620052%20742.266485,352.656675%20743.545242,352.656675%20C744.823999,352.656675%20745.860621,351.620052%20745.860621,350.341296%20C745.860621,349.062539%20744.823999,348.025917%20743.545242,348.025917%20Z%20M744.666769,342.383049%20L744.754011,342.390268%20C748.228261,342.914384%20750.972652,345.659076%20751.496359,349.133416%20C751.549346,349.484937%20751.307336,349.812855%20750.955816,349.865842%20C750.604295,349.918828%20750.276377,349.676819%20750.22339,349.325298%20C749.783861,346.409405%20747.477795,344.103086%20744.561978,343.663214%20C744.210463,343.610185%20743.968493,343.282238%20744.021521,342.930724%20C744.065712,342.637796%20744.300818,342.420939%20744.581381,342.387478%20L744.666769,342.383049%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",T="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e环形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-735.000000,%20-341.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M743.063004,342.931102%20C743.116316,343.282573%20742.87461,343.610715%20742.523139,343.664027%20C739.245615,344.16117%20736.791283,346.991546%20736.791283,350.341222%20C736.791283,353.692268%20739.24752,356.523394%20742.526687,357.018996%20C742.861546,357.069587%20743.201677,357.095181%20743.545242,357.095181%20C743.887612,357.095181%20744.226635,357.069756%20744.560421,357.019508%20C747.477621,356.580105%20749.784771,354.272574%20750.223659,351.355292%20C750.276546,351.003757%20750.604395,350.761654%20750.95593,350.81454%20C751.307466,350.867427%20751.549569,351.195276%20751.496682,351.546811%20C750.973739,355.022805%20748.228057,357.768941%20744.752113,358.292505%20C744.354903,358.352301%20743.951823,358.382531%20743.545242,358.382531%20C743.137244,358.382531%20742.732829,358.3521%20742.334339,358.291894%20C738.427868,357.701483%20735.503933,354.331278%20735.503933,350.341222%20C735.503933,346.352789%20738.425598,342.983478%20742.330079,342.391237%20C742.68155,342.337925%20743.009692,342.579631%20743.063004,342.931102%20Z%20M743.545242,346.738567%20C745.534982,346.738567%20747.14797,348.351556%20747.14797,350.341296%20C747.14797,352.331036%20745.534982,353.944024%20743.545242,353.944024%20C741.555502,353.944024%20739.942514,352.331036%20739.942514,350.341296%20C739.942514,348.351556%20741.555502,346.738567%20743.545242,346.738567%20Z%20M743.545242,348.025917%20C742.266485,348.025917%20741.229863,349.062539%20741.229863,350.341296%20C741.229863,351.620052%20742.266485,352.656675%20743.545242,352.656675%20C744.823999,352.656675%20745.860621,351.620052%20745.860621,350.341296%20C745.860621,349.062539%20744.823999,348.025917%20743.545242,348.025917%20Z%20M744.666769,342.383049%20L744.754011,342.390268%20C748.228261,342.914384%20750.972652,345.659076%20751.496359,349.133416%20C751.549346,349.484937%20751.307336,349.812855%20750.955816,349.865842%20C750.604295,349.918828%20750.276377,349.676819%20750.22339,349.325298%20C749.783861,346.409405%20747.477795,344.103086%20744.561978,343.663214%20C744.210463,343.610185%20743.968493,343.282238%20744.021521,342.930724%20C744.065712,342.637796%20744.300818,342.420939%20744.581381,342.387478%20L744.666769,342.383049%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",B={class:"mix-body flex flex-wrap"},M={DEFAULT_ICON:E,ACTIVE_ICON:T,NAME_CN:"环形进度",NAME_EN:"Progress Circle",ORDER:3},D={titleColor:"#111",textColor:"#111",bgColor:"#fff",barColor:"#ebeef5",radiusSize:8,textSize:14,barWidth:16,diameter:70,position:{value:"outer",type:"radio",option:[{value:"outer",label:"component.gauge.outer"},{value:"inner",label:"component.gauge.inner"}],label:"component.gauge.position"},type:{value:"value",type:"radio",option:[{value:"value",label:"component.gauge.value"},{value:"rate",label:"component.gauge.rate"}],label:"component.gauge.type"},isHideTitle:!1},A=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value",object_id:""},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value",object_id:""}],F=["name","fv","object_id","color","maxType","max"],j=["mosaic"],L={useAlias:!1,multiObject:!1,source:"mosaic"},Z={DEFAULT:M,OPTIONS:D,DATA:A,PARAMS:F,SOURCE:j,COMMON:L},q=e.defineComponent(y(x({},Z),{__name:"progressCircle",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(a){const o=a;class l extends V.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),barColor:this.getOptionValue("barColor","#ebeef5"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),textSize:this.getOptionValue("textSize",14),radiusSize:this.getOptionValue("radiusSize",8),barWidth:this.getOptionValue("barWidth",16),diameter:this.getOptionValue("diameter",70),position:this.getOptionValue("position","outer"),type:this.getOptionValue("type","value"),isHideTitle:this.getOptionValue("isHideTitle",!1)}}init(){return h(this,null,function*(){var t;this.Style.value=this.extractStyles(),this.applyTheme(),(t=this.props.conf.data)!=null&&t.length||(this.props.conf.data=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value",object_id:""},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value",object_id:""}])})}setHistoryData(t){if(!t)return;const{data:i}=this.props.conf;!Array.isArray(i)||!i.length||i.forEach((n,u)=>{var C;n.value=(C=t[u].data[0])!=null?C:0})}setSocketData(t){if(!t)return;const{data:i}=this.props.conf;i.forEach(n=>{n.value=this.extractDataValue(t,n.fv)||0;const u=n.maxType==="value"?n.max:this.extractDataValue(t,n.max)||0;n.percent=u==0?0:Number((n.value/u*100).toFixed(2))})}}const d=new l(o,"progressCircle");d.setupLifecycle();const r=d.getStyle(),m=e.computed(()=>{var i;const s=(i=r.value)==null?void 0:i.diameter,t=Number(s);return typeof t=="number"&&!Number.isNaN(t)&&t>0?t:70}),g=e.computed(()=>{var i;const s=(i=r.value)==null?void 0:i.barWidth,t=Number(s);return typeof t=="number"&&!Number.isNaN(t)&&t>=0?t:16}),p=e.computed(()=>z.generateTitleStyle(o.conf.options)),c=(s,t)=>r.value.type==="value"?t==null?void 0:t.value:s+"%";return(s,t)=>{const i=O.ElProgress;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(r).bgColor,borderRadius:`${e.unref(r).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(p.value)},e.toDisplayString(a.conf.caption||a.conf.name),5),e.createElementVNode("div",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.conf.data,(n,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"circle-item"},[e.createElementVNode("div",null,[e.createVNode(i,{percentage:n.percent,type:"circle",style:e.normalizeStyle({"--progress-bg-color":e.unref(r).barColor}),color:n.color,"stroke-width":g.value,width:m.value},{default:e.withCtx(({percentage:C})=>[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:e.unref(r).textSize+"px",color:e.unref(r).textColor})},e.toDisplayString(c(C,n)),5),e.unref(r).position==="inner"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mt-1.5",style:e.normalizeStyle({fontSize:e.unref(r).textSize+"px",color:e.unref(r).textColor})},e.toDisplayString(n.name),5)):e.createCommentVNode("",!0)]),_:2},1032,["percentage","style","color","stroke-width","width"]),e.unref(r).position==="outer"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"label",style:e.normalizeStyle({fontSize:e.unref(r).textSize+"px",color:e.unref(r).textColor})},e.toDisplayString(n.name),5)):e.createCommentVNode("",!0)])]))),128))]),e.renderSlot(s.$slots,"default",{},void 0,!0)],4)}}})),P=_._export_sfc(q,[["__scopeId","data-v-71494ea2"]]);exports.default=P;
|