import{x as b,a3 as D,y as I,r as i,a4 as N,o as u,a as p,t as _,b as e,d as r,e as a,Q as k,G as R,J as $,P as F,C as v,H as M,g as G}from"./vendor.475775fc.js";import{c as H,e as J}from"./index.382339dd.js";import{l as Q,a as z}from"./index.a0805cd9.js";import"./index.e07f9e9c.js";const A={class:"flex-sub padding-lr",style:{"overflow-y":"auto"}},K=_("div",{class:"solid-bottom padding-tb margin-bottom text-bold"},"\u57FA\u672C\u914D\u7F6E",-1),O=["src","onClick"],W={class:"padding-sm"},X={class:"flex justify-between"},te={__name:"occlusionConfiguration",setup(Y){const{proxy:y}=G(),f=b(!1),g=b([]),h=b([]),w=D({form:{cameraTimeCycle:0,cameraTime:0,alarmThreshold:0,cameraEnable:!0,data:[]},rules:{cameraTimeCycle:[{required:!0,message:"\u68C0\u6D4B\u5468\u671F",trigger:"blur"}],cameraTime:[{required:!0,message:"\u68C0\u6D4B\u95F4\u9694",trigger:"blur"}],alarmThreshold:[{required:!0,message:"\u7B97\u6CD5\u9608\u503C",trigger:"blur"}]}}),{form:t,rules:j}=I(w),B=()=>{y.$refs.blockRef.validate(n=>{n&&(f.value=!0,J(t.value).then(l=>{y.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F"),f.value=!1,x()}))})},E=function(){Q({}).then(n=>{g.value=n.data,U()})},U=function(n){if(g.value.length){let l=g.value,d={},c="";l.forEach((s,V)=>{let m=0;s.camera_brand==20?m=s.camera_rtsp.split("channel=")[1].split("&")[0]:s.camera_brand==10?m=s.camera_rtsp.split("h264/ch")[1].split("/")[0]:s.camera_brand==30&&(m=s.camera_rtsp.split("LiveMedia/ch")[1].split("/")[0]),c+=s.camera_rtsp+",",d[s.camera_id]=baseUrl+"alarm_folder/display_image/"+(s.camera_ip+"_"+m)+"_small.jpg"}),h.value=d,P(c,d)}},P=function(n,l){z(n.slice(0,-1)).then(d=>{setTimeout(()=>{h.value={},h.value=l},3e3)})},x=function(){H().then(n=>{console.log(n)})};return x(),E(),(n,l)=>{const d=i("el-input"),c=i("el-form-item"),s=i("el-switch"),V=i("el-checkbox"),m=i("el-card"),S=i("el-checkbox-group"),C=i("el-button"),L=i("el-form"),T=N("loading");return u(),p("div",null,[_("div",A,[K,e(L,{ref:"blockRef",model:a(t),rules:a(j),"label-width":"120px"},{default:r(()=>[k((u(),p("div",null,[e(c,{label:"\u68C0\u6D4B\u5468\u671F",prop:"cameraTimeCycle"},{default:r(()=>[e(d,{modelValue:a(t).cameraTimeCycle,"onUpdate:modelValue":l[0]||(l[0]=o=>a(t).cameraTimeCycle=o),placeholder:"\u8BF7\u8F93\u5165\u68C0\u6D4B\u5468\u671F"},null,8,["modelValue"])]),_:1}),e(c,{label:"\u68C0\u6D4B\u95F4\u9694",prop:"cameraTime"},{default:r(()=>[e(d,{modelValue:a(t).cameraTime,"onUpdate:modelValue":l[1]||(l[1]=o=>a(t).cameraTime=o),placeholder:"\u8BF7\u8F93\u5165\u68C0\u6D4B\u95F4\u9694"},null,8,["modelValue"])]),_:1}),e(c,{label:"\u7B97\u6CD5\u9608\u503C",prop:"alarmThreshold"},{default:r(()=>[e(d,{modelValue:a(t).alarmThreshold,"onUpdate:modelValue":l[2]||(l[2]=o=>a(t).alarmThreshold=o),placeholder:"\u8BF7\u8F93\u5165\u7B97\u6CD5\u9608\u503C"},null,8,["modelValue"])]),_:1}),e(c,{label:"\u542F\u7528\u72B6\u6001",prop:"cameraEnable"},{default:r(()=>[e(s,{modelValue:a(t).cameraEnable,"onUpdate:modelValue":l[3]||(l[3]=o=>a(t).cameraEnable=o)},null,8,["modelValue"])]),_:1})])),[[T,a(f)]]),k((u(),p("div",null,[e(c,{label:"\u914D\u7F6E\u6444\u50CF\u673A"},{default:r(()=>[e(S,{modelValue:a(t).data,"onUpdate:modelValue":l[4]||(l[4]=o=>a(t).data=o),class:"grid col-4",style:{width:"100%"}},{default:r(()=>[(u(!0),p(R,null,$(a(g),(o,q)=>(u(),p("div",{class:"padding-xs",key:q},[e(m,{"body-style":{padding:"0px"},shadow:"hover"},{default:r(()=>[_("img",{src:a(h)[o.camera_id],style:{height:"130px",width:"100%"},onClick:F(Z=>n.seeImg(o.camera_id),["stop"])},null,8,O),_("div",W,[_("div",X,[e(V,{label:o.camera_id,name:"type"},{default:r(()=>[v(M(o.camera_name),1)]),_:2},1032,["label"])])])]),_:2},1024)]))),128))]),_:1},8,["modelValue"])]),_:1})])),[[T,a(f)]]),e(c,null,{default:r(()=>[e(C,{type:"primary",onClick:B},{default:r(()=>[v("\u4FDD\u5B58\u914D\u7F6E")]),_:1}),e(C,{type:"danger"},{default:r(()=>[v("\u5220\u9664\u914D\u7F6E")]),_:1})]),_:1})]),_:1},8,["model","rules"])])])}}};export{te as default};
