提交 09f5fcf6 编写于 作者: yi.li's avatar yi.li

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
...@@ -8,7 +8,8 @@ import {getPlanList, ...@@ -8,7 +8,8 @@ import {getPlanList,
getBasicData, getBasicData,
getFormOptions, getFormOptions,
getFollowupTemplate, getFollowupTemplate,
createFollowPlan} from '../../utils/followup/followapis' createFollowPlan,
getFollowStartTimeList} from '../../utils/followup/followapis'
export default { export default {
namespaced: true, namespaced: true,
...@@ -40,6 +41,7 @@ export default { ...@@ -40,6 +41,7 @@ export default {
name: '目前请选择自定义模板作为测试' name: '目前请选择自定义模板作为测试'
} }
], ],
followStartTimeList: [], //随访时间
}, },
mutations: { mutations: {
GET_RESIDENT_LIST(state, payload) { GET_RESIDENT_LIST(state, payload) {
...@@ -48,6 +50,9 @@ export default { ...@@ -48,6 +50,9 @@ export default {
GET_GROUP_LIST(state, payload) { GET_GROUP_LIST(state, payload) {
state.groupList = payload state.groupList = payload
}, },
GET_FOLLOW_START_TIME_LIST(state, payload) {
state.followStartTimeList = payload
},
GET_RESIDENT_DETAIL(state, payload) { GET_RESIDENT_DETAIL(state, payload) {
state.residentDetail = payload state.residentDetail = payload
state.timeNodeList = payload.fPlanDto.fPlanTimeReqList state.timeNodeList = payload.fPlanDto.fPlanTimeReqList
...@@ -92,6 +97,12 @@ export default { ...@@ -92,6 +97,12 @@ export default {
state.formOptions = payload state.formOptions = payload
}, },
GET_FOLLOW_TEMPLATE(state, payload){ GET_FOLLOW_TEMPLATE(state, payload){
state.templateOptions = [
{
id: 0,
name: '目前请选择自定义模板作为测试'
}
]
state.templateOptions = state.templateOptions.concat(payload) state.templateOptions = state.templateOptions.concat(payload)
} }
}, },
...@@ -118,6 +129,11 @@ export default { ...@@ -118,6 +129,11 @@ export default {
context.commit('GET_GROUP_LIST', data); context.commit('GET_GROUP_LIST', data);
}); });
}, },
getFollowStartTimeList(context, payload) {
getFollowStartTimeList(payload).then(({data}) => {
context.commit('GET_FOLLOW_START_TIME_LIST', data);
});
},
getResidentDetail(context, payload) { getResidentDetail(context, payload) {
getResidentDetail( getResidentDetail(
payload.planId, payload.planId,
......
...@@ -100,6 +100,14 @@ export const getGroupList = (params) => { ...@@ -100,6 +100,14 @@ export const getGroupList = (params) => {
description: '获取分组列表', description: '获取分组列表',
}) })
}; };
export const getFollowStartTimeList = (planId) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/planPatient/${planId}/times`),
method: 'get',
description: '获取随访开始时间列表(居民相关)',
})
};
export const getResidentDetail = (planId,patientId) => { export const getResidentDetail = (planId,patientId) => {
return fetch({ return fetch({
headers, headers,
......
<template>
<div class="finish-followup" v-if="showThisPage">
<el-dialog
title="选择随访开始时间"
:visible.sync="showAddPatientTime"
v-if="showThisPage"
:before-close="clickClose"
width="30%"
center>
<div class="finish-content">
<el-form
:model="addPatientData"
:rules="rules"
label-width="100px">
<el-form-item label="已选居民:">
{{addPatientData.patientNames}}
</el-form-item>
<el-form-item label="随访开始时间:" prop="finishReason">
<el-select v-model="addPatientData.joinTime" size="small">
<el-option
v-for="(item, index) in followStartTimeList"
:key="item+index"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="button-green" @click="clickClose" size="small" type="primary">取 消</el-button>
<el-button class="button-white" @click="addPatient" size="small" plain>确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { createFollowPlan } from '../../../../utils/followup/followapis'
import { mapState, mapActions} from 'vuex';
export default {
name: "add-patient-time",
props: {
showThisPage: { //是否显示model
type: Boolean,
default: function () {
return false;
}
},
addPatientData: {
type: Object,
default: function () {
return {};
}
},
},
data() {
return {
showAddPatientTime: true,
rules: {
finishReason: [
{ required: true, message: '请输入结束原因', trigger: 'blur' },
{ min: 1, max: 30, message: '长度在30个字符内', trigger: 'blur' }
],
}
}
},
mounted() {
this.getFollowStartTimeList(this.$route.query.planId);
// 获取随访时间列表
},
computed: {
...mapState('planManage', {
followStartTimeList: state => state.followStartTimeList,
})
},
methods: {
...mapActions('planManage', ['getFollowStartTimeList', 'getResidentList']),
clickClose() {
this.$emit('closeAddPatientTime',false)
},
addPatient() {
const { id, patientIdList, joinTime } = this.addPatientData;
createFollowPlan({
id,
addPatients: true,
patientIdList,
joinTime
}).then((data) => {
if(data.code == '000000') {
this.$message({
message: '添加成功!',
type: 'success'
});
this.getResidentList({
planId: this.addPatientData.id,
status: this.addPatientData.status
})
this.clickClose()
} else {
this.$message({
message: `${data.message}`,
type: 'error'
});
}
}).then((err) => {
this.$message({
message: `${err.message}`,
type: 'error'
});
});
}
}
}
</script>
<style scoped>
.el-input__inner:disabled {
background-color: #ffffff!important;
}
</style>
<style lang="scss" scoped>
@import '../../../../style/followup/followup-common';
@import '../../../../style/followup/element-reset.css';
</style>
...@@ -33,14 +33,13 @@ ...@@ -33,14 +33,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="随访开始时间:"> <el-form-item label="随访开始时间:">
<el-select v-model="planChangeData.startDate" size="small"> <el-date-picker
<el-option v-model="planChangeData.startDate"
v-for="item in nodeTimeList" type="date"
:key="item.id" format="yyyy-MM-dd"
:label="item.timeStr" value-format="yyyy-MM-dd"
:value="item.id"> placeholder="选择随访开始时间">
</el-option> </el-date-picker>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -90,7 +89,6 @@ ...@@ -90,7 +89,6 @@
}, },
mounted() { mounted() {
this.getPlanOptions(); this.getPlanOptions();
this.getNodeTimeList(this.$route.query.planId);
// 获取随访时间列表 // 获取随访时间列表
}, },
computed: { computed: {
...@@ -101,7 +99,7 @@ ...@@ -101,7 +99,7 @@
}) })
}, },
methods: { methods: {
...mapActions('planManage', ['getPlanOptions', 'getNodeTimeList']), ...mapActions('planManage', ['getPlanOptions']),
selectGroup(val) { selectGroup(val) {
const _this = this const _this = this
_this.selectedGroup = [] _this.selectedGroup = []
...@@ -115,7 +113,6 @@ ...@@ -115,7 +113,6 @@
} }
_this.selectedGroup.push(pushItem) _this.selectedGroup.push(pushItem)
}) })
console.log('this.selectedGroup',_this.selectedGroup)
}, },
clickClose() { clickClose() {
this.$emit('closeChangePlan',false); this.$emit('closeChangePlan',false);
...@@ -155,7 +152,17 @@ ...@@ -155,7 +152,17 @@
}, },
watch: { watch: {
planChangeData(val) { planChangeData(val) {
this.getNodeTimeList(val.planId); let labelList = val.yLabelList
labelList.forEach(function (item, index) {
let nodeItem = this.groupList.filter(function(item1){
return item1.labelId == item;
});
let pushItem = {
labelId: nodeItem[0].labelId,
label: nodeItem[0].labelName,
}
this.selectedGroup.push(pushItem)
})
} }
} }
} }
......
...@@ -114,9 +114,9 @@ ...@@ -114,9 +114,9 @@
} }
return { return {
isSelectCartoon: false, isSelectCartoon: false,
followResourceId: '', // followResourceId: '',
pushDay: '', // pushDay: '',
remindDay: '', // remindDay: '',
timeFormRules: { timeFormRules: {
timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' },{ validator: checkDay, trigger: 'blur' }], timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' },{ validator: checkDay, trigger: 'blur' }],
timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }], timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
...@@ -148,8 +148,11 @@ ...@@ -148,8 +148,11 @@
} }
}, },
saveValiedBegin(val){ saveValiedBegin(val){
if(val){ console.log('+++保存按钮子组件的校验',val)
console.log(this.timeForm.formRef)
if(val && this.timeForm.formRef){
this.$refs[this.timeForm.formRef].validate((valid) => { this.$refs[this.timeForm.formRef].validate((valid) => {
console.log('告诉父组件,校验结果' + valid)
this.$emit('checkValid',{valid: valid, type: 'save'}) this.$emit('checkValid',{valid: valid, type: 'save'})
}); });
} }
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<el-radio-group v-model="activeTab" @change="changeTab" size="small"> <el-radio-group v-model="activeTab" @change="changeTab" size="small">
<el-radio-button <el-radio-button
v-if="setTimeNodeList.length > 0" v-if="setTimeNodeList.length > 0"
:key="item.formRef"
v-for="(item, index) in setTimeNodeList1" v-for="(item, index) in setTimeNodeList1"
:key="index"
:label="index">开始后{{item.timeNo + item.timeUnitStr}} :label="index">开始后{{item.timeNo + item.timeUnitStr}}
<i class="el-icon-circle-close-outline" @click="deleteTimeNode(item, index)"></i> <i class="el-icon-circle-close-outline" @click="deleteTimeNode(item, index)"></i>
</el-radio-button> </el-radio-button>
...@@ -22,11 +22,16 @@ ...@@ -22,11 +22,16 @@
<!--查看时间节点--> <!--查看时间节点-->
<div class="form-div" v-if="activeTab != 'setNewRef'"> <div class="form-div" v-if="activeTab != 'setNewRef'">
<div v-for="(timeFormHas, index) in setTimeNodeList1" :key="index" :label="index"> <div
v-for="(timeFormHas, index) in setTimeNodeList1"
:key="index"
:label="index"
>
<set-time-form <set-time-form
v-if="index == activeTab" v-if="index == activeTab"
:timeForm="timeFormHas" :timeForm="timeFormHas"
:valBegin="valBegin" :valBegin="valBegin"
:saveValiedBegin="saveValiedBegin"
:markOptions="markOptions" :markOptions="markOptions"
:remindOptions="remindOptions" :remindOptions="remindOptions"
:pushTimeOptions="pushTimeOptions" :pushTimeOptions="pushTimeOptions"
...@@ -75,6 +80,7 @@ ...@@ -75,6 +80,7 @@
}, },
data() { data() {
return { return {
timeIsRepeat: false, //验证时间是否重复
valBegin: false, valBegin: false,
saveValiedBegin: false, saveValiedBegin: false,
isSelectCartoon: false, isSelectCartoon: false,
...@@ -93,7 +99,6 @@ ...@@ -93,7 +99,6 @@
setTimeNodeList: Array, setTimeNodeList: Array,
patientIdList: Array, patientIdList: Array,
checkForm: Boolean, checkForm: Boolean,
// saveStatus: Boolean,
}, },
computed: { computed: {
...mapState('planManage',{ ...mapState('planManage',{
...@@ -114,23 +119,7 @@ ...@@ -114,23 +119,7 @@
} }
}, },
}, },
created() {
this.initNewForm();
this.getConstData()
//初始化一个随访时间节点
this.activeTab = 'setNewRef';
this.timeForm.formRef = this.getNowTime();
},
watch: { watch: {
// saveStatus(val){
// if(val){
// // 校验通过并且保存一个时间节点,通知外层
//// this.setTimeNodeList.push(this.timeForm);
// }else{
//
// }
// },
setTimeNodeList(val){ setTimeNodeList(val){
this.setTimeNodeList = val this.setTimeNodeList = val
if(this.setTimeNodeList.length>0) { if(this.setTimeNodeList.length>0) {
...@@ -142,9 +131,7 @@ ...@@ -142,9 +131,7 @@
console.log('触发 保存 校验',val) console.log('触发 保存 校验',val)
// 触发 保存 校验 // 触发 保存 校验
this.saveValiedBegin = val this.saveValiedBegin = val
},
valBegin(val){
this.valBegin = val
}, },
timeForm(val) { timeForm(val) {
if(this.setTimeNodeList.length>0) { if(this.setTimeNodeList.length>0) {
...@@ -167,8 +154,17 @@ ...@@ -167,8 +154,17 @@
}); });
this.setTimeNodeList1[0].isDisabled = false; this.setTimeNodeList1[0].isDisabled = false;
} }
// this.setTimeNodeList1 = this.sortKey(this.setTimeNodeList,'timeNo')
}, },
}, },
created() {
this.initNewForm();
this.getConstData()
//初始化一个随访时间节点
this.activeTab = 'setNewRef';
this.timeForm.formRef = this.getNowTime();
console.log(this.timeForm.formRef)
},
methods: { methods: {
...mapActions('planManage', [ ...mapActions('planManage', [
'getDateUnit', 'getDateUnit',
...@@ -194,65 +190,98 @@ ...@@ -194,65 +190,98 @@
// 校验通过之后,需要新增一个新的初始化的表单 // 校验通过之后,需要新增一个新的初始化的表单
checkValid(obj){ checkValid(obj){
console.log('校验结果',obj.valid) console.log('校验结果',obj.valid)
// 校验结束
this.valBegin = false
// 校验通过了
if (obj.valid) { if (obj.valid) {
if(this.timeForm.remindDay.length>0){
this.timeForm.remindDay.forEach((item)=>{
this.timeForm.remindList.push({
startDays: item
})
})
}
if(this.timeForm.pushDay){
this.timeForm.pushContentList.push({
startDays: this.timeForm.pushDay,
resourceId: this.timeForm.comentMsg.id
}) this.checkTimeIsRepeat()
}
if(this.timeForm.followResourceId.length>0){
this.timeForm.followResourceId.forEach((item)=>{
this.timeForm.followupList.push({
resourceId: item
})
})
}
this.setTimeNodeList.push(this.timeForm); if(this.timeIsRepeat){
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList) this.$notify.success({
if(obj.type=='save'){ title: '时间节点重复',
console.log('是点击保存时候的校验,因此告诉最外层的 new-plan 组件,校验结果') message: '时间节点重复',
this.$emit('addListenSave',true) showClose: false
});
if(obj.type=='save'){
this.$emit('addListenSave',false)
}
}else{ }else{
if(this.timeForm.remindDay.length>0){
this.timeForm.remindDay.forEach((item)=>{
this.timeForm.remindList.push({
startDays: item
})
})
}
if(this.timeForm.pushDay){
this.timeForm.pushContentList.push({
startDays: this.timeForm.pushDay,
resourceId: this.timeForm.comentMsg.id
this.initNewForm(); })
}
if(this.timeForm.followResourceId.length>0){
this.timeForm.followResourceId.forEach((item)=>{
this.timeForm.followupList.push({
resourceId: item
})
})
}
this.setTimeNodeList.push(this.timeForm);
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
// 保存按钮发起的校验
if(obj.type=='save'){
this.$emit('addListenSave',true)
}else{
this.initNewForm();
// console.log('初始化过之后activeTab=====> ',this.activeTab) // console.log('初始化过之后activeTab=====> ',this.activeTab)
this.timeForm.formRef = this.getNowTime(); this.timeForm.formRef = this.getNowTime();
this.timeForm.isDisabled = true; this.timeForm.isDisabled = true;
}
} }
// 校验没通过
} else { } else {
// 告诉 保存 按钮, 校验没通过 // 保存按钮发起的校验
if(obj.type=='save'){ if(obj.type=='save'){
console.log('是点击保存时候的校验,因此告诉最外层的 new-plan 组件,校验结果')
this.$emit('addListenSave',false) this.$emit('addListenSave',false)
} }
this.valBegin = false
} }
}, },
// 点击 新增时间节点 // 点击 新增时间节点
addNewNode() { addNewNode() {
console.log('是否新增一个新的时间节点 ' + (this.activeTab == 'setNewRef')) console.log('是否新增一个新的时间节点 ' + (this.activeTab == 'setNewRef'))
this.checkTimeIsRepeat()
// 新增,则进行校验表单字段 触发校验 if(this.timeIsRepeat){
if(this.activeTab == 'setNewRef') { this.$notify.success({
this.valBegin = true title: '时间节点重复',
}else { message: '时间节点重复',
// 否则切换 已经新增的表单至新增节点表单 showClose: false
this.activeTab = 'setNewRef'; });
this.showSetBtn = true; }else{
this.initNewForm() // 新增,则进行校验表单字段 触发校验
if(this.activeTab == 'setNewRef') {
// 校验开始
this.valBegin = true
}else {
// 否则切换 已经新增的表单至新增节点表单
this.activeTab = 'setNewRef';
this.showSetBtn = true;
this.initNewForm()
}
}
},
// 验证是否重复
checkTimeIsRepeat(){
this.timeIsRepeat = false;
if(this.setTimeNodeList.length > 0){
this.setTimeNodeList.forEach(item=>{
if(item.timeNo == this.timeForm.timeNo){
this.timeIsRepeat = true;
}
})
} }
}, },
// 初始化新的表单 // 初始化新的表单
...@@ -310,6 +339,8 @@ ...@@ -310,6 +339,8 @@
deleteAddNode() { deleteAddNode() {
this.showSetBtn = false; this.showSetBtn = false;
this.activeTab = 0; this.activeTab = 0;
this.timeForm = this.setTimeNodeList[0];
this.timeForm.formRef = this.getNowTime();
}, },
getNowTime() { getNowTime() {
const date = new Date(); const date = new Date();
......
...@@ -170,11 +170,6 @@ ...@@ -170,11 +170,6 @@
//清理store中存的数据setTimeNodeList //清理store中存的数据setTimeNodeList
}, },
// watch: {
// checkForm(val){
// this.checkForm = val
// }
// },
computed: { computed: {
...mapState('planManage',{ ...mapState('planManage',{
setTimeNodeList: state => state.setTimeNodeList, setTimeNodeList: state => state.setTimeNodeList,
...@@ -187,7 +182,6 @@ ...@@ -187,7 +182,6 @@
// 点击保存 // 点击保存
saveEdit() { saveEdit() {
console.log(this.checkForm)
// 点击保存,先进行校验,表单字段是否通过验证 // 点击保存,先进行校验,表单字段是否通过验证
this.checkForm = true this.checkForm = true
}, },
...@@ -223,6 +217,8 @@ ...@@ -223,6 +217,8 @@
}) })
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1) // console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList)) // console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList))
}else{
console.log('点击保存按钮之后校验失败')
} }
}, },
setTimeNodeListOnCom(val){ setTimeNodeListOnCom(val){
...@@ -244,7 +240,6 @@ ...@@ -244,7 +240,6 @@
let getArguments = arguments[0]; let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0]; this.isShowSelectPatient = getArguments[0];
const selectPatients = getArguments[1]; // 每次选中获取的人 const selectPatients = getArguments[1]; // 每次选中获取的人
// this.hasSelectedList = selectPatients;
selectPatients.forEach((item)=>{ selectPatients.forEach((item)=>{
if(!this.baseInfo.patientIdList.includes(item.patientId)){ if(!this.baseInfo.patientIdList.includes(item.patientId)){
this.hasSelectedList.push(item) this.hasSelectedList.push(item)
......
...@@ -58,10 +58,15 @@ ...@@ -58,10 +58,15 @@
</div> </div>
<select-patient <select-patient
:isShowSelectPatient="isShowSelectPatient" :isShowSelectPatient="isShowSelectPatient"
:patientIdList="patientIdList"
@closeSelectPatient="closeSelectPatient" @closeSelectPatient="closeSelectPatient"
@sureSelectPatient="sureSelectPatient(arguments)"> @sureSelectPatient="sureSelectPatient(arguments)">
</select-patient> </select-patient>
<has-selected-patient :isShowSelectedDialog="isShowSelectedDialog" :hasSelectedList="residentList.fPlanPatientInfoDtoList" @closeSelectedDialog="closeSelectedDialog" @continueAdd="continueAdd"></has-selected-patient> <has-selected-patient
:isShowSelectedDialog="isShowSelectedDialog"
:hasSelectedList="hasSelectedList"
@closeSelectedDialog="closeSelectedDialog"
@continueAdd="continueAdd" />
<follow-time :showThisPage="showFollowTime" :nodeTimeList="nodeTimeList" @closeFollowTime="closeFollowTime"></follow-time> <follow-time :showThisPage="showFollowTime" :nodeTimeList="nodeTimeList" @closeFollowTime="closeFollowTime"></follow-time>
</div> </div>
</template> </template>
...@@ -88,6 +93,8 @@ ...@@ -88,6 +93,8 @@
data() { data() {
return { return {
checkForm: false, checkForm: false,
patientIdList: [], //获取的病人列表
hasSelectedList: [], //已选居民
// saveStatus: false, // saveStatus: false,
/*面包屑配置*/ /*面包屑配置*/
curmbFirst: '随访管理', curmbFirst: '随访管理',
...@@ -113,7 +120,6 @@ ...@@ -113,7 +120,6 @@
], ],
isShowSelectPatient: false, //显示居民选择框 isShowSelectPatient: false, //显示居民选择框
isShowSelectedDialog: false, //显示已选居民 isShowSelectedDialog: false, //显示已选居民
hasSelectedList: [], //已选居民
nodeListModify: [], //修改node列表 nodeListModify: [], //修改node列表
showFollowTime: false, //是否展示全部时间 showFollowTime: false, //是否展示全部时间
} }
...@@ -160,8 +166,14 @@ ...@@ -160,8 +166,14 @@
sureSelectPatient() { sureSelectPatient() {
let getArguments = arguments[0]; let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0]; this.isShowSelectPatient = getArguments[0];
this.hasSelectedList = getArguments[1]; const selectPatients = getArguments[1]; // 每次选中获取的人
this.modifyInfo.hasSelectedNum = getArguments[1].length; selectPatients.forEach((item)=>{
if(!this.patientIdList.includes(item.patientId)){
this.hasSelectedList.push(item)
this.patientIdList.push(item.patientId); // 页面中数据存储所有选择的人,没有去重
}
})
this.hasSelectedNum = this.patientIdList.length;
}, },
continueAdd(val) { continueAdd(val) {
this.isShowSelectedDialog = val; this.isShowSelectedDialog = val;
...@@ -231,6 +243,8 @@ ...@@ -231,6 +243,8 @@
// this.saveStatus = false // this.saveStatus = false
} }
}) })
}else{
console.log('点击保存按钮之后校验失败')
} }
}, },
goToFollowTime() { goToFollowTime() {
...@@ -247,6 +261,9 @@ ...@@ -247,6 +261,9 @@
planDetail(val) { planDetail(val) {
// this.setTimeNodeList = val.fPlanTimeDtoList // this.setTimeNodeList = val.fPlanTimeDtoList
this.setTimeNodeListOnCom(val.fPlanTimeReqList) this.setTimeNodeListOnCom(val.fPlanTimeReqList)
console.log(val)
this.patientIdList = val.patientIdList
// this.hasSelectedList =
}, },
} }
} }
......
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
<div class="resident-table table-content"> <div class="resident-table table-content">
<div class="btn-div"> <div class="btn-div">
<el-radio-group v-model="status" size="small"> <el-radio-group v-model="status" size="small">
<el-radio-button label="0">未完成({{residentList.notCount}})</el-radio-button> <el-radio-button label="1">未完成({{residentList.notCount}})</el-radio-button>
<el-radio-button label="1">进行中({{residentList.handCount}})</el-radio-button> <el-radio-button label="2">进行中({{residentList.handCount}})</el-radio-button>
<el-radio-button label="2">已结束({{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==2" @click="recoverFollowup('all')">恢复随访</el-button>
...@@ -126,9 +126,14 @@ ...@@ -126,9 +126,14 @@
<recover-followup :showThisPage="showRecoverFollowup" :finishData="recoverData" @closeFinishFollowup="closeRecoverFollowup"></recover-followup> <recover-followup :showThisPage="showRecoverFollowup" :finishData="recoverData" @closeFinishFollowup="closeRecoverFollowup"></recover-followup>
<select-patient <select-patient
:isShowSelectPatient="isShowSelectPatient" :isShowSelectPatient="isShowSelectPatient"
:patientIdList="initialPatientIdList"
@closeSelectPatient="closeSelectPatient" @closeSelectPatient="closeSelectPatient"
@sureSelectPatient="sureSelectPatient(arguments)"> @sureSelectPatient="sureSelectPatient(arguments)">
</select-patient> </select-patient>
<add-patient-time
:showThisPage="showAddPatientTime"
:addPatientData="addPatientData"
@closeAddPatientTime="closeAddPatientTime"></add-patient-time>
</div> </div>
</template> </template>
...@@ -142,6 +147,8 @@ ...@@ -142,6 +147,8 @@
import RecoverFollowup from '@/views/followup/plan-manage/dialog/finish-followup'; 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';
//添加居民选择随访时间
import addPatientTime from '@/views/followup/plan-manage/dialog/add-patient-time';
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
export default { export default {
...@@ -151,7 +158,8 @@ ...@@ -151,7 +158,8 @@
ChangePlan, ChangePlan,
FinishFollowup, FinishFollowup,
SelectPatient, SelectPatient,
RecoverFollowup RecoverFollowup,
addPatientTime
}, },
data() { data() {
return { return {
...@@ -167,7 +175,7 @@ ...@@ -167,7 +175,7 @@
value: '全部', value: '全部',
label: '全部' label: '全部'
}], }],
status: 0, //列表筛选条件 status: 1, //列表筛选条件
showChangePlan: false,//是否展示变更计划 showChangePlan: false,//是否展示变更计划
planChangeData: {}, //变更计划数据 planChangeData: {}, //变更计划数据
showFinishFollowup: false, //是否展示结束随访 showFinishFollowup: false, //是否展示结束随访
...@@ -177,6 +185,9 @@ ...@@ -177,6 +185,9 @@
isShowSelectPatient: false, //显示居民选择框 isShowSelectPatient: false, //显示居民选择框
hasSelectedList: [], //已选居民 hasSelectedList: [], //已选居民
finishPatientList: [], //结束随访居民(多选) finishPatientList: [], //结束随访居民(多选)
initialPatientIdList: [], //初始居民
showAddPatientTime: false,//是否展示添加居民选择时间
addPatientData: {}, //选择时间数据
} }
}, },
created() { created() {
...@@ -184,7 +195,8 @@ ...@@ -184,7 +195,8 @@
}, },
mounted() { mounted() {
this.getResidentList({ this.getResidentList({
planId: this.$route.query.planId planId: this.$route.query.planId,
status: this.status
}); });
this.getPlanStatusOption() this.getPlanStatusOption()
this.getGroupList(); //获取分组列表 this.getGroupList(); //获取分组列表
...@@ -296,11 +308,38 @@ ...@@ -296,11 +308,38 @@
closeSelectPatient(val) { closeSelectPatient(val) {
this.isShowSelectPatient = val; this.isShowSelectPatient = val;
}, },
closeAddPatientTime(isShow) {
this.showAddPatientTime = isShow
},
sureSelectPatient() { sureSelectPatient() {
console.log('arguments',arguments)
let getArguments = arguments[0]; let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0]; this.isShowSelectPatient = getArguments[0];
this.hasSelectedList = getArguments[1]; const selectPatients = getArguments[1]; // 每次选中获取的人
this.modifyInfo.hasSelectedNum = getArguments[1].length; // this.hasSelectedList = selectPatients;
console.log(selectPatients)
let patientIds = []
let patientNames = []
/*selectPatients.forEach((item)=>{
patientIds.push(item.patientId)
patientNames.push(item.nickname)
})*/
selectPatients.forEach((item)=>{
if(!this.initialPatientIdList.includes(item.patientId)){
patientIds.push(item.patientId)
patientNames.push(item.nickname)
// this.baseInfo.patientIdList.push(item.patientId); // 页面中数据存储所有选择的人,没有去重
}
})
this.addPatientData = {
id: this.$route.query.planId,
addPatients: true,
patientIdList: patientIds,
patientNames: patientNames.join('、'),
status: this.status
}
this.showAddPatientTime = true
// this.baseInfo.hasSelectedNum = this.baseInfo.patientIdList.length;
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
console.log('已选居民',val) console.log('已选居民',val)
...@@ -314,6 +353,12 @@ ...@@ -314,6 +353,12 @@
...this.searchData, ...this.searchData,
planId: this.$route.query.planId planId: this.$route.query.planId
}) })
},
residentList(val) {
const _this = this
val.fPlanPatientInfoDtoList.forEach(function (item,index) {
_this.initialPatientIdList.push(item.patientId)
})
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册