45 lines
2.0 KiB
TypeScript
45 lines
2.0 KiB
TypeScript
|
|
import { ScreenRequest, ScreenResponse } from "@/api/types/common";
|
||
|
|
import http from "@/api";
|
||
|
|
// 这是开发大屏的
|
||
|
|
const BASEURL2 = import.meta.env.VITE_BIg_API_URL;
|
||
|
|
// 这是开发本地的
|
||
|
|
const BASEURL = import.meta.env.VITE_API_URL;
|
||
|
|
// const BASEURL = "http://192.168.34.155:6868";
|
||
|
|
// const BASEURL2 = "http://192.168.34.155:6688";
|
||
|
|
/**
|
||
|
|
* @name 可视化大屏
|
||
|
|
*/
|
||
|
|
|
||
|
|
//获取appid和secret
|
||
|
|
export const getAppidSecret = (params: ScreenRequest.AppidSecretRequest) => {
|
||
|
|
return http.post<ScreenResponse.AppidSecretResponse>(BASEURL + `/xmgl/systemConfig/queryByKey`, params);
|
||
|
|
};
|
||
|
|
//获取token
|
||
|
|
export const getToke = (params: ScreenRequest.TokeRequest) => {
|
||
|
|
return http.get<ScreenResponse.TokeResponse>(BASEURL2 + `/token/generate`, params);
|
||
|
|
};
|
||
|
|
//企业资质统计
|
||
|
|
export const getCompanyAll = (params: ScreenRequest.CompanyAllRequest) => {
|
||
|
|
return http.post<ScreenResponse.CompanyAllResponse>(BASEURL2 + `/api/index/enterpriseMainStat`, params);
|
||
|
|
};
|
||
|
|
//查询工程分类统计
|
||
|
|
export const getProjectAll = (params: ScreenRequest.ProjectAllRequest) => {
|
||
|
|
return http.post<ScreenResponse.ProjectAllResponse>(BASEURL2 + `/api/index/engineeringTypeStat`, params);
|
||
|
|
};
|
||
|
|
//查询所有项目数
|
||
|
|
export const getProjectNumber = (params: ScreenRequest.ProjectNumberRequest) => {
|
||
|
|
return http.post<ScreenResponse.ProjectNumberResponse>(BASEURL2 + `/api/index/projectStat`, params);
|
||
|
|
};
|
||
|
|
//扬尘报警类型统计
|
||
|
|
export const getFugitiveDustAll = (params: ScreenRequest.FugitiveDustAllRequest) => {
|
||
|
|
return http.post<ScreenResponse.FugitiveDustAllResponse>(BASEURL2 + `/api/index/environmentAlarmStat`, params);
|
||
|
|
};
|
||
|
|
//实名制信息统计
|
||
|
|
export const getRealNameSystem = (params: ScreenRequest.RealNameSystemRequest) => {
|
||
|
|
return http.post<ScreenResponse.RealNameSystemResponse>(BASEURL2 + `/api/index/workerStat`, params);
|
||
|
|
};
|
||
|
|
//顶部查询工程统计信息
|
||
|
|
export const getEngineeringAll = (params: ScreenRequest.EngineeringAllRequest) => {
|
||
|
|
return http.post<ScreenResponse.EngineeringAllResponse>(BASEURL2 + `/api/index/engineeringStat`, params);
|
||
|
|
};
|