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

no message

上级 1319bb14
......@@ -284,6 +284,7 @@
console.log(val)
},
changeFollowId(val){
console.log(val)
this.timeForm.followResourceIdStr = []
val.forEach((item)=>{
if(this.formNoList.includes(item)){
......
......@@ -4,20 +4,34 @@
<div class="add-time-content">
<div class="time-line-scroll">
<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>
<!--<el-row :gutter="20" v-model="activeTab">-->
<!--<el-col :span="6" v-if="setTimeNodeList.length > 0"-->
<!--v-for="(item, index) in setTimeNodeList1"-->
<!--:key="index"-->
<!--:label="index">开始后{{String(item.timeNo) + item.timeUnitStr}}><div @click="changeTab(index)" class="grid-content bg-purple"></div></el-col>-->
<!--</el-row>-->
<div :gutter="20" v-model="activeTab">
<div @click="changeTab(index)" :span="6" v-if="setTimeNodeList.length > 0"
v-for="(item, index) in setTimeNodeList1"
:key="index"
:label="index">开始后{{String(item.timeNo) + item.timeUnitStr}}></div>
</div>
<!--<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>
<!--查看时间节点-->
......@@ -224,9 +238,66 @@
}else{
console.log(this.isStandedTemplate)
console.log(this.planId)
// 不是固定模板
if(!this.isStandedTemplate && !this.planId){
if(this.timeForm.remindDay.length>0){
// 修改
if(this.planId){
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.remindList.push({
startDays: item
......@@ -236,17 +307,19 @@
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){
if(this.timeForm.followResourceId && this.timeForm.followResourceId.length>0){
this.timeForm.followupList = []
this.timeForm.followResourceId.forEach((item,index)=>{
this.timeForm.followupList.push({
resourceId: item,
sendContent : this.timeForm.followResourceIdStr[index]
sendContent : this.timeForm.followResourceIdStr?this.timeForm.followResourceIdStr[index]:''
})
})
}
......@@ -265,13 +338,57 @@
this.timeForm.formRef = this.getNowTime();
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 @@
this.timeForm.hasSelected = '';
},
changeTab(val){
debugger
console.log('当前的 activeTab ',val)
this.activeTab = val;
console.log(this.setTimeNodeList)
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册