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