提交 8d72bdb6 编写于 作者: guangjun.yang's avatar guangjun.yang

uniteValidateAction

上级 522ca333
......@@ -152,6 +152,9 @@
// Add by Anndy Yang
// 统一验证:量表内是否存在敏感字段、居民是否签署隐私协议、7天内是否发送过授权短信
uniteValidateAction() {
if(!this.patientIds.length) {
return;
}
let validParams = {
scaleNo: '',
patientIds: this.patientIds, // pc端只传这个字段
......@@ -168,7 +171,7 @@
let levelType = result.data.levelType;
// 没有敏感字段或者居民已经签订过协议,则直接返回
if (levelType === 1 || levelType === 2) {
jumpToScale();
jumpToAddOrModifyPlan();
} else if (levelType === 3) {
this.isShowProtocolDialog = true;
this.isSentedProt = true;
......@@ -195,7 +198,7 @@
},
// 统一跳转到量表页面
jumpToScale() {
jumpToAddOrModifyPlan() {
if(this.$route.name == 'planModify') {
this.$emit('sendJoinTime',this.addPatientData.joinTime)
this.$emit('closeAddPatientTime',false)
......@@ -235,7 +238,7 @@
// 关闭协议确认窗口
closeProtocolDialog() {
this.isShowProtocolDialog = false
this.jumpToScale()
this.jumpToAddOrModifyPlan()
},
// 发送短信通知
......
......@@ -204,7 +204,10 @@
// Add by Anndy Yang
// 统一验证:量表内是否存在敏感字段、居民是否签署隐私协议、7天内是否发送过授权短信
async uniteValidateAction() {
uniteValidateAction() {
if(!this.patientIds.length) {
return;
}
let validParams = {
scaleNo: '',
patientIds: this.patientIds, // pc端只传这个字段
......@@ -214,23 +217,21 @@
validateType: 2
};
let r = await uniteValidate(validParams).then(res => {
uniteValidate(validParams).then(res => {
let result = res;
// 请求成功
if (result.code === '000000') {
let levelType = result.data.levelType;
// 没有敏感字段或者居民已经签订过协议,则直接返回
if (levelType === 1 || levelType === 2) {
return 0;
// return;
} else if (levelType === 3) {
this.isShowProtocolDialog = true;
this.isSentedProt = true;
return 1;
} else if (levelType === 4) {
this.isShowProtocolDialog = true;
this.isSentedProt = false;
this.sendMsgPatientIds = result.data.ids;
return 1;
}
}
});
......@@ -267,31 +268,34 @@
return item.patientId
})
this.uniteValidateAction()
if(val.status){
this.baseInfo.fPlanTimeReqList = val.setTimeNodeList
// this.baseInfo.time = (new Date(this.baseInfo.time).getTime())
// console.log(this.baseInfo.time)
// 提交
createFollowPlan(this.baseInfo).then(res=>{
if(res.code=='000000'){
// 各种校验通过后,提交编辑内容,toast提示
this.$message({
message: '创建成功',
type: 'success'
});
setTimeout(()=>{
this.$router.push({
path: '/followup/plan-manage/plan-list'
})
},2000)
}else{
this.$message({
message: '创建失败,' + res.message,
type: 'error'
});
}
})
}else{
if(!this.patientIds.length) {
return;
}
if(val.status){
this.baseInfo.fPlanTimeReqList = val.setTimeNodeList
// this.baseInfo.time = (new Date(this.baseInfo.time).getTime())
// console.log(this.baseInfo.time)
// 提交
createFollowPlan(this.baseInfo).then(res=>{
if(res.code=='000000'){
// 各种校验通过后,提交编辑内容,toast提示
this.$message({
message: '创建成功',
type: 'success'
});
setTimeout(()=>{
this.$router.push({
path: '/followup/plan-manage/plan-list'
})
},2000)
}else{
this.$message({
message: '创建失败,' + res.message,
type: 'error'
});
}
})
} else {
this.$message({
message: val.message,
type: 'error'
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册