提交 2d8157ed 编写于 作者: yi.li's avatar yi.li

协议弹层提示优化

上级 d2d9d228
...@@ -56,9 +56,9 @@ export default { ...@@ -56,9 +56,9 @@ export default {
}, },
created() { created() {
vm = this vm = this
if(vm.$route.name!='loginPage') { // if(vm.$route.name!='loginPage') {
vm.getToken() // vm.getToken()
} // }
}, },
mounted() { mounted() {
vm.getRedData() vm.getRedData()
......
<template> <template>
<div class="finish-followup" v-if="showThisPage"> <!--<div class="finish-followup" v-if="showThisPage">-->
<el-dialog <div class="finish-followup">
title="选择履约开始时间" <div v-if="showThisPage && !isShowProtocolDialog">
:visible.sync="showAddPatientTime" <el-dialog
v-if="showThisPage" title="选择履约开始时间"
:before-close="clickClose" :visible.sync="showAddPatientTime"
width="35%" v-if="showThisPage"
center> :before-close="clickClose"
<div class="finish-content"> width="35%"
<el-form center>
:model="addPatientData" <div class="finish-content">
:rules="rules" <el-form
ref="addPatientData" :model="addPatientData"
label-width="140px"> :rules="rules"
<el-form-item label="已选居民:"> ref="addPatientData"
{{addPatientData.patientNames}} label-width="140px">
</el-form-item> <el-form-item label="已选居民:">
<el-form-item label="履约开始时间:" prop="joinTime"> {{addPatientData.patientNames}}
<el-date-picker </el-form-item>
v-model="addPatientData.joinTime" <el-form-item label="履约开始时间:" prop="joinTime">
type="date" <el-date-picker
placeholder="请选择履约开始时间" v-model="addPatientData.joinTime"
:editable="false" type="date"
format="yyyy-MM-dd" placeholder="请选择履约开始时间"
value-format="timestamp" :editable="false"
clearable> format="yyyy-MM-dd"
</el-date-picker> value-format="timestamp"
</el-form-item> clearable>
</el-form> </el-date-picker>
</div> </el-form-item>
<span slot="footer" class="dialog-footer"> </el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="button-while" @click="clickClose" size="small" plain>取 消</el-button> <el-button class="button-while" @click="clickClose" size="small" plain>取 消</el-button>
<el-button class="button-green" @click="addPatient" size="small" type="primary">确 定</el-button> <el-button class="button-green" @click="addPatient" size="small" type="primary">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div>
<!-- 敏感词及协议校验 --> <!-- 敏感词及协议校验 -->
<el-dialog class="prot-dialog" title="" :visible.sync="isShowProtocolDialog" width="30%" center :show-close=false> <div v-if="!showThisPage && isShowProtocolDialog">
<p class="prot-dialog-tips-1">您选择的居民中有部分居民尚未同意《云鹊平台隐私协议》,将导致履约量表部分信息无法录入,为了方便您的工作开展,请您发送短信提醒未授权居民完成授权</p> <el-dialog class="prot-dialog" title="" :visible.sync="isShowProtocolDialog" width="30%" center :show-close=false :close-on-click-modal="false" :close-on-press-escape="false">
<p v-show="!isSentedProt" class="prot-dialog-tips-2">若您选择暂不发送,您只能录入量表的非敏感信息</p> <p class="prot-dialog-tips-1">您选择的居民中有部分居民尚未同意《云鹊平台隐私协议》,将导致履约量表部分信息无法录入,为了方便您的工作开展,请您发送短信提醒未授权居民完成授权</p>
<p v-show="isSentedProt" class="prot-dialog-tips-3">为避免打扰居民,7天内只能发送1次,您已发送过短信,请尽快联系居民同意授权</p> <p v-show="!isSentedProt" class="prot-dialog-tips-2">若您选择暂不发送,您只能录入量表的非敏感信息</p>
<span v-show="!isSentedProt" slot="footer" class="dialog-footer"> <p v-show="isSentedProt" class="prot-dialog-tips-3">为避免打扰居民,7天内只能发送1次,您已发送过短信,请尽快联系居民同意授权</p>
<span v-show="!isSentedProt" slot="footer" class="dialog-footer">
<el-button size="small" @click="closeProtocolDialog"> 暂不发送 </el-button> <el-button size="small" @click="closeProtocolDialog"> 暂不发送 </el-button>
<el-button size="small" type="primary" @click="sendMsg"> 发送短信 </el-button> <el-button size="small" type="primary" @click="sendMsg"> 发送短信 </el-button>
</span> </span>
<span v-show="isSentedProt" slot="footer" class="dialog-footer"> <span v-show="isSentedProt" slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="closeProtocolDialog"> 我知道了 </el-button> <el-button size="small" type="primary" @click="closeProtocolDialog"> 我知道了 </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div>
</div> </div>
</template> </template>
...@@ -82,6 +89,7 @@ ...@@ -82,6 +89,7 @@
isSentedProt: false, isSentedProt: false,
patientIds: [], patientIds: [],
sendMsgPatientIds: [], sendMsgPatientIds: [],
// noShowProtocolDialog: true,
} }
}, },
mounted() { mounted() {
...@@ -105,43 +113,46 @@ ...@@ -105,43 +113,46 @@
this.$refs['addPatientData'].validate(valid => { this.$refs['addPatientData'].validate(valid => {
if (valid) { if (valid) {
console.log(this.addPatientData) console.log(this.addPatientData)
// 4、校验居民/医生是否签署协议 if(this.$route.name == 'planModify') {
this.$emit('sendJoinTime',this.addPatientData.joinTime)
this.$emit('closeAddPatientTime',false)
} else {
const { id, patientIdList, joinTime } = this.addPatientData;
createFollowPlan({
id,
addPatients: true,
patientIdList,
joinTime
}).then((data) => {
if(data.code == '000000') {
this.$message({
message: '添加成功!',
type: 'success'
});
this.getResidentList({
planId: this.addPatientData.id,
status: this.addPatientData.status
})
this.$emit('closeAddPatientTime',false)
// this.noShowProtocolDialog = false;
setTimeout(()=>{
this.uniteValidateAction()
},1000)
// if(this.$route.name == 'planModify') { } else {
// this.$emit('sendJoinTime',this.addPatientData.joinTime) this.$message({
// this.$emit('closeAddPatientTime',false) message: `${data.message}`,
// } else { type: 'error'
// const { id, patientIdList, joinTime } = this.addPatientData; });
// createFollowPlan({ }
// id, }).catch((err) => {
// addPatients: true, this.$message({
// patientIdList, message: `${err.message}`,
// joinTime type: 'error'
// }).then((data) => { });
// if(data.code == '000000') { });
// this.$message({ }
// message: '添加成功!', // this.uniteValidateAction()
// type: 'success'
// });
// this.getResidentList({
// planId: this.addPatientData.id,
// status: this.addPatientData.status
// })
// this.$emit('closeAddPatientTime',false)
// } else {
// this.$message({
// message: `${data.message}`,
// type: 'error'
// });
// }
// }).catch((err) => {
// this.$message({
// message: `${err.message}`,
// type: 'error'
// });
// });
// }
this.uniteValidateAction()
} else { } else {
return false; return false;
} }
...@@ -171,7 +182,9 @@ ...@@ -171,7 +182,9 @@
let levelType = result.data.levelType; let levelType = result.data.levelType;
// 没有敏感字段或者居民已经签订过协议,则直接返回 // 没有敏感字段或者居民已经签订过协议,则直接返回
if (levelType === 1 || levelType === 2) { if (levelType === 1 || levelType === 2) {
this.jumpToAddOrModifyPlan(); // this.$emit('closeAddPatientTime',false)
// this.isShowProtocolDialog = false;
// this.jumpToAddOrModifyPlan();
} else if (levelType === 3) { } else if (levelType === 3) {
this.isShowProtocolDialog = true; this.isShowProtocolDialog = true;
this.isSentedProt = true; this.isSentedProt = true;
...@@ -192,6 +205,7 @@ ...@@ -192,6 +205,7 @@
message: '已发送,请尽快联系居民同意授权', message: '已发送,请尽快联系居民同意授权',
type: 'success' type: 'success'
}); });
this.$emit('closeAddPatientTime',false)
} }
}); });
this.isShowProtocolDialog = false; this.isShowProtocolDialog = false;
...@@ -238,7 +252,8 @@ ...@@ -238,7 +252,8 @@
// 关闭协议确认窗口 // 关闭协议确认窗口
closeProtocolDialog() { closeProtocolDialog() {
this.isShowProtocolDialog = false this.isShowProtocolDialog = false
this.jumpToAddOrModifyPlan() this.$emit('closeAddPatientTime',false)
// this.jumpToAddOrModifyPlan()
}, },
// 发送短信通知 // 发送短信通知
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册