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,4 +1,4 @@
1
- "use strict";var z=Object.defineProperty,q=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var k=(y,s,i)=>s in y?z(y,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[s]=i,w=(y,s)=>{for(var i in s||(s={}))R.call(s,i)&&k(y,i,s[i]);if(N)for(var i of N(s))P.call(s,i)&&k(y,i,s[i]);return y},A=(y,s)=>q(y,I(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio-button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const _=require("./index-Cvu9nAQq.cjs");require("element-plus");const U=require("./EChartComponentBase-BPiPzdtw.cjs");require("./index-CJgyJTvc.cjs");const T=require("./ele-lin-icon-Dke_1AmT.cjs"),$=require("./echarts-BB8O2KSA.cjs"),G={class:"acceleration-chart-wrapper"},W={class:"toolbar"},Q={class:"toolbar-left"},X={class:"toolbar-center"},Z={class:"toolbar-right"},J={class:"chart-header"},K={class:"chart-title"},ee={class:"chart-legend"},te={class:"legend-text"},ae={class:"y-axis-unit"},oe={class:"chart-body"},le=["id"],re={DEFAULT_ICON:T.DEFAULT_ICON,ACTIVE_ICON:T.ACTIVE_ICON,NAME_CN:"加速度监测",NAME_EN:"Acceleration Chart",ORDER:10,PLATFORM:["pc","screen"]},ne={unit:{value:"mm",type:"string",label:"component.accelerationChart.unit"},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},gridLineColor:{value:"#e5e5e5",type:"color",label:"component.accelerationChart.gridLineColor"},points:{value:50,type:"number",label:"component.options.points",min:10,max:200},lineType:{value:"smooth",type:"select",label:"component.accelerationChart.lineType",options:[{label:"平滑曲线",value:"smooth"},{label:"折线",value:"line"},{label:"阶梯线",value:"step"}]},showSymbol:{value:!1,type:"checkbox",label:"component.accelerationChart.showSymbol"},lineWidth:{value:1.5,type:"number",label:"component.accelerationChart.lineWidth",min:1,max:5},yMax:{value:30,type:"number",label:"component.line.yMax"},yMin:{value:-20,type:"number",label:"component.line.yMin"},areaList:{value:"内排,外排,边坡,平台",type:"string",label:"component.accelerationChart.areaList"}},se=[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}],ce=["name","area","object_id","curves"],ie=["name","fv","color"],ue=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],de={useAlias:!1,multiObject:!0,source:"mosaic"},me={DEFAULT:re,OPTIONS:ne,DATA:se,PARAMS:ce,SOURCE:ue,COMMON:de,CURVE_PARAMS:ie},fe=t.defineComponent(A(w({},me),{__name:"accelerationChart",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(y){t.useCssVars(o=>({v5223c71b:t.unref(V).bgColor,v2166d81a:t.unref(V).textColor}));const s=y,i=t.ref(""),M=t.computed(()=>{var l,c,d,m;const o=((l=s.conf)==null?void 0:l.data)||[],e=new Set;return o.forEach(n=>{n.area&&e.add(n.area)}),e.size===0?(((m=(d=(c=s.conf)==null?void 0:c.options)==null?void 0:d.areaList)==null?void 0:m.value)||"内排,外排,边坡,平台").split(",").map(r=>r.trim()).filter(r=>r):Array.from(e)});t.watch(M,o=>{o.length>0&&!i.value&&(i.value=o[0])},{immediate:!0});const H=()=>{console.log("区域切换:",i.value);const o=E.value;o.length>0?v.value=o[0].value:v.value="",S()},v=t.ref(""),E=t.computed(()=>{var l;return(((l=s.conf)==null?void 0:l.data)||[]).filter(c=>c.area?c.area===i.value:!0).map(c=>({label:c.name,value:c.name}))});t.watch(E,o=>{o.length>0&&!v.value&&(v.value=o[0].value)},{immediate:!0});const L=t.computed(()=>{var e;const o=((e=s.conf)==null?void 0:e.data)||[];return o.find(l=>l.name===v.value)||o[0]||null}),D=t.computed(()=>{const o=L.value;return o?o.curves||[]:[]}),F=t.ref("7days"),x=t.ref(_.dayjs().subtract(7,"day").format("YYYY-MM-DD HH:mm:ss")),b=t.ref(_.dayjs().format("YYYY-MM-DD HH:mm:ss")),O=o=>{const e=_.dayjs();switch(o){case"today":x.value=e.startOf("day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"7days":x.value=e.subtract(7,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"30days":x.value=e.subtract(30,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break}S()},S=()=>{console.log("查询数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value}),p.updateChartData(D.value)},B=()=>{console.log("导出数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value})};t.watch(v,()=>{p.updateChartData(D.value)});class j extends U.EChartComponentBase{constructor(){super(...arguments),this.historyData=new Map,this.xAxisData=[]}extractStyles(){var l,c,d,m,n,r,a,u,f,h,C;const{options:e}=this.props.conf;return{unit:((l=e==null?void 0:e.unit)==null?void 0:l.value)||"mm",bgColor:((c=e==null?void 0:e.bgColor)==null?void 0:c.value)||"#ffffff",textColor:((d=e==null?void 0:e.textColor)==null?void 0:d.value)||"#333333",gridLineColor:((m=e==null?void 0:e.gridLineColor)==null?void 0:m.value)||"#e5e5e5",points:((n=e==null?void 0:e.points)==null?void 0:n.value)||50,lineType:((r=e==null?void 0:e.lineType)==null?void 0:r.value)||"smooth",showSymbol:(u=(a=e==null?void 0:e.showSymbol)==null?void 0:a.value)!=null?u:!1,lineWidth:((f=e==null?void 0:e.lineWidth)==null?void 0:f.value)||1.5,yMax:((h=e==null?void 0:e.yMax)==null?void 0:h.value)||30,yMin:((C=e==null?void 0:e.yMin)==null?void 0:C.value)||-20}}getDefaultData(){return[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}]}generateMockData(e,l=0,c=15){const d=[];let m=Math.random()*Math.PI*2;for(let n=0;n<e;n++){const r=(Math.random()-.5)*c*.5,a=Math.sin(m+n*.15)*c*.6,u=l+a+r;d.push(parseFloat(u.toFixed(1)))}return d}getChartOption(e=[]){const l=this.extractStyles(),c=l.points;this.xAxisData=_.getxAxisDataTime(c,this.props.mode,!1);const m=(e.length>0?e:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]).map((n,r)=>{const a=`${v.value}_${n.name}`;let u=this.historyData.get(a);if(!u||u.length===0){const h=[15,-12,-11,19,22];u=this.generateMockData(c,h[r]||0,2),this.historyData.set(a,u)}const f={name:n.name,type:"line",symbol:l.showSymbol?"circle":"none",symbolSize:4,data:u,lineStyle:{width:l.lineWidth,color:n.color},itemStyle:{color:n.color}};return l.lineType==="smooth"?f.smooth=!0:(l.lineType==="step"&&(f.step="middle"),f.smooth=!1),f});return{grid:{left:50,right:20,top:20,bottom:70},tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e5e5e5",textStyle:{color:"#333",fontSize:12},formatter:n=>{let r=`<div style="font-weight:bold;margin-bottom:5px">${n[0].axisValue}</div>`;return n.forEach(a=>{r+=`<div style="display:flex;align-items:center;gap:5px">
1
+ "use strict";var z=Object.defineProperty,q=Object.defineProperties;var I=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var k=(y,s,i)=>s in y?z(y,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[s]=i,w=(y,s)=>{for(var i in s||(s={}))R.call(s,i)&&k(y,i,s[i]);if(N)for(var i of N(s))P.call(s,i)&&k(y,i,s[i]);return y},A=(y,s)=>q(y,I(s));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/date-picker/style/css");require("element-plus/es/components/radio-group/style/css");require("element-plus/es/components/radio-button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");const t=require("vue");require("html2canvas");const _=require("./index-77aUdspY.cjs");require("element-plus");const U=require("./EChartComponentBase-D9EUh4BZ.cjs");require("./index-CJgyJTvc.cjs");const T=require("./ele-lin-icon-Dke_1AmT.cjs"),$=require("./echarts-BB8O2KSA.cjs"),G={class:"acceleration-chart-wrapper"},W={class:"toolbar"},Q={class:"toolbar-left"},X={class:"toolbar-center"},Z={class:"toolbar-right"},J={class:"chart-header"},K={class:"chart-title"},ee={class:"chart-legend"},te={class:"legend-text"},ae={class:"y-axis-unit"},oe={class:"chart-body"},le=["id"],re={DEFAULT_ICON:T.DEFAULT_ICON,ACTIVE_ICON:T.ACTIVE_ICON,NAME_CN:"加速度监测",NAME_EN:"Acceleration Chart",ORDER:10,PLATFORM:["pc","screen"]},ne={unit:{value:"mm",type:"string",label:"component.accelerationChart.unit"},bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},gridLineColor:{value:"#e5e5e5",type:"color",label:"component.accelerationChart.gridLineColor"},points:{value:50,type:"number",label:"component.options.points",min:10,max:200},lineType:{value:"smooth",type:"select",label:"component.accelerationChart.lineType",options:[{label:"平滑曲线",value:"smooth"},{label:"折线",value:"line"},{label:"阶梯线",value:"step"}]},showSymbol:{value:!1,type:"checkbox",label:"component.accelerationChart.showSymbol"},lineWidth:{value:1.5,type:"number",label:"component.accelerationChart.lineWidth",min:1,max:5},yMax:{value:30,type:"number",label:"component.line.yMax"},yMin:{value:-20,type:"number",label:"component.line.yMin"},areaList:{value:"内排,外排,边坡,平台",type:"string",label:"component.accelerationChart.areaList"}},se=[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}],ce=["name","area","object_id","curves"],ie=["name","fv","color"],ue=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],de={useAlias:!1,multiObject:!0,source:"mosaic"},me={DEFAULT:re,OPTIONS:ne,DATA:se,PARAMS:ce,SOURCE:ue,COMMON:de,CURVE_PARAMS:ie},fe=t.defineComponent(A(w({},me),{__name:"accelerationChart",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(y){t.useCssVars(o=>({v5223c71b:t.unref(V).bgColor,v2166d81a:t.unref(V).textColor}));const s=y,i=t.ref(""),M=t.computed(()=>{var l,c,d,m;const o=((l=s.conf)==null?void 0:l.data)||[],e=new Set;return o.forEach(n=>{n.area&&e.add(n.area)}),e.size===0?(((m=(d=(c=s.conf)==null?void 0:c.options)==null?void 0:d.areaList)==null?void 0:m.value)||"内排,外排,边坡,平台").split(",").map(r=>r.trim()).filter(r=>r):Array.from(e)});t.watch(M,o=>{o.length>0&&!i.value&&(i.value=o[0])},{immediate:!0});const H=()=>{console.log("区域切换:",i.value);const o=E.value;o.length>0?v.value=o[0].value:v.value="",S()},v=t.ref(""),E=t.computed(()=>{var l;return(((l=s.conf)==null?void 0:l.data)||[]).filter(c=>c.area?c.area===i.value:!0).map(c=>({label:c.name,value:c.name}))});t.watch(E,o=>{o.length>0&&!v.value&&(v.value=o[0].value)},{immediate:!0});const L=t.computed(()=>{var e;const o=((e=s.conf)==null?void 0:e.data)||[];return o.find(l=>l.name===v.value)||o[0]||null}),D=t.computed(()=>{const o=L.value;return o?o.curves||[]:[]}),F=t.ref("7days"),x=t.ref(_.dayjs().subtract(7,"day").format("YYYY-MM-DD HH:mm:ss")),b=t.ref(_.dayjs().format("YYYY-MM-DD HH:mm:ss")),O=o=>{const e=_.dayjs();switch(o){case"today":x.value=e.startOf("day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"7days":x.value=e.subtract(7,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break;case"30days":x.value=e.subtract(30,"day").format("YYYY-MM-DD HH:mm:ss"),b.value=e.format("YYYY-MM-DD HH:mm:ss");break}S()},S=()=>{console.log("查询数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value}),p.updateChartData(D.value)},B=()=>{console.log("导出数据:",{area:i.value,device:v.value,startTime:x.value,endTime:b.value})};t.watch(v,()=>{p.updateChartData(D.value)});class j extends U.EChartComponentBase{constructor(){super(...arguments),this.historyData=new Map,this.xAxisData=[]}extractStyles(){var l,c,d,m,n,r,a,u,f,h,C;const{options:e}=this.props.conf;return{unit:((l=e==null?void 0:e.unit)==null?void 0:l.value)||"mm",bgColor:((c=e==null?void 0:e.bgColor)==null?void 0:c.value)||"#ffffff",textColor:((d=e==null?void 0:e.textColor)==null?void 0:d.value)||"#333333",gridLineColor:((m=e==null?void 0:e.gridLineColor)==null?void 0:m.value)||"#e5e5e5",points:((n=e==null?void 0:e.points)==null?void 0:n.value)||50,lineType:((r=e==null?void 0:e.lineType)==null?void 0:r.value)||"smooth",showSymbol:(u=(a=e==null?void 0:e.showSymbol)==null?void 0:a.value)!=null?u:!1,lineWidth:((f=e==null?void 0:e.lineWidth)==null?void 0:f.value)||1.5,yMax:((h=e==null?void 0:e.yMax)==null?void 0:h.value)||30,yMin:((C=e==null?void 0:e.yMin)==null?void 0:C.value)||-20}}getDefaultData(){return[{name:"GPS01",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS02",area:"内排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]},{name:"GPS03",area:"外排",object_id:"",curves:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]}]}generateMockData(e,l=0,c=15){const d=[];let m=Math.random()*Math.PI*2;for(let n=0;n<e;n++){const r=(Math.random()-.5)*c*.5,a=Math.sin(m+n*.15)*c*.6,u=l+a+r;d.push(parseFloat(u.toFixed(1)))}return d}getChartOption(e=[]){const l=this.extractStyles(),c=l.points;this.xAxisData=_.getxAxisDataTime(c,this.props.mode,!1);const m=(e.length>0?e:[{name:"x加速度",fv:"acc_x",color:"#4169E1"},{name:"y加速度",fv:"acc_y",color:"#32CD32"},{name:"h加速度",fv:"acc_h",color:"#FFD700"},{name:"xy加速度",fv:"acc_xy",color:"#FF4500"},{name:"xyh加速度",fv:"acc_xyh",color:"#1E90FF"}]).map((n,r)=>{const a=`${v.value}_${n.name}`;let u=this.historyData.get(a);if(!u||u.length===0){const h=[15,-12,-11,19,22];u=this.generateMockData(c,h[r]||0,2),this.historyData.set(a,u)}const f={name:n.name,type:"line",symbol:l.showSymbol?"circle":"none",symbolSize:4,data:u,lineStyle:{width:l.lineWidth,color:n.color},itemStyle:{color:n.color}};return l.lineType==="smooth"?f.smooth=!0:(l.lineType==="step"&&(f.step="middle"),f.smooth=!1),f});return{grid:{left:50,right:20,top:20,bottom:70},tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#e5e5e5",textStyle:{color:"#333",fontSize:12},formatter:n=>{let r=`<div style="font-weight:bold;margin-bottom:5px">${n[0].axisValue}</div>`;return n.forEach(a=>{r+=`<div style="display:flex;align-items:center;gap:5px">
2
2
  ${a.marker}
3
3
  <span>${a.seriesName}:</span>
4
4
  <span style="font-weight:bold">${a.value} ${l.unit}</span>
@@ -1,8 +1,8 @@
1
- var J = Object.defineProperty, ee = Object.defineProperties;
1
+ var K = Object.defineProperty, ee = Object.defineProperties;
2
2
  var te = Object.getOwnPropertyDescriptors;
3
3
  var N = Object.getOwnPropertySymbols;
4
4
  var ae = Object.prototype.hasOwnProperty, oe = Object.prototype.propertyIsEnumerable;
5
- var I = (y, s, c) => s in y ? J(y, s, { enumerable: !0, configurable: !0, writable: !0, value: c }) : y[s] = c, P = (y, s) => {
5
+ var I = (y, s, c) => s in y ? K(y, s, { enumerable: !0, configurable: !0, writable: !0, value: c }) : y[s] = c, P = (y, s) => {
6
6
  for (var c in s || (s = {}))
7
7
  ae.call(s, c) && I(y, c, s[c]);
8
8
  if (N)
@@ -20,9 +20,9 @@ import "element-plus/es/components/select/style/css";
20
20
  import "element-plus/es/components/option/style/css";
21
21
  import { defineComponent as ue, useCssVars as me, unref as A, ref as M, computed as k, watch as Y, onMounted as de, nextTick as $, openBlock as g, createElementBlock as F, createElementVNode as m, createVNode as x, withCtx as b, Fragment as L, renderList as O, createBlock as G, createTextVNode as E, toDisplayString as T, normalizeStyle as W, renderSlot as fe } from "vue";
22
22
  import "html2canvas";
23
- import { d as z, K as he, L as ve, E as ye, _ as pe } from "./index-DomNEEyv.js";
23
+ import { d as z, L as he, N as ve, G as ye, _ as pe } from "./index-BZpYmpDy.js";
24
24
  import "element-plus";
25
- import { E as xe } from "./EChartComponentBase-DPWPg81w.js";
25
+ import { E as xe } from "./EChartComponentBase-i76OGL3z.js";
26
26
  import "./index-eIsZnzkc.js";
27
27
  import { A as be, D as _e } from "./ele-lin-icon-Dax-ZiWV.js";
28
28
  import { i as De } from "./echarts-Bp7QN4X6.js";
@@ -110,7 +110,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
110
110
  Y(j, (a) => {
111
111
  a.length > 0 && !c.value && (c.value = a[0]);
112
112
  }, { immediate: !0 });
113
- const K = () => {
113
+ const Q = () => {
114
114
  console.log("区域切换:", c.value);
115
115
  const a = w.value;
116
116
  a.length > 0 ? v.value = a[0].value : v.value = "", H();
@@ -124,14 +124,14 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
124
124
  Y(w, (a) => {
125
125
  a.length > 0 && !v.value && (v.value = a[0].value);
126
126
  }, { immediate: !0 });
127
- const Q = k(() => {
127
+ const X = k(() => {
128
128
  var e;
129
129
  const a = ((e = s.conf) == null ? void 0 : e.data) || [];
130
130
  return a.find((o) => o.name === v.value) || a[0] || null;
131
131
  }), C = k(() => {
132
- const a = Q.value;
132
+ const a = X.value;
133
133
  return a ? a.curves || [] : [];
134
- }), R = M("7days"), _ = M(z().subtract(7, "day").format("YYYY-MM-DD HH:mm:ss")), D = M(z().format("YYYY-MM-DD HH:mm:ss")), X = (a) => {
134
+ }), R = M("7days"), _ = M(z().subtract(7, "day").format("YYYY-MM-DD HH:mm:ss")), D = M(z().format("YYYY-MM-DD HH:mm:ss")), Z = (a) => {
135
135
  const e = z();
136
136
  switch (a) {
137
137
  case "today":
@@ -147,13 +147,13 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
147
147
  H();
148
148
  }, H = () => {
149
149
  console.log("查询数据:", { area: c.value, device: v.value, startTime: _.value, endTime: D.value }), p.updateChartData(C.value);
150
- }, Z = () => {
150
+ }, q = () => {
151
151
  console.log("导出数据:", { area: c.value, device: v.value, startTime: _.value, endTime: D.value });
152
152
  };
153
153
  Y(v, () => {
154
154
  p.updateChartData(C.value);
155
155
  });
156
- class q extends xe {
156
+ class J extends xe {
157
157
  constructor() {
158
158
  super(...arguments), this.historyData = /* @__PURE__ */ new Map(), this.xAxisData = [];
159
159
  }
@@ -409,7 +409,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
409
409
  this.chartObj && this.chartObj.setOption(this.getChartOption(e), !0);
410
410
  }
411
411
  }
412
- const p = new q(s, "accelerationChart");
412
+ const p = new J(s, "accelerationChart");
413
413
  (!s.conf.data || s.conf.data.length === 0) && (s.conf.data = p.getDefaultData()), p.setupLifecycle();
414
414
  const V = p.getStyle(), B = p.getEchartId();
415
415
  return de(() => {
@@ -441,7 +441,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
441
441
  "onUpdate:modelValue": e[0] || (e[0] = (t) => c.value = t),
442
442
  class: "area-select",
443
443
  size: "small",
444
- onChange: K
444
+ onChange: Q
445
445
  }, {
446
446
  default: b(() => [
447
447
  (g(!0), F(L, null, O(j.value, (t) => (g(), G(o, {
@@ -474,7 +474,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
474
474
  modelValue: R.value,
475
475
  "onUpdate:modelValue": e[2] || (e[2] = (t) => R.value = t),
476
476
  size: "small",
477
- onChange: X
477
+ onChange: Z
478
478
  }, {
479
479
  default: b(() => [
480
480
  x(u, { label: "today" }, {
@@ -532,7 +532,7 @@ const ge = { class: "acceleration-chart-wrapper" }, Ce = { class: "toolbar" }, S
532
532
  }),
533
533
  x(l, {
534
534
  size: "small",
535
- onClick: Z
535
+ onClick: q
536
536
  }, {
537
537
  default: b(() => [...e[11] || (e[11] = [
538
538
  E("导出", -1)
@@ -33,8 +33,8 @@ import "element-plus/es/components/empty/style/css";
33
33
  import { reactive as be, ref as z, watch as ke, defineComponent as G, computed as Q, h as f, onMounted as ve, onUnmounted as Ve, watchEffect as De, openBlock as S, createElementBlock as w, normalizeStyle as X, unref as c, createElementVNode as $, toDisplayString as Y, createVNode as V, withCtx as D, createTextVNode as A, createCommentVNode as I, Fragment as Fe, renderList as Oe, createBlock as Z, renderSlot as Se } from "vue";
34
34
  import { ElFormItem as j, ElButton as x, ElInput as C, ElSwitch as ee, ElInputNumber as te, ElSelect as re, ElOption as se, ElDialog as xe, ElMessage as J } from "element-plus";
35
35
  import { Delete as Ee, Plus as we } from "@element-plus/icons-vue";
36
- import { u as Ae, _ as Ce } from "./index-DomNEEyv.js";
37
- import { B as Ie } from "./BaseComponent-BlCsb-HW.js";
36
+ import { u as Ae, _ as Ce } from "./index-BZpYmpDy.js";
37
+ import { B as Ie } from "./BaseComponent-CQaDWNO0.js";
38
38
  import { g as Je } from "./titleStyle-BT5GlpAb.js";
39
39
  import { A as Ne, D as Pe } from "./ele-crd-icon-BXxB7P3T.js";
40
40
  class Te extends Ie {
@@ -1 +1 @@
1
- "use strict";var G=Object.defineProperty,Q=Object.defineProperties;var X=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var A=(k,t,o)=>t in k?G(k,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):k[t]=o,O=(k,t)=>{for(var o in t||(t={}))Y.call(t,o)&&A(k,o,t[o]);if(B)for(var o of B(t))Z.call(t,o)&&A(k,o,t[o]);return k},T=(k,t)=>Q(k,X(t));var J=(k,t,o)=>new Promise((s,n)=>{var i=l=>{try{h(o.next(l))}catch(b){n(b)}},p=l=>{try{h(o.throw(l))}catch(b){n(b)}},h=l=>l.done?s(l.value):Promise.resolve(l.value).then(i,p);h((o=o.apply(k,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/empty/style/css");const e=require("vue"),c=require("element-plus"),$=require("@element-plus/icons-vue"),z=require("./index-Cvu9nAQq.cjs"),ee=require("./BaseComponent-BXAJUoaf.cjs"),te=require("./titleStyle-NSnz6cUg.cjs"),q=require("./ele-crd-icon-BvNgAPKW.cjs");class re extends ee.BaseComponent{constructor(t){super(t,"actionItem"),this.formData=e.reactive({}),this.showJsonEditor=e.ref(!1),this.jsonInput=e.ref("")}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#333"),radiusSize:this.getOptionValue("radiusSize",8),labelWidth:this.getOptionValue("labelWidth",100),isHideTitle:this.getOptionValue("isHideTitle",!1),showButtons:this.getOptionValue("showButtons",!0)}}init(){var o;this.Style.value=this.extractStyles(),this.applyTheme();const t=this.props.conf.data;t&&typeof t=="object"&&((o=t.params)!=null&&o.length)&&this.parseBackendData(t),this.initFormData()}getParams(){var t;return Array.isArray((t=this.props.conf)==null?void 0:t.params)?this.props.conf.params:[]}get hasParams(){return this.getParams().length>0}getVisibleParams(){return this.getParams().filter(t=>t.form_type!=="hidden"&&!this.isFieldHidden(t))}getFormRules(){const t={},o=(s,n="")=>{s.forEach(i=>{const p=n?`${n}.${i.key}`:i.key;if(i.form_type==="sub_form"&&i.properties&&!i.items){o(i.properties,p);return}if(i.form_type==="sub_form"&&i.items)return;const h=this.buildValidationRules(i);h.length&&(t[p]=h)})};return o(this.getParams()),t}initFormData(){var o,s;const t=(s=(o=this.props.conf)==null?void 0:o.data)==null?void 0:s.values;this.getParams().forEach(n=>{t&&t[n.key]!==void 0?this.formData[n.key]=t[n.key]:this.formData[n.key]=this.getDefaultValue(n)})}resetForm(){this.initFormData()}getDefaultValue(t){var o,s;if(t.form_type==="sub_form"&&t.properties&&!t.items){const n={};return t.properties.forEach(i=>{n[i.key]=this.getDefaultValue(i)}),n}return t.form_type==="sub_form"&&t.items?Array.isArray(t.default_value)?t.default_value:[]:t.form_type==="checkbox_group"?Array.isArray(t.default_value)?t.default_value:[]:t.default_value!==null&&t.default_value!==void 0?t.default_value:t.form_type==="switch"?!1:t.form_type==="number"?(s=(o=t.format)==null?void 0:o.min)!=null?s:0:""}buildValidationRules(t){const o=[];t.required&&o.push({required:!0,message:`请输入${t.cn_name}`,trigger:"blur"});const s=t.format;return s&&(s.pattern&&o.push({pattern:new RegExp(s.pattern),message:`${t.cn_name}格式不正确`,trigger:"blur"}),(s.min_length||s.max_length)&&o.push({min:s.min_length,max:s.max_length,message:s.min_length&&s.max_length?`长度在 ${s.min_length} 到 ${s.max_length} 个字符`:s.min_length?`最少 ${s.min_length} 个字符`:`最多 ${s.max_length} 个字符`,trigger:"blur"})),o}isFieldHidden(t){var o,s,n,i;if(!((o=t.rules)!=null&&o.length))return!1;for(const p of t.rules){const h=this.formData[(s=p.related_key)==null?void 0:s.split(".")[0]],l=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((i=l==null?void 0:l.property)!=null&&i.hidden)return!0}return!1}isFieldDisabled(t){var o,s,n,i;if(!((o=t.rules)!=null&&o.length))return!1;for(const p of t.rules){const h=this.formData[(s=p.related_key)==null?void 0:s.split(".")[0]],l=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((i=l==null?void 0:l.property)!=null&&i.disabled)return!0}return!1}getFieldOptions(t){var s,n;let o=t.enum||[];if(t.rules)for(const i of t.rules){if(!i.related_key)continue;const p=this.formData[i.related_key],h=(s=i.conditions)==null?void 0:s.find(l=>l.value===p);if((n=h==null?void 0:h.property)!=null&&n.enum){o=h.property.enum;break}}return o}onFieldChange(t){this.getParams().forEach(o=>{if(o.rules)for(const s of o.rules)s.related_key===t.key&&(this.formData[o.key]=o.form_type==="checkbox_group"?[]:o.form_type==="switch"?!1:"")})}addSubItem(t){var n;Array.isArray(this.formData[t.key])||(this.formData[t.key]=[]);const o=((n=t.items)==null?void 0:n.properties)||t.properties||[],s={};o.forEach(i=>{s[i.key]=this.getDefaultValue(i)}),this.formData[t.key].push(s)}removeSubItem(t,o){var s;(s=this.formData[t])==null||s.splice(o,1)}getSubFieldOptions(t,o){var s,n,i;if((s=t.enum)!=null&&s.length)return t.enum;if(t.rules)for(const p of t.rules){if(!p.related_key)continue;const h=p.related_key.split(".").pop(),l=(n=p.conditions)==null?void 0:n.find(b=>b.value===o[h]);if((i=l==null?void 0:l.property)!=null&&i.enum)return l.property.enum}return[]}onSubFieldChange(t,o,s){var i;(((i=t.items)==null?void 0:i.properties)||t.properties||[]).forEach(p=>{var h;if(p.rules)for(const l of p.rules)((h=l.related_key)==null?void 0:h.split(".").pop())===o.key&&(s[p.key]="")})}applyJson(){try{const t=JSON.parse(this.jsonInput.value);if(t.params&&Array.isArray(t.params))this.props.conf.action_name=t.action_name||"表单",this.props.conf.description=t.description||"",this.props.conf.params=t.params,this.props.conf.data=t,this.initFormData();else if(Array.isArray(t))this.props.conf.params=t,this.props.conf.data={params:t},this.initFormData();else if(t.key&&t.form_type)this.props.conf.params=[t],this.initFormData();else return{success:!1,error:"无法识别的 JSON 格式"};return this.showJsonEditor.value=!1,{success:!0}}catch(t){return{success:!1,error:t.message||"JSON 格式错误"}}}exportTargetJson(){return this.exportToOriginalFormat()}parseBackendData(t){t&&(this.props.conf.action_name=t.action_name,this.props.conf.description=t.description,this.props.conf.params=t.params,this.props.conf.block=t.block,this.props.conf.action=t.action,this.props.conf.data=t,this.initFormData())}serializeToBackend(){return{block:this.props.conf.block,action:this.props.conf.action,params:O({},this.formData),originalFormat:this.exportToOriginalFormat()}}saveFormData(){this.props.conf.data||(this.props.conf.data={}),this.props.conf.data.values=JSON.parse(JSON.stringify(this.formData))}getFullConfig(){return{action_name:this.props.conf.action_name,description:this.props.conf.description,block:this.props.conf.block,action:this.props.conf.action,params:this.props.conf.params}}exportToOriginalFormat(){return this.convertFormDataToOriginal(this.formData,this.getParams())}convertFormDataToOriginal(t,o){const s={};return o.forEach(n=>{var p;const i=t[n.key];n.form_type==="sub_form"?n.properties&&!n.items?s[n.key]=this.convertFormDataToOriginal(i||{},n.properties):(p=n.items)!=null&&p.properties&&(s[n.key]=Array.isArray(i)?i.map(h=>this.convertArrayItemToOriginal(h,n.items.properties)):[]):n.db_type==="boolean"&&typeof i=="boolean"?s[n.key]=i?"true":"false":s[n.key]=i}),s}convertArrayItemToOriginal(t,o){const s={};return o.forEach(n=>{n.form_type==="sub_form"&&n.properties?s[n.key]=this.convertFormDataToOriginal(t[n.key]||{},n.properties):s[n.key]=t[n.key]}),s}setSocketData(t){if(!t)return;const o=t.result||t,s=o.action_item||o;s!=null&&s.params&&this.parseBackendData(s)}watchParams(){e.watch(()=>{var t;return(t=this.props.conf)==null?void 0:t.params},()=>this.initFormData(),{immediate:!0,deep:!0})}}const oe={class:"mix-body"},se={key:0,class:"json-editor"},ne={class:"editor-header"},ae={key:1,class:"edit-toolbar"},le={key:2,class:"empty-state"},ie={key:3,class:"form-content"},ue={key:0,class:"form-description"},ce={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"动态表单",NAME_EN:"ActionItem",ORDER:1,PLATFORM:["pc","screen","mobile"]},de={titleColor:"#111",bgColor:"#fff",radiusSize:8,labelWidth:100,isHideTitle:!1,showButtons:!0},me={},fe=[],pe=[],he={},ye={DEFAULT:ce,OPTIONS:de,DATA:me,PARAMS:fe,SOURCE:pe,COMMON:he},ge=e.defineComponent(T(O({},ye),{__name:"actionItem",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},emits:["submit","generate"],setup(k,{emit:t}){const o=k,s=e.ref(!1),n=e.ref(""),i=t,p=z.useCounterStore(),h=e.ref(),l=new re(o);l.setupLifecycle(),l.watchParams();const b=l.getStyle(),C=e.computed(()=>o.conf||{}),U=e.computed(()=>te.generateTitleStyle(o.conf.options));function N(a,r){return r.split(".").reduce((m,f)=>m==null?void 0:m[f],a)}function w(a,r,m){const f=r.split("."),d=f.pop(),u=f.reduce((_,V)=>((!_[V]||typeof _[V]!="object")&&(_[V]={}),_[V]),a);u[d]=m}function F(a,r,m){var f,d,u;if(!((f=a.rules)!=null&&f.length))return!1;for(const _ of a.rules){const V=_.related_key;if(!V)continue;const E=r?`${r}.${V}`:V,v=N(m,E),g=(d=_.conditions)==null?void 0:d.find(x=>x.value===v);if((u=g==null?void 0:g.property)!=null&&u.hidden)return!0}return!1}const I=e.defineComponent({name:"FormField",props:{param:{type:Object,required:!0},rootData:{type:Object,required:!0},actionItem:{type:Object,required:!0},parentPath:{type:String,default:""}},setup(a){var E;const r=a.param,m=a.rootData,f=a.actionItem,d=r.key,u=a.parentPath?`${a.parentPath}.${d}`:d,_=r.form_type==="sub_form"&&r.properties&&!r.items,V=r.form_type==="sub_form"&&((E=r.items)==null?void 0:E.properties);return()=>{if(F(r,a.parentPath,m))return null;if(_){let g=N(m,u);(!g||typeof g!="object"||Array.isArray(g))&&w(m,u,{});const x=r.properties.filter(y=>!F(y,u,m));return e.h("div",{class:"nested-group"},[e.h("div",{class:"nested-title"},r.cn_name),e.h("div",{class:"nested-content"},x.map(y=>e.h(I,{param:y,rootData:m,actionItem:f,key:y.key,parentPath:u})))])}if(V){let g=N(m,u);Array.isArray(g)||(w(m,u,[]),g=N(m,u));const x=r.items.properties;return e.h(c.ElFormItem,{label:r.cn_name},()=>[e.h("div",{class:"sub-form"},[...g.map((y,D)=>e.h("div",{class:"sub-item",key:D},[e.h("div",{class:"sub-fields"},x.map(S=>e.h("div",{class:"sub-field",key:S.key},[e.h("span",{class:"sub-label"},[S.required?e.h("span",{class:"required-star"},"*"):null,S.cn_name]),j(S,y,f)]))),e.h(c.ElButton,{type:"danger",icon:$.Delete,circle:!0,size:"small",onClick:()=>g.splice(D,1)})])),e.h(c.ElButton,{type:"primary",icon:$.Plus,onClick:()=>{const y={};x.forEach(D=>{y[D.key]=M(D)}),g.push(y)}},()=>"添加")])])}const v={label:r.cn_name,prop:u};return r.required&&(v.rules=[{required:!0,message:`请输入${r.cn_name}`,trigger:"blur"}]),e.h(c.ElFormItem,v,()=>R(r,u,m,f))}}});function R(a,r,m,f){var V,E;const d=f.isFieldDisabled(a),u=N(m,r),_=v=>w(m,r,v);switch(a.form_type){case"text":return e.h(c.ElInput,{modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:a.description||`请输入${a.cn_name}`,disabled:d,size:"small"});case"textarea":return e.h(c.ElInput,{type:"textarea",modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:a.description,disabled:d,rows:3});case"select":return e.h(c.ElSelect,{modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:`请选择${a.cn_name}`,disabled:d,style:"width:100%",size:"small"},()=>(a.enum||[]).map(g=>e.h(c.ElOption,{key:g.value,label:g.cn_name,value:g.value})));case"number":return e.h(c.ElInputNumber,{modelValue:u!=null?u:0,"onUpdate:modelValue":_,disabled:d,min:(V=a.format)==null?void 0:V.min,max:(E=a.format)==null?void 0:E.max,style:"width:100%",size:"small"});case"switch":const v=u===!0||u==="true";return e.h(c.ElSwitch,{modelValue:v,"onUpdate:modelValue":_,disabled:d});default:return e.h(c.ElInput,{modelValue:u!=null?u:"","onUpdate:modelValue":_,disabled:d,size:"small"})}}function j(a,r,m){var u,_,V,E,v,g;const f=a.key,d=m.isFieldDisabled(a);switch(a.form_type){case"text":return e.h(c.ElInput,{modelValue:(u=r[f])!=null?u:"","onUpdate:modelValue":y=>r[f]=y,placeholder:a.description||`请输入${a.cn_name}`,disabled:d,size:"small"});case"select":return e.h(c.ElSelect,{modelValue:(_=r[f])!=null?_:"","onUpdate:modelValue":y=>r[f]=y,placeholder:`请选择${a.cn_name}`,disabled:d,style:"width:100%",size:"small"},()=>(a.enum||[]).map(y=>e.h(c.ElOption,{key:y.value,label:y.cn_name,value:y.value})));case"number":return e.h(c.ElInputNumber,{modelValue:(V=r[f])!=null?V:0,"onUpdate:modelValue":y=>r[f]=y,disabled:d,min:(E=a.format)==null?void 0:E.min,max:(v=a.format)==null?void 0:v.max,style:"width:100%",size:"small"});case"switch":const x=r[f]===!0||r[f]==="true";return e.h(c.ElSwitch,{modelValue:x,"onUpdate:modelValue":y=>r[f]=y,disabled:d});default:return e.h(c.ElInput,{modelValue:(g=r[f])!=null?g:"","onUpdate:modelValue":y=>r[f]=y,disabled:d,size:"small"})}}function M(a){var r,m;return a.default_value!==void 0?a.default_value:a.form_type==="switch"?!1:a.form_type==="checkbox_group"?[]:a.form_type==="number"?(m=(r=a.format)==null?void 0:r.min)!=null?m:0:""}const H=()=>{const a=l.applyJson();a.success?c.ElMessage.success("JSON 配置已应用"):c.ElMessage.error(a.error||"JSON 格式错误")},L=()=>{l.saveFormData(),c.ElMessage.success("保存成功")},W=()=>J(null,null,function*(){var a;try{yield(a=h.value)==null?void 0:a.validate();const r=l.exportTargetJson();n.value=JSON.stringify(r,null,2),s.value=!0,i("generate",r)}catch(r){c.ElMessage.error("请先完善必填项")}}),K=()=>{try{const a=document.createElement("textarea");a.value=n.value,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),c.ElMessage.success("已复制到剪贴板")}catch(a){c.ElMessage.error("复制失败")}};return e.onMounted(()=>{p.registerInstance(o.uid,l)}),e.onUnmounted(()=>{p.unregisterInstance(o.uid)}),e.watchEffect(()=>{o.conf.socketData&&l.setSocketData(o.conf.socketData)}),(a,r)=>{const m=P.ElEmpty,f=P.ElForm;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(b).bgColor,borderRadius:e.unref(b).radiusSize+"px"})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(U.value)},e.toDisplayString(C.value.action_name||C.value.caption||C.value.name),5),e.createElementVNode("div",oe,[k.mode==="edit"&&e.unref(l).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",ne,[r[8]||(r[8]=e.createElementVNode("span",null,"JSON 配置",-1)),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:H},{default:e.withCtx(()=>[...r[6]||(r[6]=[e.createTextVNode("应用",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:r[0]||(r[0]=d=>e.unref(l).showJsonEditor.value=!1)},{default:e.withCtx(()=>[...r[7]||(r[7]=[e.createTextVNode("关闭",-1)])]),_:1})]),e.createVNode(e.unref(c.ElInput),{type:"textarea",modelValue:e.unref(l).jsonInput.value,"onUpdate:modelValue":r[1]||(r[1]=d=>e.unref(l).jsonInput.value=d),rows:12,placeholder:"粘贴 action_item JSON..."},null,8,["modelValue"])])):e.createCommentVNode("",!0),k.mode==="edit"&&!e.unref(l).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(c.ElButton),{size:"small",type:"primary",onClick:r[2]||(r[2]=d=>e.unref(l).showJsonEditor.value=!0)},{default:e.withCtx(()=>[...r[9]||(r[9]=[e.createTextVNode("编辑 JSON",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(c.ElDialog),{modelValue:s.value,"onUpdate:modelValue":r[5]||(r[5]=d=>s.value=d),title:"生成的目标JSON",width:"600px","close-on-click-modal":!1},{footer:e.withCtx(()=>[e.createVNode(e.unref(c.ElButton),{onClick:K},{default:e.withCtx(()=>[...r[10]||(r[10]=[e.createTextVNode("复制",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:r[4]||(r[4]=d=>s.value=!1)},{default:e.withCtx(()=>[...r[11]||(r[11]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(c.ElInput),{type:"textarea",modelValue:n.value,"onUpdate:modelValue":r[3]||(r[3]=d=>n.value=d),rows:16,readonly:""},null,8,["modelValue"])]),_:1},8,["modelValue"]),!e.unref(l).hasParams&&k.mode!=="edit"?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(m,{description:"等待表单配置...","image-size":80})])):e.createCommentVNode("",!0),e.unref(l).hasParams?(e.openBlock(),e.createElementBlock("div",ie,[C.value.description?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("p",null,e.toDisplayString(C.value.description),1)])):e.createCommentVNode("",!0),e.createVNode(f,{ref_key:"formRef",ref:h,model:e.unref(l).formData,rules:e.unref(l).getFormRules(),"label-width":e.unref(b).labelWidth+"px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).getVisibleParams(),d=>(e.openBlock(),e.createBlock(e.unref(I),{key:d.key,param:d,rootData:e.unref(l).formData,actionItem:e.unref(l)},null,8,["param","rootData","actionItem"]))),128)),e.unref(b).showButtons?(e.openBlock(),e.createBlock(e.unref(c.ElFormItem),{key:0,class:"form-buttons"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:L},{default:e.withCtx(()=>[...r[12]||(r[12]=[e.createTextVNode("保存",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"success",onClick:W},{default:e.withCtx(()=>[...r[13]||(r[13]=[e.createTextVNode("生成JSON",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model","rules","label-width"])])):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)}}})),_e=z._export_sfc(ge,[["__scopeId","data-v-87fa7bd9"]]);exports.default=_e;
1
+ "use strict";var G=Object.defineProperty,Q=Object.defineProperties;var X=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var A=(k,t,o)=>t in k?G(k,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):k[t]=o,O=(k,t)=>{for(var o in t||(t={}))Y.call(t,o)&&A(k,o,t[o]);if(B)for(var o of B(t))Z.call(t,o)&&A(k,o,t[o]);return k},T=(k,t)=>Q(k,X(t));var J=(k,t,o)=>new Promise((s,n)=>{var i=l=>{try{h(o.next(l))}catch(b){n(b)}},p=l=>{try{h(o.throw(l))}catch(b){n(b)}},h=l=>l.done?s(l.value):Promise.resolve(l.value).then(i,p);h((o=o.apply(k,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/empty/style/css");const e=require("vue"),c=require("element-plus"),$=require("@element-plus/icons-vue"),z=require("./index-77aUdspY.cjs"),ee=require("./BaseComponent-BmhMoM4H.cjs"),te=require("./titleStyle-NSnz6cUg.cjs"),q=require("./ele-crd-icon-BvNgAPKW.cjs");class re extends ee.BaseComponent{constructor(t){super(t,"actionItem"),this.formData=e.reactive({}),this.showJsonEditor=e.ref(!1),this.jsonInput=e.ref("")}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#333"),radiusSize:this.getOptionValue("radiusSize",8),labelWidth:this.getOptionValue("labelWidth",100),isHideTitle:this.getOptionValue("isHideTitle",!1),showButtons:this.getOptionValue("showButtons",!0)}}init(){var o;this.Style.value=this.extractStyles(),this.applyTheme();const t=this.props.conf.data;t&&typeof t=="object"&&((o=t.params)!=null&&o.length)&&this.parseBackendData(t),this.initFormData()}getParams(){var t;return Array.isArray((t=this.props.conf)==null?void 0:t.params)?this.props.conf.params:[]}get hasParams(){return this.getParams().length>0}getVisibleParams(){return this.getParams().filter(t=>t.form_type!=="hidden"&&!this.isFieldHidden(t))}getFormRules(){const t={},o=(s,n="")=>{s.forEach(i=>{const p=n?`${n}.${i.key}`:i.key;if(i.form_type==="sub_form"&&i.properties&&!i.items){o(i.properties,p);return}if(i.form_type==="sub_form"&&i.items)return;const h=this.buildValidationRules(i);h.length&&(t[p]=h)})};return o(this.getParams()),t}initFormData(){var o,s;const t=(s=(o=this.props.conf)==null?void 0:o.data)==null?void 0:s.values;this.getParams().forEach(n=>{t&&t[n.key]!==void 0?this.formData[n.key]=t[n.key]:this.formData[n.key]=this.getDefaultValue(n)})}resetForm(){this.initFormData()}getDefaultValue(t){var o,s;if(t.form_type==="sub_form"&&t.properties&&!t.items){const n={};return t.properties.forEach(i=>{n[i.key]=this.getDefaultValue(i)}),n}return t.form_type==="sub_form"&&t.items?Array.isArray(t.default_value)?t.default_value:[]:t.form_type==="checkbox_group"?Array.isArray(t.default_value)?t.default_value:[]:t.default_value!==null&&t.default_value!==void 0?t.default_value:t.form_type==="switch"?!1:t.form_type==="number"?(s=(o=t.format)==null?void 0:o.min)!=null?s:0:""}buildValidationRules(t){const o=[];t.required&&o.push({required:!0,message:`请输入${t.cn_name}`,trigger:"blur"});const s=t.format;return s&&(s.pattern&&o.push({pattern:new RegExp(s.pattern),message:`${t.cn_name}格式不正确`,trigger:"blur"}),(s.min_length||s.max_length)&&o.push({min:s.min_length,max:s.max_length,message:s.min_length&&s.max_length?`长度在 ${s.min_length} 到 ${s.max_length} 个字符`:s.min_length?`最少 ${s.min_length} 个字符`:`最多 ${s.max_length} 个字符`,trigger:"blur"})),o}isFieldHidden(t){var o,s,n,i;if(!((o=t.rules)!=null&&o.length))return!1;for(const p of t.rules){const h=this.formData[(s=p.related_key)==null?void 0:s.split(".")[0]],l=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((i=l==null?void 0:l.property)!=null&&i.hidden)return!0}return!1}isFieldDisabled(t){var o,s,n,i;if(!((o=t.rules)!=null&&o.length))return!1;for(const p of t.rules){const h=this.formData[(s=p.related_key)==null?void 0:s.split(".")[0]],l=(n=p.conditions)==null?void 0:n.find(b=>b.value===h);if((i=l==null?void 0:l.property)!=null&&i.disabled)return!0}return!1}getFieldOptions(t){var s,n;let o=t.enum||[];if(t.rules)for(const i of t.rules){if(!i.related_key)continue;const p=this.formData[i.related_key],h=(s=i.conditions)==null?void 0:s.find(l=>l.value===p);if((n=h==null?void 0:h.property)!=null&&n.enum){o=h.property.enum;break}}return o}onFieldChange(t){this.getParams().forEach(o=>{if(o.rules)for(const s of o.rules)s.related_key===t.key&&(this.formData[o.key]=o.form_type==="checkbox_group"?[]:o.form_type==="switch"?!1:"")})}addSubItem(t){var n;Array.isArray(this.formData[t.key])||(this.formData[t.key]=[]);const o=((n=t.items)==null?void 0:n.properties)||t.properties||[],s={};o.forEach(i=>{s[i.key]=this.getDefaultValue(i)}),this.formData[t.key].push(s)}removeSubItem(t,o){var s;(s=this.formData[t])==null||s.splice(o,1)}getSubFieldOptions(t,o){var s,n,i;if((s=t.enum)!=null&&s.length)return t.enum;if(t.rules)for(const p of t.rules){if(!p.related_key)continue;const h=p.related_key.split(".").pop(),l=(n=p.conditions)==null?void 0:n.find(b=>b.value===o[h]);if((i=l==null?void 0:l.property)!=null&&i.enum)return l.property.enum}return[]}onSubFieldChange(t,o,s){var i;(((i=t.items)==null?void 0:i.properties)||t.properties||[]).forEach(p=>{var h;if(p.rules)for(const l of p.rules)((h=l.related_key)==null?void 0:h.split(".").pop())===o.key&&(s[p.key]="")})}applyJson(){try{const t=JSON.parse(this.jsonInput.value);if(t.params&&Array.isArray(t.params))this.props.conf.action_name=t.action_name||"表单",this.props.conf.description=t.description||"",this.props.conf.params=t.params,this.props.conf.data=t,this.initFormData();else if(Array.isArray(t))this.props.conf.params=t,this.props.conf.data={params:t},this.initFormData();else if(t.key&&t.form_type)this.props.conf.params=[t],this.initFormData();else return{success:!1,error:"无法识别的 JSON 格式"};return this.showJsonEditor.value=!1,{success:!0}}catch(t){return{success:!1,error:t.message||"JSON 格式错误"}}}exportTargetJson(){return this.exportToOriginalFormat()}parseBackendData(t){t&&(this.props.conf.action_name=t.action_name,this.props.conf.description=t.description,this.props.conf.params=t.params,this.props.conf.block=t.block,this.props.conf.action=t.action,this.props.conf.data=t,this.initFormData())}serializeToBackend(){return{block:this.props.conf.block,action:this.props.conf.action,params:O({},this.formData),originalFormat:this.exportToOriginalFormat()}}saveFormData(){this.props.conf.data||(this.props.conf.data={}),this.props.conf.data.values=JSON.parse(JSON.stringify(this.formData))}getFullConfig(){return{action_name:this.props.conf.action_name,description:this.props.conf.description,block:this.props.conf.block,action:this.props.conf.action,params:this.props.conf.params}}exportToOriginalFormat(){return this.convertFormDataToOriginal(this.formData,this.getParams())}convertFormDataToOriginal(t,o){const s={};return o.forEach(n=>{var p;const i=t[n.key];n.form_type==="sub_form"?n.properties&&!n.items?s[n.key]=this.convertFormDataToOriginal(i||{},n.properties):(p=n.items)!=null&&p.properties&&(s[n.key]=Array.isArray(i)?i.map(h=>this.convertArrayItemToOriginal(h,n.items.properties)):[]):n.db_type==="boolean"&&typeof i=="boolean"?s[n.key]=i?"true":"false":s[n.key]=i}),s}convertArrayItemToOriginal(t,o){const s={};return o.forEach(n=>{n.form_type==="sub_form"&&n.properties?s[n.key]=this.convertFormDataToOriginal(t[n.key]||{},n.properties):s[n.key]=t[n.key]}),s}setSocketData(t){if(!t)return;const o=t.result||t,s=o.action_item||o;s!=null&&s.params&&this.parseBackendData(s)}watchParams(){e.watch(()=>{var t;return(t=this.props.conf)==null?void 0:t.params},()=>this.initFormData(),{immediate:!0,deep:!0})}}const oe={class:"mix-body"},se={key:0,class:"json-editor"},ne={class:"editor-header"},ae={key:1,class:"edit-toolbar"},le={key:2,class:"empty-state"},ie={key:3,class:"form-content"},ue={key:0,class:"form-description"},ce={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"动态表单",NAME_EN:"ActionItem",ORDER:1,PLATFORM:["pc","screen","mobile"]},de={titleColor:"#111",bgColor:"#fff",radiusSize:8,labelWidth:100,isHideTitle:!1,showButtons:!0},me={},fe=[],pe=[],he={},ye={DEFAULT:ce,OPTIONS:de,DATA:me,PARAMS:fe,SOURCE:pe,COMMON:he},ge=e.defineComponent(T(O({},ye),{__name:"actionItem",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},emits:["submit","generate"],setup(k,{emit:t}){const o=k,s=e.ref(!1),n=e.ref(""),i=t,p=z.useCounterStore(),h=e.ref(),l=new re(o);l.setupLifecycle(),l.watchParams();const b=l.getStyle(),C=e.computed(()=>o.conf||{}),U=e.computed(()=>te.generateTitleStyle(o.conf.options));function N(a,r){return r.split(".").reduce((m,f)=>m==null?void 0:m[f],a)}function w(a,r,m){const f=r.split("."),d=f.pop(),u=f.reduce((_,V)=>((!_[V]||typeof _[V]!="object")&&(_[V]={}),_[V]),a);u[d]=m}function F(a,r,m){var f,d,u;if(!((f=a.rules)!=null&&f.length))return!1;for(const _ of a.rules){const V=_.related_key;if(!V)continue;const E=r?`${r}.${V}`:V,v=N(m,E),g=(d=_.conditions)==null?void 0:d.find(x=>x.value===v);if((u=g==null?void 0:g.property)!=null&&u.hidden)return!0}return!1}const I=e.defineComponent({name:"FormField",props:{param:{type:Object,required:!0},rootData:{type:Object,required:!0},actionItem:{type:Object,required:!0},parentPath:{type:String,default:""}},setup(a){var E;const r=a.param,m=a.rootData,f=a.actionItem,d=r.key,u=a.parentPath?`${a.parentPath}.${d}`:d,_=r.form_type==="sub_form"&&r.properties&&!r.items,V=r.form_type==="sub_form"&&((E=r.items)==null?void 0:E.properties);return()=>{if(F(r,a.parentPath,m))return null;if(_){let g=N(m,u);(!g||typeof g!="object"||Array.isArray(g))&&w(m,u,{});const x=r.properties.filter(y=>!F(y,u,m));return e.h("div",{class:"nested-group"},[e.h("div",{class:"nested-title"},r.cn_name),e.h("div",{class:"nested-content"},x.map(y=>e.h(I,{param:y,rootData:m,actionItem:f,key:y.key,parentPath:u})))])}if(V){let g=N(m,u);Array.isArray(g)||(w(m,u,[]),g=N(m,u));const x=r.items.properties;return e.h(c.ElFormItem,{label:r.cn_name},()=>[e.h("div",{class:"sub-form"},[...g.map((y,D)=>e.h("div",{class:"sub-item",key:D},[e.h("div",{class:"sub-fields"},x.map(S=>e.h("div",{class:"sub-field",key:S.key},[e.h("span",{class:"sub-label"},[S.required?e.h("span",{class:"required-star"},"*"):null,S.cn_name]),j(S,y,f)]))),e.h(c.ElButton,{type:"danger",icon:$.Delete,circle:!0,size:"small",onClick:()=>g.splice(D,1)})])),e.h(c.ElButton,{type:"primary",icon:$.Plus,onClick:()=>{const y={};x.forEach(D=>{y[D.key]=M(D)}),g.push(y)}},()=>"添加")])])}const v={label:r.cn_name,prop:u};return r.required&&(v.rules=[{required:!0,message:`请输入${r.cn_name}`,trigger:"blur"}]),e.h(c.ElFormItem,v,()=>R(r,u,m,f))}}});function R(a,r,m,f){var V,E;const d=f.isFieldDisabled(a),u=N(m,r),_=v=>w(m,r,v);switch(a.form_type){case"text":return e.h(c.ElInput,{modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:a.description||`请输入${a.cn_name}`,disabled:d,size:"small"});case"textarea":return e.h(c.ElInput,{type:"textarea",modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:a.description,disabled:d,rows:3});case"select":return e.h(c.ElSelect,{modelValue:u!=null?u:"","onUpdate:modelValue":_,placeholder:`请选择${a.cn_name}`,disabled:d,style:"width:100%",size:"small"},()=>(a.enum||[]).map(g=>e.h(c.ElOption,{key:g.value,label:g.cn_name,value:g.value})));case"number":return e.h(c.ElInputNumber,{modelValue:u!=null?u:0,"onUpdate:modelValue":_,disabled:d,min:(V=a.format)==null?void 0:V.min,max:(E=a.format)==null?void 0:E.max,style:"width:100%",size:"small"});case"switch":const v=u===!0||u==="true";return e.h(c.ElSwitch,{modelValue:v,"onUpdate:modelValue":_,disabled:d});default:return e.h(c.ElInput,{modelValue:u!=null?u:"","onUpdate:modelValue":_,disabled:d,size:"small"})}}function j(a,r,m){var u,_,V,E,v,g;const f=a.key,d=m.isFieldDisabled(a);switch(a.form_type){case"text":return e.h(c.ElInput,{modelValue:(u=r[f])!=null?u:"","onUpdate:modelValue":y=>r[f]=y,placeholder:a.description||`请输入${a.cn_name}`,disabled:d,size:"small"});case"select":return e.h(c.ElSelect,{modelValue:(_=r[f])!=null?_:"","onUpdate:modelValue":y=>r[f]=y,placeholder:`请选择${a.cn_name}`,disabled:d,style:"width:100%",size:"small"},()=>(a.enum||[]).map(y=>e.h(c.ElOption,{key:y.value,label:y.cn_name,value:y.value})));case"number":return e.h(c.ElInputNumber,{modelValue:(V=r[f])!=null?V:0,"onUpdate:modelValue":y=>r[f]=y,disabled:d,min:(E=a.format)==null?void 0:E.min,max:(v=a.format)==null?void 0:v.max,style:"width:100%",size:"small"});case"switch":const x=r[f]===!0||r[f]==="true";return e.h(c.ElSwitch,{modelValue:x,"onUpdate:modelValue":y=>r[f]=y,disabled:d});default:return e.h(c.ElInput,{modelValue:(g=r[f])!=null?g:"","onUpdate:modelValue":y=>r[f]=y,disabled:d,size:"small"})}}function M(a){var r,m;return a.default_value!==void 0?a.default_value:a.form_type==="switch"?!1:a.form_type==="checkbox_group"?[]:a.form_type==="number"?(m=(r=a.format)==null?void 0:r.min)!=null?m:0:""}const H=()=>{const a=l.applyJson();a.success?c.ElMessage.success("JSON 配置已应用"):c.ElMessage.error(a.error||"JSON 格式错误")},L=()=>{l.saveFormData(),c.ElMessage.success("保存成功")},W=()=>J(null,null,function*(){var a;try{yield(a=h.value)==null?void 0:a.validate();const r=l.exportTargetJson();n.value=JSON.stringify(r,null,2),s.value=!0,i("generate",r)}catch(r){c.ElMessage.error("请先完善必填项")}}),K=()=>{try{const a=document.createElement("textarea");a.value=n.value,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),c.ElMessage.success("已复制到剪贴板")}catch(a){c.ElMessage.error("复制失败")}};return e.onMounted(()=>{p.registerInstance(o.uid,l)}),e.onUnmounted(()=>{p.unregisterInstance(o.uid)}),e.watchEffect(()=>{o.conf.socketData&&l.setSocketData(o.conf.socketData)}),(a,r)=>{const m=P.ElEmpty,f=P.ElForm;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(b).bgColor,borderRadius:e.unref(b).radiusSize+"px"})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(U.value)},e.toDisplayString(C.value.action_name||C.value.caption||C.value.name),5),e.createElementVNode("div",oe,[k.mode==="edit"&&e.unref(l).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",ne,[r[8]||(r[8]=e.createElementVNode("span",null,"JSON 配置",-1)),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:H},{default:e.withCtx(()=>[...r[6]||(r[6]=[e.createTextVNode("应用",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{size:"small",onClick:r[0]||(r[0]=d=>e.unref(l).showJsonEditor.value=!1)},{default:e.withCtx(()=>[...r[7]||(r[7]=[e.createTextVNode("关闭",-1)])]),_:1})]),e.createVNode(e.unref(c.ElInput),{type:"textarea",modelValue:e.unref(l).jsonInput.value,"onUpdate:modelValue":r[1]||(r[1]=d=>e.unref(l).jsonInput.value=d),rows:12,placeholder:"粘贴 action_item JSON..."},null,8,["modelValue"])])):e.createCommentVNode("",!0),k.mode==="edit"&&!e.unref(l).showJsonEditor.value?(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(c.ElButton),{size:"small",type:"primary",onClick:r[2]||(r[2]=d=>e.unref(l).showJsonEditor.value=!0)},{default:e.withCtx(()=>[...r[9]||(r[9]=[e.createTextVNode("编辑 JSON",-1)])]),_:1})])):e.createCommentVNode("",!0),e.createVNode(e.unref(c.ElDialog),{modelValue:s.value,"onUpdate:modelValue":r[5]||(r[5]=d=>s.value=d),title:"生成的目标JSON",width:"600px","close-on-click-modal":!1},{footer:e.withCtx(()=>[e.createVNode(e.unref(c.ElButton),{onClick:K},{default:e.withCtx(()=>[...r[10]||(r[10]=[e.createTextVNode("复制",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:r[4]||(r[4]=d=>s.value=!1)},{default:e.withCtx(()=>[...r[11]||(r[11]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(c.ElInput),{type:"textarea",modelValue:n.value,"onUpdate:modelValue":r[3]||(r[3]=d=>n.value=d),rows:16,readonly:""},null,8,["modelValue"])]),_:1},8,["modelValue"]),!e.unref(l).hasParams&&k.mode!=="edit"?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(m,{description:"等待表单配置...","image-size":80})])):e.createCommentVNode("",!0),e.unref(l).hasParams?(e.openBlock(),e.createElementBlock("div",ie,[C.value.description?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("p",null,e.toDisplayString(C.value.description),1)])):e.createCommentVNode("",!0),e.createVNode(f,{ref_key:"formRef",ref:h,model:e.unref(l).formData,rules:e.unref(l).getFormRules(),"label-width":e.unref(b).labelWidth+"px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).getVisibleParams(),d=>(e.openBlock(),e.createBlock(e.unref(I),{key:d.key,param:d,rootData:e.unref(l).formData,actionItem:e.unref(l)},null,8,["param","rootData","actionItem"]))),128)),e.unref(b).showButtons?(e.openBlock(),e.createBlock(e.unref(c.ElFormItem),{key:0,class:"form-buttons"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.ElButton),{type:"primary",onClick:L},{default:e.withCtx(()=>[...r[12]||(r[12]=[e.createTextVNode("保存",-1)])]),_:1}),e.createVNode(e.unref(c.ElButton),{type:"success",onClick:W},{default:e.withCtx(()=>[...r[13]||(r[13]=[e.createTextVNode("生成JSON",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model","rules","label-width"])])):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)}}})),_e=z._export_sfc(ge,[["__scopeId","data-v-87fa7bd9"]]);exports.default=_e;
@@ -1,2 +1,2 @@
1
- "use strict";var w=Object.defineProperty,V=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var N=(u,o,i)=>o in u?w(u,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[o]=i,z=(u,o)=>{for(var i in o||(o={}))R.call(o,i)&&N(u,i,o[i]);if(I)for(var i of I(o))$.call(o,i)&&N(u,i,o[i]);return u},k=(u,o)=>V(u,q(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");require("html2canvas");const H=require("./index-Cvu9nAQq.cjs");require("element-plus");const P=require("./EChartComponentBase-BPiPzdtw.cjs"),L=require("./ele-lin-icon-Dke_1AmT.cjs"),U={class:"panel-header"},W=["id"],G={DEFAULT_ICON:L.DEFAULT_ICON,ACTIVE_ICON:L.ACTIVE_ICON,NAME_CN:"预警等级",NAME_EN:"Alarm Level Chart",ORDER:12,PLATFORM:["pc","screen"]},J={title:{value:"预警等级",type:"string",label:"标题"},bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},panelBgColor:{value:"#ffffff",type:"color",label:"面板背景色"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleFontSize:{value:16,type:"number",label:"标题字体大小",min:12,max:24},centerFontSize:{value:32,type:"number",label:"中心数字大小",min:18,max:48},level1Color:{value:"#F57676",type:"color",label:"一级告警颜色"},level2Color:{value:"#FFA500",type:"color",label:"二级告警颜色"},level3Color:{value:"#fadb14",type:"color",label:"三级告警颜色"},level4Color:{value:"#66B1FF",type:"color",label:"四级告警颜色"},normalColor:{value:"#67C23A",type:"color",label:"运行正常颜色"},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},K=[{name:"设备1",fv:"alarm_level",fvDeviceName:"",object_id:""}],Q=["object_id","name","fv","fvDeviceName"],X=["mosaic"],Y={useAlias:!1,multiObject:!0,source:"mosaic"},Z=200,ee={DEFAULT:G,OPTIONS:J,DATA:K,PARAMS:Q,SOURCE:X,COMMON:Y,ITEMS:Z},te=l.defineComponent(k(z({},ee),{__name:"alarmLevelChart",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(u){const o=u,i=["一级告警","二级告警","三级告警","四级告警","运行正常"],b=new Map;class j extends P.EChartComponentBase{extractStyles(){var a,s,n,v,f,h,p,_,A,x,O,F,E,M;const e=(a=this.props.conf)==null?void 0:a.options,c=((s=e==null?void 0:e.linkChannel)==null?void 0:s.value)||"gnss",r=((n=e==null?void 0:e.customChannel)==null?void 0:n.value)||"";return{title:((v=e==null?void 0:e.title)==null?void 0:v.value)||"预警等级",bgColor:((f=e==null?void 0:e.bgColor)==null?void 0:f.value)||"#f5f7fa",panelBgColor:((h=e==null?void 0:e.panelBgColor)==null?void 0:h.value)||"#ffffff",textColor:((p=e==null?void 0:e.textColor)==null?void 0:p.value)||"#333333",titleFontSize:((_=e==null?void 0:e.titleFontSize)==null?void 0:_.value)||16,centerFontSize:((A=e==null?void 0:e.centerFontSize)==null?void 0:A.value)||32,level1Color:((x=e==null?void 0:e.level1Color)==null?void 0:x.value)||"#F57676",level2Color:((O=e==null?void 0:e.level2Color)==null?void 0:O.value)||"#FFA500",level3Color:((F=e==null?void 0:e.level3Color)==null?void 0:F.value)||"#fadb14",level4Color:((E=e==null?void 0:e.level4Color)==null?void 0:E.value)||"#66B1FF",normalColor:((M=e==null?void 0:e.normalColor)==null?void 0:M.value)||"#67C23A",linkChannel:c==="custom"&&r?r:c}}getChartOption(){return C(this.Style.value)}setHistoryData(e){var r;if(!e||!this.chartObj)return;const c=((r=this.props.conf)==null?void 0:r.data)||[];!Array.isArray(c)||!c.length||(c.forEach((a,s)=>{if(!a.fv)return;const n=Array.isArray(e)?e[s]:null,v=Array.isArray(n)&&n.length?n[0]:null;if(!v)return;const f=v[a.fv];if(f==null)return;const h=Math.min(Math.max(typeof f=="number"?Math.round(f):Math.round(parseFloat(String(f)))||0,0),4),p=a.object_id||a.name||"";p&&b.set(p,h)}),this.chartObj.setOption(C(this.Style.value),!0))}setSocketData(e){var r;if(!e)return;(((r=this.props.conf)==null?void 0:r.data)||[]).forEach(a=>{if(!a.fv)return;const s=a.object_id||a.name||"";if(!s)return;const n=this.extractDataValue(e,a.fv);if(n!=null){const v=typeof n=="number"?Math.min(Math.max(Math.round(n),0),4):4;b.set(s,v)}}),this.chartObj&&this.chartObj.setOption(C(this.Style.value),!0)}onLinkEvent(e){}}const m=new j(o,"alarmLevelChart");m.setupLifecycle();const d=m.getStyle(),D=m.getEchartId(),y=l.computed(()=>{var t;return((t=o.conf)==null?void 0:t.data)||[]}),g=l.computed(()=>{const t=[0,0,0,0,0];return y.value.length===0&&o.mode==="edit"?[2,5,5,4,7]:(y.value.forEach(e=>{const c=e.object_id||e.name||"",r=b.get(c),a=typeof r=="number"?r:4;t[a]++}),t)}),T=l.computed(()=>{const t=g.value;for(let e=0;e<5;e++)if(t[e]>0)return{idx:e,count:t[e],name:i[e]};return{idx:4,count:0,name:"运行正常"}}),B=l.computed(()=>({backgroundColor:d.value.bgColor})),C=t=>{const e=g.value,c=[t.level1Color,t.level2Color,t.level3Color,t.level4Color,t.normalColor],r=T.value,a=c[r.idx];return{backgroundColor:"transparent",tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},legend:{orient:"vertical",right:"5%",top:"middle",itemWidth:10,itemHeight:10,itemGap:14,textStyle:{fontSize:13,color:t.textColor},formatter:s=>{const n=i.indexOf(s);return`${s} ${n>=0?e[n]:0}`}},series:[{type:"pie",radius:["48%","70%"],center:["30%","50%"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:()=>`{num|${r.count}}
1
+ "use strict";var w=Object.defineProperty,V=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var N=(u,o,i)=>o in u?w(u,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[o]=i,z=(u,o)=>{for(var i in o||(o={}))R.call(o,i)&&N(u,i,o[i]);if(I)for(var i of I(o))$.call(o,i)&&N(u,i,o[i]);return u},k=(u,o)=>V(u,q(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");require("html2canvas");const H=require("./index-77aUdspY.cjs");require("element-plus");const P=require("./EChartComponentBase-D9EUh4BZ.cjs"),L=require("./ele-lin-icon-Dke_1AmT.cjs"),U={class:"panel-header"},W=["id"],G={DEFAULT_ICON:L.DEFAULT_ICON,ACTIVE_ICON:L.ACTIVE_ICON,NAME_CN:"预警等级",NAME_EN:"Alarm Level Chart",ORDER:12,PLATFORM:["pc","screen"]},J={title:{value:"预警等级",type:"string",label:"标题"},bgColor:{value:"#f5f7fa",type:"color",label:"setting.bgColor"},panelBgColor:{value:"#ffffff",type:"color",label:"面板背景色"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},titleFontSize:{value:16,type:"number",label:"标题字体大小",min:12,max:24},centerFontSize:{value:32,type:"number",label:"中心数字大小",min:18,max:48},level1Color:{value:"#F57676",type:"color",label:"一级告警颜色"},level2Color:{value:"#FFA500",type:"color",label:"二级告警颜色"},level3Color:{value:"#fadb14",type:"color",label:"三级告警颜色"},level4Color:{value:"#66B1FF",type:"color",label:"四级告警颜色"},normalColor:{value:"#67C23A",type:"color",label:"运行正常颜色"},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},K=[{name:"设备1",fv:"alarm_level",fvDeviceName:"",object_id:""}],Q=["object_id","name","fv","fvDeviceName"],X=["mosaic"],Y={useAlias:!1,multiObject:!0,source:"mosaic"},Z=200,ee={DEFAULT:G,OPTIONS:J,DATA:K,PARAMS:Q,SOURCE:X,COMMON:Y,ITEMS:Z},te=l.defineComponent(k(z({},ee),{__name:"alarmLevelChart",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(u){const o=u,i=["一级告警","二级告警","三级告警","四级告警","运行正常"],b=new Map;class j extends P.EChartComponentBase{extractStyles(){var a,s,n,v,f,h,p,_,A,x,O,F,E,M;const e=(a=this.props.conf)==null?void 0:a.options,c=((s=e==null?void 0:e.linkChannel)==null?void 0:s.value)||"gnss",r=((n=e==null?void 0:e.customChannel)==null?void 0:n.value)||"";return{title:((v=e==null?void 0:e.title)==null?void 0:v.value)||"预警等级",bgColor:((f=e==null?void 0:e.bgColor)==null?void 0:f.value)||"#f5f7fa",panelBgColor:((h=e==null?void 0:e.panelBgColor)==null?void 0:h.value)||"#ffffff",textColor:((p=e==null?void 0:e.textColor)==null?void 0:p.value)||"#333333",titleFontSize:((_=e==null?void 0:e.titleFontSize)==null?void 0:_.value)||16,centerFontSize:((A=e==null?void 0:e.centerFontSize)==null?void 0:A.value)||32,level1Color:((x=e==null?void 0:e.level1Color)==null?void 0:x.value)||"#F57676",level2Color:((O=e==null?void 0:e.level2Color)==null?void 0:O.value)||"#FFA500",level3Color:((F=e==null?void 0:e.level3Color)==null?void 0:F.value)||"#fadb14",level4Color:((E=e==null?void 0:e.level4Color)==null?void 0:E.value)||"#66B1FF",normalColor:((M=e==null?void 0:e.normalColor)==null?void 0:M.value)||"#67C23A",linkChannel:c==="custom"&&r?r:c}}getChartOption(){return C(this.Style.value)}setHistoryData(e){var r;if(!e||!this.chartObj)return;const c=((r=this.props.conf)==null?void 0:r.data)||[];!Array.isArray(c)||!c.length||(c.forEach((a,s)=>{if(!a.fv)return;const n=Array.isArray(e)?e[s]:null,v=Array.isArray(n)&&n.length?n[0]:null;if(!v)return;const f=v[a.fv];if(f==null)return;const h=Math.min(Math.max(typeof f=="number"?Math.round(f):Math.round(parseFloat(String(f)))||0,0),4),p=a.object_id||a.name||"";p&&b.set(p,h)}),this.chartObj.setOption(C(this.Style.value),!0))}setSocketData(e){var r;if(!e)return;(((r=this.props.conf)==null?void 0:r.data)||[]).forEach(a=>{if(!a.fv)return;const s=a.object_id||a.name||"";if(!s)return;const n=this.extractDataValue(e,a.fv);if(n!=null){const v=typeof n=="number"?Math.min(Math.max(Math.round(n),0),4):4;b.set(s,v)}}),this.chartObj&&this.chartObj.setOption(C(this.Style.value),!0)}onLinkEvent(e){}}const m=new j(o,"alarmLevelChart");m.setupLifecycle();const d=m.getStyle(),D=m.getEchartId(),y=l.computed(()=>{var t;return((t=o.conf)==null?void 0:t.data)||[]}),g=l.computed(()=>{const t=[0,0,0,0,0];return y.value.length===0&&o.mode==="edit"?[2,5,5,4,7]:(y.value.forEach(e=>{const c=e.object_id||e.name||"",r=b.get(c),a=typeof r=="number"?r:4;t[a]++}),t)}),T=l.computed(()=>{const t=g.value;for(let e=0;e<5;e++)if(t[e]>0)return{idx:e,count:t[e],name:i[e]};return{idx:4,count:0,name:"运行正常"}}),B=l.computed(()=>({backgroundColor:d.value.bgColor})),C=t=>{const e=g.value,c=[t.level1Color,t.level2Color,t.level3Color,t.level4Color,t.normalColor],r=T.value,a=c[r.idx];return{backgroundColor:"transparent",tooltip:{trigger:"item",formatter:"{b}: {c} ({d}%)"},legend:{orient:"vertical",right:"5%",top:"middle",itemWidth:10,itemHeight:10,itemGap:14,textStyle:{fontSize:13,color:t.textColor},formatter:s=>{const n=i.indexOf(s);return`${s} ${n>=0?e[n]:0}`}},series:[{type:"pie",radius:["48%","70%"],center:["30%","50%"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:()=>`{num|${r.count}}
2
2
  {txt|${r.name}}`,rich:{num:{fontSize:t.centerFontSize,fontWeight:"bold",color:a,lineHeight:t.centerFontSize+10},txt:{fontSize:13,color:"#999",lineHeight:22}}},labelLine:{show:!1},itemStyle:{borderRadius:4,borderColor:"#fff",borderWidth:2},data:i.map((s,n)=>({value:e[n],name:s,itemStyle:{color:c[n]}}))}]}},S=()=>{const t=m.getChartInstance();t&&t.setOption(C(d.value),!0)};return l.onMounted(()=>{o.mode==="edit"&&S(),setTimeout(()=>{var t;return(t=m.getChartInstance())==null?void 0:t.resize()},200)}),l.watch(()=>o.conf,()=>{o.mode==="edit"&&S()},{deep:!0}),(t,e)=>(l.openBlock(),l.createElementBlock("div",{class:"alarm-level-chart",style:l.normalizeStyle(B.value)},[l.createElementVNode("div",U,[e[0]||(e[0]=l.createElementVNode("span",{class:"indicator-dot"},null,-1)),l.createElementVNode("span",{class:"panel-title",style:l.normalizeStyle({color:l.unref(d).textColor,fontSize:l.unref(d).titleFontSize+"px"})},l.toDisplayString(l.unref(d).title),5)]),l.createElementVNode("div",{id:l.unref(D),class:"chart-container"},null,8,W),l.renderSlot(t.$slots,"default",{},void 0,!0)],4))}})),le=H._export_sfc(te,[["__scopeId","data-v-a4efd6a7"]]);exports.default=le;
@@ -12,9 +12,9 @@ var N = (c, l, n) => l in c ? $(c, l, { enumerable: !0, configurable: !0, writab
12
12
  }, L = (c, l) => H(c, W(l));
13
13
  import { defineComponent as V, computed as C, onMounted as G, watch as q, openBlock as J, createElementBlock as K, normalizeStyle as j, createElementVNode as b, unref as y, toDisplayString as Q, renderSlot as X } from "vue";
14
14
  import "html2canvas";
15
- import { _ as Y } from "./index-DomNEEyv.js";
15
+ import { _ as Y } from "./index-BZpYmpDy.js";
16
16
  import "element-plus";
17
- import { E as Z } from "./EChartComponentBase-DPWPg81w.js";
17
+ import { E as Z } from "./EChartComponentBase-i76OGL3z.js";
18
18
  import { A as ee, D as te } from "./ele-lin-icon-Dax-ZiWV.js";
19
19
  const le = { class: "panel-header" }, oe = ["id"], ae = {
20
20
  DEFAULT_ICON: te,
@@ -1 +1 @@
1
- "use strict";var U=Object.defineProperty,G=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var I=(f,s,u)=>s in f?U(f,s,{enumerable:!0,configurable:!0,writable:!0,value:u}):f[s]=u,V=(f,s)=>{for(var u in s||(s={}))$.call(s,u)&&I(f,u,s[u]);if(L)for(var u of L(s))W.call(s,u)&&I(f,u,s[u]);return f},B=(f,s)=>G(f,H(s));var D=(f,s,u)=>new Promise((g,m)=>{var b=h=>{try{C(u.next(h))}catch(_){m(_)}},x=h=>{try{C(u.throw(h))}catch(_){m(_)}},C=h=>h.done?g(h.value):Promise.resolve(h.value).then(b,x);C((u=u.apply(f,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");require("html2canvas");const J=require("./BaseComponent-BXAJUoaf.cjs"),w=require("./index-Cvu9nAQq.cjs"),O=require("./ele-lst-icon-CrxnHZ-A.cjs"),Q={class:"panel-header"},X={class:"header-left"},Y={class:"header-title"},Z={class:"header-right"},K=["disabled"],ee={class:"page-info"},te=["disabled"],le={class:"table-area"},ae={class:"data-table"},re=["onClick"],ne={DEFAULT_ICON:O.DEFAULT_ICON,ACTIVE_ICON:O.ACTIVE_ICON,NAME_CN:"监测预警表格",NAME_EN:"Alert Table",ORDER:2,PLATFORM:["pc","screen"]},oe={title:{value:"监测预警 (GNSS)",type:"string",label:"component.alertTable.title"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},headerBgColor:{value:"#f5f5f5",type:"color",label:"component.alertTable.headerBgColor"},pageSize:{value:5,type:"number",label:"component.alertTable.pageSize",min:3,max:20},alertColumn:{value:"speed",type:"string",label:"告警判定列(key)"},alertLevels:{value:[{name:"正常",minValue:0,maxValue:5,color:"#52c41a"},{name:"二级告警 (警告)",minValue:5,maxValue:10,color:"#faad14"},{name:"一级告警 (危险)",minValue:10,maxValue:999,color:"#ff4d4f"}],type:"alertLevels",label:"component.alertTable.alertLevels"},columns:{value:[{key:"area",label:"区域",width:"80px",useFv:!0},{key:"deviceId",label:"编号",width:"100px",useFv:!0},{key:"elevation",label:"标高",width:"80px",useFv:!0},{key:"speed",label:"速度",width:"80px",useFv:!0},{key:"threshold",label:"阈值",width:"60px",useFv:!1}],type:"columns",label:"component.alertTable.columns"},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},se=[{object_id:"",threshold:"8"}],ce=["object_id","threshold"],ue=["mosaic","statistics"],ie={useAlias:!1,multiObject:!0,source:"mosaic"},de={DEFAULT:ne,OPTIONS:oe,DATA:se,PARAMS:ce,SOURCE:ue,COMMON:ie},me=t.defineComponent(B(V({},de),{__name:"alertTable",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(f){const s=f;class u extends J.BaseComponent{extractStyles(){var n,y,i,d,c,k,N,F,T,j;const{options:e}=this.props.conf,l=[{key:"area",label:"区域",width:"80px",useFv:!0},{key:"deviceId",label:"编号",width:"100px",useFv:!0},{key:"elevation",label:"标高",width:"80px",useFv:!0},{key:"speed",label:"速度",width:"80px",useFv:!0},{key:"threshold",label:"阈值",width:"60px",useFv:!1}],o=[{name:"正常",minValue:0,maxValue:5,color:"#52c41a"},{name:"二级告警 (警告)",minValue:5,maxValue:10,color:"#faad14"},{name:"一级告警 (危险)",minValue:10,maxValue:999,color:"#ff4d4f"}],r=((n=e==null?void 0:e.linkChannel)==null?void 0:n.value)||"gnss",v=((y=e==null?void 0:e.customChannel)==null?void 0:y.value)||"",p=r==="custom"&&v?v:r;return{title:((i=e==null?void 0:e.title)==null?void 0:i.value)||"监测预警 (GNSS)",bgColor:((d=e==null?void 0:e.bgColor)==null?void 0:d.value)||"#ffffff",textColor:((c=e==null?void 0:e.textColor)==null?void 0:c.value)||"#333333",headerBgColor:((k=e==null?void 0:e.headerBgColor)==null?void 0:k.value)||"#f5f5f5",pageSize:((N=e==null?void 0:e.pageSize)==null?void 0:N.value)||5,alertColumn:((F=e==null?void 0:e.alertColumn)==null?void 0:F.value)||"speed",alertLevels:((T=e==null?void 0:e.alertLevels)==null?void 0:T.value)||o,columns:((j=e==null?void 0:e.columns)==null?void 0:j.value)||l,linkChannel:p}}initHistory(){return D(this,null,function*(){var p;const{data:e,options:l}=this.props.conf;if(!e||!Array.isArray(e))return[];const r=(((p=l==null?void 0:l.columns)==null?void 0:p.value)||[]).filter(n=>n.useFv).map(n=>n.key);if(r.length===0)return[];const v=e.map(n=>{if(!n.object_id||(this.applyHistoryObjectResolution(n),!n.object_id))return Promise.resolve(null);const y={block_mapping:"influxdbproxy",action:"get_mosaic_list",object_id:n.object_id,keys:r,page_index:1,page_size:1};return new Promise(i=>{w.api.platform(d=>{var c;i(((c=d==null?void 0:d.result)==null?void 0:c.data)||[])},y)})});return Promise.all(v)})}setHistoryData(e){var p;if(!e||!Array.isArray(e))return;const{data:l,options:o}=this.props.conf;if(!l||!Array.isArray(l))return;const v=(((p=o==null?void 0:o.columns)==null?void 0:p.value)||[]).filter(n=>n.useFv).map(n=>n.key);e.forEach((n,y)=>{if(!n||!Array.isArray(n)||n.length===0)return;const i=l[y];if(!i)return;const d=n[0];v.forEach(c=>{d[c]!==void 0&&d[c]!==null&&(i[c]=d[c])})})}setSocketData(e){var n,y;if(!e)return;const{data:l,options:o}=this.props.conf;if(!l||!Array.isArray(l))return;const v=(((n=o==null?void 0:o.columns)==null?void 0:n.value)||[]).filter(i=>i.useFv).map(i=>i.key);if(v.length===0)return;const p=e.object_id||((y=e.data)==null?void 0:y.object_id)||"";l.forEach(i=>{i.object_id&&(p&&String(i.object_id)!==String(p)||v.forEach(d=>{try{const c=this.extractDataValue(e,d);c!=null&&(i[d]=c)}catch(c){console.warn(`[alertTable] 提取字段 ${d} 失败:`,c)}}))})}}const g=new u(s,"alertTable");g.setupLifecycle();const m=g.getStyle(),b=t.ref(1),x=t.ref(!1),C=a=>{const e=m.value.linkChannel,l=g.linkStore.channels[e];if(!l)return!1;const{payload:o}=l;return o.objectId&&a.object_id?String(o.objectId)===String(a.object_id):o.deviceId&&a.deviceId?String(o.deviceId)===String(a.deviceId):!1},h=t.computed(()=>{const a=m.value.columns||[];return[{key:"index",label:"序号",width:"60px"},...a]}),_=a=>{const e=m.value.alertLevels||[];if(isNaN(a)||e.length===0)return{alertLevel:0,alertText:"正常",alertColor:"#52c41a"};for(let o=0;o<e.length;o++){const r=e[o];if(a>=r.minValue&&a<r.maxValue)return{alertLevel:o,alertText:r.name,alertColor:r.color}}const l=e[e.length-1];return{alertLevel:e.length-1,alertText:l.name,alertColor:l.color}},S=t.computed(()=>{var o;const a=((o=s.conf)==null?void 0:o.data)||[],e=m.value.alertColumn||"";return(s.mode==="preview"?a.filter(r=>r.object_id):a).map((r,v)=>{const p=e&&parseFloat(r[e])||0,{alertLevel:n,alertText:y,alertColor:i}=_(p),d={index:v+1,object_id:r.object_id||"",isAlert:n>0,alertLevel:n,alertText:y,alertColor:i,_exceed:p-(parseFloat(r.threshold)||0)};return h.value.forEach(c=>{var k;c.key!=="index"&&(d[c.key]=(k=r[c.key])!=null?k:"-")}),d}).sort((r,v)=>v._exceed-r._exceed).map((r,v)=>(r.index=v+1,r))}),P=a=>a.alertColor?{color:a.alertColor}:{},E=t.computed(()=>Math.max(1,Math.ceil(S.value.length/m.value.pageSize))),z=t.computed(()=>{const a=(b.value-1)*m.value.pageSize,e=a+m.value.pageSize;return S.value.slice(a,e)}),R=t.computed(()=>({backgroundColor:m.value.bgColor,color:m.value.textColor,"--header-bg":m.value.headerBgColor})),M=()=>{b.value>1&&b.value--},q=()=>{b.value<E.value&&b.value++},A=a=>{s.mode!=="edit"&&g.publish(V({objectId:a.object_id,deviceId:a.deviceId||"",alertLevels:m.value.alertLevels},a))};return t.watch(()=>s.conf,()=>{b.value=1},{deep:!0}),t.watch(S,a=>{if(x.value||s.mode!=="preview"||!a||a.length===0)return;const e=a[0],l=m.value.alertColumn||"";!l||e[l]==="-"||e[l]===void 0||(x.value=!0,A(e))}),(a,e)=>(t.openBlock(),t.createElementBlock("div",{class:"alert-table-wrapper",style:t.normalizeStyle(R.value)},[t.createElementVNode("div",Q,[t.createElementVNode("div",X,[e[0]||(e[0]=t.createElementVNode("div",{class:"header-indicator"},null,-1)),t.createElementVNode("span",Y,t.toDisplayString(t.unref(m).title),1)]),t.createElementVNode("div",Z,[t.createElementVNode("button",{class:"page-btn",disabled:b.value<=1,onClick:M},[...e[1]||(e[1]=[t.createElementVNode("span",null,"<",-1)])],8,K),t.createElementVNode("span",ee,t.toDisplayString(b.value)+" / "+t.toDisplayString(E.value),1),t.createElementVNode("button",{class:"page-btn",disabled:b.value>=E.value,onClick:q},[...e[2]||(e[2]=[t.createElementVNode("span",null,">",-1)])],8,te)])]),t.createElementVNode("div",le,[t.createElementVNode("table",ae,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,l=>(t.openBlock(),t.createElementBlock("th",{key:l.key,style:t.normalizeStyle({width:l.width})},t.toDisplayString(l.label),5))),128))])]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,(l,o)=>(t.openBlock(),t.createElementBlock("tr",{key:o,class:t.normalizeClass({"alert-row":l.isAlert,"active-row":C(l)}),onClick:r=>A(l)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,r=>(t.openBlock(),t.createElementBlock("td",{key:r.key,style:t.normalizeStyle(P(l))},t.toDisplayString(l[r.key]),5))),128))],10,re))),128))])])]),t.renderSlot(a.$slots,"default",{},void 0,!0)],4))}})),ve=w._export_sfc(me,[["__scopeId","data-v-bd23f3c0"]]);exports.default=ve;
1
+ "use strict";var U=Object.defineProperty,G=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var I=(f,s,u)=>s in f?U(f,s,{enumerable:!0,configurable:!0,writable:!0,value:u}):f[s]=u,V=(f,s)=>{for(var u in s||(s={}))$.call(s,u)&&I(f,u,s[u]);if(L)for(var u of L(s))W.call(s,u)&&I(f,u,s[u]);return f},B=(f,s)=>G(f,H(s));var D=(f,s,u)=>new Promise((g,m)=>{var b=h=>{try{C(u.next(h))}catch(_){m(_)}},x=h=>{try{C(u.throw(h))}catch(_){m(_)}},C=h=>h.done?g(h.value):Promise.resolve(h.value).then(b,x);C((u=u.apply(f,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");require("html2canvas");const J=require("./BaseComponent-BmhMoM4H.cjs"),w=require("./index-77aUdspY.cjs"),O=require("./ele-lst-icon-CrxnHZ-A.cjs"),Q={class:"panel-header"},X={class:"header-left"},Y={class:"header-title"},Z={class:"header-right"},K=["disabled"],ee={class:"page-info"},te=["disabled"],le={class:"table-area"},ae={class:"data-table"},re=["onClick"],ne={DEFAULT_ICON:O.DEFAULT_ICON,ACTIVE_ICON:O.ACTIVE_ICON,NAME_CN:"监测预警表格",NAME_EN:"Alert Table",ORDER:2,PLATFORM:["pc","screen"]},oe={title:{value:"监测预警 (GNSS)",type:"string",label:"component.alertTable.title"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},headerBgColor:{value:"#f5f5f5",type:"color",label:"component.alertTable.headerBgColor"},pageSize:{value:5,type:"number",label:"component.alertTable.pageSize",min:3,max:20},alertColumn:{value:"speed",type:"string",label:"告警判定列(key)"},alertLevels:{value:[{name:"正常",minValue:0,maxValue:5,color:"#52c41a"},{name:"二级告警 (警告)",minValue:5,maxValue:10,color:"#faad14"},{name:"一级告警 (危险)",minValue:10,maxValue:999,color:"#ff4d4f"}],type:"alertLevels",label:"component.alertTable.alertLevels"},columns:{value:[{key:"area",label:"区域",width:"80px",useFv:!0},{key:"deviceId",label:"编号",width:"100px",useFv:!0},{key:"elevation",label:"标高",width:"80px",useFv:!0},{key:"speed",label:"速度",width:"80px",useFv:!0},{key:"threshold",label:"阈值",width:"60px",useFv:!1}],type:"columns",label:"component.alertTable.columns"},linkChannel:{value:"gnss",type:"select",label:"联动频道",options:[{label:"GNSS监测",value:"gnss"},{label:"边坡监测",value:"slope"},{label:"设备联动",value:"device"},{label:"告警联动",value:"alarm"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"自定义频道名",showWhen:{linkChannel:"custom"}}},se=[{object_id:"",threshold:"8"}],ce=["object_id","threshold"],ue=["mosaic","statistics"],ie={useAlias:!1,multiObject:!0,source:"mosaic"},de={DEFAULT:ne,OPTIONS:oe,DATA:se,PARAMS:ce,SOURCE:ue,COMMON:ie},me=t.defineComponent(B(V({},de),{__name:"alertTable",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(f){const s=f;class u extends J.BaseComponent{extractStyles(){var n,y,i,d,c,k,N,F,T,j;const{options:e}=this.props.conf,l=[{key:"area",label:"区域",width:"80px",useFv:!0},{key:"deviceId",label:"编号",width:"100px",useFv:!0},{key:"elevation",label:"标高",width:"80px",useFv:!0},{key:"speed",label:"速度",width:"80px",useFv:!0},{key:"threshold",label:"阈值",width:"60px",useFv:!1}],o=[{name:"正常",minValue:0,maxValue:5,color:"#52c41a"},{name:"二级告警 (警告)",minValue:5,maxValue:10,color:"#faad14"},{name:"一级告警 (危险)",minValue:10,maxValue:999,color:"#ff4d4f"}],r=((n=e==null?void 0:e.linkChannel)==null?void 0:n.value)||"gnss",v=((y=e==null?void 0:e.customChannel)==null?void 0:y.value)||"",p=r==="custom"&&v?v:r;return{title:((i=e==null?void 0:e.title)==null?void 0:i.value)||"监测预警 (GNSS)",bgColor:((d=e==null?void 0:e.bgColor)==null?void 0:d.value)||"#ffffff",textColor:((c=e==null?void 0:e.textColor)==null?void 0:c.value)||"#333333",headerBgColor:((k=e==null?void 0:e.headerBgColor)==null?void 0:k.value)||"#f5f5f5",pageSize:((N=e==null?void 0:e.pageSize)==null?void 0:N.value)||5,alertColumn:((F=e==null?void 0:e.alertColumn)==null?void 0:F.value)||"speed",alertLevels:((T=e==null?void 0:e.alertLevels)==null?void 0:T.value)||o,columns:((j=e==null?void 0:e.columns)==null?void 0:j.value)||l,linkChannel:p}}initHistory(){return D(this,null,function*(){var p;const{data:e,options:l}=this.props.conf;if(!e||!Array.isArray(e))return[];const r=(((p=l==null?void 0:l.columns)==null?void 0:p.value)||[]).filter(n=>n.useFv).map(n=>n.key);if(r.length===0)return[];const v=e.map(n=>{if(!n.object_id||(this.applyHistoryObjectResolution(n),!n.object_id))return Promise.resolve(null);const y={block_mapping:"influxdbproxy",action:"get_mosaic_list",object_id:n.object_id,keys:r,page_index:1,page_size:1};return new Promise(i=>{w.api.platform(d=>{var c;i(((c=d==null?void 0:d.result)==null?void 0:c.data)||[])},y)})});return Promise.all(v)})}setHistoryData(e){var p;if(!e||!Array.isArray(e))return;const{data:l,options:o}=this.props.conf;if(!l||!Array.isArray(l))return;const v=(((p=o==null?void 0:o.columns)==null?void 0:p.value)||[]).filter(n=>n.useFv).map(n=>n.key);e.forEach((n,y)=>{if(!n||!Array.isArray(n)||n.length===0)return;const i=l[y];if(!i)return;const d=n[0];v.forEach(c=>{d[c]!==void 0&&d[c]!==null&&(i[c]=d[c])})})}setSocketData(e){var n,y;if(!e)return;const{data:l,options:o}=this.props.conf;if(!l||!Array.isArray(l))return;const v=(((n=o==null?void 0:o.columns)==null?void 0:n.value)||[]).filter(i=>i.useFv).map(i=>i.key);if(v.length===0)return;const p=e.object_id||((y=e.data)==null?void 0:y.object_id)||"";l.forEach(i=>{i.object_id&&(p&&String(i.object_id)!==String(p)||v.forEach(d=>{try{const c=this.extractDataValue(e,d);c!=null&&(i[d]=c)}catch(c){console.warn(`[alertTable] 提取字段 ${d} 失败:`,c)}}))})}}const g=new u(s,"alertTable");g.setupLifecycle();const m=g.getStyle(),b=t.ref(1),x=t.ref(!1),C=a=>{const e=m.value.linkChannel,l=g.linkStore.channels[e];if(!l)return!1;const{payload:o}=l;return o.objectId&&a.object_id?String(o.objectId)===String(a.object_id):o.deviceId&&a.deviceId?String(o.deviceId)===String(a.deviceId):!1},h=t.computed(()=>{const a=m.value.columns||[];return[{key:"index",label:"序号",width:"60px"},...a]}),_=a=>{const e=m.value.alertLevels||[];if(isNaN(a)||e.length===0)return{alertLevel:0,alertText:"正常",alertColor:"#52c41a"};for(let o=0;o<e.length;o++){const r=e[o];if(a>=r.minValue&&a<r.maxValue)return{alertLevel:o,alertText:r.name,alertColor:r.color}}const l=e[e.length-1];return{alertLevel:e.length-1,alertText:l.name,alertColor:l.color}},S=t.computed(()=>{var o;const a=((o=s.conf)==null?void 0:o.data)||[],e=m.value.alertColumn||"";return(s.mode==="preview"?a.filter(r=>r.object_id):a).map((r,v)=>{const p=e&&parseFloat(r[e])||0,{alertLevel:n,alertText:y,alertColor:i}=_(p),d={index:v+1,object_id:r.object_id||"",isAlert:n>0,alertLevel:n,alertText:y,alertColor:i,_exceed:p-(parseFloat(r.threshold)||0)};return h.value.forEach(c=>{var k;c.key!=="index"&&(d[c.key]=(k=r[c.key])!=null?k:"-")}),d}).sort((r,v)=>v._exceed-r._exceed).map((r,v)=>(r.index=v+1,r))}),P=a=>a.alertColor?{color:a.alertColor}:{},E=t.computed(()=>Math.max(1,Math.ceil(S.value.length/m.value.pageSize))),z=t.computed(()=>{const a=(b.value-1)*m.value.pageSize,e=a+m.value.pageSize;return S.value.slice(a,e)}),R=t.computed(()=>({backgroundColor:m.value.bgColor,color:m.value.textColor,"--header-bg":m.value.headerBgColor})),M=()=>{b.value>1&&b.value--},q=()=>{b.value<E.value&&b.value++},A=a=>{s.mode!=="edit"&&g.publish(V({objectId:a.object_id,deviceId:a.deviceId||"",alertLevels:m.value.alertLevels},a))};return t.watch(()=>s.conf,()=>{b.value=1},{deep:!0}),t.watch(S,a=>{if(x.value||s.mode!=="preview"||!a||a.length===0)return;const e=a[0],l=m.value.alertColumn||"";!l||e[l]==="-"||e[l]===void 0||(x.value=!0,A(e))}),(a,e)=>(t.openBlock(),t.createElementBlock("div",{class:"alert-table-wrapper",style:t.normalizeStyle(R.value)},[t.createElementVNode("div",Q,[t.createElementVNode("div",X,[e[0]||(e[0]=t.createElementVNode("div",{class:"header-indicator"},null,-1)),t.createElementVNode("span",Y,t.toDisplayString(t.unref(m).title),1)]),t.createElementVNode("div",Z,[t.createElementVNode("button",{class:"page-btn",disabled:b.value<=1,onClick:M},[...e[1]||(e[1]=[t.createElementVNode("span",null,"<",-1)])],8,K),t.createElementVNode("span",ee,t.toDisplayString(b.value)+" / "+t.toDisplayString(E.value),1),t.createElementVNode("button",{class:"page-btn",disabled:b.value>=E.value,onClick:q},[...e[2]||(e[2]=[t.createElementVNode("span",null,">",-1)])],8,te)])]),t.createElementVNode("div",le,[t.createElementVNode("table",ae,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,l=>(t.openBlock(),t.createElementBlock("th",{key:l.key,style:t.normalizeStyle({width:l.width})},t.toDisplayString(l.label),5))),128))])]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,(l,o)=>(t.openBlock(),t.createElementBlock("tr",{key:o,class:t.normalizeClass({"alert-row":l.isAlert,"active-row":C(l)}),onClick:r=>A(l)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,r=>(t.openBlock(),t.createElementBlock("td",{key:r.key,style:t.normalizeStyle(P(l))},t.toDisplayString(l[r.key]),5))),128))],10,re))),128))])])]),t.renderSlot(a.$slots,"default",{},void 0,!0)],4))}})),ve=w._export_sfc(me,[["__scopeId","data-v-bd23f3c0"]]);exports.default=ve;
@@ -28,8 +28,8 @@ var G = (f, o, u) => new Promise((C, d) => {
28
28
  });
29
29
  import { defineComponent as le, ref as H, computed as A, watch as U, openBlock as g, createElementBlock as _, normalizeStyle as I, createElementVNode as m, toDisplayString as j, unref as te, Fragment as E, renderList as w, normalizeClass as ae, renderSlot as re } from "vue";
30
30
  import "html2canvas";
31
- import { B as ne } from "./BaseComponent-BlCsb-HW.js";
32
- import { a as oe, _ as se } from "./index-DomNEEyv.js";
31
+ import { B as ne } from "./BaseComponent-CQaDWNO0.js";
32
+ import { a as oe, _ as se } from "./index-BZpYmpDy.js";
33
33
  import { A as ue, D as ce } from "./ele-lst-icon-CKpeRKmk.js";
34
34
  const ie = { class: "panel-header" }, de = { class: "header-left" }, ve = { class: "header-title" }, me = { class: "header-right" }, fe = ["disabled"], be = { class: "page-info" }, pe = ["disabled"], he = { class: "table-area" }, ye = { class: "data-table" }, ge = ["onClick"], _e = {
35
35
  DEFAULT_ICON: ce,
@@ -1 +1 @@
1
- "use strict";var M=Object.defineProperty,L=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var V=(c,n,r)=>n in c?M(c,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[n]=r,S=(c,n)=>{for(var r in n||(n={}))R.call(n,r)&&V(c,r,n[r]);if(N)for(var r of N(n))F.call(n,r)&&V(c,r,n[r]);return c},E=(c,n)=>L(c,q(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/input/style/css");const e=require("vue"),v=require("./index-Cvu9nAQq.cjs"),j=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),z={class:"section-header"},B={class:"section-title"},U={class:"row"},Y={class:"label"},$={class:"row"},K={class:"row"},H={class:"row row-meta"},J={key:0},W={class:"payload-preview"},G={DEFAULT_ICON:j.DEFAULT_ICON,ACTIVE_ICON:j.ACTIVE_ICON,NAME_CN:"对象别名选择器",NAME_EN:"Alias Object Selector",ORDER:22,PLATFORM:["pc","screen"]},Q={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},sectionTitle:{value:"对象别名切换",type:"string",label:"component.openpitConfigPanel.label"},aliasLabel:{value:"别名模式",type:"string",label:"component.openpitConfigPanel.objectSelectInputLabel"},aliasPlaceholder:{value:"例如 radar*",type:"string",label:"component.openpitConfigPanel.objectSelectInputPlaceholder"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},X=[{key:"objectAlias",multiple:!0,pattern:"radar*",fvs:["disp","speed"]}],Z=[{key:"key",label:"component.openpitConfigPanel.key",type:"string"},{key:"multiple",label:"component.openpitConfigPanel.multiple",type:"switch"},{key:"pattern",label:"component.openpitConfigPanel.optionValue",type:"string"},{key:"fvs",label:"component.openpitConfigPanel.options",type:"array"}],ee=[],te={useAlias:!0,multiObject:!0,source:""},le={DEFAULT:G,OPTIONS:Q,DATA:X,PARAMS:Z,SOURCE:ee,COMMON:te},oe=e.defineComponent(E(S({},le),{__name:"aliasObjectSelectorDemo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""}},setup(c){e.useCssVars(t=>({v20d7bd78:_.value.borderColor,v6db2e060:_.value.color}));const n=c,r=v.useLinkStore(),d=e.ref("radar*"),m=e.ref("disp,speed"),p=e.ref([]),f=e.ref(""),C=e.ref(""),_=e.computed(()=>{var l,o,a,s;const t=((l=n.conf)==null?void 0:l.options)||{};return{backgroundColor:((o=t==null?void 0:t.bgColor)==null?void 0:o.value)||"#ffffff",color:((a=t==null?void 0:t.textColor)==null?void 0:a.value)||"#333333",borderColor:((s=t==null?void 0:t.borderColor)==null?void 0:s.value)||"#e5e5e5"}}),k=e.computed(()=>{var t,l,o;return String(((o=(l=(t=n.conf)==null?void 0:t.options)==null?void 0:l.sectionTitle)==null?void 0:o.value)||"对象别名切换")}),O=e.computed(()=>{var t,l,o;return String(((o=(l=(t=n.conf)==null?void 0:t.options)==null?void 0:l.aliasLabel)==null?void 0:o.value)||"别名模式")}),A=e.computed(()=>{var t,l,o;return String(((o=(l=(t=n.conf)==null?void 0:t.options)==null?void 0:l.aliasPlaceholder)==null?void 0:o.value)||"例如 radar*")}),P=()=>{var a,s,i;const t=((a=n.conf)==null?void 0:a.options)||{},l=((s=t==null?void 0:t.linkChannel)==null?void 0:s.value)||"deepDisplacement",o=((i=t==null?void 0:t.customChannel)==null?void 0:i.value)||"";return l==="custom"&&o?o:l},w=()=>{try{return JSON.parse(sessionStorage.getItem(v.ALIAS_MAPPING_KEY)||"{}")||{}}catch(t){return{}}},T=t=>String(t||"").split(",").map(l=>l.trim()).filter(Boolean),D=t=>t.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),I=t=>{const l=D(t).replace(/\*/g,".*");return new RegExp(`^${l}$`,"i")},x=()=>{const t=w();return Object.keys(t).map(l=>({object_alias:l,object_id:String(t[l]||"")})).filter(l=>l.object_id)},g=()=>{const t=String(d.value||"").trim();if(!t){p.value=[];return}const l=I(t),o=x();p.value=o.filter(a=>l.test(a.object_alias))},y=()=>{g();const t=p.value.map(i=>i.object_id),l=p.value.map(i=>i.object_alias),o=T(m.value),a=P(),s={source:"aliasObjectSelector",type:"filter",mode:"aliasWildcard",objectAliasPattern:d.value,objectAliases:l,objectIds:t,objectId:t[0]||"",fvs:o,fv:o[0]||"",count:t.length,time:Date.now()};r.publish(a,"aliasObjectSelector",s),f.value=v.dayjs().format("YYYY-MM-DD HH:mm:ss"),C.value=JSON.stringify(s,null,2)};return e.onMounted(()=>{var o,a,s,i,u,h;const t=String(((s=(a=(o=n.conf)==null?void 0:o.data)==null?void 0:a[0])==null?void 0:s.pattern)||"").trim();t&&(d.value=t);const l=(h=(u=(i=n.conf)==null?void 0:i.data)==null?void 0:u[0])==null?void 0:h.fvs;Array.isArray(l)&&l.length&&(m.value=l.join(",")),g()}),(t,l)=>{const o=b.ElInput,a=b.ElButton,s=b.ElTableColumn,i=b.ElTable;return e.openBlock(),e.createElementBlock("div",{class:"alias-demo",style:e.normalizeStyle(_.value)},[e.createElementVNode("div",z,[e.createElementVNode("span",B,e.toDisplayString(k.value),1)]),e.createElementVNode("div",U,[e.createElementVNode("span",Y,e.toDisplayString(O.value),1),e.createVNode(o,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=u=>d.value=u),placeholder:A.value,size:"small",clearable:"",onKeyup:e.withKeys(y,["enter"])},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",$,[l[2]||(l[2]=e.createElementVNode("span",{class:"label"},"FV",-1)),e.createVNode(o,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=u=>m.value=u),placeholder:"例如 disp,speed,temp",size:"small",clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",K,[e.createVNode(a,{type:"primary",size:"small",onClick:y},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode("匹配并联动",-1)])]),_:1}),e.createVNode(a,{size:"small",onClick:g},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("仅匹配",-1)])]),_:1})]),e.createElementVNode("div",H,[e.createElementVNode("span",null,"匹配数量:"+e.toDisplayString(p.value.length),1),f.value?(e.openBlock(),e.createElementBlock("span",J,"最近推送:"+e.toDisplayString(f.value),1)):e.createCommentVNode("",!0)]),l[6]||(l[6]=e.createElementVNode("div",{class:"tips"},[e.createTextVNode(" 数据源:sessionStorage["),e.createElementVNode("code",null,"object_alias_uid_mapping"),e.createTextVNode("](真实对象别名映射) ")],-1)),e.createVNode(i,{data:p.value,size:"small",border:"",style:{width:"100%"},"max-height":"220"},{default:e.withCtx(()=>[e.createVNode(s,{prop:"object_id",label:"object_id","min-width":"180"}),e.createVNode(s,{prop:"object_alias",label:"object_alias","min-width":"180"})]),_:1},8,["data"]),e.createElementVNode("div",W,[l[5]||(l[5]=e.createElementVNode("div",{class:"preview-title"},"本次联动 payload 预览",-1)),e.createElementVNode("pre",null,e.toDisplayString(C.value),1)])],4)}}})),ne=v._export_sfc(oe,[["__scopeId","data-v-a1c7e108"]]);exports.default=ne;
1
+ "use strict";var M=Object.defineProperty,L=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var V=(c,n,r)=>n in c?M(c,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[n]=r,S=(c,n)=>{for(var r in n||(n={}))R.call(n,r)&&V(c,r,n[r]);if(N)for(var r of N(n))F.call(n,r)&&V(c,r,n[r]);return c},E=(c,n)=>L(c,q(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/input/style/css");const e=require("vue"),v=require("./index-77aUdspY.cjs"),j=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),z={class:"section-header"},B={class:"section-title"},U={class:"row"},Y={class:"label"},$={class:"row"},K={class:"row"},H={class:"row row-meta"},J={key:0},W={class:"payload-preview"},G={DEFAULT_ICON:j.DEFAULT_ICON,ACTIVE_ICON:j.ACTIVE_ICON,NAME_CN:"对象别名选择器",NAME_EN:"Alias Object Selector",ORDER:22,PLATFORM:["pc","screen"]},Q={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},borderColor:{value:"#e5e5e5",type:"color",label:"component.options.borderColor"},sectionTitle:{value:"对象别名切换",type:"string",label:"component.openpitConfigPanel.label"},aliasLabel:{value:"别名模式",type:"string",label:"component.openpitConfigPanel.objectSelectInputLabel"},aliasPlaceholder:{value:"例如 radar*",type:"string",label:"component.openpitConfigPanel.objectSelectInputPlaceholder"},linkChannel:{value:"deepDisplacement",type:"select",label:"component.linkChannel",options:[{label:"component.linkChannelOptions.deepDisplacement",value:"deepDisplacement"},{label:"component.linkChannelOptions.gnss",value:"gnss"},{label:"component.linkChannelOptions.slope",value:"slope"},{label:"component.linkChannelOptions.device",value:"device"},{label:"component.linkChannelOptions.alarm",value:"alarm"},{label:"component.linkChannelOptions.custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},X=[{key:"objectAlias",multiple:!0,pattern:"radar*",fvs:["disp","speed"]}],Z=[{key:"key",label:"component.openpitConfigPanel.key",type:"string"},{key:"multiple",label:"component.openpitConfigPanel.multiple",type:"switch"},{key:"pattern",label:"component.openpitConfigPanel.optionValue",type:"string"},{key:"fvs",label:"component.openpitConfigPanel.options",type:"array"}],ee=[],te={useAlias:!0,multiObject:!0,source:""},le={DEFAULT:G,OPTIONS:Q,DATA:X,PARAMS:Z,SOURCE:ee,COMMON:te},oe=e.defineComponent(E(S({},le),{__name:"aliasObjectSelectorDemo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""}},setup(c){e.useCssVars(t=>({v20d7bd78:_.value.borderColor,v6db2e060:_.value.color}));const n=c,r=v.useLinkStore(),d=e.ref("radar*"),m=e.ref("disp,speed"),p=e.ref([]),f=e.ref(""),C=e.ref(""),_=e.computed(()=>{var l,o,a,s;const t=((l=n.conf)==null?void 0:l.options)||{};return{backgroundColor:((o=t==null?void 0:t.bgColor)==null?void 0:o.value)||"#ffffff",color:((a=t==null?void 0:t.textColor)==null?void 0:a.value)||"#333333",borderColor:((s=t==null?void 0:t.borderColor)==null?void 0:s.value)||"#e5e5e5"}}),k=e.computed(()=>{var t,l,o;return String(((o=(l=(t=n.conf)==null?void 0:t.options)==null?void 0:l.sectionTitle)==null?void 0:o.value)||"对象别名切换")}),O=e.computed(()=>{var t,l,o;return String(((o=(l=(t=n.conf)==null?void 0:t.options)==null?void 0:l.aliasLabel)==null?void 0:o.value)||"别名模式")}),A=e.computed(()=>{var t,l,o;return String(((o=(l=(t=n.conf)==null?void 0:t.options)==null?void 0:l.aliasPlaceholder)==null?void 0:o.value)||"例如 radar*")}),P=()=>{var a,s,i;const t=((a=n.conf)==null?void 0:a.options)||{},l=((s=t==null?void 0:t.linkChannel)==null?void 0:s.value)||"deepDisplacement",o=((i=t==null?void 0:t.customChannel)==null?void 0:i.value)||"";return l==="custom"&&o?o:l},w=()=>{try{return JSON.parse(sessionStorage.getItem(v.ALIAS_MAPPING_KEY)||"{}")||{}}catch(t){return{}}},T=t=>String(t||"").split(",").map(l=>l.trim()).filter(Boolean),D=t=>t.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),I=t=>{const l=D(t).replace(/\*/g,".*");return new RegExp(`^${l}$`,"i")},x=()=>{const t=w();return Object.keys(t).map(l=>({object_alias:l,object_id:String(t[l]||"")})).filter(l=>l.object_id)},g=()=>{const t=String(d.value||"").trim();if(!t){p.value=[];return}const l=I(t),o=x();p.value=o.filter(a=>l.test(a.object_alias))},y=()=>{g();const t=p.value.map(i=>i.object_id),l=p.value.map(i=>i.object_alias),o=T(m.value),a=P(),s={source:"aliasObjectSelector",type:"filter",mode:"aliasWildcard",objectAliasPattern:d.value,objectAliases:l,objectIds:t,objectId:t[0]||"",fvs:o,fv:o[0]||"",count:t.length,time:Date.now()};r.publish(a,"aliasObjectSelector",s),f.value=v.dayjs().format("YYYY-MM-DD HH:mm:ss"),C.value=JSON.stringify(s,null,2)};return e.onMounted(()=>{var o,a,s,i,u,h;const t=String(((s=(a=(o=n.conf)==null?void 0:o.data)==null?void 0:a[0])==null?void 0:s.pattern)||"").trim();t&&(d.value=t);const l=(h=(u=(i=n.conf)==null?void 0:i.data)==null?void 0:u[0])==null?void 0:h.fvs;Array.isArray(l)&&l.length&&(m.value=l.join(",")),g()}),(t,l)=>{const o=b.ElInput,a=b.ElButton,s=b.ElTableColumn,i=b.ElTable;return e.openBlock(),e.createElementBlock("div",{class:"alias-demo",style:e.normalizeStyle(_.value)},[e.createElementVNode("div",z,[e.createElementVNode("span",B,e.toDisplayString(k.value),1)]),e.createElementVNode("div",U,[e.createElementVNode("span",Y,e.toDisplayString(O.value),1),e.createVNode(o,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=u=>d.value=u),placeholder:A.value,size:"small",clearable:"",onKeyup:e.withKeys(y,["enter"])},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",$,[l[2]||(l[2]=e.createElementVNode("span",{class:"label"},"FV",-1)),e.createVNode(o,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=u=>m.value=u),placeholder:"例如 disp,speed,temp",size:"small",clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",K,[e.createVNode(a,{type:"primary",size:"small",onClick:y},{default:e.withCtx(()=>[...l[3]||(l[3]=[e.createTextVNode("匹配并联动",-1)])]),_:1}),e.createVNode(a,{size:"small",onClick:g},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("仅匹配",-1)])]),_:1})]),e.createElementVNode("div",H,[e.createElementVNode("span",null,"匹配数量:"+e.toDisplayString(p.value.length),1),f.value?(e.openBlock(),e.createElementBlock("span",J,"最近推送:"+e.toDisplayString(f.value),1)):e.createCommentVNode("",!0)]),l[6]||(l[6]=e.createElementVNode("div",{class:"tips"},[e.createTextVNode(" 数据源:sessionStorage["),e.createElementVNode("code",null,"object_alias_uid_mapping"),e.createTextVNode("](真实对象别名映射) ")],-1)),e.createVNode(i,{data:p.value,size:"small",border:"",style:{width:"100%"},"max-height":"220"},{default:e.withCtx(()=>[e.createVNode(s,{prop:"object_id",label:"object_id","min-width":"180"}),e.createVNode(s,{prop:"object_alias",label:"object_alias","min-width":"180"})]),_:1},8,["data"]),e.createElementVNode("div",W,[l[5]||(l[5]=e.createElementVNode("div",{class:"preview-title"},"本次联动 payload 预览",-1)),e.createElementVNode("pre",null,e.toDisplayString(C.value),1)])],4)}}})),ne=v._export_sfc(oe,[["__scopeId","data-v-a1c7e108"]]);exports.default=ne;
@@ -17,7 +17,7 @@ import "element-plus/es/components/table-column/style/css";
17
17
  import "element-plus/es/components/button/style/css";
18
18
  import "element-plus/es/components/input/style/css";
19
19
  import { defineComponent as q, useCssVars as Q, ref as b, computed as _, onMounted as X, openBlock as V, createElementBlock as D, normalizeStyle as Z, createElementVNode as s, toDisplayString as v, createVNode as p, withKeys as ee, withCtx as j, createTextVNode as g, createCommentVNode as te } from "vue";
20
- import { l as le, d as oe, A as ne, _ as ae } from "./index-DomNEEyv.js";
20
+ import { l as le, d as oe, A as ne, _ as ae } from "./index-BZpYmpDy.js";
21
21
  import { A as se, D as ie } from "./ele-ctrSet-icon-BtKGrCid.js";
22
22
  const ce = { class: "section-header" }, re = { class: "section-title" }, pe = { class: "row" }, ue = { class: "label" }, de = { class: "row" }, me = { class: "row" }, be = { class: "row row-meta" }, ve = { key: 0 }, fe = { class: "payload-preview" }, _e = {
23
23
  DEFAULT_ICON: ie,
@@ -27,9 +27,9 @@ var F = (l, o, n) => new Promise((v, u) => {
27
27
  m((n = n.apply(l, o)).next());
28
28
  });
29
29
  import { defineComponent as B, ref as j, computed as A, openBlock as U, createElementBlock as V, normalizeStyle as W, createElementVNode as G, unref as K, renderSlot as Y } from "vue";
30
- import { _ as $ } from "./index-DomNEEyv.js";
30
+ import { _ as $ } from "./index-BZpYmpDy.js";
31
31
  import "element-plus";
32
- import { E as q } from "./EChartComponentBase-DPWPg81w.js";
32
+ import { E as q } from "./EChartComponentBase-i76OGL3z.js";
33
33
  import { A as J, D as Q } from "./ele-vlu-icon-Bg6EHZdJ.js";
34
34
  import { cn as X } from "./echarts-Bp7QN4X6.js";
35
35
  const Z = ["id"], tt = {
@@ -1 +1 @@
1
- "use strict";var M=Object.defineProperty,k=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols,R=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,P=Reflect.get;var N=(l,o,a)=>o in l?M(l,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[o]=a,_=(l,o)=>{for(var a in o||(o={}))z.call(o,a)&&N(l,a,o[a]);if(x)for(var a of x(o))q.call(o,a)&&N(l,a,o[a]);return l},w=(l,o)=>k(l,L(o));var E=(l,o,a)=>P(R(l),a,o);var F=(l,o,a)=>new Promise((C,p)=>{var v=c=>{try{y(a.next(c))}catch(d){p(d)}},S=c=>{try{y(a.throw(c))}catch(d){p(d)}},y=c=>c.done?C(c.value):Promise.resolve(c.value).then(v,S);y((a=a.apply(l,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),B=require("./index-Cvu9nAQq.cjs");require("element-plus");const H=require("./EChartComponentBase-BPiPzdtw.cjs"),I=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),V=require("./echarts-BB8O2KSA.cjs"),U=["id"],W={DEFAULT_ICON:I.DEFAULT_ICON,ACTIVE_ICON:I.ACTIVE_ICON,NAME_CN:"年累积降雨量",NAME_EN:"Annual Rainfall Chart",ORDER:2,PLATFORM:["pc","screen"]},G={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},yAxisName:{value:"毫米(mm)",type:"string",label:"Y轴标题"},barColor:{value:"#85C6F1",type:"color",label:"柱状图颜色"},lineColor:{value:"#F57676",type:"color",label:"趋势线颜色"},linkChannel:{value:"rainfall",type:"select",label:"component.linkChannel",options:[{label:"降雨监测",value:"rainfall"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},K=[{name:"日降雨量",fv:""}],Y=["name","fv"],$=["mosaic"],J={useAlias:!1,multiObject:!1,source:"mosaic"},Q=50,X={DEFAULT:W,OPTIONS:G,DATA:K,PARAMS:Y,SOURCE:$,ITEMS:Q,COMMON:J},Z=i.defineComponent(w(_({},X),{__name:"annualRainfallChart",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(l){const o=l,a=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],C=[45.2,52.1,68.5,92,115.4,188.2,215.5,192.1,145.6,88.4,55,42.8],p=i.ref(new Array(12).fill(0)),v=i.ref(""),S=i.computed(()=>{var f,t,e;return!!((t=(f=o.conf)==null?void 0:f.common)!=null&&t.object_id||(e=o.conf)!=null&&e.object_id)}),y=i.computed(()=>S.value||!!v.value),c=()=>{var t;const f=(t=o.conf)==null?void 0:t.data;return Array.isArray(f)&&f.length>0&&f[0].fv||""};class d extends H.EChartComponentBase{extractStyles(){var r,u,s,h,m,b,g;const t=(r=this.props.conf)==null?void 0:r.options,e=((u=t==null?void 0:t.linkChannel)==null?void 0:u.value)||"rainfall",n=((s=t==null?void 0:t.customChannel)==null?void 0:s.value)||"";return{bgColor:((h=t==null?void 0:t.bgColor)==null?void 0:h.value)||"#ffffff",yAxisName:((m=t==null?void 0:t.yAxisName)==null?void 0:m.value)||"毫米(mm)",barColor:((b=t==null?void 0:t.barColor)==null?void 0:b.value)||"#85C6F1",lineColor:((g=t==null?void 0:t.lineColor)==null?void 0:g.value)||"#F57676",linkChannel:e==="custom"&&n?n:e}}getChartOption(){if(!y.value&&this.props.mode==="preview")return{graphic:{type:"text",left:"center",top:"middle",style:{text:"请在筛选栏选择监测点后点击查询",fontSize:14,fill:"#999"}},xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[]};const t=this.props.mode==="edit"?C:p.value,e=t.map((n,r)=>r===0?t[0]:r===t.length-1?t[t.length-1]:parseFloat(((t[r-1]+n+t[r+1])/3).toFixed(1)));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(255, 255, 255, 0.9)",borderColor:"#1c3d90",textStyle:{color:"#333",fontSize:11}},grid:{top:35,bottom:25,left:60,right:15},xAxis:{type:"category",data:a,axisLabel:{fontSize:9,color:"#888",interval:0},axisLine:{lineStyle:{color:"rgba(0,0,0,0.1)"}}},yAxis:{type:"value",name:this.Style.value.yAxisName,nameTextStyle:{color:"#666",fontSize:10,align:"left",padding:[0,0,0,5]},axisLabel:{fontSize:9,color:"#888"},splitLine:{lineStyle:{color:"rgba(0,0,0,0.05)",type:"dashed"}}},series:[{name:"月度降雨",type:"bar",barWidth:"45%",itemStyle:{color:new V.LinearGradient(0,0,0,1,[{offset:0,color:this.Style.value.barColor},{offset:1,color:"#1c3d90"}]),borderRadius:[2,2,0,0]},data:t},{name:"趋势走向",type:"line",smooth:!0,showSymbol:!0,symbolSize:4,lineStyle:{width:2,color:this.Style.value.lineColor},itemStyle:{color:this.Style.value.lineColor},data:e}]}}initHistory(){return F(this,null,function*(){const t=this.props.conf;if(!t)return[];t.options||(t.options={});const e=t.options.points,n=Object.prototype.hasOwnProperty.call(t.options,"points");(!e||Number(e)<365)&&(t.options.points=365);try{return yield E(d.prototype,this,"initHistory").call(this)}finally{n?t.options.points=e:delete t.options.points}})}setHistoryData(t){var u;if(!t||!this.chartObj)return;const e=super.setHistoryData(t);if(!(e!=null&&e.length))return;const n=e[0];if(!((u=n==null?void 0:n.time)!=null&&u.length))return;const r=new Array(12).fill(0);n.time.forEach((s,h)=>{var O;const m=(O=n.data)==null?void 0:O[h];if(m==null||m===""||m==="-")return;const b=Number(m);if(!Number.isFinite(b))return;const g=new Date(String(s).replace(/\//g,"-"));isNaN(g.getTime())||(r[g.getMonth()]+=b)}),p.value=r.map(s=>parseFloat(s.toFixed(2))),this.chartObj.setOption(this.getChartOption(),!0)}setSocketData(t){if(!t)return;const e=c();if(!e)return;const n=this.extractDataValue(t,e);if(n==null||isNaN(Number(n)))return;const r=t.datetime||"";let u=new Date().getMonth();if(r){const h=new Date(r.replace(/\//g,"-"));isNaN(h.getTime())||(u=h.getMonth())}const s=[...p.value];s[u]=parseFloat((s[u]+Number(n)).toFixed(2)),p.value=s,this.chartObj&&this.chartObj.setOption(this.getChartOption(),!0)}onLinkEvent(t){const{payload:e}=t;if(!e)return;const n=e.objectId||e.object_id;n&&(v.value=String(n),p.value=new Array(12).fill(0),this.initChart(),this.props.mode==="preview"&&this.subscribeBySource(this.getSource(),String(n)))}}const A=new d(o,"annualRainfallChart");A.setupLifecycle();const j=A.getEchartId(),D=A.getStyle(),T=i.computed(()=>({backgroundColor:D.value.bgColor,width:"100%",height:"100%"}));return(f,t)=>(i.openBlock(),i.createElementBlock("div",{class:"annual-rainfall-chart-wrap",style:i.normalizeStyle(T.value)},[i.createElementVNode("div",{id:i.unref(j),class:"chart-container"},null,8,U),i.renderSlot(f.$slots,"default",{},void 0,!0)],4))}})),tt=B._export_sfc(Z,[["__scopeId","data-v-29c27eac"]]);exports.default=tt;
1
+ "use strict";var M=Object.defineProperty,k=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols,R=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,P=Reflect.get;var N=(l,o,a)=>o in l?M(l,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[o]=a,_=(l,o)=>{for(var a in o||(o={}))z.call(o,a)&&N(l,a,o[a]);if(x)for(var a of x(o))q.call(o,a)&&N(l,a,o[a]);return l},w=(l,o)=>k(l,L(o));var E=(l,o,a)=>P(R(l),a,o);var F=(l,o,a)=>new Promise((C,p)=>{var v=c=>{try{y(a.next(c))}catch(d){p(d)}},S=c=>{try{y(a.throw(c))}catch(d){p(d)}},y=c=>c.done?C(c.value):Promise.resolve(c.value).then(v,S);y((a=a.apply(l,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),B=require("./index-77aUdspY.cjs");require("element-plus");const H=require("./EChartComponentBase-D9EUh4BZ.cjs"),I=require("./ele-vlu-icon-Dv-R7Xuc.cjs"),V=require("./echarts-BB8O2KSA.cjs"),U=["id"],W={DEFAULT_ICON:I.DEFAULT_ICON,ACTIVE_ICON:I.ACTIVE_ICON,NAME_CN:"年累积降雨量",NAME_EN:"Annual Rainfall Chart",ORDER:2,PLATFORM:["pc","screen"]},G={bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},yAxisName:{value:"毫米(mm)",type:"string",label:"Y轴标题"},barColor:{value:"#85C6F1",type:"color",label:"柱状图颜色"},lineColor:{value:"#F57676",type:"color",label:"趋势线颜色"},linkChannel:{value:"rainfall",type:"select",label:"component.linkChannel",options:[{label:"降雨监测",value:"rainfall"},{label:"自定义",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.customChannel",showWhen:{linkChannel:"custom"}}},K=[{name:"日降雨量",fv:""}],Y=["name","fv"],$=["mosaic"],J={useAlias:!1,multiObject:!1,source:"mosaic"},Q=50,X={DEFAULT:W,OPTIONS:G,DATA:K,PARAMS:Y,SOURCE:$,ITEMS:Q,COMMON:J},Z=i.defineComponent(w(_({},X),{__name:"annualRainfallChart",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(l){const o=l,a=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],C=[45.2,52.1,68.5,92,115.4,188.2,215.5,192.1,145.6,88.4,55,42.8],p=i.ref(new Array(12).fill(0)),v=i.ref(""),S=i.computed(()=>{var f,t,e;return!!((t=(f=o.conf)==null?void 0:f.common)!=null&&t.object_id||(e=o.conf)!=null&&e.object_id)}),y=i.computed(()=>S.value||!!v.value),c=()=>{var t;const f=(t=o.conf)==null?void 0:t.data;return Array.isArray(f)&&f.length>0&&f[0].fv||""};class d extends H.EChartComponentBase{extractStyles(){var r,u,s,h,m,b,g;const t=(r=this.props.conf)==null?void 0:r.options,e=((u=t==null?void 0:t.linkChannel)==null?void 0:u.value)||"rainfall",n=((s=t==null?void 0:t.customChannel)==null?void 0:s.value)||"";return{bgColor:((h=t==null?void 0:t.bgColor)==null?void 0:h.value)||"#ffffff",yAxisName:((m=t==null?void 0:t.yAxisName)==null?void 0:m.value)||"毫米(mm)",barColor:((b=t==null?void 0:t.barColor)==null?void 0:b.value)||"#85C6F1",lineColor:((g=t==null?void 0:t.lineColor)==null?void 0:g.value)||"#F57676",linkChannel:e==="custom"&&n?n:e}}getChartOption(){if(!y.value&&this.props.mode==="preview")return{graphic:{type:"text",left:"center",top:"middle",style:{text:"请在筛选栏选择监测点后点击查询",fontSize:14,fill:"#999"}},xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[]};const t=this.props.mode==="edit"?C:p.value,e=t.map((n,r)=>r===0?t[0]:r===t.length-1?t[t.length-1]:parseFloat(((t[r-1]+n+t[r+1])/3).toFixed(1)));return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(255, 255, 255, 0.9)",borderColor:"#1c3d90",textStyle:{color:"#333",fontSize:11}},grid:{top:35,bottom:25,left:60,right:15},xAxis:{type:"category",data:a,axisLabel:{fontSize:9,color:"#888",interval:0},axisLine:{lineStyle:{color:"rgba(0,0,0,0.1)"}}},yAxis:{type:"value",name:this.Style.value.yAxisName,nameTextStyle:{color:"#666",fontSize:10,align:"left",padding:[0,0,0,5]},axisLabel:{fontSize:9,color:"#888"},splitLine:{lineStyle:{color:"rgba(0,0,0,0.05)",type:"dashed"}}},series:[{name:"月度降雨",type:"bar",barWidth:"45%",itemStyle:{color:new V.LinearGradient(0,0,0,1,[{offset:0,color:this.Style.value.barColor},{offset:1,color:"#1c3d90"}]),borderRadius:[2,2,0,0]},data:t},{name:"趋势走向",type:"line",smooth:!0,showSymbol:!0,symbolSize:4,lineStyle:{width:2,color:this.Style.value.lineColor},itemStyle:{color:this.Style.value.lineColor},data:e}]}}initHistory(){return F(this,null,function*(){const t=this.props.conf;if(!t)return[];t.options||(t.options={});const e=t.options.points,n=Object.prototype.hasOwnProperty.call(t.options,"points");(!e||Number(e)<365)&&(t.options.points=365);try{return yield E(d.prototype,this,"initHistory").call(this)}finally{n?t.options.points=e:delete t.options.points}})}setHistoryData(t){var u;if(!t||!this.chartObj)return;const e=super.setHistoryData(t);if(!(e!=null&&e.length))return;const n=e[0];if(!((u=n==null?void 0:n.time)!=null&&u.length))return;const r=new Array(12).fill(0);n.time.forEach((s,h)=>{var O;const m=(O=n.data)==null?void 0:O[h];if(m==null||m===""||m==="-")return;const b=Number(m);if(!Number.isFinite(b))return;const g=new Date(String(s).replace(/\//g,"-"));isNaN(g.getTime())||(r[g.getMonth()]+=b)}),p.value=r.map(s=>parseFloat(s.toFixed(2))),this.chartObj.setOption(this.getChartOption(),!0)}setSocketData(t){if(!t)return;const e=c();if(!e)return;const n=this.extractDataValue(t,e);if(n==null||isNaN(Number(n)))return;const r=t.datetime||"";let u=new Date().getMonth();if(r){const h=new Date(r.replace(/\//g,"-"));isNaN(h.getTime())||(u=h.getMonth())}const s=[...p.value];s[u]=parseFloat((s[u]+Number(n)).toFixed(2)),p.value=s,this.chartObj&&this.chartObj.setOption(this.getChartOption(),!0)}onLinkEvent(t){const{payload:e}=t;if(!e)return;const n=e.objectId||e.object_id;n&&(v.value=String(n),p.value=new Array(12).fill(0),this.initChart(),this.props.mode==="preview"&&this.subscribeBySource(this.getSource(),String(n)))}}const A=new d(o,"annualRainfallChart");A.setupLifecycle();const j=A.getEchartId(),D=A.getStyle(),T=i.computed(()=>({backgroundColor:D.value.bgColor,width:"100%",height:"100%"}));return(f,t)=>(i.openBlock(),i.createElementBlock("div",{class:"annual-rainfall-chart-wrap",style:i.normalizeStyle(T.value)},[i.createElementVNode("div",{id:i.unref(j),class:"chart-container"},null,8,U),i.renderSlot(f.$slots,"default",{},void 0,!0)],4))}})),tt=B._export_sfc(Z,[["__scopeId","data-v-29c27eac"]]);exports.default=tt;
@@ -1,3 +1,3 @@
1
- "use strict";var E=Object.defineProperty,q=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var v=(r,i,c)=>i in r?E(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,f=(r,i)=>{for(var c in i||(i={}))D.call(i,c)&&v(r,c,i[c]);if(b)for(var c of b(i))L.call(i,c)&&v(r,c,i[c]);return r},h=(r,i)=>q(r,N(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),y=require("./index-Cvu9nAQq.cjs");require("element-plus");const z=require("./EChartComponentBase-BPiPzdtw.cjs"),I=require("./titleStyle-NSnz6cUg.cjs"),A=require("./ele-aqi-icon-BMm9WgFH.cjs"),S=require("./installCanvasRenderer-CyhM1Qpl.cjs"),R=require("./installMarkLine-Bv53Iw9G.cjs"),T=require("./install-DV5cEgNV.cjs"),M=require("./install-z6wShIZI.cjs"),V=require("./install-CIT6k8Ga.cjs"),$=require("./install-CltTFs4e.cjs"),j=require("./install-C8buXQPI.cjs"),k=require("./install-CYwVETsi.cjs"),F={class:"mix-body"},P=["id"],w={DEFAULT_ICON:A.DEFAULT_ICON,ACTIVE_ICON:A.ACTIVE_ICON,NAME_CN:"指数",NAME_EN:"Index Chart",ORDER:2,PLATFORM:["pc","screen","mobile"]},U={titleColor:"#111",textColor:"#111",bgColor:"#fff",lineColor:"#d64545",radiusSize:8,textSize:12,top:20,bottom:40,left:20,right:30,points:100,isSmooth:!1,isHideTitle:!1},B=[{name:"参数一",fv:"",object_id:""}],G=["name","fv","object_id","colorArea","source"],H=["mosaic","statistics","calculate"],Z=[{color:"#00ff00",value:50}],J=1,K={useAlias:!1,null:{type:"0",value:""},multiObject:!1,source:"mosaic",rate:{checked:!1,value:1}},Q={DEFAULT:w,OPTIONS:U,DATA:B,PARAMS:G,SOURCE:H,COLOR_AREA:Z,ITEMS:J,COMMON:K},W=n.defineComponent(h(f({},Q),{__name:"aqi",props:{conf:{type:Object,default:()=>({data:[],area:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){S.use([R.install,T.install,M.install,V.install,$.install,S.install,j.install,S.install$1,k.install]);const i=r;class c extends z.EChartComponentBase{extractStyles(){return h(f({},super.extractStyles()),{lineColor:this.getOptionValue("lineColor","#d64545"),isSmooth:this.getOptionValue("isSmooth",!1)})}getChartOption(){var a;const t=this.Style.value,{conf:o}=this.props;return o.area=o.area||[{color:"#00ff00",value:50}],{tooltip:{trigger:"axis",textStyle:{fontSize:t.textSize}},legend:{show:!0,data:[((a=o==null?void 0:o.data[0])==null?void 0:a.name)||""],right:20,top:0,textStyle:{color:t.textColor,fontSize:t.textSize}},grid:{top:t.top,bottom:t.bottom,left:t.left,right:t.right,containLabel:!0},dataZoom:[{type:"slider",start:80,end:100,height:20,bottom:15,left:60,right:60,textStyle:{color:t.textColor},labelFormatter:(l,e)=>e.includes(" ")?e.replace(" ",`
1
+ "use strict";var E=Object.defineProperty,q=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var v=(r,i,c)=>i in r?E(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,f=(r,i)=>{for(var c in i||(i={}))D.call(i,c)&&v(r,c,i[c]);if(b)for(var c of b(i))L.call(i,c)&&v(r,c,i[c]);return r},h=(r,i)=>q(r,N(i));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),y=require("./index-77aUdspY.cjs");require("element-plus");const z=require("./EChartComponentBase-D9EUh4BZ.cjs"),I=require("./titleStyle-NSnz6cUg.cjs"),A=require("./ele-aqi-icon-BMm9WgFH.cjs"),S=require("./installCanvasRenderer-CyhM1Qpl.cjs"),R=require("./installMarkLine-Bv53Iw9G.cjs"),T=require("./install-DV5cEgNV.cjs"),M=require("./install-z6wShIZI.cjs"),V=require("./install-CIT6k8Ga.cjs"),$=require("./install-CltTFs4e.cjs"),j=require("./install-C8buXQPI.cjs"),k=require("./install-CYwVETsi.cjs"),F={class:"mix-body"},P=["id"],w={DEFAULT_ICON:A.DEFAULT_ICON,ACTIVE_ICON:A.ACTIVE_ICON,NAME_CN:"指数",NAME_EN:"Index Chart",ORDER:2,PLATFORM:["pc","screen","mobile"]},U={titleColor:"#111",textColor:"#111",bgColor:"#fff",lineColor:"#d64545",radiusSize:8,textSize:12,top:20,bottom:40,left:20,right:30,points:100,isSmooth:!1,isHideTitle:!1},B=[{name:"参数一",fv:"",object_id:""}],G=["name","fv","object_id","colorArea","source"],H=["mosaic","statistics","calculate"],Z=[{color:"#00ff00",value:50}],J=1,K={useAlias:!1,null:{type:"0",value:""},multiObject:!1,source:"mosaic",rate:{checked:!1,value:1}},Q={DEFAULT:w,OPTIONS:U,DATA:B,PARAMS:G,SOURCE:H,COLOR_AREA:Z,ITEMS:J,COMMON:K},W=n.defineComponent(h(f({},Q),{__name:"aqi",props:{conf:{type:Object,default:()=>({data:[],area:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(r){S.use([R.install,T.install,M.install,V.install,$.install,S.install,j.install,S.install$1,k.install]);const i=r;class c extends z.EChartComponentBase{extractStyles(){return h(f({},super.extractStyles()),{lineColor:this.getOptionValue("lineColor","#d64545"),isSmooth:this.getOptionValue("isSmooth",!1)})}getChartOption(){var a;const t=this.Style.value,{conf:o}=this.props;return o.area=o.area||[{color:"#00ff00",value:50}],{tooltip:{trigger:"axis",textStyle:{fontSize:t.textSize}},legend:{show:!0,data:[((a=o==null?void 0:o.data[0])==null?void 0:a.name)||""],right:20,top:0,textStyle:{color:t.textColor,fontSize:t.textSize}},grid:{top:t.top,bottom:t.bottom,left:t.left,right:t.right,containLabel:!0},dataZoom:[{type:"slider",start:80,end:100,height:20,bottom:15,left:60,right:60,textStyle:{color:t.textColor},labelFormatter:(l,e)=>e.includes(" ")?e.replace(" ",`
2
2
  `):e},{type:"inside",start:0,end:20}],visualMap:{show:!1,pieces:this.getPieces(),outOfRange:{color:"#999"}},xAxis:[{type:"category",boundaryGap:!1,data:this.getTimeAxis(),axisLabel:{formatter:l=>l.includes(" ")?l.replace(" ",`
3
3
  `):l,color:t.textColor,fontSize:t.textSize},axisLine:{lineStyle:{color:t.textColor}}}],yAxis:{type:"value",boundaryGap:[0,"20%"],splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:t.textColor,fontSize:t.textSize},axisLine:{lineStyle:{color:t.textColor}}},series:this.formatSeries()}}getPieces(){const{area:t}=this.props.conf;if(!(t!=null&&t.length))return[];const o=[...t].filter(a=>a.value!=null).sort((a,l)=>a.value-l.value);return o.map((a,l)=>({gt:l===0?0:o[l-1].value,lte:a.value,color:a.color}))}formatSeries(){var e;const t=this.Style.value,{data:o,area:a}=this.props.conf,l=(a||[]).filter(s=>s.value!=null).sort((s,u)=>s.value-u.value);return[{name:((e=o[0])==null?void 0:e.name)||"",type:"line",smooth:t.isSmooth,sampling:"average",markLine:{silent:!1,lineStyle:{color:t.lineColor},label:{color:t.textColor},data:l.map(s=>({yAxis:s.value}))},data:y.getRandomArr({num:t.points,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()})}]}setSocketData(t){if(!this.hasData()||!this.chartObj||!t)return;const{data:o,common:a}=this.props.conf,l=a.source||"mosaic",e=this.chartObj.getOption();o.forEach((u,d)=>{const p=this.extractDataValue(t,u.fv),C=["statistics","calculate"].includes(l)?t.start_time:t.datetime;C!=null&&(d===0&&e.xAxis[0].data.push(C),e.series[d].data.push(p))});const s=y.addRealtimeData(e.xAxis[0].data,e.series.map(u=>u.data));e.xAxis[0].data=s.times.slice(-this.Style.value.points),e.series.forEach((u,d)=>{var p;u.data=((p=s.data[d])==null?void 0:p.slice(-this.Style.value.points))||[]}),this.updateChart(e)}setHistoryData(t){if(!t||!(t!=null&&t.length))return;const o=this.chartObj.getOption(),a=Number(this.Style.value.points)||100,l=e=>{if(e==null||e===""||e==="-")return null;const s=Number(e);return Number.isFinite(s)?s:null};o.xAxis[0].data=t[0].time.slice(-a),t.forEach((e,s)=>{if(!o.series[s])return;const u=e.data||[];o.series[s].data=u.map(l).slice(-a)}),this.updateChart(o)}}const m=new c(i,"aqi");m.setupLifecycle();const x=m.getStyle(),O=m.getEchartId(),_=n.computed(()=>I.generateTitleStyle(i.conf.options));return(g,t)=>(n.openBlock(),n.createElementBlock("div",{class:"mix-component",style:n.normalizeStyle({background:n.unref(x).bgColor,borderRadius:`${n.unref(x).radiusSize}px`})},[n.createElementVNode("div",{class:"mix-title",style:n.normalizeStyle(_.value)},n.toDisplayString(r.conf.caption||r.conf.name),5),n.createElementVNode("div",F,[n.createElementVNode("div",{class:"w-full h-full",id:n.unref(O)},null,8,P)]),n.renderSlot(g.$slots,"default",{},void 0,!0)],4))}})),X=y._export_sfc(W,[["__scopeId","data-v-427a886a"]]);exports.default=X;
@@ -11,9 +11,9 @@ var b = (r, i, n) => i in r ? _(r, i, { enumerable: !0, configurable: !0, writab
11
11
  return r;
12
12
  }, f = (r, i) => E(r, D(i));
13
13
  import { defineComponent as N, computed as R, openBlock as T, createElementBlock as $, normalizeStyle as A, unref as h, createElementVNode as S, toDisplayString as I, renderSlot as M } from "vue";
14
- import { o as j, p as k, _ as V } from "./index-DomNEEyv.js";
14
+ import { o as j, q as k, _ as q } from "./index-BZpYmpDy.js";
15
15
  import "element-plus";
16
- import { E as q } from "./EChartComponentBase-DPWPg81w.js";
16
+ import { E as V } from "./EChartComponentBase-i76OGL3z.js";
17
17
  import { g as w } from "./titleStyle-BT5GlpAb.js";
18
18
  import { A as F, D as P } from "./ele-aqi-icon-DsYfU5th.js";
19
19
  import { u as U, i as B, a as G } from "./installCanvasRenderer-oDYkyVFy.js";
@@ -62,7 +62,7 @@ const Y = { class: "mix-body" }, tt = ["id"], et = {
62
62
  setup(r) {
63
63
  U([H, Z, J, K, Q, B, W, G, X]);
64
64
  const i = r;
65
- class n extends q {
65
+ class n extends V {
66
66
  extractStyles() {
67
67
  return f(d({}, super.extractStyles()), {
68
68
  lineColor: this.getOptionValue("lineColor", "#d64545"),
@@ -153,7 +153,7 @@ const Y = { class: "mix-body" }, tt = ["id"], et = {
153
153
  M(y.$slots, "default", {}, void 0, !0)
154
154
  ], 4));
155
155
  }
156
- })), Et = /* @__PURE__ */ V(ut, [["__scopeId", "data-v-427a886a"]]);
156
+ })), Et = /* @__PURE__ */ q(ut, [["__scopeId", "data-v-427a886a"]]);
157
157
  export {
158
158
  Et as default
159
159
  };