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
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
// 添加政策法规信息
|
|
|
|
|
|
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);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// test请求参数: {configKey:"bi_config”
|
|
|
|
|
|
export const getTestName = (params: { configKey: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/xmgl/systemConfig/queryByKey`, params);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export const getToken = (params: { configKey: string }) => {
|
|
|
|
|
|
return http.post(BASEURL + `/token/generate`, params);
|
|
|
|
|
|
};
|