mixdashboards 1.0.75 → 1.0.76

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 (331) hide show
  1. package/dist/{BaseComponent-BXAJUoaf.cjs → BaseComponent-BmhMoM4H.cjs} +1 -1
  2. package/dist/{BaseComponent-BlCsb-HW.js → BaseComponent-CQaDWNO0.js} +8 -8
  3. package/dist/{EChartComponentBase-BPiPzdtw.cjs → EChartComponentBase-D9EUh4BZ.cjs} +1 -1
  4. package/dist/{EChartComponentBase-DPWPg81w.js → EChartComponentBase-i76OGL3z.js} +2 -2
  5. package/dist/{EmergencyPlanPanel-Cv06qTDX.js → EmergencyPlanPanel-B9S3Ru5-.js} +1 -1
  6. package/dist/{EmergencyPlanPanel-CU0gJiFM.cjs → EmergencyPlanPanel-BiAHvTfh.cjs} +1 -1
  7. package/dist/{HistoryPlanDialog-CiRVXFaZ.cjs → HistoryPlanDialog-BU4GayEm.cjs} +1 -1
  8. package/dist/{HistoryPlanDialog-BALmXGdQ.js → HistoryPlanDialog-CbbeFm-i.js} +1 -1
  9. package/dist/{MonitoringMap-BuVJ-ir-.js → MonitoringMap-B6tXBdvK.js} +2 -2
  10. package/dist/{MonitoringMap-BXxlfEQV.cjs → MonitoringMap-FGDoA0fw.cjs} +1 -1
  11. package/dist/{UniverSheet-CDug4m6W.cjs → UniverSheet-D7y2pceH.cjs} +1 -1
  12. package/dist/{UniverSheet-GnlJ56Io.js → UniverSheet-D8sflrTb.js} +2 -2
  13. package/dist/{accelerationChart-BQkfynh-.cjs → accelerationChart-DTlwSA0N.cjs} +1 -1
  14. package/dist/{accelerationChart-lWscOOUn.js → accelerationChart-bch4O3t-.js} +14 -14
  15. package/dist/{actionItem-B4nl_rf_.js → actionItem-Cw67YwsR.js} +2 -2
  16. package/dist/{actionItem-6eYNuhg3.cjs → actionItem-cdsgUvaC.cjs} +1 -1
  17. package/dist/{alarmLevelChart-Mq8iVSI0.cjs → alarmLevelChart-BMjTLxB5.cjs} +1 -1
  18. package/dist/{alarmLevelChart-CiobE56j.js → alarmLevelChart-BynSRHG2.js} +2 -2
  19. package/dist/{alertTable-f0pzyZBg.cjs → alertTable-3VhkUZSf.cjs} +1 -1
  20. package/dist/{alertTable-CMlVY_8H.js → alertTable-CiwuaydQ.js} +2 -2
  21. package/dist/{aliasObjectSelectorDemo-C1bpTa2y.cjs → aliasObjectSelectorDemo-BLoecZkV.cjs} +1 -1
  22. package/dist/{aliasObjectSelectorDemo-DqZ0EfVH.js → aliasObjectSelectorDemo-DfdRxb4I.js} +1 -1
  23. package/dist/{annualRainfallChart-_mJM58W4.js → annualRainfallChart-CHcr4-0D.js} +2 -2
  24. package/dist/{annualRainfallChart-BbYOeEs_.cjs → annualRainfallChart-DKR-A_PT.cjs} +1 -1
  25. package/dist/{aqi-yjjoBI4W.cjs → aqi-D7VqP1QE.cjs} +1 -1
  26. package/dist/{aqi-jYtMHp4c.js → aqi-Gu-pAovO.js} +4 -4
  27. package/dist/{aqiIndass-BPnJN1L7.js → aqiIndass-Bjj6n1aj.js} +18 -18
  28. package/dist/{aqiIndass-DuxFgiJF.cjs → aqiIndass-nfYUZ3UM.cjs} +1 -1
  29. package/dist/{areaDeformCurve-BM8ClfUa.cjs → areaDeformCurve-fpGWmq05.cjs} +1 -1
  30. package/dist/{areaDeformCurve-DNleJiVH.js → areaDeformCurve-nwlcUBDv.js} +2 -2
  31. package/dist/{arrayCard-jITzZi-r.js → arrayCard-TfcgLrHv.js} +2 -2
  32. package/dist/{arrayCard-BxpqdLMV.cjs → arrayCard-UoDqAGbN.cjs} +1 -1
  33. package/dist/{audio-CH5r-0gF.js → audio-BYgGYoEr.js} +2 -2
  34. package/dist/{audio-BuyKXQ0N.cjs → audio-DdUv9Ot-.cjs} +1 -1
  35. package/dist/bar-CkBXc7t1.cjs +2 -0
  36. package/dist/{bar-BtlkgC6a.js → bar-SfGiFl1r.js} +75 -67
  37. package/dist/{bmp-C2DUdhaT.js → bmp-BbtdzIrI.js} +2 -2
  38. package/dist/{bmp-DLIPXhyT.cjs → bmp-CY-Hb2x1.cjs} +1 -1
  39. package/dist/{box-CVcPOlKk.cjs → box-B4C_mirv.cjs} +1 -1
  40. package/dist/{box-BgwIB1Bl.js → box-CV41cJuX.js} +2 -2
  41. package/dist/{chartConfigPanel-ByzQkeYT.js → chartConfigPanel-D650rSn7.js} +1 -1
  42. package/dist/{chartConfigPanel-BdVphXRS.cjs → chartConfigPanel-DBlqAbbH.cjs} +1 -1
  43. package/dist/{circleBar-DBCX2g0i.cjs → circleBar-DkV7xPBl.cjs} +1 -1
  44. package/dist/{circleBar-CFV6RoS1.js → circleBar-U3iXMQr5.js} +2 -2
  45. package/dist/{clock--G7VfksN.cjs → clock-CjgMeOhp.cjs} +1 -1
  46. package/dist/{clock-ilY2WqEO.js → clock-zKVUU8pu.js} +2 -2
  47. package/dist/{clt-4fAQmG5V.js → clt-BsIA-YPQ.js} +2 -2
  48. package/dist/{clt-DOAntJi9.cjs → clt-DwI8i7zI.cjs} +1 -1
  49. package/dist/{cmc-CehLriLD.cjs → cmc-BX9ichBB.cjs} +1 -1
  50. package/dist/{cmc-Bhyw5-iw.js → cmc-CgpHejR2.js} +2 -2
  51. package/dist/{cmp-znNaGWlx.js → cmp-CS34lG7V.js} +2 -2
  52. package/dist/{cmp-BL3VD7Pn.cjs → cmp-CTqtxzo4.cjs} +1 -1
  53. package/dist/{conclusionCard-B5DhxboF.js → conclusionCard-N6pA6Q9P.js} +2 -2
  54. package/dist/{conclusionCard-K6CSG9A7.cjs → conclusionCard-wvtJmV_8.cjs} +1 -1
  55. package/dist/{controlList-CyE_bM7S.cjs → controlList-BUAMdHA3.cjs} +1 -1
  56. package/dist/{controlList-DoaSMBIh.js → controlList-Zz5ABe5b.js} +2 -2
  57. package/dist/{controlRecordList-CDKRXU47.cjs → controlRecordList-CMR4y_Ml.cjs} +1 -1
  58. package/dist/{controlRecordList-DwXUWAgm.js → controlRecordList-Dx0zj7js.js} +2 -2
  59. package/dist/{controlRecordListAPP-cODkXLeg.cjs → controlRecordListAPP-ZDCKmz_8.cjs} +1 -1
  60. package/dist/{controlRecordListAPP-CP-tQ4o_.js → controlRecordListAPP-bL9oqWzQ.js} +2 -2
  61. package/dist/{crd-D9Djs_9M.cjs → crd-8tMwNlgx.cjs} +1 -1
  62. package/dist/{crd-BJJ9sEBi.js → crd-DZPpD6XY.js} +2 -2
  63. package/dist/{ctrBtn-zECsVsC6.js → ctrBtn-6Ql9ulTr.js} +10 -10
  64. package/dist/{ctrBtn-Ci7BkiOn.cjs → ctrBtn-eCu0UDtW.cjs} +1 -1
  65. package/dist/{ctrSet-DQTACQn1.js → ctrSet-BwFVH1Mk.js} +3 -3
  66. package/dist/{ctrSet-DZrpF9pM.cjs → ctrSet-pX-zVivo.cjs} +1 -1
  67. package/dist/{ctrSwitch-BDy8B1lF.cjs → ctrSwitch-D95SI-aJ.cjs} +1 -1
  68. package/dist/{ctrSwitch-CrEAuL-v.js → ctrSwitch-b6hHf4QF.js} +11 -11
  69. package/dist/{dataManagement-D6SM8zVY.cjs → dataManagement-DubA1TV1.cjs} +1 -1
  70. package/dist/{dataManagement-ivUDfZ3f.js → dataManagement-VucRLCK4.js} +2 -2
  71. package/dist/{dataReport-CryAeh7C.js → dataReport-CALIw14D.js} +2 -2
  72. package/dist/{dataReport-CFJ5aMrb.cjs → dataReport-CkF5J7X1.cjs} +1 -1
  73. package/dist/{dataTable-BBW0i51h.js → dataTable-C1rBH_p9.js} +1 -1
  74. package/dist/{dataTable-IKk8N9i9.cjs → dataTable-C2q_CX5D.cjs} +1 -1
  75. package/dist/{datetime-BPoSIL-3.js → datetime-Cq8scz5Q.js} +2 -2
  76. package/dist/{datetime-CGUnVeRE.cjs → datetime-TBTeWqlf.cjs} +1 -1
  77. package/dist/{deepClusterSlipSurface-rZIUqLLp.cjs → deepClusterSlipSurface-CFaxRVmM.cjs} +1 -1
  78. package/dist/{deepClusterSlipSurface-jt74ODxX.js → deepClusterSlipSurface-Cm50wbjv.js} +2 -2
  79. package/dist/{deepDataMatrix-DyK--0cJ.cjs → deepDataMatrix-CAYSav3X.cjs} +1 -1
  80. package/dist/{deepDataMatrix-B1rr5lNY.js → deepDataMatrix-DyStA98d.js} +7 -7
  81. package/dist/{deepDisplacement3D-DdSfiM8c.cjs → deepDisplacement3D-B3Iju2KK.cjs} +1 -1
  82. package/dist/{deepDisplacement3D-BnWitDOk.js → deepDisplacement3D-Bat-Wc3i.js} +2 -2
  83. package/dist/{deepDisplacementChart-BxdiiuUe.cjs → deepDisplacementChart-C-Tr4DdI.cjs} +1 -1
  84. package/dist/{deepDisplacementChart-DY3PLNdf.cjs → deepDisplacementChart-CX9ALM89.cjs} +1 -1
  85. package/dist/{deepDisplacementChart-BQ3nFJLH.js → deepDisplacementChart-CYMpNu_W.js} +25 -25
  86. package/dist/{deepDisplacementChart-lIfyzMpq.js → deepDisplacementChart-D5rHoC9r.js} +26 -26
  87. package/dist/{deepDisplacementView-C0r4oIIk.cjs → deepDisplacementView-DTSsODJQ.cjs} +1 -1
  88. package/dist/{deepDisplacementView-BsddlCKN.js → deepDisplacementView-DnjwQmEW.js} +1 -1
  89. package/dist/{deepNodeTemperatureChart-DrqwFmDg.cjs → deepNodeTemperatureChart-C9NRJ49Y.cjs} +1 -1
  90. package/dist/{deepNodeTemperatureChart-C1RVbMT1.js → deepNodeTemperatureChart-CLKg72UA.js} +32 -32
  91. package/dist/{deepTangentAngleChart-Hs9wfNfb.cjs → deepTangentAngleChart-C9aFSFrD.cjs} +1 -1
  92. package/dist/{deepTangentAngleChart-BSifjEIw.js → deepTangentAngleChart-DklHYHhm.js} +13 -13
  93. package/dist/{deepTemperatureField-Bz9X6xx5.cjs → deepTemperatureField-CXBL4_LS.cjs} +1 -1
  94. package/dist/{deepTemperatureField-BSsTui64.js → deepTemperatureField-CcnVGgbf.js} +3 -3
  95. package/dist/{deepTrendChart-apQrMrj6.js → deepTrendChart-De7ebpk4.js} +14 -14
  96. package/dist/{deepTrendChart-B3q-lEJw.cjs → deepTrendChart-OGW08BX-.cjs} +1 -1
  97. package/dist/{deviceOnlineStatus-DABeXKWW.cjs → deviceOnlineStatus-DarcMtY4.cjs} +1 -1
  98. package/dist/{deviceOnlineStatus-kFsHXR6n.js → deviceOnlineStatus-_3Txb8Tg.js} +2 -2
  99. package/dist/{deviceStatus-BE2Pszt3.cjs → deviceStatus-BiJw8rnz.cjs} +1 -1
  100. package/dist/{deviceStatus-TNP-PLi-.js → deviceStatus-CL6E-pQ0.js} +10 -10
  101. package/dist/{displacementDataTable-BD45feZR.cjs → displacementDataTable-DmAqr-JK.cjs} +1 -1
  102. package/dist/{displacementDataTable-kZBxmOLa.js → displacementDataTable-tKtGe2xd.js} +11 -11
  103. package/dist/{displacementTrajectoryChart-DmuezhG8.cjs → displacementTrajectoryChart-DG2YdSqq.cjs} +1 -1
  104. package/dist/{displacementTrajectoryChart-BjbgbY-z.js → displacementTrajectoryChart-Dh6oPB0p.js} +22 -22
  105. package/dist/{displacementTrendChart-BjIXnttw.js → displacementTrendChart-BHORe0qO.js} +36 -36
  106. package/dist/{displacementTrendChart-iXH_pVRS.cjs → displacementTrendChart-CT140vXG.cjs} +1 -1
  107. package/dist/{dxf-DMZPfCEF.cjs → dxf-CVa4Vfm3.cjs} +1 -1
  108. package/dist/{dxf-Cne0HiZv.js → dxf-CjcHSJq-.js} +2 -2
  109. package/dist/{dzc-BHGWFMVE.js → dzc-DDXNSuie.js} +6 -6
  110. package/dist/{dzc-Xii4wMjP.cjs → dzc-DK16oTVj.cjs} +1 -1
  111. package/dist/{emergencyPlan-B1znDbbO.cjs → emergencyPlan-D0AMuD-3.cjs} +1 -1
  112. package/dist/{emergencyPlan-CdFHCDZY.js → emergencyPlan-Vim4E6h7.js} +3 -3
  113. package/dist/{evn-UM09m5js.js → evn-CdMN8gIC.js} +2 -2
  114. package/dist/{evn-DQIIN0A9.cjs → evn-D2mdSoFB.cjs} +1 -1
  115. package/dist/{evolutionChart-DDtDzRIE.cjs → evolutionChart-I8XVW05I.cjs} +1 -1
  116. package/dist/{evolutionChart-Dm3nLcz6.js → evolutionChart-P0l6P0Bc.js} +3 -3
  117. package/dist/{fileViewer-CoTW7CWz.cjs → fileViewer-D7sAA8-W.cjs} +1 -1
  118. package/dist/{fileViewer-C1Ky9Ydw.js → fileViewer-DvntGv0b.js} +2 -2
  119. package/dist/{filterBar-BNr5i0ab.js → filterBar-8gex5oR-.js} +2 -2
  120. package/dist/{filterBar-DPG_jFL8.cjs → filterBar-GSTji96g.cjs} +1 -1
  121. package/dist/{fireCombustionCurve-DpcQ13zK.js → fireCombustionCurve-B3jAhOft.js} +3 -3
  122. package/dist/{fireCombustionCurve-z2iMEkbd.cjs → fireCombustionCurve-DrMmHf3N.cjs} +1 -1
  123. package/dist/{fireFilterBar-BFJeB-8m.js → fireFilterBar-CH6iK0Xg.js} +2 -2
  124. package/dist/{fireFilterBar-iXGBx5Zi.cjs → fireFilterBar-Dy9DcHij.cjs} +1 -1
  125. package/dist/{fireHistoryTable-E9Gx4Gqf.js → fireHistoryTable-CHxHqPs0.js} +2 -2
  126. package/dist/{fireHistoryTable-BE79laqx.cjs → fireHistoryTable-n6L3juWp.cjs} +1 -1
  127. package/dist/{gag-naUs2e3c.js → gag-BsO4kmp1.js} +2 -2
  128. package/dist/{gag-Ce_-YYka.cjs → gag-BzjuwBvY.cjs} +1 -1
  129. package/dist/{gasStationList-Kbha10pX.js → gasStationList-7JzUcISs.js} +214 -276
  130. package/dist/gasStationList-QwqTDEAG.cjs +1 -0
  131. package/dist/{geo3dViewer-CnAgLJ_6.cjs → geo3dViewer-Cf-jHpvF.cjs} +1 -1
  132. package/dist/{geo3dViewer-CMISZOfo.js → geo3dViewer-doEpUC_J.js} +3 -3
  133. package/dist/{glbModel-Bw25mL_R.js → glbModel-BgFIj_es.js} +2 -2
  134. package/dist/{glbModel-CS8qUhON.cjs → glbModel-C6L--3dO.cjs} +1 -1
  135. package/dist/{globalObjectSelector-BcLO38lZ.js → globalObjectSelector-CdfiXRjg.js} +1 -1
  136. package/dist/{globalObjectSelector-BwoQjJGq.cjs → globalObjectSelector-P_irB0rv.cjs} +1 -1
  137. package/dist/{gnssFilterBar-CfqJBy4d.cjs → gnssFilterBar-CIwyv2yc.cjs} +1 -1
  138. package/dist/{gnssFilterBar-bS10JYoi.js → gnssFilterBar-DPNshMIx.js} +2 -2
  139. package/dist/{gnssHistoryTable-CPs_w2gf.js → gnssHistoryTable-C7x4-Tpp.js} +2 -2
  140. package/dist/{gnssHistoryTable-CyingjiU.cjs → gnssHistoryTable-j5FL6oYs.cjs} +1 -1
  141. package/dist/{gnssMapView-DD_L9jE0.js → gnssMapView-BWcS4hqj.js} +4 -4
  142. package/dist/{gnssMapView-KvzwIbK1.cjs → gnssMapView-_VaJWBcE.cjs} +2 -2
  143. package/dist/{gnssSectionProfile-DxkEsZQx.cjs → gnssSectionProfile-DGbTO7lV.cjs} +1 -1
  144. package/dist/{gnssSectionProfile-DGYWQKML.js → gnssSectionProfile-hpyiGI-6.js} +2 -2
  145. package/dist/{gnssTimeSeriesChart-KVg2GW1C.cjs → gnssTimeSeriesChart-CNT6xaNs.cjs} +1 -1
  146. package/dist/{gnssTimeSeriesChart-1bLKTD-e.js → gnssTimeSeriesChart-rL9oG1ly.js} +2 -2
  147. package/dist/{gnssXYTrajectory-B-d6rq3V.js → gnssXYTrajectory-B1LZAepw.js} +2 -2
  148. package/dist/{gnssXYTrajectory-B-0h71U8.cjs → gnssXYTrajectory-CwAjhPRc.cjs} +1 -1
  149. package/dist/{grd-CqeXHXO2.js → grd-BLab9IY0.js} +20 -20
  150. package/dist/{grd-CbvQkv0q.cjs → grd-rJXqEimt.cjs} +1 -1
  151. package/dist/{grdIndass-BaHBsp5T.js → grdIndass-gGrZ7gRV.js} +6 -6
  152. package/dist/{grdIndass-_-7wqVjL.cjs → grdIndass-niY4UOwz.cjs} +1 -1
  153. package/dist/{grg-DmN25aj-.cjs → grg-C1L5yeyY.cjs} +1 -1
  154. package/dist/{grg-Cgpfx9kR.js → grg-Dnro7bLg.js} +6 -6
  155. package/dist/{gridview-B0haH8LS.js → gridview-BhjWlD0J.js} +2 -2
  156. package/dist/{gridview-DYYpW2MH.cjs → gridview-DxUsv2ny.cjs} +1 -1
  157. package/dist/{groundwaterFilterBar-mcMEwt9B.cjs → groundwaterFilterBar-C-2e7S04.cjs} +1 -1
  158. package/dist/{groundwaterFilterBar-ClXMXCj6.js → groundwaterFilterBar-bNhTkX1C.js} +2 -2
  159. package/dist/{groundwaterProfileChart-BoRVOmen.cjs → groundwaterProfileChart-BxKGPuOe.cjs} +2 -2
  160. package/dist/{groundwaterProfileChart-Cfwfua8-.js → groundwaterProfileChart-dhzmwfwz.js} +3 -3
  161. package/dist/{groundwaterTimeCurve-BOarX2wf.js → groundwaterTimeCurve-BtzP6icm.js} +3 -3
  162. package/dist/{groundwaterTimeCurve-Czt7iLlt.cjs → groundwaterTimeCurve-CTQPlTUr.cjs} +1 -1
  163. package/dist/{groupCard-2aS7lgg2.js → groupCard-D00ElZoy.js} +63 -53
  164. package/dist/{groupCard-DjUIJShv.cjs → groupCard-D4gdaVqR.cjs} +1 -1
  165. package/dist/{headerBar-u-0s0z16.js → headerBar-DEHj8fJr.js} +2 -2
  166. package/dist/{headerBar-5nL0hMXs.cjs → headerBar-MFw1W0qa.cjs} +1 -1
  167. package/dist/{history-BtX7uNYs.js → history-BRkb914v.js} +16 -16
  168. package/dist/{history-B-Ynlm5z.cjs → history-D1R2RAZQ.cjs} +1 -1
  169. package/dist/index-77aUdspY.cjs +612 -0
  170. package/dist/{index-DomNEEyv.js → index-BZpYmpDy.js} +3569 -2983
  171. package/dist/{insarDeformChart-KECXbG_n.cjs → insarDeformChart-5EVWIkpL.cjs} +1 -1
  172. package/dist/{insarDeformChart-DVGZUwaX.js → insarDeformChart-pbOnnoN-.js} +2 -2
  173. package/dist/{insarImageViewer-BMk5v36R.js → insarImageViewer-D3bbQA6g.js} +2 -2
  174. package/dist/{insarImageViewer-CdJyowUc.cjs → insarImageViewer-DQJBN4YM.cjs} +1 -1
  175. package/dist/{kds-DU8wNnhT.cjs → kds-D5seJB3L.cjs} +1 -1
  176. package/dist/{kds-CawaHOXh.js → kds-gTJOwHbM.js} +21 -21
  177. package/dist/{kpiCard-CAuX9-zP.cjs → kpiCard-Bz-fg6sL.cjs} +1 -1
  178. package/dist/{kpiCard-B5ZueB0g.js → kpiCard-Cx6VNK6L.js} +2 -2
  179. package/dist/{landslideMap-DGkSLtbi.js → landslideMap-5erIcZo7.js} +15 -15
  180. package/dist/{landslideMap-CImGVGDr.cjs → landslideMap-D7_QpwmM.cjs} +1 -1
  181. package/dist/{landslideWarning-C8cHW-2p.cjs → landslideWarning-C3FZqrxT.cjs} +1 -1
  182. package/dist/{landslideWarning-BeQUD3uJ.js → landslideWarning-CzaddgWf.js} +14 -14
  183. package/dist/{layerTabs-DxX6yqOO.cjs → layerTabs-Dc1Xb11W.cjs} +1 -1
  184. package/dist/{layerTabs-CBr-oH28.js → layerTabs-DqbOykS2.js} +2 -2
  185. package/dist/{leaflet-src-BXugYdBe.js → leaflet-src-BY2SMh9y.js} +1 -1
  186. package/dist/{leaflet-src-VXn1CZcu.cjs → leaflet-src-Brb8KUL5.cjs} +1 -1
  187. package/dist/{lerc-td9bbpKy.js → lerc-Chm_GVte.js} +2 -2
  188. package/dist/{lerc-DJGGksD3.cjs → lerc-DGuyYCKG.cjs} +1 -1
  189. package/dist/{lin-vrv9_1Gw.cjs → lin-8x2j8aGa.cjs} +1 -1
  190. package/dist/{lin-DlD92hLY.js → lin-tqtSA5ci.js} +9 -9
  191. package/dist/{linIndass-DRZUPyVA.js → linIndass-DHFymSVI.js} +12 -12
  192. package/dist/{linIndass-BhvIJJ_-.cjs → linIndass-Dxo_bzrZ.cjs} +1 -1
  193. package/dist/{lst-BsGZwd4K.cjs → lst-BV6EbDPs.cjs} +1 -1
  194. package/dist/{lst-DHBMHjOM.js → lst-BejIuO0f.js} +2 -2
  195. package/dist/{manualEntry-zdYpuGoU.cjs → manualEntry-Bt4cs6kn.cjs} +1 -1
  196. package/dist/{manualEntry-gGLZH2mN.js → manualEntry-DObI0OAq.js} +2 -2
  197. package/dist/{mapBackground-DBXKXI9j.js → mapBackground-Cuym5Dqr.js} +3 -3
  198. package/dist/{mapBackground-U2NX5fCU.cjs → mapBackground-oVOBK3zr.cjs} +1 -1
  199. package/dist/{mappingList-vLJbxZcd.cjs → mappingList-BEWAqLd4.cjs} +1 -1
  200. package/dist/{mappingList-D4KRWEkc.js → mappingList-Dzq0zMfs.js} +2 -2
  201. package/dist/{markdownViewer-DzZnOTO-.js → markdownViewer-Bz50jkb6.js} +2 -2
  202. package/dist/{markdownViewer-XvNb3eNT.cjs → markdownViewer-V5b1xhPh.cjs} +1 -1
  203. package/dist/{mix-control-modal-DjD4xOuc.js → mix-control-modal-DzVLdO3S.js} +7 -7
  204. package/dist/{mix-control-modal-DQnZbDGs.cjs → mix-control-modal-I6DqPm04.cjs} +1 -1
  205. package/dist/{mixGrid-CLEdWr86.cjs → mixGrid-_ur8VKLD.cjs} +1 -1
  206. package/dist/{mixGrid-uzRHR_XB.js → mixGrid-tVSdKPms.js} +2 -2
  207. package/dist/mixdashboards.cjs +1 -1
  208. package/dist/mixdashboards.css +1 -1
  209. package/dist/mixdashboards.js +1 -1
  210. package/dist/{mixiotObjectListApi-DCuG7zc-.cjs → mixiotObjectListApi-BUQ-RZ3L.cjs} +1 -1
  211. package/dist/{mixiotObjectListApi-DP6wrrOJ.js → mixiotObjectListApi-D5vNNWgT.js} +1 -1
  212. package/dist/{mjpegCamera-D416oWYH.cjs → mjpegCamera-CjWe8BEK.cjs} +1 -1
  213. package/dist/{mjpegCamera-y_pW209K.js → mjpegCamera-DnAPpFJU.js} +2 -2
  214. package/dist/{monitorAlert-BOJ4UrnO.js → monitorAlert-B-fTYPn6.js} +11 -11
  215. package/dist/{monitorAlert-Bq1MEu6y.cjs → monitorAlert-qmVSQ1lc.cjs} +1 -1
  216. package/dist/{monitorData-CTVzSwsd.js → monitorData-Dopc660L.js} +7 -7
  217. package/dist/{monitorData-eE9QUfb3.cjs → monitorData-YhGSUq3H.cjs} +1 -1
  218. package/dist/{monitorSpeedChart-CnKy9z8m.cjs → monitorSpeedChart-Brj_YHsO.cjs} +1 -1
  219. package/dist/{monitorSpeedChart-CUZat2mO.js → monitorSpeedChart-Dsvr_QPB.js} +1 -1
  220. package/dist/{mxa-ueyMsY-m.cjs → mxa-BzdI7BLB.cjs} +1 -1
  221. package/dist/{mxa-DDJJIW_n.js → mxa-D4WkyBYZ.js} +7 -7
  222. package/dist/{myValue-BdJdeV7Y.cjs → myValue-C0tq-asC.cjs} +1 -1
  223. package/dist/{myValue-jZIrcY-B.js → myValue-DYtBtOJ2.js} +2 -2
  224. package/dist/{myValueList-KoXkIHn0.cjs → myValueList-BJctRTNd.cjs} +1 -1
  225. package/dist/{myValueList-DYPYb3FQ.js → myValueList-Ddpn1S68.js} +2 -2
  226. package/dist/{objectList-Ct6UzSuD.cjs → objectList-Csf0hVwo.cjs} +1 -1
  227. package/dist/{objectList-CGYOZD6e.js → objectList-G4wXFDwe.js} +3 -3
  228. package/dist/{objectListAPP-DrymYbRw.js → objectListAPP-BrmUj4At.js} +3 -3
  229. package/dist/{objectListAPP-D0dHuEhF.cjs → objectListAPP-UZN4iuTn.cjs} +1 -1
  230. package/dist/{photo-DC0tNbgw.js → photo-BEPeK7U8.js} +2 -2
  231. package/dist/{photo-siDcsoGU.cjs → photo-BYH_qg5O.cjs} +1 -1
  232. package/dist/{pie-D9J75dIT.cjs → pie-B57zDxJV.cjs} +1 -1
  233. package/dist/{pie-I_Gqoxg_.js → pie-CEVKe1lL.js} +2 -2
  234. package/dist/{placeholder-BPjcnXBR.cjs → placeholder-BezBEQGo.cjs} +1 -1
  235. package/dist/{placeholder-BsmPsTrK.js → placeholder-Bwv3VyEg.js} +1 -1
  236. package/dist/{pressBtn-CXasqSG5.js → pressBtn-1LCNz2gE.js} +3 -3
  237. package/dist/{pressBtn-DkR5yC7c.cjs → pressBtn-CJZTyY8I.cjs} +1 -1
  238. package/dist/{processTable-CprS7V6w.js → processTable-CHDazqah.js} +2 -2
  239. package/dist/{processTable-D2upRmGB.cjs → processTable-HtDeg1by.cjs} +1 -1
  240. package/dist/{progressBar-CHGUKjOk.cjs → progressBar-BP4SmPZK.cjs} +1 -1
  241. package/dist/{progressBar-BnDhCqnO.js → progressBar-C3NcWUrS.js} +2 -2
  242. package/dist/{progressCircle-DTSsucDj.js → progressCircle-Bo9-Qva_.js} +2 -2
  243. package/dist/{progressCircle-C7U0fPQv.cjs → progressCircle-CDqK1iFt.cjs} +1 -1
  244. package/dist/{qrcode-B65TN3DU.js → qrcode-VmYwvClG.js} +2 -2
  245. package/dist/{qrcode-COSof3Xg.cjs → qrcode-qD6tOm4F.cjs} +1 -1
  246. package/dist/{raceBar-B-Dg_JeH.js → raceBar-DR2-luKW.js} +2 -2
  247. package/dist/{raceBar-DUTC68PY.cjs → raceBar-uAs91hyk.cjs} +1 -1
  248. package/dist/{rad-CQS9cZyM.js → rad-1Jy1KDzt.js} +2 -2
  249. package/dist/{rad-C-5BUzw2.cjs → rad-D7-YZJNO.cjs} +1 -1
  250. package/dist/{radarMapViewer-8GICTIhi.js → radarMapViewer-ByQXe0Mu.js} +2 -2
  251. package/dist/{radarMapViewer-Bnzk9-oK.cjs → radarMapViewer-KPhNE5XX.cjs} +1 -1
  252. package/dist/{rainfallFilterBar-2PbsD0mU.js → rainfallFilterBar-C1obotPf.js} +2 -2
  253. package/dist/{rainfallFilterBar-BAFB2Yla.cjs → rainfallFilterBar-CVQpQp82.cjs} +1 -1
  254. package/dist/{rainfallTimeCurve-D8deMaZA.js → rainfallTimeCurve-B2rEx3T_.js} +3 -3
  255. package/dist/{rainfallTimeCurve-pNf06cfu.cjs → rainfallTimeCurve-DU2tt-Ls.cjs} +1 -1
  256. package/dist/{rangeLin-D1_RCrEG.cjs → rangeLin-COsJkCky.cjs} +1 -1
  257. package/dist/{rangeLin-DiCVHBXe.js → rangeLin-CdfUCFQr.js} +2 -2
  258. package/dist/{realtimeEvolutionMap-BwDjG4Cd.cjs → realtimeEvolutionMap-B7GT8MOq.cjs} +1 -1
  259. package/dist/{realtimeEvolutionMap-BZ3odAWj.js → realtimeEvolutionMap-aR63xPW_.js} +2 -2
  260. package/dist/{regionBar-BZVsJdo6.cjs → regionBar-BYF7IaGA.cjs} +1 -1
  261. package/dist/{regionBar-C_C5cX2r.js → regionBar-DB-secNe.js} +2 -2
  262. package/dist/{request-CsiNbn80.js → request-CBsG4ipL.js} +7 -7
  263. package/dist/{request-B1HlG30f.cjs → request-CvdHjG34.cjs} +1 -1
  264. package/dist/{retainer1-CzyGsNUK.cjs → retainer1-1CFk4InO.cjs} +1 -1
  265. package/dist/{retainer1-DROmtfRa.js → retainer1-CMzTlM5Z.js} +3 -3
  266. package/dist/{retainer2-BCAnjUE9.js → retainer2-DW4ewYX7.js} +3 -3
  267. package/dist/{retainer2-1BaKVlim.cjs → retainer2-DliOH7it.cjs} +1 -1
  268. package/dist/{retainerRecordList-DIdk5Q5E.js → retainerRecordList-Bcm6leuD.js} +2 -2
  269. package/dist/{retainerRecordList-Ct_yDZds.cjs → retainerRecordList-DV7Tx39d.cjs} +1 -1
  270. package/dist/{retainerRecordListAPP-Bi6Ax0r6.js → retainerRecordListAPP-BDRwp8T3.js} +2 -2
  271. package/dist/{retainerRecordListAPP-DUqNtCCN.cjs → retainerRecordListAPP-CJ-u0Tj2.cjs} +1 -1
  272. package/dist/{ringTopN-BSWAdbso.js → ringTopN-Duq0pzm_.js} +2 -2
  273. package/dist/{ringTopN-CIusnN5O.cjs → ringTopN-rd2UwH9f.cjs} +1 -1
  274. package/dist/{riskRegionTable-Lmup8bDM.js → riskRegionTable-BE_ggcEV.js} +7 -7
  275. package/dist/{riskRegionTable-0fHQGnVM.cjs → riskRegionTable-CbPB8mlY.cjs} +1 -1
  276. package/dist/{sankey-D8Erc_QS.cjs → sankey-BqBn6_rx.cjs} +1 -1
  277. package/dist/{sankey-D99KciIH.js → sankey-CnKm9PZe.js} +5 -5
  278. package/dist/{scd-0yZCqQT2.js → scd-BaBLoem8.js} +2 -2
  279. package/dist/{scd-Bkse6tqJ.cjs → scd-BgJ5P7co.cjs} +1 -1
  280. package/dist/{sideMenu-B8Wf4m_8.cjs → sideMenu-BgiQL2P1.cjs} +1 -1
  281. package/dist/{sideMenu-DZ2bbsp7.js → sideMenu-CUal1UQY.js} +2 -2
  282. package/dist/{slopeStability-B8u5QQaS.js → slopeStability-B9YbQLCE.js} +24 -24
  283. package/dist/{slopeStability-D2XSPa-Q.cjs → slopeStability-Y2tDzJeh.cjs} +1 -1
  284. package/dist/{speedCurve-BD8ajqAX.js → speedCurve-DERBMtE1.js} +2 -2
  285. package/dist/{speedCurve-CMZGeXjF.cjs → speedCurve-Kll2RRJ8.cjs} +1 -1
  286. package/dist/{stressFilterBar-Chq7rovQ.cjs → stressFilterBar-BGI4gVfE.cjs} +1 -1
  287. package/dist/{stressFilterBar-Dpn3RUli.js → stressFilterBar-CHRWFnpP.js} +2 -2
  288. package/dist/{stressTimeCurve-D-wPq_W1.cjs → stressTimeCurve-DE5KiXEt.cjs} +1 -1
  289. package/dist/{stressTimeCurve-SRlS-9iL.js → stressTimeCurve-hrlqSYS3.js} +3 -3
  290. package/dist/{swiper-BBV8vKRh.cjs → swiper-CnGllhBQ.cjs} +1 -1
  291. package/dist/{swiper-DIFY95yz.js → swiper-DNHC412s.js} +2 -2
  292. package/dist/{terminalConfigList-Dom3--nE.js → terminalConfigList-BlHAsyCm.js} +2 -2
  293. package/dist/{terminalConfigList-DwA9ITHL.cjs → terminalConfigList-C45EANO4.cjs} +1 -1
  294. package/dist/{terminalList-ClsF5hyg.cjs → terminalList-CNI3_FGb.cjs} +1 -1
  295. package/dist/{terminalList-DpB3UlZG.js → terminalList-UGjkhyf4.js} +2 -2
  296. package/dist/{terminalListAPP-Bu_KM5lV.cjs → terminalListAPP-6fPXF-yJ.cjs} +1 -1
  297. package/dist/{terminalListAPP-U6qqbtPw.js → terminalListAPP-CIJZMdxI.js} +2 -2
  298. package/dist/{textbox-DLDf0rM6.js → textbox-BD_LQ0EN.js} +2 -2
  299. package/dist/{textbox-CbF9pAtK.cjs → textbox-yNPnOaan.cjs} +1 -1
  300. package/dist/{timeQueryBar-CE9N3lDg.cjs → timeQueryBar-3qiV0IV9.cjs} +1 -1
  301. package/dist/{timeQueryBar-ZAH6gs8Q.js → timeQueryBar-B-uPtN25.js} +1 -1
  302. package/dist/{timeSeries-0oO4KLxQ.cjs → timeSeries-BTUuojvj.cjs} +1 -1
  303. package/dist/{timeSeries-DvHAA0wU.js → timeSeries-DdQI4oZU.js} +19 -19
  304. package/dist/{timeSeriesCurve-BTuPg-3z.cjs → timeSeriesCurve-Cj_FbK4x.cjs} +1 -1
  305. package/dist/{timeSeriesCurve-Dyl9b667.js → timeSeriesCurve-TGXshTzl.js} +3 -3
  306. package/dist/{toggleBtn-CZoTmwAw.js → toggleBtn-BMxqm5WG.js} +2 -2
  307. package/dist/{toggleBtn-qDOJLJ7K.cjs → toggleBtn-BXcQfnTB.cjs} +1 -1
  308. package/dist/{trajectoryConfigPanel-CxV8Ed97.cjs → trajectoryConfigPanel-CqoKO0hL.cjs} +1 -1
  309. package/dist/{trajectoryConfigPanel-DwZvvYAl.js → trajectoryConfigPanel-uRLWdXUb.js} +1 -1
  310. package/dist/{trajectoryScatter-CEFp9PB3.js → trajectoryScatter-DPE4cC8N.js} +2 -2
  311. package/dist/{trajectoryScatter-Dd8Ppxae.cjs → trajectoryScatter-Dph8PSdN.cjs} +1 -1
  312. package/dist/{universalConfigPanel-BAppgtmC.js → universalConfigPanel-CI1CuBmr.js} +1 -1
  313. package/dist/{universalConfigPanel-C7tTPczg.cjs → universalConfigPanel-Db-pC67o.cjs} +1 -1
  314. package/dist/{universalTable-3JLC8oEV.js → universalTable-DMrgtBrw.js} +2 -2
  315. package/dist/{universalTable-COmdNAnW.cjs → universalTable-dQObEQog.cjs} +1 -1
  316. package/dist/{video-BtR163lf.js → video-DEhLie80.js} +2 -2
  317. package/dist/{video-8vSuQilp.cjs → video-DbsKQhVD.cjs} +1 -1
  318. package/dist/{videoMonitor-CdTNqBTI.js → videoMonitor-BS6_LYUb.js} +12 -12
  319. package/dist/{videoMonitor-BZwJZvno.cjs → videoMonitor-DLBtivXO.cjs} +1 -1
  320. package/dist/{vlu-AozGL50n.cjs → vlu-DXk_wQf-.cjs} +1 -1
  321. package/dist/{vlu-DqeEDfiN.js → vlu-DaSjPY3I.js} +2 -2
  322. package/dist/{warningOverview-CV_pqizm.js → warningOverview-CKCEs_Jj.js} +3 -3
  323. package/dist/{warningOverview-CRaFyOXe.cjs → warningOverview-DAUlXzr0.cjs} +1 -1
  324. package/dist/{weather-CLXe9W0L.cjs → weather-BAI0IWNH.cjs} +1 -1
  325. package/dist/{weather-iTeslV81.js → weather-XUj6pFwM.js} +2 -2
  326. package/dist/{windLin-u983PAHI.js → windLin-Bt4q2eUT.js} +2 -2
  327. package/dist/{windLin-BCMqmXdY.cjs → windLin-C9dsCT1w.cjs} +1 -1
  328. package/package.json +1 -1
  329. package/dist/bar-vpJvlBYX.cjs +0 -2
  330. package/dist/gasStationList-jfKZeg4P.cjs +0 -1
  331. package/dist/index-Cvu9nAQq.cjs +0 -612
@@ -1 +1 @@
1
- "use strict";var ge=Object.defineProperty,ye=Object.defineProperties;var be=Object.getOwnPropertyDescriptors;var ee=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable;var te=(y,h,s)=>h in y?ge(y,h,{enumerable:!0,configurable:!0,writable:!0,value:s}):y[h]=s,L=(y,h)=>{for(var s in h||(h={}))Ce.call(h,s)&&te(y,s,h[s]);if(ee)for(var s of ee(h))_e.call(h,s)&&te(y,s,h[s]);return y},q=(y,h)=>ye(y,be(h));var B=(y,h,s)=>new Promise((d,b)=>{var w=i=>{try{O(s.next(i))}catch(I){b(I)}},S=i=>{try{O(s.throw(i))}catch(I){b(I)}},O=i=>i.done?d(i.value):Promise.resolve(i.value).then(w,S);O((s=s.apply(y,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=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/checkbox/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const t=require("vue"),we=require("@element-plus/icons-vue"),N=require("./index-Cvu9nAQq.cjs");require("element-plus");const Se=require("./EChartComponentBase-BPiPzdtw.cjs"),De=require("./safeI18n-DR20q_h1.cjs"),oe=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),je={class:"chart-header"},Me={class:"chart-title"},xe={class:"chart-actions"},Ie=["onClick"],ke={class:"item-label"},Ne=["id"],Oe={DEFAULT_ICON:oe.DEFAULT_ICON,ACTIVE_ICON:oe.ACTIVE_ICON,NAME_CN:"指标时序演变曲线",NAME_EN:"TimeSeriesCurve",ORDER:1,PLATFORM:["pc","screen"]},Ee={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:2.5,type:"number",label:"component.options.lineWidth"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Te=[{name:"宽度累计变化量",fv:"",object_id:"",device:"",color:"#5470c6"},{name:"宽度日变化量",fv:"",object_id:"",device:"",color:"#91cc75"},{name:"x方向加速度",fv:"",object_id:"",device:"",color:"#fac858"},{name:"y方向加速度",fv:"",object_id:"",device:"",color:"#ee6666"},{name:"z方向加速度",fv:"",object_id:"",device:"",color:"#73c0de"},{name:"x方向倾角",fv:"",object_id:"",device:"",color:"#3ba272"},{name:"y方向倾角",fv:"",object_id:"",device:"",color:"#fc8452"},{name:"z方向倾角",fv:"",object_id:"",device:"",color:"#9a60b4"}],Ve=["name","fv","object_id","device","color"],Ae=["mosaic","statistics","calculate"],Re={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Le=50,qe={DEFAULT:Oe,OPTIONS:Ee,DATA:Te,PARAMS:Ve,SOURCE:Ae,ITEMS:Le,COMMON:Re},Be=t.defineComponent(q(L({},qe),{__name:"timeSeriesCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(y){var Y,K;const{t:h}=De.useSafeI18n({"component.crack.timeSeriesCurve":"指标时序演变曲线"}),s=y,d=t.ref([]),b=t.computed(()=>s.conf.data||[]),w=t.ref([]);let S=0;class O extends Se.EChartComponentBase{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.realTimeData=new Map,this.deviceNameMap=new Map,this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(e){this.currentObjectId=e}extractStyles(){return q(L({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",2.5),linkChannel:this.getOptionValue("linkChannel","crack")})}needsHistoryData(){return!1}onPreview(){return B(this,null,function*(){const{common:e,data:o}=this.props.conf,l=[];if(e.multiObject&&Array.isArray(o)){const c=new Set;for(const p of o){const a=yield this.resolveObjectId(p);!a||c.has(a)||(c.add(a),l.push(a))}}else{const c=yield this.resolveObjectId();c&&(this.currentObjectId=c,l.push(c))}l.length>0&&(w.value=l,yield $(l))})}onLinkEvent(e){se(e)}getChartOption(){const{data:e}=this.props.conf,o=this.Style.value,l=w.value,c=l.length>1,p=d.value.length===0?[]:e.filter(r=>d.value.includes(r.name));let a=[];if(this.props.mode==="edit")a=this.generateTimeLabels();else for(const[,r]of this.realTimeData)r.times.length>a.length&&(a=r.times);const u=[];let v=0;if(c&&this.props.mode!=="edit")for(const r of l){const g=this.deviceNameMap.get(r)||r.slice(-6);for(const m of p){if(!m.fv)continue;const f=`${r}:${m.name}`,C=`${g}-${m.name}`,M=m.color||this.deviceColors[v%this.deviceColors.length],_=this.realTimeData.get(f);u.push({name:C,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:M,type:"solid",width:o.lineWidth},itemStyle:{color:M},data:_?_.values:[]}),v++}}else p.filter(r=>r.fv||this.props.mode==="edit").forEach((r,g)=>{const m=r.device&&this.deviceNameMap.get(r.device)||"",f=m?`${m}-${r.name}`:r.name,C=r.color||this.deviceColors[g%this.deviceColors.length];let M;if(this.props.mode!=="edit"){const _=this.realTimeData.get(r.name);M=_?_.values:[]}else M=this.generateSeriesData(r,a);u.push({name:f,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:C,type:"solid",width:o.lineWidth},itemStyle:{color:C},data:M})});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:o.showLegend,type:"scroll",top:10,textStyle:{color:o.textColor}},grid:{top:60,left:60,right:40,bottom:o.showDataZoom?80:40},xAxis:{type:"category",data:a,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:o.textColor}},yAxis:{type:"value",name:"值",nameTextStyle:{color:o.textColor},axisLabel:{color:o.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:o.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:u}}generateTimeLabels(){const e=[];for(let o=24;o>=0;o--){const l=N.dayjs().subtract(o,"hour");e.push(l.format("MM-DD HH:mm"))}return e}generateSeriesData(e,o){const l=e.name,c=this.realTimeData.get(l);if(c&&c.times.length>0){const p=new Map;return c.times.forEach((a,u)=>p.set(a,c.values[u])),o.map(a=>{var u;return(u=p.get(a))!=null?u:null})}if(this.props.mode==="edit"){const p=Math.random()*10+5;return Array.from({length:o.length},(a,u)=>{const v=Math.sin(u*.5)*.3;return parseFloat((p*(.8+v)).toFixed(2))})}return new Array(o.length).fill(null)}setSocketData(e){if(!e)return;const{data:o}=this.props.conf;if(!o||!Array.isArray(o))return;const l=e.object_id||e.objectId||"";if(l&&w.value.length>0&&!w.value.includes(l))return;const c=e.datetime?e.datetime.split(".")[0]:N.dayjs().format("MM-DD HH:mm:ss"),p=N.dayjs(c).format("MM-DD HH:mm:ss"),a=w.value.length>1;o.forEach(v=>{if(!v.fv)return;if(v.device){const g=this.extractDataValue(e,v.device);g!=null&&(a&&l?this.deviceNameMap.set(l,String(g)):this.deviceNameMap.set(v.device,String(g)))}const r=this.extractDataValue(e,v.fv);if(r!=null){const g=parseFloat(r);if(!isNaN(g)){const m=a&&l?`${l}:${v.name}`:v.name;let f=this.realTimeData.get(m);f||(f={times:[],values:[]},this.realTimeData.set(m,f)),f.times.push(p),f.values.push(g),f.times.length>200&&(f.times.shift(),f.values.shift()),v.value=g}}});const u=this.getChartInstance();u&&u.setOption(this.getChartOption())}}const i=new O(s,"timeSeriesCurve");i.setupLifecycle();const I=i.getStyle(),ne=i.getEchartId();let A=null,j=!1;const se=n=>{const{payload:e}=n;if(!e)return;e.dateRange&&Array.isArray(e.dateRange)&&e.dateRange.length===2&&(A={start_time:e.dateRange[0],end_time:e.dateRange[1]});const o=e.objectIds&&e.objectIds.length>0?e.objectIds:e.objectId||e.object_id?[e.objectId||e.object_id]:[];o.length>0&&(w.value=o,$(o))},$=n=>B(null,null,function*(){var g;if(!n.length||s.mode!=="preview")return;j=!0;const e=++S;i.setCurrentObjectId([...n].sort().join(",")),i.realTimeData.clear(),i.deviceNameMap.clear();const o=(g=i.session)==null?void 0:g.value;if(!o){j=!1;return}const l=s.conf.id;o.componentRequests&&o.componentRequests.delete(l),typeof o.unsubscribeComponent=="function"&&o.unsubscribeComponent(l);const{data:c,common:p}=s.conf,a=n.length>1;A&&(p.historyTimeRange=A),s.conf.options||(s.conf.options={});const u=s.conf.options.points,v=Object.prototype.hasOwnProperty.call(s.conf.options,"points");(!u||Number(u)<24)&&(s.conf.options.points=24);for(const m of n){if(S!==e){j=!1;return}Array.isArray(c)&&c.forEach(C=>{C.object_id=m}),p.multiObject||(p.object_id=m);try{const C=yield Promise.resolve().then(()=>require("./history-B-Ynlm5z.cjs")),_=yield new C.default().getHistoryData(s,"timeSeriesCurve");if(S!==e){j=!1;return}_&&_.history&&Array.isArray(_.history)&&c.forEach((x,he)=>{if(!x.fv)return;const G=_.history[he];if(!Array.isArray(G))return;const fe=[...G].sort((D,E)=>new Date(D.time||D.datetime||"").getTime()-new Date(E.time||E.datetime||"").getTime()),ve=a?`${m}:${x.name}`:x.name,R=[],J=[];fe.forEach(D=>{const E=D.time||D.datetime,Q=D[x.fv];if(E&&Q!=null){const X=parseFloat(Q);isNaN(X)||(R.push(N.dayjs(E).format("MM-DD HH:mm:ss")),J.push(X))}a&&x.device&&D[x.device]&&i.deviceNameMap.set(m,String(D[x.device]))}),R.length>0&&i.realTimeData.set(ve,{times:R,values:J})})}catch(C){console.warn("[指标时序演变曲线] 历史数据获取失败:",C)}if(S!==e){j=!1;return}const f=i.getSource();i.subscribeBySource(f,m)}if(v?s.conf.options.points=u:delete s.conf.options.points,j=!1,S!==e)return;const r=i.getChartInstance();r&&r.setOption(i.getChartOption(),!0),o.registerComponent({id:l,request:null,onUpdate:(m,f)=>{S===e&&m==="realtime"&&i.setSocketData(f)}})}),ae=t.computed(()=>({background:I.value.bgColor,color:I.value.textColor})),ie=t.computed(()=>"指标时序演变曲线"),le=t.computed(()=>"导出图像"),re=t.computed(()=>"选择监测指标");s.mode==="edit"&&b.value.length>0&&(d.value=[(Y=b.value[0])==null?void 0:Y.name,(K=b.value[1])==null?void 0:K.name].filter(Boolean));const k=t.ref(!1),T=t.ref(null),H=t.ref(null),P=t.ref({}),ce=t.computed(()=>d.value.length===0?"":d.value.length===b.value.length?"全部":d.value.join("、")),z=t.computed(()=>{const n=b.value;return n.length>0&&n.every(e=>d.value.includes(e.name))}),ue=t.computed(()=>{const n=b.value,e=n.filter(o=>d.value.includes(o.name)).length;return e>0&&e<n.length}),de=()=>{k.value=!k.value,k.value&&me()};function me(){if(!T.value)return;const n=T.value.getBoundingClientRect();P.value={position:"fixed",top:`${n.bottom+4}px`,left:`${n.left}px`,zIndex:"9999"}}const W=n=>{const e=T.value,o=H.value;e&&!e.contains(n.target)&&o&&!o.contains(n.target)&&(k.value=!1)};t.onMounted(()=>{document.addEventListener("click",W)}),t.onBeforeUnmount(()=>{document.removeEventListener("click",W)});const F=()=>{z.value?d.value=[]:d.value=b.value.map(n=>n.name),Z()},U=n=>{const e=d.value.indexOf(n.name);e>-1?d.value.splice(e,1):d.value.push(n.name),Z()},Z=()=>{const n=i.getChartInstance();n&&n.setOption(i.getChartOption(),!0)};t.watch(()=>s.conf.data,n=>{var e,o;j||n&&n.length>0&&d.value.length===0&&(d.value=[(e=n[0])==null?void 0:e.name,(o=n[1])==null?void 0:o.name].filter(Boolean))},{immediate:!0});const pe=()=>{const n=i.getChartInstance();if(!n)return;const e=document.createElement("a");e.href=n.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),e.download=`${h("component.crack.timeSeriesCurve")}_${N.dayjs().format("YYYYMMDDHHmmss")}.png`,e.click()};return(n,e)=>{const o=V.ElIcon,l=V.ElInput,c=V.ElCheckbox,p=V.ElButton;return t.openBlock(),t.createElementBlock("div",{class:"mix-component crack-time-series",style:t.normalizeStyle(ae.value)},[t.createElementVNode("div",je,[t.createElementVNode("span",Me,"📉 "+t.toDisplayString(ie.value),1),t.createElementVNode("div",xe,[t.createElementVNode("div",{class:"metrics-select-wrapper",ref_key:"metricsWrapperRef",ref:T},[t.createVNode(l,{"model-value":ce.value,placeholder:re.value,size:"small",style:{width:"220px"},readonly:"",onClick:de},{suffix:t.withCtx(()=>[t.createVNode(o,{class:t.normalizeClass(["metrics-arrow",{"is-open":k.value}])},{default:t.withCtx(()=>[t.createVNode(t.unref(we.ArrowDown))]),_:1},8,["class"])]),_:1},8,["model-value","placeholder"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.withDirectives(t.createElementVNode("div",{class:"metrics-dropdown",style:t.normalizeStyle(P.value),ref_key:"metricsDropdownRef",ref:H},[t.createElementVNode("div",{class:"metrics-dropdown-item",onClick:t.withModifiers(F,["stop"])},[t.createVNode(c,{"model-value":z.value,indeterminate:ue.value,onChange:F},null,8,["model-value","indeterminate"]),e[0]||(e[0]=t.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全部",-1))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,a=>(t.openBlock(),t.createElementBlock("div",{key:a.name,class:"metrics-dropdown-item",onClick:t.withModifiers(u=>U(a),["stop"])},[t.createVNode(c,{"model-value":d.value.includes(a.name),onChange:u=>U(a)},null,8,["model-value","onChange"]),t.createElementVNode("span",ke,t.toDisplayString(a.name),1)],8,Ie))),128))],4),[[t.vShow,k.value]])]))],512),t.createVNode(p,{size:"small",onClick:pe},{default:t.withCtx(()=>[t.createTextVNode("💾 "+t.toDisplayString(le.value),1)]),_:1})])]),t.createElementVNode("div",{id:t.unref(ne),class:"chart-container"},null,8,Ne),t.renderSlot(n.$slots,"default",{},void 0,!0)],4)}}})),$e=N._export_sfc(Be,[["__scopeId","data-v-6b410ecb"]]);exports.default=$e;
1
+ "use strict";var ge=Object.defineProperty,ye=Object.defineProperties;var be=Object.getOwnPropertyDescriptors;var ee=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable;var te=(y,h,s)=>h in y?ge(y,h,{enumerable:!0,configurable:!0,writable:!0,value:s}):y[h]=s,L=(y,h)=>{for(var s in h||(h={}))Ce.call(h,s)&&te(y,s,h[s]);if(ee)for(var s of ee(h))_e.call(h,s)&&te(y,s,h[s]);return y},q=(y,h)=>ye(y,be(h));var B=(y,h,s)=>new Promise((d,b)=>{var w=i=>{try{O(s.next(i))}catch(I){b(I)}},S=i=>{try{O(s.throw(i))}catch(I){b(I)}},O=i=>i.done?d(i.value):Promise.resolve(i.value).then(w,S);O((s=s.apply(y,h)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=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/checkbox/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const t=require("vue"),we=require("@element-plus/icons-vue"),N=require("./index-77aUdspY.cjs");require("element-plus");const Se=require("./EChartComponentBase-D9EUh4BZ.cjs"),De=require("./safeI18n-DR20q_h1.cjs"),oe=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),je={class:"chart-header"},Me={class:"chart-title"},xe={class:"chart-actions"},Ie=["onClick"],ke={class:"item-label"},Ne=["id"],Oe={DEFAULT_ICON:oe.DEFAULT_ICON,ACTIVE_ICON:oe.ACTIVE_ICON,NAME_CN:"指标时序演变曲线",NAME_EN:"TimeSeriesCurve",ORDER:1,PLATFORM:["pc","screen"]},Ee={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleSize:{value:14,type:"number",label:"component.options.titleSize"},showLegend:{value:!0,type:"switch",label:"component.options.showLegend"},showDataZoom:{value:!0,type:"switch",label:"component.crack.showDataZoom"},lineWidth:{value:2.5,type:"number",label:"component.options.lineWidth"},linkChannel:{value:"crack",type:"select",label:"component.linkChannel",options:[{label:"裂缝监测",value:"crack"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"深部位移",value:"deepDisplacement"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},Te=[{name:"宽度累计变化量",fv:"",object_id:"",device:"",color:"#5470c6"},{name:"宽度日变化量",fv:"",object_id:"",device:"",color:"#91cc75"},{name:"x方向加速度",fv:"",object_id:"",device:"",color:"#fac858"},{name:"y方向加速度",fv:"",object_id:"",device:"",color:"#ee6666"},{name:"z方向加速度",fv:"",object_id:"",device:"",color:"#73c0de"},{name:"x方向倾角",fv:"",object_id:"",device:"",color:"#3ba272"},{name:"y方向倾角",fv:"",object_id:"",device:"",color:"#fc8452"},{name:"z方向倾角",fv:"",object_id:"",device:"",color:"#9a60b4"}],Ve=["name","fv","object_id","device","color"],Ae=["mosaic","statistics","calculate"],Re={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},Le=50,qe={DEFAULT:Oe,OPTIONS:Ee,DATA:Te,PARAMS:Ve,SOURCE:Ae,ITEMS:Le,COMMON:Re},Be=t.defineComponent(q(L({},qe),{__name:"timeSeriesCurve",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(y){var Y,K;const{t:h}=De.useSafeI18n({"component.crack.timeSeriesCurve":"指标时序演变曲线"}),s=y,d=t.ref([]),b=t.computed(()=>s.conf.data||[]),w=t.ref([]);let S=0;class O extends Se.EChartComponentBase{constructor(){super(...arguments),this.deviceColors=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4"],this.realTimeData=new Map,this.deviceNameMap=new Map,this.currentObjectId=""}getCurrentObjectId(){return this.currentObjectId}setCurrentObjectId(e){this.currentObjectId=e}extractStyles(){return q(L({},super.extractStyles()),{showLegend:this.getOptionValue("showLegend",!0),showDataZoom:this.getOptionValue("showDataZoom",!0),lineWidth:this.getOptionValue("lineWidth",2.5),linkChannel:this.getOptionValue("linkChannel","crack")})}needsHistoryData(){return!1}onPreview(){return B(this,null,function*(){const{common:e,data:o}=this.props.conf,l=[];if(e.multiObject&&Array.isArray(o)){const c=new Set;for(const p of o){const a=yield this.resolveObjectId(p);!a||c.has(a)||(c.add(a),l.push(a))}}else{const c=yield this.resolveObjectId();c&&(this.currentObjectId=c,l.push(c))}l.length>0&&(w.value=l,yield $(l))})}onLinkEvent(e){se(e)}getChartOption(){const{data:e}=this.props.conf,o=this.Style.value,l=w.value,c=l.length>1,p=d.value.length===0?[]:e.filter(r=>d.value.includes(r.name));let a=[];if(this.props.mode==="edit")a=this.generateTimeLabels();else for(const[,r]of this.realTimeData)r.times.length>a.length&&(a=r.times);const u=[];let v=0;if(c&&this.props.mode!=="edit")for(const r of l){const g=this.deviceNameMap.get(r)||r.slice(-6);for(const m of p){if(!m.fv)continue;const f=`${r}:${m.name}`,C=`${g}-${m.name}`,M=m.color||this.deviceColors[v%this.deviceColors.length],_=this.realTimeData.get(f);u.push({name:C,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:M,type:"solid",width:o.lineWidth},itemStyle:{color:M},data:_?_.values:[]}),v++}}else p.filter(r=>r.fv||this.props.mode==="edit").forEach((r,g)=>{const m=r.device&&this.deviceNameMap.get(r.device)||"",f=m?`${m}-${r.name}`:r.name,C=r.color||this.deviceColors[g%this.deviceColors.length];let M;if(this.props.mode!=="edit"){const _=this.realTimeData.get(r.name);M=_?_.values:[]}else M=this.generateSeriesData(r,a);u.push({name:f,type:"line",smooth:!0,showSymbol:!1,lineStyle:{color:C,type:"solid",width:o.lineWidth},itemStyle:{color:C},data:M})});return{tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{show:o.showLegend,type:"scroll",top:10,textStyle:{color:o.textColor}},grid:{top:60,left:60,right:40,bottom:o.showDataZoom?80:40},xAxis:{type:"category",data:a,axisLabel:{interval:"auto",rotate:15,fontSize:10,color:o.textColor}},yAxis:{type:"value",name:"值",nameTextStyle:{color:o.textColor},axisLabel:{color:o.textColor},splitLine:{lineStyle:{type:"dashed",opacity:.5}}},dataZoom:o.showDataZoom?[{type:"inside"},{type:"slider",bottom:10,height:15}]:[],series:u}}generateTimeLabels(){const e=[];for(let o=24;o>=0;o--){const l=N.dayjs().subtract(o,"hour");e.push(l.format("MM-DD HH:mm"))}return e}generateSeriesData(e,o){const l=e.name,c=this.realTimeData.get(l);if(c&&c.times.length>0){const p=new Map;return c.times.forEach((a,u)=>p.set(a,c.values[u])),o.map(a=>{var u;return(u=p.get(a))!=null?u:null})}if(this.props.mode==="edit"){const p=Math.random()*10+5;return Array.from({length:o.length},(a,u)=>{const v=Math.sin(u*.5)*.3;return parseFloat((p*(.8+v)).toFixed(2))})}return new Array(o.length).fill(null)}setSocketData(e){if(!e)return;const{data:o}=this.props.conf;if(!o||!Array.isArray(o))return;const l=e.object_id||e.objectId||"";if(l&&w.value.length>0&&!w.value.includes(l))return;const c=e.datetime?e.datetime.split(".")[0]:N.dayjs().format("MM-DD HH:mm:ss"),p=N.dayjs(c).format("MM-DD HH:mm:ss"),a=w.value.length>1;o.forEach(v=>{if(!v.fv)return;if(v.device){const g=this.extractDataValue(e,v.device);g!=null&&(a&&l?this.deviceNameMap.set(l,String(g)):this.deviceNameMap.set(v.device,String(g)))}const r=this.extractDataValue(e,v.fv);if(r!=null){const g=parseFloat(r);if(!isNaN(g)){const m=a&&l?`${l}:${v.name}`:v.name;let f=this.realTimeData.get(m);f||(f={times:[],values:[]},this.realTimeData.set(m,f)),f.times.push(p),f.values.push(g),f.times.length>200&&(f.times.shift(),f.values.shift()),v.value=g}}});const u=this.getChartInstance();u&&u.setOption(this.getChartOption())}}const i=new O(s,"timeSeriesCurve");i.setupLifecycle();const I=i.getStyle(),ne=i.getEchartId();let A=null,j=!1;const se=n=>{const{payload:e}=n;if(!e)return;e.dateRange&&Array.isArray(e.dateRange)&&e.dateRange.length===2&&(A={start_time:e.dateRange[0],end_time:e.dateRange[1]});const o=e.objectIds&&e.objectIds.length>0?e.objectIds:e.objectId||e.object_id?[e.objectId||e.object_id]:[];o.length>0&&(w.value=o,$(o))},$=n=>B(null,null,function*(){var g;if(!n.length||s.mode!=="preview")return;j=!0;const e=++S;i.setCurrentObjectId([...n].sort().join(",")),i.realTimeData.clear(),i.deviceNameMap.clear();const o=(g=i.session)==null?void 0:g.value;if(!o){j=!1;return}const l=s.conf.id;o.componentRequests&&o.componentRequests.delete(l),typeof o.unsubscribeComponent=="function"&&o.unsubscribeComponent(l);const{data:c,common:p}=s.conf,a=n.length>1;A&&(p.historyTimeRange=A),s.conf.options||(s.conf.options={});const u=s.conf.options.points,v=Object.prototype.hasOwnProperty.call(s.conf.options,"points");(!u||Number(u)<24)&&(s.conf.options.points=24);for(const m of n){if(S!==e){j=!1;return}Array.isArray(c)&&c.forEach(C=>{C.object_id=m}),p.multiObject||(p.object_id=m);try{const C=yield Promise.resolve().then(()=>require("./history-D1R2RAZQ.cjs")),_=yield new C.default().getHistoryData(s,"timeSeriesCurve");if(S!==e){j=!1;return}_&&_.history&&Array.isArray(_.history)&&c.forEach((x,he)=>{if(!x.fv)return;const G=_.history[he];if(!Array.isArray(G))return;const fe=[...G].sort((D,E)=>new Date(D.time||D.datetime||"").getTime()-new Date(E.time||E.datetime||"").getTime()),ve=a?`${m}:${x.name}`:x.name,R=[],J=[];fe.forEach(D=>{const E=D.time||D.datetime,Q=D[x.fv];if(E&&Q!=null){const X=parseFloat(Q);isNaN(X)||(R.push(N.dayjs(E).format("MM-DD HH:mm:ss")),J.push(X))}a&&x.device&&D[x.device]&&i.deviceNameMap.set(m,String(D[x.device]))}),R.length>0&&i.realTimeData.set(ve,{times:R,values:J})})}catch(C){console.warn("[指标时序演变曲线] 历史数据获取失败:",C)}if(S!==e){j=!1;return}const f=i.getSource();i.subscribeBySource(f,m)}if(v?s.conf.options.points=u:delete s.conf.options.points,j=!1,S!==e)return;const r=i.getChartInstance();r&&r.setOption(i.getChartOption(),!0),o.registerComponent({id:l,request:null,onUpdate:(m,f)=>{S===e&&m==="realtime"&&i.setSocketData(f)}})}),ae=t.computed(()=>({background:I.value.bgColor,color:I.value.textColor})),ie=t.computed(()=>"指标时序演变曲线"),le=t.computed(()=>"导出图像"),re=t.computed(()=>"选择监测指标");s.mode==="edit"&&b.value.length>0&&(d.value=[(Y=b.value[0])==null?void 0:Y.name,(K=b.value[1])==null?void 0:K.name].filter(Boolean));const k=t.ref(!1),T=t.ref(null),H=t.ref(null),P=t.ref({}),ce=t.computed(()=>d.value.length===0?"":d.value.length===b.value.length?"全部":d.value.join("、")),z=t.computed(()=>{const n=b.value;return n.length>0&&n.every(e=>d.value.includes(e.name))}),ue=t.computed(()=>{const n=b.value,e=n.filter(o=>d.value.includes(o.name)).length;return e>0&&e<n.length}),de=()=>{k.value=!k.value,k.value&&me()};function me(){if(!T.value)return;const n=T.value.getBoundingClientRect();P.value={position:"fixed",top:`${n.bottom+4}px`,left:`${n.left}px`,zIndex:"9999"}}const W=n=>{const e=T.value,o=H.value;e&&!e.contains(n.target)&&o&&!o.contains(n.target)&&(k.value=!1)};t.onMounted(()=>{document.addEventListener("click",W)}),t.onBeforeUnmount(()=>{document.removeEventListener("click",W)});const F=()=>{z.value?d.value=[]:d.value=b.value.map(n=>n.name),Z()},U=n=>{const e=d.value.indexOf(n.name);e>-1?d.value.splice(e,1):d.value.push(n.name),Z()},Z=()=>{const n=i.getChartInstance();n&&n.setOption(i.getChartOption(),!0)};t.watch(()=>s.conf.data,n=>{var e,o;j||n&&n.length>0&&d.value.length===0&&(d.value=[(e=n[0])==null?void 0:e.name,(o=n[1])==null?void 0:o.name].filter(Boolean))},{immediate:!0});const pe=()=>{const n=i.getChartInstance();if(!n)return;const e=document.createElement("a");e.href=n.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),e.download=`${h("component.crack.timeSeriesCurve")}_${N.dayjs().format("YYYYMMDDHHmmss")}.png`,e.click()};return(n,e)=>{const o=V.ElIcon,l=V.ElInput,c=V.ElCheckbox,p=V.ElButton;return t.openBlock(),t.createElementBlock("div",{class:"mix-component crack-time-series",style:t.normalizeStyle(ae.value)},[t.createElementVNode("div",je,[t.createElementVNode("span",Me,"📉 "+t.toDisplayString(ie.value),1),t.createElementVNode("div",xe,[t.createElementVNode("div",{class:"metrics-select-wrapper",ref_key:"metricsWrapperRef",ref:T},[t.createVNode(l,{"model-value":ce.value,placeholder:re.value,size:"small",style:{width:"220px"},readonly:"",onClick:de},{suffix:t.withCtx(()=>[t.createVNode(o,{class:t.normalizeClass(["metrics-arrow",{"is-open":k.value}])},{default:t.withCtx(()=>[t.createVNode(t.unref(we.ArrowDown))]),_:1},8,["class"])]),_:1},8,["model-value","placeholder"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.withDirectives(t.createElementVNode("div",{class:"metrics-dropdown",style:t.normalizeStyle(P.value),ref_key:"metricsDropdownRef",ref:H},[t.createElementVNode("div",{class:"metrics-dropdown-item",onClick:t.withModifiers(F,["stop"])},[t.createVNode(c,{"model-value":z.value,indeterminate:ue.value,onChange:F},null,8,["model-value","indeterminate"]),e[0]||(e[0]=t.createElementVNode("span",{class:"item-label",style:{"font-weight":"bold"}},"全部",-1))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,a=>(t.openBlock(),t.createElementBlock("div",{key:a.name,class:"metrics-dropdown-item",onClick:t.withModifiers(u=>U(a),["stop"])},[t.createVNode(c,{"model-value":d.value.includes(a.name),onChange:u=>U(a)},null,8,["model-value","onChange"]),t.createElementVNode("span",ke,t.toDisplayString(a.name),1)],8,Ie))),128))],4),[[t.vShow,k.value]])]))],512),t.createVNode(p,{size:"small",onClick:pe},{default:t.withCtx(()=>[t.createTextVNode("💾 "+t.toDisplayString(le.value),1)]),_:1})])]),t.createElementVNode("div",{id:t.unref(ne),class:"chart-container"},null,8,Ne),t.renderSlot(n.$slots,"default",{},void 0,!0)],4)}}})),$e=N._export_sfc(Be,[["__scopeId","data-v-6b410ecb"]]);exports.default=$e;
@@ -34,9 +34,9 @@ import "element-plus/es/components/input/style/css";
34
34
  import "element-plus/es/components/icon/style/css";
35
35
  import { defineComponent as Ne, ref as A, computed as M, onMounted as Re, onBeforeUnmount as Le, watch as Ve, openBlock as V, createElementBlock as W, normalizeStyle as re, createElementVNode as _, toDisplayString as F, createVNode as T, withCtx as Z, normalizeClass as $e, unref as ce, createBlock as He, Teleport as Be, withDirectives as ze, withModifiers as ue, Fragment as Pe, renderList as We, vShow as Fe, createTextVNode as Ze, renderSlot as Ue } from "vue";
36
36
  import { ArrowDown as Ye } from "@element-plus/icons-vue";
37
- import { d as R, _ as qe } from "./index-DomNEEyv.js";
37
+ import { d as R, _ as qe } from "./index-BZpYmpDy.js";
38
38
  import "element-plus";
39
- import { E as Ke } from "./EChartComponentBase-DPWPg81w.js";
39
+ import { E as Ke } from "./EChartComponentBase-i76OGL3z.js";
40
40
  import { u as Ge } from "./safeI18n-CXZgGKWp.js";
41
41
  import { A as Je, D as Qe } from "./ele-vlu-icon-Bg6EHZdJ.js";
42
42
  const Xe = { class: "chart-header" }, et = { class: "chart-title" }, tt = { class: "chart-actions" }, ot = ["onClick"], nt = { class: "item-label" }, st = ["id"], at = {
@@ -301,7 +301,7 @@ const Xe = { class: "chart-header" }, et = { class: "chart-title" }, tt = { clas
301
301
  y.object_id = d;
302
302
  }), m.multiObject || (m.object_id = d);
303
303
  try {
304
- const y = yield import("./history-BtX7uNYs.js"), C = yield new y.default().getHistoryData(n, "timeSeriesCurve");
304
+ const y = yield import("./history-BRkb914v.js"), C = yield new y.default().getHistoryData(n, "timeSeriesCurve");
305
305
  if (S !== e) {
306
306
  x = !1;
307
307
  return;
@@ -28,9 +28,9 @@ var D = (s, i, r) => new Promise((u, n) => {
28
28
  });
29
29
  import { defineComponent as K, ref as j, reactive as Q, openBlock as S, createElementBlock as x, normalizeStyle as L, unref as o, createElementVNode as p, Fragment as Z, renderList as I, normalizeClass as W, toDisplayString as w, renderSlot as X, nextTick as Y } from "vue";
30
30
  import "html2canvas";
31
- import { C as e0, _ as t0 } from "./index-DomNEEyv.js";
31
+ import { C as e0, _ as t0 } from "./index-BZpYmpDy.js";
32
32
  import "element-plus";
33
- import { E as a0 } from "./EChartComponentBase-DPWPg81w.js";
33
+ import { E as a0 } from "./EChartComponentBase-i76OGL3z.js";
34
34
  import { u as r0, i as l0, a as o0 } from "./installCanvasRenderer-oDYkyVFy.js";
35
35
  import { i as i0 } from "./install-DdM8j5Ll.js";
36
36
  import { i as s0 } from "./install-CEl1AYgZ.js";
@@ -1 +1 @@
1
- "use strict";var R=Object.defineProperty,$=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols,j=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,Z=Reflect.get;var M=(i,n,l)=>n in i?R(i,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[n]=l,N=(i,n)=>{for(var l in n||(n={}))q.call(n,l)&&M(i,l,n[l]);if(E)for(var l of E(n))V.call(n,l)&&M(i,l,n[l]);return i},O=(i,n)=>$(i,D(n));var T=(i,n,l)=>Z(j(i),l,n);var A=(i,n,l)=>new Promise((d,c)=>{var h=f=>{try{a(l.next(f))}catch(g){c(g)}},L=f=>{try{a(l.throw(f))}catch(g){c(g)}},a=f=>f.done?d(f.value):Promise.resolve(f.value).then(h,L);a((l=l.apply(i,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const F=require("./index-Cvu9nAQq.cjs");require("element-plus");const I=require("./EChartComponentBase-BPiPzdtw.cjs"),b=require("./installCanvasRenderer-CyhM1Qpl.cjs"),H=require("./install-DV5cEgNV.cjs"),U=require("./install-CltTFs4e.cjs"),P=require("./install-C8buXQPI.cjs"),G=require("./install-B1IEhhn3.cjs"),J="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",K="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Q=["onClick"],W=["id"],X={class:"progress-wrap"},Y=["title"],ee={DEFAULT_ICON:J,ACTIVE_ICON:K,NAME_CN:"切换",NAME_EN:"Toggle Button",ORDER:2,PLATFORM:["pc","screen","mobile"]},te={titleSize:14,textSize:12,barHeight:8,textColor:"#a8b4d9",bgColor:"#0a1635",barColor:"#1e3a5f",tabColor:"#1e3a5f",activeBgColor:"#6b7fd9",borderColor:"#1e3a5f",activeBorder:"#6b7fd9",radiusSize:8,type:{value:"none",type:"radio",option:[{value:"none",label:"component.radar.diamond"},{value:"circle",label:"component.radar.circle"}],label:"component.radar.shapeSelect"},tags:{value:[{label:"TAB1",flag:["S01","S02","S03"]},{label:"TAB2",flag:["S02","S03","S04"]}],type:"tags",label:"component.radar.tagsSetting"}},ae=[{name:"参数一",color:"#4162ff",fv:"S01",object_id:""},{name:"参数二",color:"#3bbc6a",fv:"S02",object_id:""},{name:"参数三",color:"#e24359",fv:"S03",object_id:""},{name:"参数四",color:"#ff8b41",fv:"S04",object_id:""}],re=["name","fv","object_id","color"],le=["mosaic","statistics","calculate"],oe={useAlias:!1,multiObject:!1,source:"mosaic"},ne={DEFAULT:ee,OPTIONS:te,DATA:ae,PARAMS:re,SOURCE:le,COMMON:oe},ie=e.defineComponent(O(N({},ne),{__name:"toggleBtn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){b.use([H.install,U.install,b.install,P.install,b.install$1,G.install]);const n=i,l=e.ref(0),d=e.reactive({indicator:[],series:[]}),c=e.ref(0);class h extends I.EChartComponentBase{extractStyles(){var r,o,s,v,u,m,p,S,y,x,w,z,k,B,_;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleSize:((o=t==null?void 0:t.titleSize)==null?void 0:o.value)||16,barHeight:((s=t==null?void 0:t.barHeight)==null?void 0:s.value)||8,textColor:((v=t==null?void 0:t.textColor)==null?void 0:v.value)||"#111",tabColor:((u=t==null?void 0:t.tabColor)==null?void 0:u.value)||"#f5f5f5",activeBgColor:((m=t==null?void 0:t.activeBgColor)==null?void 0:m.value)||"#4162ff",borderColor:((p=t==null?void 0:t.borderColor)==null?void 0:p.value)||"#e5e5e5",activeBorder:((S=t==null?void 0:t.activeBorder)==null?void 0:S.value)||"#4162ff",barColor:((y=t==null?void 0:t.barColor)==null?void 0:y.value)||"#e5e5e5",radiusSize:(w=(x=t==null?void 0:t.radiusSize)==null?void 0:x.value)!=null?w:8,textSize:(k=(z=t==null?void 0:t.textSize)==null?void 0:z.value)!=null?k:12,type:((B=t==null?void 0:t.type)==null?void 0:B.value)||!1,tags:((_=t==null?void 0:t.tags)==null?void 0:_.value)||[]}}getChartOption(){var r;const{name:t}=this.props.conf;return{radar:{shape:this.Style.value.type,alignTicks:!1,splitNumber:5,axisNameGap:10,indicator:d.indicator,center:["50%","55%"],radius:70,axisLine:{lineStyle:{type:"dashed",color:"#383D42"}},splitLine:{show:!0,lineStyle:{width:1,color:"#4B5FAB"}},splitArea:{show:!0,areaStyle:{color:["transparent"]}},axisName:{fontSize:12,color:this.Style.value.textColor}},series:[{name:t!=null?t:"",type:"radar",data:(r=d.series)!=null?r:[],areaStyle:{},itemStyle:{color:"#4162ff"}}]}}init(){return A(this,null,function*(){yield T(h.prototype,this,"init").call(this),e.nextTick(()=>{this.initChart(),g(c.value)})})}setHistoryData(t){if(!t)return;const{data:r}=this.props.conf;t.forEach((o,s)=>{var v;r[s].value=(v=o.data[0])!=null?v:0}),g(c.value)}setSocketData(t){if(!t)return;const{data:r}=this.props.conf;r.forEach(o=>{const s=this.extractDataValue(t,o.fv);o.value=s!=null?s:0}),g(c.value)}refreshChart(){var r;const t=this.getChartOption();(r=this.chartObj)==null||r.setOption(t,!0)}}const L=new h(n,"toggleBtn");L.setupLifecycle();const a=L.getStyle(),f=L.getEchartId(),g=C=>{const{data:t,options:r,name:o}=n.conf;c.value=C,d.indicator=[],d.series=[];let s={};s.name=o,s.value=[];const v=Math.max(0,...t.map(u=>u.value||0));l.value=v<=0?1:Math.max(v,Math.ceil(v/10)*10),t.forEach(u=>{var m,p;(p=(m=r.tags.value[c.value])==null?void 0:m.flag)!=null&&p.includes(u.fv)&&(d.indicator.push({name:u.name,max:l.value,value:u.value,color:u.color}),s.value.push(u.value))}),d.series.push(s),L.refreshChart()};return(C,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(a).bgColor,borderRadius:`${e.unref(a).radiusSize}px`})},[e.createElementVNode("div",{class:"toggle-wrap",style:e.normalizeStyle({borderTopLeftRadius:`${e.unref(a).radiusSize}px`,borderTopRightRadius:`${e.unref(a).radiusSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).tags,(r,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass(["btn-item",{active:c.value===o}]),style:e.normalizeStyle({backgroundColor:c.value===o?e.unref(a).activeBgColor:e.unref(a).tabColor,color:c.value===o?"#fff":e.unref(a).textColor,fontSize:`${e.unref(a).titleSize}px`,borderTopLeftRadius:o===0?`${e.unref(a).radiusSize}px`:"0",borderTopRightRadius:o===e.unref(a).tags.length-1?`${e.unref(a).radiusSize}px`:"0"}),onClick:s=>g(Number(o))},e.toDisplayString(r.label),15,Q))),128))],4),e.createElementVNode("div",{class:"radar-wrap",style:e.normalizeStyle({color:e.unref(a).textColor,fontSize:`${e.unref(a).textSize}px`})},[e.createElementVNode("div",{id:e.unref(f),class:"radar-chart"},null,8,W),e.createElementVNode("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.indicator,(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:"bar-item-crosswise",key:o},[e.createElementVNode("div",{class:"bar-title",title:r.name,style:e.normalizeStyle({color:e.unref(a).textColor})},e.toDisplayString(r.name),13,Y),e.createElementVNode("div",{class:"bar",style:e.normalizeStyle({backgroundColor:e.unref(a).barColor,height:`${e.unref(a).barHeight}px`})},[e.createElementVNode("div",{class:"progress",style:e.normalizeStyle({backgroundColor:r.color||e.unref(F.COLORS)[o],width:(r.value/l.value*100).toFixed(2)+"%"})},null,4)],4),e.createElementVNode("div",{class:"bar-value",style:e.normalizeStyle({color:e.unref(a).textColor})},e.toDisplayString(r.value||0),5)]))),128))])],4),e.renderSlot(C.$slots,"default",{},void 0,!0)],4))}})),se=F._export_sfc(ie,[["__scopeId","data-v-352d89b4"]]);exports.default=se;
1
+ "use strict";var R=Object.defineProperty,$=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols,j=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,Z=Reflect.get;var M=(i,n,l)=>n in i?R(i,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[n]=l,N=(i,n)=>{for(var l in n||(n={}))q.call(n,l)&&M(i,l,n[l]);if(E)for(var l of E(n))V.call(n,l)&&M(i,l,n[l]);return i},O=(i,n)=>$(i,D(n));var T=(i,n,l)=>Z(j(i),l,n);var A=(i,n,l)=>new Promise((d,c)=>{var h=f=>{try{a(l.next(f))}catch(g){c(g)}},L=f=>{try{a(l.throw(f))}catch(g){c(g)}},a=f=>f.done?d(f.value):Promise.resolve(f.value).then(h,L);a((l=l.apply(i,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const F=require("./index-77aUdspY.cjs");require("element-plus");const I=require("./EChartComponentBase-D9EUh4BZ.cjs"),b=require("./installCanvasRenderer-CyhM1Qpl.cjs"),H=require("./install-DV5cEgNV.cjs"),U=require("./install-CltTFs4e.cjs"),P=require("./install-C8buXQPI.cjs"),G=require("./install-B1IEhhn3.cjs"),J="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",K="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e切换%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-986.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M998.978161,99.5%20C999.333655,99.5%20999.621839,99.7881845%20999.621839,100.143678%20L999.621839,100.143678%20L999.621,100.971%20L1002.65632,100.971264%20C1002.9795,100.971264%201003.24705,101.209433%201003.29302,101.519824%20L1003.3,101.614943%20L1003.3,113.385057%20C1003.3,113.740551%201003.01182,114.028736%201002.65632,114.028736%20L1002.65632,114.028736%20L999.621,114.028%20L999.621839,114.856322%20C999.621839,115.179498%20999.38367,115.447047%20999.073279,115.493021%20L998.978161,115.5%20L991.621839,115.5%20C991.266345,115.5%20990.978161,115.211815%20990.978161,114.856322%20L990.978161,114.856322%20L990.978,114.028%20L987.943678,114.028736%20C987.620502,114.028736%20987.352953,113.790567%20987.306979,113.480176%20L987.3,113.385057%20L987.3,101.614943%20C987.3,101.259449%20987.588185,100.971264%20987.943678,100.971264%20L987.943678,100.971264%20L990.978,100.971%20L990.978161,100.143678%20C990.978161,99.8205021%20991.21633,99.5529535%20991.526721,99.5069791%20L991.621839,99.5%20Z%20M998.334483,100.786788%20L992.265517,100.786788%20L992.265517,114.212076%20L998.334483,114.212076%20L998.334483,100.786788%20Z%20M1002.01264,102.258053%20L999.621839,102.258053%20L999.621839,112.740811%20L1002.01264,112.740811%20L1002.01264,102.258053%20Z%20M990.978161,102.258053%20L988.587356,102.258053%20L988.587356,112.740811%20L990.978161,112.740811%20L990.978161,102.258053%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Q=["onClick"],W=["id"],X={class:"progress-wrap"},Y=["title"],ee={DEFAULT_ICON:J,ACTIVE_ICON:K,NAME_CN:"切换",NAME_EN:"Toggle Button",ORDER:2,PLATFORM:["pc","screen","mobile"]},te={titleSize:14,textSize:12,barHeight:8,textColor:"#a8b4d9",bgColor:"#0a1635",barColor:"#1e3a5f",tabColor:"#1e3a5f",activeBgColor:"#6b7fd9",borderColor:"#1e3a5f",activeBorder:"#6b7fd9",radiusSize:8,type:{value:"none",type:"radio",option:[{value:"none",label:"component.radar.diamond"},{value:"circle",label:"component.radar.circle"}],label:"component.radar.shapeSelect"},tags:{value:[{label:"TAB1",flag:["S01","S02","S03"]},{label:"TAB2",flag:["S02","S03","S04"]}],type:"tags",label:"component.radar.tagsSetting"}},ae=[{name:"参数一",color:"#4162ff",fv:"S01",object_id:""},{name:"参数二",color:"#3bbc6a",fv:"S02",object_id:""},{name:"参数三",color:"#e24359",fv:"S03",object_id:""},{name:"参数四",color:"#ff8b41",fv:"S04",object_id:""}],re=["name","fv","object_id","color"],le=["mosaic","statistics","calculate"],oe={useAlias:!1,multiObject:!1,source:"mosaic"},ne={DEFAULT:ee,OPTIONS:te,DATA:ae,PARAMS:re,SOURCE:le,COMMON:oe},ie=e.defineComponent(O(N({},ne),{__name:"toggleBtn",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(i){b.use([H.install,U.install,b.install,P.install,b.install$1,G.install]);const n=i,l=e.ref(0),d=e.reactive({indicator:[],series:[]}),c=e.ref(0);class h extends I.EChartComponentBase{extractStyles(){var r,o,s,v,u,m,p,S,y,x,w,z,k,B,_;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleSize:((o=t==null?void 0:t.titleSize)==null?void 0:o.value)||16,barHeight:((s=t==null?void 0:t.barHeight)==null?void 0:s.value)||8,textColor:((v=t==null?void 0:t.textColor)==null?void 0:v.value)||"#111",tabColor:((u=t==null?void 0:t.tabColor)==null?void 0:u.value)||"#f5f5f5",activeBgColor:((m=t==null?void 0:t.activeBgColor)==null?void 0:m.value)||"#4162ff",borderColor:((p=t==null?void 0:t.borderColor)==null?void 0:p.value)||"#e5e5e5",activeBorder:((S=t==null?void 0:t.activeBorder)==null?void 0:S.value)||"#4162ff",barColor:((y=t==null?void 0:t.barColor)==null?void 0:y.value)||"#e5e5e5",radiusSize:(w=(x=t==null?void 0:t.radiusSize)==null?void 0:x.value)!=null?w:8,textSize:(k=(z=t==null?void 0:t.textSize)==null?void 0:z.value)!=null?k:12,type:((B=t==null?void 0:t.type)==null?void 0:B.value)||!1,tags:((_=t==null?void 0:t.tags)==null?void 0:_.value)||[]}}getChartOption(){var r;const{name:t}=this.props.conf;return{radar:{shape:this.Style.value.type,alignTicks:!1,splitNumber:5,axisNameGap:10,indicator:d.indicator,center:["50%","55%"],radius:70,axisLine:{lineStyle:{type:"dashed",color:"#383D42"}},splitLine:{show:!0,lineStyle:{width:1,color:"#4B5FAB"}},splitArea:{show:!0,areaStyle:{color:["transparent"]}},axisName:{fontSize:12,color:this.Style.value.textColor}},series:[{name:t!=null?t:"",type:"radar",data:(r=d.series)!=null?r:[],areaStyle:{},itemStyle:{color:"#4162ff"}}]}}init(){return A(this,null,function*(){yield T(h.prototype,this,"init").call(this),e.nextTick(()=>{this.initChart(),g(c.value)})})}setHistoryData(t){if(!t)return;const{data:r}=this.props.conf;t.forEach((o,s)=>{var v;r[s].value=(v=o.data[0])!=null?v:0}),g(c.value)}setSocketData(t){if(!t)return;const{data:r}=this.props.conf;r.forEach(o=>{const s=this.extractDataValue(t,o.fv);o.value=s!=null?s:0}),g(c.value)}refreshChart(){var r;const t=this.getChartOption();(r=this.chartObj)==null||r.setOption(t,!0)}}const L=new h(n,"toggleBtn");L.setupLifecycle();const a=L.getStyle(),f=L.getEchartId(),g=C=>{const{data:t,options:r,name:o}=n.conf;c.value=C,d.indicator=[],d.series=[];let s={};s.name=o,s.value=[];const v=Math.max(0,...t.map(u=>u.value||0));l.value=v<=0?1:Math.max(v,Math.ceil(v/10)*10),t.forEach(u=>{var m,p;(p=(m=r.tags.value[c.value])==null?void 0:m.flag)!=null&&p.includes(u.fv)&&(d.indicator.push({name:u.name,max:l.value,value:u.value,color:u.color}),s.value.push(u.value))}),d.series.push(s),L.refreshChart()};return(C,t)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(a).bgColor,borderRadius:`${e.unref(a).radiusSize}px`})},[e.createElementVNode("div",{class:"toggle-wrap",style:e.normalizeStyle({borderTopLeftRadius:`${e.unref(a).radiusSize}px`,borderTopRightRadius:`${e.unref(a).radiusSize}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).tags,(r,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:e.normalizeClass(["btn-item",{active:c.value===o}]),style:e.normalizeStyle({backgroundColor:c.value===o?e.unref(a).activeBgColor:e.unref(a).tabColor,color:c.value===o?"#fff":e.unref(a).textColor,fontSize:`${e.unref(a).titleSize}px`,borderTopLeftRadius:o===0?`${e.unref(a).radiusSize}px`:"0",borderTopRightRadius:o===e.unref(a).tags.length-1?`${e.unref(a).radiusSize}px`:"0"}),onClick:s=>g(Number(o))},e.toDisplayString(r.label),15,Q))),128))],4),e.createElementVNode("div",{class:"radar-wrap",style:e.normalizeStyle({color:e.unref(a).textColor,fontSize:`${e.unref(a).textSize}px`})},[e.createElementVNode("div",{id:e.unref(f),class:"radar-chart"},null,8,W),e.createElementVNode("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.indicator,(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:"bar-item-crosswise",key:o},[e.createElementVNode("div",{class:"bar-title",title:r.name,style:e.normalizeStyle({color:e.unref(a).textColor})},e.toDisplayString(r.name),13,Y),e.createElementVNode("div",{class:"bar",style:e.normalizeStyle({backgroundColor:e.unref(a).barColor,height:`${e.unref(a).barHeight}px`})},[e.createElementVNode("div",{class:"progress",style:e.normalizeStyle({backgroundColor:r.color||e.unref(F.COLORS)[o],width:(r.value/l.value*100).toFixed(2)+"%"})},null,4)],4),e.createElementVNode("div",{class:"bar-value",style:e.normalizeStyle({color:e.unref(a).textColor})},e.toDisplayString(r.value||0),5)]))),128))])],4),e.renderSlot(C.$slots,"default",{},void 0,!0)],4))}})),se=F._export_sfc(ie,[["__scopeId","data-v-352d89b4"]]);exports.default=se;
@@ -1 +1 @@
1
- "use strict";var me=Object.defineProperty,ge=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var x=(_,v,f)=>v in _?me(_,v,{enumerable:!0,configurable:!0,writable:!0,value:f}):_[v]=f,Y=(_,v)=>{for(var f in v||(v={}))ve.call(v,f)&&x(_,f,v[f]);if(Q)for(var f of Q(v))fe.call(v,f)&&x(_,f,v[f]);return _},K=(_,v)=>ge(_,ye(v));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),B=require("./index-Cvu9nAQq.cjs"),he=require("@element-plus/icons-vue"),W=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),ke={class:"section-header"},Ce={class:"section-title"},be={class:"time-range-body"},Ve={key:0,class:"quick-range"},_e=["onClick"],De={key:1,class:"granularity-tabs"},Be=["onClick"],Ee={key:2,class:"date-inputs"},Se={class:"section-header"},Ne={class:"section-title"},Te={key:0,class:"time-list-actions"},Oe={class:"selected-count"},Pe={key:1,class:"time-list-select"},we={class:"section-header"},Le={class:"section-title"},Ye={key:0,class:"select-list"},Re={class:"section-header"},Ae={class:"section-title"},Ie={key:0,class:"direction-tabs"},Me=["onClick"],qe={class:"section-header"},ze={class:"section-title"},je={key:0,class:"range-inputs"},Ue={key:0,class:"range-unit"},Ge={class:"section-header"},Fe={class:"section-title"},He={key:0,class:"display-options"},$e={DEFAULT_ICON:W.DEFAULT_ICON,ACTIVE_ICON:W.ACTIVE_ICON,NAME_CN:"露天矿控制面板",NAME_EN:"Openpit Control Panel",ORDER:15,PLATFORM:["pc","screen"]},Qe={layout:{value:"auto",type:"select",label:"布局模式",options:[{label:"自适应",value:"auto"},{label:"竖排",value:"vertical"},{label:"横排",value:"horizontal"}]},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},hideSectionTitle:{value:!1,type:"switch",label:"隐藏分组标题"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},xe=[{type:"timeRange",label:"时间段",key:"timeRange",targetId:"",rangeAxis:"xAxis",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day",multiple:!1,options:[{label:"选项1",value:1}],minPlaceholder:"",maxPlaceholder:"",unit:""}],Ke=[{key:"type",label:"component.openpitConfigPanel.type",type:"select",options:[{label:"component.openpitConfigPanel.typeOptions.timeRange",value:"timeRange"},{label:"component.openpitConfigPanel.typeOptions.timeList",value:"timeList"},{label:"component.openpitConfigPanel.typeOptions.selectList",value:"selectList"},{label:"component.openpitConfigPanel.typeOptions.direction",value:"direction"},{label:"component.openpitConfigPanel.typeOptions.range",value:"range"},{label:"component.openpitConfigPanel.typeOptions.switch",value:"switch"}]},{key:"label",label:"component.openpitConfigPanel.label",type:"string"},{key:"key",label:"component.openpitConfigPanel.key",type:"string"},{key:"targetId",label:"component.openpitConfigPanel.targetId",type:"string"},{key:"rangeAxis",label:"component.openpitConfigPanel.rangeAxis",type:"select",options:[{label:"component.openpitConfigPanel.rangeAxisOptions.xAxis",value:"xAxis"},{label:"component.openpitConfigPanel.rangeAxisOptions.yAxis",value:"yAxis"},{label:"component.openpitConfigPanel.rangeAxisOptions.radius",value:"radius"}],dependent:"type",dependentValue:"range"},{key:"showQuickRange",label:"component.openpitConfigPanel.showQuickRange",type:"switch",dependent:"type",dependentValue:"timeRange"},{key:"defaultGranularity",label:"component.openpitConfigPanel.defaultGranularity",type:"select",options:[{label:"component.openpitConfigPanel.granularityOptionLabels.hour",value:"hour"},{label:"component.openpitConfigPanel.granularityOptionLabels.day",value:"day"}],dependent:"type",dependentValue:"timeRange"},{key:"timeList",label:"component.openpitConfigPanel.timeList",type:"string",dependent:"type",dependentValue:"timeList"},{key:"multiple",label:"component.openpitConfigPanel.multiple",type:"switch",dependent:"type",dependentValue:["selectList"]},{key:"options",label:"component.openpitConfigPanel.options",type:"table",columns:[{key:"label",label:"label",type:"string"},{key:"value",label:"value",type:"string"},{key:"remark",label:"remark",type:"string"}],dependent:"type",dependentValue:["selectList","direction","switch"]},{key:"minPlaceholder",label:"component.openpitConfigPanel.minPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"maxPlaceholder",label:"component.openpitConfigPanel.maxPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"unit",label:"component.openpitConfigPanel.unit",type:"string",dependent:"type",dependentValue:"range"}],We=[],Xe={useAlias:!1,multiObject:!1,source:""},Je={DEFAULT:$e,OPTIONS:Qe,DATA:xe,PARAMS:Ke,SOURCE:We,COMMON:Xe},Ze=e.defineComponent(K(Y({},Je),{__name:"trajectoryConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(_){e.useCssVars(t=>({v15a941b4:A.value.backgroundColor,v6c388130:A.value.borderColor,v1e47c9b2:k.value.textColor,v4ecefb48:k.value.borderColor,v444d252c:k.value.accentColor}));const v=B.useLinkStore(),f=_,N=e.ref(null);let M=0,E=null;const k=e.computed(()=>{var s,p,d,m,c,o,y,V;const{options:t}=f.conf||{},l=((s=t==null?void 0:t.linkChannel)==null?void 0:s.value)||"deepDisplacement",n=((p=t==null?void 0:t.customChannel)==null?void 0:p.value)||"",u=l==="custom"&&n?n:l,i=((d=t==null?void 0:t.layout)==null?void 0:d.value)||"auto";return{bgColor:((m=t==null?void 0:t.bgColor)==null?void 0:m.value)||"#ffffff",textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#333333",accentColor:((o=t==null?void 0:t.accentColor)==null?void 0:o.value)||"#409eff",borderColor:((y=t==null?void 0:t.borderColor)==null?void 0:y.value)||"#e5e5e5",hideSectionTitle:((V=t==null?void 0:t.hideSectionTitle)==null?void 0:V.value)===!0,layout:i,linkChannel:u}}),X=e.computed(()=>{const t=String(k.value.layout||"auto");return t==="horizontal"?"layout-horizontal":t==="vertical"?"layout-vertical":"layout-auto"}),J=e.computed(()=>{const t=f.uid;if(!t){const l=`trajectoryConfigPanel_${Date.now()}`;return console.warn("[TrajectoryConfigPanel] 缺少 uid,自动生成:",l),l}return t}),C=e.computed(()=>{var t;return((t=f.conf)==null?void 0:t.data)||[]}),a=e.ref({}),q=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],Z=(t,l)=>((l==null?void 0:l.granularity)||(t==null?void 0:t.defaultGranularity))==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",ee=(t,l)=>((l==null?void 0:l.granularity)||(t==null?void 0:t.defaultGranularity))==="hour"?"datetime":"date",P=(t,l)=>Z(l,a.value[t]),z=(t,l)=>ee(l,a.value[t]),R=(t,l,n)=>{const u=n.includes("HH"),i=u?l.endOf("day").format(n):l.format(n);let s=l.subtract(7,"day").format(n);return t==="today"?s=l.startOf("day").format(n):t==="week"?s=l.subtract(6,"day").startOf("day").format(n):t==="month"?s=l.subtract(29,"day").startOf("day").format(n):t==="quarter"?s=l.subtract(89,"day").startOf("day").format(n):t==="year"&&(s=l.subtract(364,"day").startOf("day").format(n)),{startDate:s,endDate:i}},te=t=>{var u,i;const l=C.value[t];if((l==null?void 0:l.type)==="timeRange")return((u=a.value[t])==null?void 0:u.granularity)||(l==null?void 0:l.defaultGranularity)||"day";const n=C.value.findIndex(s=>s.type==="timeRange");if(n>=0){const s=C.value[n];return((i=a.value[n])==null?void 0:i.granularity)||(s==null?void 0:s.defaultGranularity)||"day"}return"day"},le=t=>{if(!t)return null;if(/^\d+$/.test(t)){const n=Number(t),u=t.length<=10?n*1e3:n,i=new Date(u);return Number.isNaN(i.getTime())?null:i}const l=new Date(t);return Number.isNaN(l.getTime())?null:l},ae=(t,l)=>{if(t==null)return"";const n=String(t).trim();if(!n)return"";const u=typeof l=="number"?te(l):"day",i=le(n);if(!i)return u==="day"?n.slice(0,10):n;const s=i.getFullYear(),p=String(i.getMonth()+1).padStart(2,"0"),d=String(i.getDate()).padStart(2,"0");if(u==="day")return`${s}-${p}-${d}`;const m=String(i.getHours()).padStart(2,"0"),c=String(i.getMinutes()).padStart(2,"0"),o=String(i.getSeconds()).padStart(2,"0");return`${s}-${p}-${d} ${m}:${c}:${o}`},ne=(t,l)=>{if(!Array.isArray(t))return[];if(l!=="day")return t.map(i=>String(i));const n=new Set,u=[];return t.forEach(i=>{const s=String(i||"").trim();if(!s)return;let p=s.slice(0,10);if(/^\d+$/.test(s)){const d=Number(s),m=s.length<=10?d*1e3:d,c=new Date(m);if(!Number.isNaN(c.getTime())){const o=c.getFullYear(),y=String(c.getMonth()+1).padStart(2,"0"),V=String(c.getDate()).padStart(2,"0");p=`${o}-${y}-${V}`}}!p||p.length!==10||n.has(p)||(n.add(p),u.push(p))}),u},j=()=>{C.value.forEach((t,l)=>{var i,s,p,d,m,c,o,y,V,r;a.value[l]||(a.value[l]={});const n=B.dayjs(),u=((i=a.value[l])==null?void 0:i.granularity)==="hour"||t.defaultGranularity==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(t.type==="timeRange"){const g=t.quickRangeOptions||q,h=t.defaultQuickRange||((s=g==null?void 0:g[0])==null?void 0:s.value)||"week",T=t.defaultGranularity||((d=(p=t.granularityOptions)==null?void 0:p[0])==null?void 0:d.value)||"",D=R(h,n,u);a.value[l]={quickRange:h,granularity:T,startDate:D.startDate,endDate:D.endDate}}else if(t.type==="timeList"){const g=(m=N.value)!=null&&m.length?[...N.value]:(()=>{var H;const D=C.value.findIndex(L=>L.type==="timeRange");let F=[];if(D>=0&&a.value[D]){const L=B.dayjs(a.value[D].startDate),de=B.dayjs(a.value[D].endDate),$=(((H=a.value[D])==null?void 0:H.granularity)||C.value[D].defaultGranularity)==="hour"?"hour":"day";let O=de;for(;O.isAfter(L)||O.isSame(L,$);)F.push(O.format(u)),O=O.subtract(1,$)}return F})(),T=(((c=a.value[l])==null?void 0:c.selectedTimes)||[]).filter(D=>g.includes(D));a.value[l]={timeList:g,selectedTimes:T,selectAll:T.length>0&&T.length===g.length}}else if(t.type==="selectList")if(t.multiple){const g=(t.options||[]).map(h=>h.value);a.value[l]={selectedValues:g}}else a.value[l]={selectedValue:((y=(o=t.options)==null?void 0:o[0])==null?void 0:y.value)||""};else if(t.type==="direction")a.value[l]={selectedValue:((r=(V=t.options)==null?void 0:V[0])==null?void 0:r.value)||"s"};else if(t.type==="range")a.value[l]={min:"",max:""};else if(t.type==="switch"){const g={};(t.options||[]).forEach(h=>{g[h.value]=h.defaultValue!==!1}),a.value[l]=g}})},A=e.computed(()=>({backgroundColor:k.value.bgColor,color:k.value.textColor,borderColor:k.value.borderColor})),U=t=>{const l={};return C.value.forEach((n,u)=>{var p;if(!a.value[u]||n.type!=="range"&&!n.key)return;const i=String((p=n.targetId)!=null?p:"").trim();if(t!==void 0){if(i&&!i.split(",").map(m=>m.trim()).filter(m=>m).includes(t))return}else if(i)return;const s=a.value[u];if(n.type==="timeRange")l[n.key]={startDate:s.startDate,endDate:s.endDate,quickRange:s.quickRange,granularity:s.granularity};else if(n.type==="timeList")l[n.key]=s.selectedTimes||[];else if(n.type==="selectList")l[n.key]=n.multiple?s.selectedValues:s.selectedValue;else if(n.type==="direction")l[n.key]=s.selectedValue;else if(n.type==="range"){const d=String(n.rangeAxis||"xAxis"),m=n.key?String(n.key):"range",c=s.min===""?null:parseFloat(s.min),o=s.max===""||s.max==="最大值"?null:parseFloat(s.max),y={min:Number.isNaN(c)?null:c,max:Number.isNaN(o)?null:o,rangeAxis:d};l[`${m}__${d}`]=y,l[`range__${d}`]=y,d==="xAxis"&&(l.range=y)}else n.type==="switch"&&(l[n.key]=Y({},s))}),l},oe=()=>{const t=U(),l=J.value,n=C.value,u=k.value.linkChannel||"deepDisplacement",i=[];l&&i.push({objectId:l,config:t});const s=new Map;n.forEach(d=>{const m=d.targetId;if(!m)return;m.split(",").map(o=>o.trim()).filter(o=>o).forEach(o=>{s.has(o)||s.set(o,U(o));const y=s.get(o)||{};i.push({objectId:o,config:y})})});const p=++M;i.forEach((d,m)=>{setTimeout(()=>{if(p!==M)return;const c=Y({source:"trajectoryConfigPanel",type:"filter",objectId:d.objectId,filter:d.config,meta:{channel:u}},d.config);v.publish(u,"trajectoryConfigPanel",c)},m)})},w=()=>{E&&clearTimeout(E),E=setTimeout(()=>{oe(),E=null},200)},G=(t,l)=>{const n=C.value[t];if(!n||n.type!=="timeRange"||!a.value[t])return;const u=B.dayjs(),s=(a.value[t].granularity||n.defaultGranularity)==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";a.value[t].quickRange=l;const p=R(l,u,s);a.value[t].startDate=p.startDate,a.value[t].endDate=p.endDate,I(),b()},I=()=>{var d,m,c;const t=C.value.findIndex(o=>o.type==="timeRange"),l=C.value.findIndex(o=>o.type==="timeList");if(l<0)return;const n=t>=0&&a.value[t]&&(((d=a.value[t])==null?void 0:d.granularity)||((m=C.value[t])==null?void 0:m.defaultGranularity))||"day",u=(c=N.value)!=null&&c.length?[...N.value]:(()=>{if(t>=0&&a.value[t]){const o=n==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",y=B.dayjs(a.value[t].startDate),V=B.dayjs(a.value[t].endDate),r=n==="hour"?"hour":"day",g=[];let h=V;for(;h.isAfter(y)||h.isSame(y,r);)g.push(h.format(o)),h=h.subtract(1,r);return g}return[]})(),i=ne(u,n);a.value[l]||(a.value[l]={}),a.value[l].timeList=i;const p=(a.value[l].selectedTimes||[]).filter(o=>i.includes(o));a.value[l].selectedTimes=p,a.value[l].selectAll=p.length>0&&p.length===i.length},re=t=>{if(!a.value[t])return;const l=a.value[t].selectAll;a.value[t].selectedTimes=l?[...a.value[t].timeList]:[],b()},se=t=>{a.value[t]&&(a.value[t].selectedTimes=[],a.value[t].selectAll=!1,b())},ce=t=>{if(!a.value[t])return;const l=a.value[t].timeList||[],n=a.value[t].selectedTimes||[];a.value[t].selectAll=n.length===l.length,b()},ie=(t,l)=>{a.value[t]&&(a.value[t].selectedValue=l,b())},ue=(t,l)=>{if(!a.value[t])return;a.value[t].granularity=l;const n=B.dayjs(),u=l==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",i=a.value[t].quickRange||"week",s=R(i,n,u);a.value[t].startDate=s.startDate,a.value[t].endDate=s.endDate,I(),b()},b=t=>{w()};e.watch(()=>{var t;return(t=f.conf)==null?void 0:t.data},()=>{j(),setTimeout(w,300)},{deep:!0,immediate:!0}),e.watch(()=>v.channels[k.value.linkChannel],t=>{if(!t||!t.payload||!v.shouldHandle(t,"trajectoryConfigPanel"))return;const l=t.payload;(l==null?void 0:l.type)==="timeList"&&Array.isArray(l.timeList)&&(N.value=l.timeList.map(n=>String(n)),I(),w())},{deep:!0}),e.watch(()=>{var t;return(t=f.conf)==null?void 0:t.data},(t,l)=>{t&&t.forEach((n,u)=>{const i=l==null?void 0:l[u];if(n.type&&(!i||n.type!==i.type)){const s=pe(n.type);Object.keys(s).forEach(p=>{(!n[p]||n[p]===""||Array.isArray(n[p])&&n[p].length===0)&&(n[p]=s[p])})}})},{deep:!0});const pe=t=>({timeRange:{label:"时间段",key:"timeRange",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day"},timeList:{label:"时间列表",key:"timeList"},selectList:{label:"节点列表",key:"nodeList",multiple:!1,options:[{label:"选项1",value:1}]},direction:{label:"位移方向",key:"direction",options:[{label:"合",value:"s"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}]},range:{label:"数值区间",key:"range",minPlaceholder:"最小值",maxPlaceholder:"最大值",unit:"",rangeAxis:"xAxis"},switch:{label:"显示选项",key:"displayOptions",options:[{label:"开始点",value:"showStartPoint"},{label:"结束点",value:"showEndPoint"},{label:"轨迹线",value:"showTrajectory"},{label:"方向箭头",value:"showDirection"}]}})[t]||{};return e.onMounted(()=>{j();const t=C.value.findIndex(l=>l.type==="timeRange");t>=0&&G(t,"week"),setTimeout(w,300)}),e.onUnmounted(()=>{E&&(clearTimeout(E),E=null)}),(t,l)=>{const n=S.ElDatePicker,u=S.ElCheckbox,i=S.ElIcon,s=S.ElButton,p=S.ElOption,d=S.ElSelect,m=S.ElInput;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["trajectory-config-panel",X.value]),style:e.normalizeStyle(A.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(c,o)=>{var y,V;return e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["config-section time-range-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",ke,[e.createElementVNode("span",Ce,e.toDisplayString(c.label||"时间段"),1)]),e.createElementVNode("div",be,[c.showQuickRange?(e.openBlock(),e.createElementBlock("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.quickRangeOptions||q,r=>{var g;return e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["range-item",{active:((g=a.value[o])==null?void 0:g.quickRange)===r.value}]),onClick:h=>G(o,r.value)},e.toDisplayString(r.label),11,_e)}),128))])):e.createCommentVNode("",!0),(y=c.granularityOptions)!=null&&y.length?(e.openBlock(),e.createElementBlock("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.granularityOptions,r=>{var g;return e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["granularity-item",{active:((g=a.value[o])==null?void 0:g.granularity)===r.value}]),onClick:h=>ue(o,r.value)},e.toDisplayString(r.label),11,Be)}),128))])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(n,{modelValue:a.value[o].startDate,"onUpdate:modelValue":r=>a.value[o].startDate=r,type:z(o,c),placeholder:"开始时间",format:P(o,c),"value-format":P(o,c),size:"small",class:"date-picker",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(n,{modelValue:a.value[o].endDate,"onUpdate:modelValue":r=>a.value[o].endDate=r,type:z(o,c),placeholder:"结束时间",format:P(o,c),"value-format":P(o,c),size:"small",class:"date-picker",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])],2)):c.type==="timeList"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["config-section time-list-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Se,[e.createElementVNode("span",Ne,e.toDisplayString(c.label||"采集时间列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(u,{modelValue:a.value[o].selectAll,"onUpdate:modelValue":r=>a.value[o].selectAll=r,onChange:r=>re(o)},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(s,{size:"small",text:"",onClick:r=>se(o)},{default:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(e.unref(he.Delete))]),_:1}),l[1]||(l[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",Oe,[l[2]||(l[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(((V=a.value[o].selectedTimes)==null?void 0:V.length)||0),1),l[3]||(l[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(d,{modelValue:a.value[o].selectedTimes,"onUpdate:modelValue":r=>a.value[o].selectedTimes=r,multiple:"",filterable:"","collapse-tags":"","collapse-tags-tooltip":"",size:"small",class:"select-control select-control-wide",onChange:r=>ce(o)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value[o].timeList||[],r=>(e.openBlock(),e.createBlock(p,{key:r,label:ae(r,o),value:r},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])])):e.createCommentVNode("",!0)],2)):c.type==="selectList"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["config-section select-list-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",we,[e.createElementVNode("span",Le,e.toDisplayString(c.label||"节点列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ye,[c.multiple?(e.openBlock(),e.createBlock(d,{key:1,modelValue:a.value[o].selectedValues,"onUpdate:modelValue":r=>a.value[o].selectedValues=r,multiple:"",filterable:"","collapse-tags":"","collapse-tags-tooltip":"",size:"small",class:"select-control select-control-wide",onChange:r=>b()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(p,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(d,{key:0,modelValue:a.value[o].selectedValue,"onUpdate:modelValue":r=>a.value[o].selectedValue=r,filterable:"",clearable:"",size:"small",class:"select-control",onChange:r=>b()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(p,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])):e.createCommentVNode("",!0)],2)):c.type==="direction"?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["config-section direction-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Re,[e.createElementVNode("span",Ae,e.toDisplayString(c.label||"位移方向"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["direction-item",{active:a.value[o].selectedValue===r.value}]),onClick:g=>ie(o,r.value)},e.toDisplayString(r.label),11,Me))),128))])):e.createCommentVNode("",!0)],2)):c.type==="range"?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["config-section range-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",qe,[e.createElementVNode("span",ze,e.toDisplayString(c.label||"数值区间"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(m,{modelValue:a.value[o].min,"onUpdate:modelValue":r=>a.value[o].min=r,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),l[4]||(l[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(m,{modelValue:a.value[o].max,"onUpdate:modelValue":r=>a.value[o].max=r,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)):c.type==="switch"?(e.openBlock(),e.createElementBlock("div",{key:5,class:e.normalizeClass(["config-section switch-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Ge,[e.createElementVNode("span",Fe,e.toDisplayString(c.label||"显示选项"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(u,{key:r.value,modelValue:a.value[o][r.value],"onUpdate:modelValue":g=>a.value[o][r.value]=g,onChange:g=>b()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)],6)}}})),et=B._export_sfc(Ze,[["__scopeId","data-v-1bd1d47e"]]);exports.default=et;
1
+ "use strict";var me=Object.defineProperty,ge=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable;var x=(_,v,f)=>v in _?me(_,v,{enumerable:!0,configurable:!0,writable:!0,value:f}):_[v]=f,Y=(_,v)=>{for(var f in v||(v={}))ve.call(v,f)&&x(_,f,v[f]);if(Q)for(var f of Q(v))fe.call(v,f)&&x(_,f,v[f]);return _},K=(_,v)=>ge(_,ye(v));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),B=require("./index-77aUdspY.cjs"),he=require("@element-plus/icons-vue"),W=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),ke={class:"section-header"},Ce={class:"section-title"},be={class:"time-range-body"},Ve={key:0,class:"quick-range"},_e=["onClick"],De={key:1,class:"granularity-tabs"},Be=["onClick"],Ee={key:2,class:"date-inputs"},Se={class:"section-header"},Ne={class:"section-title"},Te={key:0,class:"time-list-actions"},Oe={class:"selected-count"},Pe={key:1,class:"time-list-select"},we={class:"section-header"},Le={class:"section-title"},Ye={key:0,class:"select-list"},Re={class:"section-header"},Ae={class:"section-title"},Ie={key:0,class:"direction-tabs"},Me=["onClick"],qe={class:"section-header"},ze={class:"section-title"},je={key:0,class:"range-inputs"},Ue={key:0,class:"range-unit"},Ge={class:"section-header"},Fe={class:"section-title"},He={key:0,class:"display-options"},$e={DEFAULT_ICON:W.DEFAULT_ICON,ACTIVE_ICON:W.ACTIVE_ICON,NAME_CN:"露天矿控制面板",NAME_EN:"Openpit Control Panel",ORDER:15,PLATFORM:["pc","screen"]},Qe={layout:{value:"auto",type:"select",label:"布局模式",options:[{label:"自适应",value:"auto"},{label:"竖排",value:"vertical"},{label:"横排",value:"horizontal"}]},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},hideSectionTitle:{value:!1,type:"switch",label:"隐藏分组标题"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},xe=[{type:"timeRange",label:"时间段",key:"timeRange",targetId:"",rangeAxis:"xAxis",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day",multiple:!1,options:[{label:"选项1",value:1}],minPlaceholder:"",maxPlaceholder:"",unit:""}],Ke=[{key:"type",label:"component.openpitConfigPanel.type",type:"select",options:[{label:"component.openpitConfigPanel.typeOptions.timeRange",value:"timeRange"},{label:"component.openpitConfigPanel.typeOptions.timeList",value:"timeList"},{label:"component.openpitConfigPanel.typeOptions.selectList",value:"selectList"},{label:"component.openpitConfigPanel.typeOptions.direction",value:"direction"},{label:"component.openpitConfigPanel.typeOptions.range",value:"range"},{label:"component.openpitConfigPanel.typeOptions.switch",value:"switch"}]},{key:"label",label:"component.openpitConfigPanel.label",type:"string"},{key:"key",label:"component.openpitConfigPanel.key",type:"string"},{key:"targetId",label:"component.openpitConfigPanel.targetId",type:"string"},{key:"rangeAxis",label:"component.openpitConfigPanel.rangeAxis",type:"select",options:[{label:"component.openpitConfigPanel.rangeAxisOptions.xAxis",value:"xAxis"},{label:"component.openpitConfigPanel.rangeAxisOptions.yAxis",value:"yAxis"},{label:"component.openpitConfigPanel.rangeAxisOptions.radius",value:"radius"}],dependent:"type",dependentValue:"range"},{key:"showQuickRange",label:"component.openpitConfigPanel.showQuickRange",type:"switch",dependent:"type",dependentValue:"timeRange"},{key:"defaultGranularity",label:"component.openpitConfigPanel.defaultGranularity",type:"select",options:[{label:"component.openpitConfigPanel.granularityOptionLabels.hour",value:"hour"},{label:"component.openpitConfigPanel.granularityOptionLabels.day",value:"day"}],dependent:"type",dependentValue:"timeRange"},{key:"timeList",label:"component.openpitConfigPanel.timeList",type:"string",dependent:"type",dependentValue:"timeList"},{key:"multiple",label:"component.openpitConfigPanel.multiple",type:"switch",dependent:"type",dependentValue:["selectList"]},{key:"options",label:"component.openpitConfigPanel.options",type:"table",columns:[{key:"label",label:"label",type:"string"},{key:"value",label:"value",type:"string"},{key:"remark",label:"remark",type:"string"}],dependent:"type",dependentValue:["selectList","direction","switch"]},{key:"minPlaceholder",label:"component.openpitConfigPanel.minPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"maxPlaceholder",label:"component.openpitConfigPanel.maxPlaceholder",type:"string",dependent:"type",dependentValue:"range"},{key:"unit",label:"component.openpitConfigPanel.unit",type:"string",dependent:"type",dependentValue:"range"}],We=[],Xe={useAlias:!1,multiObject:!1,source:""},Je={DEFAULT:$e,OPTIONS:Qe,DATA:xe,PARAMS:Ke,SOURCE:We,COMMON:Xe},Ze=e.defineComponent(K(Y({},Je),{__name:"trajectoryConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(_){e.useCssVars(t=>({v15a941b4:A.value.backgroundColor,v6c388130:A.value.borderColor,v1e47c9b2:k.value.textColor,v4ecefb48:k.value.borderColor,v444d252c:k.value.accentColor}));const v=B.useLinkStore(),f=_,N=e.ref(null);let M=0,E=null;const k=e.computed(()=>{var s,p,d,m,c,o,y,V;const{options:t}=f.conf||{},l=((s=t==null?void 0:t.linkChannel)==null?void 0:s.value)||"deepDisplacement",n=((p=t==null?void 0:t.customChannel)==null?void 0:p.value)||"",u=l==="custom"&&n?n:l,i=((d=t==null?void 0:t.layout)==null?void 0:d.value)||"auto";return{bgColor:((m=t==null?void 0:t.bgColor)==null?void 0:m.value)||"#ffffff",textColor:((c=t==null?void 0:t.textColor)==null?void 0:c.value)||"#333333",accentColor:((o=t==null?void 0:t.accentColor)==null?void 0:o.value)||"#409eff",borderColor:((y=t==null?void 0:t.borderColor)==null?void 0:y.value)||"#e5e5e5",hideSectionTitle:((V=t==null?void 0:t.hideSectionTitle)==null?void 0:V.value)===!0,layout:i,linkChannel:u}}),X=e.computed(()=>{const t=String(k.value.layout||"auto");return t==="horizontal"?"layout-horizontal":t==="vertical"?"layout-vertical":"layout-auto"}),J=e.computed(()=>{const t=f.uid;if(!t){const l=`trajectoryConfigPanel_${Date.now()}`;return console.warn("[TrajectoryConfigPanel] 缺少 uid,自动生成:",l),l}return t}),C=e.computed(()=>{var t;return((t=f.conf)==null?void 0:t.data)||[]}),a=e.ref({}),q=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],Z=(t,l)=>((l==null?void 0:l.granularity)||(t==null?void 0:t.defaultGranularity))==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",ee=(t,l)=>((l==null?void 0:l.granularity)||(t==null?void 0:t.defaultGranularity))==="hour"?"datetime":"date",P=(t,l)=>Z(l,a.value[t]),z=(t,l)=>ee(l,a.value[t]),R=(t,l,n)=>{const u=n.includes("HH"),i=u?l.endOf("day").format(n):l.format(n);let s=l.subtract(7,"day").format(n);return t==="today"?s=l.startOf("day").format(n):t==="week"?s=l.subtract(6,"day").startOf("day").format(n):t==="month"?s=l.subtract(29,"day").startOf("day").format(n):t==="quarter"?s=l.subtract(89,"day").startOf("day").format(n):t==="year"&&(s=l.subtract(364,"day").startOf("day").format(n)),{startDate:s,endDate:i}},te=t=>{var u,i;const l=C.value[t];if((l==null?void 0:l.type)==="timeRange")return((u=a.value[t])==null?void 0:u.granularity)||(l==null?void 0:l.defaultGranularity)||"day";const n=C.value.findIndex(s=>s.type==="timeRange");if(n>=0){const s=C.value[n];return((i=a.value[n])==null?void 0:i.granularity)||(s==null?void 0:s.defaultGranularity)||"day"}return"day"},le=t=>{if(!t)return null;if(/^\d+$/.test(t)){const n=Number(t),u=t.length<=10?n*1e3:n,i=new Date(u);return Number.isNaN(i.getTime())?null:i}const l=new Date(t);return Number.isNaN(l.getTime())?null:l},ae=(t,l)=>{if(t==null)return"";const n=String(t).trim();if(!n)return"";const u=typeof l=="number"?te(l):"day",i=le(n);if(!i)return u==="day"?n.slice(0,10):n;const s=i.getFullYear(),p=String(i.getMonth()+1).padStart(2,"0"),d=String(i.getDate()).padStart(2,"0");if(u==="day")return`${s}-${p}-${d}`;const m=String(i.getHours()).padStart(2,"0"),c=String(i.getMinutes()).padStart(2,"0"),o=String(i.getSeconds()).padStart(2,"0");return`${s}-${p}-${d} ${m}:${c}:${o}`},ne=(t,l)=>{if(!Array.isArray(t))return[];if(l!=="day")return t.map(i=>String(i));const n=new Set,u=[];return t.forEach(i=>{const s=String(i||"").trim();if(!s)return;let p=s.slice(0,10);if(/^\d+$/.test(s)){const d=Number(s),m=s.length<=10?d*1e3:d,c=new Date(m);if(!Number.isNaN(c.getTime())){const o=c.getFullYear(),y=String(c.getMonth()+1).padStart(2,"0"),V=String(c.getDate()).padStart(2,"0");p=`${o}-${y}-${V}`}}!p||p.length!==10||n.has(p)||(n.add(p),u.push(p))}),u},j=()=>{C.value.forEach((t,l)=>{var i,s,p,d,m,c,o,y,V,r;a.value[l]||(a.value[l]={});const n=B.dayjs(),u=((i=a.value[l])==null?void 0:i.granularity)==="hour"||t.defaultGranularity==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(t.type==="timeRange"){const g=t.quickRangeOptions||q,h=t.defaultQuickRange||((s=g==null?void 0:g[0])==null?void 0:s.value)||"week",T=t.defaultGranularity||((d=(p=t.granularityOptions)==null?void 0:p[0])==null?void 0:d.value)||"",D=R(h,n,u);a.value[l]={quickRange:h,granularity:T,startDate:D.startDate,endDate:D.endDate}}else if(t.type==="timeList"){const g=(m=N.value)!=null&&m.length?[...N.value]:(()=>{var H;const D=C.value.findIndex(L=>L.type==="timeRange");let F=[];if(D>=0&&a.value[D]){const L=B.dayjs(a.value[D].startDate),de=B.dayjs(a.value[D].endDate),$=(((H=a.value[D])==null?void 0:H.granularity)||C.value[D].defaultGranularity)==="hour"?"hour":"day";let O=de;for(;O.isAfter(L)||O.isSame(L,$);)F.push(O.format(u)),O=O.subtract(1,$)}return F})(),T=(((c=a.value[l])==null?void 0:c.selectedTimes)||[]).filter(D=>g.includes(D));a.value[l]={timeList:g,selectedTimes:T,selectAll:T.length>0&&T.length===g.length}}else if(t.type==="selectList")if(t.multiple){const g=(t.options||[]).map(h=>h.value);a.value[l]={selectedValues:g}}else a.value[l]={selectedValue:((y=(o=t.options)==null?void 0:o[0])==null?void 0:y.value)||""};else if(t.type==="direction")a.value[l]={selectedValue:((r=(V=t.options)==null?void 0:V[0])==null?void 0:r.value)||"s"};else if(t.type==="range")a.value[l]={min:"",max:""};else if(t.type==="switch"){const g={};(t.options||[]).forEach(h=>{g[h.value]=h.defaultValue!==!1}),a.value[l]=g}})},A=e.computed(()=>({backgroundColor:k.value.bgColor,color:k.value.textColor,borderColor:k.value.borderColor})),U=t=>{const l={};return C.value.forEach((n,u)=>{var p;if(!a.value[u]||n.type!=="range"&&!n.key)return;const i=String((p=n.targetId)!=null?p:"").trim();if(t!==void 0){if(i&&!i.split(",").map(m=>m.trim()).filter(m=>m).includes(t))return}else if(i)return;const s=a.value[u];if(n.type==="timeRange")l[n.key]={startDate:s.startDate,endDate:s.endDate,quickRange:s.quickRange,granularity:s.granularity};else if(n.type==="timeList")l[n.key]=s.selectedTimes||[];else if(n.type==="selectList")l[n.key]=n.multiple?s.selectedValues:s.selectedValue;else if(n.type==="direction")l[n.key]=s.selectedValue;else if(n.type==="range"){const d=String(n.rangeAxis||"xAxis"),m=n.key?String(n.key):"range",c=s.min===""?null:parseFloat(s.min),o=s.max===""||s.max==="最大值"?null:parseFloat(s.max),y={min:Number.isNaN(c)?null:c,max:Number.isNaN(o)?null:o,rangeAxis:d};l[`${m}__${d}`]=y,l[`range__${d}`]=y,d==="xAxis"&&(l.range=y)}else n.type==="switch"&&(l[n.key]=Y({},s))}),l},oe=()=>{const t=U(),l=J.value,n=C.value,u=k.value.linkChannel||"deepDisplacement",i=[];l&&i.push({objectId:l,config:t});const s=new Map;n.forEach(d=>{const m=d.targetId;if(!m)return;m.split(",").map(o=>o.trim()).filter(o=>o).forEach(o=>{s.has(o)||s.set(o,U(o));const y=s.get(o)||{};i.push({objectId:o,config:y})})});const p=++M;i.forEach((d,m)=>{setTimeout(()=>{if(p!==M)return;const c=Y({source:"trajectoryConfigPanel",type:"filter",objectId:d.objectId,filter:d.config,meta:{channel:u}},d.config);v.publish(u,"trajectoryConfigPanel",c)},m)})},w=()=>{E&&clearTimeout(E),E=setTimeout(()=>{oe(),E=null},200)},G=(t,l)=>{const n=C.value[t];if(!n||n.type!=="timeRange"||!a.value[t])return;const u=B.dayjs(),s=(a.value[t].granularity||n.defaultGranularity)==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";a.value[t].quickRange=l;const p=R(l,u,s);a.value[t].startDate=p.startDate,a.value[t].endDate=p.endDate,I(),b()},I=()=>{var d,m,c;const t=C.value.findIndex(o=>o.type==="timeRange"),l=C.value.findIndex(o=>o.type==="timeList");if(l<0)return;const n=t>=0&&a.value[t]&&(((d=a.value[t])==null?void 0:d.granularity)||((m=C.value[t])==null?void 0:m.defaultGranularity))||"day",u=(c=N.value)!=null&&c.length?[...N.value]:(()=>{if(t>=0&&a.value[t]){const o=n==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",y=B.dayjs(a.value[t].startDate),V=B.dayjs(a.value[t].endDate),r=n==="hour"?"hour":"day",g=[];let h=V;for(;h.isAfter(y)||h.isSame(y,r);)g.push(h.format(o)),h=h.subtract(1,r);return g}return[]})(),i=ne(u,n);a.value[l]||(a.value[l]={}),a.value[l].timeList=i;const p=(a.value[l].selectedTimes||[]).filter(o=>i.includes(o));a.value[l].selectedTimes=p,a.value[l].selectAll=p.length>0&&p.length===i.length},re=t=>{if(!a.value[t])return;const l=a.value[t].selectAll;a.value[t].selectedTimes=l?[...a.value[t].timeList]:[],b()},se=t=>{a.value[t]&&(a.value[t].selectedTimes=[],a.value[t].selectAll=!1,b())},ce=t=>{if(!a.value[t])return;const l=a.value[t].timeList||[],n=a.value[t].selectedTimes||[];a.value[t].selectAll=n.length===l.length,b()},ie=(t,l)=>{a.value[t]&&(a.value[t].selectedValue=l,b())},ue=(t,l)=>{if(!a.value[t])return;a.value[t].granularity=l;const n=B.dayjs(),u=l==="hour"?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD",i=a.value[t].quickRange||"week",s=R(i,n,u);a.value[t].startDate=s.startDate,a.value[t].endDate=s.endDate,I(),b()},b=t=>{w()};e.watch(()=>{var t;return(t=f.conf)==null?void 0:t.data},()=>{j(),setTimeout(w,300)},{deep:!0,immediate:!0}),e.watch(()=>v.channels[k.value.linkChannel],t=>{if(!t||!t.payload||!v.shouldHandle(t,"trajectoryConfigPanel"))return;const l=t.payload;(l==null?void 0:l.type)==="timeList"&&Array.isArray(l.timeList)&&(N.value=l.timeList.map(n=>String(n)),I(),w())},{deep:!0}),e.watch(()=>{var t;return(t=f.conf)==null?void 0:t.data},(t,l)=>{t&&t.forEach((n,u)=>{const i=l==null?void 0:l[u];if(n.type&&(!i||n.type!==i.type)){const s=pe(n.type);Object.keys(s).forEach(p=>{(!n[p]||n[p]===""||Array.isArray(n[p])&&n[p].length===0)&&(n[p]=s[p])})}})},{deep:!0});const pe=t=>({timeRange:{label:"时间段",key:"timeRange",showQuickRange:!0,dateType:"date",dateFormat:"YYYY-MM-DD",quickRangeOptions:[{label:"今天",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],defaultQuickRange:"week",granularityOptions:[{label:"小时",value:"hour"},{label:"日均",value:"day"}],defaultGranularity:"day"},timeList:{label:"时间列表",key:"timeList"},selectList:{label:"节点列表",key:"nodeList",multiple:!1,options:[{label:"选项1",value:1}]},direction:{label:"位移方向",key:"direction",options:[{label:"合",value:"s"},{label:"X轴",value:"x"},{label:"Y轴",value:"y"}]},range:{label:"数值区间",key:"range",minPlaceholder:"最小值",maxPlaceholder:"最大值",unit:"",rangeAxis:"xAxis"},switch:{label:"显示选项",key:"displayOptions",options:[{label:"开始点",value:"showStartPoint"},{label:"结束点",value:"showEndPoint"},{label:"轨迹线",value:"showTrajectory"},{label:"方向箭头",value:"showDirection"}]}})[t]||{};return e.onMounted(()=>{j();const t=C.value.findIndex(l=>l.type==="timeRange");t>=0&&G(t,"week"),setTimeout(w,300)}),e.onUnmounted(()=>{E&&(clearTimeout(E),E=null)}),(t,l)=>{const n=S.ElDatePicker,u=S.ElCheckbox,i=S.ElIcon,s=S.ElButton,p=S.ElOption,d=S.ElSelect,m=S.ElInput;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["trajectory-config-panel",X.value]),style:e.normalizeStyle(A.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(c,o)=>{var y,V;return e.openBlock(),e.createElementBlock(e.Fragment,{key:o},[c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["config-section time-range-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",ke,[e.createElementVNode("span",Ce,e.toDisplayString(c.label||"时间段"),1)]),e.createElementVNode("div",be,[c.showQuickRange?(e.openBlock(),e.createElementBlock("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.quickRangeOptions||q,r=>{var g;return e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["range-item",{active:((g=a.value[o])==null?void 0:g.quickRange)===r.value}]),onClick:h=>G(o,r.value)},e.toDisplayString(r.label),11,_e)}),128))])):e.createCommentVNode("",!0),(y=c.granularityOptions)!=null&&y.length?(e.openBlock(),e.createElementBlock("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.granularityOptions,r=>{var g;return e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["granularity-item",{active:((g=a.value[o])==null?void 0:g.granularity)===r.value}]),onClick:h=>ue(o,r.value)},e.toDisplayString(r.label),11,Be)}),128))])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ee,[e.createVNode(n,{modelValue:a.value[o].startDate,"onUpdate:modelValue":r=>a.value[o].startDate=r,type:z(o,c),placeholder:"开始时间",format:P(o,c),"value-format":P(o,c),size:"small",class:"date-picker",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(n,{modelValue:a.value[o].endDate,"onUpdate:modelValue":r=>a.value[o].endDate=r,type:z(o,c),placeholder:"结束时间",format:P(o,c),"value-format":P(o,c),size:"small",class:"date-picker",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])],2)):c.type==="timeList"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["config-section time-list-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Se,[e.createElementVNode("span",Ne,e.toDisplayString(c.label||"采集时间列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(u,{modelValue:a.value[o].selectAll,"onUpdate:modelValue":r=>a.value[o].selectAll=r,onChange:r=>re(o)},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(s,{size:"small",text:"",onClick:r=>se(o)},{default:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(e.unref(he.Delete))]),_:1}),l[1]||(l[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",Oe,[l[2]||(l[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(((V=a.value[o].selectedTimes)==null?void 0:V.length)||0),1),l[3]||(l[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),a.value[o]?(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(d,{modelValue:a.value[o].selectedTimes,"onUpdate:modelValue":r=>a.value[o].selectedTimes=r,multiple:"",filterable:"","collapse-tags":"","collapse-tags-tooltip":"",size:"small",class:"select-control select-control-wide",onChange:r=>ce(o)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value[o].timeList||[],r=>(e.openBlock(),e.createBlock(p,{key:r,label:ae(r,o),value:r},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])])):e.createCommentVNode("",!0)],2)):c.type==="selectList"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["config-section select-list-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",we,[e.createElementVNode("span",Le,e.toDisplayString(c.label||"节点列表"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ye,[c.multiple?(e.openBlock(),e.createBlock(d,{key:1,modelValue:a.value[o].selectedValues,"onUpdate:modelValue":r=>a.value[o].selectedValues=r,multiple:"",filterable:"","collapse-tags":"","collapse-tags-tooltip":"",size:"small",class:"select-control select-control-wide",onChange:r=>b()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(p,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(d,{key:0,modelValue:a.value[o].selectedValue,"onUpdate:modelValue":r=>a.value[o].selectedValue=r,filterable:"",clearable:"",size:"small",class:"select-control",onChange:r=>b()},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(p,{key:r.value,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])):e.createCommentVNode("",!0)],2)):c.type==="direction"?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["config-section direction-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Re,[e.createElementVNode("span",Ae,e.toDisplayString(c.label||"位移方向"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createElementBlock("span",{key:r.value,class:e.normalizeClass(["direction-item",{active:a.value[o].selectedValue===r.value}]),onClick:g=>ie(o,r.value)},e.toDisplayString(r.label),11,Me))),128))])):e.createCommentVNode("",!0)],2)):c.type==="range"?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["config-section range-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",qe,[e.createElementVNode("span",ze,e.toDisplayString(c.label||"数值区间"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",je,[e.createVNode(m,{modelValue:a.value[o].min,"onUpdate:modelValue":r=>a.value[o].min=r,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),l[4]||(l[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(m,{modelValue:a.value[o].max,"onUpdate:modelValue":r=>a.value[o].max=r,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:r=>b()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",Ue,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)):c.type==="switch"?(e.openBlock(),e.createElementBlock("div",{key:5,class:e.normalizeClass(["config-section switch-section",{"hide-section-title":k.value.hideSectionTitle}])},[e.createElementVNode("div",Ge,[e.createElementVNode("span",Fe,e.toDisplayString(c.label||"显示选项"),1)]),a.value[o]?(e.openBlock(),e.createElementBlock("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options||[],r=>(e.openBlock(),e.createBlock(u,{key:r.value,modelValue:a.value[o][r.value],"onUpdate:modelValue":g=>a.value[o][r.value]=g,onChange:g=>b()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(t.$slots,"default",{},void 0,!0)],6)}}})),et=B._export_sfc(Ze,[["__scopeId","data-v-1bd1d47e"]]);exports.default=et;
@@ -20,7 +20,7 @@ import "element-plus/es/components/icon/style/css";
20
20
  import "element-plus/es/components/checkbox/style/css";
21
21
  import "element-plus/es/components/date-picker/style/css";
22
22
  import { defineComponent as Ne, useCssVars as Ee, ref as ie, computed as j, watch as W, onMounted as Ue, onUnmounted as je, openBlock as p, createElementBlock as g, normalizeStyle as Ge, normalizeClass as Y, Fragment as R, renderList as w, createElementVNode as k, toDisplayString as S, createCommentVNode as P, createVNode as A, withCtx as M, createTextVNode as G, unref as qe, createBlock as $, renderSlot as ze } from "vue";
23
- import { l as He, d as I, _ as Qe } from "./index-DomNEEyv.js";
23
+ import { l as He, d as I, _ as Qe } from "./index-BZpYmpDy.js";
24
24
  import { Delete as Be } from "@element-plus/icons-vue";
25
25
  import { A as Fe, D as Ke } from "./ele-ctrSet-icon-BtKGrCid.js";
26
26
  const We = { class: "section-header" }, Xe = { class: "section-title" }, Je = { class: "time-range-body" }, Ze = {
@@ -11,9 +11,9 @@ var rt = (f, c, x) => c in f ? At(f, c, { enumerable: !0, configurable: !0, writ
11
11
  return f;
12
12
  }, ut = (f, c) => Tt(f, Pt(c));
13
13
  import { defineComponent as wt, computed as K, ref as $, watch as mt, watchEffect as Dt, onMounted as Et, onBeforeUnmount as zt, openBlock as Z, createElementBlock as G, normalizeStyle as q, unref as R, toDisplayString as ht, createCommentVNode as Kt, createElementVNode as L, normalizeClass as yt, Fragment as $t, renderList as Rt, renderSlot as jt, nextTick as gt } from "vue";
14
- import { l as Ht, N as vt, C as Yt, L as Xt, _ as Bt } from "./index-DomNEEyv.js";
14
+ import { l as Ht, O as vt, C as Yt, N as Xt, _ as Bt } from "./index-BZpYmpDy.js";
15
15
  import "element-plus";
16
- import { E as Ut } from "./EChartComponentBase-DPWPg81w.js";
16
+ import { E as Ut } from "./EChartComponentBase-i76OGL3z.js";
17
17
  import { g as Zt } from "./titleStyle-BT5GlpAb.js";
18
18
  import { A as Gt, D as Wt } from "./ele-circleBar-icon-DNBUxt0A.js";
19
19
  import { u as qt, i as Jt, a as Qt } from "./installCanvasRenderer-oDYkyVFy.js";
@@ -1 +1 @@
1
- "use strict";var Nt=Object.defineProperty,Ct=Object.defineProperties;var bt=Object.getOwnPropertyDescriptors;var it=Object.getOwnPropertySymbols;var Ot=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;var lt=(x,u,d)=>u in x?Nt(x,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):x[u]=d,at=(x,u)=>{for(var d in u||(u={}))Ot.call(u,d)&&lt(x,d,u[d]);if(it)for(var d of it(u))kt.call(u,d)&&lt(x,d,u[d]);return x},st=(x,u)=>Ct(x,bt(u));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),L=require("./index-Cvu9nAQq.cjs");require("element-plus");const _t=require("./EChartComponentBase-BPiPzdtw.cjs"),It=require("./titleStyle-NSnz6cUg.cjs"),ot=require("./ele-circleBar-icon-Da0-L9sa.cjs"),X=require("./installCanvasRenderer-CyhM1Qpl.cjs"),Vt=require("./install-C8buXQPI.cjs"),Tt=require("./install-ByPD0oOh.cjs"),At=require("./install-CYwVETsi.cjs"),Et={class:"mix-body"},Pt={class:"chart-wrap"},Ft=["id"],zt={class:"timeline-left"},Lt={class:"timeline-track",ref:"trackRef"},wt=["onClick"],Dt={DEFAULT_ICON:ot.DEFAULT_ICON,ACTIVE_ICON:ot.ACTIVE_ICON,NAME_CN:"动态轨迹分布图",NAME_EN:"TrajectoryScatter",ORDER:1,PLATFORM:["pc","screen"]},Kt={titleColor:"#111",textColor:"#111",bgColor:"#fff",radiusSize:8,textSize:12,isHideTitle:!1,top:30,bottom:50,left:50,right:30,xName:{value:"x",type:"string",label:"setting.trajectoryScatter_xName"},yName:{value:"y",type:"string",label:"setting.trajectoryScatter_yName"},showTrail:{value:!0,type:"switch",label:"setting.trajectoryScatter_showTrail"},trailLength:{value:30,type:"number",label:"setting.trajectoryScatter_trailLength",dependent:"showTrail"},points:{value:12,type:"number",label:"setting.trajectoryScatter_points"},autoPlay:{value:!0,type:"switch",label:"setting.trajectoryScatter_autoPlay"},interval:{value:1e3,type:"number",label:"setting.trajectoryScatter_interval",dependent:"autoPlay"},timelineHeight:{value:36,type:"number",label:"setting.trajectoryScatter_timelineHeight"},dotSize:{value:10,type:"number",label:"setting.trajectoryScatter_dotSize"},activeDotColor:{value:"#4162ff",type:"color",label:"setting.trajectoryScatter_activeDotColor"},dotColor:{value:"#c7c7c7",type:"color",label:"setting.trajectoryScatter_dotColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}},listenXKey:{value:"elevation",type:"string",label:"setting.trajectoryScatter_listenXKey"},listenYKey:{value:"speed",type:"string",label:"setting.trajectoryScatter_listenYKey"},listenTimeKey:{value:"",type:"string",label:"setting.trajectoryScatter_listenTimeKey"},useMock:{value:!0,type:"switch",label:"setting.trajectoryScatter_useMock"},mockCount:{value:12,type:"number",label:"setting.trajectoryScatter_mockCount",dependent:"useMock"},xMin:{value:"",type:"string",label:"setting.trajectoryScatter_xMin"},xMax:{value:"",type:"string",label:"setting.trajectoryScatter_xMax"},yMin:{value:"",type:"string",label:"setting.trajectoryScatter_yMin"},yMax:{value:"",type:"string",label:"setting.trajectoryScatter_yMax"},lockAxis:{value:!0,type:"switch",label:"setting.trajectoryScatter_lockAxis"}},rt=[{name:"轨迹点",fv_x:"elevation",fv_y:"speed",color:"#ff5a5f",object_id:""}],Rt=["name","fv_x","fv_y","object_id","color"],$t=["mosaic","statistics","calculate"],jt={useAlias:!1,multiObject:!0,source:"mosaic"},Bt={DEFAULT:Dt,OPTIONS:Kt,DATA:rt,PARAMS:Rt,SOURCE:$t,COMMON:jt},Ht=o.defineComponent(st(at({},Bt),{__name:"trajectoryScatter",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(x){X.use([Vt.install,X.install,X.install$1,Tt.install,At.install]);const u=x,d=L.useLinkStore();let R=null;class ct extends _t.EChartComponentBase{extractStyles(){const e=this.getOptionValue("linkChannel","deepDisplacement"),n=this.getOptionValue("customChannel",""),i=e==="custom"&&n?n:e;return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),top:this.getOptionValue("top",30),bottom:this.getOptionValue("bottom",50),left:this.getOptionValue("left",50),right:this.getOptionValue("right",30),xName:this.getOptionValue("xName","x"),yName:this.getOptionValue("yName","y"),showTrail:this.getOptionValue("showTrail",!0),trailLength:this.getOptionValue("trailLength",30),points:this.getOptionValue("points",12),autoPlay:this.getOptionValue("autoPlay",!0),interval:this.getOptionValue("interval",1e3),timelineHeight:this.getOptionValue("timelineHeight",36),dotSize:this.getOptionValue("dotSize",10),activeDotColor:this.getOptionValue("activeDotColor","#4162ff"),dotColor:this.getOptionValue("dotColor","#c7c7c7"),linkChannel:i,listenXKey:this.getOptionValue("listenXKey","elevation"),listenYKey:this.getOptionValue("listenYKey","speed"),listenTimeKey:this.getOptionValue("listenTimeKey",""),useMock:this.getOptionValue("useMock",!0),mockCount:this.getOptionValue("mockCount",12),lockAxis:this.getOptionValue("lockAxis",!0),xMin:this.getOptionValue("xMin",""),xMax:this.getOptionValue("xMax",""),yMin:this.getOptionValue("yMin",""),yMax:this.getOptionValue("yMax","")}}init(){var e;this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=rt),o.nextTick(()=>this.initChart())}getChartOption(){var l,r,m,c,v,S;const{options:e}=this.props.conf,n=((l=e==null?void 0:e.xName)==null?void 0:l.value)||this.Style.value.xName,i=((r=e==null?void 0:e.yName)==null?void 0:r.value)||this.Style.value.yName,a=ft.value,s=(a==null?void 0:a.color)||L.COLORS[0];return{grid:{top:this.Style.value.top,bottom:this.Style.value.bottom,left:this.Style.value.left,right:this.Style.value.right,containLabel:!0},tooltip:{trigger:"item"},xAxis:{type:"value",name:n,min:(m=M.value)==null?void 0:m.xMin,max:(c=M.value)==null?void 0:c.xMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},yAxis:{type:"value",name:i,min:(v=M.value)==null?void 0:v.yMin,max:(S=M.value)==null?void 0:S.yMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},series:[{name:"points",type:"scatter",data:ht.value,symbolSize:8,itemStyle:{color:s,opacity:.45}},{name:"current",type:"scatter",data:a?[[a.x,a.y]]:[],symbolSize:12,itemStyle:{color:s}},{name:"trail",type:"line",showSymbol:!1,smooth:!1,data:this.Style.value.showTrail?xt.value:[],lineStyle:{color:s,width:2,opacity:.6},silent:!0}]}}setHistoryData(e){et(e)}setSocketData(e){e&&et(e)}onLinkEvent(e){tt(e)}}const f=new ct(u,"trajectoryScatter"),ut=f.getEchartId();f.setupLifecycle();const p=f.getStyle(),mt=o.computed(()=>It.generateTitleStyle(u.conf.options)),A=o.ref([]),$=t=>typeof t=="number"&&Number.isFinite(t),ht=o.computed(()=>{var e,n;return(((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[]).map(i=>[Number(i==null?void 0:i.x),Number(i==null?void 0:i.y)]).filter(i=>$(i==null?void 0:i[0])&&$(i==null?void 0:i[1]))}),yt=o.computed(()=>{var n;const t=((n=u.conf)==null?void 0:n.runtime)||{},e=t.allPoints||t.points||[];return Array.isArray(e)?e:[]}),M=o.ref(null),U=o.ref(null),j=t=>{if(t===""||t===null||t===void 0)return null;const e=Number(t);return isNaN(e)?null:e},Z=(t,e,n)=>{var a,s,l,r,m,c;return n&&t&&t[n]!==void 0?t[n]:n&&e&&e[n]!==void 0?e[n]:(c=(m=(r=(l=(s=(a=t==null?void 0:t.time)!=null?a:t==null?void 0:t.timestamp)!=null?s:t==null?void 0:t.datetime)!=null?l:e==null?void 0:e.time)!=null?r:e==null?void 0:e.timestamp)!=null?m:e==null?void 0:e.datetime)!=null?c:e==null?void 0:e.datatime},gt=t=>{if(t==null)return"";const e=Number(t);if(Number.isFinite(e)&&String(t).length>=12)try{const i=new Date(e),a=i.getFullYear(),s=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),r=String(i.getHours()).padStart(2,"0"),m=String(i.getMinutes()).padStart(2,"0"),c=String(i.getSeconds()).padStart(2,"0");return`${a}-${s}-${l} ${r}:${m}:${c}`}catch(i){return String(t)}const n=String(t);if(n.includes(" ")||n.includes("T")){const i=n.replace("T"," "),[a,s]=i.split(" ");if(s){const[l,r,m]=s.split(":");if(l!==void 0&&r!==void 0&&m!==void 0)return`${a} ${l}:${r}:${m.slice(0,2)}`}}return n},vt=t=>{if(!(t!=null&&t.length))return null;let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(t.forEach(r=>{const m=Number(r==null?void 0:r.x),c=Number(r==null?void 0:r.y);isNaN(m)||(e=Math.min(e,m),n=Math.max(n,m)),isNaN(c)||(i=Math.min(i,c),a=Math.max(a,c))}),!isFinite(e)||!isFinite(n)||!isFinite(i)||!isFinite(a))return null;const s=(n-e)*.1||1,l=(a-i)*.1||1;return{xMin:e-s,xMax:n+s,yMin:i-l,yMax:a+l}},B=()=>{var m,c,v,S,F,N,C,b,O,k,_,I,V,T,g,h,y;const t=((m=u.conf)==null?void 0:m.options)||{};if(!((v=(c=t==null?void 0:t.lockAxis)==null?void 0:c.value)!=null?v:f.getStyle().value.lockAxis)){M.value=null;return}const n=j((F=(S=t==null?void 0:t.xMin)==null?void 0:S.value)!=null?F:f.getStyle().value.xMin),i=j((C=(N=t==null?void 0:t.xMax)==null?void 0:N.value)!=null?C:f.getStyle().value.xMax),a=j((O=(b=t==null?void 0:t.yMin)==null?void 0:b.value)!=null?O:f.getStyle().value.yMin),s=j((_=(k=t==null?void 0:t.yMax)==null?void 0:k.value)!=null?_:f.getStyle().value.yMax);if(n!==null||i!==null||a!==null||s!==null){M.value={xMin:n!==null?Math.min(n,0):void 0,xMax:i!==null?Math.max(i,0):void 0,yMin:a!==null?Math.min(a,0):void 0,yMax:s!==null?Math.max(s,0):void 0};return}if(M.value)return;const l=((V=(I=u.conf)==null?void 0:I.runtime)==null?void 0:V.points)||[],r=vt(l);if(!r){M.value={xMin:0,xMax:10,yMin:0,yMax:10};return}M.value={xMin:Math.min((T=r.xMin)!=null?T:0,0),xMax:Math.max((g=r.xMax)!=null?g:0,0),yMin:Math.min((h=r.yMin)!=null?h:0,0),yMax:Math.max((y=r.yMax)!=null?y:0,0)}},E=o.ref(0),z=o.ref(!1),ft=o.computed(()=>{var e,n;const t=((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[];return t[t.length-1]||null}),xt=o.computed(()=>{var i,a,s,l,r,m;const t=((a=(i=u.conf)==null?void 0:i.runtime)==null?void 0:a.points)||[],e=Number((m=(r=(l=(s=u.conf)==null?void 0:s.options)==null?void 0:l.trailLength)==null?void 0:r.value)!=null?m:p.value.trailLength),n=Math.max(0,t.length-Math.max(1,e));return t.slice(n).map(c=>[Number(c==null?void 0:c.x),Number(c==null?void 0:c.y)]).filter(c=>$(c==null?void 0:c[0])&&$(c==null?void 0:c[1]))}),w=()=>{const t=yt.value;A.value=t.map((e,n)=>{var i;return gt((i=e.t)!=null?i:n)}),E.value>=A.value.length&&(E.value=Math.max(0,A.value.length-1))},G=t=>{if(!t||t.seriesName!=="points"&&t.seriesName!=="current")return;const e=u.conf;if(!e.runtime)return;const n=e.runtime.allPoints,i=e.runtime.points||[];if(!Array.isArray(i)||!i.length)return;let a=0;if(Array.isArray(n)&&n.length>=i.length){const s=n.length-i.length,l=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s+l,n.length-1))}else{const s=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s,i.length-1))}P(),q(a)},D=()=>{o.nextTick(()=>{const t=f.getChartInstance();t&&(t.setOption(f.getChartOption(),!0),t.off("click",G),t.on("click",G))})},q=t=>{var l,r,m,c;const e=u.conf;e.runtime||(e.runtime={});const n=e.runtime.allPoints||[];if(!Array.isArray(n)||!n.length)return;const i=Math.max(1,Number((c=(m=(r=(l=e.options)==null?void 0:l.points)==null?void 0:r.value)!=null?m:p.value.points)!=null?c:200)),a=Math.max(0,Math.min(t,n.length-1)),s=Math.max(0,a-i+1);e.runtime.points=n.slice(s,a+1),E.value=a,B(),w(),D()},dt=t=>{P(),q(t)},P=()=>{z.value=!1,R&&(clearInterval(R),R=null)},W=()=>{var e,n,i,a;P(),z.value=!0;const t=Number((a=(i=(n=(e=u.conf)==null?void 0:e.options)==null?void 0:n.interval)==null?void 0:i.value)!=null?a:p.value.interval);R=setInterval(()=>{var r;const s=u.conf,l=((r=s==null?void 0:s.runtime)==null?void 0:r.allPoints)||[];if(!(!Array.isArray(l)||!l.length)){if(E.value>=l.length-1){P();return}q(E.value+1)}},Math.max(200,t))},pt=()=>{A.value.length&&(z.value?P():W())},J=t=>{U.value!==t&&(U.value=t,M.value=null)},H=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=(s=(a=t==null?void 0:t.autoPlay)==null?void 0:a.value)!=null?s:p.value.autoPlay,n=A.value.length>1;if(e&&n){z.value||W();return}z.value&&P()},Q=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=((a=t==null?void 0:t.linkChannel)==null?void 0:a.value)||p.value.linkChannel||"deepDisplacement",n=((s=t==null?void 0:t.customChannel)==null?void 0:s.value)||"";return e==="custom"&&n?n:e};o.watch(()=>d.channels[Q()],t=>{t&&tt(t)},{deep:!0});const St=t=>{var i,a,s,l;const e=u.conf;e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),e.runtime.points.push(t);const n=Math.max(1,Number((l=(s=(a=(i=e.options)==null?void 0:i.points)==null?void 0:a.value)!=null?s:p.value.points)!=null?l:200));e.runtime.points.length>n&&e.runtime.points.shift()},tt=t=>{var N,C,b,O,k,_,I,V,T;if(J("link"),u.mode==="edit"||!t)return;const e=Q();if((N=t.topic)!=null&&N.channel&&e&&t.topic.channel!==e||!d.shouldHandle(t,"trajectoryScatter"))return;const n=t.payload||{},i=u.conf,a=(i==null?void 0:i.data)||[],s=(i==null?void 0:i.common)||{};if(a.length>0&&!(s!=null&&s.multiObject)){const g=L.getObjectId(s,s==null?void 0:s.useAlias,u.uid)||((C=a[0])==null?void 0:C.object_id),h=(n==null?void 0:n.objectId)||(n==null?void 0:n.object_id);if(g&&h&&String(g)!==String(h))return}const l=((b=u.conf)==null?void 0:b.options)||{},r=((O=l==null?void 0:l.listenXKey)==null?void 0:O.value)||p.value.listenXKey||"elevation",m=((k=l==null?void 0:l.listenYKey)==null?void 0:k.value)||p.value.listenYKey||"speed",c=((_=l==null?void 0:l.listenTimeKey)==null?void 0:_.value)||p.value.listenTimeKey||"",v=Number(n==null?void 0:n[r]),S=Number(n==null?void 0:n[m]),F=Z(n,t.topic,c);if(!Number.isFinite(v)||!Number.isFinite(S)){console.warn("[trajectoryScatter] 联动数据无法解析为数字,已跳过该点:",{channel:e,xKey:r,yKey:m,tKey:c,xRaw:n==null?void 0:n[r],yRaw:n==null?void 0:n[m],payload:n});return}St({x:v,y:S,t:F,color:(T=(V=(I=u.conf)==null?void 0:I.data)==null?void 0:V[0])==null?void 0:T.color}),B(),w(),E.value=Math.max(0,A.value.length-1),D(),H()},et=t=>{var N,C,b,O,k,_,I,V,T;J("incoming");const e=u.conf,n=e.data||[],i=e.common||e.COMMON||e.common,a=e.options||{},s=(i==null?void 0:i.source)||"mosaic";let l=(N=t==null?void 0:t.payload)!=null?N:t;["statistics","calculate"].includes(s)&&(l=L.formatStatisticsResult(l,n));const r=[],m=(n==null?void 0:n[0])||{},c=m.xFv||"x",v=m.yFv||"y",S=m.timeFv||"time",F=m.color;if((C=l==null?void 0:l.history)!=null&&C.length)l.history.forEach((g,h)=>{var nt;const y=(g==null?void 0:g[0])||g||{},K=Number(y==null?void 0:y[c]),Y=Number(y==null?void 0:y[v]),Mt=(nt=y==null?void 0:y[S])!=null?nt:h;if(!Number.isFinite(K)||!Number.isFinite(Y)){console.warn("[trajectoryScatter] history 点位字段无法解析为数字,已跳过:",{xKey:c,yKey:v,tKey:S,xRaw:y==null?void 0:y[c],yRaw:y==null?void 0:y[v],obj:y});return}r.push({x:K,y:Y,t:Mt,color:F})});else if(l&&typeof l=="object"){const g=i!=null&&i.multiObject?"":L.getObjectId(i,i==null?void 0:i.useAlias,u.uid),h=g&&((O=(b=l==null?void 0:l[g])==null?void 0:b[s])==null?void 0:O.data)||((k=l==null?void 0:l[s])==null?void 0:k.data)||(l==null?void 0:l.data)||l,y=Number(h==null?void 0:h[c]),K=Number(h==null?void 0:h[v]),Y=Z(h,l,S);!Number.isFinite(y)||!Number.isFinite(K)?console.warn("[trajectoryScatter] 实时点位字段无法解析为数字,已跳过:",{objectId:g,source:s,xKey:c,yKey:v,tKey:S,xRaw:h==null?void 0:h[c],yRaw:h==null?void 0:h[v],objKeys:h&&typeof h=="object"?Object.keys(h).slice(0,50):void 0,obj:h,payload:l}):r.push({x:y,y:K,t:Y,color:F})}if(e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),(_=l==null?void 0:l.history)!=null&&_.length)e.runtime.points=r;else if(r.length){e.runtime.points=[...e.runtime.points,...r];const g=Math.max(1,Number((T=(V=(I=a==null?void 0:a.points)==null?void 0:I.value)!=null?V:f.getStyle().value.points)!=null?T:200));e.runtime.points.length>g&&(e.runtime.points=e.runtime.points.slice(e.runtime.points.length-g))}w(),D(),H()};return o.watchEffect(()=>{u.conf.socketData&&f.setSocketData(u.conf.socketData)}),o.watch(()=>{var t;return(t=u.conf)==null?void 0:t.options},()=>{f.getStyle().value=f.extractStyles(),B(),w(),D(),H()},{deep:!0}),o.onMounted(()=>{const t=u.conf;t&&t.runtime&&(t.runtime.points=[],t.runtime.allPoints=[]),B(),w(),D(),H()}),o.onBeforeUnmount(()=>{P()}),(t,e)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(p).bgColor,borderRadius:`${o.unref(p).radiusSize}px`})},[o.unref(p).isHideTitle?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-title",style:o.normalizeStyle(mt.value)},o.toDisplayString(x.conf.caption||x.conf.name),5)),o.createElementVNode("div",Et,[o.createElementVNode("div",Pt,[o.createElementVNode("div",{class:"echart-container",id:o.unref(ut)},null,8,Ft)]),o.createElementVNode("div",{class:"timeline",style:o.normalizeStyle({height:`${o.unref(p).timelineHeight}px`})},[o.createElementVNode("div",zt,[o.createElementVNode("div",{class:o.normalizeClass(["play",{active:z.value}]),onClick:pt},"II",2)]),o.createElementVNode("div",Lt,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(n,i)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(["time-item",{active:i===E.value}]),onClick:a=>dt(i)},o.toDisplayString(n),11,wt))),128))],512)],4)]),o.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),Yt=L._export_sfc(Ht,[["__scopeId","data-v-48bacd17"]]);exports.default=Yt;
1
+ "use strict";var Nt=Object.defineProperty,Ct=Object.defineProperties;var bt=Object.getOwnPropertyDescriptors;var it=Object.getOwnPropertySymbols;var Ot=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;var lt=(x,u,d)=>u in x?Nt(x,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):x[u]=d,at=(x,u)=>{for(var d in u||(u={}))Ot.call(u,d)&&lt(x,d,u[d]);if(it)for(var d of it(u))kt.call(u,d)&&lt(x,d,u[d]);return x},st=(x,u)=>Ct(x,bt(u));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),L=require("./index-77aUdspY.cjs");require("element-plus");const _t=require("./EChartComponentBase-D9EUh4BZ.cjs"),It=require("./titleStyle-NSnz6cUg.cjs"),ot=require("./ele-circleBar-icon-Da0-L9sa.cjs"),X=require("./installCanvasRenderer-CyhM1Qpl.cjs"),Vt=require("./install-C8buXQPI.cjs"),Tt=require("./install-ByPD0oOh.cjs"),At=require("./install-CYwVETsi.cjs"),Et={class:"mix-body"},Pt={class:"chart-wrap"},Ft=["id"],zt={class:"timeline-left"},Lt={class:"timeline-track",ref:"trackRef"},wt=["onClick"],Dt={DEFAULT_ICON:ot.DEFAULT_ICON,ACTIVE_ICON:ot.ACTIVE_ICON,NAME_CN:"动态轨迹分布图",NAME_EN:"TrajectoryScatter",ORDER:1,PLATFORM:["pc","screen"]},Kt={titleColor:"#111",textColor:"#111",bgColor:"#fff",radiusSize:8,textSize:12,isHideTitle:!1,top:30,bottom:50,left:50,right:30,xName:{value:"x",type:"string",label:"setting.trajectoryScatter_xName"},yName:{value:"y",type:"string",label:"setting.trajectoryScatter_yName"},showTrail:{value:!0,type:"switch",label:"setting.trajectoryScatter_showTrail"},trailLength:{value:30,type:"number",label:"setting.trajectoryScatter_trailLength",dependent:"showTrail"},points:{value:12,type:"number",label:"setting.trajectoryScatter_points"},autoPlay:{value:!0,type:"switch",label:"setting.trajectoryScatter_autoPlay"},interval:{value:1e3,type:"number",label:"setting.trajectoryScatter_interval",dependent:"autoPlay"},timelineHeight:{value:36,type:"number",label:"setting.trajectoryScatter_timelineHeight"},dotSize:{value:10,type:"number",label:"setting.trajectoryScatter_dotSize"},activeDotColor:{value:"#4162ff",type:"color",label:"setting.trajectoryScatter_activeDotColor"},dotColor:{value:"#c7c7c7",type:"color",label:"setting.trajectoryScatter_dotColor"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}},listenXKey:{value:"elevation",type:"string",label:"setting.trajectoryScatter_listenXKey"},listenYKey:{value:"speed",type:"string",label:"setting.trajectoryScatter_listenYKey"},listenTimeKey:{value:"",type:"string",label:"setting.trajectoryScatter_listenTimeKey"},useMock:{value:!0,type:"switch",label:"setting.trajectoryScatter_useMock"},mockCount:{value:12,type:"number",label:"setting.trajectoryScatter_mockCount",dependent:"useMock"},xMin:{value:"",type:"string",label:"setting.trajectoryScatter_xMin"},xMax:{value:"",type:"string",label:"setting.trajectoryScatter_xMax"},yMin:{value:"",type:"string",label:"setting.trajectoryScatter_yMin"},yMax:{value:"",type:"string",label:"setting.trajectoryScatter_yMax"},lockAxis:{value:!0,type:"switch",label:"setting.trajectoryScatter_lockAxis"}},rt=[{name:"轨迹点",fv_x:"elevation",fv_y:"speed",color:"#ff5a5f",object_id:""}],Rt=["name","fv_x","fv_y","object_id","color"],$t=["mosaic","statistics","calculate"],jt={useAlias:!1,multiObject:!0,source:"mosaic"},Bt={DEFAULT:Dt,OPTIONS:Kt,DATA:rt,PARAMS:Rt,SOURCE:$t,COMMON:jt},Ht=o.defineComponent(st(at({},Bt),{__name:"trajectoryScatter",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(x){X.use([Vt.install,X.install,X.install$1,Tt.install,At.install]);const u=x,d=L.useLinkStore();let R=null;class ct extends _t.EChartComponentBase{extractStyles(){const e=this.getOptionValue("linkChannel","deepDisplacement"),n=this.getOptionValue("customChannel",""),i=e==="custom"&&n?n:e;return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",12),isHideTitle:this.getOptionValue("isHideTitle",!1),top:this.getOptionValue("top",30),bottom:this.getOptionValue("bottom",50),left:this.getOptionValue("left",50),right:this.getOptionValue("right",30),xName:this.getOptionValue("xName","x"),yName:this.getOptionValue("yName","y"),showTrail:this.getOptionValue("showTrail",!0),trailLength:this.getOptionValue("trailLength",30),points:this.getOptionValue("points",12),autoPlay:this.getOptionValue("autoPlay",!0),interval:this.getOptionValue("interval",1e3),timelineHeight:this.getOptionValue("timelineHeight",36),dotSize:this.getOptionValue("dotSize",10),activeDotColor:this.getOptionValue("activeDotColor","#4162ff"),dotColor:this.getOptionValue("dotColor","#c7c7c7"),linkChannel:i,listenXKey:this.getOptionValue("listenXKey","elevation"),listenYKey:this.getOptionValue("listenYKey","speed"),listenTimeKey:this.getOptionValue("listenTimeKey",""),useMock:this.getOptionValue("useMock",!0),mockCount:this.getOptionValue("mockCount",12),lockAxis:this.getOptionValue("lockAxis",!0),xMin:this.getOptionValue("xMin",""),xMax:this.getOptionValue("xMax",""),yMin:this.getOptionValue("yMin",""),yMax:this.getOptionValue("yMax","")}}init(){var e;this.Style.value=this.extractStyles(),this.applyTheme(),(e=this.props.conf.data)!=null&&e.length||(this.props.conf.data=rt),o.nextTick(()=>this.initChart())}getChartOption(){var l,r,m,c,v,S;const{options:e}=this.props.conf,n=((l=e==null?void 0:e.xName)==null?void 0:l.value)||this.Style.value.xName,i=((r=e==null?void 0:e.yName)==null?void 0:r.value)||this.Style.value.yName,a=ft.value,s=(a==null?void 0:a.color)||L.COLORS[0];return{grid:{top:this.Style.value.top,bottom:this.Style.value.bottom,left:this.Style.value.left,right:this.Style.value.right,containLabel:!0},tooltip:{trigger:"item"},xAxis:{type:"value",name:n,min:(m=M.value)==null?void 0:m.xMin,max:(c=M.value)==null?void 0:c.xMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},yAxis:{type:"value",name:i,min:(v=M.value)==null?void 0:v.yMin,max:(S=M.value)==null?void 0:S.yMax,axisLine:{onZero:!0,onZeroAxisIndex:0},nameTextStyle:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},axisLabel:{color:this.Style.value.textColor,fontSize:this.Style.value.textSize},splitLine:{lineStyle:{color:"#e5e5e5"}}},series:[{name:"points",type:"scatter",data:ht.value,symbolSize:8,itemStyle:{color:s,opacity:.45}},{name:"current",type:"scatter",data:a?[[a.x,a.y]]:[],symbolSize:12,itemStyle:{color:s}},{name:"trail",type:"line",showSymbol:!1,smooth:!1,data:this.Style.value.showTrail?xt.value:[],lineStyle:{color:s,width:2,opacity:.6},silent:!0}]}}setHistoryData(e){et(e)}setSocketData(e){e&&et(e)}onLinkEvent(e){tt(e)}}const f=new ct(u,"trajectoryScatter"),ut=f.getEchartId();f.setupLifecycle();const p=f.getStyle(),mt=o.computed(()=>It.generateTitleStyle(u.conf.options)),A=o.ref([]),$=t=>typeof t=="number"&&Number.isFinite(t),ht=o.computed(()=>{var e,n;return(((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[]).map(i=>[Number(i==null?void 0:i.x),Number(i==null?void 0:i.y)]).filter(i=>$(i==null?void 0:i[0])&&$(i==null?void 0:i[1]))}),yt=o.computed(()=>{var n;const t=((n=u.conf)==null?void 0:n.runtime)||{},e=t.allPoints||t.points||[];return Array.isArray(e)?e:[]}),M=o.ref(null),U=o.ref(null),j=t=>{if(t===""||t===null||t===void 0)return null;const e=Number(t);return isNaN(e)?null:e},Z=(t,e,n)=>{var a,s,l,r,m,c;return n&&t&&t[n]!==void 0?t[n]:n&&e&&e[n]!==void 0?e[n]:(c=(m=(r=(l=(s=(a=t==null?void 0:t.time)!=null?a:t==null?void 0:t.timestamp)!=null?s:t==null?void 0:t.datetime)!=null?l:e==null?void 0:e.time)!=null?r:e==null?void 0:e.timestamp)!=null?m:e==null?void 0:e.datetime)!=null?c:e==null?void 0:e.datatime},gt=t=>{if(t==null)return"";const e=Number(t);if(Number.isFinite(e)&&String(t).length>=12)try{const i=new Date(e),a=i.getFullYear(),s=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0"),r=String(i.getHours()).padStart(2,"0"),m=String(i.getMinutes()).padStart(2,"0"),c=String(i.getSeconds()).padStart(2,"0");return`${a}-${s}-${l} ${r}:${m}:${c}`}catch(i){return String(t)}const n=String(t);if(n.includes(" ")||n.includes("T")){const i=n.replace("T"," "),[a,s]=i.split(" ");if(s){const[l,r,m]=s.split(":");if(l!==void 0&&r!==void 0&&m!==void 0)return`${a} ${l}:${r}:${m.slice(0,2)}`}}return n},vt=t=>{if(!(t!=null&&t.length))return null;let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(t.forEach(r=>{const m=Number(r==null?void 0:r.x),c=Number(r==null?void 0:r.y);isNaN(m)||(e=Math.min(e,m),n=Math.max(n,m)),isNaN(c)||(i=Math.min(i,c),a=Math.max(a,c))}),!isFinite(e)||!isFinite(n)||!isFinite(i)||!isFinite(a))return null;const s=(n-e)*.1||1,l=(a-i)*.1||1;return{xMin:e-s,xMax:n+s,yMin:i-l,yMax:a+l}},B=()=>{var m,c,v,S,F,N,C,b,O,k,_,I,V,T,g,h,y;const t=((m=u.conf)==null?void 0:m.options)||{};if(!((v=(c=t==null?void 0:t.lockAxis)==null?void 0:c.value)!=null?v:f.getStyle().value.lockAxis)){M.value=null;return}const n=j((F=(S=t==null?void 0:t.xMin)==null?void 0:S.value)!=null?F:f.getStyle().value.xMin),i=j((C=(N=t==null?void 0:t.xMax)==null?void 0:N.value)!=null?C:f.getStyle().value.xMax),a=j((O=(b=t==null?void 0:t.yMin)==null?void 0:b.value)!=null?O:f.getStyle().value.yMin),s=j((_=(k=t==null?void 0:t.yMax)==null?void 0:k.value)!=null?_:f.getStyle().value.yMax);if(n!==null||i!==null||a!==null||s!==null){M.value={xMin:n!==null?Math.min(n,0):void 0,xMax:i!==null?Math.max(i,0):void 0,yMin:a!==null?Math.min(a,0):void 0,yMax:s!==null?Math.max(s,0):void 0};return}if(M.value)return;const l=((V=(I=u.conf)==null?void 0:I.runtime)==null?void 0:V.points)||[],r=vt(l);if(!r){M.value={xMin:0,xMax:10,yMin:0,yMax:10};return}M.value={xMin:Math.min((T=r.xMin)!=null?T:0,0),xMax:Math.max((g=r.xMax)!=null?g:0,0),yMin:Math.min((h=r.yMin)!=null?h:0,0),yMax:Math.max((y=r.yMax)!=null?y:0,0)}},E=o.ref(0),z=o.ref(!1),ft=o.computed(()=>{var e,n;const t=((n=(e=u.conf)==null?void 0:e.runtime)==null?void 0:n.points)||[];return t[t.length-1]||null}),xt=o.computed(()=>{var i,a,s,l,r,m;const t=((a=(i=u.conf)==null?void 0:i.runtime)==null?void 0:a.points)||[],e=Number((m=(r=(l=(s=u.conf)==null?void 0:s.options)==null?void 0:l.trailLength)==null?void 0:r.value)!=null?m:p.value.trailLength),n=Math.max(0,t.length-Math.max(1,e));return t.slice(n).map(c=>[Number(c==null?void 0:c.x),Number(c==null?void 0:c.y)]).filter(c=>$(c==null?void 0:c[0])&&$(c==null?void 0:c[1]))}),w=()=>{const t=yt.value;A.value=t.map((e,n)=>{var i;return gt((i=e.t)!=null?i:n)}),E.value>=A.value.length&&(E.value=Math.max(0,A.value.length-1))},G=t=>{if(!t||t.seriesName!=="points"&&t.seriesName!=="current")return;const e=u.conf;if(!e.runtime)return;const n=e.runtime.allPoints,i=e.runtime.points||[];if(!Array.isArray(i)||!i.length)return;let a=0;if(Array.isArray(n)&&n.length>=i.length){const s=n.length-i.length,l=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s+l,n.length-1))}else{const s=typeof t.dataIndex=="number"?t.dataIndex:0;a=Math.max(0,Math.min(s,i.length-1))}P(),q(a)},D=()=>{o.nextTick(()=>{const t=f.getChartInstance();t&&(t.setOption(f.getChartOption(),!0),t.off("click",G),t.on("click",G))})},q=t=>{var l,r,m,c;const e=u.conf;e.runtime||(e.runtime={});const n=e.runtime.allPoints||[];if(!Array.isArray(n)||!n.length)return;const i=Math.max(1,Number((c=(m=(r=(l=e.options)==null?void 0:l.points)==null?void 0:r.value)!=null?m:p.value.points)!=null?c:200)),a=Math.max(0,Math.min(t,n.length-1)),s=Math.max(0,a-i+1);e.runtime.points=n.slice(s,a+1),E.value=a,B(),w(),D()},dt=t=>{P(),q(t)},P=()=>{z.value=!1,R&&(clearInterval(R),R=null)},W=()=>{var e,n,i,a;P(),z.value=!0;const t=Number((a=(i=(n=(e=u.conf)==null?void 0:e.options)==null?void 0:n.interval)==null?void 0:i.value)!=null?a:p.value.interval);R=setInterval(()=>{var r;const s=u.conf,l=((r=s==null?void 0:s.runtime)==null?void 0:r.allPoints)||[];if(!(!Array.isArray(l)||!l.length)){if(E.value>=l.length-1){P();return}q(E.value+1)}},Math.max(200,t))},pt=()=>{A.value.length&&(z.value?P():W())},J=t=>{U.value!==t&&(U.value=t,M.value=null)},H=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=(s=(a=t==null?void 0:t.autoPlay)==null?void 0:a.value)!=null?s:p.value.autoPlay,n=A.value.length>1;if(e&&n){z.value||W();return}z.value&&P()},Q=()=>{var i,a,s;const t=((i=u.conf)==null?void 0:i.options)||{},e=((a=t==null?void 0:t.linkChannel)==null?void 0:a.value)||p.value.linkChannel||"deepDisplacement",n=((s=t==null?void 0:t.customChannel)==null?void 0:s.value)||"";return e==="custom"&&n?n:e};o.watch(()=>d.channels[Q()],t=>{t&&tt(t)},{deep:!0});const St=t=>{var i,a,s,l;const e=u.conf;e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),e.runtime.points.push(t);const n=Math.max(1,Number((l=(s=(a=(i=e.options)==null?void 0:i.points)==null?void 0:a.value)!=null?s:p.value.points)!=null?l:200));e.runtime.points.length>n&&e.runtime.points.shift()},tt=t=>{var N,C,b,O,k,_,I,V,T;if(J("link"),u.mode==="edit"||!t)return;const e=Q();if((N=t.topic)!=null&&N.channel&&e&&t.topic.channel!==e||!d.shouldHandle(t,"trajectoryScatter"))return;const n=t.payload||{},i=u.conf,a=(i==null?void 0:i.data)||[],s=(i==null?void 0:i.common)||{};if(a.length>0&&!(s!=null&&s.multiObject)){const g=L.getObjectId(s,s==null?void 0:s.useAlias,u.uid)||((C=a[0])==null?void 0:C.object_id),h=(n==null?void 0:n.objectId)||(n==null?void 0:n.object_id);if(g&&h&&String(g)!==String(h))return}const l=((b=u.conf)==null?void 0:b.options)||{},r=((O=l==null?void 0:l.listenXKey)==null?void 0:O.value)||p.value.listenXKey||"elevation",m=((k=l==null?void 0:l.listenYKey)==null?void 0:k.value)||p.value.listenYKey||"speed",c=((_=l==null?void 0:l.listenTimeKey)==null?void 0:_.value)||p.value.listenTimeKey||"",v=Number(n==null?void 0:n[r]),S=Number(n==null?void 0:n[m]),F=Z(n,t.topic,c);if(!Number.isFinite(v)||!Number.isFinite(S)){console.warn("[trajectoryScatter] 联动数据无法解析为数字,已跳过该点:",{channel:e,xKey:r,yKey:m,tKey:c,xRaw:n==null?void 0:n[r],yRaw:n==null?void 0:n[m],payload:n});return}St({x:v,y:S,t:F,color:(T=(V=(I=u.conf)==null?void 0:I.data)==null?void 0:V[0])==null?void 0:T.color}),B(),w(),E.value=Math.max(0,A.value.length-1),D(),H()},et=t=>{var N,C,b,O,k,_,I,V,T;J("incoming");const e=u.conf,n=e.data||[],i=e.common||e.COMMON||e.common,a=e.options||{},s=(i==null?void 0:i.source)||"mosaic";let l=(N=t==null?void 0:t.payload)!=null?N:t;["statistics","calculate"].includes(s)&&(l=L.formatStatisticsResult(l,n));const r=[],m=(n==null?void 0:n[0])||{},c=m.xFv||"x",v=m.yFv||"y",S=m.timeFv||"time",F=m.color;if((C=l==null?void 0:l.history)!=null&&C.length)l.history.forEach((g,h)=>{var nt;const y=(g==null?void 0:g[0])||g||{},K=Number(y==null?void 0:y[c]),Y=Number(y==null?void 0:y[v]),Mt=(nt=y==null?void 0:y[S])!=null?nt:h;if(!Number.isFinite(K)||!Number.isFinite(Y)){console.warn("[trajectoryScatter] history 点位字段无法解析为数字,已跳过:",{xKey:c,yKey:v,tKey:S,xRaw:y==null?void 0:y[c],yRaw:y==null?void 0:y[v],obj:y});return}r.push({x:K,y:Y,t:Mt,color:F})});else if(l&&typeof l=="object"){const g=i!=null&&i.multiObject?"":L.getObjectId(i,i==null?void 0:i.useAlias,u.uid),h=g&&((O=(b=l==null?void 0:l[g])==null?void 0:b[s])==null?void 0:O.data)||((k=l==null?void 0:l[s])==null?void 0:k.data)||(l==null?void 0:l.data)||l,y=Number(h==null?void 0:h[c]),K=Number(h==null?void 0:h[v]),Y=Z(h,l,S);!Number.isFinite(y)||!Number.isFinite(K)?console.warn("[trajectoryScatter] 实时点位字段无法解析为数字,已跳过:",{objectId:g,source:s,xKey:c,yKey:v,tKey:S,xRaw:h==null?void 0:h[c],yRaw:h==null?void 0:h[v],objKeys:h&&typeof h=="object"?Object.keys(h).slice(0,50):void 0,obj:h,payload:l}):r.push({x:y,y:K,t:Y,color:F})}if(e.runtime||(e.runtime={}),Array.isArray(e.runtime.points)||(e.runtime.points=[]),(_=l==null?void 0:l.history)!=null&&_.length)e.runtime.points=r;else if(r.length){e.runtime.points=[...e.runtime.points,...r];const g=Math.max(1,Number((T=(V=(I=a==null?void 0:a.points)==null?void 0:I.value)!=null?V:f.getStyle().value.points)!=null?T:200));e.runtime.points.length>g&&(e.runtime.points=e.runtime.points.slice(e.runtime.points.length-g))}w(),D(),H()};return o.watchEffect(()=>{u.conf.socketData&&f.setSocketData(u.conf.socketData)}),o.watch(()=>{var t;return(t=u.conf)==null?void 0:t.options},()=>{f.getStyle().value=f.extractStyles(),B(),w(),D(),H()},{deep:!0}),o.onMounted(()=>{const t=u.conf;t&&t.runtime&&(t.runtime.points=[],t.runtime.allPoints=[]),B(),w(),D(),H()}),o.onBeforeUnmount(()=>{P()}),(t,e)=>(o.openBlock(),o.createElementBlock("div",{class:"mix-component",style:o.normalizeStyle({background:o.unref(p).bgColor,borderRadius:`${o.unref(p).radiusSize}px`})},[o.unref(p).isHideTitle?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"mix-title",style:o.normalizeStyle(mt.value)},o.toDisplayString(x.conf.caption||x.conf.name),5)),o.createElementVNode("div",Et,[o.createElementVNode("div",Pt,[o.createElementVNode("div",{class:"echart-container",id:o.unref(ut)},null,8,Ft)]),o.createElementVNode("div",{class:"timeline",style:o.normalizeStyle({height:`${o.unref(p).timelineHeight}px`})},[o.createElementVNode("div",zt,[o.createElementVNode("div",{class:o.normalizeClass(["play",{active:z.value}]),onClick:pt},"II",2)]),o.createElementVNode("div",Lt,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(n,i)=>(o.openBlock(),o.createElementBlock("div",{key:i,class:o.normalizeClass(["time-item",{active:i===E.value}]),onClick:a=>dt(i)},o.toDisplayString(n),11,wt))),128))],512)],4)]),o.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),Yt=L._export_sfc(Ht,[["__scopeId","data-v-48bacd17"]]);exports.default=Yt;
@@ -21,7 +21,7 @@ import "element-plus/es/components/icon/style/css";
21
21
  import "element-plus/es/components/checkbox/style/css";
22
22
  import "element-plus/es/components/date-picker/style/css";
23
23
  import { defineComponent as ve, useCssVars as pe, computed as S, ref as me, watch as fe, onMounted as he, openBlock as c, createElementBlock as v, normalizeStyle as ge, Fragment as I, renderList as R, createElementVNode as p, toDisplayString as y, normalizeClass as T, createCommentVNode as D, createVNode as k, withCtx as C, createTextVNode as V, unref as ye, createBlock as Y, resolveDynamicComponent as _e, renderSlot as Ce } from "vue";
24
- import { l as be, d as Q, _ as ke } from "./index-DomNEEyv.js";
24
+ import { l as be, d as Q, _ as ke } from "./index-BZpYmpDy.js";
25
25
  import { A as Ve, D as De } from "./ele-ctrSet-icon-BtKGrCid.js";
26
26
  import { Delete as Ye } from "@element-plus/icons-vue";
27
27
  const Ie = {
@@ -1 +1 @@
1
- "use strict";var z=Object.defineProperty,j=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var R=(m,i,v)=>i in m?z(m,i,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[i]=v,b=(m,i)=>{for(var v in i||(i={}))Q.call(i,v)&&R(m,v,i[v]);if(F)for(var v of F(i))W.call(i,v)&&R(m,v,i[v]);return m},N=(m,i)=>j(m,G(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),E=require("./index-Cvu9nAQq.cjs"),U=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),J=require("@element-plus/icons-vue"),K={key:0,class:"config-section"},X={class:"section-header"},Z={class:"section-title"},$={key:0,class:"granularity-switch"},x=["onClick"],ee=["onClick"],le={key:0,class:"quick-range"},te=["onClick"],ae={key:1,class:"date-inputs"},oe={key:1,class:"config-section"},ne={class:"section-header"},se={class:"section-title"},ce={key:0,class:"list-actions"},re={class:"selected-count"},ue={class:"select-list"},de={key:2,class:"config-section"},ie={class:"section-header"},ve={class:"section-title"},pe={class:"switch-options"},me={key:3,class:"config-section"},ke={class:"section-header"},fe={class:"section-title"},ge={class:"range-inputs"},he={key:0,class:"range-unit"},Ce={key:4,class:"config-section"},ye={DEFAULT_ICON:U.DEFAULT_ICON,ACTIVE_ICON:U.ACTIVE_ICON,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20,PLATFORM:["pc","screen","mobile"]},_e={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},bindMode:{value:"channel",type:"select",label:"绑定模式",options:[{label:"频道模式",value:"channel"},{label:"直接绑定",value:"direct"}]},linkChannel:{value:"deepDisplacement",type:"select",label:"联动频道",options:[{label:"深部位移",value:"deepDisplacement"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},Ve=[{type:"timeRange",label:"时间段",key:"timeRange",targetIds:"",showGranularity:!0,showQuickRange:!0,dateType:"datetime",dateFormat:"YYYY-MM-DD HH:mm:ss"},{type:"selectList",label:"节点列表",key:"nodeList",targetIds:"",multiple:!1,options:[{label:"-123米",value:-123},{label:"-126米",value:-126},{label:"-129米",value:-129}]}],be=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],Ee=[],De={useAlias:!1,multiObject:!1,source:""},Be={DEFAULT:ye,OPTIONS:_e,DATA:Ve,PARAMS:be,SOURCE:Ee,COMMON:De},Ne=e.defineComponent(N(b({},Be),{__name:"universalConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(m){e.useCssVars(l=>({v10edae52:D.value.backgroundColor,a9b6f6d8:D.value.borderColor,d418e10a:p.value.textColor,v0bdaaa9c:p.value.borderColor,ca35c684:p.value.accentColor}));const i=E.useLinkStore(),v=m,p=e.computed(()=>{var u,d,k,_,V,C,c,n;const{options:l}=v.conf||{},a=((u=l==null?void 0:l.linkChannel)==null?void 0:u.value)||"deepDisplacement",r=((d=l==null?void 0:l.customChannel)==null?void 0:d.value)||"",s=a==="custom"&&r?r:a;return{bindId:((k=l==null?void 0:l.bindId)==null?void 0:k.value)||"",bgColor:((_=l==null?void 0:l.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((V=l==null?void 0:l.textColor)==null?void 0:V.value)||"#333333",accentColor:((C=l==null?void 0:l.accentColor)==null?void 0:C.value)||"#409eff",borderColor:((c=l==null?void 0:l.borderColor)==null?void 0:c.value)||"#e5e5e5",bindMode:((n=l==null?void 0:l.bindMode)==null?void 0:n.value)||"channel",linkChannel:s}}),I=e.computed(()=>p.value.bindId||v.uid||""),g=e.computed(()=>{var l;return((l=v.conf)==null?void 0:l.data)||[]}),t=e.ref({}),A=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],D=e.computed(()=>({backgroundColor:p.value.bgColor,color:p.value.textColor,borderColor:p.value.borderColor})),S=()=>{t.value={},g.value.forEach((l,a)=>{var r,s,u;if(t.value[a]={},l.type==="timeRange"){t.value[a]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const d=E.dayjs();t.value[a].endDate=d.format(l.dateFormat||"YYYY-MM-DD HH:mm:ss"),t.value[a].startDate=d.subtract(7,"day").format(l.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(l.type==="selectList")t.value[a]={selectedValues:l.multiple?[]:"",selectedValue:l.multiple?void 0:((s=(r=l.options)==null?void 0:r[0])==null?void 0:s.value)||"",selectAll:!1},l.multiple&&l.options&&(t.value[a].selectedValues=l.options.map(d=>d.value),t.value[a].selectAll=!0);else if(l.type==="switch"){const d={};(u=l.options)==null||u.forEach(k=>{d[k.value]=k.defaultValue!==!1}),t.value[a]=d}else l.type==="range"&&(t.value[a]={min:"",max:""})})},Y=()=>{const l={};return g.value.forEach((a,r)=>{if(a.key&&t.value[r]){const s=t.value[r];a.type==="timeRange"?l[a.key]={granularity:s.granularity,startDate:s.startDate,endDate:s.endDate,quickRange:s.quickRange}:a.type==="selectList"?l[a.key]=a.multiple?s.selectedValues:s.selectedValue:a.type==="switch"?l[a.key]=b({},s):a.type==="range"&&(l[a.key]={min:s.min===""?null:parseFloat(s.min),max:s.max===""?null:parseFloat(s.max)})}}),l},B=()=>{const l=Y(),a=I.value,r=p.value.bindMode,s=p.value.linkChannel;a&&(console.log("[UniversalConfigPanel] 广播配置:",{id:a,bindMode:r,linkChannel:s,config:l}),r==="channel"?i.publish(s,"universalConfigPanel",{objectId:a,type:"config",fv:l}):g.value.forEach(u=>{if(!u.targetIds)return;u.targetIds.split(",").map(k=>k.trim()).filter(Boolean).forEach(k=>{i.publish(s,"universalConfigPanel",{objectId:k,type:"bindConfig",fv:N(b({},l),{[u.key]:l[u.key]})})})}))},w=(l,a)=>{t.value[l]&&(t.value[l].granularity=a,f())},P=(l,a)=>{if(!t.value[l])return;const r=g.value[l],s=E.dayjs(),u=r.dateFormat||"YYYY-MM-DD HH:mm:ss";t.value[l].quickRange=a,t.value[l].endDate=s.format(u),a==="week"?t.value[l].startDate=s.subtract(7,"day").format(u):a==="month"?t.value[l].startDate=s.subtract(30,"day").format(u):a==="quarter"&&(t.value[l].startDate=s.subtract(90,"day").format(u)),f()},f=l=>{B()},H=l=>{var r;const a=g.value[l];!a.multiple||!t.value[l]||(t.value[l].selectAll?t.value[l].selectedValues=((r=a.options)==null?void 0:r.map(s=>s.value))||[]:t.value[l].selectedValues=[],f())},L=l=>{t.value[l]&&(t.value[l].selectedValues=[],t.value[l].selectAll=!1,f())},M=l=>{var r;const a=g.value[l];a.multiple&&t.value[l]&&(t.value[l].selectAll=t.value[l].selectedValues.length===(((r=a.options)==null?void 0:r.length)||0)),f()},O=l=>{var s;const a=g.value[l],r=Y();p.value.bindMode==="channel"?i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:I.value,type:"action",action:a.key,fv:r}):(((s=a.targetIds)==null?void 0:s.split(",").map(d=>d.trim()).filter(Boolean))||[]).forEach(d=>{i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:d,type:"action",action:a.key,fv:r})})};return e.watch(g,()=>{S(),setTimeout(B,300)},{immediate:!1,deep:!0,flush:"sync"}),e.onMounted(()=>{S(),setTimeout(B,300)}),(l,a)=>{const r=h.ElDatePicker,s=h.ElCheckbox,u=h.ElIcon,d=h.ElButton,k=h.ElCheckboxGroup,_=h.ElRadio,V=h.ElRadioGroup,C=h.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"universal-config-panel",style:e.normalizeStyle(D.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(c,n)=>{var T,q;return e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",X,[e.createElementVNode("span",Z,e.toDisplayString(c.label||"时间段"),1),c.showGranularity&&t.value[n]?(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:((T=t.value[n])==null?void 0:T.granularity)==="day"}]),onClick:o=>w(n,"day")}," 日均 ",10,x),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:((q=t.value[n])==null?void 0:q.granularity)==="hour"}]),onClick:o=>w(n,"hour")}," 小时 ",10,ee)])):e.createCommentVNode("",!0)]),c.showQuickRange&&t.value[n]?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(A,o=>{var y;return e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:((y=t.value[n])==null?void 0:y.quickRange)===o.value}]),onClick:Se=>P(n,o.value)},e.toDisplayString(o.label),11,te)}),64))])):e.createCommentVNode("",!0),t.value[n]?(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(r,{modelValue:t.value[n].startDate,"onUpdate:modelValue":o=>t.value[n].startDate=o,type:c.dateType||"datetime",placeholder:"开始时间",format:c.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":c.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(r,{modelValue:t.value[n].endDate,"onUpdate:modelValue":o=>t.value[n].endDate=o,type:c.dateType||"datetime",placeholder:"结束时间",format:c.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":c.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])):c.type==="selectList"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ne,[e.createElementVNode("span",se,e.toDisplayString(c.label||"选择列表"),1)]),c.multiple?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(s,{modelValue:t.value[n].selectAll,"onUpdate:modelValue":o=>t.value[n].selectAll=o,onChange:o=>H(n)},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(d,{size:"small",text:"",onClick:o=>L(n)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(J.Delete))]),_:1}),a[1]||(a[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",re,[a[2]||(a[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(t.value[n].selectedValues&&t.value[n].selectedValues.length||0),1),a[3]||(a[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",ue,[c.multiple?(e.openBlock(),e.createBlock(k,{key:0,modelValue:t.value[n].selectedValues,"onUpdate:modelValue":o=>t.value[n].selectedValues=o,onChange:o=>M(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(s,{key:o.value,value:o.value,class:"list-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(V,{key:1,modelValue:t.value[n].selectedValue,"onUpdate:modelValue":o=>t.value[n].selectedValue=o,onChange:o=>M(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(_,{key:o.value,value:o.value,class:"list-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])])):c.type==="switch"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("div",ie,[e.createElementVNode("span",ve,e.toDisplayString(c.label||"开关"),1)]),e.createElementVNode("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(s,{key:o.value,modelValue:t.value[n][o.value],"onUpdate:modelValue":y=>t.value[n][o.value]=y,onChange:y=>f()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):c.type==="range"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ke,[e.createElementVNode("span",fe,e.toDisplayString(c.label||"范围设置"),1)]),e.createElementVNode("div",ge,[e.createVNode(C,{modelValue:t.value[n].min,"onUpdate:modelValue":o=>t.value[n].min=o,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),a[4]||(a[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(C,{modelValue:t.value[n].max,"onUpdate:modelValue":o=>t.value[n].max=o,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",he,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])])):c.type==="button"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(d,{size:"small",onClick:o=>O(n),class:"action-btn",type:c.buttonType||"primary"},{default:e.withCtx(()=>[c.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon)))]),_:2},1024)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(c.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ie=E._export_sfc(Ne,[["__scopeId","data-v-60e3fc69"]]);exports.default=Ie;
1
+ "use strict";var z=Object.defineProperty,j=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var R=(m,i,v)=>i in m?z(m,i,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[i]=v,b=(m,i)=>{for(var v in i||(i={}))Q.call(i,v)&&R(m,v,i[v]);if(F)for(var v of F(i))W.call(i,v)&&R(m,v,i[v]);return m},N=(m,i)=>j(m,G(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio/style/css");require("element-plus/es/components/checkbox-group/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/checkbox/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),E=require("./index-77aUdspY.cjs"),U=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),J=require("@element-plus/icons-vue"),K={key:0,class:"config-section"},X={class:"section-header"},Z={class:"section-title"},$={key:0,class:"granularity-switch"},x=["onClick"],ee=["onClick"],le={key:0,class:"quick-range"},te=["onClick"],ae={key:1,class:"date-inputs"},oe={key:1,class:"config-section"},ne={class:"section-header"},se={class:"section-title"},ce={key:0,class:"list-actions"},re={class:"selected-count"},ue={class:"select-list"},de={key:2,class:"config-section"},ie={class:"section-header"},ve={class:"section-title"},pe={class:"switch-options"},me={key:3,class:"config-section"},ke={class:"section-header"},fe={class:"section-title"},ge={class:"range-inputs"},he={key:0,class:"range-unit"},Ce={key:4,class:"config-section"},ye={DEFAULT_ICON:U.DEFAULT_ICON,ACTIVE_ICON:U.ACTIVE_ICON,NAME_CN:"通用控制面板",NAME_EN:"Universal Config Panel",ORDER:20,PLATFORM:["pc","screen","mobile"]},_e={bindId:{value:"",type:"string",label:"component.deepDisplacement.bindId"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},bindMode:{value:"channel",type:"select",label:"绑定模式",options:[{label:"频道模式",value:"channel"},{label:"直接绑定",value:"direct"}]},linkChannel:{value:"deepDisplacement",type:"select",label:"联动频道",options:[{label:"深部位移",value:"deepDisplacement"},{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},Ve=[{type:"timeRange",label:"时间段",key:"timeRange",targetIds:"",showGranularity:!0,showQuickRange:!0,dateType:"datetime",dateFormat:"YYYY-MM-DD HH:mm:ss"},{type:"selectList",label:"节点列表",key:"nodeList",targetIds:"",multiple:!1,options:[{label:"-123米",value:-123},{label:"-126米",value:-126},{label:"-129米",value:-129}]}],be=["type","label","key","targetIds","showGranularity","showQuickRange","dateType","dateFormat","multiple","options","minPlaceholder","maxPlaceholder","unit","buttonType","icon"],Ee=[],De={useAlias:!1,multiObject:!1,source:""},Be={DEFAULT:ye,OPTIONS:_e,DATA:Ve,PARAMS:be,SOURCE:Ee,COMMON:De},Ne=e.defineComponent(N(b({},Be),{__name:"universalConfigPanel",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(m){e.useCssVars(l=>({v10edae52:D.value.backgroundColor,a9b6f6d8:D.value.borderColor,d418e10a:p.value.textColor,v0bdaaa9c:p.value.borderColor,ca35c684:p.value.accentColor}));const i=E.useLinkStore(),v=m,p=e.computed(()=>{var u,d,k,_,V,C,c,n;const{options:l}=v.conf||{},a=((u=l==null?void 0:l.linkChannel)==null?void 0:u.value)||"deepDisplacement",r=((d=l==null?void 0:l.customChannel)==null?void 0:d.value)||"",s=a==="custom"&&r?r:a;return{bindId:((k=l==null?void 0:l.bindId)==null?void 0:k.value)||"",bgColor:((_=l==null?void 0:l.bgColor)==null?void 0:_.value)||"#ffffff",textColor:((V=l==null?void 0:l.textColor)==null?void 0:V.value)||"#333333",accentColor:((C=l==null?void 0:l.accentColor)==null?void 0:C.value)||"#409eff",borderColor:((c=l==null?void 0:l.borderColor)==null?void 0:c.value)||"#e5e5e5",bindMode:((n=l==null?void 0:l.bindMode)==null?void 0:n.value)||"channel",linkChannel:s}}),I=e.computed(()=>p.value.bindId||v.uid||""),g=e.computed(()=>{var l;return((l=v.conf)==null?void 0:l.data)||[]}),t=e.ref({}),A=[{label:"近7天",value:"week"},{label:"近30天",value:"month"},{label:"近90天",value:"quarter"}],D=e.computed(()=>({backgroundColor:p.value.bgColor,color:p.value.textColor,borderColor:p.value.borderColor})),S=()=>{t.value={},g.value.forEach((l,a)=>{var r,s,u;if(t.value[a]={},l.type==="timeRange"){t.value[a]={granularity:"day",quickRange:"week",startDate:"",endDate:""};const d=E.dayjs();t.value[a].endDate=d.format(l.dateFormat||"YYYY-MM-DD HH:mm:ss"),t.value[a].startDate=d.subtract(7,"day").format(l.dateFormat||"YYYY-MM-DD HH:mm:ss")}else if(l.type==="selectList")t.value[a]={selectedValues:l.multiple?[]:"",selectedValue:l.multiple?void 0:((s=(r=l.options)==null?void 0:r[0])==null?void 0:s.value)||"",selectAll:!1},l.multiple&&l.options&&(t.value[a].selectedValues=l.options.map(d=>d.value),t.value[a].selectAll=!0);else if(l.type==="switch"){const d={};(u=l.options)==null||u.forEach(k=>{d[k.value]=k.defaultValue!==!1}),t.value[a]=d}else l.type==="range"&&(t.value[a]={min:"",max:""})})},Y=()=>{const l={};return g.value.forEach((a,r)=>{if(a.key&&t.value[r]){const s=t.value[r];a.type==="timeRange"?l[a.key]={granularity:s.granularity,startDate:s.startDate,endDate:s.endDate,quickRange:s.quickRange}:a.type==="selectList"?l[a.key]=a.multiple?s.selectedValues:s.selectedValue:a.type==="switch"?l[a.key]=b({},s):a.type==="range"&&(l[a.key]={min:s.min===""?null:parseFloat(s.min),max:s.max===""?null:parseFloat(s.max)})}}),l},B=()=>{const l=Y(),a=I.value,r=p.value.bindMode,s=p.value.linkChannel;a&&(console.log("[UniversalConfigPanel] 广播配置:",{id:a,bindMode:r,linkChannel:s,config:l}),r==="channel"?i.publish(s,"universalConfigPanel",{objectId:a,type:"config",fv:l}):g.value.forEach(u=>{if(!u.targetIds)return;u.targetIds.split(",").map(k=>k.trim()).filter(Boolean).forEach(k=>{i.publish(s,"universalConfigPanel",{objectId:k,type:"bindConfig",fv:N(b({},l),{[u.key]:l[u.key]})})})}))},w=(l,a)=>{t.value[l]&&(t.value[l].granularity=a,f())},P=(l,a)=>{if(!t.value[l])return;const r=g.value[l],s=E.dayjs(),u=r.dateFormat||"YYYY-MM-DD HH:mm:ss";t.value[l].quickRange=a,t.value[l].endDate=s.format(u),a==="week"?t.value[l].startDate=s.subtract(7,"day").format(u):a==="month"?t.value[l].startDate=s.subtract(30,"day").format(u):a==="quarter"&&(t.value[l].startDate=s.subtract(90,"day").format(u)),f()},f=l=>{B()},H=l=>{var r;const a=g.value[l];!a.multiple||!t.value[l]||(t.value[l].selectAll?t.value[l].selectedValues=((r=a.options)==null?void 0:r.map(s=>s.value))||[]:t.value[l].selectedValues=[],f())},L=l=>{t.value[l]&&(t.value[l].selectedValues=[],t.value[l].selectAll=!1,f())},M=l=>{var r;const a=g.value[l];a.multiple&&t.value[l]&&(t.value[l].selectAll=t.value[l].selectedValues.length===(((r=a.options)==null?void 0:r.length)||0)),f()},O=l=>{var s;const a=g.value[l],r=Y();p.value.bindMode==="channel"?i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:I.value,type:"action",action:a.key,fv:r}):(((s=a.targetIds)==null?void 0:s.split(",").map(d=>d.trim()).filter(Boolean))||[]).forEach(d=>{i.publish(p.value.linkChannel,"universalConfigPanel",{objectId:d,type:"action",action:a.key,fv:r})})};return e.watch(g,()=>{S(),setTimeout(B,300)},{immediate:!1,deep:!0,flush:"sync"}),e.onMounted(()=>{S(),setTimeout(B,300)}),(l,a)=>{const r=h.ElDatePicker,s=h.ElCheckbox,u=h.ElIcon,d=h.ElButton,k=h.ElCheckboxGroup,_=h.ElRadio,V=h.ElRadioGroup,C=h.ElInput;return e.openBlock(),e.createElementBlock("div",{class:"universal-config-panel",style:e.normalizeStyle(D.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(c,n)=>{var T,q;return e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[c.type==="timeRange"?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",X,[e.createElementVNode("span",Z,e.toDisplayString(c.label||"时间段"),1),c.showGranularity&&t.value[n]?(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:((T=t.value[n])==null?void 0:T.granularity)==="day"}]),onClick:o=>w(n,"day")}," 日均 ",10,x),e.createElementVNode("span",{class:e.normalizeClass(["switch-item",{active:((q=t.value[n])==null?void 0:q.granularity)==="hour"}]),onClick:o=>w(n,"hour")}," 小时 ",10,ee)])):e.createCommentVNode("",!0)]),c.showQuickRange&&t.value[n]?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(A,o=>{var y;return e.createElementVNode("span",{key:o.value,class:e.normalizeClass(["range-item",{active:((y=t.value[n])==null?void 0:y.quickRange)===o.value}]),onClick:Se=>P(n,o.value)},e.toDisplayString(o.label),11,te)}),64))])):e.createCommentVNode("",!0),t.value[n]?(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(r,{modelValue:t.value[n].startDate,"onUpdate:modelValue":o=>t.value[n].startDate=o,type:c.dateType||"datetime",placeholder:"开始时间",format:c.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":c.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"]),e.createVNode(r,{modelValue:t.value[n].endDate,"onUpdate:modelValue":o=>t.value[n].endDate=o,type:c.dateType||"datetime",placeholder:"结束时间",format:c.dateFormat||"YYYY-MM-DD HH:mm:ss","value-format":c.dateFormat||"YYYY-MM-DD HH:mm:ss",size:"small",class:"date-picker",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])])):e.createCommentVNode("",!0)])):c.type==="selectList"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ne,[e.createElementVNode("span",se,e.toDisplayString(c.label||"选择列表"),1)]),c.multiple?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(s,{modelValue:t.value[n].selectAll,"onUpdate:modelValue":o=>t.value[n].selectAll=o,onChange:o=>H(n)},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("全选",-1)])]),_:1},8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(d,{size:"small",text:"",onClick:o=>L(n)},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(J.Delete))]),_:1}),a[1]||(a[1]=e.createTextVNode("清空 ",-1))]),_:1},8,["onClick"]),e.createElementVNode("span",re,[a[2]||(a[2]=e.createTextVNode("已选 ",-1)),e.createElementVNode("em",null,e.toDisplayString(t.value[n].selectedValues&&t.value[n].selectedValues.length||0),1),a[3]||(a[3]=e.createTextVNode(" 项",-1))])])):e.createCommentVNode("",!0),e.createElementVNode("div",ue,[c.multiple?(e.openBlock(),e.createBlock(k,{key:0,modelValue:t.value[n].selectedValues,"onUpdate:modelValue":o=>t.value[n].selectedValues=o,onChange:o=>M(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(s,{key:o.value,value:o.value,class:"list-checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):(e.openBlock(),e.createBlock(V,{key:1,modelValue:t.value[n].selectedValue,"onUpdate:modelValue":o=>t.value[n].selectedValue=o,onChange:o=>M(n)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(_,{key:o.value,value:o.value,class:"list-radio"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))])])):c.type==="switch"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("div",ie,[e.createElementVNode("span",ve,e.toDisplayString(c.label||"开关"),1)]),e.createElementVNode("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options,o=>(e.openBlock(),e.createBlock(s,{key:o.value,modelValue:t.value[n][o.value],"onUpdate:modelValue":y=>t.value[n][o.value]=y,onChange:y=>f()},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])])):c.type==="range"&&t.value[n]?(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ke,[e.createElementVNode("span",fe,e.toDisplayString(c.label||"范围设置"),1)]),e.createElementVNode("div",ge,[e.createVNode(C,{modelValue:t.value[n].min,"onUpdate:modelValue":o=>t.value[n].min=o,size:"small",placeholder:c.minPlaceholder||"最小值",class:"range-input",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),a[4]||(a[4]=e.createElementVNode("span",{class:"range-sep"},"~",-1)),e.createVNode(C,{modelValue:t.value[n].max,"onUpdate:modelValue":o=>t.value[n].max=o,size:"small",placeholder:c.maxPlaceholder||"最大值",class:"range-input",onChange:o=>f()},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]),c.unit?(e.openBlock(),e.createElementBlock("span",he,e.toDisplayString(c.unit),1)):e.createCommentVNode("",!0)])])):c.type==="button"?(e.openBlock(),e.createElementBlock("div",Ce,[e.createVNode(d,{size:"small",onClick:o=>O(n),class:"action-btn",type:c.buttonType||"primary"},{default:e.withCtx(()=>[c.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.icon)))]),_:2},1024)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(c.label||"执行操作"),1)]),_:2},1032,["onClick","type"])])):e.createCommentVNode("",!0)],64)}),128)),e.renderSlot(l.$slots,"default",{},void 0,!0)],4)}}})),Ie=E._export_sfc(Ne,[["__scopeId","data-v-60e3fc69"]]);exports.default=Ie;
@@ -19,9 +19,9 @@ import "element-plus/es/components/select/style/css";
19
19
  import "element-plus/es/components/option/style/css";
20
20
  import "element-plus/es/components/button/style/css";
21
21
  import { defineComponent as Le, ref as w, computed as m, watch as E, watchEffect as ze, openBlock as p, createElementBlock as h, normalizeStyle as ie, createElementVNode as _, toDisplayString as R, createVNode as P, withCtx as U, createTextVNode as ue, Fragment as T, renderList as A, createBlock as ce, createCommentVNode as j, renderSlot as Pe } from "vue";
22
- import { l as Ue, _ as je } from "./index-DomNEEyv.js";
22
+ import { l as Ue, _ as je } from "./index-BZpYmpDy.js";
23
23
  import "element-plus";
24
- import { E as Ye } from "./EChartComponentBase-DPWPg81w.js";
24
+ import { E as Ye } from "./EChartComponentBase-i76OGL3z.js";
25
25
  import { A as Be, D as We } from "./ele-lst-icon-CKpeRKmk.js";
26
26
  const Xe = { class: "table-header" }, Ge = { class: "title" }, Ke = { class: "header-right" }, Ze = { class: "row-count" }, qe = {
27
27
  key: 0,