fix:
This commit is contained in:
parent
6288114e78
commit
3d5405d676
3 changed files with 47 additions and 175 deletions
|
|
@ -324,81 +324,31 @@ onMounted(async () => {
|
|||
</q-card-section>
|
||||
|
||||
<q-page-sticky position="bottom-right" :offset="[20, 20]">
|
||||
<q-btn-dropdown color="primary" icon="download" fab>
|
||||
<q-list>
|
||||
<q-item clickable v-close-popup @click="downloadCover('pdf')">
|
||||
<q-item-section avatar>
|
||||
<q-icon name="mdi-file-pdf" color="red" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>ดาวน์โหลดไฟล์ PDF</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="tab === 'main'"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadCover('docx')"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon name="mdi-file-word" color="blue" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>ดาวน์โหลดไฟล์ Word</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-else
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadCover('xlsx')"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon name="mdi-file-excel" color="green" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>ดาวน์โหลดไฟล์ xlsx</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
<!-- <q-btn fab size="xl" icon="mdi-download" color="primary">
|
||||
<q-menu>
|
||||
<q-list dense style="min-width: 180px">
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-tooltip>ประวัติการแก้ไข</q-tooltip>
|
||||
<q-icon
|
||||
color="deep-purple"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
name="mdi-history"
|
||||
size="xs"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>ประวัติการแก้ไข</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section style="min-width: 0px" avatar>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
<q-icon
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="info"
|
||||
name="mdi-eye"
|
||||
size="xs"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>รายละเอียด</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
<q-tooltip>ดาวน์โหลดไฟล์ PDF</q-tooltip>
|
||||
</q-btn> -->
|
||||
<q-fab color="primary" icon="download" direction="up">
|
||||
<q-fab-action
|
||||
color="red"
|
||||
@click="downloadCover('pdf')"
|
||||
icon="mdi-file-pdf"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดไฟล์ PDF</q-tooltip>
|
||||
</q-fab-action>
|
||||
<q-fab-action
|
||||
v-if="tab === 'main'"
|
||||
color="blue"
|
||||
@click="downloadCover('docx')"
|
||||
icon="mdi-file-word"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดไฟล์ DOCX</q-tooltip>
|
||||
</q-fab-action>
|
||||
<q-fab-action
|
||||
v-else
|
||||
color="green"
|
||||
@click="downloadCover('xlsx')"
|
||||
icon="mdi-file-excel"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดไฟล์ XLSX</q-tooltip>
|
||||
</q-fab-action>
|
||||
</q-fab>
|
||||
</q-page-sticky>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
|
|
|||
|
|
@ -175,88 +175,6 @@ watch(modal, (val) => {
|
|||
<q-tooltip>ดาวน์โหลดไฟล์ PDF</q-tooltip>
|
||||
</q-btn>
|
||||
</q-page-sticky>
|
||||
|
||||
<!-- <q-card-section
|
||||
v-if="isLoadPDF"
|
||||
bordered
|
||||
class="card-pdf q-ma-md q-pa-md scroll"
|
||||
style="max-height: 90vh"
|
||||
>
|
||||
<div class="justify-between items-center align-center q-pb-sm row">
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page > 1 ? page - 1 : page"
|
||||
>
|
||||
<q-icon name="mdi-chevron-left" />
|
||||
</q-btn>
|
||||
|
||||
<span class="body-2 grey--text text-black">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</span>
|
||||
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page < numOfPages ? page + 1 : page"
|
||||
>
|
||||
<q-icon name="mdi-chevron-right" />
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="pdfWidth">
|
||||
<VuePDF
|
||||
ref="vuePDFRef"
|
||||
:pdf="pdfSrc"
|
||||
:page="page"
|
||||
fit-parent
|
||||
:scale="0.1"
|
||||
/>
|
||||
</div>
|
||||
<div class="justify-between items-center align-center q-pt-sm row">
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page > 1 ? page - 1 : page"
|
||||
>
|
||||
<q-icon name="mdi-chevron-left" />
|
||||
</q-btn>
|
||||
|
||||
<span class="body-2 grey--text text-black">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</span>
|
||||
|
||||
<q-btn
|
||||
class="text-dark bg-grey-4"
|
||||
flat
|
||||
dense
|
||||
@click="page = page < numOfPages ? page + 1 : page"
|
||||
>
|
||||
<q-icon name="mdi-chevron-right" />
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-card-section> -->
|
||||
|
||||
<!-- <q-card-section v-else>
|
||||
<div class="full-width row flex-center text-accent q-gutter-sm">
|
||||
<span
|
||||
><div
|
||||
style="
|
||||
height: 60vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
class="text-grey-5"
|
||||
>
|
||||
<q-spinner color="primary" size="3em" :thickness="10" />
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</q-card-section> -->
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue