diff --git a/src/components/common/PreviewCusGrant.vue b/src/components/common/PreviewCusGrant.vue index 7735a9d..12de9e0 100644 --- a/src/components/common/PreviewCusGrant.vue +++ b/src/components/common/PreviewCusGrant.vue @@ -85,8 +85,6 @@ export default { apiurl: 'http://192.168.1.138:9527', type: 0, }, - - }; }, @@ -159,6 +157,41 @@ export default { // img.src = url; // }); // }, + async fetchAsBlob(url) { + try { + const response = await fetch(url, { + mode: 'cors', + credentials: 'omit' + }); + + if (!response.ok) return null; + + const blob = await response.blob(); + return blob; + } catch (error) { + return null; + } + }, + + async fetchImageToBase64(url) { + try { + const response = await fetch(url, { + mode: 'cors', + credentials: 'omit' + }); + const blob = await response.blob(); + + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onloadend = () => resolve(reader.result); + reader.onerror = reject; + reader.readAsDataURL(blob); + }); + } catch (error) { + console.error('获取图片失败:', error); + throw error; + } + }, rowClick(row) { this.curRow = Object.assign(this.curRow, row, { type: 0, src: this.curRow.apiurl + row.informedConsentFile }) @@ -169,16 +202,16 @@ export default { rowClick1(row) { this.curRow = Object.assign(this.curRow, row, { type: 1, src: this.curRow.apiurl + '/' + row.giveUpCheckSignFile }) - // this.imageToBase64(this.curRow.src) + // this.fetchImageToBase64(this.curRow.src) // .then(base64 => { // this.curRow.src = base64 // }) // .finally(() => { - this.contentShow = '

项目放弃检查申明


  本人因个人原因,自愿放弃【${asbitemName}】项目的检查。




特此申明!




弃检人签名:${signMan}


' - this.contentShow = this.contentShow.replace('${signMan}', ``).replace('${asbitemName}', this.curRow.asbitemName) - this.isShow = 1 - console.log('this.curRow', this.curRow) - // }) + this.contentShow = '

项目放弃检查申明


  本人因个人原因,自愿放弃【${asbitemName}】项目的检查。




特此申明!




弃检人签名:${signMan}


' + this.contentShow = this.contentShow.replace('${signMan}', ``).replace('${asbitemName}', this.curRow.asbitemName) + this.isShow = 1 + console.log('this.curRow', this.curRow) + // }) }, btnInit() { @@ -255,18 +288,18 @@ export default { // newWin.close(); // 关闭窗口 // } else { - imageDom.appendChild(cloneDom); - html2canvas(cloneDom).then((canvas) => { - // 转成图片,生成图片地址 - const url = canvas.toDataURL("image/png"); - printJs({ - printable: url, - type: "image", - documentTitle: "知情同意书", // 标题 - style: `@media print { @page {size: auto; margin: 0 0 0 0; } body{margin:0 5px}canvas{page-break-after: always;page-break-inside: avoid;page-break-after: avoid;page-break-before: avoid;}}`, // 去除页眉页脚 - }); + imageDom.appendChild(cloneDom); + html2canvas(cloneDom).then((canvas) => { + // 转成图片,生成图片地址 + const url = canvas.toDataURL("image/png"); + printJs({ + printable: url, + type: "image", + documentTitle: "知情同意书", // 标题 + style: `@media print { @page {size: auto; margin: 0 0 0 0; } body{margin:0 5px}canvas{page-break-after: always;page-break-inside: avoid;page-break-after: avoid;page-break-before: avoid;}}`, // 去除页眉页脚 }); - cloneDom.style.display = "none"; + }); + cloneDom.style.display = "none"; // } }) .catch(err => { diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index b937714..7b4f0a9 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -2600,10 +2600,12 @@ export default { // 同步团检人员网上添加项目信息 btnDownOrg() { + // 获取第三方接口 postapi("/api/app/ThirdInterface/GetListByThirdInterfaceTypeAsync", { thirdInterfaceType: "07" }) .then(res => { if (res.code > -1 && res.data && Array.isArray(res.data) && res.data.length > 0) { this.thirdInterfaceId = res.data[0].id + // 团检 -- 同过人员ID 获取预约人员信息 return postapi('/api/app/AppointPatientRegister/GetByPatientRegisterId', { thirdInterfaceId: this.thirdInterfaceId, appointPatientRegisterId: '1', patientRegisterId: this.form.id }) } }) @@ -2626,7 +2628,40 @@ export default { // e.standTotal = e.amount * e.standardPrice e.total = e.amount * e.chargePrice }); - this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data) + + // 旧:this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data) + // 调整为不覆盖,只添加与修改 (有可能本地也有加项) + // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + // "asbitemName": "string", + // "itemTypeId": "string", + // "itemTypeName": "string", + // "appointPatientRegisterId": "string", + // "standardPrice": 0, + // "chargePrice": 0, + // "payTypeFlag": "string", + // "isCharge": "string", + // "amount": 0, + // "isBelongGroupPackage": "string", + // "itemTypeDisplayOrder": 0, + // "displayOrder": 0, + // "isDiscount": "string", + // "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + let lfind + res.data.forEach(e => { + lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem,'asbitemId',e.asbitemId) + // 未找到,则插入 + if(lfind > -1){ + // 只有本地未收费,小程序上收费了 才更新 + if(this.dataTransOpts.tableM.register_check_asbitem[lfind].isCharge == 'N' && e.isCharge == 'Y'){ + this.dataTransOpts.tableM.register_check_asbitem[lfind].isCharge = 'Y' + this.dataTransOpts.tableM.register_check_asbitem[lfind].amount = e.amount + this.dataTransOpts.tableM.register_check_asbitem[lfind].chargePrice = e.chargePrice + this.dataTransOpts.tableM.register_check_asbitem[lfind].total = e.amount * e.chargePrice + } + }else{ + this.dataTransOpts.tableM.register_check_asbitem.push(e) + } + }); this.$message.success({ showClose: true, message: '操作成功!' }) } }) diff --git a/src/views/report/report.vue b/src/views/report/report.vue index 460eec3..3f0cc46 100644 --- a/src/views/report/report.vue +++ b/src/views/report/report.vue @@ -61,7 +61,7 @@
{{ (tecCols.includes(dragCol[index]?.prop) ? '\u200C' : '') + - String(scope.row[dragCol[index]?.prop] ||'') }} + String(scope.row[dragCol[index]?.prop] || '') }}
@@ -92,49 +92,67 @@
-
+
预览报告
-
+
打印报告
-
+
领取报告
-
- 上传Web +
+ + 上传报告 +
-
+
+ + 单位预约备单 + +
+
历次结果
-
+
导入结果 - 导入检查结果 - 导入检验结果 - 导入迪安结果 + 导入检查结果 + 导入检验结果 + 导入迪安结果
-
+
导出/推送 - 人员信息导出 - 导出Zip - 导出Jpg - 导出 pdf 报告 - 推送检后信息 + 人员信息导出 + 导出Zip + 导出Jpg + 导出 pdf 报告 + 推送检后信息
- 知情同意书 + 知情同意书
test @@ -211,7 +229,7 @@ import Sortable from "sortablejs"; import FileSaver from 'file-saver'; import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { - tcdate, + getPagePriv, checkPagePriv, tcdate, dddw, deepCopy, objCopy, arrayReduce, @@ -239,10 +257,15 @@ export default { RegisterCheckStatus, PatientRegisterAsbItem, UTable, UTableColumn, SumAsbItemStatus, - ElProgressOCX, CheckDetails, SumItemsType, SumItems, OccDisease, ImageTextReport,PreviewCusGrant3 + ElProgressOCX, CheckDetails, SumItemsType, SumItems, OccDisease, ImageTextReport, PreviewCusGrant3 }, data() { return { + pagePriv: { + routeUrlorPageName: 'PatientRegisterEdit', //当前页面归属路由或归属页面权限名称 + privs: [] // 页面权限 + }, + patient_register_query_idno: 'Y', //身份证排他 patient_register_query_name: 'N', //姓名排他 dialogVisible: false, @@ -391,6 +414,9 @@ export default { }, created() { + //获取用户当前页面的权限 + let userPriv = window.sessionStorage.getItem('userPriv') + if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) this.loadOptsInit = Object.assign({}, this.loadOpts) this.tableDatas = [] @@ -421,10 +447,10 @@ export default { }) }, computed: { - ...mapState(["window", "dict", "elProgress","dialogWin"]), + ...mapState(["window", "dict", "elProgress", "dialogWin"]), }, methods: { - dddw, setPrStatusColor, + dddw, setPrStatusColor, checkPagePriv, // 强制将单元格值转换为字符串 // forceStringFormatter(row, column, cellValue) { @@ -660,24 +686,27 @@ export default { let items = [] //取消领取报告 - items.push({ - label: '取消领取报告', - onClick: () => { - this.canselGetReport(); - } - }) + if (checkPagePriv(pagePriv.privs, '取消领取报告')) { + items.push({ + label: '取消领取报告', + onClick: () => { + this.canselGetReport(); + } + }) + } // 右击菜单显示 - this.$contextmenu({ - items, - event, - x: event.clientX, - y: event.clientY, - customClass: "custom-class", - zIndex: 3, - minWidth: 80, - }); - + if (items.length > 0) { + this.$contextmenu({ + items, + event, + x: event.clientX, + y: event.clientY, + customClass: "custom-class", + zIndex: 3, + minWidth: 80, + }); + } return false; }, @@ -1342,14 +1371,44 @@ export default { e.isUpload = "Y"; // console.log('btnUpReport success', JSON.parse(res)) } - } else { + } + } catch (error) { + console.error("error", error); + this.$message.warning({ showClose: true, message: error }); + } + } + this.elProgress.display = false; + } else { + this.$message.warning({ showClose: true, message: "请勾选择记录!" }); + return; + } + }, + + //单位预约备单 + async btnUpBooking() { + if ( + this.checkedRows && + this.checkedRows.length > 0 + ) { + this.elProgress.display = true; + this.elProgress.percentage = 0; + + for (let i = 0; i < this.checkedRows.length; i++) { + let e = this.checkedRows[i]; + this.elProgress.percentage = Math.floor( + ((i + 1) * 100) / this.checkedRows.length + ); + + // 调上传接口 + try { + if (e.completeFlag != "3" && e.customerOrgName != '个人体检') { let patientRegisterId = e.patientRegisterId; let res2 = await postapi( "/api/app/TransToWebPeis/TransPatientRegisterByPatientRegisterId", { patientRegisterId } ); if (res2.code == -1) { - console.log("TransToWebPeis err", res2); + console.error("TransToWebPeis err", res2); } else { // 上传成功 ,更新备单状态 e.isUploadAppoint = "Y";