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

301
src/components/patientRegister/PatientRegisterList.vue

@ -176,8 +176,7 @@
<el-button type="" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
</div>
<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 v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn">
<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) {
//this.multipleSelection = rows;
//// console.log('this.multipleSelection',this.multipleSelection)
@ -1308,173 +1343,121 @@ export default {
this.lisPrint(row, "0003", false);
},
//
// promise
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 user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
IsMoreLabel: 'Y',
isBuildImage: 'N',
IsUploadPdf: 'N',
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
BusinessCode: row.id
};
console.log('this.$peisAPI.print', toOutShell)
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))
.then(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}` });
});
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
IsMoreLabel: 'Y',
isBuildImage: 'N',
IsUploadPdf: 'N',
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
BusinessCode: row.id
};
} 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,
});
}
})
.catch((err) => {
this.$message.warning(err);
});
*/
this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => {
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
} else {
return postapi("/api/app/lisrequest/updatelisrequestisprint", {
operateType: 1,
patientRegisterId: row.id,
});
}
})
.then(res => {
if (res && res.code < 0) {
this.$message.error({ showClose: true, message: `${res.message}` });
}
})
.catch((err) => {
// console.log('', err)
this.$message.error({ showClose: true, message: `${err}` });
});
}
if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => {
// console.log('this.$peisAPI.printPre', res)
if (JSON.parse(res).code > -1) {
resolve(JSON.parse(res))
} else {
reject(JSON.parse(res).message);
}
})
.catch((err) => {
reject(err);
});
} else {
this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => {
if (JSON.parse(res).code < 0) {
reject(JSON.parse(res).message);
} else {
return postapi("/api/app/lisrequest/updatelisrequestisprint", {
operateType: 1,
patientRegisterId: row.id,
});
}
})
.then(res => {
if (res && res.code < 0) {
reject(res.message);
} else {
resolve(res)
}
})
.catch((err) => {
reject(err);
});
}
})
},
//pacs
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;
}
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
IsMoreLabel: 'Y',
isBuildImage: 'N',
IsUploadPdf: 'N',
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
BusinessCode: row.id
};
console.log('this.$peisAPI.print', toOutShell)
if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => {
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
}
})
.catch((err) => {
// console.log('pacs', err)
this.$message.warning({ showClose: true, message: `${err}` });
});
} else {
this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => {
if (JSON.parse(res).code < 0) {
this.$message.warning({ showClose: true, message: JSON.parse(res).message });
}
})
.catch((err) => {
// console.log('pacs', err)
this.$message.error({ showClose: true, message: `${err}` });
});
}
return new Promise((resolve, reject) => {
if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
if (row.completeFlag || row.completeFlag == '0') reject("预登记人员,不可执行此操作!")
let token = window.sessionStorage.getItem("token");
let user = window.sessionStorage.getItem("user");
let toOutShell = {
ReportCode,
token,
IsMoreLabel: 'Y',
isBuildImage: 'N',
IsUploadPdf: 'N',
preViewCanPrint: "N",
Parameters: [
{ Name: "printer", Value: user },
{ Name: "hisLog", Value: "pic/hisLog.jpg" },
],
BusinessCode: row.id
};
// console.log('this.$peisAPI.print', toOutShell)
if (isPreview) {
this.$peisAPI.printPre(JSON.stringify(toOutShell))
.then(res => {
if (JSON.parse(res).code > -1) {
resolve(res)
} else {
reject(JSON.parse(res).message);
}
})
.catch((err) => {
reject(err);
});
} else {
this.$peisAPI.print(JSON.stringify(toOutShell))
.then(res => {
if (JSON.parse(res).code > -1) {
resolve(res)
} else {
reject(JSON.parse(res).message);
}
})
.catch((err) => {
reject(err);
});
}
})
},
//
importResult(checkType, row) {
let url = '/api/app/ImportLisResult/ImportResultByPatientRegisterId'

Loading…
Cancel
Save