import{aN as u,bs as b,aE as E,c8 as t,aK as e,ac as f,a9 as h,aa as V,ab as T,a8 as I,B as P,C as B,aJ as p,bL as _,bS as C,a as L,$ as N,d as q,bC as A,c7 as g,aG as S,bW as k,bX as z,aD as y,ak as U}from"./index-D5GfLbIx.js";/* empty css             *//* empty css                    *//* empty css                        *//* empty css                  *//* empty css                     *//* empty css                  */import"./el-tooltip-l0sNRNKZ.js";/* empty css                    *//* empty css                        *//* empty css               */import{C as D}from"./ConfigPageBase-CgfsngDp.js";/* empty css                    *//* empty css               *//* empty css                *//* empty css                  */import"./PermissionGuard-CR4qtxrh.js";/* empty css                 */import"./reflection-BwOBPyb9.js";import"./monitorConfigCache-DXn96T8F.js";const F=u({__name:"DeviceHubView",setup(w){return(r,m)=>{const a=T,i=V,o=h,l=I,n=B,c=P,d=f;return b(),E(D,{section:"device",title:"第三方设备统一接入",description:"电梯/卷帘门/安全门/充电桩/AP/交换机/摄像头/读码器/PLC（DeviceManagementConfig）",defaults:C(L)},{default:t(({payload:s})=>[e(d,{"model-value":"drivers"},{default:t(()=>[e(o,{name:"drivers",label:"驱动绑定"},{default:t(()=>[e(i,{data:s.drivers,size:"small",border:""},{default:t(()=>[e(a,{label:"ID",prop:"id",width:"120"}),e(a,{label:"设备类型",prop:"deviceType",width:"120"}),e(a,{label:"驱动名",prop:"driverName"}),e(a,{label:"版本",prop:"version",width:"100"})]),_:1},8,["data"])]),_:2},1024),e(o,{name:"devices",label:"设备实例"},{default:t(()=>[e(i,{data:s.devices,size:"small",border:""},{default:t(()=>[e(a,{label:"ID",prop:"id",width:"120"}),e(a,{label:"名称",prop:"name",width:"140"}),e(a,{label:"类型",prop:"deviceType",width:"100"}),e(a,{label:"协议",prop:"protocol",width:"120"}),e(a,{label:"地址",prop:"address"}),e(a,{label:"启用",width:"80"},{default:t(v=>[e(l,{modelValue:v.row.enabled,"onUpdate:modelValue":x=>v.row.enabled=x},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])]),_:2},1024),e(o,{name:"policy",label:"健康 / 告警"},{default:t(()=>[e(c,{column:2,border:""},{default:t(()=>[e(n,{label:"心跳周期 (s)"},{default:t(()=>[p(_(s.healthPolicy.heartbeatSec),1)]),_:2},1024),e(n,{label:"离线判定 (s)"},{default:t(()=>[p(_(s.healthPolicy.offlineSec),1)]),_:2},1024),e(n,{label:"告警启用"},{default:t(()=>[p(_(s.alarmPolicy.enabled?"是":"否"),1)]),_:2},1024),e(n,{label:"规则数"},{default:t(()=>[p(_(s.alarmPolicy.rules.length),1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:1},8,["defaults"])}}}),M=u({__name:"LocationView",setup(w){return(r,m)=>{const a=T,i=N,o=V,l=h,n=f;return b(),E(D,{section:"location",title:"库位管理",description:"出入库、库存、库位可视化（LocationManagement）",defaults:C(q)},{default:t(({payload:c})=>[e(n,{"model-value":"locs"},{default:t(()=>[e(l,{name:"locs",label:"库位"},{default:t(()=>[e(o,{data:c.locations,size:"small",border:""},{default:t(()=>[e(a,{label:"ID",prop:"id",width:"100"}),e(a,{label:"编码",prop:"code",width:"120"}),e(a,{label:"名称",prop:"name"}),e(a,{label:"站点",prop:"siteId",width:"100"}),e(a,{label:"容量",prop:"capacity",width:"100"}),e(a,{label:"占用"},{default:t(d=>[e(i,{percentage:Math.round(d.row.occupied/d.row.capacity*100),"stroke-width":10},null,8,["percentage"])]),_:1})]),_:1},8,["data"])]),_:2},1024),e(l,{name:"rules",label:"库存规则"},{default:t(()=>[e(o,{data:c.inventoryRules,size:"small",border:""},{default:t(()=>[e(a,{label:"ID",prop:"id",width:"100"}),e(a,{label:"物料类型",prop:"itemType"}),e(a,{label:"下限",prop:"minQty",width:"100"}),e(a,{label:"上限",prop:"maxQty",width:"100"})]),_:1},8,["data"])]),_:2},1024)]),_:2},1024)]),_:1},8,["defaults"])}}}),R={class:"config-hub-page"},$={class:"config-pane"},O={class:"config-pane"},Q=u({__name:"FacilityConfigView",setup(w){const r=k(),m=z(),a=["device","location"];function i(){const l=r.query.tab;return typeof l=="string"&&a.includes(l)?l:"device"}const o=A(i());return g(o,l=>{r.query.tab!==l&&m.replace({query:{...r.query,tab:l}})}),g(()=>r.query.tab,()=>{const l=i();l!==o.value&&(o.value=l)}),(l,n)=>{const c=h,d=f;return b(),S("div",R,[e(d,{modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=s=>o.value=s),class:"hub-tabs"},{default:t(()=>[e(c,{name:"device",label:"设备接入"},{default:t(()=>[y("div",$,[e(F)])]),_:1}),e(c,{name:"location",label:"库位管理",lazy:""},{default:t(()=>[y("div",O,[e(M)])]),_:1})]),_:1},8,["modelValue"])])}}}),pe=U(Q,[["__scopeId","data-v-c7c6b85e"]]);export{pe as default};
