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

设置随访时间节点

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