提交 c0c448a7 编写于 作者: yi.li's avatar yi.li

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
...@@ -164,6 +164,7 @@ ...@@ -164,6 +164,7 @@
this.$emit('closeSelectCartoon', this.sendObj); this.$emit('closeSelectCartoon', this.sendObj);
}, },
changeComent(item){ changeComent(item){
console.log(item)
this.$emit('pushConmentMsg',item) this.$emit('pushConmentMsg',item)
} }
}, },
......
<template> <template>
<div> <div>
<el-form :ref="timeForm.formRef" :model="timeForm" :rules="timeFormRules" label-suffix=":" label-width="140px" :inline-message="true" size="small"> <!--<el-form :ref="timeForm.formRef" :model="timeForm" :rules="timeFormRules" label-suffix=":" label-width="140px" :inline-message="true" size="small">-->
<el-form-item label="本次随访时间" required> <el-form-item label="本次随访时间" required>
<div style="display: flex;"> <div style="display: flex;">
<el-form-item prop="timeNo"> <el-form-item prop="timeNo">
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> <!--</el-form>-->
<select-cartoon <select-cartoon
:isSelectCartoon="isSelectCartoon" :isSelectCartoon="isSelectCartoon"
@closeSelectCartoon="closeSelectCartoon" @closeSelectCartoon="closeSelectCartoon"
...@@ -292,17 +292,6 @@ ...@@ -292,17 +292,6 @@
} }
}) })
}, },
getNowTime() {
const date = new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
const hour = date.getHours();
const minute = date.getMinutes();
const second = date.getSeconds();
let formName = `form${year}${month}${day}${hour}${minute}${second}`;
return formName;
},
goSelectCartoon() { goSelectCartoon() {
this.isSelectCartoon = true; this.isSelectCartoon = true;
}, },
......
...@@ -81,8 +81,8 @@ ...@@ -81,8 +81,8 @@
<div class="edit-plan-content" v-if="activeTab === 'second'"> <div class="edit-plan-content" v-if="activeTab === 'second'">
<set-time-node <set-time-node
ref="getTimeNodeList" ref="getTimeNodeList"
:standedTimeNodeList="standedTimeNodeList"
:isStandedTemplate="isStandedTemplate" :isStandedTemplate="isStandedTemplate"
:setTimeNodeList="setTimeNodeList"
@setTimeNodeListOnCom="setTimeNodeListOnCom" @setTimeNodeListOnCom="setTimeNodeListOnCom"
:patientIdList="baseInfo.patientIdList" :patientIdList="baseInfo.patientIdList"
:checkForm="checkForm" :checkForm="checkForm"
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
}, },
data() { data() {
return { return {
setTimeNodeList: [],//重写后的setTimeNodeList
isStandedTemplate: false, // 是否是固定的随访模板 isStandedTemplate: false, // 是否是固定的随访模板
standedTimeNodeList: [], // 如果是国定随访模板,获取固定数据后不可更改,只读 standedTimeNodeList: [], // 如果是国定随访模板,获取固定数据后不可更改,只读
checkForm: false, checkForm: false,
...@@ -174,7 +175,7 @@ ...@@ -174,7 +175,7 @@
}, },
computed: { computed: {
...mapState('planManage',{ ...mapState('planManage',{
setTimeNodeList: state => state.setTimeNodeList, // setTimeNodeList: state => state.setTimeNodeList,
remarkOption: state => state.remarkOption, remarkOption: state => state.remarkOption,
templateOptions: state => state.templateOptions, templateOptions: state => state.templateOptions,
}) })
...@@ -189,14 +190,14 @@ ...@@ -189,14 +190,14 @@
}, },
// 监听保存校验结果 // 监听保存校验结果
addListenSave(val){ addListenSave(val){
// console.log('监听保存校验结果',val) console.log('监听保存校验结果',val)
this.checkForm = false this.checkForm = false
if(val){ if(val.status){
this.baseInfo.fPlanTimeReqList = this.setTimeNodeList this.baseInfo.fPlanTimeReqList = val.setTimeNodeList
// 提交 // 提交
createFollowPlan(this.baseInfo).then(res=>{ createFollowPlan(this.baseInfo).then(res=>{
if(res.code=='000000'){ if(res.code=='000000'){
this.getTimeNodeList([]); // this.getTimeNodeList([]);
// 各种校验通过后,提交编辑内容,toast提示 // 各种校验通过后,提交编辑内容,toast提示
this.$notify.success({ this.$notify.success({
title: '', title: '',
...@@ -216,10 +217,6 @@ ...@@ -216,10 +217,6 @@
}); });
} }
}) })
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList))
}else{
// console.log('点击保存按钮之后校验失败')
} }
}, },
setTimeNodeListOnCom(val){ setTimeNodeListOnCom(val){
...@@ -262,15 +259,13 @@ ...@@ -262,15 +259,13 @@
// 关闭弹层,继续创建 // 关闭弹层,继续创建
}).catch(() => { }).catch(() => {
// 确定放弃,跳出当前编辑页面 // 确定放弃,跳出当前编辑页面
this.getTimeNodeList([]) // this.getTimeNodeList([])
this.$router.push({path: '/followup/plan-manage/plan-list'}) this.$router.push({path: '/followup/plan-manage/plan-list'})
}); });
}, },
nextClick(formName) { nextClick(formName) {
// this.getTimeNodeList([]);
//为方便调试,不做校验 //为方便调试,不做校验
// this.activeTab = 'second'; // this.activeTab = 'second';
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
//用作校验 //用作校验
if(!this.baseInfo.hasSelectedNum) { if(!this.baseInfo.hasSelectedNum) {
...@@ -280,19 +275,19 @@ ...@@ -280,19 +275,19 @@
this.noChoice = false this.noChoice = false
} }
if (valid) { if (valid) {
// this.$refs['statusForm'].resetFields(); console.log('当前选择的随访模板id为',this.baseInfo.resourceId)
// console.log('当前选择的随访模板id为',this.baseInfo.resourceId)
if(this.baseInfo.resourceId){ if(this.baseInfo.resourceId){
this.isStandedTemplate = true this.isStandedTemplate = true
getFollowupTableTemplate(this.baseInfo.resourceId).then(res=>{ getFollowupTableTemplate(this.baseInfo.resourceId).then(res=>{
this.standedTimeNodeList = res.data this.standedTimeNodeList = res.data
this.getTimeNodeList(this.standedTimeNodeList) this.activeTab = 'second';
}) })
}else{ }else{
this.isStandedTemplate = false this.isStandedTemplate = false
this.activeTab = 'second';
} }
this.activeTab = 'second';
} else { } else {
return false; return false;
} }
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<div class="edit-plan-content"> <div class="edit-plan-content">
<set-time-node <set-time-node
:isStandedTemplate="isStandedTemplate" :isStandedTemplate="isStandedTemplate"
:setTimeNodeList="setTimeNodeList" :standedTimeNodeList="setTimeNodeList"
:patientIdList="planDetailData.patientIdList" :patientIdList="planDetailData.patientIdList"
@setTimeNodeListOnCom="setTimeNodeListOnCom" @setTimeNodeListOnCom="setTimeNodeListOnCom"
:checkForm="checkForm" :checkForm="checkForm"
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
}, },
data() { data() {
return { return {
setTimeNodeList: [],
planDetailData: {}, planDetailData: {},
planId: '', planId: '',
isStandedTemplate: false, // 是否是固定的随访模板 isStandedTemplate: false, // 是否是固定的随访模板
...@@ -142,7 +143,7 @@ ...@@ -142,7 +143,7 @@
nodeTimeList: state => state.nodeTimeList, nodeTimeList: state => state.nodeTimeList,
residentList: state => state.residentList, residentList: state => state.residentList,
remarkOption: state => state.remarkOption, remarkOption: state => state.remarkOption,
setTimeNodeList: state => state.setTimeNodeList, // setTimeNodeList: state => state.setTimeNodeList,
selectResidentList: state => state.selectResidentList selectResidentList: state => state.selectResidentList
}) })
}, },
...@@ -264,10 +265,10 @@ ...@@ -264,10 +265,10 @@
}, },
watch: { watch: {
planDetail(val) { planDetail(val) {
// console.log(val) console.log(val)
this.planDetailData = val this.planDetailData = val
this.setTimeNodeListOnCom(val.fPlanTimeReqList) // this.setTimeNodeListOnCom(val.fPlanTimeReqList)
// console.log(this.setTimeNodeList) this.setTimeNodeList = val.fPlanTimeReqList
this.planId = String(val.id) this.planId = String(val.id)
if(val.resourceId){ if(val.resourceId){
this.isStandedTemplate = true this.isStandedTemplate = true
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册