pengjun 15 hours ago
parent
commit
8a87b2fabc
  1. 221
      src/components/common/PreviewCusGrant.vue
  2. 98
      src/components/patientRegister/PatientRegisterList.vue

221
src/components/common/PreviewCusGrant.vue

@ -1,11 +1,43 @@
<template> <template>
<div>
<!-- :editor-toolbar="customToolbar" overflow-y: scroll;-->
<div style="height: 500px;overflow:auto;" v-html="contentShow" ref="refPreviewCusGrant"></div>
<div style="display: flex;justify-content: space-between;">
<div></div>
<div style="display: flex;">
<el-button type="primary" @click="btnPrint" class="commonbutton" size="small">打印</el-button>
<div style="display: flex;">
<div style="overflow-y: auto;height: 530px;width:200px;">
<el-collapse style="width:180px;">
<el-collapse-item v-if="signData?.informedConsentDetail.length > 0" title="知情同意书签名" name="0">
<el-table ref="registerCheckList0" :data="signData?.informedConsentDetail" style="width: 100%;" border
highlight-current-row @row-click="rowClick" :show-header="false" :row-style="{ height: '28px' }">
<el-table-column prop="asbitemName" label="组合项目" width="174">
<template slot-scope="scope">
<div :style="`padding: 0 5px;`">
{{ scope.row.asbitemName }}
</div>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
<el-collapse-item v-if="signData?.giveUpCheckDetail.length > 0" title="放弃检查签名" name="1">
<el-table ref="registerCheckList1" :data="signData?.giveUpCheckDetail" style="width: 100%;" border
highlight-current-row @row-click="rowClick1" :show-header="false" :row-style="{ height: '28px' }">
<el-table-column prop="asbitemName" label="组合项目" width="174">
<template slot-scope="scope">
<div :style="`padding: 0 5px;`">
{{ scope.row.asbitemName }}
</div>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
</div>
<div>
<!-- -->
<div style="height: 500px;width: 680px;overflow:auto;" v-show="isShow == 1 ? true : false" v-html="contentShow"
ref="refPreviewCusGrant"></div>
<iframe :src="curRow.src" style="height: 500px;width: 680px;" v-show="isShow == 0 ? true : false" />
<div style="display: flex;justify-content: space-between;">
<div></div>
<div style="display: flex;">
<el-button type="primary" @click="btnPrint" class="commonbutton" size="small">打印</el-button>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -18,91 +50,186 @@ import { mapState } from "vuex";
import moment from "moment"; import moment from "moment";
import html2canvas from "html2canvas"; import html2canvas from "html2canvas";
import printJs from "print-js"; import printJs from "print-js";
import { postapi } from "@/api/api";
export default { export default {
props: ['refParams'], props: ['refParams'],
data() { data() {
return { return {
contentShow:'<h2 style="font-size:32px;text-align:center;"><strong>CT检查知情同意书</strong></h2><p>尊敬的客户:</p><p style="font-size:18px;">  欢迎您来到长城体检中心进行CT检查,在检查之前,您需要知晓以下事宜:辐射有害健康,请远离电离辐射</p><p>  1、人体受到放射线照射后,可能产生潜在的危害,产生有害的躯体效应和遗传效应,其中最敏感的器官或组织为:甲状腺、性腺、及胚胎组织。</p><p>  2、孕妇原则上禁止CT检查,如果您是孕妇,在CT检查前,请告知工作人员。</p><p>  3、如果您正处在备孕阶段,原则上我们不建议进行CT检查,请您提前告知工作人员。</p><p>  4、CT检查时只允许一名受检者进入机房,无关人员不得在机房内停留。</p><p>  5、建议受检者佩戴门诊部提供的防护用品,遮盖敏感部位。 家屋到扫描室外等候。</p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></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;">${signDate}</p>',
contentShow: '<h2 style="font-size:32px;text-align:center;"><strong>CT检查知情同意书</strong></h2><p>尊敬的客户:</p><p style="font-size:18px;">  欢迎您来到长城体检中心进行CT检查,在检查之前,您需要知晓以下事宜:辐射有害健康,请远离电离辐射</p><p>  1、人体受到放射线照射后,可能产生潜在的危害,产生有害的躯体效应和遗传效应,其中最敏感的器官或组织为:甲状腺、性腺、及胚胎组织。</p><p>  2、孕妇原则上禁止CT检查,如果您是孕妇,在CT检查前,请告知工作人员。</p><p>  3、如果您正处在备孕阶段,原则上我们不建议进行CT检查,请您提前告知工作人员。</p><p>  4、CT检查时只允许一名受检者进入机房,无关人员不得在机房内停留。</p><p>  5、建议受检者佩戴门诊部提供的防护用品,遮盖敏感部位。 家屋到扫描室外等候。</p><p><br></p><p><br></p><p><br></p><p><br></p><p><br></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;">${signDate}</p>',
signData: { //
giveUpCheckDetail: [
{
registerCheckId: "",
asbitemName: "",
informedConsentFile: "",
informedConsentSignFile: "",
giveUpCheckSignFile: ""
}
],
informedConsentDetail: [
{
registerCheckId: "",
asbitemName: "",
informedConsentFile: "",
informedConsentSignFile: "",
giveUpCheckSignFile: ""
}
]
},
isShow: 0, // 0 -- 1 --
curRow: {
registerCheckId: '',
src: '',
apiurl: 'http://192.168.1.138:9527'
}
}; };
}, },
// //
created() { created() {
try {
let sysConfig = JSON.parse(window.sessionStorage.getItem('sysConfig'))
this.curRow.apiurl = sysConfig.apiurl
} catch (error) {
confirm.error("window.sessionStorage.getItem('sysConfig')", error)
}
}, },
// //
mounted() { mounted() {
this.getSignData()
}, },
computed: { computed: {
...mapState(["window", "dict", "dialogWin"]), ...mapState(["window", "dict", "dialogWin"]),
divHeight(){
divHeight() {
return this.window.pageHeight - 120 return this.window.pageHeight - 120
}, },
}, },
// //
methods: { methods: {
btnOk() {
console.log('content', this.content)
//this.dialogWin.acceptTemplate = false
getSignData() {
let body = {}
if (this.refParams.registerCheckId) {
body.registerCheckId = this.refParams.registerCheckId
} else if (this.refParams.patientRegisterId) {
body.patientRegisterId = this.refParams.patientRegisterId
} else {
this.signData = {}
return
}
postapi('/api/app/Paperless/GetRegisterCheckSignPictureList', body)
.then(res => {
if (res.code > -1) {
this.signData = res.data
if (this.signData?.informedConsentDetail?.length > 0) {
this.rowClick(this.signData.informedConsentDetail[0])
}
}
})
}, },
btnInit(){
rowClick(row) {
this.curRow = Object.assign(this.curRow, row, { src: this.curRow.apiurl + row.informedConsentFile })
this.isShow = 0
console.log('this.curRow', this.curRow)
},
rowClick1(row) {
this.curRow = Object.assign(this.curRow, row, { src: this.curRow.apiurl + '/' + row.giveUpCheckSignFile })
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><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() {
this.content = this.contentInit this.content = this.contentInit
this.contentDesign = this.contentInit this.contentDesign = this.contentInit
this.designAble = true this.designAble = true
}, },
// //
btnPreview(){
btnPreview() {
this.acceptTemplateShow = true this.acceptTemplateShow = true
let signMan = '' let signMan = ''
let signDate = moment(new Date()).format('yyyy 年 MM 月 DD 日') let signDate = moment(new Date()).format('yyyy 年 MM 月 DD 日')
this.contentShow = this.content.replace('${signMan}', signMan).replace('${signDate}', signDate) this.contentShow = this.content.replace('${signMan}', signMan).replace('${signDate}', signDate)
}, },
btnDesign(){
if(this.designAble){
this.contentDesign = this.content.replace(/' '/g,'&emsp;')
}else{
btnDesign() {
if (this.designAble) {
this.contentDesign = this.content.replace(/' '/g, '&emsp;')
} else {
this.content = this.contentDesign this.content = this.contentDesign
} }
this.designAble = !this.designAble this.designAble = !this.designAble
}, },
btnPrint() {
//
getSignFileContent() {
return new Promise((resolve, reject) => {
if (!this.curRow.registerCheckId) {
reject('没有选中组合项目')
} else {
if (this.isShow == 1) {
resolve()
} else {
postapi('/api/app/Paperless/GetRegisterCheckSignPictureByRegisterCheckId', { registerCheckId: this.curRow.registerCheckId })
.then(res => {
if (res.code > -1) {
this.isShow = 1
this.contentShow = res.data.informedConsentContent
resolve()
} else {
reject(res.message)
}
})
.catch(err => {
reject(err.message)
})
}
}
})
},
this.$nextTick(() => {
let width = 794; // A4
let cloneDom = this.$refs['refPreviewCusGrant'].cloneNode(true);
let imageDom = this.$refs['refPreviewCusGrant'];
cloneDom.style.position = "absolute";
cloneDom.style.top = "0px";
cloneDom.style.zIndex = "-1";
cloneDom.style.width = width;
cloneDom.style.padding = "80px 50px";
console.log(cloneDom);
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;
btnPrint() {
this.$nextTick(async () => {
this.getSignFileContent()
.then(res => {
let width = 794; // A4
let cloneDom = this.$refs['refPreviewCusGrant'].cloneNode(true);
let imageDom = this.$refs['refPreviewCusGrant'];
cloneDom.style.position = "absolute";
cloneDom.style.top = "0px";
cloneDom.style.zIndex = "-1";
cloneDom.style.width = width;
cloneDom.style.padding = "80px 50px";
console.log(cloneDom);
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-after: avoid;
page-break-before: avoid;}}`, // 去除页眉页脚 page-break-before: avoid;}}`, // 去除页眉页脚
});
});
cloneDom.style.display = "none";
})
.catch(err => {
console.error('getSignFileContent', err)
}); });
});
cloneDom.style.display = "none";
});
})
}, },
}, },
@ -112,9 +239,7 @@ page-break-before: avoid;}}`, // 去除页眉页脚
// immediate:true, // immediate:true,
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log(`watch 模板 newVal: ${newVal}, oldVal: ${oldVal} `, this.refParams); console.log(`watch 模板 newVal: ${newVal}, oldVal: ${oldVal} `, this.refParams);
if (newVal != oldVal) {
}
if (newVal != oldVal) this.getSignData()
} }
}, },
}, },

98
src/components/patientRegister/PatientRegisterList.vue

@ -595,9 +595,9 @@
</el-dialog> </el-dialog>
<!-- 通用进度条 --> <!-- 通用进度条 -->
<el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="600px" height="400" :show-close="false"
<el-dialog title="数据处理中……" :visible.sync="dialogElProgress" width="600px" height="400" :show-close="false"
:close-on-click-modal="false" :append-to-body="true"> :close-on-click-modal="false" :append-to-body="true">
<ElProgressOCX />
<ElProgressOCX0 />
</el-dialog> </el-dialog>
<!--云胶片二维码--> <!--云胶片二维码-->
@ -658,7 +658,7 @@ import PatientRegisterEdit from "../../components/patientRegister/PatientRegiste
import Camera from "../../components/patientRegister/Camera.vue"; import Camera from "../../components/patientRegister/Camera.vue";
import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue"; import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
import ElProgressOCX from "../../components/report/ElProgressOCX.vue";
import ElProgressOCX0 from "../../components/report/ElProgressOCX.vue";
import PatientRegisterEditGroupBatch from "./PatientRegisterEditGroupBatch.vue"; import PatientRegisterEditGroupBatch from "./PatientRegisterEditGroupBatch.vue";
import PatientRegisterEditItemBatch from "./PatientRegisterEditItemBatch.vue"; import PatientRegisterEditItemBatch from "./PatientRegisterEditItemBatch.vue";
import PatientRegisterEditDoctorBatch from "./PatientRegisterEditDoctorBatch.vue"; import PatientRegisterEditDoctorBatch from "./PatientRegisterEditDoctorBatch.vue";
@ -681,9 +681,9 @@ export default {
PatientRegisterEditMedicalTypeBatch, // PatientRegisterEditMedicalTypeBatch, //
PatientRegisterEditPersonnelTypeBatch, // PatientRegisterEditPersonnelTypeBatch, //
PatientRegisterEditRemarkBatch, // PatientRegisterEditRemarkBatch, //
ElProgressOCX,
ElProgressOCX0,
ImportOrgData, ImportOrgData,
Queue,PreviewCusGrant,
Queue, PreviewCusGrant,
DownloadExcel: JsonExcel, DownloadExcel: JsonExcel,
UTable, UTable,
UTableColumn, UTableColumn,
@ -947,9 +947,9 @@ export default {
nation: [], nation: [],
dialogEditMedicalStartDate: false, // dialogEditMedicalStartDate: false, //
queueParams: { queueParams: {
patientRegisterId:'',
patientName:'',
queueTimes:0, //
patientRegisterId: '',
patientName: '',
queueTimes: 0, //
}, // }, //
LocalConfig: { LocalConfig: {
normal: { normal: {
@ -984,7 +984,8 @@ export default {
preCusGrantParams: { preCusGrantParams: {
patientRegisterId: '', patientRegisterId: '',
brushTimes: 0 brushTimes: 0
}
},
dialogElProgress:false, //
}; };
}, },
@ -1210,7 +1211,7 @@ export default {
this.$message.warning({ showClose: true, message: `${err}` }); this.$message.warning({ showClose: true, message: `${err}` });
}); });
} else { } else {
this.elProgress.display = true;
this.dialogElProgress = true;
this.elProgress.percentage = 0; this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) { for (let i = 0; i < this.multipleSelection.length; i++) {
@ -1251,7 +1252,7 @@ export default {
((i + 1) * 100) / this.multipleSelection.length ((i + 1) * 100) / this.multipleSelection.length
); );
} }
this.elProgress.display = false;
this.dialogElProgress = false;
} }
}, },
@ -1388,7 +1389,7 @@ export default {
return; return;
} }
this.elProgress.display = true;
this.dialogElProgress = true;
this.elProgress.percentage = 0; this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) { for (let i = 0; i < this.multipleSelection.length; i++) {
@ -1403,7 +1404,7 @@ export default {
((i + 1) * 100) / this.multipleSelection.length ((i + 1) * 100) / this.multipleSelection.length
); );
} }
this.elProgress.display = false;
this.dialogElProgress = false;
}, },
// //
@ -1416,7 +1417,7 @@ export default {
return; return;
} }
this.elProgress.display = true;
this.dialogElProgress = true;
this.elProgress.percentage = 0; this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) { for (let i = 0; i < this.multipleSelection.length; i++) {
@ -1431,7 +1432,7 @@ export default {
((i + 1) * 100) / this.multipleSelection.length ((i + 1) * 100) / this.multipleSelection.length
); );
} }
this.elProgress.display = false;
this.dialogElProgress = false;
}, },
handleSelectionChange(rows) { handleSelectionChange(rows) {
@ -1707,14 +1708,6 @@ export default {
// //
// /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641 // /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
btnDel() { btnDel() {
//start -------------------------
// this.multipleSelection = []
// this.tableData.forEach(e => {
// if (e.choosed) {
// this.multipleSelection.push(deepCopy(e))
// }
// })
// end -------------------------
if (this.multipleSelection.length < 1) { if (this.multipleSelection.length < 1) {
this.$message.warning({ this.$message.warning({
@ -1734,24 +1727,43 @@ export default {
cancelButtonText: "否", cancelButtonText: "否",
type: "warning", type: "warning",
}) })
.then(() => {
//// console.log('{patientRegisterIds}',{patientRegisterIds})
return postapi("/api/app/patient-register/delete-many", {
patientRegisterIds,
});
})
.then((res) => {
if (res.code != -1) {
// console.log("");
this.dataTransOpts.tableS.patient_register.id = "";
setTimeout(() => {
this.dataTransOpts.refresh.register_check_asbitem.M++;
}, 10);
arrayReduce(this.tableData, this.multipleSelection, "id=id"); //
// this.setForm(this.patientRegister.patientRegisterRdInit)
// this.getPatientRegisterAbs();
.then(async () => {
let lfind
this.dialogElProgress = true;
this.elProgress.percentage = 0;
for (let index = 0; index < patientRegisterIds.length; index++) {
const e = patientRegisterIds[index];
try {
this.elProgress.percentage = Math.floor(index * 100 / patientRegisterIds.length)
let res = await postapi("/api/app/patient-register/delete-many", { patientRegisterIds: [e] });
if (res.code > -1) {
lfind = arrayExistObj(this.tableData, 'id', e)
if (lfind > -1) this.tableData.splice(lfind, 1)
this.loadOpts.totalCount = this.tableData.length
}
} catch (error) {
console.error('批量删除', error)
}
} }
this.dialogElProgress = false;
// return postapi("/api/app/patient-register/delete-many", {
// patientRegisterIds,
// });
}) })
// .then((res) => {
// if (res.code != -1) {
// // console.log("");
// this.dataTransOpts.tableS.patient_register.id = "";
// setTimeout(() => {
// this.dataTransOpts.refresh.register_check_asbitem.M++;
// }, 10);
// arrayReduce(this.tableData, this.multipleSelection, "id=id"); //
// // this.setForm(this.patientRegister.patientRegisterRdInit)
// // this.getPatientRegisterAbs();
// }
// })
.catch((err) => { .catch((err) => {
if (err == "cancel") { if (err == "cancel") {
this.$message.info({ showClose: true, message: "已取消操作" }); this.$message.info({ showClose: true, message: "已取消操作" });
@ -2206,10 +2218,10 @@ export default {
}, },
// //
previewCusGrant(row){
this.dialogWin.previewCusGrant = true
previewCusGrant(row) {
this.preCusGrantParams.patientRegisterId = row.id this.preCusGrantParams.patientRegisterId = row.id
this.preCusGrantParams.brushTimes++ this.preCusGrantParams.brushTimes++
this.dialogWin.previewCusGrant = true
}, },
// //
@ -2558,7 +2570,7 @@ export default {
return; return;
} }
this.elProgress.display = true;
this.dialogElProgress = true;
this.elProgress.percentage = 0; this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) { for (let i = 0; i < this.multipleSelection.length; i++) {
@ -2575,7 +2587,7 @@ export default {
((i + 1) * 100) / this.multipleSelection.length ((i + 1) * 100) / this.multipleSelection.length
); );
} }
this.elProgress.display = false;
this.dialogElProgress = false;
}, },
// //

Loading…
Cancel
Save