提交 1a34e37c 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

api兼容restful

上级 83f1723c
import followApi from '../../utils/followup/followapis' import {getPlanList,
getPlanDetail,
getNodeTimeList,
getNodeTimeContent,
getResidentList,
getGroupList,
getResidentDetail,
changePlan} from '../../utils/followup/followapis'
export default { export default {
namespaced: true, namespaced: true,
...@@ -48,7 +55,7 @@ export default { ...@@ -48,7 +55,7 @@ export default {
actions: { actions: {
getResidentList(context, payload) { getResidentList(context, payload) {
const { pageSize, pageNum } = context.state.residentList; const { pageSize, pageNum } = context.state.residentList;
followApi.getResidentList({ getResidentList({
pageSize, pageSize,
pageNum, pageNum,
...payload ...payload
...@@ -57,47 +64,45 @@ export default { ...@@ -57,47 +64,45 @@ export default {
}); });
}, },
getGroupList(context, payload) { getGroupList(context, payload) {
followApi.getGroupList({}).then(({data}) => { getGroupList({}).then(({data}) => {
context.commit('GET_GROUP_LIST', data); context.commit('GET_GROUP_LIST', data);
}); });
}, },
getResidentDetail(context, payload) { getResidentDetail(context, payload) {
followApi.getResidentDetail({ getResidentDetail({
...payload ...payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_RESIDENT_DETAIL', data); context.commit('GET_RESIDENT_DETAIL', data);
}); });
}, },
getPlanDetail(context, payload) { getPlanDetail(context, payload) {
followApi.getPlanDetail({}, { getPlanDetail({}, {
urlSuffix:payload urlSuffix:payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_PLAN_DETAIL', data); context.commit('GET_PLAN_DETAIL', data);
}); });
}, },
getNodeTimeList(context, payload) { getNodeTimeList(context, payload) {
followApi.getNodeTimeList({}, { getNodeTimeList(payload).then(({data}) => {
urlSuffix:payload
}).then(({data}) => {
context.commit('GET_NODE_TIME_LIST', data); context.commit('GET_NODE_TIME_LIST', data);
}); });
}, },
getNodeTimeContent(context, payload) { getNodeTimeContent(context, payload) {
followApi.getNodeTimeContent({}, { getNodeTimeContent({}, {
urlSuffix:payload urlSuffix:payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_NODE_CONTENT', data); context.commit('GET_NODE_CONTENT', data);
}); });
}, },
getPlanOptions(context, payload) { getPlanOptions(context, payload) {
followApi.getPlanList({ getPlanList({
pageNum: -1 pageNum: -1
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_PLAN_OPTION', data); context.commit('GET_PLAN_OPTION', data);
}); });
}, },
changePlan(context, payload) { changePlan(context, payload) {
followApi.changePlan({ changePlan({
}).then(({data}) => { }).then(({data}) => {
// context.commit('GET_PLAN_OPTION', data); // context.commit('GET_PLAN_OPTION', data);
......
import followApi from '../../utils/followup/followapis' import {getReservationList,
getCheckReservation,
getReservationPatients,} from '../../utils/followup/followapis'
export default { export default {
namespaced: true, namespaced: true,
......
import followApi from '../../utils/followup/followapis' import {getTodayAppointsList, getTodayOverview, getTodayPlans} from '@/utils/followup/followapis'
export default { export default {
namespaced: true, namespaced: true,
...@@ -32,21 +32,21 @@ export default { ...@@ -32,21 +32,21 @@ export default {
}, },
actions: { actions: {
getTodayPlansList(context, payload) { getTodayPlansList(context, payload) {
followApi.getTodayPlansSC({ getTodayPlans({
...payload ...payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_TODAY_PLAN_LIST', data); context.commit('GET_TODAY_PLAN_LIST', data);
}); });
}, },
getTodayAppointsList(context, payload) { getTodayAppointsList(context, payload) {
followApi.getTodayAppointsListSC({ getTodayAppointsList({
...payload ...payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_TODAY_APPOINTS_LIST', data); context.commit('GET_TODAY_APPOINTS_LIST', data);
}); });
}, },
getTodayOverview(context, payload) { getTodayOverview(context, payload) {
followApi.getTodayOverviewSC({ getTodayOverview({
...payload ...payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_TODAY_OVERVIEW', data); context.commit('GET_TODAY_OVERVIEW', data);
......
...@@ -16,9 +16,8 @@ export const envConfig = { ...@@ -16,9 +16,8 @@ export const envConfig = {
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'http://localhost:8090/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'http://localhost:8090/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html', yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
followUpApi: '', followUpSCSoSo: 'http://sosoapi.yunqueyi.com/sosoapi-web/pass/mock/73',
followUpApiSoSoApi:'http://sosoapi.yunqueyi.com/sosoapi-web/pass/mock/73', followUpSC: 'https://dev-sc.yunqueyi.com'
followUpSC: 'https://dev-sc.yunqueyi.com/followup'
}, },
dev: { dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/portal/', baseUrl: 'https://dev-sc.yunqueyi.com/portal/',
...@@ -28,8 +27,7 @@ export const envConfig = { ...@@ -28,8 +27,7 @@ export const envConfig = {
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html', yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
followUpApi: '', followUpSC: 'https://dev-sc.yunqueyi.com'
followUpSC: 'https://dev-sc.yunqueyi.com/followup'
}, },
test: { test: {
baseUrl: 'https://test1-sc.yunqueyi.com/portal/', baseUrl: 'https://test1-sc.yunqueyi.com/portal/',
...@@ -39,8 +37,7 @@ export const envConfig = { ...@@ -39,8 +37,7 @@ export const envConfig = {
loginUrl: 'https://test1-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://test1-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://test-saas.yunqueyi.com/pica_index.html', yuequeyiIndexUrl: 'https://test-saas.yunqueyi.com/pica_index.html',
followUpApi: '', followUpSC: 'https://test1-sc.yunqueyi.com'
followUpSC: 'https://test1-sc.yunqueyi.com/followup'
}, },
uat: { uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/portal/', baseUrl: 'https://uat-sc.yunqueyi.com/portal/',
...@@ -50,8 +47,7 @@ export const envConfig = { ...@@ -50,8 +47,7 @@ export const envConfig = {
loginUrl: 'https://uat-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://uat-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://uat-saas.yunqueyi.com/pica_index.html', yuequeyiIndexUrl: 'https://uat-saas.yunqueyi.com/pica_index.html',
followUpApi: '', followUpSC: 'https://uat-sc.yunqueyi.com'
followUpSC: 'https://uat-sc.yunqueyi.com/followup'
}, },
pro: { pro: {
baseUrl: 'https://sc.yunqueyi.com/portal/', baseUrl: 'https://sc.yunqueyi.com/portal/',
...@@ -61,7 +57,6 @@ export const envConfig = { ...@@ -61,7 +57,6 @@ export const envConfig = {
loginUrl: 'https://saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html', innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://saas.yunqueyi.com/pica_index.html', yuequeyiIndexUrl: 'https://saas.yunqueyi.com/pica_index.html',
followUpApi: '', followUpSC: 'https://sc.yunqueyi.com'
followUpSC: 'https://sc.yunqueyi.com/followup'
} }
} }
...@@ -11,9 +11,13 @@ const service = axios.create({ ...@@ -11,9 +11,13 @@ const service = axios.create({
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
config.headers['sysCode'] = 12 console.log(config)
config.headers['token'] = localStorage.getItem('storageToken') /*if( config.headers['sysCode']==undefined) {
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' }) config.headers['sysCode'] = 12
}*/
// config.headers['token'] = '1B27380B2BFE4B8DA432EB149D237AA1'
// config.headers['token'] = localStorage.getItem('storageToken')
// config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
// if (config.data && config.data.setEntry) { // if (config.data && config.data.setEntry) {
// config.headers['sysCode'] = config.data.sysCode || 10 // config.headers['sysCode'] = config.data.sysCode || 10
// if(config.data.token){ // if(config.data.token){
......
...@@ -5,192 +5,156 @@ import utils from './followupUtils'; ...@@ -5,192 +5,156 @@ import utils from './followupUtils';
/*计划管理API*/
const planManageApi = [ /*工作台*/
{ const headers = null /*{
url: '/followup/plans', sysCode: 45
}*/
export const getTodayAppointsList = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/overView/todayAppoints`),
method: 'get',
params: params,
description: '获取今日预约列表',
})
};
export const getTodayOverview = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/overView/todayOverview`),
method: 'get', method: 'get',
params: 'params', params: params,
name: 'getPlanList', description: '获取今日随访、预约、随访人数',
})
};
export const getTodayPlans = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/overView/todayPlans`),
method: 'get',
params: params,
description: '查询今日随访计划',
})
};
/*计划管理*/
export const getPlanList = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/plans`),
method: 'get',
params: params,
description: '获取计划列表', description: '获取计划列表',
}, })
{ };
url: '/plans/', export const getPlanDetail = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/plans/detail`),
method: 'get', method: 'get',
params: 'params', params: params,
name: 'getPlanDetail',
description: '获取计划详情', description: '获取计划详情',
}, })
{ };
url: '', export const getNodeTimeList = (planId) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/plans/times/line/${planId}`),
method: 'get', method: 'get',
params: 'params',
name: 'getNodeTimeList',
description: '获取随访时间节点列表', description: '获取随访时间节点列表',
}, })
{ };
url: '/plans/time/', export const getNodeTimeContent = (planTimeId) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/plans/time/${planTimeId}`),
method: 'get', method: 'get',
params: 'params',
name: 'getNodeTimeContent',
description: '获取节点详情', description: '获取节点详情',
}, })
{ };
url: '/followup/planPatient/', export const getResidentList = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/planPatient/`),
method: 'get', method: 'get',
params: 'params', params: params,
name: 'getResidentList',
description: '获取居民列表', description: '获取居民列表',
}, })
{ };
url: '/followup/planPatient/group', export const getGroupList = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/planPatient/group`),
method: 'get', method: 'get',
params: 'params', params: params,
name: 'getGroupList',
description: '获取分组列表', description: '获取分组列表',
}, })
{ };
url: '/followup/planPatient/detail', export const getResidentDetail = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/planPatient/detail`),
method: 'get', method: 'get',
params: 'params', params: params,
name: 'getResidentDetail',
description: '获取居民详情', description: '获取居民详情',
}, })
{ };
url: '/followup/planPatient/change', export const changePlan = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/planPatient/change`),
method: 'put', method: 'put',
params: 'params', params: params,
name: 'changePlan',
description: '变更计划', description: '变更计划',
}, })
]; };
/*预约管理API*/ /*预约管理*/
const reservationManageApi = [ export const getReservationList = (params) => {
{ return fetch({
url: '/followup/appointmentPatient/', headers,
url: getFollowUpSC(`/followup/appointmentPatient/`),
method: 'get', method: 'get',
params: 'params', params: params,
name: 'getReservationList',
description: '获取预约列表', description: '获取预约列表',
}, })
{ };
url: '/followup/appointmentPatient/check/', export const getCheckReservation = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/appointmentPatient/check/`),
method: 'get', method: 'get',
params: 'params', params: params,
name: 'getCheckReservation',
description: '发送预约校验', description: '发送预约校验',
}, })
{ };
url: '/followup/appointmentPatient/accept/', export const getReservationPatients = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/appointmentPatient/accept/`),
method: 'get', method: 'get',
params: 'params', params: params,
name: 'getReservationPatients',
description: '查看预约人数', description: '查看预约人数',
}, })
] };
/*录入管理*/
/*工作台*/ export const getEnteringList = (data) => {
const workbenchApi = [ return fetch({
{ headers,
url: '/overView/todayAppoints', url: getFollowUpSC(`/followup/entering/list`),
method: 'get',
params: 'params',
name: 'getTodayAppointsListSC',
description: '获取今日预约列表',
},
{
url: '/overView/todayOverview',
method: 'get',
params: 'params',
name: 'getTodayOverviewSC',
description: '获取今日随访、预约、随访人数',
},
{
url: '/overView/todayPlans',
method: 'get',
params: 'params',
name: 'getTodayPlansSC',
description: '查询今日随访计划',
},
]
/*常量API*/
const basicDataApi = [
{
url: '/overView/todayAppoints',
method: 'get',
params: 'params',
name: 'getBasicData',
description: '获取常量',
},
]
/*录入管理API*/
const recordManageApi = [
{
url: '/followup/entering/list',
method: 'post', method: 'post',
params: 'data', data: data,
name: 'getEnteringList',
description: '录入列表查看', description: '录入列表查看',
}, })
] };
/*常量*/
export const getBasicData = (data) => {
return fetch({
const api = {}; headers,
const apis = [...planManageApi, ...reservationManageApi, ...basicDataApi, ...workbenchApi]; url: getFollowUpSC(`/basic-data/constants/`),
method: 'get',
apis.forEach(item => api[item.name] = (params = {}, extraConfig = {}) => { params: params,
// const config = { description: '获取常量',
// url: getFollowUpApi(item.url), })
// method: item.method, };
// };
let config = {};
if (item.name == 'getBasicData') {
config = {
url: getBasicDataApi(item.url),
method: item.method,
};
} else if (item.name == 'getNodeTimeList') {
let url = `/plan/${extraConfig.urlSuffix}/time`
config = {
url: getFollowUpApi(url),
method: item.method,
};
} else if (item.name.indexOf("SC")!=-1) {
config = {
url: getFollowUpSC(item.url),
method: item.method,
};
} else {
config = {
url: getFollowUpApi(item.url),
method: item.method,
};
}
if (extraConfig.urlSuffix) { // 需要做URL拼接的情况(比如*.do/2),,,可以根据自己的实际情况进行扩展
config.url = `${config.url}${extraConfig.urlSuffix}`;
//something else
}
const filterParams = utils.DC.getParams(params, item.args);
if (item.params === 'data') {
config.data = filterParams;
} else {
config.params = filterParams;
}
/*utils.MSG.$emit('axios:begin', item.url);*/
return fetch({
...config,
...extraConfig,
}).then(res => {
return Promise.resolve(res);
}).catch(err => {
return Promise.resolve(err);
});
});
export default api;
...@@ -171,13 +171,10 @@ export function uploadVideo() { ...@@ -171,13 +171,10 @@ export function uploadVideo() {
export function uploadImg() { export function uploadImg() {
return getConfigByEnvType('qiniuImgUrl') return getConfigByEnvType('qiniuImgUrl')
} }
// 获取随访服务器域名地址
export function getFollowUpApi(url) {
return getConfigByEnvType('followUpApiSoSoApi') + url //当前使用sosoapi mock数据
}
// 获取随访微服务服务器域名地址 // 获取随访微服务服务器域名地址
export function getFollowUpSC(url) { export function getFollowUpSC(url) {
return getConfigByEnvType('followUpSC') + url return getConfigByEnvType('followUpSCSoSo') + url
} }
// 获取常量接口域名地址 // 获取常量接口域名地址
......
...@@ -44,11 +44,17 @@ ...@@ -44,11 +44,17 @@
</div> </div>
</div> </div>
<div class="resident-table table-content"> <div class="resident-table table-content">
<el-radio-group v-model="status"> <div class="btn-div">
<el-radio-button label="0">未完成({{residentList.notCount}})</el-radio-button> <el-radio-group v-model="status">
<el-radio-button label="1">进行中({{residentList.handCount}})</el-radio-button> <el-radio-button label="0">未完成({{residentList.notCount}})</el-radio-button>
<el-radio-button label="2">已结束({{residentList.yesCount}})</el-radio-button> <el-radio-button label="1">进行中({{residentList.handCount}})</el-radio-button>
</el-radio-group> <el-radio-button label="2">已结束({{residentList.yesCount}})</el-radio-button>
</el-radio-group>
<div class="btn-left">
<el-button class="button-green" type="primary" @click="finishFollowup('all')">结束随访</el-button>
<el-button class="button-white" plain @click="selectPatientHandler">添加居民</el-button>
</div>
</div>
<el-table <el-table
:data="residentList.fPlanPatientInfoDtoList" :data="residentList.fPlanPatientInfoDtoList"
center center
...@@ -112,6 +118,11 @@ ...@@ -112,6 +118,11 @@
</div> </div>
<change-plan :showThisPage="showChangePlan" :planChangeData="planChangeData" @closeChangePlan="closeChangePlan"></change-plan> <change-plan :showThisPage="showChangePlan" :planChangeData="planChangeData" @closeChangePlan="closeChangePlan"></change-plan>
<finish-followup :showThisPage="showFinishFollowup" :finishData="finishData" @closeFinishFollowup="closeFinishFollowup"></finish-followup> <finish-followup :showThisPage="showFinishFollowup" :finishData="finishData" @closeFinishFollowup="closeFinishFollowup"></finish-followup>
<select-patient
:isShowSelectPatient="isShowSelectPatient"
@closeSelectPatient="closeSelectPatient"
@sureSelectPatient="sureSelectPatient(arguments)">
</select-patient>
</div> </div>
</template> </template>
...@@ -121,6 +132,8 @@ ...@@ -121,6 +132,8 @@
import ChangePlan from '@/views/followup/plan-manage/dialog/change-plan'; import ChangePlan from '@/views/followup/plan-manage/dialog/change-plan';
//结束随访dialog //结束随访dialog
import FinishFollowup from '@/views/followup/plan-manage/dialog/finish-followup'; import FinishFollowup from '@/views/followup/plan-manage/dialog/finish-followup';
//添加居民
import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient';
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
export default { export default {
...@@ -129,6 +142,7 @@ ...@@ -129,6 +142,7 @@
BreadCrumb, BreadCrumb,
ChangePlan, ChangePlan,
FinishFollowup, FinishFollowup,
SelectPatient
}, },
data() { data() {
return { return {
...@@ -149,6 +163,8 @@ ...@@ -149,6 +163,8 @@
planChangeData: {}, //变更计划数据 planChangeData: {}, //变更计划数据
showFinishFollowup: false, //是否展示结束随访 showFinishFollowup: false, //是否展示结束随访
finishData: {}, //结束数据 finishData: {}, //结束数据
isShowSelectPatient: false, //显示居民选择框
hasSelectedList: [], //已选居民
} }
}, },
created() { created() {
...@@ -218,6 +234,18 @@ ...@@ -218,6 +234,18 @@
closeFinishFollowup(isShow) { closeFinishFollowup(isShow) {
this.showFinishFollowup = isShow this.showFinishFollowup = isShow
}, },
selectPatientHandler() {
this.isShowSelectPatient = true;
},
closeSelectPatient(val) {
this.isShowSelectPatient = val;
},
sureSelectPatient() {
let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0];
this.hasSelectedList = getArguments[1];
this.modifyInfo.hasSelectedNum = getArguments[1].length;
},
}, },
watch: { watch: {
status(val) { status(val) {
...@@ -234,5 +262,8 @@ ...@@ -234,5 +262,8 @@
@import '../../../style/followup/followup-common'; @import '../../../style/followup/followup-common';
@import '../../../style/followup/element-reset.css'; @import '../../../style/followup/element-reset.css';
.btn-left {
float: right;
}
</style> </style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册