鸿蒙智能电子锁前端项目
he wei
2025-03-15 f8fd43f1307b0ae3a55f5a5a1390fd13b506fa88
src/api/lockManager.js
@@ -16,23 +16,25 @@
 * 编辑
 * lockId lockName areaId lockType
 */
export function updateLock(params) {
export function updateLock(data) {
  return request({
    url: "lockInf/updateLock",
    method: "GET",
    params,
    method: "POST",
    data,
  });
}
/**
 * 添加锁 包含批量
 * areaId lockName  lockType    num
 *     num
 * {areaId lockName  lockType..}
 */
export function addLock(params) {
export function addLock(params, data) {
  return request({
    url: "lockInf/addLock",
    method: "GET",
    method: "POST",
    params,
    data,
  });
}
@@ -91,4 +93,50 @@
    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 },
  });
}