feat: Download Template File
This commit is contained in:
parent
8a0395da63
commit
d6546b4f89
5 changed files with 66 additions and 54 deletions
44
src/modules/03_recruiting/components/DialogHeadTemplate.vue
Normal file
44
src/modules/03_recruiting/components/DialogHeadTemplate.vue
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<script setup lang="ts">
|
||||
const props = defineProps({
|
||||
title: String,
|
||||
titleType: String,
|
||||
close: {
|
||||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
},
|
||||
});
|
||||
|
||||
const close = async () => {
|
||||
props.close();
|
||||
};
|
||||
|
||||
function onTemplate() {
|
||||
window.open(`/File/${props.titleType}.xlsx`, "_blank");
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<q-toolbar>
|
||||
<q-toolbar-title class="text-subtitle2 text-bold"
|
||||
>{{ title }}
|
||||
<q-btn
|
||||
icon="mdi-download"
|
||||
unelevated
|
||||
round
|
||||
color="blue"
|
||||
flat
|
||||
dense
|
||||
@click="onTemplate()"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดไฟล์ต้นแบบ</q-tooltip>
|
||||
</q-btn></q-toolbar-title
|
||||
>
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="close"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue