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

新建计划

上级 3349ae68
...@@ -14,7 +14,8 @@ export default { ...@@ -14,7 +14,8 @@ export default {
nodeTimeList: [], //随访时间节点列表, nodeTimeList: [], //随访时间节点列表,
nodeContent: {}, //时间节点详情 nodeContent: {}, //时间节点详情
planOption: [], //随访计划select planOption: [], //随访计划select
timeNodeList: [] timeNodeList: [],
setTimeNodeList: [], //新建计划设置时间节点
}, },
mutations: { mutations: {
...@@ -39,6 +40,9 @@ export default { ...@@ -39,6 +40,9 @@ export default {
}, },
GET_PLAN_OPTION(state, payload) { GET_PLAN_OPTION(state, payload) {
state.planOption = payload.fPlanDtoList state.planOption = payload.fPlanDtoList
},
SET_TIME_NODE_LIST(state, payload) {
state.setTimeNodeList = payload;
} }
}, },
actions: { actions: {
......
...@@ -8,6 +8,12 @@ ...@@ -8,6 +8,12 @@
<div class="select-content"> <div class="select-content">
<div class="first-section"> <div class="first-section">
<el-select placeholder="请选择疾病" v-model="diseaseId"> <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>
<el-select placeholder="请选择类目" v-model="typeId" style="margin-left:20px;"> <el-select placeholder="请选择类目" v-model="typeId" style="margin-left:20px;">
</el-select> </el-select>
...@@ -29,6 +35,7 @@ ...@@ -29,6 +35,7 @@
</template> </template>
<script> <script>
export default { export default {
components: {}, components: {},
data() { data() {
...@@ -57,6 +64,21 @@ ...@@ -57,6 +64,21 @@
name: '降压药什么时候服用?' name: '降压药什么时候服用?'
}, },
], ],
diseaseOptions: [
{
value: 0,
label: '高血压',
}, {
value: 1,
label: '高血脂',
}, {
value: 2,
label: '糖尿病',
}, {
value: 3,
label: '冠心病',
},
],
} }
}, },
props: { props: {
...@@ -73,7 +95,7 @@ ...@@ -73,7 +95,7 @@
}, },
methods: { methods: {
clickClose() { clickClose() {
this.sendObj.hasSelected = ''; // this.sendObj.hasSelected = '';
this.$emit('closeSelectCartoon', this.sendObj) this.$emit('closeSelectCartoon', this.sendObj)
}, },
sureSelect() { sureSelect() {
......
<template> <template>
<div> <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="add-time-content">
<div class="time-line-scroll"> <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>设置随访时间 <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-button type="primary" size="mini" round>开始后{{timeForm.followupTime}}{{timeForm.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>
<div class="form-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> <el-form-item label="本次随访时间" required>
<div style="display: flex;"> <div style="display: flex;">
<el-form-item prop="followupTime"> <el-form-item prop="followupTime">
...@@ -44,7 +48,7 @@ ...@@ -44,7 +48,7 @@
<el-select <el-select
v-model="timeForm.remindTime" v-model="timeForm.remindTime"
multiple multiple
collapse-tags :multiple-limit=3
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
v-for="item in remindOptions" v-for="item in remindOptions"
...@@ -64,14 +68,23 @@ ...@@ -64,14 +68,23 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </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> </div>
</el-form-item> </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-form-item label="随访登记表">
<el-select <el-select
v-model="timeForm.followupForm" v-model="timeForm.followupForm"
multiple multiple
collapse-tags :multiple-limit=2
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
v-for="item in formOptions" v-for="item in formOptions"
...@@ -90,13 +103,27 @@ ...@@ -90,13 +103,27 @@
<script> <script>
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon'; import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
export default { export default {
components: {SelectCartoon}, components: {
SelectCartoon},
data() { data() {
return { return {
isSelectCartoon: false, isSelectCartoon: false,
hasSelected: '',
activeTab: null,
setTimeNodeList: [],
timeForm: { timeForm: {
formRef: '',
followupTime: '', followupTime: '',
followupMark: '天', followupMark: '',
followupWay: '',
pushTime: '',
remindTime: [],
followupForm: [],
},
timeFormConst: {
formRef: '',
followupTime: '',
followupMark: '',
followupWay: '', followupWay: '',
pushTime: '', pushTime: '',
remindTime: [], remindTime: [],
...@@ -173,20 +200,77 @@ ...@@ -173,20 +200,77 @@
}, },
} }
}, },
computed: {
},
created() {
//初始化一个随访时间节点
if(this.setTimeNodeList.length === 0){
this.timeForm.formRef = this.getNowTime();
}
},
methods: { 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) { addNewNode(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (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 { } else {
return false; return false;
} }
}); });
}, },
goSelectCartoon() { goSelectCartoon() {
this.isSelectCartoon = true; this.isSelectCartoon = true;
}, },
closeSelectCartoon(val) { closeSelectCartoon(val) {
this.isSelectCartoon = val.closeStatus; 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 @@ ...@@ -196,7 +280,7 @@
padding-top: 20px; padding-top: 20px;
.time-line-scroll{ .time-line-scroll{
width: 100%; width: 100%;
height: 50px; height: 64px;
box-sizing: border-box; box-sizing: border-box;
background-color: #F0F2F5; background-color: #F0F2F5;
padding: 8px 10px; padding: 8px 10px;
...@@ -226,9 +310,29 @@ ...@@ -226,9 +310,29 @@
font-size: 12px; font-size: 12px;
width: 95px; width: 95px;
} }
.blur-btn{
background-color: #fff!important;
color: #606266;
border: 1px solid #DCDFE6!important;
}
} }
.form-div{ .form-div{
padding-top: 30px; 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{ .ml20{
......
...@@ -9,10 +9,6 @@ ...@@ -9,10 +9,6 @@
<div class="new-plan-content f-main-content screenSet"> <div class="new-plan-content f-main-content screenSet">
<div class="header"> <div class="header">
<div class="title"> <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> <span :class="{ 'active-class' : activeTab === 'second' }">基本信息</span>
<i class="el-icon-arrow-right" style="color: #C0C4CC"></i> <i class="el-icon-arrow-right" style="color: #C0C4CC"></i>
<span :class="{ 'active-class' : activeTab === 'first' }">随访时间节点</span> <span :class="{ 'active-class' : activeTab === 'first' }">随访时间节点</span>
...@@ -23,7 +19,7 @@ ...@@ -23,7 +19,7 @@
</div> </div>
<div class="plan-btns-group" v-if="activeTab === 'second'"> <div class="plan-btns-group" v-if="activeTab === 'second'">
<el-button class="button-white" plain @click="preClick">上一步</el-button> <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> </div>
<div class="edit-plan-content" v-if="activeTab === 'first'"> <div class="edit-plan-content" v-if="activeTab === 'first'">
...@@ -225,7 +221,10 @@ ...@@ -225,7 +221,10 @@
}, },
preClick() { preClick() {
this.activeTab = 'first'; this.activeTab = 'first';
} },
saveEdit() {
console.log('保存')
},
}, },
watch: { watch: {
} }
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div class="reservation-content content-list" v-if="reservationForm.reservationDate && reservationForm.timeRange"> <div class="reservation-content content-list" v-if="reservationForm.reservationDate && reservationForm.timeRange">
<div class="item"> <div class="item">
<span class="title">发送内容:</span> <span class="title">发送内容:</span>
<p>{{doctorName}}医生邀请您在{{reservationForm.reservationDate}}{{reservationForm.timeRange}}进行{{planName}}+{{followupKind}},请确认是否参加。</p> <p>{{doctorName}}医生邀请您在{{reservationForm.reservationDate}}{{reservationForm.timeRange}}进行随访,请确认是否参加。</p>
</div> </div>
<div class="item"> <div class="item">
<span class="title">本次推送:</span> <span class="title">本次推送:</span>
...@@ -125,8 +125,6 @@ ...@@ -125,8 +125,6 @@
label: '20:00-21:00' label: '20:00-21:00'
}], }],
doctorName: '云晓雀', doctorName: '云晓雀',
planName: '高血压随访计划',
followupKind: '上门随访',
smsBalanceNumber: '-20', smsBalanceNumber: '-20',
rules: { rules: {
reservationDate: [{ required: true, message: '请选择预约日期', trigger: 'change' }], reservationDate: [{ required: true, message: '请选择预约日期', trigger: 'change' }],
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册