From fe656504b7144eefa755df5b9cfe67c5094deca3 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Wed, 20 Dec 2023 17:58:40 +0800 Subject: [PATCH] doctor --- src/components/doctorCheck/ButtonList.vue | 394 ++---------------- src/components/doctorCheck/CheckItemList.vue | 4 +- src/components/doctorCheck/CheckPicture.vue | 181 +++++++- src/components/doctorCheck/CheckSumSug.vue | 67 ++- .../doctorCheck/PatientRegisterList.vue | 30 +- src/components/sumDoctorCheck/ButtonList.vue | 2 +- src/views/doctorCheck/doctorCheck.vue | 366 +++++++++++++++- 7 files changed, 646 insertions(+), 398 deletions(-) diff --git a/src/components/doctorCheck/ButtonList.vue b/src/components/doctorCheck/ButtonList.vue index 5838b5a..bdcbdec 100644 --- a/src/components/doctorCheck/ButtonList.vue +++ b/src/components/doctorCheck/ButtonList.vue @@ -21,9 +21,11 @@
下一人
+
修改结果
@@ -36,39 +38,49 @@
删除明细项目
+
+ 取消审核 +
历次结果
体检报告
-
- 生成小结 -
总检
+ + + + +
+ + + +
+ + + { - console.log("audit", res.data); - if (res.code != -1) { - this.doctorCheck.RegisterCheckEdit.isAudit = 'Y'; - this.$message({ type: "success", message: `组合项目审核成功` }); - } - }) - .catch((err) => { - this.$message({ type: "error", message: `组合项目审核失败,原因:${err}` }); - }); - }, - - //取消审核 - unAudit() { - let ret = this.optGrant('unAudit') - if (ret) { - this.$message.warning(ret) - return - } - - console.log(`/api/app/registercheck/updateisaudit?RegisterCheckId=${this.doctorCheck.RegisterCheckEdit.id}&IsAudit=N`) - postapi(`/api/app/registercheck/updateisaudit?RegisterCheckId=${this.doctorCheck.RegisterCheckEdit.id}&IsAudit=N`) - .then((res) => { - console.log("unAudit", res.data); - if (res.code != -1) { - this.doctorCheck.RegisterCheckEdit.isAudit = 'N'; - this.$message({ type: "success", message: `组合项目取消审核成功` }); - } - }) - .catch((err) => { - this.$message({ type: "error", message: `组合项目取消审核失败,原因:${err}` }); - }); - }, - - // 生成小结 - 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.sumDoctorCheck.sumPREdit = Object.assign({},this.doctorCheck.prBase) this.$router.push({ path: "/sumDoctorCheck" }); }, - - //更新检查项目与医生 - 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, - checkDate - } - console.log(`/api/app/registercheck/updatecheckdoctor`, body) - postapi(`/api/app/registercheck/updatecheckdoctor`, body) - .then((res) => { - 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) => { - this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` }); - }); - - }, - - //更新明细 - 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: checkDoctorId, - checkDate, - }) - } - console.log(`/api/app/registercheckitem/updateregistercheckitemmany`, body) - postapi(`/api/app/registercheckitem/updateregistercheckitemmany`, body) - .then((res) => { - console.log("updateCheckItemList", res.data); - if (res.code != -1) { - if(successTip) this.$message.success("操作成功!") - } - }) - .catch((err) => { - this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` }); - }); - }, - - //更新小结 - saveCheckSummary(successTip) { - let details = [] - this.doctorCheck.checkSummaryList.forEach(item => { - 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) { - if(successTip) this.$message.success("操作成功!") - } - }) - .catch((err) => { - this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` }); - }); - - }, - - //更新建议 - saveCheckSuggestion(successTip) { - let details = [] - this.doctorCheck.checkSuggestionList.forEach(item => { - 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) => { - this.$message({ type: "error", message: `项目明细保存失败,原因:${err}` }); - }); - - }, - - addSummary() { - if (!this.doctorCheck.RegisterCheckEdit.id) { - this.$message.warning("请选择检查项目") - return - } - this.doctorCheck.checkSummaryList.push({ - id:Math.random(), - registerCheckId: this.doctorCheck.RegisterCheckEdit.id, - summary: '', - summaryFlag: 'N', - }) - this.doctorCheck.checkSuggestionList.push({ - id:Math.random(), - registerCheckId: this.doctorCheck.RegisterCheckEdit.id, - suggestion: '', - }) - }, + }, //监听事件() @@ -863,6 +535,6 @@ export default { margin-top: 1px; width: 100px; height: 26px; - padding: 5px 5px; /*原始 默认值 500 */ + padding: 5px 5px; /*原始 默认值 10px 10px */ } \ No newline at end of file diff --git a/src/components/doctorCheck/CheckItemList.vue b/src/components/doctorCheck/CheckItemList.vue index 7c9f6b3..7490462 100644 --- a/src/components/doctorCheck/CheckItemList.vue +++ b/src/components/doctorCheck/CheckItemList.vue @@ -19,11 +19,11 @@ style="width: 480px" class="inline-input" type="textarea" - v-model="doctorCheck.checkItemList[scope.$index].result" + v-model="scope.row.result" :fetch-suggestions="querySearch" placeholder="请输入结果值" @select="handleSelect" - :disabled=" + :disabled=" scope.row.isCalculationItem == 'Y' || doctorCheck.RegisterCheckEdit.completeFlag == '1' || doctorCheck.RegisterCheckEdit.completeFlag == '2' " diff --git a/src/components/doctorCheck/CheckPicture.vue b/src/components/doctorCheck/CheckPicture.vue index 03d4405..bf8c23d 100644 --- a/src/components/doctorCheck/CheckPicture.vue +++ b/src/components/doctorCheck/CheckPicture.vue @@ -1,13 +1,41 @@