提交 4f57b218 编写于 作者: 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
......@@ -55,9 +55,11 @@
<el-date-picker
v-model="baseInfo.time"
type="date"
ref="beginDate"
placeholder="请选择随访开始时间"
:picker-options="pickerOptions"
clearable
@blur="handleDateInputConfirm"
style="width:380px;">
</el-date-picker>
</el-form-item>
......@@ -168,10 +170,6 @@
// 获取随访计划模板列表
this.getFollowupTemplate()
},
mounted() {
//清理store中存的数据setTimeNodeList
},
computed: {
...mapState('planManage',{
remarkOption: state => state.remarkOption,
......@@ -186,6 +184,12 @@
// 点击保存,先进行校验,表单字段是否通过验证
this.checkForm = true
},
handleDateInputConfirm(e){
if(!this.baseInfo.time){
this.$refs.beginDate.picker.date = new Date();
}
},
// 监听保存校验结果
addListenSave(val){
console.log('监听保存校验结果',val)
......@@ -195,7 +199,6 @@
// 提交
createFollowPlan(this.baseInfo).then(res=>{
if(res.code=='000000'){
// this.getTimeNodeList([]);
// 各种校验通过后,提交编辑内容,toast提示
this.$notify.success({
title: '',
......@@ -240,6 +243,9 @@
this.baseInfo.patientIdList.push(item.patientId);
})
this.baseInfo.hasSelectedNum = this.hasSelectedList.length;
if(this.baseInfo.hasSelectedNum > 0){
this.noChoice = false;
}
},
continueAdd(val) {
this.isShowSelectedDialog = val;
......@@ -284,8 +290,6 @@
this.standedTimeNodeList = [];
this.activeTab = 'second';
}
} else {
return false;
}
......@@ -295,12 +299,6 @@
this.activeTab = 'first';
},
},
beforeRouteLeave (to, from, next) {
// 离开页面,需要清除缓存的时间节点
this.getTimeNodeList([])
next()
},
}
</script>
<style lang="scss" scoped>
......
......@@ -235,39 +235,26 @@
});
},
saveModify() {
this.$confirm('是否确认保存修改内容?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// console.log(this.checkForm)
// 点击保存,先进行校验,表单字段是否通过验证
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){
console.log('监听保存校验结果',val)
this.checkForm = false
if(val.status){
this.$confirm('是否确认保存修改内容?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 点击保存,先进行校验,表单字段是否通过验证
// 关闭弹层,继续创建
this.planDetailData.fPlanTimeReqList = val.setTimeNodeList
this.planDetailData.joinTime = new Date();
console.log('修改计划前的数据===>>>',this.planDetailData)
createFollowPlan(this.planDetailData).then(res=>{
if(res.code=='000000'){
this.getTimeNodeList([]);
// 各种校验通过后,提交编辑内容,toast提示
this.$notify.success({
title: '',
......@@ -275,7 +262,9 @@
showClose: false
});
setTimeout(()=>{
this.$router.back(-1)
this.$router.push({
path: '/followup/plan-manage/plan-list'
})
},2000)
}else{
this.$notify.success({
......@@ -285,8 +274,14 @@
});
}
})
})
}else{
console.log('点击保存按钮之后校验失败')
this.$notify.success({
title: '请填写完整表单',
message: '请填写完整表单',
showClose: false,
duration: 500
});
}
},
goToFollowTime() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册