fix: open dms file in new window instead of downloading it automatically to equal salix behavior
gitea/salix-front/pipeline/pr-master This commit is unstable Details

This commit is contained in:
Jon Elias 2025-04-24 12:27:58 +02:00
parent c5fb889b75
commit 7c699e9022
1 changed files with 3 additions and 6 deletions

View File

@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useQuasar, QCheckbox, QBtn, QInput } from 'quasar'; import { useQuasar, QCheckbox, QBtn, QInput } from 'quasar';
import axios from 'axios'; import axios from 'axios';
import { usePrintService } from 'composables/usePrintService';
import VnUserLink from '../ui/VnUserLink.vue'; import VnUserLink from '../ui/VnUserLink.vue';
import { downloadFile } from 'src/composables/downloadFile'; import { downloadFile } from 'src/composables/downloadFile';
@ -21,6 +22,7 @@ const rows = ref([]);
const dmsRef = ref(); const dmsRef = ref();
const formDialog = ref({}); const formDialog = ref({});
const token = useSession().getTokenMultimedia(); const token = useSession().getTokenMultimedia();
const { openReport } = usePrintService();
const $props = defineProps({ const $props = defineProps({
model: { model: {
@ -198,12 +200,7 @@ const columns = computed(() => [
color: 'primary', color: 'primary',
}), }),
click: (prop) => click: (prop) =>
downloadFile( openReport(`dms/${prop.row.id}/downloadFile`, {}, '_blank'),
prop.row.id,
$props.downloadModel,
undefined,
prop.row.download,
),
}, },
{ {
component: QBtn, component: QBtn,