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

record-list home uniteValidate

上级 d21995f1
......@@ -236,3 +236,22 @@ html,body{
background-color: #449284 !important;
border-color: #449284 !important;
}
.prot-dialog {
.el-dialog__body {
padding: 25px 25px 10px;
}
&-tips-1 {
margin-top: 0px;
}
&-tips-2 {
margin-top: 20px;
font-size: 12px;
color: #aaa;
}
&-tips-3 {
margin-top: 20px;
font-size: 12px;
color: #FF9A4B;
}
}
\ No newline at end of file
......@@ -181,9 +181,10 @@
return time.getTime() < Date.now() - 8.64e7
}
},
isShowProtocolDialog: false,
isShowProtocolDialog: true,
isSentedProt: false,
patientIds: []
patientIds: [],
sendMsgPatientIds: []
}
},
created() {
......@@ -201,11 +202,48 @@
methods: {
...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']),
// Add by Anndy Yang
// 统一验证:量表内是否存在敏感字段、居民是否签署隐私协议、7天内是否发送过授权短信
async uniteValidateAction() {
let validParams = {
scaleNo: '',
patientIds: this.patientIds, // pc端只传这个字段
// planPatientsTimesId: planPatientsTimesId, // app端只传这个字段
protocolType: 5,
userType: 1,
validateType: 2
};
let r = await uniteValidate(validParams).then(res => {
let result = res;
// 请求成功
if (result.code === '000000') {
let levelType = result.data.levelType;
// 没有敏感字段或者居民已经签订过协议,则直接返回
if (levelType === 1 || levelType === 2) {
return 0;
} else if (levelType === 3) {
this.isShowProtocolDialog = true;
this.isSentedProt = false;
return 1;
} else if (levelType === 4) {
this.isShowProtocolDialog = true;
this.isSentedProt = true;
this.sendMsgPatientIds = result.data.ids;
return 1;
}
}
});
},
// 发送协议授权短信给居民
sendMsgToPatients() {
authMessage({ patientIds: this.patientIds }).then(res => {
authMessage({ patientIds: this.sendMsgPatientIds }).then(res => {
if (res.code === '000000') {
this.$toast('已发送,请尽快联系居民同意授权');
this.$message({
message: '已发送,请尽快联系居民同意授权',
type: 'success'
});
}
});
this.isShowDialog = false;
......@@ -227,8 +265,8 @@
this.checkForm = false
if(val.status){
this.baseInfo.fPlanTimeReqList = val.setTimeNodeList
// this.baseInfo.time = (new Date(this.baseInfo.time).getTime())
// console.log(this.baseInfo.time)
// this.baseInfo.time = (new Date(this.baseInfo.time).getTime())
// console.log(this.baseInfo.time)
// 提交
createFollowPlan(this.baseInfo).then(res=>{
if(res.code=='000000'){
......@@ -273,6 +311,9 @@
this.isShowSelectPatient = getArguments[0];
const selectPatients = getArguments[1]; // 每次选中获取的人
this.hasSelectedList = selectPatients;
this.patientIds = selectPatients.map( item => {
return item.patientId
})
// console.log('呵呵呵呵',arguments)
this.baseInfo.patientIdList = [];
selectPatients.forEach((item)=>{
......@@ -299,43 +340,17 @@
this.$router.push({path: '/followup/plan-manage/plan-list'})
});
},
nextClick(formName) {
// 创建/修改履约计划
// 4、校验居民/医生是否签署协议
alert('创建/修改履约计划')
// return
// Add by Anndy Yang
// 统一验证:量表内是否存在敏感字段、居民是否签署隐私协议、7天内是否发送过授权短信
let validParams = {
scaleNo: '',
patientIds: this.hasSelectedList, // pc端只传这个字段
// planPatientsTimesId: planPatientsTimesId, // app端只传这个字段
protocolType: 5,
userType: 1,
validateType: 1
};
uniteValidate(validParams).then(res => {
let result = res;
// 请求成功
if (result.code === '000000') {
let levelType = result.data.levelType;
// 没有敏感字段或者居民已经签订过协议,则直接返回
if (levelType === 1 || levelType === 2) {
console.log(this.hasSelectedList)
if(this.uniteValidateAction() == 1) {
return;
} else if (levelType === 3) {
this.isShowProtocolDialog = true;
this.isSentedProt = false;
} else if (levelType === 4) {
this.isShowProtocolDialog = true;
this.isSentedProt = true;
// this.patientIds = result.data.ids;
}
}
});
};
// return
// 为方便调试,不做校验
// this.activeTab = 'second';
this.$refs[formName].validate((valid) => {
......@@ -351,6 +366,9 @@
this.resourceId = String(this.baseInfo.resourceId)
// console.log( this.baseInfo.resourceId)
if(this.baseInfo.resourceId){
if(this.uniteValidateAction() == 1) {
return;
};
getFollowupTableTemplate(this.baseInfo.resourceId).then(res=>{
this.isStandedTemplate = true
this.standedTimeNodeList = res.data
......
<template>
<div class="form-show-scrollY">
<div class="form-template">
<BreadCrumb
:curmbFirst="'履约管理'"
:curmbSecond="breadTxt"
:curmbThird="'录入量表'"
:jumPathThird="jumPathThird"
/>
<div class="resident-content f-main-content screenSet">
<el-row :gutter="24" align="middle" type="flex" class="form-header">
<el-col :span="18">{{titleText}}</el-col>
<el-col :span="6" v-if="showBtn=='1'">
<el-button type="primary" size="small" class="formSubmit" @click="formSubmit(1)">提交</el-button>
<el-button class="button-white formTempSave" size="small" plain @click="formSubmit(2)">暂存</el-button>
</el-col>
</el-row>
<div class="title-box">
<h1>{{titleText}}</h1>
<h2>{{titleSmText}}</h2>
</div>
<!--模板页面除了显示居民基本信息,将病种展示作为组件引入-->
<div class="form-container">
<!--脑卒中-->
<stroke v-if="scaleNo=='SCALE0003'" :showBtn="showBtn" :scaleType="scaleNo" :checkStart="checkStart" @checkEnd="checkEnd" :saveWay="saveWay" />
<!--高血压-->
<hypertension v-if="scaleNo=='SCALE0001'" :showBtn="showBtn" :scaleType="scaleNo" :checkStart="checkStart" @checkEnd="checkEnd" :saveWay="saveWay" ></hypertension>
<!--糖尿病-->
<diabetes v-if="scaleNo=='SCALE0002'" :showBtn="showBtn" :scaleType="scaleNo" :checkStart="checkStart" @checkEnd="checkEnd" :saveWay="saveWay" ></diabetes>
</div>
</div>
</div>
</div>
</template>
<script>
import BreadCrumb from '@/components/breadcrumb'
// 脑卒中
import stroke from './patient-scale/stroke'
import hypertension from './patient-scale/hypertension'
import diabetes from './patient-scale/diabetes'
export default {
data(){
return {
titleText: '',
titleSmText: '',
breadTxt: '录入管理',
jumPathThird: '/followup/record-manage/record-list',
checkStart: false,
showBtn: '1',
// resourceId: '',
saveWay: 1,
scaleNo: ''
}
},
components: {
stroke,
hypertension,
BreadCrumb,
diabetes,
},
methods: {
formSubmit(val){
this.saveWay = val
this.checkStart = true;
},
checkEnd(val){
this.checkStart = false
}
},
created(){
this.scaleNo = this.$route.query.scaleNo;
console.log('scaleNo=>',this.scaleNo)
// 0003 脑卒中、0002 糖尿病、0001 高血压
if(this.scaleNo == 'SCALE0003'){
this.titleText = '心脑血管病危险因素社区、乡镇人群履约表';
this.titleSmText = '(适用于社区、乡镇脑卒中高危人群满6个月、12个月时履约和中危人群满12个月时履约使用)';
}else if(this.scaleNo == 'SCALE0001'){
this.titleText = '高血压患者履约服务记录表';
this.titleSmText = '(本表为高血压患者在接受履约服务时由医生填写)';
}else if(this.scaleNo == 'SCALE0002'){
this.titleText = '2 型糖尿病患者履约服务记录表 ';
this.titleSmText = '(本表为2型糖尿病患者在接受履约服务时由医生填写)';
}
if(this.$route.query.showBtn=='0'){
this.showBtn = String(this.$route.query.showBtn);
}
},
}
</script>
<style lang="scss" scoped>
@import '../../../style/followup/followup-common';
@import '../../../style/followup/element-reset.css';
.form-show-scrollY{
width: 100%; height: 100%; overflow: hidden; overflow-y: scroll;
&::-webkit-scrollbar{
width: 8px; height: 8px;
background: #fff;
}
}
.form-template{
.form-header{
/*position: fixed;*/
/*z-index:100000;*/
line-height: 60px;
height: 60px;
border-bottom: 1px solid #e1e1e1;
}
.patient-base-info{
line-height: 60px;
height: 60px;
border-bottom: 1px dashed #ccc;
[class*=el-col-]{
float: left;
}
}
.title-box{
padding: 20px;
text-align: center;
h1{
font-size: 18px;
font-weight: normal;
}
h2{
font-size: 16px;
font-weight: normal;
margin-top: 15px;
}
}
.formSubmit{
float: right;
margin-left: 10px;
}
.formTempSave{
float: right;
}
.form-container{
padding: 0 10px;
}
}
.title{
font-weight: bold;
}
</style>
......@@ -32,8 +32,6 @@
<!--糖尿病-->
<diabetes v-if="scaleNo=='SCALE0002'" :showBtn="showBtn" :scaleType="scaleNo" :checkStart="checkStart" @checkEnd="checkEnd" :saveWay="saveWay" ></diabetes>
</div>
</div>
</div>
</div>
......
......@@ -116,6 +116,7 @@
})
return;
}else{
// 校验内容是否全部填写
this.valid = true;
}
}
......
......@@ -114,6 +114,7 @@
})
return;
}else{
// 校验内容是否全部填写
this.valid = true;
}
}
......
<template>
<div class="form-wrap">
<div class="form-wrap" v-if="canRender">
<!--渲染不同的模块表单-->
<div v-if="canRender" v-for="(item, index) in addComponents">
<div v-for="(item, index) in addComponents" :key="index">
<div v-if="item.showModule" class="content-box" >
<div v-if="!item.hideTitle" class="title">{{item.title}}</div>
<el-form
......@@ -116,6 +116,7 @@
})
return;
}else{
// 校验内容是否全部填写
this.valid = true;
}
}
......
此差异已折叠。
......@@ -176,7 +176,7 @@ import BreadCrumb from "@/components/breadcrumb";
import followupDetail from "./dialog/followupDetail";
import ChangeFollowupStatus from "./dialog/change-followup-status";
import { getSaasDomain } from "@/utils/index";
import { getFirstAccess } from '@/utils/followup/followapis'
import { getFirstAccess, uniteValidate, authMessage } from '@/utils/followup/followapis'
import { mapState, mapGetters, mapActions } from "vuex";
export default {
......@@ -214,7 +214,10 @@ export default {
isShowProtocolDialog1: false,
isShowProtocolDialog: false,
scaleQuery: {},
isSentedProt: false
isSentedProt: false,
scaleNo: '',
patientIds: [],
sendMsgPatientIds: [],
};
},
computed: {
......@@ -315,6 +318,7 @@ export default {
async editRow(row) {
await this.getFormList(row.fuPlanTimesId); //获取量表列表
//获取量表列表情况
this.patientIds = [row.patientId];
if (this.formList.scalesList.length > 1) {
this.selectFormShow = true;
this.ScaleData = {
......@@ -322,24 +326,26 @@ export default {
planPatientsTimesId: row.fuPlanPatientTimesId
};
} else if (this.formList.scalesList.length === 1) {
this.$router.push({
path: "/followup/record-manage/form-template",
query: {
// this.$router.push({
// path: "/followup/record-manage/form-template",
// query: {
// doctorId: this.formList.doctorId,
// scaleNo: this.formList.scalesList[0].resourceId,
// planPatientsTimesId: row.fuPlanPatientTimesId,
// planTimesId: row.planTimesId,
// showBtn: 1
// }
// });
this.scaleQuery = {
doctorId: this.formList.doctorId,
scaleNo: this.formList.scalesList[0].resourceId,
planPatientsTimesId: row.fuPlanPatientTimesId,
planTimesId: row.planTimesId,
showBtn: 1
}
});
// this.scaleQuery = {
// doctorId: this.formList.doctorId,
// scaleNo: this.formList.scalesList[0].resourceId,
// planPatientsTimesId: row.planPatientTimesId,
// planTimesId: row.planTimesId,
// showBtn: 1
// }
// this.needSign()
this.scaleNo = this.formList.scalesList[0].resourceId;
this.uniteValidateAction()
} else {
this.$message.warning("暂无量表!");
}
......@@ -380,52 +386,82 @@ export default {
},
goFormView(item) {
this.selectFormShow = false;
this.$router.push({
path: "/followup/record-manage/form-template",
query: {
doctorId: this.ScaleData.doctorId,
scaleNo: item.resourceId,
planPatientsTimesId: this.ScaleData.planPatientsTimesId,
planTimesId: item.planTimesId,
showBtn: 1
}
});
// this.scaleQuery = {
// this.$router.push({
// path: "/followup/record-manage/form-template",
// query: {
// doctorId: this.ScaleData.doctorId,
// scaleNo: item.resourceId,
// planPatientsTimesId: this.ScaleData.planPatientsTimesId,
// planTimesId: item.planTimesId,
// showBtn: 1
// }
// this.needSign()
// });
this.scaleQuery = {
doctorId: this.ScaleData.doctorId,
scaleNo: item.resourceId,
planPatientsTimesId: this.ScaleData.planPatientsTimesId,
planTimesId: item.planTimesId,
showBtn: 1
};
this.scaleNo = item.resourceId;
// this.patientIds = [this.ScaleData.patientId];
this.uniteValidateAction();
},
closeForm() {
this.selectFormShow = false;
},
// 敏感词校验与签署协议逻辑
// 1. 判断量表内是否存在敏感词
// 2. 判断居民是否存签署协议
// 3. 七天内是否发送过
needSign(scaleId, query) {
// let statusConfig =await getStatusByScaleId(scaleId)
let statusConfig = {
isSensitive: 1, // 量表内是否存在敏感词 0: 否;1: 是
hasProtocol: 0, // 居民是否存签署协议 0: 否;1: 是
hasSented: 0 // 七天内是否发送过 0: 否;1: 是
// Add by Anndy Yang
// 统一验证:量表内是否存在敏感字段、居民是否签署隐私协议、7天内是否发送过授权短信
uniteValidateAction() {
let validParams = {
scaleNo: this.scaleNo,
patientIds: this.patientIds, // pc端只传这个字段
// planPatientsTimesId: planPatientsTimesId, // app端只传这个字段
protocolType: 5,
userType: 1,
validateType: 1
};
if (statusConfig.isSensitive == 1 && statusConfig.hasProtocol == 0) {
this.isShowProtocolDialog = true
this.isSentedProt = statusConfig.hasSented == 1
} else {
this.jumpToScale()
uniteValidate(validParams).then(res => {
let result = res;
// 请求成功
if (result.code === '000000') {
let levelType = result.data.levelType;
// 没有敏感字段或者居民已经签订过协议,则直接返回
if (levelType === 1 || levelType === 2) {
jumpToScale();
} else if (levelType === 3) {
this.isShowProtocolDialog = true;
this.isSentedProt = true;
} else if (levelType === 4) {
this.isShowProtocolDialog = true;
this.isSentedProt = false;
this.sendMsgPatientIds = result.data.ids;
}
}
});
},
// 发送协议授权短信给居民
sendMsgToPatients() {
authMessage({ patientIds: this.sendMsgPatientIds }).then(res => {
if (res.code === '000000') {
this.$message({
message: '已发送,请尽快联系居民同意授权',
type: 'success'
});
}
});
this.isShowDialog = false;
},
// 统一跳转到量表页面
jumpToScale() {
// this.$router.push({
// path: "/followup/record-manage/form-template",
// query: this.scaleQuery
// });
this.$router.push({
path: "/followup/record-manage/form-template",
query: this.scaleQuery
});
},
// 关闭协议确认窗口
......@@ -435,8 +471,8 @@ export default {
},
// 发送短信通知
sendMsg(residentId) {
// this.sendMsgToResident(residentId);
sendMsg() {
this.sendMsgToPatients();
this.closeProtocolDialog()
},
......
此差异已折叠。
......@@ -140,6 +140,8 @@ import ChangeFollowupStatus from "./followup/record-manage/dialog/change-followu
import { mapGetters, mapState, mapActions } from "vuex";
import * as commonUtil from "../utils/utils";
import { uniteValidate, authMessage } from '@/utils/followup/followapis'
let vm = null;
export default {
components: {
......@@ -162,7 +164,10 @@ export default {
ScaleData: {},
isShowProtocolDialog: true,
scaleQuery: {},
isSentedProt: false
isSentedProt: false,
scaleNo: '',
patientIds: [],
sendMsgPatientIds: [],
};
},
created() {
......@@ -264,25 +269,27 @@ export default {
});
},
goFormView(item) {
this.selectFormShow = false;
this.$router.push({
path: "/followup/record-manage/form-template",
query: {
doctorId: this.ScaleData.doctorId,
scaleNo: item.resourceId,
planPatientsTimesId: this.ScaleData.planPatientsTimesId,
planTimesId: item.planTimesId,
showBtn: 1
}
});
// this.scaleQuery = {
// this.selectFormShow = false;
// this.$router.push({
// path: "/followup/record-manage/form-template",
// query: {
// doctorId: this.ScaleData.doctorId,
// scaleNo: item.resourceId,
// planPatientsTimesId: this.ScaleData.planPatientsTimesId,
// planTimesId: item.planTimesId,
// showBtn: 1
// }
// this.needSign()
// });
this.scaleQuery = {
doctorId: this.ScaleData.doctorId,
scaleNo: item.resourceId,
planPatientsTimesId: this.ScaleData.planPatientsTimesId,
planTimesId: item.planTimesId,
showBtn: 1
}
this.scaleNo = item.resourceId;
// this.patientIds = [this.ScaleData.patientId];
this.uniteValidateAction()
},
closeForm() {
this.selectFormShow = false;
......@@ -290,6 +297,7 @@ export default {
async goToScale(row) {
await this.getFormList(row.planTimesId); //获取量表列表
//获取量表列表情况
this.patientIds = [row.patientId];
if (this.formList.scalesList.length > 1) {
this.selectFormShow = true;
this.ScaleData = {
......@@ -297,24 +305,25 @@ export default {
planPatientsTimesId: row.planPatientTimesId
};
} else if (this.formList.scalesList.length === 1) {
this.$router.push({
path: "/followup/record-manage/form-template",
query: {
doctorId: this.formList.doctorId,
scaleNo: this.formList.scalesList[0].resourceId,
planPatientsTimesId: row.planPatientTimesId,
planTimesId: row.planTimesId,
showBtn: 1
}
});
// this.scaleQuery = {
// this.$router.push({
// path: "/followup/record-manage/form-template",
// query: {
// doctorId: this.formList.doctorId,
// scaleNo: this.formList.scalesList[0].resourceId,
// planPatientsTimesId: row.planPatientTimesId,
// planTimesId: row.planTimesId,
// showBtn: 1
// }
// this.needSign()
// });
this.scaleQuery = {
doctorId: this.formList.doctorId,
scaleNo: this.formList.scalesList[0].resourceId,
planPatientsTimesId: row.planPatientTimesId,
planTimesId: row.planTimesId,
showBtn: 1
}
this.scaleNo = this.formList.scalesList[0].resourceId;
this.uniteValidateAction()
} else {
this.$message.warning("暂无量表!");
}
......@@ -328,31 +337,123 @@ export default {
};
this.isShowChangeDialog = true;
},
// 敏感词校验与签署协议逻辑
// 1. 判断量表内是否存在敏感词
// 2. 判断居民是否存签署协议
// 3. 七天内是否发送过
needSign(scaleId, query) {
// let statusConfig =await getStatusByScaleId(scaleId)
let statusConfig = {
isSensitive: 1, // 量表内是否存在敏感词 0: 否;1: 是
hasProtocol: 0, // 居民是否存签署协议 0: 否;1: 是
hasSented: 0 // 七天内是否发送过 0: 否;1: 是
// // Add by Anndy Yang
// // 统一验证:量表内是否存在敏感字段、居民是否签署隐私协议、7天内是否发送过授权短信
// uniteValidateAction() {
// let validParams = {
// scaleNo: this.scaleNo,
// patientIds: this.patientIds, // pc端只传这个字段
// // planPatientsTimesId: planPatientsTimesId, // app端只传这个字段
// protocolType: 5,
// userType: 1,
// validateType: 1
// };
// uniteValidate(validParams).then(res => {
// let result = res;
// // 请求成功
// if (result.code === '000000') {
// let levelType = result.data.levelType;
// // 没有敏感字段或者居民已经签订过协议,则直接返回
// if (levelType === 1 || levelType === 2) {
// jumpToScale()
// } else if (levelType === 3) {
// this.isShowProtocolDialog = true;
// this.isSentedProt = false;
// } else if (levelType === 4) {
// this.isShowProtocolDialog = true;
// this.isSentedProt = true;
// this.sendMsgPatientIds = result.data.ids;
// }
// }
// });
// },
// // 发送协议授权短信给居民
// sendMsgToPatients() {
// authMessage({ patientIds: this.sendMsgPatientIds }).then(res => {
// if (res.code === '000000') {
// this.$message({
// message: '已发送,请尽快联系居民同意授权',
// type: 'success'
// });
// }
// });
// this.isShowDialog = false;
// },
// // 统一跳转到量表页面
// jumpToScale() {
// // this.$router.push({
// // path: "/followup/record-manage/form-template",
// // query: this.scaleQuery
// // });
// },
// // 关闭协议确认窗口
// closeProtocolDialog() {
// this.isShowProtocolDialog = false
// this.jumpToScale()
// },
// // 发送短信通知
// sendMsg() {
// this.sendMsgToPatients();
// this.closeProtocolDialog()
// },
// Add by Anndy Yang
// 统一验证:量表内是否存在敏感字段、居民是否签署隐私协议、7天内是否发送过授权短信
uniteValidateAction() {
let validParams = {
scaleNo: this.scaleNo,
patientIds: this.patientIds, // pc端只传这个字段
// planPatientsTimesId: planPatientsTimesId, // app端只传这个字段
protocolType: 5,
userType: 1,
validateType: 1
};
if (statusConfig.isSensitive == 1 && statusConfig.hasProtocol == 0) {
this.isShowProtocolDialog = true
this.isSentedProt = statusConfig.hasSented == 1
} else {
this.jumpToScale()
uniteValidate(validParams).then(res => {
let result = res;
// 请求成功
if (result.code === '000000') {
let levelType = result.data.levelType;
// 没有敏感字段或者居民已经签订过协议,则直接返回
if (levelType === 1 || levelType === 2) {
jumpToScale();
} else if (levelType === 3) {
this.isShowProtocolDialog = true;
this.isSentedProt = true;
} else if (levelType === 4) {
this.isShowProtocolDialog = true;
this.isSentedProt = false;
this.sendMsgPatientIds = result.data.ids;
}
}
});
},
// 发送协议授权短信给居民
sendMsgToPatients() {
authMessage({ patientIds: this.sendMsgPatientIds }).then(res => {
if (res.code === '000000') {
this.$message({
message: '已发送,请尽快联系居民同意授权',
type: 'success'
});
}
});
this.isShowDialog = false;
},
// 统一跳转到量表页面
jumpToScale() {
// this.$router.push({
// path: "/followup/record-manage/form-template",
// query: this.scaleQuery
// });
this.$router.push({
path: "/followup/record-manage/form-template",
query: this.scaleQuery
});
},
// 关闭协议确认窗口
......@@ -362,8 +463,8 @@ export default {
},
// 发送短信通知
sendMsg(residentId) {
// this.sendMsgToResident(residentId);
sendMsg() {
this.sendMsgToPatients();
this.closeProtocolDialog()
},
......@@ -492,27 +593,6 @@ export default {
}
}
}
.prot-dialog {
.el-dialog__body {
padding: 25px 25px 10px;
}
&-tips-1 {
margin-top: 0px;
}
&-tips-2 {
margin-top: 20px;
font-size: 12px;
color: #aaa;
}
&-tips-3 {
margin-top: 20px;
font-size: 12px;
color: #FF9A4B;
}
}
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册