mixdashboards 1.0.85 → 1.0.87
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-D34QRHy5.cjs → BaseComponent-BHUHnLj-.cjs} +1 -1
- package/dist/{BaseComponent-B5SIFUKu.js → BaseComponent-qzL33ZSL.js} +3 -3
- package/dist/{EChartComponentBase-dqtNexA7.js → EChartComponentBase-BtAW2Yko.js} +2 -2
- package/dist/{EChartComponentBase-jAYYsevE.cjs → EChartComponentBase-C4s5HSfS.cjs} +1 -1
- package/dist/{EmergencyPlanPanel-CNSVT9m8.cjs → EmergencyPlanPanel-C8ieiZvC.cjs} +1 -1
- package/dist/{EmergencyPlanPanel-Doo5cu72.js → EmergencyPlanPanel-CqvHGqqx.js} +1 -1
- package/dist/{HistoryPlanDialog-D5v_jcxq.js → HistoryPlanDialog-CUSKabw0.js} +1 -1
- package/dist/{HistoryPlanDialog-EUzHsez4.cjs → HistoryPlanDialog-D6VMuzat.cjs} +1 -1
- package/dist/{MixiotAppDetailPage-COTIq_oL.cjs → MixiotAppDetailPage-Bd9WrADz.cjs} +1 -1
- package/dist/{MixiotAppDetailPage-hVI9fZpO.js → MixiotAppDetailPage-CFISQwpc.js} +1 -1
- package/dist/{MonitoringMap-BqnRXXf0.js → MonitoringMap-CV7YYixH.js} +2 -2
- package/dist/{MonitoringMap-CtqtQDrg.cjs → MonitoringMap-DjvavXD5.cjs} +1 -1
- package/dist/{UniverSheet-BVbFQzbx.cjs → UniverSheet-BY4vwAeQ.cjs} +1 -1
- package/dist/{UniverSheet-DGslLlF8.js → UniverSheet-C7QQQUHI.js} +2 -2
- package/dist/{accelerationChart-Dlaz8dCi.cjs → accelerationChart-CnbCpT4d.cjs} +1 -1
- package/dist/{accelerationChart-BLfCB0xQ.js → accelerationChart-Dd7s6CA0.js} +2 -2
- package/dist/{actionItem-BztkzgJJ.js → actionItem-CjNacj0F.js} +179 -164
- package/dist/actionItem-DNgoQB08.cjs +1 -0
- package/dist/{alarmLevelChart-DAPsXpBm.cjs → alarmLevelChart-CRL45xkr.cjs} +1 -1
- package/dist/{alarmLevelChart-DW3YpK8y.js → alarmLevelChart-DDFP_ADG.js} +2 -2
- package/dist/{alertTable-LzeUcaTy.js → alertTable-DrUs1wUN.js} +2 -2
- package/dist/{alertTable-DIRQidQO.cjs → alertTable-UvxQNZ2Y.cjs} +1 -1
- package/dist/{aliasObjectSelectorDemo-CmB0VaaP.cjs → aliasObjectSelectorDemo-BGgcbyT-.cjs} +1 -1
- package/dist/{aliasObjectSelectorDemo-DSxciPwy.js → aliasObjectSelectorDemo-Bep18FrL.js} +1 -1
- package/dist/{annualRainfallChart-Dv_GAuLC.js → annualRainfallChart-BMuH6tsO.js} +2 -2
- package/dist/{annualRainfallChart-k6KjFS_C.cjs → annualRainfallChart-DDnaZZp0.cjs} +1 -1
- package/dist/{aqi-Ba50jmO9.js → aqi-CbyrPtO4.js} +4 -3
- package/dist/{aqi-DaUUMaJU.cjs → aqi-DjkOgiun.cjs} +2 -2
- package/dist/{aqiIndass-Z59-E4wM.js → aqiIndass-C-DEsmZ4.js} +2 -2
- package/dist/{aqiIndass-CymFUbJo.cjs → aqiIndass-C3mPUZP6.cjs} +1 -1
- package/dist/{areaDeformCurve-BkIAPPuz.cjs → areaDeformCurve-B-bUeLI-.cjs} +1 -1
- package/dist/{areaDeformCurve-D0Ewk9vb.js → areaDeformCurve-D6in1BnQ.js} +2 -2
- package/dist/arrayCard-CAoU7DHK.cjs +1 -0
- package/dist/{arrayCard-BSXdzUVh.js → arrayCard-CpzPkgA9.js} +12 -11
- package/dist/{audio-ChzQRc-m.cjs → audio-BrTfWQmo.cjs} +1 -1
- package/dist/{audio-DxRwie49.js → audio-TkisK5FD.js} +2 -2
- package/dist/{bar-D_fG07s5.cjs → bar-BZBOTnN4.cjs} +2 -2
- package/dist/{bar-FVRxAIV0.js → bar-CT6sCNW4.js} +18 -17
- package/dist/{bmp-Du28cT6S.cjs → bmp-DgcyTiV5.cjs} +1 -1
- package/dist/{bmp-DC5cos_-.js → bmp-Xsdyi9gr.js} +2 -2
- package/dist/{box-e8ah_S9H.cjs → box-DED4JT5G.cjs} +1 -1
- package/dist/{box-7ErrZ6BV.js → box-DNKXXXYx.js} +2 -2
- package/dist/{chartConfigPanel-we0JCKlW.js → chartConfigPanel-CF-q-XUN.js} +1 -1
- package/dist/{chartConfigPanel-B-DcUfb-.cjs → chartConfigPanel-D1M21nDO.cjs} +1 -1
- package/dist/{circleBar-C_PheazC.js → circleBar-CaC8ntp-.js} +12 -11
- package/dist/{circleBar-CDNNFZ-7.cjs → circleBar-m6J_QvzN.cjs} +2 -2
- package/dist/{clock-DcBtsj1a.cjs → clock-CnV36tpq.cjs} +1 -1
- package/dist/{clock-Drlpl4rd.js → clock-tPcek90B.js} +2 -2
- package/dist/{clt-CeZd9gK8.cjs → clt-DoDENEcJ.cjs} +1 -1
- package/dist/{clt-C17ZCh49.js → clt-DwoBhD_P.js} +2 -2
- package/dist/{cmc-DubkXzay.cjs → cmc-Dld5UOW9.cjs} +1 -1
- package/dist/{cmc-C7liYuEm.js → cmc-ObS3fWlL.js} +2 -2
- package/dist/{cmp-D2Rfyq8M.cjs → cmp-Bp9FqBZV.cjs} +1 -1
- package/dist/{cmp-B-x5XEU3.js → cmp-DEH1jzrG.js} +2 -2
- package/dist/{conclusionCard-CzPFreK2.js → conclusionCard-CHFJIt7G.js} +2 -2
- package/dist/{conclusionCard-Dpp7yCQr.cjs → conclusionCard-DXiFAJmo.cjs} +1 -1
- package/dist/{controlList-CdRFJ8T_.cjs → controlList-B2tV397i.cjs} +1 -1
- package/dist/{controlList-BxRyFAbK.js → controlList-hWCbafkY.js} +2 -2
- package/dist/{controlRecordList-6kKpjq1n.js → controlRecordList-DnhHr7kU.js} +2 -2
- package/dist/{controlRecordList-DNASxF1-.cjs → controlRecordList-uAmuCKjf.cjs} +1 -1
- package/dist/{controlRecordListAPP-NtlIWQXs.js → controlRecordListAPP-BpZmCMM-.js} +2 -2
- package/dist/{controlRecordListAPP-D8yzsc2T.cjs → controlRecordListAPP-BpfPZW3b.cjs} +1 -1
- package/dist/{crd-taCzWBxq.cjs → crd-BQ7AFV1c.cjs} +1 -1
- package/dist/{crd-DI5bkvJ2.js → crd-ChpWMXAm.js} +2 -2
- package/dist/{ctrBtn-CN6WqLz4.js → ctrBtn-CmdQ3s7z.js} +3 -3
- package/dist/{ctrBtn-BYFK-n7Z.cjs → ctrBtn-PTITC7R8.cjs} +1 -1
- package/dist/{ctrSet-Dmp-SSwX.cjs → ctrSet-CYqeDilm.cjs} +1 -1
- package/dist/{ctrSet-Doo8KOid.js → ctrSet-Dv5i5ne5.js} +3 -3
- package/dist/{ctrSwitch-Huz7y3qH.cjs → ctrSwitch-Byt4qKjt.cjs} +1 -1
- package/dist/{ctrSwitch-ymPMJQrr.js → ctrSwitch-C3NZcUxa.js} +3 -3
- package/dist/{dataManagement-D-ydHbCi.cjs → dataManagement-BFIS0e4d.cjs} +1 -1
- package/dist/{dataManagement-BSFDkBO0.js → dataManagement-enhqxRgF.js} +2 -2
- package/dist/{dataReport-scEzKoGr.js → dataReport-DLdB1ARI.js} +2 -2
- package/dist/{dataReport-DkybkxI_.cjs → dataReport-vfCe0q9d.cjs} +1 -1
- package/dist/{dataTable-CYdLGzsw.cjs → dataTable-DE3yOae0.cjs} +1 -1
- package/dist/{dataTable-DeOLfzYM.js → dataTable-DFZrMHnF.js} +1 -1
- package/dist/{datetime-D-2UMZL8.js → datetime-BK4xGaTM.js} +2 -2
- package/dist/{datetime-C69N7_sI.cjs → datetime-DXTcE56I.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-CGD8erAY.cjs → deepClusterSlipSurface-BKFavDI5.cjs} +1 -1
- package/dist/{deepClusterSlipSurface-rvmSm6ES.js → deepClusterSlipSurface-D_PbxUdd.js} +2 -2
- package/dist/{deepDataMatrix-CCiOw7na.cjs → deepDataMatrix-DzzK55Mc.cjs} +1 -1
- package/dist/{deepDataMatrix-DWooX6Y5.js → deepDataMatrix-avI-0mLw.js} +2 -2
- package/dist/{deepDisplacement3D-e53WV3xO.js → deepDisplacement3D-CbyatHpJ.js} +2 -2
- package/dist/{deepDisplacement3D-Df2O35JO.cjs → deepDisplacement3D-DW0CW2ut.cjs} +1 -1
- package/dist/{deepDisplacementChart-BXnNpjNH.js → deepDisplacementChart-B7GDsSm7.js} +2 -2
- package/dist/{deepDisplacementChart-v-DnKo0p.js → deepDisplacementChart-DY0lNJOz.js} +3 -3
- package/dist/{deepDisplacementChart-Dek4HCcF.cjs → deepDisplacementChart-DauJXxkW.cjs} +1 -1
- package/dist/{deepDisplacementChart-ByX2EeAy.cjs → deepDisplacementChart-Dm71dHpY.cjs} +1 -1
- package/dist/{deepDisplacementView-BXQbJ5vC.cjs → deepDisplacementView-BJAAMyTP.cjs} +1 -1
- package/dist/{deepDisplacementView-BosvzWIx.js → deepDisplacementView-RywcwybM.js} +1 -1
- package/dist/{deepNodeTemperatureChart-DPeTrYd-.js → deepNodeTemperatureChart-Et7GEspn.js} +2 -2
- package/dist/{deepNodeTemperatureChart-CpEfTehr.cjs → deepNodeTemperatureChart-FN14qWXP.cjs} +1 -1
- package/dist/{deepTangentAngleChart-CPv5w_eL.js → deepTangentAngleChart-CEsc85Mi.js} +2 -2
- package/dist/{deepTangentAngleChart-BysYnjJH.cjs → deepTangentAngleChart-m3r_mJg0.cjs} +1 -1
- package/dist/{deepTemperatureField-BQH8OSoj.js → deepTemperatureField-Cr3c_t1T.js} +3 -3
- package/dist/{deepTemperatureField-Bj7Q0vFg.cjs → deepTemperatureField-jfV1EahT.cjs} +1 -1
- package/dist/{deepTrendChart-DDW9FMRA.js → deepTrendChart-D7IDGKBC.js} +2 -2
- package/dist/{deepTrendChart-rtNsOGoK.cjs → deepTrendChart-DIyUa5qe.cjs} +1 -1
- package/dist/{deviceOnlineStatus-C3Ns4Eih.cjs → deviceOnlineStatus--G66OLv8.cjs} +1 -1
- package/dist/{deviceOnlineStatus-44KJ1Q4h.js → deviceOnlineStatus-DDo0caCc.js} +2 -2
- package/dist/{deviceStatus-BBmMff_F.cjs → deviceStatus-B0sBzHx9.cjs} +1 -1
- package/dist/{deviceStatus-q5q6x9K8.js → deviceStatus-cmxKruD-.js} +2 -2
- package/dist/{displacementDataTable-H1ruFQIu.js → displacementDataTable-BwhylBbX.js} +2 -2
- package/dist/{displacementDataTable-CvJctf3O.cjs → displacementDataTable-Bxs-LIOW.cjs} +1 -1
- package/dist/{displacementTrajectoryChart-B4l2zV26.js → displacementTrajectoryChart-D3VcZ1qM.js} +2 -2
- package/dist/{displacementTrajectoryChart-BHnt4XRT.cjs → displacementTrajectoryChart-JJEGEVMc.cjs} +1 -1
- package/dist/{displacementTrendChart-DQ8_g6Rx.js → displacementTrendChart-BlIqd2IK.js} +2 -2
- package/dist/{displacementTrendChart-JEQEzPRH.cjs → displacementTrendChart-GmxA4M6n.cjs} +1 -1
- package/dist/{dxf-CwyjmtpP.cjs → dxf-JH5I0L5F.cjs} +1 -1
- package/dist/{dxf-BXkxWRVK.js → dxf-r-iy1MWn.js} +2 -2
- package/dist/{dzc-BD022_cK.js → dzc-CMhN9l76.js} +23 -22
- package/dist/{dzc-Cs2c5qKW.cjs → dzc-KbkTkgzk.cjs} +2 -2
- package/dist/{emergencyPlan-7AeZCcku.js → emergencyPlan-CR8HkDi4.js} +3 -3
- package/dist/{emergencyPlan-DogUPjrm.cjs → emergencyPlan-FSdy0Ik5.cjs} +1 -1
- package/dist/evn-D8kcAx_T.cjs +1 -0
- package/dist/{evn-6LJwZ9oI.js → evn-DGxcYjRA.js} +12 -11
- package/dist/{evolutionChart-2iAuIjeo.cjs → evolutionChart-CI2hDs5C.cjs} +1 -1
- package/dist/{evolutionChart-Dvw_-w8R.js → evolutionChart-K7H8KKIG.js} +3 -3
- package/dist/{fileViewer-nvVZ78WD.js → fileViewer-Df0AU_z9.js} +2 -2
- package/dist/{fileViewer-iCJj8Ui8.cjs → fileViewer-DtIGy-zH.cjs} +1 -1
- package/dist/{filterBar-Rv8R1LOA.js → filterBar-BRDe-GgC.js} +2 -2
- package/dist/{filterBar-UNAHc5sn.cjs → filterBar-DEfkfl04.cjs} +1 -1
- package/dist/{fireCombustionCurve-BJhW5uLF.cjs → fireCombustionCurve-C8UGnEPC.cjs} +1 -1
- package/dist/{fireCombustionCurve-KogHwH-O.js → fireCombustionCurve-DJXeynXa.js} +3 -3
- package/dist/{fireFilterBar-JKyuyiby.js → fireFilterBar-CXiN-Jkv.js} +2 -2
- package/dist/{fireFilterBar-B7dHcX98.cjs → fireFilterBar-iqgVdbgH.cjs} +1 -1
- package/dist/{fireHistoryTable-B9h4fG5U.js → fireHistoryTable-CTIdqGk3.js} +2 -2
- package/dist/{fireHistoryTable-B0AuWVNb.cjs → fireHistoryTable-Dl4A1pRv.cjs} +1 -1
- package/dist/{gag-CorgSUVK.js → gag-BVPZK4hG.js} +2 -2
- package/dist/{gag-CU-DwzvP.cjs → gag-DQa6TEDv.cjs} +1 -1
- package/dist/gasStationList-BkzLZp4-.cjs +1 -0
- package/dist/gasStationList-NFyxin-H.js +1397 -0
- package/dist/{geo3dViewer-Cd12xZud.js → geo3dViewer-BJpae_MX.js} +3 -3
- package/dist/{geo3dViewer-DY1T1MFb.cjs → geo3dViewer-VRenmVKs.cjs} +1 -1
- package/dist/{glbModel-Coj4FgKp.js → glbModel-C96hRxP0.js} +2 -2
- package/dist/{glbModel-Y2xx0JR5.cjs → glbModel-i2X1L8LC.cjs} +1 -1
- package/dist/{globalObjectSelector-DbJUUWyG.js → globalObjectSelector-D09a0A2t.js} +1 -1
- package/dist/{globalObjectSelector-8qMu0LAU.cjs → globalObjectSelector-DhbeX3bm.cjs} +1 -1
- package/dist/{gnssFilterBar-Lq2eyPKr.js → gnssFilterBar-BHqE79Ri.js} +2 -2
- package/dist/{gnssFilterBar-BlkpVZW3.cjs → gnssFilterBar-BX3mEKiT.cjs} +1 -1
- package/dist/{gnssHistoryTable-Dse3OJ1u.js → gnssHistoryTable-D9tglOkP.js} +2 -2
- package/dist/{gnssHistoryTable-Bq2w43Wl.cjs → gnssHistoryTable-ZBfzhnlx.cjs} +1 -1
- package/dist/{gnssMapView-CWLlDlV5.cjs → gnssMapView-B2rSxPml.cjs} +2 -2
- package/dist/{gnssMapView-yTzbni2D.js → gnssMapView-Bicnnr6P.js} +4 -4
- package/dist/{gnssSectionProfile-BfGrXkPT.cjs → gnssSectionProfile-BKnvQBHa.cjs} +1 -1
- package/dist/{gnssSectionProfile-BF15R9j6.js → gnssSectionProfile-BfkjiI0i.js} +2 -2
- package/dist/{gnssTimeSeriesChart-CdOhINv8.js → gnssTimeSeriesChart-BTK4Qize.js} +2 -2
- package/dist/{gnssTimeSeriesChart-278oeIbH.cjs → gnssTimeSeriesChart-Cj-151Zs.cjs} +1 -1
- package/dist/{gnssXYTrajectory-Bh_tiDoG.cjs → gnssXYTrajectory-BgwA-1Fx.cjs} +1 -1
- package/dist/{gnssXYTrajectory-CIOmRk86.js → gnssXYTrajectory-DZiGIgf5.js} +2 -2
- package/dist/{grd-Cvhb0vqp.js → grd-DW4ve5k2.js} +77 -69
- package/dist/grd-DrRka55C.cjs +1 -0
- package/dist/{grdIndass-Blww3AWs.js → grdIndass-CRZ9agT-.js} +2 -2
- package/dist/{grdIndass-CAECiDwM.cjs → grdIndass-CofZtTJe.cjs} +1 -1
- package/dist/{grg-CZ-1c9KZ.cjs → grg-Cugg5crY.cjs} +1 -1
- package/dist/{grg-DaEWoH-V.js → grg-zv4YAkAu.js} +2 -2
- package/dist/gridview-BjOw8zBf.cjs +1 -0
- package/dist/{gridview-DfxjMc8r.js → gridview-DRB1rG1L.js} +100 -92
- package/dist/{groundwaterFilterBar-D-0_8E9_.cjs → groundwaterFilterBar-D4appJuv.cjs} +1 -1
- package/dist/{groundwaterFilterBar-BERwFBRI.js → groundwaterFilterBar-DyCL0fs9.js} +2 -2
- package/dist/{groundwaterProfileChart-LnbC3LFM.js → groundwaterProfileChart-Bo_XCqyF.js} +3 -3
- package/dist/{groundwaterProfileChart-D1N2guhL.cjs → groundwaterProfileChart-CDByowkP.cjs} +2 -2
- package/dist/{groundwaterTimeCurve-DsEJddqR.js → groundwaterTimeCurve-C0WRGZNY.js} +3 -3
- package/dist/{groundwaterTimeCurve-UD6BkRfr.cjs → groundwaterTimeCurve-Cj5qSKTI.cjs} +1 -1
- package/dist/{groupCard-BXkVVWCD.cjs → groupCard-B7XW81Xq.cjs} +1 -1
- package/dist/{groupCard-DtrSQ-Z7.js → groupCard-JeKQg4FL.js} +2 -2
- package/dist/{headerBar-Bwju12X9.cjs → headerBar-BXNzoDYA.cjs} +1 -1
- package/dist/{headerBar-Ddnid9UG.js → headerBar-D5FXDHNR.js} +2 -2
- package/dist/{history-Bw6bUdAH.js → history-BDIdK3AY.js} +1 -1
- package/dist/{history-27cn84JA.cjs → history-D_NO9ojb.cjs} +1 -1
- package/dist/{index-BAzRwQtP.js → index-BHBE19E2.js} +2112 -2095
- package/dist/{index-CfXXizWL.cjs → index-D7PZNHF4.cjs} +13 -13
- package/dist/{insarDeformChart-C1dTHqOV.js → insarDeformChart-DuBYscAT.js} +2 -2
- package/dist/{insarDeformChart-CvI9xE5R.cjs → insarDeformChart-wTnTF5NC.cjs} +1 -1
- package/dist/{insarImageViewer-ZvTfxIgq.cjs → insarImageViewer-DGkic1Rj.cjs} +1 -1
- package/dist/{insarImageViewer-C41SvD4C.js → insarImageViewer-tPyDE815.js} +2 -2
- package/dist/{kds-DUxLqoHG.cjs → kds-Bto_xGCo.cjs} +1 -1
- package/dist/{kds-E46fKndy.js → kds-Joeeniwr.js} +2 -2
- package/dist/{kpiCard-B9jjjkvf.js → kpiCard-B2MTndw-.js} +2 -2
- package/dist/{kpiCard-s94FkJRU.cjs → kpiCard-D_8YToN_.cjs} +1 -1
- package/dist/{landslideMap-DjZnkJBI.js → landslideMap-BSImmP3T.js} +3 -3
- package/dist/{landslideMap-VxTTg5Cg.cjs → landslideMap-DbvJ2h3R.cjs} +1 -1
- package/dist/{landslideWarning-VJ-TbmUJ.cjs → landslideWarning-CVvZS5-l.cjs} +1 -1
- package/dist/{landslideWarning-ujgAYvQd.js → landslideWarning-DjgODoEd.js} +5 -5
- package/dist/{layerTabs-CIVcYvAB.js → layerTabs-C2qdit8f.js} +2 -2
- package/dist/{layerTabs-CRfqhHZK.cjs → layerTabs-CT14C_oL.cjs} +1 -1
- package/dist/{leaflet-src-B0Z393os.cjs → leaflet-src-BuDfd_hT.cjs} +1 -1
- package/dist/{leaflet-src-Db2Zajkc.js → leaflet-src-CsuGTXZi.js} +1 -1
- package/dist/{lerc-DJHaixvD.js → lerc-5_flDPwM.js} +2 -2
- package/dist/{lerc-DNW0dac6.cjs → lerc-BVRAhrgg.cjs} +1 -1
- package/dist/{lin-BWXOU9MB.cjs → lin--Wc9Mzoq.cjs} +2 -2
- package/dist/{lin-Cc9KS6g8.js → lin-Djc6HZCi.js} +22 -21
- package/dist/{linIndass-B80W-sSu.cjs → linIndass-Bxs7wFnh.cjs} +1 -1
- package/dist/{linIndass-C_RGaGCW.js → linIndass-CQ2BZiY0.js} +2 -2
- package/dist/lst-C-yxmy1r.cjs +1 -0
- package/dist/{lst-vQnVvY0w.js → lst-CxLOKAzL.js} +65 -57
- package/dist/{manualEntry-Cn3zVMa6.js → manualEntry-DLL43b_K.js} +2 -2
- package/dist/{manualEntry-C50Ywtez.cjs → manualEntry-Dd9swkaL.cjs} +1 -1
- package/dist/{mapBackground-GUJpzKft.js → mapBackground-CDGjjy8-.js} +3 -3
- package/dist/{mapBackground-DSWA99yj.cjs → mapBackground-DNQRoaFb.cjs} +1 -1
- package/dist/{mappingList-De10OfoU.cjs → mappingList-C9HUo2y9.cjs} +1 -1
- package/dist/{mappingList-DABXXILd.js → mappingList-DrhZfKtH.js} +2 -2
- package/dist/{markdownViewer-C5FIYiVb.cjs → markdownViewer-Bea8zl8q.cjs} +1 -1
- package/dist/{markdownViewer-DpA36Il6.js → markdownViewer-DIb7t2bx.js} +2 -2
- package/dist/{mix-control-modal-D8AvXlfA.js → mix-control-modal-CaAkqkzX.js} +1 -1
- package/dist/{mix-control-modal-CmiQEHAY.cjs → mix-control-modal-Dh-NZ50w.cjs} +1 -1
- package/dist/mixGrid-DFuBeOy6.cjs +1 -0
- package/dist/{mixGrid-CGx9sB8L.js → mixGrid-DPdzqHke.js} +52 -42
- package/dist/mixdashboards.cjs +1 -1
- package/dist/mixdashboards.css +1 -1
- package/dist/mixdashboards.js +1 -1
- package/dist/{mixiotObjectListApi-6fOgrxRi.js → mixiotObjectListApi-CJsYvcG_.js} +1 -1
- package/dist/{mixiotObjectListApi--iL8o43r.cjs → mixiotObjectListApi-DVYddjqi.cjs} +1 -1
- package/dist/{mjpegCamera-BXoEh0eO.cjs → mjpegCamera-BvlKwwDL.cjs} +1 -1
- package/dist/{mjpegCamera-DKHwjIuj.js → mjpegCamera-C9PNl-r4.js} +2 -2
- package/dist/{monitorAlert-BWiJrdAz.cjs → monitorAlert-LeeMIRjf.cjs} +1 -1
- package/dist/{monitorAlert-bjx3tK4J.js → monitorAlert-vVcYtohz.js} +2 -2
- package/dist/{monitorData-BokcK6n-.cjs → monitorData-BtF_j2kd.cjs} +1 -1
- package/dist/{monitorData-Btt7aDZ_.js → monitorData-CHhLhD4y.js} +2 -2
- package/dist/{monitorSpeedChart-DUg3ZWWL.cjs → monitorSpeedChart-BH_rITMD.cjs} +1 -1
- package/dist/{monitorSpeedChart-DUDV7Rzr.js → monitorSpeedChart-Dhchpe2h.js} +1 -1
- package/dist/{mxa-B1Zo2pdY.js → mxa-B3DlA-Xs.js} +26 -25
- package/dist/{mxa-AkNoI49p.cjs → mxa-CU0OUOdG.cjs} +2 -2
- package/dist/{myValue-Dc-TNaIJ.cjs → myValue-AeGxHeE2.cjs} +1 -1
- package/dist/{myValue-DiFqx2Mu.js → myValue-DEbeO9Cb.js} +2 -2
- package/dist/{myValueList-BvxK1IqV.cjs → myValueList-EkbSpjf0.cjs} +1 -1
- package/dist/{myValueList-DT6elu6g.js → myValueList-qDBbrqDv.js} +2 -2
- package/dist/{objectList-DP_NFlRs.cjs → objectList-B1Q5MJPW.cjs} +1 -1
- package/dist/{objectList-DKdeE9sZ.js → objectList-DTHwnvxc.js} +3 -3
- package/dist/{objectListAPP-CmsWqEg9.cjs → objectListAPP-CgPjYGiu.cjs} +1 -1
- package/dist/{objectListAPP-DeE1b0G0.js → objectListAPP-njF3tJUP.js} +4 -4
- package/dist/{percentBar-D3OMvL9S.js → percentBar-BAwdbKH8.js} +8 -7
- package/dist/{percentBar-u174zBDW.cjs → percentBar-Dil8Vm3q.cjs} +2 -2
- package/dist/{photo-CqTeohyU.cjs → photo-BlZ5X_9p.cjs} +1 -1
- package/dist/{photo-DTa8-JfE.js → photo-Bn0lWnis.js} +2 -2
- package/dist/{pie-CFrlejaI.js → pie-CG2cvCTM.js} +8 -7
- package/dist/pie-CbOvGe0n.cjs +2 -0
- package/dist/{placeholder-CMjwiNJg.js → placeholder-Bdop1bDv.js} +1 -1
- package/dist/{placeholder-DowLjPKg.cjs → placeholder-jPC58i_u.cjs} +1 -1
- package/dist/{pressBtn-DqnDriy0.cjs → pressBtn-C6mEzpGm.cjs} +1 -1
- package/dist/{pressBtn-JjbjOMlO.js → pressBtn-Cwp0-Mju.js} +3 -3
- package/dist/{processTable-u-d0dEWb.js → processTable--PnPJzep.js} +2 -2
- package/dist/{processTable-DJGB7G0f.cjs → processTable-CUrw-_tx.cjs} +1 -1
- package/dist/{progressBar-BleFQuz0.js → progressBar-CLBQrVhg.js} +2 -2
- package/dist/{progressBar-B72uJjds.cjs → progressBar-Dg1WRKUU.cjs} +1 -1
- package/dist/{progressCircle-BhjM-BJQ.cjs → progressCircle-DBXHBoZS.cjs} +1 -1
- package/dist/{progressCircle-WV1cKW4h.js → progressCircle-Dft4lI8s.js} +2 -2
- package/dist/{qrcode-GP6jNJVw.js → qrcode-B7VNzAkt.js} +2 -2
- package/dist/{qrcode-DDTd4R-s.cjs → qrcode-BH8f2Hfp.cjs} +1 -1
- package/dist/{raceBar-Cc9JESDP.js → raceBar-Ck_RLw_X.js} +4 -3
- package/dist/{raceBar-CYruNXAm.cjs → raceBar-DZCr0eC-.cjs} +2 -2
- package/dist/{rad-BGWast-X.cjs → rad-C3kidKBD.cjs} +1 -1
- package/dist/{rad-CjQvIZQD.js → rad-C7ostpqi.js} +11 -10
- package/dist/{radarMapViewer-BFpD4-LL.cjs → radarMapViewer-B8g9WmmH.cjs} +1 -1
- package/dist/{radarMapViewer-S1rUbXWP.js → radarMapViewer-BxHWMhxf.js} +2 -2
- package/dist/{rainfallFilterBar-C3JEj8IG.js → rainfallFilterBar-C6amyMsu.js} +2 -2
- package/dist/{rainfallFilterBar-DkDjbh8n.cjs → rainfallFilterBar-G_3cep1I.cjs} +1 -1
- package/dist/{rainfallTimeCurve-B2OKTFXD.cjs → rainfallTimeCurve-Ce8eRvv6.cjs} +1 -1
- package/dist/{rainfallTimeCurve-BGq_ewcy.js → rainfallTimeCurve-dOfq4IKr.js} +3 -3
- package/dist/{rangeLin-bBttYnyX.js → rangeLin-CXrCb7e3.js} +2 -2
- package/dist/{rangeLin-DpFnJ8K3.cjs → rangeLin-GOVFLiyl.cjs} +1 -1
- package/dist/{realtimeEvolutionMap-BT4k2Wqr.js → realtimeEvolutionMap-CLhVGzzZ.js} +2 -2
- package/dist/{realtimeEvolutionMap-C_n42Iq6.cjs → realtimeEvolutionMap-VApbSWKk.cjs} +1 -1
- package/dist/{regionBar-CsqUtbp-.js → regionBar-CgCQBHYm.js} +2 -2
- package/dist/{regionBar-CSXHxkm3.cjs → regionBar-DOkzOqR4.cjs} +1 -1
- package/dist/{request-J5J0wsgP.js → request-CsLYkQ1F.js} +1 -1
- package/dist/{request-DUSs41EC.cjs → request-DBDym05o.cjs} +1 -1
- package/dist/{retainer1-D22rnFmM.cjs → retainer1-BihlkLkk.cjs} +1 -1
- package/dist/{retainer1-Cte9J2d4.js → retainer1-D2ORoyPc.js} +3 -3
- package/dist/{retainer2-DRI9ppfn.cjs → retainer2-5-qgDYHt.cjs} +1 -1
- package/dist/{retainer2-RS4hCoZq.js → retainer2-89gF8O00.js} +3 -3
- package/dist/{retainerRecordList-Cr0StG14.js → retainerRecordList-B7oZOPiz.js} +2 -2
- package/dist/{retainerRecordList-DQMB4-L4.cjs → retainerRecordList-ZukSm42U.cjs} +1 -1
- package/dist/{retainerRecordListAPP-BP4gtI1i.cjs → retainerRecordListAPP-C3ghAm55.cjs} +1 -1
- package/dist/{retainerRecordListAPP-YvyGdK5v.js → retainerRecordListAPP-CJifqoYV.js} +3 -3
- package/dist/{ringTopN-BeZDRsjJ.cjs → ringTopN-BKFTI8w3.cjs} +1 -1
- package/dist/{ringTopN-ConF82Zh.js → ringTopN-DEWE8OKA.js} +2 -2
- package/dist/{riskRegionTable-DTVgEHjW.js → riskRegionTable-DDWPmzK4.js} +2 -2
- package/dist/{riskRegionTable-CsGVR8wJ.cjs → riskRegionTable-Dg-ZfEl1.cjs} +1 -1
- package/dist/{sankey-J0dciPYs.cjs → sankey-CVIFo2TP.cjs} +1 -1
- package/dist/{sankey-_umLe_10.js → sankey-CjCzdx5A.js} +41 -32
- package/dist/{scd-BJgAGWPG.cjs → scd-D7vwm2So.cjs} +1 -1
- package/dist/{scd-CZ4ai5ex.js → scd-ExZtelyF.js} +2 -2
- package/dist/{sideMenu-DV_609Yg.js → sideMenu-9YGvznYC.js} +2 -2
- package/dist/{sideMenu-C5WHsknE.cjs → sideMenu-LL4XLBcW.cjs} +1 -1
- package/dist/{slopeStability-D6Juu1nG.js → slopeStability-BRVBekjo.js} +2 -2
- package/dist/{slopeStability-DXm89s4Z.cjs → slopeStability-BeoNqhaA.cjs} +1 -1
- package/dist/{speedCurve-RS-Vmcpx.js → speedCurve-DJUY_EGs.js} +2 -2
- package/dist/{speedCurve-XuSoQEpY.cjs → speedCurve-DLuFWpeb.cjs} +1 -1
- package/dist/{stackedBar-BZeUHK-7.js → stackedBar-DkjXvEyH.js} +4 -3
- package/dist/{stackedBar--qF-SuFI.cjs → stackedBar-W-rgbty6.cjs} +2 -2
- package/dist/{stressFilterBar-CGg4KSaN.cjs → stressFilterBar-D02NjLM9.cjs} +1 -1
- package/dist/{stressFilterBar-DOEeLbb7.js → stressFilterBar-FmqkdIl5.js} +2 -2
- package/dist/{stressTimeCurve-Cq-Tezdg.cjs → stressTimeCurve-CEU3JrfW.cjs} +1 -1
- package/dist/{stressTimeCurve-BKhPXoKQ.js → stressTimeCurve-Ck194Rx4.js} +3 -3
- package/dist/{swiper-CL6kBvkH.cjs → swiper-CM54onRz.cjs} +1 -1
- package/dist/{swiper-D4M4lXZ4.js → swiper-DGAjlGUa.js} +2 -2
- package/dist/{terminalConfigList-3dnhayKR.js → terminalConfigList-DmIncQe8.js} +2 -2
- package/dist/{terminalConfigList-QY28rzjd.cjs → terminalConfigList-hy2uUsJe.cjs} +1 -1
- package/dist/{terminalList-Bu7bP19K.js → terminalList-9qcAM4LG.js} +2 -2
- package/dist/{terminalList-tiGSk_0K.cjs → terminalList-C6DxUrb2.cjs} +1 -1
- package/dist/{terminalListAPP-DXmgYl5L.js → terminalListAPP-Dl5MpCjB.js} +3 -3
- package/dist/{terminalListAPP-C6eX5qzo.cjs → terminalListAPP-RYLAuqiK.cjs} +1 -1
- package/dist/{textbox-D9rdyeFX.js → textbox-CHkPlSAX.js} +2 -2
- package/dist/{textbox-CgccVs4H.cjs → textbox-GG4d1QIy.cjs} +1 -1
- package/dist/{timeQueryBar-CL3HJJhW.js → timeQueryBar-4KSmgROW.js} +1 -1
- package/dist/{timeQueryBar-Bb3Xcgpu.cjs → timeQueryBar-B_sNNLNx.cjs} +1 -1
- package/dist/{timeSeries-D_CnLULq.cjs → timeSeries-C6jp_8BG.cjs} +1 -1
- package/dist/{timeSeries-D6MUsEtQ.js → timeSeries-CgJ0SIKo.js} +3 -3
- package/dist/{timeSeriesCurve-Ba9xhV8H.cjs → timeSeriesCurve-CH12QzSV.cjs} +1 -1
- package/dist/{timeSeriesCurve-C1T9LrHY.js → timeSeriesCurve-TMqcdmQk.js} +3 -3
- package/dist/{toggleBtn-BxANAeYr.js → toggleBtn-4pgNSMG6.js} +28 -28
- package/dist/toggleBtn-DQd4gNtX.cjs +1 -0
- package/dist/{trajectoryConfigPanel-CXe1FrhE.js → trajectoryConfigPanel-BG3SSwn9.js} +1 -1
- package/dist/{trajectoryConfigPanel-Vc6bTKNr.cjs → trajectoryConfigPanel-Bw1VrV-D.cjs} +1 -1
- package/dist/{trajectoryScatter-CTAzSMb-.js → trajectoryScatter-CEN_a_hP.js} +2 -2
- package/dist/{trajectoryScatter-CNYUKIcZ.cjs → trajectoryScatter-YyQc-_lS.cjs} +1 -1
- package/dist/{universalConfigPanel-BOduMFlD.js → universalConfigPanel-DM-AnPb9.js} +1 -1
- package/dist/{universalConfigPanel-CsQJsE0y.cjs → universalConfigPanel-DXs2cr1a.cjs} +1 -1
- package/dist/{universalTable-ANbcZ8GW.js → universalTable-BqhsfcZp.js} +2 -2
- package/dist/{universalTable-Bnknn0qO.cjs → universalTable-zF3jltzT.cjs} +1 -1
- package/dist/{video-B0IQ26cF.js → video-D1iN2V0C.js} +2 -2
- package/dist/{video-CL9UQ-9d.cjs → video-Dq1cVS0l.cjs} +1 -1
- package/dist/{videoMonitor-C9YBVXU9.cjs → videoMonitor-B_1M-KcU.cjs} +1 -1
- package/dist/{videoMonitor-DeYYYnDI.js → videoMonitor-hkuvSmn4.js} +2 -2
- package/dist/vlu-0SrsCMT-.cjs +1 -0
- package/dist/{vlu-DK3einyX.js → vlu-K66RvuKO.js} +10 -9
- package/dist/{warningOverview-Bo_QiQhQ.js → warningOverview-BRKnU2qJ.js} +3 -3
- package/dist/{warningOverview-DImw0Y_8.cjs → warningOverview-DE4mZJtA.cjs} +1 -1
- package/dist/{weather-CXzPAr2U.cjs → weather-Cc-DzSlJ.cjs} +1 -1
- package/dist/{weather-BUuoB0nE.js → weather-DXSwe2wL.js} +2 -2
- package/dist/{windLin-CPCjUk4K.cjs → windLin-BWa_lMdL.cjs} +1 -1
- package/dist/{windLin-CHPjy9FI.js → windLin-BpJaU1Or.js} +2 -2
- package/package.json +1 -1
- package/dist/actionItem-DYRI89JR.cjs +0 -1
- package/dist/arrayCard-CAKVcE2n.cjs +0 -1
- package/dist/evn-DQHREzvd.cjs +0 -1
- package/dist/gasStationList-Ctwxqvkd.js +0 -1325
- package/dist/gasStationList-DMA0u1LJ.cjs +0 -1
- package/dist/grd-DYVYK3to.cjs +0 -1
- package/dist/gridview-iOWeVjY1.cjs +0 -1
- package/dist/lst-CUa31DYE.cjs +0 -1
- package/dist/mixGrid-DnGw5RnG.cjs +0 -1
- package/dist/pie-lwxiwQMf.cjs +0 -2
- package/dist/toggleBtn-Dbt6N5Sb.cjs +0 -1
- package/dist/vlu-TqQBXXP4.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ul=Object.defineProperty,pl=Object.defineProperties;var ml=Object.getOwnPropertyDescriptors;var pt=Object.getOwnPropertySymbols;var fl=Object.prototype.hasOwnProperty,vl=Object.prototype.propertyIsEnumerable;var mt=(V,h,k)=>h in V?ul(V,h,{enumerable:!0,configurable:!0,writable:!0,value:k}):V[h]=k,$=(V,h)=>{for(var k in h||(h={}))fl.call(h,k)&&mt(V,k,h[k]);if(pt)for(var k of pt(h))vl.call(h,k)&&mt(V,k,h[k]);return V},fe=(V,h)=>pl(V,ml(h));var N=(V,h,k)=>new Promise((se,x)=>{var be=A=>{try{Z(k.next(A))}catch(X){x(X)}},ge=A=>{try{Z(k.throw(A))}catch(X){x(X)}},Z=A=>A.done?se(A.value):Promise.resolve(A.value).then(be,ge);Z((k=k.apply(V,h)).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/tabs/style/css");require("element-plus/es/components/tab-pane/style/css");require("element-plus/es/components/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/empty/style/css");require("element-plus/es/components/collapse/style/css");require("element-plus/es/components/collapse-item/style/css");require("element-plus/es/components/descriptions/style/css");require("element-plus/es/components/tag/style/css");require("element-plus/es/components/descriptions-item/style/css");require("element-plus/es/components/alert/style/css");require("element-plus/es/components/divider/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/date-picker/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"),C=require("./index-CfXXizWL.cjs"),bl=require("./useMixiotPanelSurface-CAZgexY5.cjs"),gl=require("./BaseComponent-D34QRHy5.cjs"),yl=require("./titleStyle-NSnz6cUg.cjs"),w=require("element-plus"),ve=require("@element-plus/icons-vue"),_l=require("./appendCommonDesignerWhereAnd-Q-EhDJXE.cjs"),T=require("./mixiotObjectListApi--iL8o43r.cjs"),hl=require("./useMixiotAppScrollLoad-BfiNo4UY.cjs"),Vl=require("./MixiotAppDetailPage-COTIq_oL.cjs"),ft=require("./ele-lst-icon-CrxnHZ-A.cjs"),kl={key:0,class:"app-title-row"},Nl={class:"mix-app-body"},xl={class:"app-toolbar-row"},wl={class:"app-toolbar-search-group"},Cl={key:1,class:"app-created-search-row"},Bl=["onClick","onKeydown"],Sl={class:"app-card-top"},El={class:"app-card-name"},Dl={class:"app-card-right"},Tl={key:0,class:"app-transform-block"},Al={key:0,class:"app-transform-tags"},Ll={key:1,class:"app-transform-expanded"},Fl={class:"app-card-fields"},jl={class:"app-field-label"},Pl={key:0,class:"app-card-expand-footer"},Ol=["onClick"],Ml={key:0,class:"app-scroll-foot"},Rl={key:1,class:"app-scroll-foot"},Ul={key:2,class:"app-scroll-foot"},Kl={class:"dialog-footer"},ql={class:"dialog-footer"},Il={class:"detail-body"},zl={key:0,class:"view-detail-error"},$l={class:"mix-detail-block"},Hl=["src"],Yl={key:1,class:"mix-detail-title-sm"},Jl={key:2,class:"mix-detail-block"},Wl={key:1,class:"detail-tab-body detail-tab-body--monitor"},Gl={key:2,class:"detail-tab-body"},Ql={key:3,class:"detail-tab-body"},Zl={class:"tab-card-title"},Xl={class:"tab-card-meta"},ea={key:0},ta={key:1},la={key:4,class:"detail-tab-body"},aa={class:"tab-card-title"},oa={class:"tab-card-meta"},ia={key:0},na={key:1},ra={key:5,class:"detail-tab-body"},sa={class:"tab-card-title"},da={class:"tab-card-meta"},ca={key:0},ua={key:1},pa={key:6,class:"detail-tab-body tab-history"},ma={class:"tab-toolbar"},fa={key:7,class:"view-detail-stub"},va={class:"stub-uid"},ba={DEFAULT_ICON:ft.DEFAULT_ICON,ACTIVE_ICON:ft.ACTIVE_ICON,NAME_CN:"对象列表",NAME_EN:"ObjectListAPP",ORDER:1,PLATFORM:["mobile"]},ga={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:180,visible:!0,useFv:!1},{key:"name",label:"对象名称",width:180,visible:!0,useFv:!1},{key:"alias",label:"对象别名",width:180,visible:!0,useFv:!1},{key:"model",label:"型号",width:160,visible:!0,useFv:!1},{key:"create_by_tpl",label:"创建方式",width:120,visible:!0,useFv:!1},{key:"customer_name",label:"客户名称",width:180,visible:!0,useFv:!1},{key:"terminal_list",label:"关联终端",width:180,visible:!0,useFv:!1},{key:"mapping_name",label:"映射表名称",width:180,visible:!0,useFv:!1},{key:"tag",label:"标签",width:120,visible:!0,useFv:!1},{key:"province",label:"省份",width:100,visible:!0,useFv:!1},{key:"city",label:"市/区",width:100,visible:!0,useFv:!1},{key:"description",label:"描述",width:150,visible:!0,useFv:!1},{key:"created",label:"创建时间",width:180,visible:!0,useFv:!1},{key:"last_modified",label:"更新时间",width:180,visible:!0,useFv:!1}]},Pe=[fe($({name:"对象",fv:"",object_id:"",unit:"",default:"",isText:!1,showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0},T.detailTabRowDefaults()),{addRealtimeData:!1,realtimeParams:[{name:"",fv:""}],alias:"对象别名",alias_visible:!0,model:"型号",model_visible:!0,create_by_tpl:"创建方式",create_by_tpl_visible:!0,customer_name:"客户名称",customer_name_visible:!0,terminal_list:"关联终端",terminal_list_visible:!0,mapping_name:"映射表名称",mapping_name_visible:!0,tag:"标签",tag_visible:!0,province:"省份",province_visible:!0,city:"市/区",city_visible:!0,description:"描述",description_visible:!0,created:"创建时间",created_visible:!0,last_modified:"更新时间",last_modified_visible:!0,textValueTransform:{mode:"numeric",numericRules:[{matchType:"value",matchValue:"",displayText:"",color:"#333333"}],rangeRules:[{op:"gt",boundary:"",displayText:"",color:"#333333"}]},appCardDefaultLines:2})],ya=[{key:"appCardDefaultLines",label:"APP卡片默认展示行数",type:"number"},{key:"showAddBtn",label:"添加对象按钮",type:"checkbox",group:"命令组"},{key:"showViewBtn",label:"查看",type:"checkbox",group:"操作组",collapseIndentedChildren:!0,collapseExpandLabel:"展开查看详情",collapseCollapseLabel:"收起查看详情"},...T.OBJECT_DETAIL_TAB_DEFS.map(V=>({key:V.dataKey,label:V.label,type:"checkbox",group:"操作组",dependent:"showViewBtn",indent:!0})),{key:"showEditBtn",label:"编辑",type:"checkbox",group:"操作组"},{key:"showArchiveBtn",label:"资料备档",type:"checkbox",group:"操作组"},{key:"showDeleteBtn",label:"删除",type:"checkbox",group:"操作组"},{key:"name",label:"参数名称"},{key:"addRealtimeData",label:"添加实时数据",type:"checkbox"},{key:"realtimeParams",label:"实时数据参数",type:"array",fields:["name","fv"],dependent:"addRealtimeData"},{key:"alias",label:"对象别名",checkable:!0,checkboxKey:"alias_visible"},{key:"model",label:"型号",checkable:!0,checkboxKey:"model_visible"},{key:"create_by_tpl",label:"创建方式",checkable:!0,checkboxKey:"create_by_tpl_visible"},{key:"customer_name",label:"客户名称",checkable:!0,checkboxKey:"customer_name_visible"},{key:"terminal_list",label:"关联终端",checkable:!0,checkboxKey:"terminal_list_visible"},{key:"mapping_name",label:"映射表名称",checkable:!0,checkboxKey:"mapping_name_visible"},{key:"tag",label:"标签",checkable:!0,checkboxKey:"tag_visible"},{key:"province",label:"省份",checkable:!0,checkboxKey:"province_visible"},{key:"city",label:"市/区",checkable:!0,checkboxKey:"city_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"}],_a=[],ha={isAddCondition:!1,conditions:[],conditionFilterFields:[{value:"name",label:"setting.gridFields.objectName"},{value:"uid",label:"setting.gridFields.objectId"},{value:"alias",label:"setting.gridFields.objectAlias"},{value:"customer_id",label:"setting.gridFields.customerId"},{value:"customer_alias",label:"setting.gridFields.customerAlias"},{value:"customer_name",label:"setting.gridFields.customerName"},{value:"mapping_id",label:"setting.gridFields.mappingId"},{value:"mapping_name",label:"setting.gridFields.mappingName"},{value:"terminal_list",label:"setting.gridFields.linkedTerminals"},{value:"tag",label:"setting.gridFields.tag"},{value:"province",label:"setting.gridFields.province"},{value:"city",label:"setting.gridFields.city"},{value:"model",label:"setting.gridFields.model"},{value:"serial_no",label:"setting.gridFields.serialNumber"},{value:"created",label:"setting.gridFields.created"}]},Va=[{prop:"uid",label:"对象编号",width:180,visible:!0},{prop:"name",label:"对象名称",width:180,visible:!0},{prop:"alias",label:"对象别名",width:180,visible:!0},{prop:"model",label:"型号",width:160,visible:!0},{prop:"create_by_tpl",label:"创建方式",width:120,visible:!0},{prop:"customer_name",label:"客户名称",width:180,visible:!0},{prop:"terminal_list",label:"关联终端",width:180,visible:!0},{prop:"mapping_name",label:"映射表名称",width:180,visible:!0},{prop:"tag",label:"标签",width:120,visible:!0},{prop:"province",label:"省份",width:100,visible:!0},{prop:"city",label:"市/区",width:100,visible:!0},{prop:"description",label:"描述",width:150,visible:!0},{prop:"created",label:"创建时间",width:180,visible:!0},{prop:"last_modified",label:"更新时间",width:180,visible:!0}],ka={DEFAULT:ba,OPTIONS:ga,DATA:Pe,PARAMS:ya,SOURCE:_a,COMMON:ha,COLUMNS_CONFIG:Va},Na=e.defineComponent(fe($({},ka),{__name:"objectListAPP",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{default:"edit"},theme:{},objectList:{default:()=>[]},code:{default:""}},setup(V){const h=V;class k extends gl.BaseComponent{getDataBool(t,a){var r,c;const o=(c=(r=this.props.conf)==null?void 0:r.data)==null?void 0:c[0];return o&&Object.prototype.hasOwnProperty.call(o,t)&&o[t]!==void 0?!!o[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.length===1&&this.props.conf.data[0].alias_visible===void 0)this.props.conf.data=JSON.parse(JSON.stringify(Pe));else{const a=this.props.conf.data[0],o={showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[c,f]of Object.entries(o))a[c]===void 0&&(a[c]=f);const r=T.detailTabRowDefaults();for(const[c,f]of Object.entries(r))a[c]===void 0&&(a[c]=f);a.textValueTransform===void 0&&(a.textValueTransform=JSON.parse(JSON.stringify(Pe[0].textValueTransform))),(a.appCardDefaultLines===void 0||a.appCardDefaultLines===null||a.appCardDefaultLines==="")&&(a.appCardDefaultLines=2)}}}const se=new k(h,"objectListAPP");se.setupLifecycle();const x=se.getStyle(),{mixiotPanelClass:be,mixiotPanelRootStyle:ge}=bl.useMixiotPanelSurface(x),Z=e.computed(()=>yl.generateTitleStyle(h.conf.options)),A=e.computed(()=>{var o,r,c,f;const l=((r=(o=h.conf)==null?void 0:o.options)==null?void 0:r.columns)||[],t=((f=(c=h.conf)==null?void 0:c.data)==null?void 0:f[0])||{},a=Array.isArray(l)?l.map(s=>{const g=t[s.key],d=t[`${s.key}_visible`];return{prop:s.key,label:g!==void 0&&g!==""?g:s.label,width:s.width,visible:d!==void 0?d:s.visible}}):[];return t.addRealtimeData&&Array.isArray(t.realtimeParams)&&t.realtimeParams.forEach(s=>{s.name&&s.fv&&a.push({prop:s.fv,label:s.name,width:150,visible:!0})}),a}),X=20,{listLoading:ye,listLoadingMore:vt,hasMore:_e,totalRecords:Oe,pageIndex:bt,resetListPagination:gt,pageRequestParams:yt,updateAfterPage:_t,onListScroll:ht,runLoadMore:Vt}=hl.useMixiotAppScrollLoad(X),ee=e.ref(""),H=e.ref("uid"),te=e.ref(null),B=e.ref([]);function kt(){H.value==="created"?ee.value="":te.value=null}function Nt(){const l=[];if(H.value==="created"){const a=te.value;if(a&&a.length===2&&a[0]&&a[1]){const[o,r]=a;l.push(["created",">=",o<=r?o:r]),l.push(["created","<=",o<=r?r:o])}}else{const a=ee.value.trim();a&&l.push([H.value,"like",`%${a}%`])}_l.appendCommonDesignerWhereAnd(h.conf.common,l);const t=$({},yt());return l.length&&(t.where_and=JSON.stringify(l)),t}function Me(l){return N(this,null,function*(){var c,f;const t=yield T.objectListApiPost("get_object_list",Nt(),!0),a=(c=t==null?void 0:t.result)!=null?c:t;let o=Array.isArray(a==null?void 0:a.data)?[...a.data]:Array.isArray(a)?[...a]:[];if((f=h.objectList)!=null&&f.length){const s=new Set(h.objectList.map(String));o=o.filter(g=>s.has(String(g.uid)))}l?B.value=[...B.value,...o]:B.value=o;let r=a==null?void 0:a.total_records;typeof r!="number"&&(r=Array.isArray(a)?a.length:o.length),_t(o.length,r,B.value.length),t&&t.code!==void 0&&t.code!==200&&console.warn("[objectList] 列表接口非成功",t.msg||t.info,t)})}function O(){return N(this,null,function*(){gt(),bt.value=1,ye.value=!0;try{yield Me(!1)}catch(l){if(console.error(l),B.value=[],Oe.value=0,_e.value=!1,mockManager.isServiceUnavailableError(l))console.warn("[objectList] 对象列表服务暂不可用(如 object 未在 Consul 注册)",l);else{const t=l,a=t&&typeof t=="object"&&"isAxiosError"in t,o=t&&typeof t=="object"&&"code"in t&&("msg"in t||"info"in t);!a&&!o&&console.error("[objectList] 加载对象列表失败",l)}}finally{ye.value=!1,Ve(),Et()}})}function xt(){return N(this,null,function*(){yield Vt(()=>N(null,null,function*(){try{yield Me(!0),Ve()}catch(l){throw console.error(l),l}}))})}function wt(l){ht(l,xt)}const Ct=e.computed(()=>B.value);function Re(l){return l===!0||l===1||l==="1"}const le=e.ref(!1),v=e.reactive({uid:"",name:"",alias:"",model:"",created:new Date().toLocaleString(),last_modified:new Date().toLocaleString(),description:"",customer_id:"",customer_name:"",customer_alias:"",terminal_list:"",mapping_id:"",mapping_name:"",tag:"",province:"",city:"",create_by_tpl:!1,tpl_uid:"",tpl_name:"",tpl_alias:""}),he=()=>{O()},Bt=()=>{ee.value="",te.value=null,O()};e.watch(()=>{var l;return(l=h.objectList)==null?void 0:l.join(",")},()=>{O()});const ae=e.ref(!1),de=e.ref(!1),M=e.ref(""),u=e.ref(null),S=e.computed(()=>{var l,t;return((t=(l=h.conf)==null?void 0:l.data)==null?void 0:t[0])||{}}),St=e.computed(()=>{const l=new Set,t=S.value;if(t.addRealtimeData&&Array.isArray(t.realtimeParams))for(const a of t.realtimeParams)a!=null&&a.fv&&l.add(String(a.fv));return l}),Ue=e.computed(()=>{const l=S.value;return!l.addRealtimeData||!Array.isArray(l.realtimeParams)?[]:l.realtimeParams.filter(t=>(t==null?void 0:t.name)&&(t==null?void 0:t.fv)).map(t=>({name:String(t.name),fv:String(t.fv)}))}),Ke=e.computed(()=>{var l;return(l=S.value)==null?void 0:l.textValueTransform});let Y;const Ve=()=>N(null,null,function*(){const l=S.value;if(!l.addRealtimeData||!Array.isArray(l.realtimeParams))return;const t=[];for(const o of l.realtimeParams)o!=null&&o.fv&&t.push(String(o.fv));if(!t.length)return;const a=B.value.map(o=>String(o.uid)).filter(Boolean);if(a.length)try{const o=yield C.api.post("get_last_fv_by_objids",{object_ids:a},!1),r=(o==null?void 0:o.result)||{};for(const c of B.value){const f=String(c.uid),s=r[f];if(s)for(const g of t){const d=s[g];d!==void 0&&(c[g]=d)}}}catch(o){}}),Et=()=>{S.value.addRealtimeData&&(Y&&clearInterval(Y),Y=setInterval(()=>{Ve()},5e3))},Dt=()=>{Y&&(clearInterval(Y),Y=void 0)};function Tt(l){if(l==null||l==="")return!0;const t=String(l).trim();return!t||t==="未获取"}function qe(l,t){if(!t)return null;if(t.mode==="numeric"){for(const a of t.numericRules||[])if(a.matchType==="unavailable"){if(Tt(l))return{text:a.displayText,color:a.color}}else if(String(l)===String(a.matchValue))return{text:a.displayText,color:a.color}}else{const a=typeof l=="number"?l:parseFloat(String(l).replace(/,/g,""));if(Number.isNaN(a))return null;for(const o of t.rangeRules||[]){const r=parseFloat(String(o.boundary));if(!Number.isNaN(r)){if(o.op==="gt"&&a>r)return{text:o.displayText,color:o.color};if(o.op==="lt"&&a<r)return{text:o.displayText,color:o.color}}}}return null}function Ie(l){return St.value.has(l)}function ze(l,t){const a=l[t.prop];if(Ie(t.prop)){const o=qe(a,Ke.value);if(o)return o.text}return a==null?"":String(a)}function $e(l,t){const a=l[t.prop];if(!Ie(t.prop))return{};const o=qe(a,Ke.value);return o!=null&&o.color?{color:o.color}:{}}const At=["uid","created","name","description"],He=e.computed(()=>{const l=S.value,t=Number(l.appCardDefaultLines);return Number.isFinite(t)&&t>=1?Math.min(Math.floor(t),30):2}),ce=e.reactive({}),ke=e.reactive({}),Lt=e.computed(()=>{var l;return{backgroundColor:x.value.bgColor,borderRadius:`${(l=x.value.radiusSize)!=null?l:8}px`}});function Ft(l){return A.value.find(t=>t.prop===l)}function Ye(l){const t=[],a=[];for(const o of At)a.includes(o)||a.push(o);for(const o of A.value)o.visible&&(a.includes(o.prop)||a.push(o.prop));for(const o of a){const r=Ft(o);if(!r||!r.visible)continue;const c={prop:r.prop};let f;o==="create_by_tpl"?f=Re(l.create_by_tpl)?"模板创建":"手动创建":f=ze(l,c);const s=$e(l,c);t.push({prop:o,label:r.label,text:f,style:s})}return t}function jt(l){const t=Ye(l),a=String(l.uid),o=He.value;return ce[a]||t.length<=o?t:t.slice(0,o)}function Ne(l){return Ye(l).length>He.value}function Pt(l){return!!ce[l]}function xe(l){ce[l]=!ce[l]}function Ot(l,t){const a=t.target;!a||!(a instanceof Element)||a.closest(".app-more-trigger,.el-dropdown,.el-popper,.app-field-expand,.app-mini-more,button,a,input,textarea,select,.el-select,.el-input")||(x.value.showViewBtn?Ae(l):Ne(l)&&xe(String(l.uid)))}function Je(l){x.value.showViewBtn?Ae(l):Ne(l)&&xe(String(l.uid))}function oe(l){const t=[],a=S.value;if(!a.addRealtimeData||!Array.isArray(a.realtimeParams))return t;for(const o of a.realtimeParams){if(!(o!=null&&o.fv))continue;const r=String(o.fv),c=o.name?String(o.name):r,f={prop:r},s=ze(l,f),d=$e(l,f).color;t.push({text:`${c}: ${s}`,color:d})}return t}function Mt(l){return oe(l).some(t=>String(t.text).length>24)}function Rt(l){return!!ke[l]}function We(l){ke[l]=!ke[l]}function Ut(l,t){l==="view"?Ae(t):l==="edit"?Xt(t):l==="archive"?il(t):l==="delete"&&tl(t)}const J=e.computed(()=>T.OBJECT_DETAIL_TAB_DEFS.filter(l=>S.value[l.dataKey]===!0).map(l=>fe($({},l),{tabKey:T.dataKeyToTabKey(l.dataKey)}))),ie=e.ref("baseinfo"),Kt=e.computed(()=>{try{return localStorage.getItem("sys_mode")||""}catch(l){return""}}),Ge=e.computed(()=>{var a;const l=(a=u.value)==null?void 0:a.image;if(!l||typeof l!="string")return"";if(l.startsWith("http")||l.startsWith(C.FILE_URL))return l;const t=l.startsWith("/")?l.slice(1):l;return`${C.FILE_URL}${t}`}),Qe=e.computed(()=>{var t;const l=(t=u.value)==null?void 0:t.tag;return Array.isArray(l)?l.map(String).filter(Boolean):typeof l=="string"&&l.trim()?l.split(/[,,]/).map(a=>a.trim()).filter(Boolean):[]}),we=e.computed(()=>{var t;const l=(t=u.value)==null?void 0:t.addition;return Array.isArray(l)?l.filter(a=>a&&typeof a=="object"&&Array.isArray(a.data)):[]}),ue=e.ref(!1),R=e.ref(null),Ze=e.ref(""),Ce=e.ref("");e.ref([]);const Be=e.ref(!1),W=e.ref([]),Se=e.ref(!1),G=e.ref([]),pe=e.ref([]),Ee=e.ref(!1),U=e.ref([]),De=e.ref(!1),Q=e.ref([]),me=e.ref([C.dayjs().subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),C.dayjs().format("YYYY-MM-DD HH:mm:ss")]),qt=l=>N(null,null,function*(){var t;Be.value=!0;try{const a=yield C.api.post("get_retainer_result_list",{object_id:l,page_size:50,page_index:1},!0),o=(t=a==null?void 0:a.result)!=null?t:a;W.value=Array.isArray(o==null?void 0:o.data)?o.data:[]}catch(a){W.value=[]}finally{Be.value=!1}}),It=l=>N(null,null,function*(){var t;Se.value=!0;try{const a=yield C.api.post("get_collect_list",{object_id:l,page_size:50,page_index:1},!0),o=(t=a==null?void 0:a.result)!=null?t:a;G.value=Array.isArray(o==null?void 0:o.data)?o.data:[]}catch(a){G.value=[]}finally{Se.value=!1}}),zt=(l,t)=>N(null,null,function*(){var a;if(!t.length){U.value=[];return}Ee.value=!0;try{const o=[["uid","in",t]],r=yield C.api.post("terminal_list",{page_size:100,page_index:1,where_and:JSON.stringify(o)},!0),c=(a=r==null?void 0:r.result)!=null?a:r;U.value=Array.isArray(c==null?void 0:c.data)?c.data:[]}catch(o){U.value=[]}finally{Ee.value=!1}}),Te=()=>N(null,null,function*(){var t,a,o,r;const l=(t=u.value)==null?void 0:t.uid;if(l){De.value=!0;try{const c=(o=(a=u.value)==null?void 0:a.fv_list)!=null?o:[],f=[["object_id","=",l],["time",">=",me.value[0]],["time","<=",me.value[1]]];c.length&&f.push(["fv_key","in",c.slice(0,10)]);const s=yield C.api.post("history_mosaic",{page_size:100,page_index:1,where_and:JSON.stringify(f)},!0),g=(r=s==null?void 0:s.result)!=null?r:s;Q.value=Array.isArray(g==null?void 0:g.data)?g.data:[]}catch(c){Q.value=[]}finally{De.value=!1}}}),$t=l=>N(null,null,function*(){var t,a;if(l){ue.value=!0,R.value=null,Ze.value=l;try{const r=(Array.isArray((t=u.value)==null?void 0:t.dashboard_list)?u.value.dashboard_list:[]).find(d=>{var E,D;const L=String((E=d==null?void 0:d.device_type)!=null?E:"").toLowerCase(),m=String((D=d==null?void 0:d.type)!=null?D:"").toLowerCase();return L==="mobile"||m==="mobile"}),c=String((a=r==null?void 0:r.uid)!=null?a:"").trim();if(!c){w.ElMessage.warning("该对象未绑定手机显示板");return}Ce.value=c;const f=yield C.api.post("get_dashboard_item",{uid:c},!1),s=(f==null?void 0:f.result)||{},g=s==null?void 0:s.script;g&&typeof g=="object"&&Object.keys(g).length?R.value=g:w.ElMessage.warning("显示板脚本为空")}catch(o){console.error(o),R.value=null}finally{ue.value=!1}}}),Ht=l=>`「${l}」的完整能力在 mixui 对象管理模块中提供;大屏组件内仅保留配置占位。`,Xe=()=>{const l=J.value;ie.value=l.length?l[0].tabKey:"baseinfo"},Ae=l=>N(null,null,function*(){var t,a;if(M.value="",u.value=null,Xe(),!J.value.length){ae.value=!0;return}ae.value=!0,de.value=!0;try{const o=yield T.objectListApiPost("get_object_item",{uid:l.uid},!0);o!=null&&o.result&&typeof o.result=="object"?(u.value=o.result,pe.value=(a=(t=o.result)==null?void 0:t.object_list)!=null?a:[]):u.value=$({},l),(o==null?void 0:o.code)!==void 0&&o.code!==200?M.value=o.msg||o.info||`请求失败 (${o.code})`:o!=null&&o.result||(M.value="未返回详情数据,已使用列表行暂代显示。")}catch(o){u.value=$({},l),M.value="加载详情失败,已使用列表行暂代显示。"}finally{de.value=!1}});function Yt(){ae.value=!1,Jt()}const Jt=()=>{u.value=null,M.value="",de.value=!1,R.value=null,Ce.value="",W.value=[],G.value=[],pe.value=[],U.value=[],Q.value=[]};e.watch(ie,l=>{var a,o,r;const t=(a=u.value)==null?void 0:a.uid;if(t)if(l==="monitor"&&!R.value)$t(t);else if(l==="retainer-record"&&!W.value.length)qt(t);else if(l==="collect"&&!G.value.length)It(t);else if(l==="terminal"&&!U.value.length){const c=(r=(o=u.value)==null?void 0:o.terminal_list)!=null?r:[];zt(t,c)}else l==="history"&&!Q.value.length&&Te()}),e.watch(J,()=>{if(!ae.value)return;new Set(J.value.map(t=>t.tabKey)).has(ie.value)||Xe()});const et=()=>({uid:"",name:"",alias:"",model:"",description:"",customer_id:"",customer_name:"",customer_alias:"",terminal_list:"",mapping_id:"",mapping_name:"",tag:"",province:"",city:"",create_by_tpl:!1,tpl_uid:"",tpl_name:"",tpl_alias:""}),ne=e.ref(!1),p=e.reactive(et()),tt=e.ref(0),Le=e.ref(!1),Fe=e.ref(!1),je=e.ref(!1);function Wt(l){return Array.isArray(l)?l.map(String).filter(Boolean).join(", "):typeof l=="string"?l:""}function lt(l){return l.split(/[,,]/).map(t=>t.trim()).filter(Boolean)}function Gt(l){return Array.isArray(l)?l.map(String).filter(Boolean).join(", "):typeof l=="string"?l:""}function Qt(l){const t=l.terminal_list;return Array.isArray(t)?t.map(String).map(a=>a.trim()).filter(Boolean):lt(String(t!=null?t:""))}function Zt(){const l=S.value;if(l.addRealtimeData&&Array.isArray(l.realtimeParams))for(const t of l.realtimeParams)t!=null&&t.fv&&Reflect.deleteProperty(p,String(t.fv));Object.assign(p,et())}function at(l){const t=S.value;if(!(!t.addRealtimeData||!Array.isArray(t.realtimeParams))){for(const a of t.realtimeParams)if(a!=null&&a.name&&(a!=null&&a.fv)){const o=String(a.fv),r=l[o];p[o]=r!=null?String(r):""}}}function ot(l){var t,a,o,r,c,f,s,g,d,L,m,E,D,K,q;Zt(),Object.assign(p,{uid:String((t=l.uid)!=null?t:""),name:String((a=l.name)!=null?a:""),alias:String((o=l.alias)!=null?o:""),model:String((r=l.model)!=null?r:""),description:String((c=l.description)!=null?c:""),customer_id:String((f=l.customer_id)!=null?f:""),customer_name:String((s=l.customer_name)!=null?s:""),customer_alias:String((g=l.customer_alias)!=null?g:""),terminal_list:Gt(l.terminal_list),mapping_id:String((d=l.mapping_id)!=null?d:""),mapping_name:String((L=l.mapping_name)!=null?L:""),tag:Wt(l.tag),province:String((m=l.province)!=null?m:""),city:String((E=l.city)!=null?E:""),create_by_tpl:Re(l.create_by_tpl),tpl_uid:String((D=l.tpl_uid)!=null?D:""),tpl_name:String((K=l.tpl_name)!=null?K:""),tpl_alias:String((q=l.tpl_alias)!=null?q:"")}),tt.value=Number(l.id)||0}function it(l,t){var a,o,r,c,f,s,g,d,L,m,E,D,K,q,b,re;return{id:t,uid:String((a=l.uid)!=null?a:"").trim(),name:String((o=l.name)!=null?o:"").trim(),alias:String((r=l.alias)!=null?r:""),model:String((c=l.model)!=null?c:""),description:String((f=l.description)!=null?f:""),customer_id:String((s=l.customer_id)!=null?s:""),customer_name:String((g=l.customer_name)!=null?g:""),customer_alias:String((d=l.customer_alias)!=null?d:""),terminal_list:Qt(l),mapping_id:String((L=l.mapping_id)!=null?L:""),mapping_name:String((m=l.mapping_name)!=null?m:""),tag:lt(String((E=l.tag)!=null?E:"")),province:String((D=l.province)!=null?D:""),city:String((K=l.city)!=null?K:""),create_by_tpl:l.create_by_tpl?1:0,tpl_uid:String((q=l.tpl_uid)!=null?q:""),tpl_name:String((b=l.tpl_name)!=null?b:""),tpl_alias:String((re=l.tpl_alias)!=null?re:""),addition:"[]"}}const Xt=l=>N(null,null,function*(){var t;ne.value=!0,Le.value=!0;try{const a=yield T.objectListApiPost("get_object_item",{uid:l.uid},!0),o=(t=a==null?void 0:a.result)!=null?t:l;ot(o),at(o)}catch(a){ot(l),at(l),w.ElMessage.warning("拉取对象详情失败,已使用列表行编辑")}finally{Le.value=!1}}),el=()=>N(null,null,function*(){if(!p.name.trim()){w.ElMessage.warning("请填写对象名称");return}Fe.value=!0;try{yield T.objectListApiPost("update_object",it(p,tt.value),!0),w.ElMessage.success("保存成功"),ne.value=!1,yield O()}catch(l){w.ElMessage.error("保存失败")}finally{Fe.value=!1}}),tl=l=>{w.ElMessageBox.confirm("确认删除该对象吗?","警告",{type:"warning"}).then(()=>N(null,null,function*(){try{yield T.objectListApiPost("delete_object",{uid:l.uid,id:l.id},!0),w.ElMessage.success("删除成功"),yield O()}catch(t){w.ElMessage.error("删除失败")}})).catch(()=>{})},ll=()=>{const l=typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?`obj_${crypto.randomUUID()}`:`obj_${Date.now()}_${Math.random().toString(16).slice(2)}`;Object.assign(v,{uid:l,name:"",alias:"",model:"",created:new Date().toLocaleString(),last_modified:new Date().toLocaleString(),description:"",customer_id:"",customer_name:"",customer_alias:"",terminal_list:"",mapping_id:"",mapping_name:"",tag:"",province:"",city:"",create_by_tpl:!1,tpl_uid:"",tpl_name:"",tpl_alias:""}),le.value=!0};function al(l){l==="add"?ll():l==="reset"&&Bt()}const ol=()=>N(null,null,function*(){var l;if(!((l=v.name)!=null&&l.trim())){w.ElMessage.warning("请填写对象名称");return}je.value=!0;try{yield T.objectListApiPost("create_object",it(v,0),!0),le.value=!1,w.ElMessage.success("添加成功"),yield O()}catch(t){w.ElMessage.error("添加失败")}finally{je.value=!1}}),il=l=>{w.ElMessageBox.confirm(`确认对对象 [${l.name}] 进行资料备档吗?`,"提示",{type:"info"}).then(()=>{w.ElMessage.success("备档成功")}).catch(()=>{})};return e.onMounted(()=>{O()}),e.onUnmounted(()=>{Dt()}),(l,t)=>{var st,dt;const a=_.ElIcon,o=_.ElButton,r=_.ElDropdownItem,c=_.ElDropdownMenu,f=_.ElDropdown,s=_.ElOption,g=_.ElSelect,d=_.ElInput,L=_.ElDatePicker,m=_.ElFormItem,E=_.ElForm,D=_.ElDialog,K=_.ElDivider,q=_.ElAlert,b=_.ElDescriptionsItem,re=_.ElTag,nt=_.ElDescriptions,nl=_.ElCollapseItem,rl=_.ElCollapse,I=_.ElEmpty,F=_.ElTableColumn,rt=_.ElTable,sl=_.ElTabPane,dl=_.ElTabs,z=_.ElLoadingDirective;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["object-list-app mix-component",e.unref(be)]),style:e.normalizeStyle(e.unref(ge))},[e.unref(x).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",kl,[e.createElementVNode("div",{class:"app-title-text",style:e.normalizeStyle(Z.value)},e.toDisplayString(V.conf.caption||V.conf.name),5),e.createVNode(f,{trigger:"click",onCommand:al},{dropdown:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.unref(x).showAddBtn?(e.openBlock(),e.createBlock(r,{key:0,command:"add"},{default:e.withCtx(()=>[...t[38]||(t[38]=[e.createTextVNode("添加对象",-1)])]),_:1})):e.createCommentVNode("",!0),e.createVNode(r,{command:"reset"},{default:e.withCtx(()=>[...t[39]||(t[39]=[e.createTextVNode("重置",-1)])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(o,{type:"primary",circle:"",size:"small",class:"app-add-btn",onClick:t[0]||(t[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ve.Plus))]),_:1})]),_:1})]),_:1})])),e.withDirectives((e.openBlock(),e.createElementBlock("div",Nl,[e.createElementVNode("div",xl,[e.createVNode(g,{modelValue:H.value,"onUpdate:modelValue":t[1]||(t[1]=i=>H.value=i),class:"app-field-select",onChange:kt},{default:e.withCtx(()=>[e.createVNode(s,{label:"对象名称",value:"name"}),e.createVNode(s,{label:"对象编号",value:"uid"}),e.createVNode(s,{label:"对象别名",value:"alias"}),e.createVNode(s,{label:"客户编号",value:"customer_id"}),e.createVNode(s,{label:"客户别名",value:"customer_alias"}),e.createVNode(s,{label:"客户名称",value:"customer_name"}),e.createVNode(s,{label:"映射表编号",value:"mapping_id"}),e.createVNode(s,{label:"映射表名称",value:"mapping_name"}),e.createVNode(s,{label:"关联终端",value:"terminal_list"}),e.createVNode(s,{label:"标签",value:"tag"}),e.createVNode(s,{label:"省份",value:"province"}),e.createVNode(s,{label:"市/区",value:"city"}),e.createVNode(s,{label:"型号",value:"model"}),e.createVNode(s,{label:"序列号",value:"serial_no"}),e.createVNode(s,{label:"创建时间",value:"created"})]),_:1},8,["modelValue"]),e.createElementVNode("div",wl,[H.value!=="created"?(e.openBlock(),e.createBlock(d,{key:0,modelValue:ee.value,"onUpdate:modelValue":t[2]||(t[2]=i=>ee.value=i),placeholder:"输入关键词搜索",clearable:"",class:"app-search-input",onKeyup:e.withKeys(he,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ve.Search))]),_:1})]),append:e.withCtx(()=>[e.createVNode(o,{type:"primary",class:"app-toolbar-search-btn",onClick:he},{default:e.withCtx(()=>[...t[40]||(t[40]=[e.createTextVNode("搜索",-1)])]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",Cl,[e.createVNode(L,{modelValue:te.value,"onUpdate:modelValue":t[3]||(t[3]=i=>te.value=i),type:"datetimerange","range-separator":"至","start-placeholder":"创建开始","end-placeholder":"创建结束","value-format":"YYYY-MM-DD HH:mm:ss",class:"app-created-range"},null,8,["modelValue"]),e.createVNode(o,{type:"primary",class:"app-toolbar-search-btn app-created-search-btn",onClick:he},{default:e.withCtx(()=>[...t[41]||(t[41]=[e.createTextVNode("搜索",-1)])]),_:1})]))])]),e.createElementVNode("div",{class:"app-card-scroll",onScroll:wt},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ct.value,i=>(e.openBlock(),e.createElementBlock("div",{key:String(i.uid),class:"app-object-card",style:e.normalizeStyle(Lt.value),role:"button",tabindex:"0",onClick:y=>Ot(i,y),onKeydown:[e.withKeys(e.withModifiers(y=>Je(i),["prevent"]),["enter"]),e.withKeys(e.withModifiers(y=>Je(i),["prevent"]),["space"])]},[e.createElementVNode("div",Sl,[e.createElementVNode("div",El,e.toDisplayString(i.name||"—"),1),e.createElementVNode("div",Dl,[e.createVNode(f,{trigger:"click",onCommand:y=>Ut(y,i)},{dropdown:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.unref(x).showViewBtn?(e.openBlock(),e.createBlock(r,{key:0,command:"view"},{default:e.withCtx(()=>[...t[42]||(t[42]=[e.createTextVNode("查看",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(x).showEditBtn?(e.openBlock(),e.createBlock(r,{key:1,command:"edit"},{default:e.withCtx(()=>[...t[43]||(t[43]=[e.createTextVNode("编辑",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(x).showArchiveBtn?(e.openBlock(),e.createBlock(r,{key:2,command:"archive"},{default:e.withCtx(()=>[...t[44]||(t[44]=[e.createTextVNode("资料备档",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(x).showDeleteBtn?(e.openBlock(),e.createBlock(r,{key:3,command:"delete",divided:""},{default:e.withCtx(()=>[...t[45]||(t[45]=[e.createTextVNode("删除",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{class:"app-more-trigger",onClick:t[4]||(t[4]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ve.MoreFilled))]),_:1})])]),_:1},8,["onCommand"]),oe(i).length?(e.openBlock(),e.createElementBlock("div",Tl,[Rt(String(i.uid))?(e.openBlock(),e.createElementBlock("div",Ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe(i),(y,j)=>(e.openBlock(),e.createElementBlock("div",{key:"ex"+j,class:"app-transform-line",style:e.normalizeStyle(y.color?{color:y.color}:{})},e.toDisplayString(y.text),5))),128)),e.createVNode(o,{text:"",type:"primary",class:"app-mini-more",onClick:e.withModifiers(y=>We(String(i.uid)),["stop"])},{default:e.withCtx(()=>[...t[47]||(t[47]=[e.createTextVNode("收起",-1)])]),_:1},8,["onClick"])])):(e.openBlock(),e.createElementBlock("div",Al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe(i).slice(0,2),(y,j)=>(e.openBlock(),e.createElementBlock("span",{key:j,class:"app-rt-tag",style:e.normalizeStyle(y.color?{color:y.color,borderColor:y.color}:{})},e.toDisplayString(y.text),5))),128)),oe(i).length>2||Mt(i)?(e.openBlock(),e.createBlock(o,{key:0,text:"",type:"primary",class:"app-mini-more",onClick:e.withModifiers(y=>We(String(i.uid)),["stop"])},{default:e.withCtx(()=>[...t[46]||(t[46]=[e.createTextVNode("···",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Fl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(jt(i),(y,j)=>(e.openBlock(),e.createElementBlock("div",{key:y.prop+"-"+j,class:"app-field-line"},[e.createElementVNode("span",jl,e.toDisplayString(y.label),1),e.createElementVNode("span",{class:"app-field-value",style:e.normalizeStyle(y.style)},e.toDisplayString(y.text),5)]))),128))]),Ne(i)?(e.openBlock(),e.createElementBlock("div",Pl,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["app-field-expand",{open:Pt(String(i.uid))}]),onClick:e.withModifiers(y=>xe(String(i.uid)),["stop"])},[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ve.ArrowDown))]),_:1})],10,Ol)])):e.createCommentVNode("",!0)],44,Bl))),128)),e.unref(vt)?(e.openBlock(),e.createElementBlock("div",Ml,"加载中…")):B.value.length&&!e.unref(_e)?(e.openBlock(),e.createElementBlock("div",Rl," 已加载全部 "+e.toDisplayString(e.unref(Oe))+" 条 ",1)):B.value.length&&e.unref(_e)?(e.openBlock(),e.createElementBlock("div",Ul," 已加载 "+e.toDisplayString(B.value.length)+" 条,上拉加载更多 ",1)):e.createCommentVNode("",!0)],32)])),[[z,e.unref(ye)]]),e.createVNode(D,{modelValue:le.value,"onUpdate:modelValue":t[19]||(t[19]=i=>le.value=i),title:"添加对象",class:"mixiot-app-dialog","append-to-body":!1,"align-center":"","modal-class":"mixiot-app-dialog-mask","lock-scroll":!1,style:{"--mixiot-app-dialog-max":"380px"}},{footer:e.withCtx(()=>[e.createElementVNode("span",Kl,[e.createVNode(o,{onClick:t[18]||(t[18]=i=>le.value=!1)},{default:e.withCtx(()=>[...t[48]||(t[48]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(o,{type:"primary",loading:je.value,onClick:ol},{default:e.withCtx(()=>[...t[49]||(t[49]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])])]),default:e.withCtx(()=>[e.createVNode(E,{model:v,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(m,{label:"对象名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.name,"onUpdate:modelValue":t[5]||(t[5]=i=>v.name=i),placeholder:"请输入对象名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"对象别名"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.alias,"onUpdate:modelValue":t[6]||(t[6]=i=>v.alias=i),placeholder:"请输入对象别名"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"型号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.model,"onUpdate:modelValue":t[7]||(t[7]=i=>v.model=i),placeholder:"请输入型号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.description,"onUpdate:modelValue":t[8]||(t[8]=i=>v.description=i),placeholder:"请输入描述",type:"textarea"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.customer_id,"onUpdate:modelValue":t[9]||(t[9]=i=>v.customer_id=i),placeholder:"请输入客户编号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.customer_name,"onUpdate:modelValue":t[10]||(t[10]=i=>v.customer_name=i),placeholder:"请输入客户名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户别名"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.customer_alias,"onUpdate:modelValue":t[11]||(t[11]=i=>v.customer_alias=i),placeholder:"请输入客户别名"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"关联终端"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.terminal_list,"onUpdate:modelValue":t[12]||(t[12]=i=>v.terminal_list=i),placeholder:"请输入关联终端"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"映射表编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.mapping_id,"onUpdate:modelValue":t[13]||(t[13]=i=>v.mapping_id=i),placeholder:"请输入映射表编号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"映射表名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.mapping_name,"onUpdate:modelValue":t[14]||(t[14]=i=>v.mapping_name=i),placeholder:"请输入映射表名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"标签"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.tag,"onUpdate:modelValue":t[15]||(t[15]=i=>v.tag=i),placeholder:"请输入标签"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"省份"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.province,"onUpdate:modelValue":t[16]||(t[16]=i=>v.province=i),placeholder:"请输入省份"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"市/区"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.city,"onUpdate:modelValue":t[17]||(t[17]=i=>v.city=i),placeholder:"请输入市/区"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(D,{modelValue:ne.value,"onUpdate:modelValue":t[35]||(t[35]=i=>ne.value=i),title:"编辑对象",class:"mixiot-app-dialog","append-to-body":!1,"align-center":"","modal-class":"mixiot-app-dialog-mask","lock-scroll":!1,style:{"--mixiot-app-dialog-max":"380px"},"destroy-on-close":""},{footer:e.withCtx(()=>[e.createElementVNode("span",ql,[e.createVNode(o,{onClick:t[34]||(t[34]=i=>ne.value=!1)},{default:e.withCtx(()=>[...t[51]||(t[51]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(o,{type:"primary",loading:Fe.value,onClick:el},{default:e.withCtx(()=>[...t[52]||(t[52]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(E,{model:p,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(m,{label:"对象编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.uid,"onUpdate:modelValue":t[20]||(t[20]=i=>p.uid=i),placeholder:"请输入对象编号",disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"对象名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.name,"onUpdate:modelValue":t[21]||(t[21]=i=>p.name=i),placeholder:"请输入对象名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"对象别名"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.alias,"onUpdate:modelValue":t[22]||(t[22]=i=>p.alias=i),placeholder:"请输入对象别名"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"型号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.model,"onUpdate:modelValue":t[23]||(t[23]=i=>p.model=i),placeholder:"请输入型号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.description,"onUpdate:modelValue":t[24]||(t[24]=i=>p.description=i),placeholder:"请输入描述",type:"textarea"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.customer_id,"onUpdate:modelValue":t[25]||(t[25]=i=>p.customer_id=i),placeholder:"请输入客户编号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.customer_name,"onUpdate:modelValue":t[26]||(t[26]=i=>p.customer_name=i),placeholder:"请输入客户名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户别名"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.customer_alias,"onUpdate:modelValue":t[27]||(t[27]=i=>p.customer_alias=i),placeholder:"请输入客户别名"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"关联终端"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.terminal_list,"onUpdate:modelValue":t[28]||(t[28]=i=>p.terminal_list=i),placeholder:"请输入关联终端"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"映射表编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.mapping_id,"onUpdate:modelValue":t[29]||(t[29]=i=>p.mapping_id=i),placeholder:"请输入映射表编号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"映射表名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.mapping_name,"onUpdate:modelValue":t[30]||(t[30]=i=>p.mapping_name=i),placeholder:"请输入映射表名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"标签"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.tag,"onUpdate:modelValue":t[31]||(t[31]=i=>p.tag=i),placeholder:"请输入标签"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"省份"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.province,"onUpdate:modelValue":t[32]||(t[32]=i=>p.province=i),placeholder:"请输入省份"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"市/区"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.city,"onUpdate:modelValue":t[33]||(t[33]=i=>p.city=i),placeholder:"请输入市/区"},null,8,["modelValue"])]),_:1}),S.value.addRealtimeData&&Ue.value.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(K,{"content-position":"left"},{default:e.withCtx(()=>[...t[50]||(t[50]=[e.createTextVNode("实时数据",-1)])]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,i=>(e.openBlock(),e.createBlock(m,{key:i.fv,label:i.name},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p[i.fv],"onUpdate:modelValue":y=>p[i.fv]=y,placeholder:"请输入"+i.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"]))),128))],64)):e.createCommentVNode("",!0)]),_:1},8,["model"])),[[z,Le.value]])]),_:1},8,["modelValue"]),ae.value?(e.openBlock(),e.createBlock(Vl.default,{key:1,loading:de.value,title:((st=u.value)==null?void 0:st.name)||((dt=u.value)==null?void 0:dt.uid)||"对象详情",onBack:Yt},{default:e.withCtx(()=>[e.createElementVNode("div",Il,[J.value.length?(e.openBlock(),e.createBlock(dl,{key:1,modelValue:ie.value,"onUpdate:modelValue":t[37]||(t[37]=i=>ie.value=i),class:"detail-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.value,i=>(e.openBlock(),e.createBlock(sl,{key:i.tabKey,label:i.label,name:i.tabKey},{default:e.withCtx(()=>{var y,j;return[e.createElementVNode("div",{class:e.normalizeClass(["tab-content","tab-"+i.tabKey])},[i.tabKey==="baseinfo"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[M.value?(e.openBlock(),e.createElementBlock("div",zl,e.toDisplayString(M.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",$l,[u.value?(e.openBlock(),e.createBlock(nt,{key:0,column:1,border:""},{default:e.withCtx(()=>[Ge.value?(e.openBlock(),e.createBlock(b,{key:0,label:"对象图片",span:2},{default:e.withCtx(()=>[e.createElementVNode("img",{class:"view-detail-head-img",src:Ge.value,alt:""},null,8,Hl)]),_:1})):e.createCommentVNode("",!0),e.createVNode(b,{label:"对象编号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.uid)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"对象名称"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.name)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"对象别名"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.alias)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"型号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.model)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"序列号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.serial_no)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"映射表编号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.mapping_id)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"映射表名称"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.mapping_name)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"映射表别名"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.mapping_alias)!=null?n:""),1)]}),_:1}),Kt.value!=="box"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(b,{label:"项目编号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.customer_id)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"项目名称"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.customer_name)!=null?n:""),1)]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(b,{label:"控制密码"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.control)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"控制码编号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.control_id)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"控制码名称"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.control_name)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"控制码别名"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.control_alias)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"地址"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.address)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"设置经纬度"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.custom_gis)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"GPS经纬度"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.gis)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"省份"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.province)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"城市"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.city)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"创建时间"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.created)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"更新时间"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.last_modified)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"标签",span:2},{default:e.withCtx(()=>[Qe.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Qe.value,n=>(e.openBlock(),e.createBlock(re,{key:n,style:{"margin-right":"6px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n),1)]),_:2},1024))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(b,{label:"描述",span:2},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.description)!=null?n:""),1)]}),_:1})]),_:1})):e.createCommentVNode("",!0)]),we.value.length?(e.openBlock(),e.createElementBlock("div",Yl,"扩展脚本信息")):e.createCommentVNode("",!0),we.value.length?(e.openBlock(),e.createElementBlock("div",Jl,[e.createVNode(rl,{"expand-icon-position":"left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,(n,P)=>(e.openBlock(),e.createBlock(nl,{key:P,name:P,title:n.title},{default:e.withCtx(()=>[e.createVNode(nt,{border:"",column:1},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data,(ct,cl)=>(e.openBlock(),e.createBlock(b,{key:cl,label:String(ct[0])},{default:e.withCtx(()=>{var ut;return[e.createTextVNode(e.toDisplayString((ut=ct[1])!=null?ut:""),1)]}),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["name","title"]))),128))]),_:1})])):e.createCommentVNode("",!0)],64)):i.tabKey==="monitor"?e.withDirectives((e.openBlock(),e.createElementBlock("div",Wl,[R.value?(e.openBlock(),e.createBlock(C._sfc_main$1,{key:Ce.value,script:R.value,uid:Ze.value,"enable-web-socket":!0,"follow-host-theme":!0},null,8,["script","uid"])):ue.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无关联手机显示板"}))])),[[z,ue.value]]):i.tabKey==="retainer-record"?e.withDirectives((e.openBlock(),e.createElementBlock("div",Gl,[W.value.length?(e.openBlock(),e.createBlock(rt,{key:0,data:W.value,stripe:"",size:"small",class:"detail-table","max-height":"100%"},{default:e.withCtx(()=>[e.createVNode(F,{prop:"template_id",label:"项目编号",width:"120"}),e.createVNode(F,{prop:"label_cn",label:"历程项名称","min-width":"120"}),e.createVNode(F,{prop:"code",label:"编码",width:"100"}),e.createVNode(F,{prop:"category",label:"类型",width:"80"}),e.createVNode(F,{prop:"opened_at",label:"开始时间",width:"160"})]),_:1},8,["data"])):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无历程记录"}))])),[[z,Be.value]]):i.tabKey==="collect"?e.withDirectives((e.openBlock(),e.createElementBlock("div",Ql,[G.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(G.value,(n,P)=>(e.openBlock(),e.createElementBlock("div",{key:P,class:"tab-card-item"},[e.createElementVNode("div",Zl,e.toDisplayString(n.name||n.uid||"—"),1),e.createElementVNode("div",Xl,[n.uid?(e.openBlock(),e.createElementBlock("span",ea,"编号:"+e.toDisplayString(n.uid),1)):e.createCommentVNode("",!0),n.is_active!==void 0?(e.openBlock(),e.createElementBlock("span",ta,"状态:"+e.toDisplayString(n.is_active===1?"开启":"关闭"),1)):e.createCommentVNode("",!0)])]))),128)):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无离线采集项目"}))])),[[z,Se.value]]):i.tabKey==="child"?(e.openBlock(),e.createElementBlock("div",la,[pe.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(pe.value,(n,P)=>(e.openBlock(),e.createElementBlock("div",{key:P,class:"tab-card-item"},[e.createElementVNode("div",aa,e.toDisplayString(n.name||n.uid||"—"),1),e.createElementVNode("div",oa,[n.uid?(e.openBlock(),e.createElementBlock("span",ia,"编号:"+e.toDisplayString(n.uid),1)):e.createCommentVNode("",!0),n.model?(e.openBlock(),e.createElementBlock("span",na,"型号:"+e.toDisplayString(n.model),1)):e.createCommentVNode("",!0)])]))),128)):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无子对象"}))])):i.tabKey==="terminal"?e.withDirectives((e.openBlock(),e.createElementBlock("div",ra,[U.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(U.value,(n,P)=>(e.openBlock(),e.createElementBlock("div",{key:P,class:"tab-card-item"},[e.createElementVNode("div",sa,e.toDisplayString(n.name||n.uid||"—"),1),e.createElementVNode("div",da,[n.uid?(e.openBlock(),e.createElementBlock("span",ca,"编号:"+e.toDisplayString(n.uid),1)):e.createCommentVNode("",!0),n.type?(e.openBlock(),e.createElementBlock("span",ua,"类型:"+e.toDisplayString(n.type),1)):e.createCommentVNode("",!0),e.createVNode(re,{type:n.online===1?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.online===1?"在线":"离线"),1)]),_:2},1032,["type"])])]))),128)):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无关联终端"}))])),[[z,Ee.value]]):i.tabKey==="history"?e.withDirectives((e.openBlock(),e.createElementBlock("div",pa,[e.createElementVNode("div",ma,[e.createVNode(L,{modelValue:me.value,"onUpdate:modelValue":t[36]||(t[36]=n=>me.value=n),type:"datetimerange",size:"small","range-separator":"-","start-placeholder":"开始","end-placeholder":"结束",onChange:Te},null,8,["modelValue"]),e.createVNode(o,{size:"small",type:"primary",onClick:Te},{default:e.withCtx(()=>[...t[53]||(t[53]=[e.createTextVNode("查询",-1)])]),_:1})]),Q.value.length?(e.openBlock(),e.createBlock(rt,{key:0,data:Q.value,stripe:"",size:"small",class:"detail-table","max-height":"100%"},{default:e.withCtx(()=>[e.createVNode(F,{prop:"time",label:"时间",width:"160"}),e.createVNode(F,{prop:"fv_key",label:"变量",width:"120"}),e.createVNode(F,{prop:"value",label:"值","min-width":"100"})]),_:1},8,["data"])):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无历史数据"}))])),[[z,De.value]]):(e.openBlock(),e.createElementBlock("div",fa,[e.createVNode(I,{description:Ht(i.label)},null,8,["description"]),e.createElementVNode("div",va,"对象编号:"+e.toDisplayString((j=(y=u.value)==null?void 0:y.uid)!=null?j:"—"),1)]))],2)]}),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(q,{key:0,type:"warning","show-icon":"",closable:!1,title:"请先在右侧「数据」面板勾选「查看」,并在其下的详情页签中至少启用一项。"}))])]),_:1},8,["loading","title"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default",{},void 0,!0)],6)}}})),xa=C._export_sfc(Na,[["__scopeId","data-v-888d05cb"]]);exports.default=xa;
|
|
1
|
+
"use strict";var ul=Object.defineProperty,pl=Object.defineProperties;var ml=Object.getOwnPropertyDescriptors;var pt=Object.getOwnPropertySymbols;var fl=Object.prototype.hasOwnProperty,vl=Object.prototype.propertyIsEnumerable;var mt=(V,h,k)=>h in V?ul(V,h,{enumerable:!0,configurable:!0,writable:!0,value:k}):V[h]=k,$=(V,h)=>{for(var k in h||(h={}))fl.call(h,k)&&mt(V,k,h[k]);if(pt)for(var k of pt(h))vl.call(h,k)&&mt(V,k,h[k]);return V},fe=(V,h)=>pl(V,ml(h));var N=(V,h,k)=>new Promise((se,x)=>{var be=A=>{try{Z(k.next(A))}catch(X){x(X)}},ge=A=>{try{Z(k.throw(A))}catch(X){x(X)}},Z=A=>A.done?se(A.value):Promise.resolve(A.value).then(be,ge);Z((k=k.apply(V,h)).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/tabs/style/css");require("element-plus/es/components/tab-pane/style/css");require("element-plus/es/components/table/style/css");require("element-plus/es/components/table-column/style/css");require("element-plus/es/components/empty/style/css");require("element-plus/es/components/collapse/style/css");require("element-plus/es/components/collapse-item/style/css");require("element-plus/es/components/descriptions/style/css");require("element-plus/es/components/tag/style/css");require("element-plus/es/components/descriptions-item/style/css");require("element-plus/es/components/alert/style/css");require("element-plus/es/components/divider/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/date-picker/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"),C=require("./index-D7PZNHF4.cjs"),bl=require("./useMixiotPanelSurface-CAZgexY5.cjs"),gl=require("./BaseComponent-BHUHnLj-.cjs"),yl=require("./titleStyle-NSnz6cUg.cjs"),w=require("element-plus"),ve=require("@element-plus/icons-vue"),_l=require("./appendCommonDesignerWhereAnd-Q-EhDJXE.cjs"),T=require("./mixiotObjectListApi-DVYddjqi.cjs"),hl=require("./useMixiotAppScrollLoad-BfiNo4UY.cjs"),Vl=require("./MixiotAppDetailPage-Bd9WrADz.cjs"),ft=require("./ele-lst-icon-CrxnHZ-A.cjs"),kl={key:0,class:"app-title-row"},Nl={class:"mix-app-body"},xl={class:"app-toolbar-row"},wl={class:"app-toolbar-search-group"},Cl={key:1,class:"app-created-search-row"},Bl=["onClick","onKeydown"],Sl={class:"app-card-top"},El={class:"app-card-name"},Dl={class:"app-card-right"},Tl={key:0,class:"app-transform-block"},Al={key:0,class:"app-transform-tags"},Ll={key:1,class:"app-transform-expanded"},Fl={class:"app-card-fields"},jl={class:"app-field-label"},Pl={key:0,class:"app-card-expand-footer"},Ol=["onClick"],Ml={key:0,class:"app-scroll-foot"},Rl={key:1,class:"app-scroll-foot"},Ul={key:2,class:"app-scroll-foot"},Kl={class:"dialog-footer"},ql={class:"dialog-footer"},Il={class:"detail-body"},zl={key:0,class:"view-detail-error"},$l={class:"mix-detail-block"},Hl=["src"],Yl={key:1,class:"mix-detail-title-sm"},Jl={key:2,class:"mix-detail-block"},Wl={key:1,class:"detail-tab-body detail-tab-body--monitor"},Gl={key:2,class:"detail-tab-body"},Ql={key:3,class:"detail-tab-body"},Zl={class:"tab-card-title"},Xl={class:"tab-card-meta"},ea={key:0},ta={key:1},la={key:4,class:"detail-tab-body"},aa={class:"tab-card-title"},oa={class:"tab-card-meta"},ia={key:0},na={key:1},ra={key:5,class:"detail-tab-body"},sa={class:"tab-card-title"},da={class:"tab-card-meta"},ca={key:0},ua={key:1},pa={key:6,class:"detail-tab-body tab-history"},ma={class:"tab-toolbar"},fa={key:7,class:"view-detail-stub"},va={class:"stub-uid"},ba={DEFAULT_ICON:ft.DEFAULT_ICON,ACTIVE_ICON:ft.ACTIVE_ICON,NAME_CN:"对象列表",NAME_EN:"ObjectListAPP",ORDER:1,PLATFORM:["mobile"]},ga={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:180,visible:!0,useFv:!1},{key:"name",label:"对象名称",width:180,visible:!0,useFv:!1},{key:"alias",label:"对象别名",width:180,visible:!0,useFv:!1},{key:"model",label:"型号",width:160,visible:!0,useFv:!1},{key:"create_by_tpl",label:"创建方式",width:120,visible:!0,useFv:!1},{key:"customer_name",label:"客户名称",width:180,visible:!0,useFv:!1},{key:"terminal_list",label:"关联终端",width:180,visible:!0,useFv:!1},{key:"mapping_name",label:"映射表名称",width:180,visible:!0,useFv:!1},{key:"tag",label:"标签",width:120,visible:!0,useFv:!1},{key:"province",label:"省份",width:100,visible:!0,useFv:!1},{key:"city",label:"市/区",width:100,visible:!0,useFv:!1},{key:"description",label:"描述",width:150,visible:!0,useFv:!1},{key:"created",label:"创建时间",width:180,visible:!0,useFv:!1},{key:"last_modified",label:"更新时间",width:180,visible:!0,useFv:!1}]},Pe=[fe($({name:"对象",fv:"",object_id:"",unit:"",default:"",isText:!1,showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0},T.detailTabRowDefaults()),{addRealtimeData:!1,realtimeParams:[{name:"",fv:""}],alias:"对象别名",alias_visible:!0,model:"型号",model_visible:!0,create_by_tpl:"创建方式",create_by_tpl_visible:!0,customer_name:"客户名称",customer_name_visible:!0,terminal_list:"关联终端",terminal_list_visible:!0,mapping_name:"映射表名称",mapping_name_visible:!0,tag:"标签",tag_visible:!0,province:"省份",province_visible:!0,city:"市/区",city_visible:!0,description:"描述",description_visible:!0,created:"创建时间",created_visible:!0,last_modified:"更新时间",last_modified_visible:!0,textValueTransform:{mode:"numeric",numericRules:[{matchType:"value",matchValue:"",displayText:"",color:"#333333"}],rangeRules:[{op:"gt",boundary:"",displayText:"",color:"#333333"}]},appCardDefaultLines:2})],ya=[{key:"appCardDefaultLines",label:"APP卡片默认展示行数",type:"number"},{key:"showAddBtn",label:"添加对象按钮",type:"checkbox",group:"命令组"},{key:"showViewBtn",label:"查看",type:"checkbox",group:"操作组",collapseIndentedChildren:!0,collapseExpandLabel:"展开查看详情",collapseCollapseLabel:"收起查看详情"},...T.OBJECT_DETAIL_TAB_DEFS.map(V=>({key:V.dataKey,label:V.label,type:"checkbox",group:"操作组",dependent:"showViewBtn",indent:!0})),{key:"showEditBtn",label:"编辑",type:"checkbox",group:"操作组"},{key:"showArchiveBtn",label:"资料备档",type:"checkbox",group:"操作组"},{key:"showDeleteBtn",label:"删除",type:"checkbox",group:"操作组"},{key:"name",label:"参数名称"},{key:"addRealtimeData",label:"添加实时数据",type:"checkbox"},{key:"realtimeParams",label:"实时数据参数",type:"array",fields:["name","fv"],dependent:"addRealtimeData"},{key:"alias",label:"对象别名",checkable:!0,checkboxKey:"alias_visible"},{key:"model",label:"型号",checkable:!0,checkboxKey:"model_visible"},{key:"create_by_tpl",label:"创建方式",checkable:!0,checkboxKey:"create_by_tpl_visible"},{key:"customer_name",label:"客户名称",checkable:!0,checkboxKey:"customer_name_visible"},{key:"terminal_list",label:"关联终端",checkable:!0,checkboxKey:"terminal_list_visible"},{key:"mapping_name",label:"映射表名称",checkable:!0,checkboxKey:"mapping_name_visible"},{key:"tag",label:"标签",checkable:!0,checkboxKey:"tag_visible"},{key:"province",label:"省份",checkable:!0,checkboxKey:"province_visible"},{key:"city",label:"市/区",checkable:!0,checkboxKey:"city_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"}],_a=[],ha={isAddCondition:!1,conditions:[],conditionFilterFields:[{value:"name",label:"setting.gridFields.objectName"},{value:"uid",label:"setting.gridFields.objectId"},{value:"alias",label:"setting.gridFields.objectAlias"},{value:"customer_id",label:"setting.gridFields.customerId"},{value:"customer_alias",label:"setting.gridFields.customerAlias"},{value:"customer_name",label:"setting.gridFields.customerName"},{value:"mapping_id",label:"setting.gridFields.mappingId"},{value:"mapping_name",label:"setting.gridFields.mappingName"},{value:"terminal_list",label:"setting.gridFields.linkedTerminals"},{value:"tag",label:"setting.gridFields.tag"},{value:"province",label:"setting.gridFields.province"},{value:"city",label:"setting.gridFields.city"},{value:"model",label:"setting.gridFields.model"},{value:"serial_no",label:"setting.gridFields.serialNumber"},{value:"created",label:"setting.gridFields.created"}]},Va=[{prop:"uid",label:"对象编号",width:180,visible:!0},{prop:"name",label:"对象名称",width:180,visible:!0},{prop:"alias",label:"对象别名",width:180,visible:!0},{prop:"model",label:"型号",width:160,visible:!0},{prop:"create_by_tpl",label:"创建方式",width:120,visible:!0},{prop:"customer_name",label:"客户名称",width:180,visible:!0},{prop:"terminal_list",label:"关联终端",width:180,visible:!0},{prop:"mapping_name",label:"映射表名称",width:180,visible:!0},{prop:"tag",label:"标签",width:120,visible:!0},{prop:"province",label:"省份",width:100,visible:!0},{prop:"city",label:"市/区",width:100,visible:!0},{prop:"description",label:"描述",width:150,visible:!0},{prop:"created",label:"创建时间",width:180,visible:!0},{prop:"last_modified",label:"更新时间",width:180,visible:!0}],ka={DEFAULT:ba,OPTIONS:ga,DATA:Pe,PARAMS:ya,SOURCE:_a,COMMON:ha,COLUMNS_CONFIG:Va},Na=e.defineComponent(fe($({},ka),{__name:"objectListAPP",props:{conf:{default:()=>({data:[]})},uid:{default:""},mode:{default:"edit"},theme:{},objectList:{default:()=>[]},code:{default:""}},setup(V){const h=V;class k extends gl.BaseComponent{getDataBool(t,a){var r,c;const o=(c=(r=this.props.conf)==null?void 0:r.data)==null?void 0:c[0];return o&&Object.prototype.hasOwnProperty.call(o,t)&&o[t]!==void 0?!!o[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.length===1&&this.props.conf.data[0].alias_visible===void 0)this.props.conf.data=JSON.parse(JSON.stringify(Pe));else{const a=this.props.conf.data[0],o={showAddBtn:!0,showViewBtn:!0,showEditBtn:!0,showArchiveBtn:!0,showDeleteBtn:!0};for(const[c,f]of Object.entries(o))a[c]===void 0&&(a[c]=f);const r=T.detailTabRowDefaults();for(const[c,f]of Object.entries(r))a[c]===void 0&&(a[c]=f);a.textValueTransform===void 0&&(a.textValueTransform=JSON.parse(JSON.stringify(Pe[0].textValueTransform))),(a.appCardDefaultLines===void 0||a.appCardDefaultLines===null||a.appCardDefaultLines==="")&&(a.appCardDefaultLines=2)}}}const se=new k(h,"objectListAPP");se.setupLifecycle();const x=se.getStyle(),{mixiotPanelClass:be,mixiotPanelRootStyle:ge}=bl.useMixiotPanelSurface(x),Z=e.computed(()=>yl.generateTitleStyle(h.conf.options)),A=e.computed(()=>{var o,r,c,f;const l=((r=(o=h.conf)==null?void 0:o.options)==null?void 0:r.columns)||[],t=((f=(c=h.conf)==null?void 0:c.data)==null?void 0:f[0])||{},a=Array.isArray(l)?l.map(s=>{const g=t[s.key],d=t[`${s.key}_visible`];return{prop:s.key,label:g!==void 0&&g!==""?g:s.label,width:s.width,visible:d!==void 0?d:s.visible}}):[];return t.addRealtimeData&&Array.isArray(t.realtimeParams)&&t.realtimeParams.forEach(s=>{s.name&&s.fv&&a.push({prop:s.fv,label:s.name,width:150,visible:!0})}),a}),X=20,{listLoading:ye,listLoadingMore:vt,hasMore:_e,totalRecords:Oe,pageIndex:bt,resetListPagination:gt,pageRequestParams:yt,updateAfterPage:_t,onListScroll:ht,runLoadMore:Vt}=hl.useMixiotAppScrollLoad(X),ee=e.ref(""),H=e.ref("uid"),te=e.ref(null),B=e.ref([]);function kt(){H.value==="created"?ee.value="":te.value=null}function Nt(){const l=[];if(H.value==="created"){const a=te.value;if(a&&a.length===2&&a[0]&&a[1]){const[o,r]=a;l.push(["created",">=",o<=r?o:r]),l.push(["created","<=",o<=r?r:o])}}else{const a=ee.value.trim();a&&l.push([H.value,"like",`%${a}%`])}_l.appendCommonDesignerWhereAnd(h.conf.common,l);const t=$({},yt());return l.length&&(t.where_and=JSON.stringify(l)),t}function Me(l){return N(this,null,function*(){var c,f;const t=yield T.objectListApiPost("get_object_list",Nt(),!0),a=(c=t==null?void 0:t.result)!=null?c:t;let o=Array.isArray(a==null?void 0:a.data)?[...a.data]:Array.isArray(a)?[...a]:[];if((f=h.objectList)!=null&&f.length){const s=new Set(h.objectList.map(String));o=o.filter(g=>s.has(String(g.uid)))}l?B.value=[...B.value,...o]:B.value=o;let r=a==null?void 0:a.total_records;typeof r!="number"&&(r=Array.isArray(a)?a.length:o.length),_t(o.length,r,B.value.length),t&&t.code!==void 0&&t.code!==200&&console.warn("[objectList] 列表接口非成功",t.msg||t.info,t)})}function O(){return N(this,null,function*(){gt(),bt.value=1,ye.value=!0;try{yield Me(!1)}catch(l){if(console.error(l),B.value=[],Oe.value=0,_e.value=!1,mockManager.isServiceUnavailableError(l))console.warn("[objectList] 对象列表服务暂不可用(如 object 未在 Consul 注册)",l);else{const t=l,a=t&&typeof t=="object"&&"isAxiosError"in t,o=t&&typeof t=="object"&&"code"in t&&("msg"in t||"info"in t);!a&&!o&&console.error("[objectList] 加载对象列表失败",l)}}finally{ye.value=!1,Ve(),Et()}})}function xt(){return N(this,null,function*(){yield Vt(()=>N(null,null,function*(){try{yield Me(!0),Ve()}catch(l){throw console.error(l),l}}))})}function wt(l){ht(l,xt)}const Ct=e.computed(()=>B.value);function Re(l){return l===!0||l===1||l==="1"}const le=e.ref(!1),v=e.reactive({uid:"",name:"",alias:"",model:"",created:new Date().toLocaleString(),last_modified:new Date().toLocaleString(),description:"",customer_id:"",customer_name:"",customer_alias:"",terminal_list:"",mapping_id:"",mapping_name:"",tag:"",province:"",city:"",create_by_tpl:!1,tpl_uid:"",tpl_name:"",tpl_alias:""}),he=()=>{O()},Bt=()=>{ee.value="",te.value=null,O()};e.watch(()=>{var l;return(l=h.objectList)==null?void 0:l.join(",")},()=>{O()});const ae=e.ref(!1),de=e.ref(!1),M=e.ref(""),u=e.ref(null),S=e.computed(()=>{var l,t;return((t=(l=h.conf)==null?void 0:l.data)==null?void 0:t[0])||{}}),St=e.computed(()=>{const l=new Set,t=S.value;if(t.addRealtimeData&&Array.isArray(t.realtimeParams))for(const a of t.realtimeParams)a!=null&&a.fv&&l.add(String(a.fv));return l}),Ue=e.computed(()=>{const l=S.value;return!l.addRealtimeData||!Array.isArray(l.realtimeParams)?[]:l.realtimeParams.filter(t=>(t==null?void 0:t.name)&&(t==null?void 0:t.fv)).map(t=>({name:String(t.name),fv:String(t.fv)}))}),Ke=e.computed(()=>{var l;return(l=S.value)==null?void 0:l.textValueTransform});let Y;const Ve=()=>N(null,null,function*(){const l=S.value;if(!l.addRealtimeData||!Array.isArray(l.realtimeParams))return;const t=[];for(const o of l.realtimeParams)o!=null&&o.fv&&t.push(String(o.fv));if(!t.length)return;const a=B.value.map(o=>String(o.uid)).filter(Boolean);if(a.length)try{const o=yield C.api.post("get_last_fv_by_objids",{object_ids:a},!1),r=(o==null?void 0:o.result)||{};for(const c of B.value){const f=String(c.uid),s=r[f];if(s)for(const g of t){const d=s[g];d!==void 0&&(c[g]=d)}}}catch(o){}}),Et=()=>{S.value.addRealtimeData&&(Y&&clearInterval(Y),Y=setInterval(()=>{Ve()},5e3))},Dt=()=>{Y&&(clearInterval(Y),Y=void 0)};function Tt(l){if(l==null||l==="")return!0;const t=String(l).trim();return!t||t==="未获取"}function qe(l,t){if(!t)return null;if(t.mode==="numeric"){for(const a of t.numericRules||[])if(a.matchType==="unavailable"){if(Tt(l))return{text:a.displayText,color:a.color}}else if(String(l)===String(a.matchValue))return{text:a.displayText,color:a.color}}else{const a=typeof l=="number"?l:parseFloat(String(l).replace(/,/g,""));if(Number.isNaN(a))return null;for(const o of t.rangeRules||[]){const r=parseFloat(String(o.boundary));if(!Number.isNaN(r)){if(o.op==="gt"&&a>r)return{text:o.displayText,color:o.color};if(o.op==="lt"&&a<r)return{text:o.displayText,color:o.color}}}}return null}function Ie(l){return St.value.has(l)}function ze(l,t){const a=l[t.prop];if(Ie(t.prop)){const o=qe(a,Ke.value);if(o)return o.text}return a==null?"":String(a)}function $e(l,t){const a=l[t.prop];if(!Ie(t.prop))return{};const o=qe(a,Ke.value);return o!=null&&o.color?{color:o.color}:{}}const At=["uid","created","name","description"],He=e.computed(()=>{const l=S.value,t=Number(l.appCardDefaultLines);return Number.isFinite(t)&&t>=1?Math.min(Math.floor(t),30):2}),ce=e.reactive({}),ke=e.reactive({}),Lt=e.computed(()=>{var l;return{backgroundColor:x.value.bgColor,borderRadius:`${(l=x.value.radiusSize)!=null?l:8}px`}});function Ft(l){return A.value.find(t=>t.prop===l)}function Ye(l){const t=[],a=[];for(const o of At)a.includes(o)||a.push(o);for(const o of A.value)o.visible&&(a.includes(o.prop)||a.push(o.prop));for(const o of a){const r=Ft(o);if(!r||!r.visible)continue;const c={prop:r.prop};let f;o==="create_by_tpl"?f=Re(l.create_by_tpl)?"模板创建":"手动创建":f=ze(l,c);const s=$e(l,c);t.push({prop:o,label:r.label,text:f,style:s})}return t}function jt(l){const t=Ye(l),a=String(l.uid),o=He.value;return ce[a]||t.length<=o?t:t.slice(0,o)}function Ne(l){return Ye(l).length>He.value}function Pt(l){return!!ce[l]}function xe(l){ce[l]=!ce[l]}function Ot(l,t){const a=t.target;!a||!(a instanceof Element)||a.closest(".app-more-trigger,.el-dropdown,.el-popper,.app-field-expand,.app-mini-more,button,a,input,textarea,select,.el-select,.el-input")||(x.value.showViewBtn?Ae(l):Ne(l)&&xe(String(l.uid)))}function Je(l){x.value.showViewBtn?Ae(l):Ne(l)&&xe(String(l.uid))}function oe(l){const t=[],a=S.value;if(!a.addRealtimeData||!Array.isArray(a.realtimeParams))return t;for(const o of a.realtimeParams){if(!(o!=null&&o.fv))continue;const r=String(o.fv),c=o.name?String(o.name):r,f={prop:r},s=ze(l,f),d=$e(l,f).color;t.push({text:`${c}: ${s}`,color:d})}return t}function Mt(l){return oe(l).some(t=>String(t.text).length>24)}function Rt(l){return!!ke[l]}function We(l){ke[l]=!ke[l]}function Ut(l,t){l==="view"?Ae(t):l==="edit"?Xt(t):l==="archive"?il(t):l==="delete"&&tl(t)}const J=e.computed(()=>T.OBJECT_DETAIL_TAB_DEFS.filter(l=>S.value[l.dataKey]===!0).map(l=>fe($({},l),{tabKey:T.dataKeyToTabKey(l.dataKey)}))),ie=e.ref("baseinfo"),Kt=e.computed(()=>{try{return localStorage.getItem("sys_mode")||""}catch(l){return""}}),Ge=e.computed(()=>{var a;const l=(a=u.value)==null?void 0:a.image;if(!l||typeof l!="string")return"";if(l.startsWith("http")||l.startsWith(C.FILE_URL))return l;const t=l.startsWith("/")?l.slice(1):l;return`${C.FILE_URL}${t}`}),Qe=e.computed(()=>{var t;const l=(t=u.value)==null?void 0:t.tag;return Array.isArray(l)?l.map(String).filter(Boolean):typeof l=="string"&&l.trim()?l.split(/[,,]/).map(a=>a.trim()).filter(Boolean):[]}),we=e.computed(()=>{var t;const l=(t=u.value)==null?void 0:t.addition;return Array.isArray(l)?l.filter(a=>a&&typeof a=="object"&&Array.isArray(a.data)):[]}),ue=e.ref(!1),R=e.ref(null),Ze=e.ref(""),Ce=e.ref("");e.ref([]);const Be=e.ref(!1),W=e.ref([]),Se=e.ref(!1),G=e.ref([]),pe=e.ref([]),Ee=e.ref(!1),U=e.ref([]),De=e.ref(!1),Q=e.ref([]),me=e.ref([C.dayjs().subtract(1,"day").format("YYYY-MM-DD HH:mm:ss"),C.dayjs().format("YYYY-MM-DD HH:mm:ss")]),qt=l=>N(null,null,function*(){var t;Be.value=!0;try{const a=yield C.api.post("get_retainer_result_list",{object_id:l,page_size:50,page_index:1},!0),o=(t=a==null?void 0:a.result)!=null?t:a;W.value=Array.isArray(o==null?void 0:o.data)?o.data:[]}catch(a){W.value=[]}finally{Be.value=!1}}),It=l=>N(null,null,function*(){var t;Se.value=!0;try{const a=yield C.api.post("get_collect_list",{object_id:l,page_size:50,page_index:1},!0),o=(t=a==null?void 0:a.result)!=null?t:a;G.value=Array.isArray(o==null?void 0:o.data)?o.data:[]}catch(a){G.value=[]}finally{Se.value=!1}}),zt=(l,t)=>N(null,null,function*(){var a;if(!t.length){U.value=[];return}Ee.value=!0;try{const o=[["uid","in",t]],r=yield C.api.post("terminal_list",{page_size:100,page_index:1,where_and:JSON.stringify(o)},!0),c=(a=r==null?void 0:r.result)!=null?a:r;U.value=Array.isArray(c==null?void 0:c.data)?c.data:[]}catch(o){U.value=[]}finally{Ee.value=!1}}),Te=()=>N(null,null,function*(){var t,a,o,r;const l=(t=u.value)==null?void 0:t.uid;if(l){De.value=!0;try{const c=(o=(a=u.value)==null?void 0:a.fv_list)!=null?o:[],f=[["object_id","=",l],["time",">=",me.value[0]],["time","<=",me.value[1]]];c.length&&f.push(["fv_key","in",c.slice(0,10)]);const s=yield C.api.post("history_mosaic",{page_size:100,page_index:1,where_and:JSON.stringify(f)},!0),g=(r=s==null?void 0:s.result)!=null?r:s;Q.value=Array.isArray(g==null?void 0:g.data)?g.data:[]}catch(c){Q.value=[]}finally{De.value=!1}}}),$t=l=>N(null,null,function*(){var t,a;if(l){ue.value=!0,R.value=null,Ze.value=l;try{const r=(Array.isArray((t=u.value)==null?void 0:t.dashboard_list)?u.value.dashboard_list:[]).find(d=>{var E,D;const L=String((E=d==null?void 0:d.device_type)!=null?E:"").toLowerCase(),m=String((D=d==null?void 0:d.type)!=null?D:"").toLowerCase();return L==="mobile"||m==="mobile"}),c=String((a=r==null?void 0:r.uid)!=null?a:"").trim();if(!c){w.ElMessage.warning("该对象未绑定手机显示板");return}Ce.value=c;const f=yield C.api.post("get_dashboard_item",{uid:c},!1),s=(f==null?void 0:f.result)||{},g=s==null?void 0:s.script;g&&typeof g=="object"&&Object.keys(g).length?R.value=g:w.ElMessage.warning("显示板脚本为空")}catch(o){console.error(o),R.value=null}finally{ue.value=!1}}}),Ht=l=>`「${l}」的完整能力在 mixui 对象管理模块中提供;大屏组件内仅保留配置占位。`,Xe=()=>{const l=J.value;ie.value=l.length?l[0].tabKey:"baseinfo"},Ae=l=>N(null,null,function*(){var t,a;if(M.value="",u.value=null,Xe(),!J.value.length){ae.value=!0;return}ae.value=!0,de.value=!0;try{const o=yield T.objectListApiPost("get_object_item",{uid:l.uid},!0);o!=null&&o.result&&typeof o.result=="object"?(u.value=o.result,pe.value=(a=(t=o.result)==null?void 0:t.object_list)!=null?a:[]):u.value=$({},l),(o==null?void 0:o.code)!==void 0&&o.code!==200?M.value=o.msg||o.info||`请求失败 (${o.code})`:o!=null&&o.result||(M.value="未返回详情数据,已使用列表行暂代显示。")}catch(o){u.value=$({},l),M.value="加载详情失败,已使用列表行暂代显示。"}finally{de.value=!1}});function Yt(){ae.value=!1,Jt()}const Jt=()=>{u.value=null,M.value="",de.value=!1,R.value=null,Ce.value="",W.value=[],G.value=[],pe.value=[],U.value=[],Q.value=[]};e.watch(ie,l=>{var a,o,r;const t=(a=u.value)==null?void 0:a.uid;if(t)if(l==="monitor"&&!R.value)$t(t);else if(l==="retainer-record"&&!W.value.length)qt(t);else if(l==="collect"&&!G.value.length)It(t);else if(l==="terminal"&&!U.value.length){const c=(r=(o=u.value)==null?void 0:o.terminal_list)!=null?r:[];zt(t,c)}else l==="history"&&!Q.value.length&&Te()}),e.watch(J,()=>{if(!ae.value)return;new Set(J.value.map(t=>t.tabKey)).has(ie.value)||Xe()});const et=()=>({uid:"",name:"",alias:"",model:"",description:"",customer_id:"",customer_name:"",customer_alias:"",terminal_list:"",mapping_id:"",mapping_name:"",tag:"",province:"",city:"",create_by_tpl:!1,tpl_uid:"",tpl_name:"",tpl_alias:""}),ne=e.ref(!1),p=e.reactive(et()),tt=e.ref(0),Le=e.ref(!1),Fe=e.ref(!1),je=e.ref(!1);function Wt(l){return Array.isArray(l)?l.map(String).filter(Boolean).join(", "):typeof l=="string"?l:""}function lt(l){return l.split(/[,,]/).map(t=>t.trim()).filter(Boolean)}function Gt(l){return Array.isArray(l)?l.map(String).filter(Boolean).join(", "):typeof l=="string"?l:""}function Qt(l){const t=l.terminal_list;return Array.isArray(t)?t.map(String).map(a=>a.trim()).filter(Boolean):lt(String(t!=null?t:""))}function Zt(){const l=S.value;if(l.addRealtimeData&&Array.isArray(l.realtimeParams))for(const t of l.realtimeParams)t!=null&&t.fv&&Reflect.deleteProperty(p,String(t.fv));Object.assign(p,et())}function at(l){const t=S.value;if(!(!t.addRealtimeData||!Array.isArray(t.realtimeParams))){for(const a of t.realtimeParams)if(a!=null&&a.name&&(a!=null&&a.fv)){const o=String(a.fv),r=l[o];p[o]=r!=null?String(r):""}}}function ot(l){var t,a,o,r,c,f,s,g,d,L,m,E,D,K,q;Zt(),Object.assign(p,{uid:String((t=l.uid)!=null?t:""),name:String((a=l.name)!=null?a:""),alias:String((o=l.alias)!=null?o:""),model:String((r=l.model)!=null?r:""),description:String((c=l.description)!=null?c:""),customer_id:String((f=l.customer_id)!=null?f:""),customer_name:String((s=l.customer_name)!=null?s:""),customer_alias:String((g=l.customer_alias)!=null?g:""),terminal_list:Gt(l.terminal_list),mapping_id:String((d=l.mapping_id)!=null?d:""),mapping_name:String((L=l.mapping_name)!=null?L:""),tag:Wt(l.tag),province:String((m=l.province)!=null?m:""),city:String((E=l.city)!=null?E:""),create_by_tpl:Re(l.create_by_tpl),tpl_uid:String((D=l.tpl_uid)!=null?D:""),tpl_name:String((K=l.tpl_name)!=null?K:""),tpl_alias:String((q=l.tpl_alias)!=null?q:"")}),tt.value=Number(l.id)||0}function it(l,t){var a,o,r,c,f,s,g,d,L,m,E,D,K,q,b,re;return{id:t,uid:String((a=l.uid)!=null?a:"").trim(),name:String((o=l.name)!=null?o:"").trim(),alias:String((r=l.alias)!=null?r:""),model:String((c=l.model)!=null?c:""),description:String((f=l.description)!=null?f:""),customer_id:String((s=l.customer_id)!=null?s:""),customer_name:String((g=l.customer_name)!=null?g:""),customer_alias:String((d=l.customer_alias)!=null?d:""),terminal_list:Qt(l),mapping_id:String((L=l.mapping_id)!=null?L:""),mapping_name:String((m=l.mapping_name)!=null?m:""),tag:lt(String((E=l.tag)!=null?E:"")),province:String((D=l.province)!=null?D:""),city:String((K=l.city)!=null?K:""),create_by_tpl:l.create_by_tpl?1:0,tpl_uid:String((q=l.tpl_uid)!=null?q:""),tpl_name:String((b=l.tpl_name)!=null?b:""),tpl_alias:String((re=l.tpl_alias)!=null?re:""),addition:"[]"}}const Xt=l=>N(null,null,function*(){var t;ne.value=!0,Le.value=!0;try{const a=yield T.objectListApiPost("get_object_item",{uid:l.uid},!0),o=(t=a==null?void 0:a.result)!=null?t:l;ot(o),at(o)}catch(a){ot(l),at(l),w.ElMessage.warning("拉取对象详情失败,已使用列表行编辑")}finally{Le.value=!1}}),el=()=>N(null,null,function*(){if(!p.name.trim()){w.ElMessage.warning("请填写对象名称");return}Fe.value=!0;try{yield T.objectListApiPost("update_object",it(p,tt.value),!0),w.ElMessage.success("保存成功"),ne.value=!1,yield O()}catch(l){w.ElMessage.error("保存失败")}finally{Fe.value=!1}}),tl=l=>{w.ElMessageBox.confirm("确认删除该对象吗?","警告",{type:"warning"}).then(()=>N(null,null,function*(){try{yield T.objectListApiPost("delete_object",{uid:l.uid,id:l.id},!0),w.ElMessage.success("删除成功"),yield O()}catch(t){w.ElMessage.error("删除失败")}})).catch(()=>{})},ll=()=>{const l=typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?`obj_${crypto.randomUUID()}`:`obj_${Date.now()}_${Math.random().toString(16).slice(2)}`;Object.assign(v,{uid:l,name:"",alias:"",model:"",created:new Date().toLocaleString(),last_modified:new Date().toLocaleString(),description:"",customer_id:"",customer_name:"",customer_alias:"",terminal_list:"",mapping_id:"",mapping_name:"",tag:"",province:"",city:"",create_by_tpl:!1,tpl_uid:"",tpl_name:"",tpl_alias:""}),le.value=!0};function al(l){l==="add"?ll():l==="reset"&&Bt()}const ol=()=>N(null,null,function*(){var l;if(!((l=v.name)!=null&&l.trim())){w.ElMessage.warning("请填写对象名称");return}je.value=!0;try{yield T.objectListApiPost("create_object",it(v,0),!0),le.value=!1,w.ElMessage.success("添加成功"),yield O()}catch(t){w.ElMessage.error("添加失败")}finally{je.value=!1}}),il=l=>{w.ElMessageBox.confirm(`确认对对象 [${l.name}] 进行资料备档吗?`,"提示",{type:"info"}).then(()=>{w.ElMessage.success("备档成功")}).catch(()=>{})};return e.onMounted(()=>{O()}),e.onUnmounted(()=>{Dt()}),(l,t)=>{var st,dt;const a=_.ElIcon,o=_.ElButton,r=_.ElDropdownItem,c=_.ElDropdownMenu,f=_.ElDropdown,s=_.ElOption,g=_.ElSelect,d=_.ElInput,L=_.ElDatePicker,m=_.ElFormItem,E=_.ElForm,D=_.ElDialog,K=_.ElDivider,q=_.ElAlert,b=_.ElDescriptionsItem,re=_.ElTag,nt=_.ElDescriptions,nl=_.ElCollapseItem,rl=_.ElCollapse,I=_.ElEmpty,F=_.ElTableColumn,rt=_.ElTable,sl=_.ElTabPane,dl=_.ElTabs,z=_.ElLoadingDirective;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["object-list-app mix-component",e.unref(be)]),style:e.normalizeStyle(e.unref(ge))},[e.unref(x).isHideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",kl,[e.createElementVNode("div",{class:"app-title-text",style:e.normalizeStyle(Z.value)},e.toDisplayString(V.conf.caption||V.conf.name),5),e.createVNode(f,{trigger:"click",onCommand:al},{dropdown:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.unref(x).showAddBtn?(e.openBlock(),e.createBlock(r,{key:0,command:"add"},{default:e.withCtx(()=>[...t[38]||(t[38]=[e.createTextVNode("添加对象",-1)])]),_:1})):e.createCommentVNode("",!0),e.createVNode(r,{command:"reset"},{default:e.withCtx(()=>[...t[39]||(t[39]=[e.createTextVNode("重置",-1)])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(o,{type:"primary",circle:"",size:"small",class:"app-add-btn",onClick:t[0]||(t[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ve.Plus))]),_:1})]),_:1})]),_:1})])),e.withDirectives((e.openBlock(),e.createElementBlock("div",Nl,[e.createElementVNode("div",xl,[e.createVNode(g,{modelValue:H.value,"onUpdate:modelValue":t[1]||(t[1]=i=>H.value=i),class:"app-field-select",onChange:kt},{default:e.withCtx(()=>[e.createVNode(s,{label:"对象名称",value:"name"}),e.createVNode(s,{label:"对象编号",value:"uid"}),e.createVNode(s,{label:"对象别名",value:"alias"}),e.createVNode(s,{label:"客户编号",value:"customer_id"}),e.createVNode(s,{label:"客户别名",value:"customer_alias"}),e.createVNode(s,{label:"客户名称",value:"customer_name"}),e.createVNode(s,{label:"映射表编号",value:"mapping_id"}),e.createVNode(s,{label:"映射表名称",value:"mapping_name"}),e.createVNode(s,{label:"关联终端",value:"terminal_list"}),e.createVNode(s,{label:"标签",value:"tag"}),e.createVNode(s,{label:"省份",value:"province"}),e.createVNode(s,{label:"市/区",value:"city"}),e.createVNode(s,{label:"型号",value:"model"}),e.createVNode(s,{label:"序列号",value:"serial_no"}),e.createVNode(s,{label:"创建时间",value:"created"})]),_:1},8,["modelValue"]),e.createElementVNode("div",wl,[H.value!=="created"?(e.openBlock(),e.createBlock(d,{key:0,modelValue:ee.value,"onUpdate:modelValue":t[2]||(t[2]=i=>ee.value=i),placeholder:"输入关键词搜索",clearable:"",class:"app-search-input",onKeyup:e.withKeys(he,["enter"])},{prefix:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ve.Search))]),_:1})]),append:e.withCtx(()=>[e.createVNode(o,{type:"primary",class:"app-toolbar-search-btn",onClick:he},{default:e.withCtx(()=>[...t[40]||(t[40]=[e.createTextVNode("搜索",-1)])]),_:1})]),_:1},8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",Cl,[e.createVNode(L,{modelValue:te.value,"onUpdate:modelValue":t[3]||(t[3]=i=>te.value=i),type:"datetimerange","range-separator":"至","start-placeholder":"创建开始","end-placeholder":"创建结束","value-format":"YYYY-MM-DD HH:mm:ss",class:"app-created-range"},null,8,["modelValue"]),e.createVNode(o,{type:"primary",class:"app-toolbar-search-btn app-created-search-btn",onClick:he},{default:e.withCtx(()=>[...t[41]||(t[41]=[e.createTextVNode("搜索",-1)])]),_:1})]))])]),e.createElementVNode("div",{class:"app-card-scroll",onScroll:wt},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ct.value,i=>(e.openBlock(),e.createElementBlock("div",{key:String(i.uid),class:"app-object-card",style:e.normalizeStyle(Lt.value),role:"button",tabindex:"0",onClick:y=>Ot(i,y),onKeydown:[e.withKeys(e.withModifiers(y=>Je(i),["prevent"]),["enter"]),e.withKeys(e.withModifiers(y=>Je(i),["prevent"]),["space"])]},[e.createElementVNode("div",Sl,[e.createElementVNode("div",El,e.toDisplayString(i.name||"—"),1),e.createElementVNode("div",Dl,[e.createVNode(f,{trigger:"click",onCommand:y=>Ut(y,i)},{dropdown:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.unref(x).showViewBtn?(e.openBlock(),e.createBlock(r,{key:0,command:"view"},{default:e.withCtx(()=>[...t[42]||(t[42]=[e.createTextVNode("查看",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(x).showEditBtn?(e.openBlock(),e.createBlock(r,{key:1,command:"edit"},{default:e.withCtx(()=>[...t[43]||(t[43]=[e.createTextVNode("编辑",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(x).showArchiveBtn?(e.openBlock(),e.createBlock(r,{key:2,command:"archive"},{default:e.withCtx(()=>[...t[44]||(t[44]=[e.createTextVNode("资料备档",-1)])]),_:1})):e.createCommentVNode("",!0),e.unref(x).showDeleteBtn?(e.openBlock(),e.createBlock(r,{key:3,command:"delete",divided:""},{default:e.withCtx(()=>[...t[45]||(t[45]=[e.createTextVNode("删除",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{class:"app-more-trigger",onClick:t[4]||(t[4]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ve.MoreFilled))]),_:1})])]),_:1},8,["onCommand"]),oe(i).length?(e.openBlock(),e.createElementBlock("div",Tl,[Rt(String(i.uid))?(e.openBlock(),e.createElementBlock("div",Ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe(i),(y,j)=>(e.openBlock(),e.createElementBlock("div",{key:"ex"+j,class:"app-transform-line",style:e.normalizeStyle(y.color?{color:y.color}:{})},e.toDisplayString(y.text),5))),128)),e.createVNode(o,{text:"",type:"primary",class:"app-mini-more",onClick:e.withModifiers(y=>We(String(i.uid)),["stop"])},{default:e.withCtx(()=>[...t[47]||(t[47]=[e.createTextVNode("收起",-1)])]),_:1},8,["onClick"])])):(e.openBlock(),e.createElementBlock("div",Al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe(i).slice(0,2),(y,j)=>(e.openBlock(),e.createElementBlock("span",{key:j,class:"app-rt-tag",style:e.normalizeStyle(y.color?{color:y.color,borderColor:y.color}:{})},e.toDisplayString(y.text),5))),128)),oe(i).length>2||Mt(i)?(e.openBlock(),e.createBlock(o,{key:0,text:"",type:"primary",class:"app-mini-more",onClick:e.withModifiers(y=>We(String(i.uid)),["stop"])},{default:e.withCtx(()=>[...t[46]||(t[46]=[e.createTextVNode("···",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Fl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(jt(i),(y,j)=>(e.openBlock(),e.createElementBlock("div",{key:y.prop+"-"+j,class:"app-field-line"},[e.createElementVNode("span",jl,e.toDisplayString(y.label),1),e.createElementVNode("span",{class:"app-field-value",style:e.normalizeStyle(y.style)},e.toDisplayString(y.text),5)]))),128))]),Ne(i)?(e.openBlock(),e.createElementBlock("div",Pl,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["app-field-expand",{open:Pt(String(i.uid))}]),onClick:e.withModifiers(y=>xe(String(i.uid)),["stop"])},[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(ve.ArrowDown))]),_:1})],10,Ol)])):e.createCommentVNode("",!0)],44,Bl))),128)),e.unref(vt)?(e.openBlock(),e.createElementBlock("div",Ml,"加载中…")):B.value.length&&!e.unref(_e)?(e.openBlock(),e.createElementBlock("div",Rl," 已加载全部 "+e.toDisplayString(e.unref(Oe))+" 条 ",1)):B.value.length&&e.unref(_e)?(e.openBlock(),e.createElementBlock("div",Ul," 已加载 "+e.toDisplayString(B.value.length)+" 条,上拉加载更多 ",1)):e.createCommentVNode("",!0)],32)])),[[z,e.unref(ye)]]),e.createVNode(D,{modelValue:le.value,"onUpdate:modelValue":t[19]||(t[19]=i=>le.value=i),title:"添加对象",class:"mixiot-app-dialog","append-to-body":!1,"align-center":"","modal-class":"mixiot-app-dialog-mask","lock-scroll":!1,style:{"--mixiot-app-dialog-max":"380px"}},{footer:e.withCtx(()=>[e.createElementVNode("span",Kl,[e.createVNode(o,{onClick:t[18]||(t[18]=i=>le.value=!1)},{default:e.withCtx(()=>[...t[48]||(t[48]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(o,{type:"primary",loading:je.value,onClick:ol},{default:e.withCtx(()=>[...t[49]||(t[49]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])])]),default:e.withCtx(()=>[e.createVNode(E,{model:v,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(m,{label:"对象名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.name,"onUpdate:modelValue":t[5]||(t[5]=i=>v.name=i),placeholder:"请输入对象名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"对象别名"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.alias,"onUpdate:modelValue":t[6]||(t[6]=i=>v.alias=i),placeholder:"请输入对象别名"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"型号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.model,"onUpdate:modelValue":t[7]||(t[7]=i=>v.model=i),placeholder:"请输入型号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.description,"onUpdate:modelValue":t[8]||(t[8]=i=>v.description=i),placeholder:"请输入描述",type:"textarea"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.customer_id,"onUpdate:modelValue":t[9]||(t[9]=i=>v.customer_id=i),placeholder:"请输入客户编号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.customer_name,"onUpdate:modelValue":t[10]||(t[10]=i=>v.customer_name=i),placeholder:"请输入客户名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户别名"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.customer_alias,"onUpdate:modelValue":t[11]||(t[11]=i=>v.customer_alias=i),placeholder:"请输入客户别名"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"关联终端"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.terminal_list,"onUpdate:modelValue":t[12]||(t[12]=i=>v.terminal_list=i),placeholder:"请输入关联终端"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"映射表编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.mapping_id,"onUpdate:modelValue":t[13]||(t[13]=i=>v.mapping_id=i),placeholder:"请输入映射表编号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"映射表名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.mapping_name,"onUpdate:modelValue":t[14]||(t[14]=i=>v.mapping_name=i),placeholder:"请输入映射表名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"标签"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.tag,"onUpdate:modelValue":t[15]||(t[15]=i=>v.tag=i),placeholder:"请输入标签"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"省份"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.province,"onUpdate:modelValue":t[16]||(t[16]=i=>v.province=i),placeholder:"请输入省份"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"市/区"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:v.city,"onUpdate:modelValue":t[17]||(t[17]=i=>v.city=i),placeholder:"请输入市/区"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),e.createVNode(D,{modelValue:ne.value,"onUpdate:modelValue":t[35]||(t[35]=i=>ne.value=i),title:"编辑对象",class:"mixiot-app-dialog","append-to-body":!1,"align-center":"","modal-class":"mixiot-app-dialog-mask","lock-scroll":!1,style:{"--mixiot-app-dialog-max":"380px"},"destroy-on-close":""},{footer:e.withCtx(()=>[e.createElementVNode("span",ql,[e.createVNode(o,{onClick:t[34]||(t[34]=i=>ne.value=!1)},{default:e.withCtx(()=>[...t[51]||(t[51]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(o,{type:"primary",loading:Fe.value,onClick:el},{default:e.withCtx(()=>[...t[52]||(t[52]=[e.createTextVNode("保存",-1)])]),_:1},8,["loading"])])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(E,{model:p,"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(m,{label:"对象编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.uid,"onUpdate:modelValue":t[20]||(t[20]=i=>p.uid=i),placeholder:"请输入对象编号",disabled:""},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"对象名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.name,"onUpdate:modelValue":t[21]||(t[21]=i=>p.name=i),placeholder:"请输入对象名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"对象别名"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.alias,"onUpdate:modelValue":t[22]||(t[22]=i=>p.alias=i),placeholder:"请输入对象别名"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"型号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.model,"onUpdate:modelValue":t[23]||(t[23]=i=>p.model=i),placeholder:"请输入型号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"描述"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.description,"onUpdate:modelValue":t[24]||(t[24]=i=>p.description=i),placeholder:"请输入描述",type:"textarea"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.customer_id,"onUpdate:modelValue":t[25]||(t[25]=i=>p.customer_id=i),placeholder:"请输入客户编号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.customer_name,"onUpdate:modelValue":t[26]||(t[26]=i=>p.customer_name=i),placeholder:"请输入客户名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"客户别名"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.customer_alias,"onUpdate:modelValue":t[27]||(t[27]=i=>p.customer_alias=i),placeholder:"请输入客户别名"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"关联终端"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.terminal_list,"onUpdate:modelValue":t[28]||(t[28]=i=>p.terminal_list=i),placeholder:"请输入关联终端"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"映射表编号"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.mapping_id,"onUpdate:modelValue":t[29]||(t[29]=i=>p.mapping_id=i),placeholder:"请输入映射表编号"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"映射表名称"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.mapping_name,"onUpdate:modelValue":t[30]||(t[30]=i=>p.mapping_name=i),placeholder:"请输入映射表名称"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"标签"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.tag,"onUpdate:modelValue":t[31]||(t[31]=i=>p.tag=i),placeholder:"请输入标签"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"省份"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.province,"onUpdate:modelValue":t[32]||(t[32]=i=>p.province=i),placeholder:"请输入省份"},null,8,["modelValue"])]),_:1}),e.createVNode(m,{label:"市/区"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p.city,"onUpdate:modelValue":t[33]||(t[33]=i=>p.city=i),placeholder:"请输入市/区"},null,8,["modelValue"])]),_:1}),S.value.addRealtimeData&&Ue.value.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(K,{"content-position":"left"},{default:e.withCtx(()=>[...t[50]||(t[50]=[e.createTextVNode("实时数据",-1)])]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ue.value,i=>(e.openBlock(),e.createBlock(m,{key:i.fv,label:i.name},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:p[i.fv],"onUpdate:modelValue":y=>p[i.fv]=y,placeholder:"请输入"+i.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"]))),128))],64)):e.createCommentVNode("",!0)]),_:1},8,["model"])),[[z,Le.value]])]),_:1},8,["modelValue"]),ae.value?(e.openBlock(),e.createBlock(Vl.default,{key:1,loading:de.value,title:((st=u.value)==null?void 0:st.name)||((dt=u.value)==null?void 0:dt.uid)||"对象详情",onBack:Yt},{default:e.withCtx(()=>[e.createElementVNode("div",Il,[J.value.length?(e.openBlock(),e.createBlock(dl,{key:1,modelValue:ie.value,"onUpdate:modelValue":t[37]||(t[37]=i=>ie.value=i),class:"detail-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.value,i=>(e.openBlock(),e.createBlock(sl,{key:i.tabKey,label:i.label,name:i.tabKey},{default:e.withCtx(()=>{var y,j;return[e.createElementVNode("div",{class:e.normalizeClass(["tab-content","tab-"+i.tabKey])},[i.tabKey==="baseinfo"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[M.value?(e.openBlock(),e.createElementBlock("div",zl,e.toDisplayString(M.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",$l,[u.value?(e.openBlock(),e.createBlock(nt,{key:0,column:1,border:""},{default:e.withCtx(()=>[Ge.value?(e.openBlock(),e.createBlock(b,{key:0,label:"对象图片",span:2},{default:e.withCtx(()=>[e.createElementVNode("img",{class:"view-detail-head-img",src:Ge.value,alt:""},null,8,Hl)]),_:1})):e.createCommentVNode("",!0),e.createVNode(b,{label:"对象编号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.uid)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"对象名称"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.name)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"对象别名"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.alias)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"型号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.model)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"序列号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.serial_no)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"映射表编号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.mapping_id)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"映射表名称"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.mapping_name)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"映射表别名"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.mapping_alias)!=null?n:""),1)]}),_:1}),Kt.value!=="box"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(b,{label:"项目编号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.customer_id)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"项目名称"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.customer_name)!=null?n:""),1)]}),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(b,{label:"控制密码"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.control)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"控制码编号"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.control_id)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"控制码名称"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.control_name)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"控制码别名"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.control_alias)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"地址"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.address)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"设置经纬度"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.custom_gis)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"GPS经纬度"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.gis)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"省份"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.province)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"城市"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.city)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"创建时间"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.created)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"更新时间"},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.last_modified)!=null?n:""),1)]}),_:1}),e.createVNode(b,{label:"标签",span:2},{default:e.withCtx(()=>[Qe.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Qe.value,n=>(e.openBlock(),e.createBlock(re,{key:n,style:{"margin-right":"6px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n),1)]),_:2},1024))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(b,{label:"描述",span:2},{default:e.withCtx(()=>{var n;return[e.createTextVNode(e.toDisplayString((n=u.value.description)!=null?n:""),1)]}),_:1})]),_:1})):e.createCommentVNode("",!0)]),we.value.length?(e.openBlock(),e.createElementBlock("div",Yl,"扩展脚本信息")):e.createCommentVNode("",!0),we.value.length?(e.openBlock(),e.createElementBlock("div",Jl,[e.createVNode(rl,{"expand-icon-position":"left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,(n,P)=>(e.openBlock(),e.createBlock(nl,{key:P,name:P,title:n.title},{default:e.withCtx(()=>[e.createVNode(nt,{border:"",column:1},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.data,(ct,cl)=>(e.openBlock(),e.createBlock(b,{key:cl,label:String(ct[0])},{default:e.withCtx(()=>{var ut;return[e.createTextVNode(e.toDisplayString((ut=ct[1])!=null?ut:""),1)]}),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["name","title"]))),128))]),_:1})])):e.createCommentVNode("",!0)],64)):i.tabKey==="monitor"?e.withDirectives((e.openBlock(),e.createElementBlock("div",Wl,[R.value?(e.openBlock(),e.createBlock(C._sfc_main$1,{key:Ce.value,script:R.value,uid:Ze.value,"enable-web-socket":!0,"follow-host-theme":!0},null,8,["script","uid"])):ue.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无关联手机显示板"}))])),[[z,ue.value]]):i.tabKey==="retainer-record"?e.withDirectives((e.openBlock(),e.createElementBlock("div",Gl,[W.value.length?(e.openBlock(),e.createBlock(rt,{key:0,data:W.value,stripe:"",size:"small",class:"detail-table","max-height":"100%"},{default:e.withCtx(()=>[e.createVNode(F,{prop:"template_id",label:"项目编号",width:"120"}),e.createVNode(F,{prop:"label_cn",label:"历程项名称","min-width":"120"}),e.createVNode(F,{prop:"code",label:"编码",width:"100"}),e.createVNode(F,{prop:"category",label:"类型",width:"80"}),e.createVNode(F,{prop:"opened_at",label:"开始时间",width:"160"})]),_:1},8,["data"])):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无历程记录"}))])),[[z,Be.value]]):i.tabKey==="collect"?e.withDirectives((e.openBlock(),e.createElementBlock("div",Ql,[G.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(G.value,(n,P)=>(e.openBlock(),e.createElementBlock("div",{key:P,class:"tab-card-item"},[e.createElementVNode("div",Zl,e.toDisplayString(n.name||n.uid||"—"),1),e.createElementVNode("div",Xl,[n.uid?(e.openBlock(),e.createElementBlock("span",ea,"编号:"+e.toDisplayString(n.uid),1)):e.createCommentVNode("",!0),n.is_active!==void 0?(e.openBlock(),e.createElementBlock("span",ta,"状态:"+e.toDisplayString(n.is_active===1?"开启":"关闭"),1)):e.createCommentVNode("",!0)])]))),128)):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无离线采集项目"}))])),[[z,Se.value]]):i.tabKey==="child"?(e.openBlock(),e.createElementBlock("div",la,[pe.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(pe.value,(n,P)=>(e.openBlock(),e.createElementBlock("div",{key:P,class:"tab-card-item"},[e.createElementVNode("div",aa,e.toDisplayString(n.name||n.uid||"—"),1),e.createElementVNode("div",oa,[n.uid?(e.openBlock(),e.createElementBlock("span",ia,"编号:"+e.toDisplayString(n.uid),1)):e.createCommentVNode("",!0),n.model?(e.openBlock(),e.createElementBlock("span",na,"型号:"+e.toDisplayString(n.model),1)):e.createCommentVNode("",!0)])]))),128)):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无子对象"}))])):i.tabKey==="terminal"?e.withDirectives((e.openBlock(),e.createElementBlock("div",ra,[U.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(U.value,(n,P)=>(e.openBlock(),e.createElementBlock("div",{key:P,class:"tab-card-item"},[e.createElementVNode("div",sa,e.toDisplayString(n.name||n.uid||"—"),1),e.createElementVNode("div",da,[n.uid?(e.openBlock(),e.createElementBlock("span",ca,"编号:"+e.toDisplayString(n.uid),1)):e.createCommentVNode("",!0),n.type?(e.openBlock(),e.createElementBlock("span",ua,"类型:"+e.toDisplayString(n.type),1)):e.createCommentVNode("",!0),e.createVNode(re,{type:n.online===1?"success":"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.online===1?"在线":"离线"),1)]),_:2},1032,["type"])])]))),128)):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无关联终端"}))])),[[z,Ee.value]]):i.tabKey==="history"?e.withDirectives((e.openBlock(),e.createElementBlock("div",pa,[e.createElementVNode("div",ma,[e.createVNode(L,{modelValue:me.value,"onUpdate:modelValue":t[36]||(t[36]=n=>me.value=n),type:"datetimerange",size:"small","range-separator":"-","start-placeholder":"开始","end-placeholder":"结束",onChange:Te},null,8,["modelValue"]),e.createVNode(o,{size:"small",type:"primary",onClick:Te},{default:e.withCtx(()=>[...t[53]||(t[53]=[e.createTextVNode("查询",-1)])]),_:1})]),Q.value.length?(e.openBlock(),e.createBlock(rt,{key:0,data:Q.value,stripe:"",size:"small",class:"detail-table","max-height":"100%"},{default:e.withCtx(()=>[e.createVNode(F,{prop:"time",label:"时间",width:"160"}),e.createVNode(F,{prop:"fv_key",label:"变量",width:"120"}),e.createVNode(F,{prop:"value",label:"值","min-width":"100"})]),_:1},8,["data"])):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无历史数据"}))])),[[z,De.value]]):(e.openBlock(),e.createElementBlock("div",fa,[e.createVNode(I,{description:Ht(i.label)},null,8,["description"]),e.createElementVNode("div",va,"对象编号:"+e.toDisplayString((j=(y=u.value)==null?void 0:y.uid)!=null?j:"—"),1)]))],2)]}),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(q,{key:0,type:"warning","show-icon":"",closable:!1,title:"请先在右侧「数据」面板勾选「查看」,并在其下的详情页签中至少启用一项。"}))])]),_:1},8,["loading","title"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default",{},void 0,!0)],6)}}})),xa=C._export_sfc(Na,[["__scopeId","data-v-888d05cb"]]);exports.default=xa;
|
|
@@ -54,16 +54,16 @@ import "element-plus/es/components/dropdown-item/style/css";
|
|
|
54
54
|
import "element-plus/es/components/button/style/css";
|
|
55
55
|
import "element-plus/es/components/icon/style/css";
|
|
56
56
|
import { defineComponent as da, computed as O, ref as k, reactive as Ee, watch as Qe, onMounted as ua, onUnmounted as ca, openBlock as r, createElementBlock as p, normalizeStyle as ue, unref as L, normalizeClass as Ze, createElementVNode as A, toDisplayString as f, createVNode as i, withCtx as n, withModifiers as le, createBlock as x, createTextVNode as v, createCommentVNode as C, withDirectives as ae, withKeys as Xe, Fragment as B, renderList as P, renderSlot as pa } from "vue";
|
|
57
|
-
import { F as Ft, d as Bt, c as ma, a as ce, _ as fa } from "./index-
|
|
57
|
+
import { F as Ft, d as Bt, c as ma, a as ce, _ as fa } from "./index-BHBE19E2.js";
|
|
58
58
|
import { u as va } from "./useMixiotPanelSurface-DRl3cZvc.js";
|
|
59
|
-
import { B as ba } from "./BaseComponent-
|
|
59
|
+
import { B as ba } from "./BaseComponent-qzL33ZSL.js";
|
|
60
60
|
import { g as _a } from "./titleStyle-BT5GlpAb.js";
|
|
61
61
|
import { ElMessage as R, ElMessageBox as jt } from "element-plus";
|
|
62
62
|
import { Plus as ya, Search as ga, MoreFilled as ha, ArrowDown as ka } from "@element-plus/icons-vue";
|
|
63
63
|
import { a as Va } from "./appendCommonDesignerWhereAnd-DwefWNOa.js";
|
|
64
|
-
import { O as Ot, d as Sa, a as Pt, o as pe } from "./mixiotObjectListApi-
|
|
64
|
+
import { O as Ot, d as Sa, a as Pt, o as pe } from "./mixiotObjectListApi-CJsYvcG_.js";
|
|
65
65
|
import { u as wa } from "./useMixiotAppScrollLoad-P-UZvRtN.js";
|
|
66
|
-
import xa from "./MixiotAppDetailPage-
|
|
66
|
+
import xa from "./MixiotAppDetailPage-CFISQwpc.js";
|
|
67
67
|
import { A as Aa, D as Ca } from "./ele-lst-icon-CKpeRKmk.js";
|
|
68
68
|
const Da = {
|
|
69
69
|
key: 0,
|
|
@@ -11,9 +11,9 @@ var P = (p, a, d) => a in p ? W(p, a, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return p;
|
|
12
12
|
}, _ = (p, a) => V(p, R(a));
|
|
13
13
|
import { defineComponent as H, onMounted as q, onUnmounted as G, computed as K, openBlock as J, createElementBlock as Q, normalizeStyle as T, unref as F, createElementVNode as O, toDisplayString as Y, renderSlot as Z } from "vue";
|
|
14
|
-
import { D as tt, l as et, u as it, n as ot, C as B, o as st, s as I, q as at, _ as nt } from "./index-
|
|
14
|
+
import { D as tt, l as et, u as it, n as ot, C as B, o as st, s as I, q as at, _ as nt } from "./index-BHBE19E2.js";
|
|
15
15
|
import "element-plus";
|
|
16
|
-
import { E as rt } from "./EChartComponentBase-
|
|
16
|
+
import { E as rt } from "./EChartComponentBase-BtAW2Yko.js";
|
|
17
17
|
import { g as lt } from "./titleStyle-BT5GlpAb.js";
|
|
18
18
|
import { u as ct, i as dt, a as ht } from "./installCanvasRenderer-oDYkyVFy.js";
|
|
19
19
|
import { i as pt } from "./install-DdM8j5Ll.js";
|
|
@@ -30,6 +30,7 @@ const gt = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%20
|
|
|
30
30
|
}, Ct = {
|
|
31
31
|
titleColor: "#111",
|
|
32
32
|
// color
|
|
33
|
+
titleSize: 14,
|
|
33
34
|
textColor: "#111",
|
|
34
35
|
// color
|
|
35
36
|
bgColor: "#fff",
|
|
@@ -342,7 +343,7 @@ ${o}`;
|
|
|
342
343
|
}), G(() => {
|
|
343
344
|
D.unregisterInstance(a.uid);
|
|
344
345
|
});
|
|
345
|
-
const E = g.getStyle(),
|
|
346
|
+
const E = g.getStyle(), z = g.getEchartId(), L = a.conf, j = K(() => lt(a.conf.options));
|
|
346
347
|
return (b, t) => (J(), Q("div", {
|
|
347
348
|
class: "mix-component",
|
|
348
349
|
style: T({
|
|
@@ -352,18 +353,18 @@ ${o}`;
|
|
|
352
353
|
}, [
|
|
353
354
|
O("div", {
|
|
354
355
|
class: "mix-title",
|
|
355
|
-
style: T(
|
|
356
|
+
style: T(j.value)
|
|
356
357
|
}, Y(F(L).caption || F(L).name), 5),
|
|
357
358
|
O("div", yt, [
|
|
358
359
|
O("div", {
|
|
359
360
|
class: "w-full h-full",
|
|
360
|
-
id: F(
|
|
361
|
+
id: F(z)
|
|
361
362
|
}, null, 8, St)
|
|
362
363
|
]),
|
|
363
364
|
Z(b.$slots, "default", {}, void 0, !0)
|
|
364
365
|
], 4));
|
|
365
366
|
}
|
|
366
|
-
})),
|
|
367
|
+
})), zt = /* @__PURE__ */ nt(Ot, [["__scopeId", "data-v-37ff4fc2"]]);
|
|
367
368
|
export {
|
|
368
|
-
|
|
369
|
+
zt as default
|
|
369
370
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var $=Object.defineProperty,j=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var U=(p,n,u)=>n in p?$(p,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):p[n]=u,A=(p,n)=>{for(var u in n||(n={}))R.call(n,u)&&U(p,u,n[u]);if(P)for(var u of P(n))W.call(n,u)&&U(p,u,n[u]);return p},_=(p,n)=>j(p,V(n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),g=require("./index-D7PZNHF4.cjs");require("element-plus");const q=require("./EChartComponentBase-C4s5HSfS.cjs"),X=require("./titleStyle-NSnz6cUg.cjs"),E=require("./installCanvasRenderer-CyhM1Qpl.cjs"),M=require("./install-DV5cEgNV.cjs"),H=require("./install-CltTFs4e.cjs"),G=require("./install-C8buXQPI.cjs"),K=require("./install-Ch5d8i37.cjs"),J="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='7'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'/%3e%3crect%20x='11'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='15'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='currentColor'/%3e%3c/svg%3e",Q="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='7'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'/%3e%3crect%20x='11'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='15'%20y='3'%20width='4'%20height='18'%20rx='1'%20fill='%23FFFFFF'/%3e%3c/svg%3e",Y={class:"mix-body"},Z=["id"],tt={DEFAULT_ICON:J,ACTIVE_ICON:Q,NAME_CN:"百分比堆积柱状图",NAME_EN:"Percent Stacked Bar Chart",ORDER:3,PLATFORM:["pc","screen","mobile"]},et={titleColor:"#111",titleSize:14,textColor:"#111",bgColor:"#fff",top:30,bottom:40,left:40,right:20,radiusSize:8,textSize:12,barWidth:30,points:10,isHideTitle:!1,showLabel:!1,titleAlign:"left",titleWeight:"bold",titleBgColor:"transparent",titleBorderType:"none",titleBorderColor:"#cccccc",titleBorderWidth:1,titlePaddingH:8,titlePaddingV:4},it=[{name:"参数一",fv:"",object_id:"",color:"#4162ff",periodUnit:"near-hour",periodValue:1},{name:"参数二",fv:"",object_id:"",color:"#3bbc6a",periodUnit:"near-hour",periodValue:1}],ot=["name","fv","object_id","color",{key:"periodUnit",label:"setting.timeUnit",type:"select",options:g.DATE_OPTION},{key:"periodValue",label:"setting.timePeriod",type:"number"}],st=["mosaic","statistics","calculate"],nt={source:"mosaic",useAlias:!1,multiObject:!1,null:{type:"0",value:""}},at={DEFAULT:tt,OPTIONS:et,DATA:it,PARAMS:ot,SOURCE:st,COMMON:nt},rt=l.defineComponent(_(A({},at),{__name:"percentBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(p){E.use([M.install,H.install,E.install,G.install,E.install$1,K.install]);const n=p,u=g.useLinkStore();class B extends q.EChartComponentBase{extractStyles(){return _(A({},super.extractStyles()),{barWidth:this.getOptionValue("barWidth",30),showLabel:this.getOptionValue("showLabel",!1)})}getXAxisData(){var t;return(t=this.getFixedStatisticsXLabels())!=null?t:this.getTimeAxis()}getFixedStatisticsXLabels(){var i;const{data:t,common:e}=this.props.conf,a=(e==null?void 0:e.source)||"mosaic",o=(i=t[0])==null?void 0:i.periodUnit;return["statistics","calculate"].includes(a)&&o&&!String(o).startsWith("near")?g.getStatisticsTimeUnitLabel(o):null}calcPercentData(t){if(!t.length||!t[0].length)return t;const e=t[0].length,a=t.map(()=>[]);for(let o=0;o<e;o++){let i=0;for(let s=0;s<t.length;s++)i+=t[s][o]||0;for(let s=0;s<t.length;s++)a[s][o]=i>0?parseFloat(((t[s][o]||0)/i*100).toFixed(1)):0}return a}getChartOption(){const t=this.Style.value;return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:e=>{if(!(e!=null&&e.length))return"";let a=`<div>${e[0].axisValue}</div>`,o=0;return e.forEach(i=>{o+=i.value||0}),e.forEach(i=>{const s=o>0?((i.value||0)/o*100).toFixed(1):"0.0";a+=`<div style="display:flex;align-items:center;gap:4px;">
|
|
2
2
|
<span style="display:inline-block;width:10px;height:10px;border-radius:2px;background:${i.color};"></span>
|
|
3
3
|
${i.seriesName}: ${s}%
|
|
4
4
|
</div>`}),a},textStyle:{align:"left",fontSize:t.textSize}},grid:{top:t.top,bottom:t.bottom,left:t.left,right:t.right,containLabel:!1},legend:{show:!0,data:this.props.conf.data.map(e=>e.name),right:20,top:0,textStyle:{color:t.textColor,fontSize:t.textSize}},xAxis:[{type:"category",data:this.getXAxisData(),axisTick:{alignWithLabel:!0},axisLine:{lineStyle:{color:t.textColor}},axisLabel:{formatter:e=>{if(!/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(e))return e;const[a,o]=e.split(" ");return`${a}
|
|
5
|
-
${o}`},color:t.textColor,fontSize:t.textSize}}],yAxis:[{type:"value",max:100,nameGap:10,nameTextStyle:{align:"right"},splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:t.textColor,fontSize:t.textSize,formatter:"{value}%"},axisLine:{lineStyle:{color:t.textColor}},splitNumber:4}],series:this.formatSeries()}}formatSeries(){const t=this.props.conf,e=this.Style.value,a=this.getFixedStatisticsXLabels(),o=a?a.length:e.points,i=t.data.map((f,h)=>(f.color||g.COLORS[h],g.getRandomArr({num:o,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()}))),s=this.calcPercentData(i);return t.data.map((f,h)=>{const r=f.color||g.COLORS[h];return{type:"bar",stack:"total",data:s[h],name:f.name,itemStyle:{color:r},label:{show:e.showLabel,position:"inside",color:"#fff",formatter:d=>d.value+"%"},barWidth:e.barWidth+"%"}})}setSocketData(t){var y;if(!this.hasData()||!this.chartObj||!t)return;const{data:e,common:a}=this.props.conf,o=a.source||"mosaic",i=this.chartObj.getOption(),s=(y=e[0])==null?void 0:y.periodUnit,f=["statistics","calculate"].includes(o)&&s&&!String(s).startsWith("near");if(e.forEach((c,x)=>{const m=this.extractDataValue(t,c.fv);if(["statistics","calculate"].includes(o)&&c.periodUnit&&!String(c.periodUnit).startsWith("near")&&!String(c.periodUnit).startsWith("last")){const w=g.statisticsSocketTimeToXAxisLabel(t.start_time,c.periodUnit),F=w?i.xAxis[0].data.indexOf(w):-1;F>=0&&(i.series[x].data[F]=m);return}const b=["statistics","calculate"].includes(o)?t.start_time:t.datetime;b!=null&&(x===0&&i.xAxis[0].data.push(b),i.series[x].data.push(m))}),f){const c=i.series.map(m=>[...m.data]),x=this.calcPercentData(c);i.series.forEach((m,b)=>{m.data=x[b]}),this.updateChart(i);return}const h=g.addRealtimeData(i.xAxis[0].data,i.series.map(c=>c.data)),r=Number(this.Style.value.points)||10;i.xAxis[0].data=h.times.slice(-r);const d=h.data.map(c=>c.slice(-r)),C=this.calcPercentData(d);i.series.forEach((c,x)=>{c.data=C[x]}),this.updateChart(i)}setHistoryData(t){if(!t||!(t!=null&&t.length))return;const e=this.chartObj.getOption(),a=Number(this.Style.value.points)||10,{data:o}=this.props.conf,i=r=>{if(r==null||r===""||r==="-")return null;const d=Number(r);return Number.isFinite(d)?d:null},s=this.getFixedStatisticsXLabels();if(s!=null&&s.length){e.xAxis[0].data=[...s];const r=[];t.forEach((C,y)=>{var F;if(!e.series[y])return;const c=o[y],x=(c==null?void 0:c.periodUnit)||((F=o[0])==null?void 0:F.periodUnit),m=new Array(s.length).fill(null),b=C.time||[],w=C.data||[];for(let O=0;O<b.length;O++){const T=g.statisticsSocketTimeToXAxisLabel(b[O],String(x||"")),N=T?s.indexOf(T):-1;N>=0&&(m[N]=i(w[O]))}r.push(m)});const d=this.calcPercentData(r);e.series.forEach((C,y)=>{C.data=d[y]||new Array(s.length).fill(0)}),this.updateChart(e);return}e.xAxis[0].data=t[0].time.slice(-a);const f=t.map(r=>(r.data||[]).map(i).slice(-a)),h=this.calcPercentData(f);e.series.forEach((r,d)=>{r.data=h[d]}),this.updateChart(e)}}const S=new B(n,"percentBar");S.setupLifecycle();const L=g.useCounterStore();l.onMounted(()=>{var v;if(L.registerInstance(n.uid,S),n.mode==="preview"){const t=((v=S.getChartInstance)==null?void 0:v.call(S))||S.chartObj;t==null||t.off("click"),t==null||t.on("click",e=>{var o,i,s,f,h,r;const a=e==null?void 0:e.seriesName;if(typeof a=="string"&&a){const d=((i=(o=n.conf)==null?void 0:o.options)==null?void 0:i.linkChannel)==="custom"?(f=(s=n.conf)==null?void 0:s.options)==null?void 0:f.customChannel:(r=(h=n.conf)==null?void 0:h.options)==null?void 0:r.linkChannel;u.publish(d||"percentBar","percentBar",{objectId:"",deviceId:"",type:"select",fieldKey:a,fv:A({key:a},e),source:"percentBar"})}})}}),l.onUnmounted(()=>{L.unregisterInstance(n.uid)});const D=S.getStyle(),
|
|
5
|
+
${o}`},color:t.textColor,fontSize:t.textSize}}],yAxis:[{type:"value",max:100,nameGap:10,nameTextStyle:{align:"right"},splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:t.textColor,fontSize:t.textSize,formatter:"{value}%"},axisLine:{lineStyle:{color:t.textColor}},splitNumber:4}],series:this.formatSeries()}}formatSeries(){const t=this.props.conf,e=this.Style.value,a=this.getFixedStatisticsXLabels(),o=a?a.length:e.points,i=t.data.map((f,h)=>(f.color||g.COLORS[h],g.getRandomArr({num:o,max:200,min:0,mode:this.props.mode,hasDataSource:this.hasData()}))),s=this.calcPercentData(i);return t.data.map((f,h)=>{const r=f.color||g.COLORS[h];return{type:"bar",stack:"total",data:s[h],name:f.name,itemStyle:{color:r},label:{show:e.showLabel,position:"inside",color:"#fff",formatter:d=>d.value+"%"},barWidth:e.barWidth+"%"}})}setSocketData(t){var y;if(!this.hasData()||!this.chartObj||!t)return;const{data:e,common:a}=this.props.conf,o=a.source||"mosaic",i=this.chartObj.getOption(),s=(y=e[0])==null?void 0:y.periodUnit,f=["statistics","calculate"].includes(o)&&s&&!String(s).startsWith("near");if(e.forEach((c,x)=>{const m=this.extractDataValue(t,c.fv);if(["statistics","calculate"].includes(o)&&c.periodUnit&&!String(c.periodUnit).startsWith("near")&&!String(c.periodUnit).startsWith("last")){const w=g.statisticsSocketTimeToXAxisLabel(t.start_time,c.periodUnit),F=w?i.xAxis[0].data.indexOf(w):-1;F>=0&&(i.series[x].data[F]=m);return}const b=["statistics","calculate"].includes(o)?t.start_time:t.datetime;b!=null&&(x===0&&i.xAxis[0].data.push(b),i.series[x].data.push(m))}),f){const c=i.series.map(m=>[...m.data]),x=this.calcPercentData(c);i.series.forEach((m,b)=>{m.data=x[b]}),this.updateChart(i);return}const h=g.addRealtimeData(i.xAxis[0].data,i.series.map(c=>c.data)),r=Number(this.Style.value.points)||10;i.xAxis[0].data=h.times.slice(-r);const d=h.data.map(c=>c.slice(-r)),C=this.calcPercentData(d);i.series.forEach((c,x)=>{c.data=C[x]}),this.updateChart(i)}setHistoryData(t){if(!t||!(t!=null&&t.length))return;const e=this.chartObj.getOption(),a=Number(this.Style.value.points)||10,{data:o}=this.props.conf,i=r=>{if(r==null||r===""||r==="-")return null;const d=Number(r);return Number.isFinite(d)?d:null},s=this.getFixedStatisticsXLabels();if(s!=null&&s.length){e.xAxis[0].data=[...s];const r=[];t.forEach((C,y)=>{var F;if(!e.series[y])return;const c=o[y],x=(c==null?void 0:c.periodUnit)||((F=o[0])==null?void 0:F.periodUnit),m=new Array(s.length).fill(null),b=C.time||[],w=C.data||[];for(let O=0;O<b.length;O++){const T=g.statisticsSocketTimeToXAxisLabel(b[O],String(x||"")),N=T?s.indexOf(T):-1;N>=0&&(m[N]=i(w[O]))}r.push(m)});const d=this.calcPercentData(r);e.series.forEach((C,y)=>{C.data=d[y]||new Array(s.length).fill(0)}),this.updateChart(e);return}e.xAxis[0].data=t[0].time.slice(-a);const f=t.map(r=>(r.data||[]).map(i).slice(-a)),h=this.calcPercentData(f);e.series.forEach((r,d)=>{r.data=h[d]}),this.updateChart(e)}}const S=new B(n,"percentBar");S.setupLifecycle();const L=g.useCounterStore();l.onMounted(()=>{var v;if(L.registerInstance(n.uid,S),n.mode==="preview"){const t=((v=S.getChartInstance)==null?void 0:v.call(S))||S.chartObj;t==null||t.off("click"),t==null||t.on("click",e=>{var o,i,s,f,h,r;const a=e==null?void 0:e.seriesName;if(typeof a=="string"&&a){const d=((i=(o=n.conf)==null?void 0:o.options)==null?void 0:i.linkChannel)==="custom"?(f=(s=n.conf)==null?void 0:s.options)==null?void 0:f.customChannel:(r=(h=n.conf)==null?void 0:h.options)==null?void 0:r.linkChannel;u.publish(d||"percentBar","percentBar",{objectId:"",deviceId:"",type:"select",fieldKey:a,fv:A({key:a},e),source:"percentBar"})}})}}),l.onUnmounted(()=>{L.unregisterInstance(n.uid)});const D=S.getStyle(),z=S.getEchartId(),k=n.conf,I=l.computed(()=>X.generateTitleStyle(n.conf.options));return(v,t)=>(l.openBlock(),l.createElementBlock("div",{class:"mix-component",style:l.normalizeStyle({background:l.unref(D).bgColor,borderRadius:`${l.unref(D).radiusSize}px`})},[l.createElementVNode("div",{class:"mix-title",style:l.normalizeStyle(I.value)},l.toDisplayString(l.unref(k).caption||l.unref(k).name),5),l.createElementVNode("div",Y,[l.createElementVNode("div",{class:"w-full h-full",id:l.unref(z)},null,8,Z)]),l.renderSlot(v.$slots,"default",{},void 0,!0)],4))}})),lt=g._export_sfc(rt,[["__scopeId","data-v-37ff4fc2"]]);exports.default=lt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Y=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var T=(e,t,o)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,b=(e,t)=>{for(var o in t||(t={}))oe.call(t,o)&&T(e,o,t[o]);if(F)for(var o of F(t))ae.call(t,o)&&T(e,o,t[o]);return e},L=(e,t)=>ee(e,te(t));var s=(e,t,o)=>new Promise((l,a)=>{var d=f=>{try{r(o.next(f))}catch(v){a(v)}},h=f=>{try{r(o.throw(f))}catch(v){a(v)}},r=f=>f.done?l(f.value):Promise.resolve(f.value).then(d,h);r((o=o.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");const i=require("vue"),re=require("./vue-i18n-BvHMBi_b.cjs"),ne=require("./BaseComponent-D34QRHy5.cjs"),y=require("./index-CfXXizWL.cjs"),A=require("./materialFileUrl-DfPNm265.cjs"),I=require("element-plus"),q=require("./ele-bmp-icon-BBI0-SX7.cjs");process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const le=Symbol(process.env.NODE_ENV!=="production"?"route location":"");process.env.NODE_ENV;function se(e){return i.inject(le)}const U=e=>{const t=typeof e=="string"?Number(e):e;return t===0||t===200},ce=(e,t)=>{if(e&&String(e).trim()){const o=String(e).trim();if(o.startsWith("http://")||o.startsWith("https://"))try{return new URL(o).pathname||""}catch(l){return o}return o.startsWith("/")?o:`/${o}`}return t?`/yunfiles/material/file/${t}`:""},de={uploadFile(e){return s(this,null,function*(){var l;const t=new FormData;t.append("file",e);const o=yield y.api.upload(t,!0);if(U(o.code)&&((l=o.result)!=null&&l.url))return o.result.url;throw new Error(o.msg||"文件上传失败")})},uploadMaterialGetPath(e,t){return s(this,null,function*(){var d,h;const l={material_data:e.includes(",")?e.split(",")[1]:e,material_type:t||"png"},a=yield y.api.post("upload_material",l,!0);if(U(a.code)&&a.result){const r=a.result,f=ce(r.material_path||r.relative_path||"",r.file_id);if(f)return L(b({},r),{material_path:f,material_size:(h=(d=r.material_size)!=null?d:r.file_size)!=null?h:0,material_type:r.material_type||r.mime_type||t||"png",name:r.name||r.file_name||""})}throw new Error(a.info||a.msg||"上传原图获取路径失败")})},createMaterial(e){return s(this,null,function*(){var o;const t=yield y.api.post("create_dashboard_material",e,!0);if(U(t.code)&&((o=t.result)!=null&&o.uid))return t.result;throw new Error(t.info||t.msg||"创建素材失败")})},uploadAndCreateMaterial(o){return s(this,arguments,function*(e,t={}){var h;const l=((h=e.name.split(".").pop())==null?void 0:h.toLowerCase())||"png",a=yield this._fileToBase64(e),d=yield this.uploadMaterialGetPath(a,l);if(d.uid)return{uid:d.uid};throw new Error("upload_material 未返回 uid")})},_fileToBase64(e){return new Promise((t,o)=>{const l=new FileReader;l.onload=()=>t(l.result),l.onerror=()=>o(new Error("文件读取失败")),l.readAsDataURL(e)})},getMaterialList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_dashboard_material_list",t)})},getMyMaterialList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_my_dashboard_material_list",t)})},getMaterialItem(e){return s(this,null,function*(){return yield y.api.post("get_dashboard_material_item",{uid:e})})},updateMaterial(e){return s(this,null,function*(){return yield y.api.post("update_dashboard_material",e,!0)})},deleteMaterial(e){return s(this,null,function*(){return yield y.api.post("delete_dashboard_material",{uid:e},!0)})},deleteMaterialByPath(e){return s(this,null,function*(){var o;if(!e||!String(e).trim())return;const t=String(e).replace(/^\//,"");try{const l=yield this.getMyMaterialList({page_index:1,page_size:10,where_and:JSON.stringify([["material_path","=",t]])}),a=(o=l==null?void 0:l.result)==null?void 0:o.data;Array.isArray(a)&&a.length>0&&a[0].uid&&(yield this.deleteMaterial(a[0].uid))}catch(l){}})}},W={_buildWhereAnd(e){return JSON.stringify(e.filter(([,,t])=>t!=null))},_isEmptyId(e){return e==null||String(e).trim()===""},_isComponentLevel(e){return!this._isEmptyId(e.component_id)},_isLayerLevel(e){return this._isEmptyId(e.component_id)&&!this._isEmptyId(e.layer_id)},_isSheetLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&!this._isEmptyId(e.sheet_id)},_isDashboardLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&this._isEmptyId(e.sheet_id)},_listRelations(e){return s(this,null,function*(){var o;const t=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:e});return((o=t==null?void 0:t.result)==null?void 0:o.data)||[]})},_deleteByUid(e,t){return s(this,null,function*(){t&&(yield this.deleteMaterialRelation({dashboard_record_uid:e,uid:t}))})},_deleteByRelation(e){return s(this,null,function*(){e!=null&&e.dashboard_record_uid&&(yield this.deleteMaterialRelation({dashboard_record_uid:e.dashboard_record_uid,dashboard_id:e.dashboard_id,sheet_id:e.sheet_id,layer_id:e.layer_id,component_id:e.component_id,uid:e.uid}))})},_deleteRelationList(e,t){return s(this,null,function*(){for(const o of t)yield this._deleteByUid(e,o.uid)})},createMaterialRelation(e){return s(this,null,function*(){return yield y.api.post("create_dashboard_materials_relation",e,!0)})},deleteMaterialRelation(e){return s(this,null,function*(){return yield y.api.post("delete_dashboard_materials_relation",e,!0)})},getMaterialRelationList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return!e.order_by&&!e.order_type&&e.order?t.order=e.order:delete t.order,yield y.api.post("get_my_dashboard_materials_relation_list",t)})},getMaterialRelationsByDashboard(o){return s(this,arguments,function*(e,t={}){const l=JSON.stringify([["dashboard_record_uid","=",e]]);return yield this.getMaterialRelationList(L(b({},t),{where_and:l}))})},getMaterialRelationByComponent(l,a){return s(this,arguments,function*(e,t,o={}){const d=JSON.stringify([["dashboard_record_uid","=",e],["component_id","=",t]]);return yield this.getMaterialRelationList(L(b({},o),{where_and:d}))})},getRelationsByMaterial(e){return s(this,null,function*(){var l;if(!e)return[];const t=JSON.stringify([["material_uid","=",e]]),o=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:t});return((l=o==null?void 0:o.result)==null?void 0:l.data)||[]})},getMaterialUsageSummary(e){return s(this,null,function*(){const t=yield this.getRelationsByMaterial(e),o=new Set;return t.forEach(l=>{const a=String(l.dashboard_record_uid||"").trim();a&&o.add(a)}),{relationCount:t.length,dashboardCount:o.size,relations:t}})},deleteAllRelationsByMaterial(e){return s(this,null,function*(){const t=yield this.getRelationsByMaterial(e);for(const o of t)!(o!=null&&o.uid)||!(o!=null&&o.dashboard_record_uid)||(yield this.deleteMaterialRelation({dashboard_record_uid:o.dashboard_record_uid,uid:o.uid}));return t.length})},deleteAllRelationsByDashboard(e){return s(this,null,function*(){return yield this.deleteRelationsByDashboardHierarchy(e)})},deleteRelationByComponent(e,t){return s(this,null,function*(){return yield this.deleteMaterialRelation({dashboard_record_uid:e,component_id:t})})},deleteComponentRelations(e,t,o,l){return s(this,null,function*(){if(!e||!t||!o||!l)return;const a=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o],["component_id","=",l]]),d=yield this._listRelations(a);for(const h of d)yield this._deleteByRelation(h)})},deleteLayerLevelRelations(e,t,o){return s(this,null,function*(){if(!e||!t||!o)return;const l=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o]]),d=(yield this._listRelations(l)).filter(h=>this._isLayerLevel(h));for(const h of d)yield this._deleteByRelation(h)})},deleteSheetLevelRelations(e,t){return s(this,null,function*(){if(!e||!t)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),a=(yield this._listRelations(o)).filter(d=>this._isSheetLevel(d));for(const d of a)yield this._deleteByRelation(d)})},deleteDashboardLevelRelations(e){return s(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),l=(yield this._listRelations(t)).filter(a=>this._isDashboardLevel(a));for(const a of l)yield this._deleteByRelation(a)})},deleteRelationsByLayerHierarchy(e,t,o){return s(this,null,function*(){if(!e||!t||!o)return;const l=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o]]),a=yield this._listRelations(l),d=a.filter(r=>this._isComponentLevel(r)),h=a.filter(r=>this._isLayerLevel(r));for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})},deleteRelationsBySheetHierarchy(e,t){return s(this,null,function*(){if(!e||!t)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),l=yield this._listRelations(o),a=l.filter(r=>this._isComponentLevel(r)),d=l.filter(r=>this._isLayerLevel(r)),h=l.filter(r=>this._isSheetLevel(r));for(const r of a)yield this._deleteByRelation(r);for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})},deleteRelationsByDashboardHierarchy(e){return s(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),o=yield this._listRelations(t),l=o.filter(r=>this._isComponentLevel(r)),a=o.filter(r=>this._isLayerLevel(r)),d=o.filter(r=>this._isSheetLevel(r)),h=o.filter(r=>this._isDashboardLevel(r));for(const r of l)yield this._deleteByRelation(r);for(const r of a)yield this._deleteByRelation(r);for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})}},ue=i.ref(!1),he=i.ref("all");function _e(e="all"){return he.value=e,ue.value=!0,new Promise(t=>{})}const pe={class:"mix-body"},me={class:"upload-content"},ye={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},fe={class:"upload-text"},ge={key:0,class:"upload-actions"},ve={key:1,class:"viewer-container"},we={key:0,class:"file-info"},be={class:"file-name"},Re=["title"],Me=["src","alt"],Ne={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"图片查看器",NAME_EN:"Photo Viewer",ORDER:2,PLATFORM:["pc","screen","mobile"]},Le={imageDisplayMode:{value:"center",type:"select",options:[{label:"component.photo.center",value:"center"},{label:"component.photo.tile",value:"tile"},{label:"component.photo.stretch",value:"stretch"}],label:"component.options.imageDisplayMode"},fileUrl:{value:"",type:"string",label:"component.options.fileUrl",placeholder:"请上传素材"},fileName:{value:"",type:"string",label:"component.options.fileName",placeholder:"请上传素材"},materialUid:{value:"",type:"string",label:"component.options.materialUid",placeholder:"素材UID"}},Ee=[],Se=[],Be=[],Ce=null,Ae={DEFAULT:Ne,OPTIONS:Le,DATA:Ee,PARAMS:Se,SOURCE:Be,COMMON:Ce},Ue=i.defineComponent(L(b({},Ae),{__name:"photo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(e){const{t}=re.useI18n(),o=y.useCounterStore(),l=se(),a=e;class d extends ne.BaseComponent{extractStyles(){return{imageDisplayMode:this.getOptionValue("imageDisplayMode","center"),radiusSize:this.getOptionValue("radiusSize",0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),j()}}const h=new d(a,"photo");h.setupLifecycle();const r=h.getStyle(),f=i.ref(null),v=i.ref(""),p=i.ref(""),R=i.ref(""),k=i.ref(!1),D=i.ref(!1),$=n=>A.buildMaterialFileUrlByMaterialPath(n),j=()=>s(null,null,function*(){var c,u,_;const{conf:n}=a;(u=(c=n==null?void 0:n.options)==null?void 0:c.fileUrl)!=null&&u.value&&(v.value=$(n.options.fileUrl.value),yield V(),R.value=((_=n.options.fileName)==null?void 0:_.value)||"")}),P=n=>{n&&n.startsWith("blob:")&&URL.revokeObjectURL(n)},V=()=>s(null,null,function*(){if(v.value)try{const n=y.resolveHttpAuthTokenForFetch();if(!n){p.value="";return}const c=A.encodeMaterialFileRequestUrl(v.value),u=yield fetch(c,{mode:"cors",credentials:"include",headers:{Authorization:`Bearer ${n}`}});if(!u.ok)throw new Error(`load image failed: ${u.status}`);const _=yield u.blob(),g=URL.createObjectURL(_);P(p.value),p.value=g}catch(n){console.error("[Photo] 拉取图片失败:",n),P(p.value),p.value=""}}),H=i.computed(()=>({width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})),J=i.computed(()=>{var c;const n=(c=r==null?void 0:r.value)==null?void 0:c.imageDisplayMode;return n==="tile"?{display:"none"}:n==="stretch"?{width:"100%",height:"100%",objectFit:"fill"}:{width:"100%",height:"100%",objectFit:"contain"}}),G=i.computed(()=>{var n;return((n=r==null?void 0:r.value)==null?void 0:n.imageDisplayMode)!=="tile"||!p.value?{}:{width:"100%",height:"100%",backgroundImage:`url(${p.value})`,backgroundRepeat:"repeat",backgroundPosition:"center center"}}),O=i.computed(()=>{const n=l.params.id;return n?String(n):""}),x=n=>{var u;const c=((u=o.pageData)==null?void 0:u.sheets)||[];for(const _ of c){const g=_.id,M=_.caption||_.name||_.id,E=_.layers||[];for(const w of E){const S=w.id,B=w.caption||w.name||w.id,C=w.components||[];for(const m of C)if((m==null?void 0:m.id)===n){const N=m.caption||m.name||m.id;return{sheetId:g,layerId:S,sheetName:M,layerName:B,componentName:N}}}}return{sheetId:"",layerId:"",sheetName:"",layerName:"",componentName:""}},Z=n=>s(null,null,function*(){var g;if(!O.value)return;const c=a.uid||((g=a.conf)==null?void 0:g.id);if(!c||!n)return;const{sheetId:u,layerId:_}=x(c);try{yield W.deleteComponentRelations(O.value,u,_,c),yield W.createMaterialRelation({dashboard_record_uid:O.value,material_uid:n,sheet_id:u||void 0,layer_id:_||void 0,component_id:c})}catch(M){console.warn("[Photo] 同步素材关联失败:",M)}}),z=()=>s(null,null,function*(){try{const n=yield _e("image");if(n){if(console.log("[Photo] 选中的素材:",n),console.log("[Photo] material_path:",n.material_path),console.log("[Photo] thumbnail:",n.thumbnail),console.log("[Photo] file_id:",n.file_id),!n.material_path){I.ElMessage.warning("该素材缺少 material_path,无法获取原图"),console.warn("[Photo] 素材缺少 material_path");return}const c=String(n.material_path).trim(),u=A.buildMaterialFileUrlByMaterialPath(c);console.log("[Photo] 原图URL:",u),v.value=u,yield V(),R.value=n.name,a.conf&&a.conf.options&&(a.conf.options.fileUrl||(a.conf.options.fileUrl={value:"",type:"string",label:""}),a.conf.options.fileName||(a.conf.options.fileName={value:"",type:"string",label:""}),a.conf.options.materialUid||(a.conf.options.materialUid={value:"",type:"string",label:""}),a.conf.options.fileUrl.value=c,a.conf.options.fileName.value=n.name,a.conf.options.materialUid.value=n.uid,console.log("[Photo] 配置已保存:",{fileUrl:a.conf.options.fileUrl.value,fileName:a.conf.options.fileName.value,materialUid:a.conf.options.materialUid.value})),console.log("[Photo] uploadedFileUrl.value:",p.value),I.ElMessage.success(t("component.photo.materialSelected")||"素材选择成功"),yield Z(n.uid)}else console.log("[Photo] 用户取消选择")}catch(n){console.error("[Photo] 素材选择失败:",n),I.ElMessage.error("素材选择失败")}}),K=()=>{P(p.value),p.value="",v.value="",R.value="",a.mode!=="preview"&&z()},Q=()=>{k.value=!1,f.value,console.log("图片加载成功")},X=n=>{var g,M,E,w,S,B,C;if(console.error("图片加载失败:",n),k.value||D.value)return;const c=a.uid||((g=a.conf)==null?void 0:g.id)||"",u=c?x(c):null;u&&(u.sheetName||u.layerName||u.componentName)?`${u.sheetName||"-"}${u.layerName||"-"}${u.componentName||"-"}`:R.value;const _=String(((w=(E=(M=a.conf)==null?void 0:M.options)==null?void 0:E.materialUid)==null?void 0:w.value)||((C=(B=(S=a.conf)==null?void 0:S.options)==null?void 0:B.imageUid)==null?void 0:C.value)||"").trim();_&&(D.value=!0,de.getMaterialItem(_).then(m=>{if(U(m==null?void 0:m.code)&&(m!=null&&m.result)){const N=m.result;N!=null&&N.material_path&&(v.value=A.buildMaterialFileUrlByMaterialPath(String(N.material_path).trim()),V());return}k.value=!0}).catch(()=>{}).finally(()=>{D.value=!1}))};return i.onMounted(()=>{}),i.onBeforeUnmount(()=>{p.value&&p.value.startsWith("blob:")&&URL.revokeObjectURL(p.value)}),(n,c)=>{var _,g;const u=ie.ElButton;return i.openBlock(),i.createElementBlock("div",{class:"mix-component",style:i.normalizeStyle({borderRadius:`${i.unref(r).radiusSize}px`})},[i.createElementVNode("div",pe,[p.value?(i.openBlock(),i.createElementBlock("div",ve,[a.mode!=="preview"?(i.openBlock(),i.createElementBlock("div",we,[i.createElementVNode("span",be,i.toDisplayString(R.value),1),i.createElementVNode("button",{class:"change-file-btn",onClick:K,title:i.unref(t)("component.photo.changeFile")||"更换文件"},[...c[1]||(c[1]=[i.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[i.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])],8,Re)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"image-container",style:i.normalizeStyle(H.value)},[i.createElementVNode("img",{ref_key:"imageRef",ref:f,src:p.value,alt:R.value,style:i.normalizeStyle(J.value),onLoad:Q,onError:X},null,44,Me),((g=(_=i.unref(r))==null?void 0:_.value)==null?void 0:g.imageDisplayMode)==="tile"?(i.openBlock(),i.createElementBlock("div",{key:0,class:"tiled-background",style:i.normalizeStyle(G.value)},null,4)):i.createCommentVNode("",!0)],4)])):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["upload-area",{"preview-mode":a.mode==="preview"}])},[i.createElementVNode("div",me,[(i.openBlock(),i.createElementBlock("svg",ye,[...c[0]||(c[0]=[i.createElementVNode("path",{d:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"},null,-1)])])),i.createElementVNode("p",fe,i.toDisplayString(a.mode==="preview"?"未上传素材":i.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1),a.mode!=="preview"?(i.openBlock(),i.createElementBlock("div",ge,[i.createVNode(u,{type:"primary",size:"small",onClick:z},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1)]),_:1})])):i.createCommentVNode("",!0)])],2))]),i.renderSlot(n.$slots,"default",{},void 0,!0)],4)}}})),ke=y._export_sfc(Ue,[["__scopeId","data-v-57314f5b"]]);exports.default=ke;
|
|
1
|
+
"use strict";var Y=Object.defineProperty,ee=Object.defineProperties;var te=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var T=(e,t,o)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,b=(e,t)=>{for(var o in t||(t={}))oe.call(t,o)&&T(e,o,t[o]);if(F)for(var o of F(t))ae.call(t,o)&&T(e,o,t[o]);return e},L=(e,t)=>ee(e,te(t));var s=(e,t,o)=>new Promise((l,a)=>{var d=f=>{try{r(o.next(f))}catch(v){a(v)}},h=f=>{try{r(o.throw(f))}catch(v){a(v)}},r=f=>f.done?l(f.value):Promise.resolve(f.value).then(d,h);r((o=o.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("element-plus/es");require("element-plus/es/components/base/style/css");require("element-plus/es/components/button/style/css");const i=require("vue"),re=require("./vue-i18n-BvHMBi_b.cjs"),ne=require("./BaseComponent-BHUHnLj-.cjs"),y=require("./index-D7PZNHF4.cjs"),A=require("./materialFileUrl-DfPNm265.cjs"),I=require("element-plus"),q=require("./ele-bmp-icon-BBI0-SX7.cjs");process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const le=Symbol(process.env.NODE_ENV!=="production"?"route location":"");process.env.NODE_ENV;function se(e){return i.inject(le)}const U=e=>{const t=typeof e=="string"?Number(e):e;return t===0||t===200},ce=(e,t)=>{if(e&&String(e).trim()){const o=String(e).trim();if(o.startsWith("http://")||o.startsWith("https://"))try{return new URL(o).pathname||""}catch(l){return o}return o.startsWith("/")?o:`/${o}`}return t?`/yunfiles/material/file/${t}`:""},de={uploadFile(e){return s(this,null,function*(){var l;const t=new FormData;t.append("file",e);const o=yield y.api.upload(t,!0);if(U(o.code)&&((l=o.result)!=null&&l.url))return o.result.url;throw new Error(o.msg||"文件上传失败")})},uploadMaterialGetPath(e,t){return s(this,null,function*(){var d,h;const l={material_data:e.includes(",")?e.split(",")[1]:e,material_type:t||"png"},a=yield y.api.post("upload_material",l,!0);if(U(a.code)&&a.result){const r=a.result,f=ce(r.material_path||r.relative_path||"",r.file_id);if(f)return L(b({},r),{material_path:f,material_size:(h=(d=r.material_size)!=null?d:r.file_size)!=null?h:0,material_type:r.material_type||r.mime_type||t||"png",name:r.name||r.file_name||""})}throw new Error(a.info||a.msg||"上传原图获取路径失败")})},createMaterial(e){return s(this,null,function*(){var o;const t=yield y.api.post("create_dashboard_material",e,!0);if(U(t.code)&&((o=t.result)!=null&&o.uid))return t.result;throw new Error(t.info||t.msg||"创建素材失败")})},uploadAndCreateMaterial(o){return s(this,arguments,function*(e,t={}){var h;const l=((h=e.name.split(".").pop())==null?void 0:h.toLowerCase())||"png",a=yield this._fileToBase64(e),d=yield this.uploadMaterialGetPath(a,l);if(d.uid)return{uid:d.uid};throw new Error("upload_material 未返回 uid")})},_fileToBase64(e){return new Promise((t,o)=>{const l=new FileReader;l.onload=()=>t(l.result),l.onerror=()=>o(new Error("文件读取失败")),l.readAsDataURL(e)})},getMaterialList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_dashboard_material_list",t)})},getMyMaterialList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return yield y.api.post("get_my_dashboard_material_list",t)})},getMaterialItem(e){return s(this,null,function*(){return yield y.api.post("get_dashboard_material_item",{uid:e})})},updateMaterial(e){return s(this,null,function*(){return yield y.api.post("update_dashboard_material",e,!0)})},deleteMaterial(e){return s(this,null,function*(){return yield y.api.post("delete_dashboard_material",{uid:e},!0)})},deleteMaterialByPath(e){return s(this,null,function*(){var o;if(!e||!String(e).trim())return;const t=String(e).replace(/^\//,"");try{const l=yield this.getMyMaterialList({page_index:1,page_size:10,where_and:JSON.stringify([["material_path","=",t]])}),a=(o=l==null?void 0:l.result)==null?void 0:o.data;Array.isArray(a)&&a.length>0&&a[0].uid&&(yield this.deleteMaterial(a[0].uid))}catch(l){}})}},W={_buildWhereAnd(e){return JSON.stringify(e.filter(([,,t])=>t!=null))},_isEmptyId(e){return e==null||String(e).trim()===""},_isComponentLevel(e){return!this._isEmptyId(e.component_id)},_isLayerLevel(e){return this._isEmptyId(e.component_id)&&!this._isEmptyId(e.layer_id)},_isSheetLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&!this._isEmptyId(e.sheet_id)},_isDashboardLevel(e){return this._isEmptyId(e.component_id)&&this._isEmptyId(e.layer_id)&&this._isEmptyId(e.sheet_id)},_listRelations(e){return s(this,null,function*(){var o;const t=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:e});return((o=t==null?void 0:t.result)==null?void 0:o.data)||[]})},_deleteByUid(e,t){return s(this,null,function*(){t&&(yield this.deleteMaterialRelation({dashboard_record_uid:e,uid:t}))})},_deleteByRelation(e){return s(this,null,function*(){e!=null&&e.dashboard_record_uid&&(yield this.deleteMaterialRelation({dashboard_record_uid:e.dashboard_record_uid,dashboard_id:e.dashboard_id,sheet_id:e.sheet_id,layer_id:e.layer_id,component_id:e.component_id,uid:e.uid}))})},_deleteRelationList(e,t){return s(this,null,function*(){for(const o of t)yield this._deleteByUid(e,o.uid)})},createMaterialRelation(e){return s(this,null,function*(){return yield y.api.post("create_dashboard_materials_relation",e,!0)})},deleteMaterialRelation(e){return s(this,null,function*(){return yield y.api.post("delete_dashboard_materials_relation",e,!0)})},getMaterialRelationList(){return s(this,arguments,function*(e={}){const t=b({page_index:e.page_index||1,page_size:e.page_size||20,order_by:e.order_by||"created",order_type:e.order_type||"desc"},e);return!e.order_by&&!e.order_type&&e.order?t.order=e.order:delete t.order,yield y.api.post("get_my_dashboard_materials_relation_list",t)})},getMaterialRelationsByDashboard(o){return s(this,arguments,function*(e,t={}){const l=JSON.stringify([["dashboard_record_uid","=",e]]);return yield this.getMaterialRelationList(L(b({},t),{where_and:l}))})},getMaterialRelationByComponent(l,a){return s(this,arguments,function*(e,t,o={}){const d=JSON.stringify([["dashboard_record_uid","=",e],["component_id","=",t]]);return yield this.getMaterialRelationList(L(b({},o),{where_and:d}))})},getRelationsByMaterial(e){return s(this,null,function*(){var l;if(!e)return[];const t=JSON.stringify([["material_uid","=",e]]),o=yield this.getMaterialRelationList({page_index:1,page_size:999,where_and:t});return((l=o==null?void 0:o.result)==null?void 0:l.data)||[]})},getMaterialUsageSummary(e){return s(this,null,function*(){const t=yield this.getRelationsByMaterial(e),o=new Set;return t.forEach(l=>{const a=String(l.dashboard_record_uid||"").trim();a&&o.add(a)}),{relationCount:t.length,dashboardCount:o.size,relations:t}})},deleteAllRelationsByMaterial(e){return s(this,null,function*(){const t=yield this.getRelationsByMaterial(e);for(const o of t)!(o!=null&&o.uid)||!(o!=null&&o.dashboard_record_uid)||(yield this.deleteMaterialRelation({dashboard_record_uid:o.dashboard_record_uid,uid:o.uid}));return t.length})},deleteAllRelationsByDashboard(e){return s(this,null,function*(){return yield this.deleteRelationsByDashboardHierarchy(e)})},deleteRelationByComponent(e,t){return s(this,null,function*(){return yield this.deleteMaterialRelation({dashboard_record_uid:e,component_id:t})})},deleteComponentRelations(e,t,o,l){return s(this,null,function*(){if(!e||!t||!o||!l)return;const a=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o],["component_id","=",l]]),d=yield this._listRelations(a);for(const h of d)yield this._deleteByRelation(h)})},deleteLayerLevelRelations(e,t,o){return s(this,null,function*(){if(!e||!t||!o)return;const l=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o]]),d=(yield this._listRelations(l)).filter(h=>this._isLayerLevel(h));for(const h of d)yield this._deleteByRelation(h)})},deleteSheetLevelRelations(e,t){return s(this,null,function*(){if(!e||!t)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),a=(yield this._listRelations(o)).filter(d=>this._isSheetLevel(d));for(const d of a)yield this._deleteByRelation(d)})},deleteDashboardLevelRelations(e){return s(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),l=(yield this._listRelations(t)).filter(a=>this._isDashboardLevel(a));for(const a of l)yield this._deleteByRelation(a)})},deleteRelationsByLayerHierarchy(e,t,o){return s(this,null,function*(){if(!e||!t||!o)return;const l=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t],["layer_id","=",o]]),a=yield this._listRelations(l),d=a.filter(r=>this._isComponentLevel(r)),h=a.filter(r=>this._isLayerLevel(r));for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})},deleteRelationsBySheetHierarchy(e,t){return s(this,null,function*(){if(!e||!t)return;const o=this._buildWhereAnd([["dashboard_record_uid","=",e],["sheet_id","=",t]]),l=yield this._listRelations(o),a=l.filter(r=>this._isComponentLevel(r)),d=l.filter(r=>this._isLayerLevel(r)),h=l.filter(r=>this._isSheetLevel(r));for(const r of a)yield this._deleteByRelation(r);for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})},deleteRelationsByDashboardHierarchy(e){return s(this,null,function*(){if(!e)return;const t=this._buildWhereAnd([["dashboard_record_uid","=",e]]),o=yield this._listRelations(t),l=o.filter(r=>this._isComponentLevel(r)),a=o.filter(r=>this._isLayerLevel(r)),d=o.filter(r=>this._isSheetLevel(r)),h=o.filter(r=>this._isDashboardLevel(r));for(const r of l)yield this._deleteByRelation(r);for(const r of a)yield this._deleteByRelation(r);for(const r of d)yield this._deleteByRelation(r);for(const r of h)yield this._deleteByRelation(r)})}},ue=i.ref(!1),he=i.ref("all");function _e(e="all"){return he.value=e,ue.value=!0,new Promise(t=>{})}const pe={class:"mix-body"},me={class:"upload-content"},ye={viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",style:{opacity:"0.5"}},fe={class:"upload-text"},ge={key:0,class:"upload-actions"},ve={key:1,class:"viewer-container"},we={key:0,class:"file-info"},be={class:"file-name"},Re=["title"],Me=["src","alt"],Ne={DEFAULT_ICON:q.DEFAULT_ICON,ACTIVE_ICON:q.ACTIVE_ICON,NAME_CN:"图片查看器",NAME_EN:"Photo Viewer",ORDER:2,PLATFORM:["pc","screen","mobile"]},Le={imageDisplayMode:{value:"center",type:"select",options:[{label:"component.photo.center",value:"center"},{label:"component.photo.tile",value:"tile"},{label:"component.photo.stretch",value:"stretch"}],label:"component.options.imageDisplayMode"},fileUrl:{value:"",type:"string",label:"component.options.fileUrl",placeholder:"请上传素材"},fileName:{value:"",type:"string",label:"component.options.fileName",placeholder:"请上传素材"},materialUid:{value:"",type:"string",label:"component.options.materialUid",placeholder:"素材UID"}},Ee=[],Se=[],Be=[],Ce=null,Ae={DEFAULT:Ne,OPTIONS:Le,DATA:Ee,PARAMS:Se,SOURCE:Be,COMMON:Ce},Ue=i.defineComponent(L(b({},Ae),{__name:"photo",props:{conf:{type:Object,default:()=>({})},uid:{type:String,default:""},mode:{type:String,default:"edit"},theme:{type:String,default:"light"}},setup(e){const{t}=re.useI18n(),o=y.useCounterStore(),l=se(),a=e;class d extends ne.BaseComponent{extractStyles(){return{imageDisplayMode:this.getOptionValue("imageDisplayMode","center"),radiusSize:this.getOptionValue("radiusSize",0)}}init(){this.Style.value=this.extractStyles(),this.applyTheme(),j()}}const h=new d(a,"photo");h.setupLifecycle();const r=h.getStyle(),f=i.ref(null),v=i.ref(""),p=i.ref(""),R=i.ref(""),k=i.ref(!1),D=i.ref(!1),$=n=>A.buildMaterialFileUrlByMaterialPath(n),j=()=>s(null,null,function*(){var c,u,_;const{conf:n}=a;(u=(c=n==null?void 0:n.options)==null?void 0:c.fileUrl)!=null&&u.value&&(v.value=$(n.options.fileUrl.value),yield V(),R.value=((_=n.options.fileName)==null?void 0:_.value)||"")}),P=n=>{n&&n.startsWith("blob:")&&URL.revokeObjectURL(n)},V=()=>s(null,null,function*(){if(v.value)try{const n=y.resolveHttpAuthTokenForFetch();if(!n){p.value="";return}const c=A.encodeMaterialFileRequestUrl(v.value),u=yield fetch(c,{mode:"cors",credentials:"include",headers:{Authorization:`Bearer ${n}`}});if(!u.ok)throw new Error(`load image failed: ${u.status}`);const _=yield u.blob(),g=URL.createObjectURL(_);P(p.value),p.value=g}catch(n){console.error("[Photo] 拉取图片失败:",n),P(p.value),p.value=""}}),H=i.computed(()=>({width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})),J=i.computed(()=>{var c;const n=(c=r==null?void 0:r.value)==null?void 0:c.imageDisplayMode;return n==="tile"?{display:"none"}:n==="stretch"?{width:"100%",height:"100%",objectFit:"fill"}:{width:"100%",height:"100%",objectFit:"contain"}}),G=i.computed(()=>{var n;return((n=r==null?void 0:r.value)==null?void 0:n.imageDisplayMode)!=="tile"||!p.value?{}:{width:"100%",height:"100%",backgroundImage:`url(${p.value})`,backgroundRepeat:"repeat",backgroundPosition:"center center"}}),O=i.computed(()=>{const n=l.params.id;return n?String(n):""}),x=n=>{var u;const c=((u=o.pageData)==null?void 0:u.sheets)||[];for(const _ of c){const g=_.id,M=_.caption||_.name||_.id,E=_.layers||[];for(const w of E){const S=w.id,B=w.caption||w.name||w.id,C=w.components||[];for(const m of C)if((m==null?void 0:m.id)===n){const N=m.caption||m.name||m.id;return{sheetId:g,layerId:S,sheetName:M,layerName:B,componentName:N}}}}return{sheetId:"",layerId:"",sheetName:"",layerName:"",componentName:""}},Z=n=>s(null,null,function*(){var g;if(!O.value)return;const c=a.uid||((g=a.conf)==null?void 0:g.id);if(!c||!n)return;const{sheetId:u,layerId:_}=x(c);try{yield W.deleteComponentRelations(O.value,u,_,c),yield W.createMaterialRelation({dashboard_record_uid:O.value,material_uid:n,sheet_id:u||void 0,layer_id:_||void 0,component_id:c})}catch(M){console.warn("[Photo] 同步素材关联失败:",M)}}),z=()=>s(null,null,function*(){try{const n=yield _e("image");if(n){if(console.log("[Photo] 选中的素材:",n),console.log("[Photo] material_path:",n.material_path),console.log("[Photo] thumbnail:",n.thumbnail),console.log("[Photo] file_id:",n.file_id),!n.material_path){I.ElMessage.warning("该素材缺少 material_path,无法获取原图"),console.warn("[Photo] 素材缺少 material_path");return}const c=String(n.material_path).trim(),u=A.buildMaterialFileUrlByMaterialPath(c);console.log("[Photo] 原图URL:",u),v.value=u,yield V(),R.value=n.name,a.conf&&a.conf.options&&(a.conf.options.fileUrl||(a.conf.options.fileUrl={value:"",type:"string",label:""}),a.conf.options.fileName||(a.conf.options.fileName={value:"",type:"string",label:""}),a.conf.options.materialUid||(a.conf.options.materialUid={value:"",type:"string",label:""}),a.conf.options.fileUrl.value=c,a.conf.options.fileName.value=n.name,a.conf.options.materialUid.value=n.uid,console.log("[Photo] 配置已保存:",{fileUrl:a.conf.options.fileUrl.value,fileName:a.conf.options.fileName.value,materialUid:a.conf.options.materialUid.value})),console.log("[Photo] uploadedFileUrl.value:",p.value),I.ElMessage.success(t("component.photo.materialSelected")||"素材选择成功"),yield Z(n.uid)}else console.log("[Photo] 用户取消选择")}catch(n){console.error("[Photo] 素材选择失败:",n),I.ElMessage.error("素材选择失败")}}),K=()=>{P(p.value),p.value="",v.value="",R.value="",a.mode!=="preview"&&z()},Q=()=>{k.value=!1,f.value,console.log("图片加载成功")},X=n=>{var g,M,E,w,S,B,C;if(console.error("图片加载失败:",n),k.value||D.value)return;const c=a.uid||((g=a.conf)==null?void 0:g.id)||"",u=c?x(c):null;u&&(u.sheetName||u.layerName||u.componentName)?`${u.sheetName||"-"}${u.layerName||"-"}${u.componentName||"-"}`:R.value;const _=String(((w=(E=(M=a.conf)==null?void 0:M.options)==null?void 0:E.materialUid)==null?void 0:w.value)||((C=(B=(S=a.conf)==null?void 0:S.options)==null?void 0:B.imageUid)==null?void 0:C.value)||"").trim();_&&(D.value=!0,de.getMaterialItem(_).then(m=>{if(U(m==null?void 0:m.code)&&(m!=null&&m.result)){const N=m.result;N!=null&&N.material_path&&(v.value=A.buildMaterialFileUrlByMaterialPath(String(N.material_path).trim()),V());return}k.value=!0}).catch(()=>{}).finally(()=>{D.value=!1}))};return i.onMounted(()=>{}),i.onBeforeUnmount(()=>{p.value&&p.value.startsWith("blob:")&&URL.revokeObjectURL(p.value)}),(n,c)=>{var _,g;const u=ie.ElButton;return i.openBlock(),i.createElementBlock("div",{class:"mix-component",style:i.normalizeStyle({borderRadius:`${i.unref(r).radiusSize}px`})},[i.createElementVNode("div",pe,[p.value?(i.openBlock(),i.createElementBlock("div",ve,[a.mode!=="preview"?(i.openBlock(),i.createElementBlock("div",we,[i.createElementVNode("span",be,i.toDisplayString(R.value),1),i.createElementVNode("button",{class:"change-file-btn",onClick:K,title:i.unref(t)("component.photo.changeFile")||"更换文件"},[...c[1]||(c[1]=[i.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[i.createElementVNode("path",{d:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"})],-1)])],8,Re)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"image-container",style:i.normalizeStyle(H.value)},[i.createElementVNode("img",{ref_key:"imageRef",ref:f,src:p.value,alt:R.value,style:i.normalizeStyle(J.value),onLoad:Q,onError:X},null,44,Me),((g=(_=i.unref(r))==null?void 0:_.value)==null?void 0:g.imageDisplayMode)==="tile"?(i.openBlock(),i.createElementBlock("div",{key:0,class:"tiled-background",style:i.normalizeStyle(G.value)},null,4)):i.createCommentVNode("",!0)],4)])):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["upload-area",{"preview-mode":a.mode==="preview"}])},[i.createElementVNode("div",me,[(i.openBlock(),i.createElementBlock("svg",ye,[...c[0]||(c[0]=[i.createElementVNode("path",{d:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"},null,-1)])])),i.createElementVNode("p",fe,i.toDisplayString(a.mode==="preview"?"未上传素材":i.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1),a.mode!=="preview"?(i.openBlock(),i.createElementBlock("div",ge,[i.createVNode(u,{type:"primary",size:"small",onClick:z},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("component.photo.selectFromLibrary")||"从素材库选择"),1)]),_:1})])):i.createCommentVNode("",!0)])],2))]),i.renderSlot(n.$slots,"default",{},void 0,!0)],4)}}})),ke=y._export_sfc(Ue,[["__scopeId","data-v-57314f5b"]]);exports.default=ke;
|
|
@@ -31,8 +31,8 @@ import "element-plus/es/components/base/style/css";
|
|
|
31
31
|
import "element-plus/es/components/button/style/css";
|
|
32
32
|
import { inject as he, ref as R, defineComponent as _e, computed as O, onMounted as pe, onBeforeUnmount as me, openBlock as L, createElementBlock as M, normalizeStyle as x, unref as A, createElementVNode as g, normalizeClass as fe, toDisplayString as T, createVNode as ye, withCtx as ve, createTextVNode as ge, createCommentVNode as $, renderSlot as we } from "vue";
|
|
33
33
|
import { u as be } from "./vue-i18n-5Nahpzrm.js";
|
|
34
|
-
import { B as Re } from "./BaseComponent-
|
|
35
|
-
import { a as y, u as Le, r as Me, _ as Se } from "./index-
|
|
34
|
+
import { B as Re } from "./BaseComponent-qzL33ZSL.js";
|
|
35
|
+
import { a as y, u as Le, r as Me, _ as Se } from "./index-BHBE19E2.js";
|
|
36
36
|
import { e as Ne, b as j } from "./materialFileUrl-CubtnHeq.js";
|
|
37
37
|
import { ElMessage as H } from "element-plus";
|
|
38
38
|
import { A as Ce, D as Ee } from "./ele-bmp-icon-Pdolk1J5.js";
|