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.
 
 
 
 
 

65 lines
1.7 KiB

"use strict";
import { basicAction } from "@peace/utils";
import { ApiTable } from "$utils";
export function getStatus(query) {
return (dispatch) =>
basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_STATUS",
query: query,
url: `${ApiTable.getStatus}`,
msg: { option: "获取状态码列表信息" },
reducer: { name: "StatusList" },
});
}
export function putStatueBanned(data, forbidden) {
return (dispatch) =>
basicAction({
type: "put",
dispatch: dispatch,
actionType: "PUT_STATUEBANNED",
data,
url: `${ApiTable.putStatueBanned}`,
msg: { option: forbidden ? "启用" : "禁用" }, //禁用状态码自定义
reducer: {},
});
}
export function postStatusResolve(data) {
return (dispatch) =>
basicAction({
type: "post",
dispatch: dispatch,
data,
actionType: "POST_STATUS_RESOLVE",
url: `${ApiTable.postStatusResolve}`,
msg: { option: "" }, //编辑解决方案
reducer: { name: "" },
});
}
export function postStatusCustom(data) {
return (dispatch) =>
basicAction({
type: "post",
dispatch: dispatch,
data,
actionType: "POST_STATUS_CUSTOM",
url: `${ApiTable.postStatusCustom}`,
msg: { option: "" }, //自定义状态码释义
reducer: { name: "" },
});
}
export function getStatusSimpleAll() {
return (dispatch) =>
basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_STATUS_SIMPLE_ALL",
url: `${ApiTable.getStatusSimpleAll}`,
msg: { option: "" }, //获取摄像头能力列表
reducer: { name: "" },
});
}