提交 a653627b 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of http://192.168.110.53/com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
......@@ -105,7 +105,8 @@
this.$emit('continueAdd', false)
},
handleSizeChangePre(val) {
this.paginationSet.pageSize = val
this.paginationSet.pageSize = val;
this.paginationSet.pageNum = 1;
this.eachHasSelectedList = this.getPageList(this.hasSelectedList)
},
handleCurrentChangePre(val) {
......
......@@ -161,10 +161,10 @@
this.$emit('closeSelectCartoon', this.sendObj)
},
sureSelect() {
console.log(this.sendObj)
this.$emit('closeSelectCartoon', this.sendObj);
},
changeComent(item){
console.log(item)
this.$emit('pushConmentMsg',item)
}
},
......
......@@ -5,7 +5,7 @@
<el-button
size="small"
@click="addNewNode"
>新增时间节点<i class="el-icon-circle-close-outline" @click="deleteAddNode" v-if="setTimeNodeList.length>0"></i>
>新增时间节点
</el-button>
</div>
......@@ -15,7 +15,7 @@
<div class="time-line-scroll">
<div
v-if="showSetBtn && !isStandedTemplate">设置随访时间
v-if="showSetBtn && !isStandedTemplate" style="margin:10px 5px;background:orange;padding:10px;display: inline-block;">设置随访时间
<i class="el-icon-circle-close-outline" @click="deleteAddNode" v-if="setTimeNodeList.length>0"></i>
</div>
<div v-model="activeTab" type="card" closable>
......@@ -23,35 +23,35 @@
v-for="(item, index) in setTimeNodeList"
:key="index"
@click="changeTabNew(index)"
v-text="isStandedTemplate ? item.timeStr : '开始后'+String(item.timeNo) + timeUnitStr"
:style="(index == activeTab)?'background:#3190e8;':''"
style="float:left;border:1px solid orange;padding:5px 10px;margin:0 5px;"
></div>
style="float:left;border:1px solid orange;padding:5px 10px;margin:0 5px;position: relative;"
>{{isStandedTemplate ? item.timeStr : '开始后'+String(item.timeNo) + timeUnitStr}}
<i class="deletelist el-icon-circle-close-outline" @click.stop="deleteTimeNode(item, index)" v-if="!isStandedTemplate && item.change"></i></div>
</div>
</div>
<!--查看时间节点-->
<div class="form-div" >
<div
v-show="index == activeTab"
v-for="(item, index) in setTimeNodeList"
v-for="(itemTimeForm, index) in setTimeNodeList"
:key="index"
:label="index"
>
<el-form :ref="item.formRef" :model="item" :rules="timeFormRules" label-suffix=":" label-width="140px" :inline-message="true" size="small">
<el-form :ref="itemTimeForm.formRef" :model="itemTimeForm" :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">
<el-input
v-model="item.timeNo"
type="tel"
v-model="itemTimeForm.timeNo"
type="number"
size="small"
placeholder="请输入"
:disabled="isStandedTemplate"
:disabled="isStandedTemplate || !itemTimeForm.change"
maxlength="2"
clearable />
</el-form-item>
<el-form-item prop="timeUnit" class="ml20">
<el-select v-model="item.timeUnit" placeholder="请选择" :disabled="item.isDisabled">
<el-select v-model="itemTimeForm.timeUnit" placeholder="请选择" :disabled="itemTimeForm.isDisabled || !itemTimeForm.change">
<el-option
v-for="(item,index) in markOptions"
:key="index"
......@@ -59,28 +59,20 @@
:value="item.no">
</el-option>
</el-select>
<!--<el-select v-if="isStandedTemplate || planId" v-model="item.timeUnit" placeholder="请选择" :disabled="isStandedTemplate">-->
<!--<el-option-->
<!--v-for="(item,index) in markOptions"-->
<!--:key="index"-->
<!--:label="item.value"-->
<!--:value="item.no">-->
<!--</el-option>-->
<!--</el-select>-->
</el-form-item>
</div>
</el-form-item>
<el-form-item label="随访方式" prop="type">
<el-radio-group v-model="item.type" size="small">
<el-radio v-for="(item,index) in followTypeList" :key="index" :label="item.no" :disabled="isStandedTemplate">{{item.value}}</el-radio>
<el-radio-group v-model="itemTimeForm.type" size="small">
<el-radio v-for="(item,index) in followTypeList" :key="index" :label="item.no" :disabled="isStandedTemplate || !itemTimeForm.change">{{item.value}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="提醒医生预约居民">
<el-select
v-model="item.remindDay"
v-model="itemTimeForm.remindDay"
multiple
:multiple-limit=3
:disabled="isStandedTemplate"
:disabled="isStandedTemplate || !itemTimeForm.change"
@change="changeRemindDay"
placeholder="请选择">
<el-option
......@@ -91,30 +83,15 @@
</el-option>
</el-select>
<!--固定模板需要填充-->
<!--<el-select-->
<!--v-if="isStandedTemplate"-->
<!--v-model="timeForm.remindDay"-->
<!--multiple-->
<!--:multiple-limit=3-->
<!--:disabled="isStandedTemplate"-->
<!--placeholder="请选择">-->
<!--<el-option-->
<!--v-for="(item,index) in remindOptionsCopy"-->
<!--:key="index"-->
<!--:label="item.startDaysStr"-->
<!--:value="item.startDays">-->
<!--</el-option>-->
<!--</el-select>-->
</el-form-item>
<el-form-item label="推送患教">
<div style="display: flex">
<el-select
v-model="item.pushDay"
v-model="itemTimeForm.pushDay"
placeholder="选择推送时间"
clearable
:disabled="isStandedTemplate"
@change="changePushDay"
:disabled="isStandedTemplate || !itemTimeForm.change"
>
<el-option
v-for="(item,index) in pushTimeOptions"
......@@ -124,38 +101,25 @@
</el-option>
</el-select>
<!--固定模板需要填充-->
<!--<el-select-->
<!--v-if="isStandedTemplate"-->
<!--v-model="timeForm.pushDay"-->
<!--placeholder="选择推送时间"-->
<!--clearable-->
<!--:disabled="isStandedTemplate"-->
<!--&gt;-->
<!--<el-option-->
<!--:label="timeForm.startDaysStr"-->
<!--:value="timeForm.pushDay">-->
<!--</el-option>-->
<!--</el-select>-->
<el-button plain class="ml20" @click="goSelectCartoon" v-if="!item.hasSelected && !isStandedTemplate && !planId">选择健康漫画</el-button>
<div class="selected-div ml20" v-if="item.hasSelected">
<span>{{item.comentMsg.header_name}}</span>
<el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate && !planId">重选</el-button>
<el-button type="text" @click="deleteClick" v-if="!isStandedTemplate && !planId">删除</el-button>
<el-button plain class="ml20" @click="goSelectCartoon" v-if="itemTimeForm.change && !itemTimeForm.hasSelected && !isStandedTemplate && planId">选择健康漫画</el-button>
<div class="selected-div ml20" v-if="itemTimeForm.hasSelected">
<span>{{itemTimeForm.comentMsg.header_name}}</span>
<el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate">重选</el-button>
<el-button type="text" @click="deleteClick" v-if="!isStandedTemplate">删除</el-button>
</div>
</div>
</el-form-item>
<div class="tips-contnt" v-if="item.hasSelected">
<p class="yellow-font">当前计划中共{{item.totalNumber}}位居民(微信:{{item.wechatPatientNum}}位,短信:{{item.messagePatientNum}}位),本次定时推送任务在发送当日预计需要{{item.messagePatientNum}}条短信额度(微信推送不消耗额度,建议您让居民关注云鹊健康微信公众号),务必提前确保短信额度的充足。</p>
<div class="tips-contnt" v-if="itemTimeForm.hasSelected">
<p class="yellow-font">当前计划中共{{totalNumber}}位居民(微信:{{wechatPatientNum}}位,短信:{{messagePatientNum}}位),本次定时推送任务在发送当日预计需要{{messagePatientNum}}条短信额度(微信推送不消耗额度,建议您让居民关注云鹊健康微信公众号),务必提前确保短信额度的充足。</p>
<p>需要更多额度,请前往「云鹊医App-个人中心-啾啾币中心」兑换短信额度后再进行预约,您也可以联系云鹊医客服购买短信额度,客服电话:400-920-8877</p>
</div>
<el-form-item label="随访登记表">
<el-select
v-model="item.followResourceId"
v-model="itemTimeForm.followResourceId"
multiple
:multiple-limit=3
@change="changeFollowId"
:disabled="isStandedTemplate"
:disabled="isStandedTemplate || !itemTimeForm.change"
placeholder="请选择">
<el-option
v-for="(item_sub,index) in formOptions"
......@@ -165,22 +129,6 @@
</el-option>
</el-select>
<!--固定模板需要填充-->
<!--<el-select-->
<!--v-if="isStandedTemplate"-->
<!--v-model="item.followResourceId"-->
<!--multiple-->
<!--:multiple-limit=3-->
<!--@change="changeFollowId"-->
<!--:disabled="isStandedTemplate"-->
<!--placeholder="请选择">-->
<!--<el-option-->
<!--v-for="(item,index) in formOptionsCopy"-->
<!--:key="index"-->
<!--:label="item.sendContent"-->
<!--:value="item.resourceId">-->
<!--</el-option>-->
<!--</el-select>-->
</el-form-item>
<select-cartoon
:isSelectCartoon="isSelectCartoon"
......@@ -194,14 +142,14 @@
<!--新增时间节点-->
<div class="form-div" v-if="activeTab == 'setNewRef'">
<div class="form-div" v-show="activeTab == 'setNewRef'">
<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">
<el-input
v-model="timeForm.timeNo"
type="tel"
type="number"
size="small"
placeholder="请输入"
:disabled="isStandedTemplate"
......@@ -268,7 +216,7 @@
</div>
</el-form-item>
<div class="tips-contnt" v-if="timeForm.hasSelected">
<p class="yellow-font">当前计划中共{{timeForm.totalNumber}}位居民(微信:{{timeForm.wechatPatientNum}}位,短信:{{timeForm.messagePatientNum}}位),本次定时推送任务在发送当日预计需要{{timeForm.messagePatientNum}}条短信额度(微信推送不消耗额度,建议您让居民关注云鹊健康微信公众号),务必提前确保短信额度的充足。</p>
<p class="yellow-font">当前计划中共{{totalNumber}}位居民(微信:{{wechatPatientNum}}位,短信:{{messagePatientNum}}位),本次定时推送任务在发送当日预计需要{{messagePatientNum}}条短信额度(微信推送不消耗额度,建议您让居民关注云鹊健康微信公众号),务必提前确保短信额度的充足。</p>
<p>需要更多额度,请前往「云鹊医App-个人中心-啾啾币中心」兑换短信额度后再进行预约,您也可以联系云鹊医客服购买短信额度,客服电话:400-920-8877</p>
</div>
<el-form-item label="随访登记表">
......@@ -350,6 +298,9 @@
pushTimeOptions: [],
formOptions: [],
wechatPatientNum: 0,
messagePatientNum: 0,
totalNumber: 0,
}
},
props: {
......@@ -366,21 +317,20 @@
// setTimeNodeList1(){
// return this.sortKey(this.setTimeNodeList,'timeNo')
// },
item() {
if(this.setTimeNodeList.length == 0) {
return;
}else {
return this.setTimeNodeList1[0].timeUnit;
}
},
// item() {
// if(this.setTimeNodeList.length == 0) {
// return;
// }else {
// return this.setTimeNodeList1[0].timeUnit;
// }
// },
},
created() {
this.setTimeNodeList = this.standedTimeNodeList
this.initNewForm();
this.getConstData();
// 如果是固定模板
console.log(this.isStandedTemplate)
console.log(this.planId)
// console.log(this.planId)
if(this.isStandedTemplate || this.planId){
this.activeTab = 0;
}
......@@ -390,29 +340,35 @@
this.setTimeNodeList = val
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
},
isStandedTemplate(val){
this.isStandedTemplate = val
console.log(this.isStandedTemplate)
},
setTimeNodeList(val){
this.setTimeNodeList = val
// console.log(this.setTimeNodeList)
if(this.setTimeNodeList.length>0) {
this.timeUnit = this.setTimeNodeList[0].timeUnit
this.setTimeNodeList.forEach(item=>{
item.isDisabled = true;
item.timeUnit = this.setTimeNodeList[0].timeUnit
if(item.remindList && item.remindList.length > 0){// remindDay
if(item.remindList && item.remindList.length > 0){// remindDay 提醒医生预约提前天数
item.remindDay = []
item.remindList.forEach((kkk)=>{
item.remindDay.push(kkk.startDays)
})
}
if(item.pushContentList && item.pushContentList.length){//pushDay
if(item.pushContentList && item.pushContentList.length > 0){//pushDay 推送患教提前天数
let pushData = item.pushContentList[0]
item.hasSelected = true
item.pushDay = pushData.startDays
item.comentMsg = {
id: pushData.resourceId,
header_name: pushData.sendContent
}
}
if(item.followupList && item.followupList.length > 0){ //followResourceId
if(item.followupList && item.followupList.length > 0){ //followResourceId 随访量表
item.followResourceId = []
item.followupList.forEach((kkk)=>{
if(this.isStandedTemplate){
......@@ -428,11 +384,35 @@
}
});
console.log(this.setTimeNodeList)
if(!this.isStandedTemplate){
this.setTimeNodeList[0].isDisabled = false;
}
}
},
patientIdList(val){
if(this.planId){//如果是修改计划,发送人数共享给各个时间节点
// 获取微信和短信用户数量
getPatientNumber({
patientIdList: val
}).then(res=>{
if(res.code=='000000'){
this.wechatPatientNum = res.data.wechatPatientNum;
this.messagePatientNum = res.data.messagePatientNum;
this.totalNumber = this.wechatPatientNum + this.messagePatientNum
}else{
this.$notify.success({
title: '提交失败',
message: res.message,
showClose: false
});
}
})
}
},
checkForm(val){
// console.log('触发 保存按钮的 校验',val)
// 触发 保存 校验
......@@ -443,6 +423,8 @@
console.log('是否修改计划',this.planId)
console.log('是否显示设置时间按钮',this.showSetBtn)
console.log('当前的检验是否通过了',this.isValied)
console.log('表单数据',this.timeForm)
console.log('activeTab',this.activeTab)
if(this.planId){//修改计划
......@@ -469,10 +451,27 @@
setTimeNodeList: this.setTimeNodeList
})
}else{
// this.addNewNode('isSave')
// 如果直接点击保存,需要进行对当前填写的表单进行校验
const isValied = this.checkCurrentForm(this.timeForm.formRef);
this.isValied = isValied
if(isValied){
if(this.setTimeNodeList.length>0 && this.timeForm.timeNo==this.setTimeNodeList[0].timeNo){
}else{
this.checkTimeIsRepeat(()=>{
this.activeTab = this.setTimeNodeList.length;
this.timeForm.formRef = 'form' + this.activeTab;
this.setTimeNodeList.push(this.timeForm)
})
}
// 新增成功之后
this.setTimeNodeList = this.sortKey(this.setTimeNodeList,'timeNo')
}
if(this.isValied && !this.showSetBtn){
console.log(this.setTimeNodeList)
if(this.isValied){
// console.log(this.setTimeNodeList)
this.$emit('addListenSave',{
status: true,
setTimeNodeList: this.setTimeNodeList
......@@ -495,23 +494,23 @@
this.timeForm.isDisabled = true;
this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
}
this.timeForm = val
// this.timeForm = val
console.log('表单父组件的数据',this.timeForm)
},
setTimeNodeList1(val) {
if(val.length > 0){
this.setTimeNodeList1.map(item=>{
item.isDisabled = true;
item.timeUnit = this.setTimeNodeList1[0].timeUnit
this.markOptions.forEach((ob)=>{
if(item.timeUnit==ob.no){
item.timeUnitStr = ob.value
}
})
});
this.setTimeNodeList1[0].isDisabled = false;
}
},
// setTimeNodeList1(val) {
// if(val.length > 0){
// this.setTimeNodeList1.map(item=>{
// item.isDisabled = true;
// item.timeUnit = this.setTimeNodeList1[0].timeUnit
// this.markOptions.forEach((ob)=>{
// if(item.timeUnit==ob.no){
// item.timeUnitStr = ob.value
// }
// })
// });
// this.setTimeNodeList1[0].isDisabled = false;
// }
// },
},
methods: {
// 一次性获取常量接口数据
......@@ -569,6 +568,9 @@
if(item.timeNo == this.timeForm.timeNo){
this.timeIsRepeat = true;
}
if(this.setTimeNodeList[0].timeNo==this.timeForm.timeNo){
this.timeIsRepeat = true;
}
})
}else{
this.timeIsRepeat = false;
......@@ -594,10 +596,7 @@
}
const isValied = this.checkCurrentForm(this.timeForm.formRef);
// this.isValied = isValied
// console.log('isVlie=98989898',isValied)
// console.log(this.activeTab)
// console.log(this.timeForm)
this.isValied = isValied
if(isValied){
this.checkTimeIsRepeat(()=>{
if(this.showSetBtn){
......@@ -639,29 +638,64 @@
followResourceIdStr: [],
totalNumber: 0,
wechatPatientNum: 0,
messagePatientNum: 0
messagePatientNum: 0,
change: true
};
this.timeForm = timeFormInit;
},
goSelectCartoon() {
this.isSelectCartoon = true;
},
//关闭漫画
closeSelectCartoon(val) {
this.isSelectCartoon = val.closeStatus;
this.timeForm.hasSelected = val.hasSelected;
// this.timeForm.comentMsg = val.hasSelected;
console.log('当前的tab是',this.activeTab)
this.pushConmentMsg(val.hasSelected)
},
// 接收漫画选择信息
pushConmentMsg(val){
this.timeForm.comentMsg = val
console.log('选择的漫画信息',this.timeForm.comentMsg)
let obj = {
startDays: this.timeForm.pushDay,
resourceId: this.timeForm.comentMsg.id,
sendContent: this.timeForm.comentMsg.header_name
}
this.timeForm.pushContentList[0] = obj
// activeTab
// getPatientNumber({
// patientIdList: this.patientIdList
// }).then(res=>{
// if(res.code=='000000'){
// this.timeForm.wechatPatientNum = res.data.wechatPatientNum;
// this.timeForm.messagePatientNum = res.data.messagePatientNum;
// this.timeForm.totalNumber = this.timeForm.wechatPatientNum + this.timeForm.messagePatientNum
// }else{
// this.$notify.success({
// title: '提交失败',
// message: res.message,
// showClose: false
// });
// }
// })
},
deleteClick() {
this.timeForm.hasSelected = '';
},
deleteTimeNode(item, index) {
this.setTimeNodeList.splice(index, 1)
this.activeTab = 0;
// this.activeTab = 0;
// this.timeForm = this.setTimeNodeList[0];
if(this.setTimeNodeList.length == 0) {
//新增一个form
this.activeTab = 'setNewRef';
this.showSetBtn = true;
this.initNewForm();
}
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
},
deleteAddNode() {
this.showSetBtn = false;
......@@ -679,15 +713,17 @@
startDays: item
})
})
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
},
changePushDay(val){
console.log(val)
// console.log(this.timeForm.comentMsg)
let obj = {
startDays: val,
resourceId: this.timeForm.comentMsg.id
resourceId: this.timeForm.comentMsg.id,
sendContent: this.timeForm.comentMsg.header_name
}
this.timeForm.pushContentList[0] = obj
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
},
changeFollowId(val){
console.log(val)
......@@ -697,42 +733,7 @@
resourceId: item
})
})
},
goSelectCartoon() {
this.isSelectCartoon = true;
},
closeSelectCartoon(val) {
this.isSelectCartoon = val.closeStatus;
this.timeForm.hasSelected = val.hasSelected;
},
deleteClick() {
this.timeForm.hasSelected = '';
},
pushConmentMsg(val){
this.timeForm.comentMsg = val
// console.log(val)
// console.log(this.timeForm.comentMsg)
let obj = {
startDays: this.timeForm.pushDay,
resourceId: this.timeForm.comentMsg.id
}
this.timeForm.pushContentList[0] = obj
getPatientNumber({
patientIdList: this.patientIdList
}).then(res=>{
if(res.code=='000000'){
this.timeForm.wechatPatientNum = res.data.wechatPatientNum;
this.timeForm.messagePatientNum = res.data.messagePatientNum;
this.timeForm.totalNumber = this.timeForm.wechatPatientNum + this.timeForm.messagePatientNum
}else{
this.$notify.success({
title: '提交失败',
message: res.message,
showClose: false
});
}
})
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
},
getNowTime() {
......@@ -761,6 +762,11 @@
<style scoped lang="scss">
.add-time-content{
padding-top: 20px;
.deletelist{
position: absolute;
right: -3px;
top: -3px;
}
.time-line-scroll{
width: 100%;
/*height: 60px;*/
......
......@@ -319,7 +319,7 @@
},
watch: {
planDetail(val) {
console.log(val)
// console.log(val)
this.planDetailData = val
this.setTimeNodeList = val.fPlanTimeReqList
if(this.planDetailData.resourceId){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册