|
|
|
@ -16,10 +16,10 @@ |
|
|
|
<el-button type="primary" class="btnClass" @click="btnDelPr">删除人员</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" class="btnClass" >上一人</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="btnPrev">上一人</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" class="btnClass" >下一人</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="btnNext">下一人</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" class="btnClass" @click="save">保存结果</el-button> |
|
|
|
@ -31,7 +31,10 @@ |
|
|
|
<el-button type="primary" class="btnClass" @click="del">删除结果</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" class="btnClass" @click="delItem">删除项目</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="refuseItem" style="font-size:11px;">放弃明细项目检查</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" class="btnClass" @click="delItem">删除明细项目</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" class="btnClass">历次结果</el-button> |
|
|
|
@ -40,7 +43,7 @@ |
|
|
|
<el-button type="primary" class="btnClass">体检报告</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" class="btnClass">生成小结</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="btnMakeDiagnosis">生成小结</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" class="btnClass" @click="toSumDoctorCheck">总检</el-button> |
|
|
|
@ -95,9 +98,7 @@ |
|
|
|
<el-button @click="dialogVisibleSetStartDate = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="btnSetStartDate">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -107,6 +108,7 @@ import { arrayExistObj,objCopy } from "../../utlis/proFunc"; |
|
|
|
|
|
|
|
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue"; |
|
|
|
import PatientRegisterList from "./PatientRegisterList.vue"; |
|
|
|
import moment from 'moment'; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
@ -117,7 +119,7 @@ export default { |
|
|
|
return { |
|
|
|
medicalStartDate:'', //设置体检日期 |
|
|
|
medicalStartDateTemp:'', //设置体检日期 临时体检日期 |
|
|
|
medicalStartDateDatas:[], // 设置体检日期 的人员信息登记信息,按登记日期排序 |
|
|
|
medicalStartDateDatas:[], // 设置体检日期 的人员信息登记信息,按登记日期排序 (用于上一人,下一人) |
|
|
|
|
|
|
|
dialogVisibleSetStartDate:false, //设置体检日期窗口 |
|
|
|
editTimes:0, |
|
|
|
@ -176,12 +178,14 @@ export default { |
|
|
|
medicalStartDate:null, |
|
|
|
}, //单位 记录 目前新增与更新是一致 |
|
|
|
formInitData:{}, |
|
|
|
|
|
|
|
medicalStartDateLoadOpts:{ //按体检日期 查询参数 |
|
|
|
totalCount:0, |
|
|
|
skipCount:0, |
|
|
|
maxResultCount:50000, |
|
|
|
}, |
|
|
|
clickQueryBtn:false, //是否点击过人员列表,未点击时,默认 无单位、体检日期 |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
@ -222,7 +226,7 @@ export default { |
|
|
|
btnAddPr(){ |
|
|
|
// debugger |
|
|
|
if(this.medicalStartDate){ |
|
|
|
this.formData = Object.assign({},this.formInitData,{medicalStartDate:this.medicalStartDate}) |
|
|
|
this.formData = Object.assign({},this.formInitData,{medicalStartDate:moment(this.medicalStartDate).format('yyyy-MM-DD')}) |
|
|
|
this.dialogVisible = true |
|
|
|
this.patientRegister.photo = '' |
|
|
|
setTimeout(() =>{ |
|
|
|
@ -240,16 +244,30 @@ export default { |
|
|
|
this.$message.warning("未选中要删除的人员记录") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
postapi(`/api/app/patient-register/delete-many`, {patientRegisterIds:[this.doctorCheck.prBase.id] |
|
|
|
}).then(res =>{ |
|
|
|
let id = this.doctorCheck.prBase.id |
|
|
|
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
cancelButtonText: "否", |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
//console.log('{patientRegisterIds}',{patientRegisterIds}) |
|
|
|
return postapi(`/api/app/patient-register/delete-many`, {patientRegisterIds:[id]}) |
|
|
|
}).then((res) => { |
|
|
|
if(res.code != -1){ |
|
|
|
this.$message.success("操作成功!") |
|
|
|
this.doctorCheckPrBaseInit(); |
|
|
|
let lfind = arrayExistObj(this.medicalStartDateDatas,'id',id) |
|
|
|
if(lfind > -1) this.medicalStartDateDatas.splice(lfind,1) |
|
|
|
} |
|
|
|
}).catch((err) => { |
|
|
|
if (err == "cancel") { |
|
|
|
this.$message.info("已取消删除"); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//人员编辑 |
|
|
|
btnEditPr() { |
|
|
|
if(!this.doctorCheck.prBase.id){ |
|
|
|
@ -265,6 +283,72 @@ export default { |
|
|
|
this.editTimes++; //触发表单窗口,数据更新 |
|
|
|
}, |
|
|
|
|
|
|
|
// 上一人 |
|
|
|
btnPrev(){ |
|
|
|
if(!this.medicalStartDate){ |
|
|
|
this.$message.warning("请先设置体检日期") |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.medicalStartDateDatas.length == 0) { |
|
|
|
this.$message.warning("当前设置的体检日期,无体检人员信息") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
let lfind = -1 |
|
|
|
if(this.doctorCheck.prBase.id){ |
|
|
|
lfind = arrayExistObj(this.medicalStartDateDatas,'id',this.doctorCheck.prBase.id) |
|
|
|
if(lfind == 0){ |
|
|
|
this.$message.warning("已是第一个人") |
|
|
|
return |
|
|
|
} |
|
|
|
if(lfind > - 1) lfind-- |
|
|
|
} |
|
|
|
|
|
|
|
// 未选中,未找到,显示第一人 |
|
|
|
if(lfind < 0){ |
|
|
|
if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){ |
|
|
|
this.findPR(this.medicalStartDateDatas[0]) |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){ |
|
|
|
this.findPR(this.medicalStartDateDatas[lfind]) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 下一人 |
|
|
|
btnNext(){ |
|
|
|
if(!this.medicalStartDate){ |
|
|
|
this.$message.warning("请先设置体检日期") |
|
|
|
return |
|
|
|
} |
|
|
|
if(this.medicalStartDateDatas.length == 0) { |
|
|
|
this.$message.warning("当前设置的体检日期,无体检人员信息") |
|
|
|
return |
|
|
|
} |
|
|
|
let lfind = 0 |
|
|
|
if(this.doctorCheck.prBase.id){ |
|
|
|
lfind = arrayExistObj(this.medicalStartDateDatas,'id',this.doctorCheck.prBase.id) |
|
|
|
lfind++ |
|
|
|
} |
|
|
|
|
|
|
|
// 未选中,未找到,显示第一人 |
|
|
|
if(this.medicalStartDateDatas.length > lfind){ |
|
|
|
this.findPR(this.medicalStartDateDatas[lfind]) |
|
|
|
}else{ |
|
|
|
this.$message.warning("已是最后一人") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//查询找到相关信息处理 |
|
|
|
findPR(rd){ |
|
|
|
this.doctorCheck.prBase = Object.assign({},this.doctorCheck.prBase,rd) |
|
|
|
this.patientRegister.photo = rd.photo |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//刷新或添加列表数据 |
|
|
|
refreshRegister(patientRegister){ |
|
|
|
@ -281,7 +365,7 @@ export default { |
|
|
|
if (this.doctorCheck.RegisterCheckEdit.isLock == 'Y') return '组合项目已锁定,不可执行此操作' |
|
|
|
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '2') return '组合项目已弃检,不可执行此操作' |
|
|
|
if (optType == 'save') { |
|
|
|
if (!this.doctorCheck.RegisterCheckEdit.checkDoctorId) return "请选择检查医生" |
|
|
|
// if (!this.doctorCheck.RegisterCheckEdit.checkDoctorId) return "请选择检查医生" |
|
|
|
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '1') return "该项目项目已保存,不可再执行此操作,如需操作请点【修改结果】" |
|
|
|
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!' |
|
|
|
} |
|
|
|
@ -301,11 +385,12 @@ export default { |
|
|
|
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作" |
|
|
|
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'N') return "该检查项目尚未审核,无需执行此操作" |
|
|
|
} |
|
|
|
if (optType == 'delItem') { |
|
|
|
if (optType == 'delItem' || optType == 'refuseItem' || optType == 'makeDiagnosis' ) { |
|
|
|
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '1') return "该项目项目已保存,不可再执行此操作,如需操作请点【修改结果】" |
|
|
|
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return "该检查项目已审核,请先取消审核" |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ret |
|
|
|
}, |
|
|
|
|
|
|
|
@ -313,7 +398,7 @@ export default { |
|
|
|
save() { |
|
|
|
let ret = this.optGrant('save') |
|
|
|
if (ret) { |
|
|
|
alert(ret) |
|
|
|
this.$message.warning(ret) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -327,14 +412,14 @@ export default { |
|
|
|
this.saveCheckSummary(); |
|
|
|
|
|
|
|
//更新建议 |
|
|
|
this.saveCheckSuggestion(); |
|
|
|
this.saveCheckSuggestion(true); |
|
|
|
}, |
|
|
|
|
|
|
|
//修改结果 |
|
|
|
edit() { |
|
|
|
let ret = this.optGrant('edit') |
|
|
|
if (ret) { |
|
|
|
alert(ret) |
|
|
|
this.$message.warning(ret) |
|
|
|
return |
|
|
|
} |
|
|
|
this.doctorCheck.RegisterCheckEdit.completeFlag = '0' |
|
|
|
@ -344,7 +429,7 @@ export default { |
|
|
|
del() { |
|
|
|
let ret = this.optGrant('del') |
|
|
|
if (ret) { |
|
|
|
alert(ret) |
|
|
|
this.$message.warning(ret) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -353,40 +438,90 @@ export default { |
|
|
|
console.log("del", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
this.doctorCheck.RegisterCheckEdit.completeFlag = '0'; |
|
|
|
let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList,'id',this.doctorCheck.RegisterCheckEdit.id) |
|
|
|
if(lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '0' |
|
|
|
|
|
|
|
this.$message.success("操作成功!"); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//删除明细项目 |
|
|
|
//放弃明细项目检查 |
|
|
|
refuseItem() { |
|
|
|
let ret = this.optGrant('refuseItem') |
|
|
|
if (ret) { |
|
|
|
this.$message.warning(ret) |
|
|
|
return |
|
|
|
} |
|
|
|
// console.log('this.doctorCheck.checkItem',this.doctorCheck.checkItem) |
|
|
|
if(!this.doctorCheck.checkItem){ |
|
|
|
this.$message.warning("请选择要操作的明细项目") |
|
|
|
return |
|
|
|
} |
|
|
|
if(!this.doctorCheck.checkItem.itemId){ |
|
|
|
this.$message.warning("请选择要操作的明细项目") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
let lfind = arrayExistObj(this.doctorCheck.checkItemList, 'itemId', this.doctorCheck.checkItem.itemId) |
|
|
|
if (lfind == -1) { |
|
|
|
this.$message.warning("请选择要操作的明细项目") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.doctorCheck.checkItemList[lfind].result = "放弃检查" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//删除明细项目 |
|
|
|
delItem() { |
|
|
|
let ret = this.optGrant('delItem') |
|
|
|
if (ret) { |
|
|
|
alert(ret) |
|
|
|
this.$message.warning(ret) |
|
|
|
return |
|
|
|
} |
|
|
|
let lfind = arrayExistObj(this.doctorCheck.CheckItemList, 'itemId', this.doctorCheck.checkItem.itemId) |
|
|
|
if (lfind == -1) return |
|
|
|
|
|
|
|
console.log(`/api/app/registercheckitem/deleteregistercheckitem?RegisterCheckId=${this.doctorCheck.checkItem.registerCheckId}&ItemId=${this.doctorCheck.checkItem.itemId}`) |
|
|
|
postapi(`/api/app/registercheckitem/deleteregistercheckitem?RegisterCheckId=${this.doctorCheck.checkItem.registerCheckId}&ItemId=${this.doctorCheck.checkItem.itemId}`) |
|
|
|
.then((res) => { |
|
|
|
console.log("delItem", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
this.doctorCheck.CheckItemList.splice(lfind, 1); |
|
|
|
this.doctorCheck.checkItem.itemId = '' |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
if(!this.doctorCheck.checkItem){ |
|
|
|
this.$message.warning("请选择要删除的明细项目") |
|
|
|
return |
|
|
|
} |
|
|
|
if(!this.doctorCheck.checkItem.itemId){ |
|
|
|
this.$message.warning("请选择要删除的明细项目") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
let lfind = arrayExistObj(this.doctorCheck.checkItemList, 'itemId', this.doctorCheck.checkItem.itemId) |
|
|
|
if (lfind == -1) { |
|
|
|
this.$message.warning("请选择要删除的明细项目") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
cancelButtonText: "否", |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
return postapi(`/api/app/registercheckitem/deleteregistercheckitem?RegisterCheckId=${this.doctorCheck.checkItem.registerCheckId}&ItemId=${this.doctorCheck.checkItem.itemId}`) |
|
|
|
}).then(res => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.doctorCheck.checkItemList.splice(lfind, 1); |
|
|
|
this.doctorCheck.checkItem.itemId = '' |
|
|
|
} |
|
|
|
}).catch((err) => { |
|
|
|
if (err == "cancel") { |
|
|
|
this.$message.info("已取消"); |
|
|
|
}else{ |
|
|
|
this.$message({ type: "error", message: `项目明细删除失败,原因:${err}` }); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//审核 |
|
|
|
audit() { |
|
|
|
let ret = this.optGrant('audit') |
|
|
|
if (ret) { |
|
|
|
alert(ret) |
|
|
|
this.$message.warning(ret) |
|
|
|
return |
|
|
|
} |
|
|
|
let body = { |
|
|
|
@ -413,7 +548,7 @@ export default { |
|
|
|
unAudit() { |
|
|
|
let ret = this.optGrant('unAudit') |
|
|
|
if (ret) { |
|
|
|
alert(ret) |
|
|
|
this.$message.warning(ret) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -431,17 +566,127 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 生成小结 |
|
|
|
btnMakeDiagnosis(){ |
|
|
|
let ret = this.optGrant('makeDiagnosis') |
|
|
|
if (ret) { |
|
|
|
this.$message.warning(ret) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
console.log('生成小结'); |
|
|
|
let back = false |
|
|
|
|
|
|
|
if(this.doctorCheck.checkSummaryList.length > 0){ |
|
|
|
this.$confirm("已经有小结,是否重新生成小结?", "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
cancelButtonText: "否", |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
back = false |
|
|
|
}).catch((err) => { |
|
|
|
if (err == "cancel") { |
|
|
|
this.$message.info("已取消"); |
|
|
|
back = true |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
if(back) return |
|
|
|
|
|
|
|
// /api/app/diagnosisfunction/getdiagnosisresult |
|
|
|
// { |
|
|
|
// "registerCheckId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "items": [ |
|
|
|
// { |
|
|
|
// "itemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "result": "string" |
|
|
|
// } |
|
|
|
// ] |
|
|
|
// } |
|
|
|
if(this.doctorCheck.checkItemList.length == 0){ |
|
|
|
this.$message.warning("系统错误,组合项目没有明细") |
|
|
|
return |
|
|
|
} |
|
|
|
let registerCheckId = this.doctorCheck.checkItemList |
|
|
|
let body = { |
|
|
|
registerCheckId:'', |
|
|
|
items:[] |
|
|
|
} |
|
|
|
|
|
|
|
this.doctorCheck.checkItemList.forEach((e,index) =>{ |
|
|
|
if(index == 0) body.registerCheckId = e.registerCheckId |
|
|
|
body.items.push({ |
|
|
|
itemId:e.itemId, |
|
|
|
result:e.result |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
console.log(`/api/app/diagnosisfunction/getdiagnosisresult`, body) |
|
|
|
this.doctorCheck.checkSummaryList = [] |
|
|
|
this.doctorCheck.checkSuggestionList = [] |
|
|
|
postapi(`/api/app/diagnosisfunction/getdiagnosisresult`, body) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
// console.log(res.data) |
|
|
|
// { |
|
|
|
// "diagnosisResultDetails": [ |
|
|
|
// { |
|
|
|
// "diagnosisResult": "超重" |
|
|
|
// } |
|
|
|
// ], |
|
|
|
// "diagnosisSuggestionDetails": [ |
|
|
|
// { |
|
|
|
// "diagnosisSuggestion": "定期复查" |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// "diagnosisSuggestion": "控制热量摄入,适当运动" |
|
|
|
// } |
|
|
|
// ] |
|
|
|
// } |
|
|
|
|
|
|
|
// 小结 |
|
|
|
res.data.diagnosisResultDetails.forEach(e =>{ |
|
|
|
this.doctorCheck.checkSummaryList.push({ |
|
|
|
id:Math.random(), |
|
|
|
registerCheckId:body.registerCheckId, |
|
|
|
summary:e.diagnosisResult, |
|
|
|
summaryFlag:'Y' |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
// 建议 |
|
|
|
res.data.diagnosisSuggestionDetails.forEach(e =>{ |
|
|
|
this.doctorCheck.checkSuggestionList.push({ |
|
|
|
id:Math.random(), |
|
|
|
registerCheckId:body.registerCheckId, |
|
|
|
suggestion:e.diagnosisSuggestion |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.$message.success("操作成功!") |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message({ type: "error", message: `生成小结失败,原因:${err}` }); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//总检 |
|
|
|
toSumDoctorCheck() { |
|
|
|
this.$router.push({ path: "/sumDoctorCheck" }); |
|
|
|
}, |
|
|
|
|
|
|
|
//更新检查项目与医生 |
|
|
|
updateDoctorCheck() { |
|
|
|
updateDoctorCheck(successTip) { |
|
|
|
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate||new Date(); |
|
|
|
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD'); //yyyy-MM-DD HH:mm:ss |
|
|
|
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId||window.sessionStorage.getItem("user"); |
|
|
|
|
|
|
|
let body = { |
|
|
|
registerCheckId: this.doctorCheck.RegisterCheckEdit.id, |
|
|
|
checkDoctorId: this.doctorCheck.RegisterCheckEdit.checkDoctorId, |
|
|
|
checkDate: this.doctorCheck.RegisterCheckEdit.checkDate |
|
|
|
checkDoctorId, |
|
|
|
checkDate |
|
|
|
} |
|
|
|
console.log(`/api/app/registercheck/updatecheckdoctor`, body) |
|
|
|
postapi(`/api/app/registercheck/updatecheckdoctor`, body) |
|
|
|
@ -449,6 +694,10 @@ export default { |
|
|
|
console.log("updateCheckItemList", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
this.doctorCheck.RegisterCheckEdit.completeFlag = '1'; |
|
|
|
//更新组合项目列表记录状态 |
|
|
|
let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList,'id',body.registerCheckId) |
|
|
|
if(lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '1' |
|
|
|
if(successTip) this.$message.success("操作成功!") |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
@ -458,15 +707,18 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//更新明细 |
|
|
|
updateCheckItemList() { |
|
|
|
updateCheckItemList(successTip) { |
|
|
|
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate||new Date(); |
|
|
|
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD'); //yyyy-MM-DD HH:mm:ss |
|
|
|
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId||window.sessionStorage.getItem("user"); |
|
|
|
let body = [] |
|
|
|
for (let i = 0; i < this.doctorCheck.checkItemList.length; i++) { |
|
|
|
body.push({ |
|
|
|
registerCheckId: this.doctorCheck.checkItemList[i].registerCheckId, |
|
|
|
itemId: this.doctorCheck.checkItemList[i].itemId, |
|
|
|
result: this.doctorCheck.checkItemList[i].result, |
|
|
|
checkDoctorName: this.doctorCheck.RegisterCheckEdit.checkDoctorId, |
|
|
|
checkDate: this.doctorCheck.RegisterCheckEdit.checkDate, |
|
|
|
checkDoctorName: checkDoctorId, |
|
|
|
checkDate, |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(`/api/app/registercheckitem/updateregistercheckitemmany`, body) |
|
|
|
@ -474,7 +726,7 @@ export default { |
|
|
|
.then((res) => { |
|
|
|
console.log("updateCheckItemList", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
// |
|
|
|
if(successTip) this.$message.success("操作成功!") |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
@ -483,22 +735,26 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//更新小结 |
|
|
|
saveCheckSummary() { |
|
|
|
let body = [] |
|
|
|
saveCheckSummary(successTip) { |
|
|
|
let details = [] |
|
|
|
this.doctorCheck.checkSummaryList.forEach(item => { |
|
|
|
body.push({ |
|
|
|
details.push({ |
|
|
|
registerCheckId: item.registerCheckId, |
|
|
|
summary: item.summary, |
|
|
|
summaryFlag: item.summaryFlag, |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
let body = { |
|
|
|
registerCheckId:this.doctorCheck.RegisterCheckEdit.id, |
|
|
|
details |
|
|
|
} |
|
|
|
|
|
|
|
console.log(`/api/app/registerchecksummary/createregisterchecksummarymany`, body) |
|
|
|
postapi(`/api/app/registerchecksummary/createregisterchecksummarymany`, body) |
|
|
|
.then((res) => { |
|
|
|
console.log("saveCheckSummary", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
//this.doctorCheck.RegisterCheckEdit.completeFlag = '1'; |
|
|
|
if(successTip) this.$message.success("操作成功!") |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
@ -508,21 +764,27 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//更新建议 |
|
|
|
saveCheckSuggestion() { |
|
|
|
let body = [] |
|
|
|
saveCheckSuggestion(successTip) { |
|
|
|
let details = [] |
|
|
|
this.doctorCheck.checkSuggestionList.forEach(item => { |
|
|
|
body.push({ |
|
|
|
details.push({ |
|
|
|
registerCheckId: item.registerCheckId, |
|
|
|
suggestion: item.suggestion |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
let body = { |
|
|
|
registerCheckId:this.doctorCheck.RegisterCheckEdit.id, |
|
|
|
details |
|
|
|
} |
|
|
|
|
|
|
|
console.log(`/api/app/registerchecksuggestion/createregisterchecksuggestionmany`, body) |
|
|
|
postapi(`/api/app/registerchecksuggestion/createregisterchecksuggestionmany`, body) |
|
|
|
.then((res) => { |
|
|
|
console.log("saveCheckSuggestion", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
//this.doctorCheck.RegisterCheckEdit.completeFlag = '1'; |
|
|
|
if(successTip) this.$message.success("操作成功!") |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
@ -533,7 +795,7 @@ export default { |
|
|
|
|
|
|
|
addSummary() { |
|
|
|
if (!this.doctorCheck.RegisterCheckEdit.id) { |
|
|
|
alert("请选择检查项目") |
|
|
|
this.$message.warning("请选择检查项目") |
|
|
|
return |
|
|
|
} |
|
|
|
this.doctorCheck.checkSummaryList.push({ |
|
|
|
@ -564,6 +826,32 @@ export default { |
|
|
|
this.getCustomerOrgGroup(newVal); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 设置体检日期 |
|
|
|
"medicalStartDate":{ |
|
|
|
immediate:true, |
|
|
|
handler(newVal,oldVal){ |
|
|
|
if(newVal){ |
|
|
|
let body = { |
|
|
|
customerOrgs: [ |
|
|
|
{ |
|
|
|
startDate: moment(this.medicalStartDate).format('yyyy-MM-DD'), |
|
|
|
endDate: moment(this.medicalStartDate).format('yyyy-MM-DD'), |
|
|
|
dateType: '2' //体检日期 |
|
|
|
} |
|
|
|
], |
|
|
|
maxResultCount: 1000 |
|
|
|
} |
|
|
|
|
|
|
|
postapi('/api/patientregister/getpeisrecordlist',body).then(res => { |
|
|
|
if(res.code != -1) this.medicalStartDateDatas = res.data.items |
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.medicalStartDateDatas = [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|