mixdashboards 1.0.39 → 1.0.43
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.
- package/dist/{EChartComponentBase-BaQpBzVC.cjs → EChartComponentBase-BChD1X2l.cjs} +1 -1
- package/dist/{EChartComponentBase-BQOhWkz2.js → EChartComponentBase-tSVuV5H3.js} +1 -1
- package/dist/{UniverSheet-KlvmL1Yw.cjs → UniverSheet-DxPYELl0.cjs} +1 -1
- package/dist/{UniverSheet-MSHzUXq0.js → UniverSheet-ZGig1_Pu.js} +2 -2
- package/dist/{accelerationChart-DZj2V2vD.cjs → accelerationChart-BU01FhLB.cjs} +1 -1
- package/dist/{accelerationChart-B1HPMmd2.js → accelerationChart-uPXXAoIX.js} +3 -3
- package/dist/{actionItem-Bb2xiYlY.js → actionItem-Cto59Uxi.js} +3 -3
- package/dist/{actionItem-BYCPoQK7.cjs → actionItem-Ds004yWK.cjs} +1 -1
- package/dist/{alarmLevelChart-CCioESvL.js → alarmLevelChart-Bxhp_1Yh.js} +2 -2
- package/dist/{alarmLevelChart-Bb0mAbwQ.cjs → alarmLevelChart-pquXuv2m.cjs} +1 -1
- package/dist/{alertTable-CQwr8YYt.js → alertTable-BmHTGwvG.js} +2 -2
- package/dist/{alertTable-oaX5eJC0.cjs → alertTable-C8POEEmf.cjs} +1 -1
- package/dist/{annualRainfallChart-C21jEMBe.js → annualRainfallChart-BgKPNPJQ.js} +2 -2
- package/dist/{annualRainfallChart-pO8q6aUJ.cjs → annualRainfallChart-CEy_57N0.cjs} +1 -1
- package/dist/{api-P_s372dW.cjs → api-B54Z00Zb.cjs} +1 -1
- package/dist/{api-C0GhBpqd.js → api-Cug1klvp.js} +4 -4
- package/dist/{aqi-DlY2r7OA.cjs → aqi-XOaZyAYC.cjs} +1 -1
- package/dist/{aqi-iLwQH4rc.js → aqi-_FjN7mXi.js} +10 -10
- package/dist/{aqiIndass-BaIVBfdC.cjs → aqiIndass-BT4xpq07.cjs} +1 -1
- package/dist/{aqiIndass-DBeVSBdy.js → aqiIndass-LrPuO3hk.js} +15 -15
- package/dist/arrayCard-CxQt6Fpt.js +94 -0
- package/dist/arrayCard-I0242qBp.cjs +1 -0
- package/dist/{audio-CAP4D-J2.js → audio-Ca_jh1Ry.js} +5 -5
- package/dist/{audio-CThzVIDU.cjs → audio-Ci8MfRFp.cjs} +1 -1
- package/dist/{bar-BjR566__.cjs → bar-B2qbk8Xs.cjs} +1 -1
- package/dist/{bar-D8C06GO4.js → bar-OCOTqPHY.js} +4 -4
- package/dist/{bmp-Cjizh2x6.js → bmp-CLiSfyAx.js} +3 -3
- package/dist/{bmp-DsmTzyce.cjs → bmp-DSOZL3Ws.cjs} +1 -1
- package/dist/{box-qgu_67OD.cjs → box-CSAC2nll.cjs} +1 -1
- package/dist/{box-DqewT3MF.js → box-Dfiea0UY.js} +2 -2
- package/dist/{chartConfigPanel-DwAUq3pf.js → chartConfigPanel-DNyg08bW.js} +1 -1
- package/dist/{chartConfigPanel-BiQArCoQ.cjs → chartConfigPanel-MmXLFF3s.cjs} +1 -1
- package/dist/{circleBar-CO89T7kj.cjs → circleBar-BTodjF_P.cjs} +1 -1
- package/dist/{circleBar-DGHDWQih.js → circleBar-jvdZW67Y.js} +8 -8
- package/dist/{clock-32hGccm4.cjs → clock-BvUgA4hU.cjs} +1 -1
- package/dist/{clock-CT8YXEU3.js → clock-IOEnD1FR.js} +2 -2
- package/dist/{clt-FfIEfGtn.js → clt-C0J-U9U2.js} +3 -3
- package/dist/{clt-5bP_g1O-.cjs → clt-CqVfBGgu.cjs} +1 -1
- package/dist/{cmc-dbuLkE8o.cjs → cmc-CpaXOsS7.cjs} +1 -1
- package/dist/{cmc-B2nQFZIS.js → cmc-D0_Qv6Zs.js} +3 -3
- package/dist/{cmp-QQlYcnqo.js → cmp-BDgmsQWa.js} +12 -12
- package/dist/{cmp-l3U9fIrz.cjs → cmp-BU9ix80c.cjs} +1 -1
- package/dist/{composite-DlY2_x6P.cjs → composite-BHFoRAhK.cjs} +1 -1
- package/dist/{composite-DjhrBgG1.js → composite-Daajjrh1.js} +8 -8
- package/dist/config-D3MEjLGn.js +9 -0
- package/dist/config-UTUPYJ45.cjs +1 -0
- package/dist/{controlList-BdF8xNAi.js → controlList-OYiF483D.js} +3 -3
- package/dist/{controlList-De6PXdOc.cjs → controlList-PkvqGwS5.cjs} +1 -1
- package/dist/{controlRecordList-u5a7chIX.cjs → controlRecordList-BaJdGodA.cjs} +1 -1
- package/dist/{controlRecordList-CKpAr1ON.js → controlRecordList-pzonY5_g.js} +3 -3
- package/dist/{crd-BoaXQhFQ.cjs → crd-CgatCwuM.cjs} +1 -1
- package/dist/{crd-BVAf41oX.js → crd-Vjh_CNX2.js} +2 -2
- package/dist/{ctrBtn-ZPRYWE66.js → ctrBtn-CSuW7u1a.js} +4 -4
- package/dist/{ctrBtn-C9kQiqY1.cjs → ctrBtn-CjMIOEud.cjs} +1 -1
- package/dist/{ctrSet-CNCrnLSs.cjs → ctrSet-CNfIgsND.cjs} +1 -1
- package/dist/{ctrSet-C87dxLfQ.js → ctrSet-CpKA4FWL.js} +4 -4
- package/dist/{ctrSwitch-CkC_Axtp.js → ctrSwitch-BPCp-27u.js} +4 -4
- package/dist/{ctrSwitch-CVEtbdfb.cjs → ctrSwitch-DNLZ2RDv.cjs} +1 -1
- package/dist/{dataManagement-CjlNfeYq.js → dataManagement-kLivh0Wo.js} +2 -2
- package/dist/{dataManagement-n711sd1g.cjs → dataManagement-tU6uKtEj.cjs} +1 -1
- package/dist/{dataReport-BsVjW3p7.cjs → dataReport-D7g7U1Mk.cjs} +1 -1
- package/dist/{dataReport-ByjswEqq.js → dataReport-DKIWxloF.js} +2 -2
- package/dist/{dataTable-K7j4fhnq.cjs → dataTable-BHlNGT3A.cjs} +1 -1
- package/dist/{dataTable-DX500R1i.js → dataTable-Ch3UyUHs.js} +1 -1
- package/dist/{datetime-DYXWKrXI.cjs → datetime-CGgW1_vl.cjs} +1 -1
- package/dist/{datetime-DVbJtALf.js → datetime-Cyg8Xaoh.js} +2 -2
- package/dist/{deepClusterSlipSurface-B7nkEM9A.cjs → deepClusterSlipSurface-CN_WZFnF.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-CQUE05cK.js → deepClusterSlipSurface-D4PhBTV3.js} +6 -6
- package/dist/{deepDataMatrix-DHZA0IAm.cjs → deepDataMatrix-DrQ1_-Ie.cjs} +1 -1
- package/dist/{deepDataMatrix-ai5rB6ET.js → deepDataMatrix-v5op9TPA.js} +2 -2
- package/dist/{deepDisplacement3D-BFqKqSYg.cjs → deepDisplacement3D--kNKCZIe.cjs} +1 -1
- package/dist/{deepDisplacement3D-BsUzvbQb.js → deepDisplacement3D-COaSjPeE.js} +3 -3
- package/dist/{deepDisplacementChart-2JZNrhrw.cjs → deepDisplacementChart-C9SjfW9d.cjs} +1 -1
- package/dist/{deepDisplacementChart-igl4rW1K.js → deepDisplacementChart-CrQDLDLG.js} +2 -2
- package/dist/{deepDisplacementChart-BCIuCMdK.js → deepDisplacementChart-CuH2f1nn.js} +4 -4
- package/dist/{deepDisplacementChart-Ba67v6um.cjs → deepDisplacementChart-DcpBhevd.cjs} +1 -1
- package/dist/{deepDisplacementView-wQxyKzB-.cjs → deepDisplacementView-CZrY99uX.cjs} +1 -1
- package/dist/{deepDisplacementView-BedWJsx7.js → deepDisplacementView-D7lYRm9Y.js} +1 -1
- package/dist/{deepNodeTemperatureChart-albL8hKa.cjs → deepNodeTemperatureChart-CxzgoQXA.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-DLeb9jKp.js → deepNodeTemperatureChart-DfR4tUqO.js} +6 -6
- package/dist/{deepTangentAngleChart-DukevXaM.cjs → deepTangentAngleChart-B8WNZAJe.cjs} +1 -1
- package/dist/{deepTangentAngleChart-C6xOiITk.js → deepTangentAngleChart-CVjnZrOJ.js} +7 -7
- package/dist/{deepTemperatureField-De4xKoHw.cjs → deepTemperatureField-CUfAJ9UM.cjs} +1 -1
- package/dist/{deepTemperatureField-B-y94GPV.js → deepTemperatureField-Do6-blr7.js} +7 -7
- package/dist/{deepTrendChart-DCkV2HNv.js → deepTrendChart-BP2CKFYM.js} +6 -6
- package/dist/{deepTrendChart-MmuYSXtu.cjs → deepTrendChart-DtFP9z8x.cjs} +1 -1
- package/dist/{deviceOnlineStatus-CFuCTx7_.js → deviceOnlineStatus-D6bULBvw.js} +2 -2
- package/dist/{deviceOnlineStatus-B5cCjhNA.cjs → deviceOnlineStatus-DTKqM11O.cjs} +1 -1
- package/dist/{deviceStatus-DsEtKiGo.cjs → deviceStatus-B6OKoKq-.cjs} +1 -1
- package/dist/{deviceStatus-B2ibBDSi.js → deviceStatus-DJYGmb17.js} +2 -2
- package/dist/{displacementDataTable-oLnUdafv.cjs → displacementDataTable-DDG2INsm.cjs} +1 -1
- package/dist/{displacementDataTable-BDqG1IvI.js → displacementDataTable-uRgXH0CK.js} +2 -2
- package/dist/{displacementTrajectoryChart-Crf55oKi.js → displacementTrajectoryChart-CEiKrhq1.js} +3 -3
- package/dist/{displacementTrajectoryChart-CBhPwZhe.cjs → displacementTrajectoryChart-CurD1AeO.cjs} +1 -1
- package/dist/{displacementTrendChart-10n_lC9j.js → displacementTrendChart-Cc_3vfUE.js} +2 -2
- package/dist/{displacementTrendChart-CWihCuIJ.cjs → displacementTrendChart-DVa6z4Nl.cjs} +1 -1
- package/dist/{dxf-D8zHpz5g.js → dxf-BVAbI2Re.js} +5 -5
- package/dist/{dxf-DDh_DcQy.cjs → dxf-D4bSvrFx.cjs} +1 -1
- package/dist/{dzc-DLCdTCwW.js → dzc-CP27H3cb.js} +10 -10
- package/dist/{dzc-uNTDJqpi.cjs → dzc-fP5m-jgn.cjs} +1 -1
- package/dist/{arrayCard-DNNUEPvW.js → ele-arrayCard-icon-CAk9ojr4.js} +3 -91
- package/dist/ele-arrayCard-icon-QOabvV0y.cjs +1 -0
- package/dist/{element-resize-detector-DJcsrJ8s.js → element-resize-detector-CcMj2at_.js} +419 -412
- package/dist/element-resize-detector-Dv3K8Mdu.cjs +6 -0
- package/dist/{evn-YwCALVXj.js → evn-Ce6AYrxO.js} +2 -2
- package/dist/{evn-DuL5oVRl.cjs → evn-CyEggAn9.cjs} +1 -1
- package/dist/{evolutionChart-AeL67MAt.cjs → evolutionChart-CMRBPKKA.cjs} +1 -1
- package/dist/{evolutionChart-4noZSdLX.js → evolutionChart-D74KWOt_.js} +3 -3
- package/dist/{fileViewer-DiH3PM0r.js → fileViewer-FWpbKEm_.js} +5 -5
- package/dist/{fileViewer-bsrjlJkC.cjs → fileViewer-HmsHvQbe.cjs} +1 -1
- package/dist/{filterBar-Ct1BFhrS.cjs → filterBar-BGqSr_Gz.cjs} +1 -1
- package/dist/{filterBar-CWEguwYc.js → filterBar-SwG99EqD.js} +2 -2
- package/dist/{fireCombustionCurve-DYPC4zKJ.js → fireCombustionCurve-CK9bbLYm.js} +2 -2
- package/dist/{fireCombustionCurve-DyiQn-WA.cjs → fireCombustionCurve-DGYg2Zz7.cjs} +1 -1
- package/dist/{fireFilterBar-Bdm2ljuO.cjs → fireFilterBar-BUdbOHbv.cjs} +1 -1
- package/dist/{fireFilterBar-DGHPNTwF.js → fireFilterBar-Dv4oMV2C.js} +2 -2
- package/dist/{gag-HiNaL81R.cjs → gag-DV4cygUt.cjs} +1 -1
- package/dist/{gag-kvkKzJuO.js → gag-eTRNcrqU.js} +5 -5
- package/dist/gasStationList-DNIbWG_P.cjs +1 -0
- package/dist/gasStationList-Dq4JF7HM.js +984 -0
- package/dist/{glbModel-DtBI72ap.cjs → glbModel-BEB3-OkB.cjs} +1 -1
- package/dist/{glbModel-CUz6CyVF.js → glbModel-DXwR8B8M.js} +2 -2
- package/dist/{gnssFilterBar-TBtirXIB.js → gnssFilterBar-B6A4lUyp.js} +2 -2
- package/dist/{gnssFilterBar-BQgY5x1W.cjs → gnssFilterBar-Diqwq6NT.cjs} +1 -1
- package/dist/{gnssHistoryTable-D1ZLJOgh.cjs → gnssHistoryTable-Bn_PcTYz.cjs} +1 -1
- package/dist/{gnssHistoryTable-U8O7nyO7.js → gnssHistoryTable-DYgh7vSR.js} +3 -3
- package/dist/{gnssMapView-42zmAd9q.cjs → gnssMapView-C4nMl0TP.cjs} +1 -1
- package/dist/{gnssMapView-CaBfWeT1.js → gnssMapView-g7D0pOjL.js} +2 -2
- package/dist/{gnssTimeSeriesChart-CV2w_Aik.cjs → gnssTimeSeriesChart-DeQ-wByR.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-BrXYvuh6.js → gnssTimeSeriesChart-hQbteX4L.js} +4 -4
- package/dist/{gnssXYTrajectory-BmzSYjQ_.cjs → gnssXYTrajectory-B_e7j8rL.cjs} +1 -1
- package/dist/{gnssXYTrajectory-D2DoYnze.js → gnssXYTrajectory-lvuXN9lD.js} +3 -3
- package/dist/{grd-DW8cSFVR.cjs → grd-Cue6pwOG.cjs} +1 -1
- package/dist/{grd-B0GUjLm9.js → grd-p61RCI9f.js} +3 -3
- package/dist/{grdIndass-DduUKZJm.js → grdIndass-B7h2b6uM.js} +3 -3
- package/dist/{grdIndass-BeBXVsos.cjs → grdIndass-C7cig5jz.cjs} +1 -1
- package/dist/{grg-fnpcXtju.cjs → grg-CuoOAf0S.cjs} +1 -1
- package/dist/{grg-CeX0pirQ.js → grg-duDSzJwQ.js} +6 -6
- package/dist/{gridview-DpABhCIw.cjs → gridview-B73KnYlW.cjs} +1 -1
- package/dist/{gridview-BPwWXza9.js → gridview-CSJXmPgO.js} +2 -2
- package/dist/{groupCard-De1E15mW.js → groupCard-DPlcY3KM.js} +2 -2
- package/dist/{groupCard-WNE6gAAl.cjs → groupCard-DbuFpUy_.cjs} +1 -1
- package/dist/{headerBar-CZ3qcLHo.js → headerBar-CNX5OgJJ.js} +3 -3
- package/dist/{headerBar-Qi1EXrr6.cjs → headerBar-ntCC3TG_.cjs} +1 -1
- package/dist/history-BKlOuH9N.cjs +1 -0
- package/dist/{history-BkZhlpdY.js → history-DDhjCbfn.js} +60 -57
- package/dist/{index-kShjySl9.js → index-DCD0sVkl.js} +1047 -1065
- package/dist/index-p4bdBANg.cjs +582 -0
- package/dist/{insarDeformChart-CnuSL1d9.js → insarDeformChart-BUpCXYTi.js} +2 -2
- package/dist/{insarDeformChart-BGr2xe7w.cjs → insarDeformChart-DWjpCTST.cjs} +1 -1
- package/dist/{insarImageViewer-EmVThmVQ.js → insarImageViewer-3jC7sm-N.js} +2 -2
- package/dist/{insarImageViewer-DRgGdQmN.cjs → insarImageViewer-DBouC3bG.cjs} +1 -1
- package/dist/{kds-CpIQFgeY.js → kds-B8Eb8A5z.js} +10 -10
- package/dist/{kds-DTYWOq4K.cjs → kds-BbHwPepp.cjs} +1 -1
- package/dist/{layerTabs-BATcBkTA.cjs → layerTabs-D7I2t951.cjs} +1 -1
- package/dist/{layerTabs-uze6K91A.js → layerTabs-DyEqHH1_.js} +2 -2
- package/dist/{lin-DU_EuPRg.js → lin-BnBuwG1p.js} +8 -8
- package/dist/{lin-Ba6fHkYf.cjs → lin-Co2eyQYR.cjs} +1 -1
- package/dist/{linIndass-urYe5inp.cjs → linIndass-BI56prH5.cjs} +1 -1
- package/dist/{linIndass-XHKElG7L.js → linIndass-D440bglm.js} +7 -7
- package/dist/{lst-CpmoEQDY.cjs → lst-CyOeVUwG.cjs} +1 -1
- package/dist/{lst-C7aee1cU.js → lst-DJ70Qm0_.js} +2 -2
- package/dist/{manualEntry-CJPiO5nh.cjs → manualEntry-DIRgJo2n.cjs} +1 -1
- package/dist/{manualEntry-D9m_WPw3.js → manualEntry-w-qfhXMO.js} +2 -2
- package/dist/{mapBackground-CF_TqNBy.cjs → mapBackground-B29Oe6LE.cjs} +1 -1
- package/dist/{mapBackground-6g_71Fwa.js → mapBackground-CPjs_j_-.js} +2 -2
- package/dist/{mappingList-luT5YE0d.js → mappingList-B40O99li.js} +3 -3
- package/dist/{mappingList-CR55Tq4t.cjs → mappingList-DbnBjHp6.cjs} +1 -1
- package/dist/{markdownViewer-CnguoUr8.js → markdownViewer-Bx2It9sV.js} +5 -5
- package/dist/{markdownViewer-D1hDk2Y7.cjs → markdownViewer-CLkqzacw.cjs} +1 -1
- package/dist/{mix-control-modal-BDHAB4Tw.cjs → mix-control-modal-CMieJ_yd.cjs} +1 -1
- package/dist/{mix-control-modal-CHiX3hQs.js → mix-control-modal-OWpKWsS0.js} +3 -3
- package/dist/{mixDataPermission-BaqV0Z6N.js → mixDataPermission-Et2y1ZNV.js} +4 -3
- package/dist/{mixDataPermission-BTA1jNd1.cjs → mixDataPermission-wcr14h4V.cjs} +1 -1
- package/dist/{mixGrid-3BqQCvg8.cjs → mixGrid-D3cGrQ1G.cjs} +1 -1
- package/dist/{mixGrid-C0eEvwPy.js → mixGrid-DZyLbs2L.js} +3 -3
- package/dist/{mixMap-Bw-We4Cm.cjs → mixMap-CZijD9Wl.cjs} +1 -1
- package/dist/{mixMap-7upgYwWk.js → mixMap-CvcH9tWH.js} +3 -3
- package/dist/{mixModel-CgV4XptM.cjs → mixModel-C7jP0OTI.cjs} +1 -1
- package/dist/{mixModel-BqE_Kd4c.js → mixModel-Cb9jZGgU.js} +10 -10
- package/dist/{mixPie-9LfMCTQV.cjs → mixPie-DaVnghMR.cjs} +1 -1
- package/dist/{mixPie-B-HeglUn.js → mixPie-Xl9q3aeM.js} +7 -7
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +1 -1
- package/dist/{mjpegCamera-nxKfhobY.cjs → mjpegCamera-B4DGYk-6.cjs} +1 -1
- package/dist/{mjpegCamera-Cfw3rzT5.js → mjpegCamera-Bur1zDjR.js} +2 -2
- package/dist/{monitorAlert-Bt0baNh4.cjs → monitorAlert-BEeF7aKG.cjs} +1 -1
- package/dist/{monitorAlert-Bg5vzzyG.js → monitorAlert-DTtkf40Q.js} +2 -2
- package/dist/{monitorData-CzPVIk_4.cjs → monitorData-CxUmxh7h.cjs} +1 -1
- package/dist/{monitorData-BvAMeOrp.js → monitorData-DJOo9Mmf.js} +3 -3
- package/dist/{monitorSpeedChart-0bDuU3Kj.js → monitorSpeedChart-BC2X02Sb.js} +1 -1
- package/dist/{monitorSpeedChart-C52QjA5K.cjs → monitorSpeedChart-CNoRIuP1.cjs} +1 -1
- package/dist/{mxa-BW80xKCc.js → mxa-BN75OPFt.js} +7 -7
- package/dist/{mxa-eLAgZPMC.cjs → mxa-BxzaaRQF.cjs} +1 -1
- package/dist/myValue-CNORsNDC.js +149 -0
- package/dist/myValue-DFkdFmlD.cjs +1 -0
- package/dist/myValueList-CBMG0eWA.js +451 -0
- package/dist/myValueList-CjBLDJYH.cjs +1 -0
- package/dist/objectList-DFhu-fz0.cjs +1 -0
- package/dist/{objectList-Cf9GMyXN.js → objectList-bNg216p9.js} +575 -623
- package/dist/photo-DigmnVvl.js +342 -0
- package/dist/photo-kfRZAysa.cjs +1 -0
- package/dist/{pie-DxoBrm0D.cjs → pie-84DfqS1S.cjs} +1 -1
- package/dist/{pie-BDLg-Rls.js → pie-DTt2sFrk.js} +7 -7
- package/dist/{pressBtn-t0g4vk7s.cjs → pressBtn-DDIIdhOz.cjs} +1 -1
- package/dist/{pressBtn-CXG1eSWC.js → pressBtn-DDffBSTH.js} +4 -4
- package/dist/{progressBar-BXaFKSCq.js → progressBar-BBXjT_1K.js} +2 -2
- package/dist/{progressBar-CJEWkZ42.cjs → progressBar-T-y989f-.cjs} +1 -1
- package/dist/{progressCircle-DpOI5D5z.js → progressCircle-CTl5sua8.js} +2 -2
- package/dist/{progressCircle-uQ7vaMKM.cjs → progressCircle-Dr9rGPdw.cjs} +1 -1
- package/dist/qrcode-B_s5tsz3.cjs +1 -0
- package/dist/{qrcode-CX8aymYZ.js → qrcode-kk5QYwXg.js} +297 -298
- package/dist/{raceBar-DFaH342G.js → raceBar-LWP50Esm.js} +7 -7
- package/dist/{raceBar-Cv0-0ogd.cjs → raceBar-l_09Yq2I.cjs} +1 -1
- package/dist/{rad-NS2G_nMg.js → rad-B78foPbg.js} +7 -7
- package/dist/{rad-CFswUTwi.cjs → rad-q5w7s5OW.cjs} +1 -1
- package/dist/{rainfallFilterBar-D_Ye_NeB.js → rainfallFilterBar-CgLsQ-bP.js} +2 -2
- package/dist/{rainfallFilterBar-BI45QvJm.cjs → rainfallFilterBar-Df3KQ_ZM.cjs} +1 -1
- package/dist/{rainfallTimeCurve-BHWqX47Q.js → rainfallTimeCurve-B2QbnKYR.js} +3 -3
- package/dist/{rainfallTimeCurve-Ke1JvSWq.cjs → rainfallTimeCurve-C7Pyp1yx.cjs} +1 -1
- package/dist/{rangeLin-D6VZ2U3C.cjs → rangeLin-54P6A-H6.cjs} +1 -1
- package/dist/{rangeLin-GMYEgLeP.js → rangeLin-lsD1Tb23.js} +7 -7
- package/dist/{request-Bn100qAJ.cjs → request-Bkzlbfat.cjs} +1 -1
- package/dist/{request-BD0x5Hkt.js → request-DvQqpxzM.js} +1 -1
- package/dist/{retainer1-h-Whr2c9.js → retainer1-G4qdYcqG.js} +3 -3
- package/dist/{retainer1-D2XmjXYH.cjs → retainer1-LbRL0Bvk.cjs} +1 -1
- package/dist/{retainer2-ByQdiRjq.js → retainer2-DcNWAHtE.js} +3 -3
- package/dist/{retainer2-cF-trL2g.cjs → retainer2-DfFMVUdl.cjs} +1 -1
- package/dist/{riskRegionTable-CQxAkG7k.js → riskRegionTable-CIlOa9cB.js} +2 -2
- package/dist/{riskRegionTable-cKnxra4_.cjs → riskRegionTable-WR6ex2Hi.cjs} +1 -1
- package/dist/{sankey-MRirEgU0.cjs → sankey-BWpsoIQq.cjs} +1 -1
- package/dist/{sankey-Bk1IcVJQ.js → sankey-DU5yTv0d.js} +9 -9
- package/dist/{scd-J-mN3eI5.cjs → scd-D_1G2sMH.cjs} +1 -1
- package/dist/{scd-BDRpzmsa.js → scd-s1R4ArEA.js} +2 -2
- package/dist/{sideMenu-BgTMtnMq.js → sideMenu-BLN-hmKR.js} +2 -2
- package/dist/{sideMenu-l8X2E00H.cjs → sideMenu-BXylutdD.cjs} +1 -1
- package/dist/{slopeStability-BPf7m0fJ.cjs → slopeStability-Dm3wLwov.cjs} +1 -1
- package/dist/{slopeStability-C5RqZ1im.js → slopeStability-yF4cbFAW.js} +3 -3
- package/dist/{speedCurve-C3pK-zZy.js → speedCurve-B4jL0peM.js} +3 -3
- package/dist/{speedCurve-CluwNAZl.cjs → speedCurve-Dha8_czy.cjs} +1 -1
- package/dist/{staticLine-DXWOLj15.js → staticLine-9Z3ZUOOu.js} +7 -7
- package/dist/{staticLine-C6tGGXcN.cjs → staticLine-DsOWwv03.cjs} +1 -1
- package/dist/{store-BJW2NQkK.cjs → store-B3uCwXgM.cjs} +1 -1
- package/dist/{store-DzDtVfSX.js → store-BLHqFZQd.js} +2 -2
- package/dist/{swiper-IMlGje3t.js → swiper-BdGmBriB.js} +3 -3
- package/dist/{swiper-DGqDoUkX.cjs → swiper-CXb_2mfg.cjs} +1 -1
- package/dist/{terminalConfigList-D6xDHsnb.cjs → terminalConfigList-DFzOUHe2.cjs} +1 -1
- package/dist/{terminalConfigList-SAyXi-BK.js → terminalConfigList-EQ7lagNS.js} +3 -3
- package/dist/{terminalList-ml2C18MY.cjs → terminalList-CEr-6C-6.cjs} +1 -1
- package/dist/{terminalList-CjSHshiR.js → terminalList-neZWjaQ9.js} +3 -3
- package/dist/{textbox-BLV-SY8e.js → textbox-BLzAPC0q.js} +4 -4
- package/dist/{textbox-AQtCe25j.cjs → textbox-DmOguEQU.cjs} +1 -1
- package/dist/{timeQueryBar-BeMu_DYr.js → timeQueryBar-B_xpm0AC.js} +1 -1
- package/dist/{timeQueryBar-BuKakMy8.cjs → timeQueryBar-MDyFx6rP.cjs} +1 -1
- package/dist/{timeSeries-DP5iZKVM.js → timeSeries-7SohUo9l.js} +4 -4
- package/dist/{timeSeries-DfGgFWiF.cjs → timeSeries-CaIR746Y.cjs} +1 -1
- package/dist/{timeSeriesCurve-B0Mw6eNK.cjs → timeSeriesCurve-D-PncXjY.cjs} +1 -1
- package/dist/{timeSeriesCurve-BSgtPqYw.js → timeSeriesCurve-DZBsHqsK.js} +3 -3
- package/dist/{toggleBtn-Dh64vVWo.cjs → toggleBtn--cJyh7p1.cjs} +1 -1
- package/dist/{toggleBtn-O2Y75Uen.js → toggleBtn-B2m2z1Si.js} +7 -7
- package/dist/{trajectoryConfigPanel--C1h3tK6.js → trajectoryConfigPanel-Bs-CzBAX.js} +1 -1
- package/dist/{trajectoryConfigPanel-P_Qa4omj.cjs → trajectoryConfigPanel-ChfuUbTU.cjs} +1 -1
- package/dist/{trajectoryScatter-VLrmImlq.js → trajectoryScatter-Bm2AHlY2.js} +6 -6
- package/dist/{trajectoryScatter-BbpbgNb8.cjs → trajectoryScatter-DuWUKaOg.cjs} +1 -1
- package/dist/{universalConfigPanel-C0lDSzOB.cjs → universalConfigPanel-C6dYbcUq.cjs} +1 -1
- package/dist/{universalConfigPanel-DBg76b4F.js → universalConfigPanel-D6887bDA.js} +1 -1
- package/dist/{universalTable-DGK02ywi.js → universalTable-D-Nx7-YD.js} +2 -2
- package/dist/{universalTable-Bzq9VqzA.cjs → universalTable-DPpSYgmV.cjs} +1 -1
- package/dist/{video-CyRoSQf1.cjs → video-CB2ndqns.cjs} +1 -1
- package/dist/{video-DCzzaEmV.js → video-i7fMjDsj.js} +5 -5
- package/dist/{videoMonitor-ByaQeIWR.js → videoMonitor-D_gmm8xD.js} +2 -2
- package/dist/{videoMonitor-BjD-ZFS0.cjs → videoMonitor-DjHj3jKS.cjs} +1 -1
- package/dist/{vlu-CYZjYHaV.cjs → vlu-BapGJiKV.cjs} +1 -1
- package/dist/{vlu-h-9twmCr.js → vlu-DKvcQynh.js} +2 -2
- package/dist/{weather-B7B5E1EJ.cjs → weather-CqehOpyT.cjs} +1 -1
- package/dist/{weather-C_aC0XJ1.js → weather-M9RB9i4h.js} +3 -3
- package/dist/{windLin-DPNzX7JN.cjs → windLin-BtRlE9KH.cjs} +1 -1
- package/dist/{windLin-B7V4NUV8.js → windLin-xKNNyTR0.js} +9 -9
- package/package.json +10 -9
- package/dist/arrayCard-OlVAAsZq.cjs +0 -1
- package/dist/config-BLSroAzs.cjs +0 -1
- package/dist/config-Cc2W4vke.js +0 -9
- package/dist/element-resize-detector-Bo5uDQAu.cjs +0 -6
- package/dist/history-DAmBl4_5.cjs +0 -1
- package/dist/index-Mh5Dw2sd.cjs +0 -585
- package/dist/objectList-CpqQxG8L.cjs +0 -1
- package/dist/photo-BODEtaYh.cjs +0 -1
- package/dist/photo-BfLkWAo8.js +0 -256
- package/dist/qrcode-DHCRfp0M.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-
|
|
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-Dv3K8Mdu.cjs"),Z=require("./index-p4bdBANg.cjs"),v=require("./config-UTUPYJ45.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 +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-Bo5uDQAu.cjs"),xe=require("./index-Mh5Dw2sd.cjs"),Ne=require("./titleStyle-NSnz6cUg.cjs"),d=require("element-plus"),_e=require("@element-plus/icons-vue"),E=require("./api-P_s372dW.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-Dv3K8Mdu.cjs"),xe=require("./index-p4bdBANg.cjs"),Ne=require("./titleStyle-NSnz6cUg.cjs"),d=require("element-plus"),_e=require("@element-plus/icons-vue"),E=require("./api-B54Z00Zb.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;
|
|
@@ -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-
|
|
47
|
-
import { _ as lt } from "./index-
|
|
46
|
+
import { B as tt } from "./element-resize-detector-CcMj2at_.js";
|
|
47
|
+
import { _ as lt } from "./index-DCD0sVkl.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-
|
|
51
|
+
import { a as T } from "./api-Cug1klvp.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 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-Bo5uDQAu.cjs"),De=require("./index-Mh5Dw2sd.cjs"),Ae=require("./titleStyle-NSnz6cUg.cjs"),u=require("element-plus"),Me=require("@element-plus/icons-vue"),C=require("./api-P_s372dW.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-Dv3K8Mdu.cjs"),De=require("./index-p4bdBANg.cjs"),Ae=require("./titleStyle-NSnz6cUg.cjs"),u=require("element-plus"),Me=require("@element-plus/icons-vue"),C=require("./api-B54Z00Zb.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-
|
|
48
|
-
import { _ as ct } from "./index-
|
|
47
|
+
import { B as mt } from "./element-resize-detector-CcMj2at_.js";
|
|
48
|
+
import { _ as ct } from "./index-DCD0sVkl.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-
|
|
52
|
+
import { a as L } from "./api-Cug1klvp.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,
|
|
@@ -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-
|
|
32
|
-
import { _ as ae } from "./index-
|
|
33
|
-
import { F as W } from "./config-
|
|
31
|
+
import { B as re } from "./element-resize-detector-CcMj2at_.js";
|
|
32
|
+
import { _ as ae } from "./index-DCD0sVkl.js";
|
|
33
|
+
import { F as W } from "./config-D3MEjLGn.js";
|
|
34
34
|
import { ElMessage as g } from "element-plus";
|
|
35
|
-
import { a as oe } from "./api-
|
|
35
|
+
import { a as oe } from "./api-Cug1klvp.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 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-
|
|
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-Dv3K8Mdu.cjs"),Y=require("./index-p4bdBANg.cjs"),P=require("./config-UTUPYJ45.cjs"),g=require("element-plus"),Z=require("./api-B54Z00Zb.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;
|
|
@@ -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, d as $, _ as G } from "./index-
|
|
20
|
+
import { u as q, d as $, _ as G } from "./index-DCD0sVkl.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,
|
|
@@ -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-
|
|
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-p4bdBANg.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;
|
|
@@ -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-
|
|
22
|
-
import { _ as Ie } from "./index-
|
|
23
|
-
import { E as Oe } from "./EChartComponentBase-
|
|
24
|
-
import { formatRequest as ke } from "./request-
|
|
21
|
+
import { d as xe } from "./element-resize-detector-CcMj2at_.js";
|
|
22
|
+
import { _ as Ie } from "./index-DCD0sVkl.js";
|
|
23
|
+
import { E as Oe } from "./EChartComponentBase-tSVuV5H3.js";
|
|
24
|
+
import { formatRequest as ke } from "./request-DvQqpxzM.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-
|
|
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-Dv3K8Mdu.cjs"),ae=require("./index-p4bdBANg.cjs"),ne=require("./EChartComponentBase-BChD1X2l.cjs"),oe=require("./request-Bkzlbfat.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;
|