提交 c5a3d534 编写于 作者: guangjun.yang's avatar guangjun.yang

接口重新设置

上级 181e3928
import qs from 'qs';
import request from './api';
export const getHospital = async (params) => {
let query = { pageNum: 1, pageSize: 1, ...params };
const str = qs.stringify(query);
return request({ url: `/api-ws/hospitals/?${str}` });
};
/**
* 获取省列表
*/
export const getProvinceList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: `/basic-data/position/provinces`
});
};
/**
* 获取市列表
*/
export const getCityList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: `/basic-data/position/cities`
});
};
/**
* 获取县/区列表
*/
export const getCountyList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: `/basic-data/position/counties`
});
};
/**
* 获取乡镇列表
*/
export const getTownList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: `/basic-data/position/towns`
});
};
/**
* 获取区域(一般是乡镇)下的机构列表
*/
export const getOrgListByTownId = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: `/basic-data/position/towns`
});
};
/**
* 总体情况-选择地区下
*/
export const getGeneralData = async data => {
return request({
baseURL: 'http://10.177.11.156:10443/',
method: 'post',
data: data,
withCredentials: true,
url: `stats/report/general`
});
};
/**
* 总体情况-选择地区下
*/
export const getGeneralData = async data => {
return request({
// baseURL: 'http://10.177.11.156:10443/',
method: 'get',
// data: data,
params: data,
withCredentials: true,
url: `stats/region?projectId=373`
});
};
\ No newline at end of file
...@@ -17,7 +17,7 @@ export const getProvinceList = async params => { ...@@ -17,7 +17,7 @@ export const getProvinceList = async params => {
method: 'get', method: 'get',
params: params, params: params,
withCredentials: true, withCredentials: true,
url: `stats/region` url: 'stats/region'
}); });
}; };
...@@ -29,7 +29,7 @@ export const getCityList = async params => { ...@@ -29,7 +29,7 @@ export const getCityList = async params => {
method: 'get', method: 'get',
params: params, params: params,
withCredentials: true, withCredentials: true,
url: `stats/region` url: 'stats/region'
}); });
}; };
...@@ -41,7 +41,7 @@ export const getCountyList = async params => { ...@@ -41,7 +41,7 @@ export const getCountyList = async params => {
method: 'get', method: 'get',
params: params, params: params,
withCredentials: true, withCredentials: true,
url: `stats/region` url: 'stats/region'
}); });
}; };
...@@ -53,7 +53,7 @@ export const getTownList = async params => { ...@@ -53,7 +53,7 @@ export const getTownList = async params => {
method: 'get', method: 'get',
params: params, params: params,
withCredentials: true, withCredentials: true,
url: `stats/region` url: 'stats/region'
}); });
}; };
...@@ -65,7 +65,7 @@ export const getOrgListByTownId = async params => { ...@@ -65,7 +65,7 @@ export const getOrgListByTownId = async params => {
method: 'get', method: 'get',
params: params, params: params,
withCredentials: true, withCredentials: true,
url: `/basic-data/position/towns` url: '/basic-data/position/towns'
}); });
}; };
...@@ -77,7 +77,7 @@ export const getGeneralData = async data => { ...@@ -77,7 +77,7 @@ export const getGeneralData = async data => {
method: 'post', method: 'post',
data: data, data: data,
withCredentials: true, withCredentials: true,
url: `stats/report/general` url: 'stats/report/general'
}); });
}; };
...@@ -89,7 +89,7 @@ export const getHospitalsByRegionId = async params => { ...@@ -89,7 +89,7 @@ export const getHospitalsByRegionId = async params => {
method: 'get', method: 'get',
params: params, params: params,
withCredentials: true, withCredentials: true,
url: `stats/region/hospital` url: 'stats/region/hospital'
}); });
}; };
...@@ -102,7 +102,7 @@ export const getUserAnalysis = async data => { ...@@ -102,7 +102,7 @@ export const getUserAnalysis = async data => {
method: 'post', method: 'post',
data: data, data: data,
withCredentials: true, withCredentials: true,
url: `stats/report/userAnalysis` url: 'stats/report/userAnalysis'
}); });
}; };
...@@ -115,7 +115,7 @@ export const getHospitalsCNT = async params => { ...@@ -115,7 +115,7 @@ export const getHospitalsCNT = async params => {
method: 'get', method: 'get',
params: params, params: params,
withCredentials: true, withCredentials: true,
url: `stats/region/hospitals/cnt` url: 'stats/region/hospitals/cnt'
}); });
}; };
...@@ -127,7 +127,7 @@ export const getGeneralPersonal = async data => { ...@@ -127,7 +127,7 @@ export const getGeneralPersonal = async data => {
method: 'post', method: 'post',
data: data, data: data,
withCredentials: true, withCredentials: true,
url: `stats/report/generalPersonal/${data.pageCfg.type}` url: 'stats/report/generalPersonal/' + data.pageCfg.type
// url: `stats/report/generalPersonal/${data.pageCfg.type}/${data.pageCfg.pageNo}/${data.pageCfg.pageSize}` // url: `stats/report/generalPersonal/${data.pageCfg.type}/${data.pageCfg.pageNo}/${data.pageCfg.pageSize}`
}); });
}; };
...@@ -140,7 +140,7 @@ export const getGeneralCourse = async data => { ...@@ -140,7 +140,7 @@ export const getGeneralCourse = async data => {
method: 'post', method: 'post',
data: data, data: data,
withCredentials: true, withCredentials: true,
url: `stats/report/course` url: 'stats/report/course'
// url: `stats/report/course/0/0` // url: `stats/report/course/0/0`
}); });
}; };
...@@ -153,7 +153,7 @@ export const getGeneralExam = async data => { ...@@ -153,7 +153,7 @@ export const getGeneralExam = async data => {
method: 'post', method: 'post',
data: data, data: data,
withCredentials: true, withCredentials: true,
url: `stats/report/exam` url: 'stats/report/exam'
}); });
}; };
...@@ -165,7 +165,7 @@ export const getGeneralExamList = async data => { ...@@ -165,7 +165,7 @@ export const getGeneralExamList = async data => {
method: 'post', method: 'post',
data: data, data: data,
withCredentials: true, withCredentials: true,
url: `stats/report/exam/list` url: 'stats/report/exam/list'
}); });
}; };
...@@ -177,7 +177,7 @@ export const getGeneralExamSingle = async params => { ...@@ -177,7 +177,7 @@ export const getGeneralExamSingle = async params => {
method: 'get', method: 'get',
params: params, params: params,
withCredentials: true, withCredentials: true,
url: `stats/report/exam/${params.projectId}/${params.hospitalId}` url: 'stats/report/exam/' + params.projectId + '/' + params.hospitalId
}); });
}; };
...@@ -190,7 +190,7 @@ export const getProjectInfo = async params => { ...@@ -190,7 +190,7 @@ export const getProjectInfo = async params => {
method: 'get', method: 'get',
params: params, params: params,
withCredentials: true, withCredentials: true,
url: `stats/region/info` url: 'stats/region/info'
}); });
}; };
...@@ -202,7 +202,7 @@ export const getStudyEffect = async data => { ...@@ -202,7 +202,7 @@ export const getStudyEffect = async data => {
method: 'post', method: 'post',
data: data, data: data,
withCredentials: true, withCredentials: true,
url: `stats/report/studyEffect` url: 'stats/report/studyEffect'
}); });
}; };
...@@ -214,7 +214,7 @@ export const getStudyRankData = async data => { ...@@ -214,7 +214,7 @@ export const getStudyRankData = async data => {
method: 'post', method: 'post',
data: data, data: data,
withCredentials: true, withCredentials: true,
url: `stats/report/studyRank/${data.pageCfg.type}` url: 'stats/report/studyRank/' + data.pageCfg.type
}); });
}; };
...@@ -226,6 +226,6 @@ export const getStudyTimeData = async data => { ...@@ -226,6 +226,6 @@ export const getStudyTimeData = async data => {
method: 'post', method: 'post',
data: data, data: data,
withCredentials: true, withCredentials: true,
url: `stats/report/studyTime/${data.pageCfg.type}` url: 'stats/report/studyTime/' + data.pageCfg.type
}); });
}; };
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册