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

bug fixed

上级 2fc8bd46
...@@ -267,6 +267,7 @@ export default { ...@@ -267,6 +267,7 @@ export default {
}, },
getSelectResident(context, payload) { getSelectResident(context, payload) {
getResidentList({ getResidentList({
needEnd: 1,
...payload ...payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_SELECT_RESIDENT', data); context.commit('GET_SELECT_RESIDENT', data);
......
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
let getArguments = arguments[0]; let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0]; this.isShowSelectPatient = getArguments[0];
const newAddPatientList = getArguments[1]; // 新选中的人 const newAddPatientList = getArguments[1]; // 新选中的人
const showNames = []; let showNames = [];
const newIds = []; const newIds = [];
newAddPatientList.forEach(item => { newAddPatientList.forEach(item => {
showNames.push(item.nickname) showNames.push(item.nickname)
...@@ -197,10 +197,17 @@ ...@@ -197,10 +197,17 @@
this.newHasSelectedList = this.newHasSelectedList.concat(newAddPatientList); this.newHasSelectedList = this.newHasSelectedList.concat(newAddPatientList);
if(this.newHasSelectedList.length > this.hasSelectedList.length) { if(this.newHasSelectedList.length > this.hasSelectedList.length) {
this.showAddPatientTime = true; this.showAddPatientTime = true;
if(showNames.length>4) {
const le = showNames.length
showNames = showNames.slice(0,4)
showNames = `${showNames.join('、')}${le}人`
} else {
showNames = showNames.join('、')
}
this.addPatientData = { this.addPatientData = {
id: this.$route.query.planId, id: this.$route.query.planId,
addPatients: true, addPatients: true,
patientNames: showNames.join('、'), patientNames: showNames,
} }
} else { } else {
this.hasSelectedList = JSON.parse(JSON.stringify(this.newHasSelectedList)); this.hasSelectedList = JSON.parse(JSON.stringify(this.newHasSelectedList));
......
...@@ -336,10 +336,17 @@ ...@@ -336,10 +336,17 @@
patientNames.push(item.patientName) patientNames.push(item.patientName)
}); });
console.log(patientIds) console.log(patientIds)
if(patientNames.length>4) {
const le = patientNames.length
patientNames = patientNames.slice(0,4)
patientNames = `${patientNames.join('、')}${le}人`
} else {
patientNames = patientNames.join('、')
}
this.finishData = { this.finishData = {
changeCode: this.status, changeCode: this.status,
planId: this.$route.query.planId, planId: this.$route.query.planId,
patientName: patientNames.join('、'), patientName: patientNames,
patientIdList: patientIds, patientIdList: patientIds,
title: this.status==3?'恢复随访':'结束随访', title: this.status==3?'恢复随访':'结束随访',
reasonName: this.status==3?'恢复原因:':'结束原因:', reasonName: this.status==3?'恢复原因:':'结束原因:',
...@@ -382,11 +389,18 @@ ...@@ -382,11 +389,18 @@
patientIds.push(item.patientId) patientIds.push(item.patientId)
patientNames.push(item.nickname) patientNames.push(item.nickname)
}) })
if(patientNames.length>4) {
const le = patientNames.length
patientNames = patientNames.slice(0,4)
patientNames = `${patientNames.join('、')}${le}人`
} else {
patientNames = patientNames.join('、')
}
this.addPatientData = { this.addPatientData = {
id: this.$route.query.planId, id: this.$route.query.planId,
addPatients: true, addPatients: true,
patientIdList: patientIds, patientIdList: patientIds,
patientNames: patientNames.join('、'), patientNames: patientNames,
status: this.status status: this.status
} }
this.showAddPatientTime = true this.showAddPatientTime = true
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册