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.
86 lines
2.4 KiB
86 lines
2.4 KiB
'use strict';
|
|
|
|
import { ApiTable, basicAction } from '$utils'
|
|
|
|
export function getProjectGroup () {
|
|
return (dispatch) => basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
actionType: "GET_PROJECT_GROPUP",
|
|
url: `${ApiTable.projectGroup}`,
|
|
msg: { error: "获取项目分组失败" },
|
|
reducer: { name: "projectGroup", params: { noClear: true } },
|
|
});
|
|
}
|
|
|
|
export function editProjectGroup (data) {
|
|
return (dispatch) => basicAction({
|
|
type: "put",
|
|
data,
|
|
dispatch: dispatch,
|
|
actionType: "EDIT_PROJECT_GROPUP",
|
|
url: `${ApiTable.projectGroup}`,
|
|
msg: { option: (data?.id ? '编辑' : '添加') + "项目分组" },
|
|
});
|
|
}
|
|
|
|
export function delProjectGroup (id) {
|
|
return (dispatch) => basicAction({
|
|
type: "del",
|
|
dispatch: dispatch,
|
|
actionType: "DEL_PROJECT_GROPUP",
|
|
url: `${ApiTable.projectGroup}?groupId=${id}`,
|
|
msg: { option: "删除项目分组" },
|
|
});
|
|
}
|
|
|
|
export function groupStatistic () {
|
|
return (dispatch) => basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
actionType: "GET_GROPUP_STATISTICS",
|
|
url: `${ApiTable.groupStatistic}`,
|
|
msg: { error: "获取项目分组统计信息失败" },
|
|
reducer: { name: "groupStatistic", params: { noClear: true } },
|
|
});
|
|
}
|
|
|
|
export function groupStatisticOnline (query = {}) {
|
|
return (dispatch) => basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
query,
|
|
actionType: "GET_GROPUP_STATISTICS_ONLINE`",
|
|
url: `${ApiTable.groupStatisticOnline}`,
|
|
msg: { error: "获取项目分组在线率统计信息失败" },
|
|
reducer: { name: "groupStatisticOnline", params: { noClear: true } },
|
|
});
|
|
}
|
|
|
|
|
|
export function groupStatisticAlarm (query = {}) {
|
|
return (dispatch) => basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
query,
|
|
actionType: "GET_STATISTICALARM",
|
|
url: `${ApiTable.groupStatisticAlarm}`,
|
|
msg: { error: "获取项目分组告警统计信息失败" },
|
|
reducer: { name: "groupStatisticAlarm",
|
|
params: { noClear: true } },
|
|
});
|
|
}
|
|
|
|
export function groupProject (query = {}) {
|
|
return (dispatch) => basicAction({
|
|
type: "get",
|
|
dispatch: dispatch,
|
|
query,
|
|
actionType: "GET_GROUP_PROJECT",
|
|
url: `${ApiTable.groupProject}`,
|
|
msg: { error: "获取分组项目信息失败" },
|
|
reducer: { name: "groupProject",
|
|
params: { noClear: true } },
|
|
});
|
|
}
|
|
|
|
|