From 678f7fdb52b868583900a0f6819cd09aaea9ec72 Mon Sep 17 00:00:00 2001 From: luobinjie Date: Thu, 4 Dec 2025 17:34:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/customerReport/detailedIitems.vue | 482 +++++++++++------- .../customerReport/personnelPositive.vue | 228 ++++++--- .../customerReport/positiveResultsList.vue | 2 +- 3 files changed, 447 insertions(+), 265 deletions(-) diff --git a/src/views/customerReport/detailedIitems.vue b/src/views/customerReport/detailedIitems.vue index 8499c6b..fbb8ff5 100644 --- a/src/views/customerReport/detailedIitems.vue +++ b/src/views/customerReport/detailedIitems.vue @@ -4,13 +4,22 @@
客户报表 / - 明细项目具体结果统计 + 明细项目具体结果统计
-
+
体检单位:
- 查询 + 查询
- 导出excel + 导出excel
- 打印 + 打印
-
+
- - - - - - - - - - - + + + + + + + + + + + + + + + +
-
+
- - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
@@ -196,7 +287,7 @@ export default { columnData: [], flag: true, category: [], - format: "0" + format: "0", }; }, @@ -320,11 +411,10 @@ export default { // this.dict.asbItemAll = res.data; // } // }); - }, onPrint() { - this.flag = false; + this.flag = false; let index = ""; if (this.format == 0) { index = "imageDom0"; @@ -357,9 +447,9 @@ page-break-before: avoid;}}`, // 去除页眉页脚 }); }, handleExport() { - if(this.format==0){ + if (this.format == 0) { exportToExcel("#table", "明细项目结果统计", false); - }else{ + } else { exportToExcel("#tables", "明细项目结果统计", false); } }, @@ -368,7 +458,7 @@ page-break-before: avoid;}}`, // 去除页眉页脚 return "left-align"; } }, - summarizeRegisterCount(param) { + summarizeRegisterCount(param) { const { columns, data } = param; const sums = []; columns.forEach((column, index) => { @@ -402,7 +492,7 @@ page-break-before: avoid;}}`, // 去除页眉页脚 let body = {}, customerOrgs = [], asbitemIds = []; - this.columnData=[] + this.columnData = []; if (this.project.dataCusOrgOCX.length > 0) { this.project.dataCusOrgOCX.forEach((e) => { @@ -451,117 +541,127 @@ page-break-before: avoid;}}`, // 去除页眉页脚 body ).then((res) => { if (res.code != -1) { - for(let i=0;i { - this.$refs.dataList.doLayout(); - }); + this.columnData = Array.from(new Set(this.columnData)); + this.dataList = [...res.data]; + this.$nextTick(() => { + this.$refs.dataList.doLayout(); + }); } }); - }else{ - postapi( + } else { + postapi( "/api/customerreport/getitemspecificresultreportordiagnosis", body ).then((res) => { if (res.code != -1) { - for(let i=0;i { - this.$refs.dataLists.doLayout(); - }); + this.columnData = Array.from(new Set(this.columnData)); + this.dataLists = [...res.data]; + this.$nextTick(() => { + this.$refs.dataLists.doLayout(); + }); } }); } - - - // postapi("/api/customerreport/getasbitemspecificresultreport", body).then( - // (res) => { - // if (res.code != -1) { - // let bodys = res.data; - // let that = this; - // let template = { - // prop: "", - // lable: "", - // }; - // that.columnData = []; - // that.category = []; - // for (let i = 0; i < bodys.length; i++) { - // for (let k = 0; k < bodys[i].registerChecks.length; k++) { - // that.category.push(bodys[i].registerChecks[k].checkName); - // } - // } - // that.category = Array.from(new Set(that.category)); - // for (let m = 0; m < that.category.length; m++) { - // for (let i = 0; i < bodys.length; i++) { - // for (let k = 0; k < bodys[i].registerChecks.length; k++) { - // this.$set( - // bodys[i], - // // bodys[i].registerChecks[k].registerCheckId + - // bodys[i].registerChecks[k].checkName + - // "小结", - // bodys[i].registerChecks[k].registerCheckSummarys - // ); - // if (bodys[i].registerChecks[k].checkName == that.category[m]) { - // for (let j = 0;j < bodys[i].registerChecks[k].registerCheckItems.length;j++) { - // let templatess = JSON.parse(JSON.stringify(template)); - // templatess.prop = - // // bodys[i].registerChecks[k].registerCheckId + - // bodys[i].registerChecks[k].checkName + - // bodys[i].registerChecks[k].registerCheckItems[j] - // .itemName; - // templatess.lable = - // // bodys[i].registerChecks[k].checkName + - // // "/" + - // bodys[i].registerChecks[k].registerCheckItems[j] - // .itemName; - // that.columnData.push(templatess); - // this.$set( - // bodys[i], - // // bodys[i].registerChecks[k].registerCheckId + - // bodys[i].registerChecks[k].checkName + - // bodys[i].registerChecks[k].registerCheckItems[j] - // .itemName, - // bodys[i].registerChecks[k].registerCheckItems[j].result - // ) - // } - // } - // } - // } - // let templates = JSON.parse(JSON.stringify(template)); - // templates.prop =that.category[m] +"小结"; - // templates.lable = that.category[m] + "小结"; - // that.columnData.push(templates); - // } - - // this.$nextTick(() => { - // this.$refs.dataList.doLayout(); - // }); - // let map = new Map(); - // let qc = this.columnData.filter( - // (key) => !map.has(key.prop) && map.set(key.prop, 1) - // ); - // // qc.sort(function (a, b) { - // // return a.lable < b.lable ? -1 : 1; //根据名称属性进行排序 - // // }) - - // this.columnData = qc; - // this.dataList = bodys; - // } - // } - // ); + // postapi("/api/customerreport/getasbitemspecificresultreport", body).then( + // (res) => { + // if (res.code != -1) { + // let bodys = res.data; + // let that = this; + // let template = { + // prop: "", + // lable: "", + // }; + // that.columnData = []; + // that.category = []; + // for (let i = 0; i < bodys.length; i++) { + // for (let k = 0; k < bodys[i].registerChecks.length; k++) { + // that.category.push(bodys[i].registerChecks[k].checkName); + // } + // } + // that.category = Array.from(new Set(that.category)); + // for (let m = 0; m < that.category.length; m++) { + // for (let i = 0; i < bodys.length; i++) { + // for (let k = 0; k < bodys[i].registerChecks.length; k++) { + // this.$set( + // bodys[i], + // // bodys[i].registerChecks[k].registerCheckId + + // bodys[i].registerChecks[k].checkName + + // "小结", + // bodys[i].registerChecks[k].registerCheckSummarys + // ); + // if (bodys[i].registerChecks[k].checkName == that.category[m]) { + // for (let j = 0;j < bodys[i].registerChecks[k].registerCheckItems.length;j++) { + // let templatess = JSON.parse(JSON.stringify(template)); + // templatess.prop = + // // bodys[i].registerChecks[k].registerCheckId + + // bodys[i].registerChecks[k].checkName + + // bodys[i].registerChecks[k].registerCheckItems[j] + // .itemName; + // templatess.lable = + // // bodys[i].registerChecks[k].checkName + + // // "/" + + // bodys[i].registerChecks[k].registerCheckItems[j] + // .itemName; + // that.columnData.push(templatess); + // this.$set( + // bodys[i], + // // bodys[i].registerChecks[k].registerCheckId + + // bodys[i].registerChecks[k].checkName + + // bodys[i].registerChecks[k].registerCheckItems[j] + // .itemName, + // bodys[i].registerChecks[k].registerCheckItems[j].result + // ) + // } + // } + // } + // } + // let templates = JSON.parse(JSON.stringify(template)); + // templates.prop =that.category[m] +"小结"; + // templates.lable = that.category[m] + "小结"; + // that.columnData.push(templates); + // } + + // this.$nextTick(() => { + // this.$refs.dataList.doLayout(); + // }); + // let map = new Map(); + // let qc = this.columnData.filter( + // (key) => !map.has(key.prop) && map.set(key.prop, 1) + // ); + // // qc.sort(function (a, b) { + // // return a.lable < b.lable ? -1 : 1; //根据名称属性进行排序 + // // }) + + // this.columnData = qc; + // this.dataList = bodys; + // } + // } + // ); }, }, @@ -583,22 +683,22 @@ page-break-before: avoid;}}`, // 去除页眉页脚 @import "../../assets/css/global_input.css"; @import "../../assets/css/global_table.css"; @import "../../assets/css/global.css"; -.query{ - margin-right: 10px; - display: flex; - justify-content: center; - align-items: center; - font-size: 14px; - color: #232748; - font-size: 400; - font-family: "NotoSansSC-Regular"; +.query { + margin-right: 10px; + display: flex; + justify-content: center; + align-items: center; + font-size: 14px; + color: #232748; + font-size: 400; + font-family: "NotoSansSC-Regular"; } .box { display: flex; flex-direction: column; } ::v-deep .el-table__header-wrapper th.backcolor { - background-color: #F5F7FA; + background-color: #f5f7fa; } :deep .left-align .cell { text-align: left !important; @@ -620,9 +720,9 @@ page-break-before: avoid;}}`, // 去除页眉页脚 } ::v-deep .el-icon-search:before { - color: #00F; + color: #00f; } -.query:last-child{ +.query:last-child { margin-right: 0; } diff --git a/src/views/customerReport/personnelPositive.vue b/src/views/customerReport/personnelPositive.vue index 4bec412..0a2b33d 100644 --- a/src/views/customerReport/personnelPositive.vue +++ b/src/views/customerReport/personnelPositive.vue @@ -9,13 +9,32 @@
+ style=" + background-color: #fff; + padding: 15px; + border-radius: 8px; + display: flex; + flex-wrap: wrap; + margin-bottom: 10px; + height: 35px; + margin-top: 7px; + " + >
体检单位: - - + +
- 查询 + 查询
- 导出excel + 导出excel
- 打印 + 打印
-
- - - - - - - - - - - - +
+ + + + + + + + + + + + + +
- +
@@ -87,7 +153,13 @@ import moment from "moment"; import { mapState, mapActions } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; -import { dddw, objCopy, arrayReduce, arrayExistObj, tcdate } from "@/utlis/proFunc"; +import { + dddw, + objCopy, + arrayReduce, + arrayExistObj, + tcdate, +} from "@/utlis/proFunc"; import CusOrgOCX from "../../components/report/CusOrgOCX.vue"; import { exportToExcel } from "../../utlis/Export2Excel"; import html2canvas from "html2canvas"; @@ -95,20 +167,21 @@ import printJs from "print-js"; export default { components: { - CusOrgOCX + CusOrgOCX, }, data() { return { - dataList: [], //列表数据 + dataList: [], //列表数据 completeFlag: "", classification: "Y", flag: true, - summary:{ - startDate:"", - endDate:"", - femaleCount:"", - maleCount:"" - } + summary: { + startDate: "", + endDate: "", + femaleCount: "", + maleCount: "", + customerOrgName:"" + }, }; }, @@ -126,7 +199,8 @@ export default { }, methods: { - moment, dddw, + moment, + dddw, //数据初始化 dictInit() { //体检中心 @@ -172,10 +246,10 @@ export default { tableRowClassName({ row, rowIndex }) { switch (row.isCharge) { - case 'N': - return 'danger'; + case "N": + return "danger"; default: - return ''; + return ""; } }, getSummaries(param) { @@ -195,44 +269,46 @@ export default { }, //查询 btnQuery() { - let body = {}, customerOrgs = [], diagnosisIds = []; + let body = {}, + customerOrgs = [], + diagnosisIds = []; if (this.report.dataCusOrgOCX.length > 0) { - this.report.dataCusOrgOCX.forEach(e => { - let dateType = '1' + this.report.dataCusOrgOCX.forEach((e) => { + let dateType = "1"; switch (e.dateType) { - case 'medicalStartDate': - dateType = '2' + case "medicalStartDate": + dateType = "2"; break; - case 'checkDate': - dateType = '4' + case "checkDate": + dateType = "4"; break; - case 'summaryDate': - dateType = '3' + case "summaryDate": + dateType = "3"; break; - case 'sumCheckDate': - dateType = '5' + case "sumCheckDate": + dateType = "5"; break; default: break; } let rd = { - startDate: moment(e.startDate).format('yyyy-MM-DD'), - endDate: moment(e.endDate).format('yyyy-MM-DD'), - dateType - } - + startDate: moment(e.startDate).format("yyyy-MM-DD"), + endDate: moment(e.endDate).format("yyyy-MM-DD"), + dateType, + }; + console.log(e); if (e.customerOrgId) { - rd.customerOrgId = e.customerOrgId + rd.customerOrgId = e.customerOrgId; if (e.customerOrgId == this.dict.personOrgId) { - rd.customerOrgRegisterId = null - rd.customerOrgGroupId = [] + rd.customerOrgRegisterId = null; + rd.customerOrgGroupId = []; } else { - rd.customerOrgRegisterId = e.customerOrgRegister.id - rd.customerOrgGroupId = e.customerOrgGroupIds + rd.customerOrgRegisterId = e.customerOrgRegister.id; + rd.customerOrgGroupId = e.customerOrgGroupIds; } } - customerOrgs.push(rd) - }) + customerOrgs.push(rd); + }); } // if (this.report.dataAsbitemOCX.length > 0) { @@ -241,28 +317,35 @@ export default { // }) // } - body.customerOrgs = customerOrgs + body.customerOrgs = customerOrgs; // body.diagnosisIds = diagnosisIds // if(this.completeFlag) body.completeFlag = this.completeFlag // body.isAudit=this.classification - // if (this.patientRegister.query.isCharge) body.isCharge = this.patientRegister.query.isCharge //console.log('/api/app/peisreport/getregisterasbitemchargestatus',body) - postapi('/api/customerreport/getpatientregisterpositivereport', body).then(res => { + postapi( + "/api/customerreport/getpatientregisterpositivereport", + body + ).then((res) => { if (res.code != -1) { this.dataList = res.data.details; - this.summary.startDate=res.data.startDate; - this.summary.endDate=res.data.endDate; - this.summary.femaleCount=res.data.femaleCount; - this.summary.maleCount=res.data.maleCount; + this.summary.startDate = res.data.startDate; + this.summary.endDate = res.data.endDate; + this.summary.femaleCount = res.data.femaleCount; + this.summary.maleCount = res.data.maleCount; + if(this.report.dataCusOrgOCX.length>1){ + this.summary.customerOrgName="" + }else{ + this.summary.customerOrgName=this.report.dataCusOrgOCX[0].customerOrgName + } this.$nextTick(() => { this.$refs.dataList.doLayout(); }); } - }) + }); }, onPrint() { this.flag = false; @@ -292,7 +375,7 @@ export default { }, handleExport() { exportToExcel("#table", "人员阳性结果清单", false); - } + }, }, //监听事件 @@ -304,7 +387,6 @@ export default { // this.query(); // } // }, - }, }; @@ -349,7 +431,7 @@ export default { } ::v-deep .el-icon-search:before { - color: #00F; + color: #00f; } .query:last-child { diff --git a/src/views/customerReport/positiveResultsList.vue b/src/views/customerReport/positiveResultsList.vue index 32774de..bf34d30 100644 --- a/src/views/customerReport/positiveResultsList.vue +++ b/src/views/customerReport/positiveResultsList.vue @@ -179,7 +179,7 @@ :summary-method="getSummaris" > - +