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

uniteValidateAction

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