ดาวโหลดไฟล์
This commit is contained in:
parent
39b14d7026
commit
6bf655220a
2 changed files with 27 additions and 3 deletions
|
|
@ -184,7 +184,9 @@ async function fetchProfileGov(id: string) {
|
|||
|
||||
function redirecToRegistry() {
|
||||
router.push(
|
||||
`/registry-${props.type.toLocaleLowerCase() == "employee" ? "employee" : "officer"}/${props.id}`
|
||||
`/registry-${
|
||||
props.type.toLocaleLowerCase() == "employee" ? "employee" : "officer"
|
||||
}/${props.id}`
|
||||
);
|
||||
modal.value = false;
|
||||
}
|
||||
|
|
@ -499,7 +501,9 @@ async function fetchProfile(id: string, avatarName: string) {
|
|||
<q-card
|
||||
bordered
|
||||
style="border: 1px solid #d6dee1"
|
||||
v-if="checkRoute && props.type.toLocaleLowerCase() === 'officer'"
|
||||
v-if="
|
||||
checkRoute && props.type.toLocaleLowerCase() === 'officer'
|
||||
"
|
||||
>
|
||||
<CardPosition :id="props.id" :type="props.type" />
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -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