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

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of http://192.168.110.53/com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
v-model="timeForm.followResourceId" v-model="timeForm.followResourceId"
multiple multiple
:multiple-limit=2 :multiple-limit=2
@change="changeFollowId"
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
v-for="item in formOptions" v-for="item in formOptions"
...@@ -140,7 +141,7 @@ ...@@ -140,7 +141,7 @@
} }
}, },
saveValiedBegin(val){ saveValiedBegin(val){
console.log('+++保存按钮子组件的校验',val) console.log('保存按钮子组件的校验',val)
console.log(this.timeForm.formRef) console.log(this.timeForm.formRef)
if(val && this.timeForm.formRef){ if(val && this.timeForm.formRef){
this.$refs[this.timeForm.formRef].validate((valid) => { this.$refs[this.timeForm.formRef].validate((valid) => {
...@@ -154,6 +155,18 @@ ...@@ -154,6 +155,18 @@
changeRemindDay(val){ changeRemindDay(val){
console.log(val) console.log(val)
}, },
changeFollowId(val){
console.log(val)
this.formOptions.forEach((item1)=>{
console.log('item1',item1)
val.forEach((item2)=>{
console.log('item2',item2)
if(item2==item1.scaleNo){
this.timeForm.followResourceIdStr.push(item1.name)
}
})
})
},
getNowTime() { getNowTime() {
const date = new Date(); const date = new Date();
const year = date.getFullYear(); const year = date.getFullYear();
......
...@@ -214,21 +214,26 @@ ...@@ -214,21 +214,26 @@
}) })
}) })
} }
console.log(this.timeForm.followResourceIdStr)
if(this.timeForm.pushDay){ if(this.timeForm.pushDay){
this.timeForm.pushContentList.push({ this.timeForm.pushContentList.push({
startDays: this.timeForm.pushDay, startDays: this.timeForm.pushDay,
resourceId: this.timeForm.comentMsg.id resourceId: this.timeForm.comentMsg.id,
sendContent: this.timeForm.comentMsg.header_name
}) })
} }
if(this.timeForm.followResourceId.length>0){ if(this.timeForm.followResourceId.length>0){
this.timeForm.followResourceId.forEach((item)=>{ this.timeForm.followResourceId.forEach((item,index)=>{
this.timeForm.followupList.push({ this.timeForm.followupList.push({
resourceId: item resourceId: item,
sendContent : this.timeForm.followResourceIdStr[index]
}) })
}) })
} }
if(this.showSetBtn){
this.setTimeNodeList.push(this.timeForm); this.setTimeNodeList.push(this.timeForm);
}
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList) this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
// 保存按钮发起的校验 // 保存按钮发起的校验
if(obj.type=='save'){ if(obj.type=='save'){
...@@ -276,12 +281,24 @@ ...@@ -276,12 +281,24 @@
// 验证是否重复 // 验证是否重复
checkTimeIsRepeat(){ checkTimeIsRepeat(){
this.timeIsRepeat = false; this.timeIsRepeat = false;
console.log('+++',this.setTimeNodeList)
console.log('+++',this.timeForm.timeNo)
if(this.setTimeNodeList.length > 0){ if(this.setTimeNodeList.length > 0){
if(this.showSetBtn){
this.setTimeNodeList.forEach(item=>{ this.setTimeNodeList.forEach(item=>{
if(item.timeNo == this.timeForm.timeNo){ if(item.timeNo == this.timeForm.timeNo){
this.timeIsRepeat = true; this.timeIsRepeat = true;
} }
}) })
}else{
this.setTimeNodeList.forEach((item,index)=>{
if(index > 0){
if(item.timeNo == this.timeForm.timeNo){
this.timeIsRepeat = true;
}
}
})
}
} }
}, },
// 初始化新的表单 // 初始化新的表单
...@@ -300,6 +317,7 @@ ...@@ -300,6 +317,7 @@
pushDay: '', pushDay: '',
followResourceId: [], followResourceId: [],
comentMsg: {}, comentMsg: {},
followResourceIdStr: [],
totalNumber: 0, totalNumber: 0,
wechatPatientNum: 0, wechatPatientNum: 0,
messagePatientNum: 0 messagePatientNum: 0
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册