"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" }, }); }