import request from '@/utils/request' import axios from 'axios' import qs from 'qs' if (process.env.NODE_ENV === 'development') { axios.defaults.baseURL = '/' } else if (process.env.NODE_ENV === 'production') { axios.defaults.baseURL = '/' } //设置公共请求头 //获取token登录接口 export const getToken = (data) => { // axios.defaults.headers.common['Authorization'] = `Basic c2FiZXI6c2FiZXJfc2VjcmV0`; // axios.defaults.headers.common['Tenant-Id'] = `748495` return axios.post('api/blade-auth/oauth/token'+'?grant_type='+data.grant_type+'&scope='+data.scope +'&tenantId='+data.tenantId+'&username='+data.username+'&password='+data.password+'&type='+data.type, data, {headers: {'Authorization':'Basic c2FiZXI6c2FiZXJfc2VjcmV0', 'Tenant-Id': '748495','Content-Type': 'application/json;charset=UTF-8'}} ) }; //项目信息接口 export const getProjectInfo = (params) => { let access_token = JSON.parse(sessionStorage.getItem("token")) axios.defaults.headers.common['Blade-Auth'] = access_token; return axios.get('api/ems-third-party-service/project/list', params, ) }; //人员信息监控接口 export const getUserMonitorInfo = (params) => { return axios.get('api/ems-third-party-service/user/monitor',{ params, } ) }; //项目人员分组信息接口 export const getUserGroup = (params) => { return axios.get('api/ems-third-party-service/user/group', {params}, ) }; //项目进度接口 export const getProjectStatus = (params) => { return axios.get('api/ems-third-party-service/project/projectStatus', {params}, ) }; //安全检查统计 export const getProjectCheckCensus = (params) => { return axios.get('api/ems-third-party-service/project/checkCensus', {params}, ) }; //安全检查跟踪 export const getProjectCheckInfo = (params) => { return axios.get('api/ems-third-party-service/project/checkInfo', {params}, ) }; //工程工期 export const getProjectDuration = (params) => { return axios.get('api/ems-third-party-service/project/projectDuration', {params}, ) }; //投资进度 export const getProjectInvestment = (params) => { return axios.get('api/ems-third-party-service/project/projectInvestment', {params}, ) }; //计划进度 export const getPlanProgress = (params) => { return axios.get('api/ems-third-party-service/project/planProgress', {params}, ) }; //实时进度 export const getActualProgress = (params) => { return axios.get('api/ems-third-party-service/project/actualProgress', {params}, ) }; //本月任务完成情况 export const getCompleteMonthStatus = (params) => { return axios.get('api/ems-third-party-service/project/completeMonthStatus', {params}, ) }; //视频监控 export const getIsImportant = (params) => { return axios.get('api/ems-third-party-service/camera/isImportant', {params}, ) }; //获取所有监控接口 export const getAllCamera = (params) => { return axios.get('api/ems-third-party-service/camera/all/get', {params}, ) }; //获取所有监控接口列表 export const getAllCameraList = (params) => { return axios.get('api/ems-third-party-service/camera/all/get', {params}, ) }; //获取摄像头数量接口 export const getCameraCount = (params) => { return axios.get('api/ems-third-party-service/camera/count', {params}, ) }; //获取摄像头历史监控 export const getCameraHistory = (params) => { return axios.get('api/ems-third-party-service/camera/history', {params}, ) }; //安全检查统计 export const getCheckTotalCensus = (params) => { return axios.get('api/ems-third-party-service/project/checkTotalCensus', {params}, ) }; //检查次数统计 export const getCheckTimesCensus = (params) => { return axios.get('api/ems-third-party-service/project/checkTimesCensus', {params}, ) }; //隐患检查统计 export const getResolveTroubleCensus = (params) => { return axios.get('api/ems-third-party-service/project/resolveTroubleCensus', {params}, ) }; // //高频问题项 export const getMostTroubleCensus = (params) => { return axios.get('api/ems-third-party-service/project/mostTroubleCensus', {params}, ) }; //安全告警统计 export const getWarnSurveillance = (params) => { return axios.get('api/ems-third-party-service/project/warnSurveillance', {params}, ) }; //隐患整改记录 // export const getMostTroubleCensus = (params) => { // return axios.get('api/ems-third-party-service/project/mostTroubleCensus', // {params}, // ) // };