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