提交 117d21fa 编写于 作者: 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
...@@ -43,6 +43,7 @@ export default { ...@@ -43,6 +43,7 @@ export default {
], ],
followStartTimeList: [], //随访时间 followStartTimeList: [], //随访时间
residentCrumb: [], //居民面包屑 residentCrumb: [], //居民面包屑
selectResidentList: [], //修改计划已选居民
}, },
mutations: { mutations: {
GET_RESIDENT_LIST(state, payload) { GET_RESIDENT_LIST(state, payload) {
...@@ -109,6 +110,9 @@ export default { ...@@ -109,6 +110,9 @@ export default {
SET_RESIDENT_CRUMB(state, payload){ SET_RESIDENT_CRUMB(state, payload){
state.residentCrumb = payload state.residentCrumb = payload
sessionStorage.setItem('residentCrumb', JSON.stringify(state.residentCrumb)); sessionStorage.setItem('residentCrumb', JSON.stringify(state.residentCrumb));
},
GET_SELECT_RESIDENT(state, payload) {
state.selectResidentList = payload.fPlanPatientInfoDtoList
} }
}, },
actions: { actions: {
...@@ -247,5 +251,12 @@ export default { ...@@ -247,5 +251,12 @@ export default {
setResidentCrumb(context, payload) { setResidentCrumb(context, payload) {
context.commit('SET_RESIDENT_CRUMB', payload); context.commit('SET_RESIDENT_CRUMB', payload);
}, },
getSelectResident(context, payload) {
getResidentList({
...payload
}).then(({data}) => {
context.commit('GET_SELECT_RESIDENT', data);
});
}
}, },
} }
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
clearable /> clearable />
</el-form-item> </el-form-item>
<el-form-item prop="timeUnit" class="ml20"> <el-form-item prop="timeUnit" class="ml20">
<el-select v-if="!isStandedTemplate" v-model="timeForm.timeUnit" placeholder="请选择" :disabled="timeForm.isDisabled"> <el-select v-if="!isStandedTemplate && !planId" v-model="timeForm.timeUnit" placeholder="请选择" :disabled="timeForm.isDisabled">
<el-option <el-option
v-for="(item,index) in markOptions" v-for="(item,index) in markOptions"
:key="index" :key="index"
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
:value="item.no"> :value="item.no">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-if="isStandedTemplate" v-model="timeForm.timeUnit" placeholder="请选择" :disabled="isStandedTemplate"> <el-select v-if="isStandedTemplate || planId" v-model="timeForm.timeUnit" placeholder="请选择" :disabled="isStandedTemplate">
<el-option <el-option
v-for="(item,index) in markOptions" v-for="(item,index) in markOptions"
:key="index" :key="index"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</el-form-item> </el-form-item>
<el-form-item label="提醒医生预约居民"> <el-form-item label="提醒医生预约居民">
<el-select <el-select
v-if="!isStandedTemplate" v-if="!isStandedTemplate && !planId"
v-model="timeForm.remindDay" v-model="timeForm.remindDay"
multiple multiple
:multiple-limit=3 :multiple-limit=3
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<!--固定模板需要填充--> <!--固定模板需要填充-->
<el-select <el-select
v-if="isStandedTemplate" v-if="isStandedTemplate || planId"
v-model="timeForm.remindDay" v-model="timeForm.remindDay"
multiple multiple
:multiple-limit=3 :multiple-limit=3
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<div style="display: flex"> <div style="display: flex">
<el-select <el-select
v-if="!isStandedTemplate" v-if="!isStandedTemplate && !planId"
v-model="timeForm.pushDay" v-model="timeForm.pushDay"
placeholder="选择推送时间" placeholder="选择推送时间"
clearable clearable
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<!--固定模板需要填充--> <!--固定模板需要填充-->
<el-select <el-select
v-if="isStandedTemplate" v-if="isStandedTemplate || planId"
v-model="timeForm.pushDay" v-model="timeForm.pushDay"
placeholder="选择推送时间" placeholder="选择推送时间"
clearable clearable
...@@ -100,11 +100,11 @@ ...@@ -100,11 +100,11 @@
:value="timeForm.pushDay"> :value="timeForm.pushDay">
</el-option> </el-option>
</el-select> </el-select>
<el-button plain class="ml20" @click="goSelectCartoon" v-if="!timeForm.hasSelected && !isStandedTemplate">选择健康漫画</el-button> <el-button plain class="ml20" @click="goSelectCartoon" v-if="!timeForm.hasSelected && !isStandedTemplate && !planId">选择健康漫画</el-button>
<div class="selected-div ml20" v-if="timeForm.hasSelected"> <div class="selected-div ml20" v-if="timeForm.hasSelected">
<span>{{timeForm.comentMsg.header_name}}</span> <span>{{timeForm.comentMsg.header_name}}</span>
<el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate">重选</el-button> <el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate && !planId">重选</el-button>
<el-button type="text" @click="deleteClick" v-if="!isStandedTemplate">删除</el-button> <el-button type="text" @click="deleteClick" v-if="!isStandedTemplate && !planId">删除</el-button>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</div> </div>
<el-form-item label="随访登记表"> <el-form-item label="随访登记表">
<el-select <el-select
v-if="!isStandedTemplate" v-if="!isStandedTemplate && !planId"
v-model="timeForm.followResourceId" v-model="timeForm.followResourceId"
multiple multiple
:multiple-limit=3 :multiple-limit=3
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<!--固定模板需要填充--> <!--固定模板需要填充-->
<el-select <el-select
v-if="isStandedTemplate" v-if="isStandedTemplate || planId"
v-model="timeForm.followResourceId" v-model="timeForm.followResourceId"
multiple multiple
:multiple-limit=3 :multiple-limit=3
...@@ -171,6 +171,7 @@ ...@@ -171,6 +171,7 @@
callback(); callback();
} }
return { return {
formNoList: [],//存放量表 scaleNo 的数组,用于匹配所选项
remindOptionsCopy: [],//提升医生预约居民 - 标准模板 remindOptionsCopy: [],//提升医生预约居民 - 标准模板
formOptionsCopy: [], //量表 - 标准模板 formOptionsCopy: [], //量表 - 标准模板
isSelectCartoon: false, isSelectCartoon: false,
...@@ -195,19 +196,22 @@ ...@@ -195,19 +196,22 @@
planId: String planId: String
}, },
watch: { watch: {
patientIdList(val){
},
timeForm(val){ timeForm(val){
this.timeForm = val this.timeForm = val
if(this.isStandedTemplate || this.planId){ if(this.isStandedTemplate || this.planId){
// console.log('表单子组件监听到的form数据',this.timeForm) // console.log('表单子组件监听到的form数据',this.timeForm)
this.timeForm.isDisabled = true this.timeForm.isDisabled = true
if(this.timeForm.remindList.length > 0){// remindDay if(this.timeForm.remindList && this.timeForm.remindList.length > 0){// remindDay
this.remindOptionsCopy = this.timeForm.remindList this.remindOptionsCopy = this.timeForm.remindList
this.timeForm.remindDay = [] this.timeForm.remindDay = []
this.timeForm.remindList.forEach((item)=>{ this.timeForm.remindList.forEach((item)=>{
this.timeForm.remindDay.push(item.startDays) this.timeForm.remindDay.push(item.startDays)
}) })
} }
if(this.timeForm.pushContentList.length > 0){//pushDay if(this.timeForm.pushContentList && this.timeForm.pushContentList.length > 0){//pushDay
let pushData = this.timeForm.pushContentList[0] let pushData = this.timeForm.pushContentList[0]
this.timeForm.pushDay = pushData.startDays this.timeForm.pushDay = pushData.startDays
this.timeForm.startDaysStr = pushData.startDaysStr this.timeForm.startDaysStr = pushData.startDaysStr
...@@ -220,7 +224,7 @@ ...@@ -220,7 +224,7 @@
hasSelected: this.timeForm.comentMsg hasSelected: this.timeForm.comentMsg
}) })
} }
if(this.timeForm.followupList.length > 0){ //followResourceId if(this.timeForm.followupList && this.timeForm.followupList.length > 0){ //followResourceId
this.formOptionsCopy = this.timeForm.followupList this.formOptionsCopy = this.timeForm.followupList
this.timeForm.followResourceId = [] this.timeForm.followResourceId = []
this.timeForm.followupList.forEach((item)=>{ this.timeForm.followupList.forEach((item)=>{
...@@ -228,7 +232,32 @@ ...@@ -228,7 +232,32 @@
}) })
} }
getPatientNumber({
patientIdList: this.patientIdList
}).then(res=>{
if(res.code=='000000'){
this.timeForm.wechatPatientNum = res.data.wechatPatientNum;
this.timeForm.messagePatientNum = res.data.messagePatientNum;
this.timeForm.totalNumber = this.timeForm.wechatPatientNum + this.timeForm.messagePatientNum
}else{
this.$notify.success({
title: '提交失败',
message: res.message,
showClose: false
});
}
})
// console.log(this.isStandedTemplate)
// console.log(this.formOptions)
// console.log(this.formOptionsCopy)
} }
},
formOptions(val){
val.forEach((item)=>{
this.formNoList.push(item.scaleNo)
})
}, },
valBegin(val){ valBegin(val){
if(val){ if(val){
...@@ -253,13 +282,12 @@ ...@@ -253,13 +282,12 @@
console.log(val) console.log(val)
}, },
changeFollowId(val){ changeFollowId(val){
this.formOptions.forEach((item1)=>{ this.timeForm.followResourceIdStr = []
val.forEach((item2)=>{ val.forEach((item)=>{
if(item2==item1.scaleNo){ if(this.formNoList.includes(item)){
this.timeForm.followResourceIdStr.push(item1.name) this.timeForm.followResourceIdStr.push(item)
} }
}) })
})
}, },
getNowTime() { getNowTime() {
const date = new Date(); const date = new Date();
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
v-if="setTimeNodeList.length > 0" v-if="setTimeNodeList.length > 0"
v-for="(item, index) in setTimeNodeList1" v-for="(item, index) in setTimeNodeList1"
:key="index" :key="index"
:label="index">开始后{{item.timeNo + item.timeUnitStr}} :label="index">开始后{{String(item.timeNo) + item.timeUnitStr}}
<i class="el-icon-circle-close-outline" v-if="!isStandedTemplate" @click="deleteTimeNode(item, index)"></i> <i class="el-icon-circle-close-outline" v-if="!isStandedTemplate" @click="deleteTimeNode(item, index)"></i>
</el-radio-button> </el-radio-button>
<el-radio-button <el-radio-button
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<el-form-item label="随访居民" required> <el-form-item label="随访居民" required>
<div class="select-patients"> <div class="select-patients">
<el-button plain icon="el-icon-plus" size="small" @click="selectPatientHandler">{{planDetail.patientIdList ? '继续添加' : '选择居民'}}</el-button><br> <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> </div>
</el-form-item> </el-form-item>
<el-form-item label="随访模板" prop="resourceName"> <el-form-item label="随访模板" prop="resourceName">
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<set-time-node <set-time-node
:isStandedTemplate="isStandedTemplate" :isStandedTemplate="isStandedTemplate"
:setTimeNodeList="setTimeNodeList" :setTimeNodeList="setTimeNodeList"
:patientIdList="patientIdList"
@setTimeNodeListOnCom="setTimeNodeListOnCom" @setTimeNodeListOnCom="setTimeNodeListOnCom"
:checkForm="checkForm" :checkForm="checkForm"
:planId="planId" :planId="planId"
...@@ -132,7 +133,7 @@ ...@@ -132,7 +133,7 @@
this.getPlanDetail(this.$route.query.planId); //获取计划详情 this.getPlanDetail(this.$route.query.planId); //获取计划详情
this.getRemarkOption() this.getRemarkOption()
this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表 this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表
this.getResidentList({ this.getSelectResident({
planId: this.$route.query.planId planId: this.$route.query.planId
}); //已选居民 }); //已选居民
...@@ -143,7 +144,8 @@ ...@@ -143,7 +144,8 @@
nodeTimeList: state => state.nodeTimeList, nodeTimeList: state => state.nodeTimeList,
residentList: state => state.residentList, residentList: state => state.residentList,
remarkOption: state => state.remarkOption, remarkOption: state => state.remarkOption,
setTimeNodeList: state => state.setTimeNodeList setTimeNodeList: state => state.setTimeNodeList,
selectResidentList: state => state.selectResidentList
}) })
}, },
methods: { methods: {
...@@ -153,7 +155,8 @@ ...@@ -153,7 +155,8 @@
'getResidentList', 'getResidentList',
'getRemarkOption', 'getRemarkOption',
'getTimeNodeList', 'getTimeNodeList',
'setFollowPlan' 'setFollowPlan',
'getSelectResident'
]), ]),
selectPatientHandler() { selectPatientHandler() {
this.isShowSelectPatient = true; this.isShowSelectPatient = true;
...@@ -266,7 +269,7 @@ ...@@ -266,7 +269,7 @@
// this.setTimeNodeList = val.fPlanTimeDtoList // this.setTimeNodeList = val.fPlanTimeDtoList
this.setTimeNodeListOnCom(val.fPlanTimeReqList) this.setTimeNodeListOnCom(val.fPlanTimeReqList)
// console.log(this.setTimeNodeList) // console.log(this.setTimeNodeList)
this.patientIdList = val.patientIdList // this.patientIdList = val.patientIdList
this.planId = String(val.id) this.planId = String(val.id)
if(val.resourceId){ if(val.resourceId){
this.isStandedTemplate = true this.isStandedTemplate = true
...@@ -274,6 +277,24 @@ ...@@ -274,6 +277,24 @@
this.isStandedTemplate = false 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> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册