✨ feat (general-consent): display file url in diagnose dialog
This commit is contained in:
@@ -37,6 +37,7 @@ const model = ref({
|
||||
witness2: '',
|
||||
})
|
||||
|
||||
const fileUrl = ref('')
|
||||
const isLoading = reactive<DataTableLoader>({
|
||||
isTableLoading: false,
|
||||
})
|
||||
@@ -76,7 +77,6 @@ const loadEntryForEdit = async (id: number) => {
|
||||
const data = result.body?.data || {}
|
||||
|
||||
const value = JSON.parse(data.value || '{}')
|
||||
console.log('Mapping data:', value)
|
||||
model.value.witness1 = value?.witness1 || ''
|
||||
model.value.witness2 = value?.witness2 || ''
|
||||
model.value.informant = value?.informant || ''
|
||||
@@ -103,6 +103,9 @@ async function actionHandler(type: string) {
|
||||
return
|
||||
}
|
||||
if (type === 'print') {
|
||||
const data = await getDetail(recordId.value)
|
||||
const detail = data.body?.data
|
||||
fileUrl.value = detail?.fileUrl
|
||||
isOpenDiagnose.value = true
|
||||
return
|
||||
}
|
||||
@@ -173,8 +176,9 @@ provide('icdPreview', icdPreview)
|
||||
size="xl"
|
||||
prevent-outside
|
||||
>
|
||||
<div class="my-2 flex justify-end py-2">
|
||||
<ActionDialog @click="actionDialogHandler" />
|
||||
</div>
|
||||
<embed
|
||||
style="width: 100%; height: 90vh"
|
||||
:src="fileUrl"
|
||||
/>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user