mixdashboards 1.0.39 → 1.0.40
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-BTqBoBn8.cjs} +1 -1
- package/dist/{EChartComponentBase-BQOhWkz2.js → EChartComponentBase-GBbKjtlb.js} +1 -1
- package/dist/{UniverSheet-KlvmL1Yw.cjs → UniverSheet-B9dCqA-W.cjs} +1 -1
- package/dist/{UniverSheet-MSHzUXq0.js → UniverSheet-DIkltx8i.js} +2 -2
- package/dist/{accelerationChart-B1HPMmd2.js → accelerationChart-B7grHeml.js} +3 -3
- package/dist/{accelerationChart-DZj2V2vD.cjs → accelerationChart-CvNoIyue.cjs} +1 -1
- package/dist/{actionItem-BYCPoQK7.cjs → actionItem-BKNfuprM.cjs} +1 -1
- package/dist/{actionItem-Bb2xiYlY.js → actionItem-BrTSUE0J.js} +3 -3
- package/dist/{alarmLevelChart-CCioESvL.js → alarmLevelChart-CmjyIsWH.js} +2 -2
- package/dist/{alarmLevelChart-Bb0mAbwQ.cjs → alarmLevelChart-DBqGvaXQ.cjs} +1 -1
- package/dist/{alertTable-CQwr8YYt.js → alertTable-C8beWyfK.js} +2 -2
- package/dist/{alertTable-oaX5eJC0.cjs → alertTable-CZ2ufzg9.cjs} +1 -1
- package/dist/{annualRainfallChart-C21jEMBe.js → annualRainfallChart-D3Pck4he.js} +2 -2
- package/dist/{annualRainfallChart-pO8q6aUJ.cjs → annualRainfallChart-D3YQwScd.cjs} +1 -1
- package/dist/{api-P_s372dW.cjs → api-C0okiLNC.cjs} +1 -1
- package/dist/{api-C0GhBpqd.js → api-DhQsrEGY.js} +4 -4
- package/dist/{aqi-DlY2r7OA.cjs → aqi-91QfhWTq.cjs} +1 -1
- package/dist/{aqi-iLwQH4rc.js → aqi-DnrkU6z-.js} +10 -10
- package/dist/{aqiIndass-DBeVSBdy.js → aqiIndass-CzA5PVzc.js} +15 -15
- package/dist/{aqiIndass-BaIVBfdC.cjs → aqiIndass-D2h-731s.cjs} +1 -1
- package/dist/arrayCard-C-V_01r7.cjs +1 -0
- package/dist/arrayCard-mprI5bQN.js +94 -0
- package/dist/{audio-CThzVIDU.cjs → audio-CdVI14ea.cjs} +1 -1
- package/dist/{audio-CAP4D-J2.js → audio-Xj66qRvv.js} +5 -5
- package/dist/{bar-BjR566__.cjs → bar-DQ6kQXTC.cjs} +1 -1
- package/dist/{bar-D8C06GO4.js → bar-ub8ERs66.js} +4 -4
- package/dist/{bmp-Cjizh2x6.js → bmp-bXQBGW16.js} +3 -3
- package/dist/{bmp-DsmTzyce.cjs → bmp-xuWyQ9_n.cjs} +1 -1
- package/dist/{box-qgu_67OD.cjs → box-C9s5aZjl.cjs} +1 -1
- package/dist/{box-DqewT3MF.js → box-Dx6V-j_J.js} +2 -2
- package/dist/{chartConfigPanel-DwAUq3pf.js → chartConfigPanel-Bd47rczI.js} +1 -1
- package/dist/{chartConfigPanel-BiQArCoQ.cjs → chartConfigPanel-CLbbeZzN.cjs} +1 -1
- package/dist/{circleBar-CO89T7kj.cjs → circleBar-BsmKIein.cjs} +1 -1
- package/dist/{circleBar-DGHDWQih.js → circleBar-D8I2e0Ov.js} +8 -8
- package/dist/{clock-CT8YXEU3.js → clock-7kw9zMJ0.js} +2 -2
- package/dist/{clock-32hGccm4.cjs → clock-bnKjuzzp.cjs} +1 -1
- package/dist/{clt-5bP_g1O-.cjs → clt-7F8jS0WQ.cjs} +1 -1
- package/dist/{clt-FfIEfGtn.js → clt-BGGFfbQ5.js} +3 -3
- package/dist/{cmc-dbuLkE8o.cjs → cmc-B2ja2VKe.cjs} +1 -1
- package/dist/{cmc-B2nQFZIS.js → cmc-DTiGNWEl.js} +3 -3
- package/dist/{cmp-QQlYcnqo.js → cmp-BXx9BxO1.js} +12 -12
- package/dist/{cmp-l3U9fIrz.cjs → cmp-D9MzneF0.cjs} +1 -1
- package/dist/{composite-DjhrBgG1.js → composite-C6PQB2RS.js} +8 -8
- package/dist/{composite-DlY2_x6P.cjs → composite-Dh9pPcWq.cjs} +1 -1
- package/dist/config-D3MEjLGn.js +9 -0
- package/dist/config-UTUPYJ45.cjs +1 -0
- package/dist/{controlList-BdF8xNAi.js → controlList-VioXoP_4.js} +3 -3
- package/dist/{controlList-De6PXdOc.cjs → controlList-uLJtFu1P.cjs} +1 -1
- package/dist/{controlRecordList-CKpAr1ON.js → controlRecordList-DY7qKQp1.js} +3 -3
- package/dist/{controlRecordList-u5a7chIX.cjs → controlRecordList-GtFLhcc9.cjs} +1 -1
- package/dist/{crd-BVAf41oX.js → crd-Bf8Rmcf5.js} +2 -2
- package/dist/{crd-BoaXQhFQ.cjs → crd-DdsOuCBh.cjs} +1 -1
- package/dist/{ctrBtn-ZPRYWE66.js → ctrBtn-BSzyUEkN.js} +4 -4
- package/dist/{ctrBtn-C9kQiqY1.cjs → ctrBtn-GKFfJlE2.cjs} +1 -1
- package/dist/{ctrSet-C87dxLfQ.js → ctrSet--1TrVZDc.js} +4 -4
- package/dist/{ctrSet-CNCrnLSs.cjs → ctrSet-CDr5scQE.cjs} +1 -1
- package/dist/{ctrSwitch-CkC_Axtp.js → ctrSwitch-ezGEAkLG.js} +4 -4
- package/dist/{ctrSwitch-CVEtbdfb.cjs → ctrSwitch-kHoyJDax.cjs} +1 -1
- package/dist/{dataManagement-n711sd1g.cjs → dataManagement-DxTZAlJy.cjs} +1 -1
- package/dist/{dataManagement-CjlNfeYq.js → dataManagement-oWoI1QPO.js} +2 -2
- package/dist/{dataReport-ByjswEqq.js → dataReport-BATqcXj4.js} +2 -2
- package/dist/{dataReport-BsVjW3p7.cjs → dataReport-Dygq1jQV.cjs} +1 -1
- package/dist/{dataTable-K7j4fhnq.cjs → dataTable-CotUzlhz.cjs} +1 -1
- package/dist/{dataTable-DX500R1i.js → dataTable-DIKwnInT.js} +1 -1
- package/dist/{datetime-DVbJtALf.js → datetime-CK042aN0.js} +2 -2
- package/dist/{datetime-DYXWKrXI.cjs → datetime-DLASaAKw.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-CQUE05cK.js → deepClusterSlipSurface-C52_bDho.js} +6 -6
- package/dist/{deepClusterSlipSurface-B7nkEM9A.cjs → deepClusterSlipSurface-D8v4xJGF.cjs} +1 -1
- package/dist/{deepDataMatrix-DHZA0IAm.cjs → deepDataMatrix-C-NrtGtk.cjs} +1 -1
- package/dist/{deepDataMatrix-ai5rB6ET.js → deepDataMatrix-CdB1ZO5Q.js} +2 -2
- package/dist/{deepDisplacement3D-BsUzvbQb.js → deepDisplacement3D-C3Salw1w.js} +3 -3
- package/dist/{deepDisplacement3D-BFqKqSYg.cjs → deepDisplacement3D-CzM-wm4q.cjs} +1 -1
- package/dist/{deepDisplacementChart-Ba67v6um.cjs → deepDisplacementChart-BqZ4nUgg.cjs} +1 -1
- package/dist/{deepDisplacementChart-2JZNrhrw.cjs → deepDisplacementChart-ByIJTYX6.cjs} +1 -1
- package/dist/{deepDisplacementChart-igl4rW1K.js → deepDisplacementChart-GcH8IGA4.js} +2 -2
- package/dist/{deepDisplacementChart-BCIuCMdK.js → deepDisplacementChart-ndHgH60B.js} +4 -4
- package/dist/{deepDisplacementView-BedWJsx7.js → deepDisplacementView-Bo_pmf0R.js} +1 -1
- package/dist/{deepDisplacementView-wQxyKzB-.cjs → deepDisplacementView-Bq_G0GlS.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-DLeb9jKp.js → deepNodeTemperatureChart-CXgft_WM.js} +6 -6
- package/dist/{deepNodeTemperatureChart-albL8hKa.cjs → deepNodeTemperatureChart-Dsl1Zm8T.cjs} +1 -1
- package/dist/{deepTangentAngleChart-C6xOiITk.js → deepTangentAngleChart-D-WoGKz7.js} +7 -7
- package/dist/{deepTangentAngleChart-DukevXaM.cjs → deepTangentAngleChart-iLt3bK8f.cjs} +1 -1
- package/dist/{deepTemperatureField-B-y94GPV.js → deepTemperatureField-BFB8bQde.js} +7 -7
- package/dist/{deepTemperatureField-De4xKoHw.cjs → deepTemperatureField-DnpuZuD8.cjs} +1 -1
- package/dist/{deepTrendChart-MmuYSXtu.cjs → deepTrendChart-BghE13XG.cjs} +1 -1
- package/dist/{deepTrendChart-DCkV2HNv.js → deepTrendChart-E-mAzsST.js} +6 -6
- package/dist/{deviceOnlineStatus-CFuCTx7_.js → deviceOnlineStatus-CkZijkjC.js} +2 -2
- package/dist/{deviceOnlineStatus-B5cCjhNA.cjs → deviceOnlineStatus-TQ-Fv8ye.cjs} +1 -1
- package/dist/{deviceStatus-DsEtKiGo.cjs → deviceStatus-BkKc9wqU.cjs} +1 -1
- package/dist/{deviceStatus-B2ibBDSi.js → deviceStatus-BvJr98D0.js} +2 -2
- package/dist/{displacementDataTable-BDqG1IvI.js → displacementDataTable-BJ5S7te1.js} +2 -2
- package/dist/{displacementDataTable-oLnUdafv.cjs → displacementDataTable-DJUK3mBu.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-CBhPwZhe.cjs → displacementTrajectoryChart-C2estBCm.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-Crf55oKi.js → displacementTrajectoryChart-DGS9Mn7o.js} +3 -3
- package/dist/{displacementTrendChart-CWihCuIJ.cjs → displacementTrendChart-CgsIcHCK.cjs} +1 -1
- package/dist/{displacementTrendChart-10n_lC9j.js → displacementTrendChart-Ddgpsnta.js} +2 -2
- package/dist/{dxf-D8zHpz5g.js → dxf-B0EL1hyB.js} +5 -5
- package/dist/{dxf-DDh_DcQy.cjs → dxf-DbxtgQWv.cjs} +1 -1
- package/dist/{dzc-DLCdTCwW.js → dzc-ACr2bZGl.js} +10 -10
- package/dist/{dzc-uNTDJqpi.cjs → dzc-Bdm2nr1F.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-Bo5uDQAu.cjs → element-resize-detector-BlMXyWIR.cjs} +1 -1
- package/dist/{element-resize-detector-DJcsrJ8s.js → element-resize-detector-DeMhGbNi.js} +4 -4
- package/dist/{evn-YwCALVXj.js → evn-D0llPvjK.js} +2 -2
- package/dist/{evn-DuL5oVRl.cjs → evn-Moewbl2h.cjs} +1 -1
- package/dist/{evolutionChart-4noZSdLX.js → evolutionChart-Cz_GOcB8.js} +3 -3
- package/dist/{evolutionChart-AeL67MAt.cjs → evolutionChart-DBwL00ZJ.cjs} +1 -1
- package/dist/{fileViewer-bsrjlJkC.cjs → fileViewer-BtjOAdM9.cjs} +1 -1
- package/dist/{fileViewer-DiH3PM0r.js → fileViewer-D-WNR3vF.js} +5 -5
- package/dist/{filterBar-Ct1BFhrS.cjs → filterBar-4Q9XSiAY.cjs} +1 -1
- package/dist/{filterBar-CWEguwYc.js → filterBar-DLYmU350.js} +2 -2
- package/dist/{fireCombustionCurve-DYPC4zKJ.js → fireCombustionCurve-BU3pplHd.js} +2 -2
- package/dist/{fireCombustionCurve-DyiQn-WA.cjs → fireCombustionCurve-CWggQsw1.cjs} +1 -1
- package/dist/{fireFilterBar-Bdm2ljuO.cjs → fireFilterBar-EKwzMAFp.cjs} +1 -1
- package/dist/{fireFilterBar-DGHPNTwF.js → fireFilterBar-ROtoXZex.js} +2 -2
- package/dist/{gag-HiNaL81R.cjs → gag-CvMEVCbE.cjs} +1 -1
- package/dist/{gag-kvkKzJuO.js → gag-D8mNPZnH.js} +5 -5
- package/dist/gasStationList-CWg8IYCo.cjs +1 -0
- package/dist/gasStationList-qVKS-fgC.js +984 -0
- package/dist/{glbModel-DtBI72ap.cjs → glbModel-CQBEujd2.cjs} +1 -1
- package/dist/{glbModel-CUz6CyVF.js → glbModel-U_yKQZWm.js} +2 -2
- package/dist/{gnssFilterBar-TBtirXIB.js → gnssFilterBar-o7zpW7jS.js} +2 -2
- package/dist/{gnssFilterBar-BQgY5x1W.cjs → gnssFilterBar-pvMsIjFy.cjs} +1 -1
- package/dist/{gnssHistoryTable-U8O7nyO7.js → gnssHistoryTable-BYg9jtl5.js} +3 -3
- package/dist/{gnssHistoryTable-D1ZLJOgh.cjs → gnssHistoryTable-Ddcw3-NB.cjs} +1 -1
- package/dist/{gnssMapView-42zmAd9q.cjs → gnssMapView--c2UXuOb.cjs} +1 -1
- package/dist/{gnssMapView-CaBfWeT1.js → gnssMapView-DMcq2u2c.js} +2 -2
- package/dist/{gnssTimeSeriesChart-CV2w_Aik.cjs → gnssTimeSeriesChart-984dcBPA.cjs} +1 -1
- package/dist/{gnssTimeSeriesChart-BrXYvuh6.js → gnssTimeSeriesChart-BtUSps0z.js} +4 -4
- package/dist/{gnssXYTrajectory-BmzSYjQ_.cjs → gnssXYTrajectory-D9JmAqC0.cjs} +1 -1
- package/dist/{gnssXYTrajectory-D2DoYnze.js → gnssXYTrajectory-DvIpI-GX.js} +3 -3
- package/dist/{grd-DW8cSFVR.cjs → grd-Cb8vd52d.cjs} +1 -1
- package/dist/{grd-B0GUjLm9.js → grd-DcxFaMyv.js} +3 -3
- package/dist/{grdIndass-DduUKZJm.js → grdIndass-BPLTUWIc.js} +3 -3
- package/dist/{grdIndass-BeBXVsos.cjs → grdIndass-FkNJ9pl6.cjs} +1 -1
- package/dist/{grg-CeX0pirQ.js → grg-Baot_Pdv.js} +6 -6
- package/dist/{grg-fnpcXtju.cjs → grg-CoDiLjcl.cjs} +1 -1
- package/dist/{gridview-DpABhCIw.cjs → gridview-BwDeg0tI.cjs} +1 -1
- package/dist/{gridview-BPwWXza9.js → gridview-DN8V84hl.js} +2 -2
- package/dist/{groupCard-De1E15mW.js → groupCard-D5wLscZo.js} +2 -2
- package/dist/{groupCard-WNE6gAAl.cjs → groupCard-DChtdioU.cjs} +1 -1
- package/dist/{headerBar-CZ3qcLHo.js → headerBar-DLvSZsMl.js} +3 -3
- package/dist/{headerBar-Qi1EXrr6.cjs → headerBar-m57S9WlE.cjs} +1 -1
- package/dist/{history-DAmBl4_5.cjs → history-C4gipwnp.cjs} +1 -1
- package/dist/{history-BkZhlpdY.js → history-DN0IVkYL.js} +3 -3
- package/dist/index-EnNA0nIi.cjs +582 -0
- package/dist/{index-kShjySl9.js → index-zPaMBZk-.js} +1047 -1065
- package/dist/{insarDeformChart-CnuSL1d9.js → insarDeformChart-DZl03mOe.js} +2 -2
- package/dist/{insarDeformChart-BGr2xe7w.cjs → insarDeformChart-DkiLrhem.cjs} +1 -1
- package/dist/{insarImageViewer-DRgGdQmN.cjs → insarImageViewer-ZcqHEEZr.cjs} +1 -1
- package/dist/{insarImageViewer-EmVThmVQ.js → insarImageViewer-kqYV5A1S.js} +2 -2
- package/dist/{kds-DTYWOq4K.cjs → kds-Ba0yzyNm.cjs} +1 -1
- package/dist/{kds-CpIQFgeY.js → kds-BbyaSB3L.js} +10 -10
- package/dist/{layerTabs-BATcBkTA.cjs → layerTabs-D2M3EVxt.cjs} +1 -1
- package/dist/{layerTabs-uze6K91A.js → layerTabs-SRHmamTF.js} +2 -2
- package/dist/{lin-Ba6fHkYf.cjs → lin-0U8FQZHZ.cjs} +1 -1
- package/dist/{lin-DU_EuPRg.js → lin-DxnORLL5.js} +8 -8
- package/dist/{linIndass-urYe5inp.cjs → linIndass-CX9Z02-e.cjs} +1 -1
- package/dist/{linIndass-XHKElG7L.js → linIndass-DXtxVxcr.js} +7 -7
- package/dist/{lst-C7aee1cU.js → lst-BKALUOuy.js} +2 -2
- package/dist/{lst-CpmoEQDY.cjs → lst-Bk2nvLuQ.cjs} +1 -1
- package/dist/{manualEntry-D9m_WPw3.js → manualEntry-DHH0Yrr3.js} +2 -2
- package/dist/{manualEntry-CJPiO5nh.cjs → manualEntry-DRK0QRnb.cjs} +1 -1
- package/dist/{mapBackground-6g_71Fwa.js → mapBackground-BXj8T-bG.js} +2 -2
- package/dist/{mapBackground-CF_TqNBy.cjs → mapBackground-DTuXORjO.cjs} +1 -1
- package/dist/{mappingList-CR55Tq4t.cjs → mappingList-M9OukdCu.cjs} +1 -1
- package/dist/{mappingList-luT5YE0d.js → mappingList-N-lL8mnV.js} +3 -3
- package/dist/{markdownViewer-D1hDk2Y7.cjs → markdownViewer-CcLL2hzV.cjs} +1 -1
- package/dist/{markdownViewer-CnguoUr8.js → markdownViewer-CgabPFUn.js} +5 -5
- package/dist/{mix-control-modal-CHiX3hQs.js → mix-control-modal-DRL4otx8.js} +3 -3
- package/dist/{mix-control-modal-BDHAB4Tw.cjs → mix-control-modal-Lhzopftt.cjs} +1 -1
- package/dist/{mixDataPermission-BaqV0Z6N.js → mixDataPermission-B5fpqFgm.js} +4 -3
- package/dist/{mixDataPermission-BTA1jNd1.cjs → mixDataPermission-CWt9H_Ib.cjs} +1 -1
- package/dist/{mixGrid-3BqQCvg8.cjs → mixGrid-DTwH6At3.cjs} +1 -1
- package/dist/{mixGrid-C0eEvwPy.js → mixGrid-wE427LB0.js} +3 -3
- package/dist/{mixMap-7upgYwWk.js → mixMap-Bo7_Womf.js} +3 -3
- package/dist/{mixMap-Bw-We4Cm.cjs → mixMap-DKDtSARk.cjs} +1 -1
- package/dist/{mixModel-BqE_Kd4c.js → mixModel-CdMcRi5k.js} +10 -10
- package/dist/{mixModel-CgV4XptM.cjs → mixModel-Dufgy8XG.cjs} +1 -1
- package/dist/{mixPie-9LfMCTQV.cjs → mixPie-BoUARcVT.cjs} +1 -1
- package/dist/{mixPie-B-HeglUn.js → mixPie-Dr9Toi5T.js} +7 -7
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +1 -1
- package/dist/{mjpegCamera-Cfw3rzT5.js → mjpegCamera-BBqBIpmz.js} +2 -2
- package/dist/{mjpegCamera-nxKfhobY.cjs → mjpegCamera-C20yRxub.cjs} +1 -1
- package/dist/{monitorAlert-Bt0baNh4.cjs → monitorAlert-BgRCm9Vs.cjs} +1 -1
- package/dist/{monitorAlert-Bg5vzzyG.js → monitorAlert-DVfJ6uNR.js} +2 -2
- package/dist/{monitorData-CzPVIk_4.cjs → monitorData-Dz_cHcBR.cjs} +1 -1
- package/dist/{monitorData-BvAMeOrp.js → monitorData-zfcYQmc8.js} +3 -3
- package/dist/{monitorSpeedChart-0bDuU3Kj.js → monitorSpeedChart-DYV_S1um.js} +1 -1
- package/dist/{monitorSpeedChart-C52QjA5K.cjs → monitorSpeedChart-jAf_Agnm.cjs} +1 -1
- package/dist/{mxa-eLAgZPMC.cjs → mxa-DGkX2ysU.cjs} +1 -1
- package/dist/{mxa-BW80xKCc.js → mxa-mziDHRQU.js} +7 -7
- package/dist/myValue-6J41vLFg.cjs +1 -0
- package/dist/myValue-s0IC6eg0.js +149 -0
- package/dist/myValueList-Dl-JfGq6.cjs +1 -0
- package/dist/myValueList-cOT1nYnO.js +451 -0
- package/dist/{objectList-Cf9GMyXN.js → objectList-DGBiB_w6.js} +100 -95
- package/dist/objectList-DK5_HGK_.cjs +1 -0
- package/dist/photo-CBfgcj6v.cjs +1 -0
- package/dist/photo-C_1tDAZa.js +342 -0
- package/dist/{pie-DxoBrm0D.cjs → pie-DAEzlPEp.cjs} +1 -1
- package/dist/{pie-BDLg-Rls.js → pie-p9CvjJ_m.js} +7 -7
- package/dist/{pressBtn-t0g4vk7s.cjs → pressBtn-DMMLEAFZ.cjs} +1 -1
- package/dist/{pressBtn-CXG1eSWC.js → pressBtn-DlhDUUdy.js} +4 -4
- package/dist/{progressBar-BXaFKSCq.js → progressBar-C3K0DYlI.js} +2 -2
- package/dist/{progressBar-CJEWkZ42.cjs → progressBar-ZksfXpzu.cjs} +1 -1
- package/dist/{progressCircle-DpOI5D5z.js → progressCircle-BBLr8loP.js} +2 -2
- package/dist/{progressCircle-uQ7vaMKM.cjs → progressCircle-eFwDltuC.cjs} +1 -1
- package/dist/{qrcode-CX8aymYZ.js → qrcode-DgwPQO8V.js} +297 -298
- package/dist/qrcode-F7MtRi3K.cjs +1 -0
- package/dist/{raceBar-Cv0-0ogd.cjs → raceBar-Cp-9uqpX.cjs} +1 -1
- package/dist/{raceBar-DFaH342G.js → raceBar-CyW79eH-.js} +7 -7
- package/dist/{rad-CFswUTwi.cjs → rad-CLvi3eWj.cjs} +1 -1
- package/dist/{rad-NS2G_nMg.js → rad-CbFS-xjy.js} +7 -7
- package/dist/{rainfallFilterBar-D_Ye_NeB.js → rainfallFilterBar-B0G4jUib.js} +2 -2
- package/dist/{rainfallFilterBar-BI45QvJm.cjs → rainfallFilterBar-DldKT-I5.cjs} +1 -1
- package/dist/{rainfallTimeCurve-BHWqX47Q.js → rainfallTimeCurve-BlyxLbcV.js} +3 -3
- package/dist/{rainfallTimeCurve-Ke1JvSWq.cjs → rainfallTimeCurve-C5r3fOW8.cjs} +1 -1
- package/dist/{rangeLin-D6VZ2U3C.cjs → rangeLin-B2vKFJHK.cjs} +1 -1
- package/dist/{rangeLin-GMYEgLeP.js → rangeLin-CLAcLUai.js} +7 -7
- package/dist/{request-Bn100qAJ.cjs → request-4n94CBXg.cjs} +1 -1
- package/dist/{request-BD0x5Hkt.js → request-DT13bnc0.js} +1 -1
- package/dist/{retainer1-h-Whr2c9.js → retainer1-Dy2VHVgc.js} +3 -3
- package/dist/{retainer1-D2XmjXYH.cjs → retainer1-EFUFSxMm.cjs} +1 -1
- package/dist/{retainer2-ByQdiRjq.js → retainer2-3ITxlgwH.js} +3 -3
- package/dist/{retainer2-cF-trL2g.cjs → retainer2-BKVJLvBo.cjs} +1 -1
- package/dist/{riskRegionTable-CQxAkG7k.js → riskRegionTable-BQ88G7F7.js} +2 -2
- package/dist/{riskRegionTable-cKnxra4_.cjs → riskRegionTable-C2GOEi0n.cjs} +1 -1
- package/dist/{sankey-Bk1IcVJQ.js → sankey-ehJmtfKp.js} +9 -9
- package/dist/{sankey-MRirEgU0.cjs → sankey-utV5RADH.cjs} +1 -1
- package/dist/{scd-BDRpzmsa.js → scd-D-Y1EEoF.js} +2 -2
- package/dist/{scd-J-mN3eI5.cjs → scd-Nx15OHeb.cjs} +1 -1
- package/dist/{sideMenu-l8X2E00H.cjs → sideMenu-Ci3pDMFm.cjs} +1 -1
- package/dist/{sideMenu-BgTMtnMq.js → sideMenu-D6MgOAkf.js} +2 -2
- package/dist/{slopeStability-BPf7m0fJ.cjs → slopeStability-B9WvyL3-.cjs} +1 -1
- package/dist/{slopeStability-C5RqZ1im.js → slopeStability-Bu2a83d7.js} +3 -3
- package/dist/{speedCurve-C3pK-zZy.js → speedCurve-BR_xyp4X.js} +3 -3
- package/dist/{speedCurve-CluwNAZl.cjs → speedCurve-DrndMOKB.cjs} +1 -1
- package/dist/{staticLine-C6tGGXcN.cjs → staticLine-BLUdDtae.cjs} +1 -1
- package/dist/{staticLine-DXWOLj15.js → staticLine-DYQUjE_3.js} +7 -7
- package/dist/{store-DzDtVfSX.js → store-BpVoYd93.js} +2 -2
- package/dist/{store-BJW2NQkK.cjs → store-KXsdwyLp.cjs} +1 -1
- package/dist/{swiper-DGqDoUkX.cjs → swiper-53BGkj5I.cjs} +1 -1
- package/dist/{swiper-IMlGje3t.js → swiper-S8NYmcYS.js} +3 -3
- package/dist/{terminalConfigList-D6xDHsnb.cjs → terminalConfigList-DFDsxg1q.cjs} +1 -1
- package/dist/{terminalConfigList-SAyXi-BK.js → terminalConfigList-DaEpZiog.js} +3 -3
- package/dist/{terminalList-ml2C18MY.cjs → terminalList-BgNFp3E0.cjs} +1 -1
- package/dist/{terminalList-CjSHshiR.js → terminalList-mKVmYqJm.js} +3 -3
- package/dist/{textbox-BLV-SY8e.js → textbox-Bazh9LRC.js} +4 -4
- package/dist/{textbox-AQtCe25j.cjs → textbox-DAyhC67s.cjs} +1 -1
- package/dist/{timeQueryBar-BuKakMy8.cjs → timeQueryBar-2cbPr7zw.cjs} +1 -1
- package/dist/{timeQueryBar-BeMu_DYr.js → timeQueryBar-BnVnJk5K.js} +1 -1
- package/dist/{timeSeries-DP5iZKVM.js → timeSeries-BF-2qAA7.js} +4 -4
- package/dist/{timeSeries-DfGgFWiF.cjs → timeSeries-DEeo2zjY.cjs} +1 -1
- package/dist/{timeSeriesCurve-B0Mw6eNK.cjs → timeSeriesCurve-BMhNq3WC.cjs} +1 -1
- package/dist/{timeSeriesCurve-BSgtPqYw.js → timeSeriesCurve-CkCeP5mK.js} +3 -3
- package/dist/{toggleBtn-O2Y75Uen.js → toggleBtn-BnIia9MT.js} +7 -7
- package/dist/{toggleBtn-Dh64vVWo.cjs → toggleBtn-hg6nIH97.cjs} +1 -1
- package/dist/{trajectoryConfigPanel--C1h3tK6.js → trajectoryConfigPanel-CfnLHqWP.js} +1 -1
- package/dist/{trajectoryConfigPanel-P_Qa4omj.cjs → trajectoryConfigPanel-agVnGJJ6.cjs} +1 -1
- package/dist/{trajectoryScatter-VLrmImlq.js → trajectoryScatter-BBL5uJSS.js} +6 -6
- package/dist/{trajectoryScatter-BbpbgNb8.cjs → trajectoryScatter-BzFxJkJn.cjs} +1 -1
- package/dist/{universalConfigPanel-DBg76b4F.js → universalConfigPanel-BueS1CeL.js} +1 -1
- package/dist/{universalConfigPanel-C0lDSzOB.cjs → universalConfigPanel-Db87fd8H.cjs} +1 -1
- package/dist/{universalTable-DGK02ywi.js → universalTable-5QpYwmyj.js} +2 -2
- package/dist/{universalTable-Bzq9VqzA.cjs → universalTable-BXfm_1je.cjs} +1 -1
- package/dist/{video-DCzzaEmV.js → video-C75mXLnF.js} +5 -5
- package/dist/{video-CyRoSQf1.cjs → video-QWpkqafn.cjs} +1 -1
- package/dist/{videoMonitor-ByaQeIWR.js → videoMonitor-DSOQbTy9.js} +2 -2
- package/dist/{videoMonitor-BjD-ZFS0.cjs → videoMonitor-Dlvtlmf3.cjs} +1 -1
- package/dist/{vlu-h-9twmCr.js → vlu-BRrxfbLm.js} +2 -2
- package/dist/{vlu-CYZjYHaV.cjs → vlu-DqqX7UrQ.cjs} +1 -1
- package/dist/{weather-C_aC0XJ1.js → weather-B4twNcEf.js} +3 -3
- package/dist/{weather-B7B5E1EJ.cjs → weather-GNGvUFJc.cjs} +1 -1
- package/dist/{windLin-DPNzX7JN.cjs → windLin-DPr5J4_t.cjs} +1 -1
- package/dist/{windLin-B7V4NUV8.js → windLin-DSh910GU.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/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
|
@@ -27,15 +27,15 @@ var $ = (d, a, s) => new Promise((w, m) => {
|
|
|
27
27
|
g((s = s.apply(d, a)).next());
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as le, getCurrentInstance as re, reactive as V, openBlock as k, createElementBlock as _, normalizeStyle as se, unref as u, createElementVNode as b, normalizeClass as O, toDisplayString as y, createCommentVNode as C, renderSlot as ae, nextTick as ie } from "vue";
|
|
30
|
-
import { B as ne, e as R, C as F } from "./element-resize-detector-
|
|
31
|
-
import { _ as ce } from "./index-
|
|
30
|
+
import { B as ne, e as R, C as F } from "./element-resize-detector-DeMhGbNi.js";
|
|
31
|
+
import { _ as ce } from "./index-zPaMBZk-.js";
|
|
32
32
|
import { m as ue, t as H, p as pe, s as U, a as j, c as S } from "./composite-CbsUYl-u.js";
|
|
33
|
-
import { a as de } from "./api-
|
|
33
|
+
import { a as de } from "./api-DhQsrEGY.js";
|
|
34
34
|
import { A as me, D as fe } from "./ele-bmp-icon-Pdolk1J5.js";
|
|
35
|
-
import {
|
|
36
|
-
import { i as
|
|
37
|
-
import { i as
|
|
38
|
-
import {
|
|
35
|
+
import { u as be, i as he, a as xe } from "./installCanvasRenderer-CLT2hquJ.js";
|
|
36
|
+
import { i as ge } from "./install-BBrAry2m.js";
|
|
37
|
+
import { i as ve } from "./install-CBde4hAM.js";
|
|
38
|
+
import { i as ke } from "./install-hfre7yvV.js";
|
|
39
39
|
import { i as _e } from "./install-BzdOSCzO.js";
|
|
40
40
|
import { i as ye } from "./install-MS3ZY7fF.js";
|
|
41
41
|
import { i as P, d as W } from "./echarts-BVht3HHb.js";
|
|
@@ -68,7 +68,7 @@ const Ce = { class: "flex-1 flex flex-col justify-between" }, je = { class: "fon
|
|
|
68
68
|
theme: { type: String, default: "light" }
|
|
69
69
|
},
|
|
70
70
|
setup(d) {
|
|
71
|
-
|
|
71
|
+
be([ge, ve, ke, he, xe, _e, ye]);
|
|
72
72
|
const { proxy: a } = re(), s = "circle_" + Math.random().toString(16).substring(4, 12), w = "bar_" + Math.random().toString(16).substring(4, 12);
|
|
73
73
|
let m = null, i = null, n = null, g = [];
|
|
74
74
|
const f = d, p = V({ total: 0, open: 0, close: 0 }), h = V({ xData: [], yData: [] });
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var $=Object.defineProperty,H=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var V=(m,s,a)=>s in m?$(m,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):m[s]=a,C=(m,s)=>{for(var a in s||(s={}))P.call(s,a)&&V(m,a,s[a]);if(O)for(var a of O(s))W.call(s,a)&&V(m,a,s[a]);return m},B=(m,s)=>H(m,U(s));var z=(m,s,a)=>new Promise((k,f)=>{var i=b=>{try{x(a.next(b))}catch(p){f(p)}},c=b=>{try{x(a.throw(b))}catch(p){f(p)}},x=b=>b.done?k(b.value):Promise.resolve(b.value).then(i,c);x((a=a.apply(m,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./element-resize-detector-
|
|
1
|
+
"use strict";var $=Object.defineProperty,H=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var V=(m,s,a)=>s in m?$(m,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):m[s]=a,C=(m,s)=>{for(var a in s||(s={}))P.call(s,a)&&V(m,a,s[a]);if(O)for(var a of O(s))W.call(s,a)&&V(m,a,s[a]);return m},B=(m,s)=>H(m,U(s));var z=(m,s,a)=>new Promise((k,f)=>{var i=b=>{try{x(a.next(b))}catch(p){f(p)}},c=b=>{try{x(a.throw(b))}catch(p){f(p)}},x=b=>b.done?k(b.value):Promise.resolve(b.value).then(i,c);x((a=a.apply(m,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./element-resize-detector-BlMXyWIR.cjs"),G=require("./index-EnNA0nIi.cjs"),d=require("./composite-Cf24lSyN.cjs"),J=require("./api-C0okiLNC.cjs"),T=require("./ele-bmp-icon-BBI0-SX7.cjs"),E=require("./installCanvasRenderer-CyhM1Qpl.cjs"),K=require("./install-C8buXQPI.cjs"),Q=require("./install-DV5cEgNV.cjs"),X=require("./install-CltTFs4e.cjs"),Y=require("./install-nDY6w-GK.cjs"),Z=require("./install-Ch5d8i37.cjs"),_=require("./echarts-BB8O2KSA.cjs"),ee={class:"flex-1 flex flex-col justify-between"},te={class:"font-bold w-[54px] text-[14px] mt-[4px] text-center border-solid border-[#000] border-[1px] rounded-[2px]"},oe={key:0,class:"font-bold"},le={class:"flex mb-[8px] whitespace-nowrap items-center"},re={class:"mr-[8px] text-[15px]"},ne={class:"w-[64px] text-[14px] text-center border-solid border-[#000] border-[1px] rounded-[2px]"},ae={class:"flex mb-[8px] whitespace-nowrap items-center"},se={class:"mr-[8px] text-[15px]"},ie={class:"w-[64px] text-[14px] text-center border-solid border-[#000] border-[1px] rounded-[2px]"},ce={DEFAULT_ICON:T.DEFAULT_ICON,ACTIVE_ICON:T.ACTIVE_ICON,NAME_CN:"组合组件",NAME_EN:"Composite Component",ORDER:4},ue={bgColor:"#fff",radiusSize:8,isHideTitle:!1,block:{value:"user",type:"select",options:[...d.modeOptions],label:"component.pro.projectStatistic",control:"title"},title:{value:"用户管理",type:"string",label:"component.pro.statisticTitle"}},de={DEFAULT:ce,OPTIONS:ue},pe=e.defineComponent(B(C({},de),{__name:"composite",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(m){E.use([K.install,Q.install,X.install,E.install,E.install$1,Y.install,Z.install]);const{proxy:s}=e.getCurrentInstance(),a="circle_"+Math.random().toString(16).substring(4,12),k="bar_"+Math.random().toString(16).substring(4,12);let f=null,i=null,c=null,x=[];const b=m,p=e.reactive({total:0,open:0,close:0}),g=e.reactive({xData:[],yData:[]});class F extends v.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),radiusSize:this.getOptionValue("radiusSize",4),isHideTitle:this.getOptionValue("isHideTitle",!1),block:this.getOptionValue("block","user"),title:this.getOptionValue("title","用户管理")}}init(){super.init(),this.props.mode==="edit"&&(x=[{name:"参数一",value:10},{name:"参数二",value:20}],p.total=30,p.open=10,p.close=20,g.xData=["参数一","参数二"],g.yData=[10,20]),e.nextTick(()=>j())}onPreview(){R()}cleanup(){f&&f.uninstall(document.querySelector("#"+a)),i&&i.clear(),c&&c.clear(),i&&_.dispose(i),c&&_.dispose(c),i=null,c=null}}const S=new F(b,"composite");S.setupLifecycle();const o=S.getStyle(),j=()=>{let n=document.getElementById(a),l=document.getElementById(k);const r=["user","terminal","retainer","care","agent","customer","project","object"].includes(o.value.block),t=["customer","project","object","agent"].includes(o.value.block);if(r&&!n||t&&!l){setTimeout(j,100);return}n&&!i&&(i=_.init(n),f=v.elementResizeDetectorMaker({strategy:"scroll"}),f.listenTo(n,()=>i==null?void 0:i.resize())),i&&i.setOption(D(),!0),l&&!c&&(c=_.init(l),f||(f=v.elementResizeDetectorMaker({strategy:"scroll"})),f.listenTo(l,()=>c==null?void 0:c.resize())),c&&c.setOption(N(),!0)},D=()=>({title:{zlevel:0,show:!0,text:p.total,top:"center",left:"center",textStyle:{fontSize:14,color:"#000"}},color:v.COLORS,series:[{name:"Access From",type:"pie",radius:["45%","75%"],avoidLabelOverlap:!1,label:{show:!0,color:"#000"},startAngle:10,emphasis:{label:{show:!0,fontSize:12,fontWeight:"bold",formatter:`{b}
|
|
2
2
|
{c}`,lineHeight:18,top:"center",left:"center"}},labelLine:{show:!0,length:6,length2:4},data:x}]}),N=()=>({grid:{top:20,bottom:30,left:20,right:20},tooltip:{show:!0,formatter:"{b}: {c}"},xAxis:{axisLine:{show:!0},axisTick:{show:!1},axisLabel:{formatter:n=>A(n)},data:g.xData},yAxis:{axisLabel:{show:!1},splitLine:{show:!1}},series:[{type:"bar",data:g.yData,barWidth:30,label:{show:!0,position:"top",fontSize:12},itemStyle:{color:function(n){return v.COLORS[n.dataIndex]||"#5470c6"}}}]}),I=n=>{let l={},r=[];n.forEach(t=>{let u=t.roles[0]?t.roles[0].id:"undefined";l[u]?l[u].value++:l[u]={name:t.roles[0]?t.roles[0].role_name:"未知",value:1}});for(let t in l)r.push(l[t]);return r},h=n=>{let l={undefined:{name:"未知",value:0}},r=[];try{n.forEach(t=>{t[d.typeFieldMapping[o.value.block]]?l[t[d.typeFieldMapping[o.value.block]]]?l[t[d.typeFieldMapping[o.value.block]]].value++:l[t[d.typeFieldMapping[o.value.block]]]={name:t[d.typeFieldMapping[o.value.block]],value:1}:l.undefined.value++})}catch(t){console.log(t)}for(let t in l)l[t].value&&r.push(l[t]);return r},q={user:I,customer:h,project:h,terminal:h,object:h,dashboard:h,care:h,retainer:h,agent:h},A=(n,l=4)=>{let r="",t=0,u=0;for(let y=0;y<n.length;y++){const w=n[y],M=w.charCodeAt(0);M>=19968&&M<=40959?(u++,t+=2):t+=1,r+=w,(u>=l||t>=l*2)&&(r+=`
|
|
3
3
|
`,u=0,t=0)}return r},L=n=>{let l={},r=[];try{n.forEach(t=>{let u=t[d.categoryFieldMapping[o.value.block]];l[t[d.categoryFieldMapping[o.value.block]]]?l[t[d.categoryFieldMapping[o.value.block]]].value++:l[t[d.categoryFieldMapping[o.value.block]]]={name:["","-",null].includes(u)?s.$t("common.undefined"):u,value:1}})}catch(t){console.log(t)}for(let t in l)r.push(l[t]);return r},R=()=>z(null,null,function*(){let n=C({},d.projectMapping[o.value.block]);J.api.platform(l=>{let r=l.result;if(p.total=r.total_records||r.data.length,["customer","project","object"].includes(o.value.block)||(p.open=r.data.filter(t=>t[d.statusFieldMapping[o.value.block]]==1).length,p.close=r.data.filter(t=>t[d.statusFieldMapping[o.value.block]]==0).length),["user","customer","project","object","terminal","agent"].includes(o.value.block)&&(x=q[o.value.block](r.data),i&&i.setOption(D(),!0)),["customer","project","object","agent"].includes(o.value.block))try{let t=L(r.data);g.xData=[],g.yData=[],t.forEach(u=>{g.xData.push(u.name),g.yData.push(u.value)}),c&&c.setOption(N(),!0)}catch(t){console.log(t)}},n)});return b.conf,(n,l)=>{var r,t,u,y;return e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(o).bgColor,borderRadius:`${e.unref(o).radiusSize}px`})},[e.createElementVNode("div",ee,[e.createElementVNode("div",{class:e.normalizeClass(["title-wrap",["customer","project","object"].includes(e.unref(o).block)?"flex items-center":""])},[e.createElementVNode("div",{class:e.normalizeClass(["text-[16px] font-bold",["customer","project","object"].includes(e.unref(o).block)?"mr-[12px]":""])},e.toDisplayString(e.unref(o).title),3),e.createElementVNode("div",te,e.toDisplayString(p.total),1)],2),["customer","project","object"].includes(e.unref(o).block)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",le,[e.createElementVNode("div",re,e.toDisplayString((t=(r=e.unref(d.titleMapping))==null?void 0:r[e.unref(o).block])==null?void 0:t[0]),1),e.createElementVNode("div",ne,e.toDisplayString(p.open),1)]),e.createElementVNode("div",ae,[e.createElementVNode("div",se,e.toDisplayString((y=(u=e.unref(d.titleMapping))==null?void 0:u[e.unref(o).block])==null?void 0:y[1]),1),e.createElementVNode("div",ie,e.toDisplayString(p.close),1)])])),["customer","project","object"].includes(e.unref(o).block)?(e.openBlock(),e.createElementBlock("div",{key:1,id:a,class:"flex-1 w-[100%]"})):e.createCommentVNode("",!0)]),["user","terminal","retainer","care","customer","project","object","agent"].includes(e.unref(o).block)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["chart-wrapper flex",e.unref(o).block==="agent"?"flex-[3_3_0%]":"flex-[2_2_0%]"])},[["user","terminal","retainer","care","agent"].includes(e.unref(o).block)?(e.openBlock(),e.createElementBlock("div",{key:0,id:a,class:"chart-container"})):e.createCommentVNode("",!0),["customer","project","object","agent"].includes(e.unref(o).block)?(e.openBlock(),e.createElementBlock("div",{key:1,id:k,class:"chart-container flex-[2_2_0%]"})):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],4)}}})),me=G._export_sfc(pe,[["__scopeId","data-v-34f2cea6"]]);exports.default=me;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const i = "/http/middle_platform/api", n = "/http/file/upload", _ = "";
|
|
2
|
+
var o;
|
|
3
|
+
const t = typeof window != "undefined" && ((o = window.location) != null && o.origin) ? window.location.origin : "";
|
|
4
|
+
(t || "" || "https://yunui.mixyun.top").toString().replace(/\/$/, "");
|
|
5
|
+
export {
|
|
6
|
+
_ as F,
|
|
7
|
+
i as M,
|
|
8
|
+
n as U
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i="/http/middle_platform/api",n="/http/file/upload";var t;const o=typeof window!="undefined"&&((t=window.location)!=null&&t.origin)?window.location.origin:"";(o||""||"https://yunui.mixyun.top").toString().replace(/\/$/,"");exports.FILE_URL="";exports.MIDDLE_PLATFORM_URL=i;exports.UPLOAD_URL=n;
|
|
@@ -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 He, computed as G, reactive as re, ref as C, watch as We, onMounted as qe, openBlock as g, createElementBlock as L, Fragment as X, withDirectives as se, normalizeStyle as ue, unref as x, toDisplayString as z, createCommentVNode as E, createElementVNode as J, createVNode as o, withKeys as Qe, withCtx as n, createTextVNode as c, createBlock as $, renderList as Ge, renderSlot as Xe } from "vue";
|
|
46
|
-
import { B as Ye } from "./element-resize-detector-
|
|
47
|
-
import { _ as Ze } from "./index-
|
|
46
|
+
import { B as Ye } from "./element-resize-detector-DeMhGbNi.js";
|
|
47
|
+
import { _ as Ze } from "./index-zPaMBZk-.js";
|
|
48
48
|
import { g as et } from "./titleStyle-BT5GlpAb.js";
|
|
49
49
|
import { ElMessage as v, ElMessageBox as de } from "element-plus";
|
|
50
50
|
import { Search as tt } from "@element-plus/icons-vue";
|
|
51
|
-
import { a as R } from "./api-
|
|
51
|
+
import { a as R } from "./api-DhQsrEGY.js";
|
|
52
52
|
import { A as lt, D as it } from "./ele-lst-icon-CKpeRKmk.js";
|
|
53
53
|
const ot = { class: "mix-body" }, at = { class: "toolbar" }, nt = { class: "table-wrapper" }, rt = { class: "pagination" }, st = { class: "view-body" }, ut = {
|
|
54
54
|
DEFAULT_ICON: it,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var me=Object.defineProperty,fe=Object.defineProperties;var Ve=Object.getOwnPropertyDescriptors;var H=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable;var W=(f,s,p)=>s in f?me(f,s,{enumerable:!0,configurable:!0,writable:!0,value:p}):f[s]=p,J=(f,s)=>{for(var p in s||(s={}))ve.call(s,p)&&W(f,p,s[p]);if(H)for(var p of H(s))ge.call(s,p)&&W(f,p,s[p]);return f},Q=(f,s)=>fe(f,Ve(s));var B=(f,s,p)=>new Promise((q,b)=>{var $=g=>{try{m(p.next(g))}catch(k){b(k)}},I=g=>{try{m(p.throw(g))}catch(k){b(k)}},m=g=>g.done?q(g.value):Promise.resolve(g.value).then($,I);m((p=p.apply(f,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/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"),ye=require("./element-resize-detector-Bo5uDQAu.cjs"),he=require("./index-Mh5Dw2sd.cjs"),be=require("./titleStyle-NSnz6cUg.cjs"),c=require("element-plus"),we=require("@element-plus/icons-vue"),O=require("./api-P_s372dW.cjs"),G=require("./ele-lst-icon-CrxnHZ-A.cjs"),Ce={class:"mix-body"},Ne={class:"toolbar"},xe={class:"table-wrapper"},ke={class:"pagination"},_e={class:"view-body"},Se={DEFAULT_ICON:G.DEFAULT_ICON,ACTIVE_ICON:G.ACTIVE_ICON,NAME_CN:"控制码列表",NAME_EN:"ControlList",ORDER:3},Be={bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"uid",label:"控制码编号",width:160,visible:!0},{key:"alias",label:"控制码别名",width:140,visible:!0},{key:"name",label:"控制码名称",width:160,visible:!0},{key:"description",label:"描述",minWidth:160,visible:!0},{key:"created",label:"创建时间",width:170,visible:!0},{key:"last_modified",label:"更新时间",width:170,visible:!0}]},X=[{name:"控制码名称",fv:"",object_id:"",unit:"",default:"",isText:!1,showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0,uid:"控制码编号",uid_visible:!0,alias:"控制码别名",alias_visible:!0,description:"描述",description_visible:!0,created:"创建时间",created_visible:!0,last_modified:"更新时间",last_modified_visible:!0}],Ee=[{key:"showAddBtn",label:"添加控制码",type:"checkbox",group:"命令组"},{key:"showViewBtn",label:"查看",type:"checkbox",group:"操作组"},{key:"showEditBtn",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:"description",label:"描述",checkable:!0,checkboxKey:"description_visible"},{key:"created",label:"创建时间",checkable:!0,checkboxKey:"created_visible"},{key:"last_modified",label:"更新时间",checkable:!0,checkboxKey:"last_modified_visible"}],Oe=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Te={},ze={DEFAULT:Se,OPTIONS:Be,DATA:X,PARAMS:Ee,SOURCE:Oe,COMMON:Te},De=e.defineComponent(Q(J({},ze),{__name:"controlList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""},controlUidList:{default:()=>[]}},setup(f){const s=f;class p extends ye.BaseComponent{getDataBool(t,a){var d,u;const r=(u=(d=this.props.conf)==null?void 0:d.data)==null?void 0:u[0];return r&&Object.prototype.hasOwnProperty.call(r,t)&&r[t]!==void 0?!!r[t]:this.getOptionValue(t,a)}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),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(X));else{const a=this.props.conf.data[0],r={showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[u,n]of Object.entries(r))a[u]===void 0&&(a[u]=n);const d={uid_visible:!0,alias_visible:!0,description_visible:!0,created_visible:!0,last_modified_visible:!0};for(const[u,n]of Object.entries(d))a[u]===void 0&&(a[u]=n)}}}const q=new p(s,"controlList");q.setupLifecycle();const b=q.getStyle(),$=e.computed(()=>be.generateTitleStyle(s.conf.options)),I=e.computed(()=>{var a,r,d,u;const o=((r=(a=s.conf)==null?void 0:a.options)==null?void 0:r.columns)||[],t=((u=(d=s.conf)==null?void 0:d.data)==null?void 0:u[0])||{};return(Array.isArray(o)?o:[]).map(n=>{const w=t[n.key],_=t[`${n.key}_visible`];return{prop:n.key,label:w!==void 0&&w!==""?String(w):n.label,width:n.width,minWidth:n.minWidth,visible:_!==void 0?!!_:n.visible!==!1}})}),m=e.reactive({current:1,pageSize:10,total:0}),g=e.ref(""),k=e.ref("name"),R=e.ref([]),j=e.ref(!1);function Y(){const o={page_index:m.current,page_size:m.pageSize},t=g.value.trim();if(t){const a=[[k.value,"like",`%${t}%`]];o.where_and=JSON.stringify(a)}return o}function N(){return B(this,null,function*(){var o,t;j.value=!0;try{const a=yield O.api.post("control_list",Y(),!0),r=(o=a==null?void 0:a.result)!=null?o:a;let d=Array.isArray(r==null?void 0:r.data)?[...r.data]:[];if((t=s.controlUidList)!=null&&t.length){const n=new Set(s.controlUidList.map(String));d=d.filter(w=>n.has(String(w.uid)))}R.value=d;const u=r==null?void 0:r.total_records;m.total=typeof u=="number"?u:d.length,a&&a.code!==void 0&&a.code!==200&&c.ElMessage.warning(a.msg||a.info||"列表接口返回非成功状态")}catch(a){console.error(a),R.value=[],m.total=0,c.ElMessage.error("加载控制码列表失败")}finally{j.value=!1}})}const Z=e.computed(()=>R.value);function ee(o,t){const a=o[t];return a==null?"":String(a)}function K(){m.current=1,N()}function te(){g.value="",m.current=1,N()}function le(){m.current=1,N()}function ie(){N()}e.watch(()=>{var o;return(o=s.controlUidList)==null?void 0:o.join(",")},()=>{m.current=1,N()});const T=e.ref(!1),z=e.ref(!1),x=e.ref(!1),i=e.reactive({id:0,uid:"",name:"",alias:"",description:"",script:"[]",template:"[]"});function M(){i.id=0,i.uid="",i.name="",i.alias="",i.description="",i.script="[]",i.template="[]"}function U(o,t){const a=(o==null?void 0:o.trim())||"";if(!a)return t;try{return JSON.stringify(JSON.parse(a))}catch(r){return null}}function oe(){M(),T.value=!0}function ae(o){return B(this,null,function*(){var t,a,r,d,u,n,w,_,F,y,D,E;M(),z.value=!0,x.value=!0;try{const h=yield O.api.post("control_item",{uid:o.uid},!0),C=(t=h==null?void 0:h.result)!=null?t:h;if(C&&typeof C=="object"){i.id=Number(C.id)||0,i.uid=String((r=(a=C.uid)!=null?a:o.uid)!=null?r:""),i.name=String((d=C.name)!=null?d:""),i.alias=String((u=C.alias)!=null?u:""),i.description=String((n=C.description)!=null?n:"");const S=C.script;i.script=typeof S=="string"?S:S!=null?JSON.stringify(S):"[]";const l=C.template;i.template=typeof l=="string"?l:l!=null?JSON.stringify(l):"[]"}else i.uid=String(o.uid),i.name=String((w=o.name)!=null?w:""),i.alias=String((_=o.alias)!=null?_:""),i.description=String((F=o.description)!=null?F:"")}catch(h){i.uid=String(o.uid),i.name=String((y=o.name)!=null?y:""),i.alias=String((D=o.alias)!=null?D:""),i.description=String((E=o.description)!=null?E:""),c.ElMessage.warning("拉取控制码详情失败,已使用列表行数据编辑")}finally{x.value=!1}})}function re(){return B(this,null,function*(){var a;if(!((a=i.name)!=null&&a.trim())){c.ElMessage.warning("请填写控制码名称");return}const o=U(i.script,"[]"),t=U(i.template,"[]");if(o===null||t===null){c.ElMessage.error("脚本或模板不是合法 JSON");return}x.value=!0;try{yield O.api.post("control_create",{name:i.name.trim(),alias:i.alias.trim(),description:i.description,script:o,template:t},!0),c.ElMessage.success("添加成功"),T.value=!1,yield N()}catch(r){c.ElMessage.error("添加失败")}finally{x.value=!1}})}function ne(){return B(this,null,function*(){var a;if(!((a=i.name)!=null&&a.trim())){c.ElMessage.warning("请填写控制码名称");return}const o=U(i.script,"[]"),t=U(i.template,"[]");if(o===null||t===null){c.ElMessage.error("脚本或模板不是合法 JSON");return}x.value=!0;try{yield O.api.post("control_update",{id:i.id,uid:i.uid,name:i.name.trim(),alias:i.alias.trim(),description:i.description,script:o,template:t},!0),c.ElMessage.success("保存成功"),z.value=!1,yield N()}catch(r){c.ElMessage.error("保存失败")}finally{x.value=!1}})}const L=e.ref(!1),P=e.ref(!1),v=e.ref(null);function se(o){if(o==null)return"";if(typeof o=="string")try{return JSON.stringify(JSON.parse(o),null,2)}catch(t){return o}try{return JSON.stringify(o,null,2)}catch(t){return String(o)}}const de=e.computed(()=>v.value?se(v.value.script):"");function ue(o){return B(this,null,function*(){v.value=null,L.value=!0,P.value=!0;try{const t=yield O.api.post("control_item",{uid:o.uid},!0),a=t==null?void 0:t.result;a&&typeof a=="object"?v.value=a:(v.value=J({},o),c.ElMessage.warning("未返回详情,已显示列表行数据"))}catch(t){v.value=J({},o),c.ElMessage.warning("加载详情失败,已显示列表行数据")}finally{P.value=!1}})}function ce(o){c.ElMessageBox.confirm(`确认对控制码「${o.name||o.uid}」进行资料备档吗?`,"提示",{type:"info"}).then(()=>{c.ElMessage.success("已提交备档(完整流程请在 mixui 控制码管理中操作)")}).catch(()=>{})}function pe(o){c.ElMessageBox.confirm(`确认删除控制码「${o.name||o.uid}」吗?`,"警告",{type:"warning"}).then(()=>B(null,null,function*(){try{yield O.api.post("control_delete",{uid:o.uid,id:o.id},!0),c.ElMessage.success("删除成功"),yield N()}catch(t){c.ElMessage.error("删除失败")}})).catch(()=>{})}return e.onMounted(()=>{N()}),(o,t)=>{const a=V.ElIcon,r=V.ElInput,d=V.ElOption,u=V.ElSelect,n=V.ElButton,w=V.ElTableColumn,_=V.ElTable,F=V.ElPagination,y=V.ElFormItem,D=V.ElForm,E=V.ElDialog,h=V.ElDescriptionsItem,C=V.ElDescriptions,S=V.ElLoadingDirective;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"control-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($.value)},e.toDisplayString(f.conf.caption||f.conf.name),5)),e.createElementVNode("div",Ce,[e.createElementVNode("div",Ne,[e.createVNode(r,{modelValue:g.value,"onUpdate:modelValue":t[0]||(t[0]=l=>g.value=l),placeholder:"搜索控制码",size:"small",class:"toolbar-search",onKeyup:e.withKeys(K,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(a,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(we.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(u,{modelValue:k.value,"onUpdate:modelValue":t[1]||(t[1]=l=>k.value=l),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(d,{label:"控制码名称",value:"name"}),e.createVNode(d,{label:"控制码编号",value:"uid"}),e.createVNode(d,{label:"控制码别名",value:"alias"}),e.createVNode(d,{label:"描述",value:"description"})]),_:1},8,["modelValue"]),e.createVNode(n,{type:"primary",onClick:K},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(n,{onClick:te},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(b).showAddBtn?(e.openBlock(),e.createBlock(n,{key:0,type:"success",onClick:oe},{default:e.withCtx(()=>[...t[21]||(t[21]=[e.createTextVNode("添加控制码",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",xe,[e.createVNode(_,{data:Z.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.prop},[l.visible?(e.openBlock(),e.createBlock(w,{key:0,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth},{default:e.withCtx(A=>[e.createElementVNode("span",null,e.toDisplayString(ee(A.row,l.prop)),1)]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(w,{label:"操作","min-width":"220",fixed:"right"},{default:e.withCtx(l=>[e.unref(b).showViewBtn?(e.openBlock(),e.createBlock(n,{key:0,size:"small",onClick:A=>ue(l.row)},{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createTextVNode("查看",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showEditBtn?(e.openBlock(),e.createBlock(n,{key:1,size:"small",type:"primary",onClick:A=>ae(l.row)},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showArchiveBtn?(e.openBlock(),e.createBlock(n,{key:2,size:"small",type:"info",onClick:A=>ce(l.row)},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("资料备档",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showDeleteBtn?(e.openBlock(),e.createBlock(n,{key:3,size:"small",type:"danger",onClick:A=>pe(l.row)},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",ke,[e.createVNode(F,{"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:le,onCurrentChange:ie},null,8,["current-page","page-size","total"])])]),e.renderSlot(o.$slots,"default",{},void 0,!0)],4)),[[S,j.value]]),e.createVNode(E,{modelValue:T.value,"onUpdate:modelValue":t[9]||(t[9]=l=>T.value=l),title:"添加控制码",width:"640px","destroy-on-close":"",onClosed:M},{footer:e.withCtx(()=>[e.createVNode(n,{onClick:t[8]||(t[8]=l=>T.value=!1)},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(n,{type:"primary",loading:x.value,onClick:re},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(D,{model:i,"label-width":"110px"},{default:e.withCtx(()=>[e.createVNode(y,{label:"控制码名称",required:""},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.name,"onUpdate:modelValue":t[4]||(t[4]=l=>i.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码别名"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.alias,"onUpdate:modelValue":t[5]||(t[5]=l=>i.alias=l),placeholder:"可选"},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.description,"onUpdate:modelValue":t[6]||(t[6]=l=>i.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码脚本"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.script,"onUpdate:modelValue":t[7]||(t[7]=l=>i.script=l),type:"textarea",rows:8,placeholder:"JSON 数组,默认 []"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(E,{modelValue:z.value,"onUpdate:modelValue":t[16]||(t[16]=l=>z.value=l),title:"编辑控制码",width:"640px","destroy-on-close":"",onClosed:M},{footer:e.withCtx(()=>[e.createVNode(n,{onClick:t[15]||(t[15]=l=>z.value=!1)},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(n,{type:"primary",loading:x.value,onClick:ne},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(D,{model:i,"label-width":"110px"},{default:e.withCtx(()=>[e.createVNode(y,{label:"控制码编号"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.uid,"onUpdate:modelValue":t[10]||(t[10]=l=>i.uid=l),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码名称",required:""},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.name,"onUpdate:modelValue":t[11]||(t[11]=l=>i.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码别名"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.alias,"onUpdate:modelValue":t[12]||(t[12]=l=>i.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.description,"onUpdate:modelValue":t[13]||(t[13]=l=>i.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码脚本"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.script,"onUpdate:modelValue":t[14]||(t[14]=l=>i.script=l),type:"textarea",rows:8},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(E,{modelValue:L.value,"onUpdate:modelValue":t[18]||(t[18]=l=>L.value=l),title:"控制码详情",width:"720px","destroy-on-close":""},{footer:e.withCtx(()=>[e.createVNode(n,{type:"primary",onClick:t[17]||(t[17]=l=>L.value=!1)},{default:e.withCtx(()=>[...t[31]||(t[31]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",_e,[v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(C,{column:2,border:""},{default:e.withCtx(()=>[e.createVNode(h,{label:"控制码编号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.uid)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"控制码名称"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.name)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"控制码别名"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.alias)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"创建时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.created)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"更新时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.last_modified)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"描述",span:2},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.description)!=null?l:""),1)]}),_:1})]),_:1}),t[30]||(t[30]=e.createElementVNode("div",{class:"view-block-title"},"控制码脚本",-1)),e.createVNode(r,{"model-value":de.value,type:"textarea",rows:10,readonly:""},null,8,["model-value"])],64)):e.createCommentVNode("",!0)])),[[S,P.value]])]),_:1},8,["modelValue"])],64)}}})),Ae=he._export_sfc(De,[["__scopeId","data-v-69bc758b"]]);exports.default=Ae;
|
|
1
|
+
"use strict";var me=Object.defineProperty,fe=Object.defineProperties;var Ve=Object.getOwnPropertyDescriptors;var H=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable;var W=(f,s,p)=>s in f?me(f,s,{enumerable:!0,configurable:!0,writable:!0,value:p}):f[s]=p,J=(f,s)=>{for(var p in s||(s={}))ve.call(s,p)&&W(f,p,s[p]);if(H)for(var p of H(s))ge.call(s,p)&&W(f,p,s[p]);return f},Q=(f,s)=>fe(f,Ve(s));var B=(f,s,p)=>new Promise((q,b)=>{var $=g=>{try{m(p.next(g))}catch(k){b(k)}},I=g=>{try{m(p.throw(g))}catch(k){b(k)}},m=g=>g.done?q(g.value):Promise.resolve(g.value).then($,I);m((p=p.apply(f,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/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"),ye=require("./element-resize-detector-BlMXyWIR.cjs"),he=require("./index-EnNA0nIi.cjs"),be=require("./titleStyle-NSnz6cUg.cjs"),c=require("element-plus"),we=require("@element-plus/icons-vue"),O=require("./api-C0okiLNC.cjs"),G=require("./ele-lst-icon-CrxnHZ-A.cjs"),Ce={class:"mix-body"},Ne={class:"toolbar"},xe={class:"table-wrapper"},ke={class:"pagination"},_e={class:"view-body"},Se={DEFAULT_ICON:G.DEFAULT_ICON,ACTIVE_ICON:G.ACTIVE_ICON,NAME_CN:"控制码列表",NAME_EN:"ControlList",ORDER:3},Be={bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"uid",label:"控制码编号",width:160,visible:!0},{key:"alias",label:"控制码别名",width:140,visible:!0},{key:"name",label:"控制码名称",width:160,visible:!0},{key:"description",label:"描述",minWidth:160,visible:!0},{key:"created",label:"创建时间",width:170,visible:!0},{key:"last_modified",label:"更新时间",width:170,visible:!0}]},X=[{name:"控制码名称",fv:"",object_id:"",unit:"",default:"",isText:!1,showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0,uid:"控制码编号",uid_visible:!0,alias:"控制码别名",alias_visible:!0,description:"描述",description_visible:!0,created:"创建时间",created_visible:!0,last_modified:"更新时间",last_modified_visible:!0}],Ee=[{key:"showAddBtn",label:"添加控制码",type:"checkbox",group:"命令组"},{key:"showViewBtn",label:"查看",type:"checkbox",group:"操作组"},{key:"showEditBtn",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:"description",label:"描述",checkable:!0,checkboxKey:"description_visible"},{key:"created",label:"创建时间",checkable:!0,checkboxKey:"created_visible"},{key:"last_modified",label:"更新时间",checkable:!0,checkboxKey:"last_modified_visible"}],Oe=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Te={},ze={DEFAULT:Se,OPTIONS:Be,DATA:X,PARAMS:Ee,SOURCE:Oe,COMMON:Te},De=e.defineComponent(Q(J({},ze),{__name:"controlList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""},controlUidList:{default:()=>[]}},setup(f){const s=f;class p extends ye.BaseComponent{getDataBool(t,a){var d,u;const r=(u=(d=this.props.conf)==null?void 0:d.data)==null?void 0:u[0];return r&&Object.prototype.hasOwnProperty.call(r,t)&&r[t]!==void 0?!!r[t]:this.getOptionValue(t,a)}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),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(X));else{const a=this.props.conf.data[0],r={showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[u,n]of Object.entries(r))a[u]===void 0&&(a[u]=n);const d={uid_visible:!0,alias_visible:!0,description_visible:!0,created_visible:!0,last_modified_visible:!0};for(const[u,n]of Object.entries(d))a[u]===void 0&&(a[u]=n)}}}const q=new p(s,"controlList");q.setupLifecycle();const b=q.getStyle(),$=e.computed(()=>be.generateTitleStyle(s.conf.options)),I=e.computed(()=>{var a,r,d,u;const o=((r=(a=s.conf)==null?void 0:a.options)==null?void 0:r.columns)||[],t=((u=(d=s.conf)==null?void 0:d.data)==null?void 0:u[0])||{};return(Array.isArray(o)?o:[]).map(n=>{const w=t[n.key],_=t[`${n.key}_visible`];return{prop:n.key,label:w!==void 0&&w!==""?String(w):n.label,width:n.width,minWidth:n.minWidth,visible:_!==void 0?!!_:n.visible!==!1}})}),m=e.reactive({current:1,pageSize:10,total:0}),g=e.ref(""),k=e.ref("name"),R=e.ref([]),j=e.ref(!1);function Y(){const o={page_index:m.current,page_size:m.pageSize},t=g.value.trim();if(t){const a=[[k.value,"like",`%${t}%`]];o.where_and=JSON.stringify(a)}return o}function N(){return B(this,null,function*(){var o,t;j.value=!0;try{const a=yield O.api.post("control_list",Y(),!0),r=(o=a==null?void 0:a.result)!=null?o:a;let d=Array.isArray(r==null?void 0:r.data)?[...r.data]:[];if((t=s.controlUidList)!=null&&t.length){const n=new Set(s.controlUidList.map(String));d=d.filter(w=>n.has(String(w.uid)))}R.value=d;const u=r==null?void 0:r.total_records;m.total=typeof u=="number"?u:d.length,a&&a.code!==void 0&&a.code!==200&&c.ElMessage.warning(a.msg||a.info||"列表接口返回非成功状态")}catch(a){console.error(a),R.value=[],m.total=0,c.ElMessage.error("加载控制码列表失败")}finally{j.value=!1}})}const Z=e.computed(()=>R.value);function ee(o,t){const a=o[t];return a==null?"":String(a)}function K(){m.current=1,N()}function te(){g.value="",m.current=1,N()}function le(){m.current=1,N()}function ie(){N()}e.watch(()=>{var o;return(o=s.controlUidList)==null?void 0:o.join(",")},()=>{m.current=1,N()});const T=e.ref(!1),z=e.ref(!1),x=e.ref(!1),i=e.reactive({id:0,uid:"",name:"",alias:"",description:"",script:"[]",template:"[]"});function M(){i.id=0,i.uid="",i.name="",i.alias="",i.description="",i.script="[]",i.template="[]"}function U(o,t){const a=(o==null?void 0:o.trim())||"";if(!a)return t;try{return JSON.stringify(JSON.parse(a))}catch(r){return null}}function oe(){M(),T.value=!0}function ae(o){return B(this,null,function*(){var t,a,r,d,u,n,w,_,F,y,D,E;M(),z.value=!0,x.value=!0;try{const h=yield O.api.post("control_item",{uid:o.uid},!0),C=(t=h==null?void 0:h.result)!=null?t:h;if(C&&typeof C=="object"){i.id=Number(C.id)||0,i.uid=String((r=(a=C.uid)!=null?a:o.uid)!=null?r:""),i.name=String((d=C.name)!=null?d:""),i.alias=String((u=C.alias)!=null?u:""),i.description=String((n=C.description)!=null?n:"");const S=C.script;i.script=typeof S=="string"?S:S!=null?JSON.stringify(S):"[]";const l=C.template;i.template=typeof l=="string"?l:l!=null?JSON.stringify(l):"[]"}else i.uid=String(o.uid),i.name=String((w=o.name)!=null?w:""),i.alias=String((_=o.alias)!=null?_:""),i.description=String((F=o.description)!=null?F:"")}catch(h){i.uid=String(o.uid),i.name=String((y=o.name)!=null?y:""),i.alias=String((D=o.alias)!=null?D:""),i.description=String((E=o.description)!=null?E:""),c.ElMessage.warning("拉取控制码详情失败,已使用列表行数据编辑")}finally{x.value=!1}})}function re(){return B(this,null,function*(){var a;if(!((a=i.name)!=null&&a.trim())){c.ElMessage.warning("请填写控制码名称");return}const o=U(i.script,"[]"),t=U(i.template,"[]");if(o===null||t===null){c.ElMessage.error("脚本或模板不是合法 JSON");return}x.value=!0;try{yield O.api.post("control_create",{name:i.name.trim(),alias:i.alias.trim(),description:i.description,script:o,template:t},!0),c.ElMessage.success("添加成功"),T.value=!1,yield N()}catch(r){c.ElMessage.error("添加失败")}finally{x.value=!1}})}function ne(){return B(this,null,function*(){var a;if(!((a=i.name)!=null&&a.trim())){c.ElMessage.warning("请填写控制码名称");return}const o=U(i.script,"[]"),t=U(i.template,"[]");if(o===null||t===null){c.ElMessage.error("脚本或模板不是合法 JSON");return}x.value=!0;try{yield O.api.post("control_update",{id:i.id,uid:i.uid,name:i.name.trim(),alias:i.alias.trim(),description:i.description,script:o,template:t},!0),c.ElMessage.success("保存成功"),z.value=!1,yield N()}catch(r){c.ElMessage.error("保存失败")}finally{x.value=!1}})}const L=e.ref(!1),P=e.ref(!1),v=e.ref(null);function se(o){if(o==null)return"";if(typeof o=="string")try{return JSON.stringify(JSON.parse(o),null,2)}catch(t){return o}try{return JSON.stringify(o,null,2)}catch(t){return String(o)}}const de=e.computed(()=>v.value?se(v.value.script):"");function ue(o){return B(this,null,function*(){v.value=null,L.value=!0,P.value=!0;try{const t=yield O.api.post("control_item",{uid:o.uid},!0),a=t==null?void 0:t.result;a&&typeof a=="object"?v.value=a:(v.value=J({},o),c.ElMessage.warning("未返回详情,已显示列表行数据"))}catch(t){v.value=J({},o),c.ElMessage.warning("加载详情失败,已显示列表行数据")}finally{P.value=!1}})}function ce(o){c.ElMessageBox.confirm(`确认对控制码「${o.name||o.uid}」进行资料备档吗?`,"提示",{type:"info"}).then(()=>{c.ElMessage.success("已提交备档(完整流程请在 mixui 控制码管理中操作)")}).catch(()=>{})}function pe(o){c.ElMessageBox.confirm(`确认删除控制码「${o.name||o.uid}」吗?`,"警告",{type:"warning"}).then(()=>B(null,null,function*(){try{yield O.api.post("control_delete",{uid:o.uid,id:o.id},!0),c.ElMessage.success("删除成功"),yield N()}catch(t){c.ElMessage.error("删除失败")}})).catch(()=>{})}return e.onMounted(()=>{N()}),(o,t)=>{const a=V.ElIcon,r=V.ElInput,d=V.ElOption,u=V.ElSelect,n=V.ElButton,w=V.ElTableColumn,_=V.ElTable,F=V.ElPagination,y=V.ElFormItem,D=V.ElForm,E=V.ElDialog,h=V.ElDescriptionsItem,C=V.ElDescriptions,S=V.ElLoadingDirective;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"control-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($.value)},e.toDisplayString(f.conf.caption||f.conf.name),5)),e.createElementVNode("div",Ce,[e.createElementVNode("div",Ne,[e.createVNode(r,{modelValue:g.value,"onUpdate:modelValue":t[0]||(t[0]=l=>g.value=l),placeholder:"搜索控制码",size:"small",class:"toolbar-search",onKeyup:e.withKeys(K,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(a,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(we.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(u,{modelValue:k.value,"onUpdate:modelValue":t[1]||(t[1]=l=>k.value=l),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(d,{label:"控制码名称",value:"name"}),e.createVNode(d,{label:"控制码编号",value:"uid"}),e.createVNode(d,{label:"控制码别名",value:"alias"}),e.createVNode(d,{label:"描述",value:"description"})]),_:1},8,["modelValue"]),e.createVNode(n,{type:"primary",onClick:K},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(n,{onClick:te},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(b).showAddBtn?(e.openBlock(),e.createBlock(n,{key:0,type:"success",onClick:oe},{default:e.withCtx(()=>[...t[21]||(t[21]=[e.createTextVNode("添加控制码",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",xe,[e.createVNode(_,{data:Z.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.prop},[l.visible?(e.openBlock(),e.createBlock(w,{key:0,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth},{default:e.withCtx(A=>[e.createElementVNode("span",null,e.toDisplayString(ee(A.row,l.prop)),1)]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(w,{label:"操作","min-width":"220",fixed:"right"},{default:e.withCtx(l=>[e.unref(b).showViewBtn?(e.openBlock(),e.createBlock(n,{key:0,size:"small",onClick:A=>ue(l.row)},{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createTextVNode("查看",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showEditBtn?(e.openBlock(),e.createBlock(n,{key:1,size:"small",type:"primary",onClick:A=>ae(l.row)},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showArchiveBtn?(e.openBlock(),e.createBlock(n,{key:2,size:"small",type:"info",onClick:A=>ce(l.row)},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("资料备档",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(b).showDeleteBtn?(e.openBlock(),e.createBlock(n,{key:3,size:"small",type:"danger",onClick:A=>pe(l.row)},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",ke,[e.createVNode(F,{"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:le,onCurrentChange:ie},null,8,["current-page","page-size","total"])])]),e.renderSlot(o.$slots,"default",{},void 0,!0)],4)),[[S,j.value]]),e.createVNode(E,{modelValue:T.value,"onUpdate:modelValue":t[9]||(t[9]=l=>T.value=l),title:"添加控制码",width:"640px","destroy-on-close":"",onClosed:M},{footer:e.withCtx(()=>[e.createVNode(n,{onClick:t[8]||(t[8]=l=>T.value=!1)},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(n,{type:"primary",loading:x.value,onClick:re},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(D,{model:i,"label-width":"110px"},{default:e.withCtx(()=>[e.createVNode(y,{label:"控制码名称",required:""},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.name,"onUpdate:modelValue":t[4]||(t[4]=l=>i.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码别名"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.alias,"onUpdate:modelValue":t[5]||(t[5]=l=>i.alias=l),placeholder:"可选"},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.description,"onUpdate:modelValue":t[6]||(t[6]=l=>i.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码脚本"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.script,"onUpdate:modelValue":t[7]||(t[7]=l=>i.script=l),type:"textarea",rows:8,placeholder:"JSON 数组,默认 []"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(E,{modelValue:z.value,"onUpdate:modelValue":t[16]||(t[16]=l=>z.value=l),title:"编辑控制码",width:"640px","destroy-on-close":"",onClosed:M},{footer:e.withCtx(()=>[e.createVNode(n,{onClick:t[15]||(t[15]=l=>z.value=!1)},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(n,{type:"primary",loading:x.value,onClick:ne},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(D,{model:i,"label-width":"110px"},{default:e.withCtx(()=>[e.createVNode(y,{label:"控制码编号"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.uid,"onUpdate:modelValue":t[10]||(t[10]=l=>i.uid=l),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码名称",required:""},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.name,"onUpdate:modelValue":t[11]||(t[11]=l=>i.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码别名"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.alias,"onUpdate:modelValue":t[12]||(t[12]=l=>i.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.description,"onUpdate:modelValue":t[13]||(t[13]=l=>i.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1}),e.createVNode(y,{label:"控制码脚本"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:i.script,"onUpdate:modelValue":t[14]||(t[14]=l=>i.script=l),type:"textarea",rows:8},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(E,{modelValue:L.value,"onUpdate:modelValue":t[18]||(t[18]=l=>L.value=l),title:"控制码详情",width:"720px","destroy-on-close":""},{footer:e.withCtx(()=>[e.createVNode(n,{type:"primary",onClick:t[17]||(t[17]=l=>L.value=!1)},{default:e.withCtx(()=>[...t[31]||(t[31]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",_e,[v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(C,{column:2,border:""},{default:e.withCtx(()=>[e.createVNode(h,{label:"控制码编号"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.uid)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"控制码名称"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.name)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"控制码别名"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.alias)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"创建时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.created)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"更新时间"},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.last_modified)!=null?l:""),1)]}),_:1}),e.createVNode(h,{label:"描述",span:2},{default:e.withCtx(()=>{var l;return[e.createTextVNode(e.toDisplayString((l=v.value.description)!=null?l:""),1)]}),_:1})]),_:1}),t[30]||(t[30]=e.createElementVNode("div",{class:"view-block-title"},"控制码脚本",-1)),e.createVNode(r,{"model-value":de.value,type:"textarea",rows:10,readonly:""},null,8,["model-value"])],64)):e.createCommentVNode("",!0)])),[[S,P.value]])]),_:1},8,["modelValue"])],64)}}})),Ae=he._export_sfc(De,[["__scopeId","data-v-69bc758b"]]);exports.default=Ae;
|
|
@@ -39,12 +39,12 @@ import "element-plus/es/components/option/style/css";
|
|
|
39
39
|
import "element-plus/es/components/input/style/css";
|
|
40
40
|
import "element-plus/es/components/icon/style/css";
|
|
41
41
|
import { defineComponent as ge, computed as K, reactive as ke, ref as O, onMounted as we, withDirectives as Se, openBlock as _, createElementBlock as k, normalizeStyle as q, unref as w, toDisplayString as M, createCommentVNode as I, createElementVNode as V, createVNode as p, withKeys as Ce, withCtx as b, createTextVNode as B, createBlock as U, Fragment as Q, renderList as xe, renderSlot as Ee } from "vue";
|
|
42
|
-
import { B as ze } from "./element-resize-detector-
|
|
43
|
-
import { _ as Oe } from "./index-
|
|
42
|
+
import { B as ze } from "./element-resize-detector-DeMhGbNi.js";
|
|
43
|
+
import { _ as Oe } from "./index-zPaMBZk-.js";
|
|
44
44
|
import { g as Ve } from "./titleStyle-BT5GlpAb.js";
|
|
45
45
|
import { ElMessage as y, ElMessageBox as Be } from "element-plus";
|
|
46
46
|
import { Search as je } from "@element-plus/icons-vue";
|
|
47
|
-
import { a as Y } from "./api-
|
|
47
|
+
import { a as Y } from "./api-DhQsrEGY.js";
|
|
48
48
|
import { A as Te, D as De } from "./ele-lst-icon-CKpeRKmk.js";
|
|
49
49
|
const Re = { class: "mix-body" }, Ne = { class: "toolbar" }, Ae = { class: "table-wrapper" }, Le = { key: 1 }, $e = { class: "pagination" }, Ke = {
|
|
50
50
|
DEFAULT_ICON: De,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var W=Object.defineProperty,Q=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var R=(u,l,n)=>l in u?W(u,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[l]=n,O=(u,l)=>{for(var n in l||(l={}))G.call(l,n)&&R(u,n,l[n]);if(D)for(var n of D(l))X.call(l,n)&&R(u,n,l[n]);return u},M=(u,l)=>Q(u,Y(l));var T=(u,l,n)=>new Promise((g,_)=>{var x=p=>{try{s(n.next(p))}catch(v){_(v)}},E=p=>{try{s(n.throw(p))}catch(v){_(v)}},s=p=>p.done?g(p.value):Promise.resolve(p.value).then(x,E);s((n=n.apply(u,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=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/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"),Z=require("./element-resize-detector-Bo5uDQAu.cjs"),ee=require("./index-Mh5Dw2sd.cjs"),te=require("./titleStyle-NSnz6cUg.cjs"),h=require("element-plus"),oe=require("@element-plus/icons-vue"),A=require("./api-P_s372dW.cjs"),L=require("./ele-lst-icon-CrxnHZ-A.cjs"),ae={class:"mix-body"},ie={class:"toolbar"},le={class:"table-wrapper"},re={key:1},ne={class:"pagination"},se={DEFAULT_ICON:L.DEFAULT_ICON,ACTIVE_ICON:L.ACTIVE_ICON,NAME_CN:"控制记录",NAME_EN:"ControlRecordList",ORDER:4},ce={bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"object_id",label:"对象编号",width:140,visible:!0},{key:"created_by",label:"用户名",width:120,visible:!0},{key:"command",label:"控制码指令",width:140,visible:!0},{key:"command_name",label:"指令名称",width:140,visible:!0},{key:"value",label:"控制值",width:120,visible:!0},{key:"status",label:"下发状态",width:100,visible:!0},{key:"created",label:"控制时间",width:180,visible:!0}]},$=[{name:"控制记录",fv:"",object_id:"",unit:"",default:"",isText:!1,showExportBtn:!0,object_id_label:"对象编号",object_id_visible:!0,created_by:"用户名",created_by_visible:!0,command:"控制码指令",command_visible:!0,command_name:"指令名称",command_name_visible:!0,value:"控制值",value_visible:!0,status:"下发状态",status_visible:!0,created:"控制时间",created_visible:!0}],ue=[{key:"showExportBtn",label:"导出按钮",type:"checkbox",group:"命令组"},{key:"name",label:"参数名称"},{key:"object_id_label",label:"对象编号",checkable:!0,checkboxKey:"object_id_visible"},{key:"created_by",label:"用户名",checkable:!0,checkboxKey:"created_by_visible"},{key:"command",label:"控制码指令",checkable:!0,checkboxKey:"command_visible"},{key:"command_name",label:"指令名称",checkable:!0,checkboxKey:"command_name_visible"},{key:"value",label:"控制值",checkable:!0,checkboxKey:"value_visible"},{key:"status",label:"下发状态",checkable:!0,checkboxKey:"status_visible"},{key:"created",label:"控制时间",checkable:!0,checkboxKey:"created_visible"}],de=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],pe={},be={DEFAULT:se,OPTIONS:ce,DATA:$,PARAMS:ue,SOURCE:de,COMMON:pe},me=e.defineComponent(M(O({},be),{__name:"controlRecordList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""}},setup(u){const l=u;class n extends Z.BaseComponent{getDataBool(t,o){var r,b;const i=(b=(r=this.props.conf)==null?void 0:r.data)==null?void 0:b[0];return i&&Object.prototype.hasOwnProperty.call(i,t)&&i[t]!==void 0?!!i[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),showExportBtn:this.getDataBool("showExportBtn",!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($));else{const o=this.props.conf.data[0];o.showExportBtn===void 0&&(o.showExportBtn=!0);const i={object_id_visible:!0,created_by_visible:!0,command_visible:!0,command_name_visible:!0,value_visible:!0,status_visible:!0,created_visible:!0};for(const[r,b]of Object.entries(i))o[r]===void 0&&(o[r]=b)}}}const g=new n(l,"controlRecordList");g.setupLifecycle();const _=g.getStyle(),x=e.computed(()=>te.generateTitleStyle(l.conf.options)),E=e.computed(()=>{var o,i,r,b;const a=((i=(o=l.conf)==null?void 0:o.options)==null?void 0:i.columns)||[],t=((b=(r=l.conf)==null?void 0:r.data)==null?void 0:b[0])||{};return(Array.isArray(a)?a:[]).map(d=>{var C;let w=d.key;d.key==="object_id"&&(w="object_id_label");const f=(C=t[w])!=null?C:t[d.key],z=d.key==="object_id"?"object_id_visible":`${d.key}_visible`,S=t[z];return{prop:d.key,label:f!==void 0&&f!==""?String(f):d.label,width:d.width,minWidth:d.minWidth,visible:S!==void 0?!!S:d.visible!==!1}})}),s=e.reactive({current:1,pageSize:10,total:0}),p=e.ref(""),v=e.ref("object_id"),k=e.ref([]),V=e.ref(!1);function I(){const a={page_index:s.current,page_size:s.pageSize},t=p.value.trim();if(t){const o=[[v.value,"like",`%${t}%`]];a.where_and=JSON.stringify(o)}return a}function q(a){const t=a.error;return t===""||t===null||t===void 0}function y(){return T(this,null,function*(){var a;V.value=!0;try{const t=yield A.api.post("get_control_record_list",I(),!0),o=(a=t==null?void 0:t.result)!=null?a:t,i=Array.isArray(o==null?void 0:o.data)?o.data:[];k.value=i.map(b=>O({},b));const r=o==null?void 0:o.total_records;s.total=typeof r=="number"?r:i.length,t&&t.code!==void 0&&t.code!==200&&h.ElMessage.warning(t.msg||t.info||"列表接口返回非成功状态")}catch(t){console.error(t),k.value=[],s.total=0,h.ElMessage.error("加载控制记录失败")}finally{V.value=!1}})}const K=e.computed(()=>k.value);function P(a,t){const o=a[t];return o==null?"":String(o)}function j(){s.current=1,y()}function U(){p.value="",s.current=1,y()}function F(){s.current=1,y()}function H(){y()}function N(a){const t=o=>String(o).padStart(2,"0");return`${a.getFullYear()}-${t(a.getMonth()+1)}-${t(a.getDate())} ${t(a.getHours())}:${t(a.getMinutes())}:${t(a.getSeconds())}`}function J(){return T(this,null,function*(){const a=[...new Set(k.value.map(i=>{var r;return String((r=i.object_id)!=null?r:"").trim()}).filter(Boolean))];if(!a.length){h.ElMessage.warning("当前列表无对象编号,请加载记录后再导出");return}const t=new Date,o=new Date(t.getTime()-168*3600*1e3);try{yield h.ElMessageBox.confirm(`将按最近 7 天、当前已加载列表中的 ${a.length} 个对象编号发起导出任务,是否继续?`,"导出控制记录",{type:"info"})}catch(i){return}try{const i=yield A.api.post("export_control_record",{file_name:`control_record_${N(t).replace(/[: ]/g,"_")}`,start_time:N(o),end_time:N(t),object_ids:a},!0);if(i.code!==void 0&&i.code!==200){h.ElMessage.warning(i.msg||i.info||"导出请求未成功");return}h.ElMessage.success("导出任务已提交")}catch(i){h.ElMessage.error("导出请求失败")}})}return e.onMounted(()=>{y()}),(a,t)=>{const o=m.ElIcon,i=m.ElInput,r=m.ElOption,b=m.ElSelect,d=m.ElButton,w=m.ElTag,f=m.ElTableColumn,z=m.ElTable,S=m.ElPagination,C=m.ElLoadingDirective;return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"control-record-list mix-component",style:e.normalizeStyle({backgroundColor:e.unref(_).bgColor,borderRadius:`${e.unref(_).radiusSize}px`})},[e.unref(_).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(x.value)},e.toDisplayString(u.conf.caption||u.conf.name),5)),e.createElementVNode("div",ae,[e.createElementVNode("div",ie,[e.createVNode(i,{modelValue:p.value,"onUpdate:modelValue":t[0]||(t[0]=c=>p.value=c),placeholder:"搜索控制记录",size:"small",class:"toolbar-search",onKeyup:e.withKeys(j,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(o,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(b,{modelValue:v.value,"onUpdate:modelValue":t[1]||(t[1]=c=>v.value=c),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(r,{label:"对象编号",value:"object_id"}),e.createVNode(r,{label:"用户名",value:"created_by"}),e.createVNode(r,{label:"控制码指令",value:"command"}),e.createVNode(r,{label:"指令名称",value:"command_name"})]),_:1},8,["modelValue"]),e.createVNode(d,{type:"primary",onClick:j},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(d,{onClick:U},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(_).showExportBtn?(e.openBlock(),e.createBlock(d,{key:0,type:"success",onClick:J},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("导出",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",le,[e.createVNode(z,{data:K.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,c=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c.prop},[c.visible?(e.openBlock(),e.createBlock(f,{key:0,prop:c.prop,label:c.label,width:c.width,"min-width":c.minWidth},{default:e.withCtx(B=>[c.prop==="status"?(e.openBlock(),e.createBlock(w,{key:0,type:q(B.row)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(q(B.row)?"成功":"失败"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(P(B.row,c.prop)),1))]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128))]),_:1},8,["data"])]),e.createElementVNode("div",ne,[e.createVNode(S,{"current-page":s.current,"onUpdate:currentPage":t[2]||(t[2]=c=>s.current=c),"page-size":s.pageSize,"onUpdate:pageSize":t[3]||(t[3]=c=>s.pageSize=c),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:s.total,onSizeChange:F,onCurrentChange:H},null,8,["current-page","page-size","total"])])]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)),[[C,V.value]])}}})),_e=ee._export_sfc(me,[["__scopeId","data-v-3261ecd2"]]);exports.default=_e;
|
|
1
|
+
"use strict";var W=Object.defineProperty,Q=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var R=(u,l,n)=>l in u?W(u,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):u[l]=n,O=(u,l)=>{for(var n in l||(l={}))G.call(l,n)&&R(u,n,l[n]);if(D)for(var n of D(l))X.call(l,n)&&R(u,n,l[n]);return u},M=(u,l)=>Q(u,Y(l));var T=(u,l,n)=>new Promise((g,_)=>{var x=p=>{try{s(n.next(p))}catch(v){_(v)}},E=p=>{try{s(n.throw(p))}catch(v){_(v)}},s=p=>p.done?g(p.value):Promise.resolve(p.value).then(x,E);s((n=n.apply(u,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=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/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"),Z=require("./element-resize-detector-BlMXyWIR.cjs"),ee=require("./index-EnNA0nIi.cjs"),te=require("./titleStyle-NSnz6cUg.cjs"),h=require("element-plus"),oe=require("@element-plus/icons-vue"),A=require("./api-C0okiLNC.cjs"),L=require("./ele-lst-icon-CrxnHZ-A.cjs"),ae={class:"mix-body"},ie={class:"toolbar"},le={class:"table-wrapper"},re={key:1},ne={class:"pagination"},se={DEFAULT_ICON:L.DEFAULT_ICON,ACTIVE_ICON:L.ACTIVE_ICON,NAME_CN:"控制记录",NAME_EN:"ControlRecordList",ORDER:4},ce={bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"object_id",label:"对象编号",width:140,visible:!0},{key:"created_by",label:"用户名",width:120,visible:!0},{key:"command",label:"控制码指令",width:140,visible:!0},{key:"command_name",label:"指令名称",width:140,visible:!0},{key:"value",label:"控制值",width:120,visible:!0},{key:"status",label:"下发状态",width:100,visible:!0},{key:"created",label:"控制时间",width:180,visible:!0}]},$=[{name:"控制记录",fv:"",object_id:"",unit:"",default:"",isText:!1,showExportBtn:!0,object_id_label:"对象编号",object_id_visible:!0,created_by:"用户名",created_by_visible:!0,command:"控制码指令",command_visible:!0,command_name:"指令名称",command_name_visible:!0,value:"控制值",value_visible:!0,status:"下发状态",status_visible:!0,created:"控制时间",created_visible:!0}],ue=[{key:"showExportBtn",label:"导出按钮",type:"checkbox",group:"命令组"},{key:"name",label:"参数名称"},{key:"object_id_label",label:"对象编号",checkable:!0,checkboxKey:"object_id_visible"},{key:"created_by",label:"用户名",checkable:!0,checkboxKey:"created_by_visible"},{key:"command",label:"控制码指令",checkable:!0,checkboxKey:"command_visible"},{key:"command_name",label:"指令名称",checkable:!0,checkboxKey:"command_name_visible"},{key:"value",label:"控制值",checkable:!0,checkboxKey:"value_visible"},{key:"status",label:"下发状态",checkable:!0,checkboxKey:"status_visible"},{key:"created",label:"控制时间",checkable:!0,checkboxKey:"created_visible"}],de=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],pe={},be={DEFAULT:se,OPTIONS:ce,DATA:$,PARAMS:ue,SOURCE:de,COMMON:pe},me=e.defineComponent(M(O({},be),{__name:"controlRecordList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""}},setup(u){const l=u;class n extends Z.BaseComponent{getDataBool(t,o){var r,b;const i=(b=(r=this.props.conf)==null?void 0:r.data)==null?void 0:b[0];return i&&Object.prototype.hasOwnProperty.call(i,t)&&i[t]!==void 0?!!i[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),showExportBtn:this.getDataBool("showExportBtn",!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($));else{const o=this.props.conf.data[0];o.showExportBtn===void 0&&(o.showExportBtn=!0);const i={object_id_visible:!0,created_by_visible:!0,command_visible:!0,command_name_visible:!0,value_visible:!0,status_visible:!0,created_visible:!0};for(const[r,b]of Object.entries(i))o[r]===void 0&&(o[r]=b)}}}const g=new n(l,"controlRecordList");g.setupLifecycle();const _=g.getStyle(),x=e.computed(()=>te.generateTitleStyle(l.conf.options)),E=e.computed(()=>{var o,i,r,b;const a=((i=(o=l.conf)==null?void 0:o.options)==null?void 0:i.columns)||[],t=((b=(r=l.conf)==null?void 0:r.data)==null?void 0:b[0])||{};return(Array.isArray(a)?a:[]).map(d=>{var C;let w=d.key;d.key==="object_id"&&(w="object_id_label");const f=(C=t[w])!=null?C:t[d.key],z=d.key==="object_id"?"object_id_visible":`${d.key}_visible`,S=t[z];return{prop:d.key,label:f!==void 0&&f!==""?String(f):d.label,width:d.width,minWidth:d.minWidth,visible:S!==void 0?!!S:d.visible!==!1}})}),s=e.reactive({current:1,pageSize:10,total:0}),p=e.ref(""),v=e.ref("object_id"),k=e.ref([]),V=e.ref(!1);function I(){const a={page_index:s.current,page_size:s.pageSize},t=p.value.trim();if(t){const o=[[v.value,"like",`%${t}%`]];a.where_and=JSON.stringify(o)}return a}function q(a){const t=a.error;return t===""||t===null||t===void 0}function y(){return T(this,null,function*(){var a;V.value=!0;try{const t=yield A.api.post("get_control_record_list",I(),!0),o=(a=t==null?void 0:t.result)!=null?a:t,i=Array.isArray(o==null?void 0:o.data)?o.data:[];k.value=i.map(b=>O({},b));const r=o==null?void 0:o.total_records;s.total=typeof r=="number"?r:i.length,t&&t.code!==void 0&&t.code!==200&&h.ElMessage.warning(t.msg||t.info||"列表接口返回非成功状态")}catch(t){console.error(t),k.value=[],s.total=0,h.ElMessage.error("加载控制记录失败")}finally{V.value=!1}})}const K=e.computed(()=>k.value);function P(a,t){const o=a[t];return o==null?"":String(o)}function j(){s.current=1,y()}function U(){p.value="",s.current=1,y()}function F(){s.current=1,y()}function H(){y()}function N(a){const t=o=>String(o).padStart(2,"0");return`${a.getFullYear()}-${t(a.getMonth()+1)}-${t(a.getDate())} ${t(a.getHours())}:${t(a.getMinutes())}:${t(a.getSeconds())}`}function J(){return T(this,null,function*(){const a=[...new Set(k.value.map(i=>{var r;return String((r=i.object_id)!=null?r:"").trim()}).filter(Boolean))];if(!a.length){h.ElMessage.warning("当前列表无对象编号,请加载记录后再导出");return}const t=new Date,o=new Date(t.getTime()-168*3600*1e3);try{yield h.ElMessageBox.confirm(`将按最近 7 天、当前已加载列表中的 ${a.length} 个对象编号发起导出任务,是否继续?`,"导出控制记录",{type:"info"})}catch(i){return}try{const i=yield A.api.post("export_control_record",{file_name:`control_record_${N(t).replace(/[: ]/g,"_")}`,start_time:N(o),end_time:N(t),object_ids:a},!0);if(i.code!==void 0&&i.code!==200){h.ElMessage.warning(i.msg||i.info||"导出请求未成功");return}h.ElMessage.success("导出任务已提交")}catch(i){h.ElMessage.error("导出请求失败")}})}return e.onMounted(()=>{y()}),(a,t)=>{const o=m.ElIcon,i=m.ElInput,r=m.ElOption,b=m.ElSelect,d=m.ElButton,w=m.ElTag,f=m.ElTableColumn,z=m.ElTable,S=m.ElPagination,C=m.ElLoadingDirective;return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"control-record-list mix-component",style:e.normalizeStyle({backgroundColor:e.unref(_).bgColor,borderRadius:`${e.unref(_).radiusSize}px`})},[e.unref(_).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(x.value)},e.toDisplayString(u.conf.caption||u.conf.name),5)),e.createElementVNode("div",ae,[e.createElementVNode("div",ie,[e.createVNode(i,{modelValue:p.value,"onUpdate:modelValue":t[0]||(t[0]=c=>p.value=c),placeholder:"搜索控制记录",size:"small",class:"toolbar-search",onKeyup:e.withKeys(j,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(o,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(oe.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(b,{modelValue:v.value,"onUpdate:modelValue":t[1]||(t[1]=c=>v.value=c),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(r,{label:"对象编号",value:"object_id"}),e.createVNode(r,{label:"用户名",value:"created_by"}),e.createVNode(r,{label:"控制码指令",value:"command"}),e.createVNode(r,{label:"指令名称",value:"command_name"})]),_:1},8,["modelValue"]),e.createVNode(d,{type:"primary",onClick:j},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(d,{onClick:U},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(_).showExportBtn?(e.openBlock(),e.createBlock(d,{key:0,type:"success",onClick:J},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("导出",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",le,[e.createVNode(z,{data:K.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,c=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c.prop},[c.visible?(e.openBlock(),e.createBlock(f,{key:0,prop:c.prop,label:c.label,width:c.width,"min-width":c.minWidth},{default:e.withCtx(B=>[c.prop==="status"?(e.openBlock(),e.createBlock(w,{key:0,type:q(B.row)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(q(B.row)?"成功":"失败"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(P(B.row,c.prop)),1))]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128))]),_:1},8,["data"])]),e.createElementVNode("div",ne,[e.createVNode(S,{"current-page":s.current,"onUpdate:currentPage":t[2]||(t[2]=c=>s.current=c),"page-size":s.pageSize,"onUpdate:pageSize":t[3]||(t[3]=c=>s.pageSize=c),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:s.total,onSizeChange:F,onCurrentChange:H},null,8,["current-page","page-size","total"])])]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)),[[C,V.value]])}}})),_e=ee._export_sfc(me,[["__scopeId","data-v-3261ecd2"]]);exports.default=_e;
|
|
@@ -11,8 +11,8 @@ var _ = (l, e, a) => e in l ? z(l, e, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return l;
|
|
12
12
|
}, x = (l, e) => T(l, A(e));
|
|
13
13
|
import { defineComponent as N, useCssVars as j, unref as o, computed as D, openBlock as f, createElementBlock as p, normalizeStyle as u, createElementVNode as r, toDisplayString as m, Fragment as R, renderList as L, renderSlot as I } from "vue";
|
|
14
|
-
import { B as M } from "./element-resize-detector-
|
|
15
|
-
import { _ as U } from "./index-
|
|
14
|
+
import { B as M } from "./element-resize-detector-DeMhGbNi.js";
|
|
15
|
+
import { _ as U } from "./index-zPaMBZk-.js";
|
|
16
16
|
import { g as k } from "./titleStyle-BT5GlpAb.js";
|
|
17
17
|
import { A as B, D as F } from "./ele-crd-icon-BXxB7P3T.js";
|
|
18
18
|
const H = { class: "mix-body" }, b = "--", $ = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty,x=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var m=(a,t,o)=>t in a?b(a,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):a[t]=o,S=(a,t)=>{for(var o in t||(t={}))E.call(t,o)&&m(a,o,t[o]);if(p)for(var o of p(t))z.call(t,o)&&m(a,o,t[o]);return a},g=(a,t)=>x(a,O(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./element-resize-detector-
|
|
1
|
+
"use strict";var b=Object.defineProperty,x=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var m=(a,t,o)=>t in a?b(a,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):a[t]=o,S=(a,t)=>{for(var o in t||(t={}))E.call(t,o)&&m(a,o,t[o]);if(p)for(var o of p(t))z.call(t,o)&&m(a,o,t[o]);return a},g=(a,t)=>x(a,O(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./element-resize-detector-BlMXyWIR.cjs"),V=require("./index-EnNA0nIi.cjs"),h=require("./titleStyle-NSnz6cUg.cjs"),C=require("./ele-crd-icon-BvNgAPKW.cjs"),N={class:"mix-body"},y="--",A={DEFAULT_ICON:C.DEFAULT_ICON,ACTIVE_ICON:C.ACTIVE_ICON,NAME_CN:"基础卡片",NAME_EN:"Card",ORDER:1},D={titleColor:"#111",labelColor:"#111",textColor:"#111",bgColor:"#fff",valueSize:28,nameSize:14,radiusSize:8,isHideTitle:!0},I=[{name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1}],j=["name","fv","object_id","unit","default","isText"],k=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime","summary"],R={useAlias:!1,multiObject:!1,source:"mosaic",object_id:"",object_alias:""},B={DEFAULT:A,OPTIONS:D,DATA:I,PARAMS:j,SOURCE:k,COMMON:R},L=e.defineComponent(g(S({},B),{__name:"crd",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(a){e.useCssVars(l=>({bf86c0a0:e.unref(n).bgColor}));const t=a;class o extends T.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),labelColor:this.getOptionValue("labelColor","#111"),textColor:this.getOptionValue("textColor","#111"),nameSize:this.getOptionValue("nameSize",14),valueSize:this.getOptionValue("valueSize",28),radiusSize:this.getOptionValue("radiusSize",8),isHideTitle:this.getOptionValue("isHideTitle",!0)}}init(){var i;this.Style.value=this.extractStyles(),this.applyTheme(),(i=this.props.conf.data)!=null&&i.length||(this.props.conf.data=[{name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1}])}}const u=new o(t,"crd");u.setupLifecycle();const n=u.getStyle(),v=e.computed(()=>h.generateTitleStyle(t.conf.options)),d=l=>{var s,r,f;return l?l.isText?{value:(((s=l.flag)==null?void 0:s.find(_=>String(_.code)==String(l.value)))||{}).text||y,name:l.name}:{value:(f=(r=l.value)!=null?r:l.default)!=null?f:0,name:l.unit?`${l.name}(${l.unit})`:l.name}:{value:y,name:"--"}},c=t.conf;return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(n).bgColor,borderRadius:e.unref(n).radiusSize+"px"})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(v.value)},e.toDisplayString(e.unref(c).caption||e.unref(c).name),5),e.createElementVNode("div",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).data,(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:"card-item",key:r},[e.createElementVNode("div",{class:"value",style:e.normalizeStyle({color:e.unref(n).textColor,fontSize:e.unref(n).valueSize+"px"})},e.toDisplayString(d(s).value),5),i[0]||(i[0]=e.createElementVNode("div",{class:"split-line"},null,-1)),e.createElementVNode("div",{class:"name",style:e.normalizeStyle({color:e.unref(n).labelColor,fontSize:e.unref(n).nameSize+"px"})},e.toDisplayString(d(s).name),5)]))),128))]),e.renderSlot(l.$slots,"default",{},void 0,!0)],4))}})),M=V._export_sfc(L,[["__scopeId","data-v-d328f8d8"]]);exports.default=M;
|
|
@@ -28,11 +28,11 @@ var D = (l, o, t) => new Promise((C, d) => {
|
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as e2, reactive as b, ref as P, computed as R, openBlock as S, createElementBlock as _, Fragment as H, createElementVNode as p, normalizeStyle as x, unref as v, toDisplayString as y, createCommentVNode as t2, renderList as o2, normalizeClass as l2, renderSlot as s2, createVNode as a2 } from "vue";
|
|
30
30
|
import "html2canvas";
|
|
31
|
-
import { l as i2, B as r2, A as n2 } from "./element-resize-detector-
|
|
32
|
-
import { _ as c2 } from "./index-
|
|
31
|
+
import { l as i2, B as r2, A as n2 } from "./element-resize-detector-DeMhGbNi.js";
|
|
32
|
+
import { _ as c2 } from "./index-zPaMBZk-.js";
|
|
33
33
|
import { g as d2 } from "./titleStyle-BT5GlpAb.js";
|
|
34
|
-
import { _ as u2, g as m2 } from "./mix-control-modal-
|
|
35
|
-
import { a as f2 } from "./api-
|
|
34
|
+
import { _ as u2, g as m2 } from "./mix-control-modal-DRL4otx8.js";
|
|
35
|
+
import { a as f2 } from "./api-DhQsrEGY.js";
|
|
36
36
|
import { ElMessage as $ } from "element-plus";
|
|
37
37
|
const C2 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%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='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-213.000000,%20-1207.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M225.674156,1208.89481%20C225.944595,1209.04924%20226.205387,1209.21954%20226.455068,1209.40467%20C226.881095,1209.72052%20227.273774,1210.07876%20227.626647,1210.47337%20C228.878628,1211.87353%20229.582251,1213.67438%20229.582251,1215.58182%20C229.582251,1219.84629%20226.083331,1223.3%20221.771264,1223.3%20C217.459198,1223.3%20213.960278,1219.84629%20213.960278,1215.58182%20C213.960278,1213.67437%20214.663898,1211.87352%20215.9159,1210.47335%20C216.268755,1210.07876%20216.661433,1209.72052%20217.087434,1209.40469%20C217.337142,1209.21954%20217.597933,1209.04924%20217.868372,1208.89481%20C218.16979,1208.7227%20218.55366,1208.82753%20218.725771,1209.12895%20C218.897882,1209.43036%20218.793058,1209.81423%20218.49164,1209.98634%20C218.264609,1210.11598%20218.045681,1210.25894%20217.836048,1210.41438%20C217.478472,1210.67948%20217.148907,1210.98015%20216.85287,1211.31119%20C215.804685,1212.48343%20215.217218,1213.98699%20215.217218,1215.58182%20C215.217218,1219.14841%20218.149754,1222.04306%20221.771264,1222.04306%20C225.392775,1222.04306%20228.32531,1219.14841%20228.32531,1215.58182%20C228.32531,1213.987%20227.73784,1212.48344%20226.689675,1211.31121%20C226.393622,1210.98015%20226.064056,1210.67948%20225.706453,1210.41436%20C225.496847,1210.25894%20225.27792,1210.11598%20225.050889,1209.98634%20C224.749471,1209.81423%20224.644647,1209.43036%20224.816758,1209.12895%20C224.988868,1208.82753%20225.372739,1208.7227%20225.674156,1208.89481%20Z%20M221.771264,1207.3%20C222.089434,1207.3%20222.352382,1207.53643%20222.393997,1207.84319%20L222.399735,1207.92847%20L222.399735,1215.48901%20C222.399735,1215.83611%20222.118359,1216.11748%20221.771264,1216.11748%20C221.453094,1216.11748%20221.190147,1215.88105%20221.148531,1215.57429%20L221.142794,1215.48901%20L221.142794,1207.92847%20C221.142794,1207.58138%20221.42417,1207.3%20221.771264,1207.3%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", g2 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%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(-103.000000,%20-1207.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M115.0528,1208.89481%20C115.323239,1209.04924%20115.58403,1209.21954%20115.833711,1209.40467%20C116.259739,1209.72052%20116.652418,1210.07876%20117.00529,1210.47337%20C118.257271,1211.87353%20118.960894,1213.67438%20118.960894,1215.58182%20C118.960894,1219.84629%20115.461974,1223.3%20111.149908,1223.3%20C106.837841,1223.3%20103.338921,1219.84629%20103.338921,1215.58182%20C103.338921,1213.67437%20104.042541,1211.87352%20105.294544,1210.47335%20C105.647398,1210.07876%20106.040077,1209.72052%20106.466077,1209.40469%20C106.715786,1209.21954%20106.976577,1209.04924%20107.247016,1208.89481%20C107.548433,1208.7227%20107.932304,1208.82753%20108.104414,1209.12895%20C108.276525,1209.43036%20108.171701,1209.81423%20107.870284,1209.98634%20C107.643252,1210.11598%20107.424325,1210.25894%20107.214692,1210.41438%20C106.857116,1210.67948%20106.52755,1210.98015%20106.231514,1211.31119%20C105.183328,1212.48343%20104.595862,1213.98699%20104.595862,1215.58182%20C104.595862,1219.14841%20107.528398,1222.04306%20111.149908,1222.04306%20C114.771418,1222.04306%20117.703954,1219.14841%20117.703954,1215.58182%20C117.703954,1213.987%20117.116484,1212.48344%20116.068318,1211.31121%20C115.772265,1210.98015%20115.4427,1210.67948%20115.085097,1210.41436%20C114.875491,1210.25894%20114.656563,1210.11598%20114.429532,1209.98634%20C114.128115,1209.81423%20114.023291,1209.43036%20114.195401,1209.12895%20C114.367512,1208.82753%20114.751382,1208.7227%20115.0528,1208.89481%20Z%20M111.149908,1207.3%20C111.468078,1207.3%20111.731026,1207.53643%20111.772641,1207.84319%20L111.778378,1207.92847%20L111.778378,1215.48901%20C111.778378,1215.83611%20111.497002,1216.11748%20111.149908,1216.11748%20C110.831738,1216.11748%20110.56879,1215.88105%20110.527175,1215.57429%20L110.521438,1215.48901%20L110.521438,1207.92847%20C110.521438,1207.58138%20110.802813,1207.3%20111.149908,1207.3%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", p2 = { class: "font-semibold" }, v2 = { class: "mix-body" }, h2 = { class: "w-full flex flex-wrap content-start" }, x2 = ["onClick"], w2 = {
|
|
38
38
|
DEFAULT_ICON: C2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var j=Object.defineProperty,R=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols,H=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,Z=Reflect.get;var O=(n,l,o)=>l in n?j(n,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[l]=o,A=(n,l)=>{for(var o in l||(l={}))$.call(l,o)&&O(n,o,l[o]);if(N)for(var o of N(l))U.call(l,o)&&O(n,o,l[o]);return n},F=(n,l)=>R(n,q(l));var M=(n,l,o)=>Z(H(n),o,l);var B=(n,l,o)=>new Promise((g,u)=>{var p=c=>{try{f(o.next(c))}catch(i){u(i)}},h=c=>{try{f(o.throw(c))}catch(i){u(i)}},f=c=>c.done?g(c.value):Promise.resolve(c.value).then(p,h);f((o=o.apply(n,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const x=require("./element-resize-detector-Bo5uDQAu.cjs"),G=require("./index-Mh5Dw2sd.cjs"),J=require("./titleStyle-NSnz6cUg.cjs"),T=require("./mix-control-modal-BDHAB4Tw.cjs"),K=require("./api-P_s372dW.cjs"),L=require("element-plus"),W="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%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='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-213.000000,%20-1207.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M225.674156,1208.89481%20C225.944595,1209.04924%20226.205387,1209.21954%20226.455068,1209.40467%20C226.881095,1209.72052%20227.273774,1210.07876%20227.626647,1210.47337%20C228.878628,1211.87353%20229.582251,1213.67438%20229.582251,1215.58182%20C229.582251,1219.84629%20226.083331,1223.3%20221.771264,1223.3%20C217.459198,1223.3%20213.960278,1219.84629%20213.960278,1215.58182%20C213.960278,1213.67437%20214.663898,1211.87352%20215.9159,1210.47335%20C216.268755,1210.07876%20216.661433,1209.72052%20217.087434,1209.40469%20C217.337142,1209.21954%20217.597933,1209.04924%20217.868372,1208.89481%20C218.16979,1208.7227%20218.55366,1208.82753%20218.725771,1209.12895%20C218.897882,1209.43036%20218.793058,1209.81423%20218.49164,1209.98634%20C218.264609,1210.11598%20218.045681,1210.25894%20217.836048,1210.41438%20C217.478472,1210.67948%20217.148907,1210.98015%20216.85287,1211.31119%20C215.804685,1212.48343%20215.217218,1213.98699%20215.217218,1215.58182%20C215.217218,1219.14841%20218.149754,1222.04306%20221.771264,1222.04306%20C225.392775,1222.04306%20228.32531,1219.14841%20228.32531,1215.58182%20C228.32531,1213.987%20227.73784,1212.48344%20226.689675,1211.31121%20C226.393622,1210.98015%20226.064056,1210.67948%20225.706453,1210.41436%20C225.496847,1210.25894%20225.27792,1210.11598%20225.050889,1209.98634%20C224.749471,1209.81423%20224.644647,1209.43036%20224.816758,1209.12895%20C224.988868,1208.82753%20225.372739,1208.7227%20225.674156,1208.89481%20Z%20M221.771264,1207.3%20C222.089434,1207.3%20222.352382,1207.53643%20222.393997,1207.84319%20L222.399735,1207.92847%20L222.399735,1215.48901%20C222.399735,1215.83611%20222.118359,1216.11748%20221.771264,1216.11748%20C221.453094,1216.11748%20221.190147,1215.88105%20221.148531,1215.57429%20L221.142794,1215.48901%20L221.142794,1207.92847%20C221.142794,1207.58138%20221.42417,1207.3%20221.771264,1207.3%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Y="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%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(-103.000000,%20-1207.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M115.0528,1208.89481%20C115.323239,1209.04924%20115.58403,1209.21954%20115.833711,1209.40467%20C116.259739,1209.72052%20116.652418,1210.07876%20117.00529,1210.47337%20C118.257271,1211.87353%20118.960894,1213.67438%20118.960894,1215.58182%20C118.960894,1219.84629%20115.461974,1223.3%20111.149908,1223.3%20C106.837841,1223.3%20103.338921,1219.84629%20103.338921,1215.58182%20C103.338921,1213.67437%20104.042541,1211.87352%20105.294544,1210.47335%20C105.647398,1210.07876%20106.040077,1209.72052%20106.466077,1209.40469%20C106.715786,1209.21954%20106.976577,1209.04924%20107.247016,1208.89481%20C107.548433,1208.7227%20107.932304,1208.82753%20108.104414,1209.12895%20C108.276525,1209.43036%20108.171701,1209.81423%20107.870284,1209.98634%20C107.643252,1210.11598%20107.424325,1210.25894%20107.214692,1210.41438%20C106.857116,1210.67948%20106.52755,1210.98015%20106.231514,1211.31119%20C105.183328,1212.48343%20104.595862,1213.98699%20104.595862,1215.58182%20C104.595862,1219.14841%20107.528398,1222.04306%20111.149908,1222.04306%20C114.771418,1222.04306%20117.703954,1219.14841%20117.703954,1215.58182%20C117.703954,1213.987%20117.116484,1212.48344%20116.068318,1211.31121%20C115.772265,1210.98015%20115.4427,1210.67948%20115.085097,1210.41436%20C114.875491,1210.25894%20114.656563,1210.11598%20114.429532,1209.98634%20C114.128115,1209.81423%20114.023291,1209.43036%20114.195401,1209.12895%20C114.367512,1208.82753%20114.751382,1208.7227%20115.0528,1208.89481%20Z%20M111.149908,1207.3%20C111.468078,1207.3%20111.731026,1207.53643%20111.772641,1207.84319%20L111.778378,1207.92847%20L111.778378,1215.48901%20C111.778378,1215.83611%20111.497002,1216.11748%20111.149908,1216.11748%20C110.831738,1216.11748%20110.56879,1215.88105%20110.527175,1215.57429%20L110.521438,1215.48901%20L110.521438,1207.92847%20C110.521438,1207.58138%20110.802813,1207.3%20111.149908,1207.3%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Q={class:"font-semibold"},X={class:"mix-body"},e2={class:"w-full flex flex-wrap content-start"},t2=["onClick"],o2={DEFAULT_ICON:W,ACTIVE_ICON:Y,NAME_CN:"按键",NAME_EN:"Button",ORDER:2},l2={bgColor:"#fff",titleColor:"#111",textColor:"#fff",titleSize:14,textSize:14,itemHeight:42,radiusSize:8,items:2,isHideTitle:!1,method:{value:"alway",type:"select",label:"component.switch.method",options:x.CONTROL_OPTIONS}},D=[{command:"Control_01",name:"关机",color:"#c92309",code:0},{command:"Control_01",name:"开机",color:"#217406",code:1}],n2=["name","command","color","code"],r2=["mosaic"],a2={useAlias:!1,multiObject:!1,hideMultiObject:!0,statusFv:"",statusType:1,status:[{code:0,text:"离线",color:"#c92309"}]},i2={DEFAULT:o2,OPTIONS:l2,DATA:D,PARAMS:n2,SOURCE:r2,COMMON:a2},s2=e.defineComponent(F(A({},i2),{__name:"ctrBtn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"},password:{type:String,default:""},authorized:{type:Array,default:()=>[]}},setup(n){const l=n,o=e.reactive({authorized:[],password:""}),g=e.reactive({rule:"",code:"",command:""}),u=e.reactive({text:"",color:""}),p=e.ref(null),h=e.ref(!0);class f extends x.BaseComponent{extractStyles(){var r,a,m,v,s,C,y,b,_,z,k,E;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleColor:((a=t==null?void 0:t.titleColor)==null?void 0:a.value)||"#111",textColor:((m=t==null?void 0:t.textColor)==null?void 0:m.value)||"#fff",titleSize:((v=t==null?void 0:t.titleSize)==null?void 0:v.value)||16,textSize:((s=t==null?void 0:t.textSize)==null?void 0:s.value)||14,itemHeight:((C=t==null?void 0:t.itemHeight)==null?void 0:C.value)||42,radiusSize:(b=(y=t==null?void 0:t.radiusSize)==null?void 0:y.value)!=null?b:8,items:(z=(_=t==null?void 0:t.items)==null?void 0:_.value)!=null?z:2,isHideTitle:(E=(k=t==null?void 0:t.isHideTitle)==null?void 0:k.value)!=null?E:!1}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:D}onPreview(){return B(this,null,function*(){yield M(f.prototype,this,"onPreview").call(this);const t=yield T.getAuthorized(this.props);o.authorized=t.authorized,o.password=t.password})}setSocketData(t){var m,v;if(!t)return;const{common:r}=this.props.conf,a=this.extractDataValue(t,r.statusFv);if(a!=null){const s=r.status.find(C=>String(C.code)===String(a));u.text=(m=s==null?void 0:s.text)!=null?m:"",u.color=(v=s==null?void 0:s.color)!=null?v:""}}}const c=new f(l,"ctrBtn");c.setupLifecycle();const i=c.getStyle(),I=e.computed(()=>J.generateTitleStyle(l.conf.options)),P=e.computed(()=>`${(100/i.value.items).toFixed(2)||100}%`),w=d=>o.authorized.indexOf(d.command)===-1,V=d=>{var a;if(w(d)){L.ElMessage.warning("无权限操作");return}const{options:t}=l.conf;let r=((a=t==null?void 0:t.method)==null?void 0:a.value)||"alway";g.rule=r,g.code=String(d.code),g.command=d.command,r==="alway"||r==="once"&&h.value?p.value.modal.visible=!0:S()},S=()=>{const{code:d,rule:t,command:r}=g,{common:a}=l.conf,m=JSON.parse(sessionStorage.getItem(x.ALIAS_MAPPING_KEY)||"{}");let s={block_mapping:"pusher",action:"publish_command",object_id:a.useAlias?m[a.object_alias]:a.object_id||l.uid,command:r,value:d,rule:t,control:o.password};K.api.platform(C=>{C.code===200&&(L.ElMessage.success(C.msg),p.value.modal.visible=!1,h.value=!1)},s)};return(d,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(i).bgColor,borderRadius:`${e.unref(i).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(I.value)},[e.createElementVNode("div",Q,e.toDisplayString(n.conf.caption||n.conf.name),1),u.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"status-btn",style:e.normalizeStyle({backgroundColor:u.color,color:e.unref(i).textColor})},e.toDisplayString(u.text),5)):e.createCommentVNode("",!0)],4),e.createElementVNode("div",X,[e.createElementVNode("div",e2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.conf.data,(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:"btn-wrap",key:a,style:e.normalizeStyle({width:P.value,height:`${e.unref(i).itemHeight}px`,fontSize:`${e.unref(i).textSize}px`})},[e.createElementVNode("div",{class:e.normalizeClass(["btn-item",{disabled:w(r)}]),style:e.normalizeStyle({backgroundColor:r.color,color:e.unref(i).textColor}),onClick:m=>V(r)},e.toDisplayString(r.name),15,t2)],4))),128))])]),e.renderSlot(d.$slots,"default",{},void 0,!0)],4),e.createVNode(T._sfc_main,{ref_key:"controlRef",ref:p,onSubmit:S,password:o.password},null,8,["password"])],64))}})),c2=G._export_sfc(s2,[["__scopeId","data-v-b9350d64"]]);exports.default=c2;
|
|
1
|
+
"use strict";var j=Object.defineProperty,R=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols,H=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,Z=Reflect.get;var O=(n,l,o)=>l in n?j(n,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[l]=o,A=(n,l)=>{for(var o in l||(l={}))$.call(l,o)&&O(n,o,l[o]);if(N)for(var o of N(l))U.call(l,o)&&O(n,o,l[o]);return n},F=(n,l)=>R(n,q(l));var M=(n,l,o)=>Z(H(n),o,l);var B=(n,l,o)=>new Promise((g,u)=>{var p=c=>{try{f(o.next(c))}catch(i){u(i)}},h=c=>{try{f(o.throw(c))}catch(i){u(i)}},f=c=>c.done?g(c.value):Promise.resolve(c.value).then(p,h);f((o=o.apply(n,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const x=require("./element-resize-detector-BlMXyWIR.cjs"),G=require("./index-EnNA0nIi.cjs"),J=require("./titleStyle-NSnz6cUg.cjs"),T=require("./mix-control-modal-Lhzopftt.cjs"),K=require("./api-C0okiLNC.cjs"),L=require("element-plus"),W="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%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='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-213.000000,%20-1207.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M225.674156,1208.89481%20C225.944595,1209.04924%20226.205387,1209.21954%20226.455068,1209.40467%20C226.881095,1209.72052%20227.273774,1210.07876%20227.626647,1210.47337%20C228.878628,1211.87353%20229.582251,1213.67438%20229.582251,1215.58182%20C229.582251,1219.84629%20226.083331,1223.3%20221.771264,1223.3%20C217.459198,1223.3%20213.960278,1219.84629%20213.960278,1215.58182%20C213.960278,1213.67437%20214.663898,1211.87352%20215.9159,1210.47335%20C216.268755,1210.07876%20216.661433,1209.72052%20217.087434,1209.40469%20C217.337142,1209.21954%20217.597933,1209.04924%20217.868372,1208.89481%20C218.16979,1208.7227%20218.55366,1208.82753%20218.725771,1209.12895%20C218.897882,1209.43036%20218.793058,1209.81423%20218.49164,1209.98634%20C218.264609,1210.11598%20218.045681,1210.25894%20217.836048,1210.41438%20C217.478472,1210.67948%20217.148907,1210.98015%20216.85287,1211.31119%20C215.804685,1212.48343%20215.217218,1213.98699%20215.217218,1215.58182%20C215.217218,1219.14841%20218.149754,1222.04306%20221.771264,1222.04306%20C225.392775,1222.04306%20228.32531,1219.14841%20228.32531,1215.58182%20C228.32531,1213.987%20227.73784,1212.48344%20226.689675,1211.31121%20C226.393622,1210.98015%20226.064056,1210.67948%20225.706453,1210.41436%20C225.496847,1210.25894%20225.27792,1210.11598%20225.050889,1209.98634%20C224.749471,1209.81423%20224.644647,1209.43036%20224.816758,1209.12895%20C224.988868,1208.82753%20225.372739,1208.7227%20225.674156,1208.89481%20Z%20M221.771264,1207.3%20C222.089434,1207.3%20222.352382,1207.53643%20222.393997,1207.84319%20L222.399735,1207.92847%20L222.399735,1215.48901%20C222.399735,1215.83611%20222.118359,1216.11748%20221.771264,1216.11748%20C221.453094,1216.11748%20221.190147,1215.88105%20221.148531,1215.57429%20L221.142794,1215.48901%20L221.142794,1207.92847%20C221.142794,1207.58138%20221.42417,1207.3%20221.771264,1207.3%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Y="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%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(-103.000000,%20-1207.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M115.0528,1208.89481%20C115.323239,1209.04924%20115.58403,1209.21954%20115.833711,1209.40467%20C116.259739,1209.72052%20116.652418,1210.07876%20117.00529,1210.47337%20C118.257271,1211.87353%20118.960894,1213.67438%20118.960894,1215.58182%20C118.960894,1219.84629%20115.461974,1223.3%20111.149908,1223.3%20C106.837841,1223.3%20103.338921,1219.84629%20103.338921,1215.58182%20C103.338921,1213.67437%20104.042541,1211.87352%20105.294544,1210.47335%20C105.647398,1210.07876%20106.040077,1209.72052%20106.466077,1209.40469%20C106.715786,1209.21954%20106.976577,1209.04924%20107.247016,1208.89481%20C107.548433,1208.7227%20107.932304,1208.82753%20108.104414,1209.12895%20C108.276525,1209.43036%20108.171701,1209.81423%20107.870284,1209.98634%20C107.643252,1210.11598%20107.424325,1210.25894%20107.214692,1210.41438%20C106.857116,1210.67948%20106.52755,1210.98015%20106.231514,1211.31119%20C105.183328,1212.48343%20104.595862,1213.98699%20104.595862,1215.58182%20C104.595862,1219.14841%20107.528398,1222.04306%20111.149908,1222.04306%20C114.771418,1222.04306%20117.703954,1219.14841%20117.703954,1215.58182%20C117.703954,1213.987%20117.116484,1212.48344%20116.068318,1211.31121%20C115.772265,1210.98015%20115.4427,1210.67948%20115.085097,1210.41436%20C114.875491,1210.25894%20114.656563,1210.11598%20114.429532,1209.98634%20C114.128115,1209.81423%20114.023291,1209.43036%20114.195401,1209.12895%20C114.367512,1208.82753%20114.751382,1208.7227%20115.0528,1208.89481%20Z%20M111.149908,1207.3%20C111.468078,1207.3%20111.731026,1207.53643%20111.772641,1207.84319%20L111.778378,1207.92847%20L111.778378,1215.48901%20C111.778378,1215.83611%20111.497002,1216.11748%20111.149908,1216.11748%20C110.831738,1216.11748%20110.56879,1215.88105%20110.527175,1215.57429%20L110.521438,1215.48901%20L110.521438,1207.92847%20C110.521438,1207.58138%20110.802813,1207.3%20111.149908,1207.3%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Q={class:"font-semibold"},X={class:"mix-body"},e2={class:"w-full flex flex-wrap content-start"},t2=["onClick"],o2={DEFAULT_ICON:W,ACTIVE_ICON:Y,NAME_CN:"按键",NAME_EN:"Button",ORDER:2},l2={bgColor:"#fff",titleColor:"#111",textColor:"#fff",titleSize:14,textSize:14,itemHeight:42,radiusSize:8,items:2,isHideTitle:!1,method:{value:"alway",type:"select",label:"component.switch.method",options:x.CONTROL_OPTIONS}},D=[{command:"Control_01",name:"关机",color:"#c92309",code:0},{command:"Control_01",name:"开机",color:"#217406",code:1}],n2=["name","command","color","code"],r2=["mosaic"],a2={useAlias:!1,multiObject:!1,hideMultiObject:!0,statusFv:"",statusType:1,status:[{code:0,text:"离线",color:"#c92309"}]},i2={DEFAULT:o2,OPTIONS:l2,DATA:D,PARAMS:n2,SOURCE:r2,COMMON:a2},s2=e.defineComponent(F(A({},i2),{__name:"ctrBtn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"},password:{type:String,default:""},authorized:{type:Array,default:()=>[]}},setup(n){const l=n,o=e.reactive({authorized:[],password:""}),g=e.reactive({rule:"",code:"",command:""}),u=e.reactive({text:"",color:""}),p=e.ref(null),h=e.ref(!0);class f extends x.BaseComponent{extractStyles(){var r,a,m,v,s,C,y,b,_,z,k,E;const{options:t}=this.props.conf;return{bgColor:((r=t==null?void 0:t.bgColor)==null?void 0:r.value)||"#fff",titleColor:((a=t==null?void 0:t.titleColor)==null?void 0:a.value)||"#111",textColor:((m=t==null?void 0:t.textColor)==null?void 0:m.value)||"#fff",titleSize:((v=t==null?void 0:t.titleSize)==null?void 0:v.value)||16,textSize:((s=t==null?void 0:t.textSize)==null?void 0:s.value)||14,itemHeight:((C=t==null?void 0:t.itemHeight)==null?void 0:C.value)||42,radiusSize:(b=(y=t==null?void 0:t.radiusSize)==null?void 0:y.value)!=null?b:8,items:(z=(_=t==null?void 0:t.items)==null?void 0:_.value)!=null?z:2,isHideTitle:(E=(k=t==null?void 0:t.isHideTitle)==null?void 0:k.value)!=null?E:!1}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:D}onPreview(){return B(this,null,function*(){yield M(f.prototype,this,"onPreview").call(this);const t=yield T.getAuthorized(this.props);o.authorized=t.authorized,o.password=t.password})}setSocketData(t){var m,v;if(!t)return;const{common:r}=this.props.conf,a=this.extractDataValue(t,r.statusFv);if(a!=null){const s=r.status.find(C=>String(C.code)===String(a));u.text=(m=s==null?void 0:s.text)!=null?m:"",u.color=(v=s==null?void 0:s.color)!=null?v:""}}}const c=new f(l,"ctrBtn");c.setupLifecycle();const i=c.getStyle(),I=e.computed(()=>J.generateTitleStyle(l.conf.options)),P=e.computed(()=>`${(100/i.value.items).toFixed(2)||100}%`),w=d=>o.authorized.indexOf(d.command)===-1,V=d=>{var a;if(w(d)){L.ElMessage.warning("无权限操作");return}const{options:t}=l.conf;let r=((a=t==null?void 0:t.method)==null?void 0:a.value)||"alway";g.rule=r,g.code=String(d.code),g.command=d.command,r==="alway"||r==="once"&&h.value?p.value.modal.visible=!0:S()},S=()=>{const{code:d,rule:t,command:r}=g,{common:a}=l.conf,m=JSON.parse(sessionStorage.getItem(x.ALIAS_MAPPING_KEY)||"{}");let s={block_mapping:"pusher",action:"publish_command",object_id:a.useAlias?m[a.object_alias]:a.object_id||l.uid,command:r,value:d,rule:t,control:o.password};K.api.platform(C=>{C.code===200&&(L.ElMessage.success(C.msg),p.value.modal.visible=!1,h.value=!1)},s)};return(d,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(i).bgColor,borderRadius:`${e.unref(i).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(I.value)},[e.createElementVNode("div",Q,e.toDisplayString(n.conf.caption||n.conf.name),1),u.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"status-btn",style:e.normalizeStyle({backgroundColor:u.color,color:e.unref(i).textColor})},e.toDisplayString(u.text),5)):e.createCommentVNode("",!0)],4),e.createElementVNode("div",X,[e.createElementVNode("div",e2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.conf.data,(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:"btn-wrap",key:a,style:e.normalizeStyle({width:P.value,height:`${e.unref(i).itemHeight}px`,fontSize:`${e.unref(i).textSize}px`})},[e.createElementVNode("div",{class:e.normalizeClass(["btn-item",{disabled:w(r)}]),style:e.normalizeStyle({backgroundColor:r.color,color:e.unref(i).textColor}),onClick:m=>V(r)},e.toDisplayString(r.name),15,t2)],4))),128))])]),e.renderSlot(d.$slots,"default",{},void 0,!0)],4),e.createVNode(T._sfc_main,{ref_key:"controlRef",ref:p,onSubmit:S,password:o.password},null,8,["password"])],64))}})),c2=G._export_sfc(s2,[["__scopeId","data-v-b9350d64"]]);exports.default=c2;
|
|
@@ -31,11 +31,11 @@ import "element-plus/es/components/base/style/css";
|
|
|
31
31
|
import "element-plus/es/components/button/style/css";
|
|
32
32
|
import "element-plus/es/components/input/style/css";
|
|
33
33
|
import { defineComponent as ae, computed as A, reactive as le, ref as T, openBlock as u, createElementBlock as m, Fragment as V, createElementVNode as v, normalizeStyle as b, unref as p, toDisplayString as h, createTextVNode as D, normalizeClass as se, renderList as ie, createVNode as k, withCtx as B, createCommentVNode as ne, renderSlot as ce } from "vue";
|
|
34
|
-
import { B as re, A as de } from "./element-resize-detector-
|
|
35
|
-
import { _ as ue } from "./index-
|
|
34
|
+
import { B as re, A as de } from "./element-resize-detector-DeMhGbNi.js";
|
|
35
|
+
import { _ as ue } from "./index-zPaMBZk-.js";
|
|
36
36
|
import { g as me } from "./titleStyle-BT5GlpAb.js";
|
|
37
|
-
import { _ as pe, g as fe } from "./mix-control-modal-
|
|
38
|
-
import { a as F } from "./api-
|
|
37
|
+
import { _ as pe, g as fe } from "./mix-control-modal-DRL4otx8.js";
|
|
38
|
+
import { a as F } from "./api-DhQsrEGY.js";
|
|
39
39
|
import { ElMessage as H } from "element-plus";
|
|
40
40
|
import { A as ve, D as he } from "./ele-ctrSet-icon-BtKGrCid.js";
|
|
41
41
|
const ye = { class: "font-[600]" }, be = { class: "font-[600] opacity-[0.7]" }, ge = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty,R=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols,$=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,G=Reflect.get;var N=(l,o,a)=>o in l?L(l,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[o]=a,O=(l,o)=>{for(var a in o||(o={}))H.call(o,a)&&N(l,a,o[a]);if(x)for(var a of x(o))W.call(o,a)&&N(l,a,o[a]);return l},z=(l,o)=>R(l,U(o));var w=(l,o,a)=>G($(l),a,o);var A=(l,o,a)=>new Promise((f,y)=>{var c=s=>{try{r(a.next(s))}catch(d){y(d)}},C=s=>{try{r(a.throw(s))}catch(d){y(d)}},r=s=>s.done?f(s.value):Promise.resolve(s.value).then(c,C);r((a=a.apply(l,o)).next())});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/input/style/css");const e=require("vue"),D=require("./element-resize-detector-
|
|
1
|
+
"use strict";var L=Object.defineProperty,R=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols,$=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,G=Reflect.get;var N=(l,o,a)=>o in l?L(l,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[o]=a,O=(l,o)=>{for(var a in o||(o={}))H.call(o,a)&&N(l,a,o[a]);if(x)for(var a of x(o))W.call(o,a)&&N(l,a,o[a]);return l},z=(l,o)=>R(l,U(o));var w=(l,o,a)=>G($(l),a,o);var A=(l,o,a)=>new Promise((f,y)=>{var c=s=>{try{r(a.next(s))}catch(d){y(d)}},C=s=>{try{r(a.throw(s))}catch(d){y(d)}},r=s=>s.done?f(s.value):Promise.resolve(s.value).then(c,C);r((a=a.apply(l,o)).next())});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/input/style/css");const e=require("vue"),D=require("./element-resize-detector-BlMXyWIR.cjs"),J=require("./index-EnNA0nIi.cjs"),K=require("./titleStyle-NSnz6cUg.cjs"),B=require("./mix-control-modal-Lhzopftt.cjs"),I=require("./api-C0okiLNC.cjs"),M=require("element-plus"),q=require("./ele-ctrSet-icon-DCsPO0tL.cjs"),Y={class:"font-[600]"},Q={class:"font-[600] opacity-[0.7]"},X={key:0,class:"ml-[12px] min-w-[70px]"},Z={key:0,class:"submint"},ee={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"参数控件",NAME_EN:"Parameter Control",ORDER:1},te={bgColor:"#fff",titleColor:"#111",textColor:"#111",titleSize:14,textSize:14,labelWidth:100,radiusSize:8,isHideTitle:!1,method:{value:"alway",type:"select",label:"component.params.verifyMethod",options:"CONTROL_OPTIONS"}},oe=[{command:"Control_01",name:"参数一",unit:"",fv:""}],le=["name","fv","command","unit"],ae=["mosaic"],ne={useAlias:!1,multiObject:!1,hideMultiObject:!0},ie={DEFAULT:ee,OPTIONS:te,DATA:oe,PARAMS:le,SOURCE:ae,COMMON:ne},se=e.defineComponent(z(O({},ie),{__name:"ctrSet",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"},password:{type:String,default:""},socketData:{type:Object,default:()=>({})},authorized:{type:Array,default:()=>[]}},setup(l){const o=l,a="--";class f extends D.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#111"),titleSize:this.getOptionValue("titleSize",14),textSize:this.getOptionValue("textSize",12),labelWidth:this.getOptionValue("labelWidth",100),radiusSize:this.getOptionValue("radiusSize",4),isHideTitle:this.getOptionValue("isHideTitle",!1)}}init(){this.Style.value=this.extractStyles(),this.applyTheme()}onPreview(){return A(this,null,function*(){yield w(f.prototype,this,"onPreview").call(this);const i=yield B.getAuthorized(this.props);r.authorized=i.authorized,r.password=i.password})}setSocketData(i){if(!i)return;const{data:n}=this.props.conf;n.forEach(m=>{const u=this.extractDataValue(i,m.fv);m.value=u!=null?u:a})}}const y=new f(o,"ctrSet");y.setupLifecycle();const c=y.getStyle(),C=e.computed(()=>K.generateTitleStyle(o.conf.options)),r=e.reactive({authorized:[],password:""}),s=e.ref([]),d=e.ref(null),E=e.ref(!0),h=e.computed(()=>{var t;return((t=o.conf.data)==null?void 0:t.length)===1}),j=t=>r.authorized.indexOf(t.command)===-1,S=e.computed(()=>s.value.filter(t=>t).length===0),P=e.computed(()=>{var i,n;const{data:t}=o.conf;return(((i=t==null?void 0:t[0])==null?void 0:i.value)||a)+" "+(((n=t==null?void 0:t[0])==null?void 0:n.unit)||"")}),k=()=>{var n;const{options:t}=o.conf,i=((n=t==null?void 0:t.method)==null?void 0:n.value)||"alway";i==="alway"||i==="once"&&E.value?d.value.modal.visible=!0:V()},V=()=>{var p,g;const{common:t,data:i,options:n}=o.conf,m=JSON.parse(sessionStorage.getItem(D.ALIAS_MAPPING_KEY)||"{}")||{},u=t.useAlias?m[t.object_alias]:t.object_id||o.uid;if(h.value){const b={block_mapping:"pusher",action:"publish_command",object_id:u,command:i[0].command,value:s.value[0],control:r.password,rule:((p=n==null?void 0:n.method)==null?void 0:p.value)||"alway"};I.api.platform(_=>{_.code===200&&(M.ElMessage.success(_.msg),d.value.modal.visible=!1,E.value=!1)},b)}else{const b=[];s.value.forEach((v,F)=>{v&&b.push({object_id:u,command:i[F].command,value:v})});const _={block_mapping:"pusher",action:"publish_command_plus",publishes:b,control:r.password,rule:((g=n==null?void 0:n.method)==null?void 0:g.value)||"alway"};I.api.platform(v=>{v.code===200&&(M.ElMessage.success(v.msg),d.value.modal.visible=!1,E.value=!1)},_)}};return(t,i)=>{const n=T.ElInput,m=T.ElButton;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"mix-component",style:e.normalizeStyle({backgroundColor:e.unref(c).bgColor,borderRadius:`${e.unref(c).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(C.value)},[h.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Y,e.toDisplayString(l.conf.caption||l.conf.name),1),e.createElementVNode("div",{class:"w-[2px] h-[18px] mx-[12px] opacity-[0.7]",style:e.normalizeStyle({backgroundColor:e.unref(c).titleColor})},null,4),e.createElementVNode("div",Q,e.toDisplayString(P.value),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.conf.caption||l.conf.name),1)],64))],4),e.createElementVNode("div",{class:e.normalizeClass(["mix-body",e.unref(c).isHideTitle?"h-[100%]":"h-[calc(100%-42px)]"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.conf.data,(u,p)=>(e.openBlock(),e.createElementBlock("div",{class:"set-item",key:p,style:e.normalizeStyle({fontSize:`${e.unref(c).textSize}px`,color:e.unref(c).textColor})},[e.createElementVNode("div",{class:"item-name",style:e.normalizeStyle({width:`${e.unref(c).labelWidth}px`})},e.toDisplayString(u.name),5),e.createVNode(n,{modelValue:s.value[p],"onUpdate:modelValue":g=>s.value[p]=g,disabled:j(u)},null,8,["modelValue","onUpdate:modelValue","disabled"]),h.value?(e.openBlock(),e.createElementBlock("div",X,[e.createVNode(m,{type:S.value?"default":"primary",style:{width:"100%"},onClick:k,disabled:S.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("common.confirm")),1)]),_:1},8,["type","disabled"])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"item-value",style:e.normalizeStyle([{"margin-left":"12px"},{background:e.unref(c).bgColor}])},e.toDisplayString(u.value),5))],4))),128)),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(m,{type:S.value?"default":"primary",onClick:k,disabled:S.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("common.confirm")),1)]),_:1},8,["type","disabled"])]))],2),e.renderSlot(t.$slots,"default",{},void 0,!0)],4),e.createVNode(B._sfc_main,{ref_key:"controlRef",ref:d,onSubmit:V,password:r.password},null,8,["password"])],64)}}})),ce=J._export_sfc(se,[["__scopeId","data-v-f9f9d070"]]);exports.default=ce;
|
|
@@ -28,11 +28,11 @@ var I = (a, o, t) => new Promise((d, u) => {
|
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as q, reactive as D, ref as j, computed as Q, openBlock as x, createElementBlock as y, Fragment as P, createElementVNode as c, normalizeStyle as v, unref as f, toDisplayString as R, renderList as W, normalizeClass as H, renderSlot as X, createVNode as e1 } from "vue";
|
|
30
30
|
import "html2canvas";
|
|
31
|
-
import { l as t1, B as o1, A as s1 } from "./element-resize-detector-
|
|
32
|
-
import { _ as a1 } from "./index-
|
|
31
|
+
import { l as t1, B as o1, A as s1 } from "./element-resize-detector-DeMhGbNi.js";
|
|
32
|
+
import { _ as a1 } from "./index-zPaMBZk-.js";
|
|
33
33
|
import { g as l1 } from "./titleStyle-BT5GlpAb.js";
|
|
34
|
-
import { _ as i1, g as r1 } from "./mix-control-modal-
|
|
35
|
-
import { a as n1 } from "./api-
|
|
34
|
+
import { _ as i1, g as r1 } from "./mix-control-modal-DRL4otx8.js";
|
|
35
|
+
import { a as n1 } from "./api-DhQsrEGY.js";
|
|
36
36
|
import { ElMessage as U } from "element-plus";
|
|
37
37
|
const c1 = "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(-1145.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M1158.87913,103.913793%20C1160.85974,103.913793%201162.46533,105.51939%201162.46533,107.5%20C1162.46533,109.480615%201160.85974,111.086207%201158.87913,111.086207%20L1158.87913,111.086207%20L1150.05154,111.086207%20C1148.07093,111.086207%201146.46533,109.480613%201146.46533,107.5%20C1146.46533,105.519392%201148.07093,103.913793%201150.05154,103.913793%20L1150.05154,103.913793%20Z%20M1158.87913,105.201149%20L1150.05154,105.201149%20C1148.78192,105.201149%201147.75269,106.230379%201147.75269,107.5%20C1147.75269,108.769625%201148.78192,109.798851%201150.05154,109.798851%20L1150.05154,109.798851%20L1158.87913,109.798851%20C1160.14876,109.798851%201161.17798,108.769628%201161.17798,107.5%20C1161.17798,106.230376%201160.14875,105.201149%201158.87913,105.201149%20L1158.87913,105.201149%20Z%20M1158.60051,106.243295%20C1159.3115,106.243295%201159.88786,106.819654%201159.88786,107.530651%20C1159.88786,108.241648%201159.3115,108.818008%201158.60051,108.818008%20C1157.88951,108.818008%201157.31315,108.241648%201157.31315,107.530651%20C1157.31315,106.819654%201157.88951,106.243295%201158.60051,106.243295%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", d1 = "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(-1145.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M1158.87913,103.913793%20C1160.85974,103.913793%201162.46533,105.51939%201162.46533,107.5%20C1162.46533,109.480615%201160.85974,111.086207%201158.87913,111.086207%20L1158.87913,111.086207%20L1150.05154,111.086207%20C1148.07093,111.086207%201146.46533,109.480613%201146.46533,107.5%20C1146.46533,105.519392%201148.07093,103.913793%201150.05154,103.913793%20L1150.05154,103.913793%20Z%20M1158.87913,105.201149%20L1150.05154,105.201149%20C1148.78192,105.201149%201147.75269,106.230379%201147.75269,107.5%20C1147.75269,108.769625%201148.78192,109.798851%201150.05154,109.798851%20L1150.05154,109.798851%20L1158.87913,109.798851%20C1160.14876,109.798851%201161.17798,108.769628%201161.17798,107.5%20C1161.17798,106.230376%201160.14875,105.201149%201158.87913,105.201149%20L1158.87913,105.201149%20Z%20M1158.60051,106.243295%20C1159.3115,106.243295%201159.88786,106.819654%201159.88786,107.530651%20C1159.88786,108.241648%201159.3115,108.818008%201158.60051,108.818008%20C1157.88951,108.818008%201157.31315,108.241648%201157.31315,107.530651%20C1157.31315,106.819654%201157.88951,106.243295%201158.60051,106.243295%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", u1 = { class: "mix-body" }, m1 = { class: "switch-wrap" }, f1 = { class: "name" }, p1 = ["onClick"], g1 = ["onClick"], h1 = "--", v1 = {
|
|
38
38
|
DEFAULT_ICON: c1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var I=Object.defineProperty,V=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols,j=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,q=Reflect.get;var L=(s,o,l)=>o in s?I(s,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[o]=l,N=(s,o)=>{for(var l in o||(o={}))B.call(o,l)&&L(s,l,o[l]);if(E)for(var l of E(o))R.call(o,l)&&L(s,l,o[l]);return s},A=(s,o)=>V(s,P(o));var M=(s,o,l)=>q(j(s),l,o);var O=(s,o,l)=>new Promise((d,u)=>{var h=n=>{try{m(l.next(n))}catch(g){u(g)}},f=n=>{try{m(l.throw(n))}catch(g){u(g)}},m=n=>n.done?d(n.value):Promise.resolve(n.value).then(h,f);m((l=l.apply(s,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const S=require("./element-resize-detector-
|
|
1
|
+
"use strict";var I=Object.defineProperty,V=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols,j=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,q=Reflect.get;var L=(s,o,l)=>o in s?I(s,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[o]=l,N=(s,o)=>{for(var l in o||(o={}))B.call(o,l)&&L(s,l,o[l]);if(E)for(var l of E(o))R.call(o,l)&&L(s,l,o[l]);return s},A=(s,o)=>V(s,P(o));var M=(s,o,l)=>q(j(s),l,o);var O=(s,o,l)=>new Promise((d,u)=>{var h=n=>{try{m(l.next(n))}catch(g){u(g)}},f=n=>{try{m(l.throw(n))}catch(g){u(g)}},m=n=>n.done?d(n.value):Promise.resolve(n.value).then(h,f);m((l=l.apply(s,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const S=require("./element-resize-detector-BlMXyWIR.cjs"),H=require("./index-EnNA0nIi.cjs"),U=require("./titleStyle-NSnz6cUg.cjs"),T=require("./mix-control-modal-Lhzopftt.cjs"),$=require("./api-C0okiLNC.cjs"),F=require("element-plus"),Z="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(-1145.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M1158.87913,103.913793%20C1160.85974,103.913793%201162.46533,105.51939%201162.46533,107.5%20C1162.46533,109.480615%201160.85974,111.086207%201158.87913,111.086207%20L1158.87913,111.086207%20L1150.05154,111.086207%20C1148.07093,111.086207%201146.46533,109.480613%201146.46533,107.5%20C1146.46533,105.519392%201148.07093,103.913793%201150.05154,103.913793%20L1150.05154,103.913793%20Z%20M1158.87913,105.201149%20L1150.05154,105.201149%20C1148.78192,105.201149%201147.75269,106.230379%201147.75269,107.5%20C1147.75269,108.769625%201148.78192,109.798851%201150.05154,109.798851%20L1150.05154,109.798851%20L1158.87913,109.798851%20C1160.14876,109.798851%201161.17798,108.769628%201161.17798,107.5%20C1161.17798,106.230376%201160.14875,105.201149%201158.87913,105.201149%20L1158.87913,105.201149%20Z%20M1158.60051,106.243295%20C1159.3115,106.243295%201159.88786,106.819654%201159.88786,107.530651%20C1159.88786,108.241648%201159.3115,108.818008%201158.60051,108.818008%20C1157.88951,108.818008%201157.31315,108.241648%201157.31315,107.530651%20C1157.31315,106.819654%201157.88951,106.243295%201158.60051,106.243295%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",G="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(-1145.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M1158.87913,103.913793%20C1160.85974,103.913793%201162.46533,105.51939%201162.46533,107.5%20C1162.46533,109.480615%201160.85974,111.086207%201158.87913,111.086207%20L1158.87913,111.086207%20L1150.05154,111.086207%20C1148.07093,111.086207%201146.46533,109.480613%201146.46533,107.5%20C1146.46533,105.519392%201148.07093,103.913793%201150.05154,103.913793%20L1150.05154,103.913793%20Z%20M1158.87913,105.201149%20L1150.05154,105.201149%20C1148.78192,105.201149%201147.75269,106.230379%201147.75269,107.5%20C1147.75269,108.769625%201148.78192,109.798851%201150.05154,109.798851%20L1150.05154,109.798851%20L1158.87913,109.798851%20C1160.14876,109.798851%201161.17798,108.769628%201161.17798,107.5%20C1161.17798,106.230376%201160.14875,105.201149%201158.87913,105.201149%20L1158.87913,105.201149%20Z%20M1158.60051,106.243295%20C1159.3115,106.243295%201159.88786,106.819654%201159.88786,107.530651%20C1159.88786,108.241648%201159.3115,108.818008%201158.60051,108.818008%20C1157.88951,108.818008%201157.31315,108.241648%201157.31315,107.530651%20C1157.31315,106.819654%201157.88951,106.243295%201158.60051,106.243295%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",J={class:"mix-body"},K={class:"switch-wrap"},Y={class:"name"},Q=["onClick"],W=["onClick"],X="--",e1={DEFAULT_ICON:Z,ACTIVE_ICON:G,NAME_CN:"开关",NAME_EN:"Switch",ORDER:1},t1={bgColor:"#fff",titleColor:"#111",textColor:"#111",titleSize:14,textSize:14,itemHeight:32,radiusSize:8,isHideTitle:!1,method:{value:"alway",type:"select",label:"component.switch.method",options:S.CONTROL_OPTIONS}},D=[{command:"Control_01",status_name:"状态",status_fv:"",start:"",stop:""}],l1=["status_fv","status_name","command","start","stop"],o1=["mosaic"],a1={useAlias:!1,multiObject:!1,hideMultiObject:!0},s1={DEFAULT:e1,OPTIONS:t1,DATA:D,PARAMS:l1,SOURCE:o1,COMMON:a1},i1=e.defineComponent(A(N({},s1),{__name:"ctrSwitch",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},theme:{type:String,default:"light"},password:{type:String,default:""},authorized:{type:Array,default:()=>[]}},setup(s){const o=s,l=e.reactive({authorized:[],password:""}),d=e.reactive({mode:"",item:{},rule:""}),u=e.ref(null),h=e.ref(!0);class f extends S.BaseComponent{extractStyles(){var a,i,r,w,p,v,y,b,z,k;const{options:t}=this.props.conf;return{bgColor:((a=t==null?void 0:t.bgColor)==null?void 0:a.value)||"#fff",titleColor:((i=t==null?void 0:t.titleColor)==null?void 0:i.value)||"#111",textColor:((r=t==null?void 0:t.textColor)==null?void 0:r.value)||"#111",titleSize:((w=t==null?void 0:t.titleSize)==null?void 0:w.value)||16,textSize:((p=t==null?void 0:t.textSize)==null?void 0:p.value)||14,itemHeight:((v=t==null?void 0:t.itemHeight)==null?void 0:v.value)||32,radiusSize:(b=(y=t==null?void 0:t.radiusSize)==null?void 0:y.value)!=null?b:8,isHideTitle:(k=(z=t==null?void 0:t.isHideTitle)==null?void 0:z.value)!=null?k:!1}}init(){super.init(),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:D}onPreview(){return O(this,null,function*(){yield M(f.prototype,this,"onPreview").call(this);const t=yield T.getAuthorized(this.props);l.authorized=t.authorized,l.password=t.password})}setSocketData(t){if(!t)return;const{data:a}=this.props.conf;a.forEach(i=>{const r=this.extractDataValue(t,i.status_fv);i.value=r!=null?r:X})}}const m=new f(o,"ctrSwitch");m.setupLifecycle();const n=m.getStyle(),g=e.computed(()=>U.generateTitleStyle(o.conf.options)),C=c=>l.authorized.indexOf(c.command)===-1,x=(c,t)=>{var r;if(C(t)){F.ElMessage.warning("无权限操作");return}const{options:a}=o.conf;let i=((r=a==null?void 0:a.method)==null?void 0:r.value)||"alway";d.mode=c,d.item=t,d.rule=i,i==="alway"||i==="once"&&h.value?u.value.modal.visible=!0:_()},_=()=>{const{mode:c,item:t,rule:a}=d,{common:i}=o.conf,r=JSON.parse(sessionStorage.getItem(S.ALIAS_MAPPING_KEY)||"{}");let p={block_mapping:"pusher",action:"publish_command",object_id:i.useAlias?r[i.object_alias]:i.object_id||o.uid,command:t.command,value:t[c],rule:a,control:l.password};$.api.platform(v=>{v.code===200&&(F.ElMessage.success(v.msg),u.value.modal.visible=!1,h.value=!1)},p)};return(c,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(n).bgColor,borderRadius:`${e.unref(n).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(g.value)},e.toDisplayString(s.conf.caption||s.conf.name),5),e.createElementVNode("div",J,[e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.conf.data,(a,i)=>(e.openBlock(),e.createElementBlock("div",{class:"switch-item",key:i,style:e.normalizeStyle({height:`${e.unref(n).itemHeight}px`,backgroundColor:e.unref(n).bgColor,fontSize:`${e.unref(n).textSize}px`,color:e.unref(n).textColor})},[e.createElementVNode("div",Y,e.toDisplayString(a.status_name),1),e.createElementVNode("div",{class:e.normalizeClass(["circle-on",{"active-on":String(a.value)&&String(a.value)===a.start}]),style:e.normalizeStyle({cursor:C(a)?"not-allowed":"pointer"}),onClick:r=>x("start",a)},null,14,Q),e.createElementVNode("div",{class:e.normalizeClass(["circle-off",{"active-off":String(a.value)&&String(a.value)===a.stop}]),style:e.normalizeStyle({cursor:C(a)?"not-allowed":"pointer"}),onClick:r=>x("stop",a)},null,14,W)],4))),128))])]),e.renderSlot(c.$slots,"default",{},void 0,!0)],4),e.createVNode(T._sfc_main,{ref_key:"controlRef",ref:u,onSubmit:_,password:l.password},null,8,["password"])],64))}})),n1=H._export_sfc(i1,[["__scopeId","data-v-4e26d77b"]]);exports.default=n1;
|