mixdashboards 1.0.87 → 1.0.89
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/{BaseComponent-qzL33ZSL.js → BaseComponent-D82kw5vB.js} +14 -14
- package/dist/{BaseComponent-BHUHnLj-.cjs → BaseComponent-DoQ1oLoA.cjs} +1 -1
- package/dist/{EChartComponentBase-BtAW2Yko.js → EChartComponentBase-DUyyaXgA.js} +5 -5
- package/dist/{EChartComponentBase-C4s5HSfS.cjs → EChartComponentBase-ejDV5NEw.cjs} +1 -1
- package/dist/{EmergencyPlanPanel-CqvHGqqx.js → EmergencyPlanPanel-Bm-fqxYR.js} +1 -1
- package/dist/{EmergencyPlanPanel-C8ieiZvC.cjs → EmergencyPlanPanel-BnVlQ-f6.cjs} +1 -1
- package/dist/{HistoryPlanDialog-CUSKabw0.js → HistoryPlanDialog-BMzhidd2.js} +1 -1
- package/dist/{HistoryPlanDialog-D6VMuzat.cjs → HistoryPlanDialog-QBBxCX7D.cjs} +1 -1
- package/dist/{MixiotAppDetailPage-CFISQwpc.js → MixiotAppDetailPage-Dr5R35qW.js} +1 -1
- package/dist/{MixiotAppDetailPage-Bd9WrADz.cjs → MixiotAppDetailPage-FfC4ZxrA.cjs} +1 -1
- package/dist/{MonitoringMap-CV7YYixH.js → MonitoringMap-CpdWX4fF.js} +2 -2
- package/dist/{MonitoringMap-DjvavXD5.cjs → MonitoringMap-eVOQwtGG.cjs} +1 -1
- package/dist/{UniverSheet-C7QQQUHI.js → UniverSheet-02jn_UjA.js} +2 -2
- package/dist/{UniverSheet-BY4vwAeQ.cjs → UniverSheet-Ded-R47O.cjs} +1 -1
- package/dist/{accelerationChart-Dd7s6CA0.js → accelerationChart-B5n1Fc12.js} +21 -21
- package/dist/{accelerationChart-CnbCpT4d.cjs → accelerationChart-BKIZV5eU.cjs} +1 -1
- package/dist/{actionItem-DNgoQB08.cjs → actionItem-CLwRbg4y.cjs} +1 -1
- package/dist/{actionItem-CjNacj0F.js → actionItem-DsZ4M1qS.js} +2 -2
- package/dist/{alarmLevelChart-DDFP_ADG.js → alarmLevelChart-9ZdAuQvY.js} +2 -2
- package/dist/{alarmLevelChart-CRL45xkr.cjs → alarmLevelChart-CyCmhAZl.cjs} +1 -1
- package/dist/{alertTable-DrUs1wUN.js → alertTable-BbsFIJQc.js} +2 -2
- package/dist/{alertTable-UvxQNZ2Y.cjs → alertTable-Bj90t5vD.cjs} +1 -1
- package/dist/{aliasObjectSelectorDemo-BGgcbyT-.cjs → aliasObjectSelectorDemo-DOtzALw2.cjs} +1 -1
- package/dist/{aliasObjectSelectorDemo-Bep18FrL.js → aliasObjectSelectorDemo-fW-a4DCV.js} +7 -7
- package/dist/{annualRainfallChart-BMuH6tsO.js → annualRainfallChart-BzzrCCJe.js} +2 -2
- package/dist/{annualRainfallChart-DDnaZZp0.cjs → annualRainfallChart-Dzx4SJpe.cjs} +1 -1
- package/dist/{aqi-CbyrPtO4.js → aqi-006rTnsK.js} +2 -2
- package/dist/{aqi-DjkOgiun.cjs → aqi-DJrhDnm8.cjs} +1 -1
- package/dist/{aqiIndass-C-DEsmZ4.js → aqiIndass-DLN5CDbq.js} +21 -21
- package/dist/{aqiIndass-C3mPUZP6.cjs → aqiIndass-DokEaddv.cjs} +1 -1
- package/dist/{areaDeformCurve-B-bUeLI-.cjs → areaDeformCurve-CAV4T1p6.cjs} +1 -1
- package/dist/{areaDeformCurve-D6in1BnQ.js → areaDeformCurve-Eb4dsvjI.js} +2 -2
- package/dist/{arrayCard-CAoU7DHK.cjs → arrayCard-BeHFZmCq.cjs} +1 -1
- package/dist/{arrayCard-CpzPkgA9.js → arrayCard-DujWUhYK.js} +2 -2
- package/dist/{audio-TkisK5FD.js → audio-CrY3aLMX.js} +2 -2
- package/dist/{audio-BrTfWQmo.cjs → audio-lDtmX9bz.cjs} +1 -1
- package/dist/{bar-CT6sCNW4.js → bar-CVPXbvtH.js} +10 -10
- package/dist/{bar-BZBOTnN4.cjs → bar-WVNHLoJ3.cjs} +1 -1
- package/dist/{bmp-DgcyTiV5.cjs → bmp-BUgmrbhZ.cjs} +1 -1
- package/dist/{bmp-Xsdyi9gr.js → bmp-Bw1KLZox.js} +2 -2
- package/dist/{box-DNKXXXYx.js → box-D3M4txCW.js} +23 -23
- package/dist/{box-DED4JT5G.cjs → box-cqCoRDny.cjs} +1 -1
- package/dist/{chartConfigPanel-CF-q-XUN.js → chartConfigPanel-BS-4fGEs.js} +1 -1
- package/dist/{chartConfigPanel-D1M21nDO.cjs → chartConfigPanel-CVjBfsPG.cjs} +1 -1
- package/dist/{circleBar-CaC8ntp-.js → circleBar-C2-5NbKx.js} +2 -2
- package/dist/{circleBar-m6J_QvzN.cjs → circleBar-DHFREWDZ.cjs} +1 -1
- package/dist/{clock-tPcek90B.js → clock-CbPolNJf.js} +2 -2
- package/dist/{clock-CnV36tpq.cjs → clock-DCLrJzaN.cjs} +1 -1
- package/dist/{clt-DoDENEcJ.cjs → clt-CpnBLyYn.cjs} +1 -1
- package/dist/{clt-DwoBhD_P.js → clt-EjSvDr2u.js} +15 -15
- package/dist/{cmc-Dld5UOW9.cjs → cmc-3E3UvBFP.cjs} +1 -1
- package/dist/{cmc-ObS3fWlL.js → cmc-BDDdRH_H.js} +25 -25
- package/dist/{cmp-Bp9FqBZV.cjs → cmp-DAzG9LwZ.cjs} +1 -1
- package/dist/{cmp-DEH1jzrG.js → cmp-_zlwmg1E.js} +2 -2
- package/dist/{conclusionCard-DXiFAJmo.cjs → conclusionCard-9zD6W6AF.cjs} +1 -1
- package/dist/{conclusionCard-CHFJIt7G.js → conclusionCard-b_f9juIB.js} +2 -2
- package/dist/{controlList-hWCbafkY.js → controlList-DFX97otG.js} +2 -2
- package/dist/{controlList-B2tV397i.cjs → controlList-DHG2jD51.cjs} +1 -1
- package/dist/{controlRecordList-DnhHr7kU.js → controlRecordList-B0oTZp28.js} +2 -2
- package/dist/{controlRecordList-uAmuCKjf.cjs → controlRecordList-kGbanAXa.cjs} +1 -1
- package/dist/{controlRecordListAPP-BpZmCMM-.js → controlRecordListAPP-BOukSyHq.js} +2 -2
- package/dist/{controlRecordListAPP-BpfPZW3b.cjs → controlRecordListAPP-gXYEcRA_.cjs} +1 -1
- package/dist/{crd-BQ7AFV1c.cjs → crd-BATQ1KFa.cjs} +1 -1
- package/dist/{crd-ChpWMXAm.js → crd-C_z8MNM0.js} +2 -2
- package/dist/{ctrBtn-PTITC7R8.cjs → ctrBtn-BnwZlZ5c.cjs} +1 -1
- package/dist/{ctrBtn-CmdQ3s7z.js → ctrBtn-DTyOVAVy.js} +11 -11
- package/dist/{ctrSet-Dv5i5ne5.js → ctrSet-BTnbgdd3.js} +7 -7
- package/dist/{ctrSet-CYqeDilm.cjs → ctrSet-BWr9dDIX.cjs} +1 -1
- package/dist/{ctrSwitch-C3NZcUxa.js → ctrSwitch-BH76ZhOi.js} +8 -8
- package/dist/{ctrSwitch-Byt4qKjt.cjs → ctrSwitch-CCdNwgtf.cjs} +1 -1
- package/dist/{dataManagement-BFIS0e4d.cjs → dataManagement-DEe2X-oe.cjs} +1 -1
- package/dist/{dataManagement-enhqxRgF.js → dataManagement-ju5aByQS.js} +2 -2
- package/dist/{dataReport-DLdB1ARI.js → dataReport-B5tUeLYL.js} +2 -2
- package/dist/{dataReport-vfCe0q9d.cjs → dataReport-DGdNGqNg.cjs} +1 -1
- package/dist/{dataTable-DFZrMHnF.js → dataTable-ByiR5jdH.js} +1 -1
- package/dist/{dataTable-DE3yOae0.cjs → dataTable-ChBv_YlP.cjs} +1 -1
- package/dist/{datetime-BK4xGaTM.js → datetime-CThnusEe.js} +2 -2
- package/dist/{datetime-DXTcE56I.cjs → datetime-DG6uMSUr.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-BKFavDI5.cjs → deepClusterSlipSurface-8hEjAzBW.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-D_PbxUdd.js → deepClusterSlipSurface-CLxfYGxD.js} +29 -29
- package/dist/{deepDataMatrix-avI-0mLw.js → deepDataMatrix-6Ny4cIe7.js} +21 -21
- package/dist/{deepDataMatrix-DzzK55Mc.cjs → deepDataMatrix-D5B1nu2J.cjs} +1 -1
- package/dist/{deepDisplacement3D-CbyatHpJ.js → deepDisplacement3D-BVjkYHfy.js} +2 -2
- package/dist/{deepDisplacement3D-DW0CW2ut.cjs → deepDisplacement3D-DCJ00L5m.cjs} +1 -1
- package/dist/{deepDisplacementChart-DY0lNJOz.js → deepDisplacementChart-Blzrj3dF.js} +40 -40
- package/dist/{deepDisplacementChart-Dm71dHpY.cjs → deepDisplacementChart-DdiaOR7t.cjs} +1 -1
- package/dist/{deepDisplacementChart-B7GDsSm7.js → deepDisplacementChart-Dvn76ypl.js} +22 -22
- package/dist/{deepDisplacementChart-DauJXxkW.cjs → deepDisplacementChart-pktiGXQI.cjs} +1 -1
- package/dist/{deepDisplacementView-RywcwybM.js → deepDisplacementView-DIwTwh_K.js} +1 -1
- package/dist/{deepDisplacementView-BJAAMyTP.cjs → deepDisplacementView-ZLKNGoIQ.cjs} +1 -1
- package/dist/{deepNodeTemperatureChart-Et7GEspn.js → deepNodeTemperatureChart-115sZmrU.js} +36 -36
- package/dist/{deepNodeTemperatureChart-FN14qWXP.cjs → deepNodeTemperatureChart-gDvvGuyq.cjs} +1 -1
- package/dist/{deepTangentAngleChart-m3r_mJg0.cjs → deepTangentAngleChart-DVSVhg5b.cjs} +1 -1
- package/dist/{deepTangentAngleChart-CEsc85Mi.js → deepTangentAngleChart-DmC2LGTU.js} +22 -22
- package/dist/{deepTemperatureField-jfV1EahT.cjs → deepTemperatureField-ClJsxAvt.cjs} +1 -1
- package/dist/{deepTemperatureField-Cr3c_t1T.js → deepTemperatureField-D6G_kQeJ.js} +32 -32
- package/dist/{deepTrendChart-D7IDGKBC.js → deepTrendChart-C53TU6F2.js} +34 -34
- package/dist/{deepTrendChart-DIyUa5qe.cjs → deepTrendChart-Drys7qZg.cjs} +1 -1
- package/dist/{deviceOnlineStatus--G66OLv8.cjs → deviceOnlineStatus-BnoXmtDj.cjs} +1 -1
- package/dist/{deviceOnlineStatus-DDo0caCc.js → deviceOnlineStatus-cZu_IljM.js} +2 -2
- package/dist/{deviceStatus-B0sBzHx9.cjs → deviceStatus-Bxqii2_U.cjs} +1 -1
- package/dist/{deviceStatus-cmxKruD-.js → deviceStatus-DcjQXNtS.js} +19 -19
- package/dist/{displacementDataTable-Bxs-LIOW.cjs → displacementDataTable-C3W_0L7c.cjs} +1 -1
- package/dist/{displacementDataTable-BwhylBbX.js → displacementDataTable-DlwZHsnk.js} +17 -17
- package/dist/{displacementTrajectoryChart-JJEGEVMc.cjs → displacementTrajectoryChart-C54ljhYo.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-D3VcZ1qM.js → displacementTrajectoryChart-DCFPd8I8.js} +34 -34
- package/dist/{displacementTrendChart-BlIqd2IK.js → displacementTrendChart-Bwi9pIKg.js} +32 -32
- package/dist/{displacementTrendChart-GmxA4M6n.cjs → displacementTrendChart-C2UFFHy3.cjs} +1 -1
- package/dist/{dxf-JH5I0L5F.cjs → dxf-BXat6zT0.cjs} +1 -1
- package/dist/{dxf-r-iy1MWn.js → dxf-CvvsXRab.js} +2 -2
- package/dist/{dzc-KbkTkgzk.cjs → dzc-611sFAMA.cjs} +1 -1
- package/dist/{dzc-CMhN9l76.js → dzc-xIM9tlfM.js} +8 -8
- package/dist/{emergencyPlan-CR8HkDi4.js → emergencyPlan-BLfRn6UD.js} +3 -3
- package/dist/{emergencyPlan-FSdy0Ik5.cjs → emergencyPlan-DYckkWIF.cjs} +1 -1
- package/dist/{evn-D8kcAx_T.cjs → evn-BVP-ihLU.cjs} +1 -1
- package/dist/{evn-DGxcYjRA.js → evn-C5g9HTlT.js} +2 -2
- package/dist/{evolutionChart-K7H8KKIG.js → evolutionChart-CqCoGysK.js} +3 -3
- package/dist/{evolutionChart-CI2hDs5C.cjs → evolutionChart-DFOIeAnj.cjs} +1 -1
- package/dist/{fileViewer-Df0AU_z9.js → fileViewer-BGBuea6P.js} +2 -2
- package/dist/{fileViewer-DtIGy-zH.cjs → fileViewer-CdCgk5vi.cjs} +1 -1
- package/dist/{filterBar-DEfkfl04.cjs → filterBar-1LBu8CWi.cjs} +1 -1
- package/dist/{filterBar-BRDe-GgC.js → filterBar-CG1pnrgf.js} +2 -2
- package/dist/{fireCombustionCurve-DJXeynXa.js → fireCombustionCurve-DBLZItFG.js} +3 -3
- package/dist/{fireCombustionCurve-C8UGnEPC.cjs → fireCombustionCurve-DFGlWVK-.cjs} +1 -1
- package/dist/{fireFilterBar-CXiN-Jkv.js → fireFilterBar-55way8Kq.js} +2 -2
- package/dist/{fireFilterBar-iqgVdbgH.cjs → fireFilterBar-DmXRJrBH.cjs} +1 -1
- package/dist/{fireHistoryTable-CTIdqGk3.js → fireHistoryTable-6lMO644G.js} +2 -2
- package/dist/{fireHistoryTable-Dl4A1pRv.cjs → fireHistoryTable-CrOZPx1P.cjs} +1 -1
- package/dist/{gag-BVPZK4hG.js → gag-BRtB5Zyd.js} +2 -2
- package/dist/{gag-DQa6TEDv.cjs → gag-C8Q8kIfD.cjs} +1 -1
- package/dist/{gasStationList-BkzLZp4-.cjs → gasStationList-CuMupuAF.cjs} +1 -1
- package/dist/{gasStationList-NFyxin-H.js → gasStationList-Dh0HOgcE.js} +2 -2
- package/dist/{geo3dViewer-VRenmVKs.cjs → geo3dViewer-CxUsz_Fa.cjs} +1 -1
- package/dist/{geo3dViewer-BJpae_MX.js → geo3dViewer-ph_PeQy-.js} +3 -3
- package/dist/{glbModel-C96hRxP0.js → glbModel-HkdGjDju.js} +2 -2
- package/dist/{glbModel-i2X1L8LC.cjs → glbModel-keR5BhQS.cjs} +1 -1
- package/dist/{globalObjectSelector-DhbeX3bm.cjs → globalObjectSelector-BbyN1tdM.cjs} +1 -1
- package/dist/{globalObjectSelector-D09a0A2t.js → globalObjectSelector-C181O9oo.js} +43 -43
- package/dist/{gnssFilterBar-BX3mEKiT.cjs → gnssFilterBar-CLrEX2db.cjs} +1 -1
- package/dist/{gnssFilterBar-BHqE79Ri.js → gnssFilterBar-vcfVn7a6.js} +2 -2
- package/dist/{gnssHistoryTable-ZBfzhnlx.cjs → gnssHistoryTable-BpFJjWcy.cjs} +1 -1
- package/dist/{gnssHistoryTable-D9tglOkP.js → gnssHistoryTable-D0VkG9vT.js} +2 -2
- package/dist/{gnssMapView-B2rSxPml.cjs → gnssMapView-ChrUruFB.cjs} +2 -2
- package/dist/{gnssMapView-Bicnnr6P.js → gnssMapView-a4luVEYa.js} +4 -4
- package/dist/{gnssSectionProfile-BKnvQBHa.cjs → gnssSectionProfile-CoP2v7aY.cjs} +1 -1
- package/dist/{gnssSectionProfile-BfkjiI0i.js → gnssSectionProfile-DnHfVuhk.js} +2 -2
- package/dist/{gnssTimeSeriesChart-BTK4Qize.js → gnssTimeSeriesChart-B1NJ4cn0.js} +2 -2
- package/dist/{gnssTimeSeriesChart-Cj-151Zs.cjs → gnssTimeSeriesChart-DVAjY9eo.cjs} +1 -1
- package/dist/{gnssXYTrajectory-BgwA-1Fx.cjs → gnssXYTrajectory-CiFR9qoL.cjs} +1 -1
- package/dist/{gnssXYTrajectory-DZiGIgf5.js → gnssXYTrajectory-D_pCZ7Hd.js} +2 -2
- package/dist/{grd-DW4ve5k2.js → grd-2THwmH-B.js} +17 -17
- package/dist/{grd-DrRka55C.cjs → grd-CZT36wMZ.cjs} +1 -1
- package/dist/{grdIndass-CofZtTJe.cjs → grdIndass-CO9sMJwo.cjs} +1 -1
- package/dist/{grdIndass-CRZ9agT-.js → grdIndass-CjQCGgum.js} +10 -10
- package/dist/{grg-zv4YAkAu.js → grg-CDte_thi.js} +10 -10
- package/dist/{grg-Cugg5crY.cjs → grg-Cs7-r62k.cjs} +1 -1
- package/dist/{gridview-BjOw8zBf.cjs → gridview-BYOPPFAQ.cjs} +1 -1
- package/dist/{gridview-DRB1rG1L.js → gridview-DoFkoRJG.js} +2 -2
- package/dist/{groundwaterFilterBar-DyCL0fs9.js → groundwaterFilterBar-BPSFA1Lw.js} +2 -2
- package/dist/{groundwaterFilterBar-D4appJuv.cjs → groundwaterFilterBar-FCQgVbxJ.cjs} +1 -1
- package/dist/{groundwaterProfileChart-CDByowkP.cjs → groundwaterProfileChart-CZM2Ijqj.cjs} +2 -2
- package/dist/{groundwaterProfileChart-Bo_XCqyF.js → groundwaterProfileChart-CrKLzRsw.js} +3 -3
- package/dist/{groundwaterTimeCurve-Cj5qSKTI.cjs → groundwaterTimeCurve-BU92AmmI.cjs} +1 -1
- package/dist/{groundwaterTimeCurve-C0WRGZNY.js → groundwaterTimeCurve-Dy5QHMnD.js} +3 -3
- package/dist/{groupCard-JeKQg4FL.js → groupCard-ByiU2e9a.js} +2 -2
- package/dist/{groupCard-B7XW81Xq.cjs → groupCard-Bz4dzhtP.cjs} +1 -1
- package/dist/{headerBar-D5FXDHNR.js → headerBar-Bmugs0fE.js} +2 -2
- package/dist/{headerBar-BXNzoDYA.cjs → headerBar-DGQqoZZH.cjs} +1 -1
- package/dist/{history-D_NO9ojb.cjs → history-BNN6YYlw.cjs} +1 -1
- package/dist/{history-BDIdK3AY.js → history-CIAU9_hA.js} +12 -12
- package/dist/{index-D7PZNHF4.cjs → index-BdWR_FTA.cjs} +10 -10
- package/dist/{index-BHBE19E2.js → index-CCWU_se2.js} +2248 -2208
- package/dist/{insarDeformChart-wTnTF5NC.cjs → insarDeformChart-B6ad_kTg.cjs} +1 -1
- package/dist/{insarDeformChart-DuBYscAT.js → insarDeformChart-CpMWLFgM.js} +2 -2
- package/dist/{insarImageViewer-DGkic1Rj.cjs → insarImageViewer-CXkitdwR.cjs} +1 -1
- package/dist/{insarImageViewer-tPyDE815.js → insarImageViewer-Dwvau4-d.js} +2 -2
- package/dist/{kds-Bto_xGCo.cjs → kds-Bjks3GFb.cjs} +1 -1
- package/dist/{kds-Joeeniwr.js → kds-DrlduN0N.js} +21 -21
- package/dist/{kpiCard-D_8YToN_.cjs → kpiCard-CEPgU6Td.cjs} +1 -1
- package/dist/{kpiCard-B2MTndw-.js → kpiCard-CvTeFbgJ.js} +2 -2
- package/dist/{landslideMap-BSImmP3T.js → landslideMap-B5ecUy9T.js} +30 -30
- package/dist/{landslideMap-DbvJ2h3R.cjs → landslideMap-BBMdZRMN.cjs} +1 -1
- package/dist/{landslideWarning-DjgODoEd.js → landslideWarning-CMEvyHhr.js} +11 -11
- package/dist/{landslideWarning-CVvZS5-l.cjs → landslideWarning-CYLG3Oxj.cjs} +1 -1
- package/dist/{layerTabs-CT14C_oL.cjs → layerTabs-DstdlkUM.cjs} +1 -1
- package/dist/{layerTabs-C2qdit8f.js → layerTabs-K7SxTlw4.js} +2 -2
- package/dist/{leaflet-src-CsuGTXZi.js → leaflet-src-ClP2DPnn.js} +1 -1
- package/dist/{leaflet-src-BuDfd_hT.cjs → leaflet-src-DhrxkAwA.cjs} +1 -1
- package/dist/{lerc-5_flDPwM.js → lerc-CmVR8_Da.js} +2 -2
- package/dist/{lerc-BVRAhrgg.cjs → lerc-DA9nzmCS.cjs} +1 -1
- package/dist/{lin-Djc6HZCi.js → lin-Dm_oqUd8.js} +11 -11
- package/dist/{lin--Wc9Mzoq.cjs → lin-Dn6V4e5I.cjs} +1 -1
- package/dist/{linIndass-Bxs7wFnh.cjs → linIndass-BldY-1UZ.cjs} +1 -1
- package/dist/{linIndass-CQ2BZiY0.js → linIndass-CowqLuzl.js} +10 -10
- package/dist/{lst-CxLOKAzL.js → lst-Bu9POh4U.js} +2 -2
- package/dist/{lst-C-yxmy1r.cjs → lst-CPzaL4pE.cjs} +1 -1
- package/dist/{manualEntry-Dd9swkaL.cjs → manualEntry-D6HxT0e1.cjs} +1 -1
- package/dist/{manualEntry-DLL43b_K.js → manualEntry-DFPCiPZm.js} +2 -2
- package/dist/{mapBackground-CDGjjy8-.js → mapBackground-DNs_5l_N.js} +3 -3
- package/dist/{mapBackground-DNQRoaFb.cjs → mapBackground-DdNuu0qi.cjs} +1 -1
- package/dist/{mappingList-C9HUo2y9.cjs → mappingList-B2euTZM6.cjs} +1 -1
- package/dist/{mappingList-DrhZfKtH.js → mappingList-D9Ax3W4e.js} +2 -2
- package/dist/{markdownViewer-DIb7t2bx.js → markdownViewer-BCz-nS97.js} +2 -2
- package/dist/{markdownViewer-Bea8zl8q.cjs → markdownViewer-BlmkSj2F.cjs} +1 -1
- package/dist/{mix-control-modal-CaAkqkzX.js → mix-control-modal-DTiG49Lj.js} +7 -7
- package/dist/{mix-control-modal-Dh-NZ50w.cjs → mix-control-modal-DaSRoqVn.cjs} +1 -1
- package/dist/{mixGrid-DPdzqHke.js → mixGrid-BuBmT7GK.js} +2 -2
- package/dist/{mixGrid-DFuBeOy6.cjs → mixGrid-CM-obY4q.cjs} +1 -1
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +1 -1
- package/dist/mixiotObjectListApi-434Mto0m.cjs +1 -0
- package/dist/{mixiotObjectListApi-CJsYvcG_.js → mixiotObjectListApi-ZWtORc3c.js} +37 -35
- package/dist/{mjpegCamera-BvlKwwDL.cjs → mjpegCamera-D3JM1GzZ.cjs} +1 -1
- package/dist/{mjpegCamera-C9PNl-r4.js → mjpegCamera-ye25efWW.js} +2 -2
- package/dist/{monitorAlert-LeeMIRjf.cjs → monitorAlert-CJ_pAHXP.cjs} +1 -1
- package/dist/{monitorAlert-vVcYtohz.js → monitorAlert-Clr3_BqZ.js} +14 -14
- package/dist/{monitorData-BtF_j2kd.cjs → monitorData-Biwb0h-A.cjs} +1 -1
- package/dist/{monitorData-CHhLhD4y.js → monitorData-nXGeoFVW.js} +9 -9
- package/dist/{monitorSpeedChart-BH_rITMD.cjs → monitorSpeedChart-B7FhH0Kk.cjs} +1 -1
- package/dist/{monitorSpeedChart-Dhchpe2h.js → monitorSpeedChart-CiS6TSfI.js} +1 -1
- package/dist/{mxa-CU0OUOdG.cjs → mxa-D5zEytKD.cjs} +1 -1
- package/dist/{mxa-B3DlA-Xs.js → mxa-Nv228pmQ.js} +20 -20
- package/dist/{myValue-AeGxHeE2.cjs → myValue-BmHQ_lRL.cjs} +1 -1
- package/dist/{myValue-DEbeO9Cb.js → myValue-CBsVyhrq.js} +2 -2
- package/dist/{myValueList-qDBbrqDv.js → myValueList-CNGkPgE3.js} +2 -2
- package/dist/{myValueList-EkbSpjf0.cjs → myValueList-F2JXq_cs.cjs} +1 -1
- package/dist/{objectList-B1Q5MJPW.cjs → objectList-B2AqFaoX.cjs} +1 -1
- package/dist/{objectList-DTHwnvxc.js → objectList-CacWdl7-.js} +3 -3
- package/dist/{objectListAPP-njF3tJUP.js → objectListAPP-B8ryIqee.js} +4 -4
- package/dist/{objectListAPP-CgPjYGiu.cjs → objectListAPP-oI7xgnNz.cjs} +1 -1
- package/dist/{percentBar-Dil8Vm3q.cjs → percentBar-BamhAckr.cjs} +1 -1
- package/dist/{percentBar-BAwdbKH8.js → percentBar-By4ErDLm.js} +15 -15
- package/dist/{photo-Bn0lWnis.js → photo-5bKR5PWJ.js} +2 -2
- package/dist/{photo-BlZ5X_9p.cjs → photo-Db9B9k7E.cjs} +1 -1
- package/dist/{pie-CG2cvCTM.js → pie-B8IcWNmh.js} +2 -2
- package/dist/{pie-CbOvGe0n.cjs → pie-Bo5fBYnv.cjs} +1 -1
- package/dist/{placeholder-jPC58i_u.cjs → placeholder-Ba-1pW5q.cjs} +1 -1
- package/dist/{placeholder-Bdop1bDv.js → placeholder-cEZ1VojS.js} +1 -1
- package/dist/{pressBtn-Cwp0-Mju.js → pressBtn-B90A4FTO.js} +7 -7
- package/dist/{pressBtn-C6mEzpGm.cjs → pressBtn-Bg9z2xjW.cjs} +1 -1
- package/dist/{processTable--PnPJzep.js → processTable-Dmf9PtKT.js} +2 -2
- package/dist/{processTable-CUrw-_tx.cjs → processTable-KmBhdxq9.cjs} +1 -1
- package/dist/{progressBar-CLBQrVhg.js → progressBar-CBvxzYpz.js} +2 -2
- package/dist/{progressBar-Dg1WRKUU.cjs → progressBar-CuR-TjJy.cjs} +1 -1
- package/dist/{progressCircle-DBXHBoZS.cjs → progressCircle-B7uJFhbg.cjs} +1 -1
- package/dist/{progressCircle-Dft4lI8s.js → progressCircle-CxF0elMR.js} +2 -2
- package/dist/{qrcode-BH8f2Hfp.cjs → qrcode-B5ohsZSk.cjs} +1 -1
- package/dist/{qrcode-B7VNzAkt.js → qrcode-Bj1iBOqf.js} +40 -31
- package/dist/{raceBar-Ck_RLw_X.js → raceBar-BM7aKngn.js} +2 -2
- package/dist/{raceBar-DZCr0eC-.cjs → raceBar-cbIKXdrY.cjs} +1 -1
- package/dist/{rad-C7ostpqi.js → rad-BxLSGBt5.js} +2 -2
- package/dist/{rad-C3kidKBD.cjs → rad-XuUgEqvp.cjs} +1 -1
- package/dist/{radarMapViewer-B8g9WmmH.cjs → radarMapViewer-CE3iOzHQ.cjs} +1 -1
- package/dist/{radarMapViewer-BxHWMhxf.js → radarMapViewer-Y2d-z-Xi.js} +2 -2
- package/dist/{rainfallFilterBar-G_3cep1I.cjs → rainfallFilterBar-5B9nOZMQ.cjs} +1 -1
- package/dist/{rainfallFilterBar-C6amyMsu.js → rainfallFilterBar-BQQ6cWWT.js} +2 -2
- package/dist/{rainfallTimeCurve-dOfq4IKr.js → rainfallTimeCurve-D7UHAW7B.js} +3 -3
- package/dist/{rainfallTimeCurve-Ce8eRvv6.cjs → rainfallTimeCurve-VUFDrlaJ.cjs} +1 -1
- package/dist/{rangeLin-GOVFLiyl.cjs → rangeLin-BCy_aU2O.cjs} +1 -1
- package/dist/{rangeLin-CXrCb7e3.js → rangeLin-CWkY4AVF.js} +21 -21
- package/dist/{realtimeEvolutionMap-VApbSWKk.cjs → realtimeEvolutionMap-CpOZ-K90.cjs} +1 -1
- package/dist/{realtimeEvolutionMap-CLhVGzzZ.js → realtimeEvolutionMap-midbOpQ_.js} +2 -2
- package/dist/{regionBar-DOkzOqR4.cjs → regionBar-BO8d6Gfr.cjs} +1 -1
- package/dist/{regionBar-CgCQBHYm.js → regionBar-ClY6Vcp0.js} +2 -2
- package/dist/{request-CsLYkQ1F.js → request-DHoyVWU-.js} +13 -13
- package/dist/{request-DBDym05o.cjs → request-Wvyc5KfO.cjs} +1 -1
- package/dist/{retainer1-D2ORoyPc.js → retainer1-C074kiSG.js} +3 -3
- package/dist/{retainer1-BihlkLkk.cjs → retainer1-fPoh6UWL.cjs} +1 -1
- package/dist/{retainer2-89gF8O00.js → retainer2-D26SOrnE.js} +3 -3
- package/dist/{retainer2-5-qgDYHt.cjs → retainer2-DQffbiOL.cjs} +1 -1
- package/dist/{retainerRecordList-ZukSm42U.cjs → retainerRecordList-17lNzhYY.cjs} +1 -1
- package/dist/{retainerRecordList-B7oZOPiz.js → retainerRecordList-CMrtXtg0.js} +2 -2
- package/dist/{retainerRecordListAPP-CJifqoYV.js → retainerRecordListAPP-BVdG5XNP.js} +3 -3
- package/dist/{retainerRecordListAPP-C3ghAm55.cjs → retainerRecordListAPP-Dv07T1sM.cjs} +1 -1
- package/dist/{ringTopN-DEWE8OKA.js → ringTopN-D8fLY5hp.js} +2 -2
- package/dist/{ringTopN-BKFTI8w3.cjs → ringTopN-DfEl45ch.cjs} +1 -1
- package/dist/{riskRegionTable-Dg-ZfEl1.cjs → riskRegionTable-DFj8c8Hv.cjs} +1 -1
- package/dist/{riskRegionTable-DDWPmzK4.js → riskRegionTable-YottkGcg.js} +13 -13
- package/dist/{sankey-CjCzdx5A.js → sankey-D-C9WSeH.js} +8 -8
- package/dist/{sankey-CVIFo2TP.cjs → sankey-D-fUhpIU.cjs} +1 -1
- package/dist/{scd-ExZtelyF.js → scd-CasvRFjo.js} +2 -2
- package/dist/{scd-D7vwm2So.cjs → scd-DNoPBk6l.cjs} +1 -1
- package/dist/{sideMenu-9YGvznYC.js → sideMenu-C0wdN7VA.js} +2 -2
- package/dist/{sideMenu-LL4XLBcW.cjs → sideMenu-CVxLfq_Q.cjs} +1 -1
- package/dist/{slopeStability-BeoNqhaA.cjs → slopeStability-B-YjvDTE.cjs} +1 -1
- package/dist/{slopeStability-BRVBekjo.js → slopeStability-B5mssi6B.js} +20 -20
- package/dist/{speedCurve-DJUY_EGs.js → speedCurve-BDW6iwb5.js} +2 -2
- package/dist/{speedCurve-DLuFWpeb.cjs → speedCurve-D_ZbiTc0.cjs} +1 -1
- package/dist/{stackedBar-W-rgbty6.cjs → stackedBar-CW8BzUQc.cjs} +1 -1
- package/dist/{stackedBar-DkjXvEyH.js → stackedBar-UfQPMmu_.js} +9 -9
- package/dist/{stressFilterBar-FmqkdIl5.js → stressFilterBar-B4qAx5bg.js} +2 -2
- package/dist/{stressFilterBar-D02NjLM9.cjs → stressFilterBar-Du1vnYaq.cjs} +1 -1
- package/dist/{stressTimeCurve-Ck194Rx4.js → stressTimeCurve-AlnfIJP8.js} +3 -3
- package/dist/{stressTimeCurve-CEU3JrfW.cjs → stressTimeCurve-D_Js7Slh.cjs} +1 -1
- package/dist/{swiper-CM54onRz.cjs → swiper-CkkB3IUt.cjs} +1 -1
- package/dist/{swiper-DGAjlGUa.js → swiper-Q7RLo5sT.js} +49 -51
- package/dist/{terminalConfigList-DmIncQe8.js → terminalConfigList-D_Ey_hOB.js} +2 -2
- package/dist/{terminalConfigList-hy2uUsJe.cjs → terminalConfigList-lG7Guswq.cjs} +1 -1
- package/dist/{terminalList-9qcAM4LG.js → terminalList-BiS8IqVU.js} +2 -2
- package/dist/{terminalList-C6DxUrb2.cjs → terminalList-DsQfZkLH.cjs} +1 -1
- package/dist/{terminalListAPP-Dl5MpCjB.js → terminalListAPP-C_oAW2DY.js} +3 -3
- package/dist/{terminalListAPP-RYLAuqiK.cjs → terminalListAPP-Die7Iis9.cjs} +1 -1
- package/dist/{textbox-GG4d1QIy.cjs → textbox-DtwW5kQK.cjs} +1 -1
- package/dist/{textbox-CHkPlSAX.js → textbox-M7oHdxop.js} +2 -2
- package/dist/{timeQueryBar-B_sNNLNx.cjs → timeQueryBar-BST1N_pA.cjs} +1 -1
- package/dist/{timeQueryBar-4KSmgROW.js → timeQueryBar-D72U8KfL.js} +1 -1
- package/dist/{timeSeries-C6jp_8BG.cjs → timeSeries-DdrD6BXI.cjs} +1 -1
- package/dist/{timeSeries-CgJ0SIKo.js → timeSeries-kOLJD8jS.js} +3 -3
- package/dist/{timeSeriesCurve-TMqcdmQk.js → timeSeriesCurve-B7jHBbab.js} +3 -3
- package/dist/{timeSeriesCurve-CH12QzSV.cjs → timeSeriesCurve-CemFc-kT.cjs} +1 -1
- package/dist/{toggleBtn-DQd4gNtX.cjs → toggleBtn-BVJD8hdP.cjs} +1 -1
- package/dist/{toggleBtn-4pgNSMG6.js → toggleBtn-l0gcVWhL.js} +2 -2
- package/dist/{trajectoryConfigPanel-BG3SSwn9.js → trajectoryConfigPanel-BvjQNU8d.js} +1 -1
- package/dist/{trajectoryConfigPanel-Bw1VrV-D.cjs → trajectoryConfigPanel-p9RwKXye.cjs} +1 -1
- package/dist/{trajectoryScatter-CEN_a_hP.js → trajectoryScatter-D0X0MuO_.js} +24 -24
- package/dist/{trajectoryScatter-YyQc-_lS.cjs → trajectoryScatter-DUF9rbQZ.cjs} +1 -1
- package/dist/{universalConfigPanel-DXs2cr1a.cjs → universalConfigPanel-Cuy_d2Fi.cjs} +1 -1
- package/dist/{universalConfigPanel-DM-AnPb9.js → universalConfigPanel-G_SwTzLS.js} +1 -1
- package/dist/{universalTable-zF3jltzT.cjs → universalTable-C6TQyu10.cjs} +1 -1
- package/dist/{universalTable-BqhsfcZp.js → universalTable-CLytqIJ-.js} +2 -2
- package/dist/{video-Dq1cVS0l.cjs → video-BuCsJa2J.cjs} +1 -1
- package/dist/{video-D1iN2V0C.js → video-CLp-qmhh.js} +2 -2
- package/dist/{videoMonitor-hkuvSmn4.js → videoMonitor-BHFy7nV7.js} +10 -10
- package/dist/{videoMonitor-B_1M-KcU.cjs → videoMonitor-DtASZV-Y.cjs} +1 -1
- package/dist/{vlu-0SrsCMT-.cjs → vlu-aDDyx47b.cjs} +1 -1
- package/dist/{vlu-K66RvuKO.js → vlu-dvnZmwrq.js} +2 -2
- package/dist/{warningOverview-BRKnU2qJ.js → warningOverview-BWNvhGEr.js} +3 -3
- package/dist/{warningOverview-DE4mZJtA.cjs → warningOverview-G5uze01-.cjs} +1 -1
- package/dist/{weather-DXSwe2wL.js → weather-B7dkVE6k.js} +2 -2
- package/dist/{weather-Cc-DzSlJ.cjs → weather-DOAZCxta.cjs} +1 -1
- package/dist/{windLin-BpJaU1Or.js → windLin-DbHtg5K4.js} +2 -2
- package/dist/{windLin-BWa_lMdL.cjs → windLin-k8OA6Yul.cjs} +1 -1
- package/package.json +1 -1
- package/dist/mixiotObjectListApi-DVYddjqi.cjs +0 -1
|
@@ -27,9 +27,9 @@ var L = (o, e, t) => new Promise((u, c) => {
|
|
|
27
27
|
l((t = t.apply(o, e)).next());
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as k, ref as E, computed as Z, openBlock as $, createElementBlock as T, normalizeStyle as M, unref as g, createElementVNode as v, toDisplayString as D, renderSlot as A, nextTick as j } from "vue";
|
|
30
|
-
import { a as V, _ as B } from "./index-
|
|
30
|
+
import { a as V, _ as B } from "./index-CCWU_se2.js";
|
|
31
31
|
import { ElMessage as R } from "element-plus";
|
|
32
|
-
import { E as W } from "./EChartComponentBase-
|
|
32
|
+
import { E as W } from "./EChartComponentBase-DUyyaXgA.js";
|
|
33
33
|
import { g as U } from "./titleStyle-BT5GlpAb.js";
|
|
34
34
|
import { i as H, c as J } from "./install-CY89Nrxl.js";
|
|
35
35
|
import { i as q } from "./install-B_v5XJLG.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var O=Object.defineProperty,A=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=(l,t,o)=>t in l?O(l,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):l[t]=o,C=(l,t)=>{for(var o in t||(t={}))k.call(t,o)&&g(l,o,t[o]);if(b)for(var o of b(t))w.call(t,o)&&g(l,o,t[o]);return l},v=(l,t)=>A(l,V(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./BaseComponent-
|
|
1
|
+
"use strict";var O=Object.defineProperty,A=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=(l,t,o)=>t in l?O(l,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):l[t]=o,C=(l,t)=>{for(var o in t||(t={}))k.call(t,o)&&g(l,o,t[o]);if(b)for(var o of b(t))w.call(t,o)&&g(l,o,t[o]);return l},v=(l,t)=>A(l,V(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./BaseComponent-DoQ1oLoA.cjs"),T=require("./index-BdWR_FTA.cjs"),I=require("./titleStyle-NSnz6cUg.cjs"),y=require("./ele-evn-icon-DUQMS-9T.cjs"),N={class:"title-text"},z={class:"mix-body"},L={DEFAULT_ICON:y.DEFAULT_ICON,ACTIVE_ICON:y.ACTIVE_ICON,NAME_CN:"识别结论卡",NAME_EN:"Conclusion Card",ORDER:14,PLATFORM:["pc","screen"]},D={bgColor:"#fff8e1",titleColor:"#1f2329",textColor:"#333",radiusSize:8,textSize:13,isHideTitle:!1,content:"南帮区域误报率持续偏高,建议优先复核春耕样本范围与扰动数据剔除规则。",lineHeight:1.6,btnText:"策略编辑",btnAction:{value:"publish",type:"select",label:"component.options.lw_btnAction",options:[{label:"component.options.lw_btnAction_publish",value:"publish"},{label:"component.options.lw_btnAction_modal",value:"modal"},{label:"component.options.lw_btnAction_navigate",value:"navigate"}]},modalLayerId:{value:"",type:"string",label:"component.options.lw_modalLayerId",dependent:"btnAction",dependentValue:"modal"},navigateUrl:{value:"",type:"string",label:"component.options.lw_navigateUrl",dependent:"btnAction",dependentValue:"navigate"},linkChannel:{value:"landslide",type:"select",label:"component.options.lw_linkChannel",options:[{label:"component.options.lw_linkChannel_landslide",value:"landslide"},{label:"component.options.lw_linkChannel_custom",value:"custom"}]},customChannel:{value:"",type:"string",label:"component.options.lw_customChannel",showWhen:{linkChannel:"custom"}}},U=[{name:"结论文本",fv:"",object_id:""}],M=["name","fv","object_id"],H=["mosaic","statistics","calculate"],j={useAlias:!1,multiObject:!1,hideMultiObject:!0,source:"mosaic"},B={DEFAULT:L,OPTIONS:D,DATA:U,PARAMS:M,SOURCE:H,COMMON:j},R=e.defineComponent(v(C({},B),{__name:"conclusionCard",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(l){const t=l,o=e.ref("");class _ extends E.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff8e1"),titleColor:this.getOptionValue("titleColor","#1f2329"),textColor:this.getOptionValue("textColor","#333"),radiusSize:this.getOptionValue("radiusSize",8),textSize:this.getOptionValue("textSize",13),content:this.getOptionValue("content",""),lineHeight:this.getOptionValue("lineHeight",1.6),btnText:this.getOptionValue("btnText",""),btnAction:this.getOptionValue("btnAction","publish"),modalLayerId:this.getOptionValue("modalLayerId",""),navigateUrl:this.getOptionValue("navigateUrl",""),linkChannel:this.getOptionValue("linkChannel","landslide"),customChannel:this.getOptionValue("customChannel","")}}getLinkChannel(){const n=this.Style.value;return(n==null?void 0:n.linkChannel)==="custom"?n.customChannel||"":(n==null?void 0:n.linkChannel)||""}setSocketData(n){var r,u;if(!n)return;const i=(u=(r=this.props.conf)==null?void 0:r.data)==null?void 0:u[0];if(!(i!=null&&i.fv))return;const c=this.extractDataValue(n,i.fv);c!=null&&c!==""&&(o.value=String(c))}setHistoryData(n){var r,u,f,h;if(!n||!Array.isArray(n.history))return;const i=(u=(r=this.props.conf)==null?void 0:r.data)==null?void 0:u[0];if(!(i!=null&&i.fv))return;const c=(h=(f=n.history)==null?void 0:f[0])==null?void 0:h[0];c&&c[i.fv]&&(o.value=String(c[i.fv]))}}const p=new _(t,"conclusionCard");p.setupLifecycle();const a=p.getStyle(),d=t.conf,S=e.computed(()=>I.generateTitleStyle(t.conf.options)),m=e.computed(()=>o.value||a.value.content||"--");function x(){if(t.mode!=="preview")return;const s=a.value;switch(s.btnAction){case"modal":s.modalLayerId&&window.dispatchEvent(new CustomEvent("mix-modal",{detail:{action:"show",layerId:s.modalLayerId,sheetIndex:-1}}));break;case"navigate":s.navigateUrl&&window.open(s.navigateUrl,"_blank");break;default:p.publish({type:"conclusion-action",title:d.caption||d.name,content:m.value,action:s.btnText})}}return(s,n)=>(e.openBlock(),e.createElementBlock("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(a).bgColor,borderRadius:`${e.unref(a).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(S.value)},[e.createElementVNode("span",N,e.toDisplayString(e.unref(d).caption||e.unref(d).name),1),e.unref(a).btnText?(e.openBlock(),e.createElementBlock("button",{key:0,class:"cc-btn",onClick:x},e.toDisplayString(e.unref(a).btnText),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("div",z,[e.createElementVNode("p",{class:"body-content",style:e.normalizeStyle({fontSize:`${e.unref(a).textSize}px`,color:e.unref(a).textColor,lineHeight:e.unref(a).lineHeight})},e.toDisplayString(m.value),5)]),e.renderSlot(s.$slots,"default",{},void 0,!0)],4))}})),q=T._export_sfc(R,[["__scopeId","data-v-35c5f9d1"]]);exports.default=q;
|
|
@@ -11,8 +11,8 @@ var _ = (o, t, n) => t in o ? T(o, t, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return o;
|
|
12
12
|
}, x = (o, t) => I(o, E(t));
|
|
13
13
|
import { defineComponent as N, ref as D, computed as S, openBlock as A, createElementBlock as O, normalizeStyle as h, unref as s, createElementVNode as d, toDisplayString as f, createCommentVNode as U, renderSlot as H } from "vue";
|
|
14
|
-
import { B as M } from "./BaseComponent-
|
|
15
|
-
import { _ as R } from "./index-
|
|
14
|
+
import { B as M } from "./BaseComponent-D82kw5vB.js";
|
|
15
|
+
import { _ as R } from "./index-CCWU_se2.js";
|
|
16
16
|
import { g as j } from "./titleStyle-BT5GlpAb.js";
|
|
17
17
|
import { A as B, D as F } from "./ele-evn-icon-MWzAujnD.js";
|
|
18
18
|
const P = { class: "title-text" }, $ = { class: "mix-body" }, W = {
|
|
@@ -45,8 +45,8 @@ import "element-plus/es/components/icon/style/css";
|
|
|
45
45
|
import { defineComponent as Ge, computed as Y, reactive as de, ref as k, watch as Xe, onMounted as Ye, openBlock as y, createElementBlock as T, Fragment as Z, withDirectives as pe, normalizeStyle as ce, unref as C, normalizeClass as Ze, toDisplayString as z, createCommentVNode as E, createElementVNode as L, createVNode as o, withKeys as et, withCtx as n, createTextVNode as c, createBlock as F, renderList as tt, renderSlot as lt } from "vue";
|
|
46
46
|
import { u as it } from "./useTableBodyHeight-CwrQvi7M.js";
|
|
47
47
|
import { u as ot } from "./useMixiotPanelSurface-DRl3cZvc.js";
|
|
48
|
-
import { B as at } from "./BaseComponent-
|
|
49
|
-
import { a as J, _ as nt } from "./index-
|
|
48
|
+
import { B as at } from "./BaseComponent-D82kw5vB.js";
|
|
49
|
+
import { a as J, _ as nt } from "./index-CCWU_se2.js";
|
|
50
50
|
import { g as st } from "./titleStyle-BT5GlpAb.js";
|
|
51
51
|
import { ElMessage as v, ElMessageBox as me } from "element-plus";
|
|
52
52
|
import { Search as rt } from "@element-plus/icons-vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Ve=Object.defineProperty,he=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable;var X=(m,s,c)=>s in m?Ve(m,s,{enumerable:!0,configurable:!0,writable:!0,value:c}):m[s]=c,J=(m,s)=>{for(var c in s||(s={}))be.call(s,c)&&X(m,c,s[c]);if(G)for(var c of G(s))we.call(s,c)&&X(m,c,s[c]);return m},Y=(m,s)=>he(m,ye(s));var _=(m,s,c)=>new Promise((M,w)=>{var R=C=>{try{T(c.next(C))}catch(O){w(O)}},$=C=>{try{T(c.throw(C))}catch(O){w(O)}},T=C=>C.done?M(C.value):Promise.resolve(C.value).then(R,$);T((c=c.apply(m,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/loading/style/css");require("element-plus/es/components/descriptions/style/css");require("element-plus/es/components/descriptions-item/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/pagination/style/css");require("element-plus/es/components/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),Ce=require("./useTableBodyHeight-pf87uGjw.cjs"),Ne=require("./useMixiotPanelSurface-CAZgexY5.cjs"),xe=require("./BaseComponent-BHUHnLj-.cjs"),B=require("./index-D7PZNHF4.cjs"),ke=require("./titleStyle-NSnz6cUg.cjs"),p=require("element-plus"),Se=require("@element-plus/icons-vue"),_e=require("./appendCommonDesignerWhereAnd-Q-EhDJXE.cjs"),Z=require("./ele-lst-icon-CrxnHZ-A.cjs"),Be={class:"mix-body"},Ee={class:"toolbar"},Te={class:"pagination"},Oe={class:"view-body"},De={DEFAULT_ICON:Z.DEFAULT_ICON,ACTIVE_ICON:Z.ACTIVE_ICON,NAME_CN:"控制码列表",NAME_EN:"ControlList",ORDER:3,PLATFORM:["pc","screen"]},ze={panelBgTone:{value:"light",type:"select",label:"component.options.mixiotPanelBgTone",options:[{label:"component.options.mixiotPanelBgTone_light",value:"light"},{label:"component.options.mixiotPanelBgTone_dark",value:"dark"}]},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}]},ee=[{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}],Ae=[{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"}],qe=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Me={isAddCondition:!1,conditions:[],conditionFilterFields:[{value:"name",label:"setting.gridFields.name"},{value:"uid",label:"setting.gridFields.uid"},{value:"alias",label:"setting.gridFields.objectAlias"},{value:"description",label:"setting.gridFields.description"}]},Ue={DEFAULT:De,OPTIONS:ze,DATA:ee,PARAMS:Ae,SOURCE:qe,COMMON:Me},Le=e.defineComponent(Y(J({},Ue),{__name:"controlList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""},controlUidList:{default:()=>[]}},setup(m){const s=m;class c extends xe.BaseComponent{getDataBool(t,a){var d,u;const n=(u=(d=this.props.conf)==null?void 0:d.data)==null?void 0:u[0];return n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0?!!n[t]:this.getOptionValue(t,a)}extractStyles(){return{panelBgTone:this.getOptionValue("panelBgTone","light"),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(ee));else{const a=this.props.conf.data[0],n={showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[u,r]of Object.entries(n))a[u]===void 0&&(a[u]=r);const d={uid_visible:!0,alias_visible:!0,description_visible:!0,created_visible:!0,last_modified_visible:!0};for(const[u,r]of Object.entries(d))a[u]===void 0&&(a[u]=r)}}}const M=new c(s,"controlList");M.setupLifecycle();const w=M.getStyle(),{mixiotPanelClass:R,mixiotPanelRootStyle:$}=Ne.useMixiotPanelSurface(w),{tableWrapRef:T,tableBodyHeight:C}=Ce.useTableBodyHeight(),O=e.computed(()=>ke.generateTitleStyle(s.conf.options)),te=e.computed(()=>{var a,n,d,u;const o=((n=(a=s.conf)==null?void 0:a.options)==null?void 0:n.columns)||[],t=((u=(d=s.conf)==null?void 0:d.data)==null?void 0:u[0])||{};return(Array.isArray(o)?o:[]).map(r=>{const y=t[r.key],k=t[`${r.key}_visible`];return{prop:r.key,label:y!==void 0&&y!==""?String(y):r.label,width:r.width,minWidth:r.minWidth,visible:k!==void 0?!!k:r.visible!==!1}})}),g=e.reactive({current:1,pageSize:10,total:0}),U=e.ref(""),j=e.ref("name"),W=e.ref([]),H=e.ref(!1);function le(){const o={page_index:g.current,page_size:g.pageSize},t=[],a=U.value.trim();return a&&t.push([j.value,"like",`%${a}%`]),_e.appendCommonDesignerWhereAnd(s.conf.common,t),t.length&&(o.where_and=JSON.stringify(t)),o}function N(){return _(this,null,function*(){var o,t;H.value=!0;try{const a=yield B.api.post("control_list",le(),!0),n=(o=a==null?void 0:a.result)!=null?o:a;let d=Array.isArray(n==null?void 0:n.data)?[...n.data]:[];if((t=s.controlUidList)!=null&&t.length){const r=new Set(s.controlUidList.map(String));d=d.filter(y=>r.has(String(y.uid)))}W.value=d;const u=n==null?void 0:n.total_records;g.total=typeof u=="number"?u:d.length,a&&a.code!==void 0&&a.code!==200&&console.warn("[controlList] 列表接口非成功",a.msg||a.info,a)}catch(a){console.error(a),W.value=[],g.total=0}finally{H.value=!1}})}const ie=e.computed(()=>W.value);function oe(o,t){const a=o[t];return a==null?"":String(a)}function Q(){g.current=1,N()}function ae(){U.value="",g.current=1,N()}function ne(){g.current=1,N()}function re(){N()}e.watch(()=>{var o;return(o=s.controlUidList)==null?void 0:o.join(",")},()=>{g.current=1,N()});const D=e.ref(!1),z=e.ref(!1),x=e.ref(!1),i=e.reactive({id:0,uid:"",name:"",alias:"",description:"",script:"[]",template:"[]"});function L(){i.id=0,i.uid="",i.name="",i.alias="",i.description="",i.script="[]",i.template="[]"}function F(o,t){const a=(o==null?void 0:o.trim())||"";if(!a)return t;try{return JSON.stringify(JSON.parse(a))}catch(n){return null}}function se(){L(),D.value=!0}function de(o){return _(this,null,function*(){var t,a,n,d,u,r,y,k,I,V,A,E;L(),z.value=!0,x.value=!0;try{const h=yield B.api.post("control_item",{uid:o.uid},!0),b=(t=h==null?void 0:h.result)!=null?t:h;if(b&&typeof b=="object"){i.id=Number(b.id)||0,i.uid=String((n=(a=b.uid)!=null?a:o.uid)!=null?n:""),i.name=String((d=b.name)!=null?d:""),i.alias=String((u=b.alias)!=null?u:""),i.description=String((r=b.description)!=null?r:"");const S=b.script;i.script=typeof S=="string"?S:S!=null?JSON.stringify(S):"[]";const l=b.template;i.template=typeof l=="string"?l:l!=null?JSON.stringify(l):"[]"}else i.uid=String(o.uid),i.name=String((y=o.name)!=null?y:""),i.alias=String((k=o.alias)!=null?k:""),i.description=String((I=o.description)!=null?I:"")}catch(h){i.uid=String(o.uid),i.name=String((V=o.name)!=null?V:""),i.alias=String((A=o.alias)!=null?A:""),i.description=String((E=o.description)!=null?E:""),p.ElMessage.warning("拉取控制码详情失败,已使用列表行数据编辑")}finally{x.value=!1}})}function ue(){return _(this,null,function*(){var a;if(!((a=i.name)!=null&&a.trim())){p.ElMessage.warning("请填写控制码名称");return}const o=F(i.script,"[]"),t=F(i.template,"[]");if(o===null||t===null){p.ElMessage.error("脚本或模板不是合法 JSON");return}x.value=!0;try{yield B.api.post("control_create",{name:i.name.trim(),alias:i.alias.trim(),description:i.description,script:o,template:t},!0),p.ElMessage.success("添加成功"),D.value=!1,yield N()}catch(n){p.ElMessage.error("添加失败")}finally{x.value=!1}})}function ce(){return _(this,null,function*(){var a;if(!((a=i.name)!=null&&a.trim())){p.ElMessage.warning("请填写控制码名称");return}const o=F(i.script,"[]"),t=F(i.template,"[]");if(o===null||t===null){p.ElMessage.error("脚本或模板不是合法 JSON");return}x.value=!0;try{yield B.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),p.ElMessage.success("保存成功"),z.value=!1,yield N()}catch(n){p.ElMessage.error("保存失败")}finally{x.value=!1}})}const P=e.ref(!1),K=e.ref(!1),v=e.ref(null);function pe(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 me=e.computed(()=>v.value?pe(v.value.script):"");function fe(o){return _(this,null,function*(){v.value=null,P.value=!0,K.value=!0;try{const t=yield B.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),p.ElMessage.warning("未返回详情,已显示列表行数据"))}catch(t){v.value=J({},o),p.ElMessage.warning("加载详情失败,已显示列表行数据")}finally{K.value=!1}})}function ge(o){p.ElMessageBox.confirm(`确认对控制码「${o.name||o.uid}」进行资料备档吗?`,"提示",{type:"info"}).then(()=>{p.ElMessage.success("已提交备档(完整流程请在 mixui 控制码管理中操作)")}).catch(()=>{})}function ve(o){p.ElMessageBox.confirm(`确认删除控制码「${o.name||o.uid}」吗?`,"警告",{type:"warning"}).then(()=>_(null,null,function*(){try{yield B.api.post("control_delete",{uid:o.uid,id:o.id},!0),p.ElMessage.success("删除成功"),yield N()}catch(t){p.ElMessage.error("删除失败")}})).catch(()=>{})}return e.onMounted(()=>{N()}),(o,t)=>{const a=f.ElIcon,n=f.ElInput,d=f.ElOption,u=f.ElSelect,r=f.ElButton,y=f.ElTableColumn,k=f.ElTable,I=f.ElPagination,V=f.ElFormItem,A=f.ElForm,E=f.ElDialog,h=f.ElDescriptionsItem,b=f.ElDescriptions,S=f.ElLoadingDirective;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["control-list mix-component",e.unref(R)]),style:e.normalizeStyle(e.unref($))},[e.unref(w).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(O.value)},e.toDisplayString(m.conf.caption||m.conf.name),5)),e.createElementVNode("div",Be,[e.createElementVNode("div",Ee,[e.createVNode(n,{modelValue:U.value,"onUpdate:modelValue":t[0]||(t[0]=l=>U.value=l),placeholder:"搜索控制码",size:"small",class:"toolbar-search",onKeyup:e.withKeys(Q,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(a,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Se.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(u,{modelValue:j.value,"onUpdate:modelValue":t[1]||(t[1]=l=>j.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(r,{type:"primary",onClick:Q},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(r,{onClick:ae},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(w).showAddBtn?(e.openBlock(),e.createBlock(r,{key:0,type:"success",onClick:se},{default:e.withCtx(()=>[...t[21]||(t[21]=[e.createTextVNode("添加控制码",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"tableWrapRef",ref:T,class:"table-wrapper"},[e.createVNode(k,{data:ie.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"},height:e.unref(C)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.prop},[l.visible?(e.openBlock(),e.createBlock(y,{key:0,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth},{default:e.withCtx(q=>[e.createElementVNode("span",null,e.toDisplayString(oe(q.row,l.prop)),1)]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(y,{label:"操作","min-width":"220",fixed:"right"},{default:e.withCtx(l=>[e.unref(w).showViewBtn?(e.openBlock(),e.createBlock(r,{key:0,size:"small",onClick:q=>fe(l.row)},{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createTextVNode("查看",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(w).showEditBtn?(e.openBlock(),e.createBlock(r,{key:1,size:"small",type:"primary",onClick:q=>de(l.row)},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(w).showArchiveBtn?(e.openBlock(),e.createBlock(r,{key:2,size:"small",type:"info",onClick:q=>ge(l.row)},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("资料备档",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(w).showDeleteBtn?(e.openBlock(),e.createBlock(r,{key:3,size:"small",type:"danger",onClick:q=>ve(l.row)},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["data","height"])],512),e.createElementVNode("div",Te,[e.createVNode(I,{"current-page":g.current,"onUpdate:currentPage":t[2]||(t[2]=l=>g.current=l),"page-size":g.pageSize,"onUpdate:pageSize":t[3]||(t[3]=l=>g.pageSize=l),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:g.total,onSizeChange:ne,onCurrentChange:re},null,8,["current-page","page-size","total"])])]),e.renderSlot(o.$slots,"default",{},void 0,!0)],6)),[[S,H.value]]),e.createVNode(E,{modelValue:D.value,"onUpdate:modelValue":t[9]||(t[9]=l=>D.value=l),title:"添加控制码",width:"640px","destroy-on-close":"",onClosed:L},{footer:e.withCtx(()=>[e.createVNode(r,{onClick:t[8]||(t[8]=l=>D.value=!1)},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(r,{type:"primary",loading:x.value,onClick:ue},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(A,{model:i,"label-width":"110px"},{default:e.withCtx(()=>[e.createVNode(V,{label:"控制码名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.name,"onUpdate:modelValue":t[4]||(t[4]=l=>i.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.alias,"onUpdate:modelValue":t[5]||(t[5]=l=>i.alias=l),placeholder:"可选"},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.description,"onUpdate:modelValue":t[6]||(t[6]=l=>i.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码脚本"},{default:e.withCtx(()=>[e.createVNode(n,{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:L},{footer:e.withCtx(()=>[e.createVNode(r,{onClick:t[15]||(t[15]=l=>z.value=!1)},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(r,{type:"primary",loading:x.value,onClick:ce},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(A,{model:i,"label-width":"110px"},{default:e.withCtx(()=>[e.createVNode(V,{label:"控制码编号"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.uid,"onUpdate:modelValue":t[10]||(t[10]=l=>i.uid=l),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.name,"onUpdate:modelValue":t[11]||(t[11]=l=>i.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.alias,"onUpdate:modelValue":t[12]||(t[12]=l=>i.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.description,"onUpdate:modelValue":t[13]||(t[13]=l=>i.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码脚本"},{default:e.withCtx(()=>[e.createVNode(n,{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:P.value,"onUpdate:modelValue":t[18]||(t[18]=l=>P.value=l),title:"控制码详情",width:"720px","destroy-on-close":""},{footer:e.withCtx(()=>[e.createVNode(r,{type:"primary",onClick:t[17]||(t[17]=l=>P.value=!1)},{default:e.withCtx(()=>[...t[31]||(t[31]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",Oe,[v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(b,{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(n,{"model-value":me.value,type:"textarea",rows:10,readonly:""},null,8,["model-value"])],64)):e.createCommentVNode("",!0)])),[[S,K.value]])]),_:1},8,["modelValue"])],64)}}})),Fe=B._export_sfc(Le,[["__scopeId","data-v-95b08a91"]]);exports.default=Fe;
|
|
1
|
+
"use strict";var Ve=Object.defineProperty,he=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable;var X=(m,s,c)=>s in m?Ve(m,s,{enumerable:!0,configurable:!0,writable:!0,value:c}):m[s]=c,J=(m,s)=>{for(var c in s||(s={}))be.call(s,c)&&X(m,c,s[c]);if(G)for(var c of G(s))we.call(s,c)&&X(m,c,s[c]);return m},Y=(m,s)=>he(m,ye(s));var _=(m,s,c)=>new Promise((M,w)=>{var R=C=>{try{T(c.next(C))}catch(O){w(O)}},$=C=>{try{T(c.throw(C))}catch(O){w(O)}},T=C=>C.done?M(C.value):Promise.resolve(C.value).then(R,$);T((c=c.apply(m,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/loading/style/css");require("element-plus/es/components/descriptions/style/css");require("element-plus/es/components/descriptions-item/style/css");require("element-plus/es/components/dialog/style/css");require("element-plus/es/components/form/style/css");require("element-plus/es/components/form-item/style/css");require("element-plus/es/components/pagination/style/css");require("element-plus/es/components/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),Ce=require("./useTableBodyHeight-pf87uGjw.cjs"),Ne=require("./useMixiotPanelSurface-CAZgexY5.cjs"),xe=require("./BaseComponent-DoQ1oLoA.cjs"),B=require("./index-BdWR_FTA.cjs"),ke=require("./titleStyle-NSnz6cUg.cjs"),p=require("element-plus"),Se=require("@element-plus/icons-vue"),_e=require("./appendCommonDesignerWhereAnd-Q-EhDJXE.cjs"),Z=require("./ele-lst-icon-CrxnHZ-A.cjs"),Be={class:"mix-body"},Ee={class:"toolbar"},Te={class:"pagination"},Oe={class:"view-body"},De={DEFAULT_ICON:Z.DEFAULT_ICON,ACTIVE_ICON:Z.ACTIVE_ICON,NAME_CN:"控制码列表",NAME_EN:"ControlList",ORDER:3,PLATFORM:["pc","screen"]},ze={panelBgTone:{value:"light",type:"select",label:"component.options.mixiotPanelBgTone",options:[{label:"component.options.mixiotPanelBgTone_light",value:"light"},{label:"component.options.mixiotPanelBgTone_dark",value:"dark"}]},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}]},ee=[{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}],Ae=[{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"}],qe=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],Me={isAddCondition:!1,conditions:[],conditionFilterFields:[{value:"name",label:"setting.gridFields.name"},{value:"uid",label:"setting.gridFields.uid"},{value:"alias",label:"setting.gridFields.objectAlias"},{value:"description",label:"setting.gridFields.description"}]},Ue={DEFAULT:De,OPTIONS:ze,DATA:ee,PARAMS:Ae,SOURCE:qe,COMMON:Me},Le=e.defineComponent(Y(J({},Ue),{__name:"controlList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""},controlUidList:{default:()=>[]}},setup(m){const s=m;class c extends xe.BaseComponent{getDataBool(t,a){var d,u;const n=(u=(d=this.props.conf)==null?void 0:d.data)==null?void 0:u[0];return n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0?!!n[t]:this.getOptionValue(t,a)}extractStyles(){return{panelBgTone:this.getOptionValue("panelBgTone","light"),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(ee));else{const a=this.props.conf.data[0],n={showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[u,r]of Object.entries(n))a[u]===void 0&&(a[u]=r);const d={uid_visible:!0,alias_visible:!0,description_visible:!0,created_visible:!0,last_modified_visible:!0};for(const[u,r]of Object.entries(d))a[u]===void 0&&(a[u]=r)}}}const M=new c(s,"controlList");M.setupLifecycle();const w=M.getStyle(),{mixiotPanelClass:R,mixiotPanelRootStyle:$}=Ne.useMixiotPanelSurface(w),{tableWrapRef:T,tableBodyHeight:C}=Ce.useTableBodyHeight(),O=e.computed(()=>ke.generateTitleStyle(s.conf.options)),te=e.computed(()=>{var a,n,d,u;const o=((n=(a=s.conf)==null?void 0:a.options)==null?void 0:n.columns)||[],t=((u=(d=s.conf)==null?void 0:d.data)==null?void 0:u[0])||{};return(Array.isArray(o)?o:[]).map(r=>{const y=t[r.key],k=t[`${r.key}_visible`];return{prop:r.key,label:y!==void 0&&y!==""?String(y):r.label,width:r.width,minWidth:r.minWidth,visible:k!==void 0?!!k:r.visible!==!1}})}),g=e.reactive({current:1,pageSize:10,total:0}),U=e.ref(""),j=e.ref("name"),W=e.ref([]),H=e.ref(!1);function le(){const o={page_index:g.current,page_size:g.pageSize},t=[],a=U.value.trim();return a&&t.push([j.value,"like",`%${a}%`]),_e.appendCommonDesignerWhereAnd(s.conf.common,t),t.length&&(o.where_and=JSON.stringify(t)),o}function N(){return _(this,null,function*(){var o,t;H.value=!0;try{const a=yield B.api.post("control_list",le(),!0),n=(o=a==null?void 0:a.result)!=null?o:a;let d=Array.isArray(n==null?void 0:n.data)?[...n.data]:[];if((t=s.controlUidList)!=null&&t.length){const r=new Set(s.controlUidList.map(String));d=d.filter(y=>r.has(String(y.uid)))}W.value=d;const u=n==null?void 0:n.total_records;g.total=typeof u=="number"?u:d.length,a&&a.code!==void 0&&a.code!==200&&console.warn("[controlList] 列表接口非成功",a.msg||a.info,a)}catch(a){console.error(a),W.value=[],g.total=0}finally{H.value=!1}})}const ie=e.computed(()=>W.value);function oe(o,t){const a=o[t];return a==null?"":String(a)}function Q(){g.current=1,N()}function ae(){U.value="",g.current=1,N()}function ne(){g.current=1,N()}function re(){N()}e.watch(()=>{var o;return(o=s.controlUidList)==null?void 0:o.join(",")},()=>{g.current=1,N()});const D=e.ref(!1),z=e.ref(!1),x=e.ref(!1),i=e.reactive({id:0,uid:"",name:"",alias:"",description:"",script:"[]",template:"[]"});function L(){i.id=0,i.uid="",i.name="",i.alias="",i.description="",i.script="[]",i.template="[]"}function F(o,t){const a=(o==null?void 0:o.trim())||"";if(!a)return t;try{return JSON.stringify(JSON.parse(a))}catch(n){return null}}function se(){L(),D.value=!0}function de(o){return _(this,null,function*(){var t,a,n,d,u,r,y,k,I,V,A,E;L(),z.value=!0,x.value=!0;try{const h=yield B.api.post("control_item",{uid:o.uid},!0),b=(t=h==null?void 0:h.result)!=null?t:h;if(b&&typeof b=="object"){i.id=Number(b.id)||0,i.uid=String((n=(a=b.uid)!=null?a:o.uid)!=null?n:""),i.name=String((d=b.name)!=null?d:""),i.alias=String((u=b.alias)!=null?u:""),i.description=String((r=b.description)!=null?r:"");const S=b.script;i.script=typeof S=="string"?S:S!=null?JSON.stringify(S):"[]";const l=b.template;i.template=typeof l=="string"?l:l!=null?JSON.stringify(l):"[]"}else i.uid=String(o.uid),i.name=String((y=o.name)!=null?y:""),i.alias=String((k=o.alias)!=null?k:""),i.description=String((I=o.description)!=null?I:"")}catch(h){i.uid=String(o.uid),i.name=String((V=o.name)!=null?V:""),i.alias=String((A=o.alias)!=null?A:""),i.description=String((E=o.description)!=null?E:""),p.ElMessage.warning("拉取控制码详情失败,已使用列表行数据编辑")}finally{x.value=!1}})}function ue(){return _(this,null,function*(){var a;if(!((a=i.name)!=null&&a.trim())){p.ElMessage.warning("请填写控制码名称");return}const o=F(i.script,"[]"),t=F(i.template,"[]");if(o===null||t===null){p.ElMessage.error("脚本或模板不是合法 JSON");return}x.value=!0;try{yield B.api.post("control_create",{name:i.name.trim(),alias:i.alias.trim(),description:i.description,script:o,template:t},!0),p.ElMessage.success("添加成功"),D.value=!1,yield N()}catch(n){p.ElMessage.error("添加失败")}finally{x.value=!1}})}function ce(){return _(this,null,function*(){var a;if(!((a=i.name)!=null&&a.trim())){p.ElMessage.warning("请填写控制码名称");return}const o=F(i.script,"[]"),t=F(i.template,"[]");if(o===null||t===null){p.ElMessage.error("脚本或模板不是合法 JSON");return}x.value=!0;try{yield B.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),p.ElMessage.success("保存成功"),z.value=!1,yield N()}catch(n){p.ElMessage.error("保存失败")}finally{x.value=!1}})}const P=e.ref(!1),K=e.ref(!1),v=e.ref(null);function pe(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 me=e.computed(()=>v.value?pe(v.value.script):"");function fe(o){return _(this,null,function*(){v.value=null,P.value=!0,K.value=!0;try{const t=yield B.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),p.ElMessage.warning("未返回详情,已显示列表行数据"))}catch(t){v.value=J({},o),p.ElMessage.warning("加载详情失败,已显示列表行数据")}finally{K.value=!1}})}function ge(o){p.ElMessageBox.confirm(`确认对控制码「${o.name||o.uid}」进行资料备档吗?`,"提示",{type:"info"}).then(()=>{p.ElMessage.success("已提交备档(完整流程请在 mixui 控制码管理中操作)")}).catch(()=>{})}function ve(o){p.ElMessageBox.confirm(`确认删除控制码「${o.name||o.uid}」吗?`,"警告",{type:"warning"}).then(()=>_(null,null,function*(){try{yield B.api.post("control_delete",{uid:o.uid,id:o.id},!0),p.ElMessage.success("删除成功"),yield N()}catch(t){p.ElMessage.error("删除失败")}})).catch(()=>{})}return e.onMounted(()=>{N()}),(o,t)=>{const a=f.ElIcon,n=f.ElInput,d=f.ElOption,u=f.ElSelect,r=f.ElButton,y=f.ElTableColumn,k=f.ElTable,I=f.ElPagination,V=f.ElFormItem,A=f.ElForm,E=f.ElDialog,h=f.ElDescriptionsItem,b=f.ElDescriptions,S=f.ElLoadingDirective;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["control-list mix-component",e.unref(R)]),style:e.normalizeStyle(e.unref($))},[e.unref(w).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(O.value)},e.toDisplayString(m.conf.caption||m.conf.name),5)),e.createElementVNode("div",Be,[e.createElementVNode("div",Ee,[e.createVNode(n,{modelValue:U.value,"onUpdate:modelValue":t[0]||(t[0]=l=>U.value=l),placeholder:"搜索控制码",size:"small",class:"toolbar-search",onKeyup:e.withKeys(Q,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(a,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Se.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(u,{modelValue:j.value,"onUpdate:modelValue":t[1]||(t[1]=l=>j.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(r,{type:"primary",onClick:Q},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(r,{onClick:ae},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(w).showAddBtn?(e.openBlock(),e.createBlock(r,{key:0,type:"success",onClick:se},{default:e.withCtx(()=>[...t[21]||(t[21]=[e.createTextVNode("添加控制码",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"tableWrapRef",ref:T,class:"table-wrapper"},[e.createVNode(k,{data:ie.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"},height:e.unref(C)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.prop},[l.visible?(e.openBlock(),e.createBlock(y,{key:0,prop:l.prop,label:l.label,width:l.width,"min-width":l.minWidth},{default:e.withCtx(q=>[e.createElementVNode("span",null,e.toDisplayString(oe(q.row,l.prop)),1)]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(y,{label:"操作","min-width":"220",fixed:"right"},{default:e.withCtx(l=>[e.unref(w).showViewBtn?(e.openBlock(),e.createBlock(r,{key:0,size:"small",onClick:q=>fe(l.row)},{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createTextVNode("查看",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(w).showEditBtn?(e.openBlock(),e.createBlock(r,{key:1,size:"small",type:"primary",onClick:q=>de(l.row)},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(w).showArchiveBtn?(e.openBlock(),e.createBlock(r,{key:2,size:"small",type:"info",onClick:q=>ge(l.row)},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createTextVNode("资料备档",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(w).showDeleteBtn?(e.openBlock(),e.createBlock(r,{key:3,size:"small",type:"danger",onClick:q=>ve(l.row)},{default:e.withCtx(()=>[...t[25]||(t[25]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["data","height"])],512),e.createElementVNode("div",Te,[e.createVNode(I,{"current-page":g.current,"onUpdate:currentPage":t[2]||(t[2]=l=>g.current=l),"page-size":g.pageSize,"onUpdate:pageSize":t[3]||(t[3]=l=>g.pageSize=l),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:g.total,onSizeChange:ne,onCurrentChange:re},null,8,["current-page","page-size","total"])])]),e.renderSlot(o.$slots,"default",{},void 0,!0)],6)),[[S,H.value]]),e.createVNode(E,{modelValue:D.value,"onUpdate:modelValue":t[9]||(t[9]=l=>D.value=l),title:"添加控制码",width:"640px","destroy-on-close":"",onClosed:L},{footer:e.withCtx(()=>[e.createVNode(r,{onClick:t[8]||(t[8]=l=>D.value=!1)},{default:e.withCtx(()=>[...t[26]||(t[26]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(r,{type:"primary",loading:x.value,onClick:ue},{default:e.withCtx(()=>[...t[27]||(t[27]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(A,{model:i,"label-width":"110px"},{default:e.withCtx(()=>[e.createVNode(V,{label:"控制码名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.name,"onUpdate:modelValue":t[4]||(t[4]=l=>i.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.alias,"onUpdate:modelValue":t[5]||(t[5]=l=>i.alias=l),placeholder:"可选"},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.description,"onUpdate:modelValue":t[6]||(t[6]=l=>i.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码脚本"},{default:e.withCtx(()=>[e.createVNode(n,{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:L},{footer:e.withCtx(()=>[e.createVNode(r,{onClick:t[15]||(t[15]=l=>z.value=!1)},{default:e.withCtx(()=>[...t[28]||(t[28]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(r,{type:"primary",loading:x.value,onClick:ce},{default:e.withCtx(()=>[...t[29]||(t[29]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(A,{model:i,"label-width":"110px"},{default:e.withCtx(()=>[e.createVNode(V,{label:"控制码编号"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.uid,"onUpdate:modelValue":t[10]||(t[10]=l=>i.uid=l),disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码名称",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.name,"onUpdate:modelValue":t[11]||(t[11]=l=>i.name=l),placeholder:"必填"},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码别名"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.alias,"onUpdate:modelValue":t[12]||(t[12]=l=>i.alias=l)},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:i.description,"onUpdate:modelValue":t[13]||(t[13]=l=>i.description=l),type:"textarea",rows:3},null,8,["modelValue"])]),_:1}),e.createVNode(V,{label:"控制码脚本"},{default:e.withCtx(()=>[e.createVNode(n,{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:P.value,"onUpdate:modelValue":t[18]||(t[18]=l=>P.value=l),title:"控制码详情",width:"720px","destroy-on-close":""},{footer:e.withCtx(()=>[e.createVNode(r,{type:"primary",onClick:t[17]||(t[17]=l=>P.value=!1)},{default:e.withCtx(()=>[...t[31]||(t[31]=[e.createTextVNode("关闭",-1)])]),_:1})]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",Oe,[v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(b,{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(n,{"model-value":me.value,type:"textarea",rows:10,readonly:""},null,8,["model-value"])],64)):e.createCommentVNode("",!0)])),[[S,K.value]])]),_:1},8,["modelValue"])],64)}}})),Fe=B._export_sfc(Le,[["__scopeId","data-v-95b08a91"]]);exports.default=Fe;
|
|
@@ -41,8 +41,8 @@ import "element-plus/es/components/icon/style/css";
|
|
|
41
41
|
import { defineComponent as Ce, computed as $, reactive as xe, ref as O, onMounted as Ee, withDirectives as ze, openBlock as _, createElementBlock as w, normalizeStyle as G, unref as g, normalizeClass as Be, toDisplayString as I, createCommentVNode as H, createElementVNode as T, createVNode as u, withKeys as Oe, withCtx as b, createTextVNode as V, createBlock as U, Fragment as X, renderList as Te, renderSlot as Ve } from "vue";
|
|
42
42
|
import { u as je } from "./useTableBodyHeight-CwrQvi7M.js";
|
|
43
43
|
import { u as Re } from "./useMixiotPanelSurface-DRl3cZvc.js";
|
|
44
|
-
import { B as Ae } from "./BaseComponent-
|
|
45
|
-
import { a as Z, _ as De } from "./index-
|
|
44
|
+
import { B as Ae } from "./BaseComponent-D82kw5vB.js";
|
|
45
|
+
import { a as Z, _ as De } from "./index-CCWU_se2.js";
|
|
46
46
|
import { g as Ne } from "./titleStyle-BT5GlpAb.js";
|
|
47
47
|
import { ElMessage as j, ElMessageBox as Le } from "element-plus";
|
|
48
48
|
import { Search as Pe } from "@element-plus/icons-vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var X=Object.defineProperty,Z=Object.defineProperties;var ee=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var P=(c,i,r)=>i in c?X(c,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[i]=r,j=(c,i)=>{for(var r in i||(i={}))te.call(i,r)&&P(c,r,i[r]);if(M)for(var r of M(i))oe.call(i,r)&&P(c,r,i[r]);return c},F=(c,i)=>Z(c,ee(i));var D=(c,i,r)=>new Promise((k,_)=>{var E=b=>{try{g(r.next(b))}catch(h){_(h)}},B=b=>{try{g(r.throw(b))}catch(h){_(h)}},g=b=>b.done?k(b.value):Promise.resolve(b.value).then(E,B);g((r=r.apply(c,i)).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"),ae=require("./useTableBodyHeight-pf87uGjw.cjs"),le=require("./useMixiotPanelSurface-CAZgexY5.cjs"),ie=require("./BaseComponent-BHUHnLj-.cjs"),R=require("./index-D7PZNHF4.cjs"),ne=require("./titleStyle-NSnz6cUg.cjs"),y=require("element-plus"),re=require("@element-plus/icons-vue"),se=require("./appendCommonDesignerWhereAnd-Q-EhDJXE.cjs"),I=require("./ele-lst-icon-CrxnHZ-A.cjs"),ce={class:"mix-body"},ue={class:"toolbar"},de={key:1},pe={class:"pagination"},me={DEFAULT_ICON:I.DEFAULT_ICON,ACTIVE_ICON:I.ACTIVE_ICON,NAME_CN:"控制记录",NAME_EN:"ControlRecordList",ORDER:4,PLATFORM:["pc","screen"]},be={panelBgTone:{value:"light",type:"select",label:"component.options.mixiotPanelBgTone",options:[{label:"component.options.mixiotPanelBgTone_light",value:"light"},{label:"component.options.mixiotPanelBgTone_dark",value:"dark"}]},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}],_e=[{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"}],ge=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],he={isAddCondition:!1,conditions:[],conditionFilterFields:[{value:"object_id",label:"setting.gridFields.objectId"},{value:"created_by",label:"setting.gridFields.createdBy"},{value:"command",label:"setting.gridFields.commandCode"},{value:"command_name",label:"setting.gridFields.commandName"}]},ve={DEFAULT:me,OPTIONS:be,DATA:$,PARAMS:_e,SOURCE:ge,COMMON:he},fe=e.defineComponent(F(j({},ve),{__name:"controlRecordList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""}},setup(c){const i=c;class r extends ie.BaseComponent{getDataBool(t,o){var n,p;const l=(p=(n=this.props.conf)==null?void 0:n.data)==null?void 0:p[0];return l&&Object.prototype.hasOwnProperty.call(l,t)&&l[t]!==void 0?!!l[t]:this.getOptionValue(t,o)}extractStyles(){return{panelBgTone:this.getOptionValue("panelBgTone","light"),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 l={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[n,p]of Object.entries(l))o[n]===void 0&&(o[n]=p)}}}const k=new r(i,"controlRecordList");k.setupLifecycle();const _=k.getStyle(),{mixiotPanelClass:E,mixiotPanelRootStyle:B}=le.useMixiotPanelSurface(_),{tableWrapRef:g,tableBodyHeight:b}=ae.useTableBodyHeight(),h=e.computed(()=>ne.generateTitleStyle(i.conf.options)),K=e.computed(()=>{var o,l,n,p;const a=((l=(o=i.conf)==null?void 0:o.options)==null?void 0:l.columns)||[],t=((p=(n=i.conf)==null?void 0:n.data)==null?void 0:p[0])||{};return(Array.isArray(a)?a:[]).map(u=>{var V;let S=u.key;u.key==="object_id"&&(S="object_id_label");const f=(V=t[S])!=null?V:t[u.key],O=u.key==="object_id"?"object_id_visible":`${u.key}_visible`,x=t[O];return{prop:u.key,label:f!==void 0&&f!==""?String(f):u.label,width:u.width,minWidth:u.minWidth,visible:x!==void 0?!!x:u.visible!==!1}})}),d=e.reactive({current:1,pageSize:10,total:0}),w=e.ref(""),N=e.ref("object_id"),C=e.ref([]),T=e.ref(!1);function H(){const a={page_index:d.current,page_size:d.pageSize},t=[],o=w.value.trim();return o&&t.push([N.value,"like",`%${o}%`]),se.appendCommonDesignerWhereAnd(i.conf.common,t),t.length&&(a.where_and=JSON.stringify(t)),a}function A(a){const t=a.error;return t===""||t===null||t===void 0}function v(){return D(this,null,function*(){var a;T.value=!0;try{const t=yield R.api.post("get_control_record_list",H(),!0),o=(a=t==null?void 0:t.result)!=null?a:t,l=Array.isArray(o==null?void 0:o.data)?o.data:[];C.value=l.map(p=>j({},p));const n=o==null?void 0:o.total_records;d.total=typeof n=="number"?n:l.length,t&&t.code!==void 0&&t.code!==200&&console.warn("[controlRecordList] 列表接口非成功",t.msg||t.info,t)}catch(t){console.error(t),C.value=[],d.total=0}finally{T.value=!1}})}const U=e.computed(()=>C.value);function W(a,t){const o=a[t];return o==null?"":String(o)}function L(){d.current=1,v()}function J(){w.value="",d.current=1,v()}function Q(){d.current=1,v()}function Y(){v()}function z(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 G(){return D(this,null,function*(){const a=[...new Set(C.value.map(l=>{var n;return String((n=l.object_id)!=null?n:"").trim()}).filter(Boolean))];if(!a.length){y.ElMessage.warning("当前列表无对象编号,请加载记录后再导出");return}const t=new Date,o=new Date(t.getTime()-168*3600*1e3);try{yield y.ElMessageBox.confirm(`将按最近 7 天、当前已加载列表中的 ${a.length} 个对象编号发起导出任务,是否继续?`,"导出控制记录",{type:"info"})}catch(l){return}try{const l=yield R.api.post("export_control_record",{file_name:`control_record_${z(t).replace(/[: ]/g,"_")}`,start_time:z(o),end_time:z(t),object_ids:a},!0);if(l.code!==void 0&&l.code!==200){y.ElMessage.warning(l.msg||l.info||"导出请求未成功");return}y.ElMessage.success("导出任务已提交")}catch(l){y.ElMessage.error("导出请求失败")}})}return e.onMounted(()=>{v()}),(a,t)=>{const o=m.ElIcon,l=m.ElInput,n=m.ElOption,p=m.ElSelect,u=m.ElButton,S=m.ElTag,f=m.ElTableColumn,O=m.ElTable,x=m.ElPagination,V=m.ElLoadingDirective;return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["control-record-list mix-component",e.unref(E)]),style:e.normalizeStyle(e.unref(B))},[e.unref(_).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(h.value)},e.toDisplayString(c.conf.caption||c.conf.name),5)),e.createElementVNode("div",ce,[e.createElementVNode("div",ue,[e.createVNode(l,{modelValue:w.value,"onUpdate:modelValue":t[0]||(t[0]=s=>w.value=s),placeholder:"搜索控制记录",size:"small",class:"toolbar-search",onKeyup:e.withKeys(L,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(o,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(re.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(p,{modelValue:N.value,"onUpdate:modelValue":t[1]||(t[1]=s=>N.value=s),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(n,{label:"对象编号",value:"object_id"}),e.createVNode(n,{label:"用户名",value:"created_by"}),e.createVNode(n,{label:"控制码指令",value:"command"}),e.createVNode(n,{label:"指令名称",value:"command_name"})]),_:1},8,["modelValue"]),e.createVNode(u,{type:"primary",onClick:L},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(u,{onClick:J},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(_).showExportBtn?(e.openBlock(),e.createBlock(u,{key:0,type:"success",onClick:G},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("导出",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"tableWrapRef",ref:g,class:"table-wrapper"},[e.createVNode(O,{data:U.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"},height:e.unref(b)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s.prop},[s.visible?(e.openBlock(),e.createBlock(f,{key:0,prop:s.prop,label:s.label,width:s.width,"min-width":s.minWidth},{default:e.withCtx(q=>[s.prop==="status"?(e.openBlock(),e.createBlock(S,{key:0,type:A(q.row)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A(q.row)?"成功":"失败"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",de,e.toDisplayString(W(q.row,s.prop)),1))]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128))]),_:1},8,["data","height"])],512),e.createElementVNode("div",pe,[e.createVNode(x,{"current-page":d.current,"onUpdate:currentPage":t[2]||(t[2]=s=>d.current=s),"page-size":d.pageSize,"onUpdate:pageSize":t[3]||(t[3]=s=>d.pageSize=s),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:d.total,onSizeChange:Q,onCurrentChange:Y},null,8,["current-page","page-size","total"])])]),e.renderSlot(a.$slots,"default",{},void 0,!0)],6)),[[V,T.value]])}}})),ye=R._export_sfc(fe,[["__scopeId","data-v-6c8480ae"]]);exports.default=ye;
|
|
1
|
+
"use strict";var X=Object.defineProperty,Z=Object.defineProperties;var ee=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var P=(c,i,r)=>i in c?X(c,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[i]=r,j=(c,i)=>{for(var r in i||(i={}))te.call(i,r)&&P(c,r,i[r]);if(M)for(var r of M(i))oe.call(i,r)&&P(c,r,i[r]);return c},F=(c,i)=>Z(c,ee(i));var D=(c,i,r)=>new Promise((k,_)=>{var E=b=>{try{g(r.next(b))}catch(h){_(h)}},B=b=>{try{g(r.throw(b))}catch(h){_(h)}},g=b=>b.done?k(b.value):Promise.resolve(b.value).then(E,B);g((r=r.apply(c,i)).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"),ae=require("./useTableBodyHeight-pf87uGjw.cjs"),le=require("./useMixiotPanelSurface-CAZgexY5.cjs"),ie=require("./BaseComponent-DoQ1oLoA.cjs"),R=require("./index-BdWR_FTA.cjs"),ne=require("./titleStyle-NSnz6cUg.cjs"),y=require("element-plus"),re=require("@element-plus/icons-vue"),se=require("./appendCommonDesignerWhereAnd-Q-EhDJXE.cjs"),I=require("./ele-lst-icon-CrxnHZ-A.cjs"),ce={class:"mix-body"},ue={class:"toolbar"},de={key:1},pe={class:"pagination"},me={DEFAULT_ICON:I.DEFAULT_ICON,ACTIVE_ICON:I.ACTIVE_ICON,NAME_CN:"控制记录",NAME_EN:"ControlRecordList",ORDER:4,PLATFORM:["pc","screen"]},be={panelBgTone:{value:"light",type:"select",label:"component.options.mixiotPanelBgTone",options:[{label:"component.options.mixiotPanelBgTone_light",value:"light"},{label:"component.options.mixiotPanelBgTone_dark",value:"dark"}]},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}],_e=[{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"}],ge=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],he={isAddCondition:!1,conditions:[],conditionFilterFields:[{value:"object_id",label:"setting.gridFields.objectId"},{value:"created_by",label:"setting.gridFields.createdBy"},{value:"command",label:"setting.gridFields.commandCode"},{value:"command_name",label:"setting.gridFields.commandName"}]},ve={DEFAULT:me,OPTIONS:be,DATA:$,PARAMS:_e,SOURCE:ge,COMMON:he},fe=e.defineComponent(F(j({},ve),{__name:"controlRecordList",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""}},setup(c){const i=c;class r extends ie.BaseComponent{getDataBool(t,o){var n,p;const l=(p=(n=this.props.conf)==null?void 0:n.data)==null?void 0:p[0];return l&&Object.prototype.hasOwnProperty.call(l,t)&&l[t]!==void 0?!!l[t]:this.getOptionValue(t,o)}extractStyles(){return{panelBgTone:this.getOptionValue("panelBgTone","light"),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 l={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[n,p]of Object.entries(l))o[n]===void 0&&(o[n]=p)}}}const k=new r(i,"controlRecordList");k.setupLifecycle();const _=k.getStyle(),{mixiotPanelClass:E,mixiotPanelRootStyle:B}=le.useMixiotPanelSurface(_),{tableWrapRef:g,tableBodyHeight:b}=ae.useTableBodyHeight(),h=e.computed(()=>ne.generateTitleStyle(i.conf.options)),K=e.computed(()=>{var o,l,n,p;const a=((l=(o=i.conf)==null?void 0:o.options)==null?void 0:l.columns)||[],t=((p=(n=i.conf)==null?void 0:n.data)==null?void 0:p[0])||{};return(Array.isArray(a)?a:[]).map(u=>{var V;let S=u.key;u.key==="object_id"&&(S="object_id_label");const f=(V=t[S])!=null?V:t[u.key],O=u.key==="object_id"?"object_id_visible":`${u.key}_visible`,x=t[O];return{prop:u.key,label:f!==void 0&&f!==""?String(f):u.label,width:u.width,minWidth:u.minWidth,visible:x!==void 0?!!x:u.visible!==!1}})}),d=e.reactive({current:1,pageSize:10,total:0}),w=e.ref(""),N=e.ref("object_id"),C=e.ref([]),T=e.ref(!1);function H(){const a={page_index:d.current,page_size:d.pageSize},t=[],o=w.value.trim();return o&&t.push([N.value,"like",`%${o}%`]),se.appendCommonDesignerWhereAnd(i.conf.common,t),t.length&&(a.where_and=JSON.stringify(t)),a}function A(a){const t=a.error;return t===""||t===null||t===void 0}function v(){return D(this,null,function*(){var a;T.value=!0;try{const t=yield R.api.post("get_control_record_list",H(),!0),o=(a=t==null?void 0:t.result)!=null?a:t,l=Array.isArray(o==null?void 0:o.data)?o.data:[];C.value=l.map(p=>j({},p));const n=o==null?void 0:o.total_records;d.total=typeof n=="number"?n:l.length,t&&t.code!==void 0&&t.code!==200&&console.warn("[controlRecordList] 列表接口非成功",t.msg||t.info,t)}catch(t){console.error(t),C.value=[],d.total=0}finally{T.value=!1}})}const U=e.computed(()=>C.value);function W(a,t){const o=a[t];return o==null?"":String(o)}function L(){d.current=1,v()}function J(){w.value="",d.current=1,v()}function Q(){d.current=1,v()}function Y(){v()}function z(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 G(){return D(this,null,function*(){const a=[...new Set(C.value.map(l=>{var n;return String((n=l.object_id)!=null?n:"").trim()}).filter(Boolean))];if(!a.length){y.ElMessage.warning("当前列表无对象编号,请加载记录后再导出");return}const t=new Date,o=new Date(t.getTime()-168*3600*1e3);try{yield y.ElMessageBox.confirm(`将按最近 7 天、当前已加载列表中的 ${a.length} 个对象编号发起导出任务,是否继续?`,"导出控制记录",{type:"info"})}catch(l){return}try{const l=yield R.api.post("export_control_record",{file_name:`control_record_${z(t).replace(/[: ]/g,"_")}`,start_time:z(o),end_time:z(t),object_ids:a},!0);if(l.code!==void 0&&l.code!==200){y.ElMessage.warning(l.msg||l.info||"导出请求未成功");return}y.ElMessage.success("导出任务已提交")}catch(l){y.ElMessage.error("导出请求失败")}})}return e.onMounted(()=>{v()}),(a,t)=>{const o=m.ElIcon,l=m.ElInput,n=m.ElOption,p=m.ElSelect,u=m.ElButton,S=m.ElTag,f=m.ElTableColumn,O=m.ElTable,x=m.ElPagination,V=m.ElLoadingDirective;return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["control-record-list mix-component",e.unref(E)]),style:e.normalizeStyle(e.unref(B))},[e.unref(_).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mix-title",style:e.normalizeStyle(h.value)},e.toDisplayString(c.conf.caption||c.conf.name),5)),e.createElementVNode("div",ce,[e.createElementVNode("div",ue,[e.createVNode(l,{modelValue:w.value,"onUpdate:modelValue":t[0]||(t[0]=s=>w.value=s),placeholder:"搜索控制记录",size:"small",class:"toolbar-search",onKeyup:e.withKeys(L,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(o,{class:"toolbar-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(re.Search))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(p,{modelValue:N.value,"onUpdate:modelValue":t[1]||(t[1]=s=>N.value=s),size:"small",class:"toolbar-field-select"},{default:e.withCtx(()=>[e.createVNode(n,{label:"对象编号",value:"object_id"}),e.createVNode(n,{label:"用户名",value:"created_by"}),e.createVNode(n,{label:"控制码指令",value:"command"}),e.createVNode(n,{label:"指令名称",value:"command_name"})]),_:1},8,["modelValue"]),e.createVNode(u,{type:"primary",onClick:L},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode("搜索",-1)])]),_:1}),e.createVNode(u,{onClick:J},{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(_).showExportBtn?(e.openBlock(),e.createBlock(u,{key:0,type:"success",onClick:G},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("导出",-1)])]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"tableWrapRef",ref:g,class:"table-wrapper"},[e.createVNode(O,{data:U.value,border:"",class:"yunuis-aprus-table",style:{width:"100%"},height:e.unref(b)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s.prop},[s.visible?(e.openBlock(),e.createBlock(f,{key:0,prop:s.prop,label:s.label,width:s.width,"min-width":s.minWidth},{default:e.withCtx(q=>[s.prop==="status"?(e.openBlock(),e.createBlock(S,{key:0,type:A(q.row)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(A(q.row)?"成功":"失败"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",de,e.toDisplayString(W(q.row,s.prop)),1))]),_:2},1032,["prop","label","width","min-width"])):e.createCommentVNode("",!0)],64))),128))]),_:1},8,["data","height"])],512),e.createElementVNode("div",pe,[e.createVNode(x,{"current-page":d.current,"onUpdate:currentPage":t[2]||(t[2]=s=>d.current=s),"page-size":d.pageSize,"onUpdate:pageSize":t[3]||(t[3]=s=>d.pageSize=s),"page-sizes":[10,20,50,100],layout:"total, sizes, prev, pager, next, jumper",total:d.total,onSizeChange:Q,onCurrentChange:Y},null,8,["current-page","page-size","total"])])]),e.renderSlot(a.$slots,"default",{},void 0,!0)],6)),[[V,T.value]])}}})),ye=R._export_sfc(fe,[["__scopeId","data-v-6c8480ae"]]);exports.default=ye;
|
|
@@ -40,8 +40,8 @@ import "element-plus/es/components/button/style/css";
|
|
|
40
40
|
import "element-plus/es/components/icon/style/css";
|
|
41
41
|
import { defineComponent as qe, computed as C, ref as Q, reactive as Ge, onMounted as Qe, openBlock as m, createElementBlock as _, normalizeStyle as Y, unref as b, normalizeClass as Z, createElementVNode as S, toDisplayString as k, createVNode as s, withCtx as p, createTextVNode as O, createBlock as re, createCommentVNode as N, withDirectives as Ye, withKeys as Ze, Fragment as ce, renderList as de, withModifiers as Xe, renderSlot as et } from "vue";
|
|
42
42
|
import { u as tt } from "./useMixiotPanelSurface-DRl3cZvc.js";
|
|
43
|
-
import { B as ot } from "./BaseComponent-
|
|
44
|
-
import { a as ue, _ as at } from "./index-
|
|
43
|
+
import { B as ot } from "./BaseComponent-D82kw5vB.js";
|
|
44
|
+
import { a as ue, _ as at } from "./index-CCWU_se2.js";
|
|
45
45
|
import { g as lt } from "./titleStyle-BT5GlpAb.js";
|
|
46
46
|
import { ElMessage as z, ElMessageBox as nt } from "element-plus";
|
|
47
47
|
import { Plus as it, Search as st, ArrowDown as rt } from "@element-plus/icons-vue";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ke=Object.defineProperty,Ce=Object.defineProperties;var xe=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var Se=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var Y=(u,i,s)=>i in u?ke(u,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[i]=s,D=(u,i)=>{for(var s in i||(i={}))Se.call(i,s)&&Y(u,s,i[s]);if(Q)for(var s of Q(i))Ee.call(i,s)&&Y(u,s,i[s]);return u},Z=(u,i)=>Ce(u,xe(i));var h=(u,i,s)=>new Promise((S,v)=>{var O=m=>{try{y(s.next(m))}catch(g){v(g)}},T=m=>{try{y(s.throw(m))}catch(g){v(g)}},y=m=>m.done?S(m.value):Promise.resolve(m.value).then(O,T);y((s=s.apply(u,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=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/tag/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/dropdown/style/css");require("element-plus/es/components/dropdown-menu/style/css");require("element-plus/es/components/dropdown-item/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),we=require("./useMixiotPanelSurface-CAZgexY5.cjs"),Ve=require("./BaseComponent-BHUHnLj-.cjs"),$=require("./index-D7PZNHF4.cjs"),Be=require("./titleStyle-NSnz6cUg.cjs"),x=require("element-plus"),F=require("@element-plus/icons-vue"),Ne=require("./appendCommonDesignerWhereAnd-Q-EhDJXE.cjs"),Le=require("./useMixiotAppScrollLoad-BfiNo4UY.cjs"),X=require("./ele-lst-icon-CrxnHZ-A.cjs"),De={key:0,class:"app-title-row"},Oe={class:"mix-app-body"},Te={class:"app-toolbar-row"},Pe={key:0,class:"app-card-top"},Ae={class:"app-card-name"},Me={class:"app-field-label"},Re={class:"app-field-value"},je=["onClick"],qe={key:0,class:"app-scroll-foot"},ze={key:1,class:"app-scroll-foot"},Ie={key:2,class:"app-scroll-foot"},Fe={DEFAULT_ICON:X.DEFAULT_ICON,ACTIVE_ICON:X.ACTIVE_ICON,NAME_CN:"控制记录",NAME_EN:"ControlRecordListAPP",ORDER:4,PLATFORM:["mobile"]},$e={panelBgTone:{value:"light",type:"select",label:"component.options.mixiotPanelBgTone",options:[{label:"component.options.mixiotPanelBgTone_light",value:"light"},{label:"component.options.mixiotPanelBgTone_dark",value:"dark"}]},bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"command",label:"控制码指令",width:140,visible:!0},{key:"created_by",label:"用户名",width:120,visible:!0},{key:"created",label:"控制时间",width:180,visible:!0},{key:"object_id",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}]},ee=[{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,appCardDefaultLines:3}],Ke=[{key:"appCardDefaultLines",label:"APP卡片默认展示行数(默认3行:控制码指令、用户名、控制时间)",type:"number"},{key:"showExportBtn",label:"导出按钮",type:"checkbox",group:"命令组"},{key:"name",label:"参数名称"},{key:"command",label:"控制码指令",checkable:!0,checkboxKey:"command_visible"},{key:"created_by",label:"用户名",checkable:!0,checkboxKey:"created_by_visible"},{key:"created",label:"控制时间",checkable:!0,checkboxKey:"created_visible"},{key:"object_id_label",label:"对象编号",checkable:!0,checkboxKey:"object_id_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"}],Ue=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],He={isAddCondition:!1,conditions:[],conditionFilterFields:[{value:"object_id",label:"setting.gridFields.objectId"},{value:"created_by",label:"setting.gridFields.createdBy"},{value:"command",label:"setting.gridFields.commandCode"},{value:"command_name",label:"setting.gridFields.commandName"}]},We={DEFAULT:Fe,OPTIONS:$e,DATA:ee,PARAMS:Ke,SOURCE:Ue,COMMON:He},Je=e.defineComponent(Z(D({},We),{__name:"controlRecordListAPP",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""}},setup(u){const i=u;class s extends Ve.BaseComponent{getDataBool(t,n){var a,c;const l=(c=(a=this.props.conf)==null?void 0:a.data)==null?void 0:c[0];return l&&Object.prototype.hasOwnProperty.call(l,t)&&l[t]!==void 0?!!l[t]:this.getOptionValue(t,n)}extractStyles(){return{panelBgTone:this.getOptionValue("panelBgTone","light"),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(ee));else{const n=this.props.conf.data[0];n.showExportBtn===void 0&&(n.showExportBtn=!0);const l={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[a,c]of Object.entries(l))n[a]===void 0&&(n[a]=c);(n.appCardDefaultLines===void 0||n.appCardDefaultLines===null||n.appCardDefaultLines==="")&&(n.appCardDefaultLines=3)}}}const S=new s(i,"controlRecordListAPP");S.setupLifecycle();const v=S.getStyle(),{mixiotPanelClass:O,mixiotPanelRootStyle:T}=we.useMixiotPanelSurface(v),y=e.computed(()=>Be.generateTitleStyle(i.conf.options)),m=e.computed(()=>{var n,l,a,c;const o=((l=(n=i.conf)==null?void 0:n.options)==null?void 0:l.columns)||[],t=((c=(a=i.conf)==null?void 0:a.data)==null?void 0:c[0])||{};return(Array.isArray(o)?o:[]).map(r=>{var B;let p=r.key;r.key==="object_id"&&(p="object_id_label");const b=(B=t[p])!=null?B:t[r.key],I=r.key==="object_id"?"object_id_visible":`${r.key}_visible`,C=t[I];return{prop:r.key,label:b!==void 0&&b!==""?String(b):r.label,width:r.width,minWidth:r.minWidth,visible:C!==void 0?!!C:r.visible!==!1}})}),g=10,{listLoading:P,listLoadingMore:te,hasMore:A,totalRecords:K,pageIndex:oe,resetListPagination:ne,pageRequestParams:le,updateAfterPage:ae,onListScroll:ie,runLoadMore:re}=Le.useMixiotAppScrollLoad(g),E=e.ref(""),w=e.ref("object_id"),f=e.ref([]);function se(){const o=D({},le()),t=[],n=E.value.trim();return n&&t.push([w.value,"like",`%${n}%`]),Ne.appendCommonDesignerWhereAnd(i.conf.common,t),t.length&&(o.where_and=JSON.stringify(t)),o}function V(o){const t=o.error;return t===""||t===null||t===void 0}function U(o){return h(this,null,function*(){var p;const t=yield $.api.post("get_control_record_list",se(),!0),n=(p=t==null?void 0:t.result)!=null?p:t,l=Array.isArray(n==null?void 0:n.data)?n.data:[],a=l.map(b=>D({},b));o?f.value=[...f.value,...a]:f.value=a;const c=n==null?void 0:n.total_records,r=typeof c=="number"?c:void 0;ae(l.length,r,f.value.length),t&&t.code!==void 0&&t.code!==200&&console.warn("[controlRecordList] 列表接口非成功",t.msg||t.info,t)})}function M(){return h(this,null,function*(){ne(),oe.value=1,P.value=!0;try{yield U(!1)}catch(o){console.error(o),f.value=[],K.value=0,A.value=!1}finally{P.value=!1}})}function ce(){return h(this,null,function*(){yield re(()=>h(null,null,function*(){try{yield U(!0)}catch(o){throw console.error(o),o}}))})}function de(o){ie(o,ce)}const ue=e.computed(()=>f.value);function pe(o,t){const n=o[t];return n==null?"":String(n)}const me=e.computed(()=>{var o,t;return((t=(o=i.conf)==null?void 0:o.data)==null?void 0:t[0])||{}}),H=e.computed(()=>{const o=me.value,t=Number(o.appCardDefaultLines);return Number.isFinite(t)&&t>=1?Math.min(Math.floor(t),30):3}),k=e.reactive({}),R=["command","created_by","created","object_id","command_name","value"],fe=e.computed(()=>{var o;return{backgroundColor:v.value.bgColor,borderRadius:`${(o=v.value.radiusSize)!=null?o:8}px`}});function j(o,t){var n,l;return`${t}-${String((n=o.object_id)!=null?n:"")}-${String((l=o.created)!=null?l:"")}`}function W(o,t){return!!k[j(o,t)]}function _e(o,t){const n=j(o,t);k[n]=!k[n]}function q(o){var n;return String((n=o.command_name)!=null?n:"").trim()}function J(o){const t=[],n=[];for(const l of R)n.includes(l)||n.push(l);for(const l of m.value)!l.visible||l.prop==="status"||n.includes(l.prop)||n.push(l.prop);for(const l of n){const a=m.value.find(c=>c.prop===l&&c.visible);!a||l==="status"||t.push({prop:l,label:a.label,text:pe(o,l)})}return t}function be(o,t){const n=J(o);if(W(o,t))return n;const l=H.value,a=[];for(const r of R){const p=n.find(b=>b.prop===r);p&&a.push(p)}if(a.length>=l)return a.slice(0,l);const c=n.filter(r=>!R.includes(r.prop));return[...a,...c].slice(0,l)}function ve(o,t){return J(o).length>H.value}function G(){M()}function he(){E.value="",w.value="object_id";for(const o of Object.keys(k))delete k[o];M()}function ye(o){o==="reset"?he():o==="export"&&ge()}function z(o){const t=n=>String(n).padStart(2,"0");return`${o.getFullYear()}-${t(o.getMonth()+1)}-${t(o.getDate())} ${t(o.getHours())}:${t(o.getMinutes())}:${t(o.getSeconds())}`}function ge(){return h(this,null,function*(){const o=[...new Set(f.value.map(l=>{var a;return String((a=l.object_id)!=null?a:"").trim()}).filter(Boolean))];if(!o.length){x.ElMessage.warning("当前列表无对象编号,请加载记录后再导出");return}const t=new Date,n=new Date(t.getTime()-168*3600*1e3);try{yield x.ElMessageBox.confirm(`将按最近 7 天、当前已加载列表中的 ${o.length} 个对象编号发起导出任务,是否继续?`,"导出控制记录",{type:"info"})}catch(l){return}try{const l=yield $.api.post("export_control_record",{file_name:`control_record_${z(t).replace(/[: ]/g,"_")}`,start_time:z(n),end_time:z(t),object_ids:o},!0);if(l.code!==void 0&&l.code!==200){x.ElMessage.warning(l.msg||l.info||"导出请求未成功");return}x.ElMessage.success("导出任务已提交")}catch(l){x.ElMessage.error("导出请求失败")}})}return e.onMounted(()=>{M()}),(o,t)=>{const n=_.ElIcon,l=_.ElButton,a=_.ElDropdownItem,c=_.ElDropdownMenu,r=_.ElDropdown,p=_.ElOption,b=_.ElSelect,I=_.ElInput,C=_.ElTag,B=_.ElLoadingDirective;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["control-record-list-app mixiot-list-app mix-component",e.unref(O)]),style:e.normalizeStyle(e.unref(T))},[e.unref(v).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",De,[e.createElementVNode("div",{class:"app-title-text",style:e.normalizeStyle(y.value)},e.toDisplayString(u.conf.caption||u.conf.name),5),e.createVNode(r,{trigger:"click",onCommand:ye},{dropdown:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(a,{command:"reset"},{default:e.withCtx(()=>[...t[2]||(t[2]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(v).showExportBtn?(e.openBlock(),e.createBlock(a,{key:0,command:"export"},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode("导出",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:1})]),default:e.withCtx(()=>[e.createVNode(l,{size:"small",circle:""},{default:e.withCtx(()=>[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.Plus))]),_:1})]),_:1})]),_:1})])),e.withDirectives((e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",Te,[e.createVNode(b,{modelValue:w.value,"onUpdate:modelValue":t[0]||(t[0]=d=>w.value=d),class:"app-field-select"},{default:e.withCtx(()=>[e.createVNode(p,{label:"对象编号",value:"object_id"}),e.createVNode(p,{label:"用户名",value:"created_by"}),e.createVNode(p,{label:"控制码指令",value:"command"}),e.createVNode(p,{label:"指令名称",value:"command_name"})]),_:1},8,["modelValue"]),e.createVNode(I,{modelValue:E.value,"onUpdate:modelValue":t[1]||(t[1]=d=>E.value=d),placeholder:"输入关键词搜索",clearable:"",class:"app-search-input",onKeyup:e.withKeys(G,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.Search))]),_:1})]),append:e.withCtx(()=>[e.createVNode(l,{type:"primary",class:"app-toolbar-search-btn",onClick:G},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode("搜索",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",{class:"app-card-scroll",onScroll:de},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue.value,(d,N)=>(e.openBlock(),e.createElementBlock("div",{key:j(d,N),class:"app-object-card",style:e.normalizeStyle(fe.value)},[q(d)?(e.openBlock(),e.createElementBlock("div",Pe,[e.createElementVNode("div",Ae,e.toDisplayString(q(d)),1),e.createVNode(C,{type:V(d)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V(d)?"成功":"失败"),1)]),_:2},1032,["type"])])):(e.openBlock(),e.createBlock(C,{key:1,class:"app-card-status-corner",type:V(d)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V(d)?"成功":"失败"),1)]),_:2},1032,["type"])),e.createElementVNode("div",{class:e.normalizeClass(["app-card-fields",{"has-corner-status":!q(d)}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(be(d,N),L=>(e.openBlock(),e.createElementBlock("div",{key:L.prop,class:"app-field-line"},[e.createElementVNode("span",Me,e.toDisplayString(L.label),1),e.createElementVNode("span",Re,e.toDisplayString(L.text),1)]))),128))],2),ve(d)?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["app-card-expand-bottom",{open:W(d,N)}]),onClick:e.withModifiers(L=>_e(d,N),["stop"])},[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.ArrowDown))]),_:1})],10,je)):e.createCommentVNode("",!0)],4))),128)),e.unref(te)?(e.openBlock(),e.createElementBlock("div",qe,"加载中…")):f.value.length&&!e.unref(A)?(e.openBlock(),e.createElementBlock("div",ze," 已加载全部 "+e.toDisplayString(e.unref(K))+" 条 ",1)):f.value.length&&e.unref(A)?(e.openBlock(),e.createElementBlock("div",Ie," 已加载 "+e.toDisplayString(f.value.length)+" 条,上拉加载更多 ",1)):e.createCommentVNode("",!0)],32)])),[[B,e.unref(P)]]),e.renderSlot(o.$slots,"default",{},void 0,!0)],6)}}})),Ge=$._export_sfc(Je,[["__scopeId","data-v-2cfbb4e9"]]);exports.default=Ge;
|
|
1
|
+
"use strict";var ke=Object.defineProperty,Ce=Object.defineProperties;var xe=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var Se=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var Y=(u,i,s)=>i in u?ke(u,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[i]=s,D=(u,i)=>{for(var s in i||(i={}))Se.call(i,s)&&Y(u,s,i[s]);if(Q)for(var s of Q(i))Ee.call(i,s)&&Y(u,s,i[s]);return u},Z=(u,i)=>Ce(u,xe(i));var h=(u,i,s)=>new Promise((S,v)=>{var O=m=>{try{y(s.next(m))}catch(g){v(g)}},T=m=>{try{y(s.throw(m))}catch(g){v(g)}},y=m=>m.done?S(m.value):Promise.resolve(m.value).then(O,T);y((s=s.apply(u,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=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/tag/style/css");require("element-plus/es/components/input/style/css");require("element-plus/es/components/select/style/css");require("element-plus/es/components/option/style/css");require("element-plus/es/components/dropdown/style/css");require("element-plus/es/components/dropdown-menu/style/css");require("element-plus/es/components/dropdown-item/style/css");require("element-plus/es/components/button/style/css");require("element-plus/es/components/icon/style/css");const e=require("vue"),we=require("./useMixiotPanelSurface-CAZgexY5.cjs"),Ve=require("./BaseComponent-DoQ1oLoA.cjs"),$=require("./index-BdWR_FTA.cjs"),Be=require("./titleStyle-NSnz6cUg.cjs"),x=require("element-plus"),F=require("@element-plus/icons-vue"),Ne=require("./appendCommonDesignerWhereAnd-Q-EhDJXE.cjs"),Le=require("./useMixiotAppScrollLoad-BfiNo4UY.cjs"),X=require("./ele-lst-icon-CrxnHZ-A.cjs"),De={key:0,class:"app-title-row"},Oe={class:"mix-app-body"},Te={class:"app-toolbar-row"},Pe={key:0,class:"app-card-top"},Ae={class:"app-card-name"},Me={class:"app-field-label"},Re={class:"app-field-value"},je=["onClick"],qe={key:0,class:"app-scroll-foot"},ze={key:1,class:"app-scroll-foot"},Ie={key:2,class:"app-scroll-foot"},Fe={DEFAULT_ICON:X.DEFAULT_ICON,ACTIVE_ICON:X.ACTIVE_ICON,NAME_CN:"控制记录",NAME_EN:"ControlRecordListAPP",ORDER:4,PLATFORM:["mobile"]},$e={panelBgTone:{value:"light",type:"select",label:"component.options.mixiotPanelBgTone",options:[{label:"component.options.mixiotPanelBgTone_light",value:"light"},{label:"component.options.mixiotPanelBgTone_dark",value:"dark"}]},bgColor:"#fff",nameColor:"#999",valueColor:"#333",titleColor:"#111",titleSize:14,nameSize:12,valueSize:12,radiusSize:8,isHideTitle:!1,columns:[{key:"command",label:"控制码指令",width:140,visible:!0},{key:"created_by",label:"用户名",width:120,visible:!0},{key:"created",label:"控制时间",width:180,visible:!0},{key:"object_id",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}]},ee=[{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,appCardDefaultLines:3}],Ke=[{key:"appCardDefaultLines",label:"APP卡片默认展示行数(默认3行:控制码指令、用户名、控制时间)",type:"number"},{key:"showExportBtn",label:"导出按钮",type:"checkbox",group:"命令组"},{key:"name",label:"参数名称"},{key:"command",label:"控制码指令",checkable:!0,checkboxKey:"command_visible"},{key:"created_by",label:"用户名",checkable:!0,checkboxKey:"created_by_visible"},{key:"created",label:"控制时间",checkable:!0,checkboxKey:"created_visible"},{key:"object_id_label",label:"对象编号",checkable:!0,checkboxKey:"object_id_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"}],Ue=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],He={isAddCondition:!1,conditions:[],conditionFilterFields:[{value:"object_id",label:"setting.gridFields.objectId"},{value:"created_by",label:"setting.gridFields.createdBy"},{value:"command",label:"setting.gridFields.commandCode"},{value:"command_name",label:"setting.gridFields.commandName"}]},We={DEFAULT:Fe,OPTIONS:$e,DATA:ee,PARAMS:Ke,SOURCE:Ue,COMMON:He},Je=e.defineComponent(Z(D({},We),{__name:"controlRecordListAPP",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{},theme:{},code:{default:""}},setup(u){const i=u;class s extends Ve.BaseComponent{getDataBool(t,n){var a,c;const l=(c=(a=this.props.conf)==null?void 0:a.data)==null?void 0:c[0];return l&&Object.prototype.hasOwnProperty.call(l,t)&&l[t]!==void 0?!!l[t]:this.getOptionValue(t,n)}extractStyles(){return{panelBgTone:this.getOptionValue("panelBgTone","light"),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(ee));else{const n=this.props.conf.data[0];n.showExportBtn===void 0&&(n.showExportBtn=!0);const l={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[a,c]of Object.entries(l))n[a]===void 0&&(n[a]=c);(n.appCardDefaultLines===void 0||n.appCardDefaultLines===null||n.appCardDefaultLines==="")&&(n.appCardDefaultLines=3)}}}const S=new s(i,"controlRecordListAPP");S.setupLifecycle();const v=S.getStyle(),{mixiotPanelClass:O,mixiotPanelRootStyle:T}=we.useMixiotPanelSurface(v),y=e.computed(()=>Be.generateTitleStyle(i.conf.options)),m=e.computed(()=>{var n,l,a,c;const o=((l=(n=i.conf)==null?void 0:n.options)==null?void 0:l.columns)||[],t=((c=(a=i.conf)==null?void 0:a.data)==null?void 0:c[0])||{};return(Array.isArray(o)?o:[]).map(r=>{var B;let p=r.key;r.key==="object_id"&&(p="object_id_label");const b=(B=t[p])!=null?B:t[r.key],I=r.key==="object_id"?"object_id_visible":`${r.key}_visible`,C=t[I];return{prop:r.key,label:b!==void 0&&b!==""?String(b):r.label,width:r.width,minWidth:r.minWidth,visible:C!==void 0?!!C:r.visible!==!1}})}),g=10,{listLoading:P,listLoadingMore:te,hasMore:A,totalRecords:K,pageIndex:oe,resetListPagination:ne,pageRequestParams:le,updateAfterPage:ae,onListScroll:ie,runLoadMore:re}=Le.useMixiotAppScrollLoad(g),E=e.ref(""),w=e.ref("object_id"),f=e.ref([]);function se(){const o=D({},le()),t=[],n=E.value.trim();return n&&t.push([w.value,"like",`%${n}%`]),Ne.appendCommonDesignerWhereAnd(i.conf.common,t),t.length&&(o.where_and=JSON.stringify(t)),o}function V(o){const t=o.error;return t===""||t===null||t===void 0}function U(o){return h(this,null,function*(){var p;const t=yield $.api.post("get_control_record_list",se(),!0),n=(p=t==null?void 0:t.result)!=null?p:t,l=Array.isArray(n==null?void 0:n.data)?n.data:[],a=l.map(b=>D({},b));o?f.value=[...f.value,...a]:f.value=a;const c=n==null?void 0:n.total_records,r=typeof c=="number"?c:void 0;ae(l.length,r,f.value.length),t&&t.code!==void 0&&t.code!==200&&console.warn("[controlRecordList] 列表接口非成功",t.msg||t.info,t)})}function M(){return h(this,null,function*(){ne(),oe.value=1,P.value=!0;try{yield U(!1)}catch(o){console.error(o),f.value=[],K.value=0,A.value=!1}finally{P.value=!1}})}function ce(){return h(this,null,function*(){yield re(()=>h(null,null,function*(){try{yield U(!0)}catch(o){throw console.error(o),o}}))})}function de(o){ie(o,ce)}const ue=e.computed(()=>f.value);function pe(o,t){const n=o[t];return n==null?"":String(n)}const me=e.computed(()=>{var o,t;return((t=(o=i.conf)==null?void 0:o.data)==null?void 0:t[0])||{}}),H=e.computed(()=>{const o=me.value,t=Number(o.appCardDefaultLines);return Number.isFinite(t)&&t>=1?Math.min(Math.floor(t),30):3}),k=e.reactive({}),R=["command","created_by","created","object_id","command_name","value"],fe=e.computed(()=>{var o;return{backgroundColor:v.value.bgColor,borderRadius:`${(o=v.value.radiusSize)!=null?o:8}px`}});function j(o,t){var n,l;return`${t}-${String((n=o.object_id)!=null?n:"")}-${String((l=o.created)!=null?l:"")}`}function W(o,t){return!!k[j(o,t)]}function _e(o,t){const n=j(o,t);k[n]=!k[n]}function q(o){var n;return String((n=o.command_name)!=null?n:"").trim()}function J(o){const t=[],n=[];for(const l of R)n.includes(l)||n.push(l);for(const l of m.value)!l.visible||l.prop==="status"||n.includes(l.prop)||n.push(l.prop);for(const l of n){const a=m.value.find(c=>c.prop===l&&c.visible);!a||l==="status"||t.push({prop:l,label:a.label,text:pe(o,l)})}return t}function be(o,t){const n=J(o);if(W(o,t))return n;const l=H.value,a=[];for(const r of R){const p=n.find(b=>b.prop===r);p&&a.push(p)}if(a.length>=l)return a.slice(0,l);const c=n.filter(r=>!R.includes(r.prop));return[...a,...c].slice(0,l)}function ve(o,t){return J(o).length>H.value}function G(){M()}function he(){E.value="",w.value="object_id";for(const o of Object.keys(k))delete k[o];M()}function ye(o){o==="reset"?he():o==="export"&&ge()}function z(o){const t=n=>String(n).padStart(2,"0");return`${o.getFullYear()}-${t(o.getMonth()+1)}-${t(o.getDate())} ${t(o.getHours())}:${t(o.getMinutes())}:${t(o.getSeconds())}`}function ge(){return h(this,null,function*(){const o=[...new Set(f.value.map(l=>{var a;return String((a=l.object_id)!=null?a:"").trim()}).filter(Boolean))];if(!o.length){x.ElMessage.warning("当前列表无对象编号,请加载记录后再导出");return}const t=new Date,n=new Date(t.getTime()-168*3600*1e3);try{yield x.ElMessageBox.confirm(`将按最近 7 天、当前已加载列表中的 ${o.length} 个对象编号发起导出任务,是否继续?`,"导出控制记录",{type:"info"})}catch(l){return}try{const l=yield $.api.post("export_control_record",{file_name:`control_record_${z(t).replace(/[: ]/g,"_")}`,start_time:z(n),end_time:z(t),object_ids:o},!0);if(l.code!==void 0&&l.code!==200){x.ElMessage.warning(l.msg||l.info||"导出请求未成功");return}x.ElMessage.success("导出任务已提交")}catch(l){x.ElMessage.error("导出请求失败")}})}return e.onMounted(()=>{M()}),(o,t)=>{const n=_.ElIcon,l=_.ElButton,a=_.ElDropdownItem,c=_.ElDropdownMenu,r=_.ElDropdown,p=_.ElOption,b=_.ElSelect,I=_.ElInput,C=_.ElTag,B=_.ElLoadingDirective;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["control-record-list-app mixiot-list-app mix-component",e.unref(O)]),style:e.normalizeStyle(e.unref(T))},[e.unref(v).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",De,[e.createElementVNode("div",{class:"app-title-text",style:e.normalizeStyle(y.value)},e.toDisplayString(u.conf.caption||u.conf.name),5),e.createVNode(r,{trigger:"click",onCommand:ye},{dropdown:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(a,{command:"reset"},{default:e.withCtx(()=>[...t[2]||(t[2]=[e.createTextVNode("重置",-1)])]),_:1}),e.unref(v).showExportBtn?(e.openBlock(),e.createBlock(a,{key:0,command:"export"},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode("导出",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:1})]),default:e.withCtx(()=>[e.createVNode(l,{size:"small",circle:""},{default:e.withCtx(()=>[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.Plus))]),_:1})]),_:1})]),_:1})])),e.withDirectives((e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",Te,[e.createVNode(b,{modelValue:w.value,"onUpdate:modelValue":t[0]||(t[0]=d=>w.value=d),class:"app-field-select"},{default:e.withCtx(()=>[e.createVNode(p,{label:"对象编号",value:"object_id"}),e.createVNode(p,{label:"用户名",value:"created_by"}),e.createVNode(p,{label:"控制码指令",value:"command"}),e.createVNode(p,{label:"指令名称",value:"command_name"})]),_:1},8,["modelValue"]),e.createVNode(I,{modelValue:E.value,"onUpdate:modelValue":t[1]||(t[1]=d=>E.value=d),placeholder:"输入关键词搜索",clearable:"",class:"app-search-input",onKeyup:e.withKeys(G,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.Search))]),_:1})]),append:e.withCtx(()=>[e.createVNode(l,{type:"primary",class:"app-toolbar-search-btn",onClick:G},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode("搜索",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",{class:"app-card-scroll",onScroll:de},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ue.value,(d,N)=>(e.openBlock(),e.createElementBlock("div",{key:j(d,N),class:"app-object-card",style:e.normalizeStyle(fe.value)},[q(d)?(e.openBlock(),e.createElementBlock("div",Pe,[e.createElementVNode("div",Ae,e.toDisplayString(q(d)),1),e.createVNode(C,{type:V(d)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V(d)?"成功":"失败"),1)]),_:2},1032,["type"])])):(e.openBlock(),e.createBlock(C,{key:1,class:"app-card-status-corner",type:V(d)?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V(d)?"成功":"失败"),1)]),_:2},1032,["type"])),e.createElementVNode("div",{class:e.normalizeClass(["app-card-fields",{"has-corner-status":!q(d)}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(be(d,N),L=>(e.openBlock(),e.createElementBlock("div",{key:L.prop,class:"app-field-line"},[e.createElementVNode("span",Me,e.toDisplayString(L.label),1),e.createElementVNode("span",Re,e.toDisplayString(L.text),1)]))),128))],2),ve(d)?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["app-card-expand-bottom",{open:W(d,N)}]),onClick:e.withModifiers(L=>_e(d,N),["stop"])},[e.createVNode(n,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.ArrowDown))]),_:1})],10,je)):e.createCommentVNode("",!0)],4))),128)),e.unref(te)?(e.openBlock(),e.createElementBlock("div",qe,"加载中…")):f.value.length&&!e.unref(A)?(e.openBlock(),e.createElementBlock("div",ze," 已加载全部 "+e.toDisplayString(e.unref(K))+" 条 ",1)):f.value.length&&e.unref(A)?(e.openBlock(),e.createElementBlock("div",Ie," 已加载 "+e.toDisplayString(f.value.length)+" 条,上拉加载更多 ",1)):e.createCommentVNode("",!0)],32)])),[[B,e.unref(P)]]),e.renderSlot(o.$slots,"default",{},void 0,!0)],6)}}})),Ge=$._export_sfc(Je,[["__scopeId","data-v-2cfbb4e9"]]);exports.default=Ge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty,D=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var _=(p,i,a)=>i in p?L(p,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):p[i]=a,b=(p,i)=>{for(var a in i||(i={}))j.call(i,a)&&_(p,a,i[a]);if(V)for(var a of V(i))R.call(i,a)&&_(p,a,i[a]);return p},I=(p,i)=>D(p,H(i));var O=(p,i,a)=>new Promise((S,m)=>{var c=u=>{try{f(a.next(u))}catch(y){m(y)}},C=u=>{try{f(a.throw(u))}catch(y){m(y)}},f=u=>u.done?S(u.value):Promise.resolve(u.value).then(c,C);f((a=a.apply(p,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),$=require("./BaseComponent-BHUHnLj-.cjs"),N=require("./index-D7PZNHF4.cjs"),M=require("./titleStyle-NSnz6cUg.cjs"),B=require("./ele-crd-icon-BvNgAPKW.cjs"),W={class:"card-item-inner"},U={class:"value-main"},q={key:0,class:"value-unit"},G="--",J={DEFAULT_ICON:B.DEFAULT_ICON,ACTIVE_ICON:B.ACTIVE_ICON,NAME_CN:"基础卡片",NAME_EN:"Card",ORDER:1,PLATFORM:["pc","screen","mobile"]},K={titleColor:"#111",titleSize:14,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,labelColor:"#111",textColor:"#111",bgColor:"#fff",valueSize:28,nameSize:14,radiusSize:8,isHideTitle:!0,showTopGradient:!1,topGradientStart:{value:"#f5a623",type:"color",label:"component.options.topGradientStart",dependent:"showTopGradient"},topGradientHeight:{value:2,type:"number",min:1,max:16,label:"component.options.topGradientHeight",dependent:"showTopGradient"},topGradientPosition:{value:"cardItem",type:"select",label:"component.options.topGradientPosition",dependent:"showTopGradient",options:[{label:"component.options.topGradientPosition_cardItem",value:"cardItem"},{label:"component.options.topGradientPosition_aboveTitle",value:"aboveTitle"}]},showBgIcon:!1,defaultBgIcon:{value:"",type:"text",label:"component.options.defaultBgIcon",dependent:"showBgIcon"},bgIconOpacity:{value:.06,type:"number",min:0,max:1,step:.01,label:"component.options.bgIconOpacity",dependent:"showBgIcon"},bgIconSize:{value:40,type:"number",min:8,max:120,label:"component.options.bgIconSize",dependent:"showBgIcon"},bgIconPosition:{value:"right",type:"select",label:"component.options.bgIconPosition",dependent:"showBgIcon",options:[{label:"component.options.bgIconPosition_right",value:"right"},{label:"component.options.bgIconPosition_left",value:"left"}]},paramsLayout:{value:"horizontal",type:"select",label:"component.options.paramsLayout",options:[{label:"component.options.paramsLayout_horizontal",value:"horizontal"},{label:"component.options.paramsLayout_vertical",value:"vertical"}]}},Q=[{name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1,valueFontSize:0,nameFontSize:0,valueTextColor:"",nameTextColor:"",areaWeight:1,cellPadding:0,valueAlign:"center"}],X=["name","fv","object_id","unit","default","isText",{key:"valueFontSize",type:"number",label:"component.options.crdValueFontSize",group:"component.options.crdGroupCellStyle",groupCollapsedByDefault:!0,min:0,max:120},{key:"nameFontSize",type:"number",label:"component.options.crdNameFontSize",group:"component.options.crdGroupCellStyle",min:0,max:120},{key:"valueTextColor",type:"color",label:"component.options.crdValueTextColor",group:"component.options.crdGroupCellStyle"},{key:"valueAlign",type:"select",label:"component.options.crdValueAlign",group:"component.options.crdGroupCellStyle",options:[{label:"component.options.crdValueAlign_left",value:"left"},{label:"component.options.crdValueAlign_center",value:"center"},{label:"component.options.crdValueAlign_right",value:"right"}]},{key:"nameTextColor",type:"color",label:"component.options.crdNameTextColor",group:"component.options.crdGroupCellStyle"},{key:"areaWeight",type:"number",label:"component.options.crdAreaWeight",group:"component.options.crdGroupCellStyle",min:1,max:32},{key:"cellPadding",type:"number",label:"component.options.crdCellPadding",group:"component.options.crdGroupCellStyle",min:0,max:64}],Y=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime","summary"],Z={useAlias:!1,multiObject:!1,source:"mosaic",object_id:"",object_alias:""},ee={DEFAULT:J,OPTIONS:K,DATA:Q,PARAMS:X,SOURCE:Y,COMMON:Z},te=t.defineComponent(I(b({},ee),{__name:"crd",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){const i={valueFontSize:0,nameFontSize:0,valueTextColor:"",nameTextColor:"",areaWeight:1,cellPadding:0,valueAlign:"center"},a=p;class S extends $.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),showTopGradient:this.getOptionValue("showTopGradient",!1),topGradientStart:this.getOptionValue("topGradientStart","#f5a623"),topGradientHeight:this.getOptionValue("topGradientHeight",2),topGradientPosition:this.getOptionValue("topGradientPosition","cardItem"),showBgIcon:this.getOptionValue("showBgIcon",!1),defaultBgIcon:this.getOptionValue("defaultBgIcon",""),bgIconOpacity:this.getOptionValue("bgIconOpacity",.06),bgIconSize:this.getOptionValue("bgIconSize",40),bgIconPosition:this.getOptionValue("bgIconPosition","right"),paramsLayout:this.getOptionValue("paramsLayout","horizontal")}}init(){return O(this,null,function*(){var o;this.Style.value=this.extractStyles(),this.applyTheme();const n={name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1};if(!((o=this.props.conf.data)!=null&&o.length))this.props.conf.data=[b(b({},n),i)];else for(const l of this.props.conf.data)if(!(!l||typeof l!="object"))for(const[r,s]of Object.entries(i))l[r]===void 0&&(l[r]=s)})}setHistoryData(n){if(!n)return;const{data:o}=this.props.conf;!Array.isArray(o)||!o.length||o.forEach((l,r)=>{var s,g;try{const d=(g=(s=n==null?void 0:n.history)==null?void 0:s[r])==null?void 0:g[0];if(!d)return;const z=l==null?void 0:l.fv;if(!z)return;const v=d==null?void 0:d[z];v!=null&&(l.value=v)}catch(d){}})}}const m=new S(a,"crd");m.setupLifecycle();const c=m.getStyle(),C=t.computed(()=>M.generateTitleStyle(a.conf.options)),f=t.computed(()=>{const e=C.value||{},n=parseFloat(String(e.fontSize||"14"))||14,o=String(e.padding||"").split(" ").filter(Boolean),l=o.length>0&&parseFloat(o[0])||0,r=Math.ceil(n*1.5),s=Math.max(0,r+l*2);return I(b({},e),{minHeight:`${s}px`})}),u=t.computed(()=>{const e=c.value,n=Number(e.topGradientHeight)||2,o=e.topGradientStart||"#f5a623";return{height:`${n}px`,background:`linear-gradient(90deg, ${o}, transparent)`}}),y=t.computed(()=>{const e=c.value;return!!e.showTopGradient&&e.topGradientPosition==="aboveTitle"}),k=t.computed(()=>{const e=c.value;return!!e.showTopGradient&&e.topGradientPosition!=="aboveTitle"}),A=t.computed(()=>c.value.paramsLayout==="vertical"),E=t.computed(()=>{var o;const e=c.value,n=e.bgIconPosition==="right";return{opacity:(o=e.bgIconOpacity)!=null?o:.06,fontSize:`${Number(e.bgIconSize)||40}px`,display:"flex",alignItems:"center",justifyContent:n?"flex-end":"flex-start",paddingRight:n?"12px":void 0,paddingLeft:n?void 0:"12px"}});function P(e){const n=Number(e==null?void 0:e.areaWeight),o=Number.isFinite(n)&&n>0?n:1,l=Number(e==null?void 0:e.cellPadding),r={flex:`${o} 1 0`,minWidth:"0",minHeight:"0"};return Number.isFinite(l)&&l>0&&(r.padding=`${l}px`),r}function w(e){const n=c.value,o=Number(e==null?void 0:e.valueFontSize),l=Number.isFinite(o)&&o>0?o:n.valueSize,r=typeof(e==null?void 0:e.valueTextColor)=="string"?e.valueTextColor.trim():"",s=e==null?void 0:e.valueAlign,g=s==="left"||s==="right"||s==="center"?s:"center",d=g==="left"?"flex-start":g==="right"?"flex-end":"center";return{color:r||n.textColor,fontSize:`${l}px`,width:"100%",justifyContent:d,textAlign:g}}function F(e){const n=c.value,o=Number(e==null?void 0:e.nameFontSize),l=Number.isFinite(o)&&o>0?o:n.nameSize;return{color:(typeof(e==null?void 0:e.nameTextColor)=="string"?e.nameTextColor.trim():"")||n.labelColor,fontSize:`${l}px`}}function T(){const e=c.value.defaultBgIcon,n=typeof e=="string"?e.trim():"";return n?N.decodeIconFromStorage(n):""}const h=e=>{var r,s,g,d;if(!e)return{value:G,name:"--",unit:""};const n=(r=e.name)!=null?r:"",o=typeof e.unit=="string"?e.unit.trim():"";return e.isText?{value:(((s=e.flag)==null?void 0:s.find(v=>String(v.code)==String(e.value)))||{}).text||G,name:n,unit:o}:{value:(d=(g=e.value)!=null?g:e.default)!=null?d:0,name:n,unit:o}},x=a.conf;return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"mix-component",style:t.normalizeStyle({background:t.unref(c).bgColor,borderRadius:t.unref(c).radiusSize+"px"})},[y.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mix-component-top-gradient",style:t.normalizeStyle(u.value)},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"mix-title",style:t.normalizeStyle(f.value)},t.toDisplayString(t.unref(x).caption||t.unref(x).name),5),t.createElementVNode("div",{class:t.normalizeClass(["mix-body",{"mix-body--params-vertical":A.value}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(x).data,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"card-item",style:t.normalizeStyle(P(o))},[t.createElementVNode("div",{class:"card-item-surface",style:t.normalizeStyle({background:t.unref(c).bgColor})},null,4),k.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"card-item-top-gradient",style:t.normalizeStyle(u.value)},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",W,[t.createElementVNode("div",{class:"value",style:t.normalizeStyle(w(o))},[t.createElementVNode("span",U,t.toDisplayString(h(o).value),1),h(o).unit?(t.openBlock(),t.createElementBlock("span",q,t.toDisplayString(h(o).unit),1)):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"name",style:t.normalizeStyle(F(o))},t.toDisplayString(h(o).name),5)])],4))),128)),t.unref(c).showBgIcon&&T()?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mix-body-bg-icon",style:t.normalizeStyle(E.value)},t.toDisplayString(T()),5)):t.createCommentVNode("",!0)],2),t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}})),oe=N._export_sfc(te,[["__scopeId","data-v-c5fcb39d"]]);exports.default=oe;
|
|
1
|
+
"use strict";var L=Object.defineProperty,D=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var _=(p,i,a)=>i in p?L(p,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):p[i]=a,b=(p,i)=>{for(var a in i||(i={}))j.call(i,a)&&_(p,a,i[a]);if(V)for(var a of V(i))R.call(i,a)&&_(p,a,i[a]);return p},I=(p,i)=>D(p,H(i));var O=(p,i,a)=>new Promise((S,m)=>{var c=u=>{try{f(a.next(u))}catch(y){m(y)}},C=u=>{try{f(a.throw(u))}catch(y){m(y)}},f=u=>u.done?S(u.value):Promise.resolve(u.value).then(c,C);f((a=a.apply(p,i)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),$=require("./BaseComponent-DoQ1oLoA.cjs"),N=require("./index-BdWR_FTA.cjs"),M=require("./titleStyle-NSnz6cUg.cjs"),B=require("./ele-crd-icon-BvNgAPKW.cjs"),W={class:"card-item-inner"},U={class:"value-main"},q={key:0,class:"value-unit"},G="--",J={DEFAULT_ICON:B.DEFAULT_ICON,ACTIVE_ICON:B.ACTIVE_ICON,NAME_CN:"基础卡片",NAME_EN:"Card",ORDER:1,PLATFORM:["pc","screen","mobile"]},K={titleColor:"#111",titleSize:14,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,labelColor:"#111",textColor:"#111",bgColor:"#fff",valueSize:28,nameSize:14,radiusSize:8,isHideTitle:!0,showTopGradient:!1,topGradientStart:{value:"#f5a623",type:"color",label:"component.options.topGradientStart",dependent:"showTopGradient"},topGradientHeight:{value:2,type:"number",min:1,max:16,label:"component.options.topGradientHeight",dependent:"showTopGradient"},topGradientPosition:{value:"cardItem",type:"select",label:"component.options.topGradientPosition",dependent:"showTopGradient",options:[{label:"component.options.topGradientPosition_cardItem",value:"cardItem"},{label:"component.options.topGradientPosition_aboveTitle",value:"aboveTitle"}]},showBgIcon:!1,defaultBgIcon:{value:"",type:"text",label:"component.options.defaultBgIcon",dependent:"showBgIcon"},bgIconOpacity:{value:.06,type:"number",min:0,max:1,step:.01,label:"component.options.bgIconOpacity",dependent:"showBgIcon"},bgIconSize:{value:40,type:"number",min:8,max:120,label:"component.options.bgIconSize",dependent:"showBgIcon"},bgIconPosition:{value:"right",type:"select",label:"component.options.bgIconPosition",dependent:"showBgIcon",options:[{label:"component.options.bgIconPosition_right",value:"right"},{label:"component.options.bgIconPosition_left",value:"left"}]},paramsLayout:{value:"horizontal",type:"select",label:"component.options.paramsLayout",options:[{label:"component.options.paramsLayout_horizontal",value:"horizontal"},{label:"component.options.paramsLayout_vertical",value:"vertical"}]}},Q=[{name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1,valueFontSize:0,nameFontSize:0,valueTextColor:"",nameTextColor:"",areaWeight:1,cellPadding:0,valueAlign:"center"}],X=["name","fv","object_id","unit","default","isText",{key:"valueFontSize",type:"number",label:"component.options.crdValueFontSize",group:"component.options.crdGroupCellStyle",groupCollapsedByDefault:!0,min:0,max:120},{key:"nameFontSize",type:"number",label:"component.options.crdNameFontSize",group:"component.options.crdGroupCellStyle",min:0,max:120},{key:"valueTextColor",type:"color",label:"component.options.crdValueTextColor",group:"component.options.crdGroupCellStyle"},{key:"valueAlign",type:"select",label:"component.options.crdValueAlign",group:"component.options.crdGroupCellStyle",options:[{label:"component.options.crdValueAlign_left",value:"left"},{label:"component.options.crdValueAlign_center",value:"center"},{label:"component.options.crdValueAlign_right",value:"right"}]},{key:"nameTextColor",type:"color",label:"component.options.crdNameTextColor",group:"component.options.crdGroupCellStyle"},{key:"areaWeight",type:"number",label:"component.options.crdAreaWeight",group:"component.options.crdGroupCellStyle",min:1,max:32},{key:"cellPadding",type:"number",label:"component.options.crdCellPadding",group:"component.options.crdGroupCellStyle",min:0,max:64}],Y=["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime","summary"],Z={useAlias:!1,multiObject:!1,source:"mosaic",object_id:"",object_alias:""},ee={DEFAULT:J,OPTIONS:K,DATA:Q,PARAMS:X,SOURCE:Y,COMMON:Z},te=t.defineComponent(I(b({},ee),{__name:"crd",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){const i={valueFontSize:0,nameFontSize:0,valueTextColor:"",nameTextColor:"",areaWeight:1,cellPadding:0,valueAlign:"center"},a=p;class S extends $.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),showTopGradient:this.getOptionValue("showTopGradient",!1),topGradientStart:this.getOptionValue("topGradientStart","#f5a623"),topGradientHeight:this.getOptionValue("topGradientHeight",2),topGradientPosition:this.getOptionValue("topGradientPosition","cardItem"),showBgIcon:this.getOptionValue("showBgIcon",!1),defaultBgIcon:this.getOptionValue("defaultBgIcon",""),bgIconOpacity:this.getOptionValue("bgIconOpacity",.06),bgIconSize:this.getOptionValue("bgIconSize",40),bgIconPosition:this.getOptionValue("bgIconPosition","right"),paramsLayout:this.getOptionValue("paramsLayout","horizontal")}}init(){return O(this,null,function*(){var o;this.Style.value=this.extractStyles(),this.applyTheme();const n={name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1};if(!((o=this.props.conf.data)!=null&&o.length))this.props.conf.data=[b(b({},n),i)];else for(const l of this.props.conf.data)if(!(!l||typeof l!="object"))for(const[r,s]of Object.entries(i))l[r]===void 0&&(l[r]=s)})}setHistoryData(n){if(!n)return;const{data:o}=this.props.conf;!Array.isArray(o)||!o.length||o.forEach((l,r)=>{var s,g;try{const d=(g=(s=n==null?void 0:n.history)==null?void 0:s[r])==null?void 0:g[0];if(!d)return;const z=l==null?void 0:l.fv;if(!z)return;const v=d==null?void 0:d[z];v!=null&&(l.value=v)}catch(d){}})}}const m=new S(a,"crd");m.setupLifecycle();const c=m.getStyle(),C=t.computed(()=>M.generateTitleStyle(a.conf.options)),f=t.computed(()=>{const e=C.value||{},n=parseFloat(String(e.fontSize||"14"))||14,o=String(e.padding||"").split(" ").filter(Boolean),l=o.length>0&&parseFloat(o[0])||0,r=Math.ceil(n*1.5),s=Math.max(0,r+l*2);return I(b({},e),{minHeight:`${s}px`})}),u=t.computed(()=>{const e=c.value,n=Number(e.topGradientHeight)||2,o=e.topGradientStart||"#f5a623";return{height:`${n}px`,background:`linear-gradient(90deg, ${o}, transparent)`}}),y=t.computed(()=>{const e=c.value;return!!e.showTopGradient&&e.topGradientPosition==="aboveTitle"}),k=t.computed(()=>{const e=c.value;return!!e.showTopGradient&&e.topGradientPosition!=="aboveTitle"}),A=t.computed(()=>c.value.paramsLayout==="vertical"),E=t.computed(()=>{var o;const e=c.value,n=e.bgIconPosition==="right";return{opacity:(o=e.bgIconOpacity)!=null?o:.06,fontSize:`${Number(e.bgIconSize)||40}px`,display:"flex",alignItems:"center",justifyContent:n?"flex-end":"flex-start",paddingRight:n?"12px":void 0,paddingLeft:n?void 0:"12px"}});function P(e){const n=Number(e==null?void 0:e.areaWeight),o=Number.isFinite(n)&&n>0?n:1,l=Number(e==null?void 0:e.cellPadding),r={flex:`${o} 1 0`,minWidth:"0",minHeight:"0"};return Number.isFinite(l)&&l>0&&(r.padding=`${l}px`),r}function w(e){const n=c.value,o=Number(e==null?void 0:e.valueFontSize),l=Number.isFinite(o)&&o>0?o:n.valueSize,r=typeof(e==null?void 0:e.valueTextColor)=="string"?e.valueTextColor.trim():"",s=e==null?void 0:e.valueAlign,g=s==="left"||s==="right"||s==="center"?s:"center",d=g==="left"?"flex-start":g==="right"?"flex-end":"center";return{color:r||n.textColor,fontSize:`${l}px`,width:"100%",justifyContent:d,textAlign:g}}function F(e){const n=c.value,o=Number(e==null?void 0:e.nameFontSize),l=Number.isFinite(o)&&o>0?o:n.nameSize;return{color:(typeof(e==null?void 0:e.nameTextColor)=="string"?e.nameTextColor.trim():"")||n.labelColor,fontSize:`${l}px`}}function T(){const e=c.value.defaultBgIcon,n=typeof e=="string"?e.trim():"";return n?N.decodeIconFromStorage(n):""}const h=e=>{var r,s,g,d;if(!e)return{value:G,name:"--",unit:""};const n=(r=e.name)!=null?r:"",o=typeof e.unit=="string"?e.unit.trim():"";return e.isText?{value:(((s=e.flag)==null?void 0:s.find(v=>String(v.code)==String(e.value)))||{}).text||G,name:n,unit:o}:{value:(d=(g=e.value)!=null?g:e.default)!=null?d:0,name:n,unit:o}},x=a.conf;return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"mix-component",style:t.normalizeStyle({background:t.unref(c).bgColor,borderRadius:t.unref(c).radiusSize+"px"})},[y.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mix-component-top-gradient",style:t.normalizeStyle(u.value)},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"mix-title",style:t.normalizeStyle(f.value)},t.toDisplayString(t.unref(x).caption||t.unref(x).name),5),t.createElementVNode("div",{class:t.normalizeClass(["mix-body",{"mix-body--params-vertical":A.value}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(x).data,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"card-item",style:t.normalizeStyle(P(o))},[t.createElementVNode("div",{class:"card-item-surface",style:t.normalizeStyle({background:t.unref(c).bgColor})},null,4),k.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"card-item-top-gradient",style:t.normalizeStyle(u.value)},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",W,[t.createElementVNode("div",{class:"value",style:t.normalizeStyle(w(o))},[t.createElementVNode("span",U,t.toDisplayString(h(o).value),1),h(o).unit?(t.openBlock(),t.createElementBlock("span",q,t.toDisplayString(h(o).unit),1)):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"name",style:t.normalizeStyle(F(o))},t.toDisplayString(h(o).name),5)])],4))),128)),t.unref(c).showBgIcon&&T()?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mix-body-bg-icon",style:t.normalizeStyle(E.value)},t.toDisplayString(T()),5)):t.createCommentVNode("",!0)],2),t.renderSlot(e.$slots,"default",{},void 0,!0)],4))}})),oe=N._export_sfc(te,[["__scopeId","data-v-c5fcb39d"]]);exports.default=oe;
|
|
@@ -27,8 +27,8 @@ var N = (c, l, a) => new Promise((O, h) => {
|
|
|
27
27
|
S((a = a.apply(c, l)).next());
|
|
28
28
|
});
|
|
29
29
|
import { defineComponent as J, computed as f, openBlock as m, createElementBlock as y, normalizeStyle as g, unref as v, createCommentVNode as _, createElementVNode as b, toDisplayString as T, normalizeClass as K, Fragment as Q, renderList as X, renderSlot as Y } from "vue";
|
|
30
|
-
import { B as Z } from "./BaseComponent-
|
|
31
|
-
import {
|
|
30
|
+
import { B as Z } from "./BaseComponent-D82kw5vB.js";
|
|
31
|
+
import { w as tt, _ as et } from "./index-CCWU_se2.js";
|
|
32
32
|
import { g as ot } from "./titleStyle-BT5GlpAb.js";
|
|
33
33
|
import { A as nt, D as at } from "./ele-crd-icon-BXxB7P3T.js";
|
|
34
34
|
const lt = { class: "card-item-inner" }, it = { class: "value-main" }, rt = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty,F=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols,L=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,j=Reflect.get;var O=(l,o,t)=>o in l?A(l,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[o]=t,z=(l,o)=>{for(var t in o||(o={}))P.call(o,t)&&O(l,t,o[t]);if(k)for(var t of k(o))I.call(o,t)&&O(l,t,o[t]);return l},N=(l,o)=>F(l,M(o));var w=(l,o,t)=>j(L(l),t,o);var S=(l,o,t)=>new Promise((p,d)=>{var f=r=>{try{u(t.next(r))}catch(c){d(c)}},C=r=>{try{u(t.throw(r))}catch(c){d(c)}},u=r=>r.done?p(r.value):Promise.resolve(r.value).then(f,C);u((t=t.apply(l,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const D=require("./BaseComponent-BHUHnLj-.cjs"),v=require("./index-D7PZNHF4.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),y=require("./mix-control-modal-Dh-NZ50w.cjs"),H=require("element-plus"),q="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",$="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",U={class:"font-semibold flex items-center justify-between"},Z={class:"mix-body"},W={class:"w-full flex flex-wrap content-start"},G=["onClick"],J={DEFAULT_ICON:q,ACTIVE_ICON:$,NAME_CN:"按键",NAME_EN:"Button",ORDER:2,PLATFORM:["pc","screen","mobile"]},K={bgColor:"#fff",titleColor:"#111",textColor:"#fff",titleSize:14,textSize:14,itemHeight:42,radiusSize:8,items:2,isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,method:{value:"alway",type:"select",label:"component.switch.method",options:v.CONTROL_OPTIONS}},V=[{command:"Control_01",name:"关机",color:"#c92309",code:"0"},{command:"Control_01",name:"开机",color:"#217406",code:"1"}],Y=["name","command","color","code"],Q=["mosaic"],X={useAlias:!1,multiObject:!1,hideMultiObject:!0,statusFv:"",statusType:1,status:[{code:0,text:"离线",color:"#c92309"}]},e2={DEFAULT:J,OPTIONS:K,DATA:V,PARAMS:Y,SOURCE:Q,COMMON:X},t2=e.defineComponent(N(z({},e2),{__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:""}},setup(l){const o=l,t=e.reactive({authorized:{type:"black_list",list:[]},password:""}),p=e.reactive({rule:"",code:"",command:""}),d=e.reactive({text:"",color:""}),f=e.ref(null),C=e.ref(!0);class u extends D.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#fff"),titleSize:this.getOptionValue("titleSize",16),textSize:this.getOptionValue("textSize",14),itemHeight:this.getOptionValue("itemHeight",42),radiusSize:this.getOptionValue("radiusSize",8),items:this.getOptionValue("items",2),isHideTitle:this.getOptionValue("isHideTitle",!1)}}init(){return S(this,null,function*(){w(u.prototype,this,"init").call(this),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:V})}onPreview(){return S(this,null,function*(){yield w(u.prototype,this,"onPreview").call(this);const n=yield y.getAuthorized(this.props);t.authorized=n.authorized,t.password=n.password})}setSocketData(n){var g,x;if(!n)return;const{common:i}=this.props.conf,s=this.extractDataValue(n,i.statusFv);if(s!=null){const m=i.status.find(h=>String(h.code)===String(s));d.text=(g=m==null?void 0:m.text)!=null?g:"",d.color=(x=m==null?void 0:m.color)!=null?x:""}}}const r=new u(o,"ctrBtn");r.setupLifecycle();const c=r.getStyle(),E=e.computed(()=>R.generateTitleStyle(o.conf.options)),B=e.computed(()=>`${(100/c.value.items).toFixed(2)||100}%`),b=a=>!y.checkPermission(t.authorized,a.command),T=a=>{var s;if(b(a))return;const{options:n}=o.conf;let i=((s=n==null?void 0:n.method)==null?void 0:s.value)||"alway";p.rule=i,p.code=String(a.code),p.command=a.command,i==="alway"||i==="once"&&C.value?f.value.modal.visible=!0:_()},_=()=>{const{code:a,rule:n,command:i}=p,{common:s}=o.conf,g=JSON.parse(sessionStorage.getItem(v.ALIAS_MAPPING_KEY)||"{}");let m={block_mapping:"mapping",action:"publish_command",object_id:s.useAlias?g[s.object_alias]:s.object_id||o.uid,command:i,value:a,rule:n,control:t.password};v.api.platform(h=>{h.code===200&&(H.ElMessage.success(h.msg),f.value.modal.visible=!1,C.value=!1)},m)};return(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(c).bgColor,borderRadius:`${e.unref(c).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(E.value)},[e.createElementVNode("div",U,[e.createTextVNode(e.toDisplayString(l.conf.caption||l.conf.name)+" ",1),d.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"status-btn",style:e.normalizeStyle({backgroundColor:d.color,color:e.unref(c).textColor})},e.toDisplayString(d.text),5)):e.createCommentVNode("",!0)])],4),e.createElementVNode("div",Z,[e.createElementVNode("div",W,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.conf.data,(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:"btn-wrap",key:s,style:e.normalizeStyle({width:B.value,height:`${e.unref(c).itemHeight}px`,fontSize:`${e.unref(c).textSize}px`})},[e.createElementVNode("div",{class:e.normalizeClass(["btn-item",{disabled:b(i)}]),style:e.normalizeStyle({backgroundColor:i.color,color:e.unref(c).textColor}),onClick:g=>T(i)},e.toDisplayString(i.name),15,G)],4))),128))])]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4),e.createVNode(y._sfc_main,{ref_key:"controlRef",ref:f,onSubmit:_,password:t.password},null,8,["password"])],64))}})),o2=v._export_sfc(t2,[["__scopeId","data-v-061fd8dc"]]);exports.default=o2;
|
|
1
|
+
"use strict";var A=Object.defineProperty,F=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols,L=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,j=Reflect.get;var O=(l,o,t)=>o in l?A(l,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[o]=t,z=(l,o)=>{for(var t in o||(o={}))P.call(o,t)&&O(l,t,o[t]);if(k)for(var t of k(o))I.call(o,t)&&O(l,t,o[t]);return l},N=(l,o)=>F(l,M(o));var w=(l,o,t)=>j(L(l),t,o);var S=(l,o,t)=>new Promise((p,d)=>{var f=r=>{try{u(t.next(r))}catch(c){d(c)}},C=r=>{try{u(t.throw(r))}catch(c){d(c)}},u=r=>r.done?p(r.value):Promise.resolve(r.value).then(f,C);u((t=t.apply(l,o)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");require("html2canvas");const D=require("./BaseComponent-DoQ1oLoA.cjs"),v=require("./index-BdWR_FTA.cjs"),R=require("./titleStyle-NSnz6cUg.cjs"),y=require("./mix-control-modal-DaSRoqVn.cjs"),H=require("element-plus"),q="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",$="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",U={class:"font-semibold flex items-center justify-between"},Z={class:"mix-body"},W={class:"w-full flex flex-wrap content-start"},G=["onClick"],J={DEFAULT_ICON:q,ACTIVE_ICON:$,NAME_CN:"按键",NAME_EN:"Button",ORDER:2,PLATFORM:["pc","screen","mobile"]},K={bgColor:"#fff",titleColor:"#111",textColor:"#fff",titleSize:14,textSize:14,itemHeight:42,radiusSize:8,items:2,isHideTitle:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4,method:{value:"alway",type:"select",label:"component.switch.method",options:v.CONTROL_OPTIONS}},V=[{command:"Control_01",name:"关机",color:"#c92309",code:"0"},{command:"Control_01",name:"开机",color:"#217406",code:"1"}],Y=["name","command","color","code"],Q=["mosaic"],X={useAlias:!1,multiObject:!1,hideMultiObject:!0,statusFv:"",statusType:1,status:[{code:0,text:"离线",color:"#c92309"}]},e2={DEFAULT:J,OPTIONS:K,DATA:V,PARAMS:Y,SOURCE:Q,COMMON:X},t2=e.defineComponent(N(z({},e2),{__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:""}},setup(l){const o=l,t=e.reactive({authorized:{type:"black_list",list:[]},password:""}),p=e.reactive({rule:"",code:"",command:""}),d=e.reactive({text:"",color:""}),f=e.ref(null),C=e.ref(!0);class u extends D.BaseComponent{extractStyles(){return{bgColor:this.getOptionValue("bgColor","#fff"),titleColor:this.getOptionValue("titleColor","#111"),textColor:this.getOptionValue("textColor","#fff"),titleSize:this.getOptionValue("titleSize",16),textSize:this.getOptionValue("textSize",14),itemHeight:this.getOptionValue("itemHeight",42),radiusSize:this.getOptionValue("radiusSize",8),items:this.getOptionValue("items",2),isHideTitle:this.getOptionValue("isHideTitle",!1)}}init(){return S(this,null,function*(){w(u.prototype,this,"init").call(this),this.props.conf.data=this.props.conf.data.length?this.props.conf.data:V})}onPreview(){return S(this,null,function*(){yield w(u.prototype,this,"onPreview").call(this);const n=yield y.getAuthorized(this.props);t.authorized=n.authorized,t.password=n.password})}setSocketData(n){var g,x;if(!n)return;const{common:i}=this.props.conf,s=this.extractDataValue(n,i.statusFv);if(s!=null){const m=i.status.find(h=>String(h.code)===String(s));d.text=(g=m==null?void 0:m.text)!=null?g:"",d.color=(x=m==null?void 0:m.color)!=null?x:""}}}const r=new u(o,"ctrBtn");r.setupLifecycle();const c=r.getStyle(),E=e.computed(()=>R.generateTitleStyle(o.conf.options)),B=e.computed(()=>`${(100/c.value.items).toFixed(2)||100}%`),b=a=>!y.checkPermission(t.authorized,a.command),T=a=>{var s;if(b(a))return;const{options:n}=o.conf;let i=((s=n==null?void 0:n.method)==null?void 0:s.value)||"alway";p.rule=i,p.code=String(a.code),p.command=a.command,i==="alway"||i==="once"&&C.value?f.value.modal.visible=!0:_()},_=()=>{const{code:a,rule:n,command:i}=p,{common:s}=o.conf,g=JSON.parse(sessionStorage.getItem(v.ALIAS_MAPPING_KEY)||"{}");let m={block_mapping:"mapping",action:"publish_command",object_id:s.useAlias?g[s.object_alias]:s.object_id||o.uid,command:i,value:a,rule:n,control:t.password};v.api.platform(h=>{h.code===200&&(H.ElMessage.success(h.msg),f.value.modal.visible=!1,C.value=!1)},m)};return(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"mix-component",style:e.normalizeStyle({background:e.unref(c).bgColor,borderRadius:`${e.unref(c).radiusSize}px`})},[e.createElementVNode("div",{class:"mix-title",style:e.normalizeStyle(E.value)},[e.createElementVNode("div",U,[e.createTextVNode(e.toDisplayString(l.conf.caption||l.conf.name)+" ",1),d.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"status-btn",style:e.normalizeStyle({backgroundColor:d.color,color:e.unref(c).textColor})},e.toDisplayString(d.text),5)):e.createCommentVNode("",!0)])],4),e.createElementVNode("div",Z,[e.createElementVNode("div",W,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.conf.data,(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:"btn-wrap",key:s,style:e.normalizeStyle({width:B.value,height:`${e.unref(c).itemHeight}px`,fontSize:`${e.unref(c).textSize}px`})},[e.createElementVNode("div",{class:e.normalizeClass(["btn-item",{disabled:b(i)}]),style:e.normalizeStyle({backgroundColor:i.color,color:e.unref(c).textColor}),onClick:g=>T(i)},e.toDisplayString(i.name),15,G)],4))),128))])]),e.renderSlot(a.$slots,"default",{},void 0,!0)],4),e.createVNode(y._sfc_main,{ref_key:"controlRef",ref:f,onSubmit:_,password:t.password},null,8,["password"])],64))}})),o2=v._export_sfc(t2,[["__scopeId","data-v-061fd8dc"]]);exports.default=o2;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var R = Object.defineProperty, D = Object.defineProperties;
|
|
2
2
|
var H = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var T = Object.getOwnPropertySymbols, $ = Object.getPrototypeOf, U = Object.prototype.hasOwnProperty,
|
|
3
|
+
var T = Object.getOwnPropertySymbols, $ = Object.getPrototypeOf, U = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, W = Reflect.get;
|
|
4
4
|
var F = (o, e, t) => e in o ? R(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, N = (o, e) => {
|
|
5
5
|
for (var t in e || (e = {}))
|
|
6
6
|
U.call(e, t) && F(o, t, e[t]);
|
|
7
7
|
if (T)
|
|
8
8
|
for (var t of T(e))
|
|
9
|
-
|
|
9
|
+
Z.call(e, t) && F(o, t, e[t]);
|
|
10
10
|
return o;
|
|
11
11
|
}, V = (o, e) => D(o, H(e));
|
|
12
|
-
var _ = (o, e, t) =>
|
|
12
|
+
var _ = (o, e, t) => W($(o), t, e);
|
|
13
13
|
var y = (o, e, t) => new Promise((u, r) => {
|
|
14
14
|
var g = (a) => {
|
|
15
15
|
try {
|
|
@@ -26,12 +26,12 @@ var y = (o, e, t) => new Promise((u, r) => {
|
|
|
26
26
|
}, d = (a) => a.done ? u(a.value) : Promise.resolve(a.value).then(g, x);
|
|
27
27
|
d((t = t.apply(o, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import { defineComponent as
|
|
29
|
+
import { defineComponent as Y, reactive as O, ref as L, computed as M, openBlock as w, createElementBlock as b, Fragment as B, createElementVNode as p, normalizeStyle as h, unref as f, createTextVNode as G, toDisplayString as k, createCommentVNode as J, renderList as K, normalizeClass as q, renderSlot as Q, createVNode as X } from "vue";
|
|
30
30
|
import "html2canvas";
|
|
31
|
-
import { B as t2 } from "./BaseComponent-
|
|
32
|
-
import {
|
|
31
|
+
import { B as t2 } from "./BaseComponent-D82kw5vB.js";
|
|
32
|
+
import { Y as e2, z as o2, a as i2, _ as s2 } from "./index-CCWU_se2.js";
|
|
33
33
|
import { g as l2 } from "./titleStyle-BT5GlpAb.js";
|
|
34
|
-
import { _ as n2, g as a2, c as c2 } from "./mix-control-modal-
|
|
34
|
+
import { _ as n2, g as a2, c as c2 } from "./mix-control-modal-DTiG49Lj.js";
|
|
35
35
|
import { ElMessage as r2 } from "element-plus";
|
|
36
36
|
const d2 = "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", m2 = "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", u2 = { class: "font-semibold flex items-center justify-between" }, p2 = { class: "mix-body" }, f2 = { class: "w-full flex flex-wrap content-start" }, g2 = ["onClick"], C2 = {
|
|
37
37
|
DEFAULT_ICON: d2,
|
|
@@ -74,7 +74,7 @@ const d2 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
|
|
|
74
74
|
statusFv: "",
|
|
75
75
|
statusType: 1,
|
|
76
76
|
status: [{ code: 0, text: "离线", color: "#c92309" }]
|
|
77
|
-
}, b2 = { DEFAULT: C2, OPTIONS: h2, DATA: E, PARAMS: x2, SOURCE: v2, COMMON: w2 }, S2 = /* @__PURE__ */
|
|
77
|
+
}, b2 = { DEFAULT: C2, OPTIONS: h2, DATA: E, PARAMS: x2, SOURCE: v2, COMMON: w2 }, S2 = /* @__PURE__ */ Y(V(N({}, b2), {
|
|
78
78
|
__name: "ctrBtn",
|
|
79
79
|
props: {
|
|
80
80
|
conf: {
|
|
@@ -179,17 +179,17 @@ const d2 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c
|
|
|
179
179
|
style: h(P.value)
|
|
180
180
|
}, [
|
|
181
181
|
p("div", u2, [
|
|
182
|
-
|
|
182
|
+
G(k(o.conf.caption || o.conf.name) + " ", 1),
|
|
183
183
|
r.text ? (w(), b("div", {
|
|
184
184
|
key: 0,
|
|
185
185
|
class: "status-btn",
|
|
186
186
|
style: h({ backgroundColor: r.color, color: f(n).textColor })
|
|
187
|
-
}, k(r.text), 5)) :
|
|
187
|
+
}, k(r.text), 5)) : J("", !0)
|
|
188
188
|
])
|
|
189
189
|
], 4),
|
|
190
190
|
p("div", p2, [
|
|
191
191
|
p("div", f2, [
|
|
192
|
-
(w(!0), b(B, null,
|
|
192
|
+
(w(!0), b(B, null, K(o.conf.data, (i, l) => (w(), b("div", {
|
|
193
193
|
class: "btn-wrap",
|
|
194
194
|
key: l,
|
|
195
195
|
style: h({ width: I.value, height: `${f(n).itemHeight}px`, fontSize: `${f(n).textSize}px` })
|