ปรับ วินัย

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-10 11:11:57 +07:00
parent 89bedf5251
commit 2adbbc9b24
22 changed files with 416 additions and 411 deletions

View file

@ -171,78 +171,104 @@ watch(
<DialogHeader tittle="เลือกรายชื่อกรรมการ" :close="clickClose" />
<q-separator />
<q-card-section>
<q-input
borderless
outlined
dense
v-model="filterKeyword2"
@keydown.enter.prevent="updateInput"
placeholder="ค้นหารายชื่อ"
style="max-width: 100%"
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
<div class="row q-col-gutter-sm">
<div class="row col-12">
<q-space />
<div class="row q-col-gutter-sm">
<q-input
borderless
outlined
dense
v-model="filterKeyword2"
@keydown.enter.prevent="updateInput"
placeholder="ค้นหารายชื่อ"
style="max-width: 100%"
>
<template v-slot:append>
<q-icon name="search" />
</template>
</q-input>
<d-table
:columns="columns2"
:rows="rows2"
row-key="id"
:visible-columns="visibleColumns2"
selection="multiple"
v-model:selected="selected"
:rows-per-page-options="[10, 25, 50, 100]"
@update:pagination="updatePagination"
>
<template v-slot:pagination="scope">
งหมด {{ total }} รายการ
<q-pagination
v-model="pagination.page"
active-color="primary"
color="dark"
:max="Number(totalList)"
size="sm"
boundary-links
direction-links
:max-pages="5"
@update:model-value="props.getList?.()"
></q-pagination>
</template>
<q-select
v-model="visibleColumns2"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="columns2"
option-value="name"
style="min-width: 140px"
/>
</div>
</div>
<div class="col-12">
<d-table
:columns="columns2"
:rows="rows2"
row-key="id"
:visible-columns="visibleColumns2"
selection="multiple"
v-model:selected="selected"
:rows-per-page-options="[10, 25, 50, 100]"
@update:pagination="updatePagination"
>
<template v-slot:pagination="scope">
งหมด {{ total }} รายการ
<q-pagination
v-model="pagination.page"
active-color="primary"
color="dark"
:max="Number(totalList)"
size="sm"
boundary-links
direction-links
:max-pages="5"
@update:model-value="props.getList?.()"
></q-pagination>
</template>
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="scope.selected"
/>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<template v-slot:header-selection="scope">
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
v-model="scope.selected"
/>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{
(pagination.page - 1) * pagination.rowsPerPage +
props.rowIndex +
1
}}
</div>
<div v-else>
{{ col.value }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<div v-if="col.name == 'no'">
{{
(pagination.page - 1) * pagination.rowsPerPage +
props.rowIndex +
1
}}
</div>
<div v-else>
{{ col.value }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</div>
</q-card-section>
<q-separator />