mixdashboards 1.0.53 → 1.0.54

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.
Files changed (309) hide show
  1. package/dist/{BaseComponent-sx-foTs7.js → BaseComponent-B7wPQZV9.js} +4 -4
  2. package/dist/{BaseComponent-C4c2vBxN.cjs → BaseComponent-DhHavntG.cjs} +1 -1
  3. package/dist/{EChartComponentBase-Bo834W6o.js → EChartComponentBase-BRBRhzrb.js} +2 -2
  4. package/dist/{EChartComponentBase-mvy_IwEY.cjs → EChartComponentBase-y-56bxn_.cjs} +1 -1
  5. package/dist/{UniverSheet-CLvP58wN.cjs → UniverSheet-BxosZ7jw.cjs} +1 -1
  6. package/dist/{UniverSheet-CJTZCEBf.js → UniverSheet-D65ljgQC.js} +3 -3
  7. package/dist/{accelerationChart-CaimaiGG.cjs → accelerationChart-Cy2ku-xh.cjs} +1 -1
  8. package/dist/{accelerationChart-CNuNrDSH.js → accelerationChart-DhNEo2Cb.js} +3 -3
  9. package/dist/{actionItem-DBd4GEbg.cjs → actionItem-DrlOEHrK.cjs} +1 -1
  10. package/dist/{actionItem-CCsrMhWh.js → actionItem-f4WGQW-8.js} +4 -4
  11. package/dist/{alarmLevelChart-cPVsw18J.cjs → alarmLevelChart-CLcqyHUI.cjs} +1 -1
  12. package/dist/{alarmLevelChart-It6A_Ueo.js → alarmLevelChart-DrO7gVSo.js} +2 -2
  13. package/dist/{alertTable-C3qTJdLQ.cjs → alertTable-CNK2Naoz.cjs} +1 -1
  14. package/dist/{alertTable-eSHfpejF.js → alertTable-DNEXcxhL.js} +3 -3
  15. package/dist/{aliasObjectSelectorDemo-B5YnSVx9.js → aliasObjectSelectorDemo-B51XmIyB.js} +1 -1
  16. package/dist/{aliasObjectSelectorDemo-CDm1-rlJ.cjs → aliasObjectSelectorDemo-BZB4MslF.cjs} +1 -1
  17. package/dist/{annualRainfallChart-BD4QMF01.cjs → annualRainfallChart-B3RNkgJ9.cjs} +1 -1
  18. package/dist/{annualRainfallChart-zlr_ZxzB.js → annualRainfallChart-DbRAOwcf.js} +2 -2
  19. package/dist/{api-DtsfP8wU.cjs → api-CBPVZsPi.cjs} +1 -1
  20. package/dist/{api-yhwQZTC3.js → api-DjuMtD1L.js} +3 -3
  21. package/dist/{aqi-hFLI2faf.js → aqi-BrRpbRlj.js} +3 -3
  22. package/dist/{aqi-D55T5FH4.cjs → aqi-CgEPAELS.cjs} +1 -1
  23. package/dist/{aqiIndass-Ckqi-Hlk.js → aqiIndass-BltwHOLs.js} +3 -3
  24. package/dist/{aqiIndass-D0hnVdld.cjs → aqiIndass-lgjfOgCb.cjs} +1 -1
  25. package/dist/{areaDeformCurve-DHDM22v3.js → areaDeformCurve-D7iKrpda.js} +2 -2
  26. package/dist/{areaDeformCurve-CJZX7Emx.cjs → areaDeformCurve-bXMZX2Fo.cjs} +1 -1
  27. package/dist/{arrayCard-CP9Uf00N.cjs → arrayCard-CiE29Xrj.cjs} +1 -1
  28. package/dist/{arrayCard-BYCKHu6U.js → arrayCard-DhapLfN9.js} +3 -3
  29. package/dist/{audio-CAiS-FJu.js → audio-BjPrH9m_.js} +5 -5
  30. package/dist/{audio-c4lEmSLx.cjs → audio-DKOI3Vpt.cjs} +1 -1
  31. package/dist/{bar-BzJFzKmx.js → bar-BWI3aRwW.js} +4 -4
  32. package/dist/{bar-BxdVsaNk.cjs → bar-DfTh0w-P.cjs} +1 -1
  33. package/dist/{bmp-CteirgHl.js → bmp-8YdByhg7.js} +4 -4
  34. package/dist/{bmp-C3Iw6mSb.cjs → bmp-BbKNItcS.cjs} +1 -1
  35. package/dist/{box-VBTpH5fd.cjs → box-BzWiHnOc.cjs} +1 -1
  36. package/dist/{box-BEr-zBr4.js → box-DG0czgnl.js} +3 -3
  37. package/dist/{chartConfigPanel-D_yRR5Lt.cjs → chartConfigPanel-Cfk4-rIS.cjs} +1 -1
  38. package/dist/{chartConfigPanel-C7giYI-3.js → chartConfigPanel-PregA74H.js} +1 -1
  39. package/dist/{circleBar-Bhog76wr.js → circleBar-ClRf4GI6.js} +2 -2
  40. package/dist/{circleBar-CjaBcsEV.cjs → circleBar-DcrHyU0H.cjs} +1 -1
  41. package/dist/{clock-CKQy3GTB.js → clock-D835fLGJ.js} +3 -3
  42. package/dist/{clock-Bo5yI00Z.cjs → clock-DV0DfDAZ.cjs} +1 -1
  43. package/dist/{clt-DUM7bu0H.cjs → clt-DI58g2ZN.cjs} +1 -1
  44. package/dist/{clt-DXpHIMOa.js → clt-DdySu3b4.js} +4 -4
  45. package/dist/{cmc-t1JevTRh.cjs → cmc-BQu0tEoa.cjs} +1 -1
  46. package/dist/{cmc-DmE1kAFR.js → cmc-CbwdbGRJ.js} +4 -4
  47. package/dist/{cmp-BOODWsZb.cjs → cmp-DPP-5fOq.cjs} +1 -1
  48. package/dist/{cmp-D8OL29Xx.js → cmp-QC3czu9K.js} +3 -3
  49. package/dist/{composite-BXV1z_gN.js → composite-BHvgTKHC.js} +4 -4
  50. package/dist/{composite-NPUbjQj_.cjs → composite-Cg6FmHgp.cjs} +1 -1
  51. package/dist/{controlList-CA6f2609.js → controlList-CMSn-7hz.js} +4 -4
  52. package/dist/{controlList-DlS_Ru8W.cjs → controlList-DeTaQKoo.cjs} +1 -1
  53. package/dist/{controlRecordList-BZ4LMw8z.js → controlRecordList-BtSRAmu4.js} +4 -4
  54. package/dist/{controlRecordList-gs7URGIv.cjs → controlRecordList-zJ4cNf-b.cjs} +1 -1
  55. package/dist/{crd-DpLhSj4B.js → crd-B6N0hJ2f.js} +3 -3
  56. package/dist/{crd-DyFrEiGn.cjs → crd-CRk4bS7a.cjs} +1 -1
  57. package/dist/{ctrBtn-vmdxmqsa.cjs → ctrBtn-Ci9EaFXA.cjs} +1 -1
  58. package/dist/{ctrBtn-Cnr5lsz_.js → ctrBtn-Qc3ZLk8L.js} +5 -5
  59. package/dist/{ctrSet-C9i3FFmx.js → ctrSet-ByzfZF-u.js} +5 -5
  60. package/dist/{ctrSet-n5TntF0o.cjs → ctrSet-DxezI4JJ.cjs} +1 -1
  61. package/dist/{ctrSwitch-Cnxb_vMY.js → ctrSwitch-BZhvOc_I.js} +5 -5
  62. package/dist/{ctrSwitch-D5bvXuni.cjs → ctrSwitch-Dqkvg7Oh.cjs} +1 -1
  63. package/dist/{dataManagement-BIBd0Eh4.cjs → dataManagement-D8S8wtfv.cjs} +1 -1
  64. package/dist/{dataManagement-BKZz4wR5.js → dataManagement-DAEqL_BZ.js} +3 -3
  65. package/dist/{dataReport-Dk-6-imm.cjs → dataReport-BMZhpzKg.cjs} +1 -1
  66. package/dist/{dataReport-DUyxBMHa.js → dataReport-hBv1Z0ck.js} +3 -3
  67. package/dist/{dataTable-C_XP7nK9.js → dataTable-BwLf7_9n.js} +1 -1
  68. package/dist/{dataTable-C-XRDkfs.cjs → dataTable-D7SwJmAE.cjs} +1 -1
  69. package/dist/{datetime-B7gRNiJV.cjs → datetime-BnBMxe6x.cjs} +1 -1
  70. package/dist/{datetime-CuWrDpLV.js → datetime-C0p9zqWu.js} +3 -3
  71. package/dist/{deepClusterSlipSurface-DGRq5HUF.js → deepClusterSlipSurface-DYUDRWU0.js} +3 -3
  72. package/dist/{deepClusterSlipSurface-DMjCkFxr.cjs → deepClusterSlipSurface-DrUjQPhc.cjs} +1 -1
  73. package/dist/{deepDataMatrix-Dz-DOTig.cjs → deepDataMatrix-B6Zmj-Hd.cjs} +1 -1
  74. package/dist/{deepDataMatrix-BKsKRP3a.js → deepDataMatrix-CDROnfQH.js} +3 -3
  75. package/dist/{deepDisplacement3D-Di2atBD5.cjs → deepDisplacement3D-CzdQtCUt.cjs} +1 -1
  76. package/dist/{deepDisplacement3D-CB24L3M5.js → deepDisplacement3D-DKqY2jpY.js} +3 -3
  77. package/dist/{deepDisplacementChart-Jy220Wgk.cjs → deepDisplacementChart-BRR1eegh.cjs} +1 -1
  78. package/dist/{deepDisplacementChart-CIhGMC3y.js → deepDisplacementChart-BShxl2oy.js} +4 -4
  79. package/dist/{deepDisplacementChart-Cf36q6oe.cjs → deepDisplacementChart-BXgu1XBy.cjs} +1 -1
  80. package/dist/{deepDisplacementChart-BOW1mFzm.js → deepDisplacementChart-Cp6r_FfC.js} +3 -3
  81. package/dist/{deepDisplacementView-BlNykU1U.js → deepDisplacementView-Cq4XGCeD.js} +1 -1
  82. package/dist/{deepDisplacementView-DZJfQhvc.cjs → deepDisplacementView-RyZloUJw.cjs} +1 -1
  83. package/dist/{deepNodeTemperatureChart-D3MhCrNo.js → deepNodeTemperatureChart-CYk3n_7r.js} +3 -3
  84. package/dist/{deepNodeTemperatureChart-C9gmAnJn.cjs → deepNodeTemperatureChart-D1LLvDPB.cjs} +1 -1
  85. package/dist/{deepTangentAngleChart-B94qa1ez.cjs → deepTangentAngleChart-DXJYDZmg.cjs} +1 -1
  86. package/dist/{deepTangentAngleChart-0BiIcDax.js → deepTangentAngleChart-UwBzNIOl.js} +3 -3
  87. package/dist/{deepTemperatureField-BctrJ0CP.cjs → deepTemperatureField-BEOhk_FX.cjs} +1 -1
  88. package/dist/{deepTemperatureField-CG48arTy.js → deepTemperatureField-BUJLg81E.js} +4 -4
  89. package/dist/{deepTrendChart-CtQ_TbFy.cjs → deepTrendChart-BoztYASZ.cjs} +1 -1
  90. package/dist/{deepTrendChart-Y9XFbQ6F.js → deepTrendChart-Dz-XjjjF.js} +3 -3
  91. package/dist/{deviceOnlineStatus-7oyVH2r6.cjs → deviceOnlineStatus-64d9JX48.cjs} +1 -1
  92. package/dist/{deviceOnlineStatus-CzoCugA6.js → deviceOnlineStatus-I-uK2RT9.js} +2 -2
  93. package/dist/{deviceStatus-DFCTZ0uI.cjs → deviceStatus-D6Pf5auY.cjs} +1 -1
  94. package/dist/{deviceStatus-MYXLFe90.js → deviceStatus-DbyMa5ar.js} +3 -3
  95. package/dist/{displacementDataTable-DJtGVjoi.cjs → displacementDataTable-BYwaqp-t.cjs} +1 -1
  96. package/dist/{displacementDataTable-DyzG1jGP.js → displacementDataTable-CBNLqKXk.js} +3 -3
  97. package/dist/{displacementTrajectoryChart-B3V7kxli.cjs → displacementTrajectoryChart-wRHQ7FUG.cjs} +1 -1
  98. package/dist/{displacementTrajectoryChart-QR-5U75c.js → displacementTrajectoryChart-y6YgesPE.js} +3 -3
  99. package/dist/{displacementTrendChart-pL-fg9u1.js → displacementTrendChart-Cxlupymz.js} +3 -3
  100. package/dist/{displacementTrendChart-B4jDDNoR.cjs → displacementTrendChart-DMBmdzBq.cjs} +1 -1
  101. package/dist/{dxf-BYf4wSeX.cjs → dxf-Ci4Xmeyl.cjs} +1 -1
  102. package/dist/{dxf-DhB-jm4e.js → dxf-QFhXE1hM.js} +5 -5
  103. package/dist/{dzc-C2xh7es3.cjs → dzc-DC9Aj60I.cjs} +1 -1
  104. package/dist/{dzc-aIX822fw.js → dzc-Rt6ughT2.js} +3 -3
  105. package/dist/{element-resize-detector-CLXm1nKt.cjs → element-resize-detector-CNNVPUiP.cjs} +1 -1
  106. package/dist/{element-resize-detector-C78XitMC.js → element-resize-detector-_sDR6e5I.js} +1 -1
  107. package/dist/{evn-NWbHLONT.js → evn-B8dUhe1s.js} +3 -3
  108. package/dist/{evn-DGBWfHE7.cjs → evn-h2yOGUME.cjs} +1 -1
  109. package/dist/{evolutionChart-Nk1eJ6N2.js → evolutionChart-BYlgD0VY.js} +3 -3
  110. package/dist/{evolutionChart-cKMRk6Fm.cjs → evolutionChart-C_zAgxsG.cjs} +1 -1
  111. package/dist/{fileViewer-BYXCz0JQ.cjs → fileViewer-tG4TL8P-.cjs} +1 -1
  112. package/dist/{fileViewer-ET6QnU1h.js → fileViewer-u5HyHcxq.js} +5 -5
  113. package/dist/{filterBar-BHQR4uOR.cjs → filterBar-Ct7Xhi9k.cjs} +1 -1
  114. package/dist/{filterBar-CZs5tFOj.js → filterBar-TZNGE4vT.js} +3 -3
  115. package/dist/{fireCombustionCurve-C4EZcVVc.cjs → fireCombustionCurve-DUJIj365.cjs} +1 -1
  116. package/dist/{fireCombustionCurve-Oy6hp_Vx.js → fireCombustionCurve-RglKretq.js} +3 -3
  117. package/dist/{fireFilterBar-DStaIlli.js → fireFilterBar-BIJJvatC.js} +3 -3
  118. package/dist/{fireFilterBar-BiUIkQhX.cjs → fireFilterBar-DmTmaYpY.cjs} +1 -1
  119. package/dist/{fireHistoryTable-CF2BlDLz.cjs → fireHistoryTable-B8jid9kx.cjs} +1 -1
  120. package/dist/{fireHistoryTable-DzN8nJSq.js → fireHistoryTable-DMf8Go1w.js} +3 -3
  121. package/dist/{gag-BTGBioGp.cjs → gag-DvLPlu8y.cjs} +1 -1
  122. package/dist/{gag-BFPr3YI-.js → gag-rvfOcTJs.js} +2 -2
  123. package/dist/{gasStationList-BlhA3iKK.js → gasStationList-BOwrZPFG.js} +173 -174
  124. package/dist/gasStationList-DQ5E1VCC.cjs +1 -0
  125. package/dist/{geo3dViewer-YbnnY-DN.js → geo3dViewer-CUHjCV6O.js} +3 -3
  126. package/dist/{geo3dViewer-nnHUANeA.cjs → geo3dViewer-DDy5NyyJ.cjs} +1 -1
  127. package/dist/{glbModel-D5UDvYp3.js → glbModel-DmqybwQd.js} +3 -3
  128. package/dist/{glbModel-COJ5foFI.cjs → glbModel-tdIKJFIa.cjs} +1 -1
  129. package/dist/{globalObjectSelector-C2rYGK88.js → globalObjectSelector-Cvjp79SW.js} +1 -1
  130. package/dist/{globalObjectSelector-Cr_DG5Ai.cjs → globalObjectSelector-DzJ-z2yK.cjs} +1 -1
  131. package/dist/{gnssFilterBar-DbzcIvnT.cjs → gnssFilterBar-CyOIWzGv.cjs} +1 -1
  132. package/dist/{gnssFilterBar-CfAgpdgl.js → gnssFilterBar-Dc8BZ0uH.js} +3 -3
  133. package/dist/{gnssHistoryTable-HwkVsyda.cjs → gnssHistoryTable-BOo5hEe0.cjs} +1 -1
  134. package/dist/{gnssHistoryTable-Bko_GeOQ.js → gnssHistoryTable-_4m8ANzn.js} +3 -3
  135. package/dist/{gnssMapView-DncG46s9.js → gnssMapView-Clwd_69P.js} +5 -5
  136. package/dist/{gnssMapView-DxL1T85O.cjs → gnssMapView-D6bigBZM.cjs} +2 -2
  137. package/dist/{gnssSectionProfile-DVDTsBl9.cjs → gnssSectionProfile-C5oEg8lT.cjs} +1 -1
  138. package/dist/{gnssSectionProfile-C7IShVfJ.js → gnssSectionProfile-DBkwU6Hd.js} +3 -3
  139. package/dist/{gnssTimeSeriesChart-ClwTZ7Ua.js → gnssTimeSeriesChart-Dgap-iBw.js} +3 -3
  140. package/dist/{gnssTimeSeriesChart-C_PwyB2K.cjs → gnssTimeSeriesChart-PLXduZ05.cjs} +1 -1
  141. package/dist/{gnssXYTrajectory-CwtIic62.js → gnssXYTrajectory-BMb3Qw6x.js} +3 -3
  142. package/dist/{gnssXYTrajectory-D3ej-5uD.cjs → gnssXYTrajectory-CuGMDHz_.cjs} +1 -1
  143. package/dist/{grd-BrPPvPy0.js → grd-DieudgOZ.js} +4 -4
  144. package/dist/{grd-uW7x_skO.cjs → grd-ynF51-VX.cjs} +1 -1
  145. package/dist/{grdIndass-_7QAdgtA.js → grdIndass-BEYvmd5Y.js} +4 -4
  146. package/dist/{grdIndass-DDC1wQF5.cjs → grdIndass-Ca_Dt2kg.cjs} +1 -1
  147. package/dist/{grg-up0peSr3.js → grg-Bq8cqJys.js} +3 -3
  148. package/dist/{grg-CkSPv980.cjs → grg-FC_XN7_o.cjs} +1 -1
  149. package/dist/{gridview-CRZnYF6N.cjs → gridview-CF7zC8FY.cjs} +1 -1
  150. package/dist/{gridview-DuGT8Ems.js → gridview-D236TDFv.js} +3 -3
  151. package/dist/{groundwaterFilterBar-Cn2XQi7o.js → groundwaterFilterBar-DjOIl3l5.js} +3 -3
  152. package/dist/{groundwaterFilterBar-BQ_RglZZ.cjs → groundwaterFilterBar-tshjibQh.cjs} +1 -1
  153. package/dist/{groundwaterProfileChart-C0j8pDYK.cjs → groundwaterProfileChart-DAQO2UFZ.cjs} +2 -2
  154. package/dist/{groundwaterProfileChart-RyDXEWXR.js → groundwaterProfileChart-Dtr1z82i.js} +3 -3
  155. package/dist/{groundwaterTimeCurve-NetM2TfS.cjs → groundwaterTimeCurve-Bs2lmAnk.cjs} +1 -1
  156. package/dist/{groundwaterTimeCurve-C5D12QPa.js → groundwaterTimeCurve-DPFn4uUj.js} +3 -3
  157. package/dist/{groupCard-BkjOqWeu.js → groupCard-BFyXI1MK.js} +3 -3
  158. package/dist/{groupCard-CvcevxyL.cjs → groupCard-Dgmwk1JH.cjs} +1 -1
  159. package/dist/{headerBar-BToES_zb.cjs → headerBar-BNZVS4Av.cjs} +1 -1
  160. package/dist/{headerBar-CZ7LJhTk.js → headerBar-BcRvIdPe.js} +4 -4
  161. package/dist/{history-Cpyjm45z.cjs → history-DBT1UIpm.cjs} +1 -1
  162. package/dist/{history-0lIYAihF.js → history-DyxvwmkC.js} +3 -3
  163. package/dist/{index-STA_Vn2W.cjs → index-By4IGBQZ.cjs} +1 -1
  164. package/dist/{index-Dr1OQXVD.js → index-LaRCo47G.js} +1 -1
  165. package/dist/{insarDeformChart-CW2QBr_H.js → insarDeformChart-Co407aH5.js} +3 -3
  166. package/dist/{insarDeformChart-6D0hqG1m.cjs → insarDeformChart-is7IrzCn.cjs} +1 -1
  167. package/dist/{insarImageViewer-CIrgj5un.js → insarImageViewer-BI-oxCY1.js} +3 -3
  168. package/dist/{insarImageViewer-t7mi4gsy.cjs → insarImageViewer-D33-oShs.cjs} +1 -1
  169. package/dist/{kds-D1haJA3O.js → kds-9BnEtu_6.js} +3 -3
  170. package/dist/{kds-CnYO6xKY.cjs → kds-BIYebIeQ.cjs} +1 -1
  171. package/dist/{layerTabs--kbYhuwD.cjs → layerTabs-CBFEeWJj.cjs} +1 -1
  172. package/dist/{layerTabs-BfzbbYkw.js → layerTabs-DbBbbyeG.js} +2 -2
  173. package/dist/{leaflet-src-CtY1zq1u.cjs → leaflet-src-C_KgTvWC.cjs} +1 -1
  174. package/dist/{leaflet-src-BP9FXeU6.js → leaflet-src-rmSpLSAV.js} +1 -1
  175. package/dist/{lerc-hkNgux8Y.cjs → lerc-Dzbe7WC_.cjs} +1 -1
  176. package/dist/{lerc-RfEAwjFF.js → lerc-Gg09YZfb.js} +2 -2
  177. package/dist/{lin-5r4hECoc.cjs → lin-C-QRBeD9.cjs} +1 -1
  178. package/dist/{lin-7v-GAI4P.js → lin-YT8XYvrY.js} +3 -3
  179. package/dist/{linIndass-BSG-YvdK.cjs → linIndass-BskQesvM.cjs} +1 -1
  180. package/dist/{linIndass-C_ncvUhW.js → linIndass-DxzInyFa.js} +3 -3
  181. package/dist/{lst-KXrTVTrb.cjs → lst-BsTnL-72.cjs} +1 -1
  182. package/dist/{lst-Bv3KQ1WT.js → lst-CQD0Yeqh.js} +3 -3
  183. package/dist/{manualEntry-Dx3249di.cjs → manualEntry-CkrGHssb.cjs} +1 -1
  184. package/dist/{manualEntry-D52fdpnp.js → manualEntry-D0L5spRO.js} +3 -3
  185. package/dist/{mapBackground-M6rAArqj.js → mapBackground-OXkd9YEQ.js} +4 -4
  186. package/dist/{mapBackground-Bwa_EyRB.cjs → mapBackground-kmkn3W4u.cjs} +1 -1
  187. package/dist/{mappingList-BUZpHUeQ.cjs → mappingList-D_1Mrl_m.cjs} +1 -1
  188. package/dist/{mappingList-DijRyl2M.js → mappingList-DxnTa9kq.js} +4 -4
  189. package/dist/{markdownViewer-CzFNdg3q.js → markdownViewer-BIs5lB1e.js} +5 -5
  190. package/dist/{markdownViewer-OVon36v4.cjs → markdownViewer-Brb4uS57.cjs} +1 -1
  191. package/dist/{mix-control-modal-C80hu1GJ.cjs → mix-control-modal-B01a4IBM.cjs} +1 -1
  192. package/dist/{mix-control-modal-BDgaq37i.js → mix-control-modal-e5zJaCrM.js} +2 -2
  193. package/dist/{mixDataPermission-C65JW3Sj.cjs → mixDataPermission-Bay9dtby.cjs} +1 -1
  194. package/dist/{mixDataPermission-B_BTHTjI.js → mixDataPermission-Dpr7PqwV.js} +1 -1
  195. package/dist/{mixGrid-CDc37kzp.cjs → mixGrid-BUCDdjJo.cjs} +1 -1
  196. package/dist/{mixGrid-B9Mb-4qj.js → mixGrid-Yrttfpsn.js} +4 -4
  197. package/dist/{mixMap-CBFCqzT1.js → mixMap-BIc2ZmeH.js} +4 -4
  198. package/dist/{mixMap-jMIgtKD9.cjs → mixMap-Ch1pSTls.cjs} +1 -1
  199. package/dist/{mixModel-Dh4RqH9S.cjs → mixModel-BEyIHO7k.cjs} +1 -1
  200. package/dist/{mixModel-Ba1XielF.js → mixModel-BzHT-MG0.js} +4 -4
  201. package/dist/{mixPie-DZNrNxtz.js → mixPie-BFjoC4AJ.js} +4 -4
  202. package/dist/{mixPie-BcuR1Fs9.cjs → mixPie-CoB-QJ-k.cjs} +1 -1
  203. package/dist/mixdashboards.cjs +1 -1
  204. package/dist/mixdashboards.css +1 -1
  205. package/dist/mixdashboards.js +1 -1
  206. package/dist/{mjpegCamera-DfiX7dhl.js → mjpegCamera-BozO0soJ.js} +3 -3
  207. package/dist/{mjpegCamera-DfeyJASS.cjs → mjpegCamera-DNW4lMQI.cjs} +1 -1
  208. package/dist/{monitorAlert-C3rgldAK.cjs → monitorAlert-CQN4Y7uL.cjs} +1 -1
  209. package/dist/{monitorAlert-DOIgs2rk.js → monitorAlert-CTK7bxNy.js} +3 -3
  210. package/dist/{monitorData-C3WCnapr.cjs → monitorData-CsoyBBI1.cjs} +1 -1
  211. package/dist/{monitorData-CDFEkuoR.js → monitorData-DyqeqCK_.js} +3 -3
  212. package/dist/{monitorSpeedChart-BQ2FYlj6.js → monitorSpeedChart-BGwCtr-d.js} +1 -1
  213. package/dist/{monitorSpeedChart-B-6gluLn.cjs → monitorSpeedChart-CKX3-EI2.cjs} +1 -1
  214. package/dist/{mxa-D-aOr4NS.cjs → mxa-OPM0Gmvj.cjs} +1 -1
  215. package/dist/{mxa-D-pCi_Kn.js → mxa-gjB07_xd.js} +3 -3
  216. package/dist/{myValue-C9CbzKs6.cjs → myValue-6y6UOv3o.cjs} +1 -1
  217. package/dist/{myValue-DQF4fnjE.js → myValue-BR4hwge5.js} +3 -3
  218. package/dist/{myValueList-B-Q_Tjr_.js → myValueList-ZJFMGHnU.js} +3 -3
  219. package/dist/{myValueList-B0v-eGNt.cjs → myValueList-pO-NMYxT.cjs} +1 -1
  220. package/dist/{objectList-Bxmwae6L.js → objectList-BIZfQ5n0.js} +5 -5
  221. package/dist/{objectList-CBHV_Ioy.cjs → objectList-Cr4NVsXT.cjs} +1 -1
  222. package/dist/{photo-BFNJaMhm.cjs → photo-dlVvii94.cjs} +1 -1
  223. package/dist/{photo-FlpdBrwl.js → photo-v454a5q6.js} +5 -5
  224. package/dist/{pie-CglOB58M.js → pie-BQmhXiLZ.js} +2 -2
  225. package/dist/{pie-t5BjrLzv.cjs → pie-DzkeJdcg.cjs} +1 -1
  226. package/dist/{pressBtn-DjzLJzec.cjs → pressBtn-CDLXJoxL.cjs} +1 -1
  227. package/dist/{pressBtn-DfWwNB75.js → pressBtn-CLIwOrWo.js} +5 -5
  228. package/dist/{progressBar-BLzaguFj.cjs → progressBar-CGJD2MUi.cjs} +1 -1
  229. package/dist/{progressBar-8UqN8FHl.js → progressBar-CftcbaeT.js} +3 -3
  230. package/dist/{progressCircle-DrEHcTuU.cjs → progressCircle-D5rtSjb3.cjs} +1 -1
  231. package/dist/{progressCircle-hYiLMdYw.js → progressCircle-q-enNZL-.js} +3 -3
  232. package/dist/{qrcode-B5t_Pwb_.cjs → qrcode-D9TmiuZT.cjs} +1 -1
  233. package/dist/{qrcode-Dxy4MBxp.js → qrcode-DWhrbiy0.js} +3 -3
  234. package/dist/{raceBar-B-3zgIKd.js → raceBar-CxdCluQ4.js} +3 -3
  235. package/dist/{raceBar-D98qJDh2.cjs → raceBar-D4yQrlx8.cjs} +1 -1
  236. package/dist/{rad-CSEarCoJ.cjs → rad-D0LeWDKc.cjs} +1 -1
  237. package/dist/{rad-BY2iZdDj.js → rad-DZjCbXyD.js} +2 -2
  238. package/dist/{radarMapViewer-Dpf5LpCO.cjs → radarMapViewer-BhIqtRPM.cjs} +1 -1
  239. package/dist/{radarMapViewer-_zCyFvTT.js → radarMapViewer-CIc4Dbkg.js} +3 -3
  240. package/dist/{rainfallFilterBar-CiSAduK0.cjs → rainfallFilterBar-BNUBetcH.cjs} +1 -1
  241. package/dist/{rainfallFilterBar-Du_meXQe.js → rainfallFilterBar-CwmDDzGf.js} +3 -3
  242. package/dist/{rainfallTimeCurve-DEpJz7e_.cjs → rainfallTimeCurve-Cihvd7sp.cjs} +1 -1
  243. package/dist/{rainfallTimeCurve-DNA3UIH5.js → rainfallTimeCurve-DDy1EB2i.js} +3 -3
  244. package/dist/{rangeLin-BPLy5ffq.cjs → rangeLin-BDxvr-SX.cjs} +1 -1
  245. package/dist/{rangeLin-BLuyNkT3.js → rangeLin-BS4QGj8O.js} +3 -3
  246. package/dist/{realtimeEvolutionMap-BhYGt0AB.cjs → realtimeEvolutionMap-Dz1h1S5Q.cjs} +1 -1
  247. package/dist/{realtimeEvolutionMap-DkIP2JLh.js → realtimeEvolutionMap-JwfQ-kge.js} +2 -2
  248. package/dist/{request-BojXQ0kx.js → request-BxJasPXG.js} +1 -1
  249. package/dist/{request-I1_6YygU.cjs → request-CHmKi4NB.cjs} +1 -1
  250. package/dist/{retainer1-pR4bTVEQ.js → retainer1-BG8FVFrt.js} +4 -4
  251. package/dist/{retainer1-D2PpZBlH.cjs → retainer1-EXZIwIPk.cjs} +1 -1
  252. package/dist/{retainer2-CJN11uAu.js → retainer2-BF4vADrH.js} +4 -4
  253. package/dist/{retainer2-VXK0KDUK.cjs → retainer2-DG-i1LDs.cjs} +1 -1
  254. package/dist/{riskRegionTable-C9bNgmLX.cjs → riskRegionTable-B25jGMKZ.cjs} +1 -1
  255. package/dist/{riskRegionTable-BRPj6gCe.js → riskRegionTable-Dcm0HpRG.js} +3 -3
  256. package/dist/{sankey-B-V_CrM3.js → sankey-BlnopdFa.js} +3 -3
  257. package/dist/{sankey-CHVOfSz4.cjs → sankey-C1pOm2Ah.cjs} +1 -1
  258. package/dist/{scd-BBQlpob9.js → scd-BUA5F3Bv.js} +3 -3
  259. package/dist/{scd-DvHMQE87.cjs → scd-F1TXRQKC.cjs} +1 -1
  260. package/dist/{sideMenu-wco2GFOx.cjs → sideMenu-Bn2o3s_t.cjs} +1 -1
  261. package/dist/{sideMenu-BBqkljW6.js → sideMenu-DHcDS6gf.js} +3 -3
  262. package/dist/{slopeStability-LeITdUHy.cjs → slopeStability-C88KKQJU.cjs} +1 -1
  263. package/dist/{slopeStability-DEOpYaDi.js → slopeStability-CuS2ffaj.js} +3 -3
  264. package/dist/{speedCurve-Do8JbTiF.js → speedCurve-CIB2vuMP.js} +3 -3
  265. package/dist/{speedCurve-DQSzEcrn.cjs → speedCurve-C_Dpx675.cjs} +1 -1
  266. package/dist/{staticLine-DBk259Yq.cjs → staticLine-C6YjX3jk.cjs} +1 -1
  267. package/dist/{staticLine-CtTWAoQ9.js → staticLine-RRTzer-Y.js} +4 -4
  268. package/dist/{store-TKGaihWA.cjs → store-CU2wm4LQ.cjs} +1 -1
  269. package/dist/{store-B2tvvJAl.js → store-NrnyUk6l.js} +2 -2
  270. package/dist/{stressFilterBar-DiZf_utx.js → stressFilterBar-CZRKms7n.js} +3 -3
  271. package/dist/{stressFilterBar-D1tshThu.cjs → stressFilterBar-Dub7i2Tc.cjs} +1 -1
  272. package/dist/{stressTimeCurve-Cz1x7RwQ.cjs → stressTimeCurve-C3HojV8F.cjs} +1 -1
  273. package/dist/{stressTimeCurve-zre1q5tF.js → stressTimeCurve-DzgRPrOo.js} +3 -3
  274. package/dist/{swiper-BF7wTC6y.cjs → swiper-BYGkPgOK.cjs} +1 -1
  275. package/dist/{swiper-BAvc94X6.js → swiper-DG9DAiV0.js} +3 -3
  276. package/dist/{terminalConfigList-60zLwhdL.js → terminalConfigList-B7ANY23S.js} +4 -4
  277. package/dist/{terminalConfigList-DYOqTMrG.cjs → terminalConfigList-gald-p0m.cjs} +1 -1
  278. package/dist/{terminalList-CsdZTf7u.js → terminalList-BmmN4m3j.js} +4 -4
  279. package/dist/{terminalList-BTsgXz5v.cjs → terminalList-CJzRUDOI.cjs} +1 -1
  280. package/dist/{textbox-BXpzkxuH.js → textbox-57Y2eVv7.js} +4 -4
  281. package/dist/{textbox-DMrXOOm1.cjs → textbox-DJVF-4nb.cjs} +1 -1
  282. package/dist/{timeQueryBar-D2ou_15C.js → timeQueryBar-C5m4OPkT.js} +1 -1
  283. package/dist/{timeQueryBar-DZm4u5xz.cjs → timeQueryBar-D77M1K3i.cjs} +1 -1
  284. package/dist/{timeSeries-DFFJ_71M.js → timeSeries-DX9d7ZlF.js} +4 -4
  285. package/dist/{timeSeries-whs5kjGw.cjs → timeSeries-pcLk8-AB.cjs} +1 -1
  286. package/dist/{timeSeriesCurve-TyrGZT9i.cjs → timeSeriesCurve-Cn8cWqoP.cjs} +1 -1
  287. package/dist/{timeSeriesCurve-mvJv9fC0.js → timeSeriesCurve-QuOE717g.js} +3 -3
  288. package/dist/{toggleBtn-CuL8eukI.js → toggleBtn-CqFMVrRN.js} +2 -2
  289. package/dist/{toggleBtn-CmTYZlnM.cjs → toggleBtn-DyJTsVGj.cjs} +1 -1
  290. package/dist/{trajectoryConfigPanel-CEJvnWPN.js → trajectoryConfigPanel-B24dt6MN.js} +1 -1
  291. package/dist/{trajectoryConfigPanel-BOm-T80R.cjs → trajectoryConfigPanel-BrEHGlbX.cjs} +1 -1
  292. package/dist/{trajectoryScatter-BSMrIkuC.js → trajectoryScatter-B2k9Ad3L.js} +3 -3
  293. package/dist/{trajectoryScatter-PIh5ZGMC.cjs → trajectoryScatter-i2rlD5zL.cjs} +1 -1
  294. package/dist/{universalConfigPanel-4CR5i9HT.cjs → universalConfigPanel-BBbc-1-u.cjs} +1 -1
  295. package/dist/{universalConfigPanel-CPbRf15k.js → universalConfigPanel-BEfEjBHo.js} +1 -1
  296. package/dist/{universalTable-BmXdSfPp.cjs → universalTable-DnMO2tM_.cjs} +1 -1
  297. package/dist/{universalTable-BL5sRBf2.js → universalTable-xp1kTbFS.js} +2 -2
  298. package/dist/{video-qTTEO_hX.cjs → video-DL9HSrZC.cjs} +1 -1
  299. package/dist/{video-B3tJGApm.js → video-DiZcuRjw.js} +5 -5
  300. package/dist/{videoMonitor-DM3AI7M0.cjs → videoMonitor-C0eTtw1Z.cjs} +1 -1
  301. package/dist/{videoMonitor-D2Se6Hpt.js → videoMonitor-w3AKRAZg.js} +3 -3
  302. package/dist/{vlu-_dK3q7O6.js → vlu-BfKbcCHL.js} +3 -3
  303. package/dist/{vlu-BCwzJHV1.cjs → vlu-Cv-J90_y.cjs} +1 -1
  304. package/dist/{weather-BSD8Unr-.cjs → weather-Bo2Y00xW.cjs} +1 -1
  305. package/dist/{weather-BMCdVCxZ.js → weather-eLT-iPND.js} +3 -3
  306. package/dist/{windLin-DsuVeiA7.cjs → windLin-Bu2q3tL9.cjs} +1 -1
  307. package/dist/{windLin-DudsGAxB.js → windLin-jWF-o2rk.js} +3 -3
  308. package/package.json +1 -2
  309. package/dist/gasStationList-B59SYw24.cjs +0 -1
@@ -16,7 +16,7 @@ var T = (i, t, e) => new Promise((s, a) => {
16
16
  });
17
17
  import { ref as M, inject as H, watch as A, onMounted as W, onBeforeUnmount as C } from "vue";
18
18
  import { A as E, a as L } from "./common-C2M2nTMe.js";
19
- import { d as y, u as $ } from "./index-Dr1OQXVD.js";
19
+ import { d as y, u as $ } from "./index-LaRCo47G.js";
20
20
  const Z = (i, t, e = !1) => {
21
21
  const s = [];
22
22
  if (t === "edit" || t === "preview" && !e) {
@@ -212,13 +212,13 @@ const Z = (i, t, e = !1) => {
212
212
  return { times: s, data: a };
213
213
  }, K = (i, t, e, s, a) => T(null, null, function* () {
214
214
  try {
215
- const r = yield new (yield import("./history-0lIYAihF.js")).default().getHistoryData(i, a);
215
+ const r = yield new (yield import("./history-DyxvwmkC.js")).default().getHistoryData(i, a);
216
216
  e(r);
217
217
  } catch (n) {
218
218
  console.error("获取历史数据时出错:", n);
219
219
  } finally {
220
220
  if (t) {
221
- const { formatRequest: n } = yield import("./request-BojXQ0kx.js"), r = n(i.conf, i.uid, a);
221
+ const { formatRequest: n } = yield import("./request-BxJasPXG.js"), r = n(i.conf, i.uid, a);
222
222
  t.registerComponent({
223
223
  id: i.conf.id,
224
224
  request: r,
@@ -602,7 +602,7 @@ class nt {
602
602
  if (this.init(), this.props.mode === "preview") {
603
603
  if (this.needsHistoryData())
604
604
  try {
605
- const a = yield new (yield import("./history-0lIYAihF.js")).default().getHistoryData(this.props, this.componentType);
605
+ const a = yield new (yield import("./history-DyxvwmkC.js")).default().getHistoryData(this.props, this.componentType);
606
606
  this.setHistoryData(a);
607
607
  } catch (s) {
608
608
  console.error(`[${this.componentType}] 获取历史数据失败:`, s);
@@ -1 +1 @@
1
- "use strict";var T=(i,t,e)=>new Promise((s,r)=>{var n=c=>{try{o(e.next(c))}catch(l){r(l)}},a=c=>{try{o(e.throw(c))}catch(l){r(l)}},o=c=>c.done?s(c.value):Promise.resolve(c.value).then(n,a);o((e=e.apply(i,t)).next())});const b=require("vue"),M=require("./common-CRX05V1u.cjs"),y=require("./index-STA_Vn2W.cjs"),L=(i,t,e=!1)=>{const s=[];if(t==="edit"||t==="preview"&&!e){const r=new Date;s.push(y.dayjs(r).format("YYYY-MM-DD HH")+":00:00");for(let n=0;n<i-1;n++){const a=r.getHours();r.setHours(a-1),s.unshift(y.dayjs(r).format("YYYY-MM-DD HH")+":00:00")}}return s},$=i=>{const{num:t,max:e,min:s,mode:r,hasDataSource:n=!1}=i,a=[];if(r==="edit"||r==="preview"&&!n){const o=t!=null?t:10,c=e!=null?e:200,l=s!=null?s:10;for(let u=0;u<o;u++)a.push(Math.floor(Math.random()*(c-l+1)+l))}return a},q=i=>{let t=[];switch(i){case"last-hour":case"hour":for(let e=0;e<60;e++){const s=e>9?`${e}:00`:`0${e}:00`;t.push(s)}break;case"last-day":case"day":for(let e=0;e<24;e++){const s=e>9?`${e}:00`:`0${e}:00`;t.push(s)}break;case"week":case"last-week":t=["周日","周一","周二","周三","周四","周五","周六"];break;case"last-month":case"month":for(let e=1;e<32;e++){const s=e>9?`${e}日`:`0${e}日`;t.push(s)}break;case"last-year":case"year":for(let e=1;e<13;e++){const s=e>9?`${e}月`:`0${e}月`;t.push(s)}break}return t},x=i=>["周日","周一","周二","周三","周四","周五","周六"][i],O=(i,t)=>{switch(t){case"hour":return y.dayjs(i).format("mm:00");case"day":return y.dayjs(i).format("HH:00");case"week":return x(y.dayjs(i).day());case"month":return y.dayjs(i).format("DD日");case"year":return y.dayjs(i).format("MM月");default:return""}},H=(i,t)=>{let e=null;return function(...s){const r=this;e!==null&&clearTimeout(e),e=setTimeout(()=>{i.apply(r,s)},t)}},S=(i,t,e)=>{const s=JSON.parse(sessionStorage.getItem(M.ALIAS_MAPPING_KEY)||"{}")||{};return t?i.object_alias&&s[i.object_alias]||e:i.object_id||e},N=i=>{if(!i)return!1;const{data:t=[],common:e={}}=i;return e.source==="calculate"?Array.isArray(t)&&t.length>0?t.some(s=>s.uid&&s.uid!==""):!1:e.object_id&&e.object_id!==""||e.object_alias&&e.object_alias!==""?!0:Array.isArray(t)&&t.length>0?t.some(s=>s.object_id&&s.object_id!==""):!1},U=i=>Number.isNaN(i)||!Number.isFinite(i),B=i=>i==null||i==="",v={null:B,abnormal:U},P=i=>i.res,Y=i=>{const{res:t,category:e,type:s,conf:r,uid:n}=i,{data:a,common:o}=r,c=o.source||"mosaic";if(e==="history"){const l=[],u=t.history[0].length;for(let h=0;h<u;h++){let f=!0;for(let d=0;d<t.history.length;d++){const g=a[d].fv;if(v[s](t.history[d][h][g])){f=!1;break}}f&&l.push(h)}const p=[];for(let h=0;h<t.history.length;h++){const f=l.map(d=>t.history[h][d]);f.length>0&&p.push(f)}t.history=p}else{let l=!1;if(a.forEach(u=>{var f,d,g,k,w,_,j,D,R,A,m,I;const p=S(u,o.useAlias,n);let h;["statistics","calculate"].includes(c)?h=(k=(g=(d=(f=t[p])==null?void 0:f[c])==null?void 0:d.data)==null?void 0:g[u.fv])==null?void 0:k.data:["statisticsRealtime","calculateRealtime"].includes(c)?h=(R=(D=(j=(_=(w=t[p])==null?void 0:w[c])==null?void 0:_.data)==null?void 0:j[u.fv])==null?void 0:D.data)==null?void 0:R.data:h=(I=(m=(A=t[p])==null?void 0:A[c])==null?void 0:m.data)==null?void 0:I[u.fv],l=v[s](h)}),l)return null}return t},V=i=>{const{res:t,category:e,type:s,conf:r,uid:n}=i,{data:a,common:o}=r,c=o.source||"mosaic";if(e==="history"){const l=t.history[0].length;for(let u=0;u<l;u++)for(let p=0;p<t.history.length;p++){const h=a[p].fv;v[s](t.history[p][u][h])&&(t.history[p][u][h]=o.null.value)}}else a.forEach(l=>{var p,h,f,d,g,k,w,_,j,D,R,A;const u=S(l,o.useAlias,n);if(["statistics","calculate"].includes(c)){const m=(d=(f=(h=(p=t[u])==null?void 0:p[c])==null?void 0:h.data)==null?void 0:f[l.fv])==null?void 0:d.data;v[s](m)&&(t[u][c].data[l.fv].data=o.null.value)}else if(["statisticsRealtime","calculateRealtime"].includes(c)){const m=(j=(_=(w=(k=(g=t[u])==null?void 0:g[c])==null?void 0:k.data)==null?void 0:w[l.fv])==null?void 0:_.data)==null?void 0:j.data;v[s](m)&&(t[u][c].data[l.fv].data.data=o.null.value)}else{const m=(A=(R=(D=t[u])==null?void 0:D[c])==null?void 0:R.data)==null?void 0:A[l.fv];v[s](m)&&(t[u][c].data[l.fv]=o.null.value)}});return t},X=i=>i.res,F={0:P,1:Y,2:V,3:X},C=(i,t,e)=>{var o;const{conf:s,uid:r}=t,n=(o=s.common)==null?void 0:o.null;if(!(n!=null&&n.type))return i;const a={res:i,category:e,type:"null",conf:s,uid:r};return F[n.type](a)},K=(i,t)=>(i.history=t.map(()=>[]),i.all_data_group.forEach((e,s)=>{if(Array.isArray(e)&&e.length)e.forEach(r=>{i.history[s].push({time:r.start_time,[r.script_uid]:r.data})});else for(const r in e)i.history[s].push({time:r,[t[s].fv]:e[r]})}),i),z=(i,t)=>{const e=new Map;for(let a=0;a<i.length;a++)e.set(i[a],a);const s=[],r=t.map(()=>[]),n=new Set;for(let a=0;a<i.length;a++){const o=i[a];if(!n.has(o)){n.add(o);const c=e.get(o);s.push(o);for(let l=0;l<t.length;l++)r[l].push(t[l][c])}}return{times:s,data:r}},W=(i,t,e,s,r)=>T(null,null,function*(){try{const a=yield new(yield Promise.resolve().then(()=>require("./history-Cpyjm45z.cjs"))).default().getHistoryData(i,r);e(a)}catch(n){console.error("获取历史数据时出错:",n)}finally{if(t){const{formatRequest:n}=yield Promise.resolve().then(()=>require("./request-I1_6YygU.cjs")),a=n(i.conf,i.uid,r);t.registerComponent({id:i.conf.id,request:a,onUpdate:(o,c)=>{o==="realtime"&&s(c)}})}}}),E=(i,t)=>{t&&t.unregisterComponent(i.conf.id)};class G{constructor(t,e){this.linkWatchStop=null,this.props=t,this.componentType=e,this.session=b.ref(b.inject("session",null)),this.Style=b.ref({}),this.linkStore=y.useLinkStore()}extractStyles(){return{}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}setHistoryData(t){}onPreview(){var r;const{common:t,data:e}=this.props.conf,s=this.getSource();if(t.multiObject&&Array.isArray(e)){const n=new Set;e.forEach(a=>{const o=this.resolveObjectId(a);!o||n.has(o)||(n.add(o),this.subscribeBySource(s,o,a.uid))}),console.log(`[${this.componentType}] 多对象模式:已订阅 ${n.size} 个对象`)}else{const n=this.resolveObjectId(),a=(r=e==null?void 0:e[0])==null?void 0:r.uid;this.subscribeBySource(s,n,a)}}setSocketData(t){if(!t)return;const{data:e}=this.props.conf;!e||!Array.isArray(e)||e.forEach(s=>{try{const r=this.extractDataValue(t,s.fv);s.value=r!=null?r:"--"}catch(r){s.value="--"}})}onLinkEvent(t){}getLinkChannel(){var t;return((t=this.Style.value)==null?void 0:t.linkChannel)||""}publish(t){const e=this.getLinkChannel();if(!e){console.warn(`[${this.componentType}] 未配置联动频道,无法发布事件`);return}this.linkStore.publish(e,this.componentType,t)}shouldHandleEvent(t){return!(!t||this.props.mode==="edit"||t.topic.source===this.componentType)}setupLinkWatch(){this.linkWatchStop&&this.linkWatchStop(),this.linkWatchStop=b.watch(()=>{const t=this.getLinkChannel();return t?this.linkStore.channels[t]:null},t=>{this.shouldHandleEvent(t)&&this.onLinkEvent(t)},{deep:!0,immediate:!0})}stopLinkWatch(){this.linkWatchStop&&(this.linkWatchStop(),this.linkWatchStop=null)}isLocalIotSubscribeMode(){return localStorage.getItem("dashboardUseLocalToken")==="1"||localStorage.getItem("dashboardUseLocalToken")==="true"}subscribe(t,e,s,r){if(!this.session.value){console.warn(`[${this.componentType}] Session 未初始化,无法订阅`);return}const n={event:t,block:e,object_id:s};r&&Object.assign(n,r);const a=this.isLocalIotSubscribeMode()?{action:"sub_event",block_mapping:"mmq",event:n}:{action:"sub_agent_event",event:n},o=this.props.conf.id;this.session.value.componentRequests&&(this.session.value.componentRequests.has(o)||this.session.value.componentRequests.set(o,[]),this.session.value.componentRequests.get(o).push(a)),this.session.value.send({type:"send_message",message:a})}subscribeFv(t){this.subscribe("recv_fv","mosaic",t)}subscribeRetainerOpen(t){this.subscribe("retainer_open","retainer",t)}subscribeRetainerClose(t){this.subscribe("retainer_close","retainer",t)}subscribeRetainerEvent(t){this.subscribe("retainer_event","retainer",t)}subscribeRetainer(t){this.subscribeRetainerOpen(t),this.subscribeRetainerClose(t),this.subscribeRetainerEvent(t)}subscribeStatisticsRealtimeResult(t){this.subscribe("statistics_realtime_result","statistics",t)}subscribeStatistics(t){var s,r;const e=(r=(s=this.props.conf.data)==null?void 0:s[0])==null?void 0:r.uid;this.subscribeStatisticsWithUid(t,e)}subscribeStatisticsWithUid(t,e){this.subscribe("statistics_result","statistics",t,{uid:e,type:"statistics"})}subscribeCalculate(t){var s,r;const e=(r=(s=this.props.conf.data)==null?void 0:s[0])==null?void 0:r.uid;this.subscribeCalculateWithUid(e)}subscribeCalculateWithUid(t){this.subscribe("statistics_result","statistics","",{uid:t,type:"calculate"})}subscribeBySource(t,e,s){switch(t){case"mosaic":this.subscribeFv(e);break;case"statisticsRealtime":this.subscribeStatisticsRealtimeResult(e);break;case"statistics":s?this.subscribeStatisticsWithUid(e,s):this.subscribeStatistics(e);break;case"calculate":s?this.subscribeCalculateWithUid(s):this.subscribeCalculate(e);break;default:console.warn(`[${this.componentType}] 未知的数据源类型: ${t}`)}}extractDataValue(t,e){var s;return!t||!t.event?null:t.event==="recv_fv"&&t.block==="mosaic"?!e||!t.data?null:t.data[e]:t.event==="statistics_realtime_result"&&t.block==="statistics"?(s=t.data)==null?void 0:s.data:t.event==="statistics_result"&&t.block==="statistics"?t.data:null}getOptionValue(t,e){var r,n;const s=(n=(r=this.props.conf)==null?void 0:r.options)==null?void 0:n[t];return s==null?e:typeof s=="object"&&"value"in s?s.value:s}applyTheme(){M.applyThemeStyles(this.props.theme,this.Style.value)}getSource(){var t,e;return((e=(t=this.props.conf)==null?void 0:t.common)==null?void 0:e.source)||"mosaic"}isStatistics(){return["statistics","calculate","statisticsRealtime","calculateRealtime"].includes(this.getSource())}resolveObjectId(t){var a,o,c;const{common:e,data:s}=this.props.conf;if(e.multiObject&&t)return S(t,e.useAlias,this.props.uid);if(typeof e.object_id=="string"&&e.object_id.trim()!==""||typeof e.object_alias=="string"&&e.object_alias.trim()!==""||typeof((a=s==null?void 0:s[0])==null?void 0:a.object_id)=="string"&&s[0].object_id.trim()!==""||typeof((o=s==null?void 0:s[0])==null?void 0:o.object_alias)=="string"&&s[0].object_alias.trim()!==""){const l=e.object_id||e.object_alias?e:s[0]||{};return S(l,e.useAlias,this.props.uid)}if(((c=this.props)==null?void 0:c.uid)!=null&&String(this.props.uid).trim()!=="")return String(this.props.uid).trim();const n=e.object_id?e:s[0]||{};return S(n,e.useAlias,this.props.uid)}handleNull(t,e){return C(t,this.props,e)}getPreviewHelper(){return{preview:()=>W(this.props,this.session.value,t=>this.setHistoryData(t),t=>this.setSocketData(t),this.componentType),unregister:()=>E(this.props,this.session.value)}}getDebouncedInit(){return H(()=>this.init(),200)}cleanup(){}needsHistoryData(){return!0}setupLifecycle(){const t=this.getDebouncedInit(),e=this.getPreviewHelper();b.onMounted(()=>T(this,null,function*(){if(this.init(),this.props.mode==="preview"){if(this.needsHistoryData())try{const r=yield new(yield Promise.resolve().then(()=>require("./history-Cpyjm45z.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(r)}catch(s){console.error(`[${this.componentType}] 获取历史数据失败:`,s)}this.session.value&&this.session.value.registerComponent({id:this.props.conf.id,request:null,onUpdate:(s,r)=>{s==="realtime"&&this.setSocketData(r)}}),this.onPreview()}this.setupLinkWatch()})),b.onBeforeUnmount(()=>{this.cleanup(),e.unregister(),this.stopLinkWatch()}),b.watch(()=>this.props.conf,()=>{this.props.mode==="edit"&&t()},{deep:!0}),b.watch(()=>this.props.theme,()=>{this.init()}),b.watch(()=>{var s;return(s=this.Style.value)==null?void 0:s.linkChannel},()=>{this.setupLinkWatch()})}getStyle(){return this.Style}getType(){return this.componentType}dispatchModal(t,e,s){this.props.mode==="preview"&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:t,layerId:e,sheetIndex:s!=null?s:-1}}))}triggerModalByKey(t){var s,r;if(this.props.mode!=="preview")return;const e=(s=this.props.conf)==null?void 0:s.modalBinding;if(e&&e.enabled&&e.mode==="key"){const a=(e.map||{})[t];if(!a||!a.layerId)return;const o=a.action||"toggle",c=(r=e.sheetIndex)!=null?r:-1;this.dispatchModal(o,a.layerId,c)}}}exports.BaseComponent=G;exports.addRealtimeData=z;exports.debounce=H;exports.formatStatisticsResult=K;exports.getBarXAxis=q;exports.getObjectId=S;exports.getRandomArr=$;exports.getXAxisNearTime=O;exports.getxAxisDataTime=L;exports.handleNullData=C;exports.hasDataSource=N;exports.preview=W;exports.unregister=E;
1
+ "use strict";var T=(i,t,e)=>new Promise((s,r)=>{var n=c=>{try{o(e.next(c))}catch(l){r(l)}},a=c=>{try{o(e.throw(c))}catch(l){r(l)}},o=c=>c.done?s(c.value):Promise.resolve(c.value).then(n,a);o((e=e.apply(i,t)).next())});const b=require("vue"),M=require("./common-CRX05V1u.cjs"),y=require("./index-By4IGBQZ.cjs"),L=(i,t,e=!1)=>{const s=[];if(t==="edit"||t==="preview"&&!e){const r=new Date;s.push(y.dayjs(r).format("YYYY-MM-DD HH")+":00:00");for(let n=0;n<i-1;n++){const a=r.getHours();r.setHours(a-1),s.unshift(y.dayjs(r).format("YYYY-MM-DD HH")+":00:00")}}return s},$=i=>{const{num:t,max:e,min:s,mode:r,hasDataSource:n=!1}=i,a=[];if(r==="edit"||r==="preview"&&!n){const o=t!=null?t:10,c=e!=null?e:200,l=s!=null?s:10;for(let u=0;u<o;u++)a.push(Math.floor(Math.random()*(c-l+1)+l))}return a},q=i=>{let t=[];switch(i){case"last-hour":case"hour":for(let e=0;e<60;e++){const s=e>9?`${e}:00`:`0${e}:00`;t.push(s)}break;case"last-day":case"day":for(let e=0;e<24;e++){const s=e>9?`${e}:00`:`0${e}:00`;t.push(s)}break;case"week":case"last-week":t=["周日","周一","周二","周三","周四","周五","周六"];break;case"last-month":case"month":for(let e=1;e<32;e++){const s=e>9?`${e}日`:`0${e}日`;t.push(s)}break;case"last-year":case"year":for(let e=1;e<13;e++){const s=e>9?`${e}月`:`0${e}月`;t.push(s)}break}return t},x=i=>["周日","周一","周二","周三","周四","周五","周六"][i],O=(i,t)=>{switch(t){case"hour":return y.dayjs(i).format("mm:00");case"day":return y.dayjs(i).format("HH:00");case"week":return x(y.dayjs(i).day());case"month":return y.dayjs(i).format("DD日");case"year":return y.dayjs(i).format("MM月");default:return""}},H=(i,t)=>{let e=null;return function(...s){const r=this;e!==null&&clearTimeout(e),e=setTimeout(()=>{i.apply(r,s)},t)}},S=(i,t,e)=>{const s=JSON.parse(sessionStorage.getItem(M.ALIAS_MAPPING_KEY)||"{}")||{};return t?i.object_alias&&s[i.object_alias]||e:i.object_id||e},N=i=>{if(!i)return!1;const{data:t=[],common:e={}}=i;return e.source==="calculate"?Array.isArray(t)&&t.length>0?t.some(s=>s.uid&&s.uid!==""):!1:e.object_id&&e.object_id!==""||e.object_alias&&e.object_alias!==""?!0:Array.isArray(t)&&t.length>0?t.some(s=>s.object_id&&s.object_id!==""):!1},U=i=>Number.isNaN(i)||!Number.isFinite(i),B=i=>i==null||i==="",v={null:B,abnormal:U},P=i=>i.res,Y=i=>{const{res:t,category:e,type:s,conf:r,uid:n}=i,{data:a,common:o}=r,c=o.source||"mosaic";if(e==="history"){const l=[],u=t.history[0].length;for(let h=0;h<u;h++){let f=!0;for(let d=0;d<t.history.length;d++){const g=a[d].fv;if(v[s](t.history[d][h][g])){f=!1;break}}f&&l.push(h)}const p=[];for(let h=0;h<t.history.length;h++){const f=l.map(d=>t.history[h][d]);f.length>0&&p.push(f)}t.history=p}else{let l=!1;if(a.forEach(u=>{var f,d,g,k,w,_,j,D,R,A,m,I;const p=S(u,o.useAlias,n);let h;["statistics","calculate"].includes(c)?h=(k=(g=(d=(f=t[p])==null?void 0:f[c])==null?void 0:d.data)==null?void 0:g[u.fv])==null?void 0:k.data:["statisticsRealtime","calculateRealtime"].includes(c)?h=(R=(D=(j=(_=(w=t[p])==null?void 0:w[c])==null?void 0:_.data)==null?void 0:j[u.fv])==null?void 0:D.data)==null?void 0:R.data:h=(I=(m=(A=t[p])==null?void 0:A[c])==null?void 0:m.data)==null?void 0:I[u.fv],l=v[s](h)}),l)return null}return t},V=i=>{const{res:t,category:e,type:s,conf:r,uid:n}=i,{data:a,common:o}=r,c=o.source||"mosaic";if(e==="history"){const l=t.history[0].length;for(let u=0;u<l;u++)for(let p=0;p<t.history.length;p++){const h=a[p].fv;v[s](t.history[p][u][h])&&(t.history[p][u][h]=o.null.value)}}else a.forEach(l=>{var p,h,f,d,g,k,w,_,j,D,R,A;const u=S(l,o.useAlias,n);if(["statistics","calculate"].includes(c)){const m=(d=(f=(h=(p=t[u])==null?void 0:p[c])==null?void 0:h.data)==null?void 0:f[l.fv])==null?void 0:d.data;v[s](m)&&(t[u][c].data[l.fv].data=o.null.value)}else if(["statisticsRealtime","calculateRealtime"].includes(c)){const m=(j=(_=(w=(k=(g=t[u])==null?void 0:g[c])==null?void 0:k.data)==null?void 0:w[l.fv])==null?void 0:_.data)==null?void 0:j.data;v[s](m)&&(t[u][c].data[l.fv].data.data=o.null.value)}else{const m=(A=(R=(D=t[u])==null?void 0:D[c])==null?void 0:R.data)==null?void 0:A[l.fv];v[s](m)&&(t[u][c].data[l.fv]=o.null.value)}});return t},X=i=>i.res,F={0:P,1:Y,2:V,3:X},C=(i,t,e)=>{var o;const{conf:s,uid:r}=t,n=(o=s.common)==null?void 0:o.null;if(!(n!=null&&n.type))return i;const a={res:i,category:e,type:"null",conf:s,uid:r};return F[n.type](a)},K=(i,t)=>(i.history=t.map(()=>[]),i.all_data_group.forEach((e,s)=>{if(Array.isArray(e)&&e.length)e.forEach(r=>{i.history[s].push({time:r.start_time,[r.script_uid]:r.data})});else for(const r in e)i.history[s].push({time:r,[t[s].fv]:e[r]})}),i),z=(i,t)=>{const e=new Map;for(let a=0;a<i.length;a++)e.set(i[a],a);const s=[],r=t.map(()=>[]),n=new Set;for(let a=0;a<i.length;a++){const o=i[a];if(!n.has(o)){n.add(o);const c=e.get(o);s.push(o);for(let l=0;l<t.length;l++)r[l].push(t[l][c])}}return{times:s,data:r}},W=(i,t,e,s,r)=>T(null,null,function*(){try{const a=yield new(yield Promise.resolve().then(()=>require("./history-DBT1UIpm.cjs"))).default().getHistoryData(i,r);e(a)}catch(n){console.error("获取历史数据时出错:",n)}finally{if(t){const{formatRequest:n}=yield Promise.resolve().then(()=>require("./request-CHmKi4NB.cjs")),a=n(i.conf,i.uid,r);t.registerComponent({id:i.conf.id,request:a,onUpdate:(o,c)=>{o==="realtime"&&s(c)}})}}}),E=(i,t)=>{t&&t.unregisterComponent(i.conf.id)};class G{constructor(t,e){this.linkWatchStop=null,this.props=t,this.componentType=e,this.session=b.ref(b.inject("session",null)),this.Style=b.ref({}),this.linkStore=y.useLinkStore()}extractStyles(){return{}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}setHistoryData(t){}onPreview(){var r;const{common:t,data:e}=this.props.conf,s=this.getSource();if(t.multiObject&&Array.isArray(e)){const n=new Set;e.forEach(a=>{const o=this.resolveObjectId(a);!o||n.has(o)||(n.add(o),this.subscribeBySource(s,o,a.uid))}),console.log(`[${this.componentType}] 多对象模式:已订阅 ${n.size} 个对象`)}else{const n=this.resolveObjectId(),a=(r=e==null?void 0:e[0])==null?void 0:r.uid;this.subscribeBySource(s,n,a)}}setSocketData(t){if(!t)return;const{data:e}=this.props.conf;!e||!Array.isArray(e)||e.forEach(s=>{try{const r=this.extractDataValue(t,s.fv);s.value=r!=null?r:"--"}catch(r){s.value="--"}})}onLinkEvent(t){}getLinkChannel(){var t;return((t=this.Style.value)==null?void 0:t.linkChannel)||""}publish(t){const e=this.getLinkChannel();if(!e){console.warn(`[${this.componentType}] 未配置联动频道,无法发布事件`);return}this.linkStore.publish(e,this.componentType,t)}shouldHandleEvent(t){return!(!t||this.props.mode==="edit"||t.topic.source===this.componentType)}setupLinkWatch(){this.linkWatchStop&&this.linkWatchStop(),this.linkWatchStop=b.watch(()=>{const t=this.getLinkChannel();return t?this.linkStore.channels[t]:null},t=>{this.shouldHandleEvent(t)&&this.onLinkEvent(t)},{deep:!0,immediate:!0})}stopLinkWatch(){this.linkWatchStop&&(this.linkWatchStop(),this.linkWatchStop=null)}isLocalIotSubscribeMode(){return localStorage.getItem("dashboardUseLocalToken")==="1"||localStorage.getItem("dashboardUseLocalToken")==="true"}subscribe(t,e,s,r){if(!this.session.value){console.warn(`[${this.componentType}] Session 未初始化,无法订阅`);return}const n={event:t,block:e,object_id:s};r&&Object.assign(n,r);const a=this.isLocalIotSubscribeMode()?{action:"sub_event",block_mapping:"mmq",event:n}:{action:"sub_agent_event",event:n},o=this.props.conf.id;this.session.value.componentRequests&&(this.session.value.componentRequests.has(o)||this.session.value.componentRequests.set(o,[]),this.session.value.componentRequests.get(o).push(a)),this.session.value.send({type:"send_message",message:a})}subscribeFv(t){this.subscribe("recv_fv","mosaic",t)}subscribeRetainerOpen(t){this.subscribe("retainer_open","retainer",t)}subscribeRetainerClose(t){this.subscribe("retainer_close","retainer",t)}subscribeRetainerEvent(t){this.subscribe("retainer_event","retainer",t)}subscribeRetainer(t){this.subscribeRetainerOpen(t),this.subscribeRetainerClose(t),this.subscribeRetainerEvent(t)}subscribeStatisticsRealtimeResult(t){this.subscribe("statistics_realtime_result","statistics",t)}subscribeStatistics(t){var s,r;const e=(r=(s=this.props.conf.data)==null?void 0:s[0])==null?void 0:r.uid;this.subscribeStatisticsWithUid(t,e)}subscribeStatisticsWithUid(t,e){this.subscribe("statistics_result","statistics",t,{uid:e,type:"statistics"})}subscribeCalculate(t){var s,r;const e=(r=(s=this.props.conf.data)==null?void 0:s[0])==null?void 0:r.uid;this.subscribeCalculateWithUid(e)}subscribeCalculateWithUid(t){this.subscribe("statistics_result","statistics","",{uid:t,type:"calculate"})}subscribeBySource(t,e,s){switch(t){case"mosaic":this.subscribeFv(e);break;case"statisticsRealtime":this.subscribeStatisticsRealtimeResult(e);break;case"statistics":s?this.subscribeStatisticsWithUid(e,s):this.subscribeStatistics(e);break;case"calculate":s?this.subscribeCalculateWithUid(s):this.subscribeCalculate(e);break;default:console.warn(`[${this.componentType}] 未知的数据源类型: ${t}`)}}extractDataValue(t,e){var s;return!t||!t.event?null:t.event==="recv_fv"&&t.block==="mosaic"?!e||!t.data?null:t.data[e]:t.event==="statistics_realtime_result"&&t.block==="statistics"?(s=t.data)==null?void 0:s.data:t.event==="statistics_result"&&t.block==="statistics"?t.data:null}getOptionValue(t,e){var r,n;const s=(n=(r=this.props.conf)==null?void 0:r.options)==null?void 0:n[t];return s==null?e:typeof s=="object"&&"value"in s?s.value:s}applyTheme(){M.applyThemeStyles(this.props.theme,this.Style.value)}getSource(){var t,e;return((e=(t=this.props.conf)==null?void 0:t.common)==null?void 0:e.source)||"mosaic"}isStatistics(){return["statistics","calculate","statisticsRealtime","calculateRealtime"].includes(this.getSource())}resolveObjectId(t){var a,o,c;const{common:e,data:s}=this.props.conf;if(e.multiObject&&t)return S(t,e.useAlias,this.props.uid);if(typeof e.object_id=="string"&&e.object_id.trim()!==""||typeof e.object_alias=="string"&&e.object_alias.trim()!==""||typeof((a=s==null?void 0:s[0])==null?void 0:a.object_id)=="string"&&s[0].object_id.trim()!==""||typeof((o=s==null?void 0:s[0])==null?void 0:o.object_alias)=="string"&&s[0].object_alias.trim()!==""){const l=e.object_id||e.object_alias?e:s[0]||{};return S(l,e.useAlias,this.props.uid)}if(((c=this.props)==null?void 0:c.uid)!=null&&String(this.props.uid).trim()!=="")return String(this.props.uid).trim();const n=e.object_id?e:s[0]||{};return S(n,e.useAlias,this.props.uid)}handleNull(t,e){return C(t,this.props,e)}getPreviewHelper(){return{preview:()=>W(this.props,this.session.value,t=>this.setHistoryData(t),t=>this.setSocketData(t),this.componentType),unregister:()=>E(this.props,this.session.value)}}getDebouncedInit(){return H(()=>this.init(),200)}cleanup(){}needsHistoryData(){return!0}setupLifecycle(){const t=this.getDebouncedInit(),e=this.getPreviewHelper();b.onMounted(()=>T(this,null,function*(){if(this.init(),this.props.mode==="preview"){if(this.needsHistoryData())try{const r=yield new(yield Promise.resolve().then(()=>require("./history-DBT1UIpm.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(r)}catch(s){console.error(`[${this.componentType}] 获取历史数据失败:`,s)}this.session.value&&this.session.value.registerComponent({id:this.props.conf.id,request:null,onUpdate:(s,r)=>{s==="realtime"&&this.setSocketData(r)}}),this.onPreview()}this.setupLinkWatch()})),b.onBeforeUnmount(()=>{this.cleanup(),e.unregister(),this.stopLinkWatch()}),b.watch(()=>this.props.conf,()=>{this.props.mode==="edit"&&t()},{deep:!0}),b.watch(()=>this.props.theme,()=>{this.init()}),b.watch(()=>{var s;return(s=this.Style.value)==null?void 0:s.linkChannel},()=>{this.setupLinkWatch()})}getStyle(){return this.Style}getType(){return this.componentType}dispatchModal(t,e,s){this.props.mode==="preview"&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:t,layerId:e,sheetIndex:s!=null?s:-1}}))}triggerModalByKey(t){var s,r;if(this.props.mode!=="preview")return;const e=(s=this.props.conf)==null?void 0:s.modalBinding;if(e&&e.enabled&&e.mode==="key"){const a=(e.map||{})[t];if(!a||!a.layerId)return;const o=a.action||"toggle",c=(r=e.sheetIndex)!=null?r:-1;this.dispatchModal(o,a.layerId,c)}}}exports.BaseComponent=G;exports.addRealtimeData=z;exports.debounce=H;exports.formatStatisticsResult=K;exports.getBarXAxis=q;exports.getObjectId=S;exports.getRandomArr=$;exports.getXAxisNearTime=O;exports.getxAxisDataTime=L;exports.handleNullData=C;exports.hasDataSource=N;exports.preview=W;exports.unregister=E;
@@ -1,6 +1,6 @@
1
1
  import { nextTick as i } from "vue";
2
- import { B as s, h as r, e as a } from "./BaseComponent-sx-foTs7.js";
3
- import { e as h } from "./element-resize-detector-C78XitMC.js";
2
+ import { B as s, h as r, e as a } from "./BaseComponent-B7wPQZV9.js";
3
+ import { e as h } from "./element-resize-detector-_sDR6e5I.js";
4
4
  import { i as o, d as n } from "./echarts-BVht3HHb.js";
5
5
  class g extends s {
6
6
  constructor(t, e) {
@@ -1 +1 @@
1
- "use strict";const r=require("vue"),i=require("./BaseComponent-C4c2vBxN.cjs"),a=require("./element-resize-detector-CLXm1nKt.cjs"),s=require("./echarts-BB8O2KSA.cjs");class h extends i.BaseComponent{constructor(t,e){super(t,e),this.chartObj=null,this.erd=null,this.echartId=`${e}_${Math.random().toString(16).slice(4,12)}`}getChartOption(){return{}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),this.ensureData(),r.nextTick(()=>this.initChart())}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),top:this.getOptionValue("top",30),bottom:this.getOptionValue("bottom",40),left:this.getOptionValue("left",40),right:this.getOptionValue("right",20),points:this.getOptionValue("points",10)}}ensureData(){var t;(t=this.props.conf.data)!=null&&t.length||(this.props.conf.data=this.getDefaultData())}getDefaultData(){return[{name:"参数一",fv:"",color:"#4162ff"}]}initChart(){const t=document.querySelector(`#${this.echartId}`);if(!t)return;this.chartObj||(this.chartObj=s.init(t),this.setupResizeListener(t));const e=this.getChartOption();this.chartObj.setOption(e,!0)}setupResizeListener(t){this.erd=a.elementResizeDetectorMaker({strategy:"scroll"}),this.erd.listenTo(t,()=>{var e;(e=this.chartObj)==null||e.resize()})}hasData(){return i.hasDataSource(this.props.conf)}getTimeAxis(){return i.getxAxisDataTime(this.Style.value.points,this.props.mode,this.hasData())}updateChart(t){var e;(e=this.chartObj)==null||e.setOption(t)}cleanup(){if(this.erd){const t=document.querySelector(`#${this.echartId}`);t&&this.erd.uninstall(t),this.erd=null}this.chartObj&&(this.chartObj.clear(),s.dispose(this.chartObj),this.chartObj=null)}getEchartId(){return this.echartId}getChartInstance(){return this.chartObj}}exports.EChartComponentBase=h;
1
+ "use strict";const r=require("vue"),i=require("./BaseComponent-DhHavntG.cjs"),a=require("./element-resize-detector-CNNVPUiP.cjs"),s=require("./echarts-BB8O2KSA.cjs");class h extends i.BaseComponent{constructor(t,e){super(t,e),this.chartObj=null,this.erd=null,this.echartId=`${e}_${Math.random().toString(16).slice(4,12)}`}getChartOption(){return{}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),this.ensureData(),r.nextTick(()=>this.initChart())}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),top:this.getOptionValue("top",30),bottom:this.getOptionValue("bottom",40),left:this.getOptionValue("left",40),right:this.getOptionValue("right",20),points:this.getOptionValue("points",10)}}ensureData(){var t;(t=this.props.conf.data)!=null&&t.length||(this.props.conf.data=this.getDefaultData())}getDefaultData(){return[{name:"参数一",fv:"",color:"#4162ff"}]}initChart(){const t=document.querySelector(`#${this.echartId}`);if(!t)return;this.chartObj||(this.chartObj=s.init(t),this.setupResizeListener(t));const e=this.getChartOption();this.chartObj.setOption(e,!0)}setupResizeListener(t){this.erd=a.elementResizeDetectorMaker({strategy:"scroll"}),this.erd.listenTo(t,()=>{var e;(e=this.chartObj)==null||e.resize()})}hasData(){return i.hasDataSource(this.props.conf)}getTimeAxis(){return i.getxAxisDataTime(this.Style.value.points,this.props.mode,this.hasData())}updateChart(t){var e;(e=this.chartObj)==null||e.setOption(t)}cleanup(){if(this.erd){const t=document.querySelector(`#${this.echartId}`);t&&this.erd.uninstall(t),this.erd=null}this.chartObj&&(this.chartObj.clear(),s.dispose(this.chartObj),this.chartObj=null)}getEchartId(){return this.echartId}getChartInstance(){return this.chartObj}}exports.EChartComponentBase=h;
@@ -1 +1 @@
1
- "use strict";var R=Object.create;var C=Object.defineProperty,j=Object.defineProperties,Z=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,P=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var U=(t,e,i)=>e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,O=(t,e)=>{for(var i in e||(e={}))E.call(e,i)&&U(t,i,e[i]);if(N)for(var i of N(e))G.call(e,i)&&U(t,i,e[i]);return t},V=(t,e)=>j(t,$(e));var W=(t,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of F(e))!E.call(t,l)&&l!==i&&C(t,l,{get:()=>e[l],enumerable:!(a=Z(e,l))||a.enumerable});return t};var m=(t,e,i)=>(i=t!=null?R(P(t)):{},W(e||!t||!t.__esModule?C(i,"default",{value:t,enumerable:!0}):i,t));var w=(t,e,i)=>new Promise((a,l)=>{var c=n=>{try{v(i.next(n))}catch(r){l(r)}},u=n=>{try{v(i.throw(n))}catch(r){l(r)}},v=n=>n.done?a(n.value):Promise.resolve(n.value).then(c,u);v((i=i.apply(t,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),J=require("./BaseComponent-C4c2vBxN.cjs"),K=require("./index-STA_Vn2W.cjs");require("./element-resize-detector-CLXm1nKt.cjs");const Q=require("./titleStyle-NSnz6cUg.cjs"),k=require("./ele-gridview-icon-D3GcssP6.cjs"),X={class:"mix-body"},Y={key:0,class:"univer-placeholder"},ee={class:"placeholder-tip"},te={DEFAULT_ICON:k.DEFAULT_ICON,ACTIVE_ICON:k.ACTIVE_ICON,NAME_CN:"Univer表格",NAME_EN:"Univer Sheet",ORDER:2},oe={bgColor:"#ffffff",titleColor:"#111",titleSize:14,radiusSize:8,isHideTitle:!1,showToolbar:!0,ribbonType:"simple",locale:"zh-CN"},ie={DEFAULT:te,OPTIONS:oe},le=o.defineComponent(V(O({},ie),{__name:"UniverSheet",props:{conf:{type:Object,default:()=>({name:"Univer表格"})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(t){const e=t,i=o.ref(null),a=o.ref(!1),l=o.ref("");let c=null,u=null;class v extends J.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#ffffff"),titleColor:this.getOptionValue("titleColor","#111"),titleSize:this.getOptionValue("titleSize",14),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!1),showToolbar:this.getOptionValue("showToolbar",!0),ribbonType:this.getOptionValue("ribbonType","simple"),locale:this.getOptionValue("locale","zh-CN")}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}}const n=new v(e,"univerSheet");n.setupLifecycle();const r=n.getStyle(),z=o.computed(()=>Q.generateTitleStyle(e.conf.options)),B=o.computed(()=>{var s,p,f,h;return{background:(p=(s=r.value)==null?void 0:s.bgColor)!=null?p:"#ffffff",borderRadius:`${(h=(f=r.value)==null?void 0:f.radiusSize)!=null?h:8}px`}});function x(){return w(this,null,function*(){var p,f,h;const s=i.value;if(s)try{const d=`univer-sheet-${e.uid||Math.random().toString(36).slice(2,8)}`;s.id=d;const{createUniver:I,LocaleType:S,mergeLocales:T}=yield import("@univerjs/presets"),{UniverSheetsCorePreset:M}=yield import("@univerjs/preset-sheets-core"),A=yield import("@univerjs/preset-sheets-core/locales/zh-CN").then(b=>b.default).catch(()=>({})),q=yield import("@univerjs/preset-sheets-core/locales/en-US").then(b=>b.default).catch(()=>({}));yield import("@univerjs/preset-sheets-core/lib/index.css");const H=((p=r.value)==null?void 0:p.locale)==="zh-CN"?S.ZH_CN:S.EN_US,y=((f=r.value)==null?void 0:f.showToolbar)!==!1,_=((h=r.value)==null?void 0:h.ribbonType)||"simple",{univer:L,univerAPI:g}=I({locale:H,locales:{[S.EN_US]:T(q),[S.ZH_CN]:T(A)},presets:[M({container:d,header:y,toolbar:y,formulaBar:y,footer:!1,ribbonType:_==="collapsed"?"collapsed":_==="classic"?"classic":"simple"})]});g.createWorkbook({sheetOrder:["sheet1"],sheets:{sheet1:{id:"sheet1",name:"Sheet1",rowCount:50,columnCount:26,cellData:{0:{0:{v:"月份",t:1},1:{v:"收入",t:1},2:{v:"支出",t:1},3:{v:"利润",t:1}},1:{0:{v:"一月",t:1},1:{v:1e4,t:2},2:{v:6e3,t:2},3:{v:4e3,t:2}},2:{0:{v:"二月",t:1},1:{v:12e3,t:2},2:{v:7e3,t:2},3:{v:5e3,t:2}},3:{0:{v:"三月",t:1},1:{v:11e3,t:2},2:{v:6500,t:2},3:{v:4500,t:2}},4:{0:{v:"合计",t:1},1:{f:"=SUM(B2:B4)",t:2},2:{f:"=SUM(C2:C4)",t:2},3:{f:"=SUM(D2:D4)",t:2}}}}}}),c=L,u=g,a.value=!0}catch(d){console.error("[UniverSheet] init error:",d),l.value=(d==null?void 0:d.message)||"请安装 @univerjs/presets 与 @univerjs/preset-sheets-core"}})}function D(){try{c==null||c.dispose(),u==null||u.dispose()}catch(s){}c=null,u=null,a.value=!1}return o.onMounted(()=>{o.nextTick(()=>x())}),o.onBeforeUnmount(()=>{D()}),(s,p)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component univer-sheet-wrap",style:o.normalizeStyle(B.value)},[o.unref(r).isHideTitle?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-title",style:o.normalizeStyle(z.value)},o.toDisplayString(t.conf.caption||t.conf.name||"Univer表格"),5)),o.createElementVNode("div",X,[a.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Y,[o.createElementVNode("span",ee,o.toDisplayString(l.value||"加载表格…"),1)])),o.createElementVNode("div",{ref_key:"containerRef",ref:i,class:"univer-container"},null,512)]),o.renderSlot(s.$slots,"default",{},void 0,!0)],4))}})),ne=K._export_sfc(le,[["__scopeId","data-v-fb33a4b0"]]);exports.default=ne;
1
+ "use strict";var R=Object.create;var C=Object.defineProperty,j=Object.defineProperties,Z=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,P=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var U=(t,e,i)=>e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,O=(t,e)=>{for(var i in e||(e={}))E.call(e,i)&&U(t,i,e[i]);if(N)for(var i of N(e))G.call(e,i)&&U(t,i,e[i]);return t},V=(t,e)=>j(t,$(e));var W=(t,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of F(e))!E.call(t,l)&&l!==i&&C(t,l,{get:()=>e[l],enumerable:!(a=Z(e,l))||a.enumerable});return t};var m=(t,e,i)=>(i=t!=null?R(P(t)):{},W(e||!t||!t.__esModule?C(i,"default",{value:t,enumerable:!0}):i,t));var w=(t,e,i)=>new Promise((a,l)=>{var c=n=>{try{v(i.next(n))}catch(r){l(r)}},u=n=>{try{v(i.throw(n))}catch(r){l(r)}},v=n=>n.done?a(n.value):Promise.resolve(n.value).then(c,u);v((i=i.apply(t,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),J=require("./BaseComponent-DhHavntG.cjs"),K=require("./index-By4IGBQZ.cjs");require("./element-resize-detector-CNNVPUiP.cjs");const Q=require("./titleStyle-NSnz6cUg.cjs"),k=require("./ele-gridview-icon-D3GcssP6.cjs"),X={class:"mix-body"},Y={key:0,class:"univer-placeholder"},ee={class:"placeholder-tip"},te={DEFAULT_ICON:k.DEFAULT_ICON,ACTIVE_ICON:k.ACTIVE_ICON,NAME_CN:"Univer表格",NAME_EN:"Univer Sheet",ORDER:2},oe={bgColor:"#ffffff",titleColor:"#111",titleSize:14,radiusSize:8,isHideTitle:!1,showToolbar:!0,ribbonType:"simple",locale:"zh-CN"},ie={DEFAULT:te,OPTIONS:oe},le=o.defineComponent(V(O({},ie),{__name:"UniverSheet",props:{conf:{type:Object,default:()=>({name:"Univer表格"})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(t){const e=t,i=o.ref(null),a=o.ref(!1),l=o.ref("");let c=null,u=null;class v extends J.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#ffffff"),titleColor:this.getOptionValue("titleColor","#111"),titleSize:this.getOptionValue("titleSize",14),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!1),showToolbar:this.getOptionValue("showToolbar",!0),ribbonType:this.getOptionValue("ribbonType","simple"),locale:this.getOptionValue("locale","zh-CN")}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}}const n=new v(e,"univerSheet");n.setupLifecycle();const r=n.getStyle(),z=o.computed(()=>Q.generateTitleStyle(e.conf.options)),B=o.computed(()=>{var s,p,f,h;return{background:(p=(s=r.value)==null?void 0:s.bgColor)!=null?p:"#ffffff",borderRadius:`${(h=(f=r.value)==null?void 0:f.radiusSize)!=null?h:8}px`}});function x(){return w(this,null,function*(){var p,f,h;const s=i.value;if(s)try{const d=`univer-sheet-${e.uid||Math.random().toString(36).slice(2,8)}`;s.id=d;const{createUniver:I,LocaleType:S,mergeLocales:T}=yield import("@univerjs/presets"),{UniverSheetsCorePreset:M}=yield import("@univerjs/preset-sheets-core"),A=yield import("@univerjs/preset-sheets-core/locales/zh-CN").then(b=>b.default).catch(()=>({})),q=yield import("@univerjs/preset-sheets-core/locales/en-US").then(b=>b.default).catch(()=>({}));yield import("@univerjs/preset-sheets-core/lib/index.css");const H=((p=r.value)==null?void 0:p.locale)==="zh-CN"?S.ZH_CN:S.EN_US,y=((f=r.value)==null?void 0:f.showToolbar)!==!1,_=((h=r.value)==null?void 0:h.ribbonType)||"simple",{univer:L,univerAPI:g}=I({locale:H,locales:{[S.EN_US]:T(q),[S.ZH_CN]:T(A)},presets:[M({container:d,header:y,toolbar:y,formulaBar:y,footer:!1,ribbonType:_==="collapsed"?"collapsed":_==="classic"?"classic":"simple"})]});g.createWorkbook({sheetOrder:["sheet1"],sheets:{sheet1:{id:"sheet1",name:"Sheet1",rowCount:50,columnCount:26,cellData:{0:{0:{v:"月份",t:1},1:{v:"收入",t:1},2:{v:"支出",t:1},3:{v:"利润",t:1}},1:{0:{v:"一月",t:1},1:{v:1e4,t:2},2:{v:6e3,t:2},3:{v:4e3,t:2}},2:{0:{v:"二月",t:1},1:{v:12e3,t:2},2:{v:7e3,t:2},3:{v:5e3,t:2}},3:{0:{v:"三月",t:1},1:{v:11e3,t:2},2:{v:6500,t:2},3:{v:4500,t:2}},4:{0:{v:"合计",t:1},1:{f:"=SUM(B2:B4)",t:2},2:{f:"=SUM(C2:C4)",t:2},3:{f:"=SUM(D2:D4)",t:2}}}}}}),c=L,u=g,a.value=!0}catch(d){console.error("[UniverSheet] init error:",d),l.value=(d==null?void 0:d.message)||"请安装 @univerjs/presets 与 @univerjs/preset-sheets-core"}})}function D(){try{c==null||c.dispose(),u==null||u.dispose()}catch(s){}c=null,u=null,a.value=!1}return o.onMounted(()=>{o.nextTick(()=>x())}),o.onBeforeUnmount(()=>{D()}),(s,p)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component univer-sheet-wrap",style:o.normalizeStyle(B.value)},[o.unref(r).isHideTitle?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-title",style:o.normalizeStyle(z.value)},o.toDisplayString(t.conf.caption||t.conf.name||"Univer表格"),5)),o.createElementVNode("div",X,[a.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Y,[o.createElementVNode("span",ee,o.toDisplayString(l.value||"加载表格…"),1)])),o.createElementVNode("div",{ref_key:"containerRef",ref:i,class:"univer-container"},null,512)]),o.renderSlot(s.$slots,"default",{},void 0,!0)],4))}})),ne=K._export_sfc(le,[["__scopeId","data-v-fb33a4b0"]]);exports.default=ne;
@@ -27,9 +27,9 @@ var E = (o, e, t) => new Promise((u, p) => {
27
27
  f((t = t.apply(o, e)).next());
28
28
  });
29
29
  import { defineComponent as J, ref as y, computed as V, onMounted as K, nextTick as Q, onBeforeUnmount as X, openBlock as b, createElementBlock as C, normalizeStyle as x, unref as Y, toDisplayString as k, createCommentVNode as B, createElementVNode as _, renderSlot as ee } from "vue";
30
- import { B as te } from "./BaseComponent-sx-foTs7.js";
31
- import { _ as oe } from "./index-Dr1OQXVD.js";
32
- import "./element-resize-detector-C78XitMC.js";
30
+ import { B as te } from "./BaseComponent-B7wPQZV9.js";
31
+ import { _ as oe } from "./index-LaRCo47G.js";
32
+ import "./element-resize-detector-_sDR6e5I.js";
33
33
  import { g as ie } from "./titleStyle-BT5GlpAb.js";
34
34
  import { A as le, D as se } from "./ele-gridview-icon-cSd1oIDi.js";
35
35
  const ne = { class: "mix-body" }, re = {
@@ -1,4 +1,4 @@
1
- "use strict";var q=Object.defineProperty,I=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var w=(y,s,i)=>s in y?q(y,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[s]=i,A=(y,s)=>{for(var i in s||(s={}))P.call(s,i)&&w(y,i,s[i]);if(k)for(var i of k(s))U.call(s,i)&&w(y,i,s[i]);return y},T=(y,s)=>I(y,R(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/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 M=require("./BaseComponent-C4c2vBxN.cjs"),D=require("./index-STA_Vn2W.cjs"),$=require("./EChartComponentBase-mvy_IwEY.cjs");require("./index-mAPVa0s4.cjs");const H=require("./ele-lin-icon-Dke_1AmT.cjs"),G=require("./echarts-BB8O2KSA.cjs"),W={class:"acceleration-chart-wrapper"},Q={class:"toolbar"},X={class:"toolbar-left"},Z={class:"toolbar-center"},J={class:"toolbar-right"},K={class:"chart-header"},ee={class:"chart-title"},te={class:"chart-legend"},ae={class:"legend-text"},oe={class:"y-axis-unit"},le={class:"chart-body"},re=["id"],ne={DEFAULT_ICON:H.DEFAULT_ICON,ACTIVE_ICON:H.ACTIVE_ICON,NAME_CN:"加速度监测",NAME_EN:"Acceleration Chart",ORDER:10},se={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"}},ce=[{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"}]}],ie=["name","area","object_id","curves"],ue=["name","fv","color"],de=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],me={useAlias:!1,multiObject:!0,source:"mosaic"},fe={DEFAULT:ne,OPTIONS:se,DATA:ce,PARAMS:ie,SOURCE:de,COMMON:me,CURVE_PARAMS:ue},he=t.defineComponent(T(A({},fe),{__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=>({v3cfd941c:t.unref(V).bgColor,ea31b698:t.unref(V).textColor}));const s=y,i=t.ref(""),F=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(F,o=>{o.length>0&&!i.value&&(i.value=o[0])},{immediate:!0});const B=()=>{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}),g=t.computed(()=>{const o=L.value;return o?o.curves||[]:[]}),Y=t.ref("7days"),x=t.ref(D.dayjs().subtract(7,"day").format("YYYY-MM-DD HH:mm:ss")),b=t.ref(D.dayjs().format("YYYY-MM-DD HH:mm:ss")),O=o=>{const e=D.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(g.value)},j=()=>{console.log("导出数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value})};t.watch(v,()=>{p.updateChartData(g.value)});class z extends $.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=M.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">
1
+ "use strict";var q=Object.defineProperty,I=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var w=(y,s,i)=>s in y?q(y,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[s]=i,A=(y,s)=>{for(var i in s||(s={}))P.call(s,i)&&w(y,i,s[i]);if(k)for(var i of k(s))U.call(s,i)&&w(y,i,s[i]);return y},T=(y,s)=>I(y,R(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/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 M=require("./BaseComponent-DhHavntG.cjs"),D=require("./index-By4IGBQZ.cjs"),$=require("./EChartComponentBase-y-56bxn_.cjs");require("./index-mAPVa0s4.cjs");const H=require("./ele-lin-icon-Dke_1AmT.cjs"),G=require("./echarts-BB8O2KSA.cjs"),W={class:"acceleration-chart-wrapper"},Q={class:"toolbar"},X={class:"toolbar-left"},Z={class:"toolbar-center"},J={class:"toolbar-right"},K={class:"chart-header"},ee={class:"chart-title"},te={class:"chart-legend"},ae={class:"legend-text"},oe={class:"y-axis-unit"},le={class:"chart-body"},re=["id"],ne={DEFAULT_ICON:H.DEFAULT_ICON,ACTIVE_ICON:H.ACTIVE_ICON,NAME_CN:"加速度监测",NAME_EN:"Acceleration Chart",ORDER:10},se={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"}},ce=[{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"}]}],ie=["name","area","object_id","curves"],ue=["name","fv","color"],de=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],me={useAlias:!1,multiObject:!0,source:"mosaic"},fe={DEFAULT:ne,OPTIONS:se,DATA:ce,PARAMS:ie,SOURCE:de,COMMON:me,CURVE_PARAMS:ue},he=t.defineComponent(T(A({},fe),{__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=>({v3cfd941c:t.unref(V).bgColor,ea31b698:t.unref(V).textColor}));const s=y,i=t.ref(""),F=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(F,o=>{o.length>0&&!i.value&&(i.value=o[0])},{immediate:!0});const B=()=>{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}),g=t.computed(()=>{const o=L.value;return o?o.curves||[]:[]}),Y=t.ref("7days"),x=t.ref(D.dayjs().subtract(7,"day").format("YYYY-MM-DD HH:mm:ss")),b=t.ref(D.dayjs().format("YYYY-MM-DD HH:mm:ss")),O=o=>{const e=D.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(g.value)},j=()=>{console.log("导出数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value})};t.watch(v,()=>{p.updateChartData(g.value)});class z extends $.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=M.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>
@@ -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 { e as he, f as ve, i as ye } from "./BaseComponent-sx-foTs7.js";
24
- import { d as z, _ as pe } from "./index-Dr1OQXVD.js";
25
- import { E as xe } from "./EChartComponentBase-Bo834W6o.js";
23
+ import { e as he, f as ve, i as ye } from "./BaseComponent-B7wPQZV9.js";
24
+ import { d as z, _ as pe } from "./index-LaRCo47G.js";
25
+ import { E as xe } from "./EChartComponentBase-BRBRhzrb.js";
26
26
  import "./index-ButoLLAe.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-BVht3HHb.js";
@@ -1 +1 @@
1
- "use strict";var K=Object.defineProperty,G=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var A=(k,t,o)=>t in k?K(k,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):k[t]=o,O=(k,t)=>{for(var o in t||(t={}))X.call(t,o)&&A(k,o,t[o]);if(B)for(var o of B(t))Y.call(t,o)&&A(k,o,t[o]);return k},T=(k,t)=>G(k,Q(t));var J=(k,t,o)=>new Promise((s,n)=>{var l=i=>{try{h(o.next(i))}catch(b){n(b)}},p=i=>{try{h(o.throw(i))}catch(b){n(b)}},h=i=>i.done?s(i.value):Promise.resolve(i.value).then(l,p);h((o=o.apply(k,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=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("./store-TKGaihWA.cjs"),ee=require("./index-STA_Vn2W.cjs");require("./element-resize-detector-CLXm1nKt.cjs");const te=require("./BaseComponent-C4c2vBxN.cjs"),re=require("./titleStyle-NSnz6cUg.cjs"),q=require("./ele-crd-icon-BvNgAPKW.cjs");class oe extends te.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(l=>{const p=n?`${n}.${l.key}`:l.key;if(l.form_type==="sub_form"&&l.properties&&!l.items){o(l.properties,p);return}if(l.form_type==="sub_form"&&l.items)return;const h=this.buildValidationRules(l);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(l=>{n[l.key]=this.getDefaultValue(l)}),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,l;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]],i=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((l=i==null?void 0:i.property)!=null&&l.hidden)return!0}return!1}isFieldDisabled(t){var o,s,n,l;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]],i=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((l=i==null?void 0:i.property)!=null&&l.disabled)return!0}return!1}getFieldOptions(t){var s,n;let o=t.enum||[];if(t.rules)for(const l of t.rules){if(!l.related_key)continue;const p=this.formData[l.related_key],h=(s=l.conditions)==null?void 0:s.find(i=>i.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(l=>{s[l.key]=this.getDefaultValue(l)}),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,l;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(),i=(n=p.conditions)==null?void 0:n.find(b=>b.value===o[h]);if((l=i==null?void 0:i.property)!=null&&l.enum)return i.property.enum}return[]}onSubFieldChange(t,o,s){var l;(((l=t.items)==null?void 0:l.properties)||t.properties||[]).forEach(p=>{var h;if(p.rules)for(const i of p.rules)((h=i.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 l=t[n.key];n.form_type==="sub_form"?n.properties&&!n.items?s[n.key]=this.convertFormDataToOriginal(l||{},n.properties):(p=n.items)!=null&&p.properties&&(s[n.key]=Array.isArray(l)?l.map(h=>this.convertArrayItemToOriginal(h,n.items.properties)):[]):n.db_type==="boolean"&&typeof l=="boolean"?s[n.key]=l?"true":"false":s[n.key]=l}),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 se={class:"mix-body"},ne={key:0,class:"json-editor"},ae={class:"editor-header"},ie={key:1,class:"edit-toolbar"},le={key:2,class:"empty-state"},ue={key:3,class:"form-content"},ce={key:0,class:"form-description"},de={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"动态表单",NAME_EN:"ActionItem",ORDER:1},me={titleColor:"#111",bgColor:"#fff",radiusSize:8,labelWidth:100,isHideTitle:!1,showButtons:!0},fe={},pe=[],he=[],ye={},ge={DEFAULT:de,OPTIONS:me,DATA:fe,PARAMS:pe,SOURCE:he,COMMON:ye},_e=e.defineComponent(T(O({},ge),{__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(""),l=t,p=Z.useCounterStore(),h=e.ref(),i=new oe(o);i.setupLifecycle(),i.watchParams();const b=i.getStyle(),C=e.computed(()=>o.conf||{}),z=e.computed(()=>re.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(x=>x.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 x=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"},x.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 x=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"},x.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={};x.forEach(D=>{y[D.key]=R(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,()=>U(r,u,m,f))}}});function U(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 x=r[f]===!0||r[f]==="true";return e.h(c.ElSwitch,{modelValue:x,"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 R(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 M=()=>{const a=i.applyJson();a.success?c.ElMessage.success("JSON 配置已应用"):c.ElMessage.error(a.error||"JSON 格式错误")},H=()=>{i.saveFormData(),c.ElMessage.success("保存成功")},L=()=>J(null,null,function*(){var a;try{yield(a=h.value)==null?void 0:a.validate();const r=i.exportTargetJson();n.value=JSON.stringify(r,null,2),s.value=!0,l("generate",r)}catch(r){c.ElMessage.error("请先完善必填项")}}),W=()=>{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,i)}),e.onUnmounted(()=>{p.unregisterInstance(o.uid)}),e.watchEffect(()=>{o.conf.socketData&&i.setSocketData(o.conf.socketData)}),(a,r)=>{const m=P.ElEmpty,f=P.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(z.value)},e.toDisplayString(C.value.action_name||C.value.caption||C.value.name),5),e.createElementVNode("div",se,[k.mode==="edit"&&e.unref(i).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",ae,[r[8]||(r[8]=e.createElementVNode("span",null,"JSON 配置",-1)),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:M},{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(i).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(i).jsonInput.value,"onUpdate:modelValue":r[1]||(r[1]=d=>e.unref(i).jsonInput.value=d),rows:12,placeholder:"粘贴 action_item JSON..."},null,8,["modelValue"])])):e.createCommentVNode("",!0),k.mode==="edit"&&!e.unref(i).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(e.unref(c.ElButton),{size:"small",type:"primary",onClick:r[2]||(r[2]=d=>e.unref(i).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:W},{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(i).hasParams&&k.mode!=="edit"?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(m,{description:"等待表单配置...","image-size":80})])):e.createCommentVNode("",!0),e.unref(i).hasParams?(e.openBlock(),e.createElementBlock("div",ue,[C.value.description?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("p",null,e.toDisplayString(C.value.description),1)])):e.createCommentVNode("",!0),e.createVNode(f,{ref_key:"formRef",ref:h,model:e.unref(i).formData,rules:e.unref(i).getFormRules(),"label-width":e.unref(b).labelWidth+"px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i).getVisibleParams(),d=>(e.openBlock(),e.createBlock(e.unref(I),{key:d.key,param:d,rootData:e.unref(i).formData,actionItem:e.unref(i)},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:H},{default:e.withCtx(()=>[...r[12]||(r[12]=[e.createTextVNode("保存",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"success",onClick:L},{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)}}})),ke=ee._export_sfc(_e,[["__scopeId","data-v-0174b7e7"]]);exports.default=ke;
1
+ "use strict";var K=Object.defineProperty,G=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var A=(k,t,o)=>t in k?K(k,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):k[t]=o,O=(k,t)=>{for(var o in t||(t={}))X.call(t,o)&&A(k,o,t[o]);if(B)for(var o of B(t))Y.call(t,o)&&A(k,o,t[o]);return k},T=(k,t)=>G(k,Q(t));var J=(k,t,o)=>new Promise((s,n)=>{var l=i=>{try{h(o.next(i))}catch(b){n(b)}},p=i=>{try{h(o.throw(i))}catch(b){n(b)}},h=i=>i.done?s(i.value):Promise.resolve(i.value).then(l,p);h((o=o.apply(k,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=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("./store-CU2wm4LQ.cjs"),ee=require("./index-By4IGBQZ.cjs");require("./element-resize-detector-CNNVPUiP.cjs");const te=require("./BaseComponent-DhHavntG.cjs"),re=require("./titleStyle-NSnz6cUg.cjs"),q=require("./ele-crd-icon-BvNgAPKW.cjs");class oe extends te.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(l=>{const p=n?`${n}.${l.key}`:l.key;if(l.form_type==="sub_form"&&l.properties&&!l.items){o(l.properties,p);return}if(l.form_type==="sub_form"&&l.items)return;const h=this.buildValidationRules(l);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(l=>{n[l.key]=this.getDefaultValue(l)}),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,l;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]],i=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((l=i==null?void 0:i.property)!=null&&l.hidden)return!0}return!1}isFieldDisabled(t){var o,s,n,l;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]],i=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((l=i==null?void 0:i.property)!=null&&l.disabled)return!0}return!1}getFieldOptions(t){var s,n;let o=t.enum||[];if(t.rules)for(const l of t.rules){if(!l.related_key)continue;const p=this.formData[l.related_key],h=(s=l.conditions)==null?void 0:s.find(i=>i.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(l=>{s[l.key]=this.getDefaultValue(l)}),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,l;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(),i=(n=p.conditions)==null?void 0:n.find(b=>b.value===o[h]);if((l=i==null?void 0:i.property)!=null&&l.enum)return i.property.enum}return[]}onSubFieldChange(t,o,s){var l;(((l=t.items)==null?void 0:l.properties)||t.properties||[]).forEach(p=>{var h;if(p.rules)for(const i of p.rules)((h=i.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 l=t[n.key];n.form_type==="sub_form"?n.properties&&!n.items?s[n.key]=this.convertFormDataToOriginal(l||{},n.properties):(p=n.items)!=null&&p.properties&&(s[n.key]=Array.isArray(l)?l.map(h=>this.convertArrayItemToOriginal(h,n.items.properties)):[]):n.db_type==="boolean"&&typeof l=="boolean"?s[n.key]=l?"true":"false":s[n.key]=l}),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 se={class:"mix-body"},ne={key:0,class:"json-editor"},ae={class:"editor-header"},ie={key:1,class:"edit-toolbar"},le={key:2,class:"empty-state"},ue={key:3,class:"form-content"},ce={key:0,class:"form-description"},de={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"动态表单",NAME_EN:"ActionItem",ORDER:1},me={titleColor:"#111",bgColor:"#fff",radiusSize:8,labelWidth:100,isHideTitle:!1,showButtons:!0},fe={},pe=[],he=[],ye={},ge={DEFAULT:de,OPTIONS:me,DATA:fe,PARAMS:pe,SOURCE:he,COMMON:ye},_e=e.defineComponent(T(O({},ge),{__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(""),l=t,p=Z.useCounterStore(),h=e.ref(),i=new oe(o);i.setupLifecycle(),i.watchParams();const b=i.getStyle(),C=e.computed(()=>o.conf||{}),z=e.computed(()=>re.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(x=>x.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 x=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"},x.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 x=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"},x.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={};x.forEach(D=>{y[D.key]=R(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,()=>U(r,u,m,f))}}});function U(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 x=r[f]===!0||r[f]==="true";return e.h(c.ElSwitch,{modelValue:x,"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 R(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 M=()=>{const a=i.applyJson();a.success?c.ElMessage.success("JSON 配置已应用"):c.ElMessage.error(a.error||"JSON 格式错误")},H=()=>{i.saveFormData(),c.ElMessage.success("保存成功")},L=()=>J(null,null,function*(){var a;try{yield(a=h.value)==null?void 0:a.validate();const r=i.exportTargetJson();n.value=JSON.stringify(r,null,2),s.value=!0,l("generate",r)}catch(r){c.ElMessage.error("请先完善必填项")}}),W=()=>{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,i)}),e.onUnmounted(()=>{p.unregisterInstance(o.uid)}),e.watchEffect(()=>{o.conf.socketData&&i.setSocketData(o.conf.socketData)}),(a,r)=>{const m=P.ElEmpty,f=P.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(z.value)},e.toDisplayString(C.value.action_name||C.value.caption||C.value.name),5),e.createElementVNode("div",se,[k.mode==="edit"&&e.unref(i).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",ae,[r[8]||(r[8]=e.createElementVNode("span",null,"JSON 配置",-1)),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:M},{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(i).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(i).jsonInput.value,"onUpdate:modelValue":r[1]||(r[1]=d=>e.unref(i).jsonInput.value=d),rows:12,placeholder:"粘贴 action_item JSON..."},null,8,["modelValue"])])):e.createCommentVNode("",!0),k.mode==="edit"&&!e.unref(i).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(e.unref(c.ElButton),{size:"small",type:"primary",onClick:r[2]||(r[2]=d=>e.unref(i).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:W},{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(i).hasParams&&k.mode!=="edit"?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(m,{description:"等待表单配置...","image-size":80})])):e.createCommentVNode("",!0),e.unref(i).hasParams?(e.openBlock(),e.createElementBlock("div",ue,[C.value.description?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("p",null,e.toDisplayString(C.value.description),1)])):e.createCommentVNode("",!0),e.createVNode(f,{ref_key:"formRef",ref:h,model:e.unref(i).formData,rules:e.unref(i).getFormRules(),"label-width":e.unref(b).labelWidth+"px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i).getVisibleParams(),d=>(e.openBlock(),e.createBlock(e.unref(I),{key:d.key,param:d,rootData:e.unref(i).formData,actionItem:e.unref(i)},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:H},{default:e.withCtx(()=>[...r[12]||(r[12]=[e.createTextVNode("保存",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"success",onClick:L},{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)}}})),ke=ee._export_sfc(_e,[["__scopeId","data-v-0174b7e7"]]);exports.default=ke;
@@ -33,10 +33,10 @@ import "element-plus/es/components/empty/style/css";
33
33
  import { reactive as be, ref as z, watch as ke, defineComponent as G, computed as Q, h as f, onMounted as ve, onUnmounted as Ve, watchEffect as De, openBlock as O, createElementBlock as w, normalizeStyle as X, unref as c, createElementVNode as $, toDisplayString as Y, createVNode as V, withCtx as D, createTextVNode as C, createCommentVNode as I, Fragment as Se, renderList as Fe, createBlock as Z, renderSlot as Oe } 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 } from "./store-B2tvvJAl.js";
37
- import { _ as Ae } from "./index-Dr1OQXVD.js";
38
- import "./element-resize-detector-C78XitMC.js";
39
- import { B as Ie } from "./BaseComponent-sx-foTs7.js";
36
+ import { u as Ce } from "./store-NrnyUk6l.js";
37
+ import { _ as Ae } from "./index-LaRCo47G.js";
38
+ import "./element-resize-detector-_sDR6e5I.js";
39
+ import { B as Ie } from "./BaseComponent-B7wPQZV9.js";
40
40
  import { g as Je } from "./titleStyle-BT5GlpAb.js";
41
41
  import { A as Ne, D as Pe } from "./ele-crd-icon-BXxB7P3T.js";
42
42
  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,U=Object.prototype.propertyIsEnumerable;var z=(c,o,n)=>o in c?w(c,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):c[o]=n,M=(c,o)=>{for(var n in o||(o={}))R.call(o,n)&&z(c,n,o[n]);if(I)for(var n of I(o))U.call(o,n)&&z(c,n,o[n]);return c},k=(c,o)=>V(c,q(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");require("html2canvas");const $=require("./index-STA_Vn2W.cjs"),W=require("./EChartComponentBase-mvy_IwEY.cjs"),L=require("./ele-lin-icon-Dke_1AmT.cjs"),H={class:"panel-header"},P=["id"],G={DEFAULT_ICON:L.DEFAULT_ICON,ACTIVE_ICON:L.ACTIVE_ICON,NAME_CN:"预警等级",NAME_EN:"Alarm Level Chart",ORDER:12},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(M({},ee),{__name:"alarmLevelChart",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(c){const o=c,n=["一级告警","二级告警","三级告警","四级告警","运行正常"],p=new Map;class D extends W.EChartComponentBase{extractStyles(){var i,s,r,d,g,y,S,_,x,E,F,O,A,N;const e=(i=this.props.conf)==null?void 0:i.options,v=((s=e==null?void 0:e.linkChannel)==null?void 0:s.value)||"gnss",a=((r=e==null?void 0:e.customChannel)==null?void 0:r.value)||"";return{title:((d=e==null?void 0:e.title)==null?void 0:d.value)||"预警等级",bgColor:((g=e==null?void 0:e.bgColor)==null?void 0:g.value)||"#f5f7fa",panelBgColor:((y=e==null?void 0:e.panelBgColor)==null?void 0:y.value)||"#ffffff",textColor:((S=e==null?void 0:e.textColor)==null?void 0:S.value)||"#333333",titleFontSize:((_=e==null?void 0:e.titleFontSize)==null?void 0:_.value)||16,centerFontSize:((x=e==null?void 0:e.centerFontSize)==null?void 0:x.value)||32,level1Color:((E=e==null?void 0:e.level1Color)==null?void 0:E.value)||"#F57676",level2Color:((F=e==null?void 0:e.level2Color)==null?void 0:F.value)||"#FFA500",level3Color:((O=e==null?void 0:e.level3Color)==null?void 0:O.value)||"#fadb14",level4Color:((A=e==null?void 0:e.level4Color)==null?void 0:A.value)||"#66B1FF",normalColor:((N=e==null?void 0:e.normalColor)==null?void 0:N.value)||"#67C23A",linkChannel:v==="custom"&&a?a:v}}getChartOption(){return f(this.Style.value)}setSocketData(e){var a;if(!e)return;(((a=this.props.conf)==null?void 0:a.data)||[]).forEach(i=>{if(!i.fv)return;const s=i.object_id||i.name||"";if(!s)return;const r=this.extractDataValue(e,i.fv);if(r!=null){const d=typeof r=="number"?Math.min(Math.max(Math.round(r),0),4):4;p.set(s,d)}}),this.chartObj&&this.chartObj.setOption(f(this.Style.value),!0)}onLinkEvent(e){}}const u=new D(o,"alarmLevelChart");u.setupLifecycle();const m=u.getStyle(),T=u.getEchartId(),C=l.computed(()=>{var t;return((t=o.conf)==null?void 0:t.data)||[]}),h=l.computed(()=>{const t=[0,0,0,0,0];return C.value.length===0&&o.mode==="edit"?[2,5,5,4,7]:(C.value.forEach(e=>{const v=e.object_id||e.name||"",a=p.get(v),i=typeof a=="number"?a:4;t[i]++}),t)}),j=l.computed(()=>{const t=h.value;for(let e=0;e<5;e++)if(t[e]>0)return{idx:e,count:t[e],name:n[e]};return{idx:4,count:0,name:"运行正常"}}),B=l.computed(()=>({backgroundColor:m.value.bgColor})),f=t=>{const e=h.value,v=[t.level1Color,t.level2Color,t.level3Color,t.level4Color,t.normalColor],a=j.value,i=v[a.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 r=n.indexOf(s);return`${s} ${r>=0?e[r]:0}`}},series:[{type:"pie",radius:["48%","70%"],center:["30%","50%"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:()=>`{num|${a.count}}
1
+ "use strict";var w=Object.defineProperty,V=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var z=(c,o,n)=>o in c?w(c,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):c[o]=n,M=(c,o)=>{for(var n in o||(o={}))R.call(o,n)&&z(c,n,o[n]);if(I)for(var n of I(o))U.call(o,n)&&z(c,n,o[n]);return c},k=(c,o)=>V(c,q(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");require("html2canvas");const $=require("./index-By4IGBQZ.cjs"),W=require("./EChartComponentBase-y-56bxn_.cjs"),L=require("./ele-lin-icon-Dke_1AmT.cjs"),H={class:"panel-header"},P=["id"],G={DEFAULT_ICON:L.DEFAULT_ICON,ACTIVE_ICON:L.ACTIVE_ICON,NAME_CN:"预警等级",NAME_EN:"Alarm Level Chart",ORDER:12},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(M({},ee),{__name:"alarmLevelChart",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(c){const o=c,n=["一级告警","二级告警","三级告警","四级告警","运行正常"],p=new Map;class D extends W.EChartComponentBase{extractStyles(){var i,s,r,d,g,y,S,_,x,E,F,O,A,N;const e=(i=this.props.conf)==null?void 0:i.options,v=((s=e==null?void 0:e.linkChannel)==null?void 0:s.value)||"gnss",a=((r=e==null?void 0:e.customChannel)==null?void 0:r.value)||"";return{title:((d=e==null?void 0:e.title)==null?void 0:d.value)||"预警等级",bgColor:((g=e==null?void 0:e.bgColor)==null?void 0:g.value)||"#f5f7fa",panelBgColor:((y=e==null?void 0:e.panelBgColor)==null?void 0:y.value)||"#ffffff",textColor:((S=e==null?void 0:e.textColor)==null?void 0:S.value)||"#333333",titleFontSize:((_=e==null?void 0:e.titleFontSize)==null?void 0:_.value)||16,centerFontSize:((x=e==null?void 0:e.centerFontSize)==null?void 0:x.value)||32,level1Color:((E=e==null?void 0:e.level1Color)==null?void 0:E.value)||"#F57676",level2Color:((F=e==null?void 0:e.level2Color)==null?void 0:F.value)||"#FFA500",level3Color:((O=e==null?void 0:e.level3Color)==null?void 0:O.value)||"#fadb14",level4Color:((A=e==null?void 0:e.level4Color)==null?void 0:A.value)||"#66B1FF",normalColor:((N=e==null?void 0:e.normalColor)==null?void 0:N.value)||"#67C23A",linkChannel:v==="custom"&&a?a:v}}getChartOption(){return f(this.Style.value)}setSocketData(e){var a;if(!e)return;(((a=this.props.conf)==null?void 0:a.data)||[]).forEach(i=>{if(!i.fv)return;const s=i.object_id||i.name||"";if(!s)return;const r=this.extractDataValue(e,i.fv);if(r!=null){const d=typeof r=="number"?Math.min(Math.max(Math.round(r),0),4):4;p.set(s,d)}}),this.chartObj&&this.chartObj.setOption(f(this.Style.value),!0)}onLinkEvent(e){}}const u=new D(o,"alarmLevelChart");u.setupLifecycle();const m=u.getStyle(),T=u.getEchartId(),C=l.computed(()=>{var t;return((t=o.conf)==null?void 0:t.data)||[]}),h=l.computed(()=>{const t=[0,0,0,0,0];return C.value.length===0&&o.mode==="edit"?[2,5,5,4,7]:(C.value.forEach(e=>{const v=e.object_id||e.name||"",a=p.get(v),i=typeof a=="number"?a:4;t[i]++}),t)}),j=l.computed(()=>{const t=h.value;for(let e=0;e<5;e++)if(t[e]>0)return{idx:e,count:t[e],name:n[e]};return{idx:4,count:0,name:"运行正常"}}),B=l.computed(()=>({backgroundColor:m.value.bgColor})),f=t=>{const e=h.value,v=[t.level1Color,t.level2Color,t.level3Color,t.level4Color,t.normalColor],a=j.value,i=v[a.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 r=n.indexOf(s);return`${s} ${r>=0?e[r]:0}`}},series:[{type:"pie",radius:["48%","70%"],center:["30%","50%"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:()=>`{num|${a.count}}
2
2
  {txt|${a.name}}`,rich:{num:{fontSize:t.centerFontSize,fontWeight:"bold",color:i,lineHeight:t.centerFontSize+10},txt:{fontSize:13,color:"#999",lineHeight:22}}},labelLine:{show:!1},itemStyle:{borderRadius:4,borderColor:"#fff",borderWidth:2},data:n.map((s,r)=>({value:e[r],name:s,itemStyle:{color:v[r]}}))}]}},b=()=>{const t=u.getChartInstance();t&&t.setOption(f(m.value),!0)};return l.onMounted(()=>{u.init(),o.mode==="edit"&&b(),setTimeout(()=>{var t;return(t=u.getChartInstance())==null?void 0:t.resize()},200)}),l.onUnmounted(()=>{u.cleanup()}),l.watch(()=>o.conf,()=>{u.init(),o.mode==="edit"&&b()},{deep:!0}),(t,e)=>(l.openBlock(),l.createElementBlock("div",{class:"alarm-level-chart",style:l.normalizeStyle(B.value)},[l.createElementVNode("div",H,[e[0]||(e[0]=l.createElementVNode("span",{class:"indicator-dot"},null,-1)),l.createElementVNode("span",{class:"panel-title",style:l.normalizeStyle({color:l.unref(m).textColor,fontSize:l.unref(m).titleFontSize+"px"})},l.toDisplayString(l.unref(m).title),5)]),l.createElementVNode("div",{id:l.unref(T),class:"chart-container"},null,8,P),l.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),le=$._export_sfc(te,[["__scopeId","data-v-3aa168c8"]]);exports.default=le;
@@ -12,8 +12,8 @@ var N = (r, l, o) => l in r ? $(r, l, { enumerable: !0, configurable: !0, writab
12
12
  }, L = (r, l) => U(r, W(l));
13
13
  import { defineComponent as G, computed as f, onMounted as P, onUnmounted as q, watch as J, openBlock as K, createElementBlock as Q, normalizeStyle as j, createElementVNode as p, unref as d, toDisplayString as X, renderSlot as Y } from "vue";
14
14
  import "html2canvas";
15
- import { _ as Z } from "./index-Dr1OQXVD.js";
16
- import { E as ee } from "./EChartComponentBase-Bo834W6o.js";
15
+ import { _ as Z } from "./index-LaRCo47G.js";
16
+ import { E as ee } from "./EChartComponentBase-BRBRhzrb.js";
17
17
  import { A as te, D as le } from "./ele-lin-icon-Dax-ZiWV.js";
18
18
  const oe = { class: "panel-header" }, ae = ["id"], ne = { DEFAULT_ICON: le, ACTIVE_ICON: te, NAME_CN: "预警等级", NAME_EN: "Alarm Level Chart", ORDER: 12 }, re = {
19
19
  title: { value: "预警等级", type: "string", label: "标题" },
@@ -1 +1 @@
1
- "use strict";var R=Object.defineProperty,q=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var L=(d,o,s)=>o in d?R(d,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):d[o]=s,S=(d,o)=>{for(var s in o||(o={}))G.call(o,s)&&L(d,s,o[s]);if(I)for(var s of I(o))$.call(o,s)&&L(d,s,o[s]);return d},B=(d,o)=>q(d,U(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");require("html2canvas");const W=require("./BaseComponent-C4c2vBxN.cjs"),H=require("./index-STA_Vn2W.cjs");require("./element-resize-detector-CLXm1nKt.cjs");const F=require("./ele-lst-icon-CrxnHZ-A.cjs"),J={class:"panel-header"},K={class:"header-left"},Q={class:"header-title"},X={class:"header-right"},Y=["disabled"],Z={class:"page-info"},ee=["disabled"],le={class:"table-area"},te={class:"data-table"},ae=["onClick"],re={DEFAULT_ICON:F.DEFAULT_ICON,ACTIVE_ICON:F.ACTIVE_ICON,NAME_CN:"监测预警表格",NAME_EN:"Alert Table",ORDER:2},ne={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"}}},oe=[{object_id:"",threshold:"8"}],ce=["object_id","threshold"],se=["mosaic","statistics"],ue={useAlias:!1,multiObject:!0,source:"mosaic"},ie={DEFAULT:re,OPTIONS:ne,DATA:oe,PARAMS:ce,SOURCE:se,COMMON:ue},de=l.defineComponent(B(S({},ie),{__name:"alertTable",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(d){const o=d;class s extends W.BaseComponent{extractStyles(){var f,h,u,b,i,g,V,N,T,A;const{options:e}=this.props.conf,a=[{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}],n=[{name:"正常",minValue:0,maxValue:5,color:"#52c41a"},{name:"二级告警 (警告)",minValue:5,maxValue:10,color:"#faad14"},{name:"一级告警 (危险)",minValue:10,maxValue:999,color:"#ff4d4f"}],r=((f=e==null?void 0:e.linkChannel)==null?void 0:f.value)||"gnss",v=((h=e==null?void 0:e.customChannel)==null?void 0:h.value)||"",p=r==="custom"&&v?v:r;return{title:((u=e==null?void 0:e.title)==null?void 0:u.value)||"监测预警 (GNSS)",bgColor:((b=e==null?void 0:e.bgColor)==null?void 0:b.value)||"#ffffff",textColor:((i=e==null?void 0:e.textColor)==null?void 0:i.value)||"#333333",headerBgColor:((g=e==null?void 0:e.headerBgColor)==null?void 0:g.value)||"#f5f5f5",pageSize:((V=e==null?void 0:e.pageSize)==null?void 0:V.value)||5,alertColumn:((N=e==null?void 0:e.alertColumn)==null?void 0:N.value)||"speed",alertLevels:((T=e==null?void 0:e.alertLevels)==null?void 0:T.value)||n,columns:((A=e==null?void 0:e.columns)==null?void 0:A.value)||a,linkChannel:p}}setSocketData(e){var f,h;if(!e)return;const{data:a,options:n}=this.props.conf;if(!a||!Array.isArray(a))return;const v=(((f=n==null?void 0:n.columns)==null?void 0:f.value)||[]).filter(u=>u.useFv).map(u=>u.key);if(v.length===0)return;const p=e.object_id||((h=e.data)==null?void 0:h.object_id)||"";a.forEach(u=>{u.object_id&&(p&&String(u.object_id)!==String(p)||v.forEach(b=>{try{const i=this.extractDataValue(e,b);i!=null&&(u[b]=i)}catch(i){console.warn(`[alertTable] 提取字段 ${b} 失败:`,i)}}))})}}const y=new s(o,"alertTable");y.setupLifecycle();const c=y.getStyle(),m=l.ref(1),x=l.ref(!1),j=t=>{const e=c.value.linkChannel,a=y.linkStore.channels[e];if(!a)return!1;const{payload:n}=a;return n.objectId&&t.object_id?String(n.objectId)===String(t.object_id):n.deviceId&&t.deviceId?String(n.deviceId)===String(t.deviceId):!1},C=l.computed(()=>{const t=c.value.columns||[];return[{key:"index",label:"序号",width:"60px"},...t]}),D=t=>{const e=c.value.alertLevels||[];if(isNaN(t)||e.length===0)return{alertLevel:0,alertText:"正常",alertColor:"#52c41a"};for(let n=0;n<e.length;n++){const r=e[n];if(t>=r.minValue&&t<r.maxValue)return{alertLevel:n,alertText:r.name,alertColor:r.color}}const a=e[e.length-1];return{alertLevel:e.length-1,alertText:a.name,alertColor:a.color}},k=l.computed(()=>{var n;const t=((n=o.conf)==null?void 0:n.data)||[],e=c.value.alertColumn||"";return(o.mode==="preview"?t.filter(r=>r.object_id):t).map((r,v)=>{const p=e&&parseFloat(r[e])||0,{alertLevel:f,alertText:h,alertColor:u}=D(p),b={index:v+1,object_id:r.object_id||"",isAlert:f>0,alertLevel:f,alertText:h,alertColor:u,_exceed:p-(parseFloat(r.threshold)||0)};return C.value.forEach(i=>{var g;i.key!=="index"&&(b[i.key]=(g=r[i.key])!=null?g:"-")}),b}).sort((r,v)=>v._exceed-r._exceed).map((r,v)=>(r.index=v+1,r))}),w=t=>t.alertColor?{color:t.alertColor}:{},_=l.computed(()=>Math.max(1,Math.ceil(k.value.length/c.value.pageSize))),O=l.computed(()=>{const t=(m.value-1)*c.value.pageSize,e=t+c.value.pageSize;return k.value.slice(t,e)}),z=l.computed(()=>({backgroundColor:c.value.bgColor,color:c.value.textColor,"--header-bg":c.value.headerBgColor})),M=()=>{m.value>1&&m.value--},P=()=>{m.value<_.value&&m.value++},E=t=>{o.mode!=="edit"&&y.publish(S({objectId:t.object_id,deviceId:t.deviceId||"",alertLevels:c.value.alertLevels},t))};return l.watch(()=>o.conf,()=>{m.value=1},{deep:!0}),l.watch(k,t=>{if(x.value||o.mode!=="preview"||!t||t.length===0)return;const e=t[0],a=c.value.alertColumn||"";!a||e[a]==="-"||e[a]===void 0||(x.value=!0,E(e))}),(t,e)=>(l.openBlock(),l.createElementBlock("div",{class:"alert-table-wrapper",style:l.normalizeStyle(z.value)},[l.createElementVNode("div",J,[l.createElementVNode("div",K,[e[0]||(e[0]=l.createElementVNode("div",{class:"header-indicator"},null,-1)),l.createElementVNode("span",Q,l.toDisplayString(l.unref(c).title),1)]),l.createElementVNode("div",X,[l.createElementVNode("button",{class:"page-btn",disabled:m.value<=1,onClick:M},[...e[1]||(e[1]=[l.createElementVNode("span",null,"<",-1)])],8,Y),l.createElementVNode("span",Z,l.toDisplayString(m.value)+" / "+l.toDisplayString(_.value),1),l.createElementVNode("button",{class:"page-btn",disabled:m.value>=_.value,onClick:P},[...e[2]||(e[2]=[l.createElementVNode("span",null,">",-1)])],8,ee)])]),l.createElementVNode("div",le,[l.createElementVNode("table",te,[l.createElementVNode("thead",null,[l.createElementVNode("tr",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.value,a=>(l.openBlock(),l.createElementBlock("th",{key:a.key,style:l.normalizeStyle({width:a.width})},l.toDisplayString(a.label),5))),128))])]),l.createElementVNode("tbody",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(O.value,(a,n)=>(l.openBlock(),l.createElementBlock("tr",{key:n,class:l.normalizeClass({"alert-row":a.isAlert,"active-row":j(a)}),onClick:r=>E(a)},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.value,r=>(l.openBlock(),l.createElementBlock("td",{key:r.key,style:l.normalizeStyle(w(a))},l.toDisplayString(a[r.key]),5))),128))],10,ae))),128))])])]),l.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),ve=H._export_sfc(de,[["__scopeId","data-v-5507d389"]]);exports.default=ve;
1
+ "use strict";var R=Object.defineProperty,q=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var L=(d,o,s)=>o in d?R(d,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):d[o]=s,S=(d,o)=>{for(var s in o||(o={}))G.call(o,s)&&L(d,s,o[s]);if(I)for(var s of I(o))$.call(o,s)&&L(d,s,o[s]);return d},B=(d,o)=>q(d,U(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");require("html2canvas");const W=require("./BaseComponent-DhHavntG.cjs"),H=require("./index-By4IGBQZ.cjs");require("./element-resize-detector-CNNVPUiP.cjs");const F=require("./ele-lst-icon-CrxnHZ-A.cjs"),J={class:"panel-header"},K={class:"header-left"},Q={class:"header-title"},X={class:"header-right"},Y=["disabled"],Z={class:"page-info"},ee=["disabled"],le={class:"table-area"},te={class:"data-table"},ae=["onClick"],re={DEFAULT_ICON:F.DEFAULT_ICON,ACTIVE_ICON:F.ACTIVE_ICON,NAME_CN:"监测预警表格",NAME_EN:"Alert Table",ORDER:2},ne={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"}}},oe=[{object_id:"",threshold:"8"}],ce=["object_id","threshold"],se=["mosaic","statistics"],ue={useAlias:!1,multiObject:!0,source:"mosaic"},ie={DEFAULT:re,OPTIONS:ne,DATA:oe,PARAMS:ce,SOURCE:se,COMMON:ue},de=l.defineComponent(B(S({},ie),{__name:"alertTable",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(d){const o=d;class s extends W.BaseComponent{extractStyles(){var f,h,u,b,i,g,V,N,T,A;const{options:e}=this.props.conf,a=[{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}],n=[{name:"正常",minValue:0,maxValue:5,color:"#52c41a"},{name:"二级告警 (警告)",minValue:5,maxValue:10,color:"#faad14"},{name:"一级告警 (危险)",minValue:10,maxValue:999,color:"#ff4d4f"}],r=((f=e==null?void 0:e.linkChannel)==null?void 0:f.value)||"gnss",v=((h=e==null?void 0:e.customChannel)==null?void 0:h.value)||"",p=r==="custom"&&v?v:r;return{title:((u=e==null?void 0:e.title)==null?void 0:u.value)||"监测预警 (GNSS)",bgColor:((b=e==null?void 0:e.bgColor)==null?void 0:b.value)||"#ffffff",textColor:((i=e==null?void 0:e.textColor)==null?void 0:i.value)||"#333333",headerBgColor:((g=e==null?void 0:e.headerBgColor)==null?void 0:g.value)||"#f5f5f5",pageSize:((V=e==null?void 0:e.pageSize)==null?void 0:V.value)||5,alertColumn:((N=e==null?void 0:e.alertColumn)==null?void 0:N.value)||"speed",alertLevels:((T=e==null?void 0:e.alertLevels)==null?void 0:T.value)||n,columns:((A=e==null?void 0:e.columns)==null?void 0:A.value)||a,linkChannel:p}}setSocketData(e){var f,h;if(!e)return;const{data:a,options:n}=this.props.conf;if(!a||!Array.isArray(a))return;const v=(((f=n==null?void 0:n.columns)==null?void 0:f.value)||[]).filter(u=>u.useFv).map(u=>u.key);if(v.length===0)return;const p=e.object_id||((h=e.data)==null?void 0:h.object_id)||"";a.forEach(u=>{u.object_id&&(p&&String(u.object_id)!==String(p)||v.forEach(b=>{try{const i=this.extractDataValue(e,b);i!=null&&(u[b]=i)}catch(i){console.warn(`[alertTable] 提取字段 ${b} 失败:`,i)}}))})}}const y=new s(o,"alertTable");y.setupLifecycle();const c=y.getStyle(),m=l.ref(1),x=l.ref(!1),j=t=>{const e=c.value.linkChannel,a=y.linkStore.channels[e];if(!a)return!1;const{payload:n}=a;return n.objectId&&t.object_id?String(n.objectId)===String(t.object_id):n.deviceId&&t.deviceId?String(n.deviceId)===String(t.deviceId):!1},C=l.computed(()=>{const t=c.value.columns||[];return[{key:"index",label:"序号",width:"60px"},...t]}),D=t=>{const e=c.value.alertLevels||[];if(isNaN(t)||e.length===0)return{alertLevel:0,alertText:"正常",alertColor:"#52c41a"};for(let n=0;n<e.length;n++){const r=e[n];if(t>=r.minValue&&t<r.maxValue)return{alertLevel:n,alertText:r.name,alertColor:r.color}}const a=e[e.length-1];return{alertLevel:e.length-1,alertText:a.name,alertColor:a.color}},k=l.computed(()=>{var n;const t=((n=o.conf)==null?void 0:n.data)||[],e=c.value.alertColumn||"";return(o.mode==="preview"?t.filter(r=>r.object_id):t).map((r,v)=>{const p=e&&parseFloat(r[e])||0,{alertLevel:f,alertText:h,alertColor:u}=D(p),b={index:v+1,object_id:r.object_id||"",isAlert:f>0,alertLevel:f,alertText:h,alertColor:u,_exceed:p-(parseFloat(r.threshold)||0)};return C.value.forEach(i=>{var g;i.key!=="index"&&(b[i.key]=(g=r[i.key])!=null?g:"-")}),b}).sort((r,v)=>v._exceed-r._exceed).map((r,v)=>(r.index=v+1,r))}),w=t=>t.alertColor?{color:t.alertColor}:{},_=l.computed(()=>Math.max(1,Math.ceil(k.value.length/c.value.pageSize))),O=l.computed(()=>{const t=(m.value-1)*c.value.pageSize,e=t+c.value.pageSize;return k.value.slice(t,e)}),z=l.computed(()=>({backgroundColor:c.value.bgColor,color:c.value.textColor,"--header-bg":c.value.headerBgColor})),M=()=>{m.value>1&&m.value--},P=()=>{m.value<_.value&&m.value++},E=t=>{o.mode!=="edit"&&y.publish(S({objectId:t.object_id,deviceId:t.deviceId||"",alertLevels:c.value.alertLevels},t))};return l.watch(()=>o.conf,()=>{m.value=1},{deep:!0}),l.watch(k,t=>{if(x.value||o.mode!=="preview"||!t||t.length===0)return;const e=t[0],a=c.value.alertColumn||"";!a||e[a]==="-"||e[a]===void 0||(x.value=!0,E(e))}),(t,e)=>(l.openBlock(),l.createElementBlock("div",{class:"alert-table-wrapper",style:l.normalizeStyle(z.value)},[l.createElementVNode("div",J,[l.createElementVNode("div",K,[e[0]||(e[0]=l.createElementVNode("div",{class:"header-indicator"},null,-1)),l.createElementVNode("span",Q,l.toDisplayString(l.unref(c).title),1)]),l.createElementVNode("div",X,[l.createElementVNode("button",{class:"page-btn",disabled:m.value<=1,onClick:M},[...e[1]||(e[1]=[l.createElementVNode("span",null,"<",-1)])],8,Y),l.createElementVNode("span",Z,l.toDisplayString(m.value)+" / "+l.toDisplayString(_.value),1),l.createElementVNode("button",{class:"page-btn",disabled:m.value>=_.value,onClick:P},[...e[2]||(e[2]=[l.createElementVNode("span",null,">",-1)])],8,ee)])]),l.createElementVNode("div",le,[l.createElementVNode("table",te,[l.createElementVNode("thead",null,[l.createElementVNode("tr",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.value,a=>(l.openBlock(),l.createElementBlock("th",{key:a.key,style:l.normalizeStyle({width:a.width})},l.toDisplayString(a.label),5))),128))])]),l.createElementVNode("tbody",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(O.value,(a,n)=>(l.openBlock(),l.createElementBlock("tr",{key:n,class:l.normalizeClass({"alert-row":a.isAlert,"active-row":j(a)}),onClick:r=>E(a)},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.value,r=>(l.openBlock(),l.createElementBlock("td",{key:r.key,style:l.normalizeStyle(w(a))},l.toDisplayString(a[r.key]),5))),128))],10,ae))),128))])])]),l.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),ve=H._export_sfc(de,[["__scopeId","data-v-5507d389"]]);exports.default=ve;
@@ -12,9 +12,9 @@ var B = (d, n, u) => n in d ? K(d, n, { enumerable: !0, configurable: !0, writab
12
12
  }, M = (d, n) => Q(d, X(n));
13
13
  import { defineComponent as ee, ref as P, computed as _, watch as R, openBlock as g, createElementBlock as C, normalizeStyle as j, createElementVNode as o, toDisplayString as x, unref as le, Fragment as I, renderList as L, normalizeClass as te, renderSlot as ae } from "vue";
14
14
  import "html2canvas";
15
- import { B as re } from "./BaseComponent-sx-foTs7.js";
16
- import { _ as ne } from "./index-Dr1OQXVD.js";
17
- import "./element-resize-detector-C78XitMC.js";
15
+ import { B as re } from "./BaseComponent-B7wPQZV9.js";
16
+ import { _ as ne } from "./index-LaRCo47G.js";
17
+ import "./element-resize-detector-_sDR6e5I.js";
18
18
  import { A as oe, D as se } from "./ele-lst-icon-CKpeRKmk.js";
19
19
  const ue = { class: "panel-header" }, ce = { class: "header-left" }, ie = { class: "header-title" }, de = { class: "header-right" }, ve = ["disabled"], fe = { class: "page-info" }, me = ["disabled"], be = { class: "table-area" }, he = { class: "data-table" }, pe = ["onClick"], ge = {
20
20
  DEFAULT_ICON: se,
@@ -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 { u as le, d as oe, _ as ne } from "./index-Dr1OQXVD.js";
20
+ import { u as le, d as oe, _ as ne } from "./index-LaRCo47G.js";
21
21
  import { A as ae } from "./common-C2M2nTMe.js";
22
22
  import { A as se, D as ie } from "./ele-ctrSet-icon-BtKGrCid.js";
23
23
  const re = { class: "section-header" }, ce = { 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 = {
@@ -1 +1 @@
1
- "use strict";var M=Object.defineProperty,q=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,z=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))z.call(n,r)&&V(c,r,n[r]);return c},E=(c,n)=>q(c,L(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"),g=require("./index-STA_Vn2W.cjs"),B=require("./common-CRX05V1u.cjs"),j=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),F={class:"section-header"},U={class:"section-title"},Y={class:"row"},$={class:"label"},K={class:"row"},H={class:"row"},J={class:"row row-meta"},W={key:0},G={class:"payload-preview"},Q={DEFAULT_ICON:j.DEFAULT_ICON,ACTIVE_ICON:j.ACTIVE_ICON,NAME_CN:"对象别名选择器",NAME_EN:"Alias Object Selector",ORDER:22},X={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"}}},Z=[{key:"objectAlias",multiple:!0,pattern:"radar*",fvs:["disp","speed"]}],ee=[{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"}],te=[],le={useAlias:!0,multiObject:!0,source:""},oe={DEFAULT:Q,OPTIONS:X,DATA:Z,PARAMS:ee,SOURCE:te,COMMON:le},ne=e.defineComponent(E(S({},oe),{__name:"aliasObjectSelectorDemo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""}},setup(c){e.useCssVars(t=>({v9101dfd0:f.value.borderColor,v475ba4b8:f.value.color}));const n=c,r=g.useLinkStore(),d=e.ref("radar*"),m=e.ref("disp,speed"),p=e.ref([]),v=e.ref(""),C=e.ref(""),f=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(B.ALIAS_MAPPING_KEY)||"{}")||{}}catch(t){return{}}},D=t=>String(t||"").split(",").map(l=>l.trim()).filter(Boolean),I=t=>t.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),T=t=>{const l=I(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)},_=()=>{const t=String(d.value||"").trim();if(!t){p.value=[];return}const l=T(t),o=x();p.value=o.filter(a=>l.test(a.object_alias))},y=()=>{_();const t=p.value.map(i=>i.object_id),l=p.value.map(i=>i.object_alias),o=D(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),v.value=g.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(",")),_()}),(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(f.value)},[e.createElementVNode("div",F,[e.createElementVNode("span",U,e.toDisplayString(k.value),1)]),e.createElementVNode("div",Y,[e.createElementVNode("span",$,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",K,[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",H,[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:_},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("仅匹配",-1)])]),_:1})]),e.createElementVNode("div",J,[e.createElementVNode("span",null,"匹配数量:"+e.toDisplayString(p.value.length),1),v.value?(e.openBlock(),e.createElementBlock("span",W,"最近推送:"+e.toDisplayString(v.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",G,[l[5]||(l[5]=e.createElementVNode("div",{class:"preview-title"},"本次联动 payload 预览",-1)),e.createElementVNode("pre",null,e.toDisplayString(C.value),1)])],4)}}})),ae=g._export_sfc(ne,[["__scopeId","data-v-39da30e1"]]);exports.default=ae;
1
+ "use strict";var M=Object.defineProperty,q=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,z=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))z.call(n,r)&&V(c,r,n[r]);return c},E=(c,n)=>q(c,L(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"),g=require("./index-By4IGBQZ.cjs"),B=require("./common-CRX05V1u.cjs"),j=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),F={class:"section-header"},U={class:"section-title"},Y={class:"row"},$={class:"label"},K={class:"row"},H={class:"row"},J={class:"row row-meta"},W={key:0},G={class:"payload-preview"},Q={DEFAULT_ICON:j.DEFAULT_ICON,ACTIVE_ICON:j.ACTIVE_ICON,NAME_CN:"对象别名选择器",NAME_EN:"Alias Object Selector",ORDER:22},X={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"}}},Z=[{key:"objectAlias",multiple:!0,pattern:"radar*",fvs:["disp","speed"]}],ee=[{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"}],te=[],le={useAlias:!0,multiObject:!0,source:""},oe={DEFAULT:Q,OPTIONS:X,DATA:Z,PARAMS:ee,SOURCE:te,COMMON:le},ne=e.defineComponent(E(S({},oe),{__name:"aliasObjectSelectorDemo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""}},setup(c){e.useCssVars(t=>({v9101dfd0:f.value.borderColor,v475ba4b8:f.value.color}));const n=c,r=g.useLinkStore(),d=e.ref("radar*"),m=e.ref("disp,speed"),p=e.ref([]),v=e.ref(""),C=e.ref(""),f=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(B.ALIAS_MAPPING_KEY)||"{}")||{}}catch(t){return{}}},D=t=>String(t||"").split(",").map(l=>l.trim()).filter(Boolean),I=t=>t.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),T=t=>{const l=I(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)},_=()=>{const t=String(d.value||"").trim();if(!t){p.value=[];return}const l=T(t),o=x();p.value=o.filter(a=>l.test(a.object_alias))},y=()=>{_();const t=p.value.map(i=>i.object_id),l=p.value.map(i=>i.object_alias),o=D(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),v.value=g.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(",")),_()}),(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(f.value)},[e.createElementVNode("div",F,[e.createElementVNode("span",U,e.toDisplayString(k.value),1)]),e.createElementVNode("div",Y,[e.createElementVNode("span",$,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",K,[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",H,[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:_},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("仅匹配",-1)])]),_:1})]),e.createElementVNode("div",J,[e.createElementVNode("span",null,"匹配数量:"+e.toDisplayString(p.value.length),1),v.value?(e.openBlock(),e.createElementBlock("span",W,"最近推送:"+e.toDisplayString(v.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",G,[l[5]||(l[5]=e.createElementVNode("div",{class:"preview-title"},"本次联动 payload 预览",-1)),e.createElementVNode("pre",null,e.toDisplayString(C.value),1)])],4)}}})),ae=g._export_sfc(ne,[["__scopeId","data-v-39da30e1"]]);exports.default=ae;
@@ -1 +1 @@
1
- "use strict";var F=Object.defineProperty,T=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var v=(r,t,l)=>t in r?F(r,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[t]=l,g=(r,t)=>{for(var l in t||(t={}))D.call(t,l)&&v(r,l,t[l]);if(C)for(var l of C(t))M.call(t,l)&&v(r,l,t[l]);return r},S=(r,t)=>T(r,k(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),L=require("./index-STA_Vn2W.cjs"),R=require("./EChartComponentBase-mvy_IwEY.cjs"),A=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),z=require("./echarts-BB8O2KSA.cjs"),q=["id"],B={DEFAULT_ICON:A.DEFAULT_ICON,ACTIVE_ICON:A.ACTIVE_ICON,NAME_CN:"年累积降雨量",NAME_EN:"Annual Rainfall Chart",ORDER:2},V={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"}}},P=[{name:"日降雨量",fv:""}],U=["name","fv"],W=["mosaic"],G={useAlias:!1,multiObject:!1,source:"mosaic"},H=50,K={DEFAULT:B,OPTIONS:V,DATA:P,PARAMS:U,SOURCE:W,ITEMS:H,COMMON:G},Y=n.defineComponent(S(g({},K),{__name:"annualRainfallChart",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){const t=r,l=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],x=[45.2,52.1,68.5,92,115.4,188.2,215.5,192.1,145.6,88.4,55,42.8],f=n.ref(new Array(12).fill(0)),h=n.ref(""),_=n.computed(()=>{var s,e,a;return!!((e=(s=t.conf)==null?void 0:s.common)!=null&&e.object_id||(a=t.conf)!=null&&a.object_id)}),O=n.computed(()=>_.value||!!h.value),N=()=>{var e;const s=(e=t.conf)==null?void 0:e.data;return Array.isArray(s)&&s.length>0&&s[0].fv||""};class E extends R.EChartComponentBase{extractStyles(){var i,c,u,d,m,y,b;const e=(i=this.props.conf)==null?void 0:i.options,a=((c=e==null?void 0:e.linkChannel)==null?void 0:c.value)||"rainfall",o=((u=e==null?void 0:e.customChannel)==null?void 0:u.value)||"";return{bgColor:((d=e==null?void 0:e.bgColor)==null?void 0:d.value)||"#ffffff",yAxisName:((m=e==null?void 0:e.yAxisName)==null?void 0:m.value)||"毫米(mm)",barColor:((y=e==null?void 0:e.barColor)==null?void 0:y.value)||"#85C6F1",lineColor:((b=e==null?void 0:e.lineColor)==null?void 0:b.value)||"#F57676",linkChannel:a==="custom"&&o?o:a}}getChartOption(){if(!O.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 e=this.props.mode==="edit"?x:f.value,a=e.map((o,i)=>i===0?e[0]:i===e.length-1?e[e.length-1]:parseFloat(((e[i-1]+o+e[i+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:l,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 z.LinearGradient(0,0,0,1,[{offset:0,color:this.Style.value.barColor},{offset:1,color:"#1c3d90"}]),borderRadius:[2,2,0,0]},data:e},{name:"趋势走向",type:"line",smooth:!0,showSymbol:!0,symbolSize:4,lineStyle:{width:2,color:this.Style.value.lineColor},itemStyle:{color:this.Style.value.lineColor},data:a}]}}setSocketData(e){if(!e)return;const a=N();if(!a)return;const o=this.extractDataValue(e,a);if(o==null||isNaN(Number(o)))return;const i=e.datetime||"";let c=new Date().getMonth();if(i){const d=new Date(i.replace(/\//g,"-"));isNaN(d.getTime())||(c=d.getMonth())}const u=[...f.value];u[c]=parseFloat((u[c]+Number(o)).toFixed(2)),f.value=u,this.chartObj&&this.chartObj.setOption(this.getChartOption(),!0)}onLinkEvent(e){const{payload:a}=e;if(!a)return;const o=a.objectId||a.object_id;o&&(h.value=String(o),f.value=new Array(12).fill(0),this.initChart(),this.props.mode==="preview"&&this.subscribeBySource(this.getSource(),String(o)))}}const p=new E(t,"annualRainfallChart");p.setupLifecycle();const I=p.getEchartId(),w=p.getStyle(),j=n.computed(()=>({backgroundColor:w.value.bgColor,width:"100%",height:"100%"}));return(s,e)=>(n.openBlock(),n.createElementBlock("div",{class:"annual-rainfall-chart-wrap",style:n.normalizeStyle(j.value)},[n.createElementVNode("div",{id:n.unref(I),class:"chart-container"},null,8,q),n.renderSlot(s.$slots,"default",{},void 0,!0)],4))}})),$=L._export_sfc(Y,[["__scopeId","data-v-265ba44e"]]);exports.default=$;
1
+ "use strict";var F=Object.defineProperty,T=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var v=(r,t,l)=>t in r?F(r,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[t]=l,g=(r,t)=>{for(var l in t||(t={}))D.call(t,l)&&v(r,l,t[l]);if(C)for(var l of C(t))M.call(t,l)&&v(r,l,t[l]);return r},S=(r,t)=>T(r,k(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),L=require("./index-By4IGBQZ.cjs"),R=require("./EChartComponentBase-y-56bxn_.cjs"),A=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),z=require("./echarts-BB8O2KSA.cjs"),q=["id"],B={DEFAULT_ICON:A.DEFAULT_ICON,ACTIVE_ICON:A.ACTIVE_ICON,NAME_CN:"年累积降雨量",NAME_EN:"Annual Rainfall Chart",ORDER:2},V={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"}}},P=[{name:"日降雨量",fv:""}],U=["name","fv"],W=["mosaic"],G={useAlias:!1,multiObject:!1,source:"mosaic"},H=50,K={DEFAULT:B,OPTIONS:V,DATA:P,PARAMS:U,SOURCE:W,ITEMS:H,COMMON:G},Y=n.defineComponent(S(g({},K),{__name:"annualRainfallChart",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){const t=r,l=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],x=[45.2,52.1,68.5,92,115.4,188.2,215.5,192.1,145.6,88.4,55,42.8],f=n.ref(new Array(12).fill(0)),h=n.ref(""),_=n.computed(()=>{var s,e,a;return!!((e=(s=t.conf)==null?void 0:s.common)!=null&&e.object_id||(a=t.conf)!=null&&a.object_id)}),O=n.computed(()=>_.value||!!h.value),N=()=>{var e;const s=(e=t.conf)==null?void 0:e.data;return Array.isArray(s)&&s.length>0&&s[0].fv||""};class E extends R.EChartComponentBase{extractStyles(){var i,c,u,d,m,y,b;const e=(i=this.props.conf)==null?void 0:i.options,a=((c=e==null?void 0:e.linkChannel)==null?void 0:c.value)||"rainfall",o=((u=e==null?void 0:e.customChannel)==null?void 0:u.value)||"";return{bgColor:((d=e==null?void 0:e.bgColor)==null?void 0:d.value)||"#ffffff",yAxisName:((m=e==null?void 0:e.yAxisName)==null?void 0:m.value)||"毫米(mm)",barColor:((y=e==null?void 0:e.barColor)==null?void 0:y.value)||"#85C6F1",lineColor:((b=e==null?void 0:e.lineColor)==null?void 0:b.value)||"#F57676",linkChannel:a==="custom"&&o?o:a}}getChartOption(){if(!O.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 e=this.props.mode==="edit"?x:f.value,a=e.map((o,i)=>i===0?e[0]:i===e.length-1?e[e.length-1]:parseFloat(((e[i-1]+o+e[i+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:l,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 z.LinearGradient(0,0,0,1,[{offset:0,color:this.Style.value.barColor},{offset:1,color:"#1c3d90"}]),borderRadius:[2,2,0,0]},data:e},{name:"趋势走向",type:"line",smooth:!0,showSymbol:!0,symbolSize:4,lineStyle:{width:2,color:this.Style.value.lineColor},itemStyle:{color:this.Style.value.lineColor},data:a}]}}setSocketData(e){if(!e)return;const a=N();if(!a)return;const o=this.extractDataValue(e,a);if(o==null||isNaN(Number(o)))return;const i=e.datetime||"";let c=new Date().getMonth();if(i){const d=new Date(i.replace(/\//g,"-"));isNaN(d.getTime())||(c=d.getMonth())}const u=[...f.value];u[c]=parseFloat((u[c]+Number(o)).toFixed(2)),f.value=u,this.chartObj&&this.chartObj.setOption(this.getChartOption(),!0)}onLinkEvent(e){const{payload:a}=e;if(!a)return;const o=a.objectId||a.object_id;o&&(h.value=String(o),f.value=new Array(12).fill(0),this.initChart(),this.props.mode==="preview"&&this.subscribeBySource(this.getSource(),String(o)))}}const p=new E(t,"annualRainfallChart");p.setupLifecycle();const I=p.getEchartId(),w=p.getStyle(),j=n.computed(()=>({backgroundColor:w.value.bgColor,width:"100%",height:"100%"}));return(s,e)=>(n.openBlock(),n.createElementBlock("div",{class:"annual-rainfall-chart-wrap",style:n.normalizeStyle(j.value)},[n.createElementVNode("div",{id:n.unref(I),class:"chart-container"},null,8,q),n.renderSlot(s.$slots,"default",{},void 0,!0)],4))}})),$=L._export_sfc(Y,[["__scopeId","data-v-265ba44e"]]);exports.default=$;
@@ -11,8 +11,8 @@ var v = (n, t, l) => t in n ? k(n, t, { enumerable: !0, configurable: !0, writab
11
11
  return n;
12
12
  }, S = (n, t) => D(n, F(t));
13
13
  import { defineComponent as T, ref as A, computed as p, openBlock as L, createElementBlock as z, normalizeStyle as B, createElementVNode as P, unref as U, renderSlot as V } from "vue";
14
- import { _ as W } from "./index-Dr1OQXVD.js";
15
- import { E as G } from "./EChartComponentBase-Bo834W6o.js";
14
+ import { _ as W } from "./index-LaRCo47G.js";
15
+ import { E as G } from "./EChartComponentBase-BRBRhzrb.js";
16
16
  import { A as H, D as K } from "./ele-vlu-icon-Bg6EHZdJ.js";
17
17
  import { cn as Y } from "./echarts-BVht3HHb.js";
18
18
  const $ = ["id"], q = {