mixdashboards 1.0.91 → 1.0.93
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-D5jKSkiY.js → BaseComponent-Da3s36W_.js} +7 -7
- package/dist/{BaseComponent-BdYGdkez.cjs → BaseComponent-DhTgr97M.cjs} +1 -1
- package/dist/{EChartComponentBase-B2VZOLdY.js → EChartComponentBase-BnpZ7uCW.js} +5 -5
- package/dist/{EChartComponentBase-CnguH_VP.cjs → EChartComponentBase-DjvZJF92.cjs} +1 -1
- package/dist/{EmergencyPlanPanel-VVRj1tmv.cjs → EmergencyPlanPanel-DOMgcR_B.cjs} +1 -1
- package/dist/{EmergencyPlanPanel-CPAR0nMv.js → EmergencyPlanPanel-HBxpP38u.js} +1 -1
- package/dist/{HistoryPlanDialog-B4efa64L.js → HistoryPlanDialog-CLbsOFVY.js} +1 -1
- package/dist/{HistoryPlanDialog-DKr2Cs11.cjs → HistoryPlanDialog-DW51gn3g.cjs} +1 -1
- package/dist/{MixiotAppDetailPage-CfeCSgI6.js → MixiotAppDetailPage-BGeXVHsH.js} +1 -1
- package/dist/{MixiotAppDetailPage-Cf6fbZZS.cjs → MixiotAppDetailPage-dtxvso3u.cjs} +1 -1
- package/dist/{MonitoringMap-CovRpkrV.cjs → MonitoringMap-BB8_oQ54.cjs} +1 -1
- package/dist/{MonitoringMap-N_oL8c4E.js → MonitoringMap-DzlDsG5Y.js} +2 -2
- package/dist/{UniverSheet-u2TI74U6.cjs → UniverSheet--tIk2nsN.cjs} +1 -1
- package/dist/{UniverSheet-CAAgxNWa.js → UniverSheet-DBEVeGaK.js} +2 -2
- package/dist/{accelerationChart-Cqj0Ebnn.cjs → accelerationChart-CYMFeYfd.cjs} +1 -1
- package/dist/{accelerationChart-BL28_RUl.js → accelerationChart-aEcOoeet.js} +16 -16
- package/dist/{actionItem-B-5eSwFp.cjs → actionItem-BmikufJX.cjs} +1 -1
- package/dist/{actionItem-BpZW8bMI.js → actionItem-ClkUGiLb.js} +2 -2
- package/dist/{alarmLevelChart-DLhWU_t8.cjs → alarmLevelChart-D82HOCBv.cjs} +1 -1
- package/dist/{alarmLevelChart-C9JAgsq5.js → alarmLevelChart-DfA_i-63.js} +2 -2
- package/dist/{alertTable-CxEE4qpt.js → alertTable-B10xSUgA.js} +2 -2
- package/dist/{alertTable-DnRF1gYO.cjs → alertTable-CpcxDrs-.cjs} +1 -1
- package/dist/{aliasObjectSelectorDemo-DD-TEPXb.cjs → aliasObjectSelectorDemo-BK2D18sn.cjs} +1 -1
- package/dist/{aliasObjectSelectorDemo-D9KZ82Dq.js → aliasObjectSelectorDemo-DAjnXMhv.js} +4 -4
- package/dist/{annualRainfallChart-Bvhif42t.cjs → annualRainfallChart-CIY-I1BI.cjs} +1 -1
- package/dist/{annualRainfallChart-ChC5J9m1.js → annualRainfallChart-DS0wlAwe.js} +2 -2
- package/dist/{aqi-6fETgV2o.js → aqi-D7NgjlCj.js} +6 -6
- package/dist/{aqi-Dsr7upbg.cjs → aqi-Dsasw9Eg.cjs} +1 -1
- package/dist/{aqiIndass-AzrGQJw-.cjs → aqiIndass-D9PckCAC.cjs} +1 -1
- package/dist/{aqiIndass-CGdvOK9_.js → aqiIndass-DUAEyKsZ.js} +19 -19
- package/dist/{areaDeformCurve-B7jsp71O.js → areaDeformCurve-BiC2f4h6.js} +2 -2
- package/dist/{areaDeformCurve-1kVLSyeP.cjs → areaDeformCurve-d3VnEo2O.cjs} +1 -1
- package/dist/{arrayCard-BPUlhGsT.cjs → arrayCard-CGGjto_x.cjs} +1 -1
- package/dist/{arrayCard-DIrULt7u.js → arrayCard-DxRvye0a.js} +2 -2
- package/dist/{audio-D6MXhR2u.js → audio-BTi5xM0H.js} +2 -2
- package/dist/{audio-DB2YaUjb.cjs → audio-FO3j7gvK.cjs} +1 -1
- package/dist/{bar-BrFLA3ok.js → bar-BpzBphgW.js} +14 -14
- package/dist/{bar-COja84VW.cjs → bar-DLUqhFNr.cjs} +1 -1
- package/dist/{bmp-C-Qm16Da.js → bmp-COdFqVdS.js} +2 -2
- package/dist/{bmp-CrqgXoWB.cjs → bmp-Dr7EyCcb.cjs} +1 -1
- package/dist/{box-4okVljO4.cjs → box-By0I4vhj.cjs} +1 -1
- package/dist/{box-CYYX9iqJ.js → box-DjioqD6H.js} +12 -12
- package/dist/{chartConfigPanel-DdQIXIO-.cjs → chartConfigPanel-BmNHXaD0.cjs} +1 -1
- package/dist/{chartConfigPanel-B5_f3sH2.js → chartConfigPanel-BsGnarvV.js} +1 -1
- package/dist/{circleBar-CiriX493.cjs → circleBar-D5ZE1B5B.cjs} +1 -1
- package/dist/{circleBar-eDmlVxUe.js → circleBar-iq3ADQhA.js} +2 -2
- package/dist/{clock-DckjuSMD.js → clock-CZkSV2QJ.js} +2 -2
- package/dist/{clock-BCzsdcjO.cjs → clock-Cd9d4_aJ.cjs} +1 -1
- package/dist/{clt-Bq7SVJi7.cjs → clt-CpocJN5H.cjs} +1 -1
- package/dist/{clt-CplTTbds.js → clt-D4Nb2PRh.js} +2 -2
- package/dist/{cmc-BsjW_asY.js → cmc-GtTAF868.js} +14 -14
- package/dist/{cmc-D1_ffDMz.cjs → cmc-S-WKyBZh.cjs} +1 -1
- package/dist/{cmp-D5bdhUMT.js → cmp-CeC42_I_.js} +2 -2
- package/dist/{cmp-BFvj94ss.cjs → cmp-DK307b62.cjs} +1 -1
- package/dist/{conclusionCard-6pw-FvdV.cjs → conclusionCard-C3JmRV_d.cjs} +1 -1
- package/dist/{conclusionCard-D8B-Tu3h.js → conclusionCard-DOnb5ool.js} +2 -2
- package/dist/{controlList-B6ubJzCt.cjs → controlList-CuphzMKO.cjs} +1 -1
- package/dist/{controlList-TuOoS4Ky.js → controlList-vrK9UaFN.js} +9 -9
- package/dist/{controlRecordList-_M9SqSWs.js → controlRecordList-08yQN6Lx.js} +5 -5
- package/dist/{controlRecordList-CzRPCiar.cjs → controlRecordList-CNbapt2G.cjs} +1 -1
- package/dist/{controlRecordListAPP-D5CKL3D1.cjs → controlRecordListAPP-CS-78ax7.cjs} +1 -1
- package/dist/{controlRecordListAPP-Bu-wSfpJ.js → controlRecordListAPP-mec2XvMa.js} +5 -5
- package/dist/crd-DmeLkC3-.cjs +1 -0
- package/dist/{crd-eFJDy4P0.js → crd-suZTJIov.js} +114 -119
- package/dist/{ctrBtn-BM91jmGC.cjs → ctrBtn-CWUqa5nM.cjs} +1 -1
- package/dist/{ctrBtn-6RjzlJZV.js → ctrBtn-D1vnJ52p.js} +20 -20
- package/dist/{ctrSet-XG-BVGe_.cjs → ctrSet-DwO9lnIc.cjs} +1 -1
- package/dist/{ctrSet-DDOdl0vI.js → ctrSet-j2xPz3Gj.js} +16 -16
- package/dist/{ctrSwitch-CWOyJPOt.js → ctrSwitch-B2v0uJpH.js} +19 -19
- package/dist/{ctrSwitch-DKW1nr0t.cjs → ctrSwitch-C3KKZH3N.cjs} +1 -1
- package/dist/{dataManagement-mv1daXz-.js → dataManagement-C0tArDGj.js} +2 -2
- package/dist/{dataManagement-BWtwxzUR.cjs → dataManagement-x7zMYBzK.cjs} +1 -1
- package/dist/{dataReport-Bv1r-VAt.js → dataReport-B07HSeL9.js} +2 -2
- package/dist/{dataReport-1-pZ8vou.cjs → dataReport-B7EUq2VH.cjs} +1 -1
- package/dist/{dataTable-B5Xphghl.js → dataTable-CNt1WF6y.js} +1 -1
- package/dist/{dataTable-DzBZJU6u.cjs → dataTable-DOPzgAJy.cjs} +1 -1
- package/dist/{datetime-CcHId5sh.cjs → datetime-BfI64GHu.cjs} +1 -1
- package/dist/{datetime-CiQTyVSr.js → datetime-De1QYuNI.js} +2 -2
- package/dist/{deepClusterSlipSurface-D7L5Tjbq.cjs → deepClusterSlipSurface-Bkh_uK2-.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-DNS5juZ4.js → deepClusterSlipSurface-COVvd_ce.js} +24 -24
- package/dist/{deepDataMatrix-ua_3rmRp.cjs → deepDataMatrix-B7nx-d96.cjs} +1 -1
- package/dist/{deepDataMatrix-BTwPYgHG.js → deepDataMatrix-xtVlNwuj.js} +13 -13
- package/dist/{deepDisplacement3D-nGuZgWID.js → deepDisplacement3D-CRbox9_W.js} +2 -2
- package/dist/{deepDisplacement3D-BPwxIqmg.cjs → deepDisplacement3D-dFnQkj1t.cjs} +1 -1
- package/dist/{deepDisplacementChart-4G9kVSVs.cjs → deepDisplacementChart-B8X4Mz0N.cjs} +1 -1
- package/dist/{deepDisplacementChart-C9FHRaY8.cjs → deepDisplacementChart-BjsKsArO.cjs} +1 -1
- package/dist/{deepDisplacementChart-DUQ94aHH.js → deepDisplacementChart-CGK5YFD-.js} +63 -63
- package/dist/{deepDisplacementChart-cG07Kopi.js → deepDisplacementChart-CW2rNiph.js} +20 -20
- package/dist/{deepDisplacementView-CwM6JDMk.js → deepDisplacementView-B4hvqM8a.js} +1 -1
- package/dist/{deepDisplacementView-zg0FXGVd.cjs → deepDisplacementView-DehftTea.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-BjnptNux.cjs → deepNodeTemperatureChart-CvAAO1t9.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-CvT5NOHP.js → deepNodeTemperatureChart-Q_18Jtqr.js} +2 -2
- package/dist/{deepTangentAngleChart-Cc2EAWCz.js → deepTangentAngleChart-CGh4OCVk.js} +13 -13
- package/dist/{deepTangentAngleChart-B-zRvE6O.cjs → deepTangentAngleChart-tAOXN19-.cjs} +1 -1
- package/dist/{deepTemperatureField-CogT8z9Y.js → deepTemperatureField-CazDGvDV.js} +52 -52
- package/dist/{deepTemperatureField-DBBu2ELy.cjs → deepTemperatureField-DoItMFGh.cjs} +1 -1
- package/dist/{deepTrendChart-Bx_FTPnQ.js → deepTrendChart-C2fP1crh.js} +16 -16
- package/dist/{deepTrendChart-SPMENq02.cjs → deepTrendChart-Yq9FESkw.cjs} +1 -1
- package/dist/{deviceOnlineStatus-BEPmFP68.js → deviceOnlineStatus-Bff78Qp_.js} +2 -2
- package/dist/{deviceOnlineStatus-iLo3kvuC.cjs → deviceOnlineStatus-Bpe6x3tq.cjs} +1 -1
- package/dist/{deviceStatus-M6UBQZ3n.cjs → deviceStatus-CDxUOtaN.cjs} +1 -1
- package/dist/{deviceStatus-EmLC--_t.js → deviceStatus-tR_n15RF.js} +7 -7
- package/dist/{displacementDataTable-DdKmtMaw.js → displacementDataTable-CnBJLzKX.js} +11 -11
- package/dist/{displacementDataTable-iZ3qD3Kc.cjs → displacementDataTable-Czij4nzr.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-9BqDUXMZ.cjs → displacementTrajectoryChart-DAtsP38i.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-D5Vm2S-7.js → displacementTrajectoryChart-GIxqyWJr.js} +32 -32
- package/dist/{displacementTrendChart-BTmIbWqa.cjs → displacementTrendChart-Ci0stNfF.cjs} +1 -1
- package/dist/{displacementTrendChart-DMA--Ohr.js → displacementTrendChart-HdFb8_Mc.js} +17 -17
- package/dist/{dxf-BzKcBJ2q.cjs → dxf-C6UAoYgs.cjs} +1 -1
- package/dist/{dxf-BlxiE7wX.js → dxf-DE2RxSOa.js} +2 -2
- package/dist/{dzc-Bx8CpJ9I.js → dzc-DXrSEWlK.js} +5 -5
- package/dist/{dzc-DpZsvk2l.cjs → dzc-L_rvOQNd.cjs} +1 -1
- package/dist/{emergencyPlan-BKL2D74K.js → emergencyPlan-B77f0Lcm.js} +3 -3
- package/dist/{emergencyPlan-C5EpRy35.cjs → emergencyPlan-mos-AJrs.cjs} +1 -1
- package/dist/{evn-CCLAy8RY.js → evn-BVBBBdvA.js} +43 -43
- package/dist/evn-CYPuq58x.cjs +1 -0
- package/dist/{evolutionChart-Bspc_Zap.cjs → evolutionChart-B9aLYWXw.cjs} +1 -1
- package/dist/{evolutionChart-CEPmEbim.js → evolutionChart-sHXF-F_b.js} +3 -3
- package/dist/{fileViewer-BGFQexvg.cjs → fileViewer-8fcEwNdA.cjs} +1 -1
- package/dist/{fileViewer-BHAVtDqb.js → fileViewer-ZOnwf2r5.js} +2 -2
- package/dist/{filterBar-YkPt9iuL.cjs → filterBar-BggZoriH.cjs} +1 -1
- package/dist/{filterBar-Cp_zG8NP.js → filterBar-CPA0cybo.js} +2 -2
- package/dist/{fireCombustionCurve-CQqU3RSe.js → fireCombustionCurve-Bo7RkktP.js} +3 -3
- package/dist/{fireCombustionCurve-M9gPCpob.cjs → fireCombustionCurve-DvFFETpL.cjs} +1 -1
- package/dist/{fireFilterBar-CZ7hsCnV.cjs → fireFilterBar-DisNebAl.cjs} +1 -1
- package/dist/{fireFilterBar-CnfHhDZA.js → fireFilterBar-DsEWwTQ6.js} +2 -2
- package/dist/{fireHistoryTable-Bb-oyhYM.js → fireHistoryTable-CuJr59eG.js} +2 -2
- package/dist/{fireHistoryTable-CxAB6qXj.cjs → fireHistoryTable-DcrmD_SM.cjs} +1 -1
- package/dist/{gag-DsBiMfb9.cjs → gag-CasxI6fm.cjs} +1 -1
- package/dist/{gag-ExBO_i2f.js → gag-ZbJN4ddt.js} +2 -2
- package/dist/{gasStationList-CuZVfT43.js → gasStationList-C78k8JQF.js} +9 -9
- package/dist/{gasStationList-Cq5Eo0EI.cjs → gasStationList-CYzXNtl8.cjs} +1 -1
- package/dist/{geo3dViewer-CHR6Ytab.js → geo3dViewer-DPTmcSfN.js} +3 -3
- package/dist/{geo3dViewer-C4agWElq.cjs → geo3dViewer-z9DQIL9u.cjs} +1 -1
- package/dist/{glbModel-C-i3qRdz.cjs → glbModel-D-D27cy5.cjs} +1 -1
- package/dist/{glbModel-DaEYXO4c.js → glbModel-DFyrRhYU.js} +2 -2
- package/dist/{globalObjectSelector-CjOSd8xz.cjs → globalObjectSelector-DP63QbHt.cjs} +1 -1
- package/dist/{globalObjectSelector-CF-7r2b-.js → globalObjectSelector-lxglLIML.js} +1 -1
- package/dist/{gnssFilterBar-Dk7y6HoM.cjs → gnssFilterBar-04VIVOti.cjs} +1 -1
- package/dist/{gnssFilterBar-5XurgdFo.js → gnssFilterBar-D_uIHNx_.js} +2 -2
- package/dist/{gnssHistoryTable-BWe8EPtj.js → gnssHistoryTable-BkwldAhr.js} +2 -2
- package/dist/{gnssHistoryTable-BTi6QgLN.cjs → gnssHistoryTable-CmkqAL2E.cjs} +1 -1
- package/dist/{gnssMapView-DtJp3CkV.cjs → gnssMapView-DkYBWCTb.cjs} +2 -2
- package/dist/{gnssMapView-BtRr4F1p.js → gnssMapView-yAN_rerN.js} +4 -4
- package/dist/{gnssSectionProfile-DIuoseuz.js → gnssSectionProfile-BY0gsTn_.js} +2 -2
- package/dist/{gnssSectionProfile-Ccl6Vvbv.cjs → gnssSectionProfile-D-p4q4CN.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-D-_v4x-2.cjs → gnssTimeSeriesChart-Crjeon2n.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-j7t0huNb.js → gnssTimeSeriesChart-DStZVIfe.js} +2 -2
- package/dist/{gnssXYTrajectory-BP0f_IsZ.js → gnssXYTrajectory-55gvRGHd.js} +2 -2
- package/dist/{gnssXYTrajectory-CNxKH4Xa.cjs → gnssXYTrajectory-C6y1rdDG.cjs} +1 -1
- package/dist/{grd-BnArDYBQ.js → grd-BNImC5jb.js} +14 -14
- package/dist/{grd-SMrCAphe.cjs → grd-C0jxLqns.cjs} +1 -1
- package/dist/{grdIndass-DY5ZGNwT.cjs → grdIndass-C1xDOw8I.cjs} +1 -1
- package/dist/{grdIndass-eD-oTktV.js → grdIndass-zTUBf0Zp.js} +2 -2
- package/dist/{grg-BSiJ5_SU.cjs → grg-DCssSN6R.cjs} +1 -1
- package/dist/{grg-Dg73DMPq.js → grg-DGD5NgiX.js} +12 -12
- package/dist/{gridview-DKxqxpVr.js → gridview-D-I8s-uK.js} +2 -2
- package/dist/{gridview-BRbDJy9k.cjs → gridview-D9-6VKQN.cjs} +1 -1
- package/dist/{groundwaterFilterBar-RlW7XMLR.js → groundwaterFilterBar-DdgcDGPI.js} +2 -2
- package/dist/{groundwaterFilterBar-tfNgdnLi.cjs → groundwaterFilterBar-IFTRj2CR.cjs} +1 -1
- package/dist/{groundwaterProfileChart-DfTRIo_Q.cjs → groundwaterProfileChart-CpUurmX-.cjs} +2 -2
- package/dist/{groundwaterProfileChart-Cru9rvgS.js → groundwaterProfileChart-Cw0Tl9fb.js} +3 -3
- package/dist/{groundwaterTimeCurve-J4-l3n53.cjs → groundwaterTimeCurve-BCTAfiac.cjs} +1 -1
- package/dist/{groundwaterTimeCurve-uBQDlsI7.js → groundwaterTimeCurve-BV1q4cCW.js} +3 -3
- package/dist/{groupCard-B0L7Bciq.cjs → groupCard-BXqec1Rw.cjs} +1 -1
- package/dist/{groupCard-BxXhY8pv.js → groupCard-rV8CGdpH.js} +2 -2
- package/dist/{headerBar-iVOqeNNm.js → headerBar-BViFzpwV.js} +2 -2
- package/dist/{headerBar-Bd0pGjRH.cjs → headerBar-DiUAzSYQ.cjs} +1 -1
- package/dist/{history-D6D27nop.js → history-CnEXMo-4.js} +21 -21
- package/dist/{history-DeGjzjNu.cjs → history-D98FZtuY.cjs} +1 -1
- package/dist/{index-Dp0_ZzRk.js → index-Cjkb-feQ.js} +2636 -2569
- package/dist/index-DXv6ELXG.cjs +612 -0
- package/dist/{insarDeformChart-Bt-Y688t.js → insarDeformChart-DeGBu2YZ.js} +2 -2
- package/dist/{insarDeformChart-DBs1IFzy.cjs → insarDeformChart-DqRgjHFe.cjs} +1 -1
- package/dist/{insarImageViewer-DRF7LtdE.js → insarImageViewer-76vEgytY.js} +2 -2
- package/dist/{insarImageViewer-DCligLyi.cjs → insarImageViewer-B8z5YWc_.cjs} +1 -1
- package/dist/{kds-BA8P5JCP.cjs → kds-CVNoFoXV.cjs} +1 -1
- package/dist/{kds-DZbtrIEf.js → kds-d1lyhgcY.js} +21 -21
- package/dist/{kpiCard-n0k0W-k7.js → kpiCard-BP1_yoY9.js} +2 -2
- package/dist/{kpiCard-K5fC0lor.cjs → kpiCard-D1_alz7B.cjs} +1 -1
- package/dist/{landslideMap-anYSZykt.cjs → landslideMap-BSHG5XB0.cjs} +1 -1
- package/dist/{landslideMap-BdShFgLR.js → landslideMap-CILwZE-p.js} +15 -15
- package/dist/{landslideWarning-B34aAAcI.cjs → landslideWarning-PPdgU-c4.cjs} +1 -1
- package/dist/{landslideWarning-Dc9nhM0e.js → landslideWarning-xsnAafOn.js} +32 -32
- package/dist/{layerTabs-Dse8ZuCk.js → layerTabs-BQ3vAsp5.js} +2 -2
- package/dist/{layerTabs-Ds8lNaGC.cjs → layerTabs-DKXLcnNy.cjs} +1 -1
- package/dist/{leaflet-src-eS0lhfvE.cjs → leaflet-src-BbPCBXYQ.cjs} +1 -1
- package/dist/{leaflet-src-9YeiifIY.js → leaflet-src-Bt83QlEn.js} +1 -1
- package/dist/{lerc-Cp1tRj5k.cjs → lerc-CNFMBVch.cjs} +1 -1
- package/dist/{lerc-DGqHFQE5.js → lerc-Drv0bBJF.js} +2 -2
- package/dist/{lin-xR54lvGe.js → lin-C20H0US_.js} +5 -5
- package/dist/{lin-BFREuqJ0.cjs → lin-DOGzdLv0.cjs} +1 -1
- package/dist/{linIndass-D2LP0Lc7.cjs → linIndass-CN26LXxA.cjs} +1 -1
- package/dist/{linIndass-CqFh_cZ-.js → linIndass-IKix141I.js} +13 -13
- package/dist/{lst-CMiqeFyH.js → lst-Cz_ks4Tq.js} +2 -2
- package/dist/{lst-8SQlGhDY.cjs → lst-Kwy9tiS0.cjs} +1 -1
- package/dist/{manualEntry-OASfQR-2.js → manualEntry-RfS9P3rr.js} +2 -2
- package/dist/{manualEntry-Bkunz_ui.cjs → manualEntry-SffwyWPO.cjs} +1 -1
- package/dist/{mapBackground-rGJroWOL.cjs → mapBackground-0VpfoZuD.cjs} +1 -1
- package/dist/{mapBackground-Bbevj2E6.js → mapBackground-Bh6_FSzb.js} +3 -3
- package/dist/{mappingList-DM6TVY_b.js → mappingList-CGuykuOL.js} +9 -9
- package/dist/{mappingList-Cg0IXlML.cjs → mappingList-E53_N9c3.cjs} +1 -1
- package/dist/{markdownViewer-BQpBbM1V.cjs → markdownViewer-DJSnxyd3.cjs} +1 -1
- package/dist/{markdownViewer-CNVTIB0-.js → markdownViewer-DgIii8Y8.js} +2 -2
- package/dist/{mix-control-modal-nxRFIP2I.js → mix-control-modal-CM8RAupt.js} +13 -13
- package/dist/{mix-control-modal-C6tzi8J3.cjs → mix-control-modal-DZ_x9HsA.cjs} +1 -1
- package/dist/{mixGrid-DJ_WvRQy.cjs → mixGrid-DLPr5YYq.cjs} +1 -1
- package/dist/{mixGrid-BoFhuYxS.js → mixGrid-lYsGi5ZP.js} +11 -11
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +2 -2
- package/dist/{mjpegCamera-T-1y2fJY.js → mjpegCamera-BlH5IMT_.js} +2 -2
- package/dist/{mjpegCamera-DiKGi233.cjs → mjpegCamera-DtxBWtAl.cjs} +1 -1
- package/dist/{monitorAlert-BiMC9PUq.js → monitorAlert-CohmxldY.js} +20 -20
- package/dist/{monitorAlert-DcMrZ1yx.cjs → monitorAlert-qJ1_T4Rg.cjs} +1 -1
- package/dist/{monitorData-BkH8okUv.cjs → monitorData-D7KQF8v4.cjs} +1 -1
- package/dist/{monitorData-p8Z6gZY7.js → monitorData-DCG1rBTN.js} +14 -14
- package/dist/{monitorSpeedChart-9vJ4nJ-F.js → monitorSpeedChart-B1pse65H.js} +1 -1
- package/dist/{monitorSpeedChart-hSENru9g.cjs → monitorSpeedChart-B1wFoJFV.cjs} +1 -1
- package/dist/{mxa-Bcd79CIu.cjs → mxa-B1_PW02d.cjs} +1 -1
- package/dist/{mxa-DYAEq3U_.js → mxa-BbNSxCga.js} +2 -2
- package/dist/{myValue-D_7Ybnfm.cjs → myValue-DF_YMkby.cjs} +1 -1
- package/dist/{myValue-Dp8d_Zl1.js → myValue-Gny8jAqU.js} +2 -2
- package/dist/{myValueList-BZ2eowzI.js → myValueList-CYo6pe3d.js} +2 -2
- package/dist/{myValueList-DaDoFS2B.cjs → myValueList-DoqV5shO.cjs} +1 -1
- package/dist/objectList-CtykdEvQ.cjs +1 -0
- package/dist/{objectList-Bg1TIxTc.js → objectList-cVAJ7HyB.js} +442 -442
- package/dist/objectList.tabs-BRCf7OY9.cjs +1 -0
- package/dist/objectList.tabs-PfI3XJbJ.js +20 -0
- package/dist/{objectListAPP-DezA0Emp.js → objectListAPP-C5BxpMFw.js} +530 -530
- package/dist/objectListAPP-p7S88pFV.cjs +1 -0
- package/dist/{percentBar-CJmURUuN.cjs → percentBar-BR1I7BLe.cjs} +1 -1
- package/dist/{percentBar-nssxY0r1.js → percentBar-_YQDk9Ht.js} +15 -15
- package/dist/{photo-DHDXLYsg.js → photo-B6n9GVUx.js} +23 -23
- package/dist/{photo-BAQieCIW.cjs → photo-BjAIpRi0.cjs} +1 -1
- package/dist/{pie-DoK1Nse1.cjs → pie-BdhrGOnJ.cjs} +1 -1
- package/dist/{pie-3Bew0J_L.js → pie-DCYNBjdg.js} +2 -2
- package/dist/{placeholder-D4nMgSZ0.js → placeholder-CAImoK36.js} +1 -1
- package/dist/{placeholder-CtUm3sQb.cjs → placeholder-DAM6eONI.cjs} +1 -1
- package/dist/{pressBtn-BozNldEh.js → pressBtn-CWPQi5QV.js} +13 -13
- package/dist/{pressBtn-BkteT-g5.cjs → pressBtn-CoA2u1JG.cjs} +1 -1
- package/dist/{processTable-sZduitz2.cjs → processTable-CVcmCqFA.cjs} +1 -1
- package/dist/{processTable-CtyvXdvt.js → processTable-Dq5Py_Zn.js} +2 -2
- package/dist/{progressBar-DbSjmgZc.js → progressBar-B22zccy8.js} +2 -2
- package/dist/{progressBar-Dq_Sdd4g.cjs → progressBar-DuLkVeNz.cjs} +1 -1
- package/dist/{progressCircle-V_2_Kfk2.js → progressCircle-Clphu1UJ.js} +2 -2
- package/dist/{progressCircle-CTZIb6lb.cjs → progressCircle-DLhw2JeY.cjs} +1 -1
- package/dist/{qrcode-bXzQNrU9.js → qrcode-13fBj4Ki.js} +2 -2
- package/dist/{qrcode-ic0tg7NM.cjs → qrcode-CYMz0236.cjs} +1 -1
- package/dist/{raceBar-D5EoSn4U.js → raceBar-BazrSsz0.js} +15 -15
- package/dist/{raceBar-514LGGNe.cjs → raceBar-L7IAOqKf.cjs} +1 -1
- package/dist/{rad-TiGivmmf.js → rad-CJWi1145.js} +2 -2
- package/dist/{rad-BTqW1GuX.cjs → rad-W30EHGoo.cjs} +1 -1
- package/dist/{radarMapViewer-DMl9NYvq.js → radarMapViewer-1klkclIo.js} +2 -2
- package/dist/{radarMapViewer-1PQUAWfh.cjs → radarMapViewer-omZ8FRhc.cjs} +1 -1
- package/dist/{rainfallFilterBar-BzxWJrku.js → rainfallFilterBar-B-cEzzL0.js} +2 -2
- package/dist/{rainfallFilterBar-CZpofVCP.cjs → rainfallFilterBar-DvMKswS1.cjs} +1 -1
- package/dist/{rainfallTimeCurve-D-3iBSgV.js → rainfallTimeCurve-Bs7crS7w.js} +3 -3
- package/dist/{rainfallTimeCurve-CJrButD1.cjs → rainfallTimeCurve-rF8GvkCI.cjs} +1 -1
- package/dist/{rangeLin-BeB9zI5b.cjs → rangeLin-CeEDcw4k.cjs} +1 -1
- package/dist/{rangeLin-CSAxi5As.js → rangeLin-D4jyuOtt.js} +24 -24
- package/dist/{realtimeEvolutionMap-CcudLgPn.cjs → realtimeEvolutionMap-ChcS2vGh.cjs} +1 -1
- package/dist/{realtimeEvolutionMap-DVtIlsLY.js → realtimeEvolutionMap-DLquqJ9r.js} +2 -2
- package/dist/{regionBar-CICD-WUu.js → regionBar-BBRhqYiV.js} +2 -2
- package/dist/{regionBar-BbjS8HMN.cjs → regionBar-D4uNFSra.cjs} +1 -1
- package/dist/{request-7YowzVy_.cjs → request-BN-AOMBX.cjs} +1 -1
- package/dist/{request-gC3U_9oS.js → request-D-rU4mCb.js} +15 -15
- package/dist/{retainer1-Djvb0p-Y.js → retainer1-4Ua_ISLi.js} +3 -3
- package/dist/{retainer1-j-s1mvy3.cjs → retainer1-C8JdAZJD.cjs} +1 -1
- package/dist/{retainer2-BL2zzSu-.js → retainer2-C3ZLHu2I.js} +3 -3
- package/dist/{retainer2-CjN8GKP-.cjs → retainer2-CVUqa84D.cjs} +1 -1
- package/dist/{retainerRecordList-BqZfmSfI.js → retainerRecordList-CB-XRjDt.js} +7 -7
- package/dist/{retainerRecordList-C0C91Ekd.cjs → retainerRecordList-Cde9uzlM.cjs} +1 -1
- package/dist/{retainerRecordListAPP-CwxRWCNK.js → retainerRecordListAPP-DQC59GAA.js} +11 -11
- package/dist/{retainerRecordListAPP-D5lAR51O.cjs → retainerRecordListAPP-gblw5vcS.cjs} +1 -1
- package/dist/{ringTopN-D1GW8Tvz.js → ringTopN-BAgTh2bC.js} +2 -2
- package/dist/{ringTopN-DahPwZVz.cjs → ringTopN-C4gUz_wE.cjs} +1 -1
- package/dist/{riskRegionTable-9aJNFLEd.js → riskRegionTable-CpqIKLIi.js} +12 -12
- package/dist/{riskRegionTable-DBvBetUF.cjs → riskRegionTable-DFH_HjPe.cjs} +1 -1
- package/dist/{sankey-DF1Vj2ZT.js → sankey-CdgkdATn.js} +8 -8
- package/dist/{sankey-CcoVscYu.cjs → sankey-DdAQG9Td.cjs} +1 -1
- package/dist/{scd-VlzvoWc6.cjs → scd-BE6S_3lY.cjs} +1 -1
- package/dist/{scd-BbAwuGCP.js → scd-jy0xVlMa.js} +2 -2
- package/dist/{sideMenu-BN-ZHEO4.cjs → sideMenu-DEOGIgp4.cjs} +1 -1
- package/dist/{sideMenu-BlFN9hkt.js → sideMenu-DY_qbO7A.js} +2 -2
- package/dist/{slopeStability-1gAwrNQ9.cjs → slopeStability-AUOniTy0.cjs} +1 -1
- package/dist/{slopeStability-dEaBBKCm.js → slopeStability-BK0AX99s.js} +26 -26
- package/dist/{speedCurve-Bq0CqRMG.cjs → speedCurve-BkHBae7h.cjs} +1 -1
- package/dist/{speedCurve-DKGfJlZn.js → speedCurve-DPCdc9Lc.js} +2 -2
- package/dist/{stackedBar-8z6V8Bg5.cjs → stackedBar-DXP9qAys.cjs} +1 -1
- package/dist/{stackedBar-vddef4Jl.js → stackedBar-wnBrmyxv.js} +9 -9
- package/dist/{stressFilterBar-B8Q_1Bty.js → stressFilterBar-BhXE92r3.js} +2 -2
- package/dist/{stressFilterBar-DQPSZito.cjs → stressFilterBar-BhbwcxEL.cjs} +1 -1
- package/dist/{stressTimeCurve-CXp9GRJ_.cjs → stressTimeCurve-B3bgGpLC.cjs} +1 -1
- package/dist/{stressTimeCurve-CdPJpKd7.js → stressTimeCurve-BplCzh_B.js} +3 -3
- package/dist/{swiper-CC7I1HoU.cjs → swiper-CMTyNYGc.cjs} +1 -1
- package/dist/{swiper-CywoHU0v.js → swiper-DbB7Yfv7.js} +2 -2
- package/dist/tablemanList-1pLGkUQ-.cjs +1 -0
- package/dist/tablemanList-D21MEPqU.js +1024 -0
- package/dist/{terminalConfigList-DrNmKMIB.js → terminalConfigList-BTYW05xT.js} +42 -42
- package/dist/{terminalConfigList-DUU9N1CT.cjs → terminalConfigList-BzJGTGI2.cjs} +1 -1
- package/dist/{terminalList-525RK221.js → terminalList-BOEfLk-c.js} +45 -45
- package/dist/{terminalList-BxpAetAV.cjs → terminalList-DDTZZPqs.cjs} +1 -1
- package/dist/{terminalListAPP-CzqIf_8V.cjs → terminalListAPP-B85LAkcf.cjs} +1 -1
- package/dist/{terminalListAPP-BsNEZ1CM.js → terminalListAPP-DQ0LQD8Z.js} +17 -17
- package/dist/{textbox-DT-5a0tH.js → textbox-COa4id6Q.js} +2 -2
- package/dist/{textbox-K4PGodJv.cjs → textbox-DdAEJA93.cjs} +1 -1
- package/dist/{timeQueryBar-res0ebWt.js → timeQueryBar-BJk8T6Uq.js} +1 -1
- package/dist/{timeQueryBar-DG5cOI0x.cjs → timeQueryBar-CjGBc83e.cjs} +1 -1
- package/dist/{timeSeries-DDLOZ-qZ.js → timeSeries-BNZm4OuA.js} +3 -3
- package/dist/{timeSeries-gdtLAj2L.cjs → timeSeries-GHNbz1D3.cjs} +1 -1
- package/dist/{timeSeriesCurve-DlHMl-xr.js → timeSeriesCurve-Cjp-QEjv.js} +3 -3
- package/dist/{timeSeriesCurve-CFVGw03v.cjs → timeSeriesCurve-CmVkgQfm.cjs} +1 -1
- package/dist/{toggleBtn-_KUyiGXh.cjs → toggleBtn-CmoEl8Pi.cjs} +1 -1
- package/dist/{toggleBtn-NIiHQ3y4.js → toggleBtn-Tcpa7DEC.js} +2 -2
- package/dist/{trajectoryConfigPanel-CGwi8Ezn.js → trajectoryConfigPanel-D4TNuFEr.js} +1 -1
- package/dist/{trajectoryConfigPanel-C0-0lj0R.cjs → trajectoryConfigPanel-DU9inIlw.cjs} +1 -1
- package/dist/{trajectoryScatter-CxLhTyHA.js → trajectoryScatter-B58aj-tu.js} +2 -2
- package/dist/{trajectoryScatter-UOtCFnqO.cjs → trajectoryScatter-BFxouben.cjs} +1 -1
- package/dist/{universalConfigPanel-_0bZnhqG.cjs → universalConfigPanel-BycI9YFM.cjs} +1 -1
- package/dist/{universalConfigPanel-BNtJqFLf.js → universalConfigPanel-RZwLXG5M.js} +1 -1
- package/dist/{universalTable-BjGmtKis.js → universalTable-C4ZJa9q4.js} +2 -2
- package/dist/{universalTable-DT4PhmG6.cjs → universalTable-DX2ikJGk.cjs} +1 -1
- package/dist/{video-C7-XNCNE.js → video-BQrST54a.js} +2 -2
- package/dist/{video-CaYpSVwd.cjs → video-D4La2p7x.cjs} +1 -1
- package/dist/{videoMonitor-mWltZfv0.cjs → videoMonitor-BRdiDtXe.cjs} +1 -1
- package/dist/{videoMonitor-B4Z3bHI6.js → videoMonitor-BegHEJRZ.js} +13 -13
- package/dist/{vlu-DJUmQveD.js → vlu-CDunFxiK.js} +2 -2
- package/dist/{vlu-BRrit8x6.cjs → vlu-D24jfC6e.cjs} +1 -1
- package/dist/{warningOverview-KCVjwrqN.js → warningOverview-BfIZBC_K.js} +3 -3
- package/dist/{warningOverview-Cb0exfOY.cjs → warningOverview-D2rbrp0L.cjs} +1 -1
- package/dist/{weather-DoxGjpEK.cjs → weather-CmrbvGwt.cjs} +1 -1
- package/dist/{weather-3wknsD25.js → weather-Je2sdDnv.js} +2 -2
- package/dist/{windLin-CxA6uAmJ.js → windLin-BKFjOgly.js} +42 -42
- package/dist/{windLin-D35pexmM.cjs → windLin-DcSqnplC.cjs} +1 -1
- package/package.json +1 -1
- package/dist/crd-qWA_rJnY.cjs +0 -1
- package/dist/evn-iXvD2tdM.cjs +0 -1
- package/dist/index-BXQ-yQSb.cjs +0 -612
- package/dist/mixiotObjectListApi-CgwC7Q7E.js +0 -214
- package/dist/mixiotObjectListApi-fovsC8AV.cjs +0 -1
- package/dist/objectList-B7PaXrj6.cjs +0 -1
- package/dist/objectListAPP-DPDasVC9.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var z=Object.defineProperty,q=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var k=(y,s,i)=>s in y?z(y,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[s]=i,w=(y,s)=>{for(var i in s||(s={}))R.call(s,i)&&k(y,i,s[i]);if(N)for(var i of N(s))P.call(s,i)&&k(y,i,s[i]);return y},A=(y,s)=>q(y,I(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio-button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const _=require("./index-
|
|
1
|
+
"use strict";var z=Object.defineProperty,q=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var k=(y,s,i)=>s in y?z(y,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[s]=i,w=(y,s)=>{for(var i in s||(s={}))R.call(s,i)&&k(y,i,s[i]);if(N)for(var i of N(s))P.call(s,i)&&k(y,i,s[i]);return y},A=(y,s)=>q(y,I(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio-button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const _=require("./index-DXv6ELXG.cjs");require("element-plus");const U=require("./EChartComponentBase-DjvZJF92.cjs");require("./index-CJgyJTvc.cjs");const T=require("./ele-lin-icon-Dke_1AmT.cjs"),$=require("./echarts-BB8O2KSA.cjs"),G={class:"acceleration-chart-wrapper"},W={class:"toolbar"},Q={class:"toolbar-left"},X={class:"toolbar-center"},Z={class:"toolbar-right"},J={class:"chart-header"},K={class:"chart-title"},ee={class:"chart-legend"},te={class:"legend-text"},ae={class:"y-axis-unit"},oe={class:"chart-body"},le=["id"],re={DEFAULT_ICON:T.DEFAULT_ICON,ACTIVE_ICON:T.ACTIVE_ICON,NAME_CN:"加速度监测",NAME_EN:"Acceleration Chart",ORDER:10,PLATFORM:["pc","screen"]},ne={unit:{value:"mm",type:"string",label:"component.accelerationChart.unit"},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},gridLineColor:{value:"#e5e5e5",type:"color",label:"component.accelerationChart.gridLineColor"},points:{value:50,type:"number",label:"component.options.points",min:10,max:200},lineType:{value:"smooth",type:"select",label:"component.accelerationChart.lineType",options:[{label:"平滑曲线",value:"smooth"},{label:"折线",value:"line"},{label:"阶梯线",value:"step"}]},showSymbol:{value:!1,type:"checkbox",label:"component.accelerationChart.showSymbol"},lineWidth:{value:1.5,type:"number",label:"component.accelerationChart.lineWidth",min:1,max:5},yMax:{value:30,type:"number",label:"component.line.yMax"},yMin:{value:-20,type:"number",label:"component.line.yMin"},areaList:{value:"内排,外排,边坡,平台",type:"string",label:"component.accelerationChart.areaList"}},se=[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}],ce=["name","area","object_id","curves"],ie=["name","fv","color"],ue=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],de={useAlias:!1,multiObject:!0,source:"mosaic"},me={DEFAULT:re,OPTIONS:ne,DATA:se,PARAMS:ce,SOURCE:ue,COMMON:de,CURVE_PARAMS:ie},fe=t.defineComponent(A(w({},me),{__name:"accelerationChart",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(y){t.useCssVars(o=>({v5223c71b:t.unref(V).bgColor,v2166d81a:t.unref(V).textColor}));const s=y,i=t.ref(""),M=t.computed(()=>{var l,c,d,m;const o=((l=s.conf)==null?void 0:l.data)||[],e=new Set;return o.forEach(n=>{n.area&&e.add(n.area)}),e.size===0?(((m=(d=(c=s.conf)==null?void 0:c.options)==null?void 0:d.areaList)==null?void 0:m.value)||"内排,外排,边坡,平台").split(",").map(r=>r.trim()).filter(r=>r):Array.from(e)});t.watch(M,o=>{o.length>0&&!i.value&&(i.value=o[0])},{immediate:!0});const H=()=>{console.log("区域切换:",i.value);const o=E.value;o.length>0?v.value=o[0].value:v.value="",S()},v=t.ref(""),E=t.computed(()=>{var l;return(((l=s.conf)==null?void 0:l.data)||[]).filter(c=>c.area?c.area===i.value:!0).map(c=>({label:c.name,value:c.name}))});t.watch(E,o=>{o.length>0&&!v.value&&(v.value=o[0].value)},{immediate:!0});const L=t.computed(()=>{var e;const o=((e=s.conf)==null?void 0:e.data)||[];return o.find(l=>l.name===v.value)||o[0]||null}),D=t.computed(()=>{const o=L.value;return o?o.curves||[]:[]}),F=t.ref("7days"),x=t.ref(_.dayjs().subtract(7,"day").format("YYYY-MM-DD HH:mm:ss")),b=t.ref(_.dayjs().format("YYYY-MM-DD HH:mm:ss")),O=o=>{const e=_.dayjs();switch(o){case"today":x.value=e.startOf("day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"7days":x.value=e.subtract(7,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"30days":x.value=e.subtract(30,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break}S()},S=()=>{console.log("查询数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value}),p.updateChartData(D.value)},B=()=>{console.log("导出数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value})};t.watch(v,()=>{p.updateChartData(D.value)});class j extends U.EChartComponentBase{constructor(){super(...arguments),this.historyData=new Map,this.xAxisData=[]}extractStyles(){var l,c,d,m,n,r,a,u,f,h,C;const{options:e}=this.props.conf;return{unit:((l=e==null?void 0:e.unit)==null?void 0:l.value)||"mm",bgColor:((c=e==null?void 0:e.bgColor)==null?void 0:c.value)||"#ffffff",textColor:((d=e==null?void 0:e.textColor)==null?void 0:d.value)||"#333333",gridLineColor:((m=e==null?void 0:e.gridLineColor)==null?void 0:m.value)||"#e5e5e5",points:((n=e==null?void 0:e.points)==null?void 0:n.value)||50,lineType:((r=e==null?void 0:e.lineType)==null?void 0:r.value)||"smooth",showSymbol:(u=(a=e==null?void 0:e.showSymbol)==null?void 0:a.value)!=null?u:!1,lineWidth:((f=e==null?void 0:e.lineWidth)==null?void 0:f.value)||1.5,yMax:((h=e==null?void 0:e.yMax)==null?void 0:h.value)||30,yMin:((C=e==null?void 0:e.yMin)==null?void 0:C.value)||-20}}getDefaultData(){return[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}]}generateMockData(e,l=0,c=15){const d=[];let m=Math.random()*Math.PI*2;for(let n=0;n<e;n++){const r=(Math.random()-.5)*c*.5,a=Math.sin(m+n*.15)*c*.6,u=l+a+r;d.push(parseFloat(u.toFixed(1)))}return d}getChartOption(e=[]){const l=this.extractStyles(),c=l.points;this.xAxisData=_.getxAxisDataTime(c,this.props.mode,!1);const m=(e.length>0?e:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]).map((n,r)=>{const a=`${v.value}_${n.name}`;let u=this.historyData.get(a);if(!u||u.length===0){const h=[15,-12,-11,19,22];u=this.generateMockData(c,h[r]||0,2),this.historyData.set(a,u)}const f={name:n.name,type:"line",symbol:l.showSymbol?"circle":"none",symbolSize:4,data:u,lineStyle:{width:l.lineWidth,color:n.color},itemStyle:{color:n.color}};return l.lineType==="smooth"?f.smooth=!0:(l.lineType==="step"&&(f.step="middle"),f.smooth=!1),f});return{grid:{left:50,right:20,top:20,bottom:70},tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e5e5e5",textStyle:{color:"#333",fontSize:12},formatter:n=>{let r=`<div style="font-weight:bold;margin-bottom:5px">${n[0].axisValue}</div>`;return n.forEach(a=>{r+=`<div style="display:flex;align-items:center;gap:5px">
|
|
2
2
|
${a.marker}
|
|
3
3
|
<span>${a.seriesName}:</span>
|
|
4
4
|
<span style="font-weight:bold">${a.value} ${l.unit}</span>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
1
|
+
var K = Object.defineProperty, ee = Object.defineProperties;
|
|
2
2
|
var te = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var N = Object.getOwnPropertySymbols;
|
|
4
4
|
var ae = Object.prototype.hasOwnProperty, oe = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var I = (y, s, c) => s in y ? K(y, s, { enumerable: !0, configurable: !0, writable: !0, value: c }) : y[s] = c, P = (y, s) => {
|
|
6
6
|
for (var c in s || (s = {}))
|
|
7
|
-
ae.call(s, c) &&
|
|
7
|
+
ae.call(s, c) && I(y, c, s[c]);
|
|
8
8
|
if (N)
|
|
9
9
|
for (var c of N(s))
|
|
10
|
-
oe.call(s, c) &&
|
|
10
|
+
oe.call(s, c) && I(y, c, s[c]);
|
|
11
11
|
return y;
|
|
12
12
|
}, U = (y, s) => ee(y, te(s));
|
|
13
13
|
import { ElSelect as le, ElOption as re, ElRadioGroup as se, ElRadioButton as ne, ElDatePicker as ce, ElButton as ie } from "element-plus/es";
|
|
@@ -20,9 +20,9 @@ import "element-plus/es/components/select/style/css";
|
|
|
20
20
|
import "element-plus/es/components/option/style/css";
|
|
21
21
|
import { defineComponent as ue, useCssVars as me, unref as A, ref as M, computed as k, watch as Y, onMounted as de, nextTick as $, openBlock as g, createElementBlock as F, createElementVNode as m, createVNode as x, withCtx as b, Fragment as L, renderList as O, createBlock as G, createTextVNode as E, toDisplayString as T, normalizeStyle as W, renderSlot as fe } from "vue";
|
|
22
22
|
import "html2canvas";
|
|
23
|
-
import { d as z,
|
|
23
|
+
import { d as z, J as he, N as ve, B as ye, _ as pe } from "./index-Cjkb-feQ.js";
|
|
24
24
|
import "element-plus";
|
|
25
|
-
import { E as xe } from "./EChartComponentBase-
|
|
25
|
+
import { E as xe } from "./EChartComponentBase-BnpZ7uCW.js";
|
|
26
26
|
import "./index-eIsZnzkc.js";
|
|
27
27
|
import { A as be, D as _e } from "./ele-lin-icon-Dax-ZiWV.js";
|
|
28
28
|
import { i as De } from "./echarts-Bp7QN4X6.js";
|
|
@@ -87,7 +87,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
|
|
|
87
87
|
{ name: "xyh加速度", fv: "acc_xyh", color: "#1E90FF" }
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
|
-
], ze = ["name", "area", "object_id", "curves"], je = ["name", "fv", "color"],
|
|
90
|
+
], ze = ["name", "area", "object_id", "curves"], je = ["name", "fv", "color"], Be = ["mosaic", "statistics", "calculate", "statisticsRealtime", "calculateRealtime"], Re = { useAlias: !1, multiObject: !0, source: "mosaic" }, Ne = { DEFAULT: Le, OPTIONS: Oe, DATA: Te, PARAMS: ze, SOURCE: Be, COMMON: Re, CURVE_PARAMS: je }, Ie = /* @__PURE__ */ ue(U(P({}, Ne), {
|
|
91
91
|
__name: "accelerationChart",
|
|
92
92
|
props: {
|
|
93
93
|
conf: { type: Object, default: () => ({ data: [] }) },
|
|
@@ -110,7 +110,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
|
|
|
110
110
|
Y(j, (a) => {
|
|
111
111
|
a.length > 0 && !c.value && (c.value = a[0]);
|
|
112
112
|
}, { immediate: !0 });
|
|
113
|
-
const
|
|
113
|
+
const J = () => {
|
|
114
114
|
console.log("区域切换:", c.value);
|
|
115
115
|
const a = w.value;
|
|
116
116
|
a.length > 0 ? v.value = a[0].value : v.value = "", H();
|
|
@@ -131,7 +131,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
|
|
|
131
131
|
}), C = k(() => {
|
|
132
132
|
const a = Q.value;
|
|
133
133
|
return a ? a.curves || [] : [];
|
|
134
|
-
}),
|
|
134
|
+
}), B = M("7days"), _ = M(z().subtract(7, "day").format("YYYY-MM-DD HH:mm:ss")), D = M(z().format("YYYY-MM-DD HH:mm:ss")), X = (a) => {
|
|
135
135
|
const e = z();
|
|
136
136
|
switch (a) {
|
|
137
137
|
case "today":
|
|
@@ -411,10 +411,10 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
|
|
|
411
411
|
}
|
|
412
412
|
const p = new q(s, "accelerationChart");
|
|
413
413
|
(!s.conf.data || s.conf.data.length === 0) && (s.conf.data = p.getDefaultData()), p.setupLifecycle();
|
|
414
|
-
const V = p.getStyle(),
|
|
414
|
+
const V = p.getStyle(), R = p.getEchartId();
|
|
415
415
|
return de(() => {
|
|
416
416
|
$(() => {
|
|
417
|
-
const a = document.getElementById(
|
|
417
|
+
const a = document.getElementById(R);
|
|
418
418
|
if (a) {
|
|
419
419
|
const e = De(a);
|
|
420
420
|
e.setOption(p.getChartOption(C.value)), p.chartObj = e;
|
|
@@ -441,7 +441,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
|
|
|
441
441
|
"onUpdate:modelValue": e[0] || (e[0] = (t) => c.value = t),
|
|
442
442
|
class: "area-select",
|
|
443
443
|
size: "small",
|
|
444
|
-
onChange:
|
|
444
|
+
onChange: J
|
|
445
445
|
}, {
|
|
446
446
|
default: b(() => [
|
|
447
447
|
(g(!0), F(L, null, O(j.value, (t) => (g(), G(o, {
|
|
@@ -471,8 +471,8 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
|
|
|
471
471
|
]),
|
|
472
472
|
m("div", Me, [
|
|
473
473
|
x(d, {
|
|
474
|
-
modelValue:
|
|
475
|
-
"onUpdate:modelValue": e[2] || (e[2] = (t) =>
|
|
474
|
+
modelValue: B.value,
|
|
475
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => B.value = t),
|
|
476
476
|
size: "small",
|
|
477
477
|
onChange: X
|
|
478
478
|
}, {
|
|
@@ -564,7 +564,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
|
|
|
564
564
|
m("div", we, T(A(V).unit), 1),
|
|
565
565
|
m("div", He, [
|
|
566
566
|
m("div", {
|
|
567
|
-
id: A(
|
|
567
|
+
id: A(R),
|
|
568
568
|
class: "chart-container"
|
|
569
569
|
}, null, 8, Ve)
|
|
570
570
|
]),
|
|
@@ -572,7 +572,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
|
|
|
572
572
|
]);
|
|
573
573
|
};
|
|
574
574
|
}
|
|
575
|
-
})), st = /* @__PURE__ */ pe(
|
|
575
|
+
})), st = /* @__PURE__ */ pe(Ie, [["__scopeId", "data-v-2b46c27f"]]);
|
|
576
576
|
export {
|
|
577
577
|
st as default
|
|
578
578
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var G=Object.defineProperty,Q=Object.defineProperties;var X=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var A=(k,t,o)=>t in k?G(k,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):k[t]=o,O=(k,t)=>{for(var o in t||(t={}))Y.call(t,o)&&A(k,o,t[o]);if(B)for(var o of B(t))Z.call(t,o)&&A(k,o,t[o]);return k},T=(k,t)=>Q(k,X(t));var P=(k,t,o)=>new Promise((s,n)=>{var i=l=>{try{h(o.next(l))}catch(b){n(b)}},p=l=>{try{h(o.throw(l))}catch(b){n(b)}},h=l=>l.done?s(l.value):Promise.resolve(l.value).then(i,p);h((o=o.apply(k,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/empty/style/css");const e=require("vue"),c=require("element-plus"),$=require("@element-plus/icons-vue"),z=require("./index-BXQ-yQSb.cjs"),ee=require("./BaseComponent-BdYGdkez.cjs"),te=require("./titleStyle-NSnz6cUg.cjs"),q=require("./ele-crd-icon-BvNgAPKW.cjs");class re extends ee.BaseComponent{constructor(t){super(t,"actionItem"),this.formData=e.reactive({}),this.showJsonEditor=e.ref(!1),this.jsonInput=e.ref("")}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#333"),radiusSize:this.getOptionValue("radiusSize",8),labelWidth:this.getOptionValue("labelWidth",100),isHideTitle:this.getOptionValue("isHideTitle",!1),showButtons:this.getOptionValue("showButtons",!0)}}init(){var o;this.Style.value=this.extractStyles(),this.applyTheme();const t=this.props.conf.data;t&&typeof t=="object"&&((o=t.params)!=null&&o.length)&&this.parseBackendData(t),this.initFormData()}getParams(){var t;return Array.isArray((t=this.props.conf)==null?void 0:t.params)?this.props.conf.params:[]}get hasParams(){return this.getParams().length>0}getVisibleParams(){return this.getParams().filter(t=>t.form_type!=="hidden"&&!this.isFieldHidden(t))}getFormRules(){const t={},o=(s,n="")=>{s.forEach(i=>{const p=n?`${n}.${i.key}`:i.key;if(i.form_type==="sub_form"&&i.properties&&!i.items){o(i.properties,p);return}if(i.form_type==="sub_form"&&i.items)return;const h=this.buildValidationRules(i);h.length&&(t[p]=h)})};return o(this.getParams()),t}initFormData(){var o,s;const t=(s=(o=this.props.conf)==null?void 0:o.data)==null?void 0:s.values;this.getParams().forEach(n=>{t&&t[n.key]!==void 0?this.formData[n.key]=t[n.key]:this.formData[n.key]=this.getDefaultValue(n)})}resetForm(){this.initFormData()}getDefaultValue(t){var o,s;if(t.form_type==="sub_form"&&t.properties&&!t.items){const n={};return t.properties.forEach(i=>{n[i.key]=this.getDefaultValue(i)}),n}return t.form_type==="sub_form"&&t.items?Array.isArray(t.default_value)?t.default_value:[]:t.form_type==="checkbox_group"?Array.isArray(t.default_value)?t.default_value:[]:t.default_value!==null&&t.default_value!==void 0?t.default_value:t.form_type==="switch"?!1:t.form_type==="number"?(s=(o=t.format)==null?void 0:o.min)!=null?s:0:""}buildValidationRules(t){const o=[];t.required&&o.push({required:!0,message:`请输入${t.cn_name}`,trigger:"blur"});const s=t.format;return s&&(s.pattern&&o.push({pattern:new RegExp(s.pattern),message:`${t.cn_name}格式不正确`,trigger:"blur"}),(s.min_length||s.max_length)&&o.push({min:s.min_length,max:s.max_length,message:s.min_length&&s.max_length?`长度在 ${s.min_length} 到 ${s.max_length} 个字符`:s.min_length?`最少 ${s.min_length} 个字符`:`最多 ${s.max_length} 个字符`,trigger:"blur"})),o}isFieldHidden(t){var o,s,n,i;if(!((o=t.rules)!=null&&o.length))return!1;for(const p of t.rules){const h=this.formData[(s=p.related_key)==null?void 0:s.split(".")[0]],l=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((i=l==null?void 0:l.property)!=null&&i.hidden)return!0}return!1}isFieldDisabled(t){var o,s,n,i;if(!((o=t.rules)!=null&&o.length))return!1;for(const p of t.rules){const h=this.formData[(s=p.related_key)==null?void 0:s.split(".")[0]],l=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((i=l==null?void 0:l.property)!=null&&i.disabled)return!0}return!1}getFieldOptions(t){var s,n;let o=t.enum||[];if(t.rules)for(const i of t.rules){if(!i.related_key)continue;const p=this.formData[i.related_key],h=(s=i.conditions)==null?void 0:s.find(l=>l.value===p);if((n=h==null?void 0:h.property)!=null&&n.enum){o=h.property.enum;break}}return o}onFieldChange(t){this.getParams().forEach(o=>{if(o.rules)for(const s of o.rules)s.related_key===t.key&&(this.formData[o.key]=o.form_type==="checkbox_group"?[]:o.form_type==="switch"?!1:"")})}addSubItem(t){var n;Array.isArray(this.formData[t.key])||(this.formData[t.key]=[]);const o=((n=t.items)==null?void 0:n.properties)||t.properties||[],s={};o.forEach(i=>{s[i.key]=this.getDefaultValue(i)}),this.formData[t.key].push(s)}removeSubItem(t,o){var s;(s=this.formData[t])==null||s.splice(o,1)}getSubFieldOptions(t,o){var s,n,i;if((s=t.enum)!=null&&s.length)return t.enum;if(t.rules)for(const p of t.rules){if(!p.related_key)continue;const h=p.related_key.split(".").pop(),l=(n=p.conditions)==null?void 0:n.find(b=>b.value===o[h]);if((i=l==null?void 0:l.property)!=null&&i.enum)return l.property.enum}return[]}onSubFieldChange(t,o,s){var i;(((i=t.items)==null?void 0:i.properties)||t.properties||[]).forEach(p=>{var h;if(p.rules)for(const l of p.rules)((h=l.related_key)==null?void 0:h.split(".").pop())===o.key&&(s[p.key]="")})}applyJson(){try{const t=JSON.parse(this.jsonInput.value);if(t.params&&Array.isArray(t.params))this.props.conf.action_name=t.action_name||"表单",this.props.conf.description=t.description||"",this.props.conf.params=t.params,this.props.conf.data=t,this.initFormData();else if(Array.isArray(t))this.props.conf.params=t,this.props.conf.data={params:t},this.initFormData();else if(t.key&&t.form_type)this.props.conf.params=[t],this.initFormData();else return{success:!1,error:"无法识别的 JSON 格式"};return this.showJsonEditor.value=!1,{success:!0}}catch(t){return{success:!1,error:t.message||"JSON 格式错误"}}}exportTargetJson(){return this.exportToOriginalFormat()}parseBackendData(t){t&&(this.props.conf.action_name=t.action_name,this.props.conf.description=t.description,this.props.conf.params=t.params,this.props.conf.block=t.block,this.props.conf.action=t.action,this.props.conf.data=t,this.initFormData())}serializeToBackend(){return{block:this.props.conf.block,action:this.props.conf.action,params:O({},this.formData),originalFormat:this.exportToOriginalFormat()}}saveFormData(){this.props.conf.data||(this.props.conf.data={}),this.props.conf.data.values=JSON.parse(JSON.stringify(this.formData))}getFullConfig(){return{action_name:this.props.conf.action_name,description:this.props.conf.description,block:this.props.conf.block,action:this.props.conf.action,params:this.props.conf.params}}exportToOriginalFormat(){return this.convertFormDataToOriginal(this.formData,this.getParams())}convertFormDataToOriginal(t,o){const s={};return o.forEach(n=>{var p;const i=t[n.key];n.form_type==="sub_form"?n.properties&&!n.items?s[n.key]=this.convertFormDataToOriginal(i||{},n.properties):(p=n.items)!=null&&p.properties&&(s[n.key]=Array.isArray(i)?i.map(h=>this.convertArrayItemToOriginal(h,n.items.properties)):[]):n.db_type==="boolean"&&typeof i=="boolean"?s[n.key]=i?"true":"false":s[n.key]=i}),s}convertArrayItemToOriginal(t,o){const s={};return o.forEach(n=>{n.form_type==="sub_form"&&n.properties?s[n.key]=this.convertFormDataToOriginal(t[n.key]||{},n.properties):s[n.key]=t[n.key]}),s}setSocketData(t){if(!t)return;const o=t.result||t,s=o.action_item||o;s!=null&&s.params&&this.parseBackendData(s)}watchParams(){e.watch(()=>{var t;return(t=this.props.conf)==null?void 0:t.params},()=>this.initFormData(),{immediate:!0,deep:!0})}}const oe={class:"mix-body"},se={key:0,class:"json-editor"},ne={class:"editor-header"},ae={key:1,class:"edit-toolbar"},le={key:2,class:"empty-state"},ie={key:3,class:"form-content"},ue={key:0,class:"form-description"},ce={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"动态表单",NAME_EN:"ActionItem",ORDER:1,PLATFORM:["pc","screen","mobile"]},de={titleColor:"#111",bgColor:"#fff",radiusSize:8,labelWidth:100,isHideTitle:!1,showButtons:!0,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},me={},fe=[],pe=[],he={},ye={DEFAULT:ce,OPTIONS:de,DATA:me,PARAMS:fe,SOURCE:pe,COMMON:he},ge=e.defineComponent(T(O({},ye),{__name:"actionItem",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},emits:["submit","generate"],setup(k,{emit:t}){const o=k,s=e.ref(!1),n=e.ref(""),i=t,p=z.useCounterStore(),h=e.ref(),l=new re(o);l.setupLifecycle(),l.watchParams();const b=l.getStyle(),x=e.computed(()=>o.conf||{}),U=e.computed(()=>te.generateTitleStyle(o.conf.options));function N(a,r){return r.split(".").reduce((m,f)=>m==null?void 0:m[f],a)}function w(a,r,m){const f=r.split("."),d=f.pop(),u=f.reduce((_,V)=>((!_[V]||typeof _[V]!="object")&&(_[V]={}),_[V]),a);u[d]=m}function F(a,r,m){var f,d,u;if(!((f=a.rules)!=null&&f.length))return!1;for(const _ of a.rules){const V=_.related_key;if(!V)continue;const E=r?`${r}.${V}`:V,v=N(m,E),g=(d=_.conditions)==null?void 0:d.find(C=>C.value===v);if((u=g==null?void 0:g.property)!=null&&u.hidden)return!0}return!1}const I=e.defineComponent({name:"FormField",props:{param:{type:Object,required:!0},rootData:{type:Object,required:!0},actionItem:{type:Object,required:!0},parentPath:{type:String,default:""}},setup(a){var E;const r=a.param,m=a.rootData,f=a.actionItem,d=r.key,u=a.parentPath?`${a.parentPath}.${d}`:d,_=r.form_type==="sub_form"&&r.properties&&!r.items,V=r.form_type==="sub_form"&&((E=r.items)==null?void 0:E.properties);return()=>{if(F(r,a.parentPath,m))return null;if(_){let g=N(m,u);(!g||typeof g!="object"||Array.isArray(g))&&w(m,u,{});const C=r.properties.filter(y=>!F(y,u,m));return e.h("div",{class:"nested-group"},[e.h("div",{class:"nested-title"},r.cn_name),e.h("div",{class:"nested-content"},C.map(y=>e.h(I,{param:y,rootData:m,actionItem:f,key:y.key,parentPath:u})))])}if(V){let g=N(m,u);Array.isArray(g)||(w(m,u,[]),g=N(m,u));const C=r.items.properties;return e.h(c.ElFormItem,{label:r.cn_name},()=>[e.h("div",{class:"sub-form"},[...g.map((y,D)=>e.h("div",{class:"sub-item",key:D},[e.h("div",{class:"sub-fields"},C.map(S=>e.h("div",{class:"sub-field",key:S.key},[e.h("span",{class:"sub-label"},[S.required?e.h("span",{class:"required-star"},"*"):null,S.cn_name]),j(S,y,f)]))),e.h(c.ElButton,{type:"danger",icon:$.Delete,circle:!0,size:"small",onClick:()=>g.splice(D,1)})])),e.h(c.ElButton,{type:"primary",icon:$.Plus,onClick:()=>{const y={};C.forEach(D=>{y[D.key]=M(D)}),g.push(y)}},()=>"添加")])])}const v={label:r.cn_name,prop:u};return r.required&&(v.rules=[{required:!0,message:`请输入${r.cn_name}`,trigger:"blur"}]),e.h(c.ElFormItem,v,()=>R(r,u,m,f))}}});function R(a,r,m,f){var V,E;const d=f.isFieldDisabled(a),u=N(m,r),_=v=>w(m,r,v);switch(a.form_type){case"text":return e.h(c.ElInput,{modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:a.description||`请输入${a.cn_name}`,disabled:d,size:"small"});case"textarea":return e.h(c.ElInput,{type:"textarea",modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:a.description,disabled:d,rows:3});case"select":return e.h(c.ElSelect,{modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:`请选择${a.cn_name}`,disabled:d,style:"width:100%",size:"small"},()=>(a.enum||[]).map(g=>e.h(c.ElOption,{key:g.value,label:g.cn_name,value:g.value})));case"number":return e.h(c.ElInputNumber,{modelValue:u!=null?u:0,"onUpdate:modelValue":_,disabled:d,min:(V=a.format)==null?void 0:V.min,max:(E=a.format)==null?void 0:E.max,style:"width:100%",size:"small"});case"switch":const v=u===!0||u==="true";return e.h(c.ElSwitch,{modelValue:v,"onUpdate:modelValue":_,disabled:d});default:return e.h(c.ElInput,{modelValue:u!=null?u:"","onUpdate:modelValue":_,disabled:d,size:"small"})}}function j(a,r,m){var u,_,V,E,v,g;const f=a.key,d=m.isFieldDisabled(a);switch(a.form_type){case"text":return e.h(c.ElInput,{modelValue:(u=r[f])!=null?u:"","onUpdate:modelValue":y=>r[f]=y,placeholder:a.description||`请输入${a.cn_name}`,disabled:d,size:"small"});case"select":return e.h(c.ElSelect,{modelValue:(_=r[f])!=null?_:"","onUpdate:modelValue":y=>r[f]=y,placeholder:`请选择${a.cn_name}`,disabled:d,style:"width:100%",size:"small"},()=>(a.enum||[]).map(y=>e.h(c.ElOption,{key:y.value,label:y.cn_name,value:y.value})));case"number":return e.h(c.ElInputNumber,{modelValue:(V=r[f])!=null?V:0,"onUpdate:modelValue":y=>r[f]=y,disabled:d,min:(E=a.format)==null?void 0:E.min,max:(v=a.format)==null?void 0:v.max,style:"width:100%",size:"small"});case"switch":const C=r[f]===!0||r[f]==="true";return e.h(c.ElSwitch,{modelValue:C,"onUpdate:modelValue":y=>r[f]=y,disabled:d});default:return e.h(c.ElInput,{modelValue:(g=r[f])!=null?g:"","onUpdate:modelValue":y=>r[f]=y,disabled:d,size:"small"})}}function M(a){var r,m;return a.default_value!==void 0?a.default_value:a.form_type==="switch"?!1:a.form_type==="checkbox_group"?[]:a.form_type==="number"?(m=(r=a.format)==null?void 0:r.min)!=null?m:0:""}const H=()=>{const a=l.applyJson();a.success?c.ElMessage.success("JSON 配置已应用"):c.ElMessage.error(a.error||"JSON 格式错误")},L=()=>{l.saveFormData(),c.ElMessage.success("保存成功")},W=()=>P(null,null,function*(){var a;try{yield(a=h.value)==null?void 0:a.validate();const r=l.exportTargetJson();n.value=JSON.stringify(r,null,2),s.value=!0,i("generate",r)}catch(r){c.ElMessage.error("请先完善必填项")}}),K=()=>{try{const a=document.createElement("textarea");a.value=n.value,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),c.ElMessage.success("已复制到剪贴板")}catch(a){c.ElMessage.error("复制失败")}};return e.onMounted(()=>{p.registerInstance(o.uid,l)}),e.onUnmounted(()=>{p.unregisterInstance(o.uid)}),e.watchEffect(()=>{o.conf.socketData&&l.setSocketData(o.conf.socketData)}),(a,r)=>{const m=J.ElEmpty,f=J.ElForm;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(b).bgColor,borderRadius:e.unref(b).radiusSize+"px"})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(U.value)},e.toDisplayString(x.value.action_name||x.value.caption||x.value.name),5),e.createElementVNode("div",oe,[k.mode==="edit"&&e.unref(l).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",ne,[r[8]||(r[8]=e.createElementVNode("span",null,"JSON 配置",-1)),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:H},{default:e.withCtx(()=>[...r[6]||(r[6]=[e.createTextVNode("应用",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:r[0]||(r[0]=d=>e.unref(l).showJsonEditor.value=!1)},{default:e.withCtx(()=>[...r[7]||(r[7]=[e.createTextVNode("关闭",-1)])]),_:1})]),e.createVNode(e.unref(c.ElInput),{type:"textarea",modelValue:e.unref(l).jsonInput.value,"onUpdate:modelValue":r[1]||(r[1]=d=>e.unref(l).jsonInput.value=d),rows:12,placeholder:"粘贴 action_item JSON..."},null,8,["modelValue"])])):e.createCommentVNode("",!0),k.mode==="edit"&&!e.unref(l).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(c.ElButton),{size:"small",type:"primary",onClick:r[2]||(r[2]=d=>e.unref(l).showJsonEditor.value=!0)},{default:e.withCtx(()=>[...r[9]||(r[9]=[e.createTextVNode("编辑 JSON",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(c.ElDialog),{modelValue:s.value,"onUpdate:modelValue":r[5]||(r[5]=d=>s.value=d),title:"生成的目标JSON",width:"600px","close-on-click-modal":!1},{footer:e.withCtx(()=>[e.createVNode(e.unref(c.ElButton),{onClick:K},{default:e.withCtx(()=>[...r[10]||(r[10]=[e.createTextVNode("复制",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:r[4]||(r[4]=d=>s.value=!1)},{default:e.withCtx(()=>[...r[11]||(r[11]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(c.ElInput),{type:"textarea",modelValue:n.value,"onUpdate:modelValue":r[3]||(r[3]=d=>n.value=d),rows:16,readonly:""},null,8,["modelValue"])]),_:1},8,["modelValue"]),!e.unref(l).hasParams&&k.mode!=="edit"?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(m,{description:"等待表单配置...","image-size":80})])):e.createCommentVNode("",!0),e.unref(l).hasParams?(e.openBlock(),e.createElementBlock("div",ie,[x.value.description?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("p",null,e.toDisplayString(x.value.description),1)])):e.createCommentVNode("",!0),e.createVNode(f,{ref_key:"formRef",ref:h,model:e.unref(l).formData,rules:e.unref(l).getFormRules(),"label-width":e.unref(b).labelWidth+"px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).getVisibleParams(),d=>(e.openBlock(),e.createBlock(e.unref(I),{key:d.key,param:d,rootData:e.unref(l).formData,actionItem:e.unref(l)},null,8,["param","rootData","actionItem"]))),128)),e.unref(b).showButtons?(e.openBlock(),e.createBlock(e.unref(c.ElFormItem),{key:0,class:"form-buttons"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:L},{default:e.withCtx(()=>[...r[12]||(r[12]=[e.createTextVNode("保存",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"success",onClick:W},{default:e.withCtx(()=>[...r[13]||(r[13]=[e.createTextVNode("生成JSON",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model","rules","label-width"])])):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)}}})),_e=z._export_sfc(ge,[["__scopeId","data-v-5198cc32"]]);exports.default=_e;
|
|
1
|
+
"use strict";var G=Object.defineProperty,Q=Object.defineProperties;var X=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var A=(k,t,o)=>t in k?G(k,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):k[t]=o,O=(k,t)=>{for(var o in t||(t={}))Y.call(t,o)&&A(k,o,t[o]);if(B)for(var o of B(t))Z.call(t,o)&&A(k,o,t[o]);return k},T=(k,t)=>Q(k,X(t));var P=(k,t,o)=>new Promise((s,n)=>{var i=l=>{try{h(o.next(l))}catch(b){n(b)}},p=l=>{try{h(o.throw(l))}catch(b){n(b)}},h=l=>l.done?s(l.value):Promise.resolve(l.value).then(i,p);h((o=o.apply(k,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/empty/style/css");const e=require("vue"),c=require("element-plus"),$=require("@element-plus/icons-vue"),z=require("./index-DXv6ELXG.cjs"),ee=require("./BaseComponent-DhTgr97M.cjs"),te=require("./titleStyle-NSnz6cUg.cjs"),q=require("./ele-crd-icon-BvNgAPKW.cjs");class re extends ee.BaseComponent{constructor(t){super(t,"actionItem"),this.formData=e.reactive({}),this.showJsonEditor=e.ref(!1),this.jsonInput=e.ref("")}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#333"),radiusSize:this.getOptionValue("radiusSize",8),labelWidth:this.getOptionValue("labelWidth",100),isHideTitle:this.getOptionValue("isHideTitle",!1),showButtons:this.getOptionValue("showButtons",!0)}}init(){var o;this.Style.value=this.extractStyles(),this.applyTheme();const t=this.props.conf.data;t&&typeof t=="object"&&((o=t.params)!=null&&o.length)&&this.parseBackendData(t),this.initFormData()}getParams(){var t;return Array.isArray((t=this.props.conf)==null?void 0:t.params)?this.props.conf.params:[]}get hasParams(){return this.getParams().length>0}getVisibleParams(){return this.getParams().filter(t=>t.form_type!=="hidden"&&!this.isFieldHidden(t))}getFormRules(){const t={},o=(s,n="")=>{s.forEach(i=>{const p=n?`${n}.${i.key}`:i.key;if(i.form_type==="sub_form"&&i.properties&&!i.items){o(i.properties,p);return}if(i.form_type==="sub_form"&&i.items)return;const h=this.buildValidationRules(i);h.length&&(t[p]=h)})};return o(this.getParams()),t}initFormData(){var o,s;const t=(s=(o=this.props.conf)==null?void 0:o.data)==null?void 0:s.values;this.getParams().forEach(n=>{t&&t[n.key]!==void 0?this.formData[n.key]=t[n.key]:this.formData[n.key]=this.getDefaultValue(n)})}resetForm(){this.initFormData()}getDefaultValue(t){var o,s;if(t.form_type==="sub_form"&&t.properties&&!t.items){const n={};return t.properties.forEach(i=>{n[i.key]=this.getDefaultValue(i)}),n}return t.form_type==="sub_form"&&t.items?Array.isArray(t.default_value)?t.default_value:[]:t.form_type==="checkbox_group"?Array.isArray(t.default_value)?t.default_value:[]:t.default_value!==null&&t.default_value!==void 0?t.default_value:t.form_type==="switch"?!1:t.form_type==="number"?(s=(o=t.format)==null?void 0:o.min)!=null?s:0:""}buildValidationRules(t){const o=[];t.required&&o.push({required:!0,message:`请输入${t.cn_name}`,trigger:"blur"});const s=t.format;return s&&(s.pattern&&o.push({pattern:new RegExp(s.pattern),message:`${t.cn_name}格式不正确`,trigger:"blur"}),(s.min_length||s.max_length)&&o.push({min:s.min_length,max:s.max_length,message:s.min_length&&s.max_length?`长度在 ${s.min_length} 到 ${s.max_length} 个字符`:s.min_length?`最少 ${s.min_length} 个字符`:`最多 ${s.max_length} 个字符`,trigger:"blur"})),o}isFieldHidden(t){var o,s,n,i;if(!((o=t.rules)!=null&&o.length))return!1;for(const p of t.rules){const h=this.formData[(s=p.related_key)==null?void 0:s.split(".")[0]],l=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((i=l==null?void 0:l.property)!=null&&i.hidden)return!0}return!1}isFieldDisabled(t){var o,s,n,i;if(!((o=t.rules)!=null&&o.length))return!1;for(const p of t.rules){const h=this.formData[(s=p.related_key)==null?void 0:s.split(".")[0]],l=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((i=l==null?void 0:l.property)!=null&&i.disabled)return!0}return!1}getFieldOptions(t){var s,n;let o=t.enum||[];if(t.rules)for(const i of t.rules){if(!i.related_key)continue;const p=this.formData[i.related_key],h=(s=i.conditions)==null?void 0:s.find(l=>l.value===p);if((n=h==null?void 0:h.property)!=null&&n.enum){o=h.property.enum;break}}return o}onFieldChange(t){this.getParams().forEach(o=>{if(o.rules)for(const s of o.rules)s.related_key===t.key&&(this.formData[o.key]=o.form_type==="checkbox_group"?[]:o.form_type==="switch"?!1:"")})}addSubItem(t){var n;Array.isArray(this.formData[t.key])||(this.formData[t.key]=[]);const o=((n=t.items)==null?void 0:n.properties)||t.properties||[],s={};o.forEach(i=>{s[i.key]=this.getDefaultValue(i)}),this.formData[t.key].push(s)}removeSubItem(t,o){var s;(s=this.formData[t])==null||s.splice(o,1)}getSubFieldOptions(t,o){var s,n,i;if((s=t.enum)!=null&&s.length)return t.enum;if(t.rules)for(const p of t.rules){if(!p.related_key)continue;const h=p.related_key.split(".").pop(),l=(n=p.conditions)==null?void 0:n.find(b=>b.value===o[h]);if((i=l==null?void 0:l.property)!=null&&i.enum)return l.property.enum}return[]}onSubFieldChange(t,o,s){var i;(((i=t.items)==null?void 0:i.properties)||t.properties||[]).forEach(p=>{var h;if(p.rules)for(const l of p.rules)((h=l.related_key)==null?void 0:h.split(".").pop())===o.key&&(s[p.key]="")})}applyJson(){try{const t=JSON.parse(this.jsonInput.value);if(t.params&&Array.isArray(t.params))this.props.conf.action_name=t.action_name||"表单",this.props.conf.description=t.description||"",this.props.conf.params=t.params,this.props.conf.data=t,this.initFormData();else if(Array.isArray(t))this.props.conf.params=t,this.props.conf.data={params:t},this.initFormData();else if(t.key&&t.form_type)this.props.conf.params=[t],this.initFormData();else return{success:!1,error:"无法识别的 JSON 格式"};return this.showJsonEditor.value=!1,{success:!0}}catch(t){return{success:!1,error:t.message||"JSON 格式错误"}}}exportTargetJson(){return this.exportToOriginalFormat()}parseBackendData(t){t&&(this.props.conf.action_name=t.action_name,this.props.conf.description=t.description,this.props.conf.params=t.params,this.props.conf.block=t.block,this.props.conf.action=t.action,this.props.conf.data=t,this.initFormData())}serializeToBackend(){return{block:this.props.conf.block,action:this.props.conf.action,params:O({},this.formData),originalFormat:this.exportToOriginalFormat()}}saveFormData(){this.props.conf.data||(this.props.conf.data={}),this.props.conf.data.values=JSON.parse(JSON.stringify(this.formData))}getFullConfig(){return{action_name:this.props.conf.action_name,description:this.props.conf.description,block:this.props.conf.block,action:this.props.conf.action,params:this.props.conf.params}}exportToOriginalFormat(){return this.convertFormDataToOriginal(this.formData,this.getParams())}convertFormDataToOriginal(t,o){const s={};return o.forEach(n=>{var p;const i=t[n.key];n.form_type==="sub_form"?n.properties&&!n.items?s[n.key]=this.convertFormDataToOriginal(i||{},n.properties):(p=n.items)!=null&&p.properties&&(s[n.key]=Array.isArray(i)?i.map(h=>this.convertArrayItemToOriginal(h,n.items.properties)):[]):n.db_type==="boolean"&&typeof i=="boolean"?s[n.key]=i?"true":"false":s[n.key]=i}),s}convertArrayItemToOriginal(t,o){const s={};return o.forEach(n=>{n.form_type==="sub_form"&&n.properties?s[n.key]=this.convertFormDataToOriginal(t[n.key]||{},n.properties):s[n.key]=t[n.key]}),s}setSocketData(t){if(!t)return;const o=t.result||t,s=o.action_item||o;s!=null&&s.params&&this.parseBackendData(s)}watchParams(){e.watch(()=>{var t;return(t=this.props.conf)==null?void 0:t.params},()=>this.initFormData(),{immediate:!0,deep:!0})}}const oe={class:"mix-body"},se={key:0,class:"json-editor"},ne={class:"editor-header"},ae={key:1,class:"edit-toolbar"},le={key:2,class:"empty-state"},ie={key:3,class:"form-content"},ue={key:0,class:"form-description"},ce={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"动态表单",NAME_EN:"ActionItem",ORDER:1,PLATFORM:["pc","screen","mobile"]},de={titleColor:"#111",bgColor:"#fff",radiusSize:8,labelWidth:100,isHideTitle:!1,showButtons:!0,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},me={},fe=[],pe=[],he={},ye={DEFAULT:ce,OPTIONS:de,DATA:me,PARAMS:fe,SOURCE:pe,COMMON:he},ge=e.defineComponent(T(O({},ye),{__name:"actionItem",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},emits:["submit","generate"],setup(k,{emit:t}){const o=k,s=e.ref(!1),n=e.ref(""),i=t,p=z.useCounterStore(),h=e.ref(),l=new re(o);l.setupLifecycle(),l.watchParams();const b=l.getStyle(),x=e.computed(()=>o.conf||{}),U=e.computed(()=>te.generateTitleStyle(o.conf.options));function N(a,r){return r.split(".").reduce((m,f)=>m==null?void 0:m[f],a)}function w(a,r,m){const f=r.split("."),d=f.pop(),u=f.reduce((_,V)=>((!_[V]||typeof _[V]!="object")&&(_[V]={}),_[V]),a);u[d]=m}function F(a,r,m){var f,d,u;if(!((f=a.rules)!=null&&f.length))return!1;for(const _ of a.rules){const V=_.related_key;if(!V)continue;const E=r?`${r}.${V}`:V,v=N(m,E),g=(d=_.conditions)==null?void 0:d.find(C=>C.value===v);if((u=g==null?void 0:g.property)!=null&&u.hidden)return!0}return!1}const I=e.defineComponent({name:"FormField",props:{param:{type:Object,required:!0},rootData:{type:Object,required:!0},actionItem:{type:Object,required:!0},parentPath:{type:String,default:""}},setup(a){var E;const r=a.param,m=a.rootData,f=a.actionItem,d=r.key,u=a.parentPath?`${a.parentPath}.${d}`:d,_=r.form_type==="sub_form"&&r.properties&&!r.items,V=r.form_type==="sub_form"&&((E=r.items)==null?void 0:E.properties);return()=>{if(F(r,a.parentPath,m))return null;if(_){let g=N(m,u);(!g||typeof g!="object"||Array.isArray(g))&&w(m,u,{});const C=r.properties.filter(y=>!F(y,u,m));return e.h("div",{class:"nested-group"},[e.h("div",{class:"nested-title"},r.cn_name),e.h("div",{class:"nested-content"},C.map(y=>e.h(I,{param:y,rootData:m,actionItem:f,key:y.key,parentPath:u})))])}if(V){let g=N(m,u);Array.isArray(g)||(w(m,u,[]),g=N(m,u));const C=r.items.properties;return e.h(c.ElFormItem,{label:r.cn_name},()=>[e.h("div",{class:"sub-form"},[...g.map((y,D)=>e.h("div",{class:"sub-item",key:D},[e.h("div",{class:"sub-fields"},C.map(S=>e.h("div",{class:"sub-field",key:S.key},[e.h("span",{class:"sub-label"},[S.required?e.h("span",{class:"required-star"},"*"):null,S.cn_name]),j(S,y,f)]))),e.h(c.ElButton,{type:"danger",icon:$.Delete,circle:!0,size:"small",onClick:()=>g.splice(D,1)})])),e.h(c.ElButton,{type:"primary",icon:$.Plus,onClick:()=>{const y={};C.forEach(D=>{y[D.key]=M(D)}),g.push(y)}},()=>"添加")])])}const v={label:r.cn_name,prop:u};return r.required&&(v.rules=[{required:!0,message:`请输入${r.cn_name}`,trigger:"blur"}]),e.h(c.ElFormItem,v,()=>R(r,u,m,f))}}});function R(a,r,m,f){var V,E;const d=f.isFieldDisabled(a),u=N(m,r),_=v=>w(m,r,v);switch(a.form_type){case"text":return e.h(c.ElInput,{modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:a.description||`请输入${a.cn_name}`,disabled:d,size:"small"});case"textarea":return e.h(c.ElInput,{type:"textarea",modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:a.description,disabled:d,rows:3});case"select":return e.h(c.ElSelect,{modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:`请选择${a.cn_name}`,disabled:d,style:"width:100%",size:"small"},()=>(a.enum||[]).map(g=>e.h(c.ElOption,{key:g.value,label:g.cn_name,value:g.value})));case"number":return e.h(c.ElInputNumber,{modelValue:u!=null?u:0,"onUpdate:modelValue":_,disabled:d,min:(V=a.format)==null?void 0:V.min,max:(E=a.format)==null?void 0:E.max,style:"width:100%",size:"small"});case"switch":const v=u===!0||u==="true";return e.h(c.ElSwitch,{modelValue:v,"onUpdate:modelValue":_,disabled:d});default:return e.h(c.ElInput,{modelValue:u!=null?u:"","onUpdate:modelValue":_,disabled:d,size:"small"})}}function j(a,r,m){var u,_,V,E,v,g;const f=a.key,d=m.isFieldDisabled(a);switch(a.form_type){case"text":return e.h(c.ElInput,{modelValue:(u=r[f])!=null?u:"","onUpdate:modelValue":y=>r[f]=y,placeholder:a.description||`请输入${a.cn_name}`,disabled:d,size:"small"});case"select":return e.h(c.ElSelect,{modelValue:(_=r[f])!=null?_:"","onUpdate:modelValue":y=>r[f]=y,placeholder:`请选择${a.cn_name}`,disabled:d,style:"width:100%",size:"small"},()=>(a.enum||[]).map(y=>e.h(c.ElOption,{key:y.value,label:y.cn_name,value:y.value})));case"number":return e.h(c.ElInputNumber,{modelValue:(V=r[f])!=null?V:0,"onUpdate:modelValue":y=>r[f]=y,disabled:d,min:(E=a.format)==null?void 0:E.min,max:(v=a.format)==null?void 0:v.max,style:"width:100%",size:"small"});case"switch":const C=r[f]===!0||r[f]==="true";return e.h(c.ElSwitch,{modelValue:C,"onUpdate:modelValue":y=>r[f]=y,disabled:d});default:return e.h(c.ElInput,{modelValue:(g=r[f])!=null?g:"","onUpdate:modelValue":y=>r[f]=y,disabled:d,size:"small"})}}function M(a){var r,m;return a.default_value!==void 0?a.default_value:a.form_type==="switch"?!1:a.form_type==="checkbox_group"?[]:a.form_type==="number"?(m=(r=a.format)==null?void 0:r.min)!=null?m:0:""}const H=()=>{const a=l.applyJson();a.success?c.ElMessage.success("JSON 配置已应用"):c.ElMessage.error(a.error||"JSON 格式错误")},L=()=>{l.saveFormData(),c.ElMessage.success("保存成功")},W=()=>P(null,null,function*(){var a;try{yield(a=h.value)==null?void 0:a.validate();const r=l.exportTargetJson();n.value=JSON.stringify(r,null,2),s.value=!0,i("generate",r)}catch(r){c.ElMessage.error("请先完善必填项")}}),K=()=>{try{const a=document.createElement("textarea");a.value=n.value,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),c.ElMessage.success("已复制到剪贴板")}catch(a){c.ElMessage.error("复制失败")}};return e.onMounted(()=>{p.registerInstance(o.uid,l)}),e.onUnmounted(()=>{p.unregisterInstance(o.uid)}),e.watchEffect(()=>{o.conf.socketData&&l.setSocketData(o.conf.socketData)}),(a,r)=>{const m=J.ElEmpty,f=J.ElForm;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(b).bgColor,borderRadius:e.unref(b).radiusSize+"px"})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(U.value)},e.toDisplayString(x.value.action_name||x.value.caption||x.value.name),5),e.createElementVNode("div",oe,[k.mode==="edit"&&e.unref(l).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",ne,[r[8]||(r[8]=e.createElementVNode("span",null,"JSON 配置",-1)),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:H},{default:e.withCtx(()=>[...r[6]||(r[6]=[e.createTextVNode("应用",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:r[0]||(r[0]=d=>e.unref(l).showJsonEditor.value=!1)},{default:e.withCtx(()=>[...r[7]||(r[7]=[e.createTextVNode("关闭",-1)])]),_:1})]),e.createVNode(e.unref(c.ElInput),{type:"textarea",modelValue:e.unref(l).jsonInput.value,"onUpdate:modelValue":r[1]||(r[1]=d=>e.unref(l).jsonInput.value=d),rows:12,placeholder:"粘贴 action_item JSON..."},null,8,["modelValue"])])):e.createCommentVNode("",!0),k.mode==="edit"&&!e.unref(l).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(c.ElButton),{size:"small",type:"primary",onClick:r[2]||(r[2]=d=>e.unref(l).showJsonEditor.value=!0)},{default:e.withCtx(()=>[...r[9]||(r[9]=[e.createTextVNode("编辑 JSON",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(c.ElDialog),{modelValue:s.value,"onUpdate:modelValue":r[5]||(r[5]=d=>s.value=d),title:"生成的目标JSON",width:"600px","close-on-click-modal":!1},{footer:e.withCtx(()=>[e.createVNode(e.unref(c.ElButton),{onClick:K},{default:e.withCtx(()=>[...r[10]||(r[10]=[e.createTextVNode("复制",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:r[4]||(r[4]=d=>s.value=!1)},{default:e.withCtx(()=>[...r[11]||(r[11]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(c.ElInput),{type:"textarea",modelValue:n.value,"onUpdate:modelValue":r[3]||(r[3]=d=>n.value=d),rows:16,readonly:""},null,8,["modelValue"])]),_:1},8,["modelValue"]),!e.unref(l).hasParams&&k.mode!=="edit"?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(m,{description:"等待表单配置...","image-size":80})])):e.createCommentVNode("",!0),e.unref(l).hasParams?(e.openBlock(),e.createElementBlock("div",ie,[x.value.description?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("p",null,e.toDisplayString(x.value.description),1)])):e.createCommentVNode("",!0),e.createVNode(f,{ref_key:"formRef",ref:h,model:e.unref(l).formData,rules:e.unref(l).getFormRules(),"label-width":e.unref(b).labelWidth+"px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).getVisibleParams(),d=>(e.openBlock(),e.createBlock(e.unref(I),{key:d.key,param:d,rootData:e.unref(l).formData,actionItem:e.unref(l)},null,8,["param","rootData","actionItem"]))),128)),e.unref(b).showButtons?(e.openBlock(),e.createBlock(e.unref(c.ElFormItem),{key:0,class:"form-buttons"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:L},{default:e.withCtx(()=>[...r[12]||(r[12]=[e.createTextVNode("保存",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"success",onClick:W},{default:e.withCtx(()=>[...r[13]||(r[13]=[e.createTextVNode("生成JSON",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model","rules","label-width"])])):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)}}})),_e=z._export_sfc(ge,[["__scopeId","data-v-5198cc32"]]);exports.default=_e;
|
|
@@ -33,8 +33,8 @@ import "element-plus/es/components/empty/style/css";
|
|
|
33
33
|
import { reactive as be, ref as $, watch as ke, defineComponent as G, computed as Q, h as f, onMounted as ve, onUnmounted as Ve, watchEffect as De, openBlock as S, createElementBlock as w, normalizeStyle as X, unref as c, createElementVNode as B, toDisplayString as Y, createVNode as V, withCtx as D, createTextVNode as C, createCommentVNode as I, Fragment as Fe, renderList as Oe, createBlock as Z, renderSlot as Se } from "vue";
|
|
34
34
|
import { ElFormItem as j, ElButton as x, ElInput as A, ElSwitch as ee, ElInputNumber as te, ElSelect as re, ElOption as oe, ElDialog as xe, ElMessage as J } from "element-plus";
|
|
35
35
|
import { Delete as Ee, Plus as we } from "@element-plus/icons-vue";
|
|
36
|
-
import { u as Ce, _ as Ae } from "./index-
|
|
37
|
-
import { B as Ie } from "./BaseComponent-
|
|
36
|
+
import { u as Ce, _ as Ae } from "./index-Cjkb-feQ.js";
|
|
37
|
+
import { B as Ie } from "./BaseComponent-Da3s36W_.js";
|
|
38
38
|
import { g as Je } from "./titleStyle-BT5GlpAb.js";
|
|
39
39
|
import { A as Ne, D as Pe } from "./ele-crd-icon-BXxB7P3T.js";
|
|
40
40
|
class Te extends Ie {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var w=Object.defineProperty,V=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var N=(u,o,i)=>o in u?w(u,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[o]=i,z=(u,o)=>{for(var i in o||(o={}))R.call(o,i)&&N(u,i,o[i]);if(I)for(var i of I(o))$.call(o,i)&&N(u,i,o[i]);return u},k=(u,o)=>V(u,q(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");require("html2canvas");const H=require("./index-
|
|
1
|
+
"use strict";var w=Object.defineProperty,V=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var N=(u,o,i)=>o in u?w(u,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[o]=i,z=(u,o)=>{for(var i in o||(o={}))R.call(o,i)&&N(u,i,o[i]);if(I)for(var i of I(o))$.call(o,i)&&N(u,i,o[i]);return u},k=(u,o)=>V(u,q(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");require("html2canvas");const H=require("./index-DXv6ELXG.cjs");require("element-plus");const P=require("./EChartComponentBase-DjvZJF92.cjs"),L=require("./ele-lin-icon-Dke_1AmT.cjs"),U={class:"panel-header"},W=["id"],G={DEFAULT_ICON:L.DEFAULT_ICON,ACTIVE_ICON:L.ACTIVE_ICON,NAME_CN:"预警等级",NAME_EN:"Alarm Level Chart",ORDER:12,PLATFORM:["pc","screen"]},J={title:{value:"预警等级",type:"string",label:"标题"},bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},panelBgColor:{value:"#ffffff",type:"color",label:"面板背景色"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleFontSize:{value:16,type:"number",label:"标题字体大小",min:12,max:24},centerFontSize:{value:32,type:"number",label:"中心数字大小",min:18,max:48},level1Color:{value:"#F57676",type:"color",label:"一级告警颜色"},level2Color:{value:"#FFA500",type:"color",label:"二级告警颜色"},level3Color:{value:"#fadb14",type:"color",label:"三级告警颜色"},level4Color:{value:"#66B1FF",type:"color",label:"四级告警颜色"},normalColor:{value:"#67C23A",type:"color",label:"运行正常颜色"},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},K=[{name:"设备1",fv:"alarm_level",fvDeviceName:"",object_id:""}],Q=["object_id","name","fv","fvDeviceName"],X=["mosaic"],Y={useAlias:!1,multiObject:!0,source:"mosaic"},Z=200,ee={DEFAULT:G,OPTIONS:J,DATA:K,PARAMS:Q,SOURCE:X,COMMON:Y,ITEMS:Z},te=l.defineComponent(k(z({},ee),{__name:"alarmLevelChart",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(u){const o=u,i=["一级告警","二级告警","三级告警","四级告警","运行正常"],b=new Map;class j extends P.EChartComponentBase{extractStyles(){var a,s,n,v,f,h,p,_,A,x,O,F,E,M;const e=(a=this.props.conf)==null?void 0:a.options,c=((s=e==null?void 0:e.linkChannel)==null?void 0:s.value)||"gnss",r=((n=e==null?void 0:e.customChannel)==null?void 0:n.value)||"";return{title:((v=e==null?void 0:e.title)==null?void 0:v.value)||"预警等级",bgColor:((f=e==null?void 0:e.bgColor)==null?void 0:f.value)||"#f5f7fa",panelBgColor:((h=e==null?void 0:e.panelBgColor)==null?void 0:h.value)||"#ffffff",textColor:((p=e==null?void 0:e.textColor)==null?void 0:p.value)||"#333333",titleFontSize:((_=e==null?void 0:e.titleFontSize)==null?void 0:_.value)||16,centerFontSize:((A=e==null?void 0:e.centerFontSize)==null?void 0:A.value)||32,level1Color:((x=e==null?void 0:e.level1Color)==null?void 0:x.value)||"#F57676",level2Color:((O=e==null?void 0:e.level2Color)==null?void 0:O.value)||"#FFA500",level3Color:((F=e==null?void 0:e.level3Color)==null?void 0:F.value)||"#fadb14",level4Color:((E=e==null?void 0:e.level4Color)==null?void 0:E.value)||"#66B1FF",normalColor:((M=e==null?void 0:e.normalColor)==null?void 0:M.value)||"#67C23A",linkChannel:c==="custom"&&r?r:c}}getChartOption(){return C(this.Style.value)}setHistoryData(e){var r;if(!e||!this.chartObj)return;const c=((r=this.props.conf)==null?void 0:r.data)||[];!Array.isArray(c)||!c.length||(c.forEach((a,s)=>{if(!a.fv)return;const n=Array.isArray(e)?e[s]:null,v=Array.isArray(n)&&n.length?n[0]:null;if(!v)return;const f=v[a.fv];if(f==null)return;const h=Math.min(Math.max(typeof f=="number"?Math.round(f):Math.round(parseFloat(String(f)))||0,0),4),p=a.object_id||a.name||"";p&&b.set(p,h)}),this.chartObj.setOption(C(this.Style.value),!0))}setSocketData(e){var r;if(!e)return;(((r=this.props.conf)==null?void 0:r.data)||[]).forEach(a=>{if(!a.fv)return;const s=a.object_id||a.name||"";if(!s)return;const n=this.extractDataValue(e,a.fv);if(n!=null){const v=typeof n=="number"?Math.min(Math.max(Math.round(n),0),4):4;b.set(s,v)}}),this.chartObj&&this.chartObj.setOption(C(this.Style.value),!0)}onLinkEvent(e){}}const m=new j(o,"alarmLevelChart");m.setupLifecycle();const d=m.getStyle(),D=m.getEchartId(),y=l.computed(()=>{var t;return((t=o.conf)==null?void 0:t.data)||[]}),g=l.computed(()=>{const t=[0,0,0,0,0];return y.value.length===0&&o.mode==="edit"?[2,5,5,4,7]:(y.value.forEach(e=>{const c=e.object_id||e.name||"",r=b.get(c),a=typeof r=="number"?r:4;t[a]++}),t)}),T=l.computed(()=>{const t=g.value;for(let e=0;e<5;e++)if(t[e]>0)return{idx:e,count:t[e],name:i[e]};return{idx:4,count:0,name:"运行正常"}}),B=l.computed(()=>({backgroundColor:d.value.bgColor})),C=t=>{const e=g.value,c=[t.level1Color,t.level2Color,t.level3Color,t.level4Color,t.normalColor],r=T.value,a=c[r.idx];return{backgroundColor:"transparent",tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},legend:{orient:"vertical",right:"5%",top:"middle",itemWidth:10,itemHeight:10,itemGap:14,textStyle:{fontSize:13,color:t.textColor},formatter:s=>{const n=i.indexOf(s);return`${s} ${n>=0?e[n]:0}`}},series:[{type:"pie",radius:["48%","70%"],center:["30%","50%"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:()=>`{num|${r.count}}
|
|
2
2
|
{txt|${r.name}}`,rich:{num:{fontSize:t.centerFontSize,fontWeight:"bold",color:a,lineHeight:t.centerFontSize+10},txt:{fontSize:13,color:"#999",lineHeight:22}}},labelLine:{show:!1},itemStyle:{borderRadius:4,borderColor:"#fff",borderWidth:2},data:i.map((s,n)=>({value:e[n],name:s,itemStyle:{color:c[n]}}))}]}},S=()=>{const t=m.getChartInstance();t&&t.setOption(C(d.value),!0)};return l.onMounted(()=>{o.mode==="edit"&&S(),setTimeout(()=>{var t;return(t=m.getChartInstance())==null?void 0:t.resize()},200)}),l.watch(()=>o.conf,()=>{o.mode==="edit"&&S()},{deep:!0}),(t,e)=>(l.openBlock(),l.createElementBlock("div",{class:"alarm-level-chart",style:l.normalizeStyle(B.value)},[l.createElementVNode("div",U,[e[0]||(e[0]=l.createElementVNode("span",{class:"indicator-dot"},null,-1)),l.createElementVNode("span",{class:"panel-title",style:l.normalizeStyle({color:l.unref(d).textColor,fontSize:l.unref(d).titleFontSize+"px"})},l.toDisplayString(l.unref(d).title),5)]),l.createElementVNode("div",{id:l.unref(D),class:"chart-container"},null,8,W),l.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),le=H._export_sfc(te,[["__scopeId","data-v-a4efd6a7"]]);exports.default=le;
|
|
@@ -12,9 +12,9 @@ var N = (c, l, n) => l in c ? $(c, l, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
}, L = (c, l) => H(c, W(l));
|
|
13
13
|
import { defineComponent as V, computed as C, onMounted as G, watch as q, openBlock as J, createElementBlock as K, normalizeStyle as j, createElementVNode as b, unref as y, toDisplayString as Q, renderSlot as X } from "vue";
|
|
14
14
|
import "html2canvas";
|
|
15
|
-
import { _ as Y } from "./index-
|
|
15
|
+
import { _ as Y } from "./index-Cjkb-feQ.js";
|
|
16
16
|
import "element-plus";
|
|
17
|
-
import { E as Z } from "./EChartComponentBase-
|
|
17
|
+
import { E as Z } from "./EChartComponentBase-BnpZ7uCW.js";
|
|
18
18
|
import { A as ee, D as te } from "./ele-lin-icon-Dax-ZiWV.js";
|
|
19
19
|
const le = { class: "panel-header" }, oe = ["id"], ae = {
|
|
20
20
|
DEFAULT_ICON: te,
|
|
@@ -28,8 +28,8 @@ var G = (f, o, u) => new Promise((C, d) => {
|
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as le, ref as H, computed as A, watch as U, openBlock as g, createElementBlock as _, normalizeStyle as I, createElementVNode as m, toDisplayString as j, unref as te, Fragment as E, renderList as w, normalizeClass as ae, renderSlot as re } from "vue";
|
|
30
30
|
import "html2canvas";
|
|
31
|
-
import { B as ne } from "./BaseComponent-
|
|
32
|
-
import { a as oe, _ as se } from "./index-
|
|
31
|
+
import { B as ne } from "./BaseComponent-Da3s36W_.js";
|
|
32
|
+
import { a as oe, _ as se } from "./index-Cjkb-feQ.js";
|
|
33
33
|
import { A as ue, D as ce } from "./ele-lst-icon-CKpeRKmk.js";
|
|
34
34
|
const ie = { class: "panel-header" }, de = { class: "header-left" }, ve = { class: "header-title" }, me = { class: "header-right" }, fe = ["disabled"], be = { class: "page-info" }, pe = ["disabled"], he = { class: "table-area" }, ye = { class: "data-table" }, ge = ["onClick"], _e = {
|
|
35
35
|
DEFAULT_ICON: ce,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var U=Object.defineProperty,G=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var I=(f,s,u)=>s in f?U(f,s,{enumerable:!0,configurable:!0,writable:!0,value:u}):f[s]=u,V=(f,s)=>{for(var u in s||(s={}))$.call(s,u)&&I(f,u,s[u]);if(L)for(var u of L(s))W.call(s,u)&&I(f,u,s[u]);return f},B=(f,s)=>G(f,H(s));var D=(f,s,u)=>new Promise((g,m)=>{var b=h=>{try{C(u.next(h))}catch(_){m(_)}},x=h=>{try{C(u.throw(h))}catch(_){m(_)}},C=h=>h.done?g(h.value):Promise.resolve(h.value).then(b,x);C((u=u.apply(f,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");require("html2canvas");const J=require("./BaseComponent-
|
|
1
|
+
"use strict";var U=Object.defineProperty,G=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var I=(f,s,u)=>s in f?U(f,s,{enumerable:!0,configurable:!0,writable:!0,value:u}):f[s]=u,V=(f,s)=>{for(var u in s||(s={}))$.call(s,u)&&I(f,u,s[u]);if(L)for(var u of L(s))W.call(s,u)&&I(f,u,s[u]);return f},B=(f,s)=>G(f,H(s));var D=(f,s,u)=>new Promise((g,m)=>{var b=h=>{try{C(u.next(h))}catch(_){m(_)}},x=h=>{try{C(u.throw(h))}catch(_){m(_)}},C=h=>h.done?g(h.value):Promise.resolve(h.value).then(b,x);C((u=u.apply(f,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");require("html2canvas");const J=require("./BaseComponent-DhTgr97M.cjs"),w=require("./index-DXv6ELXG.cjs"),O=require("./ele-lst-icon-CrxnHZ-A.cjs"),Q={class:"panel-header"},X={class:"header-left"},Y={class:"header-title"},Z={class:"header-right"},K=["disabled"],ee={class:"page-info"},te=["disabled"],le={class:"table-area"},ae={class:"data-table"},re=["onClick"],ne={DEFAULT_ICON:O.DEFAULT_ICON,ACTIVE_ICON:O.ACTIVE_ICON,NAME_CN:"监测预警表格",NAME_EN:"Alert Table",ORDER:2,PLATFORM:["pc","screen"]},oe={title:{value:"监测预警 (GNSS)",type:"string",label:"component.alertTable.title"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},headerBgColor:{value:"#f5f5f5",type:"color",label:"component.alertTable.headerBgColor"},pageSize:{value:5,type:"number",label:"component.alertTable.pageSize",min:3,max:20},alertColumn:{value:"speed",type:"string",label:"告警判定列(key)"},alertLevels:{value:[{name:"正常",minValue:0,maxValue:5,color:"#52c41a"},{name:"二级告警 (警告)",minValue:5,maxValue:10,color:"#faad14"},{name:"一级告警 (危险)",minValue:10,maxValue:999,color:"#ff4d4f"}],type:"alertLevels",label:"component.alertTable.alertLevels"},columns:{value:[{key:"area",label:"区域",width:"80px",useFv:!0},{key:"deviceId",label:"编号",width:"100px",useFv:!0},{key:"elevation",label:"标高",width:"80px",useFv:!0},{key:"speed",label:"速度",width:"80px",useFv:!0},{key:"threshold",label:"阈值",width:"60px",useFv:!1}],type:"columns",label:"component.alertTable.columns"},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},se=[{object_id:"",threshold:"8"}],ce=["object_id","threshold"],ue=["mosaic","statistics"],ie={useAlias:!1,multiObject:!0,source:"mosaic"},de={DEFAULT:ne,OPTIONS:oe,DATA:se,PARAMS:ce,SOURCE:ue,COMMON:ie},me=t.defineComponent(B(V({},de),{__name:"alertTable",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(f){const s=f;class u extends J.BaseComponent{extractStyles(){var n,y,i,d,c,k,N,F,T,j;const{options:e}=this.props.conf,l=[{key:"area",label:"区域",width:"80px",useFv:!0},{key:"deviceId",label:"编号",width:"100px",useFv:!0},{key:"elevation",label:"标高",width:"80px",useFv:!0},{key:"speed",label:"速度",width:"80px",useFv:!0},{key:"threshold",label:"阈值",width:"60px",useFv:!1}],o=[{name:"正常",minValue:0,maxValue:5,color:"#52c41a"},{name:"二级告警 (警告)",minValue:5,maxValue:10,color:"#faad14"},{name:"一级告警 (危险)",minValue:10,maxValue:999,color:"#ff4d4f"}],r=((n=e==null?void 0:e.linkChannel)==null?void 0:n.value)||"gnss",v=((y=e==null?void 0:e.customChannel)==null?void 0:y.value)||"",p=r==="custom"&&v?v:r;return{title:((i=e==null?void 0:e.title)==null?void 0:i.value)||"监测预警 (GNSS)",bgColor:((d=e==null?void 0:e.bgColor)==null?void 0:d.value)||"#ffffff",textColor:((c=e==null?void 0:e.textColor)==null?void 0:c.value)||"#333333",headerBgColor:((k=e==null?void 0:e.headerBgColor)==null?void 0:k.value)||"#f5f5f5",pageSize:((N=e==null?void 0:e.pageSize)==null?void 0:N.value)||5,alertColumn:((F=e==null?void 0:e.alertColumn)==null?void 0:F.value)||"speed",alertLevels:((T=e==null?void 0:e.alertLevels)==null?void 0:T.value)||o,columns:((j=e==null?void 0:e.columns)==null?void 0:j.value)||l,linkChannel:p}}initHistory(){return D(this,null,function*(){var p;const{data:e,options:l}=this.props.conf;if(!e||!Array.isArray(e))return[];const r=(((p=l==null?void 0:l.columns)==null?void 0:p.value)||[]).filter(n=>n.useFv).map(n=>n.key);if(r.length===0)return[];const v=e.map(n=>{if(!n.object_id||(this.applyHistoryObjectResolution(n),!n.object_id))return Promise.resolve(null);const y={block_mapping:"influxdbproxy",action:"get_mosaic_list",object_id:n.object_id,keys:r,page_index:1,page_size:1};return new Promise(i=>{w.api.platform(d=>{var c;i(((c=d==null?void 0:d.result)==null?void 0:c.data)||[])},y)})});return Promise.all(v)})}setHistoryData(e){var p;if(!e||!Array.isArray(e))return;const{data:l,options:o}=this.props.conf;if(!l||!Array.isArray(l))return;const v=(((p=o==null?void 0:o.columns)==null?void 0:p.value)||[]).filter(n=>n.useFv).map(n=>n.key);e.forEach((n,y)=>{if(!n||!Array.isArray(n)||n.length===0)return;const i=l[y];if(!i)return;const d=n[0];v.forEach(c=>{d[c]!==void 0&&d[c]!==null&&(i[c]=d[c])})})}setSocketData(e){var n,y;if(!e)return;const{data:l,options:o}=this.props.conf;if(!l||!Array.isArray(l))return;const v=(((n=o==null?void 0:o.columns)==null?void 0:n.value)||[]).filter(i=>i.useFv).map(i=>i.key);if(v.length===0)return;const p=e.object_id||((y=e.data)==null?void 0:y.object_id)||"";l.forEach(i=>{i.object_id&&(p&&String(i.object_id)!==String(p)||v.forEach(d=>{try{const c=this.extractDataValue(e,d);c!=null&&(i[d]=c)}catch(c){console.warn(`[alertTable] 提取字段 ${d} 失败:`,c)}}))})}}const g=new u(s,"alertTable");g.setupLifecycle();const m=g.getStyle(),b=t.ref(1),x=t.ref(!1),C=a=>{const e=m.value.linkChannel,l=g.linkStore.channels[e];if(!l)return!1;const{payload:o}=l;return o.objectId&&a.object_id?String(o.objectId)===String(a.object_id):o.deviceId&&a.deviceId?String(o.deviceId)===String(a.deviceId):!1},h=t.computed(()=>{const a=m.value.columns||[];return[{key:"index",label:"序号",width:"60px"},...a]}),_=a=>{const e=m.value.alertLevels||[];if(isNaN(a)||e.length===0)return{alertLevel:0,alertText:"正常",alertColor:"#52c41a"};for(let o=0;o<e.length;o++){const r=e[o];if(a>=r.minValue&&a<r.maxValue)return{alertLevel:o,alertText:r.name,alertColor:r.color}}const l=e[e.length-1];return{alertLevel:e.length-1,alertText:l.name,alertColor:l.color}},S=t.computed(()=>{var o;const a=((o=s.conf)==null?void 0:o.data)||[],e=m.value.alertColumn||"";return(s.mode==="preview"?a.filter(r=>r.object_id):a).map((r,v)=>{const p=e&&parseFloat(r[e])||0,{alertLevel:n,alertText:y,alertColor:i}=_(p),d={index:v+1,object_id:r.object_id||"",isAlert:n>0,alertLevel:n,alertText:y,alertColor:i,_exceed:p-(parseFloat(r.threshold)||0)};return h.value.forEach(c=>{var k;c.key!=="index"&&(d[c.key]=(k=r[c.key])!=null?k:"-")}),d}).sort((r,v)=>v._exceed-r._exceed).map((r,v)=>(r.index=v+1,r))}),P=a=>a.alertColor?{color:a.alertColor}:{},E=t.computed(()=>Math.max(1,Math.ceil(S.value.length/m.value.pageSize))),z=t.computed(()=>{const a=(b.value-1)*m.value.pageSize,e=a+m.value.pageSize;return S.value.slice(a,e)}),R=t.computed(()=>({backgroundColor:m.value.bgColor,color:m.value.textColor,"--header-bg":m.value.headerBgColor})),M=()=>{b.value>1&&b.value--},q=()=>{b.value<E.value&&b.value++},A=a=>{s.mode!=="edit"&&g.publish(V({objectId:a.object_id,deviceId:a.deviceId||"",alertLevels:m.value.alertLevels},a))};return t.watch(()=>s.conf,()=>{b.value=1},{deep:!0}),t.watch(S,a=>{if(x.value||s.mode!=="preview"||!a||a.length===0)return;const e=a[0],l=m.value.alertColumn||"";!l||e[l]==="-"||e[l]===void 0||(x.value=!0,A(e))}),(a,e)=>(t.openBlock(),t.createElementBlock("div",{class:"alert-table-wrapper",style:t.normalizeStyle(R.value)},[t.createElementVNode("div",Q,[t.createElementVNode("div",X,[e[0]||(e[0]=t.createElementVNode("div",{class:"header-indicator"},null,-1)),t.createElementVNode("span",Y,t.toDisplayString(t.unref(m).title),1)]),t.createElementVNode("div",Z,[t.createElementVNode("button",{class:"page-btn",disabled:b.value<=1,onClick:M},[...e[1]||(e[1]=[t.createElementVNode("span",null,"<",-1)])],8,K),t.createElementVNode("span",ee,t.toDisplayString(b.value)+" / "+t.toDisplayString(E.value),1),t.createElementVNode("button",{class:"page-btn",disabled:b.value>=E.value,onClick:q},[...e[2]||(e[2]=[t.createElementVNode("span",null,">",-1)])],8,te)])]),t.createElementVNode("div",le,[t.createElementVNode("table",ae,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,l=>(t.openBlock(),t.createElementBlock("th",{key:l.key,style:t.normalizeStyle({width:l.width})},t.toDisplayString(l.label),5))),128))])]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,(l,o)=>(t.openBlock(),t.createElementBlock("tr",{key:o,class:t.normalizeClass({"alert-row":l.isAlert,"active-row":C(l)}),onClick:r=>A(l)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,r=>(t.openBlock(),t.createElementBlock("td",{key:r.key,style:t.normalizeStyle(P(l))},t.toDisplayString(l[r.key]),5))),128))],10,re))),128))])])]),t.renderSlot(a.$slots,"default",{},void 0,!0)],4))}})),ve=w._export_sfc(me,[["__scopeId","data-v-bd23f3c0"]]);exports.default=ve;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty,L=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var V=(c,n,r)=>n in c?M(c,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[n]=r,S=(c,n)=>{for(var r in n||(n={}))R.call(n,r)&&V(c,r,n[r]);if(N)for(var r of N(n))F.call(n,r)&&V(c,r,n[r]);return c},E=(c,n)=>L(c,q(n));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/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/input/style/css");const e=require("vue"),v=require("./index-
|
|
1
|
+
"use strict";var M=Object.defineProperty,L=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var V=(c,n,r)=>n in c?M(c,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[n]=r,S=(c,n)=>{for(var r in n||(n={}))R.call(n,r)&&V(c,r,n[r]);if(N)for(var r of N(n))F.call(n,r)&&V(c,r,n[r]);return c},E=(c,n)=>L(c,q(n));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/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/input/style/css");const e=require("vue"),v=require("./index-DXv6ELXG.cjs"),j=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),z={class:"section-header"},B={class:"section-title"},U={class:"row"},Y={class:"label"},$={class:"row"},K={class:"row"},H={class:"row row-meta"},J={key:0},W={class:"payload-preview"},G={DEFAULT_ICON:j.DEFAULT_ICON,ACTIVE_ICON:j.ACTIVE_ICON,NAME_CN:"对象别名选择器",NAME_EN:"Alias Object Selector",ORDER:22,PLATFORM:["pc","screen"]},Q={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},sectionTitle:{value:"对象别名切换",type:"string",label:"component.openpitConfigPanel.label"},aliasLabel:{value:"别名模式",type:"string",label:"component.openpitConfigPanel.objectSelectInputLabel"},aliasPlaceholder:{value:"例如 radar*",type:"string",label:"component.openpitConfigPanel.objectSelectInputPlaceholder"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},X=[{key:"objectAlias",multiple:!0,pattern:"radar*",fvs:["disp","speed"]}],Z=[{key:"key",label:"component.openpitConfigPanel.key",type:"string"},{key:"multiple",label:"component.openpitConfigPanel.multiple",type:"switch"},{key:"pattern",label:"component.openpitConfigPanel.optionValue",type:"string"},{key:"fvs",label:"component.openpitConfigPanel.options",type:"array"}],ee=[],te={useAlias:!0,multiObject:!0,source:""},le={DEFAULT:G,OPTIONS:Q,DATA:X,PARAMS:Z,SOURCE:ee,COMMON:te},oe=e.defineComponent(E(S({},le),{__name:"aliasObjectSelectorDemo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""}},setup(c){e.useCssVars(t=>({v20d7bd78:_.value.borderColor,v6db2e060:_.value.color}));const n=c,r=v.useLinkStore(),d=e.ref("radar*"),m=e.ref("disp,speed"),p=e.ref([]),f=e.ref(""),C=e.ref(""),_=e.computed(()=>{var l,o,a,s;const t=((l=n.conf)==null?void 0:l.options)||{};return{backgroundColor:((o=t==null?void 0:t.bgColor)==null?void 0:o.value)||"#ffffff",color:((a=t==null?void 0:t.textColor)==null?void 0:a.value)||"#333333",borderColor:((s=t==null?void 0:t.borderColor)==null?void 0:s.value)||"#e5e5e5"}}),k=e.computed(()=>{var t,l,o;return String(((o=(l=(t=n.conf)==null?void 0:t.options)==null?void 0:l.sectionTitle)==null?void 0:o.value)||"对象别名切换")}),O=e.computed(()=>{var t,l,o;return String(((o=(l=(t=n.conf)==null?void 0:t.options)==null?void 0:l.aliasLabel)==null?void 0:o.value)||"别名模式")}),A=e.computed(()=>{var t,l,o;return String(((o=(l=(t=n.conf)==null?void 0:t.options)==null?void 0:l.aliasPlaceholder)==null?void 0:o.value)||"例如 radar*")}),P=()=>{var a,s,i;const t=((a=n.conf)==null?void 0:a.options)||{},l=((s=t==null?void 0:t.linkChannel)==null?void 0:s.value)||"deepDisplacement",o=((i=t==null?void 0:t.customChannel)==null?void 0:i.value)||"";return l==="custom"&&o?o:l},w=()=>{try{return JSON.parse(sessionStorage.getItem(v.ALIAS_MAPPING_KEY)||"{}")||{}}catch(t){return{}}},T=t=>String(t||"").split(",").map(l=>l.trim()).filter(Boolean),D=t=>t.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),I=t=>{const l=D(t).replace(/\*/g,".*");return new RegExp(`^${l}$`,"i")},x=()=>{const t=w();return Object.keys(t).map(l=>({object_alias:l,object_id:String(t[l]||"")})).filter(l=>l.object_id)},g=()=>{const t=String(d.value||"").trim();if(!t){p.value=[];return}const l=I(t),o=x();p.value=o.filter(a=>l.test(a.object_alias))},y=()=>{g();const t=p.value.map(i=>i.object_id),l=p.value.map(i=>i.object_alias),o=T(m.value),a=P(),s={source:"aliasObjectSelector",type:"filter",mode:"aliasWildcard",objectAliasPattern:d.value,objectAliases:l,objectIds:t,objectId:t[0]||"",fvs:o,fv:o[0]||"",count:t.length,time:Date.now()};r.publish(a,"aliasObjectSelector",s),f.value=v.dayjs().format("YYYY-MM-DD HH:mm:ss"),C.value=JSON.stringify(s,null,2)};return e.onMounted(()=>{var o,a,s,i,u,h;const t=String(((s=(a=(o=n.conf)==null?void 0:o.data)==null?void 0:a[0])==null?void 0:s.pattern)||"").trim();t&&(d.value=t);const l=(h=(u=(i=n.conf)==null?void 0:i.data)==null?void 0:u[0])==null?void 0:h.fvs;Array.isArray(l)&&l.length&&(m.value=l.join(",")),g()}),(t,l)=>{const o=b.ElInput,a=b.ElButton,s=b.ElTableColumn,i=b.ElTable;return e.openBlock(),e.createElementBlock("div",{class:"alias-demo",style:e.normalizeStyle(_.value)},[e.createElementVNode("div",z,[e.createElementVNode("span",B,e.toDisplayString(k.value),1)]),e.createElementVNode("div",U,[e.createElementVNode("span",Y,e.toDisplayString(O.value),1),e.createVNode(o,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=u=>d.value=u),placeholder:A.value,size:"small",clearable:"",onKeyup:e.withKeys(y,["enter"])},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",$,[l[2]||(l[2]=e.createElementVNode("span",{class:"label"},"FV",-1)),e.createVNode(o,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=u=>m.value=u),placeholder:"例如 disp,speed,temp",size:"small",clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",K,[e.createVNode(a,{type:"primary",size:"small",onClick:y},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode("匹配并联动",-1)])]),_:1}),e.createVNode(a,{size:"small",onClick:g},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("仅匹配",-1)])]),_:1})]),e.createElementVNode("div",H,[e.createElementVNode("span",null,"匹配数量:"+e.toDisplayString(p.value.length),1),f.value?(e.openBlock(),e.createElementBlock("span",J,"最近推送:"+e.toDisplayString(f.value),1)):e.createCommentVNode("",!0)]),l[6]||(l[6]=e.createElementVNode("div",{class:"tips"},[e.createTextVNode(" 数据源:sessionStorage["),e.createElementVNode("code",null,"object_alias_uid_mapping"),e.createTextVNode("](真实对象别名映射) ")],-1)),e.createVNode(i,{data:p.value,size:"small",border:"",style:{width:"100%"},"max-height":"220"},{default:e.withCtx(()=>[e.createVNode(s,{prop:"object_id",label:"object_id","min-width":"180"}),e.createVNode(s,{prop:"object_alias",label:"object_alias","min-width":"180"})]),_:1},8,["data"]),e.createElementVNode("div",W,[l[5]||(l[5]=e.createElementVNode("div",{class:"preview-title"},"本次联动 payload 预览",-1)),e.createElementVNode("pre",null,e.toDisplayString(C.value),1)])],4)}}})),ne=v._export_sfc(oe,[["__scopeId","data-v-a1c7e108"]]);exports.default=ne;
|
|
@@ -2,14 +2,14 @@ var U = Object.defineProperty, Y = Object.defineProperties;
|
|
|
2
2
|
var B = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var A = Object.getOwnPropertySymbols;
|
|
4
4
|
var $ = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var P = (c, o, i) => o in c ? U(c, o, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[o] = i,
|
|
5
|
+
var P = (c, o, i) => o in c ? U(c, o, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[o] = i, w = (c, o) => {
|
|
6
6
|
for (var i in o || (o = {}))
|
|
7
7
|
$.call(o, i) && P(c, i, o[i]);
|
|
8
8
|
if (A)
|
|
9
9
|
for (var i of A(o))
|
|
10
10
|
K.call(o, i) && P(c, i, o[i]);
|
|
11
11
|
return c;
|
|
12
|
-
},
|
|
12
|
+
}, E = (c, o) => Y(c, B(o));
|
|
13
13
|
import { ElInput as H, ElButton as J, ElTable as W, ElTableColumn as G } from "element-plus/es";
|
|
14
14
|
import "element-plus/es/components/base/style/css";
|
|
15
15
|
import "element-plus/es/components/table/style/css";
|
|
@@ -17,7 +17,7 @@ import "element-plus/es/components/table-column/style/css";
|
|
|
17
17
|
import "element-plus/es/components/button/style/css";
|
|
18
18
|
import "element-plus/es/components/input/style/css";
|
|
19
19
|
import { defineComponent as q, useCssVars as Q, ref as b, computed as _, onMounted as X, openBlock as V, createElementBlock as D, normalizeStyle as Z, createElementVNode as s, toDisplayString as v, createVNode as p, withKeys as ee, withCtx as j, createTextVNode as g, createCommentVNode as te } from "vue";
|
|
20
|
-
import {
|
|
20
|
+
import { l as le, d as oe, w as ne, _ as ae } from "./index-Cjkb-feQ.js";
|
|
21
21
|
import { A as se, D as ie } from "./ele-ctrSet-icon-BtKGrCid.js";
|
|
22
22
|
const ce = { class: "section-header" }, re = { class: "section-title" }, pe = { class: "row" }, ue = { class: "label" }, de = { class: "row" }, me = { class: "row" }, be = { class: "row row-meta" }, ve = { key: 0 }, fe = { class: "payload-preview" }, _e = {
|
|
23
23
|
DEFAULT_ICON: ie,
|
|
@@ -64,7 +64,7 @@ const ce = { class: "section-header" }, re = { class: "section-title" }, pe = {
|
|
|
64
64
|
{ key: "multiple", label: "component.openpitConfigPanel.multiple", type: "switch" },
|
|
65
65
|
{ key: "pattern", label: "component.openpitConfigPanel.optionValue", type: "string" },
|
|
66
66
|
{ key: "fvs", label: "component.openpitConfigPanel.options", type: "array" }
|
|
67
|
-
], he = [], je = { useAlias: !0, multiObject: !0, source: "" }, Se = { DEFAULT: _e, OPTIONS: ge, DATA: Ce, PARAMS: ye, SOURCE: he, COMMON: je }, ke = /* @__PURE__ */ q(w(
|
|
67
|
+
], he = [], je = { useAlias: !0, multiObject: !0, source: "" }, Se = { DEFAULT: _e, OPTIONS: ge, DATA: Ce, PARAMS: ye, SOURCE: he, COMMON: je }, ke = /* @__PURE__ */ q(E(w({}, Se), {
|
|
68
68
|
__name: "aliasObjectSelectorDemo",
|
|
69
69
|
props: {
|
|
70
70
|
conf: { type: Object, default: () => ({}) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty,k=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols,R=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,P=Reflect.get;var N=(l,o,a)=>o in l?M(l,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[o]=a,_=(l,o)=>{for(var a in o||(o={}))z.call(o,a)&&N(l,a,o[a]);if(x)for(var a of x(o))q.call(o,a)&&N(l,a,o[a]);return l},w=(l,o)=>k(l,L(o));var E=(l,o,a)=>P(R(l),a,o);var F=(l,o,a)=>new Promise((C,p)=>{var v=c=>{try{y(a.next(c))}catch(d){p(d)}},S=c=>{try{y(a.throw(c))}catch(d){p(d)}},y=c=>c.done?C(c.value):Promise.resolve(c.value).then(v,S);y((a=a.apply(l,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),B=require("./index-
|
|
1
|
+
"use strict";var M=Object.defineProperty,k=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols,R=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,P=Reflect.get;var N=(l,o,a)=>o in l?M(l,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[o]=a,_=(l,o)=>{for(var a in o||(o={}))z.call(o,a)&&N(l,a,o[a]);if(x)for(var a of x(o))q.call(o,a)&&N(l,a,o[a]);return l},w=(l,o)=>k(l,L(o));var E=(l,o,a)=>P(R(l),a,o);var F=(l,o,a)=>new Promise((C,p)=>{var v=c=>{try{y(a.next(c))}catch(d){p(d)}},S=c=>{try{y(a.throw(c))}catch(d){p(d)}},y=c=>c.done?C(c.value):Promise.resolve(c.value).then(v,S);y((a=a.apply(l,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),B=require("./index-DXv6ELXG.cjs");require("element-plus");const H=require("./EChartComponentBase-DjvZJF92.cjs"),I=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),V=require("./echarts-BB8O2KSA.cjs"),U=["id"],W={DEFAULT_ICON:I.DEFAULT_ICON,ACTIVE_ICON:I.ACTIVE_ICON,NAME_CN:"年累积降雨量",NAME_EN:"Annual Rainfall Chart",ORDER:2,PLATFORM:["pc","screen"]},G={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},yAxisName:{value:"毫米(mm)",type:"string",label:"Y轴标题"},barColor:{value:"#85C6F1",type:"color",label:"柱状图颜色"},lineColor:{value:"#F57676",type:"color",label:"趋势线颜色"},linkChannel:{value:"rainfall",type:"select",label:"component.linkChannel",options:[{label:"降雨监测",value:"rainfall"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},K=[{name:"日降雨量",fv:""}],Y=["name","fv"],$=["mosaic"],J={useAlias:!1,multiObject:!1,source:"mosaic"},Q=50,X={DEFAULT:W,OPTIONS:G,DATA:K,PARAMS:Y,SOURCE:$,ITEMS:Q,COMMON:J},Z=i.defineComponent(w(_({},X),{__name:"annualRainfallChart",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(l){const o=l,a=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],C=[45.2,52.1,68.5,92,115.4,188.2,215.5,192.1,145.6,88.4,55,42.8],p=i.ref(new Array(12).fill(0)),v=i.ref(""),S=i.computed(()=>{var f,t,e;return!!((t=(f=o.conf)==null?void 0:f.common)!=null&&t.object_id||(e=o.conf)!=null&&e.object_id)}),y=i.computed(()=>S.value||!!v.value),c=()=>{var t;const f=(t=o.conf)==null?void 0:t.data;return Array.isArray(f)&&f.length>0&&f[0].fv||""};class d extends H.EChartComponentBase{extractStyles(){var r,u,s,h,m,b,g;const t=(r=this.props.conf)==null?void 0:r.options,e=((u=t==null?void 0:t.linkChannel)==null?void 0:u.value)||"rainfall",n=((s=t==null?void 0:t.customChannel)==null?void 0:s.value)||"";return{bgColor:((h=t==null?void 0:t.bgColor)==null?void 0:h.value)||"#ffffff",yAxisName:((m=t==null?void 0:t.yAxisName)==null?void 0:m.value)||"毫米(mm)",barColor:((b=t==null?void 0:t.barColor)==null?void 0:b.value)||"#85C6F1",lineColor:((g=t==null?void 0:t.lineColor)==null?void 0:g.value)||"#F57676",linkChannel:e==="custom"&&n?n:e}}getChartOption(){if(!y.value&&this.props.mode==="preview")return{graphic:{type:"text",left:"center",top:"middle",style:{text:"请在筛选栏选择监测点后点击查询",fontSize:14,fill:"#999"}},xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[]};const t=this.props.mode==="edit"?C:p.value,e=t.map((n,r)=>r===0?t[0]:r===t.length-1?t[t.length-1]:parseFloat(((t[r-1]+n+t[r+1])/3).toFixed(1)));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(255, 255, 255, 0.9)",borderColor:"#1c3d90",textStyle:{color:"#333",fontSize:11}},grid:{top:35,bottom:25,left:60,right:15},xAxis:{type:"category",data:a,axisLabel:{fontSize:9,color:"#888",interval:0},axisLine:{lineStyle:{color:"rgba(0,0,0,0.1)"}}},yAxis:{type:"value",name:this.Style.value.yAxisName,nameTextStyle:{color:"#666",fontSize:10,align:"left",padding:[0,0,0,5]},axisLabel:{fontSize:9,color:"#888"},splitLine:{lineStyle:{color:"rgba(0,0,0,0.05)",type:"dashed"}}},series:[{name:"月度降雨",type:"bar",barWidth:"45%",itemStyle:{color:new V.LinearGradient(0,0,0,1,[{offset:0,color:this.Style.value.barColor},{offset:1,color:"#1c3d90"}]),borderRadius:[2,2,0,0]},data:t},{name:"趋势走向",type:"line",smooth:!0,showSymbol:!0,symbolSize:4,lineStyle:{width:2,color:this.Style.value.lineColor},itemStyle:{color:this.Style.value.lineColor},data:e}]}}initHistory(){return F(this,null,function*(){const t=this.props.conf;if(!t)return[];t.options||(t.options={});const e=t.options.points,n=Object.prototype.hasOwnProperty.call(t.options,"points");(!e||Number(e)<365)&&(t.options.points=365);try{return yield E(d.prototype,this,"initHistory").call(this)}finally{n?t.options.points=e:delete t.options.points}})}setHistoryData(t){var u;if(!t||!this.chartObj)return;const e=super.setHistoryData(t);if(!(e!=null&&e.length))return;const n=e[0];if(!((u=n==null?void 0:n.time)!=null&&u.length))return;const r=new Array(12).fill(0);n.time.forEach((s,h)=>{var O;const m=(O=n.data)==null?void 0:O[h];if(m==null||m===""||m==="-")return;const b=Number(m);if(!Number.isFinite(b))return;const g=new Date(String(s).replace(/\//g,"-"));isNaN(g.getTime())||(r[g.getMonth()]+=b)}),p.value=r.map(s=>parseFloat(s.toFixed(2))),this.chartObj.setOption(this.getChartOption(),!0)}setSocketData(t){if(!t)return;const e=c();if(!e)return;const n=this.extractDataValue(t,e);if(n==null||isNaN(Number(n)))return;const r=t.datetime||"";let u=new Date().getMonth();if(r){const h=new Date(r.replace(/\//g,"-"));isNaN(h.getTime())||(u=h.getMonth())}const s=[...p.value];s[u]=parseFloat((s[u]+Number(n)).toFixed(2)),p.value=s,this.chartObj&&this.chartObj.setOption(this.getChartOption(),!0)}onLinkEvent(t){const{payload:e}=t;if(!e)return;const n=e.objectId||e.object_id;n&&(v.value=String(n),p.value=new Array(12).fill(0),this.initChart(),this.props.mode==="preview"&&this.subscribeBySource(this.getSource(),String(n)))}}const A=new d(o,"annualRainfallChart");A.setupLifecycle();const j=A.getEchartId(),D=A.getStyle(),T=i.computed(()=>({backgroundColor:D.value.bgColor,width:"100%",height:"100%"}));return(f,t)=>(i.openBlock(),i.createElementBlock("div",{class:"annual-rainfall-chart-wrap",style:i.normalizeStyle(T.value)},[i.createElementVNode("div",{id:i.unref(j),class:"chart-container"},null,8,U),i.renderSlot(f.$slots,"default",{},void 0,!0)],4))}})),tt=B._export_sfc(Z,[["__scopeId","data-v-29c27eac"]]);exports.default=tt;
|
|
@@ -27,9 +27,9 @@ var F = (l, o, n) => new Promise((v, u) => {
|
|
|
27
27
|
m((n = n.apply(l, o)).next());
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as B, ref as j, computed as A, openBlock as U, createElementBlock as V, normalizeStyle as W, createElementVNode as G, unref as K, renderSlot as Y } from "vue";
|
|
30
|
-
import { _ as $ } from "./index-
|
|
30
|
+
import { _ as $ } from "./index-Cjkb-feQ.js";
|
|
31
31
|
import "element-plus";
|
|
32
|
-
import { E as q } from "./EChartComponentBase-
|
|
32
|
+
import { E as q } from "./EChartComponentBase-BnpZ7uCW.js";
|
|
33
33
|
import { A as J, D as Q } from "./ele-vlu-icon-Bg6EHZdJ.js";
|
|
34
34
|
import { cn as X } from "./echarts-Bp7QN4X6.js";
|
|
35
35
|
const Z = ["id"], tt = {
|
|
@@ -11,9 +11,9 @@ var b = (r, i, n) => i in r ? _(r, i, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return r;
|
|
12
12
|
}, f = (r, i) => E(r, D(i));
|
|
13
13
|
import { defineComponent as N, computed as R, openBlock as T, createElementBlock as $, normalizeStyle as A, unref as h, createElementVNode as S, toDisplayString as I, renderSlot as M } from "vue";
|
|
14
|
-
import {
|
|
14
|
+
import { n as j, o as B, _ as P } from "./index-Cjkb-feQ.js";
|
|
15
15
|
import "element-plus";
|
|
16
|
-
import { E as V } from "./EChartComponentBase-
|
|
16
|
+
import { E as V } from "./EChartComponentBase-BnpZ7uCW.js";
|
|
17
17
|
import { g as k } from "./titleStyle-BT5GlpAb.js";
|
|
18
18
|
import { A as q, D as w } from "./ele-aqi-icon-DsYfU5th.js";
|
|
19
19
|
import { u as F, i as U, a as H } from "./installCanvasRenderer-oDYkyVFy.js";
|
|
@@ -144,10 +144,10 @@ const Y = { class: "mix-body" }, tt = ["id"], et = {
|
|
|
144
144
|
}
|
|
145
145
|
const d = new n(i, "aqi");
|
|
146
146
|
d.setupLifecycle();
|
|
147
|
-
const
|
|
148
|
-
return (
|
|
147
|
+
const g = d.getStyle(), v = d.getEchartId(), O = R(() => k(i.conf.options));
|
|
148
|
+
return (x, t) => (T(), $("div", {
|
|
149
149
|
class: "mix-component",
|
|
150
|
-
style: A({ background: h(
|
|
150
|
+
style: A({ background: h(g).bgColor, borderRadius: `${h(g).radiusSize}px` })
|
|
151
151
|
}, [
|
|
152
152
|
S("div", {
|
|
153
153
|
class: "mix-title",
|
|
@@ -159,7 +159,7 @@ const Y = { class: "mix-body" }, tt = ["id"], et = {
|
|
|
159
159
|
id: h(v)
|
|
160
160
|
}, null, 8, tt)
|
|
161
161
|
]),
|
|
162
|
-
M(
|
|
162
|
+
M(x.$slots, "default", {}, void 0, !0)
|
|
163
163
|
], 4));
|
|
164
164
|
}
|
|
165
165
|
})), Et = /* @__PURE__ */ P(ut, [["__scopeId", "data-v-0b26cc40"]]);
|