From 1b541ff43d8e139b5ce46be7be2535db299f7587 Mon Sep 17 00:00:00 2001
From: pengjun <158915633@qq.com>
Date: Sat, 20 Apr 2024 23:16:53 +0800
Subject: [PATCH] doctor
---
package.json | 2 +-
src/components/doctorCheck/ButtonList.vue | 4 +-
.../doctorCheck/PatientRegisterBase.vue | 6 +-
.../doctorCheck/PatientRegisterList.vue | 2 +-
.../doctorCheck/PatientRegisterListBak.vue | 2 +-
src/components/report/BtnReport.vue | 76 ++++-----
src/components/sumDoctorCheck/ButtonList.vue | 137 +++++++++------
src/components/sumDoctorCheck/SumPREdit.vue | 40 ++---
src/components/sumDoctorCheck/SumSug.vue | 159 ++++++++++++------
src/store/index.js | 2 +-
src/utlis/proFunc.js | 28 ---
src/views/doctorCheck/sumDoctorCheck.vue | 15 +-
12 files changed, 258 insertions(+), 215 deletions(-)
diff --git a/package.json b/package.json
index efad5c8..e07b6ae 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "demo",
+ "name": "peis",
"version": "0.1.0",
"private": true,
"scripts": {
diff --git a/src/components/doctorCheck/ButtonList.vue b/src/components/doctorCheck/ButtonList.vue
index b1dce80..b2dda16 100644
--- a/src/components/doctorCheck/ButtonList.vue
+++ b/src/components/doctorCheck/ButtonList.vue
@@ -532,7 +532,7 @@ export default {
let user = window.sessionStorage.getItem('user');
let toOutShell = {
ReportCode, token,
- preViewCanPrint: this.doctorCheck.prBase.isAudit, //this.sumDoctorCheck.sumPREdit.isAudit
+ preViewCanPrint: this.doctorCheck.prBase.isAudit, //this.dataTransOpts.tableS.patient_register.isAudit
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'LTS', Value: 'Y' }, //Y、N N只看不能打印
@@ -560,7 +560,7 @@ export default {
//总检
toSumDoctorCheck() {
- this.sumDoctorCheck.sumPREdit = Object.assign({},this.doctorCheck.prBase)
+ this.dataTransOpts.tableS.patient_register = Object.assign({},this.doctorCheck.prBase)
this.$router.push({ path: "/sumDoctorCheck" });
},
diff --git a/src/components/doctorCheck/PatientRegisterBase.vue b/src/components/doctorCheck/PatientRegisterBase.vue
index e168c6f..6165e28 100644
--- a/src/components/doctorCheck/PatientRegisterBase.vue
+++ b/src/components/doctorCheck/PatientRegisterBase.vue
@@ -181,8 +181,10 @@ export default {
this.dataTransOpts.tableS.patient_register = { id: '', patientRegisterNo }
postapi('/api/app/patientregister/GetAlreadyRegisterPatientRegisterByNo', body)
.then((res) => {
- if (res.code != -1) {
- if (res.data) this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
+ if (res.code > -1) {
+ this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
+ console.log('res.data',res.data)
+ console.log('this.dataTransOpts.tableS.patient_register',this.dataTransOpts.tableS.patient_register)
}
})
.finally(() => {
diff --git a/src/components/doctorCheck/PatientRegisterList.vue b/src/components/doctorCheck/PatientRegisterList.vue
index d326d98..5519bdd 100644
--- a/src/components/doctorCheck/PatientRegisterList.vue
+++ b/src/components/doctorCheck/PatientRegisterList.vue
@@ -324,7 +324,7 @@ export default {
this.patientRegister.photo = row.photo
this.sumPREditInit()
- objCopy(row, this.sumDoctorCheck.sumPREdit) //总检信息
+ objCopy(row, this.dataTransOpts.tableS.patient_register) //总检信息
},
diff --git a/src/components/doctorCheck/PatientRegisterListBak.vue b/src/components/doctorCheck/PatientRegisterListBak.vue
index a8a6cc1..242c786 100644
--- a/src/components/doctorCheck/PatientRegisterListBak.vue
+++ b/src/components/doctorCheck/PatientRegisterListBak.vue
@@ -251,7 +251,7 @@ export default {
objCopy(row, this.doctorCheck.prBase) //基本信息
this.sumPREditInit()
- objCopy(row, this.sumDoctorCheck.sumPREdit) //总检信息
+ objCopy(row, this.dataTransOpts.tableS.patient_register) //总检信息
},
ldddw(arrayData, key, value, display) {
diff --git a/src/components/report/BtnReport.vue b/src/components/report/BtnReport.vue
index 4e9d803..088d3b3 100644
--- a/src/components/report/BtnReport.vue
+++ b/src/components/report/BtnReport.vue
@@ -116,33 +116,33 @@ export default {
//操作判断
optGrant(optType) {
let ret = ''
- if (!this.sumDoctorCheck.sumPREdit.id) return '请选择体检人员'
- if (this.sumDoctorCheck.sumPREdit.isLock == 'Y') return '人员已锁定,不可执行此操作'
+ if (!this.dataTransOpts.tableS.patient_register.id) return '请选择体检人员'
+ if (this.dataTransOpts.tableS.patient_register.isLock == 'Y') return '人员已锁定,不可执行此操作'
if (optType == 'save') {
- //if (!this.sumDoctorCheck.sumPREdit.summaryDoctor) return "请选择总检医生"
- if (this.sumDoctorCheck.sumPREdit.completeFlag == '3') return "该人员已总检,不可再执行此操作,如需操作请点【修改】"
- if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
+ //if (!this.dataTransOpts.tableS.patient_register.summaryDoctor) return "请选择总检医生"
+ if (this.dataTransOpts.tableS.patient_register.completeFlag == '3') return "该人员已总检,不可再执行此操作,如需操作请点【修改】"
+ if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'edit') {
- if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
- if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
+ if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
+ if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'del') {
- if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
- if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
+ if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
+ if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'audit') {
- if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该检查项目尚未保存,不可执行此操作"
- if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return "该人员检查已审核,无需再执行此操作"
+ if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该检查项目尚未保存,不可执行此操作"
+ if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return "该人员检查已审核,无需再执行此操作"
}
if (optType == 'unAudit') {
- if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,不可执行此操作"
- if (this.sumDoctorCheck.sumPREdit.isAudit == 'N') return "该人员检查尚未审核,无需执行此操作"
+ if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员尚未总检,不可执行此操作"
+ if (this.dataTransOpts.tableS.patient_register.isAudit == 'N') return "该人员检查尚未审核,无需执行此操作"
}
if (optType == 'report') {
- if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员检查尚未总检,不可执行此操作"
- if (this.sumDoctorCheck.sumPREdit.isAudit == 'N') return "该人员检查尚未审核,不可执行此操作"
+ if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员检查尚未总检,不可执行此操作"
+ if (this.dataTransOpts.tableS.patient_register.isAudit == 'N') return "该人员检查尚未审核,不可执行此操作"
}
return ret
@@ -173,15 +173,15 @@ export default {
alert(ret)
return
}
- this.sumDoctorCheck.sumPREdit.completeFlag = '2'
+ this.dataTransOpts.tableS.patient_register.completeFlag = '2'
},
//取消结果
del() {
let body = {
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
- //summaryDoctor: this.sumDoctorCheck.sumPREdit.summaryDoctor,
- //summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
+ //summaryDoctor: this.dataTransOpts.tableS.patient_register.summaryDoctor,
+ //summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate,
completeFlag: '2'
}
console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
@@ -189,16 +189,16 @@ export default {
.then((res) => {
console.log("del", res.data);
if (res.code != -1) {
- this.sumDoctorCheck.sumPREdit.completeFlag = '2';
- console.log(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
- return postapi(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
+ this.dataTransOpts.tableS.patient_register.completeFlag = '2';
+ console.log(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
+ return postapi(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
}
})
.then((res) => {
console.log("deletesumsuggestionmany", res.data);
if (res.code != -1) {
- console.log(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
- return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
+ console.log(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
+ return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
}
})
.then((res) => {
@@ -220,7 +220,7 @@ export default {
return
}
let body = {
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
//auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditDate: "string" 不传时,取当前时间
isAudit: 'Y'
@@ -231,7 +231,7 @@ export default {
.then((res) => {
console.log("audit", res.data);
if (res.code != -1) {
- this.sumDoctorCheck.sumPREdit.isAudit = 'Y';
+ this.dataTransOpts.tableS.patient_register.isAudit = 'Y';
this.$message({ type: "success", message: `总检审核成功` });
}
})
@@ -249,7 +249,7 @@ export default {
}
let body = {
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
//auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditDate: "string" 不传时,取当前时间
isAudit: 'N'
@@ -260,7 +260,7 @@ export default {
.then((res) => {
console.log("unAudit", res.data);
if (res.code != -1) {
- this.sumDoctorCheck.sumPREdit.isAudit = 'N';
+ this.dataTransOpts.tableS.patient_register.isAudit = 'N';
this.$message({ type: "success", message: `取消总检审核成功` });
}
})
@@ -328,7 +328,7 @@ export default {
let id = String(new Date().getTime())
let pojo = {
id,
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
details: [
{
sumSuggestionHeaderId: id,
@@ -362,9 +362,9 @@ export default {
//更新总检
updateSumDoctorCheck() {
let body = {
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
- //summaryDoctor:this.sumDoctorCheck.sumPREdit.summaryDoctor,
- //summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
+ //summaryDoctor:this.dataTransOpts.tableS.patient_register.summaryDoctor,
+ //summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate,
completeFlag: '3'
}
console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
@@ -372,7 +372,7 @@ export default {
.then((res) => {
console.log("updateSumDoctorCheck", res.data);
if (res.code != -1) {
- this.sumDoctorCheck.sumPREdit.completeFlag = '3';
+ this.dataTransOpts.tableS.patient_register.completeFlag = '3';
this.$message({ type: "success", message: `总检保存成功!` });
}
})
@@ -403,7 +403,7 @@ export default {
.then((res) => {
console.log("saveSummary", res.data);
if (res.code != -1) {
- //this.sumDoctorCheck.sumPREdit.completeFlag = '1';
+ //this.dataTransOpts.tableS.patient_register.completeFlag = '1';
}
})
.catch((err) => {
@@ -433,7 +433,7 @@ export default {
.then((res) => {
console.log("saveSuggestion", res.data);
if (res.code != -1) {
- //this.sumDoctorCheck.sumPREdit.completeFlag = '1';
+ //this.dataTransOpts.tableS.patient_register.completeFlag = '1';
}
})
.catch((err) => {
@@ -443,17 +443,17 @@ export default {
},
addSummary() {
- if (!this.sumDoctorCheck.sumPREdit.id) {
+ if (!this.dataTransOpts.tableS.patient_register.id) {
alert("请选择检查项目")
return
}
this.doctorCheck.checkSummaryList.push({
- registerCheckId: this.sumDoctorCheck.sumPREdit.id,
+ registerCheckId: this.dataTransOpts.tableS.patient_register.id,
summary: '',
summaryFlag: 'N',
})
this.doctorCheck.checkSuggestionList.push({
- registerCheckId: this.sumDoctorCheck.sumPREdit.id,
+ registerCheckId: this.dataTransOpts.tableS.patient_register.id,
suggestion: '',
})
},
diff --git a/src/components/sumDoctorCheck/ButtonList.vue b/src/components/sumDoctorCheck/ButtonList.vue
index 4903ae0..82496a0 100644
--- a/src/components/sumDoctorCheck/ButtonList.vue
+++ b/src/components/sumDoctorCheck/ButtonList.vue
@@ -8,22 +8,22 @@
保存
+ :disabled="sumBtnDisabled('save')">保存
- 修改
+ 修改
- 取消总检
+ 取消总检
- 审核
+ 审核
- 取消审核
+ 取消审核
- 新增建议
+ 新增建议
- 体检报告
+ 体检报告
- 复查
+ 复查
- 干预措施
+ 干预措施
@@ -56,7 +56,7 @@
@@ -65,7 +65,7 @@
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
-import { getPagePriv, checkPagePriv, deepCopy, sumBtnDisabled } from "../../utlis/proFunc";
+import { getPagePriv, checkPagePriv, deepCopy } from "../../utlis/proFunc";
import PatientRegisterList from "../doctorCheck/PatientRegisterList.vue";
import SumDiagnosis from "./SumDiagnosis.vue";
@@ -105,6 +105,7 @@ export default {
computed: {
...mapState(["window", "dict", "dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck"]),
+
},
methods: {
@@ -122,14 +123,44 @@ export default {
//to医生诊台
toDoctorCheck() {
- // this.doctorCheck.prBase = Object.assign({},this.sumDoctorCheck.sumPREdit)
+ // this.doctorCheck.prBase = Object.assign({},this.dataTransOpts.tableS.patient_register)
// this.patientRegister.photo = this.doctorCheck.prBase.photo
this.$router.push({ path: "/doctorCheck" });
},
// 按钮可用
sumBtnDisabled(btnFlagName) {
- sumBtnDisabled(btnFlagName, this.dataTransOpts.tableS.patient_register)
+ let patientRegister = this.dataTransOpts.tableS.patient_register
+ let ret = true
+
+ //' 请选择体检人员'
+ if (!patientRegister.id) return ret
+ // '人员已锁定,不可执行此操作'
+ if (!patientRegister.isLock) return ret
+
+ switch (btnFlagName) {
+ case 'addSuggtion':
+ case 'save':
+ if (patientRegister.completeFlag && patientRegister.completeFlag != '3') ret = false
+ break;
+ case 'edit':
+ case 'del':
+ case 'audit':
+ if (patientRegister.completeFlag && patientRegister.completeFlag == '3' && patientRegister.isAudit != 'Y') ret = false
+ break;
+ case 'unAudit':
+ case 'reCheck':
+ case 'report':
+ if (patientRegister.completeFlag && patientRegister.completeFlag == '3' && patientRegister.isAudit && patientRegister.isAudit == 'Y') ret = false
+ break;
+ case 'intervene':
+ if (patientRegister.completeFlag && patientRegister.completeFlag == '3') ret = false
+ break;
+ default:
+ break;
+ }
+ console.log('sumBtnDisabled btnFlagName, patientRegister,ret', btnFlagName, patientRegister, ret)
+ return ret
},
//保存数据
@@ -142,33 +173,33 @@ export default {
// //更新建议与诊断
// this.saveSuggestion();
let body = {
- patientRegisterId:this.sumDoctorCheck.sumPREdit.id,
- summaryDoctorId:this.sumDoctorCheck.sumPREdit.summaryDoctorId,
- summaryDate:this.sumDoctorCheck.sumPREdit.summaryDate,
- sumSummarys:this.sumDoctorCheck.summaryList,
- sumSuggestions:this.sumDoctorCheck.suggestionList
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
+ summaryDoctorId: this.dataTransOpts.tableS.patient_register.summaryDoctorId,
+ summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate,
+ sumSummarys: this.sumDoctorCheck.summaryList,
+ sumSuggestions: this.sumDoctorCheck.suggestionList
}
postapi(`/api/app/patientregister/UpdatePatientRegisterSummarySuggestion`, body)
- .then((res) => {
+ .then((res) => {
if (res.code > -1) {
- this.sumDoctorCheck.sumPREdit.completeFlag = '3';
+ this.dataTransOpts.tableS.patient_register.completeFlag = '3';
}
})
},
//修改结果
btnEdit() {
- this.sumDoctorCheck.sumPREdit.completeFlag = '2'
+ this.dataTransOpts.tableS.patient_register.completeFlag = '2'
},
//取消总检
- btnDel() {
+ btnDel() {
// let body = {
- // patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
- // //summaryDoctor: this.sumDoctorCheck.sumPREdit.summaryDoctor,
- // //summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
+ // patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
+ // //summaryDoctor: this.dataTransOpts.tableS.patient_register.summaryDoctor,
+ // //summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate,
// completeFlag: '2'
// }
// console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
@@ -176,16 +207,16 @@ export default {
// .then((res) => {
// console.log("del", res.data);
// if (res.code != -1) {
- // this.sumDoctorCheck.sumPREdit.completeFlag = '2';
- // console.log(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
- // return postapi(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
+ // this.dataTransOpts.tableS.patient_register.completeFlag = '2';
+ // console.log(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
+ // return postapi(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
// }
// })
// .then((res) => {
// console.log("deletesumsuggestionmany", res.data);
// if (res.code != -1) {
- // console.log(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
- // return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
+ // console.log(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
+ // return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
// }
// })
// .then((res) => {
@@ -197,13 +228,13 @@ export default {
// .catch((err) => {
// this.$message({ type: "error", message: `取消总检失败,原因:${err}` });
// });
- let body={
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id
+ let body = {
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id
}
postapi(`/api/app/patientregister/CancelSumCheck`, body)
- .then((res) => {
+ .then((res) => {
if (res.code > -1) {
- this.sumDoctorCheck.sumPREdit.completeFlag = '2';
+ this.dataTransOpts.tableS.patient_register.completeFlag = '2';
}
})
},
@@ -212,7 +243,7 @@ export default {
audit() {
let body = {
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
//auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditDate: "string" 不传时,取当前时间
isAudit: 'Y'
@@ -223,7 +254,7 @@ export default {
.then((res) => {
console.log("audit", res.data);
if (res.code != -1) {
- this.sumDoctorCheck.sumPREdit.isAudit = 'Y';
+ this.dataTransOpts.tableS.patient_register.isAudit = 'Y';
this.$message({ type: "success", message: `总检审核成功` });
}
})
@@ -236,7 +267,7 @@ export default {
unAudit() {
let body = {
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
//auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditDate: "string" 不传时,取当前时间
isAudit: 'N'
@@ -247,7 +278,7 @@ export default {
.then((res) => {
console.log("unAudit", res.data);
if (res.code != -1) {
- this.sumDoctorCheck.sumPREdit.isAudit = 'N';
+ this.dataTransOpts.tableS.patient_register.isAudit = 'N';
this.$message({ type: "success", message: `取消总检审核成功` });
}
})
@@ -269,7 +300,7 @@ export default {
let user = window.sessionStorage.getItem('user');
let toOutShell = {
ReportCode, token,
- preViewCanPrint: this.sumDoctorCheck.sumPREdit.isAudit,
+ preViewCanPrint: this.dataTransOpts.tableS.patient_register.isAudit,
Parameters: [
{ Name: 'printer', Value: user },
{ Name: 'LTS', Value: 'Y' }, //Y、N N只看不能打印
@@ -281,7 +312,7 @@ export default {
};
- postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
+ postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = res.data;
@@ -300,25 +331,25 @@ export default {
let id = String(new Date().getTime())
let pojo = {
id,
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
diagnosisIds: [],
medicalInterpretations: [
{
- sumSuggestionHeaderId:id, // 拖拽用到
+ sumSuggestionHeaderId: id, // 拖拽用到
diagnosisId: '', // 关联诊断用到
suggestionContent: '',
}
],
commonReasons: [
{
- sumSuggestionHeaderId:id, // 拖拽用到
+ sumSuggestionHeaderId: id, // 拖拽用到
diagnosisId: '',
suggestionContent: '',
}
],
healthGuidances: [
{
- sumSuggestionHeaderId:id, // 拖拽用到
+ sumSuggestionHeaderId: id, // 拖拽用到
diagnosisId: '',
suggestionContent: '',
}
@@ -342,9 +373,9 @@ export default {
//更新总检
updateSumDoctorCheck() {
let body = {
- patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
- //summaryDoctor:this.sumDoctorCheck.sumPREdit.summaryDoctor,
- //summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
+ patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
+ //summaryDoctor:this.dataTransOpts.tableS.patient_register.summaryDoctor,
+ //summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate,
completeFlag: '3'
}
console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
@@ -352,7 +383,7 @@ export default {
.then((res) => {
console.log("updateSumDoctorCheck", res.data);
if (res.code != -1) {
- this.sumDoctorCheck.sumPREdit.completeFlag = '3';
+ this.dataTransOpts.tableS.patient_register.completeFlag = '3';
this.$message({ type: "success", message: `总检保存成功!` });
}
})
@@ -383,7 +414,7 @@ export default {
.then((res) => {
console.log("saveSummary", res.data);
if (res.code != -1) {
- //this.sumDoctorCheck.sumPREdit.completeFlag = '1';
+ //this.dataTransOpts.tableS.patient_register.completeFlag = '1';
}
})
.catch((err) => {
@@ -413,7 +444,7 @@ export default {
.then((res) => {
console.log("saveSuggestion", res.data);
if (res.code != -1) {
- //this.sumDoctorCheck.sumPREdit.completeFlag = '1';
+ //this.dataTransOpts.tableS.patient_register.completeFlag = '1';
}
})
.catch((err) => {
@@ -423,17 +454,17 @@ export default {
},
addSummary() {
- if (!this.sumDoctorCheck.sumPREdit.id) {
+ if (!this.dataTransOpts.tableS.patient_register.id) {
alert("请选择检查项目")
return
}
this.doctorCheck.checkSummaryList.push({
- registerCheckId: this.sumDoctorCheck.sumPREdit.id,
+ registerCheckId: this.dataTransOpts.tableS.patient_register.id,
summary: '',
summaryFlag: 'N',
})
this.doctorCheck.checkSuggestionList.push({
- registerCheckId: this.sumDoctorCheck.sumPREdit.id,
+ registerCheckId: this.dataTransOpts.tableS.patient_register.id,
suggestion: '',
})
},
diff --git a/src/components/sumDoctorCheck/SumPREdit.vue b/src/components/sumDoctorCheck/SumPREdit.vue
index ede9e62..6e0eab6 100644
--- a/src/components/sumDoctorCheck/SumPREdit.vue
+++ b/src/components/sumDoctorCheck/SumPREdit.vue
@@ -3,37 +3,37 @@
总检医生
-
总检日期
-
总检
-
+
审核医生
-
审核日期
-
审核
-
+
@@ -57,11 +57,10 @@ export default {
//挂载完成
mounted() {
this.dictInit()
- this.getPatientRegister(this.dataTransOpts.tableS.patient_register.id);
},
computed: {
- ...mapState(["dict", "dataTransOpts", "doctorCheck", "sumDoctorCheck"]),
+ ...mapState(["dict", "dataTransOpts"]),
},
methods: {
// 初始化字典数据
@@ -74,29 +73,10 @@ export default {
})
},
- // 获取体检登记信息(总检状态)
- getPatientRegister(patientRegisterId) {
- if (!patientRegisterId) {
- this.sumDoctorCheck.sumPREdit = {}
- return
- }
- postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${patientRegisterId}`)
- .then(res => {
- if (res.code != -1) this.sumDoctorCheck.sumPREdit = res.data
- })
-
- },
-
},
//监听事件
watch: {
- "dataTransOpts.refresh.sumDoctor.M": {
- // immediate:true,
- handler(newVal, oldVal) {
- console.log(`watch 总检状态 newVal: ${newVal}, oldVal: ${oldVal} patientRegisterId: ${this.dataTransOpts.tableS.patient_register.id}`);
- this.getPatientRegister(this.dataTransOpts.tableS.patient_register.id);
- }
- },
+
},
};
diff --git a/src/components/sumDoctorCheck/SumSug.vue b/src/components/sumDoctorCheck/SumSug.vue
index 5567074..244afa0 100644
--- a/src/components/sumDoctorCheck/SumSug.vue
+++ b/src/components/sumDoctorCheck/SumSug.vue
@@ -40,35 +40,35 @@
+ :disabled="sumBtnDisabled()">
+ :disabled="sumBtnDisabled()">
诊断
-
+ :disabled="sumBtnDisabled()" @change="changeDiagnosis" filterable>
+
+ :disabled="sumBtnDisabled()">
+ :disabled="sumBtnDisabled()">
+ :disabled="sumBtnDisabled()">
@@ -84,8 +84,7 @@
+ :disabled="sumBtnDisabled()" :autosize="{ minRows: 1, maxRows: 10 }">
@@ -93,8 +92,7 @@
@@ -112,8 +110,7 @@
+ :disabled="sumBtnDisabled()" :autosize="{ minRows: 1, maxRows: 10 }">
@@ -121,8 +118,7 @@
@@ -140,8 +136,7 @@
+ :disabled="sumBtnDisabled()" :autosize="{ minRows: 1, maxRows: 10 }">
@@ -149,8 +144,7 @@
@@ -178,8 +172,8 @@ export default {
privs: [] // 页面权限
},
sumDetails: [],
- suggestionCurRow:0, //当前操作建议的行
- diagnosises:[], // 诊断
+ suggestionCurRow: 0, //当前操作建议的行
+ diagnosises: [], // 诊断
};
},
@@ -237,8 +231,44 @@ export default {
})
},
+ // 获取人员是否已总检过
+ getHaveSumData(patientRegisterId) {
+ this.sumDoctorCheck.summaryList = [];
+ this.sumDoctorCheck.suggestionList = [];
+ if (!patientRegisterId) return
+
+ if (this.dataTransOpts.tableS.patient_register.completeFlag == '3') {
+ this.summaryList(patientRegisterId, 'Y')
+ this.suggestionList(patientRegisterId, 'Y')
+ return
+ }
+ postapi('/api/app/patientregister/GetHaveSumData', { patientRegisterId })
+ .then(async (res) => {
+ if (res.code > -1) {
+ let isGetExistData = res.data
+ if (res.data == 'Y') {
+ try {
+ await this.$confirm('检测到该人员已经生成过总检信息。', '确认信息', {
+ distinguishCancelAndClose: true,
+ confirmButtonText: '重新生成总检信息',
+ cancelButtonText: '获取上次总检信息'
+ })
+ isGetExistData = 'N'
+ } catch (error) {
+ //console.log()
+ }
+ }
+ this.summaryList(patientRegisterId, isGetExistData)
+ this.suggestionList(patientRegisterId, isGetExistData)
+ }
+ })
+ },
+
+
+
+
//获取综述
- summaryList(RegisterId) {
+ summaryList(RegisterId, isGetExistData) {
if (!RegisterId) {
this.sumDoctorCheck.summaryList = [];
return
@@ -247,7 +277,7 @@ export default {
// 旧接口: console.log(`/api/app/sumsummaryheader/getsumsummarylist?PatientRegisterId=${RegisterId}`)
let body = {
patientRegisterId: RegisterId,
- isGetExistData: 'Y',
+ isGetExistData,
}
postapi('/api/app/sumsummaryheader/getsumsummarylist', body)
.then((res) => {
@@ -282,7 +312,7 @@ export default {
},
//获取建议
- suggestionList(RegisterId) {
+ suggestionList(RegisterId, isGetExistData) {
if (!RegisterId) {
this.sumDoctorCheck.suggestionList = [];
return;
@@ -294,7 +324,7 @@ export default {
// }
let body = {
patientRegisterId: RegisterId,
- isGetExistData: 'Y',
+ isGetExistData,
}
// 旧接口: console.log(`/api/app/sumsuggestionheader/getsumsuggestionlist?PatientRegisterId=${RegisterId}`)
postapi('/api/app/sumsuggestionheader/getsumsuggestionlist', body)
@@ -331,11 +361,39 @@ export default {
});
},
+ // 按钮可用
+ sumBtnDisabled() {
+ let patientRegister = this.dataTransOpts.tableS.patient_register
+ let ret = true
+
+ //' 请选择体检人员'
+ if (!patientRegister.id) return ret
+ // '人员已锁定,不可执行此操作'
+ if (!patientRegister.isLock) return ret
+
+ if (patientRegister.completeFlag && patientRegister.completeFlag != '3') ret = false
+
+ return ret
+ },
+
+ // 可选诊断处理
+ disabledDiagnosis(diagnosisId, index) {
+ let ret = false
+ let diagnosisIds = []
+ this.sumDoctorCheck.suggestionList.forEach((e, i) => {
+ if (i != index) {
+ if (e.diagnosisIds) diagnosisIds = diagnosisIds.concat(e.diagnosisIds)
+ }
+ });
+ if (diagnosisIds.indexOf(diagnosisId) > -1) ret = true
+ return ret
+ },
+
// 诊断选择
- changeDiagnosis(v){
- console.log('changeDiagnosis',v)
+ changeDiagnosis(v) {
+ console.log('changeDiagnosis', v)
let suggestionTitle = []
- if(v.length == 0){
+ if (v.length == 0) {
this.sumDoctorCheck.suggestionList[this.suggestionCurRow]['suggestionTitle'] = ''
return
}
@@ -345,24 +403,24 @@ export default {
suggestionList.forEach(e => {
e.diagnosisIds = `${e.diagnosisIds}`
});
- let lfind = arrayExistObj(suggestionList,'diagnosisIds',lv)
- if(lfind == -1) return
+ let lfind = arrayExistObj(suggestionList, 'diagnosisIds', lv)
+ if (lfind == -1) return
this.suggestionCurRow = lfind
let sumSuggestionHeaderId = this.sumDoctorCheck.suggestionList[lfind].id
v.forEach(e => {
- let ld = arrayExistObj(this.diagnosises,'id',e)
- if(ld > -1){
+ let ld = arrayExistObj(this.diagnosises, 'id', e)
+ if (ld > -1) {
suggestionTitle.push(this.diagnosises[ld]["displayName"])
//添加医学解释
let medicalInterpretations = this.diagnosises[ld]['medicalInterpretations']
- if(medicalInterpretations){
- if(!this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations']) this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations'] = []
+ if (medicalInterpretations) {
+ if (!this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations']) this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations'] = []
medicalInterpretations.forEach(e2 => {
- let lf = arrayExistObj(this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations'],"suggestionContent",e2.suggestionContent)
- if(lf == -1){
+ let lf = arrayExistObj(this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations'], "suggestionContent", e2.suggestionContent)
+ if (lf == -1) {
this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations'].push({
sumSuggestionHeaderId,
- suggestionContent:e2.suggestionContent,
+ suggestionContent: e2.suggestionContent,
displayOrder: Math.random(),
})
}
@@ -371,14 +429,14 @@ export default {
//添加常见原因
let commonReasons = this.diagnosises[ld]['commonReasons']
- if(commonReasons){
- if(!this.sumDoctorCheck.suggestionList[lfind]['commonReasons']) this.sumDoctorCheck.suggestionList[lfind]['commonReasons'] = []
+ if (commonReasons) {
+ if (!this.sumDoctorCheck.suggestionList[lfind]['commonReasons']) this.sumDoctorCheck.suggestionList[lfind]['commonReasons'] = []
commonReasons.forEach(e2 => {
- let lf = arrayExistObj(this.sumDoctorCheck.suggestionList[lfind]['commonReasons'],"suggestionContent",e2.suggestionContent)
- if(lf == -1){
+ let lf = arrayExistObj(this.sumDoctorCheck.suggestionList[lfind]['commonReasons'], "suggestionContent", e2.suggestionContent)
+ if (lf == -1) {
this.sumDoctorCheck.suggestionList[lfind]['commonReasons'].push({
sumSuggestionHeaderId,
- suggestionContent:e2.suggestionContent,
+ suggestionContent: e2.suggestionContent,
displayOrder: Math.random(),
})
}
@@ -387,14 +445,14 @@ export default {
//添加常见原因
let healthGuidances = this.diagnosises[ld]['healthGuidances']
- if(healthGuidances){
- if(!this.sumDoctorCheck.suggestionList[lfind]['healthGuidances']) this.sumDoctorCheck.suggestionList[lfind]['healthGuidances'] = []
+ if (healthGuidances) {
+ if (!this.sumDoctorCheck.suggestionList[lfind]['healthGuidances']) this.sumDoctorCheck.suggestionList[lfind]['healthGuidances'] = []
healthGuidances.forEach(e2 => {
- let lf = arrayExistObj(this.sumDoctorCheck.suggestionList[lfind]['healthGuidances'],"suggestionContent",e2.suggestionContent)
- if(lf == -1){
+ let lf = arrayExistObj(this.sumDoctorCheck.suggestionList[lfind]['healthGuidances'], "suggestionContent", e2.suggestionContent)
+ if (lf == -1) {
this.sumDoctorCheck.suggestionList[lfind]['healthGuidances'].push({
sumSuggestionHeaderId,
- suggestionContent:e2.suggestionContent,
+ suggestionContent: e2.suggestionContent,
displayOrder: Math.random(),
})
}
@@ -404,7 +462,7 @@ export default {
});
this.sumDoctorCheck.suggestionList[this.suggestionCurRow]['suggestionTitle'] = `${suggestionTitle}`
},
-
+
//增加建议明细
addSug(index, contentType) {
this.suggestionCurRow = index
@@ -608,8 +666,7 @@ export default {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 总检--综述建议 newVal: ${newVal}, oldVal: ${oldVal} patientRegisterId: ${this.dataTransOpts.tableS.patient_register.id}`);
- this.summaryList(this.dataTransOpts.tableS.patient_register.id)
- this.suggestionList(this.dataTransOpts.tableS.patient_register.id)
+ this.getHaveSumData(this.dataTransOpts.tableS.patient_register.id)
}
},
diff --git a/src/store/index.js b/src/store/index.js
index 91b52dc..945b661 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -424,7 +424,7 @@ export default new Vuex.Store({
},
sumPREditInit(state) {
- state.sumDoctorCheck.sumPREdit = {
+ state.dataTransOpts.tableS.patient_register = {
id: '', //体检登记ID
completeFlag: '', //完成状态
summaryDoctor: '', //总检医生
diff --git a/src/utlis/proFunc.js b/src/utlis/proFunc.js
index 5a5494a..123e1ba 100644
--- a/src/utlis/proFunc.js
+++ b/src/utlis/proFunc.js
@@ -350,34 +350,6 @@ const setData = (obj, item, v) => {
}
exports.setData = setData;
-// 总检界面 按钮 可用控制
-const sumBtnDisabled = (btnFlagName, patientRegister) => {
- let ret = false
- //' 请选择体检人员'
- if (!patientRegister.id) return true
- // '人员已锁定,不可执行此操作'
- if (!patientRegister.isLock) return true
-
- switch (btnFlagName) {
- case 'save':
- if (patientRegister.completeFlag == '3') ret = true
- break;
- case 'edit':
- case 'del':
- case 'audit':
- if (patientRegister.completeFlag != '3' || patientRegister.isAudit == 'Y') ret = true
- break;
- case 'unAudit':
- case 'report':
- if (patientRegister.completeFlag != '3' || patientRegister.isAudit == 'N') ret = true
- break;
- default:
- break;
- }
- console.log('sumBtnDisabled btnFlagName, patientRegister,ret',btnFlagName, patientRegister,ret)
- return ret
-}
-exports.sumBtnDisabled = sumBtnDisabled;
diff --git a/src/views/doctorCheck/sumDoctorCheck.vue b/src/views/doctorCheck/sumDoctorCheck.vue
index b27ef43..dc16a70 100644
--- a/src/views/doctorCheck/sumDoctorCheck.vue
+++ b/src/views/doctorCheck/sumDoctorCheck.vue
@@ -15,12 +15,12 @@
-
+
-
+
-
+
-
+
@@ -101,6 +101,7 @@ export default {
...mapState([
"window",
"dict",
+ "dataTransOpts",
"patientRegister",
"customerOrg",
"sumDoctorCheck",