mixdashboards 1.0.85 → 1.0.87

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 (346) hide show
  1. package/dist/{BaseComponent-D34QRHy5.cjs → BaseComponent-BHUHnLj-.cjs} +1 -1
  2. package/dist/{BaseComponent-B5SIFUKu.js → BaseComponent-qzL33ZSL.js} +3 -3
  3. package/dist/{EChartComponentBase-dqtNexA7.js → EChartComponentBase-BtAW2Yko.js} +2 -2
  4. package/dist/{EChartComponentBase-jAYYsevE.cjs → EChartComponentBase-C4s5HSfS.cjs} +1 -1
  5. package/dist/{EmergencyPlanPanel-CNSVT9m8.cjs → EmergencyPlanPanel-C8ieiZvC.cjs} +1 -1
  6. package/dist/{EmergencyPlanPanel-Doo5cu72.js → EmergencyPlanPanel-CqvHGqqx.js} +1 -1
  7. package/dist/{HistoryPlanDialog-D5v_jcxq.js → HistoryPlanDialog-CUSKabw0.js} +1 -1
  8. package/dist/{HistoryPlanDialog-EUzHsez4.cjs → HistoryPlanDialog-D6VMuzat.cjs} +1 -1
  9. package/dist/{MixiotAppDetailPage-COTIq_oL.cjs → MixiotAppDetailPage-Bd9WrADz.cjs} +1 -1
  10. package/dist/{MixiotAppDetailPage-hVI9fZpO.js → MixiotAppDetailPage-CFISQwpc.js} +1 -1
  11. package/dist/{MonitoringMap-BqnRXXf0.js → MonitoringMap-CV7YYixH.js} +2 -2
  12. package/dist/{MonitoringMap-CtqtQDrg.cjs → MonitoringMap-DjvavXD5.cjs} +1 -1
  13. package/dist/{UniverSheet-BVbFQzbx.cjs → UniverSheet-BY4vwAeQ.cjs} +1 -1
  14. package/dist/{UniverSheet-DGslLlF8.js → UniverSheet-C7QQQUHI.js} +2 -2
  15. package/dist/{accelerationChart-Dlaz8dCi.cjs → accelerationChart-CnbCpT4d.cjs} +1 -1
  16. package/dist/{accelerationChart-BLfCB0xQ.js → accelerationChart-Dd7s6CA0.js} +2 -2
  17. package/dist/{actionItem-BztkzgJJ.js → actionItem-CjNacj0F.js} +179 -164
  18. package/dist/actionItem-DNgoQB08.cjs +1 -0
  19. package/dist/{alarmLevelChart-DAPsXpBm.cjs → alarmLevelChart-CRL45xkr.cjs} +1 -1
  20. package/dist/{alarmLevelChart-DW3YpK8y.js → alarmLevelChart-DDFP_ADG.js} +2 -2
  21. package/dist/{alertTable-LzeUcaTy.js → alertTable-DrUs1wUN.js} +2 -2
  22. package/dist/{alertTable-DIRQidQO.cjs → alertTable-UvxQNZ2Y.cjs} +1 -1
  23. package/dist/{aliasObjectSelectorDemo-CmB0VaaP.cjs → aliasObjectSelectorDemo-BGgcbyT-.cjs} +1 -1
  24. package/dist/{aliasObjectSelectorDemo-DSxciPwy.js → aliasObjectSelectorDemo-Bep18FrL.js} +1 -1
  25. package/dist/{annualRainfallChart-Dv_GAuLC.js → annualRainfallChart-BMuH6tsO.js} +2 -2
  26. package/dist/{annualRainfallChart-k6KjFS_C.cjs → annualRainfallChart-DDnaZZp0.cjs} +1 -1
  27. package/dist/{aqi-Ba50jmO9.js → aqi-CbyrPtO4.js} +4 -3
  28. package/dist/{aqi-DaUUMaJU.cjs → aqi-DjkOgiun.cjs} +2 -2
  29. package/dist/{aqiIndass-Z59-E4wM.js → aqiIndass-C-DEsmZ4.js} +2 -2
  30. package/dist/{aqiIndass-CymFUbJo.cjs → aqiIndass-C3mPUZP6.cjs} +1 -1
  31. package/dist/{areaDeformCurve-BkIAPPuz.cjs → areaDeformCurve-B-bUeLI-.cjs} +1 -1
  32. package/dist/{areaDeformCurve-D0Ewk9vb.js → areaDeformCurve-D6in1BnQ.js} +2 -2
  33. package/dist/arrayCard-CAoU7DHK.cjs +1 -0
  34. package/dist/{arrayCard-BSXdzUVh.js → arrayCard-CpzPkgA9.js} +12 -11
  35. package/dist/{audio-ChzQRc-m.cjs → audio-BrTfWQmo.cjs} +1 -1
  36. package/dist/{audio-DxRwie49.js → audio-TkisK5FD.js} +2 -2
  37. package/dist/{bar-D_fG07s5.cjs → bar-BZBOTnN4.cjs} +2 -2
  38. package/dist/{bar-FVRxAIV0.js → bar-CT6sCNW4.js} +18 -17
  39. package/dist/{bmp-Du28cT6S.cjs → bmp-DgcyTiV5.cjs} +1 -1
  40. package/dist/{bmp-DC5cos_-.js → bmp-Xsdyi9gr.js} +2 -2
  41. package/dist/{box-e8ah_S9H.cjs → box-DED4JT5G.cjs} +1 -1
  42. package/dist/{box-7ErrZ6BV.js → box-DNKXXXYx.js} +2 -2
  43. package/dist/{chartConfigPanel-we0JCKlW.js → chartConfigPanel-CF-q-XUN.js} +1 -1
  44. package/dist/{chartConfigPanel-B-DcUfb-.cjs → chartConfigPanel-D1M21nDO.cjs} +1 -1
  45. package/dist/{circleBar-C_PheazC.js → circleBar-CaC8ntp-.js} +12 -11
  46. package/dist/{circleBar-CDNNFZ-7.cjs → circleBar-m6J_QvzN.cjs} +2 -2
  47. package/dist/{clock-DcBtsj1a.cjs → clock-CnV36tpq.cjs} +1 -1
  48. package/dist/{clock-Drlpl4rd.js → clock-tPcek90B.js} +2 -2
  49. package/dist/{clt-CeZd9gK8.cjs → clt-DoDENEcJ.cjs} +1 -1
  50. package/dist/{clt-C17ZCh49.js → clt-DwoBhD_P.js} +2 -2
  51. package/dist/{cmc-DubkXzay.cjs → cmc-Dld5UOW9.cjs} +1 -1
  52. package/dist/{cmc-C7liYuEm.js → cmc-ObS3fWlL.js} +2 -2
  53. package/dist/{cmp-D2Rfyq8M.cjs → cmp-Bp9FqBZV.cjs} +1 -1
  54. package/dist/{cmp-B-x5XEU3.js → cmp-DEH1jzrG.js} +2 -2
  55. package/dist/{conclusionCard-CzPFreK2.js → conclusionCard-CHFJIt7G.js} +2 -2
  56. package/dist/{conclusionCard-Dpp7yCQr.cjs → conclusionCard-DXiFAJmo.cjs} +1 -1
  57. package/dist/{controlList-CdRFJ8T_.cjs → controlList-B2tV397i.cjs} +1 -1
  58. package/dist/{controlList-BxRyFAbK.js → controlList-hWCbafkY.js} +2 -2
  59. package/dist/{controlRecordList-6kKpjq1n.js → controlRecordList-DnhHr7kU.js} +2 -2
  60. package/dist/{controlRecordList-DNASxF1-.cjs → controlRecordList-uAmuCKjf.cjs} +1 -1
  61. package/dist/{controlRecordListAPP-NtlIWQXs.js → controlRecordListAPP-BpZmCMM-.js} +2 -2
  62. package/dist/{controlRecordListAPP-D8yzsc2T.cjs → controlRecordListAPP-BpfPZW3b.cjs} +1 -1
  63. package/dist/{crd-taCzWBxq.cjs → crd-BQ7AFV1c.cjs} +1 -1
  64. package/dist/{crd-DI5bkvJ2.js → crd-ChpWMXAm.js} +2 -2
  65. package/dist/{ctrBtn-CN6WqLz4.js → ctrBtn-CmdQ3s7z.js} +3 -3
  66. package/dist/{ctrBtn-BYFK-n7Z.cjs → ctrBtn-PTITC7R8.cjs} +1 -1
  67. package/dist/{ctrSet-Dmp-SSwX.cjs → ctrSet-CYqeDilm.cjs} +1 -1
  68. package/dist/{ctrSet-Doo8KOid.js → ctrSet-Dv5i5ne5.js} +3 -3
  69. package/dist/{ctrSwitch-Huz7y3qH.cjs → ctrSwitch-Byt4qKjt.cjs} +1 -1
  70. package/dist/{ctrSwitch-ymPMJQrr.js → ctrSwitch-C3NZcUxa.js} +3 -3
  71. package/dist/{dataManagement-D-ydHbCi.cjs → dataManagement-BFIS0e4d.cjs} +1 -1
  72. package/dist/{dataManagement-BSFDkBO0.js → dataManagement-enhqxRgF.js} +2 -2
  73. package/dist/{dataReport-scEzKoGr.js → dataReport-DLdB1ARI.js} +2 -2
  74. package/dist/{dataReport-DkybkxI_.cjs → dataReport-vfCe0q9d.cjs} +1 -1
  75. package/dist/{dataTable-CYdLGzsw.cjs → dataTable-DE3yOae0.cjs} +1 -1
  76. package/dist/{dataTable-DeOLfzYM.js → dataTable-DFZrMHnF.js} +1 -1
  77. package/dist/{datetime-D-2UMZL8.js → datetime-BK4xGaTM.js} +2 -2
  78. package/dist/{datetime-C69N7_sI.cjs → datetime-DXTcE56I.cjs} +1 -1
  79. package/dist/{deepClusterSlipSurface-CGD8erAY.cjs → deepClusterSlipSurface-BKFavDI5.cjs} +1 -1
  80. package/dist/{deepClusterSlipSurface-rvmSm6ES.js → deepClusterSlipSurface-D_PbxUdd.js} +2 -2
  81. package/dist/{deepDataMatrix-CCiOw7na.cjs → deepDataMatrix-DzzK55Mc.cjs} +1 -1
  82. package/dist/{deepDataMatrix-DWooX6Y5.js → deepDataMatrix-avI-0mLw.js} +2 -2
  83. package/dist/{deepDisplacement3D-e53WV3xO.js → deepDisplacement3D-CbyatHpJ.js} +2 -2
  84. package/dist/{deepDisplacement3D-Df2O35JO.cjs → deepDisplacement3D-DW0CW2ut.cjs} +1 -1
  85. package/dist/{deepDisplacementChart-BXnNpjNH.js → deepDisplacementChart-B7GDsSm7.js} +2 -2
  86. package/dist/{deepDisplacementChart-v-DnKo0p.js → deepDisplacementChart-DY0lNJOz.js} +3 -3
  87. package/dist/{deepDisplacementChart-Dek4HCcF.cjs → deepDisplacementChart-DauJXxkW.cjs} +1 -1
  88. package/dist/{deepDisplacementChart-ByX2EeAy.cjs → deepDisplacementChart-Dm71dHpY.cjs} +1 -1
  89. package/dist/{deepDisplacementView-BXQbJ5vC.cjs → deepDisplacementView-BJAAMyTP.cjs} +1 -1
  90. package/dist/{deepDisplacementView-BosvzWIx.js → deepDisplacementView-RywcwybM.js} +1 -1
  91. package/dist/{deepNodeTemperatureChart-DPeTrYd-.js → deepNodeTemperatureChart-Et7GEspn.js} +2 -2
  92. package/dist/{deepNodeTemperatureChart-CpEfTehr.cjs → deepNodeTemperatureChart-FN14qWXP.cjs} +1 -1
  93. package/dist/{deepTangentAngleChart-CPv5w_eL.js → deepTangentAngleChart-CEsc85Mi.js} +2 -2
  94. package/dist/{deepTangentAngleChart-BysYnjJH.cjs → deepTangentAngleChart-m3r_mJg0.cjs} +1 -1
  95. package/dist/{deepTemperatureField-BQH8OSoj.js → deepTemperatureField-Cr3c_t1T.js} +3 -3
  96. package/dist/{deepTemperatureField-Bj7Q0vFg.cjs → deepTemperatureField-jfV1EahT.cjs} +1 -1
  97. package/dist/{deepTrendChart-DDW9FMRA.js → deepTrendChart-D7IDGKBC.js} +2 -2
  98. package/dist/{deepTrendChart-rtNsOGoK.cjs → deepTrendChart-DIyUa5qe.cjs} +1 -1
  99. package/dist/{deviceOnlineStatus-C3Ns4Eih.cjs → deviceOnlineStatus--G66OLv8.cjs} +1 -1
  100. package/dist/{deviceOnlineStatus-44KJ1Q4h.js → deviceOnlineStatus-DDo0caCc.js} +2 -2
  101. package/dist/{deviceStatus-BBmMff_F.cjs → deviceStatus-B0sBzHx9.cjs} +1 -1
  102. package/dist/{deviceStatus-q5q6x9K8.js → deviceStatus-cmxKruD-.js} +2 -2
  103. package/dist/{displacementDataTable-H1ruFQIu.js → displacementDataTable-BwhylBbX.js} +2 -2
  104. package/dist/{displacementDataTable-CvJctf3O.cjs → displacementDataTable-Bxs-LIOW.cjs} +1 -1
  105. package/dist/{displacementTrajectoryChart-B4l2zV26.js → displacementTrajectoryChart-D3VcZ1qM.js} +2 -2
  106. package/dist/{displacementTrajectoryChart-BHnt4XRT.cjs → displacementTrajectoryChart-JJEGEVMc.cjs} +1 -1
  107. package/dist/{displacementTrendChart-DQ8_g6Rx.js → displacementTrendChart-BlIqd2IK.js} +2 -2
  108. package/dist/{displacementTrendChart-JEQEzPRH.cjs → displacementTrendChart-GmxA4M6n.cjs} +1 -1
  109. package/dist/{dxf-CwyjmtpP.cjs → dxf-JH5I0L5F.cjs} +1 -1
  110. package/dist/{dxf-BXkxWRVK.js → dxf-r-iy1MWn.js} +2 -2
  111. package/dist/{dzc-BD022_cK.js → dzc-CMhN9l76.js} +23 -22
  112. package/dist/{dzc-Cs2c5qKW.cjs → dzc-KbkTkgzk.cjs} +2 -2
  113. package/dist/{emergencyPlan-7AeZCcku.js → emergencyPlan-CR8HkDi4.js} +3 -3
  114. package/dist/{emergencyPlan-DogUPjrm.cjs → emergencyPlan-FSdy0Ik5.cjs} +1 -1
  115. package/dist/evn-D8kcAx_T.cjs +1 -0
  116. package/dist/{evn-6LJwZ9oI.js → evn-DGxcYjRA.js} +12 -11
  117. package/dist/{evolutionChart-2iAuIjeo.cjs → evolutionChart-CI2hDs5C.cjs} +1 -1
  118. package/dist/{evolutionChart-Dvw_-w8R.js → evolutionChart-K7H8KKIG.js} +3 -3
  119. package/dist/{fileViewer-nvVZ78WD.js → fileViewer-Df0AU_z9.js} +2 -2
  120. package/dist/{fileViewer-iCJj8Ui8.cjs → fileViewer-DtIGy-zH.cjs} +1 -1
  121. package/dist/{filterBar-Rv8R1LOA.js → filterBar-BRDe-GgC.js} +2 -2
  122. package/dist/{filterBar-UNAHc5sn.cjs → filterBar-DEfkfl04.cjs} +1 -1
  123. package/dist/{fireCombustionCurve-BJhW5uLF.cjs → fireCombustionCurve-C8UGnEPC.cjs} +1 -1
  124. package/dist/{fireCombustionCurve-KogHwH-O.js → fireCombustionCurve-DJXeynXa.js} +3 -3
  125. package/dist/{fireFilterBar-JKyuyiby.js → fireFilterBar-CXiN-Jkv.js} +2 -2
  126. package/dist/{fireFilterBar-B7dHcX98.cjs → fireFilterBar-iqgVdbgH.cjs} +1 -1
  127. package/dist/{fireHistoryTable-B9h4fG5U.js → fireHistoryTable-CTIdqGk3.js} +2 -2
  128. package/dist/{fireHistoryTable-B0AuWVNb.cjs → fireHistoryTable-Dl4A1pRv.cjs} +1 -1
  129. package/dist/{gag-CorgSUVK.js → gag-BVPZK4hG.js} +2 -2
  130. package/dist/{gag-CU-DwzvP.cjs → gag-DQa6TEDv.cjs} +1 -1
  131. package/dist/gasStationList-BkzLZp4-.cjs +1 -0
  132. package/dist/gasStationList-NFyxin-H.js +1397 -0
  133. package/dist/{geo3dViewer-Cd12xZud.js → geo3dViewer-BJpae_MX.js} +3 -3
  134. package/dist/{geo3dViewer-DY1T1MFb.cjs → geo3dViewer-VRenmVKs.cjs} +1 -1
  135. package/dist/{glbModel-Coj4FgKp.js → glbModel-C96hRxP0.js} +2 -2
  136. package/dist/{glbModel-Y2xx0JR5.cjs → glbModel-i2X1L8LC.cjs} +1 -1
  137. package/dist/{globalObjectSelector-DbJUUWyG.js → globalObjectSelector-D09a0A2t.js} +1 -1
  138. package/dist/{globalObjectSelector-8qMu0LAU.cjs → globalObjectSelector-DhbeX3bm.cjs} +1 -1
  139. package/dist/{gnssFilterBar-Lq2eyPKr.js → gnssFilterBar-BHqE79Ri.js} +2 -2
  140. package/dist/{gnssFilterBar-BlkpVZW3.cjs → gnssFilterBar-BX3mEKiT.cjs} +1 -1
  141. package/dist/{gnssHistoryTable-Dse3OJ1u.js → gnssHistoryTable-D9tglOkP.js} +2 -2
  142. package/dist/{gnssHistoryTable-Bq2w43Wl.cjs → gnssHistoryTable-ZBfzhnlx.cjs} +1 -1
  143. package/dist/{gnssMapView-CWLlDlV5.cjs → gnssMapView-B2rSxPml.cjs} +2 -2
  144. package/dist/{gnssMapView-yTzbni2D.js → gnssMapView-Bicnnr6P.js} +4 -4
  145. package/dist/{gnssSectionProfile-BfGrXkPT.cjs → gnssSectionProfile-BKnvQBHa.cjs} +1 -1
  146. package/dist/{gnssSectionProfile-BF15R9j6.js → gnssSectionProfile-BfkjiI0i.js} +2 -2
  147. package/dist/{gnssTimeSeriesChart-CdOhINv8.js → gnssTimeSeriesChart-BTK4Qize.js} +2 -2
  148. package/dist/{gnssTimeSeriesChart-278oeIbH.cjs → gnssTimeSeriesChart-Cj-151Zs.cjs} +1 -1
  149. package/dist/{gnssXYTrajectory-Bh_tiDoG.cjs → gnssXYTrajectory-BgwA-1Fx.cjs} +1 -1
  150. package/dist/{gnssXYTrajectory-CIOmRk86.js → gnssXYTrajectory-DZiGIgf5.js} +2 -2
  151. package/dist/{grd-Cvhb0vqp.js → grd-DW4ve5k2.js} +77 -69
  152. package/dist/grd-DrRka55C.cjs +1 -0
  153. package/dist/{grdIndass-Blww3AWs.js → grdIndass-CRZ9agT-.js} +2 -2
  154. package/dist/{grdIndass-CAECiDwM.cjs → grdIndass-CofZtTJe.cjs} +1 -1
  155. package/dist/{grg-CZ-1c9KZ.cjs → grg-Cugg5crY.cjs} +1 -1
  156. package/dist/{grg-DaEWoH-V.js → grg-zv4YAkAu.js} +2 -2
  157. package/dist/gridview-BjOw8zBf.cjs +1 -0
  158. package/dist/{gridview-DfxjMc8r.js → gridview-DRB1rG1L.js} +100 -92
  159. package/dist/{groundwaterFilterBar-D-0_8E9_.cjs → groundwaterFilterBar-D4appJuv.cjs} +1 -1
  160. package/dist/{groundwaterFilterBar-BERwFBRI.js → groundwaterFilterBar-DyCL0fs9.js} +2 -2
  161. package/dist/{groundwaterProfileChart-LnbC3LFM.js → groundwaterProfileChart-Bo_XCqyF.js} +3 -3
  162. package/dist/{groundwaterProfileChart-D1N2guhL.cjs → groundwaterProfileChart-CDByowkP.cjs} +2 -2
  163. package/dist/{groundwaterTimeCurve-DsEJddqR.js → groundwaterTimeCurve-C0WRGZNY.js} +3 -3
  164. package/dist/{groundwaterTimeCurve-UD6BkRfr.cjs → groundwaterTimeCurve-Cj5qSKTI.cjs} +1 -1
  165. package/dist/{groupCard-BXkVVWCD.cjs → groupCard-B7XW81Xq.cjs} +1 -1
  166. package/dist/{groupCard-DtrSQ-Z7.js → groupCard-JeKQg4FL.js} +2 -2
  167. package/dist/{headerBar-Bwju12X9.cjs → headerBar-BXNzoDYA.cjs} +1 -1
  168. package/dist/{headerBar-Ddnid9UG.js → headerBar-D5FXDHNR.js} +2 -2
  169. package/dist/{history-Bw6bUdAH.js → history-BDIdK3AY.js} +1 -1
  170. package/dist/{history-27cn84JA.cjs → history-D_NO9ojb.cjs} +1 -1
  171. package/dist/{index-BAzRwQtP.js → index-BHBE19E2.js} +2112 -2095
  172. package/dist/{index-CfXXizWL.cjs → index-D7PZNHF4.cjs} +13 -13
  173. package/dist/{insarDeformChart-C1dTHqOV.js → insarDeformChart-DuBYscAT.js} +2 -2
  174. package/dist/{insarDeformChart-CvI9xE5R.cjs → insarDeformChart-wTnTF5NC.cjs} +1 -1
  175. package/dist/{insarImageViewer-ZvTfxIgq.cjs → insarImageViewer-DGkic1Rj.cjs} +1 -1
  176. package/dist/{insarImageViewer-C41SvD4C.js → insarImageViewer-tPyDE815.js} +2 -2
  177. package/dist/{kds-DUxLqoHG.cjs → kds-Bto_xGCo.cjs} +1 -1
  178. package/dist/{kds-E46fKndy.js → kds-Joeeniwr.js} +2 -2
  179. package/dist/{kpiCard-B9jjjkvf.js → kpiCard-B2MTndw-.js} +2 -2
  180. package/dist/{kpiCard-s94FkJRU.cjs → kpiCard-D_8YToN_.cjs} +1 -1
  181. package/dist/{landslideMap-DjZnkJBI.js → landslideMap-BSImmP3T.js} +3 -3
  182. package/dist/{landslideMap-VxTTg5Cg.cjs → landslideMap-DbvJ2h3R.cjs} +1 -1
  183. package/dist/{landslideWarning-VJ-TbmUJ.cjs → landslideWarning-CVvZS5-l.cjs} +1 -1
  184. package/dist/{landslideWarning-ujgAYvQd.js → landslideWarning-DjgODoEd.js} +5 -5
  185. package/dist/{layerTabs-CIVcYvAB.js → layerTabs-C2qdit8f.js} +2 -2
  186. package/dist/{layerTabs-CRfqhHZK.cjs → layerTabs-CT14C_oL.cjs} +1 -1
  187. package/dist/{leaflet-src-B0Z393os.cjs → leaflet-src-BuDfd_hT.cjs} +1 -1
  188. package/dist/{leaflet-src-Db2Zajkc.js → leaflet-src-CsuGTXZi.js} +1 -1
  189. package/dist/{lerc-DJHaixvD.js → lerc-5_flDPwM.js} +2 -2
  190. package/dist/{lerc-DNW0dac6.cjs → lerc-BVRAhrgg.cjs} +1 -1
  191. package/dist/{lin-BWXOU9MB.cjs → lin--Wc9Mzoq.cjs} +2 -2
  192. package/dist/{lin-Cc9KS6g8.js → lin-Djc6HZCi.js} +22 -21
  193. package/dist/{linIndass-B80W-sSu.cjs → linIndass-Bxs7wFnh.cjs} +1 -1
  194. package/dist/{linIndass-C_RGaGCW.js → linIndass-CQ2BZiY0.js} +2 -2
  195. package/dist/lst-C-yxmy1r.cjs +1 -0
  196. package/dist/{lst-vQnVvY0w.js → lst-CxLOKAzL.js} +65 -57
  197. package/dist/{manualEntry-Cn3zVMa6.js → manualEntry-DLL43b_K.js} +2 -2
  198. package/dist/{manualEntry-C50Ywtez.cjs → manualEntry-Dd9swkaL.cjs} +1 -1
  199. package/dist/{mapBackground-GUJpzKft.js → mapBackground-CDGjjy8-.js} +3 -3
  200. package/dist/{mapBackground-DSWA99yj.cjs → mapBackground-DNQRoaFb.cjs} +1 -1
  201. package/dist/{mappingList-De10OfoU.cjs → mappingList-C9HUo2y9.cjs} +1 -1
  202. package/dist/{mappingList-DABXXILd.js → mappingList-DrhZfKtH.js} +2 -2
  203. package/dist/{markdownViewer-C5FIYiVb.cjs → markdownViewer-Bea8zl8q.cjs} +1 -1
  204. package/dist/{markdownViewer-DpA36Il6.js → markdownViewer-DIb7t2bx.js} +2 -2
  205. package/dist/{mix-control-modal-D8AvXlfA.js → mix-control-modal-CaAkqkzX.js} +1 -1
  206. package/dist/{mix-control-modal-CmiQEHAY.cjs → mix-control-modal-Dh-NZ50w.cjs} +1 -1
  207. package/dist/mixGrid-DFuBeOy6.cjs +1 -0
  208. package/dist/{mixGrid-CGx9sB8L.js → mixGrid-DPdzqHke.js} +52 -42
  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-6fOgrxRi.js → mixiotObjectListApi-CJsYvcG_.js} +1 -1
  213. package/dist/{mixiotObjectListApi--iL8o43r.cjs → mixiotObjectListApi-DVYddjqi.cjs} +1 -1
  214. package/dist/{mjpegCamera-BXoEh0eO.cjs → mjpegCamera-BvlKwwDL.cjs} +1 -1
  215. package/dist/{mjpegCamera-DKHwjIuj.js → mjpegCamera-C9PNl-r4.js} +2 -2
  216. package/dist/{monitorAlert-BWiJrdAz.cjs → monitorAlert-LeeMIRjf.cjs} +1 -1
  217. package/dist/{monitorAlert-bjx3tK4J.js → monitorAlert-vVcYtohz.js} +2 -2
  218. package/dist/{monitorData-BokcK6n-.cjs → monitorData-BtF_j2kd.cjs} +1 -1
  219. package/dist/{monitorData-Btt7aDZ_.js → monitorData-CHhLhD4y.js} +2 -2
  220. package/dist/{monitorSpeedChart-DUg3ZWWL.cjs → monitorSpeedChart-BH_rITMD.cjs} +1 -1
  221. package/dist/{monitorSpeedChart-DUDV7Rzr.js → monitorSpeedChart-Dhchpe2h.js} +1 -1
  222. package/dist/{mxa-B1Zo2pdY.js → mxa-B3DlA-Xs.js} +26 -25
  223. package/dist/{mxa-AkNoI49p.cjs → mxa-CU0OUOdG.cjs} +2 -2
  224. package/dist/{myValue-Dc-TNaIJ.cjs → myValue-AeGxHeE2.cjs} +1 -1
  225. package/dist/{myValue-DiFqx2Mu.js → myValue-DEbeO9Cb.js} +2 -2
  226. package/dist/{myValueList-BvxK1IqV.cjs → myValueList-EkbSpjf0.cjs} +1 -1
  227. package/dist/{myValueList-DT6elu6g.js → myValueList-qDBbrqDv.js} +2 -2
  228. package/dist/{objectList-DP_NFlRs.cjs → objectList-B1Q5MJPW.cjs} +1 -1
  229. package/dist/{objectList-DKdeE9sZ.js → objectList-DTHwnvxc.js} +3 -3
  230. package/dist/{objectListAPP-CmsWqEg9.cjs → objectListAPP-CgPjYGiu.cjs} +1 -1
  231. package/dist/{objectListAPP-DeE1b0G0.js → objectListAPP-njF3tJUP.js} +4 -4
  232. package/dist/{percentBar-D3OMvL9S.js → percentBar-BAwdbKH8.js} +8 -7
  233. package/dist/{percentBar-u174zBDW.cjs → percentBar-Dil8Vm3q.cjs} +2 -2
  234. package/dist/{photo-CqTeohyU.cjs → photo-BlZ5X_9p.cjs} +1 -1
  235. package/dist/{photo-DTa8-JfE.js → photo-Bn0lWnis.js} +2 -2
  236. package/dist/{pie-CFrlejaI.js → pie-CG2cvCTM.js} +8 -7
  237. package/dist/pie-CbOvGe0n.cjs +2 -0
  238. package/dist/{placeholder-CMjwiNJg.js → placeholder-Bdop1bDv.js} +1 -1
  239. package/dist/{placeholder-DowLjPKg.cjs → placeholder-jPC58i_u.cjs} +1 -1
  240. package/dist/{pressBtn-DqnDriy0.cjs → pressBtn-C6mEzpGm.cjs} +1 -1
  241. package/dist/{pressBtn-JjbjOMlO.js → pressBtn-Cwp0-Mju.js} +3 -3
  242. package/dist/{processTable-u-d0dEWb.js → processTable--PnPJzep.js} +2 -2
  243. package/dist/{processTable-DJGB7G0f.cjs → processTable-CUrw-_tx.cjs} +1 -1
  244. package/dist/{progressBar-BleFQuz0.js → progressBar-CLBQrVhg.js} +2 -2
  245. package/dist/{progressBar-B72uJjds.cjs → progressBar-Dg1WRKUU.cjs} +1 -1
  246. package/dist/{progressCircle-BhjM-BJQ.cjs → progressCircle-DBXHBoZS.cjs} +1 -1
  247. package/dist/{progressCircle-WV1cKW4h.js → progressCircle-Dft4lI8s.js} +2 -2
  248. package/dist/{qrcode-GP6jNJVw.js → qrcode-B7VNzAkt.js} +2 -2
  249. package/dist/{qrcode-DDTd4R-s.cjs → qrcode-BH8f2Hfp.cjs} +1 -1
  250. package/dist/{raceBar-Cc9JESDP.js → raceBar-Ck_RLw_X.js} +4 -3
  251. package/dist/{raceBar-CYruNXAm.cjs → raceBar-DZCr0eC-.cjs} +2 -2
  252. package/dist/{rad-BGWast-X.cjs → rad-C3kidKBD.cjs} +1 -1
  253. package/dist/{rad-CjQvIZQD.js → rad-C7ostpqi.js} +11 -10
  254. package/dist/{radarMapViewer-BFpD4-LL.cjs → radarMapViewer-B8g9WmmH.cjs} +1 -1
  255. package/dist/{radarMapViewer-S1rUbXWP.js → radarMapViewer-BxHWMhxf.js} +2 -2
  256. package/dist/{rainfallFilterBar-C3JEj8IG.js → rainfallFilterBar-C6amyMsu.js} +2 -2
  257. package/dist/{rainfallFilterBar-DkDjbh8n.cjs → rainfallFilterBar-G_3cep1I.cjs} +1 -1
  258. package/dist/{rainfallTimeCurve-B2OKTFXD.cjs → rainfallTimeCurve-Ce8eRvv6.cjs} +1 -1
  259. package/dist/{rainfallTimeCurve-BGq_ewcy.js → rainfallTimeCurve-dOfq4IKr.js} +3 -3
  260. package/dist/{rangeLin-bBttYnyX.js → rangeLin-CXrCb7e3.js} +2 -2
  261. package/dist/{rangeLin-DpFnJ8K3.cjs → rangeLin-GOVFLiyl.cjs} +1 -1
  262. package/dist/{realtimeEvolutionMap-BT4k2Wqr.js → realtimeEvolutionMap-CLhVGzzZ.js} +2 -2
  263. package/dist/{realtimeEvolutionMap-C_n42Iq6.cjs → realtimeEvolutionMap-VApbSWKk.cjs} +1 -1
  264. package/dist/{regionBar-CsqUtbp-.js → regionBar-CgCQBHYm.js} +2 -2
  265. package/dist/{regionBar-CSXHxkm3.cjs → regionBar-DOkzOqR4.cjs} +1 -1
  266. package/dist/{request-J5J0wsgP.js → request-CsLYkQ1F.js} +1 -1
  267. package/dist/{request-DUSs41EC.cjs → request-DBDym05o.cjs} +1 -1
  268. package/dist/{retainer1-D22rnFmM.cjs → retainer1-BihlkLkk.cjs} +1 -1
  269. package/dist/{retainer1-Cte9J2d4.js → retainer1-D2ORoyPc.js} +3 -3
  270. package/dist/{retainer2-DRI9ppfn.cjs → retainer2-5-qgDYHt.cjs} +1 -1
  271. package/dist/{retainer2-RS4hCoZq.js → retainer2-89gF8O00.js} +3 -3
  272. package/dist/{retainerRecordList-Cr0StG14.js → retainerRecordList-B7oZOPiz.js} +2 -2
  273. package/dist/{retainerRecordList-DQMB4-L4.cjs → retainerRecordList-ZukSm42U.cjs} +1 -1
  274. package/dist/{retainerRecordListAPP-BP4gtI1i.cjs → retainerRecordListAPP-C3ghAm55.cjs} +1 -1
  275. package/dist/{retainerRecordListAPP-YvyGdK5v.js → retainerRecordListAPP-CJifqoYV.js} +3 -3
  276. package/dist/{ringTopN-BeZDRsjJ.cjs → ringTopN-BKFTI8w3.cjs} +1 -1
  277. package/dist/{ringTopN-ConF82Zh.js → ringTopN-DEWE8OKA.js} +2 -2
  278. package/dist/{riskRegionTable-DTVgEHjW.js → riskRegionTable-DDWPmzK4.js} +2 -2
  279. package/dist/{riskRegionTable-CsGVR8wJ.cjs → riskRegionTable-Dg-ZfEl1.cjs} +1 -1
  280. package/dist/{sankey-J0dciPYs.cjs → sankey-CVIFo2TP.cjs} +1 -1
  281. package/dist/{sankey-_umLe_10.js → sankey-CjCzdx5A.js} +41 -32
  282. package/dist/{scd-BJgAGWPG.cjs → scd-D7vwm2So.cjs} +1 -1
  283. package/dist/{scd-CZ4ai5ex.js → scd-ExZtelyF.js} +2 -2
  284. package/dist/{sideMenu-DV_609Yg.js → sideMenu-9YGvznYC.js} +2 -2
  285. package/dist/{sideMenu-C5WHsknE.cjs → sideMenu-LL4XLBcW.cjs} +1 -1
  286. package/dist/{slopeStability-D6Juu1nG.js → slopeStability-BRVBekjo.js} +2 -2
  287. package/dist/{slopeStability-DXm89s4Z.cjs → slopeStability-BeoNqhaA.cjs} +1 -1
  288. package/dist/{speedCurve-RS-Vmcpx.js → speedCurve-DJUY_EGs.js} +2 -2
  289. package/dist/{speedCurve-XuSoQEpY.cjs → speedCurve-DLuFWpeb.cjs} +1 -1
  290. package/dist/{stackedBar-BZeUHK-7.js → stackedBar-DkjXvEyH.js} +4 -3
  291. package/dist/{stackedBar--qF-SuFI.cjs → stackedBar-W-rgbty6.cjs} +2 -2
  292. package/dist/{stressFilterBar-CGg4KSaN.cjs → stressFilterBar-D02NjLM9.cjs} +1 -1
  293. package/dist/{stressFilterBar-DOEeLbb7.js → stressFilterBar-FmqkdIl5.js} +2 -2
  294. package/dist/{stressTimeCurve-Cq-Tezdg.cjs → stressTimeCurve-CEU3JrfW.cjs} +1 -1
  295. package/dist/{stressTimeCurve-BKhPXoKQ.js → stressTimeCurve-Ck194Rx4.js} +3 -3
  296. package/dist/{swiper-CL6kBvkH.cjs → swiper-CM54onRz.cjs} +1 -1
  297. package/dist/{swiper-D4M4lXZ4.js → swiper-DGAjlGUa.js} +2 -2
  298. package/dist/{terminalConfigList-3dnhayKR.js → terminalConfigList-DmIncQe8.js} +2 -2
  299. package/dist/{terminalConfigList-QY28rzjd.cjs → terminalConfigList-hy2uUsJe.cjs} +1 -1
  300. package/dist/{terminalList-Bu7bP19K.js → terminalList-9qcAM4LG.js} +2 -2
  301. package/dist/{terminalList-tiGSk_0K.cjs → terminalList-C6DxUrb2.cjs} +1 -1
  302. package/dist/{terminalListAPP-DXmgYl5L.js → terminalListAPP-Dl5MpCjB.js} +3 -3
  303. package/dist/{terminalListAPP-C6eX5qzo.cjs → terminalListAPP-RYLAuqiK.cjs} +1 -1
  304. package/dist/{textbox-D9rdyeFX.js → textbox-CHkPlSAX.js} +2 -2
  305. package/dist/{textbox-CgccVs4H.cjs → textbox-GG4d1QIy.cjs} +1 -1
  306. package/dist/{timeQueryBar-CL3HJJhW.js → timeQueryBar-4KSmgROW.js} +1 -1
  307. package/dist/{timeQueryBar-Bb3Xcgpu.cjs → timeQueryBar-B_sNNLNx.cjs} +1 -1
  308. package/dist/{timeSeries-D_CnLULq.cjs → timeSeries-C6jp_8BG.cjs} +1 -1
  309. package/dist/{timeSeries-D6MUsEtQ.js → timeSeries-CgJ0SIKo.js} +3 -3
  310. package/dist/{timeSeriesCurve-Ba9xhV8H.cjs → timeSeriesCurve-CH12QzSV.cjs} +1 -1
  311. package/dist/{timeSeriesCurve-C1T9LrHY.js → timeSeriesCurve-TMqcdmQk.js} +3 -3
  312. package/dist/{toggleBtn-BxANAeYr.js → toggleBtn-4pgNSMG6.js} +28 -28
  313. package/dist/toggleBtn-DQd4gNtX.cjs +1 -0
  314. package/dist/{trajectoryConfigPanel-CXe1FrhE.js → trajectoryConfigPanel-BG3SSwn9.js} +1 -1
  315. package/dist/{trajectoryConfigPanel-Vc6bTKNr.cjs → trajectoryConfigPanel-Bw1VrV-D.cjs} +1 -1
  316. package/dist/{trajectoryScatter-CTAzSMb-.js → trajectoryScatter-CEN_a_hP.js} +2 -2
  317. package/dist/{trajectoryScatter-CNYUKIcZ.cjs → trajectoryScatter-YyQc-_lS.cjs} +1 -1
  318. package/dist/{universalConfigPanel-BOduMFlD.js → universalConfigPanel-DM-AnPb9.js} +1 -1
  319. package/dist/{universalConfigPanel-CsQJsE0y.cjs → universalConfigPanel-DXs2cr1a.cjs} +1 -1
  320. package/dist/{universalTable-ANbcZ8GW.js → universalTable-BqhsfcZp.js} +2 -2
  321. package/dist/{universalTable-Bnknn0qO.cjs → universalTable-zF3jltzT.cjs} +1 -1
  322. package/dist/{video-B0IQ26cF.js → video-D1iN2V0C.js} +2 -2
  323. package/dist/{video-CL9UQ-9d.cjs → video-Dq1cVS0l.cjs} +1 -1
  324. package/dist/{videoMonitor-C9YBVXU9.cjs → videoMonitor-B_1M-KcU.cjs} +1 -1
  325. package/dist/{videoMonitor-DeYYYnDI.js → videoMonitor-hkuvSmn4.js} +2 -2
  326. package/dist/vlu-0SrsCMT-.cjs +1 -0
  327. package/dist/{vlu-DK3einyX.js → vlu-K66RvuKO.js} +10 -9
  328. package/dist/{warningOverview-Bo_QiQhQ.js → warningOverview-BRKnU2qJ.js} +3 -3
  329. package/dist/{warningOverview-DImw0Y_8.cjs → warningOverview-DE4mZJtA.cjs} +1 -1
  330. package/dist/{weather-CXzPAr2U.cjs → weather-Cc-DzSlJ.cjs} +1 -1
  331. package/dist/{weather-BUuoB0nE.js → weather-DXSwe2wL.js} +2 -2
  332. package/dist/{windLin-CPCjUk4K.cjs → windLin-BWa_lMdL.cjs} +1 -1
  333. package/dist/{windLin-CHPjy9FI.js → windLin-BpJaU1Or.js} +2 -2
  334. package/package.json +1 -1
  335. package/dist/actionItem-DYRI89JR.cjs +0 -1
  336. package/dist/arrayCard-CAKVcE2n.cjs +0 -1
  337. package/dist/evn-DQHREzvd.cjs +0 -1
  338. package/dist/gasStationList-Ctwxqvkd.js +0 -1325
  339. package/dist/gasStationList-DMA0u1LJ.cjs +0 -1
  340. package/dist/grd-DYVYK3to.cjs +0 -1
  341. package/dist/gridview-iOWeVjY1.cjs +0 -1
  342. package/dist/lst-CUa31DYE.cjs +0 -1
  343. package/dist/mixGrid-DnGw5RnG.cjs +0 -1
  344. package/dist/pie-lwxiwQMf.cjs +0 -2
  345. package/dist/toggleBtn-Dbt6N5Sb.cjs +0 -1
  346. package/dist/vlu-TqQBXXP4.cjs +0 -1
@@ -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-D34QRHy5.cjs"),g=require("./index-CfXXizWL.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-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 +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-CfXXizWL.cjs");require("element-plus");const xe=require("./EChartComponentBase-jAYYsevE.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-27cn84JA.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-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;
@@ -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-BAzRwQtP.js";
37
+ import { d as F, _ as ze } from "./index-BHBE19E2.js";
38
38
  import "element-plus";
39
- import { E as Fe } from "./EChartComponentBase-dqtNexA7.js";
39
+ import { E as Fe } from "./EChartComponentBase-BtAW2Yko.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-Bw6bUdAH.js"), L = yield new A.default().getHistoryData(l, "rainfallTimeCurve");
353
+ const A = yield import("./history-BDIdK3AY.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) => {
@@ -11,8 +11,8 @@ var k = (u, a, n) => a in u ? U(u, a, { enumerable: !0, configurable: !0, writab
11
11
  return u;
12
12
  }, R = (u, a) => B(u, F(a));
13
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-B5SIFUKu.js";
15
- import { I as re, J as C, K as v, o as ne, _ as se } from "./index-BAzRwQtP.js";
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";
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";
@@ -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-D34QRHy5.cjs"),f=require("./index-CfXXizWL.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-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]+`
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;
@@ -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-BAzRwQtP.js";
30
+ import { a as St, d as j, _ as It } from "./index-BHBE19E2.js";
31
31
  import "element-plus";
32
- import { E as kt } from "./EChartComponentBase-dqtNexA7.js";
32
+ import { E as kt } from "./EChartComponentBase-BtAW2Yko.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,
@@ -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-CfXXizWL.cjs");require("element-plus");const se=require("./EChartComponentBase-jAYYsevE.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-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;
@@ -12,8 +12,8 @@ var V = (i, o, s) => o in i ? j(i, o, { enumerable: !0, configurable: !0, writab
12
12
  }, T = (i, o) => B(i, F(o));
13
13
  import { defineComponent as H, computed as D, openBlock as p, createElementBlock as m, normalizeStyle as u, unref as l, createElementVNode as c, toDisplayString as d, createCommentVNode as C, Fragment as I, renderList as U, renderSlot as P } from "vue";
14
14
  import { u as W } from "./safeI18n-CXZgGKWp.js";
15
- import { B as Y } from "./BaseComponent-B5SIFUKu.js";
16
- import { _ as q } from "./index-BAzRwQtP.js";
15
+ import { B as Y } from "./BaseComponent-qzL33ZSL.js";
16
+ import { _ as q } from "./index-BHBE19E2.js";
17
17
  import { g as G } from "./titleStyle-BT5GlpAb.js";
18
18
  import { A as J, D as K } from "./ele-bar-icon-C-GiCs2a.js";
19
19
  const Q = { class: "title-text" }, X = { class: "mix-body" }, Z = { class: "rb-label" }, tt = { class: "rb-pct" }, et = {
@@ -1,3 +1,3 @@
1
- "use strict";var B=Object.defineProperty,T=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var S=(i,o,r)=>o in i?B(i,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[o]=r,_=(i,o)=>{for(var r in o||(o={}))z.call(o,r)&&S(i,r,o[r]);if(y)for(var r of y(o))$.call(o,r)&&S(i,r,o[r]);return i},v=(i,o)=>T(i,w(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),A=require("./safeI18n-DR20q_h1.cjs"),I=require("./BaseComponent-D34QRHy5.cjs"),j=require("./index-CfXXizWL.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),k=require("./ele-bar-icon-V94clxg_.cjs"),F={class:"title-text"},L={class:"mix-body"},M={class:"rb-label"},H={class:"rb-pct"},U={key:0,class:"rb-empty"},q={DEFAULT_ICON:k.DEFAULT_ICON,ACTIVE_ICON:k.ACTIVE_ICON,NAME_CN:"区域评估条形图",NAME_EN:"Region Bar",ORDER:13,PLATFORM:["pc","screen"]},P={bgColor:"#fff",titleColor:"#111",textColor:"#666",radiusSize:8,textSize:13,rowHeight:32,isHideTitle:!1,description:"支持按矿、区域等维度查看系统运行表现。",barColor:"#3b82f6",barTrackColor:"#eef1f6",maxValue:100,unit:"%",sortDesc:!1,btnText:"数据下载",linkChannel:{value:"landslide",type:"select",label:"component.options.lw_linkChannel",options:[{label:"component.options.lw_linkChannel_landslide",value:"landslide"},{label:"component.options.lw_linkChannel_custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.options.lw_customChannel",showWhen:{linkChannel:"custom"}}},W=[{name:"东帮",fv:"",object_id:"",value:88,color:""},{name:"南帮",fv:"",object_id:"",value:81,color:""},{name:"北帮土场",fv:"",object_id:"",value:93,color:""}],Y=["name","fv","object_id",{key:"color",label:"component.options.lw_barItemColor",type:"color"}],G=["mosaic","statistics","calculate"],J={useAlias:!1,multiObject:!0,source:"statistics"},K={DEFAULT:q,OPTIONS:P,DATA:W,PARAMS:Y,SOURCE:G,COMMON:J},Q=e.defineComponent(v(_({},K),{__name:"regionBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){const o=i;class r extends I.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#666"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",13),rowHeight:this.getOptionValue("rowHeight",32),description:this.getOptionValue("description",""),barColor:this.getOptionValue("barColor","#3b82f6"),barTrackColor:this.getOptionValue("barTrackColor","#eef1f6"),maxValue:Number(this.getOptionValue("maxValue",100)),unit:this.getOptionValue("unit",""),sortDesc:this.getOptionValue("sortDesc",!1),btnText:this.getOptionValue("btnText",""),linkChannel:this.getOptionValue("linkChannel","landslide"),customChannel:this.getOptionValue("customChannel","")}}getLinkChannel(){const n=this.Style.value;return(n==null?void 0:n.linkChannel)==="custom"?n.customChannel||"":(n==null?void 0:n.linkChannel)||""}setSocketData(n){var s;if(!n)return;(((s=this.props.conf)==null?void 0:s.data)||[]).forEach(d=>{const c=this.extractDataValue(n,d.fv);c!=null&&(d.value=Number(c)||0)})}}const m=new r(o,"regionBar");m.setupLifecycle();const{t:x}=A.useSafeI18n(),l=m.getStyle(),f=o.conf,V=e.computed(()=>R.generateTitleStyle(o.conf.options)),p=e.computed(()=>{var n;const t=(((n=o.conf)==null?void 0:n.data)||[]).map(a=>({name:a.name,value:Number(a.value)||0,color:a.color||""}));return l.value.sortDesc&&t.sort((a,s)=>s.value-a.value),t});function O(t){const n=l.value.maxValue||100;return{width:Math.max(0,Math.min(100,t.value/n*100))+"%",background:t.color||l.value.barColor}}function g(t){return t==null||t===""?"--":typeof t=="number"?Number.isInteger(t)?String(t):t.toFixed(1):String(t)}function b(t){const n=String(t!=null?t:"");return/[",\n]/.test(n)?`"${n.replace(/"/g,'""')}"`:n}function E(){const t=new Date,n=a=>String(a).padStart(2,"0");return`${t.getFullYear()}${n(t.getMonth()+1)}${n(t.getDate())}_${n(t.getHours())}${n(t.getMinutes())}${n(t.getSeconds())}`}function N(){if(o.mode!=="preview")return;const t=p.value;if(!t.length)return;const n=l.value.unit||"",s=["区域",n?`数值(${n})`:"数值"].join(","),d=t.map(C=>[b(C.name),b(g(C.value))].join(",")).join(`
1
+ "use strict";var B=Object.defineProperty,T=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var S=(i,o,r)=>o in i?B(i,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[o]=r,_=(i,o)=>{for(var r in o||(o={}))z.call(o,r)&&S(i,r,o[r]);if(y)for(var r of y(o))$.call(o,r)&&S(i,r,o[r]);return i},v=(i,o)=>T(i,w(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),A=require("./safeI18n-DR20q_h1.cjs"),I=require("./BaseComponent-BHUHnLj-.cjs"),j=require("./index-D7PZNHF4.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),k=require("./ele-bar-icon-V94clxg_.cjs"),F={class:"title-text"},L={class:"mix-body"},M={class:"rb-label"},H={class:"rb-pct"},U={key:0,class:"rb-empty"},q={DEFAULT_ICON:k.DEFAULT_ICON,ACTIVE_ICON:k.ACTIVE_ICON,NAME_CN:"区域评估条形图",NAME_EN:"Region Bar",ORDER:13,PLATFORM:["pc","screen"]},P={bgColor:"#fff",titleColor:"#111",textColor:"#666",radiusSize:8,textSize:13,rowHeight:32,isHideTitle:!1,description:"支持按矿、区域等维度查看系统运行表现。",barColor:"#3b82f6",barTrackColor:"#eef1f6",maxValue:100,unit:"%",sortDesc:!1,btnText:"数据下载",linkChannel:{value:"landslide",type:"select",label:"component.options.lw_linkChannel",options:[{label:"component.options.lw_linkChannel_landslide",value:"landslide"},{label:"component.options.lw_linkChannel_custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.options.lw_customChannel",showWhen:{linkChannel:"custom"}}},W=[{name:"东帮",fv:"",object_id:"",value:88,color:""},{name:"南帮",fv:"",object_id:"",value:81,color:""},{name:"北帮土场",fv:"",object_id:"",value:93,color:""}],Y=["name","fv","object_id",{key:"color",label:"component.options.lw_barItemColor",type:"color"}],G=["mosaic","statistics","calculate"],J={useAlias:!1,multiObject:!0,source:"statistics"},K={DEFAULT:q,OPTIONS:P,DATA:W,PARAMS:Y,SOURCE:G,COMMON:J},Q=e.defineComponent(v(_({},K),{__name:"regionBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){const o=i;class r extends I.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#666"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",13),rowHeight:this.getOptionValue("rowHeight",32),description:this.getOptionValue("description",""),barColor:this.getOptionValue("barColor","#3b82f6"),barTrackColor:this.getOptionValue("barTrackColor","#eef1f6"),maxValue:Number(this.getOptionValue("maxValue",100)),unit:this.getOptionValue("unit",""),sortDesc:this.getOptionValue("sortDesc",!1),btnText:this.getOptionValue("btnText",""),linkChannel:this.getOptionValue("linkChannel","landslide"),customChannel:this.getOptionValue("customChannel","")}}getLinkChannel(){const n=this.Style.value;return(n==null?void 0:n.linkChannel)==="custom"?n.customChannel||"":(n==null?void 0:n.linkChannel)||""}setSocketData(n){var s;if(!n)return;(((s=this.props.conf)==null?void 0:s.data)||[]).forEach(d=>{const c=this.extractDataValue(n,d.fv);c!=null&&(d.value=Number(c)||0)})}}const m=new r(o,"regionBar");m.setupLifecycle();const{t:x}=A.useSafeI18n(),l=m.getStyle(),f=o.conf,V=e.computed(()=>R.generateTitleStyle(o.conf.options)),p=e.computed(()=>{var n;const t=(((n=o.conf)==null?void 0:n.data)||[]).map(a=>({name:a.name,value:Number(a.value)||0,color:a.color||""}));return l.value.sortDesc&&t.sort((a,s)=>s.value-a.value),t});function O(t){const n=l.value.maxValue||100;return{width:Math.max(0,Math.min(100,t.value/n*100))+"%",background:t.color||l.value.barColor}}function g(t){return t==null||t===""?"--":typeof t=="number"?Number.isInteger(t)?String(t):t.toFixed(1):String(t)}function b(t){const n=String(t!=null?t:"");return/[",\n]/.test(n)?`"${n.replace(/"/g,'""')}"`:n}function E(){const t=new Date,n=a=>String(a).padStart(2,"0");return`${t.getFullYear()}${n(t.getMonth()+1)}${n(t.getDate())}_${n(t.getHours())}${n(t.getMinutes())}${n(t.getSeconds())}`}function N(){if(o.mode!=="preview")return;const t=p.value;if(!t.length)return;const n=l.value.unit||"",s=["区域",n?`数值(${n})`:"数值"].join(","),d=t.map(C=>[b(C.name),b(g(C.value))].join(",")).join(`
2
2
  `),c=s+`
3
3
  `+d,D=new Blob(["\uFEFF"+c],{type:"text/csv;charset=utf-8;"}),h=URL.createObjectURL(D),u=document.createElement("a");u.href=h,u.download=`区域评估_${E()}.csv`,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(h)}return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(l).bgColor,borderRadius:`${e.unref(l).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(V.value)},[e.createElementVNode("span",F,e.toDisplayString(e.unref(f).caption||e.unref(f).name),1),e.unref(l).btnText?(e.openBlock(),e.createElementBlock("button",{key:0,class:"rb-btn",onClick:N},e.toDisplayString(e.unref(l).btnText),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("div",L,[e.unref(l).description?(e.openBlock(),e.createElementBlock("div",{key:0,class:"body-desc",style:e.normalizeStyle({fontSize:`${e.unref(l).textSize}px`,color:e.unref(l).textColor})},e.toDisplayString(e.unref(l).description),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"body-list",style:e.normalizeStyle({fontSize:`${e.unref(l).textSize}px`,color:e.unref(l).textColor})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(a,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"rb-row",style:e.normalizeStyle({height:`${e.unref(l).rowHeight}px`})},[e.createElementVNode("span",M,e.toDisplayString(a.name||"--"),1),e.createElementVNode("div",{class:"rb-track",style:e.normalizeStyle({background:e.unref(l).barTrackColor})},[e.createElementVNode("div",{class:"rb-fill",style:e.normalizeStyle(O(a))},null,4)],4),e.createElementVNode("span",H,e.toDisplayString(g(a.value))+e.toDisplayString(e.unref(l).unit),1)],4))),128)),p.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",U,e.toDisplayString(e.unref(x)("component.options.lw_noData")),1))],4)]),e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),X=j._export_sfc(Q,[["__scopeId","data-v-675f1cf2"]]);exports.default=X;
@@ -26,7 +26,7 @@ var B = (o, s, i) => new Promise((e, b) => {
26
26
  }, n = (j) => j.done ? e(j.value) : Promise.resolve(j.value).then(c, _);
27
27
  n((i = i.apply(o, s)).next());
28
28
  });
29
- import { Q as P, R as V, P as y } from "./index-BAzRwQtP.js";
29
+ import { Q as P, R as V, P as y } from "./index-BHBE19E2.js";
30
30
  function Q(o, s, i) {
31
31
  return B(this, null, function* () {
32
32
  var n, j, u, I, w, A, F, $;
@@ -1 +1 @@
1
- "use strict";var B=Object.defineProperty,E=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var $=(o,s,i)=>s in o?B(o,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[s]=i,m=(o,s)=>{for(var i in s||(s={}))K.call(s,i)&&$(o,i,s[i]);if(S)for(var i of S(s))R.call(s,i)&&$(o,i,s[i]);return o},I=(o,s)=>E(o,C(s));var k=(o,s,i)=>new Promise((e,b)=>{var c=j=>{try{n(i.next(j))}catch(v){b(v)}},_=j=>{try{n(i.throw(j))}catch(v){b(v)}},n=j=>j.done?e(j.value):Promise.resolve(j.value).then(c,_);n((i=i.apply(o,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-CfXXizWL.cjs");function P(o,s,i){return k(this,null,function*(){var n,j,v,x,w,A,F,M;const{common:e,data:b,options:c}=o,_=e.source||"mosaic";try{yield u.ensureAliasMappingLoaded();const g={action:"subscribe",component_name:o.type,items:Number(((n=c==null?void 0:c.points)==null?void 0:n.value)||o.points)||1,body:{},actionid:o.id},r=new Map;let y="";const T=t=>{const d=e.useAlias||!e.object_id||!e.objectid,a=d?u.getObjectIdsByAliasPattern(t,s):[],f=u.getObjectId(t,d,s);return a.length>0?a:f?[f]:[]};if(!e.multiObject||e.hideMultiObject){const t=e.object_id!==void 0&&e.object_id!==""?e:b[0]||{};y=u.getObjectId(t,e.useAlias||!e.object_id||!e.objectid,s)}if(!y){const t={object_alias:e.object_alias||e.alias||b[0]&&(b[0].object_alias||b[0].alias)||"",alias:e.alias||e.object_alias||b[0]&&(b[0].alias||b[0].object_alias)||"",object_id:e.object_id||e.objectid||b[0]&&(b[0].object_id||b[0].objectid)||"",objectid:e.objectid||e.object_id||b[0]&&(b[0].objectid||b[0].object_id)||""};y=u.getObjectId(t,!0,s)}let O=[];i==="alertTable"&&((j=c==null?void 0:c.columns)!=null&&j.value)&&(O=c.columns.value.filter(t=>t.useFv).map(t=>t.key));const q=(t,d)=>{const a=I(m({},t),{object_id:d,objectid:d}),f=`${d}_${_}`;if(r.has(f)){const l=r.get(f);if(["progressBar","progressCircle"].includes(i)&&a.maxType==="fv")l.id.push(a.fv,a.max);else{let h=a.fv;i==="cmc"&&(h=a.item_fv),["ctrSwitch"].includes(i)&&(h=a.status_fv),h&&l.id.push(h)}}else{let l=[];i==="alertTable"&&O.length>0?l=O:a.fv&&(l=[a.fv]),i==="evn"&&(l=[a.fv,a.status_fv]),["progressBar","progressCircle"].includes(i)&&a.maxType==="fv"&&(l=[a.fv,a.max]),i==="cmc"&&(l=[a.item_fv]),["ctrSwitch"].includes(i)&&(l=[a.status_fv]),l.length>0&&r.set(f,I(m({},a),{id:l}))}};if(b.forEach((t,d)=>{const a={object_alias:t.object_alias||t.alias||t.object_id||t.objectid||"",alias:t.alias||t.object_alias||t.object_id||t.objectid||"",object_id:t.object_id,objectid:t.objectid},f=T(a);(f.length>0?f:[y].filter(Boolean)).forEach(h=>q(t,h))}),i==="sankey"){const t=u.getObjectId({object_alias:e.object_alias||e.alias||e.object_id,alias:e.alias||e.object_alias||e.object_id,object_id:e.object_id,objectid:e.objectid},e.useAlias,s),d=`${t}_${_}`;r.has(d)?r.get(d).id.push(e.originFv):r.set(d,{object_id:t,id:[e.originFv]})}if(i==="scd"){const t=u.getObjectId({object_alias:(v=c==null?void 0:c.object)==null?void 0:v.value,alias:(x=c==null?void 0:c.object)==null?void 0:x.value,object_id:(w=c==null?void 0:c.object)==null?void 0:w.value,objectid:(A=c==null?void 0:c.object)==null?void 0:A.value},e.useAlias,s),d=`${t}_${_}`;r.has(d)?r.get(d).id.push((M=c==null?void 0:c.statusFv)==null?void 0:M.value):r.set(d,{object_id:t,id:[(F=c==null?void 0:c.statusFv)==null?void 0:F.value]})}for(const[t,d]of r)g.body[_]||(g.body[_]=[]),g.body[_].push({object_id:d.object_id,objectid:d.object_id,key:d.id});return g}catch(g){throw console.error("格式化请求时出错:",g),new Error("请求格式化失败")}})}exports.formatRequest=P;
1
+ "use strict";var B=Object.defineProperty,E=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var $=(o,s,i)=>s in o?B(o,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[s]=i,m=(o,s)=>{for(var i in s||(s={}))K.call(s,i)&&$(o,i,s[i]);if(S)for(var i of S(s))R.call(s,i)&&$(o,i,s[i]);return o},I=(o,s)=>E(o,C(s));var k=(o,s,i)=>new Promise((e,b)=>{var c=j=>{try{n(i.next(j))}catch(v){b(v)}},_=j=>{try{n(i.throw(j))}catch(v){b(v)}},n=j=>j.done?e(j.value):Promise.resolve(j.value).then(c,_);n((i=i.apply(o,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-D7PZNHF4.cjs");function P(o,s,i){return k(this,null,function*(){var n,j,v,x,w,A,F,M;const{common:e,data:b,options:c}=o,_=e.source||"mosaic";try{yield u.ensureAliasMappingLoaded();const g={action:"subscribe",component_name:o.type,items:Number(((n=c==null?void 0:c.points)==null?void 0:n.value)||o.points)||1,body:{},actionid:o.id},r=new Map;let y="";const T=t=>{const d=e.useAlias||!e.object_id||!e.objectid,a=d?u.getObjectIdsByAliasPattern(t,s):[],f=u.getObjectId(t,d,s);return a.length>0?a:f?[f]:[]};if(!e.multiObject||e.hideMultiObject){const t=e.object_id!==void 0&&e.object_id!==""?e:b[0]||{};y=u.getObjectId(t,e.useAlias||!e.object_id||!e.objectid,s)}if(!y){const t={object_alias:e.object_alias||e.alias||b[0]&&(b[0].object_alias||b[0].alias)||"",alias:e.alias||e.object_alias||b[0]&&(b[0].alias||b[0].object_alias)||"",object_id:e.object_id||e.objectid||b[0]&&(b[0].object_id||b[0].objectid)||"",objectid:e.objectid||e.object_id||b[0]&&(b[0].objectid||b[0].object_id)||""};y=u.getObjectId(t,!0,s)}let O=[];i==="alertTable"&&((j=c==null?void 0:c.columns)!=null&&j.value)&&(O=c.columns.value.filter(t=>t.useFv).map(t=>t.key));const q=(t,d)=>{const a=I(m({},t),{object_id:d,objectid:d}),f=`${d}_${_}`;if(r.has(f)){const l=r.get(f);if(["progressBar","progressCircle"].includes(i)&&a.maxType==="fv")l.id.push(a.fv,a.max);else{let h=a.fv;i==="cmc"&&(h=a.item_fv),["ctrSwitch"].includes(i)&&(h=a.status_fv),h&&l.id.push(h)}}else{let l=[];i==="alertTable"&&O.length>0?l=O:a.fv&&(l=[a.fv]),i==="evn"&&(l=[a.fv,a.status_fv]),["progressBar","progressCircle"].includes(i)&&a.maxType==="fv"&&(l=[a.fv,a.max]),i==="cmc"&&(l=[a.item_fv]),["ctrSwitch"].includes(i)&&(l=[a.status_fv]),l.length>0&&r.set(f,I(m({},a),{id:l}))}};if(b.forEach((t,d)=>{const a={object_alias:t.object_alias||t.alias||t.object_id||t.objectid||"",alias:t.alias||t.object_alias||t.object_id||t.objectid||"",object_id:t.object_id,objectid:t.objectid},f=T(a);(f.length>0?f:[y].filter(Boolean)).forEach(h=>q(t,h))}),i==="sankey"){const t=u.getObjectId({object_alias:e.object_alias||e.alias||e.object_id,alias:e.alias||e.object_alias||e.object_id,object_id:e.object_id,objectid:e.objectid},e.useAlias,s),d=`${t}_${_}`;r.has(d)?r.get(d).id.push(e.originFv):r.set(d,{object_id:t,id:[e.originFv]})}if(i==="scd"){const t=u.getObjectId({object_alias:(v=c==null?void 0:c.object)==null?void 0:v.value,alias:(x=c==null?void 0:c.object)==null?void 0:x.value,object_id:(w=c==null?void 0:c.object)==null?void 0:w.value,objectid:(A=c==null?void 0:c.object)==null?void 0:A.value},e.useAlias,s),d=`${t}_${_}`;r.has(d)?r.get(d).id.push((M=c==null?void 0:c.statusFv)==null?void 0:M.value):r.set(d,{object_id:t,id:[(F=c==null?void 0:c.statusFv)==null?void 0:F.value]})}for(const[t,d]of r)g.body[_]||(g.body[_]=[]),g.body[_].push({object_id:d.object_id,objectid:d.object_id,key:d.id});return g}catch(g){throw console.error("格式化请求时出错:",g),new Error("请求格式化失败")}})}exports.formatRequest=P;
@@ -1 +1 @@
1
- "use strict";var V=Object.defineProperty,I=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var g=(d,r,s)=>r in d?V(d,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):d[r]=s,C=(d,r)=>{for(var s in r||(r={}))Y.call(r,s)&&g(d,s,r[s]);if(M)for(var s of M(r))j.call(r,s)&&g(d,s,r[s]);return d},z=(d,r)=>I(d,R(r));var O=(d,r,s)=>new Promise((t,p)=>{var y=l=>{try{v(s.next(l))}catch(S){p(S)}},b=l=>{try{v(s.throw(l))}catch(S){p(S)}},v=l=>l.done?t(l.value):Promise.resolve(l.value).then(y,b);v((s=s.apply(d,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),A=require("./BaseComponent-D34QRHy5.cjs"),h=require("./index-CfXXizWL.cjs"),H=require("./titleStyle-NSnz6cUg.cjs"),E=require("./ele-rtn-icon-BrsJIU8J.cjs"),w={class:"mix-body"},P={class:"mix-footer"},k={class:"time-info"},F={DEFAULT_ICON:E.DEFAULT_ICON,ACTIVE_ICON:E.ACTIVE_ICON,NAME_CN:"历程",NAME_EN:"Retainer1",ORDER:1,PLATFORM:["pc","screen","mobile"]},B={nameSize:16,valueSize:48,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",textColor:"#111",titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},N=[{object_id:"",retainer:"",fv:"",fv_name:"",retainer_code:"",status:[{code:0,text:"结束",color:"#409eff"},{code:1,text:"进行",color:"#f56c6c"}]}],L=["object_id","retainer","fv","fv_name","retainer_code"],$=["mosaic"],q=1,U={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},W={DEFAULT:F,OPTIONS:B,DATA:N,PARAMS:L,SOURCE:$,ITEMS:q,COMMON:U},G=o.defineComponent(z(C({},W),{__name:"retainer1",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(d){const r=d,s="--",t=o.reactive({title:s,statusText:s,statusColor:"#409eff",value:s,fvName:"",startTime:s,endTime:"- - - -",duration:s,status:0,startTimestamp:0}),p=f=>f<10?"0"+f:f,y=f=>f>=3600?`${p(Math.floor(f/3600))}:${p(Math.floor(f/60)%60)}:${p(Math.floor(f%60))}`:`${p(Math.floor(f/60))}:${p(Math.floor(f%60))}`;class b extends A.BaseComponent{constructor(){super(...arguments),this.subscribed=!1,this.durationTimer=null}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",16),valueSize:this.getOptionValue("valueSize",48),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){var e,i,c;if(this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=N),this.props.mode==="edit"){const a=((i=this.props.conf.data)==null?void 0:i[0])||{},n=((c=a.status)==null?void 0:c[1])||{text:"进行",color:"#f56c6c"};t.title="设备名称",t.fvName=a.fv_name||a.fv||"FV",t.statusText=n.text,t.statusColor=n.color,t.value="123.45",t.startTime=h.dayjs().subtract(1,"hour").format("YYYY-MM-DD HH:mm:ss"),t.endTime="- - - -",t.duration="01:23"}}startDurationTimer(){this.durationTimer&&clearInterval(this.durationTimer),this.durationTimer=window.setInterval(()=>{if(t.status===1&&t.startTimestamp>0){const e=Math.floor((Date.now()-t.startTimestamp)/1e3);t.duration=y(e)}},1e3)}getPreviewHelper(){return{preview:()=>O(this,null,function*(){try{const i=yield new(yield Promise.resolve().then(()=>require("./history-27cn84JA.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(i)}catch(e){console.error("[Retainer1] 获取历史数据失败:",e)}}),unregister:()=>{this.durationTimer&&(clearInterval(this.durationTimer),this.durationTimer=null)}}}onPreview(){var a;if(this.subscribed)return;const e=this.resolveObjectId();this.subscribeRetainer(e),(((a=this.props.conf.data)==null?void 0:a[0])||{}).fv&&this.subscribeFv(e),this.subscribed=!0}setSocketData(e){if(e){if(e.event==="retainer_result"&&e.source_event){const i=e.source_event;i.retained===1||i.retained==="1"?this.handleRetainerOpen(i):(i.retained===0||i.retained==="0")&&this.handleRetainerClose(i);return}switch(e.event){case"retainer_open":this.handleRetainerOpen(e);break;case"retainer_close":this.handleRetainerClose(e);break;case"retainer_event":this.handleRetainerEvent(e);break;case"recv_fv":this.handleFvData(e);break}}}handleRetainerOpen(e){var n,u;const{conf:i}=this.props,c=((n=i.data)==null?void 0:n[0])||{};t.fvName=c.fv_name||c.fv||"",t.status=1;const a=(u=c.status)==null?void 0:u.find(m=>m.code===1);if(t.statusText=(a==null?void 0:a.text)||"进行",t.statusColor=(a==null?void 0:a.color)||"#f56c6c",t.title=e.label_local||e.label_en||i.name||"--",e.opened_at){t.startTime=h.dayjs(e.opened_at).format("YYYY-MM-DD HH:mm:ss"),t.startTimestamp=h.dayjs(e.opened_at).valueOf();const m=Math.floor((Date.now()-t.startTimestamp)/1e3);t.duration=y(m),this.startDurationTimer()}t.endTime="- - - -"}handleRetainerClose(e){var n,u;const{conf:i}=this.props,c=((n=i.data)==null?void 0:n[0])||{};t.status=0;const a=(u=c.status)==null?void 0:u.find(m=>m.code===0);if(t.statusText=(a==null?void 0:a.text)||"结束",t.statusColor=(a==null?void 0:a.color)||"#409eff",e.close_at&&(t.endTime=h.dayjs(e.close_at).format("YYYY-MM-DD HH:mm:ss")),e.opened_at&&e.close_at){const m=h.dayjs(e.opened_at).valueOf(),T=h.dayjs(e.close_at).valueOf(),D=Math.floor((T-m)/1e3);t.duration=y(D)}this.durationTimer&&(clearInterval(this.durationTimer),this.durationTimer=null)}handleRetainerEvent(e){}handleFvData(e){var a,n;const c=(((a=this.props.conf.data)==null?void 0:a[0])||{}).fv;if(c)try{const u=(n=e.data)==null?void 0:n[c];u!==void 0&&(t.value=u)}catch(u){console.error("[Retainer1] 处理 FV 数据失败:",u)}}setHistoryData(e){var a,n,u;const{conf:i}=this.props,c=((a=i.data)==null?void 0:a[0])||{};try{const m=(u=(n=e==null?void 0:e.history)==null?void 0:n[0])==null?void 0:u[0];m&&this.updateParams(m,c,i)}catch(m){console.error("[Retainer1] setHistoryData error:",m),this.resetParams()}}updateParams(e,i,c){var m,T,D;const a=i.fv;t.fvName=i.fv_name||a||"",t.status=typeof e.status=="string"?parseInt(e.status):(m=e.status)!=null?m:0;const n=(T=i.status)==null?void 0:T.find(_=>_.code===t.status);if(t.statusText=(n==null?void 0:n.text)||(t.status===1?"进行":"结束"),t.statusColor=(n==null?void 0:n.color)||(t.status===1?"#f56c6c":"#409eff"),t.title=e.label_cn||c.name||s,t.startTime=e.start_time?h.dayjs(e.start_time).format("YYYY-MM-DD HH:mm:ss"):s,t.endTime=e.end_time?h.dayjs(e.end_time).format("YYYY-MM-DD HH:mm:ss"):"- - - -",e.start_time){const _=h.dayjs(e.start_time).valueOf();if(t.startTimestamp=_,e.end_time){const x=h.dayjs(e.end_time).valueOf();t.duration=y(Math.floor((x-_)/1e3))}else{const x=Math.floor((Date.now()-_)/1e3);t.duration=y(x),this.startDurationTimer()}}else t.duration="00:00";let u=s;e.mosaic&&Array.isArray(e.mosaic)&&e.mosaic.length>0&&(u=(D=e.mosaic[0][a])!=null?D:s),t.value=u}resetParams(){t.title=s,t.statusText=s,t.statusColor="#409eff",t.value=s,t.startTime=s,t.endTime="- - - -",t.duration=s}}const v=new b(r,"retainer1");v.setupLifecycle();const l=v.getStyle(),S=o.computed(()=>H.generateTitleStyle(r.conf.options));return o.watchEffect(()=>{r.conf.historyData&&v.setHistoryData(r.conf.historyData),r.conf.socketData&&v.setSocketData(r.conf.socketData)}),(f,e)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(l).bgColor,borderRadius:o.unref(l).radiusSize+"px"})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(S.value)},o.toDisplayString(r.conf.caption||t.title),5),o.createElementVNode("div",w,[o.createElementVNode("div",{class:"status-tag",style:o.normalizeStyle({fontSize:o.unref(l).nameSize-2+"px",backgroundColor:t.statusColor,color:"#fff"})},o.toDisplayString(t.fvName?t.fvName+"("+t.statusText+")":t.statusText),5),o.createElementVNode("div",{class:"card-value",style:o.normalizeStyle({fontSize:o.unref(l).valueSize+"px",color:o.unref(l).textColor})},o.toDisplayString(t.value),5)]),o.createElementVNode("div",P,[o.createElementVNode("div",k,[o.createElementVNode("div",{class:"time-item",style:o.normalizeStyle({fontSize:o.unref(l).timeSize+"px",color:o.unref(l).textColor})},o.toDisplayString(t.startTime),5),o.createElementVNode("div",{class:"time-item",style:o.normalizeStyle({fontSize:o.unref(l).timeSize+"px",color:o.unref(l).textColor})},o.toDisplayString(t.endTime),5)]),o.createElementVNode("div",{class:"duration",style:o.normalizeStyle({fontSize:o.unref(l).timeSize+4+"px",color:o.unref(l).textColor})},o.toDisplayString(t.duration),5)]),o.renderSlot(f.$slots,"default",{},void 0,!0)],4))}})),J=h._export_sfc(G,[["__scopeId","data-v-ac5c0908"]]);exports.default=J;
1
+ "use strict";var V=Object.defineProperty,I=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var g=(d,r,s)=>r in d?V(d,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):d[r]=s,C=(d,r)=>{for(var s in r||(r={}))Y.call(r,s)&&g(d,s,r[s]);if(M)for(var s of M(r))j.call(r,s)&&g(d,s,r[s]);return d},z=(d,r)=>I(d,R(r));var O=(d,r,s)=>new Promise((t,p)=>{var y=l=>{try{v(s.next(l))}catch(S){p(S)}},b=l=>{try{v(s.throw(l))}catch(S){p(S)}},v=l=>l.done?t(l.value):Promise.resolve(l.value).then(y,b);v((s=s.apply(d,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),A=require("./BaseComponent-BHUHnLj-.cjs"),h=require("./index-D7PZNHF4.cjs"),H=require("./titleStyle-NSnz6cUg.cjs"),E=require("./ele-rtn-icon-BrsJIU8J.cjs"),w={class:"mix-body"},P={class:"mix-footer"},k={class:"time-info"},F={DEFAULT_ICON:E.DEFAULT_ICON,ACTIVE_ICON:E.ACTIVE_ICON,NAME_CN:"历程",NAME_EN:"Retainer1",ORDER:1,PLATFORM:["pc","screen","mobile"]},B={nameSize:16,valueSize:48,timeSize:12,radiusSize:8,bgColor:"#fff",titleColor:"#111",textColor:"#111",titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},N=[{object_id:"",retainer:"",fv:"",fv_name:"",retainer_code:"",status:[{code:0,text:"结束",color:"#409eff"},{code:1,text:"进行",color:"#f56c6c"}]}],L=["object_id","retainer","fv","fv_name","retainer_code"],$=["mosaic"],q=1,U={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},W={DEFAULT:F,OPTIONS:B,DATA:N,PARAMS:L,SOURCE:$,ITEMS:q,COMMON:U},G=o.defineComponent(z(C({},W),{__name:"retainer1",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(d){const r=d,s="--",t=o.reactive({title:s,statusText:s,statusColor:"#409eff",value:s,fvName:"",startTime:s,endTime:"- - - -",duration:s,status:0,startTimestamp:0}),p=f=>f<10?"0"+f:f,y=f=>f>=3600?`${p(Math.floor(f/3600))}:${p(Math.floor(f/60)%60)}:${p(Math.floor(f%60))}`:`${p(Math.floor(f/60))}:${p(Math.floor(f%60))}`;class b extends A.BaseComponent{constructor(){super(...arguments),this.subscribed=!1,this.durationTimer=null}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",16),valueSize:this.getOptionValue("valueSize",48),timeSize:this.getOptionValue("timeSize",12),radiusSize:this.getOptionValue("radiusSize",8)}}init(){var e,i,c;if(this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=N),this.props.mode==="edit"){const a=((i=this.props.conf.data)==null?void 0:i[0])||{},n=((c=a.status)==null?void 0:c[1])||{text:"进行",color:"#f56c6c"};t.title="设备名称",t.fvName=a.fv_name||a.fv||"FV",t.statusText=n.text,t.statusColor=n.color,t.value="123.45",t.startTime=h.dayjs().subtract(1,"hour").format("YYYY-MM-DD HH:mm:ss"),t.endTime="- - - -",t.duration="01:23"}}startDurationTimer(){this.durationTimer&&clearInterval(this.durationTimer),this.durationTimer=window.setInterval(()=>{if(t.status===1&&t.startTimestamp>0){const e=Math.floor((Date.now()-t.startTimestamp)/1e3);t.duration=y(e)}},1e3)}getPreviewHelper(){return{preview:()=>O(this,null,function*(){try{const i=yield new(yield Promise.resolve().then(()=>require("./history-D_NO9ojb.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(i)}catch(e){console.error("[Retainer1] 获取历史数据失败:",e)}}),unregister:()=>{this.durationTimer&&(clearInterval(this.durationTimer),this.durationTimer=null)}}}onPreview(){var a;if(this.subscribed)return;const e=this.resolveObjectId();this.subscribeRetainer(e),(((a=this.props.conf.data)==null?void 0:a[0])||{}).fv&&this.subscribeFv(e),this.subscribed=!0}setSocketData(e){if(e){if(e.event==="retainer_result"&&e.source_event){const i=e.source_event;i.retained===1||i.retained==="1"?this.handleRetainerOpen(i):(i.retained===0||i.retained==="0")&&this.handleRetainerClose(i);return}switch(e.event){case"retainer_open":this.handleRetainerOpen(e);break;case"retainer_close":this.handleRetainerClose(e);break;case"retainer_event":this.handleRetainerEvent(e);break;case"recv_fv":this.handleFvData(e);break}}}handleRetainerOpen(e){var n,u;const{conf:i}=this.props,c=((n=i.data)==null?void 0:n[0])||{};t.fvName=c.fv_name||c.fv||"",t.status=1;const a=(u=c.status)==null?void 0:u.find(m=>m.code===1);if(t.statusText=(a==null?void 0:a.text)||"进行",t.statusColor=(a==null?void 0:a.color)||"#f56c6c",t.title=e.label_local||e.label_en||i.name||"--",e.opened_at){t.startTime=h.dayjs(e.opened_at).format("YYYY-MM-DD HH:mm:ss"),t.startTimestamp=h.dayjs(e.opened_at).valueOf();const m=Math.floor((Date.now()-t.startTimestamp)/1e3);t.duration=y(m),this.startDurationTimer()}t.endTime="- - - -"}handleRetainerClose(e){var n,u;const{conf:i}=this.props,c=((n=i.data)==null?void 0:n[0])||{};t.status=0;const a=(u=c.status)==null?void 0:u.find(m=>m.code===0);if(t.statusText=(a==null?void 0:a.text)||"结束",t.statusColor=(a==null?void 0:a.color)||"#409eff",e.close_at&&(t.endTime=h.dayjs(e.close_at).format("YYYY-MM-DD HH:mm:ss")),e.opened_at&&e.close_at){const m=h.dayjs(e.opened_at).valueOf(),T=h.dayjs(e.close_at).valueOf(),D=Math.floor((T-m)/1e3);t.duration=y(D)}this.durationTimer&&(clearInterval(this.durationTimer),this.durationTimer=null)}handleRetainerEvent(e){}handleFvData(e){var a,n;const c=(((a=this.props.conf.data)==null?void 0:a[0])||{}).fv;if(c)try{const u=(n=e.data)==null?void 0:n[c];u!==void 0&&(t.value=u)}catch(u){console.error("[Retainer1] 处理 FV 数据失败:",u)}}setHistoryData(e){var a,n,u;const{conf:i}=this.props,c=((a=i.data)==null?void 0:a[0])||{};try{const m=(u=(n=e==null?void 0:e.history)==null?void 0:n[0])==null?void 0:u[0];m&&this.updateParams(m,c,i)}catch(m){console.error("[Retainer1] setHistoryData error:",m),this.resetParams()}}updateParams(e,i,c){var m,T,D;const a=i.fv;t.fvName=i.fv_name||a||"",t.status=typeof e.status=="string"?parseInt(e.status):(m=e.status)!=null?m:0;const n=(T=i.status)==null?void 0:T.find(_=>_.code===t.status);if(t.statusText=(n==null?void 0:n.text)||(t.status===1?"进行":"结束"),t.statusColor=(n==null?void 0:n.color)||(t.status===1?"#f56c6c":"#409eff"),t.title=e.label_cn||c.name||s,t.startTime=e.start_time?h.dayjs(e.start_time).format("YYYY-MM-DD HH:mm:ss"):s,t.endTime=e.end_time?h.dayjs(e.end_time).format("YYYY-MM-DD HH:mm:ss"):"- - - -",e.start_time){const _=h.dayjs(e.start_time).valueOf();if(t.startTimestamp=_,e.end_time){const x=h.dayjs(e.end_time).valueOf();t.duration=y(Math.floor((x-_)/1e3))}else{const x=Math.floor((Date.now()-_)/1e3);t.duration=y(x),this.startDurationTimer()}}else t.duration="00:00";let u=s;e.mosaic&&Array.isArray(e.mosaic)&&e.mosaic.length>0&&(u=(D=e.mosaic[0][a])!=null?D:s),t.value=u}resetParams(){t.title=s,t.statusText=s,t.statusColor="#409eff",t.value=s,t.startTime=s,t.endTime="- - - -",t.duration=s}}const v=new b(r,"retainer1");v.setupLifecycle();const l=v.getStyle(),S=o.computed(()=>H.generateTitleStyle(r.conf.options));return o.watchEffect(()=>{r.conf.historyData&&v.setHistoryData(r.conf.historyData),r.conf.socketData&&v.setSocketData(r.conf.socketData)}),(f,e)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(l).bgColor,borderRadius:o.unref(l).radiusSize+"px"})},[o.createElementVNode("div",{class:"mix-title",style:o.normalizeStyle(S.value)},o.toDisplayString(r.conf.caption||t.title),5),o.createElementVNode("div",w,[o.createElementVNode("div",{class:"status-tag",style:o.normalizeStyle({fontSize:o.unref(l).nameSize-2+"px",backgroundColor:t.statusColor,color:"#fff"})},o.toDisplayString(t.fvName?t.fvName+"("+t.statusText+")":t.statusText),5),o.createElementVNode("div",{class:"card-value",style:o.normalizeStyle({fontSize:o.unref(l).valueSize+"px",color:o.unref(l).textColor})},o.toDisplayString(t.value),5)]),o.createElementVNode("div",P,[o.createElementVNode("div",k,[o.createElementVNode("div",{class:"time-item",style:o.normalizeStyle({fontSize:o.unref(l).timeSize+"px",color:o.unref(l).textColor})},o.toDisplayString(t.startTime),5),o.createElementVNode("div",{class:"time-item",style:o.normalizeStyle({fontSize:o.unref(l).timeSize+"px",color:o.unref(l).textColor})},o.toDisplayString(t.endTime),5)]),o.createElementVNode("div",{class:"duration",style:o.normalizeStyle({fontSize:o.unref(l).timeSize+4+"px",color:o.unref(l).textColor})},o.toDisplayString(t.duration),5)]),o.renderSlot(f.$slots,"default",{},void 0,!0)],4))}})),J=h._export_sfc(G,[["__scopeId","data-v-ac5c0908"]]);exports.default=J;
@@ -27,8 +27,8 @@ var I = (f, a, o) => new Promise((t, v) => {
27
27
  _((o = o.apply(f, a)).next());
28
28
  });
29
29
  import { defineComponent as k, reactive as P, computed as F, watchEffect as j, openBlock as B, createElementBlock as L, normalizeStyle as y, unref as d, createElementVNode as p, toDisplayString as D, renderSlot as $ } from "vue";
30
- import { B as U } from "./BaseComponent-B5SIFUKu.js";
31
- import { d as h, _ as W } from "./index-BAzRwQtP.js";
30
+ import { B as U } from "./BaseComponent-qzL33ZSL.js";
31
+ import { d as h, _ as W } from "./index-BHBE19E2.js";
32
32
  import { g as q } from "./titleStyle-BT5GlpAb.js";
33
33
  import { A as G, D as J } from "./ele-rtn-icon-CqCKSHIw.js";
34
34
  const K = { class: "mix-body" }, Q = { class: "mix-footer" }, X = { class: "time-info" }, Z = {
@@ -129,7 +129,7 @@ const K = { class: "mix-body" }, Q = { class: "mix-footer" }, X = { class: "time
129
129
  return {
130
130
  preview: () => I(this, null, function* () {
131
131
  try {
132
- const i = yield new (yield import("./history-Bw6bUdAH.js")).default().getHistoryData(this.props, this.componentType);
132
+ const i = yield new (yield import("./history-BDIdK3AY.js")).default().getHistoryData(this.props, this.componentType);
133
133
  this.setHistoryData(i);
134
134
  } catch (e) {
135
135
  console.error("[Retainer1] 获取历史数据失败:", e);
@@ -1 +1 @@
1
- "use strict";var se=Object.defineProperty,ae=Object.defineProperties;var re=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var G=(b,l,c)=>l in b?se(b,l,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[l]=c,I=(b,l)=>{for(var c in l||(l={}))le.call(l,c)&&G(b,c,l[c]);if($)for(var c of $(l))ce.call(l,c)&&G(b,c,l[c]);return b},R=(b,l)=>ae(b,re(l));var U=(b,l,c)=>new Promise((w,D)=>{var C=S=>{try{L(c.next(S))}catch(g){D(g)}},E=S=>{try{L(c.throw(S))}catch(g){D(g)}},L=S=>S.done?w(S.value):Promise.resolve(S.value).then(C,E);L((c=c.apply(b,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),de=require("./BaseComponent-D34QRHy5.cjs"),T=require("./index-CfXXizWL.cjs"),he=require("./titleStyle-NSnz6cUg.cjs");require("./index-CJgyJTvc.cjs");const X=require("./ele-rtn-icon-BrsJIU8J.cjs"),fe=require("./echarts-BB8O2KSA.cjs"),ue={class:"mix-body"},me={DEFAULT_ICON:X.DEFAULT_ICON,ACTIVE_ICON:X.ACTIVE_ICON,NAME_CN:"历程管理",NAME_EN:"Retainer2",ORDER:2,PLATFORM:["pc","screen","mobile"]},pe={titleColor:"#111",radiusSize:8,bgColor:"#fff",textColor:"#111",barWidth:30,barGap:0,timeWindow:5,isHideTitle:!0,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},J=[{name:"历程1",object_id:"",retainer:"",retainer_code:"",color:"#ee6666",showLine:!1,fv:"",lineStyle:"solid",lineWidth:2}],ye=["name","object_id","retainer","retainer_code","color","showLine",{key:"fv",dependent:"showLine"},{key:"lineStyle",dependent:"showLine"},{key:"lineWidth",dependent:"showLine"}],ge=["mosaic"],ve={useAlias:!1,multiObject:!0,showBothModes:!0,source:"mosaic"},be={DEFAULT:me,OPTIONS:pe,DATA:J,PARAMS:ye,SOURCE:ge,COMMON:ve},we=h.defineComponent(R(I({},be),{__name:"retainer2",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(b){const l=b,c=h.ref(null);let w=null;const D=h.reactive([]),C=p=>D[p];class E extends de.BaseComponent{constructor(){super(...arguments),this.subscribed=!1}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),barWidth:this.getOptionValue("barWidth",30),barGap:this.getOptionValue("barGap",0),timeWindow:this.getOptionValue("timeWindow",5),isHideTitle:this.getOptionValue("isHideTitle",!0)}}init(){var e;this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=J),this.props.mode==="edit"&&L()}getPreviewHelper(){return{preview:()=>U(this,null,function*(){try{const i=yield new(yield Promise.resolve().then(()=>require("./history-27cn84JA.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(i)}catch(e){console.error("[Retainer2] 获取历史数据失败:",e)}}),unregister:()=>{}}}onPreview(){var n;if(this.subscribed)return;const{conf:e}=this.props,{data:i,common:t}=e;if(t.multiObject&&Array.isArray(i)){const o=new Set;i.forEach(s=>{const r=this.resolveObjectId(s);!r||o.has(r)||(o.add(r),this.subscribeRetainer(r),s.showLine&&s.fv&&this.subscribeFv(r))})}else{const o=this.resolveObjectId();this.subscribeRetainer(o),(n=i==null?void 0:i[0])!=null&&n.fv&&this.subscribeFv(o)}this.subscribed=!0}setSocketData(e){if(e)switch(e.event){case"retainer_open":this.handleRetainerOpen(e);break;case"retainer_close":this.handleRetainerClose(e);break;case"retainer_event":this.handleRetainerEvent(e);break;case"recv_fv":this.handleFvData(e);break}}handleRetainerOpen(e){const{conf:i}=this.props,{data:t,common:n}=i,o=e.object_id,s=t.findIndex(a=>this.resolveObjectId(n!=null&&n.multiObject?a:void 0)===o);if(s===-1)return;let r=C(s);if(!r){const a=t[s];r={name:a.name||`历程${s+1}`,color:a.color||"#409eff",objectId:o,fv:a.fv||"",periods:[],lineData:[],showLine:a.showLine||!1,lineStyle:a.lineStyle||"solid",lineWidth:a.lineWidth||2},D.push(r)}e.opened_at&&r.periods.push({start:e.opened_at,end:null}),O()}handleRetainerClose(e){const{conf:i}=this.props,{data:t,common:n}=i,o=e.object_id,s=t.findIndex(d=>this.resolveObjectId(n!=null&&n.multiObject?d:void 0)===o);if(s===-1)return;const r=C(s);if(!r)return;const a=r.periods[r.periods.length-1];a&&!a.end&&(a.end=e.close_at||new Date().toISOString()),O()}handleRetainerEvent(e){}handleFvData(e){var d;const{conf:i}=this.props,{data:t,common:n}=i,o=e.object_id,s=t.findIndex(f=>this.resolveObjectId(n!=null&&n.multiObject?f:void 0)===o);if(s===-1)return;const a=t[s].fv;if(a)try{const f=(d=e.data)==null?void 0:d[a];if(f!==void 0){const v=C(s);if(v&&v.showLine){const u=e.datetime||new Date().toISOString();v.lineData.push({time:u,value:f}),v.lineData.sort((_,M)=>new Date(_.time).getTime()-new Date(M.time).getTime()),O()}}}catch(f){console.error("[Retainer2] 处理 FV 数据失败:",f)}}setHistoryData(e){const{conf:i}=this.props,{data:t,common:n}=i;D.length=0,t.forEach((o,s)=>{var f;const r=this.resolveObjectId(n!=null&&n.multiObject?o:void 0),a=o.fv||"",d={name:o.name||`历程${s+1}`,color:o.color||"#409eff",objectId:r,fv:a,periods:[],lineData:[],showLine:o.showLine||!1,lineStyle:o.lineStyle||"solid",lineWidth:o.lineWidth||2};try{(((f=e==null?void 0:e.history)==null?void 0:f[s])||[]).forEach(u=>{u&&u.start_time&&(d.periods.push({start:u.start_time,end:u.end_time||null}),o.showLine&&a&&u.mosaic&&Array.isArray(u.mosaic)&&u.mosaic.forEach(_=>{const M=_[a];M!==void 0&&_.time&&d.lineData.push({time:_.time,value:M})}))}),d.lineData.sort((u,_)=>new Date(u.time).getTime()-new Date(_.time).getTime())}catch(v){}D.push(d)}),O()}}const L=()=>{const{data:p}=l.conf;D.length=0;const e=T.dayjs();p.forEach((i,t)=>{const n=`edit_object_${t}`,o=[{start:e.subtract(6+t,"hour").format("YYYY-MM-DD HH:mm:ss"),end:e.subtract(4+t,"hour").format("YYYY-MM-DD HH:mm:ss")},{start:e.subtract(2+t*.5,"hour").format("YYYY-MM-DD HH:mm:ss"),end:e.subtract(t*.3,"hour").format("YYYY-MM-DD HH:mm:ss")}],s=[];i.showLine&&o.forEach(r=>{const a=T.dayjs(r.start),f=T.dayjs(r.end).diff(a,"minute"),v=Math.max(5,Math.floor(f/10));for(let u=0;u<=v;u++){const _=a.add(f/v*u,"minute");s.push({time:_.format("YYYY-MM-DD HH:mm:ss"),value:150+Math.sin(u*.8+t*2)*50+t*30})}}),D.push({name:i.name||`历程${t+1}`,color:i.color||["#ee6666","#91cc75","#fac858"][t%3],objectId:n,fv:i.fv||"",periods:o,lineData:s,showLine:i.showLine||!1,lineStyle:i.lineStyle||"solid",lineWidth:i.lineWidth||2})})},S=new E(l,"retainer2");S.setupLifecycle();const g=S.getStyle(),W=l.conf,K=h.computed(()=>he.generateTitleStyle(l.conf.options)),V=()=>D.filter(p=>p.showLine&&p.lineData.length>0),Q=()=>{const p=[],e=V();let i=1;return e.forEach(t=>{t.periods.forEach((n,o)=>{const s=new Date(n.start).getTime(),r=n.end?new Date(n.end).getTime():Date.now(),a=t.lineData.filter(d=>{const f=new Date(d.time).getTime();return f>=s&&f<=r}).map(d=>[new Date(d.time).getTime(),d.value]);a.length>0&&p.push({name:o===0?`${t.name}-曲线`:`${t.name}-曲线-${o+1}`,type:"line",yAxisIndex:i,smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:t.color,width:t.lineWidth,type:t.lineStyle},itemStyle:{color:t.color},data:a})}),i++}),p},Z=p=>{const e=V(),i=e.length,t=[{type:"value",min:0,max:p,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}}];return e.forEach((n,o)=>{const s=n.lineData.map(u=>u.value),r=Math.max(...s),a=Math.min(...s),d=Math.ceil(r*1.1),f=Math.floor(a*.9),v=o*50;t.push({type:"value",position:"right",offset:v,min:f,max:d,axisLine:{show:!0,lineStyle:{color:n.color}},axisTick:{show:!0,lineStyle:{color:n.color}},axisLabel:{color:n.color,fontSize:10},splitLine:{show:!1}})}),{yAxes:t,lineCount:i}},k=()=>{c.value&&(w=fe.init(c.value),O())},O=()=>{var B;if(!w)return;const p=D.length||1,e=((B=c.value)==null?void 0:B.clientHeight)||300,i=30,t=10,n=e-i-t,o=g.value.barWidth||30,s=g.value.barGap||0,r=o+s,a=p*r;let d=o,f=s,v=r;if(a>n){const m=n/a;d=Math.max(o*m,10),f=s*m,v=d+f}const u=[];let _=!1;D.forEach((m,y)=>{m.periods.forEach(x=>{const j=new Date(x.start).getTime(),Y=x.end?new Date(x.end).getTime():Date.now();x.end||(_=!0),u.push({name:m.name,value:[j,Y,y],itemStyle:{color:x.end?m.color+"80":m.color}})})});const{yAxes:M,lineCount:N}=Z(p),ee=N>0?20+N*50:20,te={tooltip:{trigger:"axis",formatter:m=>{if(Array.isArray(m)){const y=m.find(x=>x.seriesType==="line");if(y){const x=T.dayjs(y.value[0]).format("YYYY-MM-DD HH:mm:ss");return`${y.seriesName}<br/>时间: ${x}<br/>数值: ${y.value[1]}`}}return""}},grid:{left:40,right:ee,top:t,bottom:i,containLabel:!1},xAxis:R(I({type:"time",position:"bottom"},_?{min:Date.now()-g.value.timeWindow*60*1e3,max:Date.now()}:{}),{axisLine:{show:!0,lineStyle:{color:g.value.titleColor}},axisTick:{show:!0,lineStyle:{color:g.value.titleColor}},axisLabel:{formatter:"{HH}:{mm}",color:g.value.textColor,fontSize:11,margin:8},splitLine:{show:!1}}),yAxis:M,series:[{name:"甘特图",type:"custom",yAxisIndex:0,renderItem:(m,y)=>{var q;const x=y.value(0),j=y.value(1),Y=y.value(2),A=y.coord([x,0])[0],oe=y.coord([j,0])[0],P=m.coordSys.y+m.coordSys.height-(Y+1)*v+f,ne=P+d/2,F=Math.max(oe-A,2),ie=((q=D[Y])==null?void 0:q.name)||"";return{type:"group",children:[{type:"rect",shape:{x:A,y:P,width:F,height:d,r:2},style:y.style()},{type:"text",style:{x:A+F/2,y:ne,text:ie,fill:g.value.textColor,fontSize:11,textAlign:"center",textVerticalAlign:"middle"}}]}},encode:{x:[0,1],y:2,tooltip:[0,1]},tooltip:{formatter:m=>{const y=T.dayjs(m.value[0]).format("YYYY-MM-DD HH:mm:ss"),x=T.dayjs(m.value[1]).format("YYYY-MM-DD HH:mm:ss"),j=m.value[1]>=Date.now()-1e3;return`${m.name}<br/>开始: ${y}<br/>结束: ${j?"进行中":x}`}},data:u},...Q()]};w.setOption(te,!0)},z=()=>{w==null||w.resize()};let H=null;return h.onMounted(()=>{H=new ResizeObserver(()=>{w?w.resize():c.value&&k()}),c.value&&H.observe(c.value),setTimeout(()=>{k()},100),window.addEventListener("resize",z)}),h.onUnmounted(()=>{window.removeEventListener("resize",z),H==null||H.disconnect(),w==null||w.dispose()}),h.watch(()=>l.conf.data,()=>{l.mode==="edit"&&L(),O()},{deep:!0}),h.watch(()=>l.conf.options,()=>{g.value=S.extractStyles(),O()},{deep:!0}),h.watchEffect(()=>{l.conf.historyData&&S.setHistoryData(l.conf.historyData),l.conf.socketData&&S.setSocketData(l.conf.socketData)}),(p,e)=>(h.openBlock(),h.createElementBlock("div",{class:"mix-component",style:h.normalizeStyle({background:h.unref(g).bgColor,borderRadius:h.unref(g).radiusSize+"px"})},[h.createElementVNode("div",{class:"mix-title",style:h.normalizeStyle(K.value)},h.toDisplayString(h.unref(W).caption||h.unref(W).name),5),h.createElementVNode("div",ue,[h.createElementVNode("div",{class:"timeline-chart",ref_key:"chartRef",ref:c},null,512)]),h.renderSlot(p.$slots,"default",{},void 0,!0)],4))}})),De=T._export_sfc(we,[["__scopeId","data-v-7162b702"]]);exports.default=De;
1
+ "use strict";var se=Object.defineProperty,ae=Object.defineProperties;var re=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var G=(b,l,c)=>l in b?se(b,l,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[l]=c,I=(b,l)=>{for(var c in l||(l={}))le.call(l,c)&&G(b,c,l[c]);if($)for(var c of $(l))ce.call(l,c)&&G(b,c,l[c]);return b},R=(b,l)=>ae(b,re(l));var U=(b,l,c)=>new Promise((w,D)=>{var C=S=>{try{L(c.next(S))}catch(g){D(g)}},E=S=>{try{L(c.throw(S))}catch(g){D(g)}},L=S=>S.done?w(S.value):Promise.resolve(S.value).then(C,E);L((c=c.apply(b,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),de=require("./BaseComponent-BHUHnLj-.cjs"),T=require("./index-D7PZNHF4.cjs"),he=require("./titleStyle-NSnz6cUg.cjs");require("./index-CJgyJTvc.cjs");const X=require("./ele-rtn-icon-BrsJIU8J.cjs"),fe=require("./echarts-BB8O2KSA.cjs"),ue={class:"mix-body"},me={DEFAULT_ICON:X.DEFAULT_ICON,ACTIVE_ICON:X.ACTIVE_ICON,NAME_CN:"历程管理",NAME_EN:"Retainer2",ORDER:2,PLATFORM:["pc","screen","mobile"]},pe={titleColor:"#111",radiusSize:8,bgColor:"#fff",textColor:"#111",barWidth:30,barGap:0,timeWindow:5,isHideTitle:!0,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},J=[{name:"历程1",object_id:"",retainer:"",retainer_code:"",color:"#ee6666",showLine:!1,fv:"",lineStyle:"solid",lineWidth:2}],ye=["name","object_id","retainer","retainer_code","color","showLine",{key:"fv",dependent:"showLine"},{key:"lineStyle",dependent:"showLine"},{key:"lineWidth",dependent:"showLine"}],ge=["mosaic"],ve={useAlias:!1,multiObject:!0,showBothModes:!0,source:"mosaic"},be={DEFAULT:me,OPTIONS:pe,DATA:J,PARAMS:ye,SOURCE:ge,COMMON:ve},we=h.defineComponent(R(I({},be),{__name:"retainer2",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(b){const l=b,c=h.ref(null);let w=null;const D=h.reactive([]),C=p=>D[p];class E extends de.BaseComponent{constructor(){super(...arguments),this.subscribed=!1}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),barWidth:this.getOptionValue("barWidth",30),barGap:this.getOptionValue("barGap",0),timeWindow:this.getOptionValue("timeWindow",5),isHideTitle:this.getOptionValue("isHideTitle",!0)}}init(){var e;this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=J),this.props.mode==="edit"&&L()}getPreviewHelper(){return{preview:()=>U(this,null,function*(){try{const i=yield new(yield Promise.resolve().then(()=>require("./history-D_NO9ojb.cjs"))).default().getHistoryData(this.props,this.componentType);this.setHistoryData(i)}catch(e){console.error("[Retainer2] 获取历史数据失败:",e)}}),unregister:()=>{}}}onPreview(){var n;if(this.subscribed)return;const{conf:e}=this.props,{data:i,common:t}=e;if(t.multiObject&&Array.isArray(i)){const o=new Set;i.forEach(s=>{const r=this.resolveObjectId(s);!r||o.has(r)||(o.add(r),this.subscribeRetainer(r),s.showLine&&s.fv&&this.subscribeFv(r))})}else{const o=this.resolveObjectId();this.subscribeRetainer(o),(n=i==null?void 0:i[0])!=null&&n.fv&&this.subscribeFv(o)}this.subscribed=!0}setSocketData(e){if(e)switch(e.event){case"retainer_open":this.handleRetainerOpen(e);break;case"retainer_close":this.handleRetainerClose(e);break;case"retainer_event":this.handleRetainerEvent(e);break;case"recv_fv":this.handleFvData(e);break}}handleRetainerOpen(e){const{conf:i}=this.props,{data:t,common:n}=i,o=e.object_id,s=t.findIndex(a=>this.resolveObjectId(n!=null&&n.multiObject?a:void 0)===o);if(s===-1)return;let r=C(s);if(!r){const a=t[s];r={name:a.name||`历程${s+1}`,color:a.color||"#409eff",objectId:o,fv:a.fv||"",periods:[],lineData:[],showLine:a.showLine||!1,lineStyle:a.lineStyle||"solid",lineWidth:a.lineWidth||2},D.push(r)}e.opened_at&&r.periods.push({start:e.opened_at,end:null}),O()}handleRetainerClose(e){const{conf:i}=this.props,{data:t,common:n}=i,o=e.object_id,s=t.findIndex(d=>this.resolveObjectId(n!=null&&n.multiObject?d:void 0)===o);if(s===-1)return;const r=C(s);if(!r)return;const a=r.periods[r.periods.length-1];a&&!a.end&&(a.end=e.close_at||new Date().toISOString()),O()}handleRetainerEvent(e){}handleFvData(e){var d;const{conf:i}=this.props,{data:t,common:n}=i,o=e.object_id,s=t.findIndex(f=>this.resolveObjectId(n!=null&&n.multiObject?f:void 0)===o);if(s===-1)return;const a=t[s].fv;if(a)try{const f=(d=e.data)==null?void 0:d[a];if(f!==void 0){const v=C(s);if(v&&v.showLine){const u=e.datetime||new Date().toISOString();v.lineData.push({time:u,value:f}),v.lineData.sort((_,M)=>new Date(_.time).getTime()-new Date(M.time).getTime()),O()}}}catch(f){console.error("[Retainer2] 处理 FV 数据失败:",f)}}setHistoryData(e){const{conf:i}=this.props,{data:t,common:n}=i;D.length=0,t.forEach((o,s)=>{var f;const r=this.resolveObjectId(n!=null&&n.multiObject?o:void 0),a=o.fv||"",d={name:o.name||`历程${s+1}`,color:o.color||"#409eff",objectId:r,fv:a,periods:[],lineData:[],showLine:o.showLine||!1,lineStyle:o.lineStyle||"solid",lineWidth:o.lineWidth||2};try{(((f=e==null?void 0:e.history)==null?void 0:f[s])||[]).forEach(u=>{u&&u.start_time&&(d.periods.push({start:u.start_time,end:u.end_time||null}),o.showLine&&a&&u.mosaic&&Array.isArray(u.mosaic)&&u.mosaic.forEach(_=>{const M=_[a];M!==void 0&&_.time&&d.lineData.push({time:_.time,value:M})}))}),d.lineData.sort((u,_)=>new Date(u.time).getTime()-new Date(_.time).getTime())}catch(v){}D.push(d)}),O()}}const L=()=>{const{data:p}=l.conf;D.length=0;const e=T.dayjs();p.forEach((i,t)=>{const n=`edit_object_${t}`,o=[{start:e.subtract(6+t,"hour").format("YYYY-MM-DD HH:mm:ss"),end:e.subtract(4+t,"hour").format("YYYY-MM-DD HH:mm:ss")},{start:e.subtract(2+t*.5,"hour").format("YYYY-MM-DD HH:mm:ss"),end:e.subtract(t*.3,"hour").format("YYYY-MM-DD HH:mm:ss")}],s=[];i.showLine&&o.forEach(r=>{const a=T.dayjs(r.start),f=T.dayjs(r.end).diff(a,"minute"),v=Math.max(5,Math.floor(f/10));for(let u=0;u<=v;u++){const _=a.add(f/v*u,"minute");s.push({time:_.format("YYYY-MM-DD HH:mm:ss"),value:150+Math.sin(u*.8+t*2)*50+t*30})}}),D.push({name:i.name||`历程${t+1}`,color:i.color||["#ee6666","#91cc75","#fac858"][t%3],objectId:n,fv:i.fv||"",periods:o,lineData:s,showLine:i.showLine||!1,lineStyle:i.lineStyle||"solid",lineWidth:i.lineWidth||2})})},S=new E(l,"retainer2");S.setupLifecycle();const g=S.getStyle(),W=l.conf,K=h.computed(()=>he.generateTitleStyle(l.conf.options)),V=()=>D.filter(p=>p.showLine&&p.lineData.length>0),Q=()=>{const p=[],e=V();let i=1;return e.forEach(t=>{t.periods.forEach((n,o)=>{const s=new Date(n.start).getTime(),r=n.end?new Date(n.end).getTime():Date.now(),a=t.lineData.filter(d=>{const f=new Date(d.time).getTime();return f>=s&&f<=r}).map(d=>[new Date(d.time).getTime(),d.value]);a.length>0&&p.push({name:o===0?`${t.name}-曲线`:`${t.name}-曲线-${o+1}`,type:"line",yAxisIndex:i,smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:t.color,width:t.lineWidth,type:t.lineStyle},itemStyle:{color:t.color},data:a})}),i++}),p},Z=p=>{const e=V(),i=e.length,t=[{type:"value",min:0,max:p,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}}];return e.forEach((n,o)=>{const s=n.lineData.map(u=>u.value),r=Math.max(...s),a=Math.min(...s),d=Math.ceil(r*1.1),f=Math.floor(a*.9),v=o*50;t.push({type:"value",position:"right",offset:v,min:f,max:d,axisLine:{show:!0,lineStyle:{color:n.color}},axisTick:{show:!0,lineStyle:{color:n.color}},axisLabel:{color:n.color,fontSize:10},splitLine:{show:!1}})}),{yAxes:t,lineCount:i}},k=()=>{c.value&&(w=fe.init(c.value),O())},O=()=>{var B;if(!w)return;const p=D.length||1,e=((B=c.value)==null?void 0:B.clientHeight)||300,i=30,t=10,n=e-i-t,o=g.value.barWidth||30,s=g.value.barGap||0,r=o+s,a=p*r;let d=o,f=s,v=r;if(a>n){const m=n/a;d=Math.max(o*m,10),f=s*m,v=d+f}const u=[];let _=!1;D.forEach((m,y)=>{m.periods.forEach(x=>{const j=new Date(x.start).getTime(),Y=x.end?new Date(x.end).getTime():Date.now();x.end||(_=!0),u.push({name:m.name,value:[j,Y,y],itemStyle:{color:x.end?m.color+"80":m.color}})})});const{yAxes:M,lineCount:N}=Z(p),ee=N>0?20+N*50:20,te={tooltip:{trigger:"axis",formatter:m=>{if(Array.isArray(m)){const y=m.find(x=>x.seriesType==="line");if(y){const x=T.dayjs(y.value[0]).format("YYYY-MM-DD HH:mm:ss");return`${y.seriesName}<br/>时间: ${x}<br/>数值: ${y.value[1]}`}}return""}},grid:{left:40,right:ee,top:t,bottom:i,containLabel:!1},xAxis:R(I({type:"time",position:"bottom"},_?{min:Date.now()-g.value.timeWindow*60*1e3,max:Date.now()}:{}),{axisLine:{show:!0,lineStyle:{color:g.value.titleColor}},axisTick:{show:!0,lineStyle:{color:g.value.titleColor}},axisLabel:{formatter:"{HH}:{mm}",color:g.value.textColor,fontSize:11,margin:8},splitLine:{show:!1}}),yAxis:M,series:[{name:"甘特图",type:"custom",yAxisIndex:0,renderItem:(m,y)=>{var q;const x=y.value(0),j=y.value(1),Y=y.value(2),A=y.coord([x,0])[0],oe=y.coord([j,0])[0],P=m.coordSys.y+m.coordSys.height-(Y+1)*v+f,ne=P+d/2,F=Math.max(oe-A,2),ie=((q=D[Y])==null?void 0:q.name)||"";return{type:"group",children:[{type:"rect",shape:{x:A,y:P,width:F,height:d,r:2},style:y.style()},{type:"text",style:{x:A+F/2,y:ne,text:ie,fill:g.value.textColor,fontSize:11,textAlign:"center",textVerticalAlign:"middle"}}]}},encode:{x:[0,1],y:2,tooltip:[0,1]},tooltip:{formatter:m=>{const y=T.dayjs(m.value[0]).format("YYYY-MM-DD HH:mm:ss"),x=T.dayjs(m.value[1]).format("YYYY-MM-DD HH:mm:ss"),j=m.value[1]>=Date.now()-1e3;return`${m.name}<br/>开始: ${y}<br/>结束: ${j?"进行中":x}`}},data:u},...Q()]};w.setOption(te,!0)},z=()=>{w==null||w.resize()};let H=null;return h.onMounted(()=>{H=new ResizeObserver(()=>{w?w.resize():c.value&&k()}),c.value&&H.observe(c.value),setTimeout(()=>{k()},100),window.addEventListener("resize",z)}),h.onUnmounted(()=>{window.removeEventListener("resize",z),H==null||H.disconnect(),w==null||w.dispose()}),h.watch(()=>l.conf.data,()=>{l.mode==="edit"&&L(),O()},{deep:!0}),h.watch(()=>l.conf.options,()=>{g.value=S.extractStyles(),O()},{deep:!0}),h.watchEffect(()=>{l.conf.historyData&&S.setHistoryData(l.conf.historyData),l.conf.socketData&&S.setSocketData(l.conf.socketData)}),(p,e)=>(h.openBlock(),h.createElementBlock("div",{class:"mix-component",style:h.normalizeStyle({background:h.unref(g).bgColor,borderRadius:h.unref(g).radiusSize+"px"})},[h.createElementVNode("div",{class:"mix-title",style:h.normalizeStyle(K.value)},h.toDisplayString(h.unref(W).caption||h.unref(W).name),5),h.createElementVNode("div",ue,[h.createElementVNode("div",{class:"timeline-chart",ref_key:"chartRef",ref:c},null,512)]),h.renderSlot(p.$slots,"default",{},void 0,!0)],4))}})),De=T._export_sfc(we,[["__scopeId","data-v-7162b702"]]);exports.default=De;
@@ -27,8 +27,8 @@ var q = (v, l, c) => new Promise((b, w) => {
27
27
  L((c = c.apply(v, l)).next());
28
28
  });
29
29
  import { defineComponent as he, ref as ue, reactive as me, computed as pe, onMounted as ge, onUnmounted as ye, watch as J, watchEffect as ve, openBlock as be, createElementBlock as we, normalizeStyle as K, unref as A, createElementVNode as I, toDisplayString as De, renderSlot as Se } from "vue";
30
- import { B as xe } from "./BaseComponent-B5SIFUKu.js";
31
- import { d as O, _ as _e } from "./index-BAzRwQtP.js";
30
+ import { B as xe } from "./BaseComponent-qzL33ZSL.js";
31
+ import { d as O, _ as _e } from "./index-BHBE19E2.js";
32
32
  import { g as Le } from "./titleStyle-BT5GlpAb.js";
33
33
  import "./index-eIsZnzkc.js";
34
34
  import { A as Me, D as Oe } from "./ele-rtn-icon-CqCKSHIw.js";
@@ -113,7 +113,7 @@ const He = { class: "mix-body" }, Ce = {
113
113
  return {
114
114
  preview: () => q(this, null, function* () {
115
115
  try {
116
- const i = yield new (yield import("./history-Bw6bUdAH.js")).default().getHistoryData(this.props, this.componentType);
116
+ const i = yield new (yield import("./history-BDIdK3AY.js")).default().getHistoryData(this.props, this.componentType);
117
117
  this.setHistoryData(i);
118
118
  } catch (e) {
119
119
  console.error("[Retainer2] 获取历史数据失败:", e);
@@ -48,10 +48,10 @@ import "element-plus/es/components/date-picker/style/css";
48
48
  import "element-plus/es/components/radio-group/style/css";
49
49
  import "element-plus/es/components/radio-button/style/css";
50
50
  import { defineComponent as dt, computed as ne, reactive as ct, ref as h, onMounted as bt, withDirectives as me, openBlock as b, createElementBlock as w, normalizeStyle as ve, unref as B, normalizeClass as pt, toDisplayString as p, createCommentVNode as z, createElementVNode as A, createVNode as o, withCtx as n, createTextVNode as u, createBlock as x, withKeys as _t, Fragment as O, renderList as se, renderSlot as mt } from "vue";
51
- import { d as Z, a as ee, _ as vt } from "./index-BAzRwQtP.js";
51
+ import { d as Z, a as ee, _ as vt } from "./index-BHBE19E2.js";
52
52
  import { u as gt } from "./useTableBodyHeight-CwrQvi7M.js";
53
53
  import { u as ft } from "./useMixiotPanelSurface-DRl3cZvc.js";
54
- import { B as yt } from "./BaseComponent-B5SIFUKu.js";
54
+ import { B as yt } from "./BaseComponent-qzL33ZSL.js";
55
55
  import { g as ht } from "./titleStyle-BT5GlpAb.js";
56
56
  import { ElMessage as D, ElMessageBox as kt } from "element-plus";
57
57
  import { Search as wt } from "@element-plus/icons-vue";