提交 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 {
],
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);
});
}
},
}
......@@ -14,7 +14,7 @@
clearable />
</el-form-item>
<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
v-for="(item,index) in markOptions"
:key="index"
......@@ -22,7 +22,7 @@
:value="item.no">
</el-option>
</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
v-for="(item,index) in markOptions"
:key="index"
......@@ -40,7 +40,7 @@
</el-form-item>
<el-form-item label="提醒医生预约居民">
<el-select
v-if="!isStandedTemplate"
v-if="!isStandedTemplate && !planId"
v-model="timeForm.remindDay"
multiple
:multiple-limit=3
......@@ -56,7 +56,7 @@
<!--固定模板需要填充-->
<el-select
v-if="isStandedTemplate"
v-if="isStandedTemplate || planId"
v-model="timeForm.remindDay"
multiple
:multiple-limit=3
......@@ -74,7 +74,7 @@
<div style="display: flex">
<el-select
v-if="!isStandedTemplate"
v-if="!isStandedTemplate && !planId"
v-model="timeForm.pushDay"
placeholder="选择推送时间"
clearable
......@@ -89,7 +89,7 @@
<!--固定模板需要填充-->
<el-select
v-if="isStandedTemplate"
v-if="isStandedTemplate || planId"
v-model="timeForm.pushDay"
placeholder="选择推送时间"
clearable
......@@ -100,11 +100,11 @@
:value="timeForm.pushDay">
</el-option>
</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">
<span>{{timeForm.comentMsg.header_name}}</span>
<el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate">重选</el-button>
<el-button type="text" @click="deleteClick" 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 && !planId">删除</el-button>
</div>
</div>
</el-form-item>
......@@ -114,7 +114,7 @@
</div>
<el-form-item label="随访登记表">
<el-select
v-if="!isStandedTemplate"
v-if="!isStandedTemplate && !planId"
v-model="timeForm.followResourceId"
multiple
:multiple-limit=3
......@@ -130,7 +130,7 @@
<!--固定模板需要填充-->
<el-select
v-if="isStandedTemplate"
v-if="isStandedTemplate || planId"
v-model="timeForm.followResourceId"
multiple
:multiple-limit=3
......@@ -171,6 +171,7 @@
callback();
}
return {
formNoList: [],//存放量表 scaleNo 的数组,用于匹配所选项
remindOptionsCopy: [],//提升医生预约居民 - 标准模板
formOptionsCopy: [], //量表 - 标准模板
isSelectCartoon: false,
......@@ -195,19 +196,22 @@
planId: String
},
watch: {
patientIdList(val){
},
timeForm(val){
this.timeForm = val
if(this.isStandedTemplate || this.planId){
// console.log('表单子组件监听到的form数据',this.timeForm)
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.timeForm.remindDay = []
this.timeForm.remindList.forEach((item)=>{
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]
this.timeForm.pushDay = pushData.startDays
this.timeForm.startDaysStr = pushData.startDaysStr
......@@ -220,7 +224,7 @@
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.timeForm.followResourceId = []
this.timeForm.followupList.forEach((item)=>{
......@@ -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){
if(val){
......@@ -253,13 +282,12 @@
console.log(val)
},
changeFollowId(val){
this.formOptions.forEach((item1)=>{
val.forEach((item2)=>{
if(item2==item1.scaleNo){
this.timeForm.followResourceIdStr.push(item1.name)
this.timeForm.followResourceIdStr = []
val.forEach((item)=>{
if(this.formNoList.includes(item)){
this.timeForm.followResourceIdStr.push(item)
}
})
})
},
getNowTime() {
const date = new Date();
......
......@@ -9,7 +9,7 @@
v-if="setTimeNodeList.length > 0"
v-for="(item, index) in setTimeNodeList1"
: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>
</el-radio-button>
<el-radio-button
......
......@@ -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">
......@@ -51,6 +51,7 @@
<set-time-node
:isStandedTemplate="isStandedTemplate"
:setTimeNodeList="setTimeNodeList"
:patientIdList="patientIdList"
@setTimeNodeListOnCom="setTimeNodeListOnCom"
:checkForm="checkForm"
:planId="planId"
......@@ -132,7 +133,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 +144,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 +155,8 @@
'getResidentList',
'getRemarkOption',
'getTimeNodeList',
'setFollowPlan'
'setFollowPlan',
'getSelectResident'
]),
selectPatientHandler() {
this.isShowSelectPatient = true;
......@@ -266,7 +269,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 +277,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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册