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