You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

104 lines
2.6 KiB

"use strict";
import { basicAction } from "@peace/utils";
import { ApiTable } from "$utils";
export function getCamera(query) {
return (dispatch) =>
basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_CAMREA",
query: query,
url: `${ApiTable.getCamera}`,
msg: { option: "获取摄像头列表信息" },
reducer: { name: "equipmentWarehouseCamera", params: { noClear: true } },
});
}
export function putForbidden(data, forbidden) {
return (dispatch) =>
basicAction({
type: "put",
dispatch: dispatch,
actionType: "PUT_FORBIDDEN",
data,
url: `${ApiTable.putForbidden}`,
msg: { option: forbidden ? "启用" : "禁用" }, //禁用摄像头
reducer: {},
});
}
export function delCamera(query) {
return (dispatch) =>
basicAction({
type: "del",
dispatch: dispatch,
actionType: "DEL_CAMERA",
query,
url: `${ApiTable.delCamera}`,
msg: { option: "删除摄像头" }, //删除摄像头
reducer: {},
});
}
export function getCameraDetails(orgId) {
return (dispatch) =>
basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_CAMREA_DETAILS",
url: `${ApiTable.getCameraDetails.replace("{cameraId}", orgId)}`,
msg: { option: "" }, //获取摄像头详情
reducer: { name: "nvrDetails" },
});
}
export function getCameraKind() {
return (dispatch) =>
basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_CAMERA_KIND",
url: `${ApiTable.getCameraKind}`,
msg: { option: "" }, //获取摄像头种类列表
reducer: { name: "CameraKind" },
});
}
export function getAbility() {
return (dispatch) =>
basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_ABILITY",
url: `${ApiTable.getAbility}`,
msg: { option: "" }, //获取摄像头能力列表
reducer: { name: "CameraAbility" },
});
}
export function postCameraYingshi(data) {
return (dispatch) =>
basicAction({
type: "post",
dispatch: dispatch,
data,
actionType: "POST_CAMERA_YINGSHI",
url: `${ApiTable.postCameraYingshi}`,
msg: { option: "" }, //创建萤石摄像头
reducer: { name: "" },
});
}
export function postCameraIpc(data) {
return (dispatch) =>
basicAction({
type: "post",
dispatch: dispatch,
data,
actionType: "POST_CAMERA_IPC",
url: `${ApiTable.postCameraIpc}`,
msg: { option: "" }, //创建IPC摄像头
reducer: { name: "" },
});
}