报告二维码

This commit is contained in:
旺仔 2024-09-24 12:23:57 +08:00
parent 9915776d9f
commit 301715cbd6
6 changed files with 86 additions and 11 deletions

4
.env
View File

@ -23,3 +23,7 @@ VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
VITE_APP_DEFAULT_LOGIN_TENANT = 芋道源码 VITE_APP_DEFAULT_LOGIN_TENANT = 芋道源码
VITE_APP_DEFAULT_LOGIN_USERNAME = VITE_APP_DEFAULT_LOGIN_USERNAME =
VITE_APP_DEFAULT_LOGIN_PASSWORD = VITE_APP_DEFAULT_LOGIN_PASSWORD =
# 自定义内容
# 云胶片
VITE_BASE_URL_YunJiaoPian='http://114.55.171.231:48081'

View File

@ -5,7 +5,9 @@ import request from '@/config/axios'
* ReportPrintStatisticsApi * ReportPrintStatisticsApi
*/ */
export const ReportPrintStatisticsApi = { export const ReportPrintStatisticsApi = {
/* 测试方法 */ getOrg: async (orgID: any) => {
return await request.get({ url: `/org/org/getone?orgID=` + orgID })
},
getDeviceList: async () => { getDeviceList: async () => {
return await request.get({ url: `/system/device/getlist` }) return await request.get({ url: `/system/device/getlist` })
}, },

View File

@ -44,6 +44,15 @@
<p>{{ infoParams.diagResults }}</p> <p>{{ infoParams.diagResults }}</p>
</div> </div>
<div style="width: 94%; position: absolute; bottom: 20px; right: 20px"> <div style="width: 94%; position: absolute; bottom: 20px; right: 20px">
<div style="text-align: center" v-if="infoParams.showQRcode">
<Qrcode
:text="
VITE_BASE_URL_YunJiaoPian + '?no=' + infoParams.regId + '&orgId=' + infoParams.orgId
"
:width="90"
/>
<div class="-mt-6px mb-1px" style="font-size: 11px">扫码查看云胶片</div>
</div>
<hr /> <hr />
<el-row style="font-size: 14px"> <el-row style="font-size: 14px">
<el-col :span="6" class="pl-6px">报告医师{{ infoParams.diagDoctor }}</el-col> <el-col :span="6" class="pl-6px">报告医师{{ infoParams.diagDoctor }}</el-col>
@ -74,6 +83,11 @@ defineOptions({ name: 'ReportInfoCT' })
**/ **/
/** 导入内容 **/ /** 导入内容 **/
const infoParams = defineProps({ const infoParams = defineProps({
showQRcode: {
type: Boolean,
default: false,
required: false
},
id: String, id: String,
examId: String, examId: String,
regId: String, regId: String,
@ -95,6 +109,8 @@ const infoParams = defineProps({
}) })
/** 数据内容 **/ /** 数据内容 **/
const VITE_BASE_URL_YunJiaoPian = ref(import.meta.env.VITE_BASE_URL_YunJiaoPian)
const age = computed(() => { const age = computed(() => {
let birthdate = infoParams.birthday let birthdate = infoParams.birthday
if (!birthdate) { if (!birthdate) {
@ -152,7 +168,7 @@ onMounted(async () => {})
} }
.ultrasound-recommendation { .ultrasound-recommendation {
margin-bottom: 90px; margin-bottom: 174px;
} }
.ultrasound-findings p, .ultrasound-findings p,

View File

@ -36,8 +36,17 @@
<h3>超声提示</h3> <h3>超声提示</h3>
<p>{{ infoParams.diagResults }}</p> <p>{{ infoParams.diagResults }}</p>
</div> </div>
<div style="position: absolute; bottom: 20px; right: 20px"> <div style="width: 94%; position: absolute; bottom: 20px; right: 20px">
<p>医生签名{{ infoParams.reviewDoctor }}</p> <div style="text-align: center" v-if="infoParams.showQRcode">
<Qrcode
:text="
VITE_BASE_URL_YunJiaoPian + '?no=' + infoParams.regId + '&orgId=' + infoParams.orgId
"
:width="90"
/>
<div class="-mt-6px -mb-8px" style="font-size: 11px">扫码查看云胶片</div>
</div>
<p style="text-align: right">医生签名{{ infoParams.reviewDoctor }}</p>
</div> </div>
</div> </div>
</template> </template>
@ -52,6 +61,11 @@ defineOptions({ name: 'ReportInfoUS' })
**/ **/
/** 导入内容 **/ /** 导入内容 **/
const infoParams = defineProps({ const infoParams = defineProps({
showQRcode: {
type: Boolean,
default: false,
required: false
},
id: String, id: String,
examId: String, examId: String,
regId: String, regId: String,
@ -73,6 +87,8 @@ const infoParams = defineProps({
}) })
/** 数据内容 **/ /** 数据内容 **/
const VITE_BASE_URL_YunJiaoPian = ref(import.meta.env.VITE_BASE_URL_YunJiaoPian)
const age = computed(() => { const age = computed(() => {
let birthdate = infoParams.birthday let birthdate = infoParams.birthday
if (!birthdate) { if (!birthdate) {
@ -148,7 +164,7 @@ onMounted(async () => {
} }
.ultrasound-recommendation { .ultrasound-recommendation {
margin-bottom: 90px; margin-bottom: 178px;
} }
.ultrasound-findings p, .ultrasound-findings p,

View File

@ -213,6 +213,7 @@
v-model="activeDrawer" v-model="activeDrawer"
direction="rtl" direction="rtl"
:with-header="false" :with-header="false"
:modal="activeDrawerModal"
:size="activeDrawerSize" :size="activeDrawerSize"
@opened="drawerOpened" @opened="drawerOpened"
@closed=" @closed="
@ -220,6 +221,7 @@
reportsList = [] reportsList = []
reportInfoType = '' reportInfoType = ''
activeTabName = '' activeTabName = ''
activeDrawerModal = true
activeDrawerSize = '74%' activeDrawerSize = '74%'
} }
" "
@ -409,10 +411,10 @@
</div> </div>
<div id="printMe"> <div id="printMe">
<template v-if="reportInfoType == 'us'"> <template v-if="reportInfoType == 'us'">
<ReportInfoUS v-bind="{ ...infoParams }" class="page-item" /> <ReportInfoUS v-bind="{ ...infoParams, showQRcode }" class="page-item" />
</template> </template>
<template v-if="reportInfoType == 'ct'"> <template v-if="reportInfoType == 'ct'">
<ReportInfoCT v-bind="{ ...infoParams }" class="page-item" /> <ReportInfoCT v-bind="{ ...infoParams, showQRcode }" class="page-item" />
</template> </template>
</div> </div>
<div style="margin-bottom: 40px"></div> <div style="margin-bottom: 40px"></div>
@ -447,11 +449,11 @@
v-if="index && index > 0" v-if="index && index > 0"
></div> ></div>
<ReportInfoUS <ReportInfoUS
v-bind="{ ...item }" v-bind="{ ...item, showQRcode }"
v-if="item.deviceType && item.deviceType.trim().toLowerCase() == 'us'" v-if="item.deviceType && item.deviceType.trim().toLowerCase() == 'us'"
class="page-item" class="page-item"
/> />
<ReportInfoCT v-bind="{ ...item }" v-else class="page-item" /> <ReportInfoCT v-bind="{ ...item, showQRcode }" v-else class="page-item" />
</template> </template>
</div> </div>
<div style="margin-bottom: 40px"></div> <div style="margin-bottom: 40px"></div>
@ -467,6 +469,8 @@
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import download from '@/utils/download' import download from '@/utils/download'
import { ReportPrintStatisticsApi } from '@/api/applyregistration/reportPrintStatistics' import { ReportPrintStatisticsApi } from '@/api/applyregistration/reportPrintStatistics'
import { getUserProfile } from '@/api/system/user/profile'
import { ElLoading } from 'element-plus'
import ReportInfoCT from './ReportInfoCT.vue' import ReportInfoCT from './ReportInfoCT.vue'
import ReportInfoUS from './ReportInfoUS.vue' import ReportInfoUS from './ReportInfoUS.vue'
@ -487,9 +491,11 @@ const printBatch = ref()
const message = useMessage() const message = useMessage()
const { t } = useI18n() const { t } = useI18n()
const activeDrawer = ref(false) const activeDrawer = ref(false)
const activeDrawerModal = ref(true)
const activeDrawerSize = ref<any>('74%') const activeDrawerSize = ref<any>('74%')
const activeTabName = ref('diagnosisInfo') const activeTabName = ref('diagnosisInfo')
const reportInfoType = ref('') //usct const reportInfoType = ref('') //usct
const showQRcode = ref(false)
const diagnosisInfo_readonly = ref(true) const diagnosisInfo_readonly = ref(true)
const age = ref<any>('') const age = ref<any>('')
const examItemNameEdit = ref('') const examItemNameEdit = ref('')
@ -579,13 +585,37 @@ const resetDiagnosisInfo = async () => {
infoFormRef.value?.clearValidate() infoFormRef.value?.clearValidate()
} }
const showQRcodeSet = async () => {
showQRcode.value = false
try {
let orgInfo: any = null
let userInfo = await getUserProfile()
if (userInfo && userInfo.orgId)
orgInfo = await ReportPrintStatisticsApi.getOrg(userInfo.orgId.trim())
if (orgInfo && orgInfo.enableCloudDicom && orgInfo.enableCloudDicom.trim() == '1')
showQRcode.value = true
} catch {
showQRcode.value = false
}
}
/****** 可参考内容 ******/ /****** 可参考内容 ******/
/** 组件事件 **/ /** 组件事件 **/
const drawerOpened = async () => { const drawerOpened = async () => {
try { try {
if (true && activeTabName && activeTabName.value == 'reportInfoBatch') { if (true && activeTabName && activeTabName.value == 'reportInfoBatch') {
printBatch.value.$el.click() const loading = ElLoading.service({
lock: true,
text: '打印加载中',
background: 'rgba(0, 0, 0, 0.74)'
})
nextTick(() => {
setTimeout(() => {
printBatch.value?.$el?.click() //?Esc
loading.close()
activeDrawer.value = false activeDrawer.value = false
}, 2500)
})
} }
} finally { } finally {
} }
@ -626,6 +656,7 @@ const getList = async () => {
const handleQuery = async () => { const handleQuery = async () => {
queryParams.value.pageNo = 1 queryParams.value.pageNo = 1
getList() getList()
await showQRcodeSet()
} }
const resetQuery = async () => { const resetQuery = async () => {
@ -654,6 +685,7 @@ const handleRowClick = async (row) => {
if (row.deviceType && row.deviceType.trim().toLowerCase() == 'us') reportInfoType.value = 'us' if (row.deviceType && row.deviceType.trim().toLowerCase() == 'us') reportInfoType.value = 'us'
else reportInfoType.value = 'ct' else reportInfoType.value = 'ct'
} }
await showQRcodeSet()
activeTabName.value = 'diagnosisInfo' activeTabName.value = 'diagnosisInfo'
activeDrawer.value = true activeDrawer.value = true
} }
@ -675,7 +707,9 @@ const handlePrint = async () => {
return compare return compare
}) })
reportsList.value = infoList reportsList.value = infoList
await showQRcodeSet()
activeTabName.value = 'reportInfoBatch' activeTabName.value = 'reportInfoBatch'
activeDrawerModal.value = false
activeDrawerSize.value = 0.01 activeDrawerSize.value = 0.01
activeDrawer.value = true activeDrawer.value = true
} }
@ -685,6 +719,7 @@ const handlePrint = async () => {
onMounted(async () => { onMounted(async () => {
deviceList.value = await ReportPrintStatisticsApi.getDeviceList() deviceList.value = await ReportPrintStatisticsApi.getDeviceList()
getList() getList()
await showQRcodeSet()
}) })
/** 防空作用域 **/ /** 防空作用域 **/

2
types/env.d.ts vendored
View File

@ -26,6 +26,8 @@ interface ImportMetaEnv {
readonly VITE_DROP_CONSOLE: string readonly VITE_DROP_CONSOLE: string
readonly VITE_SOURCEMAP: string readonly VITE_SOURCEMAP: string
readonly VITE_OUT_DIR: string readonly VITE_OUT_DIR: string
//自定义内容
readonly VITE_BASE_URL_YunJiaoPian: string
} }
declare global { declare global {