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

新建计划

上级 3349ae68
......@@ -14,7 +14,8 @@ export default {
nodeTimeList: [], //随访时间节点列表,
nodeContent: {}, //时间节点详情
planOption: [], //随访计划select
timeNodeList: []
timeNodeList: [],
setTimeNodeList: [], //新建计划设置时间节点
},
mutations: {
......@@ -39,6 +40,9 @@ export default {
},
GET_PLAN_OPTION(state, payload) {
state.planOption = payload.fPlanDtoList
},
SET_TIME_NODE_LIST(state, payload) {
state.setTimeNodeList = payload;
}
},
actions: {
......
......@@ -8,6 +8,12 @@
<div class="select-content">
<div class="first-section">
<el-select placeholder="请选择疾病" v-model="diseaseId">
<el-option
v-for="item in diseaseOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select placeholder="请选择类目" v-model="typeId" style="margin-left:20px;">
</el-select>
......@@ -29,6 +35,7 @@
</template>
<script>
export default {
components: {},
data() {
......@@ -57,6 +64,21 @@
name: '降压药什么时候服用?'
},
],
diseaseOptions: [
{
value: 0,
label: '高血压',
}, {
value: 1,
label: '高血脂',
}, {
value: 2,
label: '糖尿病',
}, {
value: 3,
label: '冠心病',
},
],
}
},
props: {
......@@ -73,7 +95,7 @@
},
methods: {
clickClose() {
this.sendObj.hasSelected = '';
// this.sendObj.hasSelected = '';
this.$emit('closeSelectCartoon', this.sendObj)
},
sureSelect() {
......
<template>
<div>
<p><el-button plain icon="el-icon-plus" round @click="addNewNode('timeForm')">新增时间节点</el-button><br></p>
<p><el-button plain icon="el-icon-plus" round @click="addNewNode(timeForm.formRef)" :disabled="(activeTab || activeTab==0)">新增时间节点</el-button><br></p>
<div class="add-time-content">
<div class="time-line-scroll">
<!--<span>设置随访时间<i class="el-icon-circle-close-outline"></i></span>-->
<el-button type="primary" size="mini" round>设置随访时间 <i class="el-icon-circle-close-outline"></i></el-button>
<!--<el-button type="primary" size="mini" round>开始后{{timeForm.followupTime}}{{timeForm.followupMark}} <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>-->
<!--<el-button type="primary" @click="changeTab(item)" size="mini" round v-for="(item, index) in setTimeNodeList" :key="index">开始后{{item.followupTime}}{{item.followupMark}} <i class="el-icon-circle-close-outline"></i></el-button>-->
<el-radio-group v-model="activeTab" @change="changeTab" v-if="setTimeNodeList.length > 0">
<el-radio-button :key="item.formRef" v-for="(item, index) in setTimeNodeList" :label="index">开始后{{item.followupTime + item.followupMark}} <i class="el-icon-circle-close-outline" @click="deleteTimeNode(item, index)"></i></el-radio-button>
</el-radio-group>
<el-button type="primary" :class="(activeTab || activeTab==0) ? 'blur-btn' : ''" @click="setTimeForm()">设置随访时间</el-button>
</div>
<div class="form-div">
<el-form ref="timeForm" :model="timeForm" :rules="timeFormRules" label-suffix=":" label-width="140px" :inline-message="true">
<el-form :ref="timeForm.formRef" :model="timeForm" :rules="timeFormRules" label-suffix=":" label-width="140px" :inline-message="true">
<el-form-item label="本次随访时间" required>
<div style="display: flex;">
<el-form-item prop="followupTime">
......@@ -44,7 +48,7 @@
<el-select
v-model="timeForm.remindTime"
multiple
collapse-tags
:multiple-limit=3
placeholder="请选择">
<el-option
v-for="item in remindOptions"
......@@ -64,14 +68,23 @@
:value="item.value">
</el-option>
</el-select>
<el-button plain class="ml20" @click="goSelectCartoon">选择健康漫画</el-button>
<el-button plain class="ml20" @click="goSelectCartoon" v-if="!hasSelected">选择健康漫画</el-button>
<div class="selected-div ml20" v-if="hasSelected">
<span>《健康漫画名称》</span>
<el-button type="text" @click="goSelectCartoon">重选</el-button>
<el-button type="text" @click="deleteClick">删除</el-button>
</div>
</div>
</el-form-item>
<div class="tips-contnt" v-if="hasSelected">
<p class="yellow-font">当前计划中共500位居民(微信:300位,短信:200位),本次定时推送任务在发送当日预计需要200条短信额度(微信推送不消耗额度,建议您让居民关注云鹊健康微信公众号),务必提前确保短信额度的充足。</p>
<p>需要更多额度,请前往「云鹊医App-个人中心-啾啾币中心」兑换短信额度后再进行预约,您也可以联系云鹊医客服购买短信额度,客服电话:400-920-8877</p>
</div>
<el-form-item label="随访登记表">
<el-select
v-model="timeForm.followupForm"
multiple
collapse-tags
:multiple-limit=2
placeholder="请选择">
<el-option
v-for="item in formOptions"
......@@ -90,13 +103,27 @@
<script>
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
export default {
components: {SelectCartoon},
components: {
SelectCartoon},
data() {
return {
isSelectCartoon: false,
hasSelected: '',
activeTab: null,
setTimeNodeList: [],
timeForm: {
formRef: '',
followupTime: '',
followupMark: '天',
followupMark: '',
followupWay: '',
pushTime: '',
remindTime: [],
followupForm: [],
},
timeFormConst: {
formRef: '',
followupTime: '',
followupMark: '',
followupWay: '',
pushTime: '',
remindTime: [],
......@@ -173,20 +200,77 @@
},
}
},
computed: {
},
created() {
//初始化一个随访时间节点
if(this.setTimeNodeList.length === 0){
this.timeForm.formRef = this.getNowTime();
}
},
methods: {
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;
},
addNewNode(formName) {
this.$refs[formName].validate((valid) => {
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.formRef = this.getNowTime(); //新增一个form
// this.$refs[formRef].resetFields()
console.log('数组',this.setTimeNodeList)
console.log('timeForm新的',this.timeForm)
} else {
return false;
}
});
},
goSelectCartoon() {
this.isSelectCartoon = true;
},
closeSelectCartoon(val) {
this.isSelectCartoon = val.closeStatus;
this.hasSelected = val.hasSelected;
},
deleteClick() {
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];
// for(let i=0; i<this.setTimeNodeList.length; i++) {
// if(this.setTimeNodeList[i].formRef === val) {
// this.timeForm = this.setTimeNodeList[i];
// console.log('当前tab的form',this.timeForm)
// }
// }
},
setTimeForm() {
this.activeTab = null;
this.timeForm = this.timeFormConst;
this.timeForm.formRef = this.getNowTime(); //新增一个form
// this.timeForm.formRef = obj.formRef;
},
deleteTimeNode(item, index) {
this.setTimeNodeList.splice(index, 1)
},
},
}
......@@ -196,7 +280,7 @@
padding-top: 20px;
.time-line-scroll{
width: 100%;
height: 50px;
height: 64px;
box-sizing: border-box;
background-color: #F0F2F5;
padding: 8px 10px;
......@@ -226,9 +310,29 @@
font-size: 12px;
width: 95px;
}
.blur-btn{
background-color: #fff!important;
color: #606266;
border: 1px solid #DCDFE6!important;
}
}
.form-div{
padding-top: 30px;
.tips-contnt{
margin-top: -10px;
padding-left: 140px;
padding-bottom: 30px;
font-size: 12px;
color: #9B9997;
width: 55%;
p{
line-height: 18px;
&.yellow-font{
color: #e6a23c;
padding-bottom: 10px;
}
}
}
}
}
.ml20{
......
......@@ -9,10 +9,6 @@
<div class="new-plan-content f-main-content screenSet">
<div class="header">
<div class="title">
<!--<el-breadcrumb separator-class="el-icon-arrow-right">-->
<!--<el-breadcrumb-item>基本信息</el-breadcrumb-item>-->
<!--<el-breadcrumb-item>随访时间节点</el-breadcrumb-item>-->
<!--</el-breadcrumb>-->
<span :class="{ 'active-class' : activeTab === 'second' }">基本信息</span>
<i class="el-icon-arrow-right" style="color: #C0C4CC"></i>
<span :class="{ 'active-class' : activeTab === 'first' }">随访时间节点</span>
......@@ -23,7 +19,7 @@
</div>
<div class="plan-btns-group" v-if="activeTab === 'second'">
<el-button class="button-white" plain @click="preClick">上一步</el-button>
<el-button type="primary">保 存</el-button>
<el-button type="primary" @click="saveEdit">保 存</el-button>
</div>
</div>
<div class="edit-plan-content" v-if="activeTab === 'first'">
......@@ -225,7 +221,10 @@
},
preClick() {
this.activeTab = 'first';
}
},
saveEdit() {
console.log('保存')
},
},
watch: {
}
......
......@@ -46,7 +46,7 @@
<div class="reservation-content content-list" v-if="reservationForm.reservationDate && reservationForm.timeRange">
<div class="item">
<span class="title">发送内容:</span>
<p>{{doctorName}}医生邀请您在{{reservationForm.reservationDate}}{{reservationForm.timeRange}}进行{{planName}}+{{followupKind}},请确认是否参加。</p>
<p>{{doctorName}}医生邀请您在{{reservationForm.reservationDate}}{{reservationForm.timeRange}}进行随访,请确认是否参加。</p>
</div>
<div class="item">
<span class="title">本次推送:</span>
......@@ -125,8 +125,6 @@
label: '20:00-21:00'
}],
doctorName: '云晓雀',
planName: '高血压随访计划',
followupKind: '上门随访',
smsBalanceNumber: '-20',
rules: {
reservationDate: [{ required: true, message: '请选择预约日期', trigger: 'change' }],
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册