+
+
+
阳性结果人员清单
+
{{ "开始时间: " + (summary.startDate || '') + " 结束时间: " + (summary.endDate || '') }}
+
+
{{ "阳性人数:男性:" + summary.maleCount + "人 女性: " + summary.femaleCount + "人;共:" +
+ (summary.maleCount + summary.femaleCount) + "人。" }}
+
{{ "检查人数:男性:" +
+ summary.registerMaleCount + "人 女性: " + summary.registerFemaleCount + "人;共:" +
+ (summary.registerMaleCount + summary.registerFemaleCount) + "人。" }}
+
+
-
-
-
-
-
-
- {{ item }}{{ index + 1 ==
- scope.row.patientNameDetail.length ? '' : ',' }}
-
-
-
-
-
-
- {{ scope.row.percentage }}%
-
-
-
+
+
+
+
+
+
+
+ {{ item }}{{ index + 1 ==
+ scope.row.patientNameDetail.length ? '' : ',' }}
+
+
+
+
+
+ {{ scope.row.percentage }}%
+
+
+
+
@@ -154,6 +170,7 @@ import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { exportToExcel } from "../../utlis/Export2Excel";
+import FileSaver from 'file-saver';
import html2canvas from "html2canvas";
import printJs from "print-js";
import {
@@ -208,6 +225,14 @@ export default {
methods: {
moment,
dddw,
+
+ // 强制将单元格值转换为字符串
+ forceStringFormatter(row, column, cellValue) {
+ // console.log('row, column, cellValue',row, column.property, cellValue)
+ // 如果 cellValue 存在,则转为字符串;否则返回原值
+ return cellValue ? "\u200C" + String(cellValue) : cellValue
+ },
+
//数据初始化
dictInit() {
//体检中心
@@ -455,6 +480,8 @@ export default {
this.summary.endDate = res.data.endDate;
this.summary.femaleCount = res.data.femaleCount;
this.summary.maleCount = res.data.maleCount;
+ this.summary.registerMaleCount = res.data.registerMaleCount;
+ this.summary.registerFemaleCount = res.data.registerFemaleCount;
this.$nextTick(() => {
this.$refs.standardTableData.doLayout();
});
@@ -497,18 +524,37 @@ page-break-before: avoid;}}`, // 去除页眉页脚
});
},
handleExport() {
- if (this.format == 0) {
- let index = 3;
- let list = [];
- list.push(index);
- for (let i = 0; i < this.dataList.length - 1; i++) {
- index += this.dataList[i].patientRegisters.length + 4;
- list.push(index);
- }
- exportToExcel("#projectTableData", "阳性结果人员清单", true, list);
- } else if (this.format == 1) {
- exportToExcel("#standardTableData", "阳性结果人员清单", false);
- }
+ // if (this.format == 0) {
+ // let index = 3;
+ // let list = [];
+ // list.push(index);
+ // for (let i = 0; i < this.dataList.length - 1; i++) {
+ // index += this.dataList[i].patientRegisters.length + 4;
+ // list.push(index);
+ // }
+ // exportToExcel("#projectTableData", "阳性结果人员清单", true, list);
+ // } else if (this.format == 1) {
+ // exportToExcel("#standardTableData", "阳性结果人员清单", false);
+ // }
+
+ //通用导出
+ // 获取HTML元素(表格)
+ // let table = document.getElementById(elId); //.cloneNode(true)
+ this.$nextTick(() => {
+ // let refsTable = this.$refs[elId] //.cloneNode(true) true
+ let table = document.getElementById('imageDom' + String(this.format))
+ // console.log('table,refsTable', table, refsTable)
+
+ let tableData = table.innerHTML
+ let fileName = moment(new Date()).format('yyyyMMDDHHmmss')
+
+ let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
+
+ FileSaver.saveAs(blob, fileName + '.xls');
+
+ })
+
+
},
},
diff --git a/src/views/customerReport/unitSettlement.vue b/src/views/customerReport/unitSettlement.vue
index f81c38f..f0df4fa 100644
--- a/src/views/customerReport/unitSettlement.vue
+++ b/src/views/customerReport/unitSettlement.vue
@@ -365,7 +365,7 @@ page-break-before: avoid;}}`, // 去除页眉页脚
// 强制将单元格值转换为字符串
forceStringFormatter(row, column, cellValue) {
- console.log('row, column, cellValue',row, column.property, cellValue)
+ // console.log('row, column, cellValue',row, column.property, cellValue)
// 如果 cellValue 存在,则转为字符串;否则返回原值
return cellValue ? "\u200C" + String(cellValue) : cellValue
},
diff --git a/src/views/report/report.vue b/src/views/report/report.vue
index eb659f6..9638bb5 100644
--- a/src/views/report/report.vue
+++ b/src/views/report/report.vue
@@ -23,7 +23,7 @@
@@ -33,7 +33,7 @@
:type="dragCol[index].type" :min-width="dragCol[index].minWidth" :align="dragCol[index].align"
:label="dragCol[index].type ? '' : item.label" :prop="dragCol[index].prop"
:sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true"
- :sort-method="(a, b) => chineseSort(a, b, dragCol[index].prop)"
+ :sort-method="(a, b) => chineseSort(a, b, dragCol[index].prop)"
:show-overflow-tooltip="dragCol[index].showTooltip">
@@ -59,7 +59,7 @@
- {{ '\u200C' + String(scope.row[dragCol[index]?.prop]||'') }}
+ {{ '\u200C' + String(scope.row[dragCol[index]?.prop] || '') }}
@@ -75,8 +75,6 @@