pengjun 15 hours ago
parent
commit
23e01c0d9d
  1. 71
      src/components/common/PreviewCusGrant.vue
  2. 37
      src/components/patientRegister/PatientRegisterEdit.vue
  3. 139
      src/views/report/report.vue

71
src/components/common/PreviewCusGrant.vue

@ -85,8 +85,6 @@ export default {
apiurl: 'http://192.168.1.138:9527', apiurl: 'http://192.168.1.138:9527',
type: 0, type: 0,
}, },
}; };
}, },
@ -159,6 +157,41 @@ export default {
// img.src = url; // 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) { rowClick(row) {
this.curRow = Object.assign(this.curRow, row, { type: 0, src: this.curRow.apiurl + row.informedConsentFile }) this.curRow = Object.assign(this.curRow, row, { type: 0, src: this.curRow.apiurl + row.informedConsentFile })
@ -169,16 +202,16 @@ export default {
rowClick1(row) { rowClick1(row) {
this.curRow = Object.assign(this.curRow, row, { type: 1, src: this.curRow.apiurl + '/' + row.giveUpCheckSignFile }) 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 => { // .then(base64 => {
// this.curRow.src = base64 // this.curRow.src = base64
// }) // })
// .finally(() => { // .finally(() => {
this.contentShow = '<h2 style="font-size:32px;text-align:center;"><strong>项目放弃检查申明</strong></h2><p><br></p><p style="font-size:18px;">  本人因个人原因,自愿放弃【${asbitemName}】项目的检查。</p><p><br></p><p><br></p><p><br></p><p style="font-size:18px;"><strong>特此申明!</strong></p><p><br></p><p><br></p><p><br></p><p style="font-size:24px;text-align:right;"><strong>弃检人签名:</strong>${signMan}</p><p><br></p><p style="font-size:20px;text-align:right;padding-right:40px;"></p>'
this.contentShow = this.contentShow.replace('${signMan}', `<img width="100" height="50" src="${this.curRow.src}">`).replace('${asbitemName}', this.curRow.asbitemName)
this.isShow = 1
console.log('this.curRow', this.curRow)
// })
this.contentShow = '<h2 style="font-size:32px;text-align:center;"><strong>项目放弃检查申明</strong></h2><p><br></p><p style="font-size:18px;">  本人因个人原因,自愿放弃【${asbitemName}】项目的检查。</p><p><br></p><p><br></p><p><br></p><p style="font-size:18px;"><strong>特此申明!</strong></p><p><br></p><p><br></p><p><br></p><p style="font-size:24px;text-align:right;"><strong>弃检人签名:</strong>${signMan}</p><p><br></p><p style="font-size:20px;text-align:right;padding-right:40px;"></p>'
this.contentShow = this.contentShow.replace('${signMan}', `<img width="100" height="50" src="${this.curRow.src}">`).replace('${asbitemName}', this.curRow.asbitemName)
this.isShow = 1
console.log('this.curRow', this.curRow)
// })
}, },
btnInit() { btnInit() {
@ -255,18 +288,18 @@ export default {
// newWin.close(); // // newWin.close(); //
// } else { // } 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 => { .catch(err => {

37
src/components/patientRegister/PatientRegisterEdit.vue

@ -2600,10 +2600,12 @@ export default {
// //
btnDownOrg() { btnDownOrg() {
//
postapi("/api/app/ThirdInterface/GetListByThirdInterfaceTypeAsync", { thirdInterfaceType: "07" }) postapi("/api/app/ThirdInterface/GetListByThirdInterfaceTypeAsync", { thirdInterfaceType: "07" })
.then(res => { .then(res => {
if (res.code > -1 && res.data && Array.isArray(res.data) && res.data.length > 0) { if (res.code > -1 && res.data && Array.isArray(res.data) && res.data.length > 0) {
this.thirdInterfaceId = res.data[0].id this.thirdInterfaceId = res.data[0].id
// -- ID
return postapi('/api/app/AppointPatientRegister/GetByPatientRegisterId', { thirdInterfaceId: this.thirdInterfaceId, appointPatientRegisterId: '1', patientRegisterId: this.form.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.standTotal = e.amount * e.standardPrice
e.total = e.amount * e.chargePrice 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: '操作成功!' }) this.$message.success({ showClose: true, message: '操作成功!' })
} }
}) })

139
src/views/report/report.vue

@ -61,7 +61,7 @@
<!-- 身份证档案号条码号电话/手机工卡号 加连接串防科学计数--> <!-- 身份证档案号条码号电话/手机工卡号 加连接串防科学计数-->
<div v-else> <div v-else>
{{ (tecCols.includes(dragCol[index]?.prop) ? '\u200C' : '') + {{ (tecCols.includes(dragCol[index]?.prop) ? '\u200C' : '') +
String(scope.row[dragCol[index]?.prop] ||'') }}
String(scope.row[dragCol[index]?.prop] || '') }}
</div> </div>
</template> </template>
@ -92,49 +92,67 @@
</div> </div>
<!--按钮--> <!--按钮-->
<div style="margin-left: 10px; "> <div style="margin-left: 10px; ">
<div class="listBtn">
<div class="listBtn" v-show="checkPagePriv(pagePriv.privs, '预览报告')">
<el-button type="primary" class="commonbutton" @click="btnReport(true)">预览报告</el-button> <el-button type="primary" class="commonbutton" @click="btnReport(true)">预览报告</el-button>
</div> </div>
<div class="listBtn">
<div class="listBtn" v-show="checkPagePriv(pagePriv.privs, '打印报告')">
<el-button type="primary" class="commonbutton" @click="btnReport(false)">打印报告</el-button> <el-button type="primary" class="commonbutton" @click="btnReport(false)">打印报告</el-button>
</div> </div>
<div class="listBtn">
<div class="listBtn" v-show="checkPagePriv(pagePriv.privs, '领取报告')">
<el-button type="primary" class="commonbutton" @click="btnGetReport('Y')">领取报告</el-button> <el-button type="primary" class="commonbutton" @click="btnGetReport('Y')">领取报告</el-button>
</div> </div>
<div class="listBtn">
<el-button type="primary" class="commonbutton" @click="btnUpReport">上传Web</el-button>
<div class="listBtn" v-show="checkPagePriv(pagePriv.privs, '上传报告')">
<el-tooltip content="完成总检的人员方可上传体检报告" placement="top">
<el-button type="primary" class="commonbutton" @click="btnUpReport">上传报告</el-button>
</el-tooltip>
</div> </div>
<div class="listBtn">
<div class="listBtn" v-show="checkPagePriv(pagePriv.privs, '单位预约备单')">
<el-tooltip content="未完成总检的单位人员方可上传至单位预约备单" placement="top">
<el-button type="primary" class="commonbutton" @click="btnUpBooking">单位预约备单</el-button>
</el-tooltip>
</div>
<div class="listBtn" v-show="checkPagePriv(pagePriv.privs, '历次结果')">
<el-button type="primary" class="commonbutton" @click="btnCheckHistory">历次结果</el-button> <el-button type="primary" class="commonbutton" @click="btnCheckHistory">历次结果</el-button>
</div> </div>
<div class="listBtn">
<div class="listBtn"
v-show="checkPagePriv(pagePriv.privs, '导入检查结果') || checkPagePriv(pagePriv.privs, '导入检验结果') || checkPagePriv(pagePriv.privs, '导入迪安结果')">
<el-dropdown @command="btnImportResult"> <el-dropdown @command="btnImportResult">
<el-button type="primary" class="commonbutton"> <el-button type="primary" class="commonbutton">
导入结果<i class="el-icon-arrow-down el-icon--right"></i> 导入结果<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="pacs">导入检查结果</el-dropdown-item>
<el-dropdown-item command="lis">导入检验结果</el-dropdown-item>
<el-dropdown-item command="diAn">导入迪安结果</el-dropdown-item>
<el-dropdown-item command="pacs"
v-show="checkPagePriv(pagePriv.privs, '导入检查结果')">导入检查结果</el-dropdown-item>
<el-dropdown-item command="lis"
v-show="checkPagePriv(pagePriv.privs, '导入检验结果')">导入检验结果</el-dropdown-item>
<el-dropdown-item command="diAn"
v-show="checkPagePriv(pagePriv.privs, '导入迪安结果')">导入迪安结果</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<div class="listBtn">
<div class="listBtn"
v-show="checkPagePriv(pagePriv.privs, '人员信息导出') || checkPagePriv(pagePriv.privs, '导出Zip') || checkPagePriv(pagePriv.privs, '导出Jpg') || checkPagePriv(pagePriv.privs, '导出 pdf 报告') || checkPagePriv(pagePriv.privs, '推送检后信息')">
<el-dropdown @command="btnExportComm"> <el-dropdown @command="btnExportComm">
<el-button type="primary" class="commonbutton"> <el-button type="primary" class="commonbutton">
导出/推送<i class="el-icon-arrow-down el-icon--right"></i> 导出/推送<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="exp" @click="btnExport('report_tjbg')">人员信息导出</el-dropdown-item>
<el-dropdown-item command="zip" @click="exportZip">导出Zip</el-dropdown-item>
<el-dropdown-item command="jpg" @click="exportJpg">导出Jpg</el-dropdown-item>
<el-dropdown-item command="pdf" @click="btnReportExport(false)">导出 pdf 报告</el-dropdown-item>
<el-dropdown-item command="tsjh" @click="upTsjh">推送检后信息</el-dropdown-item>
<el-dropdown-item command="exp" @click="btnExport('report_tjbg')"
v-show="checkPagePriv(pagePriv.privs, '人员信息导出')">人员信息导出</el-dropdown-item>
<el-dropdown-item command="zip" @click="exportZip"
v-show="checkPagePriv(pagePriv.privs, '导出Zip')">导出Zip</el-dropdown-item>
<el-dropdown-item command="jpg" @click="exportJpg"
v-show="checkPagePriv(pagePriv.privs, '导出Jpg')">导出Jpg</el-dropdown-item>
<el-dropdown-item command="pdf" @click="btnReportExport(false)"
v-show="checkPagePriv(pagePriv.privs, '导出 pdf 报告')">导出 pdf 报告</el-dropdown-item>
<el-dropdown-item command="tsjh" @click="upTsjh"
v-show="checkPagePriv(pagePriv.privs, '推送检后信息')">推送检后信息</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<div class="listBtn"> <div class="listBtn">
<el-button type="primary" class="commonbutton" @click="previewCusGrant">知情同意书</el-button>
<el-button type="primary" class="commonbutton" v-show="checkPagePriv(pagePriv.privs, '知情同意书')"
@click="previewCusGrant">知情同意书</el-button>
</div> </div>
<div class="listBtn" v-if="false"> <div class="listBtn" v-if="false">
<el-button type="primary" class="commonbutton" @click="btnTest">test</el-button> <el-button type="primary" class="commonbutton" @click="btnTest">test</el-button>
@ -211,7 +229,7 @@ import Sortable from "sortablejs";
import FileSaver from 'file-saver'; import FileSaver from 'file-saver';
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { import {
tcdate,
getPagePriv, checkPagePriv, tcdate,
dddw, deepCopy, dddw, deepCopy,
objCopy, objCopy,
arrayReduce, arrayReduce,
@ -239,10 +257,15 @@ export default {
RegisterCheckStatus, RegisterCheckStatus,
PatientRegisterAsbItem, UTable, UTableColumn, PatientRegisterAsbItem, UTable, UTableColumn,
SumAsbItemStatus, SumAsbItemStatus,
ElProgressOCX, CheckDetails, SumItemsType, SumItems, OccDisease, ImageTextReport,PreviewCusGrant3
ElProgressOCX, CheckDetails, SumItemsType, SumItems, OccDisease, ImageTextReport, PreviewCusGrant3
}, },
data() { data() {
return { return {
pagePriv: {
routeUrlorPageName: 'PatientRegisterEdit', //
privs: [] //
},
patient_register_query_idno: 'Y', // patient_register_query_idno: 'Y', //
patient_register_query_name: 'N', // patient_register_query_name: 'N', //
dialogVisible: false, dialogVisible: false,
@ -391,6 +414,9 @@ export default {
}, },
created() { created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
this.loadOptsInit = Object.assign({}, this.loadOpts) this.loadOptsInit = Object.assign({}, this.loadOpts)
this.tableDatas = [] this.tableDatas = []
@ -421,10 +447,10 @@ export default {
}) })
}, },
computed: { computed: {
...mapState(["window", "dict", "elProgress","dialogWin"]),
...mapState(["window", "dict", "elProgress", "dialogWin"]),
}, },
methods: { methods: {
dddw, setPrStatusColor,
dddw, setPrStatusColor, checkPagePriv,
// //
// forceStringFormatter(row, column, cellValue) { // forceStringFormatter(row, column, cellValue) {
@ -660,24 +686,27 @@ export default {
let items = [] 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; return false;
}, },
@ -1342,14 +1371,44 @@ export default {
e.isUpload = "Y"; e.isUpload = "Y";
// console.log('btnUpReport success', JSON.parse(res)) // 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 patientRegisterId = e.patientRegisterId;
let res2 = await postapi( let res2 = await postapi(
"/api/app/TransToWebPeis/TransPatientRegisterByPatientRegisterId", "/api/app/TransToWebPeis/TransPatientRegisterByPatientRegisterId",
{ patientRegisterId } { patientRegisterId }
); );
if (res2.code == -1) { if (res2.code == -1) {
console.log("TransToWebPeis err", res2);
console.error("TransToWebPeis err", res2);
} else { } else {
// //
e.isUploadAppoint = "Y"; e.isUploadAppoint = "Y";

Loading…
Cancel
Save