mixdashboards 1.0.47 → 1.0.49

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 (277) hide show
  1. package/dist/{EChartComponentBase-CQYZ0922.js → EChartComponentBase-CafVdj74.js} +1 -1
  2. package/dist/{EChartComponentBase-DRY0bLOI.cjs → EChartComponentBase-Dz5E-lyI.cjs} +1 -1
  3. package/dist/{UniverSheet-CJP8jNCA.cjs → UniverSheet-BqLvs6V6.cjs} +1 -1
  4. package/dist/{UniverSheet-BWB0aXry.js → UniverSheet-CH1YywcZ.js} +2 -2
  5. package/dist/{accelerationChart-CiK-Qd4o.cjs → accelerationChart-BWRlw5-L.cjs} +1 -1
  6. package/dist/{accelerationChart-BE04sofp.js → accelerationChart-V4UmpPse.js} +3 -3
  7. package/dist/{actionItem-7rT4wvbt.js → actionItem-CBwfWvTO.js} +3 -3
  8. package/dist/{actionItem-BNzvi8fB.cjs → actionItem-Dsg6qYSp.cjs} +1 -1
  9. package/dist/{alarmLevelChart-DbIf9kQc.js → alarmLevelChart-CnKEZZZv.js} +2 -2
  10. package/dist/{alarmLevelChart-JTbC7581.cjs → alarmLevelChart-DN8hyTdg.cjs} +1 -1
  11. package/dist/{alertTable-CW-9nTxG.js → alertTable-BluC1smp.js} +2 -2
  12. package/dist/{alertTable-3Fq9oPQa.cjs → alertTable-CdkiAZIu.cjs} +1 -1
  13. package/dist/{annualRainfallChart-BFadflcO.cjs → annualRainfallChart-BeenDSmW.cjs} +1 -1
  14. package/dist/{annualRainfallChart-Cg2tZJFq.js → annualRainfallChart-COeieHTg.js} +2 -2
  15. package/dist/{api-DAUw_RyI.js → api-Cyx2Fha0.js} +3 -3
  16. package/dist/{api-CsM841lz.cjs → api-nw_9niqv.cjs} +1 -1
  17. package/dist/{aqi-CSNzCt6A.cjs → aqi-BXtF-SsB.cjs} +1 -1
  18. package/dist/{aqi-DMhNfLSS.js → aqi-naf_yg1B.js} +3 -3
  19. package/dist/{aqiIndass-LhWIw1L-.js → aqiIndass-CiHVV6y-.js} +2 -2
  20. package/dist/{aqiIndass-CbnX8jy1.cjs → aqiIndass-YO0txxEM.cjs} +1 -1
  21. package/dist/{arrayCard-Fl5xZbvQ.js → arrayCard-CPtHFB--.js} +2 -2
  22. package/dist/{arrayCard-D6Yzq7nX.cjs → arrayCard-USJyzspe.cjs} +1 -1
  23. package/dist/{audio-PoEUMLRp.js → audio-7HMku35Z.js} +4 -4
  24. package/dist/{audio-R7LCUpjr.cjs → audio-Uz_XIJyA.cjs} +1 -1
  25. package/dist/{bar-CJv74yw7.js → bar-Bq_RDVaa.js} +4 -4
  26. package/dist/{bar-CIWKC7cd.cjs → bar-CSideFNS.cjs} +1 -1
  27. package/dist/{bmp-B5d3cPx5.js → bmp-BF-OdMoW.js} +3 -3
  28. package/dist/{bmp-DVNypten.cjs → bmp-DZ9_aKMT.cjs} +1 -1
  29. package/dist/{box--lry72SE.cjs → box-C1n5r8hT.cjs} +1 -1
  30. package/dist/{box-Da5gDSqP.js → box-DfqNW1B6.js} +2 -2
  31. package/dist/{chartConfigPanel-BvbDCHoU.js → chartConfigPanel-8wROQoL0.js} +1 -1
  32. package/dist/{chartConfigPanel-B8FYxnZb.cjs → chartConfigPanel-C62JqDqE.cjs} +1 -1
  33. package/dist/{circleBar-2Si4M0J8.js → circleBar-C54UQvaf.js} +3 -3
  34. package/dist/{circleBar-B-e8HYux.cjs → circleBar-UrV2_yVK.cjs} +1 -1
  35. package/dist/{clock-DGtbfiIm.js → clock-CbebZdlU.js} +2 -2
  36. package/dist/{clock-CF9OvH6i.cjs → clock-DgkEPumE.cjs} +1 -1
  37. package/dist/{clt-BD_Q3tyx.js → clt-B32D8bK9.js} +3 -3
  38. package/dist/{clt-CXcGotkx.cjs → clt-DWBynZO1.cjs} +1 -1
  39. package/dist/{cmc-Bt7H4Q8b.cjs → cmc-BVrFcoih.cjs} +1 -1
  40. package/dist/{cmc-C_UjLQvo.js → cmc-CC-6njzU.js} +3 -3
  41. package/dist/{cmp-DWI9Y7Oz.js → cmp-BCvtkNwO.js} +3 -3
  42. package/dist/{cmp-CdfaXTm_.cjs → cmp-D6aHhSC6.cjs} +1 -1
  43. package/dist/{composite-Dc4QkCcc.js → composite-CWYjAAsg.js} +3 -3
  44. package/dist/{composite-C7BE3mkS.cjs → composite-kODICk08.cjs} +1 -1
  45. package/dist/{controlList-DQWfqJLF.cjs → controlList-BXvCyR2L.cjs} +1 -1
  46. package/dist/{controlList-B8dEMDkH.js → controlList-zYX8DbNE.js} +3 -3
  47. package/dist/{controlRecordList-CLfY8XsN.js → controlRecordList-Bc2M0iyo.js} +3 -3
  48. package/dist/{controlRecordList-B8xmY2wh.cjs → controlRecordList-Dly5aorA.cjs} +1 -1
  49. package/dist/{crd-dBlZavms.cjs → crd--3Oj3Y1t.cjs} +1 -1
  50. package/dist/{crd-BE7bxQCV.js → crd-CoB00gS6.js} +2 -2
  51. package/dist/{ctrBtn-CtS30Duz.cjs → ctrBtn-BusKAhHv.cjs} +1 -1
  52. package/dist/{ctrBtn-NbVm0_9a.js → ctrBtn-CUADz_pu.js} +4 -4
  53. package/dist/{ctrSet-BNVppkzh.js → ctrSet-BKVsejze.js} +4 -4
  54. package/dist/{ctrSet-AYfzoAjr.cjs → ctrSet-C0R2aIby.cjs} +1 -1
  55. package/dist/{ctrSwitch-SvqyuNMs.js → ctrSwitch-BqRBh40z.js} +4 -4
  56. package/dist/{ctrSwitch-DvgqH5Zq.cjs → ctrSwitch-uIqQRKaq.cjs} +1 -1
  57. package/dist/{dataManagement-DDAGR2Zs.cjs → dataManagement-BdP1iSeC.cjs} +1 -1
  58. package/dist/{dataManagement-D4yFedxJ.js → dataManagement-C6jHI7-1.js} +2 -2
  59. package/dist/{dataReport-DN0yZtS2.js → dataReport-C2XWn_Xv.js} +2 -2
  60. package/dist/{dataReport-lflcAgwv.cjs → dataReport-DNPD3MZl.cjs} +1 -1
  61. package/dist/{dataTable--ZzYF0m4.js → dataTable-5bUrqBWz.js} +1 -1
  62. package/dist/{dataTable-C1AeOvHe.cjs → dataTable-BvlEs83r.cjs} +1 -1
  63. package/dist/{datetime-B4lktfti.cjs → datetime-CE5wsyi7.cjs} +1 -1
  64. package/dist/{datetime-CRxM48pG.js → datetime-Dp8mPzSO.js} +2 -2
  65. package/dist/{deepClusterSlipSurface-CsXZnbol.cjs → deepClusterSlipSurface-BinAmtCz.cjs} +1 -1
  66. package/dist/{deepClusterSlipSurface-jbVue8lK.js → deepClusterSlipSurface-D_7LRpHz.js} +3 -3
  67. package/dist/{deepDataMatrix-D08J4nfA.js → deepDataMatrix-BXTJm6UD.js} +2 -2
  68. package/dist/{deepDataMatrix-CdbDYkh1.cjs → deepDataMatrix-t6axw0An.cjs} +1 -1
  69. package/dist/{deepDisplacement3D-DTVDR3Em.cjs → deepDisplacement3D-BRutQ6Ut.cjs} +1 -1
  70. package/dist/{deepDisplacement3D-Dqh03kLT.js → deepDisplacement3D-Cy-FIGAq.js} +3 -3
  71. package/dist/{deepDisplacementChart-B72y4A4Q.js → deepDisplacementChart---DgDx8L.js} +2 -2
  72. package/dist/{deepDisplacementChart-CnAJ3arx.js → deepDisplacementChart-BWVcNgaX.js} +4 -4
  73. package/dist/{deepDisplacementChart-ccBRKTeg.cjs → deepDisplacementChart-DboPezyJ.cjs} +1 -1
  74. package/dist/{deepDisplacementChart-Be6UqmJN.cjs → deepDisplacementChart-eD2GOxML.cjs} +1 -1
  75. package/dist/{deepDisplacementView-DoJclaK2.cjs → deepDisplacementView-BNVTS7Ar.cjs} +1 -1
  76. package/dist/{deepDisplacementView-BRnskO-S.js → deepDisplacementView-CHFgG2wy.js} +1 -1
  77. package/dist/{deepNodeTemperatureChart-Cmvs1LI7.cjs → deepNodeTemperatureChart-CpJI7axl.cjs} +1 -1
  78. package/dist/{deepNodeTemperatureChart-CtPE4BFq.js → deepNodeTemperatureChart-N1z-KMmu.js} +3 -3
  79. package/dist/{deepTangentAngleChart-Dkh9kDJY.js → deepTangentAngleChart-ClnxPvUM.js} +3 -3
  80. package/dist/{deepTangentAngleChart-BqZzc_RS.cjs → deepTangentAngleChart-DxB4EaWm.cjs} +1 -1
  81. package/dist/{deepTemperatureField-Cm18SLto.js → deepTemperatureField-DT7iyND9.js} +3 -3
  82. package/dist/{deepTemperatureField-BByMhon_.cjs → deepTemperatureField-DWO8Dcjh.cjs} +1 -1
  83. package/dist/{deepTrendChart-BoDcH88s.js → deepTrendChart-C7_BfEiR.js} +3 -3
  84. package/dist/{deepTrendChart-FoMxS9EI.cjs → deepTrendChart-D9uQKgck.cjs} +1 -1
  85. package/dist/{deviceOnlineStatus-DsKQeLmt.cjs → deviceOnlineStatus-BA7D5fbt.cjs} +1 -1
  86. package/dist/{deviceOnlineStatus-DYQkhQsg.js → deviceOnlineStatus-DlrB6EXN.js} +2 -2
  87. package/dist/{deviceStatus-BCOou44x.js → deviceStatus-aPf8MflS.js} +2 -2
  88. package/dist/{deviceStatus-BWQtb9Mi.cjs → deviceStatus-mDl8zF_Z.cjs} +1 -1
  89. package/dist/{displacementDataTable-B85PTW_G.cjs → displacementDataTable-Co4In07D.cjs} +1 -1
  90. package/dist/{displacementDataTable-R8nTN3L8.js → displacementDataTable-Da1xkiXG.js} +2 -2
  91. package/dist/{displacementTrajectoryChart-BSEi-hRr.js → displacementTrajectoryChart-B85ad8vc.js} +3 -3
  92. package/dist/{displacementTrajectoryChart-lycYTQxe.cjs → displacementTrajectoryChart-FPrvrbUa.cjs} +1 -1
  93. package/dist/{displacementTrendChart-D8IuzbRv.js → displacementTrendChart-BRxIsjeK.js} +2 -2
  94. package/dist/{displacementTrendChart-BQO8Eznx.cjs → displacementTrendChart-DcBu8-_Z.cjs} +1 -1
  95. package/dist/{dxf-5s9RTKqm.cjs → dxf-EDkdonhJ.cjs} +1 -1
  96. package/dist/{dxf-BV__k04Q.js → dxf-FrPSVW4C.js} +4 -4
  97. package/dist/{dzc-BGPhJ-St.cjs → dzc-BBijV6-m.cjs} +1 -1
  98. package/dist/{dzc-D6aciipN.js → dzc-BOaL7miE.js} +3 -3
  99. package/dist/{element-resize-detector-B-0BgVLy.js → element-resize-detector-BCRzpPES.js} +4 -4
  100. package/dist/{element-resize-detector-BvkAwVg8.cjs → element-resize-detector-DYs3pJPp.cjs} +1 -1
  101. package/dist/{evn-COCxFd08.cjs → evn-CAWNNpK2.cjs} +1 -1
  102. package/dist/{evn-Dr19A1zo.js → evn-T-0VLXht.js} +2 -2
  103. package/dist/{evolutionChart-C9r2yUYj.cjs → evolutionChart-B8vzbfrk.cjs} +1 -1
  104. package/dist/{evolutionChart-pMtNKqkK.js → evolutionChart-DYf3V-rl.js} +3 -3
  105. package/dist/{fileViewer-BgkyDwyJ.js → fileViewer-BRVwWDA3.js} +4 -4
  106. package/dist/{fileViewer-DtOwluP2.cjs → fileViewer-D6rC0YFY.cjs} +1 -1
  107. package/dist/{filterBar-CDBwgkGb.cjs → filterBar-B3Ka4jw8.cjs} +1 -1
  108. package/dist/{filterBar-DMzt6Mud.js → filterBar-hfIbyNh_.js} +2 -2
  109. package/dist/{fireCombustionCurve-D5gRdu46.js → fireCombustionCurve-D1wKpm4i.js} +2 -2
  110. package/dist/{fireCombustionCurve-cvFl1WHh.cjs → fireCombustionCurve-DKQJzKh2.cjs} +1 -1
  111. package/dist/{fireFilterBar-CNMAFXr5.js → fireFilterBar-Bl0iCn48.js} +2 -2
  112. package/dist/{fireFilterBar-DPismk7o.cjs → fireFilterBar-D8TTM4KM.cjs} +1 -1
  113. package/dist/{gag-Axg1ovwC.js → gag-Vt7-rYYR.js} +2 -2
  114. package/dist/{gag-C34ZOxdk.cjs → gag-dKpxHBTV.cjs} +1 -1
  115. package/dist/{gasStationList-Bz9w4T9z.js → gasStationList-BDRHTLvR.js} +416 -357
  116. package/dist/gasStationList-g4AUNuxi.cjs +1 -0
  117. package/dist/{glbModel-CfO76ZcK.cjs → glbModel-BCgQzSz1.cjs} +1 -1
  118. package/dist/{glbModel-BzKQ2kUi.js → glbModel-BpnMbHQe.js} +2 -2
  119. package/dist/{gnssFilterBar-CGvbDUCu.cjs → gnssFilterBar-BgS-JH3k.cjs} +1 -1
  120. package/dist/{gnssFilterBar-GDvX4_p8.js → gnssFilterBar-CaGGhgEk.js} +2 -2
  121. package/dist/{gnssHistoryTable-DKFJnMPu.cjs → gnssHistoryTable-Bkt4Zvxa.cjs} +1 -1
  122. package/dist/{gnssHistoryTable-DTN1gZMt.js → gnssHistoryTable-CGY1ROb6.js} +3 -3
  123. package/dist/{gnssMapView-CT-XahN-.js → gnssMapView-C4-pk-1_.js} +2 -2
  124. package/dist/{gnssMapView-YpBcjDJ9.cjs → gnssMapView-DuNotJym.cjs} +1 -1
  125. package/dist/{gnssTimeSeriesChart-iZPRyPen.js → gnssTimeSeriesChart-MZbERhu9.js} +4 -4
  126. package/dist/{gnssTimeSeriesChart-BU5wQTYd.cjs → gnssTimeSeriesChart-y7L6j_y5.cjs} +1 -1
  127. package/dist/{gnssXYTrajectory-C-WzUbAW.js → gnssXYTrajectory-DL8WWe1C.js} +3 -3
  128. package/dist/{gnssXYTrajectory-R_i0mY-j.cjs → gnssXYTrajectory-DZFjqFPv.cjs} +1 -1
  129. package/dist/{grd-CGigUZ7q.js → grd-BgaxrUfI.js} +3 -3
  130. package/dist/{grd-BPXiohye.cjs → grd-DNJ1rlwR.cjs} +1 -1
  131. package/dist/{grdIndass-D800xVzH.js → grdIndass-Bxf2L3J5.js} +3 -3
  132. package/dist/{grdIndass-DKD_3XkD.cjs → grdIndass-DlwlkKKH.cjs} +1 -1
  133. package/dist/{grg-CNou8dMo.js → grg-78Sh9Nr7.js} +2 -2
  134. package/dist/{grg-BGSppQcI.cjs → grg-CmxBlYJ6.cjs} +1 -1
  135. package/dist/{gridview-B5B7gPOT.js → gridview-BWe_qLy-.js} +2 -2
  136. package/dist/{gridview-BhtVLKUD.cjs → gridview-FFx-3wNz.cjs} +1 -1
  137. package/dist/{groupCard-yQmb7VH_.js → groupCard-B2ORsgUN.js} +2 -2
  138. package/dist/{groupCard-BBmOnpyI.cjs → groupCard-BOqERSM4.cjs} +1 -1
  139. package/dist/{headerBar-CWGye11m.js → headerBar-DPlPX8uD.js} +3 -3
  140. package/dist/{headerBar-BNfQmsFC.cjs → headerBar-o2J2Dqkd.cjs} +1 -1
  141. package/dist/{history-BlHYyu1s.cjs → history-5W6pGCPq.cjs} +1 -1
  142. package/dist/{history-oKCbbOLM.js → history-DH68UK_U.js} +3 -3
  143. package/dist/{index-C8teBAQd.js → index-LgTfdmT4.js} +1795 -1754
  144. package/dist/{index-BSzyUGIT.cjs → index-ZwyqrmaH.cjs} +7 -7
  145. package/dist/{insarDeformChart-DE67w_u4.js → insarDeformChart-9Qss0VGu.js} +2 -2
  146. package/dist/{insarDeformChart-DSrGvm7x.cjs → insarDeformChart-BTwU5ktS.cjs} +1 -1
  147. package/dist/{insarImageViewer-Ctp0wqIt.cjs → insarImageViewer-B-ExpEa8.cjs} +1 -1
  148. package/dist/{insarImageViewer-B4-PsYRV.js → insarImageViewer-C7aTZp-m.js} +2 -2
  149. package/dist/{kds-Enim5bJp.cjs → kds-8n-a2GhL.cjs} +1 -1
  150. package/dist/{kds-Dx_GiIEm.js → kds-CS7G3BaQ.js} +2 -2
  151. package/dist/{layerTabs-D3YRlheV.cjs → layerTabs-1lOAiEhu.cjs} +1 -1
  152. package/dist/{layerTabs-BFiu4lIL.js → layerTabs-pJJzTbu9.js} +2 -2
  153. package/dist/{lin-uY94Ojnz.js → lin-Bk49Db_G.js} +3 -3
  154. package/dist/{lin-CkjPgG_B.cjs → lin-IHxWU55I.cjs} +1 -1
  155. package/dist/{linIndass-qABT3VEJ.cjs → linIndass-Cpf8pnLn.cjs} +1 -1
  156. package/dist/{linIndass-C8gREDKn.js → linIndass-Drxnj7KQ.js} +2 -2
  157. package/dist/{lst-D5g7DrtQ.js → lst-CL6bmgJ2.js} +2 -2
  158. package/dist/{lst-BFKnMtL5.cjs → lst-CPd37vza.cjs} +1 -1
  159. package/dist/{manualEntry-Bck0F-yh.cjs → manualEntry-CcCE4O6Q.cjs} +1 -1
  160. package/dist/{manualEntry-DVz9oTYB.js → manualEntry-D_doLqqH.js} +2 -2
  161. package/dist/{mapBackground-BFU29YnH.js → mapBackground-CvLXKuJx.js} +2 -2
  162. package/dist/{mapBackground-CiPISf2B.cjs → mapBackground-DEBggmVp.cjs} +1 -1
  163. package/dist/{mappingList-Bkx4vu-u.js → mappingList-BZODl4t5.js} +3 -3
  164. package/dist/{mappingList--PVo2aUQ.cjs → mappingList-qKR-0uhY.cjs} +1 -1
  165. package/dist/{markdownViewer-COnk_pk4.js → markdownViewer-CtN6ailN.js} +4 -4
  166. package/dist/{markdownViewer-RG3j8l1L.cjs → markdownViewer-DZ8gvoHk.cjs} +1 -1
  167. package/dist/{mix-control-modal-B2cEQKI8.js → mix-control-modal-BlWtiePl.js} +3 -3
  168. package/dist/{mix-control-modal-B1UN2Cjo.cjs → mix-control-modal-zbr85DkZ.cjs} +1 -1
  169. package/dist/{mixDataPermission-t4r0S4Or.js → mixDataPermission-C-Cu3_y0.js} +1 -1
  170. package/dist/{mixDataPermission-BG1BmNQe.cjs → mixDataPermission-Gcl_4czp.cjs} +1 -1
  171. package/dist/{mixGrid-CUvQlc4n.js → mixGrid-DJQ2jXcg.js} +3 -3
  172. package/dist/{mixGrid-_dbNIf6t.cjs → mixGrid-Dh9y_kW0.cjs} +1 -1
  173. package/dist/{mixMap-D6z1_hNV.js → mixMap-2REwmqmi.js} +3 -3
  174. package/dist/{mixMap-DCvXa0ab.cjs → mixMap-BRnDOkNF.cjs} +1 -1
  175. package/dist/{mixModel-BRW3rJIV.cjs → mixModel-C1CKMCLi.cjs} +1 -1
  176. package/dist/{mixModel-CulQbgWh.js → mixModel-CHtF97xc.js} +3 -3
  177. package/dist/{mixPie-DjHVr74J.js → mixPie-DwDffWz5.js} +3 -3
  178. package/dist/{mixPie-BcYeLQ0o.cjs → mixPie-sD-AjwaC.cjs} +1 -1
  179. package/dist/mixdashboards.cjs +1 -1
  180. package/dist/mixdashboards.css +1 -1
  181. package/dist/mixdashboards.js +1 -1
  182. package/dist/{mjpegCamera-DlAcVOoi.js → mjpegCamera-Dbfd7eUC.js} +2 -2
  183. package/dist/{mjpegCamera-B7mjuPXA.cjs → mjpegCamera-RMS_dnv0.cjs} +1 -1
  184. package/dist/{monitorAlert-zPmD55Rs.cjs → monitorAlert-CjIQQ6fQ.cjs} +1 -1
  185. package/dist/{monitorAlert-B0KID2eA.js → monitorAlert-DagV3vuc.js} +2 -2
  186. package/dist/{monitorData-BidsO_6J.js → monitorData-CTkeA21g.js} +3 -3
  187. package/dist/{monitorData-CHMrdKJf.cjs → monitorData-DUansNO5.cjs} +1 -1
  188. package/dist/{monitorSpeedChart-DLZh-mSE.js → monitorSpeedChart-BFnREZYZ.js} +1 -1
  189. package/dist/{monitorSpeedChart-4D-maRjp.cjs → monitorSpeedChart-CjfFqWon.cjs} +1 -1
  190. package/dist/{mxa-DmZnrbe4.js → mxa-B6ezKf-C.js} +3 -3
  191. package/dist/{mxa-D4qd0Plz.cjs → mxa-CN6zXgZA.cjs} +1 -1
  192. package/dist/{myValue-B6YZ6dY0.cjs → myValue-BG_jI_HT.cjs} +1 -1
  193. package/dist/{myValue-BWMSYYbJ.js → myValue-C08vYRJC.js} +2 -2
  194. package/dist/{myValueList-DvjaY4Fk.js → myValueList-BKVL_kPb.js} +2 -2
  195. package/dist/{myValueList-DaNcKyP9.cjs → myValueList-Bwg3XCPF.cjs} +1 -1
  196. package/dist/{objectList-V3GkI15k.cjs → objectList-FArM7oEM.cjs} +1 -1
  197. package/dist/{objectList-B-DwKe6G.js → objectList-emtQyLbD.js} +4 -4
  198. package/dist/{photo-CMsOPCDi.cjs → photo-B9Veb_Am.cjs} +1 -1
  199. package/dist/{photo-BXxSVVs-.js → photo-DXbQg_FJ.js} +4 -4
  200. package/dist/{pie-Cq5U2vj8.js → pie-DZzf2lL7.js} +3 -3
  201. package/dist/{pie-DEAPOjlU.cjs → pie-U9hOnFzz.cjs} +1 -1
  202. package/dist/{pressBtn-CCxhhl94.cjs → pressBtn-BNr1R0gW.cjs} +1 -1
  203. package/dist/{pressBtn-C2Iq30mu.js → pressBtn-R5Wsj-Jw.js} +4 -4
  204. package/dist/{progressBar-7yCF8b0A.cjs → progressBar-CUSoF6f0.cjs} +1 -1
  205. package/dist/{progressBar-yWKY_v4S.js → progressBar-sLfJICdr.js} +2 -2
  206. package/dist/{progressCircle-D8JyF73W.cjs → progressCircle-B6P8B-t_.cjs} +1 -1
  207. package/dist/{progressCircle--w8mHGf0.js → progressCircle-BZgPxs_q.js} +2 -2
  208. package/dist/{qrcode-B2Ue7vYR.js → qrcode-C96PznAO.js} +2 -2
  209. package/dist/{qrcode-CXmICWJP.cjs → qrcode-DMrNxgq5.cjs} +1 -1
  210. package/dist/{raceBar-Bs0i8Afj.cjs → raceBar-BTExTEsZ.cjs} +1 -1
  211. package/dist/{raceBar-BjWSPr8P.js → raceBar-Dryx8Onl.js} +3 -3
  212. package/dist/{rad-xDBdI8mF.cjs → rad-DpkIOKs_.cjs} +1 -1
  213. package/dist/{rad-vI2aKcPX.js → rad-vw4O2ByZ.js} +2 -2
  214. package/dist/{rainfallFilterBar-0HQ-tE3G.js → rainfallFilterBar-BjAWqKtM.js} +2 -2
  215. package/dist/{rainfallFilterBar-CN0nk3fJ.cjs → rainfallFilterBar-CH3abw6C.cjs} +1 -1
  216. package/dist/{rainfallTimeCurve-vaLAn45Q.js → rainfallTimeCurve-BPDZGrlQ.js} +3 -3
  217. package/dist/{rainfallTimeCurve-ORf8Vjfg.cjs → rainfallTimeCurve-oJUJ2mt7.cjs} +1 -1
  218. package/dist/{rangeLin-BsFq4g_r.js → rangeLin-BFFy57TT.js} +2 -2
  219. package/dist/{rangeLin-DpeEuqHq.cjs → rangeLin-CBqKAU0P.cjs} +1 -1
  220. package/dist/{request-CipSkL_e.cjs → request-BcQP_dWt.cjs} +1 -1
  221. package/dist/{request-BKxONB4_.js → request-jIo7FwQD.js} +1 -1
  222. package/dist/{retainer1-fHIyhuCd.cjs → retainer1-CfcwA39J.cjs} +1 -1
  223. package/dist/{retainer1-Dff5PtOO.js → retainer1-goSPppQ-.js} +3 -3
  224. package/dist/{retainer2-CiQBrt5K.js → retainer2-BHdnsKrO.js} +3 -3
  225. package/dist/{retainer2-DVzzy6cB.cjs → retainer2-DwQmFU10.cjs} +1 -1
  226. package/dist/{riskRegionTable-C7wPe9Wi.js → riskRegionTable-B8-f5xx-.js} +2 -2
  227. package/dist/{riskRegionTable-S52o0BGS.cjs → riskRegionTable-CSJpPxPB.cjs} +1 -1
  228. package/dist/{sankey-CnfyQhE9.js → sankey-C0gaE3HM.js} +3 -3
  229. package/dist/{sankey-CaIBIfyD.cjs → sankey-DXCBHb16.cjs} +1 -1
  230. package/dist/{scd-DlNUR6eL.cjs → scd-CkEHu7nZ.cjs} +1 -1
  231. package/dist/{scd-DIMdDXIq.js → scd-Cwyft2g6.js} +2 -2
  232. package/dist/{sideMenu-zU_aIvID.js → sideMenu-BtVCCKw9.js} +2 -2
  233. package/dist/{sideMenu-Bkbku5u7.cjs → sideMenu-DUdDDJ9K.cjs} +1 -1
  234. package/dist/{slopeStability-DbSAX15K.cjs → slopeStability-Byb6AKti.cjs} +1 -1
  235. package/dist/{slopeStability-gOE7dn2Q.js → slopeStability-DwxDXTQG.js} +3 -3
  236. package/dist/{speedCurve-CSvi3dD_.js → speedCurve-BuNsy-ev.js} +3 -3
  237. package/dist/{speedCurve-U4Q4lhNV.cjs → speedCurve-DArreweP.cjs} +1 -1
  238. package/dist/{staticLine-DLQxHc40.cjs → staticLine-C50p0CZs.cjs} +1 -1
  239. package/dist/{staticLine-B9bZ_t-z.js → staticLine-DfkpF6ZW.js} +3 -3
  240. package/dist/{store-DEUtRQFz.cjs → store-ByTYoqyI.cjs} +1 -1
  241. package/dist/{store-CS3njfh9.js → store-D_TrU3nw.js} +2 -2
  242. package/dist/{swiper-7lbXP2Xv.js → swiper-CQiRByJd.js} +2 -2
  243. package/dist/{swiper-BWo-bX2U.cjs → swiper-L0Oo2dYD.cjs} +1 -1
  244. package/dist/{terminalConfigList-DSF7VA9Q.js → terminalConfigList-BhmfFm4f.js} +3 -3
  245. package/dist/{terminalConfigList-D_OHlni0.cjs → terminalConfigList-ChC43Bwq.cjs} +1 -1
  246. package/dist/{terminalList-BwF47jlu.cjs → terminalList-BQModRyk.cjs} +1 -1
  247. package/dist/{terminalList-DxSUKAey.js → terminalList-C6tswBt1.js} +3 -3
  248. package/dist/{textbox-DgjHYbNl.cjs → textbox-CSuiDl8k.cjs} +1 -1
  249. package/dist/{textbox-ANFqNmpB.js → textbox-CgOhFsYo.js} +3 -3
  250. package/dist/{timeQueryBar-DygP7vFr.cjs → timeQueryBar-BtCXHgrg.cjs} +1 -1
  251. package/dist/{timeQueryBar-CtVF9zsa.js → timeQueryBar-QEg1Flg9.js} +1 -1
  252. package/dist/{timeSeries-uWbV8gXH.js → timeSeries-B7NgbHfJ.js} +4 -4
  253. package/dist/{timeSeries-DpBC38Dd.cjs → timeSeries-DMINp9Fr.cjs} +1 -1
  254. package/dist/{timeSeriesCurve-CjS9xNfa.js → timeSeriesCurve-DEY5KQvu.js} +3 -3
  255. package/dist/{timeSeriesCurve-BSEfLBDp.cjs → timeSeriesCurve-wC9wHGI4.cjs} +1 -1
  256. package/dist/{toggleBtn-DSq8CzjF.js → toggleBtn-Brtfu0-e.js} +3 -3
  257. package/dist/{toggleBtn-Bk89Ssp4.cjs → toggleBtn-DO953U-q.cjs} +1 -1
  258. package/dist/{trajectoryConfigPanel-DmPGuqtg.js → trajectoryConfigPanel-BDdP3SdV.js} +1 -1
  259. package/dist/{trajectoryConfigPanel-CF1pM2pP.cjs → trajectoryConfigPanel-Bl_o9h2e.cjs} +1 -1
  260. package/dist/{trajectoryScatter-ChdtZPYx.js → trajectoryScatter-7-lJ5SMe.js} +3 -3
  261. package/dist/{trajectoryScatter-D9v1KK6I.cjs → trajectoryScatter-DVm5ljvY.cjs} +1 -1
  262. package/dist/{universalConfigPanel-D5EdU-OC.cjs → universalConfigPanel-Cm4TfqAK.cjs} +1 -1
  263. package/dist/{universalConfigPanel-DOr_O_6t.js → universalConfigPanel-DTLFrGXs.js} +1 -1
  264. package/dist/{universalTable-DlsTht70.cjs → universalTable-Bl9x3wEx.cjs} +1 -1
  265. package/dist/{universalTable-BAN6hSY_.js → universalTable-CCFr-GKz.js} +2 -2
  266. package/dist/{video-Pt7TPShk.cjs → video-DObKrYkw.cjs} +1 -1
  267. package/dist/{video-DNziJElR.js → video-gqqvz5Ge.js} +4 -4
  268. package/dist/{videoMonitor-Dt77p1d2.cjs → videoMonitor-B_Ur25fz.cjs} +1 -1
  269. package/dist/{videoMonitor-PFD2iawe.js → videoMonitor-CGMHzNdh.js} +2 -2
  270. package/dist/{vlu-BElCZvHd.js → vlu-6DSf0haZ.js} +2 -2
  271. package/dist/{vlu-4ykgONXu.cjs → vlu-Dbj9euY_.cjs} +1 -1
  272. package/dist/{weather-YG9UpLx7.cjs → weather-BsIBTn7G.cjs} +1 -1
  273. package/dist/{weather-Csspb97-.js → weather-CQBxQBld.js} +2 -2
  274. package/dist/{windLin-DPeoy6Jq.js → windLin-KIVk9hOD.js} +2 -2
  275. package/dist/{windLin-C0wheGq6.cjs → windLin-jVF-rhIx.cjs} +1 -1
  276. package/package.json +1 -1
  277. package/dist/gasStationList-sODxF5vW.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";var y=Object.defineProperty,k=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var m=(r,t,l)=>t in r?y(r,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[t]=l,f=(r,t)=>{for(var l in t||(t={}))S.call(t,l)&&m(r,l,t[l]);if(p)for(var l of p(t))E.call(t,l)&&m(r,l,t[l]);return r},h=(r,t)=>k(r,M(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/carousel/style/css");require("element-plus/es/components/carousel-item/style/css");const e=require("vue");require("html2canvas");const b=require("./element-resize-detector-BvkAwVg8.cjs"),Z=require("./index-BSzyUGIT.cjs"),v=require("./config-DbZfhrwE.cjs"),B="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",F="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",z={class:"mix-component"},N=["src","height","width"],q=["src"],A={DEFAULT_ICON:B,ACTIVE_ICON:F,NAME_CN:"轮播",NAME_EN:"Swiper",ORDER:5},I={bgColor:"#fff",radiusSize:8,interval:10,type:{value:"img",type:"radio",option:[{value:"img",label:"component.customized.img"},{value:"url",label:"component.customized.url"}],label:"component.customized.type"}},O=[{url:""}],T=["url"],R={DEFAULT:A,OPTIONS:I,DATA:O,PARAMS:T,COMMON:{}},U=e.defineComponent(h(f({},R),{__name:"swiper",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(r){const t=r,l={height:1080,width:1920};class _ extends b.BaseComponent{extractStyles(){var s,a,i,u,L,C,g;const{options:o}=this.props.conf;return{bgColor:((s=o==null?void 0:o.bgColor)==null?void 0:s.value)||"#fff",radiusSize:(i=(a=o==null?void 0:o.radiusSize)==null?void 0:a.value)!=null?i:8,interval:(L=(u=o==null?void 0:o.interval)==null?void 0:u.value)!=null?L:10,type:(g=(C=o==null?void 0:o.type)==null?void 0:C.value)!=null?g:"img"}}}const d=new _(t,"swiper");d.setupLifecycle();const c=d.getStyle(),x=n=>n?n.startsWith(v.FILE_URL)||n.startsWith("http")?n:v.FILE_URL+n:"";return(n,o)=>{const s=w.ElCarouselItem,a=w.ElCarousel;return e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",{class:"swiper-wrap",style:e.normalizeStyle({backgroundColor:e.unref(c).bgColor,borderRadius:`${e.unref(c).radiusSize}px`})},[e.createVNode(a,{autoplay:"","pause-on-hover":!1,interval:1e3*e.unref(c).interval,"indicator-position":"none",style:{width:"100%",height:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.conf.data,(i,u)=>(e.openBlock(),e.createBlock(s,{key:u},{default:e.withCtx(()=>[e.unref(c).type==="url"&&r.mode==="preview"?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:i.url,frameborder:"0",height:l.height,width:l.width,class:"w-full h-full"},null,8,N)):(e.openBlock(),e.createElementBlock("img",{key:1,class:"w-full h-full object-cover",src:x(i.url),alt:"轮播图片"},null,8,q))]),_:2},1024))),128))]),_:1},8,["interval"])],4),e.renderSlot(n.$slots,"default",{},void 0,!0)])}}})),D=Z._export_sfc(U,[["__scopeId","data-v-43b964ca"]]);exports.default=D;
1
+ "use strict";var y=Object.defineProperty,k=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var m=(r,t,l)=>t in r?y(r,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[t]=l,f=(r,t)=>{for(var l in t||(t={}))S.call(t,l)&&m(r,l,t[l]);if(p)for(var l of p(t))E.call(t,l)&&m(r,l,t[l]);return r},h=(r,t)=>k(r,M(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/carousel/style/css");require("element-plus/es/components/carousel-item/style/css");const e=require("vue");require("html2canvas");const b=require("./element-resize-detector-DYs3pJPp.cjs"),Z=require("./index-ZwyqrmaH.cjs"),v=require("./config-DbZfhrwE.cjs"),B="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",F="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",z={class:"mix-component"},N=["src","height","width"],q=["src"],A={DEFAULT_ICON:B,ACTIVE_ICON:F,NAME_CN:"轮播",NAME_EN:"Swiper",ORDER:5},I={bgColor:"#fff",radiusSize:8,interval:10,type:{value:"img",type:"radio",option:[{value:"img",label:"component.customized.img"},{value:"url",label:"component.customized.url"}],label:"component.customized.type"}},O=[{url:""}],T=["url"],R={DEFAULT:A,OPTIONS:I,DATA:O,PARAMS:T,COMMON:{}},U=e.defineComponent(h(f({},R),{__name:"swiper",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(r){const t=r,l={height:1080,width:1920};class _ extends b.BaseComponent{extractStyles(){var s,a,i,u,L,C,g;const{options:o}=this.props.conf;return{bgColor:((s=o==null?void 0:o.bgColor)==null?void 0:s.value)||"#fff",radiusSize:(i=(a=o==null?void 0:o.radiusSize)==null?void 0:a.value)!=null?i:8,interval:(L=(u=o==null?void 0:o.interval)==null?void 0:u.value)!=null?L:10,type:(g=(C=o==null?void 0:o.type)==null?void 0:C.value)!=null?g:"img"}}}const d=new _(t,"swiper");d.setupLifecycle();const c=d.getStyle(),x=n=>n?n.startsWith(v.FILE_URL)||n.startsWith("http")?n:v.FILE_URL+n:"";return(n,o)=>{const s=w.ElCarouselItem,a=w.ElCarousel;return e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",{class:"swiper-wrap",style:e.normalizeStyle({backgroundColor:e.unref(c).bgColor,borderRadius:`${e.unref(c).radiusSize}px`})},[e.createVNode(a,{autoplay:"","pause-on-hover":!1,interval:1e3*e.unref(c).interval,"indicator-position":"none",style:{width:"100%",height:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.conf.data,(i,u)=>(e.openBlock(),e.createBlock(s,{key:u},{default:e.withCtx(()=>[e.unref(c).type==="url"&&r.mode==="preview"?(e.openBlock(),e.createElementBlock("iframe",{key:0,src:i.url,frameborder:"0",height:l.height,width:l.width,class:"w-full h-full"},null,8,N)):(e.openBlock(),e.createElementBlock("img",{key:1,class:"w-full h-full object-cover",src:x(i.url),alt:"轮播图片"},null,8,q))]),_:2},1024))),128))]),_:1},8,["interval"])],4),e.renderSlot(n.$slots,"default",{},void 0,!0)])}}})),D=Z._export_sfc(U,[["__scopeId","data-v-43b964ca"]]);exports.default=D;
@@ -43,12 +43,12 @@ import "element-plus/es/components/option/style/css";
43
43
  import "element-plus/es/components/input/style/css";
44
44
  import "element-plus/es/components/icon/style/css";
45
45
  import { defineComponent as Ge, computed as Z, reactive as se, ref as B, onMounted as Xe, openBlock as y, createElementBlock as $, Fragment as ee, withDirectives as ue, normalizeStyle as de, unref as V, toDisplayString as C, createCommentVNode as S, createElementVNode as F, createVNode as i, withKeys as Ye, withCtx as o, createTextVNode as d, createBlock as D, renderList as Ze, renderSlot as et } from "vue";
46
- import { B as tt } from "./element-resize-detector-B-0BgVLy.js";
47
- import { _ as lt } from "./index-C8teBAQd.js";
46
+ import { B as tt } from "./element-resize-detector-BCRzpPES.js";
47
+ import { _ as lt } from "./index-LgTfdmT4.js";
48
48
  import { g as at } from "./titleStyle-BT5GlpAb.js";
49
49
  import { ElMessage as m, ElMessageBox as pe } from "element-plus";
50
50
  import { Search as it } from "@element-plus/icons-vue";
51
- import { a as T } from "./api-DAUw_RyI.js";
51
+ import { a as T } from "./api-Cyx2Fha0.js";
52
52
  import { A as ot, D as nt } from "./ele-lst-icon-CKpeRKmk.js";
53
53
  const rt = { class: "mix-body" }, st = { class: "toolbar" }, ut = { class: "table-wrapper" }, dt = { class: "pagination" }, pt = { class: "view-body" }, mt = {
54
54
  DEFAULT_ICON: nt,
@@ -1 +1 @@
1
- "use strict";var Ve=Object.defineProperty,he=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var G=(g,u,p)=>u in g?Ve(g,u,{enumerable:!0,configurable:!0,writable:!0,value:p}):g[u]=p,z=(g,u)=>{for(var p in u||(u={}))be.call(u,p)&&G(g,p,u[p]);if(Q)for(var p of Q(u))ve.call(u,p)&&G(g,p,u[p]);return g},j=(g,u)=>he(g,ye(u));var _=(g,u,p)=>new Promise((O,V)=>{var L=y=>{try{m(p.next(y))}catch(k){V(k)}},$=y=>{try{m(p.throw(y))}catch(k){V(k)}},m=y=>y.done?O(y.value):Promise.resolve(y.value).then(L,$);m((p=p.apply(g,u)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/loading/style/css");require("element-plus/es/components/descriptions/style/css");require("element-plus/es/components/descriptions-item/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/pagination/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/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),Ce=require("./element-resize-detector-BvkAwVg8.cjs"),xe=require("./index-BSzyUGIT.cjs"),Ne=require("./titleStyle-NSnz6cUg.cjs"),d=require("element-plus"),_e=require("@element-plus/icons-vue"),E=require("./api-CsM841lz.cjs"),X=require("./ele-lst-icon-CrxnHZ-A.cjs"),ke={class:"mix-body"},Be={class:"toolbar"},Se={class:"table-wrapper"},Ee={class:"pagination"},Ae={class:"view-body"},De={DEFAULT_ICON:X.DEFAULT_ICON,ACTIVE_ICON:X.ACTIVE_ICON,NAME_CN:"终端配置列表",NAME_EN:"TerminalConfigList",ORDER:6},Te={bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"uid",label:"终端配置编号",width:140,visible:!0},{key:"alias",label:"终端配置别名",width:120,visible:!0},{key:"name",label:"终端配置名称",width:140,visible:!0},{key:"lua_version",label:"LUA版本号",width:110,visible:!0},{key:"tag",label:"标签",width:120,visible:!0},{key:"description",label:"描述",minWidth:140,visible:!0},{key:"last_modified",label:"最后修改时间",width:170,visible:!0},{key:"created",label:"创建时间",width:170,visible:!0}]},Y=[{name:"终端配置名称",fv:"",object_id:"",unit:"",default:"",isText:!1,showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showBatchUpgradeBtn:!0,showDownloadBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0,uid:"终端配置编号",uid_visible:!0,alias:"终端配置别名",alias_visible:!0,name_visible:!0,lua_version:"LUA版本号",lua_version_visible:!0,tag:"标签",tag_visible:!0,description:"描述",description_visible:!0,last_modified:"最后修改时间",last_modified_visible:!0,created:"创建时间",created_visible:!0}],Ue=[{key:"showAddBtn",label:"添加",type:"checkbox",group:"命令组"},{key:"showViewBtn",label:"查看",type:"checkbox",group:"操作组"},{key:"showEditBtn",label:"编辑",type:"checkbox",group:"操作组"},{key:"showBatchUpgradeBtn",label:"批量升级",type:"checkbox",group:"操作组"},{key:"showDownloadBtn",label:"下载",type:"checkbox",group:"操作组"},{key:"showArchiveBtn",label:"资料备档",type:"checkbox",group:"操作组"},{key:"showDeleteBtn",label:"删除",type:"checkbox",group:"操作组"},{key:"name",label:"参数名称"},{key:"uid",label:"终端配置编号",checkable:!0,checkboxKey:"uid_visible"},{key:"alias",label:"终端配置别名",checkable:!0,checkboxKey:"alias_visible"},{key:"name",label:"终端配置名称",checkable:!0,checkboxKey:"name_visible"},{key:"lua_version",label:"LUA版本号",checkable:!0,checkboxKey:"lua_version_visible"},{key:"tag",label:"标签",checkable:!0,checkboxKey:"tag_visible"},{key:"description",label:"描述",checkable:!0,checkboxKey:"description_visible"},{key:"last_modified",label:"最后修改时间",checkable:!0,checkboxKey:"last_modified_visible"},{key:"created",label:"创建时间",checkable:!0,checkboxKey:"created_visible"}],ze=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Oe={},Me={DEFAULT:De,OPTIONS:Te,DATA:Y,PARAMS:Ue,SOURCE:ze,COMMON:Oe},qe=e.defineComponent(j(z({},Me),{__name:"terminalConfigList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""}},setup(g){const u=g;class p extends Ce.BaseComponent{getDataBool(t,o){var f,b;const n=(b=(f=this.props.conf)==null?void 0:f.data)==null?void 0:b[0];return n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0?!!n[t]:this.getOptionValue(t,o)}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),nameColor:this.getOptionValue("nameColor","#999"),valueColor:this.getOptionValue("valueColor","#333"),titleColor:this.getOptionValue("titleColor","#111"),titleSize:this.getOptionValue("titleSize",14),nameSize:this.getOptionValue("nameSize",12),valueSize:this.getOptionValue("valueSize",12),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!1),showAddBtn:this.getDataBool("showAddBtn",!0),showViewBtn:this.getDataBool("showViewBtn",!0),showEditBtn:this.getDataBool("showEditBtn",!0),showBatchUpgradeBtn:this.getDataBool("showBatchUpgradeBtn",!0),showDownloadBtn:this.getDataBool("showDownloadBtn",!0),showArchiveBtn:this.getDataBool("showArchiveBtn",!0),showDeleteBtn:this.getDataBool("showDeleteBtn",!0)}}init(){var t;if(this.Style.value=this.extractStyles(),this.applyTheme(),!((t=this.props.conf.data)!=null&&t.length))this.props.conf.data=JSON.parse(JSON.stringify(Y));else{const o=this.props.conf.data[0],n={showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showBatchUpgradeBtn:!0,showDownloadBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[f,b]of Object.entries(n))o[f]===void 0&&(o[f]=b)}}}const O=new p(u,"terminalConfigList");O.setupLifecycle();const V=O.getStyle(),L=e.computed(()=>Ne.generateTitleStyle(u.conf.options)),$=e.computed(()=>{var o,n,f,b;const i=((n=(o=u.conf)==null?void 0:o.options)==null?void 0:n.columns)||[],t=((b=(f=u.conf)==null?void 0:f.data)==null?void 0:b[0])||{};return(Array.isArray(i)?i:[]).map(s=>{const C=t[s.key],A=`${s.key}_visible`,B=t[A];return{prop:s.key,label:C!==void 0&&C!==""?String(C):s.label,width:s.width,minWidth:s.minWidth,visible:B!==void 0?!!B:s.visible!==!1}})}),m=e.reactive({current:1,pageSize:10,total:0}),y=e.ref(""),k=e.ref("name"),M=e.ref([]),R=e.ref(!1);function Z(){const i=[],t=y.value.trim();return t&&i.push([k.value,"like",`%${t}%`]),{page_index:m.current,page_size:m.pageSize,where_and:JSON.stringify(i)}}function v(){return _(this,null,function*(){var i;R.value=!0;try{const t=yield E.api.post("terminal_config_list",Z(),!0),o=(i=t==null?void 0:t.result)!=null?i:t;M.value=Array.isArray(o==null?void 0:o.data)?[...o.data]:[];const n=o==null?void 0:o.total_records;m.total=typeof n=="number"?n:M.value.length,t&&t.code!==void 0&&t.code!==200&&d.ElMessage.warning(t.msg||t.info||"列表接口返回非成功状态")}catch(t){console.error(t),M.value=[],m.total=0,d.ElMessage.error("加载终端配置列表失败")}finally{R.value=!1}})}const ee=e.computed(()=>M.value);function J(i){if(i==null||i==="")return"";if(Array.isArray(i))return i.join(", ");if(typeof i=="string")try{const t=JSON.parse(i);return Array.isArray(t)?t.join(", "):i}catch(t){return i}return String(i)}function te(i,t){if(t==="tag")return J(i.tag);const o=i[t];return o==null?"":String(o)}function K(){m.current=1,v()}function le(){y.value="",m.current=1,v()}function ae(){m.current=1,v()}function ie(){v()}const D=e.ref(!1),T=e.ref(!1),N=e.ref(!1),a=e.reactive({id:0,uid:"",name:"",alias:"",tagInput:"",description:"",terminal_script:"",config_script:"",addition:"[]",reference:"",hardware:"",is_available:1});function oe(){const i=a.tagInput.trim();return i?i.split(",").map(t=>t.trim()).filter(Boolean):[]}function ne(i){if(i==null){a.tagInput="";return}if(Array.isArray(i)){a.tagInput=i.join(", ");return}if(typeof i=="string")try{const t=JSON.parse(i);a.tagInput=Array.isArray(t)?t.join(", "):i}catch(t){a.tagInput=i}}function q(){a.id=0,a.uid="",a.name="",a.alias="",a.tagInput="",a.description="",a.terminal_script="",a.config_script="",a.addition="[]",a.reference="",a.hardware="",a.is_available=1}function re(){var t;const i=((t=a.addition)==null?void 0:t.trim())||"[]";try{return JSON.parse(i)}catch(o){throw new Error("扩展信息需为合法 JSON")}}function P(){const i=re();return{id:a.id,uid:a.uid.trim(),name:a.name.trim(),alias:a.alias.trim(),description:a.description,tag:oe(),terminal_script:a.terminal_script,config_script:a.config_script,addition:i,reference:a.reference,hardware:a.hardware,is_available:a.is_available}}function se(){q(),a.addition="[]",D.value=!0}function de(i){return _(this,null,function*(){var t,o,n,f,b,s,C,A,B,c,U;q(),T.value=!0,N.value=!0;try{const x=yield E.api.post("terminal_config_item",{uid:i.uid},!0),r=(t=x==null?void 0:x.result)!=null?t:x;if(r&&typeof r=="object"){if(a.id=Number(r.id)||0,a.uid=String((n=(o=r.uid)!=null?o:i.uid)!=null?n:""),a.name=String((f=r.name)!=null?f:""),a.alias=String((b=r.alias)!=null?b:""),ne(r.tag),a.description=String((s=r.description)!=null?s:""),a.terminal_script=String((C=r.terminal_script)!=null?C:""),a.config_script=String((A=r.config_script)!=null?A:""),r.addition!==void 0&&r.addition!==null)if(typeof r.addition=="string")try{a.addition=JSON.stringify(JSON.parse(r.addition),null,2)}catch(H){a.addition=String(r.addition)}else a.addition=JSON.stringify(r.addition,null,2);else a.addition="[]";a.reference=String((B=r.reference)!=null?B:""),a.hardware=String((c=r.hardware)!=null?c:""),a.is_available=r.is_available!==void 0?Number(r.is_available):1}}catch(x){a.uid=String(i.uid),a.name=String((U=i.name)!=null?U:""),d.ElMessage.warning("拉取配置详情失败,已使用列表行数据")}finally{N.value=!1}})}function ue(){return _(this,null,function*(){var t;if(!((t=a.name)!=null&&t.trim())){d.ElMessage.warning("请填写配置名称");return}let i;try{i=j(z({},P()),{id:0})}catch(o){d.ElMessage.warning((o==null?void 0:o.message)||"扩展信息格式错误");return}N.value=!0;try{yield E.api.post("terminal_config_create",i,!0),d.ElMessage.success("添加成功"),D.value=!1,yield v()}catch(o){d.ElMessage.error("添加失败")}finally{N.value=!1}})}function ce(){return _(this,null,function*(){var t;if(!((t=a.name)!=null&&t.trim())){d.ElMessage.warning("请填写配置名称");return}let i;try{i=P()}catch(o){d.ElMessage.warning((o==null?void 0:o.message)||"扩展信息格式错误");return}N.value=!0;try{yield E.api.post("terminal_config_update",i,!0),d.ElMessage.success("保存成功"),T.value=!1,yield v()}catch(o){d.ElMessage.error("保存失败")}finally{N.value=!1}})}const I=e.ref(!1),F=e.ref(!1),h=e.ref(null);function pe(i){return _(this,null,function*(){h.value=null,I.value=!0,F.value=!0;try{const t=yield E.api.post("terminal_config_item",{uid:i.uid},!0),o=t==null?void 0:t.result;o&&typeof o=="object"?h.value=o:(h.value=z({},i),d.ElMessage.warning("未返回详情,已显示列表行数据"))}catch(t){h.value=z({},i),d.ElMessage.warning("加载详情失败,已显示列表行数据")}finally{F.value=!1}})}function me(i){return _(this,null,function*(){try{(yield E.api.post("upgrade_config_lua",{uid:i.uid},!0)).code===200&&(d.ElMessage.success("已触发批量升级"),yield v())}catch(t){d.ElMessage.error("批量升级请求失败(参数可能与后端约定不一致,可在 mixui 终端管理中操作)")}})}function fe(i){const t=i.lua_file;if(!t){d.ElMessage.warning("无 LUA 文件地址");return}if(/^https?:\/\//i.test(t)){window.open(t,"_blank");return}const o=(localStorage.getItem("globalApiUrl")||"").replace(/\/$/,""),n=o?`${o}/${t.replace(/^\//,"")}`:t;window.open(n,"_blank")}function ge(i){d.ElMessageBox.confirm(`确认对配置「${i.name||i.uid}」进行资料备档吗?`,"提示",{type:"info"}).then(()=>{d.ElMessage.success("完整备档流程请在 mixui「终端管理」中操作")}).catch(()=>{})}function we(i){d.ElMessageBox.confirm(`确认删除终端配置「${i.name||i.uid}」吗?`,"警告",{type:"warning"}).then(()=>_(null,null,function*(){try{yield E.api.post("terminal_config_delete",{uid:i.uid,id:i.id},!0),d.ElMessage.success("删除成功"),yield v()}catch(t){d.ElMessage.error("删除失败")}})).catch(()=>{})}return e.onMounted(()=>{v()}),(i,t)=>{const o=w.ElIcon,n=w.ElInput,f=w.ElOption,b=w.ElSelect,s=w.ElButton,C=w.ElTableColumn,A=w.ElTable,B=w.ElPagination,c=w.ElFormItem,U=w.ElForm,x=w.ElDialog,r=w.ElDescriptionsItem,H=w.ElDescriptions,W=w.ElLoadingDirective;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"terminal-config-list mix-component",style:e.normalizeStyle({backgroundColor:e.unref(V).bgColor,borderRadius:`${e.unref(V).radiusSize}px`})},[e.unref(V).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(L.value)},e.toDisplayString(g.conf.caption||g.conf.name),5)),e.createElementVNode("div",ke,[e.createElementVNode("div",Be,[e.createVNode(n,{modelValue:y.value,"onUpdate:modelValue":t[0]||(t[0]=l=>y.value=l),placeholder:"搜索终端配置",size:"small",class:"toolbar-search",onKeyup:e.withKeys(K,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(o,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(_e.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(b,{modelValue:k.value,"onUpdate:modelValue":t[1]||(t[1]=l=>k.value=l),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(f,{label:"配置名称",value:"name"}),e.createVNode(f,{label:"配置编号",value:"uid"}),e.createVNode(f,{label:"配置别名",value:"alias"}),e.createVNode(f,{label:"标签",value:"tag"})]),_:1},8,["modelValue"]),e.createVNode(s,{type:"primary",onClick:K},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(s,{onClick:le},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(V).showAddBtn?(e.openBlock(),e.createBlock(s,{key:0,type:"success",onClick:se},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("添加",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Se,[e.createVNode(A,{data:ee.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.prop},[l.visible?(e.openBlock(),e.createBlock(C,{key:0,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth},{default:e.withCtx(S=>[e.createElementVNode("span",null,e.toDisplayString(te(S.row,l.prop)),1)]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(C,{label:"操作","min-width":"340",fixed:"right"},{default:e.withCtx(l=>[e.unref(V).showViewBtn?(e.openBlock(),e.createBlock(s,{key:0,size:"small",onClick:S=>pe(l.row)},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("查看",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showEditBtn?(e.openBlock(),e.createBlock(s,{key:1,size:"small",type:"primary",onClick:S=>de(l.row)},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showBatchUpgradeBtn?(e.openBlock(),e.createBlock(s,{key:2,size:"small",onClick:S=>me(l.row)},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode("批量升级",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showDownloadBtn?(e.openBlock(),e.createBlock(s,{key:3,size:"small",onClick:S=>fe(l.row)},{default:e.withCtx(()=>[...t[31]||(t[31]=[e.createTextVNode("下载",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showArchiveBtn?(e.openBlock(),e.createBlock(s,{key:4,size:"small",type:"info",onClick:S=>ge(l.row)},{default:e.withCtx(()=>[...t[32]||(t[32]=[e.createTextVNode("资料备档",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showDeleteBtn?(e.openBlock(),e.createBlock(s,{key:5,size:"small",type:"danger",onClick:S=>we(l.row)},{default:e.withCtx(()=>[...t[33]||(t[33]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",Ee,[e.createVNode(B,{"current-page":m.current,"onUpdate:currentPage":t[2]||(t[2]=l=>m.current=l),"page-size":m.pageSize,"onUpdate:pageSize":t[3]||(t[3]=l=>m.pageSize=l),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:m.total,onSizeChange:ae,onCurrentChange:ie},null,8,["current-page","page-size","total"])])]),e.renderSlot(i.$slots,"default",{},void 0,!0)],4)),[[W,R.value]]),e.createVNode(x,{modelValue:D.value,"onUpdate:modelValue":t[12]||(t[12]=l=>D.value=l),title:"添加终端配置",width:"900px","destroy-on-close":"",onClosed:q},{footer:e.withCtx(()=>[e.createVNode(s,{onClick:t[11]||(t[11]=l=>D.value=!1)},{default:e.withCtx(()=>[...t[34]||(t[34]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(s,{type:"primary",loading:N.value,onClick:ue},{default:e.withCtx(()=>[...t[35]||(t[35]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(U,{model:a,"label-width":"130px"},{default:e.withCtx(()=>[e.createVNode(c,{label:"配置名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.name,"onUpdate:modelValue":t[4]||(t[4]=l=>a.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"配置别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.alias,"onUpdate:modelValue":t[5]||(t[5]=l=>a.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"标签"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.tagInput,"onUpdate:modelValue":t[6]||(t[6]=l=>a.tagInput=l),placeholder:"多个标签用英文逗号分隔"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"Aprus脚本"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.terminal_script,"onUpdate:modelValue":t[7]||(t[7]=l=>a.terminal_script=l),type:"textarea",rows:5,class:"mono-input"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"Config脚本"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.config_script,"onUpdate:modelValue":t[8]||(t[8]=l=>a.config_script=l),type:"textarea",rows:5,class:"mono-input"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"扩展信息"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.addition,"onUpdate:modelValue":t[9]||(t[9]=l=>a.addition=l),type:"textarea",rows:4,placeholder:"JSON,默认 []"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.description,"onUpdate:modelValue":t[10]||(t[10]=l=>a.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(x,{modelValue:T.value,"onUpdate:modelValue":t[22]||(t[22]=l=>T.value=l),title:"编辑终端配置",width:"900px","destroy-on-close":"",onClosed:q},{footer:e.withCtx(()=>[e.createVNode(s,{onClick:t[21]||(t[21]=l=>T.value=!1)},{default:e.withCtx(()=>[...t[36]||(t[36]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(s,{type:"primary",loading:N.value,onClick:ce},{default:e.withCtx(()=>[...t[37]||(t[37]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(U,{model:a,"label-width":"130px"},{default:e.withCtx(()=>[e.createVNode(c,{label:"配置编号"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.uid,"onUpdate:modelValue":t[13]||(t[13]=l=>a.uid=l),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"配置名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.name,"onUpdate:modelValue":t[14]||(t[14]=l=>a.name=l)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"配置别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.alias,"onUpdate:modelValue":t[15]||(t[15]=l=>a.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"标签"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.tagInput,"onUpdate:modelValue":t[16]||(t[16]=l=>a.tagInput=l),placeholder:"多个标签用英文逗号分隔"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"Aprus脚本"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.terminal_script,"onUpdate:modelValue":t[17]||(t[17]=l=>a.terminal_script=l),type:"textarea",rows:5,class:"mono-input"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"Config脚本"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.config_script,"onUpdate:modelValue":t[18]||(t[18]=l=>a.config_script=l),type:"textarea",rows:5,class:"mono-input"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"扩展信息"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.addition,"onUpdate:modelValue":t[19]||(t[19]=l=>a.addition=l),type:"textarea",rows:4},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.description,"onUpdate:modelValue":t[20]||(t[20]=l=>a.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(x,{modelValue:I.value,"onUpdate:modelValue":t[24]||(t[24]=l=>I.value=l),title:"终端配置详情",width:"800px","destroy-on-close":""},{footer:e.withCtx(()=>[e.createVNode(s,{type:"primary",onClick:t[23]||(t[23]=l=>I.value=!1)},{default:e.withCtx(()=>[...t[38]||(t[38]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",Ae,[h.value?(e.openBlock(),e.createBlock(H,{key:0,column:2,border:""},{default:e.withCtx(()=>[e.createVNode(r,{label:"配置编号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.uid)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"配置名称"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.name)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"配置别名"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.alias)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"LUA版本"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.lua_version)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"标签",span:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(J(h.value.tag)),1)]),_:1}),e.createVNode(r,{label:"最后修改"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.last_modified)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"创建时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.created)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"描述",span:2},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.description)!=null?l:""),1)]}),_:1})]),_:1})):e.createCommentVNode("",!0)])),[[W,F.value]])]),_:1},8,["modelValue"])],64)}}})),Ie=xe._export_sfc(qe,[["__scopeId","data-v-11ad59a3"]]);exports.default=Ie;
1
+ "use strict";var Ve=Object.defineProperty,he=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable;var G=(g,u,p)=>u in g?Ve(g,u,{enumerable:!0,configurable:!0,writable:!0,value:p}):g[u]=p,z=(g,u)=>{for(var p in u||(u={}))be.call(u,p)&&G(g,p,u[p]);if(Q)for(var p of Q(u))ve.call(u,p)&&G(g,p,u[p]);return g},j=(g,u)=>he(g,ye(u));var _=(g,u,p)=>new Promise((O,V)=>{var L=y=>{try{m(p.next(y))}catch(k){V(k)}},$=y=>{try{m(p.throw(y))}catch(k){V(k)}},m=y=>y.done?O(y.value):Promise.resolve(y.value).then(L,$);m((p=p.apply(g,u)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/loading/style/css");require("element-plus/es/components/descriptions/style/css");require("element-plus/es/components/descriptions-item/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/pagination/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/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),Ce=require("./element-resize-detector-DYs3pJPp.cjs"),xe=require("./index-ZwyqrmaH.cjs"),Ne=require("./titleStyle-NSnz6cUg.cjs"),d=require("element-plus"),_e=require("@element-plus/icons-vue"),E=require("./api-nw_9niqv.cjs"),X=require("./ele-lst-icon-CrxnHZ-A.cjs"),ke={class:"mix-body"},Be={class:"toolbar"},Se={class:"table-wrapper"},Ee={class:"pagination"},Ae={class:"view-body"},De={DEFAULT_ICON:X.DEFAULT_ICON,ACTIVE_ICON:X.ACTIVE_ICON,NAME_CN:"终端配置列表",NAME_EN:"TerminalConfigList",ORDER:6},Te={bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"uid",label:"终端配置编号",width:140,visible:!0},{key:"alias",label:"终端配置别名",width:120,visible:!0},{key:"name",label:"终端配置名称",width:140,visible:!0},{key:"lua_version",label:"LUA版本号",width:110,visible:!0},{key:"tag",label:"标签",width:120,visible:!0},{key:"description",label:"描述",minWidth:140,visible:!0},{key:"last_modified",label:"最后修改时间",width:170,visible:!0},{key:"created",label:"创建时间",width:170,visible:!0}]},Y=[{name:"终端配置名称",fv:"",object_id:"",unit:"",default:"",isText:!1,showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showBatchUpgradeBtn:!0,showDownloadBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0,uid:"终端配置编号",uid_visible:!0,alias:"终端配置别名",alias_visible:!0,name_visible:!0,lua_version:"LUA版本号",lua_version_visible:!0,tag:"标签",tag_visible:!0,description:"描述",description_visible:!0,last_modified:"最后修改时间",last_modified_visible:!0,created:"创建时间",created_visible:!0}],Ue=[{key:"showAddBtn",label:"添加",type:"checkbox",group:"命令组"},{key:"showViewBtn",label:"查看",type:"checkbox",group:"操作组"},{key:"showEditBtn",label:"编辑",type:"checkbox",group:"操作组"},{key:"showBatchUpgradeBtn",label:"批量升级",type:"checkbox",group:"操作组"},{key:"showDownloadBtn",label:"下载",type:"checkbox",group:"操作组"},{key:"showArchiveBtn",label:"资料备档",type:"checkbox",group:"操作组"},{key:"showDeleteBtn",label:"删除",type:"checkbox",group:"操作组"},{key:"name",label:"参数名称"},{key:"uid",label:"终端配置编号",checkable:!0,checkboxKey:"uid_visible"},{key:"alias",label:"终端配置别名",checkable:!0,checkboxKey:"alias_visible"},{key:"name",label:"终端配置名称",checkable:!0,checkboxKey:"name_visible"},{key:"lua_version",label:"LUA版本号",checkable:!0,checkboxKey:"lua_version_visible"},{key:"tag",label:"标签",checkable:!0,checkboxKey:"tag_visible"},{key:"description",label:"描述",checkable:!0,checkboxKey:"description_visible"},{key:"last_modified",label:"最后修改时间",checkable:!0,checkboxKey:"last_modified_visible"},{key:"created",label:"创建时间",checkable:!0,checkboxKey:"created_visible"}],ze=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Oe={},Me={DEFAULT:De,OPTIONS:Te,DATA:Y,PARAMS:Ue,SOURCE:ze,COMMON:Oe},qe=e.defineComponent(j(z({},Me),{__name:"terminalConfigList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""}},setup(g){const u=g;class p extends Ce.BaseComponent{getDataBool(t,o){var f,b;const n=(b=(f=this.props.conf)==null?void 0:f.data)==null?void 0:b[0];return n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0?!!n[t]:this.getOptionValue(t,o)}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),nameColor:this.getOptionValue("nameColor","#999"),valueColor:this.getOptionValue("valueColor","#333"),titleColor:this.getOptionValue("titleColor","#111"),titleSize:this.getOptionValue("titleSize",14),nameSize:this.getOptionValue("nameSize",12),valueSize:this.getOptionValue("valueSize",12),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!1),showAddBtn:this.getDataBool("showAddBtn",!0),showViewBtn:this.getDataBool("showViewBtn",!0),showEditBtn:this.getDataBool("showEditBtn",!0),showBatchUpgradeBtn:this.getDataBool("showBatchUpgradeBtn",!0),showDownloadBtn:this.getDataBool("showDownloadBtn",!0),showArchiveBtn:this.getDataBool("showArchiveBtn",!0),showDeleteBtn:this.getDataBool("showDeleteBtn",!0)}}init(){var t;if(this.Style.value=this.extractStyles(),this.applyTheme(),!((t=this.props.conf.data)!=null&&t.length))this.props.conf.data=JSON.parse(JSON.stringify(Y));else{const o=this.props.conf.data[0],n={showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showBatchUpgradeBtn:!0,showDownloadBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[f,b]of Object.entries(n))o[f]===void 0&&(o[f]=b)}}}const O=new p(u,"terminalConfigList");O.setupLifecycle();const V=O.getStyle(),L=e.computed(()=>Ne.generateTitleStyle(u.conf.options)),$=e.computed(()=>{var o,n,f,b;const i=((n=(o=u.conf)==null?void 0:o.options)==null?void 0:n.columns)||[],t=((b=(f=u.conf)==null?void 0:f.data)==null?void 0:b[0])||{};return(Array.isArray(i)?i:[]).map(s=>{const C=t[s.key],A=`${s.key}_visible`,B=t[A];return{prop:s.key,label:C!==void 0&&C!==""?String(C):s.label,width:s.width,minWidth:s.minWidth,visible:B!==void 0?!!B:s.visible!==!1}})}),m=e.reactive({current:1,pageSize:10,total:0}),y=e.ref(""),k=e.ref("name"),M=e.ref([]),R=e.ref(!1);function Z(){const i=[],t=y.value.trim();return t&&i.push([k.value,"like",`%${t}%`]),{page_index:m.current,page_size:m.pageSize,where_and:JSON.stringify(i)}}function v(){return _(this,null,function*(){var i;R.value=!0;try{const t=yield E.api.post("terminal_config_list",Z(),!0),o=(i=t==null?void 0:t.result)!=null?i:t;M.value=Array.isArray(o==null?void 0:o.data)?[...o.data]:[];const n=o==null?void 0:o.total_records;m.total=typeof n=="number"?n:M.value.length,t&&t.code!==void 0&&t.code!==200&&d.ElMessage.warning(t.msg||t.info||"列表接口返回非成功状态")}catch(t){console.error(t),M.value=[],m.total=0,d.ElMessage.error("加载终端配置列表失败")}finally{R.value=!1}})}const ee=e.computed(()=>M.value);function J(i){if(i==null||i==="")return"";if(Array.isArray(i))return i.join(", ");if(typeof i=="string")try{const t=JSON.parse(i);return Array.isArray(t)?t.join(", "):i}catch(t){return i}return String(i)}function te(i,t){if(t==="tag")return J(i.tag);const o=i[t];return o==null?"":String(o)}function K(){m.current=1,v()}function le(){y.value="",m.current=1,v()}function ae(){m.current=1,v()}function ie(){v()}const D=e.ref(!1),T=e.ref(!1),N=e.ref(!1),a=e.reactive({id:0,uid:"",name:"",alias:"",tagInput:"",description:"",terminal_script:"",config_script:"",addition:"[]",reference:"",hardware:"",is_available:1});function oe(){const i=a.tagInput.trim();return i?i.split(",").map(t=>t.trim()).filter(Boolean):[]}function ne(i){if(i==null){a.tagInput="";return}if(Array.isArray(i)){a.tagInput=i.join(", ");return}if(typeof i=="string")try{const t=JSON.parse(i);a.tagInput=Array.isArray(t)?t.join(", "):i}catch(t){a.tagInput=i}}function q(){a.id=0,a.uid="",a.name="",a.alias="",a.tagInput="",a.description="",a.terminal_script="",a.config_script="",a.addition="[]",a.reference="",a.hardware="",a.is_available=1}function re(){var t;const i=((t=a.addition)==null?void 0:t.trim())||"[]";try{return JSON.parse(i)}catch(o){throw new Error("扩展信息需为合法 JSON")}}function P(){const i=re();return{id:a.id,uid:a.uid.trim(),name:a.name.trim(),alias:a.alias.trim(),description:a.description,tag:oe(),terminal_script:a.terminal_script,config_script:a.config_script,addition:i,reference:a.reference,hardware:a.hardware,is_available:a.is_available}}function se(){q(),a.addition="[]",D.value=!0}function de(i){return _(this,null,function*(){var t,o,n,f,b,s,C,A,B,c,U;q(),T.value=!0,N.value=!0;try{const x=yield E.api.post("terminal_config_item",{uid:i.uid},!0),r=(t=x==null?void 0:x.result)!=null?t:x;if(r&&typeof r=="object"){if(a.id=Number(r.id)||0,a.uid=String((n=(o=r.uid)!=null?o:i.uid)!=null?n:""),a.name=String((f=r.name)!=null?f:""),a.alias=String((b=r.alias)!=null?b:""),ne(r.tag),a.description=String((s=r.description)!=null?s:""),a.terminal_script=String((C=r.terminal_script)!=null?C:""),a.config_script=String((A=r.config_script)!=null?A:""),r.addition!==void 0&&r.addition!==null)if(typeof r.addition=="string")try{a.addition=JSON.stringify(JSON.parse(r.addition),null,2)}catch(H){a.addition=String(r.addition)}else a.addition=JSON.stringify(r.addition,null,2);else a.addition="[]";a.reference=String((B=r.reference)!=null?B:""),a.hardware=String((c=r.hardware)!=null?c:""),a.is_available=r.is_available!==void 0?Number(r.is_available):1}}catch(x){a.uid=String(i.uid),a.name=String((U=i.name)!=null?U:""),d.ElMessage.warning("拉取配置详情失败,已使用列表行数据")}finally{N.value=!1}})}function ue(){return _(this,null,function*(){var t;if(!((t=a.name)!=null&&t.trim())){d.ElMessage.warning("请填写配置名称");return}let i;try{i=j(z({},P()),{id:0})}catch(o){d.ElMessage.warning((o==null?void 0:o.message)||"扩展信息格式错误");return}N.value=!0;try{yield E.api.post("terminal_config_create",i,!0),d.ElMessage.success("添加成功"),D.value=!1,yield v()}catch(o){d.ElMessage.error("添加失败")}finally{N.value=!1}})}function ce(){return _(this,null,function*(){var t;if(!((t=a.name)!=null&&t.trim())){d.ElMessage.warning("请填写配置名称");return}let i;try{i=P()}catch(o){d.ElMessage.warning((o==null?void 0:o.message)||"扩展信息格式错误");return}N.value=!0;try{yield E.api.post("terminal_config_update",i,!0),d.ElMessage.success("保存成功"),T.value=!1,yield v()}catch(o){d.ElMessage.error("保存失败")}finally{N.value=!1}})}const I=e.ref(!1),F=e.ref(!1),h=e.ref(null);function pe(i){return _(this,null,function*(){h.value=null,I.value=!0,F.value=!0;try{const t=yield E.api.post("terminal_config_item",{uid:i.uid},!0),o=t==null?void 0:t.result;o&&typeof o=="object"?h.value=o:(h.value=z({},i),d.ElMessage.warning("未返回详情,已显示列表行数据"))}catch(t){h.value=z({},i),d.ElMessage.warning("加载详情失败,已显示列表行数据")}finally{F.value=!1}})}function me(i){return _(this,null,function*(){try{(yield E.api.post("upgrade_config_lua",{uid:i.uid},!0)).code===200&&(d.ElMessage.success("已触发批量升级"),yield v())}catch(t){d.ElMessage.error("批量升级请求失败(参数可能与后端约定不一致,可在 mixui 终端管理中操作)")}})}function fe(i){const t=i.lua_file;if(!t){d.ElMessage.warning("无 LUA 文件地址");return}if(/^https?:\/\//i.test(t)){window.open(t,"_blank");return}const o=(localStorage.getItem("globalApiUrl")||"").replace(/\/$/,""),n=o?`${o}/${t.replace(/^\//,"")}`:t;window.open(n,"_blank")}function ge(i){d.ElMessageBox.confirm(`确认对配置「${i.name||i.uid}」进行资料备档吗?`,"提示",{type:"info"}).then(()=>{d.ElMessage.success("完整备档流程请在 mixui「终端管理」中操作")}).catch(()=>{})}function we(i){d.ElMessageBox.confirm(`确认删除终端配置「${i.name||i.uid}」吗?`,"警告",{type:"warning"}).then(()=>_(null,null,function*(){try{yield E.api.post("terminal_config_delete",{uid:i.uid,id:i.id},!0),d.ElMessage.success("删除成功"),yield v()}catch(t){d.ElMessage.error("删除失败")}})).catch(()=>{})}return e.onMounted(()=>{v()}),(i,t)=>{const o=w.ElIcon,n=w.ElInput,f=w.ElOption,b=w.ElSelect,s=w.ElButton,C=w.ElTableColumn,A=w.ElTable,B=w.ElPagination,c=w.ElFormItem,U=w.ElForm,x=w.ElDialog,r=w.ElDescriptionsItem,H=w.ElDescriptions,W=w.ElLoadingDirective;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"terminal-config-list mix-component",style:e.normalizeStyle({backgroundColor:e.unref(V).bgColor,borderRadius:`${e.unref(V).radiusSize}px`})},[e.unref(V).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(L.value)},e.toDisplayString(g.conf.caption||g.conf.name),5)),e.createElementVNode("div",ke,[e.createElementVNode("div",Be,[e.createVNode(n,{modelValue:y.value,"onUpdate:modelValue":t[0]||(t[0]=l=>y.value=l),placeholder:"搜索终端配置",size:"small",class:"toolbar-search",onKeyup:e.withKeys(K,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(o,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(_e.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(b,{modelValue:k.value,"onUpdate:modelValue":t[1]||(t[1]=l=>k.value=l),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(f,{label:"配置名称",value:"name"}),e.createVNode(f,{label:"配置编号",value:"uid"}),e.createVNode(f,{label:"配置别名",value:"alias"}),e.createVNode(f,{label:"标签",value:"tag"})]),_:1},8,["modelValue"]),e.createVNode(s,{type:"primary",onClick:K},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(s,{onClick:le},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(V).showAddBtn?(e.openBlock(),e.createBlock(s,{key:0,type:"success",onClick:se},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("添加",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Se,[e.createVNode(A,{data:ee.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.prop},[l.visible?(e.openBlock(),e.createBlock(C,{key:0,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth},{default:e.withCtx(S=>[e.createElementVNode("span",null,e.toDisplayString(te(S.row,l.prop)),1)]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(C,{label:"操作","min-width":"340",fixed:"right"},{default:e.withCtx(l=>[e.unref(V).showViewBtn?(e.openBlock(),e.createBlock(s,{key:0,size:"small",onClick:S=>pe(l.row)},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("查看",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showEditBtn?(e.openBlock(),e.createBlock(s,{key:1,size:"small",type:"primary",onClick:S=>de(l.row)},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showBatchUpgradeBtn?(e.openBlock(),e.createBlock(s,{key:2,size:"small",onClick:S=>me(l.row)},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode("批量升级",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showDownloadBtn?(e.openBlock(),e.createBlock(s,{key:3,size:"small",onClick:S=>fe(l.row)},{default:e.withCtx(()=>[...t[31]||(t[31]=[e.createTextVNode("下载",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showArchiveBtn?(e.openBlock(),e.createBlock(s,{key:4,size:"small",type:"info",onClick:S=>ge(l.row)},{default:e.withCtx(()=>[...t[32]||(t[32]=[e.createTextVNode("资料备档",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(V).showDeleteBtn?(e.openBlock(),e.createBlock(s,{key:5,size:"small",type:"danger",onClick:S=>we(l.row)},{default:e.withCtx(()=>[...t[33]||(t[33]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",Ee,[e.createVNode(B,{"current-page":m.current,"onUpdate:currentPage":t[2]||(t[2]=l=>m.current=l),"page-size":m.pageSize,"onUpdate:pageSize":t[3]||(t[3]=l=>m.pageSize=l),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:m.total,onSizeChange:ae,onCurrentChange:ie},null,8,["current-page","page-size","total"])])]),e.renderSlot(i.$slots,"default",{},void 0,!0)],4)),[[W,R.value]]),e.createVNode(x,{modelValue:D.value,"onUpdate:modelValue":t[12]||(t[12]=l=>D.value=l),title:"添加终端配置",width:"900px","destroy-on-close":"",onClosed:q},{footer:e.withCtx(()=>[e.createVNode(s,{onClick:t[11]||(t[11]=l=>D.value=!1)},{default:e.withCtx(()=>[...t[34]||(t[34]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(s,{type:"primary",loading:N.value,onClick:ue},{default:e.withCtx(()=>[...t[35]||(t[35]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(U,{model:a,"label-width":"130px"},{default:e.withCtx(()=>[e.createVNode(c,{label:"配置名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.name,"onUpdate:modelValue":t[4]||(t[4]=l=>a.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"配置别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.alias,"onUpdate:modelValue":t[5]||(t[5]=l=>a.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"标签"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.tagInput,"onUpdate:modelValue":t[6]||(t[6]=l=>a.tagInput=l),placeholder:"多个标签用英文逗号分隔"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"Aprus脚本"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.terminal_script,"onUpdate:modelValue":t[7]||(t[7]=l=>a.terminal_script=l),type:"textarea",rows:5,class:"mono-input"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"Config脚本"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.config_script,"onUpdate:modelValue":t[8]||(t[8]=l=>a.config_script=l),type:"textarea",rows:5,class:"mono-input"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"扩展信息"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.addition,"onUpdate:modelValue":t[9]||(t[9]=l=>a.addition=l),type:"textarea",rows:4,placeholder:"JSON,默认 []"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.description,"onUpdate:modelValue":t[10]||(t[10]=l=>a.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(x,{modelValue:T.value,"onUpdate:modelValue":t[22]||(t[22]=l=>T.value=l),title:"编辑终端配置",width:"900px","destroy-on-close":"",onClosed:q},{footer:e.withCtx(()=>[e.createVNode(s,{onClick:t[21]||(t[21]=l=>T.value=!1)},{default:e.withCtx(()=>[...t[36]||(t[36]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(s,{type:"primary",loading:N.value,onClick:ce},{default:e.withCtx(()=>[...t[37]||(t[37]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(U,{model:a,"label-width":"130px"},{default:e.withCtx(()=>[e.createVNode(c,{label:"配置编号"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.uid,"onUpdate:modelValue":t[13]||(t[13]=l=>a.uid=l),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"配置名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.name,"onUpdate:modelValue":t[14]||(t[14]=l=>a.name=l)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"配置别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.alias,"onUpdate:modelValue":t[15]||(t[15]=l=>a.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"标签"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.tagInput,"onUpdate:modelValue":t[16]||(t[16]=l=>a.tagInput=l),placeholder:"多个标签用英文逗号分隔"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"Aprus脚本"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.terminal_script,"onUpdate:modelValue":t[17]||(t[17]=l=>a.terminal_script=l),type:"textarea",rows:5,class:"mono-input"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"Config脚本"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.config_script,"onUpdate:modelValue":t[18]||(t[18]=l=>a.config_script=l),type:"textarea",rows:5,class:"mono-input"},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"扩展信息"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.addition,"onUpdate:modelValue":t[19]||(t[19]=l=>a.addition=l),type:"textarea",rows:4},null,8,["modelValue"])]),_:1}),e.createVNode(c,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.description,"onUpdate:modelValue":t[20]||(t[20]=l=>a.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(x,{modelValue:I.value,"onUpdate:modelValue":t[24]||(t[24]=l=>I.value=l),title:"终端配置详情",width:"800px","destroy-on-close":""},{footer:e.withCtx(()=>[e.createVNode(s,{type:"primary",onClick:t[23]||(t[23]=l=>I.value=!1)},{default:e.withCtx(()=>[...t[38]||(t[38]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",Ae,[h.value?(e.openBlock(),e.createBlock(H,{key:0,column:2,border:""},{default:e.withCtx(()=>[e.createVNode(r,{label:"配置编号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.uid)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"配置名称"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.name)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"配置别名"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.alias)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"LUA版本"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.lua_version)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"标签",span:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(J(h.value.tag)),1)]),_:1}),e.createVNode(r,{label:"最后修改"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.last_modified)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"创建时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.created)!=null?l:""),1)]}),_:1}),e.createVNode(r,{label:"描述",span:2},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=h.value.description)!=null?l:""),1)]}),_:1})]),_:1})):e.createCommentVNode("",!0)])),[[W,F.value]])]),_:1},8,["modelValue"])],64)}}})),Ie=xe._export_sfc(qe,[["__scopeId","data-v-11ad59a3"]]);exports.default=Ie;
@@ -1 +1 @@
1
- "use strict";var xe=Object.defineProperty,Be=Object.defineProperties;var Ne=Object.getOwnPropertyDescriptors;var le=Object.getOwnPropertySymbols;var Se=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var ae=(k,d,f)=>d in k?xe(k,d,{enumerable:!0,configurable:!0,writable:!0,value:f}):k[d]=f,O=(k,d)=>{for(var f in d||(d={}))Se.call(d,f)&&ae(k,f,d[f]);if(le)for(var f of le(d))Ee.call(d,f)&&ae(k,f,d[f]);return k},Y=(k,d)=>Be(k,Ne(d));var V=(k,d,f)=>new Promise((q,b)=>{var X=x=>{try{E(f.next(x))}catch(N){b(N)}},P=x=>{try{E(f.throw(x))}catch(N){b(N)}},E=x=>x.done?q(x.value):Promise.resolve(x.value).then(X,P);E((f=f.apply(k,d)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/loading/style/css");require("element-plus/es/components/descriptions/style/css");require("element-plus/es/components/descriptions-item/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/pagination/style/css");require("element-plus/es/components/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/tag/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),Ue=require("./element-resize-detector-BvkAwVg8.cjs"),De=require("./index-BSzyUGIT.cjs"),Ae=require("./titleStyle-NSnz6cUg.cjs"),u=require("element-plus"),Me=require("@element-plus/icons-vue"),C=require("./api-CsM841lz.cjs"),ie=require("./ele-lst-icon-CrxnHZ-A.cjs"),Te={class:"mix-body"},Le={class:"toolbar"},ze={class:"table-wrapper"},Oe={key:1},qe={class:"pagination"},Ie={class:"view-body"},Re={DEFAULT_ICON:ie.DEFAULT_ICON,ACTIVE_ICON:ie.ACTIVE_ICON,NAME_CN:"终端列表",NAME_EN:"TerminalList",ORDER:5},Fe={bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"name",label:"终端名称",width:140,visible:!0},{key:"uid",label:"终端编号",width:140,visible:!0},{key:"alias",label:"终端别名",width:120,visible:!0},{key:"type",label:"终端类型",width:160,visible:!0},{key:"config_id",label:"终端配置编号",width:130,visible:!0},{key:"online",label:"终端状态",width:100,visible:!0},{key:"csq",label:"信号值",width:90,visible:!0},{key:"last_publish_time",label:"最近上报时间",width:170,visible:!0},{key:"last_online_time",label:"上一次连接时间",width:170,visible:!0},{key:"nominal.ICCID",label:"流量卡号",width:160,visible:!0},{key:"nominal.LUA",label:"LUA版本号",width:120,visible:!0},{key:"nominal.MCU",label:"MCU版本号",width:120,visible:!0},{key:"maker",label:"生产厂家",width:120,visible:!0},{key:"description",label:"描述",minWidth:140,visible:!0},{key:"created",label:"创建时间",width:170,visible:!0}]},oe=[{name:"终端名称",fv:"",object_id:"",unit:"",default:"",isText:!1,showAddBtn:!0,showImportBtn:!0,showBatchRefreshBtn:!0,showViewBtn:!0,showEditBtn:!0,showSyncBtn:!0,showRestartBtn:!0,showUpgradeBtn:!0,showDownloadBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0,uid:"终端编号",uid_visible:!0,alias:"终端别名",alias_visible:!0,type:"终端类型",type_visible:!0,config_id:"终端配置编号",config_id_visible:!0,online:"终端状态",online_visible:!0,csq:"信号值",csq_visible:!0,last_publish_time:"最近上报时间",last_publish_time_visible:!0,last_online_time:"上一次连接时间",last_online_time_visible:!0,"nominal.ICCID":"流量卡号","nominal.ICCID_visible":!0,"nominal.LUA":"LUA版本号","nominal.LUA_visible":!0,"nominal.MCU":"MCU版本号","nominal.MCU_visible":!0,maker:"生产厂家",maker_visible:!0,description:"描述",description_visible:!0,created:"创建时间",created_visible:!0}],$e=[{key:"showAddBtn",label:"添加终端",type:"checkbox",group:"命令组"},{key:"showImportBtn",label:"导入",type:"checkbox",group:"命令组"},{key:"showBatchRefreshBtn",label:"批量刷新",type:"checkbox",group:"命令组"},{key:"showViewBtn",label:"查看",type:"checkbox",group:"操作组"},{key:"showEditBtn",label:"编辑",type:"checkbox",group:"操作组"},{key:"showSyncBtn",label:"刷新",type:"checkbox",group:"操作组"},{key:"showRestartBtn",label:"重启",type:"checkbox",group:"操作组"},{key:"showUpgradeBtn",label:"升级",type:"checkbox",group:"操作组"},{key:"showDownloadBtn",label:"下载",type:"checkbox",group:"操作组"},{key:"showArchiveBtn",label:"资料备档",type:"checkbox",group:"操作组"},{key:"showDeleteBtn",label:"删除",type:"checkbox",group:"操作组"},{key:"name",label:"参数名称"},{key:"uid",label:"终端编号",checkable:!0,checkboxKey:"uid_visible"},{key:"alias",label:"终端别名",checkable:!0,checkboxKey:"alias_visible"},{key:"type",label:"终端类型",checkable:!0,checkboxKey:"type_visible"},{key:"config_id",label:"终端配置编号",checkable:!0,checkboxKey:"config_id_visible"},{key:"online",label:"终端状态",checkable:!0,checkboxKey:"online_visible"},{key:"csq",label:"信号值",checkable:!0,checkboxKey:"csq_visible"},{key:"last_publish_time",label:"最近上报时间",checkable:!0,checkboxKey:"last_publish_time_visible"},{key:"last_online_time",label:"上一次连接时间",checkable:!0,checkboxKey:"last_online_time_visible"},{key:"nominal.ICCID",label:"流量卡号",checkable:!0,checkboxKey:"nominal.ICCID_visible"},{key:"nominal.LUA",label:"LUA版本号",checkable:!0,checkboxKey:"nominal.LUA_visible"},{key:"nominal.MCU",label:"MCU版本号",checkable:!0,checkboxKey:"nominal.MCU_visible"},{key:"maker",label:"生产厂家",checkable:!0,checkboxKey:"maker_visible"},{key:"description",label:"描述",checkable:!0,checkboxKey:"description_visible"},{key:"created",label:"创建时间",checkable:!0,checkboxKey:"created_visible"}],Ke=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],je={},Xe={DEFAULT:Re,OPTIONS:Fe,DATA:oe,PARAMS:$e,SOURCE:Ke,COMMON:je},Pe=e.defineComponent(Y(O({},Xe),{__name:"terminalList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""},terminalUidList:{default:()=>[]},terminalOnlineFilter:{default:null}},setup(k){const d=k;class f extends Ue.BaseComponent{getDataBool(t,o){var r,c;const n=(c=(r=this.props.conf)==null?void 0:r.data)==null?void 0:c[0];return n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0?!!n[t]:this.getOptionValue(t,o)}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),nameColor:this.getOptionValue("nameColor","#999"),valueColor:this.getOptionValue("valueColor","#333"),titleColor:this.getOptionValue("titleColor","#111"),titleSize:this.getOptionValue("titleSize",14),nameSize:this.getOptionValue("nameSize",12),valueSize:this.getOptionValue("valueSize",12),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!1),showAddBtn:this.getDataBool("showAddBtn",!0),showImportBtn:this.getDataBool("showImportBtn",!0),showBatchRefreshBtn:this.getDataBool("showBatchRefreshBtn",!0),showViewBtn:this.getDataBool("showViewBtn",!0),showEditBtn:this.getDataBool("showEditBtn",!0),showSyncBtn:this.getDataBool("showSyncBtn",!0),showRestartBtn:this.getDataBool("showRestartBtn",!0),showUpgradeBtn:this.getDataBool("showUpgradeBtn",!0),showDownloadBtn:this.getDataBool("showDownloadBtn",!0),showArchiveBtn:this.getDataBool("showArchiveBtn",!0),showDeleteBtn:this.getDataBool("showDeleteBtn",!0)}}init(){var t;if(this.Style.value=this.extractStyles(),this.applyTheme(),!((t=this.props.conf.data)!=null&&t.length))this.props.conf.data=JSON.parse(JSON.stringify(oe));else{const o=this.props.conf.data[0],n={showAddBtn:!0,showImportBtn:!0,showBatchRefreshBtn:!0,showViewBtn:!0,showEditBtn:!0,showSyncBtn:!0,showRestartBtn:!0,showUpgradeBtn:!0,showDownloadBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[r,c]of Object.entries(n))o[r]===void 0&&(o[r]=c)}}}const q=new f(d,"terminalList");q.setupLifecycle();const b=q.getStyle(),X=e.computed(()=>Ae.generateTitleStyle(d.conf.options)),P=e.computed(()=>{var o,n,r,c;const i=((n=(o=d.conf)==null?void 0:o.options)==null?void 0:n.columns)||[],t=((c=(r=d.conf)==null?void 0:r.data)==null?void 0:c[0])||{};return(Array.isArray(i)?i:[]).map(s=>{const B=t[s.key],U=`${s.key}_visible`,D=t[U];return{prop:s.key,label:B!==void 0&&B!==""?String(B):s.label,width:s.width,minWidth:s.minWidth,visible:D!==void 0?!!D:s.visible!==!1}})}),E=[{label:"Mixlinker Aprus-M",value:"Mixlinker Aprus-M"},{label:"Mixlinker Aprus-X",value:"Mixlinker Aprus-X"},{label:"Mixlinker Aprus-AS",value:"Mixlinker Aprus-AS"},{label:"第三方终端",value:"Other"},{label:"数据模拟",value:"Mixlinker DataSimulate"},{label:"UFS",value:"UFS"}];function x(i){if(i==null||i==="")return"";const t=String(i),o=E.find(n=>n.value===t);return o?o.label:t}function N(i,t){return t.split(".").reduce((o,n)=>{if(!(o==null||typeof o!="object"))return o[n]},i)}function W(i){const t=i.online;return t===1||t===!0||t==="1"}const g=e.reactive({current:1,pageSize:10,total:0}),I=e.ref(""),H=e.ref("name"),J=e.ref([]),Q=e.ref(!1);function ne(){const i=[["uid","!=","fidiser"]],t=I.value.trim();return t&&i.push([H.value,"like",`%${t}%`]),(d.terminalOnlineFilter===0||d.terminalOnlineFilter===1)&&i.push(["online","=",d.terminalOnlineFilter]),{page_index:g.current,page_size:g.pageSize,where_and:JSON.stringify(i)}}function _(){return V(this,null,function*(){var i,t;Q.value=!0;try{const o=yield C.api.post("terminal_list",ne(),!0),n=(i=o==null?void 0:o.result)!=null?i:o;let r=Array.isArray(n==null?void 0:n.data)?[...n.data]:[];if((t=d.terminalUidList)!=null&&t.length){const s=new Set(d.terminalUidList.map(String));r=r.filter(B=>s.has(String(B.uid)))}J.value=r;const c=n==null?void 0:n.total_records;g.total=typeof c=="number"?c:r.length,o&&o.code!==void 0&&o.code!==200&&u.ElMessage.warning(o.msg||o.info||"列表接口返回非成功状态")}catch(o){console.error(o),J.value=[],g.total=0,u.ElMessage.error("加载终端列表失败")}finally{Q.value=!1}})}const re=e.computed(()=>J.value);function se(i,t){if(t==="type")return x(i.type);const o=N(i,t);return o==null?"":String(o)}function Z(){g.current=1,_()}function ue(){I.value="",g.current=1,_()}function de(){g.current=1,_()}function ce(){_()}e.watch(()=>{var i;return[(i=d.terminalUidList)==null?void 0:i.join(","),d.terminalOnlineFilter].join("|")},()=>{g.current=1,_()});function me(){u.ElMessage.info("批量导入终端请在 mixui「终端管理」中使用导入功能")}function pe(){u.ElMessage.info("批量刷新请在 mixui「终端管理」中操作(需 user_action 接口)")}const M=e.ref(!1),T=e.ref(!1),S=e.ref(!1),R=e.ref([]),a=e.reactive({id:0,uid:"",name:"",alias:"",type:"Mixlinker Aprus-X",config_id:"",maker:"",description:"",rsa_privatekey:"",auto_upgrade:0,is_available:1});function ee(){return V(this,null,function*(){var i;try{const t=yield C.api.post("terminal_config_list",{select:["id","uid","name"]},!0),o=(i=t==null?void 0:t.result)!=null?i:t;R.value=Array.isArray(o==null?void 0:o.data)?o.data:[]}catch(t){R.value=[]}})}function F(){a.id=0,a.uid="",a.name="",a.alias="",a.type="Mixlinker Aprus-X",a.config_id="",a.maker="",a.description="",a.rsa_privatekey="",a.auto_upgrade=0,a.is_available=1}function fe(){return V(this,null,function*(){F(),yield ee(),M.value=!0})}function be(i){return V(this,null,function*(){var t,o,n,r,c,s,B,U,D,K,h,L,A,p,j,z,l;F(),T.value=!0,S.value=!0,yield ee();try{const y=yield C.api.post("terminal_item",{uid:i.uid},!0),v=(t=y==null?void 0:y.result)!=null?t:y;v&&typeof v=="object"?(a.id=Number(v.id)||0,a.uid=String((n=(o=v.uid)!=null?o:i.uid)!=null?n:""),a.name=String((r=v.name)!=null?r:""),a.alias=String((c=v.alias)!=null?c:""),a.type=String((s=v.type)!=null?s:"Mixlinker Aprus-X"),a.config_id=String((B=v.config_id)!=null?B:""),a.maker=String((U=v.maker)!=null?U:""),a.description=String((D=v.description)!=null?D:""),a.rsa_privatekey=String((K=v.rsa_privatekey)!=null?K:""),a.auto_upgrade=Number(v.auto_upgrade)||0,a.is_available=v.is_available!==void 0?Number(v.is_available):1):(a.uid=String(i.uid),a.name=String((h=i.name)!=null?h:""),a.alias=String((L=i.alias)!=null?L:""),a.type=String((A=i.type)!=null?A:"Mixlinker Aprus-X"),a.config_id=String((p=i.config_id)!=null?p:""),a.maker=String((j=i.maker)!=null?j:""),a.description=String((z=i.description)!=null?z:""))}catch(y){a.uid=String(i.uid),a.name=String((l=i.name)!=null?l:""),u.ElMessage.warning("拉取终端详情失败,已使用列表行数据编辑")}finally{S.value=!1}})}function te(){return{id:a.id,uid:a.uid.trim(),name:a.name.trim(),alias:a.alias.trim(),description:a.description,type:a.type,maker:a.maker,config_id:a.config_id,rsa_privatekey:a.rsa_privatekey,auto_upgrade:a.auto_upgrade,is_available:a.is_available,addition:"[]"}}function he(){return V(this,null,function*(){var i,t;if(!((i=a.uid)!=null&&i.trim())||!((t=a.name)!=null&&t.trim())){u.ElMessage.warning("请填写终端编号与名称");return}S.value=!0;try{yield C.api.post("terminal_create",Y(O({},te()),{id:0}),!0),u.ElMessage.success("添加成功"),M.value=!1,yield _()}catch(o){u.ElMessage.error("添加失败")}finally{S.value=!1}})}function ye(){return V(this,null,function*(){var i;if(!((i=a.name)!=null&&i.trim())){u.ElMessage.warning("请填写终端名称");return}S.value=!0;try{yield C.api.post("terminal_update",te(),!0),u.ElMessage.success("保存成功"),T.value=!1,yield _()}catch(t){u.ElMessage.error("保存失败")}finally{S.value=!1}})}const $=e.ref(!1),G=e.ref(!1),m=e.ref(null);function ke(i){return V(this,null,function*(){m.value=null,$.value=!0,G.value=!0;try{const t=yield C.api.post("terminal_item",{uid:i.uid},!0),o=t==null?void 0:t.result;o&&typeof o=="object"?m.value=o:(m.value=O({},i),u.ElMessage.warning("未返回详情,已显示列表行数据"))}catch(t){m.value=O({},i),u.ElMessage.warning("加载详情失败,已显示列表行数据")}finally{G.value=!1}})}function we(i){return V(this,null,function*(){try{(yield C.api.post("terminal_sync",{terminal_id:i.uid},!0)).code===200&&(u.ElMessage.success("已触发同步"),yield _())}catch(t){u.ElMessage.error("同步失败")}})}function ve(i){return V(this,null,function*(){try{(yield C.api.post("terminal_restart",{terminal_id:i.uid,command:"Reboot"},!0)).code===200&&(u.ElMessage.success("已下发重启指令"),yield _())}catch(t){u.ElMessage.error("重启指令失败")}})}function ge(i){return V(this,null,function*(){var r,c;const t=String((r=i.uid)!=null?r:""),o=String((c=i.type)!=null?c:""),n=t.startsWith("AX")||o==="Mixlinker Aprus-X"||o.includes("Aprus-X")?"AXUpgrade":"Upgrade";try{(yield C.api.post("upgrade_lua",{terminal_id:i.uid,command:n,value:"LUA"},!0)).code===200&&(u.ElMessage.success("已下发升级指令"),yield _())}catch(s){u.ElMessage.error("升级指令失败")}})}function Ve(i){return V(this,null,function*(){var t;try{const o=yield C.api.post("download_last_lua_file",{terminal_id:i.uid},!0),n=(t=o==null?void 0:o.result)!=null?t:o==null?void 0:o.data;if(n instanceof Blob){const r=URL.createObjectURL(n),c=document.createElement("a");c.href=r,c.download=`${i.uid}.lua`,c.click(),URL.revokeObjectURL(r),u.ElMessage.success("已开始下载")}else u.ElMessage.warning("未收到文件数据,请在 mixui 中下载")}catch(o){u.ElMessage.error("下载失败")}})}function _e(i){u.ElMessageBox.confirm(`确认对终端「${i.name||i.uid}」进行资料备档吗?`,"提示",{type:"info"}).then(()=>{u.ElMessage.success("已提交备档(完整流程请在 mixui 终端管理中操作)")}).catch(()=>{})}function Ce(i){u.ElMessageBox.confirm(`确认删除终端「${i.name||i.uid}」吗?`,"警告",{type:"warning"}).then(()=>V(null,null,function*(){try{yield C.api.post("terminal_delete",{uid:i.uid,id:i.id},!0),u.ElMessage.success("删除成功"),yield _()}catch(t){u.ElMessage.error("删除失败")}})).catch(()=>{})}return e.onMounted(()=>{_()}),(i,t)=>{const o=w.ElIcon,n=w.ElInput,r=w.ElOption,c=w.ElSelect,s=w.ElButton,B=w.ElTag,U=w.ElTableColumn,D=w.ElTable,K=w.ElPagination,h=w.ElFormItem,L=w.ElForm,A=w.ElDialog,p=w.ElDescriptionsItem,j=w.ElDescriptions,z=w.ElLoadingDirective;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"terminal-list mix-component",style:e.normalizeStyle({backgroundColor:e.unref(b).bgColor,borderRadius:`${e.unref(b).radiusSize}px`})},[e.unref(b).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(X.value)},e.toDisplayString(k.conf.caption||k.conf.name),5)),e.createElementVNode("div",Te,[e.createElementVNode("div",Le,[e.createVNode(n,{modelValue:I.value,"onUpdate:modelValue":t[0]||(t[0]=l=>I.value=l),placeholder:"搜索终端",size:"small",class:"toolbar-search",onKeyup:e.withKeys(Z,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(o,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Me.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(c,{modelValue:H.value,"onUpdate:modelValue":t[1]||(t[1]=l=>H.value=l),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(r,{label:"终端名称",value:"name"}),e.createVNode(r,{label:"终端编号",value:"uid"}),e.createVNode(r,{label:"终端别名",value:"alias"}),e.createVNode(r,{label:"描述",value:"description"}),e.createVNode(r,{label:"生产厂家",value:"maker"}),e.createVNode(r,{label:"终端配置编号",value:"config_id"})]),_:1},8,["modelValue"]),e.createVNode(s,{type:"primary",onClick:Z},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(s,{onClick:ue},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(b).showAddBtn?(e.openBlock(),e.createBlock(s,{key:0,type:"success",onClick:fe},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("添加终端",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(b).showImportBtn?(e.openBlock(),e.createBlock(s,{key:1,onClick:me},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("导入",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(b).showBatchRefreshBtn?(e.openBlock(),e.createBlock(s,{key:2,onClick:pe},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("批量刷新",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",ze,[e.createVNode(D,{data:re.value,style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.prop},[l.visible?(e.openBlock(),e.createBlock(U,{key:0,label:l.label,width:l.width,"min-width":l.minWidth},{default:e.withCtx(y=>[l.prop==="online"?(e.openBlock(),e.createBlock(B,{key:0,type:W(y.row)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(W(y.row)?"在线":"离线"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",Oe,e.toDisplayString(se(y.row,l.prop)),1))]),_:2},1032,["label","width","min-width"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(U,{label:"操作","min-width":"320",fixed:"right"},{default:e.withCtx(l=>[e.unref(b).showViewBtn?(e.openBlock(),e.createBlock(s,{key:0,size:"small",onClick:y=>ke(l.row)},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("查看",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showEditBtn?(e.openBlock(),e.createBlock(s,{key:1,size:"small",type:"primary",onClick:y=>be(l.row)},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showSyncBtn?(e.openBlock(),e.createBlock(s,{key:2,size:"small",onClick:y=>we(l.row)},{default:e.withCtx(()=>[...t[31]||(t[31]=[e.createTextVNode("刷新",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showRestartBtn?(e.openBlock(),e.createBlock(s,{key:3,size:"small",onClick:y=>ve(l.row)},{default:e.withCtx(()=>[...t[32]||(t[32]=[e.createTextVNode("重启",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showUpgradeBtn?(e.openBlock(),e.createBlock(s,{key:4,size:"small",onClick:y=>ge(l.row)},{default:e.withCtx(()=>[...t[33]||(t[33]=[e.createTextVNode("升级",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showDownloadBtn?(e.openBlock(),e.createBlock(s,{key:5,size:"small",onClick:y=>Ve(l.row)},{default:e.withCtx(()=>[...t[34]||(t[34]=[e.createTextVNode("下载",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showArchiveBtn?(e.openBlock(),e.createBlock(s,{key:6,size:"small",type:"info",onClick:y=>_e(l.row)},{default:e.withCtx(()=>[...t[35]||(t[35]=[e.createTextVNode("资料备档",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showDeleteBtn?(e.openBlock(),e.createBlock(s,{key:7,size:"small",type:"danger",onClick:y=>Ce(l.row)},{default:e.withCtx(()=>[...t[36]||(t[36]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",qe,[e.createVNode(K,{"current-page":g.current,"onUpdate:currentPage":t[2]||(t[2]=l=>g.current=l),"page-size":g.pageSize,"onUpdate:pageSize":t[3]||(t[3]=l=>g.pageSize=l),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:g.total,onSizeChange:de,onCurrentChange:ce},null,8,["current-page","page-size","total"])])]),e.renderSlot(i.$slots,"default",{},void 0,!0)],4)),[[z,Q.value]]),e.createVNode(A,{modelValue:M.value,"onUpdate:modelValue":t[12]||(t[12]=l=>M.value=l),title:"添加终端",width:"640px","destroy-on-close":"",onClosed:F},{footer:e.withCtx(()=>[e.createVNode(s,{onClick:t[11]||(t[11]=l=>M.value=!1)},{default:e.withCtx(()=>[...t[37]||(t[37]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(s,{type:"primary",loading:S.value,onClick:he},{default:e.withCtx(()=>[...t[38]||(t[38]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(L,{model:a,"label-width":"120px"},{default:e.withCtx(()=>[e.createVNode(h,{label:"终端编号",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.uid,"onUpdate:modelValue":t[4]||(t[4]=l=>a.uid=l),placeholder:"必填,唯一编号"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.name,"onUpdate:modelValue":t[5]||(t[5]=l=>a.name=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.alias,"onUpdate:modelValue":t[6]||(t[6]=l=>a.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端类型",required:""},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:a.type,"onUpdate:modelValue":t[7]||(t[7]=l=>a.type=l),class:"w-full",filterable:""},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(E,l=>e.createVNode(r,{key:l.value,label:l.label,value:l.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端配置"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:a.config_id,"onUpdate:modelValue":t[8]||(t[8]=l=>a.config_id=l),class:"w-full",filterable:"",clearable:"",placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createBlock(r,{key:l.uid,label:l.name,value:l.uid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"生产厂家"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.maker,"onUpdate:modelValue":t[9]||(t[9]=l=>a.maker=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.description,"onUpdate:modelValue":t[10]||(t[10]=l=>a.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(A,{modelValue:T.value,"onUpdate:modelValue":t[21]||(t[21]=l=>T.value=l),title:"编辑终端",width:"640px","destroy-on-close":"",onClosed:F},{footer:e.withCtx(()=>[e.createVNode(s,{onClick:t[20]||(t[20]=l=>T.value=!1)},{default:e.withCtx(()=>[...t[39]||(t[39]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(s,{type:"primary",loading:S.value,onClick:ye},{default:e.withCtx(()=>[...t[40]||(t[40]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(L,{model:a,"label-width":"120px"},{default:e.withCtx(()=>[e.createVNode(h,{label:"终端编号"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.uid,"onUpdate:modelValue":t[13]||(t[13]=l=>a.uid=l),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.name,"onUpdate:modelValue":t[14]||(t[14]=l=>a.name=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.alias,"onUpdate:modelValue":t[15]||(t[15]=l=>a.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端类型",required:""},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:a.type,"onUpdate:modelValue":t[16]||(t[16]=l=>a.type=l),class:"w-full",filterable:""},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(E,l=>e.createVNode(r,{key:l.value,label:l.label,value:l.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端配置"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:a.config_id,"onUpdate:modelValue":t[17]||(t[17]=l=>a.config_id=l),class:"w-full",filterable:"",clearable:"",placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createBlock(r,{key:l.uid,label:l.name,value:l.uid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"生产厂家"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.maker,"onUpdate:modelValue":t[18]||(t[18]=l=>a.maker=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.description,"onUpdate:modelValue":t[19]||(t[19]=l=>a.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(A,{modelValue:$.value,"onUpdate:modelValue":t[23]||(t[23]=l=>$.value=l),title:"终端详情",width:"760px","destroy-on-close":""},{footer:e.withCtx(()=>[e.createVNode(s,{type:"primary",onClick:t[22]||(t[22]=l=>$.value=!1)},{default:e.withCtx(()=>[...t[41]||(t[41]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",Ie,[m.value?(e.openBlock(),e.createBlock(j,{key:0,column:2,border:""},{default:e.withCtx(()=>[e.createVNode(p,{label:"终端编号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.uid)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"终端名称"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.name)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"终端别名"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.alias)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"终端类型"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(m.value.type)),1)]),_:1}),e.createVNode(p,{label:"终端配置编号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.config_id)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"终端状态"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(W(m.value)?"在线":"离线"),1)]),_:1}),e.createVNode(p,{label:"信号值"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=N(m.value,"csq"))!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"最近上报时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.last_publish_time)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"上一次连接时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.last_online_time)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"流量卡号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=N(m.value,"nominal.ICCID"))!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"LUA版本"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=N(m.value,"nominal.LUA"))!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"MCU版本"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=N(m.value,"nominal.MCU"))!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"生产厂家"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.maker)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"创建时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.created)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"描述",span:2},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.description)!=null?l:""),1)]}),_:1})]),_:1})):e.createCommentVNode("",!0)])),[[z,G.value]])]),_:1},8,["modelValue"])],64)}}})),We=De._export_sfc(Pe,[["__scopeId","data-v-6c388f3c"]]);exports.default=We;
1
+ "use strict";var xe=Object.defineProperty,Be=Object.defineProperties;var Ne=Object.getOwnPropertyDescriptors;var le=Object.getOwnPropertySymbols;var Se=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var ae=(k,d,f)=>d in k?xe(k,d,{enumerable:!0,configurable:!0,writable:!0,value:f}):k[d]=f,O=(k,d)=>{for(var f in d||(d={}))Se.call(d,f)&&ae(k,f,d[f]);if(le)for(var f of le(d))Ee.call(d,f)&&ae(k,f,d[f]);return k},Y=(k,d)=>Be(k,Ne(d));var V=(k,d,f)=>new Promise((q,b)=>{var X=x=>{try{E(f.next(x))}catch(N){b(N)}},P=x=>{try{E(f.throw(x))}catch(N){b(N)}},E=x=>x.done?q(x.value):Promise.resolve(x.value).then(X,P);E((f=f.apply(k,d)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/loading/style/css");require("element-plus/es/components/descriptions/style/css");require("element-plus/es/components/descriptions-item/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/pagination/style/css");require("element-plus/es/components/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/tag/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),Ue=require("./element-resize-detector-DYs3pJPp.cjs"),De=require("./index-ZwyqrmaH.cjs"),Ae=require("./titleStyle-NSnz6cUg.cjs"),u=require("element-plus"),Me=require("@element-plus/icons-vue"),C=require("./api-nw_9niqv.cjs"),ie=require("./ele-lst-icon-CrxnHZ-A.cjs"),Te={class:"mix-body"},Le={class:"toolbar"},ze={class:"table-wrapper"},Oe={key:1},qe={class:"pagination"},Ie={class:"view-body"},Re={DEFAULT_ICON:ie.DEFAULT_ICON,ACTIVE_ICON:ie.ACTIVE_ICON,NAME_CN:"终端列表",NAME_EN:"TerminalList",ORDER:5},Fe={bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"name",label:"终端名称",width:140,visible:!0},{key:"uid",label:"终端编号",width:140,visible:!0},{key:"alias",label:"终端别名",width:120,visible:!0},{key:"type",label:"终端类型",width:160,visible:!0},{key:"config_id",label:"终端配置编号",width:130,visible:!0},{key:"online",label:"终端状态",width:100,visible:!0},{key:"csq",label:"信号值",width:90,visible:!0},{key:"last_publish_time",label:"最近上报时间",width:170,visible:!0},{key:"last_online_time",label:"上一次连接时间",width:170,visible:!0},{key:"nominal.ICCID",label:"流量卡号",width:160,visible:!0},{key:"nominal.LUA",label:"LUA版本号",width:120,visible:!0},{key:"nominal.MCU",label:"MCU版本号",width:120,visible:!0},{key:"maker",label:"生产厂家",width:120,visible:!0},{key:"description",label:"描述",minWidth:140,visible:!0},{key:"created",label:"创建时间",width:170,visible:!0}]},oe=[{name:"终端名称",fv:"",object_id:"",unit:"",default:"",isText:!1,showAddBtn:!0,showImportBtn:!0,showBatchRefreshBtn:!0,showViewBtn:!0,showEditBtn:!0,showSyncBtn:!0,showRestartBtn:!0,showUpgradeBtn:!0,showDownloadBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0,uid:"终端编号",uid_visible:!0,alias:"终端别名",alias_visible:!0,type:"终端类型",type_visible:!0,config_id:"终端配置编号",config_id_visible:!0,online:"终端状态",online_visible:!0,csq:"信号值",csq_visible:!0,last_publish_time:"最近上报时间",last_publish_time_visible:!0,last_online_time:"上一次连接时间",last_online_time_visible:!0,"nominal.ICCID":"流量卡号","nominal.ICCID_visible":!0,"nominal.LUA":"LUA版本号","nominal.LUA_visible":!0,"nominal.MCU":"MCU版本号","nominal.MCU_visible":!0,maker:"生产厂家",maker_visible:!0,description:"描述",description_visible:!0,created:"创建时间",created_visible:!0}],$e=[{key:"showAddBtn",label:"添加终端",type:"checkbox",group:"命令组"},{key:"showImportBtn",label:"导入",type:"checkbox",group:"命令组"},{key:"showBatchRefreshBtn",label:"批量刷新",type:"checkbox",group:"命令组"},{key:"showViewBtn",label:"查看",type:"checkbox",group:"操作组"},{key:"showEditBtn",label:"编辑",type:"checkbox",group:"操作组"},{key:"showSyncBtn",label:"刷新",type:"checkbox",group:"操作组"},{key:"showRestartBtn",label:"重启",type:"checkbox",group:"操作组"},{key:"showUpgradeBtn",label:"升级",type:"checkbox",group:"操作组"},{key:"showDownloadBtn",label:"下载",type:"checkbox",group:"操作组"},{key:"showArchiveBtn",label:"资料备档",type:"checkbox",group:"操作组"},{key:"showDeleteBtn",label:"删除",type:"checkbox",group:"操作组"},{key:"name",label:"参数名称"},{key:"uid",label:"终端编号",checkable:!0,checkboxKey:"uid_visible"},{key:"alias",label:"终端别名",checkable:!0,checkboxKey:"alias_visible"},{key:"type",label:"终端类型",checkable:!0,checkboxKey:"type_visible"},{key:"config_id",label:"终端配置编号",checkable:!0,checkboxKey:"config_id_visible"},{key:"online",label:"终端状态",checkable:!0,checkboxKey:"online_visible"},{key:"csq",label:"信号值",checkable:!0,checkboxKey:"csq_visible"},{key:"last_publish_time",label:"最近上报时间",checkable:!0,checkboxKey:"last_publish_time_visible"},{key:"last_online_time",label:"上一次连接时间",checkable:!0,checkboxKey:"last_online_time_visible"},{key:"nominal.ICCID",label:"流量卡号",checkable:!0,checkboxKey:"nominal.ICCID_visible"},{key:"nominal.LUA",label:"LUA版本号",checkable:!0,checkboxKey:"nominal.LUA_visible"},{key:"nominal.MCU",label:"MCU版本号",checkable:!0,checkboxKey:"nominal.MCU_visible"},{key:"maker",label:"生产厂家",checkable:!0,checkboxKey:"maker_visible"},{key:"description",label:"描述",checkable:!0,checkboxKey:"description_visible"},{key:"created",label:"创建时间",checkable:!0,checkboxKey:"created_visible"}],Ke=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],je={},Xe={DEFAULT:Re,OPTIONS:Fe,DATA:oe,PARAMS:$e,SOURCE:Ke,COMMON:je},Pe=e.defineComponent(Y(O({},Xe),{__name:"terminalList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""},terminalUidList:{default:()=>[]},terminalOnlineFilter:{default:null}},setup(k){const d=k;class f extends Ue.BaseComponent{getDataBool(t,o){var r,c;const n=(c=(r=this.props.conf)==null?void 0:r.data)==null?void 0:c[0];return n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0?!!n[t]:this.getOptionValue(t,o)}extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),nameColor:this.getOptionValue("nameColor","#999"),valueColor:this.getOptionValue("valueColor","#333"),titleColor:this.getOptionValue("titleColor","#111"),titleSize:this.getOptionValue("titleSize",14),nameSize:this.getOptionValue("nameSize",12),valueSize:this.getOptionValue("valueSize",12),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!1),showAddBtn:this.getDataBool("showAddBtn",!0),showImportBtn:this.getDataBool("showImportBtn",!0),showBatchRefreshBtn:this.getDataBool("showBatchRefreshBtn",!0),showViewBtn:this.getDataBool("showViewBtn",!0),showEditBtn:this.getDataBool("showEditBtn",!0),showSyncBtn:this.getDataBool("showSyncBtn",!0),showRestartBtn:this.getDataBool("showRestartBtn",!0),showUpgradeBtn:this.getDataBool("showUpgradeBtn",!0),showDownloadBtn:this.getDataBool("showDownloadBtn",!0),showArchiveBtn:this.getDataBool("showArchiveBtn",!0),showDeleteBtn:this.getDataBool("showDeleteBtn",!0)}}init(){var t;if(this.Style.value=this.extractStyles(),this.applyTheme(),!((t=this.props.conf.data)!=null&&t.length))this.props.conf.data=JSON.parse(JSON.stringify(oe));else{const o=this.props.conf.data[0],n={showAddBtn:!0,showImportBtn:!0,showBatchRefreshBtn:!0,showViewBtn:!0,showEditBtn:!0,showSyncBtn:!0,showRestartBtn:!0,showUpgradeBtn:!0,showDownloadBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[r,c]of Object.entries(n))o[r]===void 0&&(o[r]=c)}}}const q=new f(d,"terminalList");q.setupLifecycle();const b=q.getStyle(),X=e.computed(()=>Ae.generateTitleStyle(d.conf.options)),P=e.computed(()=>{var o,n,r,c;const i=((n=(o=d.conf)==null?void 0:o.options)==null?void 0:n.columns)||[],t=((c=(r=d.conf)==null?void 0:r.data)==null?void 0:c[0])||{};return(Array.isArray(i)?i:[]).map(s=>{const B=t[s.key],U=`${s.key}_visible`,D=t[U];return{prop:s.key,label:B!==void 0&&B!==""?String(B):s.label,width:s.width,minWidth:s.minWidth,visible:D!==void 0?!!D:s.visible!==!1}})}),E=[{label:"Mixlinker Aprus-M",value:"Mixlinker Aprus-M"},{label:"Mixlinker Aprus-X",value:"Mixlinker Aprus-X"},{label:"Mixlinker Aprus-AS",value:"Mixlinker Aprus-AS"},{label:"第三方终端",value:"Other"},{label:"数据模拟",value:"Mixlinker DataSimulate"},{label:"UFS",value:"UFS"}];function x(i){if(i==null||i==="")return"";const t=String(i),o=E.find(n=>n.value===t);return o?o.label:t}function N(i,t){return t.split(".").reduce((o,n)=>{if(!(o==null||typeof o!="object"))return o[n]},i)}function W(i){const t=i.online;return t===1||t===!0||t==="1"}const g=e.reactive({current:1,pageSize:10,total:0}),I=e.ref(""),H=e.ref("name"),J=e.ref([]),Q=e.ref(!1);function ne(){const i=[["uid","!=","fidiser"]],t=I.value.trim();return t&&i.push([H.value,"like",`%${t}%`]),(d.terminalOnlineFilter===0||d.terminalOnlineFilter===1)&&i.push(["online","=",d.terminalOnlineFilter]),{page_index:g.current,page_size:g.pageSize,where_and:JSON.stringify(i)}}function _(){return V(this,null,function*(){var i,t;Q.value=!0;try{const o=yield C.api.post("terminal_list",ne(),!0),n=(i=o==null?void 0:o.result)!=null?i:o;let r=Array.isArray(n==null?void 0:n.data)?[...n.data]:[];if((t=d.terminalUidList)!=null&&t.length){const s=new Set(d.terminalUidList.map(String));r=r.filter(B=>s.has(String(B.uid)))}J.value=r;const c=n==null?void 0:n.total_records;g.total=typeof c=="number"?c:r.length,o&&o.code!==void 0&&o.code!==200&&u.ElMessage.warning(o.msg||o.info||"列表接口返回非成功状态")}catch(o){console.error(o),J.value=[],g.total=0,u.ElMessage.error("加载终端列表失败")}finally{Q.value=!1}})}const re=e.computed(()=>J.value);function se(i,t){if(t==="type")return x(i.type);const o=N(i,t);return o==null?"":String(o)}function Z(){g.current=1,_()}function ue(){I.value="",g.current=1,_()}function de(){g.current=1,_()}function ce(){_()}e.watch(()=>{var i;return[(i=d.terminalUidList)==null?void 0:i.join(","),d.terminalOnlineFilter].join("|")},()=>{g.current=1,_()});function me(){u.ElMessage.info("批量导入终端请在 mixui「终端管理」中使用导入功能")}function pe(){u.ElMessage.info("批量刷新请在 mixui「终端管理」中操作(需 user_action 接口)")}const M=e.ref(!1),T=e.ref(!1),S=e.ref(!1),R=e.ref([]),a=e.reactive({id:0,uid:"",name:"",alias:"",type:"Mixlinker Aprus-X",config_id:"",maker:"",description:"",rsa_privatekey:"",auto_upgrade:0,is_available:1});function ee(){return V(this,null,function*(){var i;try{const t=yield C.api.post("terminal_config_list",{select:["id","uid","name"]},!0),o=(i=t==null?void 0:t.result)!=null?i:t;R.value=Array.isArray(o==null?void 0:o.data)?o.data:[]}catch(t){R.value=[]}})}function F(){a.id=0,a.uid="",a.name="",a.alias="",a.type="Mixlinker Aprus-X",a.config_id="",a.maker="",a.description="",a.rsa_privatekey="",a.auto_upgrade=0,a.is_available=1}function fe(){return V(this,null,function*(){F(),yield ee(),M.value=!0})}function be(i){return V(this,null,function*(){var t,o,n,r,c,s,B,U,D,K,h,L,A,p,j,z,l;F(),T.value=!0,S.value=!0,yield ee();try{const y=yield C.api.post("terminal_item",{uid:i.uid},!0),v=(t=y==null?void 0:y.result)!=null?t:y;v&&typeof v=="object"?(a.id=Number(v.id)||0,a.uid=String((n=(o=v.uid)!=null?o:i.uid)!=null?n:""),a.name=String((r=v.name)!=null?r:""),a.alias=String((c=v.alias)!=null?c:""),a.type=String((s=v.type)!=null?s:"Mixlinker Aprus-X"),a.config_id=String((B=v.config_id)!=null?B:""),a.maker=String((U=v.maker)!=null?U:""),a.description=String((D=v.description)!=null?D:""),a.rsa_privatekey=String((K=v.rsa_privatekey)!=null?K:""),a.auto_upgrade=Number(v.auto_upgrade)||0,a.is_available=v.is_available!==void 0?Number(v.is_available):1):(a.uid=String(i.uid),a.name=String((h=i.name)!=null?h:""),a.alias=String((L=i.alias)!=null?L:""),a.type=String((A=i.type)!=null?A:"Mixlinker Aprus-X"),a.config_id=String((p=i.config_id)!=null?p:""),a.maker=String((j=i.maker)!=null?j:""),a.description=String((z=i.description)!=null?z:""))}catch(y){a.uid=String(i.uid),a.name=String((l=i.name)!=null?l:""),u.ElMessage.warning("拉取终端详情失败,已使用列表行数据编辑")}finally{S.value=!1}})}function te(){return{id:a.id,uid:a.uid.trim(),name:a.name.trim(),alias:a.alias.trim(),description:a.description,type:a.type,maker:a.maker,config_id:a.config_id,rsa_privatekey:a.rsa_privatekey,auto_upgrade:a.auto_upgrade,is_available:a.is_available,addition:"[]"}}function he(){return V(this,null,function*(){var i,t;if(!((i=a.uid)!=null&&i.trim())||!((t=a.name)!=null&&t.trim())){u.ElMessage.warning("请填写终端编号与名称");return}S.value=!0;try{yield C.api.post("terminal_create",Y(O({},te()),{id:0}),!0),u.ElMessage.success("添加成功"),M.value=!1,yield _()}catch(o){u.ElMessage.error("添加失败")}finally{S.value=!1}})}function ye(){return V(this,null,function*(){var i;if(!((i=a.name)!=null&&i.trim())){u.ElMessage.warning("请填写终端名称");return}S.value=!0;try{yield C.api.post("terminal_update",te(),!0),u.ElMessage.success("保存成功"),T.value=!1,yield _()}catch(t){u.ElMessage.error("保存失败")}finally{S.value=!1}})}const $=e.ref(!1),G=e.ref(!1),m=e.ref(null);function ke(i){return V(this,null,function*(){m.value=null,$.value=!0,G.value=!0;try{const t=yield C.api.post("terminal_item",{uid:i.uid},!0),o=t==null?void 0:t.result;o&&typeof o=="object"?m.value=o:(m.value=O({},i),u.ElMessage.warning("未返回详情,已显示列表行数据"))}catch(t){m.value=O({},i),u.ElMessage.warning("加载详情失败,已显示列表行数据")}finally{G.value=!1}})}function we(i){return V(this,null,function*(){try{(yield C.api.post("terminal_sync",{terminal_id:i.uid},!0)).code===200&&(u.ElMessage.success("已触发同步"),yield _())}catch(t){u.ElMessage.error("同步失败")}})}function ve(i){return V(this,null,function*(){try{(yield C.api.post("terminal_restart",{terminal_id:i.uid,command:"Reboot"},!0)).code===200&&(u.ElMessage.success("已下发重启指令"),yield _())}catch(t){u.ElMessage.error("重启指令失败")}})}function ge(i){return V(this,null,function*(){var r,c;const t=String((r=i.uid)!=null?r:""),o=String((c=i.type)!=null?c:""),n=t.startsWith("AX")||o==="Mixlinker Aprus-X"||o.includes("Aprus-X")?"AXUpgrade":"Upgrade";try{(yield C.api.post("upgrade_lua",{terminal_id:i.uid,command:n,value:"LUA"},!0)).code===200&&(u.ElMessage.success("已下发升级指令"),yield _())}catch(s){u.ElMessage.error("升级指令失败")}})}function Ve(i){return V(this,null,function*(){var t;try{const o=yield C.api.post("download_last_lua_file",{terminal_id:i.uid},!0),n=(t=o==null?void 0:o.result)!=null?t:o==null?void 0:o.data;if(n instanceof Blob){const r=URL.createObjectURL(n),c=document.createElement("a");c.href=r,c.download=`${i.uid}.lua`,c.click(),URL.revokeObjectURL(r),u.ElMessage.success("已开始下载")}else u.ElMessage.warning("未收到文件数据,请在 mixui 中下载")}catch(o){u.ElMessage.error("下载失败")}})}function _e(i){u.ElMessageBox.confirm(`确认对终端「${i.name||i.uid}」进行资料备档吗?`,"提示",{type:"info"}).then(()=>{u.ElMessage.success("已提交备档(完整流程请在 mixui 终端管理中操作)")}).catch(()=>{})}function Ce(i){u.ElMessageBox.confirm(`确认删除终端「${i.name||i.uid}」吗?`,"警告",{type:"warning"}).then(()=>V(null,null,function*(){try{yield C.api.post("terminal_delete",{uid:i.uid,id:i.id},!0),u.ElMessage.success("删除成功"),yield _()}catch(t){u.ElMessage.error("删除失败")}})).catch(()=>{})}return e.onMounted(()=>{_()}),(i,t)=>{const o=w.ElIcon,n=w.ElInput,r=w.ElOption,c=w.ElSelect,s=w.ElButton,B=w.ElTag,U=w.ElTableColumn,D=w.ElTable,K=w.ElPagination,h=w.ElFormItem,L=w.ElForm,A=w.ElDialog,p=w.ElDescriptionsItem,j=w.ElDescriptions,z=w.ElLoadingDirective;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"terminal-list mix-component",style:e.normalizeStyle({backgroundColor:e.unref(b).bgColor,borderRadius:`${e.unref(b).radiusSize}px`})},[e.unref(b).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(X.value)},e.toDisplayString(k.conf.caption||k.conf.name),5)),e.createElementVNode("div",Te,[e.createElementVNode("div",Le,[e.createVNode(n,{modelValue:I.value,"onUpdate:modelValue":t[0]||(t[0]=l=>I.value=l),placeholder:"搜索终端",size:"small",class:"toolbar-search",onKeyup:e.withKeys(Z,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(o,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Me.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(c,{modelValue:H.value,"onUpdate:modelValue":t[1]||(t[1]=l=>H.value=l),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(r,{label:"终端名称",value:"name"}),e.createVNode(r,{label:"终端编号",value:"uid"}),e.createVNode(r,{label:"终端别名",value:"alias"}),e.createVNode(r,{label:"描述",value:"description"}),e.createVNode(r,{label:"生产厂家",value:"maker"}),e.createVNode(r,{label:"终端配置编号",value:"config_id"})]),_:1},8,["modelValue"]),e.createVNode(s,{type:"primary",onClick:Z},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(s,{onClick:ue},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(b).showAddBtn?(e.openBlock(),e.createBlock(s,{key:0,type:"success",onClick:fe},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("添加终端",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(b).showImportBtn?(e.openBlock(),e.createBlock(s,{key:1,onClick:me},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("导入",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(b).showBatchRefreshBtn?(e.openBlock(),e.createBlock(s,{key:2,onClick:pe},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("批量刷新",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",ze,[e.createVNode(D,{data:re.value,style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.prop},[l.visible?(e.openBlock(),e.createBlock(U,{key:0,label:l.label,width:l.width,"min-width":l.minWidth},{default:e.withCtx(y=>[l.prop==="online"?(e.openBlock(),e.createBlock(B,{key:0,type:W(y.row)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(W(y.row)?"在线":"离线"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",Oe,e.toDisplayString(se(y.row,l.prop)),1))]),_:2},1032,["label","width","min-width"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(U,{label:"操作","min-width":"320",fixed:"right"},{default:e.withCtx(l=>[e.unref(b).showViewBtn?(e.openBlock(),e.createBlock(s,{key:0,size:"small",onClick:y=>ke(l.row)},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("查看",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showEditBtn?(e.openBlock(),e.createBlock(s,{key:1,size:"small",type:"primary",onClick:y=>be(l.row)},{default:e.withCtx(()=>[...t[30]||(t[30]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showSyncBtn?(e.openBlock(),e.createBlock(s,{key:2,size:"small",onClick:y=>we(l.row)},{default:e.withCtx(()=>[...t[31]||(t[31]=[e.createTextVNode("刷新",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showRestartBtn?(e.openBlock(),e.createBlock(s,{key:3,size:"small",onClick:y=>ve(l.row)},{default:e.withCtx(()=>[...t[32]||(t[32]=[e.createTextVNode("重启",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showUpgradeBtn?(e.openBlock(),e.createBlock(s,{key:4,size:"small",onClick:y=>ge(l.row)},{default:e.withCtx(()=>[...t[33]||(t[33]=[e.createTextVNode("升级",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showDownloadBtn?(e.openBlock(),e.createBlock(s,{key:5,size:"small",onClick:y=>Ve(l.row)},{default:e.withCtx(()=>[...t[34]||(t[34]=[e.createTextVNode("下载",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showArchiveBtn?(e.openBlock(),e.createBlock(s,{key:6,size:"small",type:"info",onClick:y=>_e(l.row)},{default:e.withCtx(()=>[...t[35]||(t[35]=[e.createTextVNode("资料备档",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showDeleteBtn?(e.openBlock(),e.createBlock(s,{key:7,size:"small",type:"danger",onClick:y=>Ce(l.row)},{default:e.withCtx(()=>[...t[36]||(t[36]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",qe,[e.createVNode(K,{"current-page":g.current,"onUpdate:currentPage":t[2]||(t[2]=l=>g.current=l),"page-size":g.pageSize,"onUpdate:pageSize":t[3]||(t[3]=l=>g.pageSize=l),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:g.total,onSizeChange:de,onCurrentChange:ce},null,8,["current-page","page-size","total"])])]),e.renderSlot(i.$slots,"default",{},void 0,!0)],4)),[[z,Q.value]]),e.createVNode(A,{modelValue:M.value,"onUpdate:modelValue":t[12]||(t[12]=l=>M.value=l),title:"添加终端",width:"640px","destroy-on-close":"",onClosed:F},{footer:e.withCtx(()=>[e.createVNode(s,{onClick:t[11]||(t[11]=l=>M.value=!1)},{default:e.withCtx(()=>[...t[37]||(t[37]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(s,{type:"primary",loading:S.value,onClick:he},{default:e.withCtx(()=>[...t[38]||(t[38]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(L,{model:a,"label-width":"120px"},{default:e.withCtx(()=>[e.createVNode(h,{label:"终端编号",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.uid,"onUpdate:modelValue":t[4]||(t[4]=l=>a.uid=l),placeholder:"必填,唯一编号"},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.name,"onUpdate:modelValue":t[5]||(t[5]=l=>a.name=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.alias,"onUpdate:modelValue":t[6]||(t[6]=l=>a.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端类型",required:""},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:a.type,"onUpdate:modelValue":t[7]||(t[7]=l=>a.type=l),class:"w-full",filterable:""},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(E,l=>e.createVNode(r,{key:l.value,label:l.label,value:l.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端配置"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:a.config_id,"onUpdate:modelValue":t[8]||(t[8]=l=>a.config_id=l),class:"w-full",filterable:"",clearable:"",placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createBlock(r,{key:l.uid,label:l.name,value:l.uid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"生产厂家"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.maker,"onUpdate:modelValue":t[9]||(t[9]=l=>a.maker=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.description,"onUpdate:modelValue":t[10]||(t[10]=l=>a.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(A,{modelValue:T.value,"onUpdate:modelValue":t[21]||(t[21]=l=>T.value=l),title:"编辑终端",width:"640px","destroy-on-close":"",onClosed:F},{footer:e.withCtx(()=>[e.createVNode(s,{onClick:t[20]||(t[20]=l=>T.value=!1)},{default:e.withCtx(()=>[...t[39]||(t[39]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(s,{type:"primary",loading:S.value,onClick:ye},{default:e.withCtx(()=>[...t[40]||(t[40]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(L,{model:a,"label-width":"120px"},{default:e.withCtx(()=>[e.createVNode(h,{label:"终端编号"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.uid,"onUpdate:modelValue":t[13]||(t[13]=l=>a.uid=l),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.name,"onUpdate:modelValue":t[14]||(t[14]=l=>a.name=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.alias,"onUpdate:modelValue":t[15]||(t[15]=l=>a.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端类型",required:""},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:a.type,"onUpdate:modelValue":t[16]||(t[16]=l=>a.type=l),class:"w-full",filterable:""},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(E,l=>e.createVNode(r,{key:l.value,label:l.label,value:l.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"终端配置"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:a.config_id,"onUpdate:modelValue":t[17]||(t[17]=l=>a.config_id=l),class:"w-full",filterable:"",clearable:"",placeholder:"请选择"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createBlock(r,{key:l.uid,label:l.name,value:l.uid},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(h,{label:"生产厂家"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.maker,"onUpdate:modelValue":t[18]||(t[18]=l=>a.maker=l)},null,8,["modelValue"])]),_:1}),e.createVNode(h,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:a.description,"onUpdate:modelValue":t[19]||(t[19]=l=>a.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(A,{modelValue:$.value,"onUpdate:modelValue":t[23]||(t[23]=l=>$.value=l),title:"终端详情",width:"760px","destroy-on-close":""},{footer:e.withCtx(()=>[e.createVNode(s,{type:"primary",onClick:t[22]||(t[22]=l=>$.value=!1)},{default:e.withCtx(()=>[...t[41]||(t[41]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",Ie,[m.value?(e.openBlock(),e.createBlock(j,{key:0,column:2,border:""},{default:e.withCtx(()=>[e.createVNode(p,{label:"终端编号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.uid)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"终端名称"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.name)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"终端别名"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.alias)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"终端类型"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(m.value.type)),1)]),_:1}),e.createVNode(p,{label:"终端配置编号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.config_id)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"终端状态"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(W(m.value)?"在线":"离线"),1)]),_:1}),e.createVNode(p,{label:"信号值"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=N(m.value,"csq"))!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"最近上报时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.last_publish_time)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"上一次连接时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.last_online_time)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"流量卡号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=N(m.value,"nominal.ICCID"))!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"LUA版本"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=N(m.value,"nominal.LUA"))!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"MCU版本"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=N(m.value,"nominal.MCU"))!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"生产厂家"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.maker)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"创建时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.created)!=null?l:""),1)]}),_:1}),e.createVNode(p,{label:"描述",span:2},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=m.value.description)!=null?l:""),1)]}),_:1})]),_:1})):e.createCommentVNode("",!0)])),[[z,G.value]])]),_:1},8,["modelValue"])],64)}}})),We=De._export_sfc(Pe,[["__scopeId","data-v-6c388f3c"]]);exports.default=We;
@@ -44,12 +44,12 @@ import "element-plus/es/components/option/style/css";
44
44
  import "element-plus/es/components/input/style/css";
45
45
  import "element-plus/es/components/icon/style/css";
46
46
  import { defineComponent as ot, computed as de, reactive as ve, ref as D, watch as rt, onMounted as st, openBlock as m, createElementBlock as z, Fragment as $, withDirectives as ye, normalizeStyle as he, unref as C, toDisplayString as y, createCommentVNode as S, createElementVNode as te, createVNode as i, withKeys as ut, withCtx as n, createTextVNode as s, createBlock as w, renderList as W, renderSlot as dt } from "vue";
47
- import { B as mt } from "./element-resize-detector-B-0BgVLy.js";
48
- import { _ as ct } from "./index-C8teBAQd.js";
47
+ import { B as mt } from "./element-resize-detector-BCRzpPES.js";
48
+ import { _ as ct } from "./index-LgTfdmT4.js";
49
49
  import { g as pt } from "./titleStyle-BT5GlpAb.js";
50
50
  import { ElMessage as b, ElMessageBox as ke } from "element-plus";
51
51
  import { Search as bt } from "@element-plus/icons-vue";
52
- import { a as L } from "./api-DAUw_RyI.js";
52
+ import { a as L } from "./api-Cyx2Fha0.js";
53
53
  import { A as ft, D as vt } from "./ele-lst-icon-CKpeRKmk.js";
54
54
  const yt = { class: "mix-body" }, ht = { class: "toolbar" }, kt = { class: "table-wrapper" }, _t = { key: 1 }, gt = { class: "pagination" }, wt = { class: "view-body" }, Bt = {
55
55
  DEFAULT_ICON: vt,
@@ -1 +1 @@
1
- "use strict";var W=Object.defineProperty,G=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var R=(n,t,l)=>t in n?W(n,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[t]=l,U=(n,t)=>{for(var l in t||(t={}))K.call(t,l)&&R(n,l,t[l]);if(D)for(var l of D(t))Q.call(t,l)&&R(n,l,t[l]);return n},F=(n,t)=>G(n,H(t));var x=(n,t,l)=>new Promise((f,m)=>{var o=s=>{try{d(l.next(s))}catch(p){m(p)}},b=s=>{try{d(l.throw(s))}catch(p){m(p)}},d=s=>s.done?f(s.value):Promise.resolve(s.value).then(o,b);d((l=l.apply(n,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");require("html2canvas");const X=require("./element-resize-detector-BvkAwVg8.cjs"),Y=require("./index-BSzyUGIT.cjs"),P=require("./config-DbZfhrwE.cjs"),g=require("element-plus"),Z=require("./api-CsM841lz.cjs"),V=require("./ele-textbox-icon-g_5kV8t6.cjs"),ee={class:"mix-component"},te={DEFAULT_ICON:V.DEFAULT_ICON,ACTIVE_ICON:V.ACTIVE_ICON,NAME_CN:"文本",NAME_EN:"Textbox",ORDER:2},le={bgColor:{value:"#fff",type:"color",label:"component.options.bgColor"},textColor:{value:"#111",type:"color",label:"component.options.textColor"},textSize:{value:14,type:"number",label:"component.options.textSize",min:10,max:100},radiusSize:{value:8,type:"number",label:"component.options.radiusSize",min:0,max:50},letterSpacing:{value:2,type:"number",label:"component.options.letterSpacing",min:0,max:20},name:{value:"",type:"string",label:"component.customized.name"},bgImg:{value:"",type:"image",label:"component.customized.bgImg"},textAlign:{value:"center",type:"radio",option:[{value:"left",label:"component.list.left"},{value:"center",label:"component.list.center"},{value:"right",label:"component.list.right"}],label:"component.customized.textAlign"},isBold:!1,isJump:!1,jumpType:{value:"url",type:"radio",option:[{value:"url",label:"component.customized.address"},{value:"uid",label:"component.customized.dashboard"}],label:"component.customized.jumpType",dependent:"isJump"},jumpParam:{value:"",type:"string",label:"跳转参数",dependent:"isJump"}},re={DEFAULT:te,OPTIONS:le,COMMON:{}},ne=r.defineComponent(F(U({},re),{__name:"textbox",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const t=n,l={left:"flex-start",center:"center",right:"flex-end"};class f extends X.BaseComponent{extractStyles(){var c,u,i,v,y,S,C,_,h,z,I,E,j,O,T,A,w,N,M,$,q,B,J,L,k;const{options:e}=this.props.conf;return{bgColor:(i=(u=(c=e==null?void 0:e.bgColor)==null?void 0:c.value)!=null?u:e==null?void 0:e.bgColor)!=null?i:"#fff",textColor:(S=(y=(v=e==null?void 0:e.textColor)==null?void 0:v.value)!=null?y:e==null?void 0:e.textColor)!=null?S:"#303133",textSize:(h=(_=(C=e==null?void 0:e.textSize)==null?void 0:C.value)!=null?_:e==null?void 0:e.textSize)!=null?h:14,radiusSize:(E=(I=(z=e==null?void 0:e.radiusSize)==null?void 0:z.value)!=null?I:e==null?void 0:e.radiusSize)!=null?E:8,letterSpacing:(T=(O=(j=e==null?void 0:e.letterSpacing)==null?void 0:j.value)!=null?O:e==null?void 0:e.letterSpacing)!=null?T:2,textAlign:(w=(A=e==null?void 0:e.textAlign)==null?void 0:A.value)!=null?w:"center",isBold:($=(M=(N=e==null?void 0:e.isBold)==null?void 0:N.value)!=null?M:e==null?void 0:e.isBold)!=null?$:!1,bgImg:(B=(q=e==null?void 0:e.bgImg)==null?void 0:q.value)!=null?B:"",isJump:(k=(L=(J=e==null?void 0:e.isJump)==null?void 0:J.value)!=null?L:e==null?void 0:e.isJump)!=null?k:!1}}}const m=new f(t,"textbox");m.setupLifecycle();const o=m.getStyle(),b=a=>a?a.startsWith(P.FILE_URL)||a.startsWith("http")?a:P.FILE_URL+a:"",d=a=>x(null,null,function*(){var e;try{const{result:c}=yield Z.api.post("get_object_item",{uid:a},!0);let u={};return(e=c.dashboard_list)!=null&&e.length&&(u=c.dashboard_list.find(i=>i.type==="show")),Object.keys(u).length?`${location.origin}/mixui/#/preview/${u.uid}/${u.name}?object_id=${a}`:(g.ElMessage({message:"该对象未配置大屏脚本",type:"warning"}),null)}catch(c){return g.ElMessage.error("获取跳转信息失败"),null}}),s=()=>x(null,null,function*(){var c,u;const{options:a}=t.conf,e=(c=a.jumpParam)==null?void 0:c.value;if(!e){g.ElMessage.error("未设置跳转参数");return}try{let i=null;((u=a.jumpType)==null?void 0:u.value)==="url"?i=e:i=yield d(e),i&&window.open(i,"_self")}catch(i){g.ElMessage.error("跳转失败")}}),p=()=>{t.mode==="preview"&&o.value.isJump&&s()};return(a,e)=>{var c,u,i;return r.openBlock(),r.createElementBlock("div",ee,[r.createElementVNode("div",{class:"textbox-wrap",style:r.normalizeStyle({backgroundColor:r.unref(o).bgColor,color:r.unref(o).textColor,borderRadius:`${r.unref(o).radiusSize}px`,fontSize:`${r.unref(o).textSize}px`,backgroundImage:r.unref(o).bgImg?`url(${b(r.unref(o).bgImg)})`:"",justifyContent:l[r.unref(o).textAlign]||"center",fontWeight:r.unref(o).isBold?"600":"400",letterSpacing:`${r.unref(o).letterSpacing}px`,cursor:r.unref(o).isJump?"pointer":"default"}),onClick:p},r.toDisplayString(((i=(u=(c=n.conf)==null?void 0:c.options)==null?void 0:u.name)==null?void 0:i.value)||""),5),r.renderSlot(a.$slots,"default",{},void 0,!0)])}}})),ae=Y._export_sfc(ne,[["__scopeId","data-v-2b23378b"]]);exports.default=ae;
1
+ "use strict";var W=Object.defineProperty,G=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var R=(n,t,l)=>t in n?W(n,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[t]=l,U=(n,t)=>{for(var l in t||(t={}))K.call(t,l)&&R(n,l,t[l]);if(D)for(var l of D(t))Q.call(t,l)&&R(n,l,t[l]);return n},F=(n,t)=>G(n,H(t));var x=(n,t,l)=>new Promise((f,m)=>{var o=s=>{try{d(l.next(s))}catch(p){m(p)}},b=s=>{try{d(l.throw(s))}catch(p){m(p)}},d=s=>s.done?f(s.value):Promise.resolve(s.value).then(o,b);d((l=l.apply(n,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");require("html2canvas");const X=require("./element-resize-detector-DYs3pJPp.cjs"),Y=require("./index-ZwyqrmaH.cjs"),P=require("./config-DbZfhrwE.cjs"),g=require("element-plus"),Z=require("./api-nw_9niqv.cjs"),V=require("./ele-textbox-icon-g_5kV8t6.cjs"),ee={class:"mix-component"},te={DEFAULT_ICON:V.DEFAULT_ICON,ACTIVE_ICON:V.ACTIVE_ICON,NAME_CN:"文本",NAME_EN:"Textbox",ORDER:2},le={bgColor:{value:"#fff",type:"color",label:"component.options.bgColor"},textColor:{value:"#111",type:"color",label:"component.options.textColor"},textSize:{value:14,type:"number",label:"component.options.textSize",min:10,max:100},radiusSize:{value:8,type:"number",label:"component.options.radiusSize",min:0,max:50},letterSpacing:{value:2,type:"number",label:"component.options.letterSpacing",min:0,max:20},name:{value:"",type:"string",label:"component.customized.name"},bgImg:{value:"",type:"image",label:"component.customized.bgImg"},textAlign:{value:"center",type:"radio",option:[{value:"left",label:"component.list.left"},{value:"center",label:"component.list.center"},{value:"right",label:"component.list.right"}],label:"component.customized.textAlign"},isBold:!1,isJump:!1,jumpType:{value:"url",type:"radio",option:[{value:"url",label:"component.customized.address"},{value:"uid",label:"component.customized.dashboard"}],label:"component.customized.jumpType",dependent:"isJump"},jumpParam:{value:"",type:"string",label:"跳转参数",dependent:"isJump"}},re={DEFAULT:te,OPTIONS:le,COMMON:{}},ne=r.defineComponent(F(U({},re),{__name:"textbox",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(n){const t=n,l={left:"flex-start",center:"center",right:"flex-end"};class f extends X.BaseComponent{extractStyles(){var c,u,i,v,y,S,C,_,h,z,I,E,j,O,T,A,w,N,M,$,q,B,J,L,k;const{options:e}=this.props.conf;return{bgColor:(i=(u=(c=e==null?void 0:e.bgColor)==null?void 0:c.value)!=null?u:e==null?void 0:e.bgColor)!=null?i:"#fff",textColor:(S=(y=(v=e==null?void 0:e.textColor)==null?void 0:v.value)!=null?y:e==null?void 0:e.textColor)!=null?S:"#303133",textSize:(h=(_=(C=e==null?void 0:e.textSize)==null?void 0:C.value)!=null?_:e==null?void 0:e.textSize)!=null?h:14,radiusSize:(E=(I=(z=e==null?void 0:e.radiusSize)==null?void 0:z.value)!=null?I:e==null?void 0:e.radiusSize)!=null?E:8,letterSpacing:(T=(O=(j=e==null?void 0:e.letterSpacing)==null?void 0:j.value)!=null?O:e==null?void 0:e.letterSpacing)!=null?T:2,textAlign:(w=(A=e==null?void 0:e.textAlign)==null?void 0:A.value)!=null?w:"center",isBold:($=(M=(N=e==null?void 0:e.isBold)==null?void 0:N.value)!=null?M:e==null?void 0:e.isBold)!=null?$:!1,bgImg:(B=(q=e==null?void 0:e.bgImg)==null?void 0:q.value)!=null?B:"",isJump:(k=(L=(J=e==null?void 0:e.isJump)==null?void 0:J.value)!=null?L:e==null?void 0:e.isJump)!=null?k:!1}}}const m=new f(t,"textbox");m.setupLifecycle();const o=m.getStyle(),b=a=>a?a.startsWith(P.FILE_URL)||a.startsWith("http")?a:P.FILE_URL+a:"",d=a=>x(null,null,function*(){var e;try{const{result:c}=yield Z.api.post("get_object_item",{uid:a},!0);let u={};return(e=c.dashboard_list)!=null&&e.length&&(u=c.dashboard_list.find(i=>i.type==="show")),Object.keys(u).length?`${location.origin}/mixui/#/preview/${u.uid}/${u.name}?object_id=${a}`:(g.ElMessage({message:"该对象未配置大屏脚本",type:"warning"}),null)}catch(c){return g.ElMessage.error("获取跳转信息失败"),null}}),s=()=>x(null,null,function*(){var c,u;const{options:a}=t.conf,e=(c=a.jumpParam)==null?void 0:c.value;if(!e){g.ElMessage.error("未设置跳转参数");return}try{let i=null;((u=a.jumpType)==null?void 0:u.value)==="url"?i=e:i=yield d(e),i&&window.open(i,"_self")}catch(i){g.ElMessage.error("跳转失败")}}),p=()=>{t.mode==="preview"&&o.value.isJump&&s()};return(a,e)=>{var c,u,i;return r.openBlock(),r.createElementBlock("div",ee,[r.createElementVNode("div",{class:"textbox-wrap",style:r.normalizeStyle({backgroundColor:r.unref(o).bgColor,color:r.unref(o).textColor,borderRadius:`${r.unref(o).radiusSize}px`,fontSize:`${r.unref(o).textSize}px`,backgroundImage:r.unref(o).bgImg?`url(${b(r.unref(o).bgImg)})`:"",justifyContent:l[r.unref(o).textAlign]||"center",fontWeight:r.unref(o).isBold?"600":"400",letterSpacing:`${r.unref(o).letterSpacing}px`,cursor:r.unref(o).isJump?"pointer":"default"}),onClick:p},r.toDisplayString(((i=(u=(c=n.conf)==null?void 0:c.options)==null?void 0:u.name)==null?void 0:i.value)||""),5),r.renderSlot(a.$slots,"default",{},void 0,!0)])}}})),ae=Y._export_sfc(ne,[["__scopeId","data-v-2b23378b"]]);exports.default=ae;
@@ -28,11 +28,11 @@ var x = (r, t, l) => new Promise((f, s) => {
28
28
  });
29
29
  import { defineComponent as Q, openBlock as X, createElementBlock as Y, createElementVNode as Z, normalizeStyle as ee, unref as c, toDisplayString as te, renderSlot as le } from "vue";
30
30
  import "html2canvas";
31
- import { B as re } from "./element-resize-detector-B-0BgVLy.js";
32
- import { _ as ae } from "./index-C8teBAQd.js";
31
+ import { B as re } from "./element-resize-detector-BCRzpPES.js";
32
+ import { _ as ae } from "./index-LgTfdmT4.js";
33
33
  import { F as W } from "./config-BrMFHyZe.js";
34
34
  import { ElMessage as g } from "element-plus";
35
- import { a as oe } from "./api-DAUw_RyI.js";
35
+ import { a as oe } from "./api-Cyx2Fha0.js";
36
36
  import { A as ne, D as ie } from "./ele-textbox-icon-ClGaLi5p.js";
37
37
  const ue = { class: "mix-component" }, ce = {
38
38
  DEFAULT_ICON: ie,
@@ -1 +1 @@
1
- "use strict";var g=Object.defineProperty,k=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var D=(r,o,l)=>o in r?g(r,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[o]=l,C=(r,o)=>{for(var l in o||(o={}))V.call(o,l)&&D(r,l,o[l]);if(y)for(var l of y(o))E.call(o,l)&&D(r,l,o[l]);return r},M=(r,o)=>k(r,N(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),T=require("@element-plus/icons-vue"),v=require("./index-BSzyUGIT.cjs"),b=require("./ele-dateTime-icon-BgZ2_KWW.cjs"),I={class:"time-query-bar"},O={class:"granularity-tabs"},S=["onClick"],h={class:"time-range"},A={DEFAULT_ICON:b.DEFAULT_ICON,ACTIVE_ICON:b.ACTIVE_ICON,NAME_CN:"时间查询栏",NAME_EN:"Time Query Bar",ORDER:10},q={bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"}},x=[{targetComponentId:""}],B=["targetComponentId"],U=[],w={useAlias:!1,multiObject:!1,source:""},j={DEFAULT:A,OPTIONS:q,DATA:x,PARAMS:B,SOURCE:U,COMMON:w},L=e.defineComponent(M(C({},j),{__name:"timeQueryBar",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(r){e.useCssVars(a=>({v7c4d01ae:i.value.bgColor,v341175c6:i.value.textColor,v29229c49:i.value.accentColor}));const o=v.useLinkStore(),l=r,_=[{label:"小时",value:"hour"},{label:"日均",value:"day"},{label:"今日",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"}],m=e.ref("hour"),n=e.ref(""),u=e.ref(""),i=e.computed(()=>{var c,d,Y,s;const{options:a,data:t}=l.conf||{};return{targetComponentId:((c=t==null?void 0:t[0])==null?void 0:c.targetComponentId)||"",bgColor:((d=a==null?void 0:a.bgColor)==null?void 0:d.value)||"#ffffff",textColor:((Y=a==null?void 0:a.textColor)==null?void 0:Y.value)||"#333333",accentColor:((s=a==null?void 0:a.accentColor)==null?void 0:s.value)||"#409eff"}}),p=a=>{m.value=a;const t=v.dayjs();switch(a){case"hour":n.value=t.subtract(1,"hour").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break;case"day":n.value=t.subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break;case"today":n.value=t.startOf("day").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break;case"week":n.value=t.subtract(7,"day").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break;case"month":n.value=t.subtract(30,"day").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break}},H=()=>{const a=i.value.targetComponentId;a&&(o.publish("deepDisplacement3D",{objectId:a,type:"query",fv:{granularity:m.value,startTime:n.value,endTime:u.value,sourceUid:l.uid},source:"timeQueryBar"}),console.log("[TimeQueryBar] 发送查询请求:",{targetId:a,granularity:m.value,startTime:n.value,endTime:u.value}))};return e.onMounted(()=>{p("month")}),(a,t)=>{const c=f.ElDatePicker,d=f.ElIcon,Y=f.ElButton;return e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("div",O,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,s=>e.createElementVNode("span",{key:s.value,class:e.normalizeClass(["tab-item",{active:m.value===s.value}]),onClick:z=>p(s.value)},e.toDisplayString(s.label),11,S)),64))]),e.createElementVNode("div",h,[e.createVNode(c,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=s=>n.value=s),type:"datetime",placeholder:"开始时间",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",size:"small",class:"time-picker"},null,8,["modelValue"]),t[2]||(t[2]=e.createElementVNode("span",{class:"range-separator"},"→",-1)),e.createVNode(c,{modelValue:u.value,"onUpdate:modelValue":t[1]||(t[1]=s=>u.value=s),type:"datetime",placeholder:"结束时间",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",size:"small",class:"time-picker"},null,8,["modelValue"])]),e.createVNode(Y,{type:"primary",size:"small",onClick:H},{default:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(e.unref(T.Search))]),_:1}),t[3]||(t[3]=e.createTextVNode(" 搜索 ",-1))]),_:1}),e.renderSlot(a.$slots,"default",{},void 0,!0)])}}})),Q=v._export_sfc(L,[["__scopeId","data-v-2a5561c6"]]);exports.default=Q;
1
+ "use strict";var g=Object.defineProperty,k=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var D=(r,o,l)=>o in r?g(r,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[o]=l,C=(r,o)=>{for(var l in o||(o={}))V.call(o,l)&&D(r,l,o[l]);if(y)for(var l of y(o))E.call(o,l)&&D(r,l,o[l]);return r},M=(r,o)=>k(r,N(o));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");require("element-plus/es/components/date-picker/style/css");const e=require("vue"),T=require("@element-plus/icons-vue"),v=require("./index-ZwyqrmaH.cjs"),b=require("./ele-dateTime-icon-BgZ2_KWW.cjs"),I={class:"time-query-bar"},O={class:"granularity-tabs"},S=["onClick"],h={class:"time-range"},A={DEFAULT_ICON:b.DEFAULT_ICON,ACTIVE_ICON:b.ACTIVE_ICON,NAME_CN:"时间查询栏",NAME_EN:"Time Query Bar",ORDER:10},q={bgColor:{value:"#ffffff",type:"color",label:"component.options.bgColor"},textColor:{value:"#333333",type:"color",label:"component.options.textColor"},accentColor:{value:"#409eff",type:"color",label:"component.options.accentColor"}},x=[{targetComponentId:""}],B=["targetComponentId"],U=[],w={useAlias:!1,multiObject:!1,source:""},j={DEFAULT:A,OPTIONS:q,DATA:x,PARAMS:B,SOURCE:U,COMMON:w},L=e.defineComponent(M(C({},j),{__name:"timeQueryBar",props:{conf:{type:Object,default:()=>({})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(r){e.useCssVars(a=>({v7c4d01ae:i.value.bgColor,v341175c6:i.value.textColor,v29229c49:i.value.accentColor}));const o=v.useLinkStore(),l=r,_=[{label:"小时",value:"hour"},{label:"日均",value:"day"},{label:"今日",value:"today"},{label:"近7天",value:"week"},{label:"近30天",value:"month"}],m=e.ref("hour"),n=e.ref(""),u=e.ref(""),i=e.computed(()=>{var c,d,Y,s;const{options:a,data:t}=l.conf||{};return{targetComponentId:((c=t==null?void 0:t[0])==null?void 0:c.targetComponentId)||"",bgColor:((d=a==null?void 0:a.bgColor)==null?void 0:d.value)||"#ffffff",textColor:((Y=a==null?void 0:a.textColor)==null?void 0:Y.value)||"#333333",accentColor:((s=a==null?void 0:a.accentColor)==null?void 0:s.value)||"#409eff"}}),p=a=>{m.value=a;const t=v.dayjs();switch(a){case"hour":n.value=t.subtract(1,"hour").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break;case"day":n.value=t.subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break;case"today":n.value=t.startOf("day").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break;case"week":n.value=t.subtract(7,"day").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break;case"month":n.value=t.subtract(30,"day").format("YYYY-MM-DD HH:mm:ss"),u.value=t.format("YYYY-MM-DD HH:mm:ss");break}},H=()=>{const a=i.value.targetComponentId;a&&(o.publish("deepDisplacement3D",{objectId:a,type:"query",fv:{granularity:m.value,startTime:n.value,endTime:u.value,sourceUid:l.uid},source:"timeQueryBar"}),console.log("[TimeQueryBar] 发送查询请求:",{targetId:a,granularity:m.value,startTime:n.value,endTime:u.value}))};return e.onMounted(()=>{p("month")}),(a,t)=>{const c=f.ElDatePicker,d=f.ElIcon,Y=f.ElButton;return e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("div",O,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,s=>e.createElementVNode("span",{key:s.value,class:e.normalizeClass(["tab-item",{active:m.value===s.value}]),onClick:z=>p(s.value)},e.toDisplayString(s.label),11,S)),64))]),e.createElementVNode("div",h,[e.createVNode(c,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=s=>n.value=s),type:"datetime",placeholder:"开始时间",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",size:"small",class:"time-picker"},null,8,["modelValue"]),t[2]||(t[2]=e.createElementVNode("span",{class:"range-separator"},"→",-1)),e.createVNode(c,{modelValue:u.value,"onUpdate:modelValue":t[1]||(t[1]=s=>u.value=s),type:"datetime",placeholder:"结束时间",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",size:"small",class:"time-picker"},null,8,["modelValue"])]),e.createVNode(Y,{type:"primary",size:"small",onClick:H},{default:e.withCtx(()=>[e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(e.unref(T.Search))]),_:1}),t[3]||(t[3]=e.createTextVNode(" 搜索 ",-1))]),_:1}),e.renderSlot(a.$slots,"default",{},void 0,!0)])}}})),Q=v._export_sfc(L,[["__scopeId","data-v-2a5561c6"]]);exports.default=Q;
@@ -17,7 +17,7 @@ import "element-plus/es/components/icon/style/css";
17
17
  import "element-plus/es/components/date-picker/style/css";
18
18
  import { defineComponent as V, useCssVars as x, ref as Y, computed as B, onMounted as U, openBlock as b, createElementBlock as _, createElementVNode as p, Fragment as w, renderList as Q, normalizeClass as j, toDisplayString as z, createVNode as u, withCtx as H, unref as L, createTextVNode as R, renderSlot as F } from "vue";
19
19
  import { Search as P } from "@element-plus/icons-vue";
20
- import { u as q, e as $, _ as G } from "./index-C8teBAQd.js";
20
+ import { u as q, e as $, _ as G } from "./index-LgTfdmT4.js";
21
21
  import { A as J, D as K } from "./ele-dateTime-icon-BEGFlwID.js";
22
22
  const W = { class: "time-query-bar" }, X = { class: "granularity-tabs" }, Z = ["onClick"], ee = { class: "time-range" }, te = {
23
23
  DEFAULT_ICON: K,
@@ -18,10 +18,10 @@ import "element-plus/es/components/select/style/css";
18
18
  import "element-plus/es/components/option/style/css";
19
19
  import { defineComponent as ge, inject as ye, computed as T, ref as V, watch as K, onMounted as Se, onUnmounted as be, openBlock as _, createElementBlock as z, normalizeStyle as Ce, createElementVNode as k, toDisplayString as Z, unref as P, createCommentVNode as Q, createBlock as F, withCtx as R, Fragment as X, renderList as Y, createVNode as L, createTextVNode as De, renderSlot as _e } from "vue";
20
20
  import "html2canvas";
21
- import { d as xe } from "./element-resize-detector-B-0BgVLy.js";
22
- import { _ as Ie } from "./index-C8teBAQd.js";
23
- import { E as Oe } from "./EChartComponentBase-CQYZ0922.js";
24
- import { formatRequest as ke } from "./request-BKxONB4_.js";
21
+ import { d as xe } from "./element-resize-detector-BCRzpPES.js";
22
+ import { _ as Ie } from "./index-LgTfdmT4.js";
23
+ import { E as Oe } from "./EChartComponentBase-CafVdj74.js";
24
+ import { formatRequest as ke } from "./request-jIo7FwQD.js";
25
25
  import { A as Ee, D as je } from "./ele-glbModel-icon-l_SMi3ik.js";
26
26
  import { Download as Ae } from "@element-plus/icons-vue";
27
27
  const Me = { class: "panel-header" }, $e = { class: "header-left" }, Ne = { class: "header-title" }, Te = {
@@ -1,4 +1,4 @@
1
- "use strict";var Q=Object.defineProperty,X=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var R=(S,f,y)=>f in S?Q(S,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):S[f]=y,V=(S,f)=>{for(var y in f||(f={}))ee.call(f,y)&&R(S,y,f[y]);if(L)for(var y of L(f))te.call(f,y)&&R(S,y,f[y]);return S},A=(S,f)=>X(S,Y(f));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=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/icon/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 se=require("./element-resize-detector-BvkAwVg8.cjs"),ae=require("./index-BSzyUGIT.cjs"),ne=require("./EChartComponentBase-DRY0bLOI.cjs"),oe=require("./request-CipSkL_e.cjs"),P=require("./ele-glbModel-icon-ByACDCrv.cjs"),ie=require("@element-plus/icons-vue"),le={class:"panel-header"},re={class:"header-left"},ce={class:"header-title"},ue={key:0,class:"time-range-text"},de={class:"header-right"},he={class:"chart-area"},fe=["id"],me={DEFAULT_ICON:P.DEFAULT_ICON,ACTIVE_ICON:P.ACTIVE_ICON,NAME_CN:"指标时序演变曲线",NAME_EN:"Time Series Evolution Curve",ORDER:12},pe={title:{value:"指标时序演变曲线",type:"string",label:"component.timeSeries.title"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},seriesStyles:{value:"",type:"textarea",label:"component.timeSeries.seriesStyles",placeholder:'JSON格式,例如:{"widthDaily": {"color": "#4a90d9", "lineStyle": "solid"}}'},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"}},showTimeRange:{value:!0,type:"checkbox",label:"component.timeSeries.showTimeRange"}},ve=[{name:"指标1",fv:"indicator1",unit:"mm",color:"#4a90d9",lineStyle:"solid",fvDeviceName:"deviceId",object_id:""},{name:"指标2",fv:"indicator2",unit:"°",color:"#52c41a",lineStyle:"dashed",fvDeviceName:"deviceId",object_id:""}],ge=["name","fv","unit","color","lineStyle","fvDeviceName","object_id"],Ce=["mosaic","statistics","statisticsRealtime"],ye={useAlias:!1,multiObject:!1,source:"mosaic"},Se={DEFAULT:me,OPTIONS:pe,DATA:ve,PARAMS:ge,SOURCE:Ce,COMMON:ye},be=t.defineComponent(A(V({},Se),{__name:"timeSeries",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(S){const f=S;class y extends ne.EChartComponentBase{constructor(){super(...arguments),this.currentObjectId="",this.chartData={times:[],series:{}},this.historyCache=new Map,this.selectedSeriesIndex=[],this.selectionInitialized=!1}extractStyles(){var h,i,m,v,C,D,g,M;const{options:e}=this.props.conf,s=((h=e==null?void 0:e.linkChannel)==null?void 0:h.value)||"deepDisplacement",c=((i=e==null?void 0:e.customChannel)==null?void 0:i.value)||"",r=s==="custom"&&c?c:s,u=((m=this.props.conf)==null?void 0:m.data)||[],n=["#4a90d9","#52c41a","#ff7875","#ffc069","#b37feb","#36cfc9","#fadb14","#ff85c0"],a=["solid","dashed","solid","dashed","solid","dashed","solid","dashed"];let d={};try{const b=((v=e==null?void 0:e.seriesStyles)==null?void 0:v.value)||"";b&&b.trim()&&(d=JSON.parse(b))}catch(b){console.warn("[timeSeries] 解析系列样式配置失败:",b)}const l={};return u.forEach((b,k)=>{const N=b.fv||`series_${k}`,j=d[N]||{};l[N]={color:j.color||b.color||n[k%n.length],lineStyle:j.lineStyle||b.lineStyle||a[k%a.length]}}),{title:((C=e==null?void 0:e.title)==null?void 0:C.value)||"指标时序演变曲线",bgColor:((D=e==null?void 0:e.bgColor)==null?void 0:D.value)||"#ffffff",textColor:((g=e==null?void 0:e.textColor)==null?void 0:g.value)||"#333333",seriesConfig:l,showTimeRange:((M=e==null?void 0:e.showTimeRange)==null?void 0:M.value)!==!1,linkChannel:r}}getMockData(){var n;const e=((n=this.props.conf)==null?void 0:n.data)||[],s=[],c={};e.forEach(a=>{const d=a.fv||"series";c[d]=[]});const r=new Date,u={};e.forEach((a,d)=>{const l=a.fv||"series";u[l]=(d+1)*5+Math.random()*10});for(let a=23;a>=0;a--){const d=new Date(r.getTime()-a*60*60*1e3),l=d.toISOString().slice(0,19).replace("T"," ");s.push(l),e.forEach((h,i)=>{const m=h.fv||"series",v=d.getHours();let C=0;const D=i%3;if(D===0){const g=Math.sin((v/12+i*.5)*Math.PI)*10+(Math.random()-.5)*5;u[m]+=Math.max(0,g*.1),C=u[m]}else if(D===1){const g=i*2;(v+g)%24>=2&&(v+g)%24<=6?C=Math.random()*.8+i*.5:(v+g)%24>=14&&(v+g)%24<=18?C=Math.random()*.6+i*.3:Math.random()>.85&&(C=Math.random()*.3)}else{const g=i*Math.PI/3;C=u[m]+Math.sin((v/12+g)*Math.PI)*3+(Math.random()-.5)*2}c[m].push(Number(C.toFixed(2)))})}return{times:s,series:c}}getChartOption(){var d;const e=this.Style.value,s=((d=this.props.conf)==null?void 0:d.data)||[],r=this.chartData.times.length>0?this.chartData:this.getMockData(),u=[],n=[];s.forEach((l,h)=>{var k,N,j,z;if(!(this.selectionInitialized?this.selectedSeriesIndex.includes(h):!0))return;const m=l.fv||`series_${h}`,v=l.name||`指标${h+1}`,C=l.unit||"",D=C?`${v}(${C})`:v,g=((N=(k=e.seriesConfig)==null?void 0:k[m])==null?void 0:N.color)||"#4a90d9",M=((z=(j=e.seriesConfig)==null?void 0:j[m])==null?void 0:z.lineStyle)||"solid";u.push(D);const b=r.series[m]||[];n.push({name:D,type:"line",data:b,smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:g,width:2,type:M},itemStyle:{color:g,borderColor:"#fff",borderWidth:1}})});const a={grid:{top:60,right:20,bottom:e.showTimeRange?70:50,left:60},tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#ddd",borderWidth:1,textStyle:{color:e.textColor},formatter:l=>{if(!l||l.length===0)return"";let i=`<div style="margin-bottom: 4px;"><strong>${l[0].axisValue}</strong></div>`;return l.forEach(m=>{const v=m.value!==null&&m.value!==void 0?Number(m.value).toFixed(2):"--";i+=`<div style="margin: 2px 0;">
1
+ "use strict";var Q=Object.defineProperty,X=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var R=(S,f,y)=>f in S?Q(S,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):S[f]=y,V=(S,f)=>{for(var y in f||(f={}))ee.call(f,y)&&R(S,y,f[y]);if(L)for(var y of L(f))te.call(f,y)&&R(S,y,f[y]);return S},A=(S,f)=>X(S,Y(f));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=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/icon/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 se=require("./element-resize-detector-DYs3pJPp.cjs"),ae=require("./index-ZwyqrmaH.cjs"),ne=require("./EChartComponentBase-Dz5E-lyI.cjs"),oe=require("./request-BcQP_dWt.cjs"),P=require("./ele-glbModel-icon-ByACDCrv.cjs"),ie=require("@element-plus/icons-vue"),le={class:"panel-header"},re={class:"header-left"},ce={class:"header-title"},ue={key:0,class:"time-range-text"},de={class:"header-right"},he={class:"chart-area"},fe=["id"],me={DEFAULT_ICON:P.DEFAULT_ICON,ACTIVE_ICON:P.ACTIVE_ICON,NAME_CN:"指标时序演变曲线",NAME_EN:"Time Series Evolution Curve",ORDER:12},pe={title:{value:"指标时序演变曲线",type:"string",label:"component.timeSeries.title"},bgColor:{value:"#ffffff",type:"color",label:"setting.bgColor"},textColor:{value:"#333333",type:"color",label:"setting.textColor"},seriesStyles:{value:"",type:"textarea",label:"component.timeSeries.seriesStyles",placeholder:'JSON格式,例如:{"widthDaily": {"color": "#4a90d9", "lineStyle": "solid"}}'},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"}},showTimeRange:{value:!0,type:"checkbox",label:"component.timeSeries.showTimeRange"}},ve=[{name:"指标1",fv:"indicator1",unit:"mm",color:"#4a90d9",lineStyle:"solid",fvDeviceName:"deviceId",object_id:""},{name:"指标2",fv:"indicator2",unit:"°",color:"#52c41a",lineStyle:"dashed",fvDeviceName:"deviceId",object_id:""}],ge=["name","fv","unit","color","lineStyle","fvDeviceName","object_id"],Ce=["mosaic","statistics","statisticsRealtime"],ye={useAlias:!1,multiObject:!1,source:"mosaic"},Se={DEFAULT:me,OPTIONS:pe,DATA:ve,PARAMS:ge,SOURCE:Ce,COMMON:ye},be=t.defineComponent(A(V({},Se),{__name:"timeSeries",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"}},setup(S){const f=S;class y extends ne.EChartComponentBase{constructor(){super(...arguments),this.currentObjectId="",this.chartData={times:[],series:{}},this.historyCache=new Map,this.selectedSeriesIndex=[],this.selectionInitialized=!1}extractStyles(){var h,i,m,v,C,D,g,M;const{options:e}=this.props.conf,s=((h=e==null?void 0:e.linkChannel)==null?void 0:h.value)||"deepDisplacement",c=((i=e==null?void 0:e.customChannel)==null?void 0:i.value)||"",r=s==="custom"&&c?c:s,u=((m=this.props.conf)==null?void 0:m.data)||[],n=["#4a90d9","#52c41a","#ff7875","#ffc069","#b37feb","#36cfc9","#fadb14","#ff85c0"],a=["solid","dashed","solid","dashed","solid","dashed","solid","dashed"];let d={};try{const b=((v=e==null?void 0:e.seriesStyles)==null?void 0:v.value)||"";b&&b.trim()&&(d=JSON.parse(b))}catch(b){console.warn("[timeSeries] 解析系列样式配置失败:",b)}const l={};return u.forEach((b,k)=>{const N=b.fv||`series_${k}`,j=d[N]||{};l[N]={color:j.color||b.color||n[k%n.length],lineStyle:j.lineStyle||b.lineStyle||a[k%a.length]}}),{title:((C=e==null?void 0:e.title)==null?void 0:C.value)||"指标时序演变曲线",bgColor:((D=e==null?void 0:e.bgColor)==null?void 0:D.value)||"#ffffff",textColor:((g=e==null?void 0:e.textColor)==null?void 0:g.value)||"#333333",seriesConfig:l,showTimeRange:((M=e==null?void 0:e.showTimeRange)==null?void 0:M.value)!==!1,linkChannel:r}}getMockData(){var n;const e=((n=this.props.conf)==null?void 0:n.data)||[],s=[],c={};e.forEach(a=>{const d=a.fv||"series";c[d]=[]});const r=new Date,u={};e.forEach((a,d)=>{const l=a.fv||"series";u[l]=(d+1)*5+Math.random()*10});for(let a=23;a>=0;a--){const d=new Date(r.getTime()-a*60*60*1e3),l=d.toISOString().slice(0,19).replace("T"," ");s.push(l),e.forEach((h,i)=>{const m=h.fv||"series",v=d.getHours();let C=0;const D=i%3;if(D===0){const g=Math.sin((v/12+i*.5)*Math.PI)*10+(Math.random()-.5)*5;u[m]+=Math.max(0,g*.1),C=u[m]}else if(D===1){const g=i*2;(v+g)%24>=2&&(v+g)%24<=6?C=Math.random()*.8+i*.5:(v+g)%24>=14&&(v+g)%24<=18?C=Math.random()*.6+i*.3:Math.random()>.85&&(C=Math.random()*.3)}else{const g=i*Math.PI/3;C=u[m]+Math.sin((v/12+g)*Math.PI)*3+(Math.random()-.5)*2}c[m].push(Number(C.toFixed(2)))})}return{times:s,series:c}}getChartOption(){var d;const e=this.Style.value,s=((d=this.props.conf)==null?void 0:d.data)||[],r=this.chartData.times.length>0?this.chartData:this.getMockData(),u=[],n=[];s.forEach((l,h)=>{var k,N,j,z;if(!(this.selectionInitialized?this.selectedSeriesIndex.includes(h):!0))return;const m=l.fv||`series_${h}`,v=l.name||`指标${h+1}`,C=l.unit||"",D=C?`${v}(${C})`:v,g=((N=(k=e.seriesConfig)==null?void 0:k[m])==null?void 0:N.color)||"#4a90d9",M=((z=(j=e.seriesConfig)==null?void 0:j[m])==null?void 0:z.lineStyle)||"solid";u.push(D);const b=r.series[m]||[];n.push({name:D,type:"line",data:b,smooth:!0,symbol:"circle",symbolSize:4,lineStyle:{color:g,width:2,type:M},itemStyle:{color:g,borderColor:"#fff",borderWidth:1}})});const a={grid:{top:60,right:20,bottom:e.showTimeRange?70:50,left:60},tooltip:{trigger:"axis",backgroundColor:"rgba(255, 255, 255, 0.95)",borderColor:"#ddd",borderWidth:1,textStyle:{color:e.textColor},formatter:l=>{if(!l||l.length===0)return"";let i=`<div style="margin-bottom: 4px;"><strong>${l[0].axisValue}</strong></div>`;return l.forEach(m=>{const v=m.value!==null&&m.value!==void 0?Number(m.value).toFixed(2):"--";i+=`<div style="margin: 2px 0;">
2
2
  <span style="display: inline-block; width: 10px; height: 10px; background: ${m.color}; border-radius: 50%; margin-right: 6px;"></span>
3
3
  ${m.seriesName}: <strong>${v}</strong>
4
4
  </div>`}),i}},legend:{show:!0,top:10,left:"center",data:u,textStyle:{color:e.textColor,fontSize:12},itemGap:30},xAxis:{type:"category",boundaryGap:!1,data:r.times,axisLine:{lineStyle:{color:"#e0e0e0"}},axisLabel:{color:e.textColor,fontSize:12,formatter:l=>{if(l&&l.includes(" ")){const[h,i]=l.split(" "),[m,v,C]=h.split("-"),[D,g]=i.split(":");return`${v}-${C} ${D}:${g}`}return l}},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{type:"value",name:"",nameTextStyle:{color:e.textColor,fontSize:12},axisLine:{show:!1},axisLabel:{color:e.textColor,fontSize:12},splitLine:{lineStyle:{color:"#f0f0f0",type:"dashed"}}},series:n};return e.showTimeRange&&(a.dataZoom=[{type:"inside",xAxisIndex:0,filterMode:"none"},{type:"slider",xAxisIndex:0,bottom:10,height:18,filterMode:"none",borderColor:"#e5e7eb",backgroundColor:"#f3f4f6",fillerColor:"rgba(59, 130, 246, 0.18)",handleSize:14,handleStyle:{color:"#ffffff",borderColor:"#93c5fd",borderWidth:1,shadowBlur:2,shadowColor:"rgba(0,0,0,0.15)"},moveHandleSize:0,showDetail:!1,showDataShadow:!1}]),a}setSelectedSeriesIndex(e){this.selectionInitialized=!0,this.selectedSeriesIndex=Array.isArray(e)?[...e]:[]}isSelectionInitialized(){return this.selectionInitialized}setHistoryData(e){var n;if(!this.chartObj)return;const s=((n=this.props.conf)==null?void 0:n.data)||[],c=[],r={};s.forEach(a=>{const d=a.fv||"series";r[d]=[]});let u=[];if(Array.isArray(e==null?void 0:e.history)&&(Array.isArray(e.history[0])?u=e.history[0]||[]:u=e.history),u.forEach(a=>{const d=(a==null?void 0:a.time)||(a==null?void 0:a.datetime)||(a==null?void 0:a.start_time);d&&(c.push(d),s.forEach(l=>{var m;const h=l.fv||"series",i=this.extractDataValue(a,h);r[h].push((m=i!=null?i:a==null?void 0:a[l.name])!=null?m:0)}))}),c.length>0){this.chartData={times:c,series:r};const a=c[c.length-1];this.historyCache.set(a,{times:c,series:r}),I.value=[...new Set([...I.value,a])].slice(-200),O.value||(O.value=a),this.updateChart()}}setSocketData(e){var a;if(!this.chartObj||!e)return;const s=((a=this.props.conf)==null?void 0:a.data)||[],r=this.getSource()==="mosaic"?e.datetime:e.start_time;if(!r)return;let u=!1;const n={};if(s.forEach(d=>{const l=d.fv||"series",h=this.extractDataValue(e,l);h!=null&&(u=!0,n[l]=h)}),u){this.chartData.series||(this.chartData.series={}),this.chartData.times.push(r),s.forEach(h=>{const i=h.fv||"series";this.chartData.series[i]||(this.chartData.series[i]=[]),this.chartData.series[i].push(n[i]||0)}),this.chartData.times.length>100&&(this.chartData.times.shift(),Object.keys(this.chartData.series).forEach(h=>{this.chartData.series[h].length>0&&this.chartData.series[h].shift()}));const l=String(r);this.historyCache.set(l,{times:[...this.chartData.times],series:Object.fromEntries(Object.entries(this.chartData.series).map(([h,i])=>[h,[...i]]))}),I.value=[...new Set([...I.value,l])].slice(-200),O.value=l,this.updateChart()}}updateChart(e){if(!this.chartObj)return;const s=e||this.getChartOption();this.chartObj.setOption(s,!0)}setCurrentObjectId(e){this.currentObjectId=e}getCurrentObjectId(){return this.currentObjectId}init(){super.init(),this.props.mode==="edit"&&this.chartData.times.length===0&&(this.chartData=this.getMockData())}onLinkEvent(e){Z(e)}}const p=new y(f,"timeSeries");p.setupLifecycle();const x=p.getStyle(),F=p.getEchartId(),w=t.inject("session",null),U=t.computed(()=>{var e;return(((e=f.conf)==null?void 0:e.data)||[]).map((s,c)=>{const r=s.unit||"",u=s.name||`指标${c+1}`;return{label:r?`${u}(${r})`:u,value:c}})}),I=t.ref([]),O=t.ref(""),_=t.ref([]);t.watch(()=>{var o;return(o=f.conf)==null?void 0:o.data},o=>{if(o&&Array.isArray(o))if(!p.isSelectionInitialized())_.value=o.map((e,s)=>s),p.setSelectedSeriesIndex(_.value);else{const e=o.length;_.value=_.value.filter(s=>s>=0&&s<e),p.setSelectedSeriesIndex(_.value)}},{immediate:!0});const H=t.computed(()=>({backgroundColor:x.value.bgColor,color:x.value.textColor})),$=t.computed(()=>x.value.showTimeRange),q=t.computed(()=>{var r;if(!$.value)return"";const o=((r=p.chartData)==null?void 0:r.times)||[];if(!o.length)return"";const e=[...o].sort(),s=e[0],c=e[e.length-1];return`${s} ~ ${c}`}),W=o=>{p.getChartInstance()&&(p.setSelectedSeriesIndex(o),p.updateChart())},G=o=>{var s;if(!o)return;const e=(s=p.historyCache)==null?void 0:s.get(o);e&&(p.chartData=e,p.updateChart())},J=()=>{const o=p.getChartInstance();if(!o)return;const e=o.getDataURL({type:"png",pixelRatio:2,backgroundColor:x.value.bgColor}),s=document.createElement("a");s.download=`指标时序演变曲线_${new Date().getTime()}.png`,s.href=e,s.click()},E=t.ref(null);t.computed(()=>{var s,c;if(!E.value)return null;const e=((c=(((s=f.conf)==null?void 0:s.data)||[])[0])==null?void 0:c.fvDeviceName)||"deviceId";return E.value[e]||E.value.deviceId||E.value.name||"未知设备"});const K=o=>{var u;if(!w||!o||f.mode!=="preview")return;const e=p.getCurrentObjectId();if(e===o)return;console.log(`[timeSeries] 切换订阅: ${e} → ${o}`),p.setCurrentObjectId(o);const s=((u=f.conf)==null?void 0:u.data)||[],c=A(V({},f.conf),{data:s.map(n=>A(V({},n),{object_id:o}))}),r=oe.formatRequest(c,f.uid,"timeSeries");w.registerComponent({id:f.conf.id,request:r,onUpdate:(n,a)=>{n==="realtime"?p.setSocketData(a):n==="history"&&p.setHistoryData(a)}})},Z=o=>{var h;if(!o||!o.topic||!o.payload){console.warn("[timeSeries] 收到格式错误的事件:",o);return}const{topic:e,payload:s}=o,c=x.value.linkChannel;if(e.channel!==c){console.warn(`[timeSeries] 频道不匹配: 期望 ${c}, 收到 ${e.channel}`);return}const{objectId:r,deviceId:u}=s,n=f.conf,a=(n==null?void 0:n.data)||[],d=(n==null?void 0:n.common)||{};if(a.length>0&&!(d!=null&&d.multiObject)){const i=se.getObjectId(d,d==null?void 0:d.useAlias,f.uid)||((h=a[0])==null?void 0:h.object_id),m=r||(s==null?void 0:s.object_id);if(i&&m&&String(i)!==String(m))return}console.log("[timeSeries] 收到联动事件:",{topic:{channel:e.channel,source:e.source,time:e.time,uniqueId:e.uniqueId},payload:s}),E.value=A(V({},s),{_topic:e});let l=null;r&&(l=a.find(i=>String(i.object_id)===String(r))),!l&&u&&(l=a.find(i=>i.deviceId===u||i.name===u)),l&&s?(console.log(`[timeSeries] 匹配 object_id=${r}`),B(s)):s&&B(s),r&&K(r)},B=o=>{var u,n,a;const e=p.getChartInstance();if(!e)return;const s=((u=f.conf)==null?void 0:u.data)||[],c=((n=s[0])==null?void 0:n.fv)||"cumulativePrecipitation",r=((a=s[1])==null?void 0:a.fv)||"realtimePrecipitation";if(o.data&&Array.isArray(o.data)){const d=[],l=[],h=[];o.data.forEach(i=>{i.time&&(d.push(i.time),l.push(i[c]||0),h.push(i[r]||0))}),e.setOption({xAxis:[{data:d}],series:[{data:l},{data:h}]})}};return t.watch(()=>f.conf,()=>{p.init()},{deep:!0}),t.onMounted(()=>{p.init()}),t.onUnmounted(()=>{p.cleanup()}),(o,e)=>{const s=T.ElOption,c=T.ElSelect,r=T.ElIcon,u=T.ElButton;return t.openBlock(),t.createElementBlock("div",{class:"time-series-wrapper",style:t.normalizeStyle(H.value)},[t.createElementVNode("div",le,[t.createElementVNode("div",re,[t.createElementVNode("span",ce,t.toDisplayString(t.unref(x).title),1),$.value&&q.value?(t.openBlock(),t.createElementBlock("span",ue,t.toDisplayString(q.value),1)):t.createCommentVNode("",!0),I.value.length?(t.openBlock(),t.createBlock(c,{key:1,modelValue:O.value,"onUpdate:modelValue":e[0]||(e[0]=n=>O.value=n),placeholder:"选择时间",size:"small",class:"time-select",onChange:G},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.value,n=>(t.openBlock(),t.createBlock(s,{key:n,label:n,value:n},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",de,[t.createVNode(c,{modelValue:_.value,"onUpdate:modelValue":e[1]||(e[1]=n=>_.value=n),placeholder:"选择指标",size:"small",multiple:"","collapse-tags":"",class:"indicator-select",onChange:W},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value,n=>(t.openBlock(),t.createBlock(s,{key:n.value,label:n.label,value:n.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),t.createVNode(u,{size:"small",onClick:J,class:"export-btn"},{default:t.withCtx(()=>[t.createVNode(r,null,{default:t.withCtx(()=>[t.createVNode(t.unref(ie.Download))]),_:1}),e[2]||(e[2]=t.createTextVNode(" 导出图像 ",-1))]),_:1})])]),t.createElementVNode("div",he,[t.createElementVNode("div",{id:t.unref(F),class:"chart-container"},null,8,fe)]),t.renderSlot(o.$slots,"default",{},void 0,!0)],4)}}})),De=ae._export_sfc(be,[["__scopeId","data-v-8bae15ca"]]);exports.default=De;
@@ -35,8 +35,8 @@ import "element-plus/es/components/icon/style/css";
35
35
  import { defineComponent as ke, ref as O, computed as b, onMounted as Me, onBeforeUnmount as Oe, watch as Ie, openBlock as A, createElementBlock as B, normalizeStyle as oe, createElementVNode as y, toDisplayString as H, createVNode as x, withCtx as R, normalizeClass as Ee, unref as ne, createBlock as je, Teleport as Ae, withDirectives as Te, withModifiers as se, Fragment as Ne, renderList as Le, vShow as Ve, createTextVNode as Be, renderSlot as He } from "vue";
36
36
  import { u as Re } from "./vue-i18n-5Nahpzrm.js";
37
37
  import { ArrowDown as ze } from "@element-plus/icons-vue";
38
- import { e as I, _ as We } from "./index-C8teBAQd.js";
39
- import { E as $e } from "./EChartComponentBase-CQYZ0922.js";
38
+ import { e as I, _ as We } from "./index-LgTfdmT4.js";
39
+ import { E as $e } from "./EChartComponentBase-CafVdj74.js";
40
40
  import { A as Fe, D as Ze } from "./ele-vlu-icon-Bg6EHZdJ.js";
41
41
  const Pe = { class: "chart-header" }, Ue = { class: "chart-title" }, Ye = { class: "chart-actions" }, qe = ["onClick"], Ge = { class: "item-label" }, Je = ["id"], Ke = {
42
42
  DEFAULT_ICON: Ze,
@@ -278,7 +278,7 @@ const Pe = { class: "chart-header" }, Ue = { class: "chart-title" }, Ye = { clas
278
278
  f.object_id = n;
279
279
  }), i.multiObject || (i.object_id = n);
280
280
  try {
281
- const f = yield import("./history-oKCbbOLM.js"), C = yield new f.default().getHistoryData(s, "timeSeriesCurve");
281
+ const f = yield import("./history-DH68UK_U.js"), C = yield new f.default().getHistoryData(s, "timeSeriesCurve");
282
282
  C && Array.isArray(C) && a.forEach((D, fe) => {
283
283
  if (!D.fv) return;
284
284
  const j = C[fe], G = (j == null ? void 0 : j.data) || j;