pengjun 1 year ago
parent
commit
bcf4881dac
  1. 161
      src/components/patientRegister/PatientRegisterList.vue

161
src/components/patientRegister/PatientRegisterList.vue

@ -176,8 +176,7 @@
<el-button type="" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button> <el-button type="" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
</div> </div>
<div v-show="checkPagePriv(pagePriv.privs, '人员检验检查条码')" class="listBtn"> <div v-show="checkPagePriv(pagePriv.privs, '人员检验检查条码')" class="listBtn">
<el-button type="" class="commonbutton" @click="guidePrint('0001', false)"
style="font-size: 12px;">人员检验检查条码</el-button>
<el-button type="" class="commonbutton" @click="printPromise()" style="font-size: 12px;">人员检验检查条码</el-button>
</div> </div>
<div v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn"> <div v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn">
<el-button type="" class="commonbutton" @click="btnExport('info')">人员信息导出</el-button> <el-button type="" class="commonbutton" @click="btnExport('info')">人员信息导出</el-button>
@ -657,6 +656,42 @@ export default {
}) })
}, },
printGuideLisPacs(row) {
return new Promise((resolve, reject) => {
this.guidePrintPromise("0008", false, row)
.then(res => {
resolve(res)
})
.catch(err => {
reject(err)
})
})
},
async printPromise() {
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
let row = this.multipleSelection[i]
try {
await printGuideLisPacs(row)
} catch (error) {
console.log('printPromise', error)
}
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.multipleSelection.length
);
}
this.elProgress.display = false;
},
handleSelectionChange(rows) { handleSelectionChange(rows) {
//this.multipleSelection = rows; //this.multipleSelection = rows;
//// console.log('this.multipleSelection',this.multipleSelection) //// console.log('this.multipleSelection',this.multipleSelection)
@ -1308,17 +1343,13 @@ export default {
this.lisPrint(row, "0003", false); this.lisPrint(row, "0003", false);
}, },
//
// promise
lisPrint(row, ReportCode, isPreview) { lisPrint(row, ReportCode, isPreview) {
if (row.completeFlag == '0') {
this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
return;
}
return new Promise((resolve, reject) => {
if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
if (row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!")
if (!this.$peisAPI) {
this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" });
return;
}
let token = window.sessionStorage.getItem("token"); let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user"); let user = window.sessionStorage.getItem("user");
@ -1336,76 +1367,26 @@ export default {
BusinessCode: row.id BusinessCode: row.id
}; };
console.log('this.$peisAPI.print', toOutShell)
if (isPreview) { if (isPreview) {
/*
postapi(
`/ api / app / printreport / getlisrequestreport ? PatientRegisterId = ${ prId }`
)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data };
// console.log(
"JSON.stringify(toOutShell)",
JSON.stringify(toOutShell)
);
return this.$peisAPI.printPre(JSON.stringify(toOutShell));
}
})
.catch((err) => {
this.$message.warning(err);
});
*/
this.$peisAPI.printPre(JSON.stringify(toOutShell)) this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => { .then(res => {
// console.log('this.$peisAPI.printPre', res) // console.log('this.$peisAPI.printPre', res)
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
}
})
.catch((err) => {
// console.log('', err)
this.$message.warning({ showClose: true, message: `${err}` });
});
if (JSON.parse(res).code > -1) {
resolve(JSON.parse(res))
} else { } else {
/*
postapi(
`/ api / app / printreport / getlisrequestreport ? PatientRegisterId = ${ prId }`
)
.then((res) => {
if (res.code != -1) {
toOutShell.ReportTable = { lisRequest: res.data };
// console.log(
"JSON.stringify(toOutShell)",
JSON.stringify(toOutShell)
);
return this.$peisAPI.print(JSON.stringify(toOutShell));
}
})
.then((res) => {
//// console.log("res", res);
if (JSON.parse(res).code >= 0) {
// /api/app/lisrequest/updatelisrequestisprint
// {
// "operateType": 0, 1.PatientRegisterId 2.LisRequestId
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
return postapi("/api/app/lisrequest/updatelisrequestisprint", {
operateType: 1,
patientRegisterId: prId,
});
reject(JSON.parse(res).message);
} }
}) })
.catch((err) => { .catch((err) => {
this.$message.warning(err);
reject(err);
}); });
*/
} else {
this.$peisAPI.print(JSON.stringify(toOutShell)) this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => { .then(res => {
if (JSON.parse(res).code < 0) { if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
reject(JSON.parse(res).message);
} else { } else {
return postapi("/api/app/lisrequest/updatelisrequestisprint", { return postapi("/api/app/lisrequest/updatelisrequestisprint", {
operateType: 1, operateType: 1,
@ -1415,26 +1396,24 @@ export default {
}) })
.then(res => { .then(res => {
if (res && res.code < 0) { if (res && res.code < 0) {
this.$message.error({ showClose: true, message: `${res.message}` });
reject(res.message);
} else {
resolve(res)
} }
}) })
.catch((err) => { .catch((err) => {
// console.log('', err)
this.$message.error({ showClose: true, message: `${err}` });
reject(err);
}); });
} }
})
}, },
//pacs //pacs
pacsPrint(row, ReportCode, isPreview) { pacsPrint(row, ReportCode, isPreview) {
if (row.completeFlag == '0') {
this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!" });
return;
}
if (!this.$peisAPI) {
this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" });
return;
}
return new Promise((resolve, reject) => {
if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
if (row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!")
let token = window.sessionStorage.getItem("token"); let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user"); let user = window.sessionStorage.getItem("user");
let toOutShell = { let toOutShell = {
@ -1450,31 +1429,35 @@ export default {
], ],
BusinessCode: row.id BusinessCode: row.id
}; };
console.log('this.$peisAPI.print', toOutShell)
// console.log('this.$peisAPI.print', toOutShell)
if (isPreview) { if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell)) this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => { .then(res => {
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
if (JSON.parse(res).code > -1) {
resolve(res)
} else {
reject(JSON.parse(res).message);
} }
}) })
.catch((err) => { .catch((err) => {
// console.log('pacs', err)
this.$message.warning({ showClose: true, message: `${err}` });
reject(err);
}); });
} else { } else {
this.$peisAPI.print(JSON.stringify(toOutShell)) this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => { .then(res => {
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
if (JSON.parse(res).code > -1) {
resolve(res)
} else {
reject(JSON.parse(res).message);
} }
}) })
.catch((err) => { .catch((err) => {
// console.log('pacs', err)
this.$message.error({ showClose: true, message: `${err}` });
reject(err);
}); });
} }
})
}, },
// //
importResult(checkType, row) { importResult(checkType, row) {
let url = '/api/app/ImportLisResult/ImportResultByPatientRegisterId' let url = '/api/app/ImportLisResult/ImportResultByPatientRegisterId'

Loading…
Cancel
Save