ปรับ ui รายงาน
This commit is contained in:
parent
ebb5d0e65f
commit
8a6d34a02f
10 changed files with 4166 additions and 3079 deletions
|
|
@ -26,6 +26,10 @@ const route = useRoute();
|
|||
const { fetchStructureTree } = useStructureTree();
|
||||
const { messageError, showLoader, hideLoader } = useCounterMixin();
|
||||
|
||||
const expandedModal = ref<boolean>(false);
|
||||
const org = ref<string>("");
|
||||
const isLoadStructureTree = ref<boolean>(true);
|
||||
|
||||
const employeeClass = ref<string>("officer");
|
||||
const employeeClassOption = ref<OptionData[]>([
|
||||
{ id: "officer", name: "ข้าราชการ กทม. สามัญ" },
|
||||
|
|
@ -85,8 +89,16 @@ const pdfSrc = ref<any>();
|
|||
|
||||
const isLoadPDF = ref<boolean>(false);
|
||||
|
||||
/** ฟังก์ชันเรียกข้อมูลโครงสร้างหน่วยงาน*/
|
||||
async function fetchDataTree() {
|
||||
node.value = await fetchStructureTree(route.meta.Key as string, true);
|
||||
try {
|
||||
isLoadStructureTree.value = true;
|
||||
node.value = await fetchStructureTree(route.meta.Key as string, true);
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
} finally {
|
||||
isLoadStructureTree.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/** ฟังก์ชันคึงข้อมูลรอบการเสนอขอ*/
|
||||
|
|
@ -156,10 +168,11 @@ function filterSelector(val: string, update: Function, name: string) {
|
|||
* @param id id หน่วยงาน
|
||||
* @param level ระดับหน่วยงาน
|
||||
*/
|
||||
function onSelectedNode(id: string, level: number) {
|
||||
nodeId.value = id;
|
||||
nodeLevel.value = level;
|
||||
onUpdateFilter();
|
||||
function onSelectedNode(data: any) {
|
||||
nodeId.value = data.orgTreeDnaId;
|
||||
nodeLevel.value = data.orgLevel;
|
||||
org.value = data.orgName;
|
||||
expandedModal.value = false;
|
||||
}
|
||||
|
||||
const detailReport = ref<any>();
|
||||
|
|
@ -310,6 +323,18 @@ function downloadReport(type: string, download: "docx" | "" | "xlsx" = "") {
|
|||
}
|
||||
}
|
||||
|
||||
function clearFilter() {
|
||||
detailReport.value = undefined;
|
||||
pdfSrc.value = undefined;
|
||||
employeeClass.value = "officer";
|
||||
roundId.value = "";
|
||||
roundId2.value = "";
|
||||
typeReport.value = "";
|
||||
org.value = "";
|
||||
nodeId.value = "";
|
||||
nodeLevel.value = 0;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await Promise.all([fetchDataTree(), fecthlistRound(), fecthlistRound2()]);
|
||||
});
|
||||
|
|
@ -319,333 +344,399 @@ onMounted(async () => {
|
|||
<div class="toptitle text-dark col-12 row items-center">
|
||||
รายงานเครื่องราชอิสริยาภรณ์
|
||||
</div>
|
||||
|
||||
<div class="q-pa-sm q-gutter-sm">
|
||||
<q-card flat bordered class="col-12">
|
||||
<div class="row q-col-gutter-sm q-pa-sm">
|
||||
<div class="row col-12">
|
||||
<q-select
|
||||
outlined
|
||||
dense
|
||||
v-model="employeeClass"
|
||||
:options="employeeClassOption"
|
||||
label="สถานภาพ"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
style="width: 230px"
|
||||
@update:model-value="onUpdateFilter"
|
||||
>
|
||||
</q-select>
|
||||
|
||||
<q-space />
|
||||
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
:loading="isLoadPDF"
|
||||
:disable="!nodeId || !employeeClass || (!roundId && !roundId2)"
|
||||
color="primary"
|
||||
icon="download"
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
downloadReport(
|
||||
'pdf',
|
||||
!['report1', 'report2', 'report3'].includes(
|
||||
typeReport.val
|
||||
)
|
||||
? 'xlsx'
|
||||
: 'docx'
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar
|
||||
><q-icon color="red" name="mdi-file-pdf"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .pdf</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
typeReport.val == 'report1' ||
|
||||
typeReport.val == 'report2' ||
|
||||
typeReport.val == 'report3'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadReport('docx')"
|
||||
>
|
||||
<q-item-section avatar
|
||||
><q-icon color="blue" name="mdi-file-word"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadReport('xlsx')"
|
||||
v-if="typeReport.val !== 'report1'"
|
||||
>
|
||||
<q-item-section avatar
|
||||
><q-icon color="green" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .xlsx</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<div class="row col-12">
|
||||
<q-card bordered class="col-12 filter-card q-pa-sm">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<q-select
|
||||
class="bg-white"
|
||||
hide-bottom-space
|
||||
outlined
|
||||
dense
|
||||
lazy-rules
|
||||
borderless
|
||||
v-model="typeReport"
|
||||
:label="`${'รายงาน'}`"
|
||||
map-options
|
||||
:options="employeeClass == 'officer' ? optionReport.filter((item:any)=>item.id !== '7'):optionReport.filter((item:any)=>item.id !== '4')"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
@update:model-value="onUpdateFilter"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<q-select
|
||||
v-if="
|
||||
typeReport &&
|
||||
(typeReport.val == 'report1' ||
|
||||
typeReport.val == 'report2' ||
|
||||
typeReport.val == 'report3')
|
||||
"
|
||||
class="bg-white"
|
||||
use-input
|
||||
fill-input
|
||||
hide-selected
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
v-model="roundId"
|
||||
:options="roundOtion"
|
||||
label="เลือกรอบ"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
@update:model-value="onUpdateFilter"
|
||||
@filter="(inputValue:string,doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn,'round') "
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
|
||||
<q-select
|
||||
v-else
|
||||
class="bg-white"
|
||||
use-input
|
||||
fill-input
|
||||
hide-selected
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
v-model="roundId2"
|
||||
:options="roundOtion2"
|
||||
label="เลือกรอบ"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
@update:model-value="onUpdateFilter"
|
||||
@filter="(inputValue:string,doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn,'round') "
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
<q-form greedy @submit.prevent @validation-success="onUpdateFilter">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<q-card class="q-pa-sm">
|
||||
<div class="row q-col-gutter-sm no-wrap">
|
||||
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-12">
|
||||
<q-select
|
||||
outlined
|
||||
dense
|
||||
v-model="employeeClass"
|
||||
:options="employeeClassOption"
|
||||
label="สถานภาพ"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
style="width: 230px"
|
||||
>
|
||||
</q-select>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<q-space />
|
||||
<div>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
:loading="isLoadPDF"
|
||||
:disable="!detailReport"
|
||||
color="primary"
|
||||
icon="download"
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
downloadReport(
|
||||
'pdf',
|
||||
!['report1', 'report2', 'report3'].includes(
|
||||
typeReport.val
|
||||
)
|
||||
? 'xlsx'
|
||||
: 'docx'
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar
|
||||
><q-icon color="red" name="mdi-file-pdf"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .pdf</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
typeReport.val == 'report1' ||
|
||||
typeReport.val == 'report2' ||
|
||||
typeReport.val == 'report3'
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadReport('docx')"
|
||||
>
|
||||
<q-item-section avatar
|
||||
><q-icon color="blue" name="mdi-file-word"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadReport('xlsx')"
|
||||
v-if="typeReport.val !== 'report1'"
|
||||
>
|
||||
<q-item-section avatar
|
||||
><q-icon color="green" name="mdi-file-excel"
|
||||
/></q-item-section>
|
||||
<q-item-section>ไฟล์ .xlsx</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-card>
|
||||
<q-card flat bordered class="col-12">
|
||||
<q-card-section :horizontal="$q.screen.gt.sm">
|
||||
<q-card-section class="col-lg-3 col-md-4 col-xs-12 q-gutter-sm">
|
||||
<div class="col">
|
||||
<q-input dense outlined v-model="filterTree" label="ค้นหา">
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div class="bg-white tree-container q-pa-xs">
|
||||
<q-tree
|
||||
dense
|
||||
:nodes="node"
|
||||
node-key="orgTreeId"
|
||||
label-key="labelName"
|
||||
v-model:expanded="expanded"
|
||||
:filter="filterTree.trim()"
|
||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||
no-nodes-label="ไม่มีข้อมูล"
|
||||
>
|
||||
<template v-slot:default-header="prop">
|
||||
<q-item
|
||||
@click.stop="
|
||||
onSelectedNode(prop.node.orgTreeDnaId, prop.node.orgLevel)
|
||||
"
|
||||
:active="nodeId === prop.node.orgTreeDnaId"
|
||||
clickable
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||
<div class="col-12">
|
||||
<q-card class="q-pa-sm">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col">
|
||||
<q-card flat bordered>
|
||||
<q-card-section
|
||||
bordered
|
||||
class="bg-primary text-subtitle2 text-white q-pa-sm row items-center"
|
||||
>
|
||||
<div>
|
||||
<div class="text-weight-medium">
|
||||
{{ prop.node.orgTreeName }}
|
||||
</div>
|
||||
<div class="text-weight-light text-grey-8">
|
||||
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
|
||||
{{
|
||||
prop.node.orgTreeShortName == null
|
||||
? null
|
||||
: prop.node.orgTreeShortName
|
||||
}}
|
||||
<q-icon name="mdi-filter" class="q-mr-xs" />
|
||||
ตัวกรอง
|
||||
<q-space />
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
class="q-px-sm"
|
||||
rounded
|
||||
flat
|
||||
label="ล้างทั้งหมด"
|
||||
@click.stop.pervent="clearFilter"
|
||||
/>
|
||||
</q-card-section>
|
||||
<q-card-section class="q-pa-none">
|
||||
<div class="col-12">
|
||||
<q-expansion-item
|
||||
v-model="expandedModal"
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
class="expansion-item"
|
||||
>
|
||||
<template #header>
|
||||
<div class="full-width flex items-stretch">
|
||||
<q-input
|
||||
dense
|
||||
:model-value="org"
|
||||
autogrow
|
||||
borderless
|
||||
label="สังกัด"
|
||||
class="bg-white full-width"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<!-- @click="onOpenOrg" -->
|
||||
</template>
|
||||
<q-separator />
|
||||
|
||||
<q-card-section v-if="isLoadStructureTree">
|
||||
<LoadView />
|
||||
</q-card-section>
|
||||
<q-card-section v-else>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="filterTree"
|
||||
label="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
v-if="filterTree !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="filterTree = ''"
|
||||
/>
|
||||
<q-icon v-else name="search" color="grey-5" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-tree
|
||||
dense
|
||||
:nodes="node"
|
||||
node-key="orgTreeId"
|
||||
label-key="labelName"
|
||||
v-model:expanded="expanded"
|
||||
:filter="filterTree.trim()"
|
||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||
no-nodes-label="ไม่มีข้อมูล"
|
||||
class="tree-container-report q-mt-sm"
|
||||
>
|
||||
<template v-slot:default-header="prop">
|
||||
<q-item
|
||||
@click.stop="onSelectedNode(prop.node)"
|
||||
:active="nodeId === prop.node.orgTreeId"
|
||||
clickable
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||
>
|
||||
<div>
|
||||
<div class="text-weight-medium">
|
||||
{{ prop.node.orgTreeName }}
|
||||
</div>
|
||||
<div class="text-weight-light text-grey-8">
|
||||
{{
|
||||
prop.node.orgCode == null
|
||||
? null
|
||||
: prop.node.orgCode
|
||||
}}
|
||||
{{
|
||||
prop.node.orgTreeShortName == null
|
||||
? null
|
||||
: prop.node.orgTreeShortName
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-tree>
|
||||
</q-card-section>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12 q-px-sm">
|
||||
<q-select
|
||||
class="bg-white"
|
||||
hide-bottom-space
|
||||
dense
|
||||
lazy-rules
|
||||
borderless
|
||||
v-model="typeReport"
|
||||
:label="`${'รายงาน'}`"
|
||||
map-options
|
||||
:options="employeeClass == 'officer' ? optionReport.filter((item:any)=>item.id !== '7'):optionReport.filter((item:any)=>item.id !== '4')"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
/>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12 q-px-sm">
|
||||
<q-select
|
||||
v-if="
|
||||
typeReport &&
|
||||
(typeReport.val == 'report1' ||
|
||||
typeReport.val == 'report2' ||
|
||||
typeReport.val == 'report3')
|
||||
"
|
||||
class="bg-white"
|
||||
use-input
|
||||
fill-input
|
||||
hide-selected
|
||||
dense
|
||||
borderless
|
||||
lazy-rules
|
||||
v-model="roundId"
|
||||
:options="roundOtion"
|
||||
label="เลือกรอบ"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
@filter="(inputValue:string,doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn,'round') "
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
|
||||
<q-select
|
||||
v-else
|
||||
class="bg-white"
|
||||
use-input
|
||||
fill-input
|
||||
hide-selected
|
||||
dense
|
||||
borderless
|
||||
lazy-rules
|
||||
v-model="roundId2"
|
||||
:options="roundOtion2"
|
||||
label="เลือกรอบ"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
map-options
|
||||
@filter="(inputValue:string,doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn,'round') "
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
dense
|
||||
class="q-px-md"
|
||||
label="ค้นหา"
|
||||
unelevated
|
||||
color="public"
|
||||
type="submit"
|
||||
:disable="
|
||||
nodeId == '' || !typeReport || (!roundId && !roundId2)
|
||||
"
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12 col-xs-12 flex">
|
||||
<q-splitter
|
||||
horizontal
|
||||
style="
|
||||
height: 75vh;
|
||||
border: 1px solid rgb(210, 210, 210);
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
"
|
||||
before-class="overflow-hidden disable"
|
||||
separator-class="bg-white disabled"
|
||||
>
|
||||
<template v-slot:before>
|
||||
<div class="q-px-sm">
|
||||
<div class="row items-start items-center">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-tree>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<div class="q-pa-md">
|
||||
<LoadView v-if="isLoadPDF" />
|
||||
<VuePDF
|
||||
v-else-if="!isLoadPDF && pdfSrc"
|
||||
ref="vuePDFRef"
|
||||
:pdf="pdfSrc"
|
||||
:page="page"
|
||||
fit-parent
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:default>
|
||||
<div class="q-pa-md">
|
||||
<div class="row items-start items-center">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-splitter>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-separator :vertical="$q.screen.gt.xs" />
|
||||
|
||||
<q-card-section class="col-lg-9 col-md-8 col-xs-12 scroll">
|
||||
<q-splitter
|
||||
v-model="splitterModel"
|
||||
horizontal
|
||||
style="
|
||||
height: 65vh;
|
||||
border: 1px solid rgb(210, 210, 210);
|
||||
border-radius: 5px;
|
||||
"
|
||||
before-class="overflow-hidden disable"
|
||||
separator-class="bg-white disabled"
|
||||
>
|
||||
<template v-slot:before>
|
||||
<div class="q-px-sm">
|
||||
<div class="row items-start items-center">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<div class="q-pa-md">
|
||||
<LoadView v-if="isLoadPDF" />
|
||||
<VuePDF
|
||||
v-else
|
||||
ref="vuePDFRef"
|
||||
:pdf="pdfSrc"
|
||||
:page="page"
|
||||
fit-parent
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:default>
|
||||
<div class="q-pa-md">
|
||||
<div class="row items-start items-center">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-left"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
class="my-auto"
|
||||
@click="backPage"
|
||||
:disable="page == 1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-auto">
|
||||
<div class="q-pa-md flex">
|
||||
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<q-btn
|
||||
padding="xs"
|
||||
icon="mdi-chevron-right"
|
||||
color="grey-2"
|
||||
text-color="grey-5"
|
||||
size="md"
|
||||
@click="nextPage"
|
||||
:disable="page === numOfPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-splitter>
|
||||
</q-card-section>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scope>
|
||||
<style lang="scss" scoped>
|
||||
.q-item.hover-green:hover {
|
||||
background-color: #d5f1ee57;
|
||||
border-radius: 2px;
|
||||
|
|
@ -667,4 +758,17 @@ onMounted(async () => {
|
|||
font-weight: 600;
|
||||
border: 1px solid rgba(175, 185, 196, 0.217);
|
||||
}
|
||||
.tree-container-report {
|
||||
overflow: auto;
|
||||
max-height: 50vh;
|
||||
}
|
||||
|
||||
:deep(.expansion-item .q-item__section) {
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
:deep(.expansion-item .q-item) {
|
||||
min-height: 32px;
|
||||
padding: 2px 9px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue