|
|
@@ -0,0 +1,103 @@
|
|
|
+<template>
|
|
|
+ <div class="layout_container layout-horizontal digital-rx">
|
|
|
+ <aside class="layout_el-table">
|
|
|
+ <div class="rx-list-header">电子处方列表</div>
|
|
|
+ <el-table :data="rxList" stripe highlight-current-row @row-click="handleClickRow">
|
|
|
+ <el-table-column prop="rxTraceCode" label="处方追溯码" width="150"></el-table-column>
|
|
|
+ <el-table-column prop="patnName" label="患者姓名" width="90"></el-table-column>
|
|
|
+ <el-table-column prop="prscDrName" label="处方开具医师" width="100"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </aside>
|
|
|
+ <div class="layout_main layout_container">
|
|
|
+ <header class="round-header">
|
|
|
+ <el-button type="primary" @click="doRxSign">处方签名</el-button>
|
|
|
+ <el-button type="primary" @click="doRxUpload">处方上传</el-button>
|
|
|
+ <el-button type="primary" @click="doRxInfoQuery">处方信息查询</el-button>
|
|
|
+ <el-button type="primary" @click="doRxAuditingQuery">处方审核查询</el-button>
|
|
|
+ <el-button type="primary" @click="doRxSettleQuery">处方结算查询</el-button>
|
|
|
+ <el-button type="danger" @click="doRxRevoke">撤销处方上传</el-button>
|
|
|
+ </header>
|
|
|
+ <div class="layout_main">
|
|
|
+ <iframe class="layout_full_iframe" :src="pdfSrc" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+
|
|
|
+import {getRxForAuditing, rxSign, rxUpload} from "@/api/medical-insurance/si-outpatient";
|
|
|
+import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
+
|
|
|
+const rxList = ref([])
|
|
|
+
|
|
|
+const pdfSrc = ref('')
|
|
|
+const currentRow = ref({})
|
|
|
+
|
|
|
+function handleClickRow(row) {
|
|
|
+ currentRow.value = row
|
|
|
+ showPDF('data:application/pdf;base64,' + row.rxFile)
|
|
|
+}
|
|
|
+
|
|
|
+function showPDF(base64) {
|
|
|
+ const blob = base64ToBlob(base64);
|
|
|
+ pdfSrc.value = URL.createObjectURL(blob)
|
|
|
+}
|
|
|
+
|
|
|
+function base64ToBlob(base64) {
|
|
|
+ const parts = base64.split(';base64,');
|
|
|
+ const contentType = parts[0].split(':')[1];
|
|
|
+ const raw = window.atob(parts[1]);
|
|
|
+ const rawLength = raw.length;
|
|
|
+ const uInt8Array = new Uint8Array(rawLength);
|
|
|
+ for (let i = 0; i < rawLength; ++i) {
|
|
|
+ uInt8Array[i] = raw.charCodeAt(i);
|
|
|
+ }
|
|
|
+ return new Blob([uInt8Array], {type: contentType});
|
|
|
+}
|
|
|
+
|
|
|
+function doRxSign() {
|
|
|
+ rxSign({
|
|
|
+ patientId: currentRow.value.patientId,
|
|
|
+ times: currentRow.value.times
|
|
|
+ }).then(res => {
|
|
|
+ xcMessage.success('签名成功。')
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function doRxUpload() {
|
|
|
+ rxUpload({
|
|
|
+ patientId: currentRow.value.patientId,
|
|
|
+ times: currentRow.value.times
|
|
|
+ }).then(res => {
|
|
|
+ xcMessage.success('上传成功。')
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function doRxInfoQuery() {}
|
|
|
+
|
|
|
+function doRxAuditingQuery() {}
|
|
|
+
|
|
|
+function doRxSettleQuery() {}
|
|
|
+
|
|
|
+function doRxRevoke() {}
|
|
|
+
|
|
|
+onActivated(() => {
|
|
|
+ getRxForAuditing().then(res => {
|
|
|
+ rxList.value = res
|
|
|
+ })
|
|
|
+})
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+.digital-rx {
|
|
|
+ .rx-list-header {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: 40px;
|
|
|
+ background-color: white;
|
|
|
+ padding-left: 4px;
|
|
|
+ border-bottom: 1px solid lightgrey;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|