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.
53 lines
1.4 KiB
53 lines
1.4 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 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 getAbility() {
|
|
return (dispatch) =>
|
|
basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
actionType: "GET_ABILITY",
|
|
url: `${ApiTable.getAbility}`,
|
|
msg: { option: "获取摄像头能力列表" },
|
|
reducer: { name: "equipmentWarehouseCamera" },
|
|
});
|
|
}
|
|
|