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

no message

上级 4747b577
...@@ -168,10 +168,6 @@ ...@@ -168,10 +168,6 @@
// 获取随访计划模板列表 // 获取随访计划模板列表
this.getFollowupTemplate() this.getFollowupTemplate()
}, },
mounted() {
//清理store中存的数据setTimeNodeList
},
computed: { computed: {
...mapState('planManage',{ ...mapState('planManage',{
remarkOption: state => state.remarkOption, remarkOption: state => state.remarkOption,
...@@ -195,7 +191,6 @@ ...@@ -195,7 +191,6 @@
// 提交 // 提交
createFollowPlan(this.baseInfo).then(res=>{ createFollowPlan(this.baseInfo).then(res=>{
if(res.code=='000000'){ if(res.code=='000000'){
// this.getTimeNodeList([]);
// 各种校验通过后,提交编辑内容,toast提示 // 各种校验通过后,提交编辑内容,toast提示
this.$notify.success({ this.$notify.success({
title: '', title: '',
...@@ -284,8 +279,6 @@ ...@@ -284,8 +279,6 @@
this.standedTimeNodeList = []; this.standedTimeNodeList = [];
this.activeTab = 'second'; this.activeTab = 'second';
} }
} else { } else {
return false; return false;
} }
...@@ -295,12 +288,6 @@ ...@@ -295,12 +288,6 @@
this.activeTab = 'first'; this.activeTab = 'first';
}, },
}, },
beforeRouteLeave (to, from, next) {
// 离开页面,需要清除缓存的时间节点
this.getTimeNodeList([])
next()
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -232,39 +232,26 @@ ...@@ -232,39 +232,26 @@
}); });
}, },
saveModify() { saveModify() {
this.$confirm('是否确认保存修改内容?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// console.log(this.checkForm)
// 点击保存,先进行校验,表单字段是否通过验证 // 点击保存,先进行校验,表单字段是否通过验证
this.checkForm = true this.checkForm = true
// // 关闭弹层,继续创建
// this.planDetail.joinTime = '2019-04-09T16:00:00.000+0000'
// this.setFollowPlan(this.planDetail)
// /*this.$message({
// message: '修改成功!',
// type: 'success'
// });*/
// this.$router.back(-1)
}).catch(() => {
// 确定放弃,跳出当前编辑页面
});
}, },
// 监听保存校验结果 // 监听保存校验结果
addListenSave(val){ addListenSave(val){
console.log('监听保存校验结果',val) console.log('监听保存校验结果',val)
this.checkForm = false this.checkForm = false
if(val.status){ if(val.status){
this.$confirm('是否确认保存修改内容?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 点击保存,先进行校验,表单字段是否通过验证
// 关闭弹层,继续创建 // 关闭弹层,继续创建
this.planDetailData.fPlanTimeReqList = val.setTimeNodeList this.planDetailData.fPlanTimeReqList = val.setTimeNodeList
this.planDetailData.joinTime = new Date();
console.log('修改计划前的数据===>>>',this.planDetailData) console.log('修改计划前的数据===>>>',this.planDetailData)
createFollowPlan(this.planDetailData).then(res=>{ createFollowPlan(this.planDetailData).then(res=>{
if(res.code=='000000'){ if(res.code=='000000'){
this.getTimeNodeList([]);
// 各种校验通过后,提交编辑内容,toast提示 // 各种校验通过后,提交编辑内容,toast提示
this.$notify.success({ this.$notify.success({
title: '', title: '',
...@@ -272,7 +259,9 @@ ...@@ -272,7 +259,9 @@
showClose: false showClose: false
}); });
setTimeout(()=>{ setTimeout(()=>{
this.$router.back(-1) this.$router.push({
path: '/followup/plan-manage/plan-list'
})
},2000) },2000)
}else{ }else{
this.$notify.success({ this.$notify.success({
...@@ -282,8 +271,14 @@ ...@@ -282,8 +271,14 @@
}); });
} }
}) })
})
}else{ }else{
console.log('点击保存按钮之后校验失败') this.$notify.success({
title: '请填写完整表单',
message: '请填写完整表单',
showClose: false,
duration: 500
});
} }
}, },
goToFollowTime() { goToFollowTime() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册