Browse Source

report

master
pengjun 2 years ago
parent
commit
434dd0f2ac
  1. 6
      src/components/doctorCheck/RegisterCheckList.vue
  2. 345
      src/components/report/BtnReport.vue
  3. 26
      src/components/report/PatientRegisterListNobtn.vue
  4. 5
      src/components/report/PatientRegisterQueryNobtn.vue
  5. 24
      src/components/report/RegisterCheckStatus.vue
  6. 7
      src/components/sumDoctorCheck/SumAsbItemStatus.vue
  7. 34
      src/views/report/report.vue

6
src/components/doctorCheck/RegisterCheckList.vue

@ -39,7 +39,9 @@ export default {
created() {},
//
mounted() {},
mounted() {
this.registerCheckList(this.dataTransOpts.tableS.patient_register.id)
},
computed:{
...mapState(['window','dataTransOpts','dict','doctorCheck']),
@ -118,7 +120,7 @@ export default {
watch: {
//
"dataTransOpts.refresh.register_check.M":{
immediate:true,
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`);
this.registerCheckList(this.dataTransOpts.tableS.patient_register.id)

345
src/components/report/BtnReport.vue

@ -10,7 +10,7 @@
<el-button type="primary" class="commonbutton" @click="btnReport(false)">打印报告</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="commonbutton" @click="edit">领用报告</el-button>
<el-button type="primary" class="commonbutton" @click="btnGetReport">领用报告</el-button>
</div>
</div>
</template>
@ -36,39 +36,18 @@ export default {
//
mounted() {
this.dataTransOpts.tableS.patient_register.id = ''
this.getPatientRegister(this.dataTransOpts.tableS.patient_register.patientRegisterNo)
},
computed: {
...mapState(["dict", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]),
...mapState(["dict", "dataTransOpts", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]),
},
methods: {
btnQuery() {
let body = {}, customerOrgs = [];
// {
// "customerOrgs": [
// {
// "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgGroupId": [
// "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// ],
// "dateType": "string",
// "startDate": "string",
// "endDate": "string"
// }
// ],
// "patientRegisterNo": "string",
// "patientNo": "string",
// "patientName": "string",
// "phone": "string",
// "completeFlag": "string",
// "isAudit": "string",
// "isReportPrint": "string",
// "medicalTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "personnelTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
if (this.report.dataCusOrgOCX.length > 0) {
this.report.dataCusOrgOCX.forEach(e => {
let rd = {
@ -108,175 +87,23 @@ export default {
}
})
},
//to
toDoctorCheck() {
this.$router.push({ path: "/doctorCheck" });
},
//
optGrant(optType) {
let ret = ''
if (!this.dataTransOpts.tableS.patient_register.id) return '请选择体检人员'
if (this.dataTransOpts.tableS.patient_register.isLock == 'Y') return '人员已锁定,不可执行此操作'
if (optType == 'save') {
//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.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'del') {
if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'audit') {
if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该检查项目尚未保存,不可执行此操作"
if (this.dataTransOpts.tableS.patient_register.isAudit == 'Y') return "该人员检查已审核,无需再执行此操作"
}
if (optType == 'unAudit') {
if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员尚未总检,不可执行此操作"
if (this.dataTransOpts.tableS.patient_register.isAudit == 'N') return "该人员检查尚未审核,无需执行此操作"
}
if (optType == 'report') {
if (this.dataTransOpts.tableS.patient_register.completeFlag != '3') return "该人员检查尚未总检,不可执行此操作"
if (this.dataTransOpts.tableS.patient_register.isAudit == 'N') return "该人员检查尚未审核,不可执行此操作"
}
return ret
},
//
save() {
let ret = this.optGrant('save')
if (ret) {
alert(ret)
//
btnGetReport() {
if (!this.dataTransOpts.tableS.patient_register.id) {
this.$message.warning("请先选择记录!")
return
}
//
this.updateSumDoctorCheck();
//
this.saveSummary();
//
this.saveSuggestion();
},
//
edit() {
let ret = this.optGrant('edit')
if (ret) {
alert(ret)
return
}
this.dataTransOpts.tableS.patient_register.completeFlag = '2'
},
//
del() {
let body = {
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)
postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
.then((res) => {
console.log("del", res.data);
if (res.code != -1) {
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.dataTransOpts.tableS.patient_register.id}`)
return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`)
}
})
.then((res) => {
console.log("deletesumsuggestionmany", res.data);
if (res.code != -1) {
this.$message({ type: "success", message: `取消总检成功!` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `取消总检失败,原因:${err}` });
});
},
//
audit() {
let ret = this.optGrant('audit')
if (ret) {
alert(ret)
return
}
let body = {
patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
//auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditDate: "string"
isAudit: 'Y'
}
console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
.then((res) => {
console.log("audit", res.data);
if (res.code != -1) {
this.dataTransOpts.tableS.patient_register.isAudit = 'Y';
this.$message({ type: "success", message: `总检审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `总检审核失败,原因:${err}` });
});
},
//
unAudit() {
let ret = this.optGrant('unAudit')
if (ret) {
alert(ret)
return
}
let body = {
patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
//auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditDate: "string"
isAudit: 'N'
}
console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
.then((res) => {
console.log("unAudit", res.data);
if (res.code != -1) {
this.dataTransOpts.tableS.patient_register.isAudit = 'N';
this.$message({ type: "success", message: `取消总检审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `取消总检审核失败,原因:${err}` });
});
},
//
async btnReport(isPreview) {
// let ret = this.optGrant('report')
// if (ret) {
// alert(ret)
// return
// }
if(!this.patientRegister.patientRegisterId){
if (!this.dataTransOpts.tableS.patient_register.id) {
this.$message.warning("请先选择记录!")
return
}
@ -323,154 +150,28 @@ export default {
},
//
addSuggtion() {
let id = String(new Date().getTime())
let pojo = {
id,
patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
details: [
{
sumSuggestionHeaderId: id,
suggestionContent: '',
}
]
}
this.sumDoctorCheck.suggestionList.push(pojo);
},
//
reCheck() {
console.log("parseID('123456198007240000')", parseID('123456198007240000'))
let ret = this.optGrant('reCheck')
if (ret) {
alert(ret)
return
}
},
//
intervene() {
let ret = this.optGrant('intervene')
if (ret) {
alert(ret)
return
}
},
//
updateSumDoctorCheck() {
let body = {
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)
postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
.then((res) => {
console.log("updateSumDoctorCheck", res.data);
if (res.code != -1) {
this.dataTransOpts.tableS.patient_register.completeFlag = '3';
this.$message({ type: "success", message: `总检保存成功!` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `总检保存失败,原因:${err}` });
});
},
//
saveSummary() {
let body = []
this.sumDoctorCheck.summaryList.forEach(item => {
delete item.id;
delete item.summaryFlag;
delete item.displayOrder;
item.details.forEach(e => {
delete e.sumSummaryHeaderId;
delete e.displayOrder;
})
body.push(item)
});
console.log(`/api/app/sumsummaryheader/createsumsummary`, body)
if (body.length < 1) return
postapi(`/api/app/sumsummaryheader/createsumsummary`, body)
.then((res) => {
console.log("saveSummary", res.data);
if (res.code != -1) {
//this.dataTransOpts.tableS.patient_register.completeFlag = '1';
}
})
.catch((err) => {
this.$message({ type: "error", message: `综述保存失败,原因:${err}` });
});
},
//
saveSuggestion() {
let body = []
this.sumDoctorCheck.suggestionList.forEach(item => {
delete item.id;
delete item.suggestionFlag;
delete item.displayOrder;
item.details.forEach(e => {
delete e.sumSuggestionHeaderId;
delete e.displayOrder;
})
body.push(item)
});
console.log(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
if (body.length < 1) return
postapi(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
//
getPatientRegister(patientRegisterNo) {
if (!patientRegisterNo) return
postapi('/api/app/patientregister/GetAlreadyRegisterPatientRegisterByNo', { patientRegisterNo })
.then((res) => {
console.log("saveSuggestion", res.data);
if (res.code != -1) {
//this.dataTransOpts.tableS.patient_register.completeFlag = '1';
if (res.code > -1) {
this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
}
})
.catch((err) => {
this.$message({ type: "error", message: `建议保存失败,原因:${err}` });
});
},
addSummary() {
if (!this.dataTransOpts.tableS.patient_register.id) {
alert("请选择检查项目")
return
}
this.doctorCheck.checkSummaryList.push({
registerCheckId: this.dataTransOpts.tableS.patient_register.id,
summary: '',
summaryFlag: 'N',
})
this.doctorCheck.checkSuggestionList.push({
registerCheckId: this.dataTransOpts.tableS.patient_register.id,
suggestion: '',
})
},
},
//()
watch: {
//1
"patientRegister.query.CustomerOrgParentId"(newVal, oldVal) {
console.log(
"watch patientRegister.query.CustomerOrgParentId newVal:",
newVal,
" oldVal:",
oldVal
);
if (newVal != oldVal && newVal !== this.dict.personOrgId) {
this.getCustomerOrgGroup(newVal);
//
"dataTransOpts.refresh.patient_register.S": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.patientRegisterNo}`);
this.getPatientRegister(this.dataTransOpts.tableS.patient_register.patientRegisterNo)
// this.dataTransOpts.refresh.register_check.M++
}
},
},

26
src/components/report/PatientRegisterListNobtn.vue

@ -1,8 +1,9 @@
<template>
<div>
<div @contextmenu.prevent="onContextmenu">
<el-table :data="patientRegister.prList" border :height="(window.pageHeight < 600) ? 290:(window.pageHeight - 350)" highlight-current-row
@row-click="rowick" size="small" @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick">
<el-table :data="patientRegister.prList" border :height="(window.pageHeight < 600) ? 290 : (window.pageHeight - 350)"
highlight-current-row @row-click="rowClick" size="small" @selection-change="handleSelectionChange"
@cell-contextmenu="onCellRightClick">
<el-table-column type="selection" width="40" align="center" />
<el-table-column prop="completeFlag" label="体检进度">
<template slot-scope="scope">
@ -165,7 +166,7 @@
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import { dddw, deepCopy, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import Camera from "../../components/patientRegister/Camera.vue";
@ -219,7 +220,7 @@ export default {
this.quickAsb = this.dict.asbItemAll;
},
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
...mapState(["window", "dict", 'dataTransOpts', "patientRegister", "customerOrg"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
@ -317,11 +318,15 @@ export default {
},
//
rowick(row) {
this.patientRegister.patientRegisterId = row.patientRegisterId;
this.patientRegister.patientRegisterRd = row
console.log('this.patientRegister.patientRegisterId',this.patientRegister.patientRegisterId)
rowClick(row) {
this.dataTransOpts.tableS.patient_register = deepCopy(row)
this.dataTransOpts.tableS.patient_register.id = row.patientRegisterId
//
this.dataTransOpts.refresh.patient_register.S++
//
this.dataTransOpts.refresh.sumDoctor.M++
//
this.dataTransOpts.refresh.register_check.M++
},
@ -1019,4 +1024,5 @@ export default {
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
margin: 0 !important;
}</style>
}
</style>

5
src/components/report/PatientRegisterQueryNobtn.vue

@ -28,7 +28,7 @@
<span>检查状态</span>
<el-select v-model="patientRegister.query.completeFlag" placeholder="请选择" clearable style="width: 80px"
size="small">
<el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName" :value="item.id">
<el-option v-for="item in dict.completeFlag.filter(e => {return e.id != '0'})" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</div>
@ -162,6 +162,9 @@ export default {
::v-deep .el-input-group__append{
padding: 0 5px; /* 控件默认 0 20px;*/
}
::v-deep .el-icon-search:before {
color: #00F;
}
.query {
margin-left: 10px;
font-size: 14px;

24
src/components/report/RegisterCheckStatus.vue

@ -43,13 +43,11 @@ export default {
//
mounted() {
if (this.patientRegisterId) {
this.registerCheckList(this.patientRegisterId);
}
this.registerCheckList(this.dataTransOpts.tableS.patient_register.id)
},
computed: {
...mapState(["window", "dict", "doctorCheck"]),
...mapState(["window", "dict", "dataTransOpts", "doctorCheck"]),
},
methods: {
moment, dddw,
@ -68,11 +66,13 @@ export default {
//
registerCheckList(patientRegisterId) {
this.doctorCheck.RegisterCheckList = []
if (!patientRegisterId) return
console.log(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
getapi(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
.then((res) => {
console.log("registerCheckList", res.data);
if (res.code != -1) {
if (res.code > -1) {
this.doctorCheck.RegisterCheckList = res.data;
}
})
@ -84,15 +84,15 @@ export default {
watch: {
//ID
"patientRegisterId"(newVal, oldVal) {
console.log("watch patientRegisterId newVal:", newVal, " oldVal:", oldVal);
if (newVal != oldVal && newVal != '') {
this.registerCheckList(newVal);
//
"dataTransOpts.refresh.register_check.M": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`);
this.registerCheckList(this.dataTransOpts.tableS.patient_register.id)
}
},
}
};
</script>
<style scoped>
</style>
<style scoped></style>

7
src/components/sumDoctorCheck/SumAsbItemStatus.vue

@ -67,17 +67,14 @@ export default {
},
methods: {
getSumAsbItemStatus(PatientRegisterId) {
if (!PatientRegisterId) {
this.data.unCheckedAsbitem = [];
this.data.giveUpAsbitem = [];
this.data.checkedNullValueItem = [];
this.data.checkedGiveUpItem = [];
return
}
if (!PatientRegisterId) return
getapi(`/api/app/patientregister/getpatientregisteritemstatus?PatientRegisterId=${PatientRegisterId}`).then(res => {
if (res.code != -1) {
if (res.code > -1) {
this.data.unCheckedAsbitem = res.data.unCheckedAsbitem;
this.data.giveUpAsbitem = res.data.giveUpAsbitem;
this.data.checkedNullValueItem = res.data.checkedNullValueItem;

34
src/views/report/report.vue

@ -4,43 +4,27 @@
<div class="middlebox">
<div class="contenttitle">
体检查询 /
<span class="contenttitleBold"
>体检报告</span
>
<span class="contenttitleBold">体检报告</span>
</div>
</div>
<div style="display: flex;margin-top:7px">
<div
:style="
'display: block; width:' + (window.pageWidth - 110 - 10) + 'px;'
"
>
<div :style="'display: block; width:' + (window.pageWidth - 110 - 10) + 'px;'">
<PatientRegisterQueryNobtn orgEnable="Y" />
<div style="display: flex">
<div
:style="
'background-color: #fff;padding: 10px;border-radius: 8px;width:' +
<div :style="'background-color: #fff;padding: 10px;border-radius: 8px;width:' +
Math.floor(((window.pageWidth - 110 - 60) * 3) / 4) +
'px;'
"
>
">
<PatientRegisterListNobtn />
</div>
<div
:style="
'background-color: #fff;padding: 10px;border-radius: 8px;margin-left: 10px;width:' +
<div :style="'background-color: #fff;padding: 10px;border-radius: 8px;margin-left: 10px;width:' +
Math.floor((window.pageWidth - 110 - 45 - 8) / 4) +
'px;'
"
>
<RegisterCheckStatus
:patientRegisterId="patientRegister.patientRegisterId"
/>
">
<RegisterCheckStatus />
</div>
</div>
<SumAsbItemStatus
:patientRegisterId="patientRegister.patientRegisterId"
/>
<SumAsbItemStatus />
</div>
<div style="margin-left: 10px; ">
<BtnReport />
@ -213,6 +197,4 @@ export default {
@import '../../assets/css/global_input.css';
@import '../../assets/css/global_table.css';
@import '../../assets/css/global.css';
</style>
Loading…
Cancel
Save