提交 6d25fae7 编写于 作者: tao.wu's avatar tao.wu

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
...@@ -152,16 +152,17 @@ ...@@ -152,16 +152,17 @@
}, },
watch: { watch: {
planChangeData(val) { planChangeData(val) {
const _this = this
let labelList = val.yLabelList let labelList = val.yLabelList
labelList.forEach(function (item, index) { labelList.forEach(function (item, index) {
let nodeItem = this.groupList.filter(function(item1){ let nodeItem = _this.groupList.filter(function(item1){
return item1.labelId == item; return item1.labelId == item;
}); });
let pushItem = { let pushItem = {
labelId: nodeItem[0].labelId, labelId: nodeItem[0].labelId,
label: nodeItem[0].labelName, label: nodeItem[0].labelName,
} }
this.selectedGroup.push(pushItem) _this.selectedGroup.push(pushItem)
}) })
} }
} }
......
<template> <template>
<div class="finish-followup" v-if="showThisPage"> <div class="finish-followup" v-if="showThisPage">
<el-dialog <el-dialog
title="结束随访" :title="finishData.title"
:visible.sync="showFinishFollowup" :visible.sync="showFinishFollowup"
v-if="showThisPage" v-if="showThisPage"
:before-close="clickClose" :before-close="clickClose"
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<el-form-item label="居民:"> <el-form-item label="居民:">
{{finishData.patientName}} {{finishData.patientName}}
</el-form-item> </el-form-item>
<el-form-item label="结束原因:" prop="finishReason"> <el-form-item :label="finishData.reasonName" prop="finishReason">
<el-input <el-input
type="textarea" type="textarea"
v-model="finishData.finishReason" v-model="finishData.finishReason"
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
{ required: true, message: '请输入结束原因', trigger: 'blur' }, { required: true, message: '请输入结束原因', trigger: 'blur' },
{ min: 1, max: 30, message: '长度在30个字符内', trigger: 'blur' } { min: 1, max: 30, message: '长度在30个字符内', trigger: 'blur' }
], ],
} },
} }
}, },
methods: { methods: {
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<div class="title"><p>基本信息</p></div> <div class="title"><p>基本信息</p></div>
<div class="h-btn"> <div class="h-btn">
<el-button class="button-white" plain size="small" @click="changePlan">计划变更</el-button> <el-button class="button-white" plain size="small" @click="changePlan">计划变更</el-button>
<el-button v-if="status==1" class="button-white" plain size="small" @click="finishFollowup">结束随访</el-button> <el-button v-if="status==3" class="button-white" plain size="small" @click="finishFollowup">恢复随访</el-button>
<el-button v-if="status==2" class="button-white" plain size="small" @click="finishFollowup">恢复随访</el-button> <el-button v-else class="button-white" plain size="small" @click="finishFollowup">结束随访</el-button>
</div> </div>
</div> </div>
<div class="base-info"> <div class="base-info">
...@@ -177,6 +177,8 @@ ...@@ -177,6 +177,8 @@
planId: this.residentDetail.fPlanDto.id, planId: this.residentDetail.fPlanDto.id,
patientName: this.residentDetail.patientName, patientName: this.residentDetail.patientName,
patientIdList: patientIdList, patientIdList: patientIdList,
title: this.status==3?'恢复随访':'结束随访',
reasonName: this.status==3?'恢复原因:':'结束原因:'
} }
this.showFinishFollowup = true; this.showFinishFollowup = true;
}, },
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<el-radio-button label="3">已结束({{residentList.yesCount}})</el-radio-button> <el-radio-button label="3">已结束({{residentList.yesCount}})</el-radio-button>
</el-radio-group> </el-radio-group>
<div class="btn-left"> <div class="btn-left">
<el-button class="button-green" type="primary" size="small" v-if="status==2" @click="recoverFollowup('all')">恢复随访</el-button> <el-button class="button-green" type="primary" size="small" v-if="status==3" @click="finishFollowup('all')">恢复随访</el-button>
<el-button class="button-green" type="primary" size="small" v-else @click="finishFollowup('all')">结束随访</el-button> <el-button class="button-green" type="primary" size="small" v-else @click="finishFollowup('all')">结束随访</el-button>
<el-button class="button-white" plain size="small" @click="selectPatientHandler">添加居民</el-button> <el-button class="button-white" plain size="small" @click="selectPatientHandler">添加居民</el-button>
</div> </div>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button class="btn-right-class" type="text" @click="changePlan(scope.row)" >变更计划</el-button>| <el-button class="btn-right-class" type="text" @click="changePlan(scope.row)" >变更计划</el-button>|
<el-button class="btn-right-class" type="text" v-if="status==2" @click="recoverFollowup(scope.row)" >恢复随访</el-button> <el-button class="btn-right-class" type="text" v-if="status==3" @click="finishFollowup(scope.row)" >恢复随访</el-button>
<el-button class="btn-right-class" type="text" v-else @click="finishFollowup(scope.row)" >结束随访</el-button> <el-button class="btn-right-class" type="text" v-else @click="finishFollowup(scope.row)" >结束随访</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -123,7 +123,6 @@ ...@@ -123,7 +123,6 @@
</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>
<recover-followup :showThisPage="showRecoverFollowup" :finishData="recoverData" @closeFinishFollowup="closeRecoverFollowup"></recover-followup>
<select-patient <select-patient
:isShowSelectPatient="isShowSelectPatient" :isShowSelectPatient="isShowSelectPatient"
:patientIdList="initialPatientIdList" :patientIdList="initialPatientIdList"
...@@ -143,8 +142,6 @@ ...@@ -143,8 +142,6 @@
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';
//恢复随访dialog
import RecoverFollowup from '@/views/followup/plan-manage/dialog/finish-followup';
//添加居民 //添加居民
import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient'; import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient';
//添加居民选择随访时间 //添加居民选择随访时间
...@@ -158,7 +155,6 @@ ...@@ -158,7 +155,6 @@
ChangePlan, ChangePlan,
FinishFollowup, FinishFollowup,
SelectPatient, SelectPatient,
RecoverFollowup,
addPatientTime addPatientTime
}, },
data() { data() {
...@@ -180,8 +176,6 @@ ...@@ -180,8 +176,6 @@
planChangeData: {}, //变更计划数据 planChangeData: {}, //变更计划数据
showFinishFollowup: false, //是否展示结束随访 showFinishFollowup: false, //是否展示结束随访
finishData: {}, //结束数据 finishData: {}, //结束数据
showRecoverFollowup: false, //是否展示恢复随访
recoverData: {}, //恢复数据
isShowSelectPatient: false, //显示居民选择框 isShowSelectPatient: false, //显示居民选择框
hasSelectedList: [], //已选居民 hasSelectedList: [], //已选居民
finishPatientList: [], //结束随访居民(多选) finishPatientList: [], //结束随访居民(多选)
...@@ -242,9 +236,11 @@ ...@@ -242,9 +236,11 @@
}, },
changePlan(row) { changePlan(row) {
this.planChangeData = { this.planChangeData = {
group: row.labelIds, planPatientsId: row.fuPlanPatientId,
planId: 1, planId: this.$route.query.planId,
startTime: row.time patientId: row.patientId,
yLabelList: row.labelIdList||[],
startDate: row.time
} }
this.showChangePlan = true; this.showChangePlan = true;
}, },
...@@ -260,48 +256,38 @@ ...@@ -260,48 +256,38 @@
}); });
return; return;
} }
let patientIds = [];
let patientNames = [];
this.finishPatientList.forEach(function (item, index) {
patientIds.push(item.patientId)
patientNames.push(item.patientName)
});
console.log(patientIds)
this.finishData = { this.finishData = {
patientName: row.patientName, changeCode: this.status,
planId: this.$route.query.planId,
patientName: patientNames.join('、'),
patientIdList: patientIds,
title: this.status==3?'恢复随访':'结束随访',
reasonName: this.status==3?'恢复原因:':'结束原因:'
}; };
} else { } else {
let patientIdList = []; let patientIds = [];
patientIdList.push(row.patientId) patientIds.push(row.patientId)
this.finishData = { this.finishData = {
changeCode: this.status,
planId: this.$route.query.planId,
patientName: row.patientName, patientName: row.patientName,
changeCode: row.status, patientIdList: patientIds,
patientIdList: patientIdList, title: this.status==3?'恢复随访':'结束随访',
patientName: row.patientName, reasonName: this.status==3?'恢复原因:':'结束原因:'
}; };
} }
this.showFinishFollowup = true; this.showFinishFollowup = true;
}, },
closeFinishFollowup(isShow) { closeFinishFollowup(isShow) {
this.showFinishFollowup = isShow this.showFinishFollowup = isShow
}, },
recoverFollowup(row) {
if(row=='all') {
if(this.finishPatientList.length<=0) {
this.$message({
message: '请选择居民!',
type: 'warning'
});
return;
}
this.finishData = {
patientName: row.patientName,
};
} else {
this.finishData = {
patientName: row.patientName,
};
}
this.showFinishFollowup = true;
},
closeRecoverFollowup(isShow) {
this.showRecoverFollowup = isShow
},
selectPatientHandler() { selectPatientHandler() {
this.isShowSelectPatient = true; this.isShowSelectPatient = true;
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册