159 lines
6.1 KiB
TypeScript
159 lines
6.1 KiB
TypeScript
|
|
import { ResPage, User } from "@/api/types/common";
|
|||
|
|
// import { BASEURL } from "@/api/config/servicePort";
|
|||
|
|
import http from "@/api";
|
|||
|
|
import { ReqAiMonitorDev, ResAiMonitorDev, ReqAiadd, ResAiadd } from "@/api/types/government/AIwaring";
|
|||
|
|
|
|||
|
|
const BASEURL = import.meta.env.VITE_API_URL;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @name 企业
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
// 查询工程列表
|
|||
|
|
export const getengineeringList = (params: object) => {
|
|||
|
|
return http.post(BASEURL + `/ent/engineering/list`, params);
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 用户管理 !!!!!!!!!!!!!!!!!
|
|||
|
|
// 角色管理!!!!!!!!
|
|||
|
|
export const getRoleList = (params: User.ReqUserParams) => {
|
|||
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/ent/systemRole/page`, params);
|
|||
|
|
};
|
|||
|
|
// 新增角色 添加系统角色信息
|
|||
|
|
export const addRole = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemRole/add`, params);
|
|||
|
|
};
|
|||
|
|
// 编辑系统角色信息
|
|||
|
|
export const editRole = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemRole/edit`, params);
|
|||
|
|
};
|
|||
|
|
// 删除系统角色信息
|
|||
|
|
export const deleteRole = (params: { roleId: number }) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemRole/delete`, params);
|
|||
|
|
};
|
|||
|
|
// 编辑角色权限
|
|||
|
|
export const editRolePermissions = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemRole/editMenu`, params);
|
|||
|
|
};
|
|||
|
|
// 上下两个错误 具体看后续
|
|||
|
|
// 通过id查询系统角色信息
|
|||
|
|
export const getSystemRole = (params: { id: number }) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemRole/queryById`, params);
|
|||
|
|
};
|
|||
|
|
// 获取树形模块、菜单全部信息
|
|||
|
|
export const getTreemRoleList = () => {
|
|||
|
|
return http.get(BASEURL + `/xmgl/baseMenu/queryAll`);
|
|||
|
|
};
|
|||
|
|
// 列表查询系统角色信息 这里用来用户管理的下拉框显示
|
|||
|
|
export const getRoleNamelist = (params: { state: number | string }) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemRole/list`, params);
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 部门管理!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|||
|
|
// 层级查询政府内部部门信息
|
|||
|
|
export const getTreeDeptList = () => {
|
|||
|
|
return http.get(BASEURL + `/ent/systemDept/tree`);
|
|||
|
|
};
|
|||
|
|
// 列表查询政府内部部门信息
|
|||
|
|
export const getTreeList = (params?: { deptId: number | string }) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemDept/list`, params);
|
|||
|
|
};
|
|||
|
|
// 新增角色 添加政府内部部门信息
|
|||
|
|
export const addTreeDeptMent = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemDept/add`, params);
|
|||
|
|
};
|
|||
|
|
// 编辑政府内部部门信息
|
|||
|
|
export const editTreeDeptMent = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemDept/edit`, params);
|
|||
|
|
};
|
|||
|
|
// 删除系统用户表信息
|
|||
|
|
export const delTreeDeptMent = (params: { deptId: number }) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemDept/delete`, params);
|
|||
|
|
};
|
|||
|
|
// 通过id查询系统菜单信息
|
|||
|
|
export const getTreeByIdList = (params: { roleId: number | string }) => {
|
|||
|
|
return http.post(BASEURL + `/xmgl/baseMenu/queryByRole`, params);
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 用户管理!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|||
|
|
export const getUserPage = (params: User.ReqUserParams) => {
|
|||
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/ent/systemUser/page`, params);
|
|||
|
|
};
|
|||
|
|
// 新增角色 添加系统用户表信息
|
|||
|
|
export const addUser = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemUser/add`, params);
|
|||
|
|
};
|
|||
|
|
// 编辑
|
|||
|
|
export const editUser = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemUser/edit`, params);
|
|||
|
|
};
|
|||
|
|
// 删除系统用户表信息
|
|||
|
|
export const deleteUser = (params: { userId: number }) => {
|
|||
|
|
return http.post(BASEURL + `/ent/systemUser/delete`, params);
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// AI预警!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|||
|
|
|
|||
|
|
// AI监控管理!!!!!!!!!
|
|||
|
|
export const getAIMonitoringPage = (params: User.ReqUserParams) => {
|
|||
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/ent/aiMonitorDev/page`, params);
|
|||
|
|
};
|
|||
|
|
// 编辑
|
|||
|
|
export const editAImap = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/aiMonitorDev/edit`, params);
|
|||
|
|
};
|
|||
|
|
// 删除
|
|||
|
|
export const deleteAImap = (params: { aiMonitorId: number }) => {
|
|||
|
|
return http.post(BASEURL + `/ent/aiMonitorDev/delete`, params);
|
|||
|
|
};
|
|||
|
|
// 新增角色
|
|||
|
|
export const addAImap = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/aiMonitorDev/add`, params);
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 报警记录!!!!!!!!!!!!!!!!
|
|||
|
|
// 分页列表查询AI报警记录信息
|
|||
|
|
export const getAIAlarmPage = (params: User.ReqUserParams) => {
|
|||
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/ent/aiMonitorAlarm/page`, params);
|
|||
|
|
};
|
|||
|
|
// 报警记录的去整改
|
|||
|
|
export const addAIrecords = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/aiMonitorQuestion/add`, params);
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 通过id查询AI预警整改记录信息
|
|||
|
|
export const getIdAIrecords = (params: { id: string }) => {
|
|||
|
|
return http.post(BASEURL + `/ent/aiMonitorAlarm/queryById`, params);
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 分页列表查询AI预警工程信息
|
|||
|
|
export const getAIengineeringPage = (params: User.ReqUserParams) => {
|
|||
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/ent/engineering/page`, params);
|
|||
|
|
};
|
|||
|
|
// 分页列表查询AI报警记录信息
|
|||
|
|
export const getAIQuestionPage = (params: User.ReqUserParams) => {
|
|||
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/ent/aiMonitorAlarm/page`, params);
|
|||
|
|
};
|
|||
|
|
// 新增预警整改记录
|
|||
|
|
export const addAIQuestionPage = (params: ReqAiadd) => {
|
|||
|
|
return http.post<ResPage<ResAiadd>>(BASEURL + `/ent/aiMonitorQuestion/add`, params);
|
|||
|
|
};
|
|||
|
|
// 列表查询AI预警设备管理信息
|
|||
|
|
export const getAiMonitorDev = (params: ReqAiMonitorDev) => {
|
|||
|
|
return http.post<ResPage<ResAiMonitorDev>>(BASEURL + `/ent/aiMonitorDev/list`, params);
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
// 整改记录!!!!!!!!!!!!!!
|
|||
|
|
// 分页列表查询
|
|||
|
|
export const getAIRectificationPage = (params: User.ReqUserParams) => {
|
|||
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/ent/aiMonitorQuestion/page`, params);
|
|||
|
|
};
|
|||
|
|
// 删除
|
|||
|
|
export const deleteAIrecords = (params: { id: string }) => {
|
|||
|
|
return http.post(BASEURL + `/ent/aiMonitorQuestion/delete`, params);
|
|||
|
|
};
|
|||
|
|
// 问题整改
|
|||
|
|
export const editAIrecords = (params: FormData) => {
|
|||
|
|
return http.post(BASEURL + `/ent/aiMonitorQuestion/edit`, params);
|
|||
|
|
};
|