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

设置随访时间节点

上级 75b33a9a
......@@ -126,6 +126,18 @@ const basicDataApi = [
},
]
/*录入管理API*/
const recordManageApi = [
{
url: '/followup/entering/list',
method: 'post',
params: 'data',
name: 'getEnteringList',
description: '录入列表查看',
},
]
const api = {};
const apis = [...planManageApi, ...reservationManageApi, ...basicDataApi, ...workbenchApi];
......
<template>
<div>
<p><el-button plain icon="el-icon-plus" round @click="addNewNode(timeForm.formRef)" :disabled="(activeTab || activeTab==0)">新增时间节点</el-button><br></p>
<p><el-button plain icon="el-icon-plus" round @click="addNewNode(timeForm.formRef)">新增时间节点</el-button><br></p>
<div class="add-time-content">
<div class="time-line-scroll">
<!--<el-button type="primary" size="mini" round>设置随访时间 <i class="el-icon-circle-close-outline"></i></el-button>-->
......@@ -16,7 +16,7 @@
<el-form-item label="本次随访时间" required>
<div style="display: flex;">
<el-form-item prop="followupTime">
<el-select v-model="timeForm.followupTime" placeholder="请选择" clearable>
<el-select v-model="timeForm.followupTime" placeholder="请选择">
<el-option
v-for="item in indexOptions"
:key="item.value"
......@@ -101,7 +101,19 @@
</div>
</template>
<script>
import _ from 'lodash';
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
const timeFormInit = {
formRef: '',
followupTime: '',
followupMark: '',
followupWay: '',
pushTime: '',
remindTime: [],
followupForm: [],
};
export default {
components: {
SelectCartoon},
......@@ -111,24 +123,26 @@
hasSelected: '',
activeTab: null,
setTimeNodeList: [],
timeForm: {
formRef: '',
followupTime: '',
followupMark: '',
followupWay: '',
pushTime: '',
remindTime: [],
followupForm: [],
},
timeFormConst: {
formRef: '',
followupTime: '',
followupMark: '',
followupWay: '',
pushTime: '',
remindTime: [],
followupForm: [],
},
currentFormRef: 1,
timeForm: _.cloneDeep(timeFormInit),
// timeForm: {
// formRef: '',
// followupTime: '',
// followupMark: '',
// followupWay: '',
// pushTime: '',
// remindTime: [],
// followupForm: [],
// },
// timeFormConst: {
// formRef: '',
// followupTime: '',
// followupMark: '',
// followupWay: '',
// pushTime: '',
// remindTime: [],
// followupForm: [],
// },
indexOptions: [
{
value: '0',
......@@ -225,11 +239,12 @@
if (valid) {
this.setTimeNodeList.push(this.timeForm);
// this.store.commit('SET_TIME_NODE_LIST',this.setTimeNodeList)
this.timeForm = JSON.parse(JSON.stringify(this.timeFormConst));
// this.timeForm = JSON.parse(JSON.stringify(this.timeFormConst));
this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime(); //新增一个form
// this.$refs[formRef].resetFields()
console.log('数组',this.setTimeNodeList)
console.log('timeForm新的',this.timeForm)
console.log('timeForm新的',this.timeForm);
} else {
return false;
}
......@@ -247,15 +262,8 @@
this.hasSelected = '';
},
changeTab(val){
// this.setTimeNodeList.map((item,index)=>{
// var c=item.formRef
// if (this.$refs[c]&&this.$refs[c][0]) {
// this.$refs[c][0].resetFields()
// }//模拟切换用户时,将表单置空
// return item.formShow=this[val][index]
// })
this.activeTab = val;
this.timeForm = this.setTimeNodeList[val];
this.timeForm = _.cloneDeep(this.setTimeNodeList[val]);
// for(let i=0; i<this.setTimeNodeList.length; i++) {
// if(this.setTimeNodeList[i].formRef === val) {
// this.timeForm = this.setTimeNodeList[i];
......@@ -265,9 +273,8 @@
},
setTimeForm() {
this.activeTab = null;
this.timeForm = this.timeFormConst;
this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime(); //新增一个form
// this.timeForm.formRef = obj.formRef;
},
deleteTimeNode(item, index) {
this.setTimeNodeList.splice(index, 1)
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册