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

已选居民

上级 cc2d2f27
......@@ -43,6 +43,7 @@ export default {
],
followStartTimeList: [], //随访时间
residentCrumb: [], //居民面包屑
selectResidentList: [], //修改计划已选居民
},
mutations: {
GET_RESIDENT_LIST(state, payload) {
......@@ -109,6 +110,9 @@ export default {
SET_RESIDENT_CRUMB(state, payload){
state.residentCrumb = payload
sessionStorage.setItem('residentCrumb', JSON.stringify(state.residentCrumb));
},
GET_SELECT_RESIDENT(state, payload) {
state.selectResidentList = payload.fPlanPatientInfoDtoList
}
},
actions: {
......@@ -247,5 +251,12 @@ export default {
setResidentCrumb(context, payload) {
context.commit('SET_RESIDENT_CRUMB', payload);
},
getSelectResident(context, payload) {
getResidentList({
...payload
}).then(({data}) => {
context.commit('GET_SELECT_RESIDENT', data);
});
}
},
}
......@@ -23,7 +23,7 @@
<el-form-item label="随访居民" required>
<div class="select-patients">
<el-button plain icon="el-icon-plus" size="small" @click="selectPatientHandler">{{planDetail.patientIdList ? '继续添加' : '选择居民'}}</el-button><br>
<el-button type="text" class="mt10" size="small" @click="seeSelectedHandler" v-if="planDetail.patientIdList">已选{{planDetail.patientIdList.length}}<i class="el-icon-arrow-right"></i></el-button>
<el-button type="text" class="mt10" size="small" @click="seeSelectedHandler" v-if="planDetail.patientIdList">已选{{hasSelectedList.length}}<i class="el-icon-arrow-right"></i></el-button>
</div>
</el-form-item>
<el-form-item label="随访模板" prop="resourceName">
......@@ -132,7 +132,7 @@
this.getPlanDetail(this.$route.query.planId); //获取计划详情
this.getRemarkOption()
this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表
this.getResidentList({
this.getSelectResident({
planId: this.$route.query.planId
}); //已选居民
......@@ -143,7 +143,8 @@
nodeTimeList: state => state.nodeTimeList,
residentList: state => state.residentList,
remarkOption: state => state.remarkOption,
setTimeNodeList: state => state.setTimeNodeList
setTimeNodeList: state => state.setTimeNodeList,
selectResidentList: state => state.selectResidentList
})
},
methods: {
......@@ -153,7 +154,8 @@
'getResidentList',
'getRemarkOption',
'getTimeNodeList',
'setFollowPlan'
'setFollowPlan',
'getSelectResident'
]),
selectPatientHandler() {
this.isShowSelectPatient = true;
......@@ -266,7 +268,7 @@
// this.setTimeNodeList = val.fPlanTimeDtoList
this.setTimeNodeListOnCom(val.fPlanTimeReqList)
// console.log(this.setTimeNodeList)
this.patientIdList = val.patientIdList
// this.patientIdList = val.patientIdList
this.planId = String(val.id)
if(val.resourceId){
this.isStandedTemplate = true
......@@ -274,6 +276,24 @@
this.isStandedTemplate = false
}
},
selectResidentList(val) {
const _this = this
let people = {}
if(val) {
val.forEach(function (item, index) {
people = {
nickname: item.patientName,
age: item.age,
id: item.idNo,
mobilePhone: item.mobilePhone,
labelId: item.labelName,
patientId: item.patientId
}
_this.patientIdList.push(item.patientId)
_this.hasSelectedList.push(people)
})
}
}
}
}
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册