import request from "@/utils/request"; /** * 查询所有锁信息 * areaId lockName lockState lockType pageNum pageSize */ export function getAllLockInf(params) { return request({ url: "lockInf/getAllLockInf", method: "GET", params, }); } /** * 编辑 * lockId lockName areaId lockType */ export function updateLock(data) { return request({ url: "lockInf/updateLock", method: "POST", data, }); } /** * 添加锁 包含批量 * num * {areaId lockName lockType..} */ export function addLock(params, data) { return request({ url: "lockInf/addLock", method: "POST", params, data, }); } /** * 删除锁 * lockId */ export function delLock(lockId) { return request({ url: "lockInf/delLock", method: "GET", params: { lockId }, }); } /** * 查询所有锁信息 * */ export function getLockInfAuth() { return request({ url: "lockInf/getLockInfAuth", method: "GET", }); } /** * 远程开锁 * lockId */ export function lockOpen(lockId) { return request({ url: "lockRt/lockOpen", method: "GET", params: { lockId }, }); } /** * 查询当前管理员 所管理区域下的所有锁具 下拉 */ export function getAreaUserLock() { return request({ url: "lockInf/getAreaUserLock", method: "GET", }); } /** * 查询指定区域下的所有锁具 下拉用 * id */ export function getLinfById(id) { return request({ url: "areaInf/getLinfById", method: "GET", params: { id }, }); } /** * 查询全部(屏柜)类型 下拉用 * id */ export function getScreenType() { return request({ url: "lockInf/getScreenType", method: "POST", }); } /** * 查询全部(屏柜)品牌 下拉用 * id */ export function getScreenProduct() { return request({ url: "lockInf/getScreenProduct", method: "POST", }); } /** * 根据lockId 查询锁的开闭记录 * {lockId startTime endTime} */ export function getLockHisWithReal(lockId, startTime, endTime) { return request({ url: "lockHis/getLockHisWithReal", method: "GET", params: { lockId, startTime, endTime }, }); } /** * 查询锁历史告警 * {areaId, startTime, endTime, pageNum, pageSize, almIds} */ export function getLockAlmHis(areaId, startTime, endTime, pageNum, pageSize, almIds) { return request({ url: "lockAlmHis/getLockAlmHis", method: "GET", params: { areaId, startTime, endTime, pageNum, pageSize, almIds }, }); }