提交 cd327079 编写于 作者: yi.li's avatar yi.li

api修改

上级 57067da1
......@@ -112,7 +112,7 @@ export default {
});
},
async getPlanList(context, payload) {
await followApi.getPlanList({
await getPlanList({
...payload
}).then(({data}) => {
context.commit('GET_PLAN_LIST', data);
......
import {getEnteringList, changeEnteringStatus, getEnteringInfo} from '../../utils/followup/followapis'
import {getEnteringList, getEnteringInfo} from '../../utils/followup/followapis'
export default {
namespaced: true,
......@@ -27,9 +27,7 @@ export default {
});
},
async getEnteringInfo(context, payload) {
await getEnteringInfo({}, {
...payload
}).then(({data}) => {
await getEnteringInfo(payload.patientId, payload.fuPlanPatientTimesId).then(({data}) => {
context.commit('GET_ENTERING_INFO', data);
});
},
......
......@@ -13,7 +13,7 @@ export default {
},
checkRevervationData: {},//发送预约校验
constantsData: {},//获取常量
getRevervationNum: null,
getRevervationNum: null, //查看已预约人数
},
mutations: {
GET_RESERVATION_LIST(state, payload) {
......@@ -59,7 +59,6 @@ export default {
...payload
}).then(({data}) => {
context.commit('GET_REVERVATION_NUM', data.number)
// this.reservationForm.hasReservedNumber = data.number;
})
},
// getConstantsData({commit}) {
......
......@@ -139,15 +139,24 @@ export const getReservationPatients = (params) => {
description: '查看预约人数',
})
};
export const changeReservationStatus = (params) => {
export const changeReservationStatus = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/appoint/status/`),
url: getFollowUpSC(`/appoint/status/`),
method: 'post',
params: 'data',
data: data,
description: '手动变更预约状态',
})
};
export const sendReservation = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/appoint/`),
method: 'post',
data: data,
description: '发送预约',
})
};
/*录入管理*/
export const getEnteringList = (data) => {
return fetch({
......@@ -163,23 +172,23 @@ export const changeEnteringStatus = (data) => {
headers,
url: getFollowUpSC(`/followup/entering/status/change`),
method: 'post',
data: 'data',
data: data,
description: '变更随访状态',
},)
}
export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => {
return fetch({
headers,
url: getFollowUpSC(`followup/entering/${patientId}/fuInfo/${fuPlanPatientTimesId}`),
url: getFollowUpSC(`/followup/entering/${patientId}/fuInfo/${fuPlanPatientTimesId}`),
method: 'get',
params: 'params',
// params: params,
description: '随访单条信息查看',
},)
}
/*常量*/
export const getBasicData = (data) => {
export const getBasicData = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/basic-data/constants/`),
......
......@@ -28,7 +28,7 @@
</div>
</template>
<script>
import followApi from '@/utils/followup/followapis'
import {changeEnteringStatus} from '@/utils/followup/followapis'
export default {
components: {},
data(){
......@@ -66,7 +66,7 @@
this.$refs[formName].validate((valid) => {
if (valid) {
//后面更改为接口调用
followApi.changeEnteringStatus({
changeEnteringStatus({
info: {
fuPlanPatientTimesId: this.statusForm.fuPlanPatientTimesId,
patientId: this.statusForm.patientId,
......
......@@ -180,7 +180,8 @@
this.search(1);
},
async visitDetail(row){
await this.getEnteringInfo({patientId: row.patientId,fuPlanPatientTimesId: row.fuPlanPatientTimesId});
await this.getEnteringInfo({patientId:row.patientId,fuPlanPatientTimesId:row.fuPlanPatientTimesId});
//await this.getEnteringInfo({});
this.dialogDetailShow = true;
// this.enteringRow = row;
......
......@@ -61,7 +61,7 @@
</div>
</template>
<script>
import followApi from '@/utils/followup/followapis'
import { changeReservationStatus } from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex'
export default {
components: {},
......@@ -175,7 +175,7 @@
this.$refs[formName].validate((valid) => {
if (valid) {
console.log('保存的内容',this.reservationForm)
followApi.changeReservationStatus({
changeReservationStatus({
...this.reservationForm
}).then(({data}) => {
this.$message.success('变更成功!');
......
......@@ -66,7 +66,7 @@
</div>
</template>
<script>
import followApi from '@/utils/followup/followapis'
import {sendReservation} from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex'
export default {
components: {},
......@@ -174,7 +174,7 @@
closeSendReserve(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
followApi.sendReservation({
sendReservation({
...this.reservationForm,
patientAppointList: this.selectList
}).then(({data}) => {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册