2023-05-04 09:25:35 +08:00
|
|
|
|
import { ResPage, User } from "@/api/types/common";
|
|
|
|
|
|
// import { BASEURL } from "@/api/config/servicePort";
|
|
|
|
|
|
import http from "@/api";
|
2023-05-13 18:42:57 +08:00
|
|
|
|
import axios from "axios";
|
2023-05-04 09:25:35 +08:00
|
|
|
|
|
|
|
|
|
|
const BASEURL = import.meta.env.VITE_API_URL;
|
2023-05-13 18:42:57 +08:00
|
|
|
|
// const BASEURL1 = import.meta.env.VITE_API_URL + "6868";
|
2023-05-04 09:25:35 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @name 公共的模块统一抽离api
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2023-05-19 17:02:08 +08:00
|
|
|
|
// 获取权限下的工程列表 主要用于侧边栏查询工程
|
|
|
|
|
|
export const getRelevanceList = () => {
|
|
|
|
|
|
return http.get(BASEURL + `/xmgl/userDataScope/relevanceList`);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-05-04 09:25:35 +08:00
|
|
|
|
// 添加政策法规信息
|
|
|
|
|
|
export const addLows = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/policy/add`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
//分页查询我发布的通知公告
|
|
|
|
|
|
export const myPostPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/xmgl/policy/fromMePage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 编辑
|
|
|
|
|
|
export const editmyPost = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/policy/edit`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 删除政策法规信息
|
|
|
|
|
|
export const delMyPost = (params: { policyId: number }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/policy/delete`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export const getDetailPolicy = (params: { policyId: number }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/policy/queryById`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//分页查询我接收的通知公告
|
|
|
|
|
|
export const myReceivePage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/xmgl/policy/toMePage`, params);
|
|
|
|
|
|
};
|
2023-05-13 18:42:57 +08:00
|
|
|
|
|
|
|
|
|
|
// 海康 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 获取监控点预览取流
|
|
|
|
|
|
export const getpreviewURL = (params: { cameraIndexCode: string | null }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/video/previewURL`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 获取监控点预览取流 //点击tree的父获取全部视频
|
|
|
|
|
|
export const getpreviewURLS = (params: { cameraIndexCode: string | null }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/video/previewURLs`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 海康监控图片抓拍
|
|
|
|
|
|
// export const getmanualCaptureL = (params: { monitorCode: string }) => {
|
|
|
|
|
|
// return http.post(BASEURL + `/xmgl/video/previewURL`, params);
|
|
|
|
|
|
// };
|
|
|
|
|
|
export const getmanualCaptureL = (params: {}) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/video/manualCapture`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-05-19 17:02:08 +08:00
|
|
|
|
// 通知公告!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
// 新建通知
|
|
|
|
|
|
export const addNotice = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/notice/add`, params);
|
2023-05-13 18:42:57 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2023-05-19 17:02:08 +08:00
|
|
|
|
// 我接收的
|
|
|
|
|
|
export const myNoticeReceivePage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/xmgl/notice/toMePage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
//分页查询我发布的通知公告
|
|
|
|
|
|
export const noticemyPostPage = (params: User.ReqUserParams) => {
|
|
|
|
|
|
return http.post<ResPage<User.ResUserList>>(BASEURL + `/xmgl/notice/fromMePage`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 编辑
|
|
|
|
|
|
export const noticeeditmyPost = (params: FormData) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/notice/edit`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 删除政策法规信息
|
|
|
|
|
|
export const noticedelMyPost = (params: { noticeId: number }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/notice/delete`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
// 通过id查询通知公告表信息
|
|
|
|
|
|
export const noticeDetailMyPost = (params: { noticeId: string }) => {
|
2023-05-25 09:26:19 +08:00
|
|
|
|
return http.post(BASEURL + `/xmgl/notice/queryById`, params, { headers: { noLoading: true } });
|
2023-05-19 17:02:08 +08:00
|
|
|
|
};
|
|
|
|
|
|
// 阅读通知公告
|
|
|
|
|
|
export const noticeReadMyPost = (params: { noticeId: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/notice/read`, params);
|
2023-05-13 18:42:57 +08:00
|
|
|
|
};
|