提交 b727df53 编写于 作者: tao.wu's avatar tao.wu

no message

上级 2640171b
...@@ -161,10 +161,10 @@ ...@@ -161,10 +161,10 @@
this.$emit('closeSelectCartoon', this.sendObj) this.$emit('closeSelectCartoon', this.sendObj)
}, },
sureSelect() { sureSelect() {
console.log(this.sendObj)
this.$emit('closeSelectCartoon', this.sendObj); this.$emit('closeSelectCartoon', this.sendObj);
}, },
changeComent(item){ changeComent(item){
console.log(item)
this.$emit('pushConmentMsg',item) this.$emit('pushConmentMsg',item)
} }
}, },
......
...@@ -26,32 +26,32 @@ ...@@ -26,32 +26,32 @@
:style="(index == activeTab)?'background:#3190e8;':''" :style="(index == activeTab)?'background:#3190e8;':''"
style="float:left;border:1px solid orange;padding:5px 10px;margin:0 5px;position: relative;" style="float:left;border:1px solid orange;padding:5px 10px;margin:0 5px;position: relative;"
>{{isStandedTemplate ? item.timeStr : '开始后'+String(item.timeNo) + timeUnitStr}} >{{isStandedTemplate ? item.timeStr : '开始后'+String(item.timeNo) + timeUnitStr}}
<i class="deletelist el-icon-circle-close-outline" @click="deleteTimeNode" v-if="setTimeNodeList.length>0"></i></div> <i class="deletelist el-icon-circle-close-outline" @click.stop="deleteTimeNode(item, index)" v-if="item.change && setTimeNodeList.length>0"></i></div>
</div> </div>
</div> </div>
<!--查看时间节点--> <!--查看时间节点-->
<div class="form-div" > <div class="form-div" >测试是否查看时间节点,记得去掉!!!
<div <div
v-show="index == activeTab" v-show="index == activeTab"
v-for="(item, index) in setTimeNodeList" v-for="(itemTimeForm, index) in setTimeNodeList"
:key="index" :key="index"
:label="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> <el-form-item label="本次随访时间" required>
<div style="display: flex;"> <div style="display: flex;">
<el-form-item prop="timeNo"> <el-form-item prop="timeNo">
<el-input <el-input
v-model="item.timeNo" v-model="itemTimeForm.timeNo"
type="tel" type="tel"
size="small" size="small"
placeholder="请输入" placeholder="请输入"
:disabled="isStandedTemplate" :disabled="isStandedTemplate || !itemTimeForm.change"
maxlength="2" maxlength="2"
clearable /> clearable />
</el-form-item> </el-form-item>
<el-form-item prop="timeUnit" class="ml20"> <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 <el-option
v-for="(item,index) in markOptions" v-for="(item,index) in markOptions"
:key="index" :key="index"
...@@ -63,16 +63,16 @@ ...@@ -63,16 +63,16 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="随访方式" prop="type"> <el-form-item label="随访方式" prop="type">
<el-radio-group v-model="item.type" size="small"> <el-radio-group v-model="itemTimeForm.type" size="small">
<el-radio v-for="(item,index) in followTypeList" :key="index" :label="item.no" :disabled="isStandedTemplate">{{item.value}}</el-radio> <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-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="提醒医生预约居民"> <el-form-item label="提醒医生预约居民">
<el-select <el-select
v-model="item.remindDay" v-model="itemTimeForm.remindDay"
multiple multiple
:multiple-limit=3 :multiple-limit=3
:disabled="isStandedTemplate" :disabled="isStandedTemplate || !itemTimeForm.change"
@change="changeRemindDay" @change="changeRemindDay"
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
...@@ -88,10 +88,10 @@ ...@@ -88,10 +88,10 @@
<div style="display: flex"> <div style="display: flex">
<el-select <el-select
v-model="item.pushDay" v-model="itemTimeForm.pushDay"
placeholder="选择推送时间" placeholder="选择推送时间"
clearable clearable
:disabled="isStandedTemplate" :disabled="isStandedTemplate || !itemTimeForm.change"
> >
<el-option <el-option
v-for="(item,index) in pushTimeOptions" v-for="(item,index) in pushTimeOptions"
...@@ -101,25 +101,25 @@ ...@@ -101,25 +101,25 @@
</el-option> </el-option>
</el-select> </el-select>
<el-button plain class="ml20" @click="goSelectCartoon" v-if="!item.hasSelected && !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="item.hasSelected"> <div class="selected-div ml20" v-if="itemTimeForm.hasSelected">
<span>{{item.comentMsg.header_name}}</span> <span>{{itemTimeForm.comentMsg.header_name}}</span>
<el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate && !planId">重选</el-button> <el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate">重选</el-button>
<el-button type="text" @click="deleteClick" v-if="!isStandedTemplate && !planId">删除</el-button> <el-button type="text" @click="deleteClick" v-if="!isStandedTemplate">删除</el-button>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<div class="tips-contnt" v-if="item.hasSelected"> <div class="tips-contnt" v-if="itemTimeForm.hasSelected">
<p class="yellow-font">当前计划中共{{item.totalNumber}}位居民(微信:{{item.wechatPatientNum}}位,短信:{{item.messagePatientNum}}位),本次定时推送任务在发送当日预计需要{{item.messagePatientNum}}条短信额度(微信推送不消耗额度,建议您让居民关注云鹊健康微信公众号),务必提前确保短信额度的充足。</p> <p class="yellow-font">当前计划中共{{totalNumber}}位居民(微信:{{wechatPatientNum}}位,短信:{{messagePatientNum}}位),本次定时推送任务在发送当日预计需要{{messagePatientNum}}条短信额度(微信推送不消耗额度,建议您让居民关注云鹊健康微信公众号),务必提前确保短信额度的充足。</p>
<p>需要更多额度,请前往「云鹊医App-个人中心-啾啾币中心」兑换短信额度后再进行预约,您也可以联系云鹊医客服购买短信额度,客服电话:400-920-8877</p> <p>需要更多额度,请前往「云鹊医App-个人中心-啾啾币中心」兑换短信额度后再进行预约,您也可以联系云鹊医客服购买短信额度,客服电话:400-920-8877</p>
</div> </div>
<el-form-item label="随访登记表"> <el-form-item label="随访登记表">
<el-select <el-select
v-model="item.followResourceId" v-model="itemTimeForm.followResourceId"
multiple multiple
:multiple-limit=3 :multiple-limit=3
@change="changeFollowId" @change="changeFollowId"
:disabled="isStandedTemplate" :disabled="isStandedTemplate || !itemTimeForm.change"
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
v-for="(item_sub,index) in formOptions" v-for="(item_sub,index) in formOptions"
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
</div> </div>
</el-form-item> </el-form-item>
<div class="tips-contnt" v-if="timeForm.hasSelected"> <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> <p>需要更多额度,请前往「云鹊医App-个人中心-啾啾币中心」兑换短信额度后再进行预约,您也可以联系云鹊医客服购买短信额度,客服电话:400-920-8877</p>
</div> </div>
<el-form-item label="随访登记表"> <el-form-item label="随访登记表">
...@@ -298,6 +298,9 @@ ...@@ -298,6 +298,9 @@
pushTimeOptions: [], pushTimeOptions: [],
formOptions: [], formOptions: [],
wechatPatientNum: 0,
messagePatientNum: 0,
totalNumber: 0,
} }
}, },
props: { props: {
...@@ -314,13 +317,13 @@ ...@@ -314,13 +317,13 @@
// setTimeNodeList1(){ // setTimeNodeList1(){
// return this.sortKey(this.setTimeNodeList,'timeNo') // return this.sortKey(this.setTimeNodeList,'timeNo')
// }, // },
item() { // item() {
if(this.setTimeNodeList.length == 0) { // if(this.setTimeNodeList.length == 0) {
return; // return;
}else { // }else {
return this.setTimeNodeList1[0].timeUnit; // return this.setTimeNodeList1[0].timeUnit;
} // }
}, // },
}, },
created() { created() {
this.setTimeNodeList = this.standedTimeNodeList this.setTimeNodeList = this.standedTimeNodeList
...@@ -340,27 +343,29 @@ ...@@ -340,27 +343,29 @@
}, },
setTimeNodeList(val){ setTimeNodeList(val){
this.setTimeNodeList = val this.setTimeNodeList = val
// console.log(this.setTimeNodeList)
if(this.setTimeNodeList.length>0) { if(this.setTimeNodeList.length>0) {
this.timeUnit = this.setTimeNodeList[0].timeUnit this.timeUnit = this.setTimeNodeList[0].timeUnit
this.setTimeNodeList.forEach(item=>{ this.setTimeNodeList.forEach(item=>{
item.isDisabled = true; item.isDisabled = true;
item.timeUnit = this.setTimeNodeList[0].timeUnit 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.remindDay = []
item.remindList.forEach((kkk)=>{ item.remindList.forEach((kkk)=>{
item.remindDay.push(kkk.startDays) 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] let pushData = item.pushContentList[0]
item.hasSelected = true
item.pushDay = pushData.startDays item.pushDay = pushData.startDays
item.comentMsg = { item.comentMsg = {
id: pushData.resourceId, id: pushData.resourceId,
header_name: pushData.sendContent header_name: pushData.sendContent
} }
} }
if(item.followupList && item.followupList.length > 0){ //followResourceId if(item.followupList && item.followupList.length > 0){ //followResourceId 随访量表
item.followResourceId = [] item.followResourceId = []
item.followupList.forEach((kkk)=>{ item.followupList.forEach((kkk)=>{
if(this.isStandedTemplate){ if(this.isStandedTemplate){
...@@ -376,11 +381,35 @@ ...@@ -376,11 +381,35 @@
} }
}); });
console.log(this.setTimeNodeList)
if(!this.isStandedTemplate){ if(!this.isStandedTemplate){
this.setTimeNodeList[0].isDisabled = false; 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){ checkForm(val){
// console.log('触发 保存按钮的 校验',val) // console.log('触发 保存按钮的 校验',val)
// 触发 保存 校验 // 触发 保存 校验
...@@ -465,20 +494,20 @@ ...@@ -465,20 +494,20 @@
// this.timeForm = val // this.timeForm = val
console.log('表单父组件的数据',this.timeForm) console.log('表单父组件的数据',this.timeForm)
}, },
setTimeNodeList1(val) { // setTimeNodeList1(val) {
if(val.length > 0){ // if(val.length > 0){
this.setTimeNodeList1.map(item=>{ // this.setTimeNodeList1.map(item=>{
item.isDisabled = true; // item.isDisabled = true;
item.timeUnit = this.setTimeNodeList1[0].timeUnit // item.timeUnit = this.setTimeNodeList1[0].timeUnit
this.markOptions.forEach((ob)=>{ // this.markOptions.forEach((ob)=>{
if(item.timeUnit==ob.no){ // if(item.timeUnit==ob.no){
item.timeUnitStr = ob.value // item.timeUnitStr = ob.value
} // }
}) // })
}); // });
this.setTimeNodeList1[0].isDisabled = false; // this.setTimeNodeList1[0].isDisabled = false;
} // }
}, // },
}, },
methods: { methods: {
// 一次性获取常量接口数据 // 一次性获取常量接口数据
...@@ -614,9 +643,40 @@ ...@@ -614,9 +643,40 @@
goSelectCartoon() { goSelectCartoon() {
this.isSelectCartoon = true; this.isSelectCartoon = true;
}, },
//关闭漫画
closeSelectCartoon(val) { closeSelectCartoon(val) {
this.isSelectCartoon = val.closeStatus; this.isSelectCartoon = val.closeStatus;
this.timeForm.hasSelected = val.hasSelected; 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() { deleteClick() {
this.timeForm.hasSelected = ''; this.timeForm.hasSelected = '';
...@@ -630,7 +690,6 @@ ...@@ -630,7 +690,6 @@
this.activeTab = 'setNewRef'; this.activeTab = 'setNewRef';
this.showSetBtn = true; this.showSetBtn = true;
this.initNewForm(); this.initNewForm();
}else{
} }
this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题 this.$forceUpdate(); //强制刷新,解决页面不会重新渲染的问题
}, },
...@@ -653,10 +712,10 @@ ...@@ -653,10 +712,10 @@
}, },
changePushDay(val){ changePushDay(val){
console.log(val) console.log(val)
// console.log(this.timeForm.comentMsg)
let obj = { let obj = {
startDays: val, startDays: val,
resourceId: this.timeForm.comentMsg.id resourceId: this.timeForm.comentMsg.id,
sendContent: this.timeForm.comentMsg.header_name
} }
this.timeForm.pushContentList[0] = obj this.timeForm.pushContentList[0] = obj
}, },
...@@ -669,42 +728,6 @@ ...@@ -669,42 +728,6 @@
}) })
}) })
}, },
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
});
}
})
},
getNowTime() { getNowTime() {
const date = new Date(); const date = new Date();
......
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
}, },
watch: { watch: {
planDetail(val) { planDetail(val) {
console.log(val) // console.log(val)
this.planDetailData = val this.planDetailData = val
this.setTimeNodeList = val.fPlanTimeReqList this.setTimeNodeList = val.fPlanTimeReqList
if(this.planDetailData.resourceId){ if(this.planDetailData.resourceId){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册