93 lines
3.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { ResPage, User } from "@/api/types/common";
// import { BASEURL } from "@/api/config/servicePort";
import http from "@/api";
import axios from "axios";
const BASEURL = import.meta.env.VITE_API_URL;
// const BASEURL1 = import.meta.env.VITE_API_URL + "6868";
/**
* @name 公共的模块统一抽离api
*/
// 获取权限下的工程列表 主要用于侧边栏查询工程
export const getRelevanceList = () => {
return http.get(BASEURL + `/xmgl/userDataScope/relevanceList`);
};
// 添加政策法规信息
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);
};
// 海康
// 获取监控点预览取流
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);
};
// 通知公告!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// 新建通知
export const addNotice = (params: FormData) => {
return http.post(BASEURL + `/xmgl/notice/add`, params);
};
// 我接收的
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 }) => {
return http.post(BASEURL + `/xmgl/notice/queryById`, params, { headers: { noLoading: true } });
};
// 阅读通知公告
export const noticeReadMyPost = (params: { noticeId: string }) => {
return http.post(BASEURL + `/xmgl/notice/read`, params);
};