mixdashboards 1.0.87 → 1.0.89

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 (335) hide show
  1. package/dist/{BaseComponent-qzL33ZSL.js → BaseComponent-D82kw5vB.js} +14 -14
  2. package/dist/{BaseComponent-BHUHnLj-.cjs → BaseComponent-DoQ1oLoA.cjs} +1 -1
  3. package/dist/{EChartComponentBase-BtAW2Yko.js → EChartComponentBase-DUyyaXgA.js} +5 -5
  4. package/dist/{EChartComponentBase-C4s5HSfS.cjs → EChartComponentBase-ejDV5NEw.cjs} +1 -1
  5. package/dist/{EmergencyPlanPanel-CqvHGqqx.js → EmergencyPlanPanel-Bm-fqxYR.js} +1 -1
  6. package/dist/{EmergencyPlanPanel-C8ieiZvC.cjs → EmergencyPlanPanel-BnVlQ-f6.cjs} +1 -1
  7. package/dist/{HistoryPlanDialog-CUSKabw0.js → HistoryPlanDialog-BMzhidd2.js} +1 -1
  8. package/dist/{HistoryPlanDialog-D6VMuzat.cjs → HistoryPlanDialog-QBBxCX7D.cjs} +1 -1
  9. package/dist/{MixiotAppDetailPage-CFISQwpc.js → MixiotAppDetailPage-Dr5R35qW.js} +1 -1
  10. package/dist/{MixiotAppDetailPage-Bd9WrADz.cjs → MixiotAppDetailPage-FfC4ZxrA.cjs} +1 -1
  11. package/dist/{MonitoringMap-CV7YYixH.js → MonitoringMap-CpdWX4fF.js} +2 -2
  12. package/dist/{MonitoringMap-DjvavXD5.cjs → MonitoringMap-eVOQwtGG.cjs} +1 -1
  13. package/dist/{UniverSheet-C7QQQUHI.js → UniverSheet-02jn_UjA.js} +2 -2
  14. package/dist/{UniverSheet-BY4vwAeQ.cjs → UniverSheet-Ded-R47O.cjs} +1 -1
  15. package/dist/{accelerationChart-Dd7s6CA0.js → accelerationChart-B5n1Fc12.js} +21 -21
  16. package/dist/{accelerationChart-CnbCpT4d.cjs → accelerationChart-BKIZV5eU.cjs} +1 -1
  17. package/dist/{actionItem-DNgoQB08.cjs → actionItem-CLwRbg4y.cjs} +1 -1
  18. package/dist/{actionItem-CjNacj0F.js → actionItem-DsZ4M1qS.js} +2 -2
  19. package/dist/{alarmLevelChart-DDFP_ADG.js → alarmLevelChart-9ZdAuQvY.js} +2 -2
  20. package/dist/{alarmLevelChart-CRL45xkr.cjs → alarmLevelChart-CyCmhAZl.cjs} +1 -1
  21. package/dist/{alertTable-DrUs1wUN.js → alertTable-BbsFIJQc.js} +2 -2
  22. package/dist/{alertTable-UvxQNZ2Y.cjs → alertTable-Bj90t5vD.cjs} +1 -1
  23. package/dist/{aliasObjectSelectorDemo-BGgcbyT-.cjs → aliasObjectSelectorDemo-DOtzALw2.cjs} +1 -1
  24. package/dist/{aliasObjectSelectorDemo-Bep18FrL.js → aliasObjectSelectorDemo-fW-a4DCV.js} +7 -7
  25. package/dist/{annualRainfallChart-BMuH6tsO.js → annualRainfallChart-BzzrCCJe.js} +2 -2
  26. package/dist/{annualRainfallChart-DDnaZZp0.cjs → annualRainfallChart-Dzx4SJpe.cjs} +1 -1
  27. package/dist/{aqi-CbyrPtO4.js → aqi-006rTnsK.js} +2 -2
  28. package/dist/{aqi-DjkOgiun.cjs → aqi-DJrhDnm8.cjs} +1 -1
  29. package/dist/{aqiIndass-C-DEsmZ4.js → aqiIndass-DLN5CDbq.js} +21 -21
  30. package/dist/{aqiIndass-C3mPUZP6.cjs → aqiIndass-DokEaddv.cjs} +1 -1
  31. package/dist/{areaDeformCurve-B-bUeLI-.cjs → areaDeformCurve-CAV4T1p6.cjs} +1 -1
  32. package/dist/{areaDeformCurve-D6in1BnQ.js → areaDeformCurve-Eb4dsvjI.js} +2 -2
  33. package/dist/{arrayCard-CAoU7DHK.cjs → arrayCard-BeHFZmCq.cjs} +1 -1
  34. package/dist/{arrayCard-CpzPkgA9.js → arrayCard-DujWUhYK.js} +2 -2
  35. package/dist/{audio-TkisK5FD.js → audio-CrY3aLMX.js} +2 -2
  36. package/dist/{audio-BrTfWQmo.cjs → audio-lDtmX9bz.cjs} +1 -1
  37. package/dist/{bar-CT6sCNW4.js → bar-CVPXbvtH.js} +10 -10
  38. package/dist/{bar-BZBOTnN4.cjs → bar-WVNHLoJ3.cjs} +1 -1
  39. package/dist/{bmp-DgcyTiV5.cjs → bmp-BUgmrbhZ.cjs} +1 -1
  40. package/dist/{bmp-Xsdyi9gr.js → bmp-Bw1KLZox.js} +2 -2
  41. package/dist/{box-DNKXXXYx.js → box-D3M4txCW.js} +23 -23
  42. package/dist/{box-DED4JT5G.cjs → box-cqCoRDny.cjs} +1 -1
  43. package/dist/{chartConfigPanel-CF-q-XUN.js → chartConfigPanel-BS-4fGEs.js} +1 -1
  44. package/dist/{chartConfigPanel-D1M21nDO.cjs → chartConfigPanel-CVjBfsPG.cjs} +1 -1
  45. package/dist/{circleBar-CaC8ntp-.js → circleBar-C2-5NbKx.js} +2 -2
  46. package/dist/{circleBar-m6J_QvzN.cjs → circleBar-DHFREWDZ.cjs} +1 -1
  47. package/dist/{clock-tPcek90B.js → clock-CbPolNJf.js} +2 -2
  48. package/dist/{clock-CnV36tpq.cjs → clock-DCLrJzaN.cjs} +1 -1
  49. package/dist/{clt-DoDENEcJ.cjs → clt-CpnBLyYn.cjs} +1 -1
  50. package/dist/{clt-DwoBhD_P.js → clt-EjSvDr2u.js} +15 -15
  51. package/dist/{cmc-Dld5UOW9.cjs → cmc-3E3UvBFP.cjs} +1 -1
  52. package/dist/{cmc-ObS3fWlL.js → cmc-BDDdRH_H.js} +25 -25
  53. package/dist/{cmp-Bp9FqBZV.cjs → cmp-DAzG9LwZ.cjs} +1 -1
  54. package/dist/{cmp-DEH1jzrG.js → cmp-_zlwmg1E.js} +2 -2
  55. package/dist/{conclusionCard-DXiFAJmo.cjs → conclusionCard-9zD6W6AF.cjs} +1 -1
  56. package/dist/{conclusionCard-CHFJIt7G.js → conclusionCard-b_f9juIB.js} +2 -2
  57. package/dist/{controlList-hWCbafkY.js → controlList-DFX97otG.js} +2 -2
  58. package/dist/{controlList-B2tV397i.cjs → controlList-DHG2jD51.cjs} +1 -1
  59. package/dist/{controlRecordList-DnhHr7kU.js → controlRecordList-B0oTZp28.js} +2 -2
  60. package/dist/{controlRecordList-uAmuCKjf.cjs → controlRecordList-kGbanAXa.cjs} +1 -1
  61. package/dist/{controlRecordListAPP-BpZmCMM-.js → controlRecordListAPP-BOukSyHq.js} +2 -2
  62. package/dist/{controlRecordListAPP-BpfPZW3b.cjs → controlRecordListAPP-gXYEcRA_.cjs} +1 -1
  63. package/dist/{crd-BQ7AFV1c.cjs → crd-BATQ1KFa.cjs} +1 -1
  64. package/dist/{crd-ChpWMXAm.js → crd-C_z8MNM0.js} +2 -2
  65. package/dist/{ctrBtn-PTITC7R8.cjs → ctrBtn-BnwZlZ5c.cjs} +1 -1
  66. package/dist/{ctrBtn-CmdQ3s7z.js → ctrBtn-DTyOVAVy.js} +11 -11
  67. package/dist/{ctrSet-Dv5i5ne5.js → ctrSet-BTnbgdd3.js} +7 -7
  68. package/dist/{ctrSet-CYqeDilm.cjs → ctrSet-BWr9dDIX.cjs} +1 -1
  69. package/dist/{ctrSwitch-C3NZcUxa.js → ctrSwitch-BH76ZhOi.js} +8 -8
  70. package/dist/{ctrSwitch-Byt4qKjt.cjs → ctrSwitch-CCdNwgtf.cjs} +1 -1
  71. package/dist/{dataManagement-BFIS0e4d.cjs → dataManagement-DEe2X-oe.cjs} +1 -1
  72. package/dist/{dataManagement-enhqxRgF.js → dataManagement-ju5aByQS.js} +2 -2
  73. package/dist/{dataReport-DLdB1ARI.js → dataReport-B5tUeLYL.js} +2 -2
  74. package/dist/{dataReport-vfCe0q9d.cjs → dataReport-DGdNGqNg.cjs} +1 -1
  75. package/dist/{dataTable-DFZrMHnF.js → dataTable-ByiR5jdH.js} +1 -1
  76. package/dist/{dataTable-DE3yOae0.cjs → dataTable-ChBv_YlP.cjs} +1 -1
  77. package/dist/{datetime-BK4xGaTM.js → datetime-CThnusEe.js} +2 -2
  78. package/dist/{datetime-DXTcE56I.cjs → datetime-DG6uMSUr.cjs} +1 -1
  79. package/dist/{deepClusterSlipSurface-BKFavDI5.cjs → deepClusterSlipSurface-8hEjAzBW.cjs} +1 -1
  80. package/dist/{deepClusterSlipSurface-D_PbxUdd.js → deepClusterSlipSurface-CLxfYGxD.js} +29 -29
  81. package/dist/{deepDataMatrix-avI-0mLw.js → deepDataMatrix-6Ny4cIe7.js} +21 -21
  82. package/dist/{deepDataMatrix-DzzK55Mc.cjs → deepDataMatrix-D5B1nu2J.cjs} +1 -1
  83. package/dist/{deepDisplacement3D-CbyatHpJ.js → deepDisplacement3D-BVjkYHfy.js} +2 -2
  84. package/dist/{deepDisplacement3D-DW0CW2ut.cjs → deepDisplacement3D-DCJ00L5m.cjs} +1 -1
  85. package/dist/{deepDisplacementChart-DY0lNJOz.js → deepDisplacementChart-Blzrj3dF.js} +40 -40
  86. package/dist/{deepDisplacementChart-Dm71dHpY.cjs → deepDisplacementChart-DdiaOR7t.cjs} +1 -1
  87. package/dist/{deepDisplacementChart-B7GDsSm7.js → deepDisplacementChart-Dvn76ypl.js} +22 -22
  88. package/dist/{deepDisplacementChart-DauJXxkW.cjs → deepDisplacementChart-pktiGXQI.cjs} +1 -1
  89. package/dist/{deepDisplacementView-RywcwybM.js → deepDisplacementView-DIwTwh_K.js} +1 -1
  90. package/dist/{deepDisplacementView-BJAAMyTP.cjs → deepDisplacementView-ZLKNGoIQ.cjs} +1 -1
  91. package/dist/{deepNodeTemperatureChart-Et7GEspn.js → deepNodeTemperatureChart-115sZmrU.js} +36 -36
  92. package/dist/{deepNodeTemperatureChart-FN14qWXP.cjs → deepNodeTemperatureChart-gDvvGuyq.cjs} +1 -1
  93. package/dist/{deepTangentAngleChart-m3r_mJg0.cjs → deepTangentAngleChart-DVSVhg5b.cjs} +1 -1
  94. package/dist/{deepTangentAngleChart-CEsc85Mi.js → deepTangentAngleChart-DmC2LGTU.js} +22 -22
  95. package/dist/{deepTemperatureField-jfV1EahT.cjs → deepTemperatureField-ClJsxAvt.cjs} +1 -1
  96. package/dist/{deepTemperatureField-Cr3c_t1T.js → deepTemperatureField-D6G_kQeJ.js} +32 -32
  97. package/dist/{deepTrendChart-D7IDGKBC.js → deepTrendChart-C53TU6F2.js} +34 -34
  98. package/dist/{deepTrendChart-DIyUa5qe.cjs → deepTrendChart-Drys7qZg.cjs} +1 -1
  99. package/dist/{deviceOnlineStatus--G66OLv8.cjs → deviceOnlineStatus-BnoXmtDj.cjs} +1 -1
  100. package/dist/{deviceOnlineStatus-DDo0caCc.js → deviceOnlineStatus-cZu_IljM.js} +2 -2
  101. package/dist/{deviceStatus-B0sBzHx9.cjs → deviceStatus-Bxqii2_U.cjs} +1 -1
  102. package/dist/{deviceStatus-cmxKruD-.js → deviceStatus-DcjQXNtS.js} +19 -19
  103. package/dist/{displacementDataTable-Bxs-LIOW.cjs → displacementDataTable-C3W_0L7c.cjs} +1 -1
  104. package/dist/{displacementDataTable-BwhylBbX.js → displacementDataTable-DlwZHsnk.js} +17 -17
  105. package/dist/{displacementTrajectoryChart-JJEGEVMc.cjs → displacementTrajectoryChart-C54ljhYo.cjs} +1 -1
  106. package/dist/{displacementTrajectoryChart-D3VcZ1qM.js → displacementTrajectoryChart-DCFPd8I8.js} +34 -34
  107. package/dist/{displacementTrendChart-BlIqd2IK.js → displacementTrendChart-Bwi9pIKg.js} +32 -32
  108. package/dist/{displacementTrendChart-GmxA4M6n.cjs → displacementTrendChart-C2UFFHy3.cjs} +1 -1
  109. package/dist/{dxf-JH5I0L5F.cjs → dxf-BXat6zT0.cjs} +1 -1
  110. package/dist/{dxf-r-iy1MWn.js → dxf-CvvsXRab.js} +2 -2
  111. package/dist/{dzc-KbkTkgzk.cjs → dzc-611sFAMA.cjs} +1 -1
  112. package/dist/{dzc-CMhN9l76.js → dzc-xIM9tlfM.js} +8 -8
  113. package/dist/{emergencyPlan-CR8HkDi4.js → emergencyPlan-BLfRn6UD.js} +3 -3
  114. package/dist/{emergencyPlan-FSdy0Ik5.cjs → emergencyPlan-DYckkWIF.cjs} +1 -1
  115. package/dist/{evn-D8kcAx_T.cjs → evn-BVP-ihLU.cjs} +1 -1
  116. package/dist/{evn-DGxcYjRA.js → evn-C5g9HTlT.js} +2 -2
  117. package/dist/{evolutionChart-K7H8KKIG.js → evolutionChart-CqCoGysK.js} +3 -3
  118. package/dist/{evolutionChart-CI2hDs5C.cjs → evolutionChart-DFOIeAnj.cjs} +1 -1
  119. package/dist/{fileViewer-Df0AU_z9.js → fileViewer-BGBuea6P.js} +2 -2
  120. package/dist/{fileViewer-DtIGy-zH.cjs → fileViewer-CdCgk5vi.cjs} +1 -1
  121. package/dist/{filterBar-DEfkfl04.cjs → filterBar-1LBu8CWi.cjs} +1 -1
  122. package/dist/{filterBar-BRDe-GgC.js → filterBar-CG1pnrgf.js} +2 -2
  123. package/dist/{fireCombustionCurve-DJXeynXa.js → fireCombustionCurve-DBLZItFG.js} +3 -3
  124. package/dist/{fireCombustionCurve-C8UGnEPC.cjs → fireCombustionCurve-DFGlWVK-.cjs} +1 -1
  125. package/dist/{fireFilterBar-CXiN-Jkv.js → fireFilterBar-55way8Kq.js} +2 -2
  126. package/dist/{fireFilterBar-iqgVdbgH.cjs → fireFilterBar-DmXRJrBH.cjs} +1 -1
  127. package/dist/{fireHistoryTable-CTIdqGk3.js → fireHistoryTable-6lMO644G.js} +2 -2
  128. package/dist/{fireHistoryTable-Dl4A1pRv.cjs → fireHistoryTable-CrOZPx1P.cjs} +1 -1
  129. package/dist/{gag-BVPZK4hG.js → gag-BRtB5Zyd.js} +2 -2
  130. package/dist/{gag-DQa6TEDv.cjs → gag-C8Q8kIfD.cjs} +1 -1
  131. package/dist/{gasStationList-BkzLZp4-.cjs → gasStationList-CuMupuAF.cjs} +1 -1
  132. package/dist/{gasStationList-NFyxin-H.js → gasStationList-Dh0HOgcE.js} +2 -2
  133. package/dist/{geo3dViewer-VRenmVKs.cjs → geo3dViewer-CxUsz_Fa.cjs} +1 -1
  134. package/dist/{geo3dViewer-BJpae_MX.js → geo3dViewer-ph_PeQy-.js} +3 -3
  135. package/dist/{glbModel-C96hRxP0.js → glbModel-HkdGjDju.js} +2 -2
  136. package/dist/{glbModel-i2X1L8LC.cjs → glbModel-keR5BhQS.cjs} +1 -1
  137. package/dist/{globalObjectSelector-DhbeX3bm.cjs → globalObjectSelector-BbyN1tdM.cjs} +1 -1
  138. package/dist/{globalObjectSelector-D09a0A2t.js → globalObjectSelector-C181O9oo.js} +43 -43
  139. package/dist/{gnssFilterBar-BX3mEKiT.cjs → gnssFilterBar-CLrEX2db.cjs} +1 -1
  140. package/dist/{gnssFilterBar-BHqE79Ri.js → gnssFilterBar-vcfVn7a6.js} +2 -2
  141. package/dist/{gnssHistoryTable-ZBfzhnlx.cjs → gnssHistoryTable-BpFJjWcy.cjs} +1 -1
  142. package/dist/{gnssHistoryTable-D9tglOkP.js → gnssHistoryTable-D0VkG9vT.js} +2 -2
  143. package/dist/{gnssMapView-B2rSxPml.cjs → gnssMapView-ChrUruFB.cjs} +2 -2
  144. package/dist/{gnssMapView-Bicnnr6P.js → gnssMapView-a4luVEYa.js} +4 -4
  145. package/dist/{gnssSectionProfile-BKnvQBHa.cjs → gnssSectionProfile-CoP2v7aY.cjs} +1 -1
  146. package/dist/{gnssSectionProfile-BfkjiI0i.js → gnssSectionProfile-DnHfVuhk.js} +2 -2
  147. package/dist/{gnssTimeSeriesChart-BTK4Qize.js → gnssTimeSeriesChart-B1NJ4cn0.js} +2 -2
  148. package/dist/{gnssTimeSeriesChart-Cj-151Zs.cjs → gnssTimeSeriesChart-DVAjY9eo.cjs} +1 -1
  149. package/dist/{gnssXYTrajectory-BgwA-1Fx.cjs → gnssXYTrajectory-CiFR9qoL.cjs} +1 -1
  150. package/dist/{gnssXYTrajectory-DZiGIgf5.js → gnssXYTrajectory-D_pCZ7Hd.js} +2 -2
  151. package/dist/{grd-DW4ve5k2.js → grd-2THwmH-B.js} +17 -17
  152. package/dist/{grd-DrRka55C.cjs → grd-CZT36wMZ.cjs} +1 -1
  153. package/dist/{grdIndass-CofZtTJe.cjs → grdIndass-CO9sMJwo.cjs} +1 -1
  154. package/dist/{grdIndass-CRZ9agT-.js → grdIndass-CjQCGgum.js} +10 -10
  155. package/dist/{grg-zv4YAkAu.js → grg-CDte_thi.js} +10 -10
  156. package/dist/{grg-Cugg5crY.cjs → grg-Cs7-r62k.cjs} +1 -1
  157. package/dist/{gridview-BjOw8zBf.cjs → gridview-BYOPPFAQ.cjs} +1 -1
  158. package/dist/{gridview-DRB1rG1L.js → gridview-DoFkoRJG.js} +2 -2
  159. package/dist/{groundwaterFilterBar-DyCL0fs9.js → groundwaterFilterBar-BPSFA1Lw.js} +2 -2
  160. package/dist/{groundwaterFilterBar-D4appJuv.cjs → groundwaterFilterBar-FCQgVbxJ.cjs} +1 -1
  161. package/dist/{groundwaterProfileChart-CDByowkP.cjs → groundwaterProfileChart-CZM2Ijqj.cjs} +2 -2
  162. package/dist/{groundwaterProfileChart-Bo_XCqyF.js → groundwaterProfileChart-CrKLzRsw.js} +3 -3
  163. package/dist/{groundwaterTimeCurve-Cj5qSKTI.cjs → groundwaterTimeCurve-BU92AmmI.cjs} +1 -1
  164. package/dist/{groundwaterTimeCurve-C0WRGZNY.js → groundwaterTimeCurve-Dy5QHMnD.js} +3 -3
  165. package/dist/{groupCard-JeKQg4FL.js → groupCard-ByiU2e9a.js} +2 -2
  166. package/dist/{groupCard-B7XW81Xq.cjs → groupCard-Bz4dzhtP.cjs} +1 -1
  167. package/dist/{headerBar-D5FXDHNR.js → headerBar-Bmugs0fE.js} +2 -2
  168. package/dist/{headerBar-BXNzoDYA.cjs → headerBar-DGQqoZZH.cjs} +1 -1
  169. package/dist/{history-D_NO9ojb.cjs → history-BNN6YYlw.cjs} +1 -1
  170. package/dist/{history-BDIdK3AY.js → history-CIAU9_hA.js} +12 -12
  171. package/dist/{index-D7PZNHF4.cjs → index-BdWR_FTA.cjs} +10 -10
  172. package/dist/{index-BHBE19E2.js → index-CCWU_se2.js} +2248 -2208
  173. package/dist/{insarDeformChart-wTnTF5NC.cjs → insarDeformChart-B6ad_kTg.cjs} +1 -1
  174. package/dist/{insarDeformChart-DuBYscAT.js → insarDeformChart-CpMWLFgM.js} +2 -2
  175. package/dist/{insarImageViewer-DGkic1Rj.cjs → insarImageViewer-CXkitdwR.cjs} +1 -1
  176. package/dist/{insarImageViewer-tPyDE815.js → insarImageViewer-Dwvau4-d.js} +2 -2
  177. package/dist/{kds-Bto_xGCo.cjs → kds-Bjks3GFb.cjs} +1 -1
  178. package/dist/{kds-Joeeniwr.js → kds-DrlduN0N.js} +21 -21
  179. package/dist/{kpiCard-D_8YToN_.cjs → kpiCard-CEPgU6Td.cjs} +1 -1
  180. package/dist/{kpiCard-B2MTndw-.js → kpiCard-CvTeFbgJ.js} +2 -2
  181. package/dist/{landslideMap-BSImmP3T.js → landslideMap-B5ecUy9T.js} +30 -30
  182. package/dist/{landslideMap-DbvJ2h3R.cjs → landslideMap-BBMdZRMN.cjs} +1 -1
  183. package/dist/{landslideWarning-DjgODoEd.js → landslideWarning-CMEvyHhr.js} +11 -11
  184. package/dist/{landslideWarning-CVvZS5-l.cjs → landslideWarning-CYLG3Oxj.cjs} +1 -1
  185. package/dist/{layerTabs-CT14C_oL.cjs → layerTabs-DstdlkUM.cjs} +1 -1
  186. package/dist/{layerTabs-C2qdit8f.js → layerTabs-K7SxTlw4.js} +2 -2
  187. package/dist/{leaflet-src-CsuGTXZi.js → leaflet-src-ClP2DPnn.js} +1 -1
  188. package/dist/{leaflet-src-BuDfd_hT.cjs → leaflet-src-DhrxkAwA.cjs} +1 -1
  189. package/dist/{lerc-5_flDPwM.js → lerc-CmVR8_Da.js} +2 -2
  190. package/dist/{lerc-BVRAhrgg.cjs → lerc-DA9nzmCS.cjs} +1 -1
  191. package/dist/{lin-Djc6HZCi.js → lin-Dm_oqUd8.js} +11 -11
  192. package/dist/{lin--Wc9Mzoq.cjs → lin-Dn6V4e5I.cjs} +1 -1
  193. package/dist/{linIndass-Bxs7wFnh.cjs → linIndass-BldY-1UZ.cjs} +1 -1
  194. package/dist/{linIndass-CQ2BZiY0.js → linIndass-CowqLuzl.js} +10 -10
  195. package/dist/{lst-CxLOKAzL.js → lst-Bu9POh4U.js} +2 -2
  196. package/dist/{lst-C-yxmy1r.cjs → lst-CPzaL4pE.cjs} +1 -1
  197. package/dist/{manualEntry-Dd9swkaL.cjs → manualEntry-D6HxT0e1.cjs} +1 -1
  198. package/dist/{manualEntry-DLL43b_K.js → manualEntry-DFPCiPZm.js} +2 -2
  199. package/dist/{mapBackground-CDGjjy8-.js → mapBackground-DNs_5l_N.js} +3 -3
  200. package/dist/{mapBackground-DNQRoaFb.cjs → mapBackground-DdNuu0qi.cjs} +1 -1
  201. package/dist/{mappingList-C9HUo2y9.cjs → mappingList-B2euTZM6.cjs} +1 -1
  202. package/dist/{mappingList-DrhZfKtH.js → mappingList-D9Ax3W4e.js} +2 -2
  203. package/dist/{markdownViewer-DIb7t2bx.js → markdownViewer-BCz-nS97.js} +2 -2
  204. package/dist/{markdownViewer-Bea8zl8q.cjs → markdownViewer-BlmkSj2F.cjs} +1 -1
  205. package/dist/{mix-control-modal-CaAkqkzX.js → mix-control-modal-DTiG49Lj.js} +7 -7
  206. package/dist/{mix-control-modal-Dh-NZ50w.cjs → mix-control-modal-DaSRoqVn.cjs} +1 -1
  207. package/dist/{mixGrid-DPdzqHke.js → mixGrid-BuBmT7GK.js} +2 -2
  208. package/dist/{mixGrid-DFuBeOy6.cjs → mixGrid-CM-obY4q.cjs} +1 -1
  209. package/dist/mixdashboards.cjs +1 -1
  210. package/dist/mixdashboards.css +1 -1
  211. package/dist/mixdashboards.js +1 -1
  212. package/dist/mixiotObjectListApi-434Mto0m.cjs +1 -0
  213. package/dist/{mixiotObjectListApi-CJsYvcG_.js → mixiotObjectListApi-ZWtORc3c.js} +37 -35
  214. package/dist/{mjpegCamera-BvlKwwDL.cjs → mjpegCamera-D3JM1GzZ.cjs} +1 -1
  215. package/dist/{mjpegCamera-C9PNl-r4.js → mjpegCamera-ye25efWW.js} +2 -2
  216. package/dist/{monitorAlert-LeeMIRjf.cjs → monitorAlert-CJ_pAHXP.cjs} +1 -1
  217. package/dist/{monitorAlert-vVcYtohz.js → monitorAlert-Clr3_BqZ.js} +14 -14
  218. package/dist/{monitorData-BtF_j2kd.cjs → monitorData-Biwb0h-A.cjs} +1 -1
  219. package/dist/{monitorData-CHhLhD4y.js → monitorData-nXGeoFVW.js} +9 -9
  220. package/dist/{monitorSpeedChart-BH_rITMD.cjs → monitorSpeedChart-B7FhH0Kk.cjs} +1 -1
  221. package/dist/{monitorSpeedChart-Dhchpe2h.js → monitorSpeedChart-CiS6TSfI.js} +1 -1
  222. package/dist/{mxa-CU0OUOdG.cjs → mxa-D5zEytKD.cjs} +1 -1
  223. package/dist/{mxa-B3DlA-Xs.js → mxa-Nv228pmQ.js} +20 -20
  224. package/dist/{myValue-AeGxHeE2.cjs → myValue-BmHQ_lRL.cjs} +1 -1
  225. package/dist/{myValue-DEbeO9Cb.js → myValue-CBsVyhrq.js} +2 -2
  226. package/dist/{myValueList-qDBbrqDv.js → myValueList-CNGkPgE3.js} +2 -2
  227. package/dist/{myValueList-EkbSpjf0.cjs → myValueList-F2JXq_cs.cjs} +1 -1
  228. package/dist/{objectList-B1Q5MJPW.cjs → objectList-B2AqFaoX.cjs} +1 -1
  229. package/dist/{objectList-DTHwnvxc.js → objectList-CacWdl7-.js} +3 -3
  230. package/dist/{objectListAPP-njF3tJUP.js → objectListAPP-B8ryIqee.js} +4 -4
  231. package/dist/{objectListAPP-CgPjYGiu.cjs → objectListAPP-oI7xgnNz.cjs} +1 -1
  232. package/dist/{percentBar-Dil8Vm3q.cjs → percentBar-BamhAckr.cjs} +1 -1
  233. package/dist/{percentBar-BAwdbKH8.js → percentBar-By4ErDLm.js} +15 -15
  234. package/dist/{photo-Bn0lWnis.js → photo-5bKR5PWJ.js} +2 -2
  235. package/dist/{photo-BlZ5X_9p.cjs → photo-Db9B9k7E.cjs} +1 -1
  236. package/dist/{pie-CG2cvCTM.js → pie-B8IcWNmh.js} +2 -2
  237. package/dist/{pie-CbOvGe0n.cjs → pie-Bo5fBYnv.cjs} +1 -1
  238. package/dist/{placeholder-jPC58i_u.cjs → placeholder-Ba-1pW5q.cjs} +1 -1
  239. package/dist/{placeholder-Bdop1bDv.js → placeholder-cEZ1VojS.js} +1 -1
  240. package/dist/{pressBtn-Cwp0-Mju.js → pressBtn-B90A4FTO.js} +7 -7
  241. package/dist/{pressBtn-C6mEzpGm.cjs → pressBtn-Bg9z2xjW.cjs} +1 -1
  242. package/dist/{processTable--PnPJzep.js → processTable-Dmf9PtKT.js} +2 -2
  243. package/dist/{processTable-CUrw-_tx.cjs → processTable-KmBhdxq9.cjs} +1 -1
  244. package/dist/{progressBar-CLBQrVhg.js → progressBar-CBvxzYpz.js} +2 -2
  245. package/dist/{progressBar-Dg1WRKUU.cjs → progressBar-CuR-TjJy.cjs} +1 -1
  246. package/dist/{progressCircle-DBXHBoZS.cjs → progressCircle-B7uJFhbg.cjs} +1 -1
  247. package/dist/{progressCircle-Dft4lI8s.js → progressCircle-CxF0elMR.js} +2 -2
  248. package/dist/{qrcode-BH8f2Hfp.cjs → qrcode-B5ohsZSk.cjs} +1 -1
  249. package/dist/{qrcode-B7VNzAkt.js → qrcode-Bj1iBOqf.js} +40 -31
  250. package/dist/{raceBar-Ck_RLw_X.js → raceBar-BM7aKngn.js} +2 -2
  251. package/dist/{raceBar-DZCr0eC-.cjs → raceBar-cbIKXdrY.cjs} +1 -1
  252. package/dist/{rad-C7ostpqi.js → rad-BxLSGBt5.js} +2 -2
  253. package/dist/{rad-C3kidKBD.cjs → rad-XuUgEqvp.cjs} +1 -1
  254. package/dist/{radarMapViewer-B8g9WmmH.cjs → radarMapViewer-CE3iOzHQ.cjs} +1 -1
  255. package/dist/{radarMapViewer-BxHWMhxf.js → radarMapViewer-Y2d-z-Xi.js} +2 -2
  256. package/dist/{rainfallFilterBar-G_3cep1I.cjs → rainfallFilterBar-5B9nOZMQ.cjs} +1 -1
  257. package/dist/{rainfallFilterBar-C6amyMsu.js → rainfallFilterBar-BQQ6cWWT.js} +2 -2
  258. package/dist/{rainfallTimeCurve-dOfq4IKr.js → rainfallTimeCurve-D7UHAW7B.js} +3 -3
  259. package/dist/{rainfallTimeCurve-Ce8eRvv6.cjs → rainfallTimeCurve-VUFDrlaJ.cjs} +1 -1
  260. package/dist/{rangeLin-GOVFLiyl.cjs → rangeLin-BCy_aU2O.cjs} +1 -1
  261. package/dist/{rangeLin-CXrCb7e3.js → rangeLin-CWkY4AVF.js} +21 -21
  262. package/dist/{realtimeEvolutionMap-VApbSWKk.cjs → realtimeEvolutionMap-CpOZ-K90.cjs} +1 -1
  263. package/dist/{realtimeEvolutionMap-CLhVGzzZ.js → realtimeEvolutionMap-midbOpQ_.js} +2 -2
  264. package/dist/{regionBar-DOkzOqR4.cjs → regionBar-BO8d6Gfr.cjs} +1 -1
  265. package/dist/{regionBar-CgCQBHYm.js → regionBar-ClY6Vcp0.js} +2 -2
  266. package/dist/{request-CsLYkQ1F.js → request-DHoyVWU-.js} +13 -13
  267. package/dist/{request-DBDym05o.cjs → request-Wvyc5KfO.cjs} +1 -1
  268. package/dist/{retainer1-D2ORoyPc.js → retainer1-C074kiSG.js} +3 -3
  269. package/dist/{retainer1-BihlkLkk.cjs → retainer1-fPoh6UWL.cjs} +1 -1
  270. package/dist/{retainer2-89gF8O00.js → retainer2-D26SOrnE.js} +3 -3
  271. package/dist/{retainer2-5-qgDYHt.cjs → retainer2-DQffbiOL.cjs} +1 -1
  272. package/dist/{retainerRecordList-ZukSm42U.cjs → retainerRecordList-17lNzhYY.cjs} +1 -1
  273. package/dist/{retainerRecordList-B7oZOPiz.js → retainerRecordList-CMrtXtg0.js} +2 -2
  274. package/dist/{retainerRecordListAPP-CJifqoYV.js → retainerRecordListAPP-BVdG5XNP.js} +3 -3
  275. package/dist/{retainerRecordListAPP-C3ghAm55.cjs → retainerRecordListAPP-Dv07T1sM.cjs} +1 -1
  276. package/dist/{ringTopN-DEWE8OKA.js → ringTopN-D8fLY5hp.js} +2 -2
  277. package/dist/{ringTopN-BKFTI8w3.cjs → ringTopN-DfEl45ch.cjs} +1 -1
  278. package/dist/{riskRegionTable-Dg-ZfEl1.cjs → riskRegionTable-DFj8c8Hv.cjs} +1 -1
  279. package/dist/{riskRegionTable-DDWPmzK4.js → riskRegionTable-YottkGcg.js} +13 -13
  280. package/dist/{sankey-CjCzdx5A.js → sankey-D-C9WSeH.js} +8 -8
  281. package/dist/{sankey-CVIFo2TP.cjs → sankey-D-fUhpIU.cjs} +1 -1
  282. package/dist/{scd-ExZtelyF.js → scd-CasvRFjo.js} +2 -2
  283. package/dist/{scd-D7vwm2So.cjs → scd-DNoPBk6l.cjs} +1 -1
  284. package/dist/{sideMenu-9YGvznYC.js → sideMenu-C0wdN7VA.js} +2 -2
  285. package/dist/{sideMenu-LL4XLBcW.cjs → sideMenu-CVxLfq_Q.cjs} +1 -1
  286. package/dist/{slopeStability-BeoNqhaA.cjs → slopeStability-B-YjvDTE.cjs} +1 -1
  287. package/dist/{slopeStability-BRVBekjo.js → slopeStability-B5mssi6B.js} +20 -20
  288. package/dist/{speedCurve-DJUY_EGs.js → speedCurve-BDW6iwb5.js} +2 -2
  289. package/dist/{speedCurve-DLuFWpeb.cjs → speedCurve-D_ZbiTc0.cjs} +1 -1
  290. package/dist/{stackedBar-W-rgbty6.cjs → stackedBar-CW8BzUQc.cjs} +1 -1
  291. package/dist/{stackedBar-DkjXvEyH.js → stackedBar-UfQPMmu_.js} +9 -9
  292. package/dist/{stressFilterBar-FmqkdIl5.js → stressFilterBar-B4qAx5bg.js} +2 -2
  293. package/dist/{stressFilterBar-D02NjLM9.cjs → stressFilterBar-Du1vnYaq.cjs} +1 -1
  294. package/dist/{stressTimeCurve-Ck194Rx4.js → stressTimeCurve-AlnfIJP8.js} +3 -3
  295. package/dist/{stressTimeCurve-CEU3JrfW.cjs → stressTimeCurve-D_Js7Slh.cjs} +1 -1
  296. package/dist/{swiper-CM54onRz.cjs → swiper-CkkB3IUt.cjs} +1 -1
  297. package/dist/{swiper-DGAjlGUa.js → swiper-Q7RLo5sT.js} +49 -51
  298. package/dist/{terminalConfigList-DmIncQe8.js → terminalConfigList-D_Ey_hOB.js} +2 -2
  299. package/dist/{terminalConfigList-hy2uUsJe.cjs → terminalConfigList-lG7Guswq.cjs} +1 -1
  300. package/dist/{terminalList-9qcAM4LG.js → terminalList-BiS8IqVU.js} +2 -2
  301. package/dist/{terminalList-C6DxUrb2.cjs → terminalList-DsQfZkLH.cjs} +1 -1
  302. package/dist/{terminalListAPP-Dl5MpCjB.js → terminalListAPP-C_oAW2DY.js} +3 -3
  303. package/dist/{terminalListAPP-RYLAuqiK.cjs → terminalListAPP-Die7Iis9.cjs} +1 -1
  304. package/dist/{textbox-GG4d1QIy.cjs → textbox-DtwW5kQK.cjs} +1 -1
  305. package/dist/{textbox-CHkPlSAX.js → textbox-M7oHdxop.js} +2 -2
  306. package/dist/{timeQueryBar-B_sNNLNx.cjs → timeQueryBar-BST1N_pA.cjs} +1 -1
  307. package/dist/{timeQueryBar-4KSmgROW.js → timeQueryBar-D72U8KfL.js} +1 -1
  308. package/dist/{timeSeries-C6jp_8BG.cjs → timeSeries-DdrD6BXI.cjs} +1 -1
  309. package/dist/{timeSeries-CgJ0SIKo.js → timeSeries-kOLJD8jS.js} +3 -3
  310. package/dist/{timeSeriesCurve-TMqcdmQk.js → timeSeriesCurve-B7jHBbab.js} +3 -3
  311. package/dist/{timeSeriesCurve-CH12QzSV.cjs → timeSeriesCurve-CemFc-kT.cjs} +1 -1
  312. package/dist/{toggleBtn-DQd4gNtX.cjs → toggleBtn-BVJD8hdP.cjs} +1 -1
  313. package/dist/{toggleBtn-4pgNSMG6.js → toggleBtn-l0gcVWhL.js} +2 -2
  314. package/dist/{trajectoryConfigPanel-BG3SSwn9.js → trajectoryConfigPanel-BvjQNU8d.js} +1 -1
  315. package/dist/{trajectoryConfigPanel-Bw1VrV-D.cjs → trajectoryConfigPanel-p9RwKXye.cjs} +1 -1
  316. package/dist/{trajectoryScatter-CEN_a_hP.js → trajectoryScatter-D0X0MuO_.js} +24 -24
  317. package/dist/{trajectoryScatter-YyQc-_lS.cjs → trajectoryScatter-DUF9rbQZ.cjs} +1 -1
  318. package/dist/{universalConfigPanel-DXs2cr1a.cjs → universalConfigPanel-Cuy_d2Fi.cjs} +1 -1
  319. package/dist/{universalConfigPanel-DM-AnPb9.js → universalConfigPanel-G_SwTzLS.js} +1 -1
  320. package/dist/{universalTable-zF3jltzT.cjs → universalTable-C6TQyu10.cjs} +1 -1
  321. package/dist/{universalTable-BqhsfcZp.js → universalTable-CLytqIJ-.js} +2 -2
  322. package/dist/{video-Dq1cVS0l.cjs → video-BuCsJa2J.cjs} +1 -1
  323. package/dist/{video-D1iN2V0C.js → video-CLp-qmhh.js} +2 -2
  324. package/dist/{videoMonitor-hkuvSmn4.js → videoMonitor-BHFy7nV7.js} +10 -10
  325. package/dist/{videoMonitor-B_1M-KcU.cjs → videoMonitor-DtASZV-Y.cjs} +1 -1
  326. package/dist/{vlu-0SrsCMT-.cjs → vlu-aDDyx47b.cjs} +1 -1
  327. package/dist/{vlu-K66RvuKO.js → vlu-dvnZmwrq.js} +2 -2
  328. package/dist/{warningOverview-BRKnU2qJ.js → warningOverview-BWNvhGEr.js} +3 -3
  329. package/dist/{warningOverview-DE4mZJtA.cjs → warningOverview-G5uze01-.cjs} +1 -1
  330. package/dist/{weather-DXSwe2wL.js → weather-B7dkVE6k.js} +2 -2
  331. package/dist/{weather-Cc-DzSlJ.cjs → weather-DOAZCxta.cjs} +1 -1
  332. package/dist/{windLin-BpJaU1Or.js → windLin-DbHtg5K4.js} +2 -2
  333. package/dist/{windLin-BWa_lMdL.cjs → windLin-k8OA6Yul.cjs} +1 -1
  334. package/package.json +1 -1
  335. package/dist/mixiotObjectListApi-DVYddjqi.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";var Ct=Object.defineProperty,At=Object.defineProperties;var Nt=Object.getOwnPropertyDescriptors;var Be=Object.getOwnPropertySymbols;var Vt=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable;var $e=(k,p,x)=>p in k?Ct(k,p,{enumerable:!0,configurable:!0,writable:!0,value:x}):k[p]=x,De=(k,p)=>{for(var x in p||(p={}))Vt.call(p,x)&&$e(k,x,p[x]);if(Be)for(var x of Be(p))Mt.call(p,x)&&$e(k,x,p[x]);return k},Le=(k,p)=>At(k,Nt(p));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const Rt=require("./BaseComponent-BHUHnLj-.cjs"),Bt=require("./index-D7PZNHF4.cjs"),Te=require("./ele-lin-icon-Dke_1AmT.cjs"),$t={class:"map-toolbar"},Dt={class:"toolbar-left"},Lt={class:"dropdown-wrapper"},Tt={class:"dropdown-wrapper"},Pt={class:"dropdown-wrapper"},It={class:"model-btn-wrapper"},Ot=["value","checked","onChange"],_t={class:"dropdown-item",style:{"border-bottom":"1px solid #eee","font-weight":"bold"}},Ft=["checked"],zt=["value","checked","onChange"],Ut={style:{padding:"8px","border-bottom":"1px solid #eee",background:"#f8fbff"}},Ht={style:{"max-height":"300px","overflow-y":"auto"}},Wt={class:"dropdown-item",style:{background:"#fafafa"}},jt=["checked"],Yt=["checked","onChange"],qt={class:"dropdown-item",style:{background:"#fafafa"}},Xt=["checked"],Gt=["checked","onChange"],Kt=["checked","onChange"],Zt=["width","height","viewBox"],Jt=["width","height","viewBox"],Qt=["width","height","viewBox"],en=["title","onClick"],tn=["title","onClick"],nn={key:0,class:"draw-toolbar"},ln={class:"draw-tip"},on={DEFAULT_ICON:Te.DEFAULT_ICON,ACTIVE_ICON:Te.ACTIVE_ICON,NAME_CN:"雷达地图查看器",NAME_EN:"Radar Map Viewer",ORDER:2,PLATFORM:["pc","screen"]},rn={bgColor:{value:"#0b1a31",type:"color",label:"背景色"},canvasWidth:{value:3e3,type:"number",label:"画布宽度"},canvasHeight:{value:2500,type:"number",label:"画布高度"},geologyModelUrl:{value:"",type:"string",label:"地质模型图片URL"},dtmModelUrl:{value:"",type:"string",label:"DTM面图片URL"},uavModelUrl:{value:"",type:"string",label:"无人机地图URL"},linkChannel:{value:"radarMonitor",type:"select",label:"联动频道",options:[{label:"雷达监测",value:"radarMonitor"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},an=[{name:"雷达1(北)",fv:"",object_id:"",color:"#409EFF",lng:"106.7120",lat:"26.5790",elevation:"1520",region:"南帮",x:1500,y:200,angle:180,targetSide:"bottom"},{name:"雷达2(东)",fv:"",object_id:"",color:"#E6A23C",lng:"106.7180",lat:"26.5810",elevation:"1480",region:"西帮",x:2650,y:1250,angle:270,targetSide:"left"},{name:"雷达3(南)",fv:"",object_id:"",color:"#67C23A",lng:"106.7120",lat:"26.5840",elevation:"1500",region:"北帮",x:1500,y:2300,angle:0,targetSide:"top"},{name:"雷达4(西)",fv:"",object_id:"",color:"#909399",lng:"106.7060",lat:"26.5810",elevation:"1460",region:"东帮",x:350,y:1250,angle:90,targetSide:"right"}],sn=["name","fv","object_id","color","lng","lat","elevation","region","x","y","angle","targetSide"],cn=["mosaic"],un={source:"mosaic"},dn={DEFAULT:on,OPTIONS:rn,DATA:an,PARAMS:sn,SOURCE:cn,COMMON:un},gn=e.defineComponent(Le(De({},dn),{__name:"radarMapViewer",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(k){const p=k;class x extends Rt.BaseComponent{extractStyles(){var i,r,a,v,f,g,d,h;const{options:t}=this.props.conf,l=((i=t==null?void 0:t.linkChannel)==null?void 0:i.value)||"radarMonitor",o=((r=t==null?void 0:t.customChannel)==null?void 0:r.value)||"";return{bgColor:((a=t==null?void 0:t.bgColor)==null?void 0:a.value)||"#0b1a31",canvasWidth:((v=t==null?void 0:t.canvasWidth)==null?void 0:v.value)||3e3,canvasHeight:((f=t==null?void 0:t.canvasHeight)==null?void 0:f.value)||2500,geologyModelUrl:((g=t==null?void 0:t.geologyModelUrl)==null?void 0:g.value)||"",dtmModelUrl:((d=t==null?void 0:t.dtmModelUrl)==null?void 0:d.value)||"",uavModelUrl:((h=t==null?void 0:t.uavModelUrl)==null?void 0:h.value)||"",linkChannel:l==="custom"&&o?o:l}}onLinkEvent(t){Et(t)}}const E=new x(p,"radarMapViewer");E.setupLifecycle();const m=E.getStyle(),c=1500,u=1250,Pe=["#F57676","#FFA500","#E6A23C","#66B1FF","#71C446"],D=[{w:2200,h:1600},{w:1900,h:1400},{w:1600,h:1200},{w:1300,h:1e3},{w:1e3,h:800}],Ie=[{id:"R1",name:"雷达1(北)",region:"南帮",x:c,y:u-1050,angle:180,targetSide:"bottom",isOnline:!0},{id:"R2",name:"雷达2(东)",region:"西帮",x:c+1150,y:u,angle:270,targetSide:"left",isOnline:!0},{id:"R3",name:"雷达3(南)",region:"北帮",x:c,y:u+1050,angle:0,targetSide:"top",isOnline:!0},{id:"R4",name:"雷达4(西)",region:"东帮",x:c-1150,y:u,angle:90,targetSide:"right",isOnline:!1}],Oe=()=>{var t;const n=(t=p.conf)==null?void 0:t.data;return!Array.isArray(n)||n.length===0?Ie:n.map((l,o)=>({id:l.object_id||`R${o+1}`,name:l.name||`雷达${o+1}`,region:l.region||"",x:Number(l.x)||c,y:Number(l.y)||u,angle:Number(l.angle)||0,targetSide:l.targetSide||"bottom",isOnline:l.value!==void 0?!!l.value:!0}))},C=e.computed(()=>Oe()),y=e.ref(null),F=e.ref(null),ce=e.ref(null),W=e.ref(null),X=e.ref(null),ue=e.ref(null),de=e.ref(null),ge=e.ref(null),ve=e.ref(null),z=e.ref({top:"0px",left:"0px",minWidth:"0px"}),S=e.ref(.6),w=e.reactive({x:-300,y:-200}),G=e.ref([]),fe=e.ref([]),T=e.ref(new Set),B=e.ref(null),s=e.reactive({isDrawing:!1,mode:"surface",surfacePoints:[],mixedShapes:[],cursorPos:null,dragStart:null,isDragging:!1});let te=!1,me=0,he=0;const ne=e.computed(()=>["全部",...[...new Set(C.value.map(t=>t.region).filter(Boolean))]]),le=["区域1","区域2","区域3"],oe=["监测线1","监测线2","监测线3"],_e=[{id:"geology",label:"地质模型"},{id:"dtm",label:"DTM面"},{id:"uav",label:"无人机地图"}],L=e.ref(null),b=e.ref([]),A=e.ref([]),P=e.ref([]),I=e.ref([]),N=e.ref(["geology"]),$=e.ref(""),j=e.ref(1),K=e.ref("2025-10-10T13:22"),Z=e.ref("2026-01-18T00:00"),Fe=e.computed(()=>{const n=b.value.filter(t=>t!=="全部");return n.length?b.value.includes("全部")?"已选全部":n.length<=1?n[0]:`已选(${n.length})`:"选择区域"}),pe=e.computed(()=>{const n=b.value.filter(t=>t!=="全部");return!n.length||b.value.includes("全部")?C.value:C.value.filter(t=>n.includes(t.region))}),ze=e.computed(()=>{const n=pe.value.map(t=>t.name);return n.length>0&&n.every(t=>A.value.includes(t))}),Ue=e.computed(()=>{const n=A.value.filter(t=>t!=="全部");return n.length?A.value.includes("全部")?"已选全部":n.length<=1?n[0]:`已选(${n.length})`:"选择设备"}),He=e.computed(()=>{const n=P.value.length+I.value.length;return n===0?"选择/搜索虚拟位置":`已选(${n})`}),We=e.computed(()=>{if(!N.value.length)return"请选择模型";const t={geology:"地质模型",dtm:"DTM面",uav:"无人机地图"}[N.value[0]];return N.value.length>1?t+"...":t}),je={region:ue,radar:de,virt:ge,model:ve},J=n=>{var l;if(L.value===n){L.value=null;return}const t=(l=je[n])==null?void 0:l.value;if(t){const o=t.getBoundingClientRect();n==="model"?z.value={top:o.bottom+2+"px",left:"auto",right:window.innerWidth-o.right+"px",minWidth:o.width+"px"}:z.value={top:o.bottom+2+"px",left:o.left+"px",right:"auto",minWidth:o.width+"px"}}L.value=n},be=n=>{const t=n.target;t!=null&&t.closest(".tp-dropdown")||t!=null&&t.closest(".dropdown-wrapper")||t!=null&&t.closest(".model-btn-wrapper")||(L.value=null)},Ye=(n,t)=>{const l=ne.value.filter(o=>o!=="全部");if(n==="全部")b.value=t?[...ne.value]:[];else{let o=b.value.filter(i=>i!=="全部");t?o.includes(n)||o.push(n):o=o.filter(i=>i!==n),l.every(i=>o.includes(i))&&(o=["全部",...l]),b.value=o}U()},we=(n,t)=>{const l=C.value.map(o=>o.name);if(n==="全部")A.value=t?["全部",...l]:[];else{let o=A.value.filter(i=>i!=="全部");if(t){o.includes(n)||o.push(n);const i=C.value.find(r=>r.name===n);i&&!b.value.includes(i.region)&&(b.value=[...b.value,i.region])}else o=o.filter(i=>i!==n);l.every(i=>o.includes(i))&&(o=["全部",...l]),A.value=o}U()},qe=n=>{P.value=n?[...le]:[],U()},Xe=(n,t)=>{let l=[...P.value];t?l.includes(n)||l.push(n):l=l.filter(o=>o!==n),P.value=l,U()},Ge=n=>{I.value=n?[...oe]:[],U()},Ke=(n,t)=>{let l=[...I.value];t?l.includes(n)||l.push(n):l=l.filter(o=>o!==n),I.value=l,U()},Ze=(n,t)=>{t?N.value.includes(n)||N.value.push(n):N.value=N.value.filter(l=>l!==n),Je()},Je=()=>{const n=F.value;if(!n)return;n.querySelectorAll(".model-overlay").forEach(o=>o.remove());const t={geology:m.value.geologyModelUrl,dtm:m.value.dtmModelUrl,uav:m.value.uavModelUrl};let l=!1;if(N.value.forEach(o=>{const i=t[o];if(i){l=!0;const r=document.createElement("img");r.className="model-overlay",r.src=i,r.style.cssText="position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;pointer-events:none;z-index:2;opacity:0.6;",n.insertBefore(r,n.firstChild)}}),l)n.style.filter="none";else{let o="";N.value.includes("uav")&&(o+="saturate(1.5) contrast(1.2) "),N.value.includes("dtm")&&(o+="brightness(1.1) "),n.style.filter=o.trim()||"none"}},re=n=>{j.value=n,E.publish({type:"timeRangeChange",days:n,start:K.value,end:Z.value})},ye=()=>{j.value=0,E.publish({type:"timeRangeChange",days:0,start:K.value,end:Z.value})},Qe=()=>{Ce("point")},Se=n=>{const t=b.value.filter(o=>o!=="全部"),l=A.value.filter(o=>o!=="全部");return!(t.length>0&&!t.includes(n.region)||l.length>0&&!l.includes(n.name))},U=()=>{const n=b.value.filter(l=>l!=="全部"),t=A.value.filter(l=>l!=="全部");if(T.value.clear(),C.value.forEach(l=>{if(!l.isOnline)return;let o=!0;n.length>0&&!n.includes(l.region)&&(o=!1),t.length>0&&!t.includes(l.name)&&(o=!1),o&&T.value.add(l.id)}),et(n),n.length===1){const l=C.value.find(o=>o.region===n[0]);l&&Ee(l)}t.length===1?E.publish({type:"regionFilter",regions:[],radars:[t[0]]}):n.length===1?E.publish({type:"regionFilter",regions:[n[0]],radars:[]}):E.publish({type:"regionFilter",regions:[],radars:[]})},et=n=>{const t=W.value;if(!t||(t.querySelectorAll(".region-highlight").forEach(i=>i.remove()),n.length===0||n.includes("全部")))return;const l="http://www.w3.org/2000/svg",o={北帮:{x:600,y:0,w:1800,h:600},南帮:{x:600,y:1900,w:1800,h:600},东帮:{x:2400,y:600,w:600,h:1300},西帮:{x:0,y:600,w:600,h:1300}};n.forEach(i=>{const r=o[i];if(!r)return;const a=document.createElementNS(l,"rect");a.setAttribute("x",String(r.x)),a.setAttribute("y",String(r.y)),a.setAttribute("width",String(r.w)),a.setAttribute("height",String(r.h)),a.setAttribute("fill","rgba(255, 255, 0, 0.15)"),a.setAttribute("stroke","rgba(255, 255, 0, 0.7)"),a.setAttribute("stroke-width","3"),a.setAttribute("class","region-highlight"),t.appendChild(a)})},tt=e.computed(()=>{const n=b.value.filter(a=>a!=="全部"),t=A.value.filter(a=>a!=="全部"),l=P.value.map(a=>a.replace("区域","")),o=I.value.map(a=>a.replace("监测线","")),i=[...new Set([...l,...o])];let r=fe.value;return B.value?r.filter(a=>a.radarId===B.value):r.filter(a=>!(n.length>0&&!n.includes(a.region)||t.length>0&&!t.includes(a.radarName)||i.length>0&&!i.includes(a.surfaceId)))}),nt=e.computed(()=>s.mode==="surface"?"【面模式】左键点击添加节点,右键闭合区域":"【点模式】左键点击选点,左键拖拽画线,右键结束"),lt=n=>n>=8?0:n>=5?1:n>=3?2:n>=2?3:4,ot=n=>({left:n.x-20+"px",top:n.y-20+"px"}),rt=n=>({left:n.x-1200+"px",top:n.y-2e3+"px",transform:`rotate(${n.angle}deg)`}),at=n=>T.value.has(n),it=n=>{const t=!B.value||n.radarId===B.value;return{left:n.x+"px",top:n.y+"px",backgroundColor:Pe[n.alarmIdx],opacity:t?1:.05,transform:t&&B.value?"scale(1.5)":"scale(1)",zIndex:t?100:1}},ke=()=>{const n=ce.value;if(!n)return;n.innerHTML="";const t="http://www.w3.org/2000/svg",l=["#409EFF","#E6A23C","#F56C6C","#67C23A","#909399"],o=[4,2,2,2,2],i=[.3,.5,.5,.5,.3];D.forEach((f,g)=>{const d=document.createElementNS(t,"rect");d.setAttribute("x",String(c-f.w/2)),d.setAttribute("y",String(u-f.h/2)),d.setAttribute("width",String(f.w)),d.setAttribute("height",String(f.h)),d.setAttribute("fill","none"),d.setAttribute("stroke",l[g]),d.setAttribute("stroke-width",String(o[g])),d.setAttribute("opacity",String(i[g])),n.appendChild(d)});const r=D[0],a=D[4];[[c-r.w/2,u-r.h/2,c-a.w/2,u-a.h/2],[c+r.w/2,u-r.h/2,c+a.w/2,u-a.h/2],[c+r.w/2,u+r.h/2,c+a.w/2,u+a.h/2],[c-r.w/2,u+r.h/2,c-a.w/2,u+a.h/2]].forEach(([f,g,d,h])=>{const V=document.createElementNS(t,"line");V.setAttribute("x1",String(f)),V.setAttribute("y1",String(g)),V.setAttribute("x2",String(d)),V.setAttribute("y2",String(h)),V.setAttribute("stroke","#409EFF"),V.setAttribute("stroke-width","1"),V.setAttribute("opacity","0.2"),n.appendChild(V)})},xe=()=>{const n=[],t=[D[0],D[1],D[2],D[3]];C.value.forEach(l=>{for(let o=0;o<3;o++){const i=t[o],r=t[o+1],a=String(o+1),v=3+Math.floor(Math.random()*2);for(let f=1;f<=v;f++){const g=`${l.id}-S${a}-P${f}`,d=Math.random(),h=i.w+(r.w-i.w)*d,V=i.h+(r.h-i.h)*d;let Y,q;if(l.targetSide==="bottom"){const M=h*.8;Y=c-M/2+Math.random()*M;const R=u+i.h/2,_=u+r.h/2;q=R+(_-R)*d+(Math.random()-.5)*15}else if(l.targetSide==="top"){const M=h*.8;Y=c-M/2+Math.random()*M;const R=u-i.h/2,_=u-r.h/2;q=R+(_-R)*d+(Math.random()-.5)*15}else if(l.targetSide==="left"){const M=V*.8;q=u-M/2+Math.random()*M;const R=c-i.w/2,_=c-r.w/2;Y=R+(_-R)*d+(Math.random()-.5)*15}else{const M=V*.8;q=u-M/2+Math.random()*M;const R=c+i.w/2,_=c+r.w/2;Y=R+(_-R)*d+(Math.random()-.5)*15}const ee=Math.random();let O;ee<.05?O=8+Math.random()*4:ee<.15?O=5+Math.random()*3:ee<.35?O=3+Math.random()*2:ee<.6?O=2+Math.random()*1:O=.1+Math.random()*1.9,n.push({id:g,x:Y,y:q,radarId:l.id,radarName:l.name,region:l.region,surfaceId:a,alarmIdx:lt(O),speed:O.toFixed(2),deviceId:`${l.name}-点${f}`,isOnline:l.isOnline})}}}),fe.value=n},H=()=>{const n=F.value;n&&(n.style.width=m.value.canvasWidth+"px",n.style.height=m.value.canvasHeight+"px",n.style.transform=`translate(${w.x}px, ${w.y}px) scale(${S.value})`)},st=n=>{if(n.button===0){if(s.isDrawing){bt(n);return}te=!0,me=n.clientX-w.x,he=n.clientY-w.y,y.value&&(y.value.style.cursor="grabbing")}},ct=n=>{if(s.isDrawing){s.cursorPos=ae(n),Q();return}te&&(w.x=n.clientX-me,w.y=n.clientY-he,H())},ut=n=>{if(s.isDrawing&&s.mode!=="surface"){wt(n);return}te=!1,y.value&&(y.value.style.cursor=s.isDrawing?"crosshair":"grab")},dt=n=>{s.isDrawing&&Ne()},gt=n=>{const t=y.value;if(!t)return;const l=Math.min(Math.max(.2,S.value+n.deltaY*-.0012),3.5),o=t.getBoundingClientRect(),i=n.clientX-o.left,r=n.clientY-o.top,a=l/S.value;w.x=i-(i-w.x)*a,w.y=r-(r-w.y)*a,S.value=l,H()},ae=n=>{const t=F.value.getBoundingClientRect();return{x:(n.clientX-t.left)/S.value,y:(n.clientY-t.top)/S.value}},vt=n=>{B.value=B.value===n.id?null:n.id,T.value.clear(),B.value?(T.value.add(n.id),Ee(n),ht(n)):(C.value.filter(t=>t.isOnline).forEach(t=>T.value.add(t.id)),mt(),ft()),E.publish({type:"regionFilter",regions:B.value?[n.region]:[],radars:B.value?[n.name]:[]})},Ee=n=>{const t=y.value,l=F.value;if(!t||!l)return;let o=n.x,i=n.y;n.targetSide==="bottom"?i+=600:n.targetSide==="top"?i-=600:n.targetSide==="left"?o-=600:n.targetSide==="right"&&(o+=600),S.value=.9,w.x=t.clientWidth/2-o*S.value,w.y=t.clientHeight/2-i*S.value,l.style.transition="transform 0.6s cubic-bezier(0.2, 0, 0.2, 1)",H(),setTimeout(()=>{l&&(l.style.transition="none")},650)},ft=()=>{const n=F.value;S.value=.6,w.x=-300,w.y=-200,n?(n.style.transition="transform 0.6s cubic-bezier(0.2, 0, 0.2, 1)",H(),setTimeout(()=>{n&&(n.style.transition="none")},650)):H()},mt=()=>{W.value&&(W.value.innerHTML="")},ht=n=>{const t=W.value;if(!t)return;t.innerHTML="";const l="http://www.w3.org/2000/svg",o=D.slice(0,4);for(let i=0;i<3;i++){const r=o[i],a=o[i+1];let v="",f=0,g=0;n.targetSide==="bottom"?(v=[`${c-r.w/2},${u+r.h/2}`,`${c+r.w/2},${u+r.h/2}`,`${c+a.w/2},${u+a.h/2}`,`${c-a.w/2},${u+a.h/2}`].join(" "),f=c,g=u+a.h/2+(r.h/2-a.h/2)/2):n.targetSide==="top"?(v=[`${c-r.w/2},${u-r.h/2}`,`${c+r.w/2},${u-r.h/2}`,`${c+a.w/2},${u-a.h/2}`,`${c-a.w/2},${u-a.h/2}`].join(" "),f=c,g=u-a.h/2-(r.h/2-a.h/2)/2):n.targetSide==="left"?(v=[`${c-r.w/2},${u-r.h/2}`,`${c-r.w/2},${u+r.h/2}`,`${c-a.w/2},${u+a.h/2}`,`${c-a.w/2},${u-a.h/2}`].join(" "),f=c-a.w/2-(r.w/2-a.w/2)/2,g=u):(v=[`${c+r.w/2},${u-r.h/2}`,`${c+r.w/2},${u+r.h/2}`,`${c+a.w/2},${u+a.h/2}`,`${c+a.w/2},${u-a.h/2}`].join(" "),f=c+a.w/2+(r.w/2-a.w/2)/2,g=u);const d=document.createElementNS(l,"polygon");d.setAttribute("points",v),d.setAttribute("fill","rgba(64,158,255,0.25)"),d.setAttribute("stroke","rgba(64,158,255,0.8)"),d.setAttribute("stroke-width","2"),t.appendChild(d);const h=document.createElementNS(l,"text");h.setAttribute("x",String(f)),h.setAttribute("y",String(g)),h.setAttribute("text-anchor","middle"),h.setAttribute("dominant-baseline","middle"),h.setAttribute("fill","#fff"),h.setAttribute("font-size","24"),h.setAttribute("font-weight","bold"),h.style.pointerEvents="none",h.textContent=`区域 ${i+1}`,t.appendChild(h)}},Ce=n=>{s.isDrawing=!0,s.mode=n,s.surfacePoints=[],s.mixedShapes=[],s.cursorPos=null,s.dragStart=null,s.isDragging=!1,y.value&&(y.value.style.cursor="crosshair"),Ae()},pt=()=>{s.isDrawing=!1,y.value&&(y.value.style.cursor="grab"),s.dragStart=null},Ae=()=>{X.value&&(X.value.innerHTML="")},bt=n=>{const t=ae(n);s.mode==="surface"?(s.surfacePoints.push(t),Q()):(s.dragStart=t,s.isDragging=!0)},wt=n=>{if(s.mode==="surface"||!s.dragStart)return;const t=ae(n),l=t.x-s.dragStart.x,o=t.y-s.dragStart.y;Math.sqrt(l*l+o*o)<5?s.mixedShapes.push({type:"point",x:s.dragStart.x,y:s.dragStart.y}):s.mixedShapes.push({type:"line",x1:s.dragStart.x,y1:s.dragStart.y,x2:t.x,y2:t.y}),s.isDragging=!1,s.dragStart=null,Q()},Ne=()=>{if(!s.isDrawing)return;const n=s.mode==="surface"&&s.surfacePoints.length>=3,t=s.mode!=="surface"&&s.mixedShapes.length>0;if(!n&&!t){ie();return}s.isDrawing=!1,y.value&&(y.value.style.cursor="grab"),s.cursorPos=null,Q(!0),E.publish({type:"customAreaComplete"})},yt=()=>Ne(),ie=()=>{pt(),Ae(),E.publish({type:"customAreaCancel"})},Q=(n=!1)=>{const t=X.value;if(!t)return;t.innerHTML="";const l="http://www.w3.org/2000/svg";if(s.mode==="surface"){if(s.surfacePoints.length>0){let o=`M ${s.surfacePoints[0].x} ${s.surfacePoints[0].y}`;for(let r=1;r<s.surfacePoints.length;r++)o+=` L ${s.surfacePoints[r].x} ${s.surfacePoints[r].y}`;!n&&s.cursorPos&&(o+=` L ${s.cursorPos.x} ${s.cursorPos.y}`),n&&(o+=" Z");const i=document.createElementNS(l,"path");i.setAttribute("d",o),i.setAttribute("fill","rgba(152,251,152,0.4)"),i.setAttribute("stroke","#333"),i.setAttribute("stroke-width","1.5"),i.setAttribute("stroke-dasharray","5,5"),t.appendChild(i),s.surfacePoints.forEach(r=>se(t,r.x,r.y,"#333"))}!n&&s.cursorPos&&St(t,s.cursorPos.x,s.cursorPos.y)}else s.mixedShapes.forEach(o=>{o.type==="point"?kt(t,o.x,o.y):Ve(t,o.x1,o.y1,o.x2,o.y2,!1)}),s.isDragging&&s.dragStart&&s.cursorPos&&Ve(t,s.dragStart.x,s.dragStart.y,s.cursorPos.x,s.cursorPos.y,!0)},se=(n,t,l,o)=>{const i=document.createElementNS("http://www.w3.org/2000/svg","circle");i.setAttribute("cx",String(t)),i.setAttribute("cy",String(l)),i.setAttribute("r",String(4/S.value)),i.setAttribute("fill","#fff"),i.setAttribute("stroke",o),n.appendChild(i)},St=(n,t,l)=>{const o="http://www.w3.org/2000/svg";[[t,l-5e3,t,l+5e3],[t-5e3,l,t+5e3,l]].forEach(([r,a,v,f])=>{const g=document.createElementNS(o,"line");g.setAttribute("x1",String(r)),g.setAttribute("y1",String(a)),g.setAttribute("x2",String(v)),g.setAttribute("y2",String(f)),g.setAttribute("stroke","#ffffff"),g.setAttribute("stroke-width","2"),g.setAttribute("stroke-dasharray","8,4"),g.style.filter="drop-shadow(0 0 2px rgba(0,0,0,0.8))",n.appendChild(g)})},kt=(n,t,l)=>{const o="http://www.w3.org/2000/svg",i=10/S.value,r=document.createElementNS(o,"circle");r.setAttribute("cx",String(t)),r.setAttribute("cy",String(l)),r.setAttribute("r",String(i)),r.setAttribute("fill","rgba(230,162,60,0.3)"),r.setAttribute("stroke","#E6A23C"),n.appendChild(r);const a=document.createElementNS(o,"circle");a.setAttribute("cx",String(t)),a.setAttribute("cy",String(l)),a.setAttribute("r",String(4/S.value)),a.setAttribute("fill","#E6A23C"),n.appendChild(a)},Ve=(n,t,l,o,i,r)=>{const v=document.createElementNS("http://www.w3.org/2000/svg","line");v.setAttribute("x1",String(t)),v.setAttribute("y1",String(l)),v.setAttribute("x2",String(o)),v.setAttribute("y2",String(i)),v.setAttribute("stroke","#E6A23C"),v.setAttribute("stroke-width","3"),r&&v.setAttribute("stroke-dasharray","5,5"),n.appendChild(v),se(n,t,l,"#E6A23C"),se(n,o,i,"#E6A23C")},xt=n=>{E.publish({type:"openAnalysis",deviceId:n.id,region:n.region})},Et=n=>{const{payload:t}=n;if(t.type==="customArea"){t.action==="start"?Ce(t.mode||"surface"):t.action==="stop"&&ie();return}},Me=n=>ct(n),Re=n=>ut(n);return e.onMounted(()=>{window.addEventListener("mousemove",Me),window.addEventListener("mouseup",Re),window.addEventListener("click",be),G.value=C.value;const n=C.value.filter(l=>l.isOnline);A.value=n.map(l=>l.name);const t=new Set(n.map(l=>l.region));b.value=Array.from(t),n.forEach(l=>T.value.add(l.id)),e.nextTick(()=>{ke(),xe(),H()})}),e.onUnmounted(()=>{window.removeEventListener("mousemove",Me),window.removeEventListener("mouseup",Re),window.removeEventListener("click",be)}),e.watch(()=>p.conf,()=>{E.init(),G.value=C.value,e.nextTick(()=>{ke(),xe()})},{deep:!0}),(n,t)=>(e.openBlock(),e.createElementBlock("div",{class:"radar-map-wrapper",style:e.normalizeStyle({background:e.unref(m).bgColor})},[e.createElementVNode("div",$t,[e.createElementVNode("div",Dt,[e.createElementVNode("div",Lt,[e.createElementVNode("button",{ref_key:"regionBtnRef",ref:ue,class:"tb-btn",onClick:t[0]||(t[0]=e.withModifiers(l=>J("region"),["stop"]))},[e.createElementVNode("span",null,e.toDisplayString(Fe.value),1),t[17]||(t[17]=e.createTextVNode(" ▼ ",-1))],512)]),e.createElementVNode("div",Tt,[e.createElementVNode("button",{ref_key:"radarBtnRef",ref:de,class:"tb-btn",onClick:t[1]||(t[1]=e.withModifiers(l=>J("radar"),["stop"]))},[e.createElementVNode("span",null,e.toDisplayString(Ue.value),1),t[18]||(t[18]=e.createTextVNode(" ▼ ",-1))],512)]),e.createElementVNode("div",Pt,[e.createElementVNode("button",{ref_key:"virtBtnRef",ref:ge,class:"tb-btn",onClick:t[2]||(t[2]=e.withModifiers(l=>J("virt"),["stop"]))},[e.createElementVNode("span",null,e.toDisplayString(He.value),1),t[19]||(t[19]=e.createTextVNode(" ▼ ",-1))],512)]),t[20]||(t[20]=e.createElementVNode("div",{class:"divider-v"},null,-1)),e.createElementVNode("button",{class:e.normalizeClass(["tb-btn",{active:j.value===1}]),onClick:t[3]||(t[3]=l=>re(1))},"一天内",2),e.createElementVNode("button",{class:e.normalizeClass(["tb-btn",{active:j.value===7}]),onClick:t[4]||(t[4]=l=>re(7))},"一周内",2),e.createElementVNode("button",{class:e.normalizeClass(["tb-btn",{active:j.value===30}]),onClick:t[5]||(t[5]=l=>re(30))},"一个月内",2),t[21]||(t[21]=e.createElementVNode("span",{class:"time-label"},"时间:",-1)),e.withDirectives(e.createElementVNode("input",{type:"datetime-local","onUpdate:modelValue":t[6]||(t[6]=l=>K.value=l),class:"tb-btn time-input",onChange:ye},null,544),[[e.vModelText,K.value]]),t[22]||(t[22]=e.createElementVNode("span",{class:"time-label"},"至",-1)),e.withDirectives(e.createElementVNode("input",{type:"datetime-local","onUpdate:modelValue":t[7]||(t[7]=l=>Z.value=l),class:"tb-btn time-input",onChange:ye},null,544),[[e.vModelText,Z.value]])]),e.createElementVNode("div",{class:"toolbar-right"},[e.createElementVNode("button",{class:"btn-profile",onClick:Qe},"剖面图绘制")])]),e.createElementVNode("div",It,[e.createElementVNode("button",{ref_key:"modelBtnRef",ref:ve,class:"tb-btn model-btn",onClick:t[8]||(t[8]=e.withModifiers(l=>J("model"),["stop"]))},[e.createElementVNode("span",null,e.toDisplayString(We.value),1),t[23]||(t[23]=e.createTextVNode(" ▼ ",-1))],512)]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[L.value==="region"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tp-dropdown",style:e.normalizeStyle(z.value),onClick:t[9]||(t[9]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,l=>(e.openBlock(),e.createElementBlock("label",{key:l,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",value:l,checked:b.value.includes(l),onChange:o=>Ye(l,o.target.checked)},null,40,Ot),e.createElementVNode("span",{style:e.normalizeStyle(l==="全部"?"font-weight:bold;color:#1c3d90":"")},e.toDisplayString(l),5)]))),128))],4)):e.createCommentVNode("",!0),L.value==="radar"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"tp-dropdown",style:e.normalizeStyle(z.value),onClick:t[11]||(t[11]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",_t,[e.createElementVNode("input",{type:"checkbox",value:"全部",checked:ze.value,onChange:t[10]||(t[10]=l=>we("全部",l.target.checked))},null,40,Ft),t[24]||(t[24]=e.createElementVNode("span",null,"全部雷达",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe.value,l=>(e.openBlock(),e.createElementBlock("label",{key:l.id,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",value:l.name,checked:A.value.includes(l.name),onChange:o=>we(l.name,o.target.checked)},null,40,zt),e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(l.name)+" ",1),e.createElementVNode("span",{style:e.normalizeStyle({color:l.isOnline?"#71C446":"#999",fontSize:"12px"})},"●",4)])]))),128))],4)):e.createCommentVNode("",!0),L.value==="virt"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"tp-dropdown",style:e.normalizeStyle(z.value),onClick:t[15]||(t[15]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Ut,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":t[12]||(t[12]=l=>$.value=l),placeholder:"搜索区域或监测线...",style:{width:"100%",padding:"4px 8px",border:"1px solid #ddd","border-radius":"4px","font-size":"12px"}},null,512),[[e.vModelText,$.value]])]),e.createElementVNode("div",Ht,[t[27]||(t[27]=e.createElementVNode("div",{class:"dropdown-group-title"},"虚拟区域",-1)),e.withDirectives(e.createElementVNode("label",Wt,[e.createElementVNode("input",{type:"checkbox",checked:le.every(l=>P.value.includes(l)),onChange:t[13]||(t[13]=l=>qe(l.target.checked))},null,40,jt),t[25]||(t[25]=e.createElementVNode("span",{style:{"font-weight":"bold"}},"全部",-1))],512),[[e.vShow,!$.value||"全部".includes($.value)]]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(le,l=>e.withDirectives(e.createElementVNode("label",{key:l,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",checked:P.value.includes(l),onChange:o=>Xe(l,o.target.checked)},null,40,Yt),e.createElementVNode("span",null,e.toDisplayString(l),1)]),[[e.vShow,!$.value||l.includes($.value)]])),64)),t[28]||(t[28]=e.createElementVNode("div",{class:"dropdown-group-title",style:{"margin-top":"5px"}},"监测线",-1)),e.withDirectives(e.createElementVNode("label",qt,[e.createElementVNode("input",{type:"checkbox",checked:oe.every(l=>I.value.includes(l)),onChange:t[14]||(t[14]=l=>Ge(l.target.checked))},null,40,Xt),t[26]||(t[26]=e.createElementVNode("span",{style:{"font-weight":"bold"}},"全部",-1))],512),[[e.vShow,!$.value||"全部".includes($.value)]]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(oe,l=>e.withDirectives(e.createElementVNode("label",{key:l,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",checked:I.value.includes(l),onChange:o=>Ke(l,o.target.checked)},null,40,Gt),e.createElementVNode("span",null,e.toDisplayString(l),1)]),[[e.vShow,!$.value||l.includes($.value)]])),64))])],4)):e.createCommentVNode("",!0),L.value==="model"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"tp-dropdown",style:e.normalizeStyle(z.value),onClick:t[16]||(t[16]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_e,l=>e.createElementVNode("label",{key:l.id,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",checked:N.value.includes(l.id),onChange:o=>Ze(l.id,o.target.checked)},null,40,Kt),e.createElementVNode("span",null,e.toDisplayString(l.label),1)])),64))],4)):e.createCommentVNode("",!0)])),e.createElementVNode("div",{ref_key:"viewerRef",ref:y,class:"map-viewer",onMousedown:st,onContextmenu:e.withModifiers(dt,["prevent"]),onWheel:e.withModifiers(gt,["prevent"])},[e.createElementVNode("div",{ref_key:"canvasRef",ref:F,class:"map-canvas"},[(e.openBlock(),e.createElementBlock("svg",{ref_key:"baseSvgRef",ref:ce,class:"base-svg",width:e.unref(m).canvasWidth,height:e.unref(m).canvasHeight,viewBox:`0 0 ${e.unref(m).canvasWidth} ${e.unref(m).canvasHeight}`},null,8,Zt)),(e.openBlock(),e.createElementBlock("svg",{ref_key:"highlightSvgRef",ref:W,class:"highlight-svg",width:e.unref(m).canvasWidth,height:e.unref(m).canvasHeight,viewBox:`0 0 ${e.unref(m).canvasWidth} ${e.unref(m).canvasHeight}`},null,8,Jt)),(e.openBlock(),e.createElementBlock("svg",{ref_key:"customSvgRef",ref:X,class:"custom-svg",width:e.unref(m).canvasWidth,height:e.unref(m).canvasHeight,viewBox:`0 0 ${e.unref(m).canvasWidth} ${e.unref(m).canvasHeight}`},null,8,Qt)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,l=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:l.id,class:e.normalizeClass(["radar-station",{offline:!l.isOnline}]),style:e.normalizeStyle(ot(l)),title:`${l.name}(${l.isOnline?"在线":"离线"})`,onClick:e.withModifiers(o=>vt(l),["stop"])},"📡",14,en)),[[e.vShow,Se(l)]])),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,l=>(e.openBlock(),e.createElementBlock("div",{key:"cloud-"+l.id,class:e.normalizeClass(["radar-cloud",{visible:at(l.id)&&Se(l),"no-anim":k.mode==="edit"}]),style:e.normalizeStyle(rt(l))},null,6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(tt.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"virtual-point",style:e.normalizeStyle(it(l)),title:`${l.deviceId} | ${l.speed} mm/h`,onClick:e.withModifiers(o=>xt(l),["stop"])},null,12,tn))),128))],512)],544),s.isDrawing?(e.openBlock(),e.createElementBlock("div",nn,[e.createElementVNode("span",ln,e.toDisplayString(nt.value),1),e.createElementVNode("button",{class:"toolbar-btn confirm",onClick:yt},"确定生成"),e.createElementVNode("button",{class:"toolbar-btn",onClick:ie},"取消")])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],4))}})),vn=Bt._export_sfc(gn,[["__scopeId","data-v-cc924deb"]]);exports.default=vn;
1
+ "use strict";var Ct=Object.defineProperty,At=Object.defineProperties;var Nt=Object.getOwnPropertyDescriptors;var Be=Object.getOwnPropertySymbols;var Vt=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable;var $e=(k,p,x)=>p in k?Ct(k,p,{enumerable:!0,configurable:!0,writable:!0,value:x}):k[p]=x,De=(k,p)=>{for(var x in p||(p={}))Vt.call(p,x)&&$e(k,x,p[x]);if(Be)for(var x of Be(p))Mt.call(p,x)&&$e(k,x,p[x]);return k},Le=(k,p)=>At(k,Nt(p));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const Rt=require("./BaseComponent-DoQ1oLoA.cjs"),Bt=require("./index-BdWR_FTA.cjs"),Te=require("./ele-lin-icon-Dke_1AmT.cjs"),$t={class:"map-toolbar"},Dt={class:"toolbar-left"},Lt={class:"dropdown-wrapper"},Tt={class:"dropdown-wrapper"},Pt={class:"dropdown-wrapper"},It={class:"model-btn-wrapper"},Ot=["value","checked","onChange"],_t={class:"dropdown-item",style:{"border-bottom":"1px solid #eee","font-weight":"bold"}},Ft=["checked"],zt=["value","checked","onChange"],Ut={style:{padding:"8px","border-bottom":"1px solid #eee",background:"#f8fbff"}},Ht={style:{"max-height":"300px","overflow-y":"auto"}},Wt={class:"dropdown-item",style:{background:"#fafafa"}},jt=["checked"],Yt=["checked","onChange"],qt={class:"dropdown-item",style:{background:"#fafafa"}},Xt=["checked"],Gt=["checked","onChange"],Kt=["checked","onChange"],Zt=["width","height","viewBox"],Jt=["width","height","viewBox"],Qt=["width","height","viewBox"],en=["title","onClick"],tn=["title","onClick"],nn={key:0,class:"draw-toolbar"},ln={class:"draw-tip"},on={DEFAULT_ICON:Te.DEFAULT_ICON,ACTIVE_ICON:Te.ACTIVE_ICON,NAME_CN:"雷达地图查看器",NAME_EN:"Radar Map Viewer",ORDER:2,PLATFORM:["pc","screen"]},rn={bgColor:{value:"#0b1a31",type:"color",label:"背景色"},canvasWidth:{value:3e3,type:"number",label:"画布宽度"},canvasHeight:{value:2500,type:"number",label:"画布高度"},geologyModelUrl:{value:"",type:"string",label:"地质模型图片URL"},dtmModelUrl:{value:"",type:"string",label:"DTM面图片URL"},uavModelUrl:{value:"",type:"string",label:"无人机地图URL"},linkChannel:{value:"radarMonitor",type:"select",label:"联动频道",options:[{label:"雷达监测",value:"radarMonitor"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},an=[{name:"雷达1(北)",fv:"",object_id:"",color:"#409EFF",lng:"106.7120",lat:"26.5790",elevation:"1520",region:"南帮",x:1500,y:200,angle:180,targetSide:"bottom"},{name:"雷达2(东)",fv:"",object_id:"",color:"#E6A23C",lng:"106.7180",lat:"26.5810",elevation:"1480",region:"西帮",x:2650,y:1250,angle:270,targetSide:"left"},{name:"雷达3(南)",fv:"",object_id:"",color:"#67C23A",lng:"106.7120",lat:"26.5840",elevation:"1500",region:"北帮",x:1500,y:2300,angle:0,targetSide:"top"},{name:"雷达4(西)",fv:"",object_id:"",color:"#909399",lng:"106.7060",lat:"26.5810",elevation:"1460",region:"东帮",x:350,y:1250,angle:90,targetSide:"right"}],sn=["name","fv","object_id","color","lng","lat","elevation","region","x","y","angle","targetSide"],cn=["mosaic"],un={source:"mosaic"},dn={DEFAULT:on,OPTIONS:rn,DATA:an,PARAMS:sn,SOURCE:cn,COMMON:un},gn=e.defineComponent(Le(De({},dn),{__name:"radarMapViewer",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(k){const p=k;class x extends Rt.BaseComponent{extractStyles(){var i,r,a,v,f,g,d,h;const{options:t}=this.props.conf,l=((i=t==null?void 0:t.linkChannel)==null?void 0:i.value)||"radarMonitor",o=((r=t==null?void 0:t.customChannel)==null?void 0:r.value)||"";return{bgColor:((a=t==null?void 0:t.bgColor)==null?void 0:a.value)||"#0b1a31",canvasWidth:((v=t==null?void 0:t.canvasWidth)==null?void 0:v.value)||3e3,canvasHeight:((f=t==null?void 0:t.canvasHeight)==null?void 0:f.value)||2500,geologyModelUrl:((g=t==null?void 0:t.geologyModelUrl)==null?void 0:g.value)||"",dtmModelUrl:((d=t==null?void 0:t.dtmModelUrl)==null?void 0:d.value)||"",uavModelUrl:((h=t==null?void 0:t.uavModelUrl)==null?void 0:h.value)||"",linkChannel:l==="custom"&&o?o:l}}onLinkEvent(t){Et(t)}}const E=new x(p,"radarMapViewer");E.setupLifecycle();const m=E.getStyle(),c=1500,u=1250,Pe=["#F57676","#FFA500","#E6A23C","#66B1FF","#71C446"],D=[{w:2200,h:1600},{w:1900,h:1400},{w:1600,h:1200},{w:1300,h:1e3},{w:1e3,h:800}],Ie=[{id:"R1",name:"雷达1(北)",region:"南帮",x:c,y:u-1050,angle:180,targetSide:"bottom",isOnline:!0},{id:"R2",name:"雷达2(东)",region:"西帮",x:c+1150,y:u,angle:270,targetSide:"left",isOnline:!0},{id:"R3",name:"雷达3(南)",region:"北帮",x:c,y:u+1050,angle:0,targetSide:"top",isOnline:!0},{id:"R4",name:"雷达4(西)",region:"东帮",x:c-1150,y:u,angle:90,targetSide:"right",isOnline:!1}],Oe=()=>{var t;const n=(t=p.conf)==null?void 0:t.data;return!Array.isArray(n)||n.length===0?Ie:n.map((l,o)=>({id:l.object_id||`R${o+1}`,name:l.name||`雷达${o+1}`,region:l.region||"",x:Number(l.x)||c,y:Number(l.y)||u,angle:Number(l.angle)||0,targetSide:l.targetSide||"bottom",isOnline:l.value!==void 0?!!l.value:!0}))},C=e.computed(()=>Oe()),y=e.ref(null),F=e.ref(null),ce=e.ref(null),W=e.ref(null),X=e.ref(null),ue=e.ref(null),de=e.ref(null),ge=e.ref(null),ve=e.ref(null),z=e.ref({top:"0px",left:"0px",minWidth:"0px"}),S=e.ref(.6),w=e.reactive({x:-300,y:-200}),G=e.ref([]),fe=e.ref([]),T=e.ref(new Set),B=e.ref(null),s=e.reactive({isDrawing:!1,mode:"surface",surfacePoints:[],mixedShapes:[],cursorPos:null,dragStart:null,isDragging:!1});let te=!1,me=0,he=0;const ne=e.computed(()=>["全部",...[...new Set(C.value.map(t=>t.region).filter(Boolean))]]),le=["区域1","区域2","区域3"],oe=["监测线1","监测线2","监测线3"],_e=[{id:"geology",label:"地质模型"},{id:"dtm",label:"DTM面"},{id:"uav",label:"无人机地图"}],L=e.ref(null),b=e.ref([]),A=e.ref([]),P=e.ref([]),I=e.ref([]),N=e.ref(["geology"]),$=e.ref(""),j=e.ref(1),K=e.ref("2025-10-10T13:22"),Z=e.ref("2026-01-18T00:00"),Fe=e.computed(()=>{const n=b.value.filter(t=>t!=="全部");return n.length?b.value.includes("全部")?"已选全部":n.length<=1?n[0]:`已选(${n.length})`:"选择区域"}),pe=e.computed(()=>{const n=b.value.filter(t=>t!=="全部");return!n.length||b.value.includes("全部")?C.value:C.value.filter(t=>n.includes(t.region))}),ze=e.computed(()=>{const n=pe.value.map(t=>t.name);return n.length>0&&n.every(t=>A.value.includes(t))}),Ue=e.computed(()=>{const n=A.value.filter(t=>t!=="全部");return n.length?A.value.includes("全部")?"已选全部":n.length<=1?n[0]:`已选(${n.length})`:"选择设备"}),He=e.computed(()=>{const n=P.value.length+I.value.length;return n===0?"选择/搜索虚拟位置":`已选(${n})`}),We=e.computed(()=>{if(!N.value.length)return"请选择模型";const t={geology:"地质模型",dtm:"DTM面",uav:"无人机地图"}[N.value[0]];return N.value.length>1?t+"...":t}),je={region:ue,radar:de,virt:ge,model:ve},J=n=>{var l;if(L.value===n){L.value=null;return}const t=(l=je[n])==null?void 0:l.value;if(t){const o=t.getBoundingClientRect();n==="model"?z.value={top:o.bottom+2+"px",left:"auto",right:window.innerWidth-o.right+"px",minWidth:o.width+"px"}:z.value={top:o.bottom+2+"px",left:o.left+"px",right:"auto",minWidth:o.width+"px"}}L.value=n},be=n=>{const t=n.target;t!=null&&t.closest(".tp-dropdown")||t!=null&&t.closest(".dropdown-wrapper")||t!=null&&t.closest(".model-btn-wrapper")||(L.value=null)},Ye=(n,t)=>{const l=ne.value.filter(o=>o!=="全部");if(n==="全部")b.value=t?[...ne.value]:[];else{let o=b.value.filter(i=>i!=="全部");t?o.includes(n)||o.push(n):o=o.filter(i=>i!==n),l.every(i=>o.includes(i))&&(o=["全部",...l]),b.value=o}U()},we=(n,t)=>{const l=C.value.map(o=>o.name);if(n==="全部")A.value=t?["全部",...l]:[];else{let o=A.value.filter(i=>i!=="全部");if(t){o.includes(n)||o.push(n);const i=C.value.find(r=>r.name===n);i&&!b.value.includes(i.region)&&(b.value=[...b.value,i.region])}else o=o.filter(i=>i!==n);l.every(i=>o.includes(i))&&(o=["全部",...l]),A.value=o}U()},qe=n=>{P.value=n?[...le]:[],U()},Xe=(n,t)=>{let l=[...P.value];t?l.includes(n)||l.push(n):l=l.filter(o=>o!==n),P.value=l,U()},Ge=n=>{I.value=n?[...oe]:[],U()},Ke=(n,t)=>{let l=[...I.value];t?l.includes(n)||l.push(n):l=l.filter(o=>o!==n),I.value=l,U()},Ze=(n,t)=>{t?N.value.includes(n)||N.value.push(n):N.value=N.value.filter(l=>l!==n),Je()},Je=()=>{const n=F.value;if(!n)return;n.querySelectorAll(".model-overlay").forEach(o=>o.remove());const t={geology:m.value.geologyModelUrl,dtm:m.value.dtmModelUrl,uav:m.value.uavModelUrl};let l=!1;if(N.value.forEach(o=>{const i=t[o];if(i){l=!0;const r=document.createElement("img");r.className="model-overlay",r.src=i,r.style.cssText="position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;pointer-events:none;z-index:2;opacity:0.6;",n.insertBefore(r,n.firstChild)}}),l)n.style.filter="none";else{let o="";N.value.includes("uav")&&(o+="saturate(1.5) contrast(1.2) "),N.value.includes("dtm")&&(o+="brightness(1.1) "),n.style.filter=o.trim()||"none"}},re=n=>{j.value=n,E.publish({type:"timeRangeChange",days:n,start:K.value,end:Z.value})},ye=()=>{j.value=0,E.publish({type:"timeRangeChange",days:0,start:K.value,end:Z.value})},Qe=()=>{Ce("point")},Se=n=>{const t=b.value.filter(o=>o!=="全部"),l=A.value.filter(o=>o!=="全部");return!(t.length>0&&!t.includes(n.region)||l.length>0&&!l.includes(n.name))},U=()=>{const n=b.value.filter(l=>l!=="全部"),t=A.value.filter(l=>l!=="全部");if(T.value.clear(),C.value.forEach(l=>{if(!l.isOnline)return;let o=!0;n.length>0&&!n.includes(l.region)&&(o=!1),t.length>0&&!t.includes(l.name)&&(o=!1),o&&T.value.add(l.id)}),et(n),n.length===1){const l=C.value.find(o=>o.region===n[0]);l&&Ee(l)}t.length===1?E.publish({type:"regionFilter",regions:[],radars:[t[0]]}):n.length===1?E.publish({type:"regionFilter",regions:[n[0]],radars:[]}):E.publish({type:"regionFilter",regions:[],radars:[]})},et=n=>{const t=W.value;if(!t||(t.querySelectorAll(".region-highlight").forEach(i=>i.remove()),n.length===0||n.includes("全部")))return;const l="http://www.w3.org/2000/svg",o={北帮:{x:600,y:0,w:1800,h:600},南帮:{x:600,y:1900,w:1800,h:600},东帮:{x:2400,y:600,w:600,h:1300},西帮:{x:0,y:600,w:600,h:1300}};n.forEach(i=>{const r=o[i];if(!r)return;const a=document.createElementNS(l,"rect");a.setAttribute("x",String(r.x)),a.setAttribute("y",String(r.y)),a.setAttribute("width",String(r.w)),a.setAttribute("height",String(r.h)),a.setAttribute("fill","rgba(255, 255, 0, 0.15)"),a.setAttribute("stroke","rgba(255, 255, 0, 0.7)"),a.setAttribute("stroke-width","3"),a.setAttribute("class","region-highlight"),t.appendChild(a)})},tt=e.computed(()=>{const n=b.value.filter(a=>a!=="全部"),t=A.value.filter(a=>a!=="全部"),l=P.value.map(a=>a.replace("区域","")),o=I.value.map(a=>a.replace("监测线","")),i=[...new Set([...l,...o])];let r=fe.value;return B.value?r.filter(a=>a.radarId===B.value):r.filter(a=>!(n.length>0&&!n.includes(a.region)||t.length>0&&!t.includes(a.radarName)||i.length>0&&!i.includes(a.surfaceId)))}),nt=e.computed(()=>s.mode==="surface"?"【面模式】左键点击添加节点,右键闭合区域":"【点模式】左键点击选点,左键拖拽画线,右键结束"),lt=n=>n>=8?0:n>=5?1:n>=3?2:n>=2?3:4,ot=n=>({left:n.x-20+"px",top:n.y-20+"px"}),rt=n=>({left:n.x-1200+"px",top:n.y-2e3+"px",transform:`rotate(${n.angle}deg)`}),at=n=>T.value.has(n),it=n=>{const t=!B.value||n.radarId===B.value;return{left:n.x+"px",top:n.y+"px",backgroundColor:Pe[n.alarmIdx],opacity:t?1:.05,transform:t&&B.value?"scale(1.5)":"scale(1)",zIndex:t?100:1}},ke=()=>{const n=ce.value;if(!n)return;n.innerHTML="";const t="http://www.w3.org/2000/svg",l=["#409EFF","#E6A23C","#F56C6C","#67C23A","#909399"],o=[4,2,2,2,2],i=[.3,.5,.5,.5,.3];D.forEach((f,g)=>{const d=document.createElementNS(t,"rect");d.setAttribute("x",String(c-f.w/2)),d.setAttribute("y",String(u-f.h/2)),d.setAttribute("width",String(f.w)),d.setAttribute("height",String(f.h)),d.setAttribute("fill","none"),d.setAttribute("stroke",l[g]),d.setAttribute("stroke-width",String(o[g])),d.setAttribute("opacity",String(i[g])),n.appendChild(d)});const r=D[0],a=D[4];[[c-r.w/2,u-r.h/2,c-a.w/2,u-a.h/2],[c+r.w/2,u-r.h/2,c+a.w/2,u-a.h/2],[c+r.w/2,u+r.h/2,c+a.w/2,u+a.h/2],[c-r.w/2,u+r.h/2,c-a.w/2,u+a.h/2]].forEach(([f,g,d,h])=>{const V=document.createElementNS(t,"line");V.setAttribute("x1",String(f)),V.setAttribute("y1",String(g)),V.setAttribute("x2",String(d)),V.setAttribute("y2",String(h)),V.setAttribute("stroke","#409EFF"),V.setAttribute("stroke-width","1"),V.setAttribute("opacity","0.2"),n.appendChild(V)})},xe=()=>{const n=[],t=[D[0],D[1],D[2],D[3]];C.value.forEach(l=>{for(let o=0;o<3;o++){const i=t[o],r=t[o+1],a=String(o+1),v=3+Math.floor(Math.random()*2);for(let f=1;f<=v;f++){const g=`${l.id}-S${a}-P${f}`,d=Math.random(),h=i.w+(r.w-i.w)*d,V=i.h+(r.h-i.h)*d;let Y,q;if(l.targetSide==="bottom"){const M=h*.8;Y=c-M/2+Math.random()*M;const R=u+i.h/2,_=u+r.h/2;q=R+(_-R)*d+(Math.random()-.5)*15}else if(l.targetSide==="top"){const M=h*.8;Y=c-M/2+Math.random()*M;const R=u-i.h/2,_=u-r.h/2;q=R+(_-R)*d+(Math.random()-.5)*15}else if(l.targetSide==="left"){const M=V*.8;q=u-M/2+Math.random()*M;const R=c-i.w/2,_=c-r.w/2;Y=R+(_-R)*d+(Math.random()-.5)*15}else{const M=V*.8;q=u-M/2+Math.random()*M;const R=c+i.w/2,_=c+r.w/2;Y=R+(_-R)*d+(Math.random()-.5)*15}const ee=Math.random();let O;ee<.05?O=8+Math.random()*4:ee<.15?O=5+Math.random()*3:ee<.35?O=3+Math.random()*2:ee<.6?O=2+Math.random()*1:O=.1+Math.random()*1.9,n.push({id:g,x:Y,y:q,radarId:l.id,radarName:l.name,region:l.region,surfaceId:a,alarmIdx:lt(O),speed:O.toFixed(2),deviceId:`${l.name}-点${f}`,isOnline:l.isOnline})}}}),fe.value=n},H=()=>{const n=F.value;n&&(n.style.width=m.value.canvasWidth+"px",n.style.height=m.value.canvasHeight+"px",n.style.transform=`translate(${w.x}px, ${w.y}px) scale(${S.value})`)},st=n=>{if(n.button===0){if(s.isDrawing){bt(n);return}te=!0,me=n.clientX-w.x,he=n.clientY-w.y,y.value&&(y.value.style.cursor="grabbing")}},ct=n=>{if(s.isDrawing){s.cursorPos=ae(n),Q();return}te&&(w.x=n.clientX-me,w.y=n.clientY-he,H())},ut=n=>{if(s.isDrawing&&s.mode!=="surface"){wt(n);return}te=!1,y.value&&(y.value.style.cursor=s.isDrawing?"crosshair":"grab")},dt=n=>{s.isDrawing&&Ne()},gt=n=>{const t=y.value;if(!t)return;const l=Math.min(Math.max(.2,S.value+n.deltaY*-.0012),3.5),o=t.getBoundingClientRect(),i=n.clientX-o.left,r=n.clientY-o.top,a=l/S.value;w.x=i-(i-w.x)*a,w.y=r-(r-w.y)*a,S.value=l,H()},ae=n=>{const t=F.value.getBoundingClientRect();return{x:(n.clientX-t.left)/S.value,y:(n.clientY-t.top)/S.value}},vt=n=>{B.value=B.value===n.id?null:n.id,T.value.clear(),B.value?(T.value.add(n.id),Ee(n),ht(n)):(C.value.filter(t=>t.isOnline).forEach(t=>T.value.add(t.id)),mt(),ft()),E.publish({type:"regionFilter",regions:B.value?[n.region]:[],radars:B.value?[n.name]:[]})},Ee=n=>{const t=y.value,l=F.value;if(!t||!l)return;let o=n.x,i=n.y;n.targetSide==="bottom"?i+=600:n.targetSide==="top"?i-=600:n.targetSide==="left"?o-=600:n.targetSide==="right"&&(o+=600),S.value=.9,w.x=t.clientWidth/2-o*S.value,w.y=t.clientHeight/2-i*S.value,l.style.transition="transform 0.6s cubic-bezier(0.2, 0, 0.2, 1)",H(),setTimeout(()=>{l&&(l.style.transition="none")},650)},ft=()=>{const n=F.value;S.value=.6,w.x=-300,w.y=-200,n?(n.style.transition="transform 0.6s cubic-bezier(0.2, 0, 0.2, 1)",H(),setTimeout(()=>{n&&(n.style.transition="none")},650)):H()},mt=()=>{W.value&&(W.value.innerHTML="")},ht=n=>{const t=W.value;if(!t)return;t.innerHTML="";const l="http://www.w3.org/2000/svg",o=D.slice(0,4);for(let i=0;i<3;i++){const r=o[i],a=o[i+1];let v="",f=0,g=0;n.targetSide==="bottom"?(v=[`${c-r.w/2},${u+r.h/2}`,`${c+r.w/2},${u+r.h/2}`,`${c+a.w/2},${u+a.h/2}`,`${c-a.w/2},${u+a.h/2}`].join(" "),f=c,g=u+a.h/2+(r.h/2-a.h/2)/2):n.targetSide==="top"?(v=[`${c-r.w/2},${u-r.h/2}`,`${c+r.w/2},${u-r.h/2}`,`${c+a.w/2},${u-a.h/2}`,`${c-a.w/2},${u-a.h/2}`].join(" "),f=c,g=u-a.h/2-(r.h/2-a.h/2)/2):n.targetSide==="left"?(v=[`${c-r.w/2},${u-r.h/2}`,`${c-r.w/2},${u+r.h/2}`,`${c-a.w/2},${u+a.h/2}`,`${c-a.w/2},${u-a.h/2}`].join(" "),f=c-a.w/2-(r.w/2-a.w/2)/2,g=u):(v=[`${c+r.w/2},${u-r.h/2}`,`${c+r.w/2},${u+r.h/2}`,`${c+a.w/2},${u+a.h/2}`,`${c+a.w/2},${u-a.h/2}`].join(" "),f=c+a.w/2+(r.w/2-a.w/2)/2,g=u);const d=document.createElementNS(l,"polygon");d.setAttribute("points",v),d.setAttribute("fill","rgba(64,158,255,0.25)"),d.setAttribute("stroke","rgba(64,158,255,0.8)"),d.setAttribute("stroke-width","2"),t.appendChild(d);const h=document.createElementNS(l,"text");h.setAttribute("x",String(f)),h.setAttribute("y",String(g)),h.setAttribute("text-anchor","middle"),h.setAttribute("dominant-baseline","middle"),h.setAttribute("fill","#fff"),h.setAttribute("font-size","24"),h.setAttribute("font-weight","bold"),h.style.pointerEvents="none",h.textContent=`区域 ${i+1}`,t.appendChild(h)}},Ce=n=>{s.isDrawing=!0,s.mode=n,s.surfacePoints=[],s.mixedShapes=[],s.cursorPos=null,s.dragStart=null,s.isDragging=!1,y.value&&(y.value.style.cursor="crosshair"),Ae()},pt=()=>{s.isDrawing=!1,y.value&&(y.value.style.cursor="grab"),s.dragStart=null},Ae=()=>{X.value&&(X.value.innerHTML="")},bt=n=>{const t=ae(n);s.mode==="surface"?(s.surfacePoints.push(t),Q()):(s.dragStart=t,s.isDragging=!0)},wt=n=>{if(s.mode==="surface"||!s.dragStart)return;const t=ae(n),l=t.x-s.dragStart.x,o=t.y-s.dragStart.y;Math.sqrt(l*l+o*o)<5?s.mixedShapes.push({type:"point",x:s.dragStart.x,y:s.dragStart.y}):s.mixedShapes.push({type:"line",x1:s.dragStart.x,y1:s.dragStart.y,x2:t.x,y2:t.y}),s.isDragging=!1,s.dragStart=null,Q()},Ne=()=>{if(!s.isDrawing)return;const n=s.mode==="surface"&&s.surfacePoints.length>=3,t=s.mode!=="surface"&&s.mixedShapes.length>0;if(!n&&!t){ie();return}s.isDrawing=!1,y.value&&(y.value.style.cursor="grab"),s.cursorPos=null,Q(!0),E.publish({type:"customAreaComplete"})},yt=()=>Ne(),ie=()=>{pt(),Ae(),E.publish({type:"customAreaCancel"})},Q=(n=!1)=>{const t=X.value;if(!t)return;t.innerHTML="";const l="http://www.w3.org/2000/svg";if(s.mode==="surface"){if(s.surfacePoints.length>0){let o=`M ${s.surfacePoints[0].x} ${s.surfacePoints[0].y}`;for(let r=1;r<s.surfacePoints.length;r++)o+=` L ${s.surfacePoints[r].x} ${s.surfacePoints[r].y}`;!n&&s.cursorPos&&(o+=` L ${s.cursorPos.x} ${s.cursorPos.y}`),n&&(o+=" Z");const i=document.createElementNS(l,"path");i.setAttribute("d",o),i.setAttribute("fill","rgba(152,251,152,0.4)"),i.setAttribute("stroke","#333"),i.setAttribute("stroke-width","1.5"),i.setAttribute("stroke-dasharray","5,5"),t.appendChild(i),s.surfacePoints.forEach(r=>se(t,r.x,r.y,"#333"))}!n&&s.cursorPos&&St(t,s.cursorPos.x,s.cursorPos.y)}else s.mixedShapes.forEach(o=>{o.type==="point"?kt(t,o.x,o.y):Ve(t,o.x1,o.y1,o.x2,o.y2,!1)}),s.isDragging&&s.dragStart&&s.cursorPos&&Ve(t,s.dragStart.x,s.dragStart.y,s.cursorPos.x,s.cursorPos.y,!0)},se=(n,t,l,o)=>{const i=document.createElementNS("http://www.w3.org/2000/svg","circle");i.setAttribute("cx",String(t)),i.setAttribute("cy",String(l)),i.setAttribute("r",String(4/S.value)),i.setAttribute("fill","#fff"),i.setAttribute("stroke",o),n.appendChild(i)},St=(n,t,l)=>{const o="http://www.w3.org/2000/svg";[[t,l-5e3,t,l+5e3],[t-5e3,l,t+5e3,l]].forEach(([r,a,v,f])=>{const g=document.createElementNS(o,"line");g.setAttribute("x1",String(r)),g.setAttribute("y1",String(a)),g.setAttribute("x2",String(v)),g.setAttribute("y2",String(f)),g.setAttribute("stroke","#ffffff"),g.setAttribute("stroke-width","2"),g.setAttribute("stroke-dasharray","8,4"),g.style.filter="drop-shadow(0 0 2px rgba(0,0,0,0.8))",n.appendChild(g)})},kt=(n,t,l)=>{const o="http://www.w3.org/2000/svg",i=10/S.value,r=document.createElementNS(o,"circle");r.setAttribute("cx",String(t)),r.setAttribute("cy",String(l)),r.setAttribute("r",String(i)),r.setAttribute("fill","rgba(230,162,60,0.3)"),r.setAttribute("stroke","#E6A23C"),n.appendChild(r);const a=document.createElementNS(o,"circle");a.setAttribute("cx",String(t)),a.setAttribute("cy",String(l)),a.setAttribute("r",String(4/S.value)),a.setAttribute("fill","#E6A23C"),n.appendChild(a)},Ve=(n,t,l,o,i,r)=>{const v=document.createElementNS("http://www.w3.org/2000/svg","line");v.setAttribute("x1",String(t)),v.setAttribute("y1",String(l)),v.setAttribute("x2",String(o)),v.setAttribute("y2",String(i)),v.setAttribute("stroke","#E6A23C"),v.setAttribute("stroke-width","3"),r&&v.setAttribute("stroke-dasharray","5,5"),n.appendChild(v),se(n,t,l,"#E6A23C"),se(n,o,i,"#E6A23C")},xt=n=>{E.publish({type:"openAnalysis",deviceId:n.id,region:n.region})},Et=n=>{const{payload:t}=n;if(t.type==="customArea"){t.action==="start"?Ce(t.mode||"surface"):t.action==="stop"&&ie();return}},Me=n=>ct(n),Re=n=>ut(n);return e.onMounted(()=>{window.addEventListener("mousemove",Me),window.addEventListener("mouseup",Re),window.addEventListener("click",be),G.value=C.value;const n=C.value.filter(l=>l.isOnline);A.value=n.map(l=>l.name);const t=new Set(n.map(l=>l.region));b.value=Array.from(t),n.forEach(l=>T.value.add(l.id)),e.nextTick(()=>{ke(),xe(),H()})}),e.onUnmounted(()=>{window.removeEventListener("mousemove",Me),window.removeEventListener("mouseup",Re),window.removeEventListener("click",be)}),e.watch(()=>p.conf,()=>{E.init(),G.value=C.value,e.nextTick(()=>{ke(),xe()})},{deep:!0}),(n,t)=>(e.openBlock(),e.createElementBlock("div",{class:"radar-map-wrapper",style:e.normalizeStyle({background:e.unref(m).bgColor})},[e.createElementVNode("div",$t,[e.createElementVNode("div",Dt,[e.createElementVNode("div",Lt,[e.createElementVNode("button",{ref_key:"regionBtnRef",ref:ue,class:"tb-btn",onClick:t[0]||(t[0]=e.withModifiers(l=>J("region"),["stop"]))},[e.createElementVNode("span",null,e.toDisplayString(Fe.value),1),t[17]||(t[17]=e.createTextVNode(" ▼ ",-1))],512)]),e.createElementVNode("div",Tt,[e.createElementVNode("button",{ref_key:"radarBtnRef",ref:de,class:"tb-btn",onClick:t[1]||(t[1]=e.withModifiers(l=>J("radar"),["stop"]))},[e.createElementVNode("span",null,e.toDisplayString(Ue.value),1),t[18]||(t[18]=e.createTextVNode(" ▼ ",-1))],512)]),e.createElementVNode("div",Pt,[e.createElementVNode("button",{ref_key:"virtBtnRef",ref:ge,class:"tb-btn",onClick:t[2]||(t[2]=e.withModifiers(l=>J("virt"),["stop"]))},[e.createElementVNode("span",null,e.toDisplayString(He.value),1),t[19]||(t[19]=e.createTextVNode(" ▼ ",-1))],512)]),t[20]||(t[20]=e.createElementVNode("div",{class:"divider-v"},null,-1)),e.createElementVNode("button",{class:e.normalizeClass(["tb-btn",{active:j.value===1}]),onClick:t[3]||(t[3]=l=>re(1))},"一天内",2),e.createElementVNode("button",{class:e.normalizeClass(["tb-btn",{active:j.value===7}]),onClick:t[4]||(t[4]=l=>re(7))},"一周内",2),e.createElementVNode("button",{class:e.normalizeClass(["tb-btn",{active:j.value===30}]),onClick:t[5]||(t[5]=l=>re(30))},"一个月内",2),t[21]||(t[21]=e.createElementVNode("span",{class:"time-label"},"时间:",-1)),e.withDirectives(e.createElementVNode("input",{type:"datetime-local","onUpdate:modelValue":t[6]||(t[6]=l=>K.value=l),class:"tb-btn time-input",onChange:ye},null,544),[[e.vModelText,K.value]]),t[22]||(t[22]=e.createElementVNode("span",{class:"time-label"},"至",-1)),e.withDirectives(e.createElementVNode("input",{type:"datetime-local","onUpdate:modelValue":t[7]||(t[7]=l=>Z.value=l),class:"tb-btn time-input",onChange:ye},null,544),[[e.vModelText,Z.value]])]),e.createElementVNode("div",{class:"toolbar-right"},[e.createElementVNode("button",{class:"btn-profile",onClick:Qe},"剖面图绘制")])]),e.createElementVNode("div",It,[e.createElementVNode("button",{ref_key:"modelBtnRef",ref:ve,class:"tb-btn model-btn",onClick:t[8]||(t[8]=e.withModifiers(l=>J("model"),["stop"]))},[e.createElementVNode("span",null,e.toDisplayString(We.value),1),t[23]||(t[23]=e.createTextVNode(" ▼ ",-1))],512)]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[L.value==="region"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tp-dropdown",style:e.normalizeStyle(z.value),onClick:t[9]||(t[9]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ne.value,l=>(e.openBlock(),e.createElementBlock("label",{key:l,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",value:l,checked:b.value.includes(l),onChange:o=>Ye(l,o.target.checked)},null,40,Ot),e.createElementVNode("span",{style:e.normalizeStyle(l==="全部"?"font-weight:bold;color:#1c3d90":"")},e.toDisplayString(l),5)]))),128))],4)):e.createCommentVNode("",!0),L.value==="radar"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"tp-dropdown",style:e.normalizeStyle(z.value),onClick:t[11]||(t[11]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("label",_t,[e.createElementVNode("input",{type:"checkbox",value:"全部",checked:ze.value,onChange:t[10]||(t[10]=l=>we("全部",l.target.checked))},null,40,Ft),t[24]||(t[24]=e.createElementVNode("span",null,"全部雷达",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe.value,l=>(e.openBlock(),e.createElementBlock("label",{key:l.id,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",value:l.name,checked:A.value.includes(l.name),onChange:o=>we(l.name,o.target.checked)},null,40,zt),e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(l.name)+" ",1),e.createElementVNode("span",{style:e.normalizeStyle({color:l.isOnline?"#71C446":"#999",fontSize:"12px"})},"●",4)])]))),128))],4)):e.createCommentVNode("",!0),L.value==="virt"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"tp-dropdown",style:e.normalizeStyle(z.value),onClick:t[15]||(t[15]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Ut,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":t[12]||(t[12]=l=>$.value=l),placeholder:"搜索区域或监测线...",style:{width:"100%",padding:"4px 8px",border:"1px solid #ddd","border-radius":"4px","font-size":"12px"}},null,512),[[e.vModelText,$.value]])]),e.createElementVNode("div",Ht,[t[27]||(t[27]=e.createElementVNode("div",{class:"dropdown-group-title"},"虚拟区域",-1)),e.withDirectives(e.createElementVNode("label",Wt,[e.createElementVNode("input",{type:"checkbox",checked:le.every(l=>P.value.includes(l)),onChange:t[13]||(t[13]=l=>qe(l.target.checked))},null,40,jt),t[25]||(t[25]=e.createElementVNode("span",{style:{"font-weight":"bold"}},"全部",-1))],512),[[e.vShow,!$.value||"全部".includes($.value)]]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(le,l=>e.withDirectives(e.createElementVNode("label",{key:l,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",checked:P.value.includes(l),onChange:o=>Xe(l,o.target.checked)},null,40,Yt),e.createElementVNode("span",null,e.toDisplayString(l),1)]),[[e.vShow,!$.value||l.includes($.value)]])),64)),t[28]||(t[28]=e.createElementVNode("div",{class:"dropdown-group-title",style:{"margin-top":"5px"}},"监测线",-1)),e.withDirectives(e.createElementVNode("label",qt,[e.createElementVNode("input",{type:"checkbox",checked:oe.every(l=>I.value.includes(l)),onChange:t[14]||(t[14]=l=>Ge(l.target.checked))},null,40,Xt),t[26]||(t[26]=e.createElementVNode("span",{style:{"font-weight":"bold"}},"全部",-1))],512),[[e.vShow,!$.value||"全部".includes($.value)]]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(oe,l=>e.withDirectives(e.createElementVNode("label",{key:l,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",checked:I.value.includes(l),onChange:o=>Ke(l,o.target.checked)},null,40,Gt),e.createElementVNode("span",null,e.toDisplayString(l),1)]),[[e.vShow,!$.value||l.includes($.value)]])),64))])],4)):e.createCommentVNode("",!0),L.value==="model"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"tp-dropdown",style:e.normalizeStyle(z.value),onClick:t[16]||(t[16]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_e,l=>e.createElementVNode("label",{key:l.id,class:"dropdown-item"},[e.createElementVNode("input",{type:"checkbox",checked:N.value.includes(l.id),onChange:o=>Ze(l.id,o.target.checked)},null,40,Kt),e.createElementVNode("span",null,e.toDisplayString(l.label),1)])),64))],4)):e.createCommentVNode("",!0)])),e.createElementVNode("div",{ref_key:"viewerRef",ref:y,class:"map-viewer",onMousedown:st,onContextmenu:e.withModifiers(dt,["prevent"]),onWheel:e.withModifiers(gt,["prevent"])},[e.createElementVNode("div",{ref_key:"canvasRef",ref:F,class:"map-canvas"},[(e.openBlock(),e.createElementBlock("svg",{ref_key:"baseSvgRef",ref:ce,class:"base-svg",width:e.unref(m).canvasWidth,height:e.unref(m).canvasHeight,viewBox:`0 0 ${e.unref(m).canvasWidth} ${e.unref(m).canvasHeight}`},null,8,Zt)),(e.openBlock(),e.createElementBlock("svg",{ref_key:"highlightSvgRef",ref:W,class:"highlight-svg",width:e.unref(m).canvasWidth,height:e.unref(m).canvasHeight,viewBox:`0 0 ${e.unref(m).canvasWidth} ${e.unref(m).canvasHeight}`},null,8,Jt)),(e.openBlock(),e.createElementBlock("svg",{ref_key:"customSvgRef",ref:X,class:"custom-svg",width:e.unref(m).canvasWidth,height:e.unref(m).canvasHeight,viewBox:`0 0 ${e.unref(m).canvasWidth} ${e.unref(m).canvasHeight}`},null,8,Qt)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,l=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:l.id,class:e.normalizeClass(["radar-station",{offline:!l.isOnline}]),style:e.normalizeStyle(ot(l)),title:`${l.name}(${l.isOnline?"在线":"离线"})`,onClick:e.withModifiers(o=>vt(l),["stop"])},"📡",14,en)),[[e.vShow,Se(l)]])),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,l=>(e.openBlock(),e.createElementBlock("div",{key:"cloud-"+l.id,class:e.normalizeClass(["radar-cloud",{visible:at(l.id)&&Se(l),"no-anim":k.mode==="edit"}]),style:e.normalizeStyle(rt(l))},null,6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(tt.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"virtual-point",style:e.normalizeStyle(it(l)),title:`${l.deviceId} | ${l.speed} mm/h`,onClick:e.withModifiers(o=>xt(l),["stop"])},null,12,tn))),128))],512)],544),s.isDrawing?(e.openBlock(),e.createElementBlock("div",nn,[e.createElementVNode("span",ln,e.toDisplayString(nt.value),1),e.createElementVNode("button",{class:"toolbar-btn confirm",onClick:yt},"确定生成"),e.createElementVNode("button",{class:"toolbar-btn",onClick:ie},"取消")])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],4))}})),vn=Bt._export_sfc(gn,[["__scopeId","data-v-cc924deb"]]);exports.default=vn;
@@ -12,8 +12,8 @@ var Ge = (R, y, M) => y in R ? Ht(R, y, { enumerable: !0, configurable: !0, writ
12
12
  }, Ke = (R, y) => Wt(R, zt(y));
13
13
  import { defineComponent as Xt, computed as B, ref as v, reactive as Ze, onMounted as Gt, nextTick as Je, onUnmounted as qt, watch as Kt, openBlock as f, createElementBlock as b, normalizeStyle as U, unref as A, createElementVNode as a, withModifiers as D, toDisplayString as F, createTextVNode as oe, normalizeClass as re, withDirectives as W, vModelText as ke, createBlock as Zt, Teleport as Jt, Fragment as z, renderList as j, createCommentVNode as ie, vShow as ae, renderSlot as Qt } from "vue";
14
14
  import "html2canvas";
15
- import { B as en } from "./BaseComponent-qzL33ZSL.js";
16
- import { _ as tn } from "./index-BHBE19E2.js";
15
+ import { B as en } from "./BaseComponent-D82kw5vB.js";
16
+ import { _ as tn } from "./index-CCWU_se2.js";
17
17
  import { A as nn, D as ln } from "./ele-lin-icon-Dax-ZiWV.js";
18
18
  const sn = { class: "map-toolbar" }, on = { class: "toolbar-left" }, rn = { class: "dropdown-wrapper" }, an = { class: "dropdown-wrapper" }, un = { class: "dropdown-wrapper" }, dn = { class: "model-btn-wrapper" }, cn = ["value", "checked", "onChange"], gn = {
19
19
  class: "dropdown-item",
@@ -1 +1 @@
1
- "use strict";var S=Object.defineProperty,j=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var y=(i,r,s)=>r in i?S(i,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[r]=s,E=(i,r)=>{for(var s in r||(r={}))T.call(r,s)&&y(i,s,r[s]);if(C)for(var s of C(r))O.call(r,s)&&y(i,s,r[s]);return i},k=(i,r)=>j(i,w(r));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=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/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue"),I=require("./BaseComponent-BHUHnLj-.cjs"),g=require("./index-D7PZNHF4.cjs"),V=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),F={class:"filter-bar"},H={class:"filter-item"},x={class:"filter-item"},q={class:"filter-item"},L={class:"time-range-btns"},U=["onClick"],z={class:"filter-item"},W={DEFAULT_ICON:V.DEFAULT_ICON,ACTIVE_ICON:V.ACTIVE_ICON,NAME_CN:"降雨筛选栏",NAME_EN:"Rainfall Filter Bar",ORDER:1,PLATFORM:["pc","screen"]},P={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},linkChannel:{value:"rainfall",type:"select",label:"component.linkChannel",options:[{label:"降雨监测",value:"rainfall"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},$=[{name:"WATER101",object_id:"",region:"北帮"},{name:"WATER102",object_id:"",region:"北帮"},{name:"WATER201",object_id:"",region:"南帮"},{name:"WATER305",object_id:"",region:"东帮"},{name:"WATER410",object_id:"",region:"西帮"}],Q=["name","object_id","region"],G=["mosaic"],J={useAlias:!1,multiObject:!0,source:"mosaic"},K=50,X={DEFAULT:W,OPTIONS:P,DATA:$,PARAMS:Q,SOURCE:G,ITEMS:K,COMMON:J},Z=e.defineComponent(k(E({},X),{__name:"rainfallFilterBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){const r=i;class s extends I.BaseComponent{extractStyles(){var m,p,n,v;const t=(m=this.props.conf)==null?void 0:m.options,a=((p=t==null?void 0:t.linkChannel)==null?void 0:p.value)||"rainfall",u=((n=t==null?void 0:t.customChannel)==null?void 0:n.value)||"";return{bgColor:((v=t==null?void 0:t.bgColor)==null?void 0:v.value)||"#ffffff",linkChannel:a==="custom"&&u?u:a}}}const b=new s(r,"rainfallFilterBar");b.setupLifecycle();const h=b.getStyle(),d=e.computed(()=>{var t;const l=(t=r.conf)==null?void 0:t.data;return!l||!Array.isArray(l)?[]:l.filter(a=>a.name)}),R=e.computed(()=>{const l=new Set;return d.value.forEach(t=>{t.region&&l.add(t.region)}),Array.from(l)}),_=e.computed(()=>{let l=d.value;return o.region&&(l=l.filter(t=>t.region===o.region)),l.map(t=>({label:t.name,value:t.name}))}),N=[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}],c=d.value[0],o=e.reactive({region:(c==null?void 0:c.region)||"",points:c?[c.name]:[],timeRange:"1d",dateRange:[g.dayjs().subtract(1,"day").format("YYYY/MM/DD HH:mm"),g.dayjs().format("YYYY/MM/DD HH:mm")]}),Y=()=>{const l=_.value;o.points=l.length>0?[l[0].value]:[]},B=l=>{o.timeRange=l;const t=g.dayjs(),a=l==="1d"?t.subtract(1,"day"):l==="1w"?t.subtract(1,"week"):t.subtract(1,"month");o.dateRange=[a.format("YYYY/MM/DD HH:mm"),t.format("YYYY/MM/DD HH:mm")]},M=()=>{o.timeRange=""},A=()=>{if(r.mode==="edit"||o.points.length===0)return;const l=d.value.filter(a=>o.points.includes(a.name)),t=[...new Set(l.map(a=>a.object_id).filter(Boolean))];if(t.length===0){console.warn("[降雨筛选栏] 所选监测点未配置 object_id,无法发送联动");return}b.publish({type:"filter",region:o.region,selectedMonitors:o.points,objectId:t[0]||"",objectIds:t,sensors:l.map(a=>({name:a.name,objectId:a.object_id})),timeRange:o.timeRange,dateRange:[...o.dateRange]})},D=e.computed(()=>({backgroundColor:h.value.bgColor}));return(l,t)=>{const a=f.ElOption,u=f.ElSelect,m=f.ElDatePicker,p=f.ElButton;return e.openBlock(),e.createElementBlock("div",{class:"rainfall-filter-bar-wrap",style:e.normalizeStyle(D.value)},[e.createElementVNode("div",F,[e.createElementVNode("div",H,[t[3]||(t[3]=e.createElementVNode("span",{class:"filter-label"},"区域位置:",-1)),e.createVNode(u,{modelValue:o.region,"onUpdate:modelValue":t[0]||(t[0]=n=>o.region=n),placeholder:"全部区域",size:"small",style:{width:"120px"},onChange:Y},{default:e.withCtx(()=>[e.createVNode(a,{label:"全部区域",value:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,n=>(e.openBlock(),e.createBlock(a,{key:n,label:n,value:n},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",x,[t[4]||(t[4]=e.createElementVNode("span",{class:"filter-label"},"监测点:",-1)),e.createVNode(u,{modelValue:o.points,"onUpdate:modelValue":t[1]||(t[1]=n=>o.points=n),placeholder:"请选择",size:"small",style:{width:"180px"},multiple:"","collapse-tags":"","collapse-tags-tooltip":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,n=>(e.openBlock(),e.createBlock(a,{key:n.value,label:n.label,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",q,[t[5]||(t[5]=e.createElementVNode("span",{class:"filter-label"},"时间范围:",-1)),e.createElementVNode("div",L,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(N,n=>e.createElementVNode("button",{key:n.value,class:e.normalizeClass(["range-btn",{active:o.timeRange===n.value}]),onClick:v=>B(n.value)},e.toDisplayString(n.label),11,U)),64))])]),e.createElementVNode("div",z,[e.createVNode(m,{modelValue:o.dateRange,"onUpdate:modelValue":t[2]||(t[2]=n=>o.dateRange=n),type:"datetimerange",size:"small",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",style:{width:"340px"},onChange:M},null,8,["modelValue"])]),e.createVNode(p,{type:"primary",size:"small",onClick:A},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("查询",-1)])]),_:1})]),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),ee=g._export_sfc(Z,[["__scopeId","data-v-b151f568"]]);exports.default=ee;
1
+ "use strict";var S=Object.defineProperty,j=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var y=(i,r,s)=>r in i?S(i,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[r]=s,E=(i,r)=>{for(var s in r||(r={}))T.call(r,s)&&y(i,s,r[s]);if(C)for(var s of C(r))O.call(r,s)&&y(i,s,r[s]);return i},k=(i,r)=>j(i,w(r));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=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/select/style/css");require("element-plus/es/components/option/style/css");const e=require("vue"),I=require("./BaseComponent-DoQ1oLoA.cjs"),g=require("./index-BdWR_FTA.cjs"),V=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),F={class:"filter-bar"},H={class:"filter-item"},x={class:"filter-item"},q={class:"filter-item"},L={class:"time-range-btns"},U=["onClick"],z={class:"filter-item"},W={DEFAULT_ICON:V.DEFAULT_ICON,ACTIVE_ICON:V.ACTIVE_ICON,NAME_CN:"降雨筛选栏",NAME_EN:"Rainfall Filter Bar",ORDER:1,PLATFORM:["pc","screen"]},P={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},linkChannel:{value:"rainfall",type:"select",label:"component.linkChannel",options:[{label:"降雨监测",value:"rainfall"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},$=[{name:"WATER101",object_id:"",region:"北帮"},{name:"WATER102",object_id:"",region:"北帮"},{name:"WATER201",object_id:"",region:"南帮"},{name:"WATER305",object_id:"",region:"东帮"},{name:"WATER410",object_id:"",region:"西帮"}],Q=["name","object_id","region"],G=["mosaic"],J={useAlias:!1,multiObject:!0,source:"mosaic"},K=50,X={DEFAULT:W,OPTIONS:P,DATA:$,PARAMS:Q,SOURCE:G,ITEMS:K,COMMON:J},Z=e.defineComponent(k(E({},X),{__name:"rainfallFilterBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){const r=i;class s extends I.BaseComponent{extractStyles(){var m,p,n,v;const t=(m=this.props.conf)==null?void 0:m.options,a=((p=t==null?void 0:t.linkChannel)==null?void 0:p.value)||"rainfall",u=((n=t==null?void 0:t.customChannel)==null?void 0:n.value)||"";return{bgColor:((v=t==null?void 0:t.bgColor)==null?void 0:v.value)||"#ffffff",linkChannel:a==="custom"&&u?u:a}}}const b=new s(r,"rainfallFilterBar");b.setupLifecycle();const h=b.getStyle(),d=e.computed(()=>{var t;const l=(t=r.conf)==null?void 0:t.data;return!l||!Array.isArray(l)?[]:l.filter(a=>a.name)}),R=e.computed(()=>{const l=new Set;return d.value.forEach(t=>{t.region&&l.add(t.region)}),Array.from(l)}),_=e.computed(()=>{let l=d.value;return o.region&&(l=l.filter(t=>t.region===o.region)),l.map(t=>({label:t.name,value:t.name}))}),N=[{label:"一天内",value:"1d"},{label:"一周内",value:"1w"},{label:"一个月内",value:"1m"}],c=d.value[0],o=e.reactive({region:(c==null?void 0:c.region)||"",points:c?[c.name]:[],timeRange:"1d",dateRange:[g.dayjs().subtract(1,"day").format("YYYY/MM/DD HH:mm"),g.dayjs().format("YYYY/MM/DD HH:mm")]}),Y=()=>{const l=_.value;o.points=l.length>0?[l[0].value]:[]},B=l=>{o.timeRange=l;const t=g.dayjs(),a=l==="1d"?t.subtract(1,"day"):l==="1w"?t.subtract(1,"week"):t.subtract(1,"month");o.dateRange=[a.format("YYYY/MM/DD HH:mm"),t.format("YYYY/MM/DD HH:mm")]},M=()=>{o.timeRange=""},A=()=>{if(r.mode==="edit"||o.points.length===0)return;const l=d.value.filter(a=>o.points.includes(a.name)),t=[...new Set(l.map(a=>a.object_id).filter(Boolean))];if(t.length===0){console.warn("[降雨筛选栏] 所选监测点未配置 object_id,无法发送联动");return}b.publish({type:"filter",region:o.region,selectedMonitors:o.points,objectId:t[0]||"",objectIds:t,sensors:l.map(a=>({name:a.name,objectId:a.object_id})),timeRange:o.timeRange,dateRange:[...o.dateRange]})},D=e.computed(()=>({backgroundColor:h.value.bgColor}));return(l,t)=>{const a=f.ElOption,u=f.ElSelect,m=f.ElDatePicker,p=f.ElButton;return e.openBlock(),e.createElementBlock("div",{class:"rainfall-filter-bar-wrap",style:e.normalizeStyle(D.value)},[e.createElementVNode("div",F,[e.createElementVNode("div",H,[t[3]||(t[3]=e.createElementVNode("span",{class:"filter-label"},"区域位置:",-1)),e.createVNode(u,{modelValue:o.region,"onUpdate:modelValue":t[0]||(t[0]=n=>o.region=n),placeholder:"全部区域",size:"small",style:{width:"120px"},onChange:Y},{default:e.withCtx(()=>[e.createVNode(a,{label:"全部区域",value:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,n=>(e.openBlock(),e.createBlock(a,{key:n,label:n,value:n},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",x,[t[4]||(t[4]=e.createElementVNode("span",{class:"filter-label"},"监测点:",-1)),e.createVNode(u,{modelValue:o.points,"onUpdate:modelValue":t[1]||(t[1]=n=>o.points=n),placeholder:"请选择",size:"small",style:{width:"180px"},multiple:"","collapse-tags":"","collapse-tags-tooltip":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,n=>(e.openBlock(),e.createBlock(a,{key:n.value,label:n.label,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",q,[t[5]||(t[5]=e.createElementVNode("span",{class:"filter-label"},"时间范围:",-1)),e.createElementVNode("div",L,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(N,n=>e.createElementVNode("button",{key:n.value,class:e.normalizeClass(["range-btn",{active:o.timeRange===n.value}]),onClick:v=>B(n.value)},e.toDisplayString(n.label),11,U)),64))])]),e.createElementVNode("div",z,[e.createVNode(m,{modelValue:o.dateRange,"onUpdate:modelValue":t[2]||(t[2]=n=>o.dateRange=n),type:"datetimerange",size:"small",format:"YYYY/MM/DD HH:mm","value-format":"YYYY/MM/DD HH:mm","range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",style:{width:"340px"},onChange:M},null,8,["modelValue"])]),e.createVNode(p,{type:"primary",size:"small",onClick:A},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("查询",-1)])]),_:1})]),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),ee=g._export_sfc(Z,[["__scopeId","data-v-b151f568"]]);exports.default=ee;
@@ -17,8 +17,8 @@ import "element-plus/es/components/date-picker/style/css";
17
17
  import "element-plus/es/components/select/style/css";
18
18
  import "element-plus/es/components/option/style/css";
19
19
  import { defineComponent as Q, computed as b, reactive as q, openBlock as c, createElementBlock as v, normalizeStyle as G, createElementVNode as i, createVNode as d, withCtx as y, Fragment as R, renderList as h, createBlock as S, normalizeClass as J, toDisplayString as K, createTextVNode as X, renderSlot as Z } from "vue";
20
- import { B as ee } from "./BaseComponent-qzL33ZSL.js";
21
- import { d as Y, _ as te } from "./index-BHBE19E2.js";
20
+ import { B as ee } from "./BaseComponent-D82kw5vB.js";
21
+ import { d as Y, _ as te } from "./index-CCWU_se2.js";
22
22
  import { A as le, D as ne } from "./ele-vlu-icon-Bg6EHZdJ.js";
23
23
  const ae = { class: "filter-bar" }, oe = { class: "filter-item" }, se = { class: "filter-item" }, re = { class: "filter-item" }, ie = { class: "time-range-btns" }, ce = ["onClick"], me = { class: "filter-item" }, ue = {
24
24
  DEFAULT_ICON: ne,
@@ -34,9 +34,9 @@ import "element-plus/es/components/checkbox/style/css";
34
34
  import "element-plus/es/components/button/style/css";
35
35
  import "element-plus/es/components/icon/style/css";
36
36
  import { defineComponent as Ve, ref as H, computed as S, watch as ce, onMounted as Ye, openBlock as V, createElementBlock as z, normalizeStyle as ue, createElementVNode as h, createVNode as j, withCtx as w, createTextVNode as J, Fragment as fe, renderList as de, createBlock as Pe, toDisplayString as Q, unref as X, normalizeClass as Re, renderSlot as He } from "vue";
37
- import { d as F, _ as ze } from "./index-BHBE19E2.js";
37
+ import { d as F, _ as ze } from "./index-CCWU_se2.js";
38
38
  import "element-plus";
39
- import { E as Fe } from "./EChartComponentBase-BtAW2Yko.js";
39
+ import { E as Fe } from "./EChartComponentBase-DUyyaXgA.js";
40
40
  import { ArrowDown as Be, Download as Ue } from "@element-plus/icons-vue";
41
41
  import { A as qe, D as Ge } from "./ele-lin-icon-Dax-ZiWV.js";
42
42
  const Ke = { class: "chart-panel" }, We = { class: "panel-header" }, Ze = { class: "header-right" }, Je = { class: "indicator-selector-panel" }, Qe = { class: "indicator-select-all" }, Xe = { class: "legend-bar" }, et = { class: "legend-items" }, tt = ["onClick"], ot = { class: "legend-text" }, nt = ["id"], lt = {
@@ -350,7 +350,7 @@ const Ke = { class: "chart-panel" }, We = { class: "panel-header" }, Ze = { clas
350
350
  A.object_id = u;
351
351
  }), f.multiObject || (f.object_id = u);
352
352
  try {
353
- const A = yield import("./history-BDIdK3AY.js"), L = yield new A.default().getHistoryData(l, "rainfallTimeCurve");
353
+ const A = yield import("./history-CIAU9_hA.js"), L = yield new A.default().getHistoryData(l, "rainfallTimeCurve");
354
354
  if (k !== e) return;
355
355
  const te = (L == null ? void 0 : L.history) || (Array.isArray(L) ? L : []);
356
356
  te.length > 0 && r.forEach((y, xe) => {
@@ -1 +1 @@
1
- "use strict";var ve=Object.defineProperty,he=Object.defineProperties;var ge=Object.getOwnPropertyDescriptors;var J=Object.getOwnPropertySymbols,be=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,_e=Reflect.get;var Q=(p,a,i)=>a in p?ve(p,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[a]=i,X=(p,a)=>{for(var i in a||(a={}))ye.call(a,i)&&Q(p,i,a[i]);if(J)for(var i of J(a))Ce.call(a,i)&&Q(p,i,a[i]);return p},ee=(p,a)=>he(p,ge(a));var z=(p,a,i)=>_e(be(p),i,a);var q=(p,a,i)=>new Promise((N,g)=>{var v=_=>{try{j(i.next(_))}catch(A){g(A)}},S=_=>{try{j(i.throw(_))}catch(A){g(A)}},j=_=>_.done?N(_.value):Promise.resolve(_.value).then(v,S);j((i=i.apply(p,a)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/popover/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");const t=require("vue"),T=require("./index-D7PZNHF4.cjs");require("element-plus");const xe=require("./EChartComponentBase-C4s5HSfS.cjs"),te=require("@element-plus/icons-vue"),oe=require("./ele-lin-icon-Dke_1AmT.cjs"),Se={class:"chart-panel"},Ee={class:"panel-header"},we={class:"header-right"},Ne={class:"indicator-selector-panel"},je={class:"indicator-select-all"},Ve={class:"legend-bar"},ke={class:"legend-items"},Ie=["onClick"],Ae={class:"legend-text"},Me=["id"],Oe={DEFAULT_ICON:oe.DEFAULT_ICON,ACTIVE_ICON:oe.ACTIVE_ICON,NAME_CN:"降雨指标时序曲线",NAME_EN:"Rainfall Time Curve",ORDER:3,PLATFORM:["pc","screen"]},De={bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},panelBgColor:{value:"#ffffff",type:"color",label:"面板背景色"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},gridColor:{value:"#f0f0f0",type:"color",label:"网格线颜色"},linkChannel:{value:"rainfall",type:"select",label:"component.linkChannel",options:[{label:"降雨监测",value:"rainfall"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Te=[{name:"实时降水量(mm)",fv:"",object_id:"",color:"#5470c6",device:""},{name:"累计降水量(mm)",fv:"",object_id:"",color:"#ee6666",device:""}],Le=["name","fv","object_id","color","device"],$e=["mosaic","statistics","calculate"],qe={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Be=50,Pe={DEFAULT:Oe,OPTIONS:De,DATA:Te,PARAMS:Le,SOURCE:$e,ITEMS:Be,COMMON:qe},Ye=t.defineComponent(ee(X({},Pe),{__name:"rainfallTimeCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){const a=p,i=new Map,N=new Map,g=t.ref(new Map),v=t.ref([]);let S=0,j=null;const _=t.computed(()=>{var l,e;return(e=(l=a.conf)==null?void 0:l.common)!=null&&e.object_id?!0:P.value.some(n=>!!n.object_id)}),A=t.computed(()=>_.value||v.value.length>0);class L extends xe.EChartComponentBase{extractStyles(){var c,f,m,o,u,s,d;const e=(c=this.props.conf)==null?void 0:c.options,n=((f=e==null?void 0:e.linkChannel)==null?void 0:f.value)||"rainfall",r=((m=e==null?void 0:e.customChannel)==null?void 0:m.value)||"";return{bgColor:((o=e==null?void 0:e.bgColor)==null?void 0:o.value)||"#f5f7fa",panelBgColor:((u=e==null?void 0:e.panelBgColor)==null?void 0:u.value)||"#ffffff",textColor:((s=e==null?void 0:e.textColor)==null?void 0:s.value)||"#333333",gridColor:((d=e==null?void 0:e.gridColor)==null?void 0:d.value)||"#f0f0f0",linkChannel:n==="custom"&&r?r:n}}getChartOption(){return R(this.Style.value)}initHistory(){return q(this,null,function*(){const e=this.props.conf;if(!e)return[];e.options||(e.options={});const n=e.options.points,r=Object.prototype.hasOwnProperty.call(e.options,"points");(!n||Number(n)<24)&&(e.options.points=24);try{return yield z(L.prototype,this,"initHistory").call(this)}finally{r?e.options.points=n:delete e.options.points}})}onPreview(){return q(this,null,function*(){var n,r,c,f,m;const e=((r=(n=this.props.conf)==null?void 0:n.common)==null?void 0:r.object_id)||((m=(f=(c=this.props.conf)==null?void 0:c.data)==null?void 0:f[0])==null?void 0:m.object_id)||"";if(e&&v.value.length===0){v.value=[e],yield F([e]);return}yield z(L.prototype,this,"onPreview").call(this)})}setSocketData(e){var m;if(!e)return;const n=e.object_id||e.objectId||"";if(n&&v.value.length>0&&!v.value.includes(n))return;const r=e.datetime?e.datetime.split(".")[0]:T.dayjs().format("YYYY/MM/DD HH:mm"),c=((m=this.props.conf)==null?void 0:m.data)||[],f=v.value.length>1;c.forEach(o=>{if(o.device){const u=this.extractDataValue(e,o.device);if(u!=null&&String(u).trim()){const s=String(u).trim();f&&n?g.value.set(n,s):(N.set(o.name||o.fv,s),n&&g.value.set(n,s))}}}),c.forEach(o=>{if(!o.fv)return;const u=this.extractDataValue(e,o.fv);if(u==null)return;const s=f&&n?`${n}:${o.name||o.fv}`:o.name||o.fv,d=i.get(s);d?(d.times.push(r),d.values.push(parseFloat(u)),d.times.length>200&&(d.times.shift(),d.values.shift())):i.set(s,{times:[r],values:[parseFloat(u)]})}),this.chartObj&&this.chartObj.setOption(R(this.Style.value),!1)}onLinkEvent(e){de(e)}}const C=new L(a,"rainfallTimeCurve");C.setupLifecycle();const B=C.getStyle(),ne=C.getEchartId(),P=t.computed(()=>{var l;return((l=a.conf)==null?void 0:l.data)||[]}),b=t.computed(()=>{const l=new Set;return P.value.filter(e=>e.name&&!l.has(e.name)?(l.add(e.name),!0):!1)}),h=t.ref([]);t.watch(b,l=>{l.length>0&&h.value.length===0&&(h.value=l.map(e=>e.fv||e.name))},{immediate:!0});const U=t.computed({get:()=>b.value.length>0&&h.value.length===b.value.length,set:()=>{}}),le=t.computed(()=>{const l=h.value.length;return l>0&&l<b.value.length}),ae=t.computed(()=>{if(h.value.length===0)return"选择监测指标";if(h.value.length===b.value.length)return"全部指标已选";const e=b.value.filter(n=>h.value.includes(n.fv||n.name)).map(n=>n.name).join(", ");return e.length>14?e.substring(0,14)+"...":e}),se=l=>{h.value=l?b.value.map(e=>e.fv||e.name):[],V()},x=t.ref(new Set),re=t.computed(()=>{if(v.value.length>1){const e=[];for(const n of v.value){const r=g.value.get(n)||n.slice(-6);b.value.filter(c=>h.value.includes(c.fv||c.name)).forEach(c=>{e.push({name:`${r}-${c.name}`,color:c.color||"#5470c6",visible:!x.value.has(`${n}:${c.name}`)})})}return e}return b.value.filter(e=>h.value.includes(e.fv||e.name)).map(e=>{const n=N.get(e.name)||g.value.values().next().value||"";return{name:n?`${n}-${e.name}`:e.name,color:e.color||"#5470c6",visible:!x.value.has(e.name)}})}),ie=l=>{const e=l.name.includes("-")?l.name.split("-").slice(1).join("-"):l.name;x.value.has(e)?x.value.delete(e):x.value.add(e),x.value=new Set(x.value),V()},ce=t.computed(()=>({backgroundColor:B.value.bgColor,color:B.value.textColor})),Y=()=>{i.clear();const l=T.dayjs();P.value.forEach((e,n)=>{const r=[],c=[],f=[2800,3200],m=[200,300],o=f[n%2]||3e3,u=m[n%2]||200;for(let s=0;s<100;s++)r.push(l.subtract((100-s)*15,"minute").format("YYYY/MM/DD HH:mm")),c.push(+(o+(Math.random()-.5)*u+Math.sin(s/10)*u*.3).toFixed(2));i.set(e.name,{times:r,values:c})})},R=l=>{if(a.mode!=="edit"&&(!A.value||i.size===0))return{xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[]};let e=[];for(const[,o]of i)o.times.length>e.length&&(e=o.times);!e.length&&a.mode==="edit"&&(e=Array.from({length:50},(o,u)=>T.dayjs().subtract((50-u)*15,"minute").format("YYYY/MM/DD HH:mm")));const n={},r=v.value.length>1,c=["#5470c6","#ee6666","#fac858","#91cc75","#73c0de","#3ba272","#fc8452","#9a60b4"];let f=0,m=[];if(r&&a.mode!=="edit")for(const o of v.value){const u=g.value.get(o)||o.slice(-6);b.value.filter(s=>h.value.includes(s.fv||s.name)).forEach(s=>{const d=`${o}:${s.name}`,k=`${u}-${s.name}`,E=s.color||c[f%c.length];n[k]=!x.value.has(d);const $=i.get(d);m.push({name:k,type:"line",smooth:!0,showSymbol:!1,data:($==null?void 0:$.values)||[],lineStyle:{color:E,width:2.5,type:"solid"},itemStyle:{color:E}}),f++})}else m=b.value.filter(o=>h.value.includes(o.fv||o.name)).map(o=>{const u=N.get(o.name)||g.value.values().next().value||"",s=u?`${u}-${o.name}`:o.name;n[s]=!x.value.has(o.name);const d=i.get(o.name);return{name:s,type:"line",smooth:!0,showSymbol:!1,data:(d==null?void 0:d.values)||[],lineStyle:{color:o.color||"#5470c6",width:2.5,type:"solid"},itemStyle:{color:o.color||"#5470c6"}}});return{tooltip:{trigger:"axis",backgroundColor:"rgba(255,255,255,0.96)",borderColor:"#1c3d90",borderWidth:1,textStyle:{color:"#333",fontSize:12},axisPointer:{type:"cross"}},legend:{show:!1,selected:n},grid:{top:15,right:40,bottom:60,left:60},xAxis:{type:"category",data:e,axisLine:{lineStyle:{color:l.gridColor}},axisLabel:{color:l.textColor,fontSize:11,rotate:15,interval:"auto",formatter:o=>{var u;if(o&&o.length>6){const s=o.split(" ");return(((u=s[0])==null?void 0:u.split("/").slice(1).join("/"))||"")+(s[1]?" "+s[1]:"")}return o}},axisTick:{show:!1},boundaryGap:!1},yAxis:{type:"value",name:"监测数值",scale:!0,axisLine:{show:!1},axisLabel:{color:l.textColor,fontSize:11},splitLine:{lineStyle:{color:l.gridColor,type:"dashed"}}},dataZoom:[{type:"inside",xAxisIndex:0,filterMode:"none"},{type:"slider",height:18,bottom:8,borderColor:"transparent",backgroundColor:"#f0f0f0",fillerColor:"rgba(28, 61, 144, 0.2)",handleStyle:{color:"#1c3d90"},textStyle:{fontSize:10}}],series:m}},V=()=>{const l=C.getChartInstance();l&&l.setOption(R(B.value),!0)},ue=()=>{const l=C.getChartInstance();if(!l)return;const e=document.createElement("a");e.href=l.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),e.download=`降雨指标时序曲线_${T.dayjs().format("YYYYMMDDHHmmss")}.png`,e.click()},de=l=>{const{payload:e}=l;if(!e)return;if(e.type==="filter"){e.dateRange&&Array.isArray(e.dateRange)&&e.dateRange.length===2&&(j={start_time:e.dateRange[0],end_time:e.dateRange[1]});const r=e.objectIds&&e.objectIds.length>0?e.objectIds:e.objectId?[e.objectId]:[];r.length>0&&(v.value=r,F(r)),(a.mode==="edit"||r.length===0)&&(Y(),V());return}const n=e.objectId||e.object_id;n&&(v.value=[n],F([n]))},F=l=>q(null,null,function*(){var s;if(!l.length||a.mode!=="preview")return;const e=++S;i.clear(),g.value.clear(),N.clear();const n=(s=C.session)==null?void 0:s.value;if(!n)return;const r=a.conf.id;n.componentRequests&&n.componentRequests.delete(r),typeof n.unsubscribeComponent=="function"&&n.unsubscribeComponent(r);const{data:c,common:f}=a.conf,m=l.length>1;j&&(f.historyTimeRange=j),a.conf.options||(a.conf.options={});const o=a.conf.options.points,u=Object.prototype.hasOwnProperty.call(a.conf.options,"points");(!o||Number(o)<24)&&(a.conf.options.points=24);for(const d of l){if(S!==e)return;Array.isArray(c)&&c.forEach(E=>{E.object_id=d}),f.multiObject||(f.object_id=d);try{const E=yield Promise.resolve().then(()=>require("./history-D_NO9ojb.cjs")),M=yield new E.default().getHistoryData(a,"rainfallTimeCurve");if(S!==e)return;const G=(M==null?void 0:M.history)||(Array.isArray(M)?M:[]);G.length>0&&c.forEach((y,fe)=>{if(!y.fv)return;const K=G[fe];if(!Array.isArray(K))return;const me=[...K].sort((w,O)=>new Date(w.time||w.datetime||"").getTime()-new Date(O.time||O.datetime||"").getTime()),pe=m?`${d}:${y.name||y.fv}`:y.name||y.fv,H=[],W=[];me.forEach(w=>{const O=w.time||w.datetime,Z=w[y.fv];if(O&&Z!=null){const I=parseFloat(Z);isNaN(I)||(H.push(O.split(".")[0]),W.push(I))}if(y.device&&w[y.device]){const I=String(w[y.device]);m||N.set(y.name||y.fv,I),g.value.set(d,I)}}),H.length>0&&i.set(pe,{times:H,values:W})})}catch(E){console.warn("[降雨时序曲线] 历史数据获取失败:",E)}if(S!==e)return;const k=C.getSource();C.subscribeBySource(k,d)}u?a.conf.options.points=o:delete a.conf.options.points,S===e&&(V(),n.registerComponent({id:r,request:null,onUpdate:(d,k)=>{S===e&&d==="realtime"&&C.setSocketData(k)}}))});return t.onMounted(()=>{a.mode==="edit"&&Y(),setTimeout(()=>{var l;return(l=C.getChartInstance())==null?void 0:l.resize()},200)}),t.watch(()=>a.conf,()=>{a.mode==="edit"&&(Y(),V())},{deep:!0}),(l,e)=>{const n=D.ElIcon,r=D.ElButton,c=D.ElCheckbox,f=D.ElCheckboxGroup,m=D.ElPopover;return t.openBlock(),t.createElementBlock("div",{class:"rainfall-time-curve",style:t.normalizeStyle(ce.value)},[t.createElementVNode("div",Se,[t.createElementVNode("div",Ee,[e[4]||(e[4]=t.createElementVNode("div",{class:"header-left"},[t.createElementVNode("span",{class:"indicator-dot"}),t.createElementVNode("span",{class:"panel-title"},"📊 指标时序演变曲线")],-1)),t.createElementVNode("div",we,[t.createVNode(m,{placement:"bottom-start",width:220,trigger:"click"},{reference:t.withCtx(()=>[t.createVNode(r,{size:"small"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(ae.value)+" ",1),t.createVNode(n,{class:"el-icon--right"},{default:t.withCtx(()=>[t.createVNode(t.unref(te.ArrowDown))]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",Ne,[t.createElementVNode("div",je,[t.createVNode(c,{modelValue:U.value,"onUpdate:modelValue":e[0]||(e[0]=o=>U.value=o),indeterminate:le.value,onChange:se},{default:t.withCtx(()=>[...e[2]||(e[2]=[t.createTextVNode(" 全部指标 ",-1)])]),_:1},8,["modelValue","indeterminate"])]),t.createVNode(f,{modelValue:h.value,"onUpdate:modelValue":e[1]||(e[1]=o=>h.value=o),onChange:V},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,o=>(t.openBlock(),t.createBlock(c,{key:o.fv,label:o.fv,class:"indicator-checkbox-item"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])]),_:1}),t.createVNode(r,{size:"small",onClick:ue},{default:t.withCtx(()=>[t.createVNode(n,null,{default:t.withCtx(()=>[t.createVNode(t.unref(te.Download))]),_:1}),e[3]||(e[3]=t.createElementVNode("span",null,"导出图像",-1))]),_:1})])]),t.createElementVNode("div",Ve,[t.createElementVNode("div",ke,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(re.value,o=>(t.openBlock(),t.createElementBlock("span",{key:o.name,class:t.normalizeClass(["legend-item",{disabled:!o.visible}]),onClick:u=>ie(o)},[t.createElementVNode("span",{class:"legend-line",style:t.normalizeStyle({borderTopColor:o.visible?o.color:"#ccc",borderTopStyle:"solid"})},null,4),t.createElementVNode("span",Ae,t.toDisplayString(o.name),1)],10,Ie))),128))])]),t.createElementVNode("div",{id:t.unref(ne),class:"chart-container"},null,8,Me)]),t.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Re=T._export_sfc(Ye,[["__scopeId","data-v-ead6ecc7"]]);exports.default=Re;
1
+ "use strict";var ve=Object.defineProperty,he=Object.defineProperties;var ge=Object.getOwnPropertyDescriptors;var J=Object.getOwnPropertySymbols,be=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,_e=Reflect.get;var Q=(p,a,i)=>a in p?ve(p,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[a]=i,X=(p,a)=>{for(var i in a||(a={}))ye.call(a,i)&&Q(p,i,a[i]);if(J)for(var i of J(a))Ce.call(a,i)&&Q(p,i,a[i]);return p},ee=(p,a)=>he(p,ge(a));var z=(p,a,i)=>_e(be(p),i,a);var q=(p,a,i)=>new Promise((N,g)=>{var v=_=>{try{j(i.next(_))}catch(A){g(A)}},S=_=>{try{j(i.throw(_))}catch(A){g(A)}},j=_=>_.done?N(_.value):Promise.resolve(_.value).then(v,S);j((i=i.apply(p,a)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/popover/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");const t=require("vue"),T=require("./index-BdWR_FTA.cjs");require("element-plus");const xe=require("./EChartComponentBase-ejDV5NEw.cjs"),te=require("@element-plus/icons-vue"),oe=require("./ele-lin-icon-Dke_1AmT.cjs"),Se={class:"chart-panel"},Ee={class:"panel-header"},we={class:"header-right"},Ne={class:"indicator-selector-panel"},je={class:"indicator-select-all"},Ve={class:"legend-bar"},ke={class:"legend-items"},Ie=["onClick"],Ae={class:"legend-text"},Me=["id"],Oe={DEFAULT_ICON:oe.DEFAULT_ICON,ACTIVE_ICON:oe.ACTIVE_ICON,NAME_CN:"降雨指标时序曲线",NAME_EN:"Rainfall Time Curve",ORDER:3,PLATFORM:["pc","screen"]},De={bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},panelBgColor:{value:"#ffffff",type:"color",label:"面板背景色"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},gridColor:{value:"#f0f0f0",type:"color",label:"网格线颜色"},linkChannel:{value:"rainfall",type:"select",label:"component.linkChannel",options:[{label:"降雨监测",value:"rainfall"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Te=[{name:"实时降水量(mm)",fv:"",object_id:"",color:"#5470c6",device:""},{name:"累计降水量(mm)",fv:"",object_id:"",color:"#ee6666",device:""}],Le=["name","fv","object_id","color","device"],$e=["mosaic","statistics","calculate"],qe={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Be=50,Pe={DEFAULT:Oe,OPTIONS:De,DATA:Te,PARAMS:Le,SOURCE:$e,ITEMS:Be,COMMON:qe},Ye=t.defineComponent(ee(X({},Pe),{__name:"rainfallTimeCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){const a=p,i=new Map,N=new Map,g=t.ref(new Map),v=t.ref([]);let S=0,j=null;const _=t.computed(()=>{var l,e;return(e=(l=a.conf)==null?void 0:l.common)!=null&&e.object_id?!0:P.value.some(n=>!!n.object_id)}),A=t.computed(()=>_.value||v.value.length>0);class L extends xe.EChartComponentBase{extractStyles(){var c,f,m,o,u,s,d;const e=(c=this.props.conf)==null?void 0:c.options,n=((f=e==null?void 0:e.linkChannel)==null?void 0:f.value)||"rainfall",r=((m=e==null?void 0:e.customChannel)==null?void 0:m.value)||"";return{bgColor:((o=e==null?void 0:e.bgColor)==null?void 0:o.value)||"#f5f7fa",panelBgColor:((u=e==null?void 0:e.panelBgColor)==null?void 0:u.value)||"#ffffff",textColor:((s=e==null?void 0:e.textColor)==null?void 0:s.value)||"#333333",gridColor:((d=e==null?void 0:e.gridColor)==null?void 0:d.value)||"#f0f0f0",linkChannel:n==="custom"&&r?r:n}}getChartOption(){return R(this.Style.value)}initHistory(){return q(this,null,function*(){const e=this.props.conf;if(!e)return[];e.options||(e.options={});const n=e.options.points,r=Object.prototype.hasOwnProperty.call(e.options,"points");(!n||Number(n)<24)&&(e.options.points=24);try{return yield z(L.prototype,this,"initHistory").call(this)}finally{r?e.options.points=n:delete e.options.points}})}onPreview(){return q(this,null,function*(){var n,r,c,f,m;const e=((r=(n=this.props.conf)==null?void 0:n.common)==null?void 0:r.object_id)||((m=(f=(c=this.props.conf)==null?void 0:c.data)==null?void 0:f[0])==null?void 0:m.object_id)||"";if(e&&v.value.length===0){v.value=[e],yield F([e]);return}yield z(L.prototype,this,"onPreview").call(this)})}setSocketData(e){var m;if(!e)return;const n=e.object_id||e.objectId||"";if(n&&v.value.length>0&&!v.value.includes(n))return;const r=e.datetime?e.datetime.split(".")[0]:T.dayjs().format("YYYY/MM/DD HH:mm"),c=((m=this.props.conf)==null?void 0:m.data)||[],f=v.value.length>1;c.forEach(o=>{if(o.device){const u=this.extractDataValue(e,o.device);if(u!=null&&String(u).trim()){const s=String(u).trim();f&&n?g.value.set(n,s):(N.set(o.name||o.fv,s),n&&g.value.set(n,s))}}}),c.forEach(o=>{if(!o.fv)return;const u=this.extractDataValue(e,o.fv);if(u==null)return;const s=f&&n?`${n}:${o.name||o.fv}`:o.name||o.fv,d=i.get(s);d?(d.times.push(r),d.values.push(parseFloat(u)),d.times.length>200&&(d.times.shift(),d.values.shift())):i.set(s,{times:[r],values:[parseFloat(u)]})}),this.chartObj&&this.chartObj.setOption(R(this.Style.value),!1)}onLinkEvent(e){de(e)}}const C=new L(a,"rainfallTimeCurve");C.setupLifecycle();const B=C.getStyle(),ne=C.getEchartId(),P=t.computed(()=>{var l;return((l=a.conf)==null?void 0:l.data)||[]}),b=t.computed(()=>{const l=new Set;return P.value.filter(e=>e.name&&!l.has(e.name)?(l.add(e.name),!0):!1)}),h=t.ref([]);t.watch(b,l=>{l.length>0&&h.value.length===0&&(h.value=l.map(e=>e.fv||e.name))},{immediate:!0});const U=t.computed({get:()=>b.value.length>0&&h.value.length===b.value.length,set:()=>{}}),le=t.computed(()=>{const l=h.value.length;return l>0&&l<b.value.length}),ae=t.computed(()=>{if(h.value.length===0)return"选择监测指标";if(h.value.length===b.value.length)return"全部指标已选";const e=b.value.filter(n=>h.value.includes(n.fv||n.name)).map(n=>n.name).join(", ");return e.length>14?e.substring(0,14)+"...":e}),se=l=>{h.value=l?b.value.map(e=>e.fv||e.name):[],V()},x=t.ref(new Set),re=t.computed(()=>{if(v.value.length>1){const e=[];for(const n of v.value){const r=g.value.get(n)||n.slice(-6);b.value.filter(c=>h.value.includes(c.fv||c.name)).forEach(c=>{e.push({name:`${r}-${c.name}`,color:c.color||"#5470c6",visible:!x.value.has(`${n}:${c.name}`)})})}return e}return b.value.filter(e=>h.value.includes(e.fv||e.name)).map(e=>{const n=N.get(e.name)||g.value.values().next().value||"";return{name:n?`${n}-${e.name}`:e.name,color:e.color||"#5470c6",visible:!x.value.has(e.name)}})}),ie=l=>{const e=l.name.includes("-")?l.name.split("-").slice(1).join("-"):l.name;x.value.has(e)?x.value.delete(e):x.value.add(e),x.value=new Set(x.value),V()},ce=t.computed(()=>({backgroundColor:B.value.bgColor,color:B.value.textColor})),Y=()=>{i.clear();const l=T.dayjs();P.value.forEach((e,n)=>{const r=[],c=[],f=[2800,3200],m=[200,300],o=f[n%2]||3e3,u=m[n%2]||200;for(let s=0;s<100;s++)r.push(l.subtract((100-s)*15,"minute").format("YYYY/MM/DD HH:mm")),c.push(+(o+(Math.random()-.5)*u+Math.sin(s/10)*u*.3).toFixed(2));i.set(e.name,{times:r,values:c})})},R=l=>{if(a.mode!=="edit"&&(!A.value||i.size===0))return{xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[]};let e=[];for(const[,o]of i)o.times.length>e.length&&(e=o.times);!e.length&&a.mode==="edit"&&(e=Array.from({length:50},(o,u)=>T.dayjs().subtract((50-u)*15,"minute").format("YYYY/MM/DD HH:mm")));const n={},r=v.value.length>1,c=["#5470c6","#ee6666","#fac858","#91cc75","#73c0de","#3ba272","#fc8452","#9a60b4"];let f=0,m=[];if(r&&a.mode!=="edit")for(const o of v.value){const u=g.value.get(o)||o.slice(-6);b.value.filter(s=>h.value.includes(s.fv||s.name)).forEach(s=>{const d=`${o}:${s.name}`,k=`${u}-${s.name}`,E=s.color||c[f%c.length];n[k]=!x.value.has(d);const $=i.get(d);m.push({name:k,type:"line",smooth:!0,showSymbol:!1,data:($==null?void 0:$.values)||[],lineStyle:{color:E,width:2.5,type:"solid"},itemStyle:{color:E}}),f++})}else m=b.value.filter(o=>h.value.includes(o.fv||o.name)).map(o=>{const u=N.get(o.name)||g.value.values().next().value||"",s=u?`${u}-${o.name}`:o.name;n[s]=!x.value.has(o.name);const d=i.get(o.name);return{name:s,type:"line",smooth:!0,showSymbol:!1,data:(d==null?void 0:d.values)||[],lineStyle:{color:o.color||"#5470c6",width:2.5,type:"solid"},itemStyle:{color:o.color||"#5470c6"}}});return{tooltip:{trigger:"axis",backgroundColor:"rgba(255,255,255,0.96)",borderColor:"#1c3d90",borderWidth:1,textStyle:{color:"#333",fontSize:12},axisPointer:{type:"cross"}},legend:{show:!1,selected:n},grid:{top:15,right:40,bottom:60,left:60},xAxis:{type:"category",data:e,axisLine:{lineStyle:{color:l.gridColor}},axisLabel:{color:l.textColor,fontSize:11,rotate:15,interval:"auto",formatter:o=>{var u;if(o&&o.length>6){const s=o.split(" ");return(((u=s[0])==null?void 0:u.split("/").slice(1).join("/"))||"")+(s[1]?" "+s[1]:"")}return o}},axisTick:{show:!1},boundaryGap:!1},yAxis:{type:"value",name:"监测数值",scale:!0,axisLine:{show:!1},axisLabel:{color:l.textColor,fontSize:11},splitLine:{lineStyle:{color:l.gridColor,type:"dashed"}}},dataZoom:[{type:"inside",xAxisIndex:0,filterMode:"none"},{type:"slider",height:18,bottom:8,borderColor:"transparent",backgroundColor:"#f0f0f0",fillerColor:"rgba(28, 61, 144, 0.2)",handleStyle:{color:"#1c3d90"},textStyle:{fontSize:10}}],series:m}},V=()=>{const l=C.getChartInstance();l&&l.setOption(R(B.value),!0)},ue=()=>{const l=C.getChartInstance();if(!l)return;const e=document.createElement("a");e.href=l.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),e.download=`降雨指标时序曲线_${T.dayjs().format("YYYYMMDDHHmmss")}.png`,e.click()},de=l=>{const{payload:e}=l;if(!e)return;if(e.type==="filter"){e.dateRange&&Array.isArray(e.dateRange)&&e.dateRange.length===2&&(j={start_time:e.dateRange[0],end_time:e.dateRange[1]});const r=e.objectIds&&e.objectIds.length>0?e.objectIds:e.objectId?[e.objectId]:[];r.length>0&&(v.value=r,F(r)),(a.mode==="edit"||r.length===0)&&(Y(),V());return}const n=e.objectId||e.object_id;n&&(v.value=[n],F([n]))},F=l=>q(null,null,function*(){var s;if(!l.length||a.mode!=="preview")return;const e=++S;i.clear(),g.value.clear(),N.clear();const n=(s=C.session)==null?void 0:s.value;if(!n)return;const r=a.conf.id;n.componentRequests&&n.componentRequests.delete(r),typeof n.unsubscribeComponent=="function"&&n.unsubscribeComponent(r);const{data:c,common:f}=a.conf,m=l.length>1;j&&(f.historyTimeRange=j),a.conf.options||(a.conf.options={});const o=a.conf.options.points,u=Object.prototype.hasOwnProperty.call(a.conf.options,"points");(!o||Number(o)<24)&&(a.conf.options.points=24);for(const d of l){if(S!==e)return;Array.isArray(c)&&c.forEach(E=>{E.object_id=d}),f.multiObject||(f.object_id=d);try{const E=yield Promise.resolve().then(()=>require("./history-BNN6YYlw.cjs")),M=yield new E.default().getHistoryData(a,"rainfallTimeCurve");if(S!==e)return;const G=(M==null?void 0:M.history)||(Array.isArray(M)?M:[]);G.length>0&&c.forEach((y,fe)=>{if(!y.fv)return;const K=G[fe];if(!Array.isArray(K))return;const me=[...K].sort((w,O)=>new Date(w.time||w.datetime||"").getTime()-new Date(O.time||O.datetime||"").getTime()),pe=m?`${d}:${y.name||y.fv}`:y.name||y.fv,H=[],W=[];me.forEach(w=>{const O=w.time||w.datetime,Z=w[y.fv];if(O&&Z!=null){const I=parseFloat(Z);isNaN(I)||(H.push(O.split(".")[0]),W.push(I))}if(y.device&&w[y.device]){const I=String(w[y.device]);m||N.set(y.name||y.fv,I),g.value.set(d,I)}}),H.length>0&&i.set(pe,{times:H,values:W})})}catch(E){console.warn("[降雨时序曲线] 历史数据获取失败:",E)}if(S!==e)return;const k=C.getSource();C.subscribeBySource(k,d)}u?a.conf.options.points=o:delete a.conf.options.points,S===e&&(V(),n.registerComponent({id:r,request:null,onUpdate:(d,k)=>{S===e&&d==="realtime"&&C.setSocketData(k)}}))});return t.onMounted(()=>{a.mode==="edit"&&Y(),setTimeout(()=>{var l;return(l=C.getChartInstance())==null?void 0:l.resize()},200)}),t.watch(()=>a.conf,()=>{a.mode==="edit"&&(Y(),V())},{deep:!0}),(l,e)=>{const n=D.ElIcon,r=D.ElButton,c=D.ElCheckbox,f=D.ElCheckboxGroup,m=D.ElPopover;return t.openBlock(),t.createElementBlock("div",{class:"rainfall-time-curve",style:t.normalizeStyle(ce.value)},[t.createElementVNode("div",Se,[t.createElementVNode("div",Ee,[e[4]||(e[4]=t.createElementVNode("div",{class:"header-left"},[t.createElementVNode("span",{class:"indicator-dot"}),t.createElementVNode("span",{class:"panel-title"},"📊 指标时序演变曲线")],-1)),t.createElementVNode("div",we,[t.createVNode(m,{placement:"bottom-start",width:220,trigger:"click"},{reference:t.withCtx(()=>[t.createVNode(r,{size:"small"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(ae.value)+" ",1),t.createVNode(n,{class:"el-icon--right"},{default:t.withCtx(()=>[t.createVNode(t.unref(te.ArrowDown))]),_:1})]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",Ne,[t.createElementVNode("div",je,[t.createVNode(c,{modelValue:U.value,"onUpdate:modelValue":e[0]||(e[0]=o=>U.value=o),indeterminate:le.value,onChange:se},{default:t.withCtx(()=>[...e[2]||(e[2]=[t.createTextVNode(" 全部指标 ",-1)])]),_:1},8,["modelValue","indeterminate"])]),t.createVNode(f,{modelValue:h.value,"onUpdate:modelValue":e[1]||(e[1]=o=>h.value=o),onChange:V},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,o=>(t.openBlock(),t.createBlock(c,{key:o.fv,label:o.fv,class:"indicator-checkbox-item"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])]),_:1}),t.createVNode(r,{size:"small",onClick:ue},{default:t.withCtx(()=>[t.createVNode(n,null,{default:t.withCtx(()=>[t.createVNode(t.unref(te.Download))]),_:1}),e[3]||(e[3]=t.createElementVNode("span",null,"导出图像",-1))]),_:1})])]),t.createElementVNode("div",Ve,[t.createElementVNode("div",ke,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(re.value,o=>(t.openBlock(),t.createElementBlock("span",{key:o.name,class:t.normalizeClass(["legend-item",{disabled:!o.visible}]),onClick:u=>ie(o)},[t.createElementVNode("span",{class:"legend-line",style:t.normalizeStyle({borderTopColor:o.visible?o.color:"#ccc",borderTopStyle:"solid"})},null,4),t.createElementVNode("span",Ae,t.toDisplayString(o.name),1)],10,Ie))),128))])]),t.createElementVNode("div",{id:t.unref(ne),class:"chart-container"},null,8,Me)]),t.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Re=T._export_sfc(Ye,[["__scopeId","data-v-ead6ecc7"]]);exports.default=Re;
@@ -1,3 +1,3 @@
1
- "use strict";var F=Object.defineProperty,H=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var z=(c,r,l)=>r in c?F(c,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):c[r]=l,L=(c,r)=>{for(var l in r||(r={}))j.call(r,l)&&z(c,l,r[l]);if(q)for(var l of q(r))G.call(r,l)&&z(c,l,r[l]);return c},V=(c,r)=>H(c,B(r));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),b=require("./BaseComponent-BHUHnLj-.cjs"),f=require("./index-D7PZNHF4.cjs"),Z=require("./titleStyle-NSnz6cUg.cjs"),k=require("./ele-dzc-icon-h5wOUHF0.cjs"),J=require("./installMarkArea-CjyaJPLE.cjs"),v=require("./installCanvasRenderer-CyhM1Qpl.cjs"),K=require("./install-C8buXQPI.cjs"),Q=require("./install-CIT6k8Ga.cjs"),W=require("./install-z6wShIZI.cjs"),X=require("./install-CYwVETsi.cjs"),Y=require("./universalTransition-CIN_u2Cu.cjs"),N=require("./echarts-BB8O2KSA.cjs"),ee={DEFAULT_ICON:k.DEFAULT_ICON,ACTIVE_ICON:k.ACTIVE_ICON,NAME_CN:"区间曲线",NAME_EN:"Range Line",ORDER:6,PLATFORM:["pc","screen","mobile"]},te={titleColor:"#111",bgColor:"#fff",textColor:"#111",lineColor:"#314656",top:30,bottom:40,left:20,right:20,radiusSize:8,textSize:12,points:30,isHideTitle:!1,isSmooth:!1},M=[{name:"参数一",项目编号:"",object_id:""}],ne=["name","项目编号","object_id"],ie=["index","deviation","stability","balance","increment","risk","eigen"],oe={useAlias:!1,null:{type:"0",value:""},source:"index"},re=1,ae={DEFAULT:ee,OPTIONS:te,DATA:M,PARAMS:ne,SOURCE:ie,ITEMS:re,COMMON:oe},le=n.defineComponent(V(L({},ae),{__name:"rangeLin",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(c){v.use([v.install,K.install,Q.install,J.install,W.install,X.install,v.install$1,Y.installUniversalTransition]);const r=n.ref(n.inject("session",null)),l="rangelin_"+Math.random().toString(16).substring(4,12),R=["rgba(255, 173, 177, 0.2)","rgba(208, 201, 116, 0.2)","rgba(28, 118, 140, 1)","rgba(95, 28, 140, 1)","rgba(41, 196, 21, 1)"],A=["rgb(255, 173, 177)","rgb(208, 201, 116)","rgb(28, 118, 140)","rgb(95, 28, 140)","rgb(41, 196, 21)"];let s=null,y=null;const o=c;let a={area:[],pieces:[],data:[],times:[]};class I extends b.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),lineColor:this.getOptionValue("lineColor","#314656"),radiusSize:this.getOptionValue("radiusSize",4),textSize:this.getOptionValue("textSize",12),points:this.getOptionValue("points",30),isHideTitle:this.getOptionValue("isHideTitle",!1),isSmooth:this.getOptionValue("isSmooth",!1)}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:M,o.mode==="edit"&&$(),n.nextTick(()=>{let e=document.querySelector("#"+l);e&&(s||(s=N.init(e),y=f.elementResizeDetectorMaker({strategy:"scroll"}),y.listenTo(e,()=>s==null?void 0:s.resize())),s.setOption(D(),!0))})}onPreview(){T.preview()}cleanup(){y&&y.uninstall(document.querySelector("#"+l)),s&&s.clear(),s&&N.dispose(s),s=null,T.unregister()}}const _=new I(o,"rangeLin");_.setupLifecycle();const p=_.getStyle(),w=n.computed(()=>Z.generateTitleStyle(o.conf.options)),D=()=>{var S,m,C,i;const{data:t,options:e}=o.conf;let d=t[0]||{};var g={tooltip:{trigger:"axis"},xAxis:{type:"category",boundaryGap:!1,data:a.times,axisLabel:{formatter:function(u,h){if(!/^[1-9]\d{3}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(u))return u;let x=u.split(" ");return x[0]+`
1
+ "use strict";var F=Object.defineProperty,H=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var q=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var z=(c,r,l)=>r in c?F(c,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):c[r]=l,L=(c,r)=>{for(var l in r||(r={}))j.call(r,l)&&z(c,l,r[l]);if(q)for(var l of q(r))G.call(r,l)&&z(c,l,r[l]);return c},V=(c,r)=>H(c,B(r));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),b=require("./BaseComponent-DoQ1oLoA.cjs"),f=require("./index-BdWR_FTA.cjs"),Z=require("./titleStyle-NSnz6cUg.cjs"),k=require("./ele-dzc-icon-h5wOUHF0.cjs"),J=require("./installMarkArea-CjyaJPLE.cjs"),v=require("./installCanvasRenderer-CyhM1Qpl.cjs"),K=require("./install-C8buXQPI.cjs"),Q=require("./install-CIT6k8Ga.cjs"),W=require("./install-z6wShIZI.cjs"),X=require("./install-CYwVETsi.cjs"),Y=require("./universalTransition-CIN_u2Cu.cjs"),N=require("./echarts-BB8O2KSA.cjs"),ee={DEFAULT_ICON:k.DEFAULT_ICON,ACTIVE_ICON:k.ACTIVE_ICON,NAME_CN:"区间曲线",NAME_EN:"Range Line",ORDER:6,PLATFORM:["pc","screen","mobile"]},te={titleColor:"#111",bgColor:"#fff",textColor:"#111",lineColor:"#314656",top:30,bottom:40,left:20,right:20,radiusSize:8,textSize:12,points:30,isHideTitle:!1,isSmooth:!1},M=[{name:"参数一",项目编号:"",object_id:""}],ne=["name","项目编号","object_id"],ie=["index","deviation","stability","balance","increment","risk","eigen"],oe={useAlias:!1,null:{type:"0",value:""},source:"index"},re=1,ae={DEFAULT:ee,OPTIONS:te,DATA:M,PARAMS:ne,SOURCE:ie,ITEMS:re,COMMON:oe},le=n.defineComponent(V(L({},ae),{__name:"rangeLin",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(c){v.use([v.install,K.install,Q.install,J.install,W.install,X.install,v.install$1,Y.installUniversalTransition]);const r=n.ref(n.inject("session",null)),l="rangelin_"+Math.random().toString(16).substring(4,12),R=["rgba(255, 173, 177, 0.2)","rgba(208, 201, 116, 0.2)","rgba(28, 118, 140, 1)","rgba(95, 28, 140, 1)","rgba(41, 196, 21, 1)"],A=["rgb(255, 173, 177)","rgb(208, 201, 116)","rgb(28, 118, 140)","rgb(95, 28, 140)","rgb(41, 196, 21)"];let s=null,y=null;const o=c;let a={area:[],pieces:[],data:[],times:[]};class I extends b.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),lineColor:this.getOptionValue("lineColor","#314656"),radiusSize:this.getOptionValue("radiusSize",4),textSize:this.getOptionValue("textSize",12),points:this.getOptionValue("points",30),isHideTitle:this.getOptionValue("isHideTitle",!1),isSmooth:this.getOptionValue("isSmooth",!1)}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:M,o.mode==="edit"&&$(),n.nextTick(()=>{let e=document.querySelector("#"+l);e&&(s||(s=N.init(e),y=f.elementResizeDetectorMaker({strategy:"scroll"}),y.listenTo(e,()=>s==null?void 0:s.resize())),s.setOption(D(),!0))})}onPreview(){T.preview()}cleanup(){y&&y.uninstall(document.querySelector("#"+l)),s&&s.clear(),s&&N.dispose(s),s=null,T.unregister()}}const _=new I(o,"rangeLin");_.setupLifecycle();const p=_.getStyle(),w=n.computed(()=>Z.generateTitleStyle(o.conf.options)),D=()=>{var S,m,C,i;const{data:t,options:e}=o.conf;let d=t[0]||{};var g={tooltip:{trigger:"axis"},xAxis:{type:"category",boundaryGap:!1,data:a.times,axisLabel:{formatter:function(u,h){if(!/^[1-9]\d{3}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(u))return u;let x=u.split(" ");return x[0]+`
2
2
  `+x[1]},color:p.value.textColor,fontSize:p.value.textSize}},yAxis:{type:"value",axisPointer:{snap:!0}},grid:{top:((S=e==null?void 0:e.top)==null?void 0:S.value)||30,bottom:((m=e==null?void 0:e.bottom)==null?void 0:m.value)||40,left:((C=e==null?void 0:e.left)==null?void 0:C.value)||40,right:((i=e==null?void 0:e.right)==null?void 0:i.value)||20,containLabel:!0},visualMap:{show:!1,dimension:0,pieces:a.pieces},dataZoom:[{type:"slider",start:80,end:100,height:15,bottom:15,borderColor:"#e5e5e5",textStyle:{color:p.value.textColor},labelFormatter:function(u,h){if(!/^[1-9]\d{3}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(h))return h;let x=h.split(" ");return x[0]+`
3
3
  `+x[1]}},{type:"inside"}],series:[{name:(d==null?void 0:d.name)||"",type:"line",smooth:p.value.isSmooth,data:a.data,markArea:{data:a.area}}]};return g},$=()=>{var d;const t=f.hasDataSource(o.conf);let e=(d=p.value.points)!=null?d:30;a.area=[[{name:"区间一",xAxis:f.getxAxisDataTime(e,o.mode,t)[e-5]},{xAxis:f.getxAxisDataTime(e,o.mode,t)[e-10]}]],a.data=f.getRandomArr({num:e,max:200,min:0,mode:o.mode,hasDataSource:t}),a.times=f.getxAxisDataTime(e,o.mode,t),a.pieces=[{lte:e-10,color:p.value.lineColor},{gt:e-10,lte:e-5,color:A[0]},{gt:e-5,color:p.value.lineColor}]},P=(t,e)=>{let d=Array.from({length:t},(i,u)=>u),g=[];for(let i in e)g.push(...e[i]);let S=new Array(t).fill(!1);for(let[i,u]of g)for(let h=i;h<u;h++)S[h]=!0;return d.filter(i=>!S[i]).reduce((i,u)=>(i.length===0||u-i[i.length-1][1]>1?i.push([u,u]):i[i.length-1][1]=u,i),[])},U=t=>{if(!f.hasDataSource(o.conf))return;a.times=t.times,a.data=t.data,a.area=[],a.pieces=[];let e=0;for(let g in t.range)t.range[g]&&t.range[g].forEach(m=>{a.pieces.push({gte:m[0],lte:m[1],color:A[e]}),a.area.push([{name:g,xAxis:m[0],itemStyle:{color:R[e]}},{xAxis:t.times[m[1]]}])}),e++;let d=P(t.data.length,t.range);d.length&&d.forEach(g=>{a.pieces.push({gte:g[0]-1,lte:g[1]+1,color:p.value.lineColor})}),s==null||s.setOption(D(),!0)},O=t=>{f.hasDataSource(o.conf)},T={preview:()=>b.preview(o,r.value,U,O,"rangeLin"),unregister:()=>b.unregister(o,r.value)};n.watchEffect(()=>{o.conf.socketData&&O(o.conf.socketData)});const E=o.conf;return(t,e)=>(n.openBlock(),n.createElementBlock("div",{class:"mix-component",style:n.normalizeStyle({background:n.unref(p).bgColor,borderRadius:`${n.unref(p).radiusSize}px`})},[n.createElementVNode("div",{class:"mix-title",style:n.normalizeStyle(w.value)},n.toDisplayString(n.unref(E).caption||n.unref(E).name),5),n.createElementVNode("div",{class:"mix-body"},[n.createElementVNode("div",{class:"w-full h-full",id:l})]),n.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),se=f._export_sfc(le,[["__scopeId","data-v-457c07dd"]]);exports.default=se;
@@ -2,17 +2,17 @@ var U = Object.defineProperty, B = Object.defineProperties;
2
2
  var F = Object.getOwnPropertyDescriptors;
3
3
  var L = Object.getOwnPropertySymbols;
4
4
  var q = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
5
- var k = (u, a, n) => a in u ? U(u, a, { enumerable: !0, configurable: !0, writable: !0, value: n }) : u[a] = n, z = (u, a) => {
6
- for (var n in a || (a = {}))
7
- q.call(a, n) && k(u, n, a[n]);
5
+ var k = (u, a, s) => a in u ? U(u, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : u[a] = s, z = (u, a) => {
6
+ for (var s in a || (a = {}))
7
+ q.call(a, s) && k(u, s, a[s]);
8
8
  if (L)
9
- for (var n of L(a))
10
- j.call(a, n) && k(u, n, a[n]);
9
+ for (var s of L(a))
10
+ j.call(a, s) && k(u, s, a[s]);
11
11
  return u;
12
12
  }, R = (u, a) => B(u, F(a));
13
- import { defineComponent as G, ref as J, inject as K, computed as Z, watchEffect as Q, openBlock as W, createElementBlock as X, normalizeStyle as V, unref as S, createElementVNode as b, toDisplayString as Y, renderSlot as ee, nextTick as te } from "vue";
14
- import { B as oe, u as ie, p as ae } from "./BaseComponent-qzL33ZSL.js";
15
- import { I as re, J as C, K as v, o as ne, _ as se } from "./index-BHBE19E2.js";
13
+ import { defineComponent as G, ref as K, inject as Z, computed as J, watchEffect as Q, openBlock as W, createElementBlock as X, normalizeStyle as V, unref as S, createElementVNode as b, toDisplayString as Y, renderSlot as ee, nextTick as te } from "vue";
14
+ import { B as oe, u as ie, p as ae } from "./BaseComponent-D82kw5vB.js";
15
+ import { K as re, L as C, N as v, s as se, _ as ne } from "./index-CCWU_se2.js";
16
16
  import { g as le } from "./titleStyle-BT5GlpAb.js";
17
17
  import { A as ue, D as de } from "./ele-dzc-icon-D6eVpaHp.js";
18
18
  import { i as ce } from "./installMarkArea-DaDitBR7.js";
@@ -61,8 +61,8 @@ const ve = {
61
61
  },
62
62
  setup(u) {
63
63
  pe([me, ge, he, ce, xe, Se, fe, ye]);
64
- const a = J(K("session", null)), n = "rangelin_" + Math.random().toString(16).substring(4, 12), M = ["rgba(255, 173, 177, 0.2)", "rgba(208, 201, 116, 0.2)", "rgba(28, 118, 140, 1)", "rgba(95, 28, 140, 1)", "rgba(41, 196, 21, 1)"], _ = ["rgb(255, 173, 177)", "rgb(208, 201, 116)", "rgb(28, 118, 140)", "rgb(95, 28, 140)", "rgb(41, 196, 21)"];
65
- let s = null, x = null;
64
+ const a = K(Z("session", null)), s = "rangelin_" + Math.random().toString(16).substring(4, 12), M = ["rgba(255, 173, 177, 0.2)", "rgba(208, 201, 116, 0.2)", "rgba(28, 118, 140, 1)", "rgba(95, 28, 140, 1)", "rgba(41, 196, 21, 1)"], _ = ["rgb(255, 173, 177)", "rgb(208, 201, 116)", "rgb(28, 118, 140)", "rgb(95, 28, 140)", "rgb(41, 196, 21)"];
65
+ let n = null, x = null;
66
66
  const i = u;
67
67
  let r = {
68
68
  area: [],
@@ -70,7 +70,7 @@ const ve = {
70
70
  data: [],
71
71
  times: []
72
72
  };
73
- class $ extends oe {
73
+ class N extends oe {
74
74
  extractStyles() {
75
75
  return {
76
76
  bgColor: this.getOptionValue("bgColor", "#fff"),
@@ -86,20 +86,20 @@ const ve = {
86
86
  }
87
87
  init() {
88
88
  super.init(), this.props.conf.data = this.props.conf.data.length ? this.props.conf.data : w, i.mode === "edit" && I(), te(() => {
89
- let e = document.querySelector("#" + n);
90
- e && (s || (s = be(e), x = re({ strategy: "scroll" }), x.listenTo(e, () => s == null ? void 0 : s.resize())), s.setOption(O(), !0));
89
+ let e = document.querySelector("#" + s);
90
+ e && (n || (n = be(e), x = re({ strategy: "scroll" }), x.listenTo(e, () => n == null ? void 0 : n.resize())), n.setOption(O(), !0));
91
91
  });
92
92
  }
93
93
  onPreview() {
94
94
  T.preview();
95
95
  }
96
96
  cleanup() {
97
- x && x.uninstall(document.querySelector("#" + n)), s && s.clear(), s && Ce(s), s = null, T.unregister();
97
+ x && x.uninstall(document.querySelector("#" + s)), n && n.clear(), n && Ce(n), n = null, T.unregister();
98
98
  }
99
99
  }
100
- const A = new $(i, "rangeLin");
100
+ const A = new N(i, "rangeLin");
101
101
  A.setupLifecycle();
102
- const p = A.getStyle(), N = Z(() => le(i.conf.options)), O = () => {
102
+ const p = A.getStyle(), $ = J(() => le(i.conf.options)), O = () => {
103
103
  var g, m, y, o;
104
104
  const { data: t, options: e } = i.conf;
105
105
  let d = t[0] || {};
@@ -191,7 +191,7 @@ const ve = {
191
191
  xAxis: v(e, i.mode, t)[e - 10]
192
192
  }
193
193
  ]
194
- ], r.data = ne({ num: e, max: 200, min: 0, mode: i.mode, hasDataSource: t }), r.times = v(e, i.mode, t), r.pieces = [
194
+ ], r.data = se({ num: e, max: 200, min: 0, mode: i.mode, hasDataSource: t }), r.times = v(e, i.mode, t), r.pieces = [
195
195
  {
196
196
  lte: e - 10,
197
197
  color: p.value.lineColor
@@ -245,7 +245,7 @@ const ve = {
245
245
  lte: c[1] + 1,
246
246
  color: p.value.lineColor
247
247
  });
248
- }), s == null || s.setOption(O(), !0);
248
+ }), n == null || n.setOption(O(), !0);
249
249
  }, D = (t) => {
250
250
  C(i.conf);
251
251
  }, T = {
@@ -262,18 +262,18 @@ const ve = {
262
262
  }, [
263
263
  b("div", {
264
264
  class: "mix-title",
265
- style: V(N.value)
265
+ style: V($.value)
266
266
  }, Y(S(E).caption || S(E).name), 5),
267
267
  b("div", { class: "mix-body" }, [
268
268
  b("div", {
269
269
  class: "w-full h-full",
270
- id: n
270
+ id: s
271
271
  })
272
272
  ]),
273
273
  ee(t.$slots, "default", {}, void 0, !0)
274
274
  ], 4));
275
275
  }
276
- })), qe = /* @__PURE__ */ se(Le, [["__scopeId", "data-v-457c07dd"]]);
276
+ })), qe = /* @__PURE__ */ ne(Le, [["__scopeId", "data-v-457c07dd"]]);
277
277
  export {
278
278
  qe as default
279
279
  };
@@ -1 +1 @@
1
- "use strict";var te=Object.defineProperty,ne=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var W=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var $=(p,i,n)=>i in p?te(p,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):p[i]=n,V=(p,i)=>{for(var n in i||(i={}))ae.call(i,n)&&$(p,n,i[n]);if(W)for(var n of W(i))le.call(i,n)&&$(p,n,i[n]);return p},P=(p,i)=>ne(p,oe(i));var D=(p,i,n)=>new Promise((m,k)=>{var j=b=>{try{N(n.next(b))}catch(O){k(O)}},_=b=>{try{N(n.throw(b))}catch(O){k(O)}},N=b=>b.done?m(b.value):Promise.resolve(b.value).then(j,_);N((n=n.apply(p,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),S=require("./index-D7PZNHF4.cjs");require("element-plus");const se=require("./EChartComponentBase-C4s5HSfS.cjs"),q=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),re=["id"],ie={key:0,class:"timeline-player"},ce={key:0},ue={key:1},me=["onClick"],de={class:"timeline-labels"},fe={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"实时裂缝演变分布图",NAME_EN:"RealtimeEvolutionMap",ORDER:3,PLATFORM:["pc","screen"]},he={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},minPointSize:{value:6,type:"number",label:"最小散点大小",min:2,max:20},maxPointSize:{value:24,type:"number",label:"最大散点大小",min:10,max:60},baseColor:{value:"#ee6666",type:"color",label:"散点颜色"},playInterval:{value:2e3,type:"number",label:"播放间隔(ms)",min:500,max:1e4},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},pe=[{name:"裂缝写实1",fvX:"",fvY:"",fvWidth:"",fvDeviceName:"",object_id:""}],ve=["name","fvX","fvY","fvWidth","fvDeviceName","object_id"],ye=["mosaic","statistics","calculate"],be={useAlias:!1,multiObject:!0,source:"mosaic"},ge=200,Ce={DEFAULT:fe,OPTIONS:he,DATA:pe,PARAMS:ve,SOURCE:ye,ITEMS:ge,COMMON:be},Se=e.defineComponent(P(V({},Ce),{__name:"realtimeEvolutionMap",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){const i=p,n=e.ref([]),m=e.ref(0),k=e.ref(!1),j=e.ref(null);let _=null;const N=e.computed(()=>n.value.length<=1?0:m.value/(n.value.length-1)*100),b=h=>n.value.length<=1?50:h/(n.value.length-1)*100;class O extends se.EChartComponentBase{constructor(){super(...arguments),this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(t){this.currentObjectId=t}extractStyles(){return P(V({},super.extractStyles()),{minPointSize:this.getOptionValue("minPointSize",6),maxPointSize:this.getOptionValue("maxPointSize",24),baseColor:this.getOptionValue("baseColor","#ee6666"),playInterval:this.getOptionValue("playInterval",2e3),linkChannel:this.getOptionValue("linkChannel","crack")})}onPreview(){return D(this,null,function*(){const{common:t,data:s}=this.props.conf,o=this.getSource();if(t.multiObject&&Array.isArray(s)){const l=new Set;for(const r of s){const a=yield this.resolveObjectId(r);!a||l.has(a)||(l.add(a),this.subscribeBySource(o,a,r.uid))}}else{const l=yield this.resolveObjectId();l&&(this.currentObjectId=l,this.subscribeBySource(o,l))}})}onLinkEvent(t){K(t)}generateTimeLabels(){return[]}initHistory(){return D(this,null,function*(){const{data:t}=this.props.conf||{};if(!Array.isArray(t)||!t.length)return[];const s=yield this.resolveObjectId();if(!s)return[];const o=24;return Promise.all(t.map(l=>new Promise(r=>{const a=[l.fvX,l.fvY,l.fvWidth,l.fvDeviceName].filter(Boolean);if(!a.length){r([]);return}S.api.platform(c=>{var u;r(((u=c==null?void 0:c.result)==null?void 0:u.data)||[])},{action:"get_mosaic_list",keys:a,object_id:s,page_index:1,page_size:o})})))})}setHistoryData(t){var r;if(!this.hasData()||!t||!Array.isArray(t))return;const s=((r=this.props.conf)==null?void 0:r.data)||[];if(!Array.isArray(s)||!s.length)return;const o=new Map;if(s.forEach((a,c)=>{const u=t[c];Array.isArray(u)&&u.forEach(d=>{const y=d.time||d.datetime;if(!y)return;const C=parseFloat(d[a.fvX]),g=parseFloat(d[a.fvY]),x=a.fvWidth?d[a.fvWidth]:0,A=parseFloat(x!=null?x:"0");if(isNaN(C)||isNaN(g))return;const f=String(y).split(".")[0];o.has(f)||o.set(f,{label:S.dayjs(f).isValid()?S.dayjs(f).format("HH:mm"):f,time:S.dayjs(f).isValid()?S.dayjs(f).format("MM-DD HH:mm:ss"):f,points:[]}),o.get(f).points.push({name:a.name||`crack_${c}`,x:C,y:g,width:isNaN(A)?0:A})})}),o.size===0)return;const l=Array.from(o.entries()).sort((a,c)=>new Date(a[0]).getTime()-new Date(c[0]).getTime()).map(a=>a[1]).slice(-50);n.value=l,m.value=l.length-1,M()}getChartOption(){const t=this.Style.value;return{backgroundColor:"transparent",tooltip:{trigger:"item",formatter:s=>{if(!s.value)return"";const[o,l,r,a,c]=s.value;return`<b>${r}</b><br/>时间: ${c}<br/>X: ${o}<br/>Y: ${l}<br/>宽度: ${a} mm`}},legend:{show:!0,top:6,right:20,textStyle:{color:t.textColor,fontSize:13,fontWeight:"bold"}},grid:{top:40,left:50,right:30,bottom:20},xAxis:{type:"value",name:"x",nameLocation:"end",nameTextStyle:{color:t.textColor,fontSize:13,fontWeight:"bold"},axisLine:{show:!0,lineStyle:{color:"#999"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},yAxis:{type:"value",name:"y",nameLocation:"end",nameTextStyle:{color:t.textColor,fontSize:13,fontWeight:"bold"},axisLine:{show:!0,lineStyle:{color:"#999"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},series:this.buildCumulativeSeries(t)}}buildCumulativeSeries(t){const s=m.value,o=n.value.slice(0,s+1);if(o.length===0)return[];const l=new Map;o.forEach((f,w)=>{f.points.forEach(I=>{l.has(I.name)||l.set(I.name,[]),l.get(I.name).push({x:I.x,y:I.y,width:I.width,time:f.label,timeIdx:w})})});let r=1/0,a=-1/0;l.forEach(f=>f.forEach(w=>{r=Math.min(r,w.width),a=Math.max(a,w.width)})),r===1/0&&(r=0,a=1);const c=a-r||1,u=t.baseColor||"#ee6666",d=t.minPointSize||6,y=t.maxPointSize||24,C=n.value.length||1,g=[u,"#5470c6","#91cc75","#fac858","#73c0de","#fc8452","#9a60b4"],x=[];let A=0;return l.forEach((f,w)=>{const I=g[A%g.length],Q=f.map(E=>[E.x,E.y,w,E.width,E.time]),Z=E=>{const B=((E[3]||0)-r)/c;return d+B*(y-d)};x.push({name:w,type:"scatter",data:Q,symbolSize:Z,itemStyle:{color:E=>{var R,H;const B=.2+.8*(((H=(R=f[E.dataIndex])==null?void 0:R.timeIdx)!=null?H:0)/(C-1||1));return this.hexToRgba(I,B)}},emphasis:{itemStyle:{borderColor:"#333",borderWidth:2}}}),A++}),x}hexToRgba(t,s){const o=t.replace("#",""),l=parseInt(o.substring(0,2),16),r=parseInt(o.substring(2,4),16),a=parseInt(o.substring(4,6),16);return`rgba(${l},${r},${a},${s})`}setSocketData(t){super.setSocketData(t);const{data:s}=this.props.conf,o=S.dayjs().format("HH:mm"),l=S.dayjs().format("MM-DD HH:mm:ss"),r=[];s.forEach(a=>{const c=this.extractDataValue(t,a.fvX),u=this.extractDataValue(t,a.fvY),d=this.extractDataValue(t,a.fvWidth);if(c!=null&&u!=null){const y=parseFloat(c),C=parseFloat(u),g=d!=null?parseFloat(d):0;!isNaN(y)&&!isNaN(C)&&r.push({name:a.name||"default",x:y,y:C,width:isNaN(g)?0:g})}}),r.length>0&&(n.value.push({label:o,time:l,points:r}),n.value.length>50&&n.value.shift(),(k.value||m.value>=n.value.length-2)&&(m.value=n.value.length-1),M())}}const v=new O(i,"realtimeEvolutionMap");v.setupLifecycle();const T=v.getStyle(),X=v.getEchartId(),Y=()=>{k.value?z():U()},U=()=>{n.value.length<=1||(k.value=!0,_=setInterval(()=>{m.value=m.value<n.value.length-1?m.value+1:0,M()},T.value.playInterval||2e3))},z=()=>{k.value=!1,_&&(clearInterval(_),_=null)},L=h=>{m.value=h,M()},G=h=>{if(!j.value||n.value.length<=1)return;const t=j.value.getBoundingClientRect(),s=(h.clientX-t.left)/t.width;L(Math.max(0,Math.min(Math.round(s*(n.value.length-1)),n.value.length-1)))},M=()=>{const h=v.getChartInstance();h&&h.setOption(v.getChartOption(),!0)};e.watch(m,()=>M());const K=h=>D(null,null,function*(){var c;const{payload:t}=h;if(!t)return;const s=t.objectIds&&t.objectIds.length>0?t.objectIds:t.objectId||t.object_id?[t.objectId||t.object_id]:[];if(!s.length||i.mode!=="preview")return;const o=s.sort().join(",");if(v.getCurrentObjectId()===o)return;v.setCurrentObjectId(o),n.value=[],m.value=0,z();const{data:l}=i.conf,r=(c=v.session)==null?void 0:c.value;if(!r)return;const a=i.conf.id;r.componentRequests&&r.componentRequests.delete(a);for(const u of s)Array.isArray(l)&&l.forEach(d=>{d.object_id=u}),v.subscribeBySource(v.getSource(),u);r.registerComponent({id:a,request:null,onUpdate:(u,d)=>{u==="realtime"&&v.setSocketData(d)}})}),F=()=>{var o;if(i.mode!=="edit")return;const h=((o=i.conf)==null?void 0:o.data)||[],t=S.dayjs(),s=[];for(let l=9;l>=0;l--){const r=t.subtract(l*160,"minute"),a=[];h.forEach((c,u)=>{const d=c.name||`裂缝写实${u+1}`,y=(10-l)/10,C=20+u*20+y*30+(Math.random()-.5)*8,g=15+u*10+y*20+(Math.random()-.5)*8,x=.1+y*2.5+Math.random()*.3;a.push({name:d,x:+C.toFixed(1),y:+g.toFixed(1),width:+x.toFixed(2)})}),s.push({label:r.format("HH:mm"),time:r.format("MM-DD HH:mm:ss"),points:a})}n.value=s,m.value=s.length-1},J=e.computed(()=>({background:T.value.bgColor,color:T.value.textColor}));return e.onMounted(()=>{i.mode==="edit"&&F()}),e.onUnmounted(()=>z()),e.watch(()=>i.conf,()=>{i.mode==="edit"&&F()},{deep:!0}),(h,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component crack-realtime-evolution",style:e.normalizeStyle(J.value)},[t[1]||(t[1]=e.createElementVNode("div",{class:"chart-header"},[e.createElementVNode("span",{class:"chart-title"},"▎实时裂缝演变分布图 (动态轨迹)")],-1)),e.createElementVNode("div",{id:e.unref(X),class:"chart-container"},null,8,re),n.value.length>0?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("button",{class:"play-btn",onClick:Y},[k.value?(e.openBlock(),e.createElementBlock("span",ce,"⏸")):(e.openBlock(),e.createElementBlock("span",ue,"▶"))]),e.createElementVNode("div",{class:"timeline-track",ref_key:"trackRef",ref:j,onClick:G},[t[0]||(t[0]=e.createElementVNode("div",{class:"track-line"},null,-1)),e.createElementVNode("div",{class:"track-progress",style:e.normalizeStyle({width:N.value+"%"})},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(s,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass(["track-dot",{active:o<=m.value,current:o===m.value}]),style:e.normalizeStyle({left:b(o)+"%"}),onClick:e.withModifiers(l=>L(o),["stop"])},null,14,me))),128))],512),e.createElementVNode("div",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(s,o)=>(e.openBlock(),e.createElementBlock("span",{key:o,class:e.normalizeClass(["time-label",{active:o<=m.value}]),style:e.normalizeStyle({left:b(o)+"%"})},e.toDisplayString(s.label),7))),128))])])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"default",{},void 0,!0)],4))}})),ke=S._export_sfc(Se,[["__scopeId","data-v-c4a95d59"]]);exports.default=ke;
1
+ "use strict";var te=Object.defineProperty,ne=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var W=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var $=(p,i,n)=>i in p?te(p,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):p[i]=n,V=(p,i)=>{for(var n in i||(i={}))ae.call(i,n)&&$(p,n,i[n]);if(W)for(var n of W(i))le.call(i,n)&&$(p,n,i[n]);return p},P=(p,i)=>ne(p,oe(i));var D=(p,i,n)=>new Promise((m,k)=>{var j=b=>{try{N(n.next(b))}catch(O){k(O)}},_=b=>{try{N(n.throw(b))}catch(O){k(O)}},N=b=>b.done?m(b.value):Promise.resolve(b.value).then(j,_);N((n=n.apply(p,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),S=require("./index-BdWR_FTA.cjs");require("element-plus");const se=require("./EChartComponentBase-ejDV5NEw.cjs"),q=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),re=["id"],ie={key:0,class:"timeline-player"},ce={key:0},ue={key:1},me=["onClick"],de={class:"timeline-labels"},fe={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"实时裂缝演变分布图",NAME_EN:"RealtimeEvolutionMap",ORDER:3,PLATFORM:["pc","screen"]},he={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},minPointSize:{value:6,type:"number",label:"最小散点大小",min:2,max:20},maxPointSize:{value:24,type:"number",label:"最大散点大小",min:10,max:60},baseColor:{value:"#ee6666",type:"color",label:"散点颜色"},playInterval:{value:2e3,type:"number",label:"播放间隔(ms)",min:500,max:1e4},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},pe=[{name:"裂缝写实1",fvX:"",fvY:"",fvWidth:"",fvDeviceName:"",object_id:""}],ve=["name","fvX","fvY","fvWidth","fvDeviceName","object_id"],ye=["mosaic","statistics","calculate"],be={useAlias:!1,multiObject:!0,source:"mosaic"},ge=200,Ce={DEFAULT:fe,OPTIONS:he,DATA:pe,PARAMS:ve,SOURCE:ye,ITEMS:ge,COMMON:be},Se=e.defineComponent(P(V({},Ce),{__name:"realtimeEvolutionMap",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){const i=p,n=e.ref([]),m=e.ref(0),k=e.ref(!1),j=e.ref(null);let _=null;const N=e.computed(()=>n.value.length<=1?0:m.value/(n.value.length-1)*100),b=h=>n.value.length<=1?50:h/(n.value.length-1)*100;class O extends se.EChartComponentBase{constructor(){super(...arguments),this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(t){this.currentObjectId=t}extractStyles(){return P(V({},super.extractStyles()),{minPointSize:this.getOptionValue("minPointSize",6),maxPointSize:this.getOptionValue("maxPointSize",24),baseColor:this.getOptionValue("baseColor","#ee6666"),playInterval:this.getOptionValue("playInterval",2e3),linkChannel:this.getOptionValue("linkChannel","crack")})}onPreview(){return D(this,null,function*(){const{common:t,data:s}=this.props.conf,o=this.getSource();if(t.multiObject&&Array.isArray(s)){const l=new Set;for(const r of s){const a=yield this.resolveObjectId(r);!a||l.has(a)||(l.add(a),this.subscribeBySource(o,a,r.uid))}}else{const l=yield this.resolveObjectId();l&&(this.currentObjectId=l,this.subscribeBySource(o,l))}})}onLinkEvent(t){K(t)}generateTimeLabels(){return[]}initHistory(){return D(this,null,function*(){const{data:t}=this.props.conf||{};if(!Array.isArray(t)||!t.length)return[];const s=yield this.resolveObjectId();if(!s)return[];const o=24;return Promise.all(t.map(l=>new Promise(r=>{const a=[l.fvX,l.fvY,l.fvWidth,l.fvDeviceName].filter(Boolean);if(!a.length){r([]);return}S.api.platform(c=>{var u;r(((u=c==null?void 0:c.result)==null?void 0:u.data)||[])},{action:"get_mosaic_list",keys:a,object_id:s,page_index:1,page_size:o})})))})}setHistoryData(t){var r;if(!this.hasData()||!t||!Array.isArray(t))return;const s=((r=this.props.conf)==null?void 0:r.data)||[];if(!Array.isArray(s)||!s.length)return;const o=new Map;if(s.forEach((a,c)=>{const u=t[c];Array.isArray(u)&&u.forEach(d=>{const y=d.time||d.datetime;if(!y)return;const C=parseFloat(d[a.fvX]),g=parseFloat(d[a.fvY]),x=a.fvWidth?d[a.fvWidth]:0,A=parseFloat(x!=null?x:"0");if(isNaN(C)||isNaN(g))return;const f=String(y).split(".")[0];o.has(f)||o.set(f,{label:S.dayjs(f).isValid()?S.dayjs(f).format("HH:mm"):f,time:S.dayjs(f).isValid()?S.dayjs(f).format("MM-DD HH:mm:ss"):f,points:[]}),o.get(f).points.push({name:a.name||`crack_${c}`,x:C,y:g,width:isNaN(A)?0:A})})}),o.size===0)return;const l=Array.from(o.entries()).sort((a,c)=>new Date(a[0]).getTime()-new Date(c[0]).getTime()).map(a=>a[1]).slice(-50);n.value=l,m.value=l.length-1,M()}getChartOption(){const t=this.Style.value;return{backgroundColor:"transparent",tooltip:{trigger:"item",formatter:s=>{if(!s.value)return"";const[o,l,r,a,c]=s.value;return`<b>${r}</b><br/>时间: ${c}<br/>X: ${o}<br/>Y: ${l}<br/>宽度: ${a} mm`}},legend:{show:!0,top:6,right:20,textStyle:{color:t.textColor,fontSize:13,fontWeight:"bold"}},grid:{top:40,left:50,right:30,bottom:20},xAxis:{type:"value",name:"x",nameLocation:"end",nameTextStyle:{color:t.textColor,fontSize:13,fontWeight:"bold"},axisLine:{show:!0,lineStyle:{color:"#999"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},yAxis:{type:"value",name:"y",nameLocation:"end",nameTextStyle:{color:t.textColor,fontSize:13,fontWeight:"bold"},axisLine:{show:!0,lineStyle:{color:"#999"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}},series:this.buildCumulativeSeries(t)}}buildCumulativeSeries(t){const s=m.value,o=n.value.slice(0,s+1);if(o.length===0)return[];const l=new Map;o.forEach((f,w)=>{f.points.forEach(I=>{l.has(I.name)||l.set(I.name,[]),l.get(I.name).push({x:I.x,y:I.y,width:I.width,time:f.label,timeIdx:w})})});let r=1/0,a=-1/0;l.forEach(f=>f.forEach(w=>{r=Math.min(r,w.width),a=Math.max(a,w.width)})),r===1/0&&(r=0,a=1);const c=a-r||1,u=t.baseColor||"#ee6666",d=t.minPointSize||6,y=t.maxPointSize||24,C=n.value.length||1,g=[u,"#5470c6","#91cc75","#fac858","#73c0de","#fc8452","#9a60b4"],x=[];let A=0;return l.forEach((f,w)=>{const I=g[A%g.length],Q=f.map(E=>[E.x,E.y,w,E.width,E.time]),Z=E=>{const B=((E[3]||0)-r)/c;return d+B*(y-d)};x.push({name:w,type:"scatter",data:Q,symbolSize:Z,itemStyle:{color:E=>{var R,H;const B=.2+.8*(((H=(R=f[E.dataIndex])==null?void 0:R.timeIdx)!=null?H:0)/(C-1||1));return this.hexToRgba(I,B)}},emphasis:{itemStyle:{borderColor:"#333",borderWidth:2}}}),A++}),x}hexToRgba(t,s){const o=t.replace("#",""),l=parseInt(o.substring(0,2),16),r=parseInt(o.substring(2,4),16),a=parseInt(o.substring(4,6),16);return`rgba(${l},${r},${a},${s})`}setSocketData(t){super.setSocketData(t);const{data:s}=this.props.conf,o=S.dayjs().format("HH:mm"),l=S.dayjs().format("MM-DD HH:mm:ss"),r=[];s.forEach(a=>{const c=this.extractDataValue(t,a.fvX),u=this.extractDataValue(t,a.fvY),d=this.extractDataValue(t,a.fvWidth);if(c!=null&&u!=null){const y=parseFloat(c),C=parseFloat(u),g=d!=null?parseFloat(d):0;!isNaN(y)&&!isNaN(C)&&r.push({name:a.name||"default",x:y,y:C,width:isNaN(g)?0:g})}}),r.length>0&&(n.value.push({label:o,time:l,points:r}),n.value.length>50&&n.value.shift(),(k.value||m.value>=n.value.length-2)&&(m.value=n.value.length-1),M())}}const v=new O(i,"realtimeEvolutionMap");v.setupLifecycle();const T=v.getStyle(),X=v.getEchartId(),Y=()=>{k.value?z():U()},U=()=>{n.value.length<=1||(k.value=!0,_=setInterval(()=>{m.value=m.value<n.value.length-1?m.value+1:0,M()},T.value.playInterval||2e3))},z=()=>{k.value=!1,_&&(clearInterval(_),_=null)},L=h=>{m.value=h,M()},G=h=>{if(!j.value||n.value.length<=1)return;const t=j.value.getBoundingClientRect(),s=(h.clientX-t.left)/t.width;L(Math.max(0,Math.min(Math.round(s*(n.value.length-1)),n.value.length-1)))},M=()=>{const h=v.getChartInstance();h&&h.setOption(v.getChartOption(),!0)};e.watch(m,()=>M());const K=h=>D(null,null,function*(){var c;const{payload:t}=h;if(!t)return;const s=t.objectIds&&t.objectIds.length>0?t.objectIds:t.objectId||t.object_id?[t.objectId||t.object_id]:[];if(!s.length||i.mode!=="preview")return;const o=s.sort().join(",");if(v.getCurrentObjectId()===o)return;v.setCurrentObjectId(o),n.value=[],m.value=0,z();const{data:l}=i.conf,r=(c=v.session)==null?void 0:c.value;if(!r)return;const a=i.conf.id;r.componentRequests&&r.componentRequests.delete(a);for(const u of s)Array.isArray(l)&&l.forEach(d=>{d.object_id=u}),v.subscribeBySource(v.getSource(),u);r.registerComponent({id:a,request:null,onUpdate:(u,d)=>{u==="realtime"&&v.setSocketData(d)}})}),F=()=>{var o;if(i.mode!=="edit")return;const h=((o=i.conf)==null?void 0:o.data)||[],t=S.dayjs(),s=[];for(let l=9;l>=0;l--){const r=t.subtract(l*160,"minute"),a=[];h.forEach((c,u)=>{const d=c.name||`裂缝写实${u+1}`,y=(10-l)/10,C=20+u*20+y*30+(Math.random()-.5)*8,g=15+u*10+y*20+(Math.random()-.5)*8,x=.1+y*2.5+Math.random()*.3;a.push({name:d,x:+C.toFixed(1),y:+g.toFixed(1),width:+x.toFixed(2)})}),s.push({label:r.format("HH:mm"),time:r.format("MM-DD HH:mm:ss"),points:a})}n.value=s,m.value=s.length-1},J=e.computed(()=>({background:T.value.bgColor,color:T.value.textColor}));return e.onMounted(()=>{i.mode==="edit"&&F()}),e.onUnmounted(()=>z()),e.watch(()=>i.conf,()=>{i.mode==="edit"&&F()},{deep:!0}),(h,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component crack-realtime-evolution",style:e.normalizeStyle(J.value)},[t[1]||(t[1]=e.createElementVNode("div",{class:"chart-header"},[e.createElementVNode("span",{class:"chart-title"},"▎实时裂缝演变分布图 (动态轨迹)")],-1)),e.createElementVNode("div",{id:e.unref(X),class:"chart-container"},null,8,re),n.value.length>0?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("button",{class:"play-btn",onClick:Y},[k.value?(e.openBlock(),e.createElementBlock("span",ce,"⏸")):(e.openBlock(),e.createElementBlock("span",ue,"▶"))]),e.createElementVNode("div",{class:"timeline-track",ref_key:"trackRef",ref:j,onClick:G},[t[0]||(t[0]=e.createElementVNode("div",{class:"track-line"},null,-1)),e.createElementVNode("div",{class:"track-progress",style:e.normalizeStyle({width:N.value+"%"})},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(s,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass(["track-dot",{active:o<=m.value,current:o===m.value}]),style:e.normalizeStyle({left:b(o)+"%"}),onClick:e.withModifiers(l=>L(o),["stop"])},null,14,me))),128))],512),e.createElementVNode("div",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(s,o)=>(e.openBlock(),e.createElementBlock("span",{key:o,class:e.normalizeClass(["time-label",{active:o<=m.value}]),style:e.normalizeStyle({left:b(o)+"%"})},e.toDisplayString(s.label),7))),128))])])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"default",{},void 0,!0)],4))}})),ke=S._export_sfc(Se,[["__scopeId","data-v-c4a95d59"]]);exports.default=ke;
@@ -27,9 +27,9 @@ var P = (h, i, e) => new Promise((u, x) => {
27
27
  A((e = e.apply(h, i)).next());
28
28
  });
29
29
  import { defineComponent as ht, ref as z, computed as G, watch as K, onMounted as pt, onUnmounted as vt, openBlock as k, createElementBlock as w, normalizeStyle as L, createElementVNode as _, unref as bt, Fragment as J, renderList as Q, withModifiers as yt, normalizeClass as Z, toDisplayString as gt, createCommentVNode as xt, renderSlot as Ct } from "vue";
30
- import { a as St, d as j, _ as It } from "./index-BHBE19E2.js";
30
+ import { a as St, d as j, _ as It } from "./index-CCWU_se2.js";
31
31
  import "element-plus";
32
- import { E as kt } from "./EChartComponentBase-BtAW2Yko.js";
32
+ import { E as kt } from "./EChartComponentBase-DUyyaXgA.js";
33
33
  import { A as wt, D as _t } from "./ele-vlu-icon-Bg6EHZdJ.js";
34
34
  const Mt = ["id"], jt = {
35
35
  key: 0,