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.
76 lines
1.9 KiB
76 lines
1.9 KiB
"use strict";
|
|
|
|
import { basicAction } from "@peace/utils";
|
|
import { ApiTable } from "$utils";
|
|
|
|
export function getMembers(orgId) {
|
|
return (dispatch) =>
|
|
basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
actionType: "GET_MEMBERS",
|
|
url: `${ApiTable.getEnterprisesMembers.replace("{enterpriseId}", orgId)}`,
|
|
msg: { error: "获取用户列表失败" },
|
|
reducer: { name: "members" },
|
|
});
|
|
}
|
|
|
|
export function getNvr(query) {
|
|
return (dispatch) =>
|
|
basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
actionType: "GET_NVR",
|
|
query: query,
|
|
url: `${ApiTable.getNvr}`,
|
|
msg: { option: "获取nvr列表信息" },
|
|
reducer: { name: "equipmentWarehouseNvr" },
|
|
});
|
|
}
|
|
|
|
export function getNvrDetails(orgId) {
|
|
return (dispatch) =>
|
|
basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
actionType: "GET_NVR_DETAILS",
|
|
url: `${ApiTable.getNvrDetails.replace("{nvrId}", orgId)}`,
|
|
msg: { option: "" }, //获取nvr详情
|
|
reducer: { name: "nvrDetails" },
|
|
});
|
|
}
|
|
export function delNvr(orgId) {
|
|
return (dispatch) =>
|
|
basicAction({
|
|
type: "del",
|
|
dispatch: dispatch,
|
|
actionType: "DEL_NVR",
|
|
url: `${ApiTable.delNvr.replace("{nvrId}", orgId)}`,
|
|
msg: { option: "删除NVR" },
|
|
reducer: { name: "" },
|
|
});
|
|
}
|
|
export function addchangeNvr(data) {
|
|
return (dispatch) =>
|
|
basicAction({
|
|
type: "post",
|
|
dispatch: dispatch,
|
|
data,
|
|
actionType: "ADD_CHANGE_NVR",
|
|
msg: { option: "添加/修改" },
|
|
url: `${ApiTable.nvr}`,
|
|
});
|
|
}
|
|
|
|
export function getVender() {
|
|
//获取设备厂商
|
|
return (dispatch) =>
|
|
basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
actionType: "GET_VENDER",
|
|
url: `${ApiTable.getVender}`,
|
|
msg: { error: "获取设备厂商失败" },
|
|
reducer: { name: "vender" },
|
|
});
|
|
}
|
|
|