提交 59835b1b 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

bug fixed

上级 ada2905f
......@@ -7,8 +7,8 @@
v-if="showThisPage"
:before-close="clickClose"
center>
<el-form :model="planChangeData" label-width="110px">
<el-form-item label="分组:">
<el-form :model="planChangeData" label-width="110px" :rules="rules" ref="planChangeData">
<el-form-item label="分组:" prop="yLabelList">
<el-select
v-model="planChangeData.yLabelList"
multiple
......@@ -22,7 +22,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="随访计划:">
<el-form-item label="随访计划:" prop="planId">
<el-select v-model="planChangeData.planId" size="small">
<el-option
v-for="item in planOption"
......@@ -32,7 +32,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="随访开始时间:">
<el-form-item label="随访开始时间:" prop="startDate">
<el-date-picker
v-model="planChangeData.startDate"
type="date"
......@@ -51,7 +51,7 @@
</template>
<script>
import { mapState, mapActions} from 'vuex';
import { mapState, mapActions } from 'vuex';
import { changePlan } from '../../../../utils/followup/followapis'
export default {
name: "change-plan",
......@@ -84,7 +84,12 @@
data() {
return {
showChangePlan: true,
selectedGroup: []
selectedGroup: [],
rules: {
planId: [
{ required: true, message: '请选择随访计划', trigger: 'change' },
],
},
}
},
mounted() {
......@@ -99,7 +104,7 @@
})
},
methods: {
...mapActions('planManage', ['getPlanOptions','getResidentList']),
...mapActions('planManage', ['getPlanOptions','getResidentList', 'getResidentDetail']),
selectGroup(val) {
const _this = this
_this.selectedGroup = []
......@@ -117,39 +122,50 @@
clickClose() {
this.$emit('closeChangePlan',false);
},
async changePlans() {
// this.clickClose()
const { planPatientsId, planId, patientId, startDate } = this.planChangeData
// params.yLabelList = this.selectedGroup
// console.log('变更数据',params)
changePlan({
planPatientsId,
planId,
patientId,
yLabelList: this.selectedGroup,
startDate
}).then((data) => {
if(data.code == '000000') {
this.$message({
message: '变更计划成功!',
type: 'success'
});
this.getResidentList({
changePlans() {
this.$refs['planChangeData'].validate(valid => {
if (valid) {
const { planPatientsId, planId, patientId, startDate } = this.planChangeData;
changePlan({
planPatientsId,
planId,
status: this.planChangeData.status
})
this.clickClose()
} else {
this.$message({
message: `${data.message}`,
type: 'error'
patientId,
yLabelList: this.selectedGroup,
startDate
}).then((data) => {
if(data.code == '000000') {
this.$message({
message: '变更计划成功!',
type: 'success'
});
if(this.$route.name == 'residentList') {
this.getResidentList({
planId,
status: this.planChangeData.status
});
} else if(this.$route.name == 'residentDetail') {
this.getResidentDetail({
planId,
patientId
})
}
this.clickClose()
} else {
this.$message({
message: `${data.message}`,
type: 'error'
});
}
}).catch((err) => {
this.$message({
message: `${err.message}`,
type: 'error'
});
});
} else {
return false;
}
}).catch((err) => {
this.$message({
message: `${err.message}`,
type: 'error'
});
});
},
},
......
......@@ -35,6 +35,7 @@
</template>
<script>
import { mapActions } from 'vuex';
import { finishPlan } from '../../../../utils/followup/followapis'
export default {
name: "finish-followup",
......@@ -64,6 +65,7 @@
}
},
methods: {
...mapActions('planManage', ['getResidentList']),
clickClose() {
this.$emit('closeFinishFollowup',false)
},
......@@ -79,6 +81,18 @@
message: '操作成功!',
type: 'success'
});
if(this.$route.name == 'residentList') {
this.getResidentList({
planId,
status: changeCode
})
} else if(this.$route.name == 'residentDetail') {
this.getResidentDetail({
planId,
patientId: patientIdList[0]
})
}
this.clickClose()
} else {
this.$message({
......
......@@ -117,7 +117,7 @@
:current-page="residentList.pageNum"
:page-sizes="[10, 20, 50, 100]"
:page-size="residentList.pageSize"
:total="residentList.total">
:total="statusTotal">
</el-pagination>
</div>
</div>
......@@ -183,6 +183,7 @@
initialPatientIdList: [], //初始居民
showAddPatientTime: false,//是否展示添加居民选择时间
addPatientData: {}, //选择时间数据
statusTotal: null, //每种状态的总数
}
},
created() {
......@@ -273,7 +274,7 @@
patientName: patientNames.join('、'),
patientIdList: patientIds,
title: this.status==3?'恢复随访':'结束随访',
reasonName: this.status==3?'恢复原因:':'结束原因:'
reasonName: this.status==3?'恢复原因:':'结束原因:',
};
} else {
let patientIds = [];
......@@ -347,6 +348,13 @@
_this.initialPatientIdList.push(item.patientId)
})
}
if(_this.status == 1) {
_this.statusTotal = val.notCount
} else if (_this.status == 2) {
_this.statusTotal = val.handCount
} else if (_this.status == 3) {
_this.statusTotal = val.yesCount
}
}
}
......
......@@ -92,9 +92,14 @@
</el-table-column>
<el-table-column
width="160"
prop="appointmentTime"
label="随访预约时间"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.status==1" style="color: #49C688;">未完成</span>
<span v-else-if="scope.row.status==2">待确认</span>
<span v-else-if="scope.row.status==4" style="color: #D5172E;">已拒绝</span>
<span v-else>{{scope.row.appointmentTime}}</span>
</template>
</el-table-column>
<el-table-column
width="180"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册