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

bug fixed

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