mixdashboards 1.0.65 → 1.0.67

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 (326) hide show
  1. package/dist/{BaseComponent-Bj7jDYan.cjs → BaseComponent-B676Wwpz.cjs} +1 -1
  2. package/dist/{BaseComponent-CJUfAya1.js → BaseComponent-CG-AFgtN.js} +3 -3
  3. package/dist/{EChartComponentBase-BAyczHNc.js → EChartComponentBase-Dz-sD1W6.js} +2 -2
  4. package/dist/{EChartComponentBase-Cwa2RHtb.cjs → EChartComponentBase-QSg0tlCw.cjs} +1 -1
  5. package/dist/{EmergencyPlanPanel-DuSEgJ34.cjs → EmergencyPlanPanel-XV55h1yN.cjs} +1 -1
  6. package/dist/{EmergencyPlanPanel-CZ__YzWa.js → EmergencyPlanPanel-bvL4v3D9.js} +1 -1
  7. package/dist/{HistoryPlanDialog-CkeZ6ko4.js → HistoryPlanDialog-B_Yo00Uf.js} +1 -1
  8. package/dist/{HistoryPlanDialog-BbRU1fES.cjs → HistoryPlanDialog-BnACsSzd.cjs} +1 -1
  9. package/dist/{MonitoringMap-CcF6htE-.js → MonitoringMap-C5ybdjOD.js} +2 -2
  10. package/dist/{MonitoringMap-CnmaTuXp.cjs → MonitoringMap-xoWTjrAK.cjs} +1 -1
  11. package/dist/{UniverSheet-DD64DP3k.js → UniverSheet-Djy0UOWW.js} +2 -2
  12. package/dist/{UniverSheet-BQnvHu2D.cjs → UniverSheet-LKJw4d4Y.cjs} +1 -1
  13. package/dist/{accelerationChart-DL48A-Da.cjs → accelerationChart-B3LzLVCd.cjs} +1 -1
  14. package/dist/{accelerationChart-De7KGZKj.js → accelerationChart-DsLMiLht.js} +2 -2
  15. package/dist/{actionItem-C8hGyrJu.js → actionItem-BcpswF_Q.js} +2 -2
  16. package/dist/{actionItem-CfB8CW8B.cjs → actionItem-h1iti88q.cjs} +1 -1
  17. package/dist/{alarmLevelChart-DY_6JlOy.js → alarmLevelChart-C6Ym5nsK.js} +2 -2
  18. package/dist/{alarmLevelChart-C2PefuuZ.cjs → alarmLevelChart-kOAKyLrG.cjs} +1 -1
  19. package/dist/{alertTable-CnzfCDUF.js → alertTable-CBFrdjsx.js} +2 -2
  20. package/dist/{alertTable-CPe7zFXX.cjs → alertTable-F_1kIyfw.cjs} +1 -1
  21. package/dist/{aliasObjectSelectorDemo-CIyR7Va0.cjs → aliasObjectSelectorDemo-BjDfDaIz.cjs} +1 -1
  22. package/dist/{aliasObjectSelectorDemo-K_tTBHpy.js → aliasObjectSelectorDemo-CWQH0Qn2.js} +1 -1
  23. package/dist/{annualRainfallChart-BOFcLous.cjs → annualRainfallChart-BkqlP2ZT.cjs} +1 -1
  24. package/dist/{annualRainfallChart-CXEjn-f7.js → annualRainfallChart-BrXTy4xp.js} +2 -2
  25. package/dist/{aqi-k91ZiFhs.cjs → aqi-BnL83rig.cjs} +1 -1
  26. package/dist/{aqi-G6IiggM0.js → aqi-D1MV_ulg.js} +2 -2
  27. package/dist/{aqiIndass-Z_hKy1jt.cjs → aqiIndass-KmadEgDf.cjs} +1 -1
  28. package/dist/{aqiIndass-D_eBCfWv.js → aqiIndass-gx68dW1q.js} +2 -2
  29. package/dist/{areaDeformCurve-DcyPl5fu.cjs → areaDeformCurve-Bg2QmYTI.cjs} +1 -1
  30. package/dist/{areaDeformCurve-DJmH5-Fy.js → areaDeformCurve-sl0qVvCN.js} +2 -2
  31. package/dist/{arrayCard-C89VdIAx.cjs → arrayCard-BDRKL000.cjs} +1 -1
  32. package/dist/{arrayCard-r6AK3RO3.js → arrayCard-CypTu3bD.js} +2 -2
  33. package/dist/{audio-C7dUYcfF.js → audio-Bc51z18e.js} +2 -2
  34. package/dist/{audio-BPhoozuC.cjs → audio-DEzFNZKq.cjs} +1 -1
  35. package/dist/{bar-JwPVLERN.cjs → bar-C8KpGLuZ.cjs} +1 -1
  36. package/dist/{bar-Cn4OPmjT.js → bar-CadibUqd.js} +2 -2
  37. package/dist/{bmp-DqWc2yhK.js → bmp-C3ilsDn1.js} +2 -2
  38. package/dist/{bmp-Dac0-SLi.cjs → bmp-ROarS9k0.cjs} +1 -1
  39. package/dist/{box-B9EUsUdP.js → box-CNcVPhuz.js} +2 -2
  40. package/dist/{box-c4VzNg5V.cjs → box-QEVXhrDW.cjs} +1 -1
  41. package/dist/{chartConfigPanel-BOQCikQs.js → chartConfigPanel-C15HIGPS.js} +1 -1
  42. package/dist/{chartConfigPanel-gLFAxGpG.cjs → chartConfigPanel-CIhiV0fb.cjs} +1 -1
  43. package/dist/{circleBar-DggnEeym.js → circleBar-9leBOEcy.js} +2 -2
  44. package/dist/{circleBar-D453xxY2.cjs → circleBar-D6GuY-4Y.cjs} +1 -1
  45. package/dist/{clock-CLxL0DLw.cjs → clock-BPH0yp-X.cjs} +1 -1
  46. package/dist/{clock-X_v5B15u.js → clock-CF5OBEBs.js} +2 -2
  47. package/dist/{clt-CGPayLZR.js → clt-BOAF8nWN.js} +2 -2
  48. package/dist/{clt-B-KU0lKS.cjs → clt-zSPs9_vQ.cjs} +1 -1
  49. package/dist/{cmc-E0WHsihT.js → cmc-ShPpdQjz.js} +2 -2
  50. package/dist/{cmc-7kj238nf.cjs → cmc-xX40ggv6.cjs} +1 -1
  51. package/dist/{cmp-BVThavqa.cjs → cmp-Cw44QYRS.cjs} +1 -1
  52. package/dist/{cmp-DyRO_o7v.js → cmp-ezNb_Mxo.js} +2 -2
  53. package/dist/{composite-BQgHCHie.js → composite-BpODPHLz.js} +2 -2
  54. package/dist/{composite-B8lUywfd.cjs → composite-DIMmZpVq.cjs} +1 -1
  55. package/dist/{conclusionCard-HSo7ujIU.js → conclusionCard-DU5uxHEX.js} +2 -2
  56. package/dist/{conclusionCard-lTwYc-oV.cjs → conclusionCard-TgCnF4Er.cjs} +1 -1
  57. package/dist/{controlList-BvBKQuir.js → controlList-CAK0BT7m.js} +2 -2
  58. package/dist/{controlList-DJvn_kkD.cjs → controlList-DEMnkm1q.cjs} +1 -1
  59. package/dist/{controlRecordList-DsXmI99A.js → controlRecordList-B0pyr_Xf.js} +2 -2
  60. package/dist/{controlRecordList-C7OnqEmw.cjs → controlRecordList-DXEoyE94.cjs} +1 -1
  61. package/dist/{crd-CwJipkc2.js → crd-AJHwxICh.js} +2 -2
  62. package/dist/{crd-CHQba4nJ.cjs → crd-C2NK-OwG.cjs} +1 -1
  63. package/dist/{ctrBtn-DycU63cr.cjs → ctrBtn-DP76slwG.cjs} +1 -1
  64. package/dist/{ctrBtn-_hZSc3VI.js → ctrBtn-R3l5dMhV.js} +3 -3
  65. package/dist/{ctrSet-C65anRjr.js → ctrSet-Bdahms8f.js} +3 -3
  66. package/dist/{ctrSet-DNdxvj2w.cjs → ctrSet-Bsh5k_DZ.cjs} +1 -1
  67. package/dist/{ctrSwitch-CYxGXPHu.cjs → ctrSwitch-CvuR4xwR.cjs} +1 -1
  68. package/dist/{ctrSwitch-BDVBUFHp.js → ctrSwitch-D7FyWGiI.js} +3 -3
  69. package/dist/{dataManagement-OLejKR73.js → dataManagement-CK2WwTXy.js} +2 -2
  70. package/dist/{dataManagement-CI3_r906.cjs → dataManagement-DWrbxZnD.cjs} +1 -1
  71. package/dist/{dataReport-D05yrsJW.js → dataReport-Bu3Y7mGI.js} +2 -2
  72. package/dist/{dataReport-BIqGBhe8.cjs → dataReport-Dsy4tbdw.cjs} +1 -1
  73. package/dist/{dataTable-PTF6LThf.cjs → dataTable-BK5Kps7g.cjs} +1 -1
  74. package/dist/{dataTable-aVyYnvqk.js → dataTable-BV6s7PfU.js} +1 -1
  75. package/dist/{datetime-DAxKoz5j.cjs → datetime-BIqVuqeG.cjs} +1 -1
  76. package/dist/{datetime-BhD1LCZj.js → datetime-BfaWLZyH.js} +2 -2
  77. package/dist/{deepClusterSlipSurface-ZXuz2_86.js → deepClusterSlipSurface-1zX12tgC.js} +2 -2
  78. package/dist/{deepClusterSlipSurface-h-UrfyKh.cjs → deepClusterSlipSurface-DVpBASWt.cjs} +1 -1
  79. package/dist/{deepDataMatrix--xetER3s.js → deepDataMatrix-CpmtPIcX.js} +2 -2
  80. package/dist/{deepDataMatrix-B3T4bJ3W.cjs → deepDataMatrix-G8dcgnsa.cjs} +1 -1
  81. package/dist/{deepDisplacement3D-WH1QxZsW.js → deepDisplacement3D-BFBluLfH.js} +2 -2
  82. package/dist/{deepDisplacement3D-ClV9QRqm.cjs → deepDisplacement3D-YswNZwTa.cjs} +1 -1
  83. package/dist/{deepDisplacementChart-DMephtdI.cjs → deepDisplacementChart-BS7WUz9q.cjs} +1 -1
  84. package/dist/{deepDisplacementChart-BSmaAe1Y.js → deepDisplacementChart-CUvJkOmr.js} +2 -2
  85. package/dist/{deepDisplacementChart-67ASyYfS.cjs → deepDisplacementChart-CWrcBlg6.cjs} +1 -1
  86. package/dist/{deepDisplacementChart-BxEErQdm.js → deepDisplacementChart-CuzLzLwf.js} +3 -3
  87. package/dist/{deepDisplacementView-B9bVo5bK.js → deepDisplacementView-BDlRHc9Y.js} +1 -1
  88. package/dist/{deepDisplacementView-D5tGwNgG.cjs → deepDisplacementView-BmxUR-Bi.cjs} +1 -1
  89. package/dist/{deepNodeTemperatureChart-CcT0zMkX.cjs → deepNodeTemperatureChart-C9ujOWa4.cjs} +1 -1
  90. package/dist/{deepNodeTemperatureChart-BGwFUbOp.js → deepNodeTemperatureChart-XowRw3ph.js} +2 -2
  91. package/dist/{deepTangentAngleChart-uLbQX7jr.js → deepTangentAngleChart-GlcwnNN5.js} +2 -2
  92. package/dist/{deepTangentAngleChart--793FCcg.cjs → deepTangentAngleChart-J70dkj7R.cjs} +1 -1
  93. package/dist/{deepTemperatureField-xP-1cNLN.cjs → deepTemperatureField-CF35FzwF.cjs} +1 -1
  94. package/dist/{deepTemperatureField-eQdebDj1.js → deepTemperatureField-DufF3dKA.js} +3 -3
  95. package/dist/{deepTrendChart-DtJ-q2Lg.cjs → deepTrendChart-Dk4aewa9.cjs} +1 -1
  96. package/dist/{deepTrendChart-BE0W5vX8.js → deepTrendChart-dxg7F07J.js} +2 -2
  97. package/dist/{deviceOnlineStatus-Dce23wq_.js → deviceOnlineStatus-B2QcEBWS.js} +2 -2
  98. package/dist/{deviceOnlineStatus-BkF0x__a.cjs → deviceOnlineStatus-CCKROK8j.cjs} +1 -1
  99. package/dist/{deviceStatus-C6-4RoG-.cjs → deviceStatus-B4Rjae1Y.cjs} +1 -1
  100. package/dist/{deviceStatus-BmLk0-YN.js → deviceStatus-DYlNjgFJ.js} +2 -2
  101. package/dist/{displacementDataTable-DsWZNgFe.js → displacementDataTable-BmgUlzjI.js} +2 -2
  102. package/dist/{displacementDataTable-DIoriYY7.cjs → displacementDataTable-mq_DC4Wc.cjs} +1 -1
  103. package/dist/{displacementTrajectoryChart-FvfOQj5C.cjs → displacementTrajectoryChart-Bq1TiSau.cjs} +1 -1
  104. package/dist/{displacementTrajectoryChart-Bf50t2Pd.js → displacementTrajectoryChart-JVrXA3gW.js} +2 -2
  105. package/dist/{displacementTrendChart-PoE5LEAn.js → displacementTrendChart-CIU_7Ogg.js} +2 -2
  106. package/dist/{displacementTrendChart-YqYltlnT.cjs → displacementTrendChart-DpM-YqxN.cjs} +1 -1
  107. package/dist/{dxf-Bh2_nGSH.cjs → dxf-7Ua61-rA.cjs} +1 -1
  108. package/dist/{dxf-wU0VQ-5U.js → dxf-Biej_pxu.js} +2 -2
  109. package/dist/{dzc-n-Plgxcs.cjs → dzc-Bs_3jkcu.cjs} +1 -1
  110. package/dist/{dzc-hJVH94yH.js → dzc-mgIQMeZZ.js} +2 -2
  111. package/dist/{emergencyPlan-0YKd1EeS.cjs → emergencyPlan-D4iA5hQ8.cjs} +1 -1
  112. package/dist/{emergencyPlan-CQUKLeTW.js → emergencyPlan-DnboZORH.js} +3 -3
  113. package/dist/{evn-FIdp0sFj.js → evn-COgZAiZH.js} +2 -2
  114. package/dist/{evn-DMojlwAn.cjs → evn-keAnzBEQ.cjs} +1 -1
  115. package/dist/{evolutionChart-8XcivuWM.js → evolutionChart-BBzXkGtB.js} +3 -3
  116. package/dist/{evolutionChart-oevmAJ-z.cjs → evolutionChart-DZes_Ip3.cjs} +1 -1
  117. package/dist/{fileViewer-Bk7n0msY.js → fileViewer-Cb3HUWcG.js} +2 -2
  118. package/dist/{fileViewer-BSKhIeH7.cjs → fileViewer-DfF-i2sT.cjs} +1 -1
  119. package/dist/{filterBar-DIQb0qKK.js → filterBar-3a2NTZCE.js} +2 -2
  120. package/dist/{filterBar-Dj5PDd46.cjs → filterBar-Du93V-iO.cjs} +1 -1
  121. package/dist/{fireCombustionCurve-zNT4SRHt.js → fireCombustionCurve-D4sR8IXO.js} +3 -3
  122. package/dist/{fireCombustionCurve-o8yhxAiz.cjs → fireCombustionCurve-DAASw_ta.cjs} +1 -1
  123. package/dist/{fireFilterBar-Bo-HjxJZ.js → fireFilterBar-CVfp1kJ4.js} +2 -2
  124. package/dist/{fireFilterBar-B-LSyz1N.cjs → fireFilterBar-DOPjaj30.cjs} +1 -1
  125. package/dist/{fireHistoryTable-BOaTJOp5.cjs → fireHistoryTable-DUNdyNuo.cjs} +1 -1
  126. package/dist/{fireHistoryTable-LNiOf9iQ.js → fireHistoryTable-d3gzBWl1.js} +2 -2
  127. package/dist/{gag-C8436kTC.js → gag-BNcZ8nfD.js} +2 -2
  128. package/dist/{gag-D__DSu8M.cjs → gag-D0mKpS6T.cjs} +1 -1
  129. package/dist/{gasStationList-1fJoRQW6.js → gasStationList-CCEz7TJS.js} +2 -2
  130. package/dist/{gasStationList-CQhxoVHU.cjs → gasStationList-Ub2mSVpW.cjs} +1 -1
  131. package/dist/{geo3dViewer-B5HnlNhd.cjs → geo3dViewer-EPTGe0L1.cjs} +1 -1
  132. package/dist/{geo3dViewer-CcPabN3H.js → geo3dViewer-zKpi6gvO.js} +3 -3
  133. package/dist/{glbModel-C0gdOH41.cjs → glbModel-8pj-YDVt.cjs} +1 -1
  134. package/dist/{glbModel-B7_ZHqNb.js → glbModel-CJIHiIoE.js} +2 -2
  135. package/dist/{globalObjectSelector-D4nI5gdR.js → globalObjectSelector-BP0iajFL.js} +1 -1
  136. package/dist/{globalObjectSelector-BQ8zpv04.cjs → globalObjectSelector-BaAeaTXh.cjs} +1 -1
  137. package/dist/{gnssFilterBar-nRoc08XI.js → gnssFilterBar-BWmRMUlA.js} +2 -2
  138. package/dist/{gnssFilterBar-DDYfwzGI.cjs → gnssFilterBar-CCdQX7Wj.cjs} +1 -1
  139. package/dist/{gnssHistoryTable-C54FWUBp.cjs → gnssHistoryTable-B6E2wNsA.cjs} +1 -1
  140. package/dist/{gnssHistoryTable-vW2eyyew.js → gnssHistoryTable-DdKLaST4.js} +2 -2
  141. package/dist/{gnssMapView-CN4vj-A8.js → gnssMapView-BXXMoZ57.js} +4 -4
  142. package/dist/{gnssMapView-CtH6tpeB.cjs → gnssMapView-BzPBlh1-.cjs} +2 -2
  143. package/dist/{gnssSectionProfile-DPQ7wmNp.cjs → gnssSectionProfile-DLlXFAqk.cjs} +1 -1
  144. package/dist/{gnssSectionProfile-BZv-quBb.js → gnssSectionProfile-DYGpODQX.js} +2 -2
  145. package/dist/{gnssTimeSeriesChart-BDq9PS-y.cjs → gnssTimeSeriesChart-DGYmbzrs.cjs} +1 -1
  146. package/dist/{gnssTimeSeriesChart-_s58QQhs.js → gnssTimeSeriesChart-S1-nYXYV.js} +2 -2
  147. package/dist/{gnssXYTrajectory-Doan9OFl.js → gnssXYTrajectory-5CxC7oC9.js} +2 -2
  148. package/dist/{gnssXYTrajectory-VxC3r_vo.cjs → gnssXYTrajectory-BvlJqIb5.cjs} +1 -1
  149. package/dist/{grd-D_rm-CCK.cjs → grd-BGu3Zq63.cjs} +1 -1
  150. package/dist/{grd-CXUAuw1o.js → grd-DBAXTOpH.js} +2 -2
  151. package/dist/{grdIndass-jpDjT562.js → grdIndass-B18jKdeD.js} +2 -2
  152. package/dist/{grdIndass-CdZRIEZ3.cjs → grdIndass-eluBKe9g.cjs} +1 -1
  153. package/dist/{grg-DluZ4rB5.cjs → grg-BAV5kNTJ.cjs} +1 -1
  154. package/dist/{grg-DFg-WI-P.js → grg-BSM04UfA.js} +2 -2
  155. package/dist/{gridview-CajcF9v9.cjs → gridview-D2v8CAvN.cjs} +1 -1
  156. package/dist/{gridview-Cf_cb-PT.js → gridview-DaS98Wir.js} +2 -2
  157. package/dist/{groundwaterFilterBar-CCpVesV4.cjs → groundwaterFilterBar-C2BAVOzu.cjs} +1 -1
  158. package/dist/{groundwaterFilterBar-B2Jb-n7x.js → groundwaterFilterBar-CZ3iXeFL.js} +2 -2
  159. package/dist/{groundwaterProfileChart-DXpYXGCx.js → groundwaterProfileChart-Dpxk3rM7.js} +3 -3
  160. package/dist/{groundwaterProfileChart-DOcNQ78s.cjs → groundwaterProfileChart-xIO8OHE_.cjs} +2 -2
  161. package/dist/{groundwaterTimeCurve-CrYjQlK4.js → groundwaterTimeCurve-5hl0btv-.js} +3 -3
  162. package/dist/{groundwaterTimeCurve-Ca1ZoPoF.cjs → groundwaterTimeCurve-Cv4oFJv2.cjs} +1 -1
  163. package/dist/{groupCard-R52XcQLx.cjs → groupCard-BtDU1AYQ.cjs} +1 -1
  164. package/dist/{groupCard-kn5cZCZN.js → groupCard-D5h6lNmB.js} +2 -2
  165. package/dist/{headerBar-rlXdc0NA.js → headerBar-D0i6Oni0.js} +2 -2
  166. package/dist/{headerBar-BH2q-7f_.cjs → headerBar-Da2MN4dF.cjs} +1 -1
  167. package/dist/{history-BYjRBaaH.js → history-t1YmymEh.js} +1 -1
  168. package/dist/{history-Fba0cQfR.cjs → history-wCsZs38j.cjs} +1 -1
  169. package/dist/{index-dj-SHelr.cjs → index-C2MWQs3P.cjs} +12 -12
  170. package/dist/{index-C7h1impW.js → index-CFVu8BaV.js} +1972 -1937
  171. package/dist/{insarDeformChart-D2EhTOXT.js → insarDeformChart-CmCrfz4L.js} +2 -2
  172. package/dist/{insarDeformChart-BXGHsKiB.cjs → insarDeformChart-Dg9ZEKD7.cjs} +1 -1
  173. package/dist/{insarImageViewer-CGZGlTFv.cjs → insarImageViewer-ng61Vh7B.cjs} +1 -1
  174. package/dist/{insarImageViewer-CzBWDvNv.js → insarImageViewer-yubkPGAn.js} +2 -2
  175. package/dist/{kds-DZqT4oz8.js → kds-CskgI5l-.js} +2 -2
  176. package/dist/{kds-CMh4egtg.cjs → kds-CzdIxvps.cjs} +1 -1
  177. package/dist/{kpiCard-DeZLGCSw.cjs → kpiCard-DW3Rczjj.cjs} +1 -1
  178. package/dist/{kpiCard-DSCu5JDP.js → kpiCard-gLuDaOmO.js} +2 -2
  179. package/dist/{landslideMap-CEHhqZfP.cjs → landslideMap-C-dktp4w.cjs} +1 -1
  180. package/dist/{landslideMap-DK8lYOTR.js → landslideMap-mUagnWY_.js} +3 -3
  181. package/dist/{landslideWarning-_8hultuw.js → landslideWarning-ButacSzH.js} +5 -5
  182. package/dist/{landslideWarning-DIoMVyGR.cjs → landslideWarning-C0zHVXtx.cjs} +1 -1
  183. package/dist/{layerTabs-C0V45MNc.js → layerTabs-BiuQ3tIO.js} +2 -2
  184. package/dist/{layerTabs-s2ro_uBO.cjs → layerTabs-CSpG-25T.cjs} +1 -1
  185. package/dist/{leaflet-src-DHDHoWiG.js → leaflet-src-Dr-o3ZR2.js} +1 -1
  186. package/dist/{leaflet-src-DfIgzKi2.cjs → leaflet-src-vMUbGKoP.cjs} +1 -1
  187. package/dist/{lerc-DtarRVlP.js → lerc-CRnfQuXn.js} +2 -2
  188. package/dist/{lerc-CGW7aJ4G.cjs → lerc-p-q2oI2D.cjs} +1 -1
  189. package/dist/{lin-Da_dF2qE.js → lin-DTiDVyrF.js} +2 -2
  190. package/dist/{lin-DL_yzeUT.cjs → lin-DgqfGcRm.cjs} +1 -1
  191. package/dist/{linIndass-E2IzcHaI.cjs → linIndass-3ePiHXdO.cjs} +1 -1
  192. package/dist/{linIndass-Bicsi1yu.js → linIndass-CBIN49Lz.js} +2 -2
  193. package/dist/{lst-7MOeDRiN.js → lst-ChIkCjWk.js} +2 -2
  194. package/dist/{lst-D7nUUAxF.cjs → lst-DJ9GSl8C.cjs} +1 -1
  195. package/dist/{manualEntry-BL8K875R.js → manualEntry-B0U_43Sg.js} +2 -2
  196. package/dist/{manualEntry-DacLziyX.cjs → manualEntry-Bdchlbv1.cjs} +1 -1
  197. package/dist/{mapBackground-smzEJYSw.js → mapBackground-Dzi9pEdN.js} +3 -3
  198. package/dist/{mapBackground-DXOUiZk3.cjs → mapBackground-T-nkCsrR.cjs} +1 -1
  199. package/dist/{mappingList-gsLV3eHn.js → mappingList-Balrs_jU.js} +2 -2
  200. package/dist/{mappingList-Cv345B-Y.cjs → mappingList-Comm_XRI.cjs} +1 -1
  201. package/dist/{markdownViewer-Bor343ez.js → markdownViewer-D3a6yqRI.js} +2 -2
  202. package/dist/{markdownViewer-Bf0f-3ye.cjs → markdownViewer-DtLhzlkG.cjs} +1 -1
  203. package/dist/{mix-control-modal-DIN_nRIz.js → mix-control-modal-DGq6LYCP.js} +1 -1
  204. package/dist/{mix-control-modal-Cb8wdb4n.cjs → mix-control-modal-M6VnG5oM.cjs} +1 -1
  205. package/dist/{mixGrid-BsEoZwlE.cjs → mixGrid-CpmYx9PU.cjs} +1 -1
  206. package/dist/{mixGrid-POyIsHkU.js → mixGrid-Dy2o_ptD.js} +2 -2
  207. package/dist/{mixMap-8UXsY-pC.js → mixMap-C2DNso8l.js} +2 -2
  208. package/dist/{mixMap-BcE4OFUV.cjs → mixMap-DC8zJybt.cjs} +1 -1
  209. package/dist/{mixModel-DGRZimC4.cjs → mixModel-BTbWqazc.cjs} +1 -1
  210. package/dist/{mixModel-F7IPKXxg.js → mixModel-Dra5bZ1O.js} +2 -2
  211. package/dist/{mixPie-fizDORNw.js → mixPie-Y66I7FtM.js} +2 -2
  212. package/dist/{mixPie-CYzYhUYS.cjs → mixPie-wfDzOUpI.cjs} +1 -1
  213. package/dist/mixdashboards.cjs +1 -1
  214. package/dist/mixdashboards.css +1 -1
  215. package/dist/mixdashboards.js +1 -1
  216. package/dist/{mjpegCamera-C1W-R8Cp.js → mjpegCamera-BVlKJ1MJ.js} +2 -2
  217. package/dist/{mjpegCamera-C-pOx8o_.cjs → mjpegCamera-Bwf2pM8Q.cjs} +1 -1
  218. package/dist/{monitorAlert-CKkmUpTp.js → monitorAlert-D_qD1Ro6.js} +2 -2
  219. package/dist/{monitorAlert-9K4Fs0R6.cjs → monitorAlert-O9X5jNkw.cjs} +1 -1
  220. package/dist/{monitorData-B20AQBGi.js → monitorData-B_0y8r0Q.js} +2 -2
  221. package/dist/{monitorData-5_Etey62.cjs → monitorData-DuXHbiBt.cjs} +1 -1
  222. package/dist/{monitorSpeedChart-DKPlZbpb.cjs → monitorSpeedChart-DcbnP2b4.cjs} +1 -1
  223. package/dist/{monitorSpeedChart-DDfonZ_D.js → monitorSpeedChart-zBFsegX9.js} +1 -1
  224. package/dist/{mxa-_qz3Gyps.js → mxa-BFhkjAEs.js} +2 -2
  225. package/dist/{mxa-CzV-4aUA.cjs → mxa-xPKiPnIr.cjs} +1 -1
  226. package/dist/{myValue-CrgWabef.js → myValue-BE9KLymE.js} +2 -2
  227. package/dist/{myValue-iRIdzgV2.cjs → myValue-Cld9hSfi.cjs} +1 -1
  228. package/dist/{myValueList-BJMedYk6.js → myValueList-BPSgUlVb.js} +2 -2
  229. package/dist/{myValueList-CAecBCuM.cjs → myValueList-D-kxefHU.cjs} +1 -1
  230. package/dist/{objectList-pmydrIEJ.js → objectList-C5SXFBLj.js} +2 -2
  231. package/dist/{objectList-DNzotQVT.cjs → objectList-ZykI6HdT.cjs} +1 -1
  232. package/dist/{photo-BPa6DKez.cjs → photo-B4V-jcqN.cjs} +1 -1
  233. package/dist/{photo-CqEPcpSO.js → photo-OMswjAae.js} +2 -2
  234. package/dist/{pie-C4m9G_5x.js → pie-D5K_xDjc.js} +2 -2
  235. package/dist/{pie-CYMi8qbh.cjs → pie-E_0g0A3l.cjs} +1 -1
  236. package/dist/{pressBtn-CRN3qrzg.cjs → pressBtn-C-0ywK1j.cjs} +1 -1
  237. package/dist/{pressBtn-CljdN6Fn.js → pressBtn-CoVk1P-c.js} +3 -3
  238. package/dist/{processTable-BhNP8zpP.cjs → processTable-DOz8Erad.cjs} +1 -1
  239. package/dist/{processTable-DoBvBhdI.js → processTable-DWdgyVIN.js} +2 -2
  240. package/dist/{progressBar-D7IqFKvP.cjs → progressBar-CuPA_wO-.cjs} +1 -1
  241. package/dist/{progressBar-BsTr00h_.js → progressBar-baBex4vY.js} +2 -2
  242. package/dist/{progressCircle-D8SPTcqd.cjs → progressCircle-CMF3oJva.cjs} +1 -1
  243. package/dist/{progressCircle-D9kMGARM.js → progressCircle-HBkmg-1L.js} +2 -2
  244. package/dist/{qrcode-CV194qyb.js → qrcode-CIHrgygx.js} +2 -2
  245. package/dist/{qrcode-BqPh5wv3.cjs → qrcode-CtCNta8Z.cjs} +1 -1
  246. package/dist/{raceBar-HwC4pOmC.js → raceBar-CHKuzY5k.js} +2 -2
  247. package/dist/{raceBar-Cuo7tLH4.cjs → raceBar-DqqaVKFQ.cjs} +1 -1
  248. package/dist/{rad-CE3oNUse.cjs → rad-Bsxirjz7.cjs} +1 -1
  249. package/dist/{rad-CA8NiA1q.js → rad-DcDyZwsZ.js} +2 -2
  250. package/dist/{radarMapViewer-B_BtceH2.js → radarMapViewer-Dg0eV5HY.js} +2 -2
  251. package/dist/{radarMapViewer-D8p6wDB3.cjs → radarMapViewer-xhLfbILB.cjs} +1 -1
  252. package/dist/{rainfallFilterBar-D0Nu6qPi.cjs → rainfallFilterBar-BC2Zd4DZ.cjs} +1 -1
  253. package/dist/{rainfallFilterBar-C8BQdW2Q.js → rainfallFilterBar-Bb-6fDvy.js} +2 -2
  254. package/dist/{rainfallTimeCurve-QgYakauI.cjs → rainfallTimeCurve-BqJtOv6I.cjs} +1 -1
  255. package/dist/{rainfallTimeCurve-Ou1QvoMF.js → rainfallTimeCurve-CmmY9DVl.js} +3 -3
  256. package/dist/{rangeLin-BY2c5Qod.cjs → rangeLin-CVuwM3uI.cjs} +1 -1
  257. package/dist/{rangeLin-Cc1EI6Co.js → rangeLin-DDMwZHCd.js} +2 -2
  258. package/dist/{realtimeEvolutionMap-DgUyeuTK.js → realtimeEvolutionMap-B2KlT5zv.js} +2 -2
  259. package/dist/{realtimeEvolutionMap-CkpKBWXx.cjs → realtimeEvolutionMap-CcxPzmjL.cjs} +1 -1
  260. package/dist/{regionBar-ObYvQCIz.js → regionBar-DBXWQRvv.js} +2 -2
  261. package/dist/{regionBar-C0Rzrb4S.cjs → regionBar-nrLUVQzN.cjs} +1 -1
  262. package/dist/{request-B2FzXhVA.cjs → request-CP_hjKN9.cjs} +1 -1
  263. package/dist/{request-CfsIYWlr.js → request-DVcxyubB.js} +1 -1
  264. package/dist/{retainer1-C9H68IUK.js → retainer1-C4V2x0v7.js} +3 -3
  265. package/dist/{retainer1-D_fbbjf7.cjs → retainer1-C8CeOv1l.cjs} +1 -1
  266. package/dist/{retainer2-CtPdlDLR.js → retainer2-BdR17CFP.js} +3 -3
  267. package/dist/{retainer2-Dr7oPQbz.cjs → retainer2-BqYnecIj.cjs} +1 -1
  268. package/dist/{retainerRecordList-jw_wlxEU.cjs → retainerRecordList-B0tpc-z_.cjs} +1 -1
  269. package/dist/{retainerRecordList-DyLa8kdx.js → retainerRecordList-Cjmsb_wZ.js} +2 -2
  270. package/dist/{ringTopN-B2Q3oCEp.js → ringTopN-DQC5kU0B.js} +2 -2
  271. package/dist/{ringTopN-BV9BdQqU.cjs → ringTopN-DXQ3F8lM.cjs} +1 -1
  272. package/dist/{riskRegionTable-B9hAe8HD.cjs → riskRegionTable-Ba8juMbN.cjs} +1 -1
  273. package/dist/{riskRegionTable-C3B-GAcg.js → riskRegionTable-D6Sqd63K.js} +2 -2
  274. package/dist/{sankey-BbRrUliA.cjs → sankey-Bk2Icftd.cjs} +1 -1
  275. package/dist/{sankey-BeWileQv.js → sankey-CyjELkaJ.js} +2 -2
  276. package/dist/{scd-D1bDcZer.cjs → scd-BxCZar4M.cjs} +1 -1
  277. package/dist/{scd-D0bgB4-g.js → scd-Y6x4qPoT.js} +2 -2
  278. package/dist/{sideMenu-D2rAFQX1.js → sideMenu-CgjCfonj.js} +2 -2
  279. package/dist/{sideMenu-BCD6VL9c.cjs → sideMenu-D1PV_HBK.cjs} +1 -1
  280. package/dist/{slopeStability-Cgmc00Q7.js → slopeStability-BlexxJd7.js} +2 -2
  281. package/dist/{slopeStability-B3nkChmg.cjs → slopeStability-D9I2zYjH.cjs} +1 -1
  282. package/dist/{speedCurve-Oap8XAoh.cjs → speedCurve-D4TMXT4F.cjs} +1 -1
  283. package/dist/{speedCurve-DzUiXtC_.js → speedCurve-aoQSOuBW.js} +2 -2
  284. package/dist/{staticLine-C-roiU1s.js → staticLine-B9C54sQB.js} +2 -2
  285. package/dist/{staticLine-CKZNGFm-.cjs → staticLine-C80nuVGt.cjs} +1 -1
  286. package/dist/{stressFilterBar-BlkN9C6f.js → stressFilterBar-BzKszS5m.js} +2 -2
  287. package/dist/{stressFilterBar-CqkDuTjH.cjs → stressFilterBar-qiEbsELi.cjs} +1 -1
  288. package/dist/{stressTimeCurve-Dewf7HMl.js → stressTimeCurve-CM8LWRr7.js} +3 -3
  289. package/dist/{stressTimeCurve-KrY7oP9m.cjs → stressTimeCurve-DJwyliqg.cjs} +1 -1
  290. package/dist/{swiper-C2JtpnQ7.cjs → swiper-CfTDsIb1.cjs} +1 -1
  291. package/dist/{swiper-DdpTSfx3.js → swiper-DVvSk6F3.js} +2 -2
  292. package/dist/{terminalConfigList-V6qPsWvs.cjs → terminalConfigList-CjSmBSSm.cjs} +1 -1
  293. package/dist/{terminalConfigList-Cn0Yz1a-.js → terminalConfigList-wEhTu7D8.js} +2 -2
  294. package/dist/{terminalList-B249sEzY.cjs → terminalList-DPMPCDsP.cjs} +1 -1
  295. package/dist/{terminalList-Bs4rKaB0.js → terminalList-Z8DY8SGm.js} +2 -2
  296. package/dist/{textbox-CBaoJef_.js → textbox-H_Ue1flh.js} +2 -2
  297. package/dist/{textbox-CJ3Ns6yh.cjs → textbox-XAHFgfPt.cjs} +1 -1
  298. package/dist/{timeQueryBar-DWHRHgBY.js → timeQueryBar-C7EvkWi_.js} +1 -1
  299. package/dist/{timeQueryBar-DpyoaNfL.cjs → timeQueryBar-DbuxsRUY.cjs} +1 -1
  300. package/dist/{timeSeries-CKPBye5t.js → timeSeries-BhSRJSmO.js} +3 -3
  301. package/dist/{timeSeries-8EDB1MZF.cjs → timeSeries-r0m3qyha.cjs} +1 -1
  302. package/dist/{timeSeriesCurve-CGaW9sQL.cjs → timeSeriesCurve-C6W-hIkE.cjs} +1 -1
  303. package/dist/{timeSeriesCurve-B1k_XZRC.js → timeSeriesCurve-DS8Ftyhk.js} +3 -3
  304. package/dist/{toggleBtn-DXq8eg1W.js → toggleBtn--ULZXvQB.js} +2 -2
  305. package/dist/{toggleBtn-BMFkjBHq.cjs → toggleBtn-CvzcW0cm.cjs} +1 -1
  306. package/dist/{trajectoryConfigPanel-C-Np1mBV.js → trajectoryConfigPanel-BxI0r7rH.js} +1 -1
  307. package/dist/{trajectoryConfigPanel-D2raL0wv.cjs → trajectoryConfigPanel-D1Jz-_0V.cjs} +1 -1
  308. package/dist/{trajectoryScatter-BhE8LIq4.js → trajectoryScatter-_lDY6_os.js} +2 -2
  309. package/dist/{trajectoryScatter-CqGgMRlK.cjs → trajectoryScatter-mwElbaLI.cjs} +1 -1
  310. package/dist/{universalConfigPanel-BdUrr3FP.js → universalConfigPanel-Bv_PFdtE.js} +1 -1
  311. package/dist/{universalConfigPanel-T1sS3ITI.cjs → universalConfigPanel-CHG20MTz.cjs} +1 -1
  312. package/dist/{universalTable-Dolv9oDP.js → universalTable-CrIB2hSM.js} +2 -2
  313. package/dist/{universalTable-DhLBf82s.cjs → universalTable-D50d5ZUb.cjs} +1 -1
  314. package/dist/{video-BTwIueqG.cjs → video-COqQPJvb.cjs} +1 -1
  315. package/dist/{video-B4O8XLs8.js → video-D7KUyN05.js} +2 -2
  316. package/dist/{videoMonitor-DXVk8euB.js → videoMonitor-Cse7jApw.js} +2 -2
  317. package/dist/{videoMonitor-BMPGmed9.cjs → videoMonitor-UR9GHh7i.cjs} +1 -1
  318. package/dist/{vlu-uzGb9Clr.cjs → vlu-Bikf-kzg.cjs} +1 -1
  319. package/dist/{vlu-UWQTicfY.js → vlu-CZs-ZE-e.js} +2 -2
  320. package/dist/{warningOverview-D367HWMe.js → warningOverview-BATHSsUc.js} +3 -3
  321. package/dist/{warningOverview-BwWahte7.cjs → warningOverview-F0IYwVrs.cjs} +1 -1
  322. package/dist/{weather-7jsfVi-J.cjs → weather-C9Z63lCX.cjs} +1 -1
  323. package/dist/{weather-Bi5jIBhO.js → weather-DRpO-6Y4.js} +2 -2
  324. package/dist/{windLin-DfDN74qa.js → windLin-CGj31fV_.js} +2 -2
  325. package/dist/{windLin-BNx4ytun.cjs → windLin-DA22x4Pr.cjs} +1 -1
  326. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";var M=Object.defineProperty,I=Object.defineProperties;var x=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var w=(u,t,s)=>t in u?M(u,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[t]=s,_=(u,t)=>{for(var s in t||(t={}))H.call(t,s)&&w(u,s,t[s]);if(S)for(var s of S(t))A.call(t,s)&&w(u,s,t[s]);return u},g=(u,t)=>I(u,x(t));var b=(u,t,s)=>new Promise((e,i)=>{var a=r=>{try{c(s.next(r))}catch(n){i(n)}},o=r=>{try{c(s.throw(r))}catch(n){i(n)}},c=r=>r.done?e(r.value):Promise.resolve(r.value).then(a,o);c((s=s.apply(u,t)).next())});const f=require("vue"),h=require("./index-dj-SHelr.cjs"),R=(u,t,s,e,i)=>b(null,null,function*(){try{const o=yield new(yield Promise.resolve().then(()=>require("./history-Fba0cQfR.cjs"))).default().getHistoryData(u,i);s(o)}catch(a){console.error("获取历史数据时出错:",a)}finally{if(t){const{formatRequest:a}=yield Promise.resolve().then(()=>require("./request-B2FzXhVA.cjs")),o=a(u.conf,u.uid,i);t.registerComponent({id:u.conf.id,request:o,onUpdate:(c,r)=>{c==="realtime"&&e(r)}})}}}),j=(u,t)=>{t&&t.unregisterComponent(u.conf.id)};class L{constructor(t){this.props=t}scriptUid(t){var s;return(s=t.uid)!=null?s:t.fv}indexIdentityKey(t){return t.is_alias?"alias":"uid"}mosaicResult(t,s){return t.fv?{block_mapping:"influxdbproxy",action:"get_mosaic_list",object_id:t.object_id,keys:[t.fv],page_index:1,page_size:s||1}:null}statisticsResult(t,s){return this.scriptUid(t)?{block_mapping:"statistics",action:"get_statistics_list",script_uid:this.scriptUid(t),where_and:JSON.stringify([["object_id","=",t.object_id]]),page_size:Number(s)||20,page_index:1}:null}calculateResult(t,s){return this.scriptUid(t)?{block_mapping:"statistics",action:"get_calculate_list",script_uid:this.scriptUid(t),where_and:JSON.stringify([["object_id","=",t.object_id]]),page_size:Number(s)||20,page_index:1}:null}blockResult(t,s,e,i){return g(_({},this.indexResult(t,s)),{block_mapping:e,action:i})}indexResult(t,s){const e=this.indexIdentityKey(t);return!t[e]||!t.object_id?null:{page_index:1,page_size:s,block_mapping:"index",action:"get_index_result_list",where_and:JSON.stringify([[e,"=",t[e]],["object_id","=",t.object_id]])}}deviationResult(t,s){return this.blockResult(t,s,"deviation","get_deviation_result_list")}stabilityResult(t,s){return this.blockResult(t,s,"stability","get_stability_result_list")}balanceResult(t,s){return this.blockResult(t,s,"balance","get_balance_result_list")}incrementResult(t,s){return this.blockResult(t,s,"increment","get_increment_result_list")}riskResult(t,s){return this.blockResult(t,s,"risk","get_risk_result_list")}isValidPlatformCondition(t){const s=t==null?void 0:t.action;return typeof s=="string"&&s.trim()!==""}applyHistoryObjectResolution(t){const{conf:s,uid:e}=this.props,{common:i}=s,a=i.useAlias||!1,o=i.multiObject||!1,c=sessionStorage.getItem(h.ALIAS_MAPPING_KEY),r=JSON.parse(c||"{}"),n=o?t.object_alias:i.object_alias,l=o?t.object_id:i.object_id;t.object_id=a?n?r[n]:e:l||e}mosaicBucketKey(t,s){var e;return`${(e=t.object_id)!=null?e:""}::${s||1}`}fillResponseFromMosaicRows(t,s,e){t.forEach(i=>{const a=s.fv,o="time";e.data.push(i[a]),e.time.push(h.dayjs(i[o]).format("YYYY-MM-DD HH:mm:ss"))})}postMosaicBatchMerged(t,s,e){var n;const i=[],a=new Set;for(const{item:l}of s){const p=l.fv;p&&!a.has(p)&&(a.add(p),i.push(p))}const o=(n=s[0])==null?void 0:n.item,c=o?this.mosaicResult(o,t):null;if(!c||i.length===0){for(const{index:l}of s)e[l]={data:[],time:[]};return Promise.resolve()}const r=g(_({},c),{keys:i});return new Promise(l=>{h.api.platform(p=>{var d,y;const m=(y=(d=p==null?void 0:p.result)==null?void 0:d.data)!=null?y:[];for(const{index:v,item:D}of s){const k={data:[],time:[]};this.fillResponseFromMosaicRows(m,D,k),e[v]=k}l()},r)})}postDataItem(t){var l;const{conf:s}=this.props,{common:e,options:i}=s,a=e.source||"mosaic",o=i.points||1;this.applyHistoryObjectResolution(t);const c=this[`${a}Result`],r=(l=c==null?void 0:c.call(this,t,o))!=null?l:null,n={data:[],time:[]};return r==null?Promise.resolve(n):new Promise(p=>{h.api.platform(m=>{m.result.data.forEach(d=>{const y=["statistics","calculate"].includes(a)?"data":t.fv,v=["statistics","calculate"].includes(a)?"start_time":"time";n.data.push(d[y]),n.time.push(h.dayjs(d[v]).format("YYYY-MM-DD HH:mm:ss"))}),p(n)},r)})}initHistory(){return b(this,null,function*(){const{data:t,common:s,options:e}=this.props.conf,i=s.source||"mosaic",a=e.points||1;if(i!=="mosaic")return Promise.all(t.map(n=>this.postDataItem(n)));const o=t.length,c=new Array(o),r=new Map;for(let n=0;n<o;n++){const l=t[n];if(this.applyHistoryObjectResolution(l),this.mosaicResult(l,a)==null){c[n]={data:[],time:[]};continue}const m=this.mosaicBucketKey(l,a);let d=r.get(m);d||(d=[],r.set(m,d)),d.push({index:n,item:l})}return yield Promise.all(Array.from(r.values()).map(n=>this.postMosaicBatchMerged(a,n,c))),c})}}class O extends L{constructor(t,s){super(t),this.linkWatchStop=null,this.componentType=s,this.session=f.ref(f.inject("session",null)),this.Style=f.ref({}),this.linkStore=h.useLinkStore()}extractStyles(){return{}}init(){return b(this,null,function*(){var t;this.Style.value=this.extractStyles(),this.applyTheme(),yield this.expandAliasData((t=this.props.conf)==null?void 0:t.data)})}setHistoryData(t){}onPreview(){return b(this,null,function*(){var a;const{common:t,data:s}=this.props.conf,e=this.getSource(),i=yield this.expandAliasData(s);if(this.props.conf.data=i,t.multiObject&&Array.isArray(i)){const o=new Set,c=new Map;(yield Promise.all(i.map(n=>b(this,null,function*(){return{item:n,objectIds:yield this.resolveObjectIds(n)}})))).forEach(({item:n,objectIds:l})=>{l.length>1&&c.set(String((t==null?void 0:t.object_alias)||(n==null?void 0:n.object_alias)||(n==null?void 0:n.alias)||(n==null?void 0:n.object_id)||(n==null?void 0:n.uid)||""),l),l.forEach(p=>{!p||o.has(p)||(o.add(p),this.subscribeBySource(e,p,n.uid))})})}else{const o=yield this.resolveObjectId(),c=(a=i==null?void 0:i[0])==null?void 0:a.uid;this.subscribeBySource(e,o,c)}})}setSocketData(t){if(!t)return;const{data:s}=this.props.conf;!s||!Array.isArray(s)||s.forEach(e=>{try{const i=this.extractDataValue(t,e.fv);e.value=i!=null?i:"--"}catch(i){e.value="--"}})}onLinkEvent(t){}getLinkChannel(){var t;return((t=this.Style.value)==null?void 0:t.linkChannel)||""}publish(t){const s=this.getLinkChannel();if(!s){console.warn(`[${this.componentType}] 未配置联动频道,无法发布事件`);return}this.linkStore.publish(s,this.componentType,t)}shouldHandleEvent(t){return!(!t||this.props.mode==="edit"||t.topic.source===this.componentType)}setupLinkWatch(){this.linkWatchStop&&this.linkWatchStop(),this.linkWatchStop=f.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,s,e,i){if(!this.session.value){console.warn(`[${this.componentType}] Session 未初始化,无法订阅`);return}const a={event:t,block:s,object_id:e};i&&Object.assign(a,i);const o=this.isLocalIotSubscribeMode()?{action:"sub_event",block_mapping:"mmq",event:a}:{action:"sub_agent_event",event:a},c=this.props.conf.id;this.session.value.componentRequests&&(this.session.value.componentRequests.has(c)||this.session.value.componentRequests.set(c,[]),this.session.value.componentRequests.get(c).push(o)),this.session.value.send({type:"send_message",message:o})}subscribeFv(t){this.subscribe("recv_fv","mosaic",t)}subscribeRetainerOpen(t){this.subscribe("retainer_open","retainer",t)}subscribeRetainerClose(t){this.subscribe("retainer_close","retainer",t)}subscribeRetainerEvent(t){this.subscribe("retainer_event","retainer",t)}subscribeRetainer(t){this.subscribeRetainerOpen(t),this.subscribeRetainerClose(t),this.subscribeRetainerEvent(t)}subscribeStatisticsRealtimeResult(t){this.subscribe("statistics_realtime_result","statistics",t)}subscribeStatistics(t){var e,i;const s=(i=(e=this.props.conf.data)==null?void 0:e[0])==null?void 0:i.uid;this.subscribeStatisticsWithUid(t,s)}subscribeStatisticsWithUid(t,s){this.subscribe("statistics_result","statistics",t,{uid:s,type:"statistics"})}subscribeCalculate(t){var e,i;const s=(i=(e=this.props.conf.data)==null?void 0:e[0])==null?void 0:i.uid;this.subscribeCalculateWithUid(s)}subscribeCalculateWithUid(t){this.subscribe("statistics_result","statistics","",{uid:t,type:"calculate"})}subscribeBySource(t,s,e){switch(t){case"mosaic":this.subscribeFv(s);break;case"statisticsRealtime":this.subscribeStatisticsRealtimeResult(s);break;case"statistics":e?this.subscribeStatisticsWithUid(s,e):this.subscribeStatistics(s);break;case"calculate":e?this.subscribeCalculateWithUid(e):this.subscribeCalculate(s);break;default:console.warn(`[${this.componentType}] 未知的数据源类型: ${t}`)}}extractDataValue(t,s){var e;return!t||!t.event?null:t.event==="recv_fv"&&t.block==="mosaic"?!s||!t.data?null:t.data[s]:t.event==="statistics_realtime_result"&&t.block==="statistics"?(e=t.data)==null?void 0:e.data:t.event==="statistics_result"&&t.block==="statistics"?t.data:null}getOptionValue(t,s){var i,a;const e=(a=(i=this.props.conf)==null?void 0:i.options)==null?void 0:a[t];return e==null?s:typeof e=="object"&&"value"in e?e.value:e}applyTheme(){h.applyThemeStyles(this.props.theme,this.Style.value)}getSource(){var t,s;return((s=(t=this.props.conf)==null?void 0:t.common)==null?void 0:s.source)||"mosaic"}isStatistics(){return["statistics","calculate","statisticsRealtime","calculateRealtime"].includes(this.getSource())}resolveObjectId(t){return b(this,null,function*(){return(yield this.resolveObjectIds(t))[0]||""})}resolveObjectIds(t){return b(this,null,function*(){const{uid:s,conf:e}=this.props,{common:i,data:a}=e,o=t||i||a[0]||{},r=(yield this.expandAliasData([o])).map(n=>String((n==null?void 0:n.object_id)||(n==null?void 0:n.objectid)||s)).filter(Boolean);return r.length>0&&o&&typeof o=="object"&&(o.object_id=r[0],o.objectid=r[0]),r.length>0?r:[String((o==null?void 0:o.object_id)||(o==null?void 0:o.objectid)||"")].filter(Boolean)})}expandAliasData(t){return b(this,null,function*(){var i;const s=Array.isArray(t)?t:[],e=[];for(const a of s){if(!a||typeof a!="object"){e.push(a);continue}const o={common:a,data:[a],options:(i=this.props.conf)==null?void 0:i.options};if(!String(a.object_alias||a.alias||"").trim()){e.push(a);continue}if(!(yield h.loadAliasMappingFromJsonIfNeeded(o))){e.push(a);continue}const r=h.expandAliasItems([a]);r.length>0?e.push(...r):e.push(a)}return e})}handleNull(t,s){return h.handleNullData(t,this.props,s)}getPreviewHelper(){return{preview:()=>R(this.props,this.session.value,t=>this.setHistoryData(t),t=>{let s=t;s.datetime=h.dayjs(s.datetime).format("YYYY-MM-DD HH:mm:ss"),this.setSocketData(s)},this.componentType),unregister:()=>j(this.props,this.session.value)}}getDebouncedInit(){return h.debounce(()=>this.init(),200)}cleanup(){}needsHistoryData(){return!0}setupLifecycle(){const t=this.getDebouncedInit(),s=this.getPreviewHelper();f.onMounted(()=>b(this,null,function*(){var i,a,o,c;const e={common:(i=this.props.conf)==null?void 0:i.common,data:(a=this.props.conf)==null?void 0:a.data,options:(o=this.props.conf)==null?void 0:o.options};if(this.props.mode==="preview"&&(yield h.loadAliasMappingFromJsonIfNeeded(e),Array.isArray((c=this.props.conf)==null?void 0:c.data)&&this.props.conf.data.length&&(this.props.conf.data=yield this.expandAliasData(this.props.conf.data))),yield this.init(),this.props.mode==="preview"){if(this.needsHistoryData())try{const r=yield this.initHistory();this.setHistoryData(r)}catch(r){console.error(`[${this.componentType}] 获取历史数据失败:`,r)}this.session.value&&(this.session.value.unregisterComponent(this.props.conf.id),this.session.value.registerComponent({id:this.props.conf.id,request:null,onUpdate:(r,n)=>{if(r==="realtime"){let l=n;l.datetime=h.dayjs(l.datetime).format("YYYY-MM-DD HH:mm:ss"),this.setSocketData(l)}}})),this.onPreview()}this.setupLinkWatch()})),f.onBeforeUnmount(()=>{this.cleanup(),s.unregister(),this.stopLinkWatch()}),f.watch(()=>this.props.conf,()=>{this.props.mode==="edit"&&t()},{deep:!0}),f.watch(()=>this.props.theme,()=>{this.init()}),f.watch(()=>{var e;return(e=this.Style.value)==null?void 0:e.linkChannel},()=>{this.setupLinkWatch()})}getStyle(){return this.Style}getType(){return this.componentType}dispatchModal(t,s,e){this.props.mode==="preview"&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:t,layerId:s,sheetIndex:e!=null?e:-1}}))}triggerModalByKey(t){var e,i;if(this.props.mode!=="preview")return;const s=(e=this.props.conf)==null?void 0:e.modalBinding;if(s&&s.enabled&&s.mode==="key"){const o=(s.map||{})[t];if(!o||!o.layerId)return;const c=o.action||"toggle",r=(i=s.sheetIndex)!=null?i:-1;this.dispatchModal(c,o.layerId,r)}}}exports.BaseComponent=O;exports.preview=R;exports.unregister=j;
1
+ "use strict";var M=Object.defineProperty,I=Object.defineProperties;var x=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var w=(u,t,s)=>t in u?M(u,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[t]=s,_=(u,t)=>{for(var s in t||(t={}))H.call(t,s)&&w(u,s,t[s]);if(S)for(var s of S(t))A.call(t,s)&&w(u,s,t[s]);return u},g=(u,t)=>I(u,x(t));var b=(u,t,s)=>new Promise((e,i)=>{var a=r=>{try{c(s.next(r))}catch(n){i(n)}},o=r=>{try{c(s.throw(r))}catch(n){i(n)}},c=r=>r.done?e(r.value):Promise.resolve(r.value).then(a,o);c((s=s.apply(u,t)).next())});const f=require("vue"),h=require("./index-C2MWQs3P.cjs"),R=(u,t,s,e,i)=>b(null,null,function*(){try{const o=yield new(yield Promise.resolve().then(()=>require("./history-wCsZs38j.cjs"))).default().getHistoryData(u,i);s(o)}catch(a){console.error("获取历史数据时出错:",a)}finally{if(t){const{formatRequest:a}=yield Promise.resolve().then(()=>require("./request-CP_hjKN9.cjs")),o=a(u.conf,u.uid,i);t.registerComponent({id:u.conf.id,request:o,onUpdate:(c,r)=>{c==="realtime"&&e(r)}})}}}),j=(u,t)=>{t&&t.unregisterComponent(u.conf.id)};class L{constructor(t){this.props=t}scriptUid(t){var s;return(s=t.uid)!=null?s:t.fv}indexIdentityKey(t){return t.is_alias?"alias":"uid"}mosaicResult(t,s){return t.fv?{block_mapping:"influxdbproxy",action:"get_mosaic_list",object_id:t.object_id,keys:[t.fv],page_index:1,page_size:s||1}:null}statisticsResult(t,s){return this.scriptUid(t)?{block_mapping:"statistics",action:"get_statistics_list",script_uid:this.scriptUid(t),where_and:JSON.stringify([["object_id","=",t.object_id]]),page_size:Number(s)||20,page_index:1}:null}calculateResult(t,s){return this.scriptUid(t)?{block_mapping:"statistics",action:"get_calculate_list",script_uid:this.scriptUid(t),where_and:JSON.stringify([["object_id","=",t.object_id]]),page_size:Number(s)||20,page_index:1}:null}blockResult(t,s,e,i){return g(_({},this.indexResult(t,s)),{block_mapping:e,action:i})}indexResult(t,s){const e=this.indexIdentityKey(t);return!t[e]||!t.object_id?null:{page_index:1,page_size:s,block_mapping:"index",action:"get_index_result_list",where_and:JSON.stringify([[e,"=",t[e]],["object_id","=",t.object_id]])}}deviationResult(t,s){return this.blockResult(t,s,"deviation","get_deviation_result_list")}stabilityResult(t,s){return this.blockResult(t,s,"stability","get_stability_result_list")}balanceResult(t,s){return this.blockResult(t,s,"balance","get_balance_result_list")}incrementResult(t,s){return this.blockResult(t,s,"increment","get_increment_result_list")}riskResult(t,s){return this.blockResult(t,s,"risk","get_risk_result_list")}isValidPlatformCondition(t){const s=t==null?void 0:t.action;return typeof s=="string"&&s.trim()!==""}applyHistoryObjectResolution(t){const{conf:s,uid:e}=this.props,{common:i}=s,a=i.useAlias||!1,o=i.multiObject||!1,c=sessionStorage.getItem(h.ALIAS_MAPPING_KEY),r=JSON.parse(c||"{}"),n=o?t.object_alias:i.object_alias,l=o?t.object_id:i.object_id;t.object_id=a?n?r[n]:e:l||e}mosaicBucketKey(t,s){var e;return`${(e=t.object_id)!=null?e:""}::${s||1}`}fillResponseFromMosaicRows(t,s,e){t.forEach(i=>{const a=s.fv,o="time";e.data.push(i[a]),e.time.push(h.dayjs(i[o]).format("YYYY-MM-DD HH:mm:ss"))})}postMosaicBatchMerged(t,s,e){var n;const i=[],a=new Set;for(const{item:l}of s){const p=l.fv;p&&!a.has(p)&&(a.add(p),i.push(p))}const o=(n=s[0])==null?void 0:n.item,c=o?this.mosaicResult(o,t):null;if(!c||i.length===0){for(const{index:l}of s)e[l]={data:[],time:[]};return Promise.resolve()}const r=g(_({},c),{keys:i});return new Promise(l=>{h.api.platform(p=>{var d,y;const m=(y=(d=p==null?void 0:p.result)==null?void 0:d.data)!=null?y:[];for(const{index:v,item:D}of s){const k={data:[],time:[]};this.fillResponseFromMosaicRows(m,D,k),e[v]=k}l()},r)})}postDataItem(t){var l;const{conf:s}=this.props,{common:e,options:i}=s,a=e.source||"mosaic",o=i.points||1;this.applyHistoryObjectResolution(t);const c=this[`${a}Result`],r=(l=c==null?void 0:c.call(this,t,o))!=null?l:null,n={data:[],time:[]};return r==null?Promise.resolve(n):new Promise(p=>{h.api.platform(m=>{m.result.data.forEach(d=>{const y=["statistics","calculate"].includes(a)?"data":t.fv,v=["statistics","calculate"].includes(a)?"start_time":"time";n.data.push(d[y]),n.time.push(h.dayjs(d[v]).format("YYYY-MM-DD HH:mm:ss"))}),p(n)},r)})}initHistory(){return b(this,null,function*(){const{data:t,common:s,options:e}=this.props.conf,i=s.source||"mosaic",a=e.points||1;if(i!=="mosaic")return Promise.all(t.map(n=>this.postDataItem(n)));const o=t.length,c=new Array(o),r=new Map;for(let n=0;n<o;n++){const l=t[n];if(this.applyHistoryObjectResolution(l),this.mosaicResult(l,a)==null){c[n]={data:[],time:[]};continue}const m=this.mosaicBucketKey(l,a);let d=r.get(m);d||(d=[],r.set(m,d)),d.push({index:n,item:l})}return yield Promise.all(Array.from(r.values()).map(n=>this.postMosaicBatchMerged(a,n,c))),c})}}class O extends L{constructor(t,s){super(t),this.linkWatchStop=null,this.componentType=s,this.session=f.ref(f.inject("session",null)),this.Style=f.ref({}),this.linkStore=h.useLinkStore()}extractStyles(){return{}}init(){return b(this,null,function*(){var t;this.Style.value=this.extractStyles(),this.applyTheme(),yield this.expandAliasData((t=this.props.conf)==null?void 0:t.data)})}setHistoryData(t){}onPreview(){return b(this,null,function*(){var a;const{common:t,data:s}=this.props.conf,e=this.getSource(),i=yield this.expandAliasData(s);if(this.props.conf.data=i,t.multiObject&&Array.isArray(i)){const o=new Set,c=new Map;(yield Promise.all(i.map(n=>b(this,null,function*(){return{item:n,objectIds:yield this.resolveObjectIds(n)}})))).forEach(({item:n,objectIds:l})=>{l.length>1&&c.set(String((t==null?void 0:t.object_alias)||(n==null?void 0:n.object_alias)||(n==null?void 0:n.alias)||(n==null?void 0:n.object_id)||(n==null?void 0:n.uid)||""),l),l.forEach(p=>{!p||o.has(p)||(o.add(p),this.subscribeBySource(e,p,n.uid))})})}else{const o=yield this.resolveObjectId(),c=(a=i==null?void 0:i[0])==null?void 0:a.uid;this.subscribeBySource(e,o,c)}})}setSocketData(t){if(!t)return;const{data:s}=this.props.conf;!s||!Array.isArray(s)||s.forEach(e=>{try{const i=this.extractDataValue(t,e.fv);e.value=i!=null?i:"--"}catch(i){e.value="--"}})}onLinkEvent(t){}getLinkChannel(){var t;return((t=this.Style.value)==null?void 0:t.linkChannel)||""}publish(t){const s=this.getLinkChannel();if(!s){console.warn(`[${this.componentType}] 未配置联动频道,无法发布事件`);return}this.linkStore.publish(s,this.componentType,t)}shouldHandleEvent(t){return!(!t||this.props.mode==="edit"||t.topic.source===this.componentType)}setupLinkWatch(){this.linkWatchStop&&this.linkWatchStop(),this.linkWatchStop=f.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,s,e,i){if(!this.session.value){console.warn(`[${this.componentType}] Session 未初始化,无法订阅`);return}const a={event:t,block:s,object_id:e};i&&Object.assign(a,i);const o=this.isLocalIotSubscribeMode()?{action:"sub_event",block_mapping:"mmq",event:a}:{action:"sub_agent_event",event:a},c=this.props.conf.id;this.session.value.componentRequests&&(this.session.value.componentRequests.has(c)||this.session.value.componentRequests.set(c,[]),this.session.value.componentRequests.get(c).push(o)),this.session.value.send({type:"send_message",message:o})}subscribeFv(t){this.subscribe("recv_fv","mosaic",t)}subscribeRetainerOpen(t){this.subscribe("retainer_open","retainer",t)}subscribeRetainerClose(t){this.subscribe("retainer_close","retainer",t)}subscribeRetainerEvent(t){this.subscribe("retainer_event","retainer",t)}subscribeRetainer(t){this.subscribeRetainerOpen(t),this.subscribeRetainerClose(t),this.subscribeRetainerEvent(t)}subscribeStatisticsRealtimeResult(t){this.subscribe("statistics_realtime_result","statistics",t)}subscribeStatistics(t){var e,i;const s=(i=(e=this.props.conf.data)==null?void 0:e[0])==null?void 0:i.uid;this.subscribeStatisticsWithUid(t,s)}subscribeStatisticsWithUid(t,s){this.subscribe("statistics_result","statistics",t,{uid:s,type:"statistics"})}subscribeCalculate(t){var e,i;const s=(i=(e=this.props.conf.data)==null?void 0:e[0])==null?void 0:i.uid;this.subscribeCalculateWithUid(s)}subscribeCalculateWithUid(t){this.subscribe("statistics_result","statistics","",{uid:t,type:"calculate"})}subscribeBySource(t,s,e){switch(t){case"mosaic":this.subscribeFv(s);break;case"statisticsRealtime":this.subscribeStatisticsRealtimeResult(s);break;case"statistics":e?this.subscribeStatisticsWithUid(s,e):this.subscribeStatistics(s);break;case"calculate":e?this.subscribeCalculateWithUid(e):this.subscribeCalculate(s);break;default:console.warn(`[${this.componentType}] 未知的数据源类型: ${t}`)}}extractDataValue(t,s){var e;return!t||!t.event?null:t.event==="recv_fv"&&t.block==="mosaic"?!s||!t.data?null:t.data[s]:t.event==="statistics_realtime_result"&&t.block==="statistics"?(e=t.data)==null?void 0:e.data:t.event==="statistics_result"&&t.block==="statistics"?t.data:null}getOptionValue(t,s){var i,a;const e=(a=(i=this.props.conf)==null?void 0:i.options)==null?void 0:a[t];return e==null?s:typeof e=="object"&&"value"in e?e.value:e}applyTheme(){h.applyThemeStyles(this.props.theme,this.Style.value)}getSource(){var t,s;return((s=(t=this.props.conf)==null?void 0:t.common)==null?void 0:s.source)||"mosaic"}isStatistics(){return["statistics","calculate","statisticsRealtime","calculateRealtime"].includes(this.getSource())}resolveObjectId(t){return b(this,null,function*(){return(yield this.resolveObjectIds(t))[0]||""})}resolveObjectIds(t){return b(this,null,function*(){const{uid:s,conf:e}=this.props,{common:i,data:a}=e,o=t||i||a[0]||{},r=(yield this.expandAliasData([o])).map(n=>String((n==null?void 0:n.object_id)||(n==null?void 0:n.objectid)||s)).filter(Boolean);return r.length>0&&o&&typeof o=="object"&&(o.object_id=r[0],o.objectid=r[0]),r.length>0?r:[String((o==null?void 0:o.object_id)||(o==null?void 0:o.objectid)||"")].filter(Boolean)})}expandAliasData(t){return b(this,null,function*(){var i;const s=Array.isArray(t)?t:[],e=[];for(const a of s){if(!a||typeof a!="object"){e.push(a);continue}const o={common:a,data:[a],options:(i=this.props.conf)==null?void 0:i.options};if(!String(a.object_alias||a.alias||"").trim()){e.push(a);continue}if(!(yield h.loadAliasMappingFromJsonIfNeeded(o))){e.push(a);continue}const r=h.expandAliasItems([a]);r.length>0?e.push(...r):e.push(a)}return e})}handleNull(t,s){return h.handleNullData(t,this.props,s)}getPreviewHelper(){return{preview:()=>R(this.props,this.session.value,t=>this.setHistoryData(t),t=>{let s=t;s.datetime=h.dayjs(s.datetime).format("YYYY-MM-DD HH:mm:ss"),this.setSocketData(s)},this.componentType),unregister:()=>j(this.props,this.session.value)}}getDebouncedInit(){return h.debounce(()=>this.init(),200)}cleanup(){}needsHistoryData(){return!0}setupLifecycle(){const t=this.getDebouncedInit(),s=this.getPreviewHelper();f.onMounted(()=>b(this,null,function*(){var i,a,o,c;const e={common:(i=this.props.conf)==null?void 0:i.common,data:(a=this.props.conf)==null?void 0:a.data,options:(o=this.props.conf)==null?void 0:o.options};if(this.props.mode==="preview"&&(yield h.loadAliasMappingFromJsonIfNeeded(e),Array.isArray((c=this.props.conf)==null?void 0:c.data)&&this.props.conf.data.length&&(this.props.conf.data=yield this.expandAliasData(this.props.conf.data))),yield this.init(),this.props.mode==="preview"){if(this.needsHistoryData())try{const r=yield this.initHistory();this.setHistoryData(r)}catch(r){console.error(`[${this.componentType}] 获取历史数据失败:`,r)}this.session.value&&(this.session.value.unregisterComponent(this.props.conf.id),this.session.value.registerComponent({id:this.props.conf.id,request:null,onUpdate:(r,n)=>{if(r==="realtime"){let l=n;l.datetime=h.dayjs(l.datetime).format("YYYY-MM-DD HH:mm:ss"),this.setSocketData(l)}}})),this.onPreview()}this.setupLinkWatch()})),f.onBeforeUnmount(()=>{this.cleanup(),s.unregister(),this.stopLinkWatch()}),f.watch(()=>this.props.conf,()=>{this.props.mode==="edit"&&t()},{deep:!0}),f.watch(()=>this.props.theme,()=>{this.init()}),f.watch(()=>{var e;return(e=this.Style.value)==null?void 0:e.linkChannel},()=>{this.setupLinkWatch()})}getStyle(){return this.Style}getType(){return this.componentType}dispatchModal(t,s,e){this.props.mode==="preview"&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:t,layerId:s,sheetIndex:e!=null?e:-1}}))}triggerModalByKey(t){var e,i;if(this.props.mode!=="preview")return;const s=(e=this.props.conf)==null?void 0:e.modalBinding;if(s&&s.enabled&&s.mode==="key"){const o=(s.map||{})[t];if(!o||!o.layerId)return;const c=o.action||"toggle",r=(i=s.sheetIndex)!=null?i:-1;this.dispatchModal(c,o.layerId,r)}}}exports.BaseComponent=O;exports.preview=R;exports.unregister=j;
@@ -27,16 +27,16 @@ var d = (u, t, s) => new Promise((e, i) => {
27
27
  c((s = s.apply(u, t)).next());
28
28
  });
29
29
  import { ref as R, inject as O, watch as m, onMounted as C, onBeforeUnmount as W } from "vue";
30
- import { A as Y, g as y, a as j, k as B, w as U, x as D, y as T, z as E, B as P } from "./index-C7h1impW.js";
30
+ import { A as Y, g as y, a as j, k as B, w as U, x as D, y as T, z as E, B as P } from "./index-CFVu8BaV.js";
31
31
  const K = (u, t, s, e, i) => d(null, null, function* () {
32
32
  try {
33
- const o = yield new (yield import("./history-BYjRBaaH.js")).default().getHistoryData(u, i);
33
+ const o = yield new (yield import("./history-t1YmymEh.js")).default().getHistoryData(u, i);
34
34
  s(o);
35
35
  } catch (n) {
36
36
  console.error("获取历史数据时出错:", n);
37
37
  } finally {
38
38
  if (t) {
39
- const { formatRequest: n } = yield import("./request-CfsIYWlr.js"), o = n(u.conf, u.uid, i);
39
+ const { formatRequest: n } = yield import("./request-DVcxyubB.js"), o = n(u.conf, u.uid, i);
40
40
  t.registerComponent({
41
41
  id: u.conf.id,
42
42
  request: o,
@@ -15,8 +15,8 @@ var h = (a, t, e) => new Promise((n, o) => {
15
15
  s((e = e.apply(a, t)).next());
16
16
  });
17
17
  import { nextTick as p } from "vue";
18
- import { B as c } from "./BaseComponent-CJUfAya1.js";
19
- import { E as d, G as g, I as O } from "./index-C7h1impW.js";
18
+ import { B as c } from "./BaseComponent-CG-AFgtN.js";
19
+ import { E as d, G as g, I as O } from "./index-CFVu8BaV.js";
20
20
  import { i as f, d as m } from "./echarts-BVht3HHb.js";
21
21
  class D extends c {
22
22
  constructor(t, e) {
@@ -1 +1 @@
1
- "use strict";var n=(h,t,e)=>new Promise((u,o)=>{var c=i=>{try{s(e.next(i))}catch(r){o(r)}},p=i=>{try{s(e.throw(i))}catch(r){o(r)}},s=i=>i.done?u(i.value):Promise.resolve(i.value).then(c,p);s((e=e.apply(h,t)).next())});const d=require("vue"),g=require("./BaseComponent-Bj7jDYan.cjs"),a=require("./index-dj-SHelr.cjs"),l=require("./echarts-BB8O2KSA.cjs");class O extends g.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(){return n(this,null,function*(){return this.Style.value=this.extractStyles(),this.applyTheme(),this.ensureData(),new Promise(t=>{d.nextTick(()=>{this.initChart(),t()})})})}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=l.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 a.hasDataSource(this.props.conf)}getTimeAxis(){return a.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(),l.dispose(this.chartObj),this.chartObj=null)}getEchartId(){return this.echartId}getChartInstance(){return this.chartObj}}exports.EChartComponentBase=O;
1
+ "use strict";var n=(h,t,e)=>new Promise((u,o)=>{var c=i=>{try{s(e.next(i))}catch(r){o(r)}},p=i=>{try{s(e.throw(i))}catch(r){o(r)}},s=i=>i.done?u(i.value):Promise.resolve(i.value).then(c,p);s((e=e.apply(h,t)).next())});const d=require("vue"),g=require("./BaseComponent-B676Wwpz.cjs"),a=require("./index-C2MWQs3P.cjs"),l=require("./echarts-BB8O2KSA.cjs");class O extends g.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(){return n(this,null,function*(){return this.Style.value=this.extractStyles(),this.applyTheme(),this.ensureData(),new Promise(t=>{d.nextTick(()=>{this.initChart(),t()})})})}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=l.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 a.hasDataSource(this.props.conf)}getTimeAxis(){return a.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(),l.dispose(this.chartObj),this.chartObj=null)}getEchartId(){return this.echartId}getChartInstance(){return this.chartObj}}exports.EChartComponentBase=O;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),V=require("./index-dj-SHelr.cjs"),w={class:"lw-panel-section lw-plan-section"},g={class:"lw-plan-toolbar"},b=["disabled"],y={class:"lw-plan-table"},k={class:"lw-step-no"},x=["onClick"],S={key:0},C=e.defineComponent({__name:"EmergencyPlanPanel",props:{plans:{},currentPlan:{},execution:{}},emits:["select-plan","start-plan","report-warning","complete-step"],setup(o,{emit:m}){var u,d;const a=o,i=m,s=e.ref(String((d=(u=a.currentPlan)==null?void 0:u.warningLevel)!=null?d:4)),r=e.computed(()=>{const n=parseInt(s.value);return a.plans.find(t=>t.warningLevel===n)||null}),c=e.computed(()=>{var n;return a.execution.status!=="idle"&&a.execution.steps.length>0?a.execution.steps:((n=r.value)==null?void 0:n.steps)||[]}),p=e.computed(()=>{const n=a.execution.status;return n==="running"?"lw-status-running":n==="completed"?"lw-status-done":"lw-status-idle"}),E=e.computed(()=>({idle:"未启动",running:"预案进行中",completed:"已完成",aborted:"已中止"})[a.execution.status]||"未启动");function N(){r.value&&i("select-plan",r.value)}function v(n){a.execution.status==="running"&&n.status==="pending"&&i("complete-step",n)}return e.watch(()=>a.currentPlan,n=>{n&&(s.value=String(n.warningLevel))}),(n,t)=>(e.openBlock(),e.createElementBlock("div",w,[t[7]||(t[7]=e.createElementVNode("div",{class:"lw-panel-header"},[e.createElementVNode("span",{class:"lw-panel-title"},"应急预案")],-1)),e.createElementVNode("div",g,[t[4]||(t[4]=e.createElementVNode("span",{class:"lw-plan-label"},"预案执行步骤",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":t[0]||(t[0]=l=>s.value=l),class:"lw-select lw-select-sm",onChange:N},[...t[3]||(t[3]=[e.createElementVNode("option",{value:"4"},"Ⅳ级预警",-1),e.createElementVNode("option",{value:"3"},"Ⅲ级预警",-1),e.createElementVNode("option",{value:"2"},"Ⅱ级预警",-1),e.createElementVNode("option",{value:"1"},"Ⅰ级预警",-1)])],544),[[e.vModelSelect,s.value]]),e.createElementVNode("span",{class:e.normalizeClass(["lw-plan-status",p.value])},e.toDisplayString(E.value),3),e.createElementVNode("button",{class:"lw-btn-primary lw-btn-sm",disabled:o.execution.status==="running",onClick:t[1]||(t[1]=l=>n.$emit("start-plan"))},e.toDisplayString(o.execution.status==="running"?"预案进行中":"启动预案"),9,b),e.createElementVNode("button",{class:"lw-btn-primary lw-btn-sm lw-btn-warn",onClick:t[2]||(t[2]=l=>n.$emit("report-warning"))},"报告预警情况")]),e.createElementVNode("div",y,[e.createElementVNode("table",null,[t[6]||(t[6]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,"#"),e.createElementVNode("th",null,"步骤"),e.createElementVNode("th",null,"责任人"),e.createElementVNode("th",null,"时限"),e.createElementVNode("th",null,"状态")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,l=>(e.openBlock(),e.createElementBlock("tr",{key:l.stepId},[e.createElementVNode("td",k,e.toDisplayString(l.stepNo),1),e.createElementVNode("td",null,e.toDisplayString(l.stepName),1),e.createElementVNode("td",null,e.toDisplayString(l.responsibleName),1),e.createElementVNode("td",null,e.toDisplayString(l.timeLimitDisplay),1),e.createElementVNode("td",null,[e.createElementVNode("span",{class:e.normalizeClass(["lw-step-status","lw-step-"+l.status]),onClick:P=>v(l)},e.toDisplayString(l.statusText),11,x)])]))),128)),c.value.length===0?(e.openBlock(),e.createElementBlock("tr",S,[...t[5]||(t[5]=[e.createElementVNode("td",{colspan:"5",class:"lw-no-data"},"该等级暂无预案",-1)])])):e.createCommentVNode("",!0)])])])]))}}),f=V._export_sfc(C,[["__scopeId","data-v-2e51d84b"]]);exports.EmergencyPlanPanel=f;
1
+ "use strict";const e=require("vue"),V=require("./index-C2MWQs3P.cjs"),w={class:"lw-panel-section lw-plan-section"},g={class:"lw-plan-toolbar"},b=["disabled"],y={class:"lw-plan-table"},k={class:"lw-step-no"},x=["onClick"],S={key:0},C=e.defineComponent({__name:"EmergencyPlanPanel",props:{plans:{},currentPlan:{},execution:{}},emits:["select-plan","start-plan","report-warning","complete-step"],setup(o,{emit:m}){var u,d;const a=o,i=m,s=e.ref(String((d=(u=a.currentPlan)==null?void 0:u.warningLevel)!=null?d:4)),r=e.computed(()=>{const n=parseInt(s.value);return a.plans.find(t=>t.warningLevel===n)||null}),c=e.computed(()=>{var n;return a.execution.status!=="idle"&&a.execution.steps.length>0?a.execution.steps:((n=r.value)==null?void 0:n.steps)||[]}),p=e.computed(()=>{const n=a.execution.status;return n==="running"?"lw-status-running":n==="completed"?"lw-status-done":"lw-status-idle"}),E=e.computed(()=>({idle:"未启动",running:"预案进行中",completed:"已完成",aborted:"已中止"})[a.execution.status]||"未启动");function N(){r.value&&i("select-plan",r.value)}function v(n){a.execution.status==="running"&&n.status==="pending"&&i("complete-step",n)}return e.watch(()=>a.currentPlan,n=>{n&&(s.value=String(n.warningLevel))}),(n,t)=>(e.openBlock(),e.createElementBlock("div",w,[t[7]||(t[7]=e.createElementVNode("div",{class:"lw-panel-header"},[e.createElementVNode("span",{class:"lw-panel-title"},"应急预案")],-1)),e.createElementVNode("div",g,[t[4]||(t[4]=e.createElementVNode("span",{class:"lw-plan-label"},"预案执行步骤",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":t[0]||(t[0]=l=>s.value=l),class:"lw-select lw-select-sm",onChange:N},[...t[3]||(t[3]=[e.createElementVNode("option",{value:"4"},"Ⅳ级预警",-1),e.createElementVNode("option",{value:"3"},"Ⅲ级预警",-1),e.createElementVNode("option",{value:"2"},"Ⅱ级预警",-1),e.createElementVNode("option",{value:"1"},"Ⅰ级预警",-1)])],544),[[e.vModelSelect,s.value]]),e.createElementVNode("span",{class:e.normalizeClass(["lw-plan-status",p.value])},e.toDisplayString(E.value),3),e.createElementVNode("button",{class:"lw-btn-primary lw-btn-sm",disabled:o.execution.status==="running",onClick:t[1]||(t[1]=l=>n.$emit("start-plan"))},e.toDisplayString(o.execution.status==="running"?"预案进行中":"启动预案"),9,b),e.createElementVNode("button",{class:"lw-btn-primary lw-btn-sm lw-btn-warn",onClick:t[2]||(t[2]=l=>n.$emit("report-warning"))},"报告预警情况")]),e.createElementVNode("div",y,[e.createElementVNode("table",null,[t[6]||(t[6]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,"#"),e.createElementVNode("th",null,"步骤"),e.createElementVNode("th",null,"责任人"),e.createElementVNode("th",null,"时限"),e.createElementVNode("th",null,"状态")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,l=>(e.openBlock(),e.createElementBlock("tr",{key:l.stepId},[e.createElementVNode("td",k,e.toDisplayString(l.stepNo),1),e.createElementVNode("td",null,e.toDisplayString(l.stepName),1),e.createElementVNode("td",null,e.toDisplayString(l.responsibleName),1),e.createElementVNode("td",null,e.toDisplayString(l.timeLimitDisplay),1),e.createElementVNode("td",null,[e.createElementVNode("span",{class:e.normalizeClass(["lw-step-status","lw-step-"+l.status]),onClick:P=>v(l)},e.toDisplayString(l.statusText),11,x)])]))),128)),c.value.length===0?(e.openBlock(),e.createElementBlock("tr",S,[...t[5]||(t[5]=[e.createElementVNode("td",{colspan:"5",class:"lw-no-data"},"该等级暂无预案",-1)])])):e.createCommentVNode("",!0)])])])]))}}),f=V._export_sfc(C,[["__scopeId","data-v-2e51d84b"]]);exports.EmergencyPlanPanel=f;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as k, ref as P, computed as i, watch as S, openBlock as u, createElementBlock as r, createElementVNode as t, withDirectives as L, vModelSelect as h, normalizeClass as g, toDisplayString as a, Fragment as E, renderList as N, createCommentVNode as $ } from "vue";
2
- import { _ as D } from "./index-C7h1impW.js";
2
+ import { _ as D } from "./index-CFVu8BaV.js";
3
3
  const I = { class: "lw-panel-section lw-plan-section" }, V = { class: "lw-plan-toolbar" }, _ = ["disabled"], B = { class: "lw-plan-table" }, T = { class: "lw-step-no" }, z = ["onClick"], F = { key: 0 }, M = /* @__PURE__ */ k({
4
4
  __name: "EmergencyPlanPanel",
5
5
  props: {
@@ -20,7 +20,7 @@ var B = (l, v) => {
20
20
  return d;
21
21
  };
22
22
  import { defineComponent as F, openBlock as c, createElementBlock as h, createElementVNode as e, Fragment as S, renderList as E, normalizeClass as U, normalizeStyle as Z, toDisplayString as r, createCommentVNode as L, ref as R, watch as ie, computed as I, createBlock as K, Teleport as Q, withModifiers as P, withDirectives as D, vModelCheckbox as de, vModelText as W } from "vue";
23
- import { _ as H } from "./index-C7h1impW.js";
23
+ import { _ as H } from "./index-CFVu8BaV.js";
24
24
  const ce = { class: "lw-panel-section" }, re = { class: "lw-panel-header" }, pe = { class: "lw-panel-actions" }, ue = { class: "lw-warning-table" }, ve = ["onClick"], me = { key: 0 }, he = /* @__PURE__ */ F({
25
25
  __name: "WarningOverviewPanel",
26
26
  props: {
@@ -1,4 +1,4 @@
1
- "use strict";var A=Object.defineProperty,z=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var O=(o,p,c)=>p in o?A(o,p,{enumerable:!0,configurable:!0,writable:!0,value:c}):o[p]=c,B=(o,p)=>{for(var c in p||(p={}))j.call(p,c)&&O(o,c,p[c]);if(C)for(var c of C(p))R.call(p,c)&&O(o,c,p[c]);return o},w=(o,p)=>z(o,W(p));var L=(o,p)=>{var c={};for(var m in o)j.call(o,m)&&p.indexOf(m)<0&&(c[m]=o[m]);if(o!=null&&C)for(var m of C(o))p.indexOf(m)<0&&R.call(o,m)&&(c[m]=o[m]);return c};const e=require("vue"),D=require("./index-dj-SHelr.cjs"),q={class:"lw-panel-section"},H={class:"lw-panel-header"},J={class:"lw-panel-actions"},G={class:"lw-warning-table"},Y=["onClick"],Z={key:0},K=e.defineComponent({__name:"WarningOverviewPanel",props:{warnings:{},currentWarning:{},levelColors:{}},emits:["select-warning","manage-plans","history-plans"],setup(o){const p=o,c={1:"#e74c3c",2:"#ff6600",3:"#f39c12",4:"#3498db"};function m(u){var d;return((d=p.levelColors)==null?void 0:d[u])||c[u]||"#999"}function k(u){if(!u)return"--";const d=u.match(/(\d{2}:\d{2}:\d{2})$/);return d?d[1]:u}return(u,d)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",H,[d[2]||(d[2]=e.createElementVNode("span",{class:"lw-panel-title"},"预警数据概览",-1)),e.createElementVNode("div",J,[e.createElementVNode("button",{class:"lw-btn-outline",onClick:d[0]||(d[0]=a=>u.$emit("manage-plans"))},"应急预案库管理"),e.createElementVNode("button",{class:"lw-btn-outline",onClick:d[1]||(d[1]=a=>u.$emit("history-plans"))},"历史应急预案")])]),e.createElementVNode("div",G,[e.createElementVNode("table",null,[d[4]||(d[4]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,"预警等级"),e.createElementVNode("th",null,"预警区域"),e.createElementVNode("th",null,"触发时间"),e.createElementVNode("th",null,"最近人员和设备编号"),e.createElementVNode("th",null,"与预警区距离")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.warnings,a=>{var g,_;return e.openBlock(),e.createElementBlock("tr",{key:a.warningId,class:e.normalizeClass({"lw-row-active":((g=o.currentWarning)==null?void 0:g.warningId)===a.warningId}),onClick:y=>u.$emit("select-warning",a)},[e.createElementVNode("td",null,[e.createElementVNode("span",{class:"lw-level-badge",style:e.normalizeStyle({color:m(a.warningLevel)})},e.toDisplayString(a.warningLevelName),5)]),e.createElementVNode("td",null,e.toDisplayString(a.regionName),1),e.createElementVNode("td",null,e.toDisplayString(k(a.triggerTime)),1),e.createElementVNode("td",null,e.toDisplayString(((_=a.nearestObject)==null?void 0:_.objectName)||"--"),1),e.createElementVNode("td",null,e.toDisplayString(a.nearestObject?`${a.nearestObject.distance} ${a.nearestObject.unit}`:"--"),1)],10,Y)}),128)),o.warnings.length===0?(e.openBlock(),e.createElementBlock("tr",Z,[...d[3]||(d[3]=[e.createElementVNode("td",{colspan:"5",class:"lw-no-data"},"暂无预警数据",-1)])])):e.createCommentVNode("",!0)])])])]))}}),Q=D._export_sfc(K,[["__scopeId","data-v-68afecd8"]]),X={class:"pld-body"},ee={class:"pld-tabs"},te=["onClick"],ne={class:"pld-level-tabs"},le=["onClick"],oe={class:"pld-step-list"},se=["onUpdate:modelValue"],ae={class:"pld-step-no"},ie=["onUpdate:modelValue"],ce=["onUpdate:modelValue"],de=["onUpdate:modelValue"],re={key:0,class:"pld-empty"},pe={class:"pld-actions"},me=["disabled"],ue={key:1,class:"pld-ai"},ve={class:"pld-ai-grid"},Ee={class:"pld-ai-card"},Ne={class:"pld-ai-card-value"},he={class:"pld-ai-card"},ge={class:"pld-ai-card-value"},Ve={class:"pld-ai-card"},be={class:"pld-ai-card-value"},_e={class:"pld-ai-card"},ke={class:"pld-ai-card-value"},ye={class:"pld-ai-info"},fe={class:"pld-ai-roster"},$e={class:"pld-footer"},Se={key:0,class:"pld-dirty-hint"},Ce=e.defineComponent({__name:"PlanLibraryDialog",props:{visible:{type:Boolean},plans:{},mobileObjects:{default:()=>[]},currentWarning:{default:null}},emits:["close","update:plans"],setup(o,{emit:p}){const c=o,m=p,k=[{label:"步骤配置",value:"steps"},{label:"智能预警预案",value:"ai"}],u=[{label:"Ⅰ级预警",value:1},{label:"Ⅱ级预警",value:2},{label:"Ⅲ级预警",value:3},{label:"Ⅳ级预警",value:4}],d=e.ref("steps"),a=e.ref(4),g=e.ref([]),_=e.ref("");e.watch(()=>c.visible,i=>{if(i){const t=JSON.stringify(c.plans);g.value=JSON.parse(t),_.value=t}},{immediate:!0});const y=e.computed(()=>{if(!c.visible)return!1;const i=g.value.map(t=>w(B({},t),{steps:t.steps.map(s=>{const h=s,{__checked:N}=h;return L(h,["__checked"])})}));return JSON.stringify(i)!==_.value});function $(i){const t=g.value.find(N=>N.warningLevel===i);if(t)return t;const s={planId:`PLAN_L${i}_NEW`,planName:"Ⅰ/Ⅱ/Ⅲ/Ⅳ 级预警预案".split("/")[i-1]+"预警预案",warningLevel:i,applicableRegionIds:[],status:"enabled",steps:[]};return g.value.push(s),s}const S=e.computed(()=>$(a.value).steps),n=e.computed(()=>S.value.some(i=>i.__checked));function l(){const i=$(a.value),t=String(i.steps.length+1).padStart(2,"0"),s={stepId:`STEP_L${a.value}_${Date.now()}`,stepNo:t,stepName:"",responsibleName:"",responsibleRole:"manual",timeLimitMinutes:0,timeLimitDisplay:"",status:"pending",statusText:"待启动"};i.steps.push(s)}function r(){const i=$(a.value);i.steps=i.steps.filter(t=>!t.__checked)}const v={1:"立即响应",2:"10 分钟内",3:"20 分钟内",4:"30 分钟内"},E={1:"预警区方圆 1000 米",2:"预警区方圆 600 米",3:"预警区方圆 400 米",4:"预警区方圆 300 米"},T={1:"值班调度员 4 人、现场安全员 6 人、机动疏导人员 12 人",2:"值班调度员 3 人、现场安全员 4 人、机动疏导人员 8 人",3:"值班调度员 2 人、现场安全员 3 人、机动疏导人员 6 人",4:"值班调度员 2 人、现场安全员 2 人、机动疏导人员 4 人"},f=e.computed(()=>{const i=a.value,t=["Ⅰ","Ⅱ","Ⅲ","Ⅳ"][i-1]||"Ⅳ",s=c.mobileObjects.filter(b=>b.status==="in_warning_area"||b.status==="near_warning_area"),N={};s.forEach(b=>{N[b.objectType]=(N[b.objectType]||0)+1});const V={excavator:"挖机",truck:"卡车",drone:"无人机",person:"人员"},h=Object.entries(N).filter(([b])=>b!=="person").map(([b,F])=>`${V[b]||b} ${F} 台`),P=h.length>0?h.join("、"):"无",M=h.length<=2?"低风险区间":h.length<=4?"中风险区间":"高风险区间",U=h.length>0?`当前预警区内共识别 ${h.join("、")},设备数量处于${M},系统自动匹配 ${t} 级预警。`:`当前预警区内未识别到设备,系统保持 ${t} 级预警基线响应。`;return{levelText:`${t}级预警`,responseTime:v[i]||"30 分钟内",responseRange:E[i]||"预警区方圆 300 米",equipmentText:P,matchReason:U,rosterText:T[i]||T[4]}});function I(){const i=g.value.map(t=>w(B({},t),{steps:t.steps.map(s=>{const h=s,{__checked:N}=h;return L(h,["__checked"])})}));m("update:plans",i),m("close")}function x(){y.value&&!window.confirm("有未保存的修改,确定要放弃吗?")||m("close")}return(i,t)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[o.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pld-mask",onClick:e.withModifiers(x,["self"])},[e.createElementVNode("div",{class:"pld-dialog",onClick:t[0]||(t[0]=e.withModifiers(()=>{},["stop"]))},[t[7]||(t[7]=e.createElementVNode("div",{class:"pld-header"},[e.createElementVNode("span",{class:"pld-title"},"应急预案库管理")],-1)),e.createElementVNode("div",X,[e.createElementVNode("div",ee,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(k,s=>e.createElementVNode("button",{key:s.value,class:e.normalizeClass(["pld-tab",{"is-active":d.value===s.value}]),onClick:N=>d.value=s.value},e.toDisplayString(s.label),11,te)),64))]),d.value==="steps"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",ne,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(u,s=>e.createElementVNode("button",{key:s.value,class:e.normalizeClass(["pld-level-tab",{"is-active":a.value===s.value}]),onClick:N=>a.value=s.value},e.toDisplayString(s.label),11,le)),64))]),e.createElementVNode("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(s,N)=>(e.openBlock(),e.createElementBlock("div",{key:s.stepId||N,class:"pld-step-row"},[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":V=>s.__checked=V,class:"pld-check"},null,8,se),[[e.vModelCheckbox,s.__checked]]),e.createElementVNode("span",ae,e.toDisplayString(String(N+1).padStart(2,"0")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V=>s.stepName=V,class:"pld-input pld-step-name",placeholder:"步骤名称"},null,8,ie),[[e.vModelText,s.stepName]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V=>s.responsibleName=V,class:"pld-input pld-step-resp",placeholder:"责任人"},null,8,ce),[[e.vModelText,s.responsibleName]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V=>s.timeLimitDisplay=V,class:"pld-input pld-step-time",placeholder:"时限"},null,8,de),[[e.vModelText,s.timeLimitDisplay]])]))),128)),S.value.length===0?(e.openBlock(),e.createElementBlock("div",re,' 该等级暂无步骤,点击下方"添加步骤"新增 ')):e.createCommentVNode("",!0)]),e.createElementVNode("div",pe,[e.createElementVNode("button",{class:"pld-btn pld-btn-ghost",onClick:l},"+ 添加步骤"),e.createElementVNode("button",{class:"pld-btn pld-btn-danger",disabled:!n.value,onClick:r},"删除选中",8,me)])],64)):(e.openBlock(),e.createElementBlock("div",ue,[t[5]||(t[5]=e.createElementVNode("div",{class:"pld-ai-title"},"预案匹配",-1)),t[6]||(t[6]=e.createElementVNode("div",{class:"pld-ai-subtitle"},"自动匹配规则",-1)),e.createElementVNode("div",ve,[e.createElementVNode("div",Ee,[t[1]||(t[1]=e.createElementVNode("div",{class:"pld-ai-card-label"},"预警级别",-1)),e.createElementVNode("div",Ne,e.toDisplayString(f.value.levelText),1)]),e.createElementVNode("div",he,[t[2]||(t[2]=e.createElementVNode("div",{class:"pld-ai-card-label"},"响应时限",-1)),e.createElementVNode("div",ge,e.toDisplayString(f.value.responseTime),1)]),e.createElementVNode("div",Ve,[t[3]||(t[3]=e.createElementVNode("div",{class:"pld-ai-card-label"},"响应范围",-1)),e.createElementVNode("div",be,e.toDisplayString(f.value.responseRange),1)]),e.createElementVNode("div",_e,[t[4]||(t[4]=e.createElementVNode("div",{class:"pld-ai-card-label"},"预警区内设备",-1)),e.createElementVNode("div",ke,e.toDisplayString(f.value.equipmentText),1)])]),e.createElementVNode("div",ye,e.toDisplayString(f.value.matchReason),1),e.createElementVNode("div",fe,e.toDisplayString(f.value.rosterText),1)]))]),e.createElementVNode("div",$e,[y.value?(e.openBlock(),e.createElementBlock("span",Se,"· 有未保存的修改")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"pld-btn pld-btn-ghost",onClick:x},"取消"),e.createElementVNode("button",{class:"pld-btn pld-btn-primary",onClick:I},"保存")])])])):e.createCommentVNode("",!0)]))}}),Be=D._export_sfc(Ce,[["__scopeId","data-v-26110cae"]]),we={class:"hpd-header"},Le={class:"hpd-sub"},De={class:"hpd-body"},Te={class:"hpd-toolbar"},xe=["disabled"],Oe={class:"hpd-list"},je=["onClick"],Re={class:"hpd-name"},Ie={class:"hpd-count"},Pe=["onClick"],Me={class:"hpd-arrow"},Ue={key:0,class:"hpd-item-body"},Fe={class:"hpd-table"},Ae={key:0},ze={key:0,class:"hpd-empty-all"},We={class:"hpd-footer"},qe=e.defineComponent({__name:"HistoryPlanDialog",props:{visible:{type:Boolean},plans:{}},emits:["close"],setup(o){const p=o,c={1:"#e74c3c",2:"#ff6600",3:"#f39c12",4:"#3498db"},m=e.ref(null),k=e.computed(()=>[...p.plans].sort((n,l)=>n.warningLevel-l.warningLevel));function u(n){return["Ⅰ","Ⅱ","Ⅲ","Ⅳ"][n-1]||String(n)}function d(n){m.value=m.value===n?null:n}function a(n){const l=String(n!=null?n:"");return/[",\n]/.test(l)?`"${l.replace(/"/g,'""')}"`:l}function g(n){const l=[`预案名称,${a(n.planName)}`,`预警等级,${u(n.warningLevel)} 级`,`适用场景,${a((n.scenarioType||[]).join("/"))}`,""].join(`
1
+ "use strict";var A=Object.defineProperty,z=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var O=(o,p,c)=>p in o?A(o,p,{enumerable:!0,configurable:!0,writable:!0,value:c}):o[p]=c,B=(o,p)=>{for(var c in p||(p={}))j.call(p,c)&&O(o,c,p[c]);if(C)for(var c of C(p))R.call(p,c)&&O(o,c,p[c]);return o},w=(o,p)=>z(o,W(p));var L=(o,p)=>{var c={};for(var m in o)j.call(o,m)&&p.indexOf(m)<0&&(c[m]=o[m]);if(o!=null&&C)for(var m of C(o))p.indexOf(m)<0&&R.call(o,m)&&(c[m]=o[m]);return c};const e=require("vue"),D=require("./index-C2MWQs3P.cjs"),q={class:"lw-panel-section"},H={class:"lw-panel-header"},J={class:"lw-panel-actions"},G={class:"lw-warning-table"},Y=["onClick"],Z={key:0},K=e.defineComponent({__name:"WarningOverviewPanel",props:{warnings:{},currentWarning:{},levelColors:{}},emits:["select-warning","manage-plans","history-plans"],setup(o){const p=o,c={1:"#e74c3c",2:"#ff6600",3:"#f39c12",4:"#3498db"};function m(u){var d;return((d=p.levelColors)==null?void 0:d[u])||c[u]||"#999"}function k(u){if(!u)return"--";const d=u.match(/(\d{2}:\d{2}:\d{2})$/);return d?d[1]:u}return(u,d)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",H,[d[2]||(d[2]=e.createElementVNode("span",{class:"lw-panel-title"},"预警数据概览",-1)),e.createElementVNode("div",J,[e.createElementVNode("button",{class:"lw-btn-outline",onClick:d[0]||(d[0]=a=>u.$emit("manage-plans"))},"应急预案库管理"),e.createElementVNode("button",{class:"lw-btn-outline",onClick:d[1]||(d[1]=a=>u.$emit("history-plans"))},"历史应急预案")])]),e.createElementVNode("div",G,[e.createElementVNode("table",null,[d[4]||(d[4]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",null,"预警等级"),e.createElementVNode("th",null,"预警区域"),e.createElementVNode("th",null,"触发时间"),e.createElementVNode("th",null,"最近人员和设备编号"),e.createElementVNode("th",null,"与预警区距离")])],-1)),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.warnings,a=>{var g,_;return e.openBlock(),e.createElementBlock("tr",{key:a.warningId,class:e.normalizeClass({"lw-row-active":((g=o.currentWarning)==null?void 0:g.warningId)===a.warningId}),onClick:y=>u.$emit("select-warning",a)},[e.createElementVNode("td",null,[e.createElementVNode("span",{class:"lw-level-badge",style:e.normalizeStyle({color:m(a.warningLevel)})},e.toDisplayString(a.warningLevelName),5)]),e.createElementVNode("td",null,e.toDisplayString(a.regionName),1),e.createElementVNode("td",null,e.toDisplayString(k(a.triggerTime)),1),e.createElementVNode("td",null,e.toDisplayString(((_=a.nearestObject)==null?void 0:_.objectName)||"--"),1),e.createElementVNode("td",null,e.toDisplayString(a.nearestObject?`${a.nearestObject.distance} ${a.nearestObject.unit}`:"--"),1)],10,Y)}),128)),o.warnings.length===0?(e.openBlock(),e.createElementBlock("tr",Z,[...d[3]||(d[3]=[e.createElementVNode("td",{colspan:"5",class:"lw-no-data"},"暂无预警数据",-1)])])):e.createCommentVNode("",!0)])])])]))}}),Q=D._export_sfc(K,[["__scopeId","data-v-68afecd8"]]),X={class:"pld-body"},ee={class:"pld-tabs"},te=["onClick"],ne={class:"pld-level-tabs"},le=["onClick"],oe={class:"pld-step-list"},se=["onUpdate:modelValue"],ae={class:"pld-step-no"},ie=["onUpdate:modelValue"],ce=["onUpdate:modelValue"],de=["onUpdate:modelValue"],re={key:0,class:"pld-empty"},pe={class:"pld-actions"},me=["disabled"],ue={key:1,class:"pld-ai"},ve={class:"pld-ai-grid"},Ee={class:"pld-ai-card"},Ne={class:"pld-ai-card-value"},he={class:"pld-ai-card"},ge={class:"pld-ai-card-value"},Ve={class:"pld-ai-card"},be={class:"pld-ai-card-value"},_e={class:"pld-ai-card"},ke={class:"pld-ai-card-value"},ye={class:"pld-ai-info"},fe={class:"pld-ai-roster"},$e={class:"pld-footer"},Se={key:0,class:"pld-dirty-hint"},Ce=e.defineComponent({__name:"PlanLibraryDialog",props:{visible:{type:Boolean},plans:{},mobileObjects:{default:()=>[]},currentWarning:{default:null}},emits:["close","update:plans"],setup(o,{emit:p}){const c=o,m=p,k=[{label:"步骤配置",value:"steps"},{label:"智能预警预案",value:"ai"}],u=[{label:"Ⅰ级预警",value:1},{label:"Ⅱ级预警",value:2},{label:"Ⅲ级预警",value:3},{label:"Ⅳ级预警",value:4}],d=e.ref("steps"),a=e.ref(4),g=e.ref([]),_=e.ref("");e.watch(()=>c.visible,i=>{if(i){const t=JSON.stringify(c.plans);g.value=JSON.parse(t),_.value=t}},{immediate:!0});const y=e.computed(()=>{if(!c.visible)return!1;const i=g.value.map(t=>w(B({},t),{steps:t.steps.map(s=>{const h=s,{__checked:N}=h;return L(h,["__checked"])})}));return JSON.stringify(i)!==_.value});function $(i){const t=g.value.find(N=>N.warningLevel===i);if(t)return t;const s={planId:`PLAN_L${i}_NEW`,planName:"Ⅰ/Ⅱ/Ⅲ/Ⅳ 级预警预案".split("/")[i-1]+"预警预案",warningLevel:i,applicableRegionIds:[],status:"enabled",steps:[]};return g.value.push(s),s}const S=e.computed(()=>$(a.value).steps),n=e.computed(()=>S.value.some(i=>i.__checked));function l(){const i=$(a.value),t=String(i.steps.length+1).padStart(2,"0"),s={stepId:`STEP_L${a.value}_${Date.now()}`,stepNo:t,stepName:"",responsibleName:"",responsibleRole:"manual",timeLimitMinutes:0,timeLimitDisplay:"",status:"pending",statusText:"待启动"};i.steps.push(s)}function r(){const i=$(a.value);i.steps=i.steps.filter(t=>!t.__checked)}const v={1:"立即响应",2:"10 分钟内",3:"20 分钟内",4:"30 分钟内"},E={1:"预警区方圆 1000 米",2:"预警区方圆 600 米",3:"预警区方圆 400 米",4:"预警区方圆 300 米"},T={1:"值班调度员 4 人、现场安全员 6 人、机动疏导人员 12 人",2:"值班调度员 3 人、现场安全员 4 人、机动疏导人员 8 人",3:"值班调度员 2 人、现场安全员 3 人、机动疏导人员 6 人",4:"值班调度员 2 人、现场安全员 2 人、机动疏导人员 4 人"},f=e.computed(()=>{const i=a.value,t=["Ⅰ","Ⅱ","Ⅲ","Ⅳ"][i-1]||"Ⅳ",s=c.mobileObjects.filter(b=>b.status==="in_warning_area"||b.status==="near_warning_area"),N={};s.forEach(b=>{N[b.objectType]=(N[b.objectType]||0)+1});const V={excavator:"挖机",truck:"卡车",drone:"无人机",person:"人员"},h=Object.entries(N).filter(([b])=>b!=="person").map(([b,F])=>`${V[b]||b} ${F} 台`),P=h.length>0?h.join("、"):"无",M=h.length<=2?"低风险区间":h.length<=4?"中风险区间":"高风险区间",U=h.length>0?`当前预警区内共识别 ${h.join("、")},设备数量处于${M},系统自动匹配 ${t} 级预警。`:`当前预警区内未识别到设备,系统保持 ${t} 级预警基线响应。`;return{levelText:`${t}级预警`,responseTime:v[i]||"30 分钟内",responseRange:E[i]||"预警区方圆 300 米",equipmentText:P,matchReason:U,rosterText:T[i]||T[4]}});function I(){const i=g.value.map(t=>w(B({},t),{steps:t.steps.map(s=>{const h=s,{__checked:N}=h;return L(h,["__checked"])})}));m("update:plans",i),m("close")}function x(){y.value&&!window.confirm("有未保存的修改,确定要放弃吗?")||m("close")}return(i,t)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[o.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pld-mask",onClick:e.withModifiers(x,["self"])},[e.createElementVNode("div",{class:"pld-dialog",onClick:t[0]||(t[0]=e.withModifiers(()=>{},["stop"]))},[t[7]||(t[7]=e.createElementVNode("div",{class:"pld-header"},[e.createElementVNode("span",{class:"pld-title"},"应急预案库管理")],-1)),e.createElementVNode("div",X,[e.createElementVNode("div",ee,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(k,s=>e.createElementVNode("button",{key:s.value,class:e.normalizeClass(["pld-tab",{"is-active":d.value===s.value}]),onClick:N=>d.value=s.value},e.toDisplayString(s.label),11,te)),64))]),d.value==="steps"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",ne,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(u,s=>e.createElementVNode("button",{key:s.value,class:e.normalizeClass(["pld-level-tab",{"is-active":a.value===s.value}]),onClick:N=>a.value=s.value},e.toDisplayString(s.label),11,le)),64))]),e.createElementVNode("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(s,N)=>(e.openBlock(),e.createElementBlock("div",{key:s.stepId||N,class:"pld-step-row"},[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":V=>s.__checked=V,class:"pld-check"},null,8,se),[[e.vModelCheckbox,s.__checked]]),e.createElementVNode("span",ae,e.toDisplayString(String(N+1).padStart(2,"0")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V=>s.stepName=V,class:"pld-input pld-step-name",placeholder:"步骤名称"},null,8,ie),[[e.vModelText,s.stepName]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V=>s.responsibleName=V,class:"pld-input pld-step-resp",placeholder:"责任人"},null,8,ce),[[e.vModelText,s.responsibleName]]),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V=>s.timeLimitDisplay=V,class:"pld-input pld-step-time",placeholder:"时限"},null,8,de),[[e.vModelText,s.timeLimitDisplay]])]))),128)),S.value.length===0?(e.openBlock(),e.createElementBlock("div",re,' 该等级暂无步骤,点击下方"添加步骤"新增 ')):e.createCommentVNode("",!0)]),e.createElementVNode("div",pe,[e.createElementVNode("button",{class:"pld-btn pld-btn-ghost",onClick:l},"+ 添加步骤"),e.createElementVNode("button",{class:"pld-btn pld-btn-danger",disabled:!n.value,onClick:r},"删除选中",8,me)])],64)):(e.openBlock(),e.createElementBlock("div",ue,[t[5]||(t[5]=e.createElementVNode("div",{class:"pld-ai-title"},"预案匹配",-1)),t[6]||(t[6]=e.createElementVNode("div",{class:"pld-ai-subtitle"},"自动匹配规则",-1)),e.createElementVNode("div",ve,[e.createElementVNode("div",Ee,[t[1]||(t[1]=e.createElementVNode("div",{class:"pld-ai-card-label"},"预警级别",-1)),e.createElementVNode("div",Ne,e.toDisplayString(f.value.levelText),1)]),e.createElementVNode("div",he,[t[2]||(t[2]=e.createElementVNode("div",{class:"pld-ai-card-label"},"响应时限",-1)),e.createElementVNode("div",ge,e.toDisplayString(f.value.responseTime),1)]),e.createElementVNode("div",Ve,[t[3]||(t[3]=e.createElementVNode("div",{class:"pld-ai-card-label"},"响应范围",-1)),e.createElementVNode("div",be,e.toDisplayString(f.value.responseRange),1)]),e.createElementVNode("div",_e,[t[4]||(t[4]=e.createElementVNode("div",{class:"pld-ai-card-label"},"预警区内设备",-1)),e.createElementVNode("div",ke,e.toDisplayString(f.value.equipmentText),1)])]),e.createElementVNode("div",ye,e.toDisplayString(f.value.matchReason),1),e.createElementVNode("div",fe,e.toDisplayString(f.value.rosterText),1)]))]),e.createElementVNode("div",$e,[y.value?(e.openBlock(),e.createElementBlock("span",Se,"· 有未保存的修改")):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"pld-btn pld-btn-ghost",onClick:x},"取消"),e.createElementVNode("button",{class:"pld-btn pld-btn-primary",onClick:I},"保存")])])])):e.createCommentVNode("",!0)]))}}),Be=D._export_sfc(Ce,[["__scopeId","data-v-26110cae"]]),we={class:"hpd-header"},Le={class:"hpd-sub"},De={class:"hpd-body"},Te={class:"hpd-toolbar"},xe=["disabled"],Oe={class:"hpd-list"},je=["onClick"],Re={class:"hpd-name"},Ie={class:"hpd-count"},Pe=["onClick"],Me={class:"hpd-arrow"},Ue={key:0,class:"hpd-item-body"},Fe={class:"hpd-table"},Ae={key:0},ze={key:0,class:"hpd-empty-all"},We={class:"hpd-footer"},qe=e.defineComponent({__name:"HistoryPlanDialog",props:{visible:{type:Boolean},plans:{}},emits:["close"],setup(o){const p=o,c={1:"#e74c3c",2:"#ff6600",3:"#f39c12",4:"#3498db"},m=e.ref(null),k=e.computed(()=>[...p.plans].sort((n,l)=>n.warningLevel-l.warningLevel));function u(n){return["Ⅰ","Ⅱ","Ⅲ","Ⅳ"][n-1]||String(n)}function d(n){m.value=m.value===n?null:n}function a(n){const l=String(n!=null?n:"");return/[",\n]/.test(l)?`"${l.replace(/"/g,'""')}"`:l}function g(n){const l=[`预案名称,${a(n.planName)}`,`预警等级,${u(n.warningLevel)} 级`,`适用场景,${a((n.scenarioType||[]).join("/"))}`,""].join(`
2
2
  `),r=[["步骤编号","步骤名称","责任人","责任角色","时限"].join(","),...n.steps.map((v,E)=>[String(E+1).padStart(2,"0"),a(v.stepName),a(v.responsibleName),a(v.responsibleRole),a(v.timeLimit)].join(","))].join(`
3
3
  `);return l+r}function _(n,l){const r=new Blob(["\uFEFF"+l],{type:"text/csv;charset=utf-8;"}),v=URL.createObjectURL(r),E=document.createElement("a");E.href=v,E.download=n,document.body.appendChild(E),E.click(),document.body.removeChild(E),URL.revokeObjectURL(v)}function y(){const n=new Date,l=r=>String(r).padStart(2,"0");return`${n.getFullYear()}${l(n.getMonth()+1)}${l(n.getDate())}_${l(n.getHours())}${l(n.getMinutes())}`}function $(n){const l=g(n);_(`应急预案_${u(n.warningLevel)}级_${n.planName}_${y()}.csv`,l)}function S(){const n=k.value.map(g).join(`
4
4
 
@@ -26,8 +26,8 @@ var Ne = (o, t, e) => new Promise((n, s) => {
26
26
  l((e = e.apply(o, t)).next());
27
27
  });
28
28
  import { defineComponent as Ge, reactive as Ve, computed as xe, openBlock as E, createElementBlock as C, withDirectives as be, createElementVNode as x, Fragment as Me, renderList as _e, toDisplayString as Y, vModelSelect as $e, createCommentVNode as J, normalizeClass as Ae, vModelText as Ye, ref as U, watch as ke, nextTick as tt, withModifiers as We, normalizeStyle as Ie, onMounted as lt, onBeforeUnmount as ct, createTextVNode as dt, createVNode as ut } from "vue";
29
- import { _ as He } from "./index-C7h1impW.js";
30
- import { L as q } from "./leaflet-src-DHDHoWiG.js";
29
+ import { _ as He } from "./index-CFVu8BaV.js";
30
+ import { L as q } from "./leaflet-src-Dr-o3ZR2.js";
31
31
  /* empty css */
32
32
  import { R as ht, k as ft, S as mt, l as pt, W as vt, m as Oe, A as gt, n as yt, o as Xe, G as Ze, B as ge, a as ce, p as wt, D as bt, C as kt, g as Te, L as Re, q as ze, h as xt, V as Q, r as Je, s as Mt, M as _t, P as St, e as zt, t as At, u as Tt } from "./three.module-DDLQaQWC.js";
33
33
  import { O as Lt } from "./OrbitControls-BHOrUcwg.js";
@@ -1,4 +1,4 @@
1
- "use strict";var Be=Object.defineProperty;var _e=Object.getOwnPropertySymbols;var Ve=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable;var ve=Math.pow,Se=(s,t,e)=>t in s?Be(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,ke=(s,t)=>{for(var e in t||(t={}))Ve.call(t,e)&&Se(s,e,t[e]);if(_e)for(var e of _e(t))Re.call(t,e)&&Se(s,e,t[e]);return s};var ge=(s,t,e)=>new Promise((o,r)=>{var i=m=>{try{c(e.next(m))}catch(p){r(p)}},a=m=>{try{c(e.throw(m))}catch(p){r(p)}},c=m=>m.done?o(m.value):Promise.resolve(m.value).then(i,a);c((e=e.apply(s,t)).next())});const n=require("vue"),Ee=require("./index-dj-SHelr.cjs"),H=require("./leaflet-src-DfIgzKi2.cjs");;/* empty css */const u=require("./three.module-CjayKmiG.cjs"),De=require("./OrbitControls-uuLGjaqy.cjs"),Ne=require("./CSS2DRenderer-nQ2DN9Uc.cjs"),Me=require("./ExtensionUtilities-ClTuwtC-.cjs"),Pe={class:"lw-filter-bar"},Fe=["value"],Ie={key:0,value:"",disabled:""},Ue=["value"],Oe=["value"],$e={class:"lw-time-btns"},Ge=["onClick"],We={class:"lw-date-range"},He=n.defineComponent({__name:"FilterBar",props:{filters:{},regions:{},lines:{},deviceNames:{}},emits:["update:filters","query","start-section"],setup(s,{emit:t}){const e=s,o=t,r=[{label:"一天内",value:"day"},{label:"一周内",value:"week"},{label:"一个月内",value:"month"}],i=n.reactive(ke({},e.filters)),a=n.computed(()=>{if(!i.regionId)return e.lines;const M=e.regions.find(y=>y.regionName===i.regionId);return M?e.lines.filter(y=>y.regionId===M.regionId):e.lines}),c=n.computed(()=>e.deviceNames);function m(){i.lineId&&!a.value.some(M=>M.lineName===i.lineId)&&(i.lineId=""),f()}function p(){f()}function x(M){i.quickRange=M,f()}function f(){o("update:filters",ke({},i))}return(M,y)=>(n.openBlock(),n.createElementBlock("div",Pe,[n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":y[0]||(y[0]=w=>i.regionId=w),class:"lw-select",onChange:m},[y[6]||(y[6]=n.createElementVNode("option",{value:""},"全部区域",-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.regions,w=>(n.openBlock(),n.createElementBlock("option",{key:w.regionId,value:w.regionName},n.toDisplayString(w.regionName),9,Fe))),128))],544),[[n.vModelSelect,i.regionId]]),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":y[1]||(y[1]=w=>i.lineId=w),class:"lw-select",onChange:p},[y[7]||(y[7]=n.createElementVNode("option",{value:""},"全部监测线",-1)),a.value.length===0?(n.openBlock(),n.createElementBlock("option",Ie,"(该区域暂无监测线)")):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,w=>(n.openBlock(),n.createElementBlock("option",{key:w.lineId,value:w.lineName},n.toDisplayString(w.lineName),9,Ue))),128))],544),[[n.vModelSelect,i.lineId]]),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":y[2]||(y[2]=w=>i.deviceId=w),class:"lw-select",onChange:f},[y[8]||(y[8]=n.createElementVNode("option",{value:""},"全部监测点",-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,w=>(n.openBlock(),n.createElementBlock("option",{key:w,value:w},n.toDisplayString(w),9,Oe))),128))],544),[[n.vModelSelect,i.deviceId]]),n.createElementVNode("div",$e,[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(r,w=>n.createElementVNode("button",{key:w.value,class:n.normalizeClass(["lw-time-btn",{active:i.quickRange===w.value}]),onClick:T=>x(w.value)},n.toDisplayString(w.label),11,Ge)),64))]),n.createElementVNode("div",We,[n.withDirectives(n.createElementVNode("input",{type:"datetime-local","onUpdate:modelValue":y[3]||(y[3]=w=>i.startTime=w),class:"lw-date-input",onChange:f},null,544),[[n.vModelText,i.startTime]]),y[9]||(y[9]=n.createElementVNode("span",{class:"lw-date-sep"},"至",-1)),n.withDirectives(n.createElementVNode("input",{type:"datetime-local","onUpdate:modelValue":y[4]||(y[4]=w=>i.endTime=w),class:"lw-date-input",onChange:f},null,544),[[n.vModelText,i.endTime]])]),y[10]||(y[10]=n.createElementVNode("div",{class:"lw-spacer"},null,-1)),n.createElementVNode("button",{class:"lw-btn-section",onClick:y[5]||(y[5]=w=>o("start-section"))},"剖面图绘制")]))}}),qe=Ee._export_sfc(He,[["__scopeId","data-v-151e0d5e"]]);function Le(s,t){if(t==="cf"){const o=s.cf;return o<50?[0/255,170/255,255/255]:o<150?[255/255,230/255,0/255]:o<300?[255/255,145/255,0/255]:o<500?[240/255,70/255,40/255]:[180/255,0/255,0/255]}if(t==="av"){const o=s.av;return o<-.6?[0/255,80/255,220/255]:o<-.1?[0/255,170/255,255/255]:Math.abs(o)<.1?[0/255,220/255,120/255]:o<.6?[255/255,185/255,0/255]:[220/255,30/255,30/255]}const e=Math.abs(s.rr);return s.rr<0?e<5?[0/255,180/255,255/255]:e<20?[0/255,120/255,255/255]:e<60?[40/255,70/255,220/255]:[20/255,35/255,150/255]:e<5?[255/255,230/255,0/255]:e<20?[255/255,165/255,0/255]:e<60?[235/255,85/255,0/255]:[180/255,0/255,0/255]}u.Mesh.prototype.raycast=Me.acceleratedRaycast;class je{constructor(t){this.container=t,this.raycaster=new u.Raycaster,this.animFrameId=0,this.needsUpdate=!0,this.nodeEntries=new Map,this.resizeObserver=null,this.deviceMarkers=new Map,this.radarLayers=new Map,this.animate=()=>{if(this.animFrameId=requestAnimationFrame(this.animate),this.controls.update(),!this.needsUpdate)return;const o=this.camera.position.clone().sub(this.controls.target);this.dynamicLight.position.copy(o),this.renderer.render(this.scene,this.camera),this.labelRenderer.render(this.scene,this.camera),this.needsUpdate=!1},u.Object3D.DEFAULT_UP.set(0,0,1),this.scene=new u.Scene,this.camera=new u.PerspectiveCamera(50,t.clientWidth/Math.max(t.clientHeight,1),.1,1e5),this.camera.position.set(500,-500,500),this.camera.up.set(0,0,1),this.renderer=new u.WebGLRenderer({antialias:!0,alpha:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(t.clientWidth,t.clientHeight),t.appendChild(this.renderer.domElement),this.labelRenderer=new Ne.CSS2DRenderer,this.labelRenderer.setSize(t.clientWidth,t.clientHeight),this.labelRenderer.domElement.style.position="absolute",this.labelRenderer.domElement.style.top="0",this.labelRenderer.domElement.style.left="0",this.labelRenderer.domElement.style.pointerEvents="none",this.labelRenderer.domElement.style.overflow="visible",t.appendChild(this.labelRenderer.domElement),this.controls=new De.OrbitControls(this.camera,this.renderer.domElement),this.controls.enableDamping=!1,this.controls.mouseButtons={LEFT:u.MOUSE.ROTATE,MIDDLE:u.MOUSE.PAN,RIGHT:u.MOUSE.PAN},this.controls.addEventListener("change",()=>{this.updateCameraNearFar(),this.needsUpdate=!0});const e=new u.AmbientLight(8947848,4);this.dynamicLight=new u.DirectionalLight(16777215,2),this.scene.add(e,this.dynamicLight),this.scene.add(new u.AxesHelper(250)),this.resizeObserver=new ResizeObserver(()=>this.resize()),this.resizeObserver.observe(t),this.animate()}loadDocument(t,e){return ge(this,null,function*(){this.clearModel();const o=this.flattenNodes(t.rootNode),r=o.filter(a=>a.mesh&&a.mesh.positions.length>0);e==null||e(`构建场景树 (${o.length} 节点)...`),this.buildGroupTree(t.rootNode,this.scene);let i=0;for(const a of r)this.createMeshForNode(a),i++,i%5===0&&(e==null||e(`创建网格 ${i}/${r.length}...`),yield new Promise(c=>setTimeout(c,0)));this.fitContent(),this.needsUpdate=!0})}flattenNodes(t){const e=[t];for(const o of t.children)e.push(...this.flattenNodes(o));return e}buildGroupTree(t,e){const o=new u.Group;o.name=t.name,o.visible=t.visible,e.add(o);const r={node:t,group:o};this.nodeEntries.set(t.id,r);for(const i of t.children)this.buildGroupTree(i,o)}createMeshForNode(t){var c,m;const e=this.nodeEntries.get(t.id);if(!e||!t.mesh)return;const{positions:o,indices:r,edgePositions:i}=t.mesh;if(o.length>0&&r.length>0){const p=new u.BufferGeometry;p.setAttribute("position",new u.BufferAttribute(o,3)),p.setIndex(new u.BufferAttribute(r,1)),p.computeVertexNormals(),p.computeBoundingBox(),p.boundsTree=new Me.MeshBVH(p);const x=new u.MeshLambertMaterial({color:new u.Color(t.color),side:u.DoubleSide,flatShading:!0}),f=new u.Mesh(p,x);f.name=t.name+"_mesh",e.group.add(f),e.meshObj=f}const a=(m=(c=t.raw)==null?void 0:c.displayMode)!=null?m:0;if(i.length>0&&a>0){const p=new u.BufferGeometry;p.setAttribute("position",new u.BufferAttribute(i,3)),p.computeBoundingBox();const x=new u.LineBasicMaterial({color:0,linewidth:1}),f=new u.LineSegments(p,x);f.name=t.name+"_edges",e.group.add(f),e.edgeObj=f}}setNodeVisible(t,e){const o=this.nodeEntries.get(t);o&&(this.setNodeVisibleRecursive(o.node,e),this.needsUpdate=!0)}setNodeVisibleRecursive(t,e){t.visible=e;const o=this.nodeEntries.get(t.id);o&&(o.group.visible=e);for(const r of t.children)this.setNodeVisibleRecursive(r,e)}fitContent(){try{this.scene.updateMatrixWorld(!0);const t=new u.Box3;if(this.scene.traverse(i=>{if(!(i instanceof u.AxesHelper)&&(i instanceof u.Mesh||i instanceof u.LineSegments)){const a=i.geometry;if(a&&a.attributes.position&&(a.computeBoundingBox(),a.boundingBox&&!a.boundingBox.isEmpty())){const c=a.boundingBox.clone();c.applyMatrix4(i.matrixWorld),t.union(c)}}}),t.isEmpty())return;const e=t.getCenter(new u.Vector3),o=t.getSize(new u.Vector3);console.log("[SceneManager] 模型包围盒 min:",t.min.toArray(),"max:",t.max.toArray(),"center:",e.toArray(),"size:",o.toArray());const r=Math.max(o.x,o.y,o.z);this.controls.target.copy(e),this.camera.position.set(e.x+r*.8,e.y-r*.8,e.z+r*.6),this.updateCameraNearFar(),this.controls.update(),this.needsUpdate=!0}catch(t){console.warn("[fitContent] error:",t)}}getVisibleMeshEntries(){const t=[];return this.nodeEntries.forEach(e=>{e.meshObj&&e.group.visible&&e.node.mesh&&t.push(e)}),t}addSectionLines(t,e){const o=new u.BufferGeometry;o.setAttribute("position",new u.BufferAttribute(t,3));const r=new u.LineBasicMaterial({color:e,linewidth:2,depthTest:!1}),i=new u.LineSegments(o,r);return i.renderOrder=999,i.name="__section_result__",this.scene.add(i),this.needsUpdate=!0,i}addSectionPath(t,e=16776960){const o=[];for(let c=0;c<t.length-1;c++)o.push(t[c].x,t[c].y,t[c].z),o.push(t[c+1].x,t[c+1].y,t[c+1].z);const r=new u.BufferGeometry;r.setAttribute("position",new u.BufferAttribute(new Float32Array(o),3));const i=new u.LineBasicMaterial({color:e,linewidth:3,depthTest:!1}),a=new u.LineSegments(r,i);return a.renderOrder=1e3,a.name="__section_path__",this.scene.add(a),this.needsUpdate=!0,a}clearSectionResults(){const t=[];this.scene.traverse(e=>{(e.name==="__section_result__"||e.name==="__section_path__")&&t.push(e)}),t.forEach(e=>{e.removeFromParent(),e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()}),this.needsUpdate=!0}setTransparency(t){this.nodeEntries.forEach(e=>{if(e.meshObj){const o=e.meshObj.material;o.transparent=t,o.opacity=t?.4:1,o.depthWrite=!t,o.needsUpdate=!0}}),this.needsUpdate=!0}pickPoint(t){const e=this.renderer.domElement.getBoundingClientRect(),o=new u.Vector2((t.clientX-e.left)/e.width*2-1,-((t.clientY-e.top)/e.height)*2+1);this.raycaster.setFromCamera(o,this.camera);const r=[];this.scene.traverse(a=>{a instanceof u.Mesh&&a.name.endsWith("_mesh")&&a.visible&&r.push(a)});const i=this.raycaster.intersectObjects(r,!1);return i.length>0?i[0].point.clone():null}addPickMarker(t,e=16711680){const o=new u.SphereGeometry(1,16,16),r=new u.MeshBasicMaterial({color:e,depthTest:!1}),i=new u.Mesh(o,r);i.position.copy(t),i.renderOrder=998,i.name="__pick_marker__";const a=this.camera.position.distanceTo(this.controls.target);return i.scale.setScalar(a*.008),this.scene.add(i),this.needsUpdate=!0,i}addPickLine(t,e){const o=new u.BufferGeometry;o.setAttribute("position",new u.BufferAttribute(new Float32Array([t.x,t.y,t.z,e.x,e.y,e.z]),3));const r=new u.LineBasicMaterial({color:16776960,linewidth:2,depthTest:!1}),i=new u.LineSegments(o,r);return i.renderOrder=998,i.name="__pick_line__",this.scene.add(i),this.needsUpdate=!0,i}clearPickMarkers(){const t=[];this.scene.traverse(e=>{(e.name==="__pick_marker__"||e.name==="__pick_line__")&&t.push(e)}),t.forEach(e=>{e.removeFromParent(),e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()}),this.needsUpdate=!0}addRadarLayer(t,e,o){if(this.removeRadarLayer(t),e.length===0)return;const r=new Float32Array(e.length*3),i=new Float32Array(e.length*3);for(let p=0;p<e.length;p++){const x=e[p],f=p*3;r[f]=x.e,r[f+1]=x.n,r[f+2]=x.rl;const M=Le(x,o);i[f]=M[0],i[f+1]=M[1],i[f+2]=M[2]}const a=new u.BufferGeometry;a.setAttribute("position",new u.BufferAttribute(r,3)),a.setAttribute("color",new u.BufferAttribute(i,3)),a.computeBoundingSphere();const c=new u.PointsMaterial({size:5,sizeAttenuation:!1,vertexColors:!0,depthWrite:!1,depthTest:!1,toneMapped:!1}),m=new u.Points(a,c);m.renderOrder=900,m.name=`__radar_layer_${t}__`,this.scene.add(m),this.radarLayers.set(t,{cloud:m,pointIndex:e}),this.needsUpdate=!0}setRadarLayerVisible(t,e){const o=this.radarLayers.get(t);o&&(o.cloud.visible=e,this.needsUpdate=!0)}updateRadarLayerColors(t,e,o){const r=this.radarLayers.get(t);if(!r)return;const i=r.cloud.geometry.getAttribute("color"),a=i.array;for(let c=0;c<e.length;c++){const m=Le(e[c],o),p=c*3;a[p]=m[0],a[p+1]=m[1],a[p+2]=m[2]}i.needsUpdate=!0,this.needsUpdate=!0}pickRadarPoint(t){const e=this.renderer.domElement.getBoundingClientRect(),o=new u.Vector2((t.clientX-e.left)/e.width*2-1,-((t.clientY-e.top)/e.height)*2+1),r=new u.Vector3;let i=.002,a=null;for(const[c,m]of this.radarLayers){if(!m.cloud.visible)continue;const x=m.cloud.geometry.getAttribute("position").array;for(let f=0;f<x.length;f+=3){if(r.set(x[f],x[f+1],x[f+2]).project(this.camera),r.z<-1||r.z>1)continue;const M=r.x-o.x,y=r.y-o.y,w=M*M+y*y;w<i&&(i=w,a={layerId:c,point:m.pointIndex[f/3]})}}return a}removeRadarLayer(t){const e=this.radarLayers.get(t);e&&(this.scene.remove(e.cloud),e.cloud.geometry.dispose(),e.cloud.material.dispose(),this.radarLayers.delete(t),this.needsUpdate=!0)}clearAllRadarLayers(){for(const[t]of this.radarLayers)this.removeRadarLayer(t)}addDeviceMarker(t,e,o){this.removeDeviceMarker(t);const r=new Ne.CSS2DObject(o);return r.position.set(e.e,e.n,e.rl),r.name=`__device_marker_${t}__`,this.scene.add(r),this.deviceMarkers.set(t,r),this.needsUpdate=!0,r}updateDeviceMarkerPosition(t,e){const o=this.deviceMarkers.get(t);o&&(o.position.set(e.e,e.n,e.rl),this.needsUpdate=!0)}removeDeviceMarker(t){const e=this.deviceMarkers.get(t);e&&(this.scene.remove(e),this.deviceMarkers.delete(t),this.needsUpdate=!0)}removeAllDeviceMarkers(){for(const[t]of this.deviceMarkers)this.removeDeviceMarker(t)}setDeviceMarkerVisible(t,e){const o=this.deviceMarkers.get(t);o&&(o.visible=e,this.needsUpdate=!0)}setDeviceMarkersVisible(t){for(const[,e]of this.deviceMarkers)e.visible=t;this.needsUpdate=!0}clearModel(){const t=[];this.scene.children.forEach(e=>{e instanceof u.Group&&t.push(e)}),t.forEach(e=>{e.traverse(o=>{if(o.geometry&&o.geometry.dispose(),o.material){const r=o.material;Array.isArray(r)?r.forEach(i=>i.dispose()):r.dispose()}}),e.removeFromParent()}),this.nodeEntries.clear(),this.clearSectionResults()}resize(){const t=this.container.clientWidth,e=this.container.clientHeight;e<1||(this.camera.aspect=t/e,this.camera.updateProjectionMatrix(),this.renderer.setSize(t,e),this.labelRenderer.setSize(t,e),this.needsUpdate=!0)}updateCameraNearFar(){const t=this.camera.position.distanceTo(this.controls.target);t<1?(this.camera.near=.001,this.camera.far=100):t<10?(this.camera.near=.01,this.camera.far=1e3):t<100?(this.camera.near=.1,this.camera.far=1e4):t<1e3?(this.camera.near=1,this.camera.far=1e5):t<1e4?(this.camera.near=10,this.camera.far=1e6):t<1e5?(this.camera.near=100,this.camera.far=1e7):(this.camera.near=1e3,this.camera.far=1e8),this.camera.updateProjectionMatrix()}requestUpdate(){this.needsUpdate=!0}dispose(){var t;cancelAnimationFrame(this.animFrameId),(t=this.resizeObserver)==null||t.disconnect(),this.clearModel(),this.clearAllRadarLayers(),this.removeAllDeviceMarkers(),this.controls.dispose(),this.renderer.dispose(),this.renderer.domElement.remove(),this.labelRenderer.domElement.remove()}}function Ye(s){const e=JSON.parse(s).properties,o=Xe(e.materials||[]),r=new Map;o.forEach(c=>r.set(c.id,c));const i=e.nodes,a=Ze(i,r);return{name:e.name||"Untitled",id:e.id||"",version:e.version||"",materials:o,rootNode:a}}function Xe(s){return s.map(t=>{var e,o,r;return{id:((e=t.properties)==null?void 0:e.id)||"",name:((o=t.properties)==null?void 0:o.name)||"",color:typeof((r=t.properties)==null?void 0:r.color)=="number"?t.properties.color:8947848}})}function Ze(s,t){var r;if(!s||s.length===0)return Ae("root");const e=new Map,o=[];for(const i of s){const a=Je(i,t);e.set(a.id,a),o.push({node:a,parentId:i.parentId})}for(const{node:i,parentId:a}of o)a&&e.has(a)&&e.get(a).children.push(i);return((r=o[0])==null?void 0:r.node)||Ae("root")}function Ae(s){return{id:"empty",name:s,classKey:"EmptyNode",visible:!0,color:8947848,children:[],raw:{}}}function Je(s,t){const e=s.properties||{},o=s.classKey||"";let r=8947848,i;if(e.materialId){i=e.materialId;const m=t.get(i);m&&(r=m.color)}else typeof e.color=="number"&&(r=e.color);const a={id:e.id||Math.random().toString(36).slice(2),name:e.name||o,classKey:o,visible:e.visible!==void 0?!!e.visible:!0,color:r,materialId:i,children:[],raw:e},c=Qe(o,e);return c&&(a.mesh=c),a}function Qe(s,t){if(s==="TriMeshNode"&&t.savedData)return Ke(t.savedData);if(s==="ShapeNode"||s==="MultiShapeNode")return et(t);if((s==="GeoPlineNode"||s==="PlineNode")&&t.points)return tt(t)}function Ke(s){try{const t=typeof s=="string"?JSON.parse(s):s;if(!t.pos||!t.idx)return;const e=new Float32Array(t.pos),o=new Uint32Array(t.idx),r=t.uv?new Float32Array(t.uv):new Float32Array(0),i=t.edgePos?new Float32Array(t.edgePos):new Float32Array(0),a=Ce(e,o);return{positions:e,indices:o,normals:a,uvs:r,edgePositions:i}}catch(t){return}}function et(s){const t=s.shape;if(!t)return;const e=t.properties||t,o=e.mesh||e._mesh;if(!o)return;const r=o.properties||o,i=r.faces||r._faces;if(!i)return;const a=i.properties||i;if(!a.position)return;const c=ye(a.position),m=nt(a.index),p=a.normal?ye(a.normal):Ce(c,m),x=a.uv?ye(a.uv):new Float32Array(0),f=r.edges||r._lines,M=(f==null?void 0:f.properties)||f,y=M!=null&&M.position?ye(M.position):new Float32Array(0);if(c.length!==0)return{positions:c,indices:m,normals:p,uvs:x,edgePositions:y}}function tt(s){const t=s.points;if(!t||!Array.isArray(t))return;const e=t.map(r=>r.properties?{x:r.properties.x||0,y:r.properties.y||0,z:r.properties.z||0}:{x:r.x||0,y:r.y||0,z:r.z||0});if(e.length<2)return;const o=[];for(let r=0;r<e.length-1;r++)o.push(e[r].x,e[r].y,e[r].z),o.push(e[r+1].x,e[r+1].y,e[r+1].z);return{positions:new Float32Array(0),indices:new Uint32Array(0),normals:new Float32Array(0),uvs:new Float32Array(0),edgePositions:new Float32Array(o)}}function ye(s){var t;return s instanceof Float32Array?s:(t=s==null?void 0:s.properties)!=null&&t.buffer?new Float32Array(s.properties.buffer):Array.isArray(s)?new Float32Array(s):new Float32Array(0)}function nt(s){var t;return s instanceof Uint32Array?s:(t=s==null?void 0:s.properties)!=null&&t.buffer?new Uint32Array(s.properties.buffer):Array.isArray(s)?new Uint32Array(s):new Uint32Array(0)}function Ce(s,t){if(s.length===0||t.length===0)return new Float32Array(0);const e=new Float32Array(s.length);for(let o=0;o<t.length;o+=3){const r=t[o],i=t[o+1],a=t[o+2],c=s[r*3],m=s[r*3+1],p=s[r*3+2],x=s[i*3],f=s[i*3+1],M=s[i*3+2],y=s[a*3],w=s[a*3+1],T=s[a*3+2],G=x-c,F=f-m,S=M-p,U=y-c,J=w-m,Q=T-p,O=F*Q-S*J,E=S*U-G*Q,I=G*J-F*U,K=Math.sqrt(O*O+E*E+I*I)||1;for(const b of[r,i,a])e[b*3]+=O/K,e[b*3+1]+=E/K,e[b*3+2]+=I/K}for(let o=0;o<e.length;o+=3){const r=Math.sqrt(ve(e[o],2)+ve(e[o+1],2)+ve(e[o+2],2))||1;e[o]/=r,e[o+1]/=r,e[o+2]/=r}return e}function ot(s,t){const e=new u.Vector3().subVectors(t,s).normalize();let o=new u.Vector3().crossVectors(e,new u.Vector3(0,0,1)).normalize();return o.lengthSq()<.01&&(o=new u.Vector3().crossVectors(e,new u.Vector3(1,0,0)).normalize()),{start:s.clone(),end:t.clone(),normal:o}}function rt(s){const t=[];for(let e=0;e<s.length-1;e++)t.push(ot(s[e],s[e+1]));return t}const ze=new WeakMap;function st(s,t){if(!s.mesh||s.mesh.positions.length===0||s.mesh.indices.length===0)return new Float32Array(0);let e=ze.get(s);e||(e=new u.BufferGeometry,e.setAttribute("position",new u.BufferAttribute(s.mesh.positions,3)),e.setIndex(new u.BufferAttribute(s.mesh.indices,1)),e.boundsTree=new Me.MeshBVH(e),ze.set(s,e));const o=e.boundsTree,r=[],i=new u.Line3;return o.shapecast({intersectsBounds:a=>t.intersectsBox(a),intersectsTriangle:a=>(it(a,t,i)&&r.push(i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z),!1)}),new Float32Array(r)}function it(s,t,e){const o=t.distanceToPoint(s.a),r=t.distanceToPoint(s.b),i=t.distanceToPoint(s.c);if(o>0&&r>0&&i>0||o<0&&r<0&&i<0||o===0&&r===0&&i===0)return!1;const a=[];if(xe(s.a,s.b,o,r,a),xe(s.b,s.c,r,i,a),xe(s.c,s.a,i,o,a),a.length>=2){e.start.copy(a[0]);let c=0,m=1;for(let p=1;p<a.length;p++){const x=a[0].distanceToSquared(a[p]);x>c&&(c=x,m=p)}return e.end.copy(a[m]),c>=1e-10}return!1}function xe(s,t,e,o,r){if(e*o<0){const i=e/(e-o);r.push(new u.Vector3().copy(s).lerp(t,i))}else Math.abs(e)<1e-5&&(r.length===0||r[r.length-1].distanceTo(s)>1e-5)&&r.push(s.clone())}function at(s,t,e){const o=[],r=new u.Vector3().subVectors(e,t),i=r.lengthSq();if(i<1e-6)return[];const a=(c,m,p)=>{const x=c-t.x,f=m-t.y,M=p-t.z;return(x*r.x+f*r.y+M*r.z)/i};for(let c=0;c<s.length;c+=6){const m=s[c],p=s[c+1],x=s[c+2],f=s[c+3],M=s[c+4],y=s[c+5],w=a(m,p,x),T=a(f,M,y);if(w>=0&&w<=1&&T>=0&&T<=1){o.push(m,p,x,f,M,y);continue}if(w<0&&T<0||w>1&&T>1)continue;const G=Math.min(w,T),F=Math.max(w,T),S=w<T?{x:m,y:p,z:x}:{x:f,y:M,z:y},U=w<T?{x:f,y:M,z:y}:{x:m,y:p,z:x},J=Math.max(G,0),Q=Math.min(F,1);if(J<Q){const O=F-G,E=(J-G)/O,I=(Q-G)/O;o.push(S.x+(U.x-S.x)*E,S.y+(U.y-S.y)*E,S.z+(U.z-S.z)*E,S.x+(U.x-S.x)*I,S.y+(U.y-S.y)*I,S.z+(U.z-S.z)*I)}}return o}function lt(s,t){if(t.length<2)return{results:[],allPositions:new Float32Array(0)};const e=rt(t),o=[],r=[];for(const i of s){const a=i.node;if(!a.mesh||a.mesh.positions.length===0)continue;const c=[];for(const m of e){const p=new u.Plane(m.normal.clone(),-m.normal.dot(m.start)),x=st(a,p);if(x.length>0){const f=at(x,m.start,m.end);f.length>0&&c.push(...f)}}if(c.length>0){o.push(...c);const m=[];for(let p=0;p<c.length;p+=6)m.push({start:{x:c[p],y:c[p+1],z:c[p+2]},end:{x:c[p+3],y:c[p+4],z:c[p+5]}});r.push({nodeName:a.name,nodeColor:a.color,segments:m})}}return{results:r,allPositions:new Float32Array(o)}}const ct={class:"geo-dialog-box"},dt={class:"geo-dialog-header"},ut={key:0,class:"geo-highlight-tag"},mt={class:"geo-dialog-body"},ft={key:0,class:"geo-no-result"},pt=n.defineComponent({__name:"SectionDialog",props:{visible:{type:Boolean},results:{},startPoint:{},endPoint:{}},emits:["close"],setup(s,{emit:t}){const e=s,o=t,r=n.ref(),i=n.ref();let a=1100,c=600;const m=n.ref(!1),p=n.ref(""),x=n.ref({}),f=n.ref(null);function M(b){const N=parseInt(b.slice(1,3),16),d=parseInt(b.slice(3,5),16),L=parseInt(b.slice(5,7),16),A=.7,C=Math.round(N*A),B=Math.round(d*A),q=Math.round(L*A);return`#${C.toString(16).padStart(2,"0")}${B.toString(16).padStart(2,"0")}${q.toString(16).padStart(2,"0")}`}const y=["#d32f2f","#1565c0","#2e7d32","#e65100","#6a1b9a","#00838f","#c62828","#283593","#1b5e20","#bf360c"];function w(b,N){const d=parseInt(b.slice(1,3),16),L=parseInt(b.slice(3,5),16),A=parseInt(b.slice(5,7),16);return(d*299+L*587+A*114)/1e3>180?y[N%y.length]:M(b)}function T(){o("close"),f.value=null}function G(){const b=r.value;if(!b)return;const N=b.toDataURL("image/png"),d=document.createElement("a");d.download=`剖面结果_${new Date().toISOString().slice(0,10)}.png`,d.href=N,d.click()}const F=[];n.watch(()=>e.visible,b=>ge(null,null,function*(){b&&(f.value=null,yield n.nextTick(),S())}));function S(){const b=r.value,N=i.value;if(!b||!N)return;const d=b.getContext("2d");if(!d)return;const L=N.clientWidth;a=Math.max(L,600),c=Math.round(a*.5);const A=window.devicePixelRatio||1;if(b.width=a*A,b.height=c*A,b.style.width=a+"px",b.style.height=c+"px",d.scale(A,A),d.clearRect(0,0,a,c),e.results.length===0)return;const C=e.endPoint.x-e.startPoint.x,B=e.endPoint.y-e.startPoint.y,q=Math.sqrt(C*C+B*B);if(q<1e-6)return;const k=C/q,j=B/q,ee=[];let $=1/0,te=-1/0,ne=1/0,Y=-1/0;if(e.results.forEach((g,l)=>{const h="#"+g.nodeColor.toString(16).padStart(6,"0"),v=w(h,l);for(const _ of g.segments){const V=(_.start.x-e.startPoint.x)*k+(_.start.y-e.startPoint.y)*j,D=_.start.z,R=(_.end.x-e.startPoint.x)*k+(_.end.y-e.startPoint.y)*j,z=_.end.z;ee.push({x1:V,z1:D,x2:R,z2:z,color:v,name:g.nodeName}),$=Math.min($,V,R),te=Math.max(te,V,R),ne=Math.min(ne,D,z),Y=Math.max(Y,D,z)}}),ee.length===0)return;const fe=te-$||1,pe=Y-ne||1,oe=70,P=30,re=30,ue=50,me=a-oe-P,se=c-re-ue,we=me/fe,he=se/pe,X=g=>oe+(g-$)*we,Z=g=>c-ue-(g-ne)*he;d.fillStyle="#fafafa",d.fillRect(0,0,a,c),d.strokeStyle="#bbb",d.lineWidth=1,d.strokeRect(oe,re,me,se);const ie=K(fe),ae=K(pe);d.strokeStyle="#e8e8e8",d.lineWidth=.5;for(let g=Math.ceil($/ie)*ie;g<=te;g+=ie){const l=X(g);d.beginPath(),d.moveTo(l,re),d.lineTo(l,c-ue),d.stroke()}for(let g=Math.ceil(ne/ae)*ae;g<=Y;g+=ae){const l=Z(g);d.beginPath(),d.moveTo(oe,l),d.lineTo(a-P,l),d.stroke()}d.fillStyle="#444",d.font="11px monospace",d.textAlign="center";for(let g=Math.ceil($/ie)*ie;g<=te;g+=ie)d.fillText(g.toFixed(0),X(g),c-ue+16);d.textAlign="right";for(let g=Math.ceil(ne/ae)*ae;g<=Y;g+=ae)d.fillText(g.toFixed(0),oe-6,Z(g)+4);d.fillStyle="#222",d.font="bold 13px sans-serif",d.textAlign="center",d.fillText("水平距离 (m)",oe+me/2,c-4),d.save(),d.translate(14,re+se/2),d.rotate(-Math.PI/2),d.fillText("标高 Z (m)",0,0),d.restore(),d.save(),d.beginPath(),d.rect(oe,re,me,se),d.clip();const de=f.value;if(de){d.lineWidth=1.5,d.globalAlpha=.2;for(const g of ee)g.name!==de&&(d.strokeStyle=g.color,d.beginPath(),d.moveTo(X(g.x1),Z(g.z1)),d.lineTo(X(g.x2),Z(g.z2)),d.stroke());d.globalAlpha=1}d.lineWidth=de?4:1.5,d.lineCap="round";for(const g of ee)de&&g.name!==de||(d.strokeStyle=g.color,d.beginPath(),d.moveTo(X(g.x1),Z(g.z1)),d.lineTo(X(g.x2),Z(g.z2)),d.stroke());d.restore(),F.length=0;for(const g of ee)F.push({sx1:X(g.x1),sy1:Z(g.z1),sx2:X(g.x2),sy2:Z(g.z2),name:g.name,color:g.color})}function U(b,N,d,L,A,C){const B=A-d,q=C-L,k=B*B+q*q;if(k<1e-6)return Math.hypot(b-d,N-L);let j=((b-d)*B+(N-L)*q)/k;return j=Math.max(0,Math.min(1,j)),Math.hypot(b-(d+j*B),N-(L+j*q))}function J(b){const d=r.value.getBoundingClientRect();return{mx:(b.clientX-d.left)*(a/d.width),my:(b.clientY-d.top)*(c/d.height),rect:d}}function Q(b,N){let d=1/0,L="",A="";for(const C of F){const B=U(b,N,C.sx1,C.sy1,C.sx2,C.sy2);B<d&&(d=B,L=C.name,A=C.color)}return{bestDist:d,bestName:L,bestColor:A}}function O(b){if(!r.value||F.length===0)return;const{mx:N,my:d,rect:L}=J(b),{bestDist:A,bestName:C,bestColor:B}=Q(N,d);A<12?(m.value=!0,p.value=C,x.value={left:b.clientX-L.left+14+"px",top:b.clientY-L.top-8+"px",borderLeft:`4px solid ${B}`},r.value.style.cursor="pointer"):(m.value=!1,r.value.style.cursor="default")}function E(){m.value=!1}function I(b){if(!r.value||F.length===0)return;const{mx:N,my:d}=J(b),{bestDist:L,bestName:A}=Q(N,d);L<12?f.value=f.value===A?null:A:f.value=null,S()}function K(b){const N=b/8,d=Math.pow(10,Math.floor(Math.log10(N))),L=N/d;return L<1.5?d:L<3.5?2*d:L<7.5?5*d:10*d}return(b,N)=>s.visible?(n.openBlock(),n.createElementBlock("div",{key:0,class:"geo-dialog-overlay",onClick:n.withModifiers(T,["self"])},[n.createElementVNode("div",ct,[n.createElementVNode("div",dt,[N[0]||(N[0]=n.createElementVNode("span",{class:"geo-dialog-title"},"剖面结果",-1)),f.value?(n.openBlock(),n.createElementBlock("span",ut,n.toDisplayString(f.value),1)):n.createCommentVNode("",!0),n.createElementVNode("button",{class:"geo-export-btn",onClick:G,title:"导出图片"},"💾 导出图片"),n.createElementVNode("button",{class:"geo-dialog-close",onClick:T},"×")]),n.createElementVNode("div",mt,[n.createElementVNode("div",{class:"geo-canvas-wrap",ref_key:"canvasWrapRef",ref:i},[n.createElementVNode("canvas",{ref_key:"canvasRef",ref:r,onMousemove:O,onMouseleave:E,onClick:I},null,544),m.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"geo-canvas-tooltip",style:n.normalizeStyle(x.value)},n.toDisplayString(p.value),5)):n.createCommentVNode("",!0)],512),s.results.length===0?(n.openBlock(),n.createElementBlock("div",ft,"该剖切线未与任何模型相交")):n.createCommentVNode("",!0)])])])):n.createCommentVNode("",!0)}}),ht=Ee._export_sfc(pt,[["__scopeId","data-v-cf4a02c5"]]),vt={class:"lw-map-area"},gt={key:0,class:"lw-model-loading"},yt={key:1,class:"lw-section-hint"},wt={key:2,class:"lw-model-dropdown"},bt={key:0,class:"lw-model-panel"},kt=["checked"],xt=["onClick"],Et=["checked"],Mt={class:"lw-device-arrow"},_t={key:0,class:"lw-device-grid"},St=["onClick"],Nt={key:0,class:"lw-device-check"},Lt={class:"lw-device-name"},At=n.defineComponent({__name:"MonitoringMap",props:{mapScene:{},devices:{},mobileObjects:{},affectedAreas:{},currentWarning:{},warningAreaColor:{default:"#ff6600"},warningAreaFillOpacity:{default:.08},showModelToggle:{type:Boolean,default:!0},showDeviceToggle:{type:Boolean,default:!0},g3dFileUrl:{default:""},dtmModelUrl:{default:""},uavTileUrl:{default:""}},emits:["select-device","select-object","toggle-model"],setup(s,{expose:t,emit:e}){const o=s,r=e,i=n.ref(),a=n.ref(),c=n.ref(!1),m=n.ref(!1),p=n.ref(!1),x=n.ref(""),f=n.ref("none"),M=n.ref({x:0,y:0,z:0}),y=n.ref({x:0,y:0,z:0}),w=n.ref([]),T=n.ref(!1);let G={x:0,y:0};const F=[{key:"geological_model",label:"地质模型"},{key:"dtm_surface",label:"DTM面"},{key:"drone_map",label:"无人机地图"}],S=n.reactive(new Set(["drone_map"])),U=n.computed(()=>S.size===F.length);function J(l){S.has(l)?S.delete(l):S.add(l),b(),r("toggle-model")}function Q(){U.value?S.clear():F.forEach(l=>S.add(l.key)),b(),r("toggle-model")}let O=null,E=null,I=null;const K=n.computed(()=>S.has("geological_model")||S.has("dtm_surface"));function b(){return ge(this,null,function*(){if(S.has("geological_model")||S.has("dtm_surface")){if(!E&&a.value&&(yield n.nextTick(),E=new je(a.value)),S.has("geological_model")&&o.g3dFileUrl&&E)try{p.value=!0,x.value="加载地质模型...";const h=yield fetch(o.g3dFileUrl);if(!h.ok)throw new Error(`HTTP ${h.status}: ${h.statusText}`);x.value="读取模型数据...";const v=yield h.text();x.value="解析模型...";const _=Ye(v);yield E.loadDocument(_,V=>{x.value=V})}catch(h){console.error("[MonitoringMap] 加载地质模型失败:",h)}finally{p.value=!1}E&&ae()}else E&&E.removeAllDeviceMarkers(),k&&setTimeout(()=>k==null?void 0:k.invalidateSize(),100);if(S.has("drone_map")&&k){if(!I){const h=o.uavTileUrl||ne.satellite;I=H.L.tileLayer(h,{maxZoom:19,opacity:.85}).addTo(k)}}else I&&k&&(k.removeLayer(I),I=null)})}function N(){if(!E){alert("请先勾选「地质模型」加载 3D 模型后再进行剖面绘制");return}E.clearPickMarkers(),E.clearSectionResults(),f.value="start",T.value=!1,w.value=[],L()}function d(){f.value="none",E==null||E.clearPickMarkers(),A()}function L(){if(!E)return;const l=E.renderer.domElement;l.addEventListener("mousedown",C),l.addEventListener("mouseup",B)}function A(){if(!E)return;const l=E.renderer.domElement;l.removeEventListener("mousedown",C),l.removeEventListener("mouseup",B)}function C(l){G={x:l.clientX,y:l.clientY}}function B(l){if(!E||f.value==="none"||Math.hypot(l.clientX-G.x,l.clientY-G.y)>5)return;const h=E.pickPoint(l);if(h){if(f.value==="start")M.value={x:h.x,y:h.y,z:h.z},E.addPickMarker(h,65280),f.value="end";else if(f.value==="end"){y.value={x:h.x,y:h.y,z:h.z},E.addPickMarker(h,16711680),f.value="none",A();const v=new u.Vector3(M.value.x,M.value.y,M.value.z),_=new u.Vector3(y.value.x,y.value.y,y.value.z);E.addSectionPath([v,_]);const V=E.getVisibleMeshEntries(),{results:D,allPositions:R}=lt(V,[v,_]);w.value=D,R.length>0&&D.forEach(z=>{const W=z.nodeColor,le=[];for(const ce of z.segments)le.push(ce.start.x,ce.start.y,ce.start.z,ce.end.x,ce.end.y,ce.end.z);le.length>0&&E.addSectionLines(new Float32Array(le),W)}),T.value=!0}}}t({startSection:N});const q={mounted(l,h){l.__clickOutsideHandler=v=>{l.contains(v.target)||h.value()},document.addEventListener("click",l.__clickOutsideHandler)},unmounted(l){document.removeEventListener("click",l.__clickOutsideHandler)}};let k=null,j=null,ee=null,$=null,te=null;const ne={dark:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",light:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",satellite:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",gaode:"https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",gaode_satellite:"https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}"},Y=[{type:"GNSS",label:"GNSS监测",icon:"📍",color:"#ff6b6b",category:"device"},{type:"inclinometer",label:"深部位移监测",icon:"⚓",color:"#3b82f6",category:"device"},{type:"radar",label:"雷达监测",icon:"📡",color:"#8b5cf6",category:"device"},{type:"crack_image",label:"裂缝写实",icon:"�",color:"#06b6d4",category:"device"},{type:"crack",label:"裂缝监测",icon:"📏",color:"#f97316",category:"device"},{type:"combustion",label:"煤自燃监测",icon:"🔥",color:"#ef4444",category:"device"},{type:"rain",label:"降雨监测",icon:"💧",color:"#0ea5e9",category:"device"},{type:"groundwater",label:"地下水监测",icon:"�",color:"#14b8a6",category:"device"},{type:"stress",label:"地下应力监测",icon:"📊",color:"#eab308",category:"device"},{type:"vibration",label:"爆破震动监测",icon:"💥",color:"#f59e0b",category:"device"},{type:"remote_sensing",label:"遥感监测",icon:"🛰️",color:"#64748b",category:"device"},{type:"person",label:"人员",icon:"👤",color:"#78909c",category:"object"},{type:"truck",label:"车辆",icon:"🚛",color:"#5d9b46",category:"object"},{type:"excavator",label:"挖掘设备",icon:"🏗️",color:"#e8a735",category:"object"},{type:"drone",label:"无人机",icon:"🛸",color:"#7e57c2",category:"object"}],fe=Y.reduce((l,h)=>(l[h.type]=h.icon,l),{}),pe={person:"👤",truck:"🚛",excavator:"🏗️",drone:"🛸"},oe={normal:"#52c41a",warning:"#ff4d4f",offline:"#999",abnormal:"#faad14",near_warning_area:"#ff6600",in_warning_area:"#ff0000",evacuated:"#999"},P=n.reactive(new Set(Y.map(l=>l.type))),re=n.computed(()=>P.size===Y.length);function ue(l){P.has(l)?P.delete(l):P.add(l)}function me(){re.value?P.clear():Y.forEach(l=>P.add(l.type))}const se=n.computed(()=>o.devices.filter(l=>P.has(l.deviceType)));function we(){var _,V,D;if(k||!i.value)return;const l=o.mapScene;k=H.L.map(i.value,{center:[(_=l.centerLat)!=null?_:45.3738,(V=l.centerLng)!=null?V:119.3838],zoom:(D=l.zoom)!=null?D:15,zoomControl:!1,attributionControl:!1});const h=ne[l.tileStyle||"dark"]||ne.dark,v=(l.tileStyle||"dark").startsWith("gaode")?"1234":"abc";H.L.tileLayer(h,{attribution:"",maxZoom:18,subdomains:v}).addTo(k),te=H.L.layerGroup().addTo(k),j=H.L.layerGroup().addTo(k),ee=H.L.layerGroup().addTo(k),$=H.L.layerGroup().addTo(k),he(),setTimeout(()=>k==null?void 0:k.invalidateSize(),100),setTimeout(()=>k==null?void 0:k.invalidateSize(),400),setTimeout(()=>k==null?void 0:k.invalidateSize(),1e3),i.value&&(O=new ResizeObserver(()=>{setTimeout(()=>k==null?void 0:k.invalidateSize(),50)}),O.observe(i.value))}function he(){Z(),ie(),de(),g()}const X=["#ff4d4f","#3b82f6","#22c55e","#f59e0b","#8b5cf6","#06b6d4","#ec4899","#14b8a6","#f97316","#6366f1"];function Z(){if(!te||!k)return;te.clearLayers();const l=new Map;se.value.forEach(v=>{const _=v.lineId;!_||!v.lat||!v.lng||(l.has(_)||l.set(_,[]),l.get(_).push({lat:v.lat,lng:v.lng}))});let h=0;l.forEach((v,_)=>{if(v.length<2)return;v.sort((z,W)=>z.lng-W.lng||z.lat-W.lat);const V=v.map(z=>[z.lat,z.lng]),D=X[h%X.length];h++;const R=H.L.polyline(V,{color:D,weight:3,opacity:.85,dashArray:""});R.bindTooltip(_,{sticky:!0,direction:"top"}),te.addLayer(R)})}function ie(){!j||!k||(j.clearLayers(),se.value.forEach(l=>{var le,ce;const h=(le=l.lat)!=null?le:0,v=(ce=l.lng)!=null?ce:0;if(!h||!v)return;const _=fe[l.deviceType]||"📍",V=oe[l.status]||"#52c41a",D=l.warningLevel&&l.warningLevel>0,R=H.L.divIcon({className:"lw-marker-icon",html:`<div class="lw-marker" style="border-color:${V}">
1
+ "use strict";var Be=Object.defineProperty;var _e=Object.getOwnPropertySymbols;var Ve=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable;var ve=Math.pow,Se=(s,t,e)=>t in s?Be(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,ke=(s,t)=>{for(var e in t||(t={}))Ve.call(t,e)&&Se(s,e,t[e]);if(_e)for(var e of _e(t))Re.call(t,e)&&Se(s,e,t[e]);return s};var ge=(s,t,e)=>new Promise((o,r)=>{var i=m=>{try{c(e.next(m))}catch(p){r(p)}},a=m=>{try{c(e.throw(m))}catch(p){r(p)}},c=m=>m.done?o(m.value):Promise.resolve(m.value).then(i,a);c((e=e.apply(s,t)).next())});const n=require("vue"),Ee=require("./index-C2MWQs3P.cjs"),H=require("./leaflet-src-vMUbGKoP.cjs");;/* empty css */const u=require("./three.module-CjayKmiG.cjs"),De=require("./OrbitControls-uuLGjaqy.cjs"),Ne=require("./CSS2DRenderer-nQ2DN9Uc.cjs"),Me=require("./ExtensionUtilities-ClTuwtC-.cjs"),Pe={class:"lw-filter-bar"},Fe=["value"],Ie={key:0,value:"",disabled:""},Ue=["value"],Oe=["value"],$e={class:"lw-time-btns"},Ge=["onClick"],We={class:"lw-date-range"},He=n.defineComponent({__name:"FilterBar",props:{filters:{},regions:{},lines:{},deviceNames:{}},emits:["update:filters","query","start-section"],setup(s,{emit:t}){const e=s,o=t,r=[{label:"一天内",value:"day"},{label:"一周内",value:"week"},{label:"一个月内",value:"month"}],i=n.reactive(ke({},e.filters)),a=n.computed(()=>{if(!i.regionId)return e.lines;const M=e.regions.find(y=>y.regionName===i.regionId);return M?e.lines.filter(y=>y.regionId===M.regionId):e.lines}),c=n.computed(()=>e.deviceNames);function m(){i.lineId&&!a.value.some(M=>M.lineName===i.lineId)&&(i.lineId=""),f()}function p(){f()}function x(M){i.quickRange=M,f()}function f(){o("update:filters",ke({},i))}return(M,y)=>(n.openBlock(),n.createElementBlock("div",Pe,[n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":y[0]||(y[0]=w=>i.regionId=w),class:"lw-select",onChange:m},[y[6]||(y[6]=n.createElementVNode("option",{value:""},"全部区域",-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.regions,w=>(n.openBlock(),n.createElementBlock("option",{key:w.regionId,value:w.regionName},n.toDisplayString(w.regionName),9,Fe))),128))],544),[[n.vModelSelect,i.regionId]]),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":y[1]||(y[1]=w=>i.lineId=w),class:"lw-select",onChange:p},[y[7]||(y[7]=n.createElementVNode("option",{value:""},"全部监测线",-1)),a.value.length===0?(n.openBlock(),n.createElementBlock("option",Ie,"(该区域暂无监测线)")):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,w=>(n.openBlock(),n.createElementBlock("option",{key:w.lineId,value:w.lineName},n.toDisplayString(w.lineName),9,Ue))),128))],544),[[n.vModelSelect,i.lineId]]),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":y[2]||(y[2]=w=>i.deviceId=w),class:"lw-select",onChange:f},[y[8]||(y[8]=n.createElementVNode("option",{value:""},"全部监测点",-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,w=>(n.openBlock(),n.createElementBlock("option",{key:w,value:w},n.toDisplayString(w),9,Oe))),128))],544),[[n.vModelSelect,i.deviceId]]),n.createElementVNode("div",$e,[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(r,w=>n.createElementVNode("button",{key:w.value,class:n.normalizeClass(["lw-time-btn",{active:i.quickRange===w.value}]),onClick:T=>x(w.value)},n.toDisplayString(w.label),11,Ge)),64))]),n.createElementVNode("div",We,[n.withDirectives(n.createElementVNode("input",{type:"datetime-local","onUpdate:modelValue":y[3]||(y[3]=w=>i.startTime=w),class:"lw-date-input",onChange:f},null,544),[[n.vModelText,i.startTime]]),y[9]||(y[9]=n.createElementVNode("span",{class:"lw-date-sep"},"至",-1)),n.withDirectives(n.createElementVNode("input",{type:"datetime-local","onUpdate:modelValue":y[4]||(y[4]=w=>i.endTime=w),class:"lw-date-input",onChange:f},null,544),[[n.vModelText,i.endTime]])]),y[10]||(y[10]=n.createElementVNode("div",{class:"lw-spacer"},null,-1)),n.createElementVNode("button",{class:"lw-btn-section",onClick:y[5]||(y[5]=w=>o("start-section"))},"剖面图绘制")]))}}),qe=Ee._export_sfc(He,[["__scopeId","data-v-151e0d5e"]]);function Le(s,t){if(t==="cf"){const o=s.cf;return o<50?[0/255,170/255,255/255]:o<150?[255/255,230/255,0/255]:o<300?[255/255,145/255,0/255]:o<500?[240/255,70/255,40/255]:[180/255,0/255,0/255]}if(t==="av"){const o=s.av;return o<-.6?[0/255,80/255,220/255]:o<-.1?[0/255,170/255,255/255]:Math.abs(o)<.1?[0/255,220/255,120/255]:o<.6?[255/255,185/255,0/255]:[220/255,30/255,30/255]}const e=Math.abs(s.rr);return s.rr<0?e<5?[0/255,180/255,255/255]:e<20?[0/255,120/255,255/255]:e<60?[40/255,70/255,220/255]:[20/255,35/255,150/255]:e<5?[255/255,230/255,0/255]:e<20?[255/255,165/255,0/255]:e<60?[235/255,85/255,0/255]:[180/255,0/255,0/255]}u.Mesh.prototype.raycast=Me.acceleratedRaycast;class je{constructor(t){this.container=t,this.raycaster=new u.Raycaster,this.animFrameId=0,this.needsUpdate=!0,this.nodeEntries=new Map,this.resizeObserver=null,this.deviceMarkers=new Map,this.radarLayers=new Map,this.animate=()=>{if(this.animFrameId=requestAnimationFrame(this.animate),this.controls.update(),!this.needsUpdate)return;const o=this.camera.position.clone().sub(this.controls.target);this.dynamicLight.position.copy(o),this.renderer.render(this.scene,this.camera),this.labelRenderer.render(this.scene,this.camera),this.needsUpdate=!1},u.Object3D.DEFAULT_UP.set(0,0,1),this.scene=new u.Scene,this.camera=new u.PerspectiveCamera(50,t.clientWidth/Math.max(t.clientHeight,1),.1,1e5),this.camera.position.set(500,-500,500),this.camera.up.set(0,0,1),this.renderer=new u.WebGLRenderer({antialias:!0,alpha:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(t.clientWidth,t.clientHeight),t.appendChild(this.renderer.domElement),this.labelRenderer=new Ne.CSS2DRenderer,this.labelRenderer.setSize(t.clientWidth,t.clientHeight),this.labelRenderer.domElement.style.position="absolute",this.labelRenderer.domElement.style.top="0",this.labelRenderer.domElement.style.left="0",this.labelRenderer.domElement.style.pointerEvents="none",this.labelRenderer.domElement.style.overflow="visible",t.appendChild(this.labelRenderer.domElement),this.controls=new De.OrbitControls(this.camera,this.renderer.domElement),this.controls.enableDamping=!1,this.controls.mouseButtons={LEFT:u.MOUSE.ROTATE,MIDDLE:u.MOUSE.PAN,RIGHT:u.MOUSE.PAN},this.controls.addEventListener("change",()=>{this.updateCameraNearFar(),this.needsUpdate=!0});const e=new u.AmbientLight(8947848,4);this.dynamicLight=new u.DirectionalLight(16777215,2),this.scene.add(e,this.dynamicLight),this.scene.add(new u.AxesHelper(250)),this.resizeObserver=new ResizeObserver(()=>this.resize()),this.resizeObserver.observe(t),this.animate()}loadDocument(t,e){return ge(this,null,function*(){this.clearModel();const o=this.flattenNodes(t.rootNode),r=o.filter(a=>a.mesh&&a.mesh.positions.length>0);e==null||e(`构建场景树 (${o.length} 节点)...`),this.buildGroupTree(t.rootNode,this.scene);let i=0;for(const a of r)this.createMeshForNode(a),i++,i%5===0&&(e==null||e(`创建网格 ${i}/${r.length}...`),yield new Promise(c=>setTimeout(c,0)));this.fitContent(),this.needsUpdate=!0})}flattenNodes(t){const e=[t];for(const o of t.children)e.push(...this.flattenNodes(o));return e}buildGroupTree(t,e){const o=new u.Group;o.name=t.name,o.visible=t.visible,e.add(o);const r={node:t,group:o};this.nodeEntries.set(t.id,r);for(const i of t.children)this.buildGroupTree(i,o)}createMeshForNode(t){var c,m;const e=this.nodeEntries.get(t.id);if(!e||!t.mesh)return;const{positions:o,indices:r,edgePositions:i}=t.mesh;if(o.length>0&&r.length>0){const p=new u.BufferGeometry;p.setAttribute("position",new u.BufferAttribute(o,3)),p.setIndex(new u.BufferAttribute(r,1)),p.computeVertexNormals(),p.computeBoundingBox(),p.boundsTree=new Me.MeshBVH(p);const x=new u.MeshLambertMaterial({color:new u.Color(t.color),side:u.DoubleSide,flatShading:!0}),f=new u.Mesh(p,x);f.name=t.name+"_mesh",e.group.add(f),e.meshObj=f}const a=(m=(c=t.raw)==null?void 0:c.displayMode)!=null?m:0;if(i.length>0&&a>0){const p=new u.BufferGeometry;p.setAttribute("position",new u.BufferAttribute(i,3)),p.computeBoundingBox();const x=new u.LineBasicMaterial({color:0,linewidth:1}),f=new u.LineSegments(p,x);f.name=t.name+"_edges",e.group.add(f),e.edgeObj=f}}setNodeVisible(t,e){const o=this.nodeEntries.get(t);o&&(this.setNodeVisibleRecursive(o.node,e),this.needsUpdate=!0)}setNodeVisibleRecursive(t,e){t.visible=e;const o=this.nodeEntries.get(t.id);o&&(o.group.visible=e);for(const r of t.children)this.setNodeVisibleRecursive(r,e)}fitContent(){try{this.scene.updateMatrixWorld(!0);const t=new u.Box3;if(this.scene.traverse(i=>{if(!(i instanceof u.AxesHelper)&&(i instanceof u.Mesh||i instanceof u.LineSegments)){const a=i.geometry;if(a&&a.attributes.position&&(a.computeBoundingBox(),a.boundingBox&&!a.boundingBox.isEmpty())){const c=a.boundingBox.clone();c.applyMatrix4(i.matrixWorld),t.union(c)}}}),t.isEmpty())return;const e=t.getCenter(new u.Vector3),o=t.getSize(new u.Vector3);console.log("[SceneManager] 模型包围盒 min:",t.min.toArray(),"max:",t.max.toArray(),"center:",e.toArray(),"size:",o.toArray());const r=Math.max(o.x,o.y,o.z);this.controls.target.copy(e),this.camera.position.set(e.x+r*.8,e.y-r*.8,e.z+r*.6),this.updateCameraNearFar(),this.controls.update(),this.needsUpdate=!0}catch(t){console.warn("[fitContent] error:",t)}}getVisibleMeshEntries(){const t=[];return this.nodeEntries.forEach(e=>{e.meshObj&&e.group.visible&&e.node.mesh&&t.push(e)}),t}addSectionLines(t,e){const o=new u.BufferGeometry;o.setAttribute("position",new u.BufferAttribute(t,3));const r=new u.LineBasicMaterial({color:e,linewidth:2,depthTest:!1}),i=new u.LineSegments(o,r);return i.renderOrder=999,i.name="__section_result__",this.scene.add(i),this.needsUpdate=!0,i}addSectionPath(t,e=16776960){const o=[];for(let c=0;c<t.length-1;c++)o.push(t[c].x,t[c].y,t[c].z),o.push(t[c+1].x,t[c+1].y,t[c+1].z);const r=new u.BufferGeometry;r.setAttribute("position",new u.BufferAttribute(new Float32Array(o),3));const i=new u.LineBasicMaterial({color:e,linewidth:3,depthTest:!1}),a=new u.LineSegments(r,i);return a.renderOrder=1e3,a.name="__section_path__",this.scene.add(a),this.needsUpdate=!0,a}clearSectionResults(){const t=[];this.scene.traverse(e=>{(e.name==="__section_result__"||e.name==="__section_path__")&&t.push(e)}),t.forEach(e=>{e.removeFromParent(),e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()}),this.needsUpdate=!0}setTransparency(t){this.nodeEntries.forEach(e=>{if(e.meshObj){const o=e.meshObj.material;o.transparent=t,o.opacity=t?.4:1,o.depthWrite=!t,o.needsUpdate=!0}}),this.needsUpdate=!0}pickPoint(t){const e=this.renderer.domElement.getBoundingClientRect(),o=new u.Vector2((t.clientX-e.left)/e.width*2-1,-((t.clientY-e.top)/e.height)*2+1);this.raycaster.setFromCamera(o,this.camera);const r=[];this.scene.traverse(a=>{a instanceof u.Mesh&&a.name.endsWith("_mesh")&&a.visible&&r.push(a)});const i=this.raycaster.intersectObjects(r,!1);return i.length>0?i[0].point.clone():null}addPickMarker(t,e=16711680){const o=new u.SphereGeometry(1,16,16),r=new u.MeshBasicMaterial({color:e,depthTest:!1}),i=new u.Mesh(o,r);i.position.copy(t),i.renderOrder=998,i.name="__pick_marker__";const a=this.camera.position.distanceTo(this.controls.target);return i.scale.setScalar(a*.008),this.scene.add(i),this.needsUpdate=!0,i}addPickLine(t,e){const o=new u.BufferGeometry;o.setAttribute("position",new u.BufferAttribute(new Float32Array([t.x,t.y,t.z,e.x,e.y,e.z]),3));const r=new u.LineBasicMaterial({color:16776960,linewidth:2,depthTest:!1}),i=new u.LineSegments(o,r);return i.renderOrder=998,i.name="__pick_line__",this.scene.add(i),this.needsUpdate=!0,i}clearPickMarkers(){const t=[];this.scene.traverse(e=>{(e.name==="__pick_marker__"||e.name==="__pick_line__")&&t.push(e)}),t.forEach(e=>{e.removeFromParent(),e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()}),this.needsUpdate=!0}addRadarLayer(t,e,o){if(this.removeRadarLayer(t),e.length===0)return;const r=new Float32Array(e.length*3),i=new Float32Array(e.length*3);for(let p=0;p<e.length;p++){const x=e[p],f=p*3;r[f]=x.e,r[f+1]=x.n,r[f+2]=x.rl;const M=Le(x,o);i[f]=M[0],i[f+1]=M[1],i[f+2]=M[2]}const a=new u.BufferGeometry;a.setAttribute("position",new u.BufferAttribute(r,3)),a.setAttribute("color",new u.BufferAttribute(i,3)),a.computeBoundingSphere();const c=new u.PointsMaterial({size:5,sizeAttenuation:!1,vertexColors:!0,depthWrite:!1,depthTest:!1,toneMapped:!1}),m=new u.Points(a,c);m.renderOrder=900,m.name=`__radar_layer_${t}__`,this.scene.add(m),this.radarLayers.set(t,{cloud:m,pointIndex:e}),this.needsUpdate=!0}setRadarLayerVisible(t,e){const o=this.radarLayers.get(t);o&&(o.cloud.visible=e,this.needsUpdate=!0)}updateRadarLayerColors(t,e,o){const r=this.radarLayers.get(t);if(!r)return;const i=r.cloud.geometry.getAttribute("color"),a=i.array;for(let c=0;c<e.length;c++){const m=Le(e[c],o),p=c*3;a[p]=m[0],a[p+1]=m[1],a[p+2]=m[2]}i.needsUpdate=!0,this.needsUpdate=!0}pickRadarPoint(t){const e=this.renderer.domElement.getBoundingClientRect(),o=new u.Vector2((t.clientX-e.left)/e.width*2-1,-((t.clientY-e.top)/e.height)*2+1),r=new u.Vector3;let i=.002,a=null;for(const[c,m]of this.radarLayers){if(!m.cloud.visible)continue;const x=m.cloud.geometry.getAttribute("position").array;for(let f=0;f<x.length;f+=3){if(r.set(x[f],x[f+1],x[f+2]).project(this.camera),r.z<-1||r.z>1)continue;const M=r.x-o.x,y=r.y-o.y,w=M*M+y*y;w<i&&(i=w,a={layerId:c,point:m.pointIndex[f/3]})}}return a}removeRadarLayer(t){const e=this.radarLayers.get(t);e&&(this.scene.remove(e.cloud),e.cloud.geometry.dispose(),e.cloud.material.dispose(),this.radarLayers.delete(t),this.needsUpdate=!0)}clearAllRadarLayers(){for(const[t]of this.radarLayers)this.removeRadarLayer(t)}addDeviceMarker(t,e,o){this.removeDeviceMarker(t);const r=new Ne.CSS2DObject(o);return r.position.set(e.e,e.n,e.rl),r.name=`__device_marker_${t}__`,this.scene.add(r),this.deviceMarkers.set(t,r),this.needsUpdate=!0,r}updateDeviceMarkerPosition(t,e){const o=this.deviceMarkers.get(t);o&&(o.position.set(e.e,e.n,e.rl),this.needsUpdate=!0)}removeDeviceMarker(t){const e=this.deviceMarkers.get(t);e&&(this.scene.remove(e),this.deviceMarkers.delete(t),this.needsUpdate=!0)}removeAllDeviceMarkers(){for(const[t]of this.deviceMarkers)this.removeDeviceMarker(t)}setDeviceMarkerVisible(t,e){const o=this.deviceMarkers.get(t);o&&(o.visible=e,this.needsUpdate=!0)}setDeviceMarkersVisible(t){for(const[,e]of this.deviceMarkers)e.visible=t;this.needsUpdate=!0}clearModel(){const t=[];this.scene.children.forEach(e=>{e instanceof u.Group&&t.push(e)}),t.forEach(e=>{e.traverse(o=>{if(o.geometry&&o.geometry.dispose(),o.material){const r=o.material;Array.isArray(r)?r.forEach(i=>i.dispose()):r.dispose()}}),e.removeFromParent()}),this.nodeEntries.clear(),this.clearSectionResults()}resize(){const t=this.container.clientWidth,e=this.container.clientHeight;e<1||(this.camera.aspect=t/e,this.camera.updateProjectionMatrix(),this.renderer.setSize(t,e),this.labelRenderer.setSize(t,e),this.needsUpdate=!0)}updateCameraNearFar(){const t=this.camera.position.distanceTo(this.controls.target);t<1?(this.camera.near=.001,this.camera.far=100):t<10?(this.camera.near=.01,this.camera.far=1e3):t<100?(this.camera.near=.1,this.camera.far=1e4):t<1e3?(this.camera.near=1,this.camera.far=1e5):t<1e4?(this.camera.near=10,this.camera.far=1e6):t<1e5?(this.camera.near=100,this.camera.far=1e7):(this.camera.near=1e3,this.camera.far=1e8),this.camera.updateProjectionMatrix()}requestUpdate(){this.needsUpdate=!0}dispose(){var t;cancelAnimationFrame(this.animFrameId),(t=this.resizeObserver)==null||t.disconnect(),this.clearModel(),this.clearAllRadarLayers(),this.removeAllDeviceMarkers(),this.controls.dispose(),this.renderer.dispose(),this.renderer.domElement.remove(),this.labelRenderer.domElement.remove()}}function Ye(s){const e=JSON.parse(s).properties,o=Xe(e.materials||[]),r=new Map;o.forEach(c=>r.set(c.id,c));const i=e.nodes,a=Ze(i,r);return{name:e.name||"Untitled",id:e.id||"",version:e.version||"",materials:o,rootNode:a}}function Xe(s){return s.map(t=>{var e,o,r;return{id:((e=t.properties)==null?void 0:e.id)||"",name:((o=t.properties)==null?void 0:o.name)||"",color:typeof((r=t.properties)==null?void 0:r.color)=="number"?t.properties.color:8947848}})}function Ze(s,t){var r;if(!s||s.length===0)return Ae("root");const e=new Map,o=[];for(const i of s){const a=Je(i,t);e.set(a.id,a),o.push({node:a,parentId:i.parentId})}for(const{node:i,parentId:a}of o)a&&e.has(a)&&e.get(a).children.push(i);return((r=o[0])==null?void 0:r.node)||Ae("root")}function Ae(s){return{id:"empty",name:s,classKey:"EmptyNode",visible:!0,color:8947848,children:[],raw:{}}}function Je(s,t){const e=s.properties||{},o=s.classKey||"";let r=8947848,i;if(e.materialId){i=e.materialId;const m=t.get(i);m&&(r=m.color)}else typeof e.color=="number"&&(r=e.color);const a={id:e.id||Math.random().toString(36).slice(2),name:e.name||o,classKey:o,visible:e.visible!==void 0?!!e.visible:!0,color:r,materialId:i,children:[],raw:e},c=Qe(o,e);return c&&(a.mesh=c),a}function Qe(s,t){if(s==="TriMeshNode"&&t.savedData)return Ke(t.savedData);if(s==="ShapeNode"||s==="MultiShapeNode")return et(t);if((s==="GeoPlineNode"||s==="PlineNode")&&t.points)return tt(t)}function Ke(s){try{const t=typeof s=="string"?JSON.parse(s):s;if(!t.pos||!t.idx)return;const e=new Float32Array(t.pos),o=new Uint32Array(t.idx),r=t.uv?new Float32Array(t.uv):new Float32Array(0),i=t.edgePos?new Float32Array(t.edgePos):new Float32Array(0),a=Ce(e,o);return{positions:e,indices:o,normals:a,uvs:r,edgePositions:i}}catch(t){return}}function et(s){const t=s.shape;if(!t)return;const e=t.properties||t,o=e.mesh||e._mesh;if(!o)return;const r=o.properties||o,i=r.faces||r._faces;if(!i)return;const a=i.properties||i;if(!a.position)return;const c=ye(a.position),m=nt(a.index),p=a.normal?ye(a.normal):Ce(c,m),x=a.uv?ye(a.uv):new Float32Array(0),f=r.edges||r._lines,M=(f==null?void 0:f.properties)||f,y=M!=null&&M.position?ye(M.position):new Float32Array(0);if(c.length!==0)return{positions:c,indices:m,normals:p,uvs:x,edgePositions:y}}function tt(s){const t=s.points;if(!t||!Array.isArray(t))return;const e=t.map(r=>r.properties?{x:r.properties.x||0,y:r.properties.y||0,z:r.properties.z||0}:{x:r.x||0,y:r.y||0,z:r.z||0});if(e.length<2)return;const o=[];for(let r=0;r<e.length-1;r++)o.push(e[r].x,e[r].y,e[r].z),o.push(e[r+1].x,e[r+1].y,e[r+1].z);return{positions:new Float32Array(0),indices:new Uint32Array(0),normals:new Float32Array(0),uvs:new Float32Array(0),edgePositions:new Float32Array(o)}}function ye(s){var t;return s instanceof Float32Array?s:(t=s==null?void 0:s.properties)!=null&&t.buffer?new Float32Array(s.properties.buffer):Array.isArray(s)?new Float32Array(s):new Float32Array(0)}function nt(s){var t;return s instanceof Uint32Array?s:(t=s==null?void 0:s.properties)!=null&&t.buffer?new Uint32Array(s.properties.buffer):Array.isArray(s)?new Uint32Array(s):new Uint32Array(0)}function Ce(s,t){if(s.length===0||t.length===0)return new Float32Array(0);const e=new Float32Array(s.length);for(let o=0;o<t.length;o+=3){const r=t[o],i=t[o+1],a=t[o+2],c=s[r*3],m=s[r*3+1],p=s[r*3+2],x=s[i*3],f=s[i*3+1],M=s[i*3+2],y=s[a*3],w=s[a*3+1],T=s[a*3+2],G=x-c,F=f-m,S=M-p,U=y-c,J=w-m,Q=T-p,O=F*Q-S*J,E=S*U-G*Q,I=G*J-F*U,K=Math.sqrt(O*O+E*E+I*I)||1;for(const b of[r,i,a])e[b*3]+=O/K,e[b*3+1]+=E/K,e[b*3+2]+=I/K}for(let o=0;o<e.length;o+=3){const r=Math.sqrt(ve(e[o],2)+ve(e[o+1],2)+ve(e[o+2],2))||1;e[o]/=r,e[o+1]/=r,e[o+2]/=r}return e}function ot(s,t){const e=new u.Vector3().subVectors(t,s).normalize();let o=new u.Vector3().crossVectors(e,new u.Vector3(0,0,1)).normalize();return o.lengthSq()<.01&&(o=new u.Vector3().crossVectors(e,new u.Vector3(1,0,0)).normalize()),{start:s.clone(),end:t.clone(),normal:o}}function rt(s){const t=[];for(let e=0;e<s.length-1;e++)t.push(ot(s[e],s[e+1]));return t}const ze=new WeakMap;function st(s,t){if(!s.mesh||s.mesh.positions.length===0||s.mesh.indices.length===0)return new Float32Array(0);let e=ze.get(s);e||(e=new u.BufferGeometry,e.setAttribute("position",new u.BufferAttribute(s.mesh.positions,3)),e.setIndex(new u.BufferAttribute(s.mesh.indices,1)),e.boundsTree=new Me.MeshBVH(e),ze.set(s,e));const o=e.boundsTree,r=[],i=new u.Line3;return o.shapecast({intersectsBounds:a=>t.intersectsBox(a),intersectsTriangle:a=>(it(a,t,i)&&r.push(i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z),!1)}),new Float32Array(r)}function it(s,t,e){const o=t.distanceToPoint(s.a),r=t.distanceToPoint(s.b),i=t.distanceToPoint(s.c);if(o>0&&r>0&&i>0||o<0&&r<0&&i<0||o===0&&r===0&&i===0)return!1;const a=[];if(xe(s.a,s.b,o,r,a),xe(s.b,s.c,r,i,a),xe(s.c,s.a,i,o,a),a.length>=2){e.start.copy(a[0]);let c=0,m=1;for(let p=1;p<a.length;p++){const x=a[0].distanceToSquared(a[p]);x>c&&(c=x,m=p)}return e.end.copy(a[m]),c>=1e-10}return!1}function xe(s,t,e,o,r){if(e*o<0){const i=e/(e-o);r.push(new u.Vector3().copy(s).lerp(t,i))}else Math.abs(e)<1e-5&&(r.length===0||r[r.length-1].distanceTo(s)>1e-5)&&r.push(s.clone())}function at(s,t,e){const o=[],r=new u.Vector3().subVectors(e,t),i=r.lengthSq();if(i<1e-6)return[];const a=(c,m,p)=>{const x=c-t.x,f=m-t.y,M=p-t.z;return(x*r.x+f*r.y+M*r.z)/i};for(let c=0;c<s.length;c+=6){const m=s[c],p=s[c+1],x=s[c+2],f=s[c+3],M=s[c+4],y=s[c+5],w=a(m,p,x),T=a(f,M,y);if(w>=0&&w<=1&&T>=0&&T<=1){o.push(m,p,x,f,M,y);continue}if(w<0&&T<0||w>1&&T>1)continue;const G=Math.min(w,T),F=Math.max(w,T),S=w<T?{x:m,y:p,z:x}:{x:f,y:M,z:y},U=w<T?{x:f,y:M,z:y}:{x:m,y:p,z:x},J=Math.max(G,0),Q=Math.min(F,1);if(J<Q){const O=F-G,E=(J-G)/O,I=(Q-G)/O;o.push(S.x+(U.x-S.x)*E,S.y+(U.y-S.y)*E,S.z+(U.z-S.z)*E,S.x+(U.x-S.x)*I,S.y+(U.y-S.y)*I,S.z+(U.z-S.z)*I)}}return o}function lt(s,t){if(t.length<2)return{results:[],allPositions:new Float32Array(0)};const e=rt(t),o=[],r=[];for(const i of s){const a=i.node;if(!a.mesh||a.mesh.positions.length===0)continue;const c=[];for(const m of e){const p=new u.Plane(m.normal.clone(),-m.normal.dot(m.start)),x=st(a,p);if(x.length>0){const f=at(x,m.start,m.end);f.length>0&&c.push(...f)}}if(c.length>0){o.push(...c);const m=[];for(let p=0;p<c.length;p+=6)m.push({start:{x:c[p],y:c[p+1],z:c[p+2]},end:{x:c[p+3],y:c[p+4],z:c[p+5]}});r.push({nodeName:a.name,nodeColor:a.color,segments:m})}}return{results:r,allPositions:new Float32Array(o)}}const ct={class:"geo-dialog-box"},dt={class:"geo-dialog-header"},ut={key:0,class:"geo-highlight-tag"},mt={class:"geo-dialog-body"},ft={key:0,class:"geo-no-result"},pt=n.defineComponent({__name:"SectionDialog",props:{visible:{type:Boolean},results:{},startPoint:{},endPoint:{}},emits:["close"],setup(s,{emit:t}){const e=s,o=t,r=n.ref(),i=n.ref();let a=1100,c=600;const m=n.ref(!1),p=n.ref(""),x=n.ref({}),f=n.ref(null);function M(b){const N=parseInt(b.slice(1,3),16),d=parseInt(b.slice(3,5),16),L=parseInt(b.slice(5,7),16),A=.7,C=Math.round(N*A),B=Math.round(d*A),q=Math.round(L*A);return`#${C.toString(16).padStart(2,"0")}${B.toString(16).padStart(2,"0")}${q.toString(16).padStart(2,"0")}`}const y=["#d32f2f","#1565c0","#2e7d32","#e65100","#6a1b9a","#00838f","#c62828","#283593","#1b5e20","#bf360c"];function w(b,N){const d=parseInt(b.slice(1,3),16),L=parseInt(b.slice(3,5),16),A=parseInt(b.slice(5,7),16);return(d*299+L*587+A*114)/1e3>180?y[N%y.length]:M(b)}function T(){o("close"),f.value=null}function G(){const b=r.value;if(!b)return;const N=b.toDataURL("image/png"),d=document.createElement("a");d.download=`剖面结果_${new Date().toISOString().slice(0,10)}.png`,d.href=N,d.click()}const F=[];n.watch(()=>e.visible,b=>ge(null,null,function*(){b&&(f.value=null,yield n.nextTick(),S())}));function S(){const b=r.value,N=i.value;if(!b||!N)return;const d=b.getContext("2d");if(!d)return;const L=N.clientWidth;a=Math.max(L,600),c=Math.round(a*.5);const A=window.devicePixelRatio||1;if(b.width=a*A,b.height=c*A,b.style.width=a+"px",b.style.height=c+"px",d.scale(A,A),d.clearRect(0,0,a,c),e.results.length===0)return;const C=e.endPoint.x-e.startPoint.x,B=e.endPoint.y-e.startPoint.y,q=Math.sqrt(C*C+B*B);if(q<1e-6)return;const k=C/q,j=B/q,ee=[];let $=1/0,te=-1/0,ne=1/0,Y=-1/0;if(e.results.forEach((g,l)=>{const h="#"+g.nodeColor.toString(16).padStart(6,"0"),v=w(h,l);for(const _ of g.segments){const V=(_.start.x-e.startPoint.x)*k+(_.start.y-e.startPoint.y)*j,D=_.start.z,R=(_.end.x-e.startPoint.x)*k+(_.end.y-e.startPoint.y)*j,z=_.end.z;ee.push({x1:V,z1:D,x2:R,z2:z,color:v,name:g.nodeName}),$=Math.min($,V,R),te=Math.max(te,V,R),ne=Math.min(ne,D,z),Y=Math.max(Y,D,z)}}),ee.length===0)return;const fe=te-$||1,pe=Y-ne||1,oe=70,P=30,re=30,ue=50,me=a-oe-P,se=c-re-ue,we=me/fe,he=se/pe,X=g=>oe+(g-$)*we,Z=g=>c-ue-(g-ne)*he;d.fillStyle="#fafafa",d.fillRect(0,0,a,c),d.strokeStyle="#bbb",d.lineWidth=1,d.strokeRect(oe,re,me,se);const ie=K(fe),ae=K(pe);d.strokeStyle="#e8e8e8",d.lineWidth=.5;for(let g=Math.ceil($/ie)*ie;g<=te;g+=ie){const l=X(g);d.beginPath(),d.moveTo(l,re),d.lineTo(l,c-ue),d.stroke()}for(let g=Math.ceil(ne/ae)*ae;g<=Y;g+=ae){const l=Z(g);d.beginPath(),d.moveTo(oe,l),d.lineTo(a-P,l),d.stroke()}d.fillStyle="#444",d.font="11px monospace",d.textAlign="center";for(let g=Math.ceil($/ie)*ie;g<=te;g+=ie)d.fillText(g.toFixed(0),X(g),c-ue+16);d.textAlign="right";for(let g=Math.ceil(ne/ae)*ae;g<=Y;g+=ae)d.fillText(g.toFixed(0),oe-6,Z(g)+4);d.fillStyle="#222",d.font="bold 13px sans-serif",d.textAlign="center",d.fillText("水平距离 (m)",oe+me/2,c-4),d.save(),d.translate(14,re+se/2),d.rotate(-Math.PI/2),d.fillText("标高 Z (m)",0,0),d.restore(),d.save(),d.beginPath(),d.rect(oe,re,me,se),d.clip();const de=f.value;if(de){d.lineWidth=1.5,d.globalAlpha=.2;for(const g of ee)g.name!==de&&(d.strokeStyle=g.color,d.beginPath(),d.moveTo(X(g.x1),Z(g.z1)),d.lineTo(X(g.x2),Z(g.z2)),d.stroke());d.globalAlpha=1}d.lineWidth=de?4:1.5,d.lineCap="round";for(const g of ee)de&&g.name!==de||(d.strokeStyle=g.color,d.beginPath(),d.moveTo(X(g.x1),Z(g.z1)),d.lineTo(X(g.x2),Z(g.z2)),d.stroke());d.restore(),F.length=0;for(const g of ee)F.push({sx1:X(g.x1),sy1:Z(g.z1),sx2:X(g.x2),sy2:Z(g.z2),name:g.name,color:g.color})}function U(b,N,d,L,A,C){const B=A-d,q=C-L,k=B*B+q*q;if(k<1e-6)return Math.hypot(b-d,N-L);let j=((b-d)*B+(N-L)*q)/k;return j=Math.max(0,Math.min(1,j)),Math.hypot(b-(d+j*B),N-(L+j*q))}function J(b){const d=r.value.getBoundingClientRect();return{mx:(b.clientX-d.left)*(a/d.width),my:(b.clientY-d.top)*(c/d.height),rect:d}}function Q(b,N){let d=1/0,L="",A="";for(const C of F){const B=U(b,N,C.sx1,C.sy1,C.sx2,C.sy2);B<d&&(d=B,L=C.name,A=C.color)}return{bestDist:d,bestName:L,bestColor:A}}function O(b){if(!r.value||F.length===0)return;const{mx:N,my:d,rect:L}=J(b),{bestDist:A,bestName:C,bestColor:B}=Q(N,d);A<12?(m.value=!0,p.value=C,x.value={left:b.clientX-L.left+14+"px",top:b.clientY-L.top-8+"px",borderLeft:`4px solid ${B}`},r.value.style.cursor="pointer"):(m.value=!1,r.value.style.cursor="default")}function E(){m.value=!1}function I(b){if(!r.value||F.length===0)return;const{mx:N,my:d}=J(b),{bestDist:L,bestName:A}=Q(N,d);L<12?f.value=f.value===A?null:A:f.value=null,S()}function K(b){const N=b/8,d=Math.pow(10,Math.floor(Math.log10(N))),L=N/d;return L<1.5?d:L<3.5?2*d:L<7.5?5*d:10*d}return(b,N)=>s.visible?(n.openBlock(),n.createElementBlock("div",{key:0,class:"geo-dialog-overlay",onClick:n.withModifiers(T,["self"])},[n.createElementVNode("div",ct,[n.createElementVNode("div",dt,[N[0]||(N[0]=n.createElementVNode("span",{class:"geo-dialog-title"},"剖面结果",-1)),f.value?(n.openBlock(),n.createElementBlock("span",ut,n.toDisplayString(f.value),1)):n.createCommentVNode("",!0),n.createElementVNode("button",{class:"geo-export-btn",onClick:G,title:"导出图片"},"💾 导出图片"),n.createElementVNode("button",{class:"geo-dialog-close",onClick:T},"×")]),n.createElementVNode("div",mt,[n.createElementVNode("div",{class:"geo-canvas-wrap",ref_key:"canvasWrapRef",ref:i},[n.createElementVNode("canvas",{ref_key:"canvasRef",ref:r,onMousemove:O,onMouseleave:E,onClick:I},null,544),m.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"geo-canvas-tooltip",style:n.normalizeStyle(x.value)},n.toDisplayString(p.value),5)):n.createCommentVNode("",!0)],512),s.results.length===0?(n.openBlock(),n.createElementBlock("div",ft,"该剖切线未与任何模型相交")):n.createCommentVNode("",!0)])])])):n.createCommentVNode("",!0)}}),ht=Ee._export_sfc(pt,[["__scopeId","data-v-cf4a02c5"]]),vt={class:"lw-map-area"},gt={key:0,class:"lw-model-loading"},yt={key:1,class:"lw-section-hint"},wt={key:2,class:"lw-model-dropdown"},bt={key:0,class:"lw-model-panel"},kt=["checked"],xt=["onClick"],Et=["checked"],Mt={class:"lw-device-arrow"},_t={key:0,class:"lw-device-grid"},St=["onClick"],Nt={key:0,class:"lw-device-check"},Lt={class:"lw-device-name"},At=n.defineComponent({__name:"MonitoringMap",props:{mapScene:{},devices:{},mobileObjects:{},affectedAreas:{},currentWarning:{},warningAreaColor:{default:"#ff6600"},warningAreaFillOpacity:{default:.08},showModelToggle:{type:Boolean,default:!0},showDeviceToggle:{type:Boolean,default:!0},g3dFileUrl:{default:""},dtmModelUrl:{default:""},uavTileUrl:{default:""}},emits:["select-device","select-object","toggle-model"],setup(s,{expose:t,emit:e}){const o=s,r=e,i=n.ref(),a=n.ref(),c=n.ref(!1),m=n.ref(!1),p=n.ref(!1),x=n.ref(""),f=n.ref("none"),M=n.ref({x:0,y:0,z:0}),y=n.ref({x:0,y:0,z:0}),w=n.ref([]),T=n.ref(!1);let G={x:0,y:0};const F=[{key:"geological_model",label:"地质模型"},{key:"dtm_surface",label:"DTM面"},{key:"drone_map",label:"无人机地图"}],S=n.reactive(new Set(["drone_map"])),U=n.computed(()=>S.size===F.length);function J(l){S.has(l)?S.delete(l):S.add(l),b(),r("toggle-model")}function Q(){U.value?S.clear():F.forEach(l=>S.add(l.key)),b(),r("toggle-model")}let O=null,E=null,I=null;const K=n.computed(()=>S.has("geological_model")||S.has("dtm_surface"));function b(){return ge(this,null,function*(){if(S.has("geological_model")||S.has("dtm_surface")){if(!E&&a.value&&(yield n.nextTick(),E=new je(a.value)),S.has("geological_model")&&o.g3dFileUrl&&E)try{p.value=!0,x.value="加载地质模型...";const h=yield fetch(o.g3dFileUrl);if(!h.ok)throw new Error(`HTTP ${h.status}: ${h.statusText}`);x.value="读取模型数据...";const v=yield h.text();x.value="解析模型...";const _=Ye(v);yield E.loadDocument(_,V=>{x.value=V})}catch(h){console.error("[MonitoringMap] 加载地质模型失败:",h)}finally{p.value=!1}E&&ae()}else E&&E.removeAllDeviceMarkers(),k&&setTimeout(()=>k==null?void 0:k.invalidateSize(),100);if(S.has("drone_map")&&k){if(!I){const h=o.uavTileUrl||ne.satellite;I=H.L.tileLayer(h,{maxZoom:19,opacity:.85}).addTo(k)}}else I&&k&&(k.removeLayer(I),I=null)})}function N(){if(!E){alert("请先勾选「地质模型」加载 3D 模型后再进行剖面绘制");return}E.clearPickMarkers(),E.clearSectionResults(),f.value="start",T.value=!1,w.value=[],L()}function d(){f.value="none",E==null||E.clearPickMarkers(),A()}function L(){if(!E)return;const l=E.renderer.domElement;l.addEventListener("mousedown",C),l.addEventListener("mouseup",B)}function A(){if(!E)return;const l=E.renderer.domElement;l.removeEventListener("mousedown",C),l.removeEventListener("mouseup",B)}function C(l){G={x:l.clientX,y:l.clientY}}function B(l){if(!E||f.value==="none"||Math.hypot(l.clientX-G.x,l.clientY-G.y)>5)return;const h=E.pickPoint(l);if(h){if(f.value==="start")M.value={x:h.x,y:h.y,z:h.z},E.addPickMarker(h,65280),f.value="end";else if(f.value==="end"){y.value={x:h.x,y:h.y,z:h.z},E.addPickMarker(h,16711680),f.value="none",A();const v=new u.Vector3(M.value.x,M.value.y,M.value.z),_=new u.Vector3(y.value.x,y.value.y,y.value.z);E.addSectionPath([v,_]);const V=E.getVisibleMeshEntries(),{results:D,allPositions:R}=lt(V,[v,_]);w.value=D,R.length>0&&D.forEach(z=>{const W=z.nodeColor,le=[];for(const ce of z.segments)le.push(ce.start.x,ce.start.y,ce.start.z,ce.end.x,ce.end.y,ce.end.z);le.length>0&&E.addSectionLines(new Float32Array(le),W)}),T.value=!0}}}t({startSection:N});const q={mounted(l,h){l.__clickOutsideHandler=v=>{l.contains(v.target)||h.value()},document.addEventListener("click",l.__clickOutsideHandler)},unmounted(l){document.removeEventListener("click",l.__clickOutsideHandler)}};let k=null,j=null,ee=null,$=null,te=null;const ne={dark:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",light:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",satellite:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",gaode:"https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",gaode_satellite:"https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}"},Y=[{type:"GNSS",label:"GNSS监测",icon:"📍",color:"#ff6b6b",category:"device"},{type:"inclinometer",label:"深部位移监测",icon:"⚓",color:"#3b82f6",category:"device"},{type:"radar",label:"雷达监测",icon:"📡",color:"#8b5cf6",category:"device"},{type:"crack_image",label:"裂缝写实",icon:"�",color:"#06b6d4",category:"device"},{type:"crack",label:"裂缝监测",icon:"📏",color:"#f97316",category:"device"},{type:"combustion",label:"煤自燃监测",icon:"🔥",color:"#ef4444",category:"device"},{type:"rain",label:"降雨监测",icon:"💧",color:"#0ea5e9",category:"device"},{type:"groundwater",label:"地下水监测",icon:"�",color:"#14b8a6",category:"device"},{type:"stress",label:"地下应力监测",icon:"📊",color:"#eab308",category:"device"},{type:"vibration",label:"爆破震动监测",icon:"💥",color:"#f59e0b",category:"device"},{type:"remote_sensing",label:"遥感监测",icon:"🛰️",color:"#64748b",category:"device"},{type:"person",label:"人员",icon:"👤",color:"#78909c",category:"object"},{type:"truck",label:"车辆",icon:"🚛",color:"#5d9b46",category:"object"},{type:"excavator",label:"挖掘设备",icon:"🏗️",color:"#e8a735",category:"object"},{type:"drone",label:"无人机",icon:"🛸",color:"#7e57c2",category:"object"}],fe=Y.reduce((l,h)=>(l[h.type]=h.icon,l),{}),pe={person:"👤",truck:"🚛",excavator:"🏗️",drone:"🛸"},oe={normal:"#52c41a",warning:"#ff4d4f",offline:"#999",abnormal:"#faad14",near_warning_area:"#ff6600",in_warning_area:"#ff0000",evacuated:"#999"},P=n.reactive(new Set(Y.map(l=>l.type))),re=n.computed(()=>P.size===Y.length);function ue(l){P.has(l)?P.delete(l):P.add(l)}function me(){re.value?P.clear():Y.forEach(l=>P.add(l.type))}const se=n.computed(()=>o.devices.filter(l=>P.has(l.deviceType)));function we(){var _,V,D;if(k||!i.value)return;const l=o.mapScene;k=H.L.map(i.value,{center:[(_=l.centerLat)!=null?_:45.3738,(V=l.centerLng)!=null?V:119.3838],zoom:(D=l.zoom)!=null?D:15,zoomControl:!1,attributionControl:!1});const h=ne[l.tileStyle||"dark"]||ne.dark,v=(l.tileStyle||"dark").startsWith("gaode")?"1234":"abc";H.L.tileLayer(h,{attribution:"",maxZoom:18,subdomains:v}).addTo(k),te=H.L.layerGroup().addTo(k),j=H.L.layerGroup().addTo(k),ee=H.L.layerGroup().addTo(k),$=H.L.layerGroup().addTo(k),he(),setTimeout(()=>k==null?void 0:k.invalidateSize(),100),setTimeout(()=>k==null?void 0:k.invalidateSize(),400),setTimeout(()=>k==null?void 0:k.invalidateSize(),1e3),i.value&&(O=new ResizeObserver(()=>{setTimeout(()=>k==null?void 0:k.invalidateSize(),50)}),O.observe(i.value))}function he(){Z(),ie(),de(),g()}const X=["#ff4d4f","#3b82f6","#22c55e","#f59e0b","#8b5cf6","#06b6d4","#ec4899","#14b8a6","#f97316","#6366f1"];function Z(){if(!te||!k)return;te.clearLayers();const l=new Map;se.value.forEach(v=>{const _=v.lineId;!_||!v.lat||!v.lng||(l.has(_)||l.set(_,[]),l.get(_).push({lat:v.lat,lng:v.lng}))});let h=0;l.forEach((v,_)=>{if(v.length<2)return;v.sort((z,W)=>z.lng-W.lng||z.lat-W.lat);const V=v.map(z=>[z.lat,z.lng]),D=X[h%X.length];h++;const R=H.L.polyline(V,{color:D,weight:3,opacity:.85,dashArray:""});R.bindTooltip(_,{sticky:!0,direction:"top"}),te.addLayer(R)})}function ie(){!j||!k||(j.clearLayers(),se.value.forEach(l=>{var le,ce;const h=(le=l.lat)!=null?le:0,v=(ce=l.lng)!=null?ce:0;if(!h||!v)return;const _=fe[l.deviceType]||"📍",V=oe[l.status]||"#52c41a",D=l.warningLevel&&l.warningLevel>0,R=H.L.divIcon({className:"lw-marker-icon",html:`<div class="lw-marker" style="border-color:${V}">
2
2
  <span class="lw-marker-emoji${D?" lw-pulse":""}">${_}</span>
3
3
  <span class="lw-marker-label">${l.deviceName}</span>
4
4
  </div>`,iconSize:[90,44],iconAnchor:[45,44]}),z=H.L.marker([h,v],{icon:R});z.on("click",()=>r("select-device",l)),z.bindTooltip(`<b>${l.deviceName}</b> (${l.deviceType})`,{direction:"top",offset:[0,-8]});const W=l.displayFields||[];if(W.length>0){const Te=W.map(be=>`<div class="lw-popup-row"><span class="lw-popup-label">${be.label}:</span> <span class="lw-popup-value">${be.value}</span> <span class="lw-popup-unit">${be.unit}</span></div>`).join("");z.bindPopup(`<div class="lw-popup-card"><div class="lw-popup-title">${l.deviceName}</div>${Te}</div>`,{className:"lw-device-popup",closeButton:!0,offset:[0,-10]})}j.addLayer(z)}))}function ae(){E&&(E.removeAllDeviceMarkers(),console.log("[3D markers] props.devices:",o.devices.length,"enabledTypes:",[...P],"visibleDevices:",se.value.length),console.log("[3D markers] devices detail:",o.devices.map(l=>({name:l.deviceName,type:l.deviceType,lng:l.lng,lat:l.lat,modelE:l.modelE,modelN:l.modelN,modelRL:l.modelRL}))),se.value.forEach(l=>{var z,W,le;const h=(z=l.modelE)!=null?z:0,v=(W=l.modelN)!=null?W:0,_=(le=l.modelRL)!=null?le:0;if(console.log(`[3D marker] ${l.deviceName}: E=${h}, N=${v}, RL=${_}`),!h&&!v)return;const V=fe[l.deviceType]||"📍",D=l.warningLevel&&l.warningLevel>0,R=document.createElement("div");R.className="lw-3d-marker",R.innerHTML=`
@@ -27,8 +27,8 @@ 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-CJUfAya1.js";
31
- import { _ as oe } from "./index-C7h1impW.js";
30
+ import { B as te } from "./BaseComponent-CG-AFgtN.js";
31
+ import { _ as oe } from "./index-CFVu8BaV.js";
32
32
  import { g as ie } from "./titleStyle-BT5GlpAb.js";
33
33
  import { A as le, D as se } from "./ele-gridview-icon-cSd1oIDi.js";
34
34
  const ne = { class: "mix-body" }, re = {
@@ -1 +1 @@
1
- "use strict";var q=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?q(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-Bj7jDYan.cjs"),K=require("./index-dj-SHelr.cjs"),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(()=>({})),H=yield import("@univerjs/preset-sheets-core/locales/en-US").then(b=>b.default).catch(()=>({}));yield import("@univerjs/preset-sheets-core/lib/index.css");const L=((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:R,univerAPI:g}=I({locale:L,locales:{[S.EN_US]:T(H),[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=R,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 q=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?q(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-B676Wwpz.cjs"),K=require("./index-C2MWQs3P.cjs"),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(()=>({})),H=yield import("@univerjs/preset-sheets-core/locales/en-US").then(b=>b.default).catch(()=>({}));yield import("@univerjs/preset-sheets-core/lib/index.css");const L=((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:R,univerAPI:g}=I({locale:L,locales:{[S.EN_US]:T(H),[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=R,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,4 +1,4 @@
1
- "use strict";var z=Object.defineProperty,I=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var k=(y,s,i)=>s in y?z(y,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[s]=i,w=(y,s)=>{for(var i in s||(s={}))R.call(s,i)&&k(y,i,s[i]);if(N)for(var i of N(s))P.call(s,i)&&k(y,i,s[i]);return y},A=(y,s)=>I(y,q(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio-button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const _=require("./index-dj-SHelr.cjs"),U=require("./EChartComponentBase-Cwa2RHtb.cjs");require("./index-mAPVa0s4.cjs");const T=require("./ele-lin-icon-Dke_1AmT.cjs"),$=require("./echarts-BB8O2KSA.cjs"),G={class:"acceleration-chart-wrapper"},W={class:"toolbar"},Q={class:"toolbar-left"},X={class:"toolbar-center"},Z={class:"toolbar-right"},J={class:"chart-header"},K={class:"chart-title"},ee={class:"chart-legend"},te={class:"legend-text"},ae={class:"y-axis-unit"},oe={class:"chart-body"},le=["id"],re={DEFAULT_ICON:T.DEFAULT_ICON,ACTIVE_ICON:T.ACTIVE_ICON,NAME_CN:"加速度监测",NAME_EN:"Acceleration Chart",ORDER:10},ne={unit:{value:"mm",type:"string",label:"component.accelerationChart.unit"},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},gridLineColor:{value:"#e5e5e5",type:"color",label:"component.accelerationChart.gridLineColor"},points:{value:50,type:"number",label:"component.options.points",min:10,max:200},lineType:{value:"smooth",type:"select",label:"component.accelerationChart.lineType",options:[{label:"平滑曲线",value:"smooth"},{label:"折线",value:"line"},{label:"阶梯线",value:"step"}]},showSymbol:{value:!1,type:"checkbox",label:"component.accelerationChart.showSymbol"},lineWidth:{value:1.5,type:"number",label:"component.accelerationChart.lineWidth",min:1,max:5},yMax:{value:30,type:"number",label:"component.line.yMax"},yMin:{value:-20,type:"number",label:"component.line.yMin"},areaList:{value:"内排,外排,边坡,平台",type:"string",label:"component.accelerationChart.areaList"}},se=[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}],ce=["name","area","object_id","curves"],ie=["name","fv","color"],ue=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],de={useAlias:!1,multiObject:!0,source:"mosaic"},me={DEFAULT:re,OPTIONS:ne,DATA:se,PARAMS:ce,SOURCE:ue,COMMON:de,CURVE_PARAMS:ie},fe=t.defineComponent(A(w({},me),{__name:"accelerationChart",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(y){t.useCssVars(o=>({v3cfd941c:t.unref(V).bgColor,ea31b698:t.unref(V).textColor}));const s=y,i=t.ref(""),M=t.computed(()=>{var l,c,d,m;const o=((l=s.conf)==null?void 0:l.data)||[],e=new Set;return o.forEach(n=>{n.area&&e.add(n.area)}),e.size===0?(((m=(d=(c=s.conf)==null?void 0:c.options)==null?void 0:d.areaList)==null?void 0:m.value)||"内排,外排,边坡,平台").split(",").map(r=>r.trim()).filter(r=>r):Array.from(e)});t.watch(M,o=>{o.length>0&&!i.value&&(i.value=o[0])},{immediate:!0});const H=()=>{console.log("区域切换:",i.value);const o=E.value;o.length>0?v.value=o[0].value:v.value="",S()},v=t.ref(""),E=t.computed(()=>{var l;return(((l=s.conf)==null?void 0:l.data)||[]).filter(c=>c.area?c.area===i.value:!0).map(c=>({label:c.name,value:c.name}))});t.watch(E,o=>{o.length>0&&!v.value&&(v.value=o[0].value)},{immediate:!0});const L=t.computed(()=>{var e;const o=((e=s.conf)==null?void 0:e.data)||[];return o.find(l=>l.name===v.value)||o[0]||null}),D=t.computed(()=>{const o=L.value;return o?o.curves||[]:[]}),F=t.ref("7days"),x=t.ref(_.dayjs().subtract(7,"day").format("YYYY-MM-DD HH:mm:ss")),b=t.ref(_.dayjs().format("YYYY-MM-DD HH:mm:ss")),B=o=>{const e=_.dayjs();switch(o){case"today":x.value=e.startOf("day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"7days":x.value=e.subtract(7,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"30days":x.value=e.subtract(30,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break}S()},S=()=>{console.log("查询数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value}),p.updateChartData(D.value)},O=()=>{console.log("导出数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value})};t.watch(v,()=>{p.updateChartData(D.value)});class j extends U.EChartComponentBase{constructor(){super(...arguments),this.historyData=new Map,this.xAxisData=[]}extractStyles(){var l,c,d,m,n,r,a,u,f,h,C;const{options:e}=this.props.conf;return{unit:((l=e==null?void 0:e.unit)==null?void 0:l.value)||"mm",bgColor:((c=e==null?void 0:e.bgColor)==null?void 0:c.value)||"#ffffff",textColor:((d=e==null?void 0:e.textColor)==null?void 0:d.value)||"#333333",gridLineColor:((m=e==null?void 0:e.gridLineColor)==null?void 0:m.value)||"#e5e5e5",points:((n=e==null?void 0:e.points)==null?void 0:n.value)||50,lineType:((r=e==null?void 0:e.lineType)==null?void 0:r.value)||"smooth",showSymbol:(u=(a=e==null?void 0:e.showSymbol)==null?void 0:a.value)!=null?u:!1,lineWidth:((f=e==null?void 0:e.lineWidth)==null?void 0:f.value)||1.5,yMax:((h=e==null?void 0:e.yMax)==null?void 0:h.value)||30,yMin:((C=e==null?void 0:e.yMin)==null?void 0:C.value)||-20}}getDefaultData(){return[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}]}generateMockData(e,l=0,c=15){const d=[];let m=Math.random()*Math.PI*2;for(let n=0;n<e;n++){const r=(Math.random()-.5)*c*.5,a=Math.sin(m+n*.15)*c*.6,u=l+a+r;d.push(parseFloat(u.toFixed(1)))}return d}getChartOption(e=[]){const l=this.extractStyles(),c=l.points;this.xAxisData=_.getxAxisDataTime(c,this.props.mode,!1);const m=(e.length>0?e:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]).map((n,r)=>{const a=`${v.value}_${n.name}`;let u=this.historyData.get(a);if(!u||u.length===0){const h=[15,-12,-11,19,22];u=this.generateMockData(c,h[r]||0,2),this.historyData.set(a,u)}const f={name:n.name,type:"line",symbol:l.showSymbol?"circle":"none",symbolSize:4,data:u,lineStyle:{width:l.lineWidth,color:n.color},itemStyle:{color:n.color}};return l.lineType==="smooth"?f.smooth=!0:(l.lineType==="step"&&(f.step="middle"),f.smooth=!1),f});return{grid:{left:50,right:20,top:20,bottom:70},tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e5e5e5",textStyle:{color:"#333",fontSize:12},formatter:n=>{let r=`<div style="font-weight:bold;margin-bottom:5px">${n[0].axisValue}</div>`;return n.forEach(a=>{r+=`<div style="display:flex;align-items:center;gap:5px">
1
+ "use strict";var z=Object.defineProperty,I=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var k=(y,s,i)=>s in y?z(y,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[s]=i,w=(y,s)=>{for(var i in s||(s={}))R.call(s,i)&&k(y,i,s[i]);if(N)for(var i of N(s))P.call(s,i)&&k(y,i,s[i]);return y},A=(y,s)=>I(y,q(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio-button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const _=require("./index-C2MWQs3P.cjs"),U=require("./EChartComponentBase-QSg0tlCw.cjs");require("./index-mAPVa0s4.cjs");const T=require("./ele-lin-icon-Dke_1AmT.cjs"),$=require("./echarts-BB8O2KSA.cjs"),G={class:"acceleration-chart-wrapper"},W={class:"toolbar"},Q={class:"toolbar-left"},X={class:"toolbar-center"},Z={class:"toolbar-right"},J={class:"chart-header"},K={class:"chart-title"},ee={class:"chart-legend"},te={class:"legend-text"},ae={class:"y-axis-unit"},oe={class:"chart-body"},le=["id"],re={DEFAULT_ICON:T.DEFAULT_ICON,ACTIVE_ICON:T.ACTIVE_ICON,NAME_CN:"加速度监测",NAME_EN:"Acceleration Chart",ORDER:10},ne={unit:{value:"mm",type:"string",label:"component.accelerationChart.unit"},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},gridLineColor:{value:"#e5e5e5",type:"color",label:"component.accelerationChart.gridLineColor"},points:{value:50,type:"number",label:"component.options.points",min:10,max:200},lineType:{value:"smooth",type:"select",label:"component.accelerationChart.lineType",options:[{label:"平滑曲线",value:"smooth"},{label:"折线",value:"line"},{label:"阶梯线",value:"step"}]},showSymbol:{value:!1,type:"checkbox",label:"component.accelerationChart.showSymbol"},lineWidth:{value:1.5,type:"number",label:"component.accelerationChart.lineWidth",min:1,max:5},yMax:{value:30,type:"number",label:"component.line.yMax"},yMin:{value:-20,type:"number",label:"component.line.yMin"},areaList:{value:"内排,外排,边坡,平台",type:"string",label:"component.accelerationChart.areaList"}},se=[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}],ce=["name","area","object_id","curves"],ie=["name","fv","color"],ue=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],de={useAlias:!1,multiObject:!0,source:"mosaic"},me={DEFAULT:re,OPTIONS:ne,DATA:se,PARAMS:ce,SOURCE:ue,COMMON:de,CURVE_PARAMS:ie},fe=t.defineComponent(A(w({},me),{__name:"accelerationChart",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(y){t.useCssVars(o=>({v3cfd941c:t.unref(V).bgColor,ea31b698:t.unref(V).textColor}));const s=y,i=t.ref(""),M=t.computed(()=>{var l,c,d,m;const o=((l=s.conf)==null?void 0:l.data)||[],e=new Set;return o.forEach(n=>{n.area&&e.add(n.area)}),e.size===0?(((m=(d=(c=s.conf)==null?void 0:c.options)==null?void 0:d.areaList)==null?void 0:m.value)||"内排,外排,边坡,平台").split(",").map(r=>r.trim()).filter(r=>r):Array.from(e)});t.watch(M,o=>{o.length>0&&!i.value&&(i.value=o[0])},{immediate:!0});const H=()=>{console.log("区域切换:",i.value);const o=E.value;o.length>0?v.value=o[0].value:v.value="",S()},v=t.ref(""),E=t.computed(()=>{var l;return(((l=s.conf)==null?void 0:l.data)||[]).filter(c=>c.area?c.area===i.value:!0).map(c=>({label:c.name,value:c.name}))});t.watch(E,o=>{o.length>0&&!v.value&&(v.value=o[0].value)},{immediate:!0});const L=t.computed(()=>{var e;const o=((e=s.conf)==null?void 0:e.data)||[];return o.find(l=>l.name===v.value)||o[0]||null}),D=t.computed(()=>{const o=L.value;return o?o.curves||[]:[]}),F=t.ref("7days"),x=t.ref(_.dayjs().subtract(7,"day").format("YYYY-MM-DD HH:mm:ss")),b=t.ref(_.dayjs().format("YYYY-MM-DD HH:mm:ss")),B=o=>{const e=_.dayjs();switch(o){case"today":x.value=e.startOf("day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"7days":x.value=e.subtract(7,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"30days":x.value=e.subtract(30,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break}S()},S=()=>{console.log("查询数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value}),p.updateChartData(D.value)},O=()=>{console.log("导出数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value})};t.watch(v,()=>{p.updateChartData(D.value)});class j extends U.EChartComponentBase{constructor(){super(...arguments),this.historyData=new Map,this.xAxisData=[]}extractStyles(){var l,c,d,m,n,r,a,u,f,h,C;const{options:e}=this.props.conf;return{unit:((l=e==null?void 0:e.unit)==null?void 0:l.value)||"mm",bgColor:((c=e==null?void 0:e.bgColor)==null?void 0:c.value)||"#ffffff",textColor:((d=e==null?void 0:e.textColor)==null?void 0:d.value)||"#333333",gridLineColor:((m=e==null?void 0:e.gridLineColor)==null?void 0:m.value)||"#e5e5e5",points:((n=e==null?void 0:e.points)==null?void 0:n.value)||50,lineType:((r=e==null?void 0:e.lineType)==null?void 0:r.value)||"smooth",showSymbol:(u=(a=e==null?void 0:e.showSymbol)==null?void 0:a.value)!=null?u:!1,lineWidth:((f=e==null?void 0:e.lineWidth)==null?void 0:f.value)||1.5,yMax:((h=e==null?void 0:e.yMax)==null?void 0:h.value)||30,yMin:((C=e==null?void 0:e.yMin)==null?void 0:C.value)||-20}}getDefaultData(){return[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}]}generateMockData(e,l=0,c=15){const d=[];let m=Math.random()*Math.PI*2;for(let n=0;n<e;n++){const r=(Math.random()-.5)*c*.5,a=Math.sin(m+n*.15)*c*.6,u=l+a+r;d.push(parseFloat(u.toFixed(1)))}return d}getChartOption(e=[]){const l=this.extractStyles(),c=l.points;this.xAxisData=_.getxAxisDataTime(c,this.props.mode,!1);const m=(e.length>0?e:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]).map((n,r)=>{const a=`${v.value}_${n.name}`;let u=this.historyData.get(a);if(!u||u.length===0){const h=[15,-12,-11,19,22];u=this.generateMockData(c,h[r]||0,2),this.historyData.set(a,u)}const f={name:n.name,type:"line",symbol:l.showSymbol?"circle":"none",symbolSize:4,data:u,lineStyle:{width:l.lineWidth,color:n.color},itemStyle:{color:n.color}};return l.lineType==="smooth"?f.smooth=!0:(l.lineType==="step"&&(f.step="middle"),f.smooth=!1),f});return{grid:{left:50,right:20,top:20,bottom:70},tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e5e5e5",textStyle:{color:"#333",fontSize:12},formatter:n=>{let r=`<div style="font-weight:bold;margin-bottom:5px">${n[0].axisValue}</div>`;return n.forEach(a=>{r+=`<div style="display:flex;align-items:center;gap:5px">
2
2
  ${a.marker}
3
3
  <span>${a.seriesName}:</span>
4
4
  <span style="font-weight:bold">${a.value} ${l.unit}</span>
@@ -20,8 +20,8 @@ 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 { g as z, I as he, J as ve, z as ye, _ as pe } from "./index-C7h1impW.js";
24
- import { E as xe } from "./EChartComponentBase-BAyczHNc.js";
23
+ import { g as z, I as he, J as ve, z as ye, _ as pe } from "./index-CFVu8BaV.js";
24
+ import { E as xe } from "./EChartComponentBase-Dz-sD1W6.js";
25
25
  import "./index-ButoLLAe.js";
26
26
  import { A as be, D as _e } from "./ele-lin-icon-Dax-ZiWV.js";
27
27
  import { i as De } from "./echarts-BVht3HHb.js";
@@ -33,8 +33,8 @@ 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 se, ElDialog as xe, ElMessage as J } from "element-plus";
35
35
  import { Delete as Ee, Plus as we } from "@element-plus/icons-vue";
36
- import { u as Ce, _ as Ae } from "./index-C7h1impW.js";
37
- import { B as Ie } from "./BaseComponent-CJUfAya1.js";
36
+ import { u as Ce, _ as Ae } from "./index-CFVu8BaV.js";
37
+ import { B as Ie } from "./BaseComponent-CG-AFgtN.js";
38
38
  import { g as Je } from "./titleStyle-BT5GlpAb.js";
39
39
  import { A as Ne, D as Pe } from "./ele-crd-icon-BXxB7P3T.js";
40
40
  class Te extends Ie {