gb28181-63c601f1.js 1.4 KB

1
  1. import"./radical-70d8c19d.js";import{p as u,o as d}from"./index-f4b030ea.js";const i=(e=!1)=>e?`gb_${new Date().getTime()}/`:"",r=u({requestOptions:{apiUrl:()=>d("gb28181"),isDeconstructionData:!1}});function p(e){return r.get({url:"/list",params:e})}function l(e){return r.get({url:`/devices/${e}/sync`})}function f(e){return r.post({url:`/device/remove/${e}`})}function m(e){return r.get({url:`/ptz/${e.deviceId}/${e.channelId}`,params:{ptzcmd:e.ptzcmd}},{errorMessageMode:"message"})}function M(e){return r.get({url:`/records/${e.deviceId}/${e.channelId}`,params:{start:e.start,end:e.end}},{errorMessageMode:"message"})}function $(e){return r.get({url:`/groups/${e}`},{errorMessageMode:"message"})}function h({name:e,pid:t}){return r.post({url:"/groups/add",data:{pid:t,name:e}},{errorMessageMode:"message"})}function v({name:e,pid:t,id:s}){return r.post({url:"/groups/update",data:{pid:t,name:e,id:s}},{errorMessageMode:"message"})}function G(e){return r.post({url:`/groups/delete/${e}`})}function D(e,t){return r.get({url:`/groups/${e}/channels`,params:t},{errorMessageMode:"message"})}function I({groupId:e,channelIds:t}){return r.post({url:`/groups/channel/add/${e}`,data:t},{errorMessageMode:"message"})}function b(e){const{deviceId:t,start:s,end:a,count:n,page:o}=e;return r.get({url:`/alarms/${t}`,params:{count:n,page:o,start:s,end:a}},{errorMessageMode:"message"})}export{i as G,p as a,M as b,h as c,f as d,v as e,D as f,b as g,I as h,G as i,$ as j,m as s,l as u};