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.
 
 
 
 
 

42 lines
1.1 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_APPLICATION",
query: query,
url: `${ApiTable.getCamera}`,
msg: { option: "获取摄像头列表信息" },
reducer: { name: "applicationData", params: { noClear: true } },
});
}
export function putForbidden(data, forbidden) {
return (dispatch) =>
basicAction({
type: "put",
dispatch: dispatch,
actionType: "PUT_APPLICATION",
data,
url: `${ApiTable.putForbidden}`,
msg: { option: forbidden ? "启用" : "禁用" }, //禁用摄像头
reducer: {},
});
}
export function delCamera(orgId) {
return (dispatch) =>
basicAction({
type: "del",
dispatch: dispatch,
actionType: "DEL_APPLICATION",
url: `${ApiTable.delCamera.replace("{cameraId}", orgId)}`,
msg: { option: "设备会被存放在“设备回收站”中,删除" }, //删除摄像头
reducer: {},
});
}