ดาวโหลดไฟล์
This commit is contained in:
parent
39b14d7026
commit
6bf655220a
2 changed files with 27 additions and 3 deletions
|
|
@ -37,6 +37,7 @@ const {
|
|||
const myForm = ref<QForm | null>(null);
|
||||
|
||||
/** ตัวแปร */
|
||||
const linkFile = ref<string>("");
|
||||
const modal = ref<boolean>(false);
|
||||
const retireld_params = route.params.retirementId;
|
||||
const retireld = ref<string>(retireld_params.toString());
|
||||
|
|
@ -166,6 +167,7 @@ async function fetchlistprofile(id: string) {
|
|||
typeReport.value = data.typeReport;
|
||||
textReport.value = data.detail;
|
||||
employeeType.value = data.type;
|
||||
linkFile.value = data.file;
|
||||
|
||||
// รายชื่อผู้เกษียณอายุราชการ
|
||||
if (data.profile !== null) {
|
||||
|
|
@ -433,8 +435,13 @@ async function onSearch() {
|
|||
);
|
||||
}
|
||||
|
||||
function downloadFile(path: string) {
|
||||
window.open(path);
|
||||
}
|
||||
|
||||
/** Hook */
|
||||
onMounted(async () => {
|
||||
linkFile.value = "";
|
||||
retireld.value = retireld_params.toString();
|
||||
await fetchlistprofile(retireld.value);
|
||||
});
|
||||
|
|
@ -474,7 +481,20 @@ onMounted(async () => {
|
|||
>
|
||||
<q-tooltip>เพิ่มรายชื่อ</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn color="primary" flat round icon="mdi-dots-vertical">
|
||||
<q-btn
|
||||
v-if="statusUpload"
|
||||
outline
|
||||
color="primary"
|
||||
@click="downloadFile(linkFile)"
|
||||
>ดาวน์โหลดไฟล์</q-btn
|
||||
>
|
||||
<q-btn
|
||||
color="primary"
|
||||
flat
|
||||
round
|
||||
icon="mdi-dots-vertical"
|
||||
v-if="!statusUpload"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 100px">
|
||||
<q-item
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue