+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -461,23 +226,13 @@
-
+
-
+
@@ -487,6 +242,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 CusOrgOCX from "../../components/report/CusOrgOCX.vue";
@@ -511,7 +267,7 @@ export default {
complexregisterType: "2",
};
},
- created() {},
+ created() { },
mounted() {
if (this.report.dataAsbitemOCX.length > 0) {
this.cut = true;
@@ -606,6 +362,33 @@ page-break-before: avoid;}}`, // 去除页眉页脚
this.flag = true;
});
},
+
+ // 强制将单元格值转换为字符串
+ forceStringFormatter(row, column, cellValue) {
+ // 如果 cellValue 存在,则转为字符串;否则返回原值
+ return cellValue ? "\u200C" + String(cellValue) : cellValue
+ },
+
+ //通用导出
+ btnExport(elId) {
+ // 获取HTML元素(表格)
+ // let table = document.getElementById(elId); //.cloneNode(true)
+ this.$nextTick(() => {
+ // let refsTable = this.$refs[elId] //.cloneNode(true) true
+ let table = document.getElementById(elId + 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');
+
+ })
+ },
+
+
onSubmit() {
let body = {},
customerOrgs = [],
@@ -619,8 +402,8 @@ page-break-before: avoid;}}`, // 去除页眉页脚
e.dateType == "summaryDate"
? "3"
: e.dateType == "medicalStartDate"
- ? "2"
- : "1",
+ ? "2"
+ : "1",
};
if (e.customerOrgId) {
@@ -854,6 +637,8 @@ page-break-before: avoid;}}`, // 去除页眉页脚
});
return sums;
},
+
+ // 旧的导出方式
handleExport() {
if (this.format == 0) {
exportToExcel("#tableData", "单位体检结算", true, [2]);
@@ -887,6 +672,8 @@ page-break-before: avoid;}}`, // 去除页眉页脚
exportToExcel("#projectcomplextableData", "单位体检结算", true, list);
}
},
+
+
},
updated() {
this.$nextTick(() => {
diff --git a/src/views/doctorCheck/sumDoctorCheck.vue b/src/views/doctorCheck/sumDoctorCheck.vue
index 3a04890..acb6c7c 100644
--- a/src/views/doctorCheck/sumDoctorCheck.vue
+++ b/src/views/doctorCheck/sumDoctorCheck.vue
@@ -1075,7 +1075,8 @@ export default {
// 根据人员ID 查询总检数据
triggerQuery(rd) {
- // console.log('triggerQuery.rd', rd)
+ //console.log('triggerQuery.rd', rd)
+ //console.log('this.patient_register',JSON.stringify(this.patient_register),'rd',JSON.stringify(rd))
this.patient_register = Object.assign({}, this.patient_register, rd)
this.refParamsQuery = Object.assign({}, this.refParamsQuery, rd,
{
@@ -1812,6 +1813,7 @@ export default {
postapi('/api/app/patientregister/GetAlreadyRegisterPatientRegisterByNo', body)
.then(res => {
if (res.code > -1) {
+ //console.log('this.patient_register',JSON.stringify(this.patient_register),'res.data',JSON.stringify(res.data))
this.patient_register = Object.assign({}, this.patient_register, res.data)
}
})