提交 3367c066 编写于 作者: tao.wu's avatar tao.wu

no message

上级 1319bb14
...@@ -284,6 +284,7 @@ ...@@ -284,6 +284,7 @@
console.log(val) console.log(val)
}, },
changeFollowId(val){ changeFollowId(val){
console.log(val)
this.timeForm.followResourceIdStr = [] this.timeForm.followResourceIdStr = []
val.forEach((item)=>{ val.forEach((item)=>{
if(this.formNoList.includes(item)){ if(this.formNoList.includes(item)){
......
...@@ -4,20 +4,34 @@ ...@@ -4,20 +4,34 @@
<div class="add-time-content"> <div class="add-time-content">
<div class="time-line-scroll"> <div class="time-line-scroll">
<el-radio-group v-model="activeTab" @change="changeTab" size="small">
<el-radio-button <!--<el-row :gutter="20" v-model="activeTab">-->
v-if="setTimeNodeList.length > 0" <!--<el-col :span="6" v-if="setTimeNodeList.length > 0"-->
v-for="(item, index) in setTimeNodeList1" <!--v-for="(item, index) in setTimeNodeList1"-->
:key="index" <!--:key="index"-->
:label="index">开始后{{String(item.timeNo) + item.timeUnitStr}} <!--:label="index">开始后{{String(item.timeNo) + item.timeUnitStr}}><div @click="changeTab(index)" class="grid-content bg-purple"></div></el-col>-->
<i class="el-icon-circle-close-outline" v-if="!isStandedTemplate" @click="deleteTimeNode(item, index)"></i> <!--</el-row>-->
</el-radio-button> <div :gutter="20" v-model="activeTab">
<el-radio-button <div @click="changeTab(index)" :span="6" v-if="setTimeNodeList.length > 0"
label="setNewRef" v-for="(item, index) in setTimeNodeList1"
v-if="showSetBtn && !isStandedTemplate">设置随访时间 :key="index"
<i class="el-icon-circle-close-outline" @click="deleteAddNode" v-if="setTimeNodeList.length>0"></i> :label="index">开始后{{String(item.timeNo) + item.timeUnitStr}}></div>
</el-radio-button> </div>
</el-radio-group>
<!--<el-radio-group v-model="activeTab" @change="changeTab" size="small">-->
<!--<el-radio-button-->
<!--v-if="setTimeNodeList.length > 0"-->
<!--v-for="(item, index) in setTimeNodeList1"-->
<!--:key="index"-->
<!--: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-->
<!--label="setNewRef"-->
<!--v-if="showSetBtn && !isStandedTemplate">设置随访时间-->
<!--<i class="el-icon-circle-close-outline" @click="deleteAddNode" v-if="setTimeNodeList.length>0"></i>-->
<!--</el-radio-button>-->
<!--</el-radio-group>-->
</div> </div>
<!--查看时间节点--> <!--查看时间节点-->
...@@ -224,9 +238,66 @@ ...@@ -224,9 +238,66 @@
}else{ }else{
console.log(this.isStandedTemplate) console.log(this.isStandedTemplate)
console.log(this.planId) console.log(this.planId)
// 不是固定模板 // 修改
if(!this.isStandedTemplate && !this.planId){ if(this.planId){
if(this.timeForm.remindDay.length>0){ console.log('修改计划中')
// 固定模板
if(this.isStandedTemplate){
// 只能保存提交
// this.setTimeNodeList.push(this.timeForm);
console.log('addListenSave',this.setTimeNodeList)
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
this.$emit('addListenSave',true)
}else{
// 自定义普通修改
if(this.timeForm.remindDay.length>0){
this.timeForm.remindList = []
this.timeForm.remindDay.forEach((item)=>{
this.timeForm.remindList.push({
startDays: item
})
})
}
console.log(this.timeForm)
console.log(this.timeForm.followResourceIdStr)
if(this.timeForm.pushDay){
this.timeForm.pushContentList = []
this.timeForm.pushContentList.push({
startDays: this.timeForm.pushDay,
resourceId: this.timeForm.comentMsg.id,
sendContent: this.timeForm.comentMsg.header_name
})
}
if(this.timeForm.followResourceId.length>0){
this.timeForm.followupList = []
this.timeForm.followResourceId.forEach((item,index)=>{
this.timeForm.followupList.push({
resourceId: item,
sendContent : this.timeForm.followResourceIdStr?this.timeForm.followResourceIdStr[index]:''
})
})
}
if(this.showSetBtn){
this.setTimeNodeList.push(this.timeForm);
}
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
console.log('addListenSave',this.setTimeNodeList)
// 保存按钮发起的校验
if(obj.type=='save'){
this.$emit('addListenSave',true)
}else{
this.initNewForm();
// console.log('初始化过之后activeTab=====> ',this.activeTab)
this.timeForm.formRef = this.getNowTime();
this.timeForm.isDisabled = true;
}
}
}else{
// 新建
if(this.timeForm.remindDay && this.timeForm.remindDay.length>0){
this.timeForm.remindDay = []
this.timeForm.remindDay.forEach((item)=>{ this.timeForm.remindDay.forEach((item)=>{
this.timeForm.remindList.push({ this.timeForm.remindList.push({
startDays: item startDays: item
...@@ -236,17 +307,19 @@ ...@@ -236,17 +307,19 @@
console.log(this.timeForm) console.log(this.timeForm)
console.log(this.timeForm.followResourceIdStr) console.log(this.timeForm.followResourceIdStr)
if(this.timeForm.pushDay){ if(this.timeForm.pushDay){
this.timeForm.pushContentList = []
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 sendContent: this.timeForm.comentMsg.header_name
}) })
} }
if(this.timeForm.followResourceId.length>0){ if(this.timeForm.followResourceId && this.timeForm.followResourceId.length>0){
this.timeForm.followupList = []
this.timeForm.followResourceId.forEach((item,index)=>{ this.timeForm.followResourceId.forEach((item,index)=>{
this.timeForm.followupList.push({ this.timeForm.followupList.push({
resourceId: item, resourceId: item,
sendContent : this.timeForm.followResourceIdStr[index] sendContent : this.timeForm.followResourceIdStr?this.timeForm.followResourceIdStr[index]:''
}) })
}) })
} }
...@@ -265,13 +338,57 @@ ...@@ -265,13 +338,57 @@
this.timeForm.formRef = this.getNowTime(); this.timeForm.formRef = this.getNowTime();
this.timeForm.isDisabled = true; this.timeForm.isDisabled = true;
} }
}else{// 是固定模板
// 只能保存提交
// this.setTimeNodeList.push(this.timeForm);
console.log('addListenSave',this.setTimeNodeList)
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
this.$emit('addListenSave',true)
} }
// 不是固定模板
// if(!this.isStandedTemplate){
// if(this.timeForm.remindDay.length>0){
// this.timeForm.remindDay.forEach((item)=>{
// this.timeForm.remindList.push({
// startDays: item
// })
// })
// }
// console.log(this.timeForm)
// console.log(this.timeForm.followResourceIdStr)
// if(this.timeForm.pushDay){
// this.timeForm.pushContentList.push({
// startDays: this.timeForm.pushDay,
// resourceId: this.timeForm.comentMsg.id,
// sendContent: this.timeForm.comentMsg.header_name
// })
// }
// if(this.timeForm.followResourceId.length>0){
// this.timeForm.followResourceId.forEach((item,index)=>{
// this.timeForm.followupList.push({
// resourceId: item,
// sendContent : this.timeForm.followResourceIdStr[index]
// })
// })
// }
//
// if(this.showSetBtn){
// this.setTimeNodeList.push(this.timeForm);
// }
// this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
// console.log('addListenSave',this.setTimeNodeList)
// // 保存按钮发起的校验
// if(obj.type=='save'){
// this.$emit('addListenSave',true)
// }else{
// this.initNewForm();
//// console.log('初始化过之后activeTab=====> ',this.activeTab)
// this.timeForm.formRef = this.getNowTime();
// this.timeForm.isDisabled = true;
// }
// }else if(this.planId){
//
// }else{// 是固定模板
// // 只能保存提交
//// this.setTimeNodeList.push(this.timeForm);
// console.log('addListenSave',this.setTimeNodeList)
// this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
// this.$emit('addListenSave',true)
// }
} }
...@@ -363,6 +480,7 @@ ...@@ -363,6 +480,7 @@
this.timeForm.hasSelected = ''; this.timeForm.hasSelected = '';
}, },
changeTab(val){ changeTab(val){
debugger
console.log('当前的 activeTab ',val) console.log('当前的 activeTab ',val)
this.activeTab = val; this.activeTab = val;
console.log(this.setTimeNodeList) console.log(this.setTimeNodeList)
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册