2023-03-24 19:36:11 +08:00
|
|
|
|
import { ResPage, User } from "@/api/types/common";
|
2023-04-25 10:48:27 +08:00
|
|
|
|
import { ReqAiMonitorDev, ResAiMonitorDev, ReqAiadd, ResAiadd } from "@/api/types/government/AIwaring";
|
2023-03-24 19:36:11 +08:00
|
|
|
|
// import { BASEURL } from "@/api/config/servicePort";
|
|
|
|
|
|
import http from "@/api";
|
|
|
|
|
|
|
|
|
|
|
|
const BASEURL = import.meta.env.VITE_API_URL;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @name 政府
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
// 政府的首页
|
|
|
|
|
|
export const getHomePage = () => {
|
|
|
|
|
|
return http.get(BASEURL + `/xmgl/baseModule/queryBySelf`);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 获取所有模块标签 就是labelName
|
|
|
|
|
|
export const getModuleList = () => {
|
|
|
|
|
|
return http.get(BASEURL + `/xmgl/baseModule/queryTitle`);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 项目审批 !!!!!!!!!!!!!
|
|
|
|
|
|
// 获取项目审批页面信息
|
|
|
|
|
|
export const getProjectApproveList = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/project/page`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// * 项目通过与驳回
|
|
|
|
|
|
export const editProjectApprove = (params: { projectId: string; suggest: number }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/project/examine`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 企业审批 !!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
export const getCompanyApproveList = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/enterprise/page`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 通过id查询企业信息
|
|
|
|
|
|
export const getIdCompanyList = (params: { enterpriseId: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/enterprise/queryById`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 通过id查询企业详细信息
|
|
|
|
|
|
export const getIdCompanyDetail = (params: { id: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/enterprise/getDetailById`, params);
|
|
|
|
|
|
};
|
2023-04-07 17:06:54 +08:00
|
|
|
|
// 企业审批的编辑
|
2023-03-24 19:36:11 +08:00
|
|
|
|
export const editCompanyApprove = (params: { enterpriseId: string; suggest: number }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/enterprise/examine`, params);
|
|
|
|
|
|
};
|
2023-04-07 17:06:54 +08:00
|
|
|
|
|
|
|
|
|
|
// 工程审批!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
export const getEngineeringApproveList = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/engineering/page`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 通过id查询项目工程详细信息
|
|
|
|
|
|
export const getIdEngApproveList = (params: { id: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/engineering/queryDetailById`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 通过id查询项目工程表信息
|
|
|
|
|
|
export const getIdEngApprovettable = (params: { id: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/engineering/queryById`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 编辑项目工程表信息
|
|
|
|
|
|
export const getEditEngApprove = (params: { id: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/engineering/edit`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 工程审批与驳回
|
|
|
|
|
|
export const rejectEngineeringApprove = (params: { id: string; suggest: number; rejectReason?: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/engineering/examine`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 修改工程定位信息
|
|
|
|
|
|
export const editEngineeringApprovePosition = (params: { id: string; latitude: string; longitude: string }) => {
|
2023-04-25 10:48:27 +08:00
|
|
|
|
return http.post(BASEURL + `/gov/engineering/editPosition`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 修改工程定位信息
|
|
|
|
|
|
export const editEngineeringApproveState = (params: { state: number | undefined; id: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/engineering/editState`, params);
|
2023-04-07 17:06:54 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 所在区域
|
|
|
|
|
|
export const getEngineeringApproveArea = () => {
|
|
|
|
|
|
return http.get(BASEURL + `/gov/engineering/queryDistrict`);
|
|
|
|
|
|
};
|
2023-04-25 10:48:27 +08:00
|
|
|
|
|
|
|
|
|
|
// 用户管理 !!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 角色管理!!!!!!!!
|
|
|
|
|
|
export const getRoleList = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/systemRole/page`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 新增角色 添加系统角色信息
|
|
|
|
|
|
export const addRole = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemRole/add`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 编辑系统角色信息
|
|
|
|
|
|
export const editRole = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemRole/edit`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 删除系统角色信息
|
|
|
|
|
|
export const deleteRole = (params: { roleId: number }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemRole/delete`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 编辑角色权限
|
|
|
|
|
|
export const editRolePermissions = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemRole/editMenu`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 上下两个错误 具体看后续
|
|
|
|
|
|
// 通过id查询系统角色信息
|
|
|
|
|
|
export const getSystemRole = (params: { id: number }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemRole/queryById`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 获取树形模块、菜单全部信息
|
|
|
|
|
|
export const getTreemRoleList = () => {
|
|
|
|
|
|
return http.get(BASEURL + `/xmgl/baseMenu/queryAll`);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 列表查询系统角色信息 这里用来用户管理的下拉框显示
|
|
|
|
|
|
export const getRoleNamelist = (params: { state: number | string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemRole/list`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 部门管理!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 层级查询政府内部部门信息
|
|
|
|
|
|
export const getTreeDeptList = () => {
|
|
|
|
|
|
return http.get(BASEURL + `/gov/systemDept/tree`);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 列表查询政府内部部门信息
|
|
|
|
|
|
export const getTreeList = (params?: { deptId: number | string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemDept/list`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 新增角色 添加政府内部部门信息
|
|
|
|
|
|
export const addTreeDeptMent = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemDept/add`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 编辑政府内部部门信息
|
|
|
|
|
|
export const editTreeDeptMent = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemDept/edit`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 删除系统用户表信息
|
|
|
|
|
|
export const delTreeDeptMent = (params: { deptId: number }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/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 + `/gov/systemUser/page`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 新增角色 添加系统用户表信息
|
|
|
|
|
|
export const addUser = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemUser/add`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 编辑
|
|
|
|
|
|
export const editUser = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemUser/edit`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 删除系统用户表信息
|
|
|
|
|
|
export const deleteUser = (params: { userId: number }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemUser/delete`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// AI预警!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 预警地图!!!!!!!!!!!
|
|
|
|
|
|
// 分页列表查询AI预警项目信息
|
|
|
|
|
|
export const getAIprojectPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorDev/projectPage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 分页列表查询AI预警工程信息
|
|
|
|
|
|
export const getAIengineeringPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorDev/engineeringPage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 统计AI预警设备数据
|
|
|
|
|
|
export const getAIstatistics = () => {
|
|
|
|
|
|
return http.get<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorDev/statistics`);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 列表查询AI预警设备管理信息
|
|
|
|
|
|
export const getAiMonitorDev = (params: ReqAiMonitorDev) => {
|
|
|
|
|
|
return http.post<ResPage<ResAiMonitorDev>>(BASEURL + `/gov/aiMonitorDev/list`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 列表查询AI预警设备管理信息
|
|
|
|
|
|
export const getAIdetail = (params: ReqAiMonitorDev) => {
|
|
|
|
|
|
return http.post<ResPage<ResAiMonitorDev>>(BASEURL + `/gov/aiMonitorDev/queryDetailById`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 接入情况!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 分页列表查询AI报警记录信息
|
|
|
|
|
|
export const getAIQuestionPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorAlarm/page`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 接入情况下的项目分页
|
|
|
|
|
|
export const getAIprojectQuestionPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorQuestion/projectPage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 接入情况下的工程分页
|
|
|
|
|
|
export const getAIengQuestionPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorQuestion/engineeringPage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 新增预警整改记录
|
|
|
|
|
|
export const addAIQuestionPage = (params: ReqAiadd) => {
|
|
|
|
|
|
return http.post<ResPage<ResAiadd>>(BASEURL + `/gov/aiMonitorQuestion/add`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 整改记录!!!!!!!!!!!!!!
|
|
|
|
|
|
// 分页列表查询
|
|
|
|
|
|
export const getAIRecordPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorQuestion/page`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 整改记录下的项目分页
|
|
|
|
|
|
export const getAIprojectAlarmPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorAlarm/projectPage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 整改记录下的工程分页
|
|
|
|
|
|
export const getAIengAlarmPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorAlarm/engineeringPage`, params);
|
|
|
|
|
|
};
|