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);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 修改工程定位信息
|
2023-05-23 10:47:27 +08:00
|
|
|
|
export const editEngineeringApprovePosition = (params: { id: string; latitude: string; longitude: string; address?: 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);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-05-19 17:02:08 +08:00
|
|
|
|
// 列表查询系统用户表信息 用户通知公告中获取政务人员
|
|
|
|
|
|
export const getgovNamelist = (params: {}) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/systemUser/list`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 政务列表查询企业 通知通告的企业
|
|
|
|
|
|
export const getentNamelist = (params: {}) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/enterprise/list`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 同上 项目
|
|
|
|
|
|
export const getproNamelist = (params: {}) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/project/list`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-04-25 10:48:27 +08:00
|
|
|
|
// 部门管理!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 层级查询政府内部部门信息
|
|
|
|
|
|
export const getTreeDeptList = () => {
|
|
|
|
|
|
return http.get(BASEURL + `/gov/systemDept/tree`);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 列表查询政府内部部门信息
|
2023-05-19 17:02:08 +08:00
|
|
|
|
export const getTreeList = (params?: { deptId: number | string; status?: number }) => {
|
2023-04-25 10:48:27 +08:00
|
|
|
|
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);
|
|
|
|
|
|
};
|
2023-05-13 18:42:57 +08:00
|
|
|
|
|
|
|
|
|
|
// 列表查询项目信息 // 主要获取地图下的设备列表
|
|
|
|
|
|
export const AIproList = (params: User.ReqUserParams | {}) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/project/list`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 列表查询工程信息 // 主要获取地图下的设备列表
|
|
|
|
|
|
export const AIengList = (params: User.ReqUserParams | {}) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/engineering/list`, params);
|
|
|
|
|
|
};
|
2023-04-25 10:48:27 +08:00
|
|
|
|
// 统计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);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-05-13 18:42:57 +08:00
|
|
|
|
// 通过项目SN查询地图AI预警详细信息
|
|
|
|
|
|
export const getAIprodetail = (params: ReqAiMonitorDev) => {
|
|
|
|
|
|
return http.post<ResPage<ResAiMonitorDev>>(BASEURL + `/gov/project/queryMapAiAlarmById`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 通过工程SN查询地图AI预警详细信息
|
|
|
|
|
|
export const getAIengdetail = (params: ReqAiMonitorDev) => {
|
|
|
|
|
|
return http.post<ResPage<ResAiMonitorDev>>(BASEURL + `/gov/engineering/queryMapAiAlarmById`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-04-25 10:48:27 +08:00
|
|
|
|
// 接入情况!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 分页列表查询AI报警记录信息
|
|
|
|
|
|
export const getAIQuestionPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorAlarm/page`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 新增预警整改记录
|
2023-05-04 09:25:35 +08:00
|
|
|
|
export const addAIrecords = (params: ReqAiadd) => {
|
|
|
|
|
|
return http.post<ResPage<ResAiadd>>(BASEURL + `/gov/aiMonitorAlarm/addQuestion`, params);
|
2023-04-25 10:48:27 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 整改记录!!!!!!!!!!!!!!
|
|
|
|
|
|
// 分页列表查询
|
|
|
|
|
|
export const getAIRecordPage = (params: User.ReqUserParams) => {
|
2023-05-04 09:25:35 +08:00
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/aiMonitorAlarm/page`, params);
|
2023-04-25 10:48:27 +08:00
|
|
|
|
};
|
|
|
|
|
|
// 整改记录下的项目分页
|
|
|
|
|
|
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);
|
|
|
|
|
|
};
|
2023-05-04 09:25:35 +08:00
|
|
|
|
|
|
|
|
|
|
// 扬尘管理!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 分页列表查询扬尘工程信息
|
|
|
|
|
|
export const getDustprojectPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/environmentDev/projectPage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 分页列表查询AI预警工程信息
|
|
|
|
|
|
export const getDustengineeringPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/environmentDev/engineeringPage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 统计扬尘设备数据
|
|
|
|
|
|
export const getDuststatistics = () => {
|
|
|
|
|
|
return http.get<ResPage<User.ResUserList>>(BASEURL + `/gov/environmentDev/statistics`);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 列表查询扬尘设备管理信息
|
|
|
|
|
|
export const getDustMonitorDev = (params: ReqAiMonitorDev) => {
|
|
|
|
|
|
return http.post<ResPage<ResAiMonitorDev>>(BASEURL + `/gov/environmentDev/list`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 通过设备ID查询设备详细信息
|
2023-05-13 18:42:57 +08:00
|
|
|
|
// export const getDustdetail = (params: ResAiadd) => {
|
|
|
|
|
|
// return http.post<ResPage<ResAiMonitorDev>>(BASEURL + `/gov/environmentDev/queryDetailById`, params);
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
// 通过项目SN查询地图扬尘预警详细信息
|
|
|
|
|
|
export const getproDetail = (params: ResAiadd) => {
|
|
|
|
|
|
return http.post<ResPage<ResAiMonitorDev>>(BASEURL + `/gov/project/queryMapEnvironAlarmById`, params);
|
2023-05-04 09:25:35 +08:00
|
|
|
|
};
|
2023-05-13 18:42:57 +08:00
|
|
|
|
// 通过工程SN查询地图扬尘预警详细信息
|
|
|
|
|
|
export const getengDetail = (params: ResAiadd) => {
|
|
|
|
|
|
return http.post<ResPage<ResAiMonitorDev>>(BASEURL + `/gov/engineering/queryMapEnvironAlarmById`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 视频监控!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 分页列表查询视频管理表信息
|
|
|
|
|
|
export const getVideoQuestionPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/monitorQuestion/page`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 添加视频抓拍记录信息
|
|
|
|
|
|
export const addmonitorQuestion = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/gov/monitorQuestion/add`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 获取项目监控点树形列表
|
|
|
|
|
|
export const getvideoProTreeList = (params: {}) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/projectMonitor/projectTree`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 获取工程监控点树形列表
|
|
|
|
|
|
export const getvideoEngTreeList = (params: {}) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/projectMonitor/engineeringTree`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 列表查询视频管理表信息
|
|
|
|
|
|
// export const getVideo = (params: { projectSn?: string; engineeringSn?: string }) => {
|
|
|
|
|
|
// return http.post<ResPage<User.ResUserList>>(BASEURL + `/gov/projectMonitor/engineeringTree`, params);
|
|
|
|
|
|
// };
|