ปรับ UI ระบบวินัย

This commit is contained in:
Tanyalak 2024-01-30 11:17:25 +07:00
parent 21a779fe94
commit cf69df74ac
21 changed files with 2322 additions and 2304 deletions

View file

@ -339,7 +339,7 @@ onMounted(() => {
</script>
<template>
<div class="row q-col-gutter-xs">
<div class="col-sm-12 col-md-9">
<div class="col-12">
<form @submit.prevent="validateForm">
<q-card bordered>
<div class="q-pa-md">
@ -690,6 +690,7 @@ onMounted(() => {
</template>
<style lang="scss">
.icon-color {
color: #4154b3;
}

View file

@ -276,134 +276,137 @@ onMounted(async () => {
รายการอทธรณ/องทกข
</div>
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
<div class="row q-mb-sm">
<div>
<q-btn
id="addComplaints"
for="addComplaints"
size="12px"
flat
round
color="primary"
icon="mdi-plus"
@click="redirectToPageadd()"
><q-tooltip>เพมการอทธรณ/องทกข</q-tooltip></q-btn
<div class="row q-mb-sm q-col-gutter-sm">
<div>
<q-btn
id="addComplaints"
for="addComplaints"
size="12px"
flat
round
color="primary"
icon="mdi-plus"
@click="redirectToPageadd()"
><q-tooltip>เพมการอทธรณ/องทกข</q-tooltip></q-btn
>
</div>
<q-space />
<q-input
for="#search"
class="col-xs-12 col-sm-3 col-md-2"
standout
dense
v-model="filterKeyword"
ref="filterRef"
outlined
placeholder="ค้นหา"
@keydown.enter.prevent="filterFn"
>
</div>
</div>
<div class="row col-12 q-col-gutter-sm q-mb-sm">
<div class="col-2">
<datepicker
menu-class-name="modalfix"
v-model="formData.year"
class="col-2"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="dataUpdate"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
lazy-rules
outlined
:model-value="
formData.year === 0 ? null : Number(formData.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-if="formData.year" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="yearAll"
class="cursor-pointer"
/>
</template>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
<template v-slot:append>
<q-icon
v-if="filterKeyword !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</datepicker>
</div>
</q-input>
<div class="col-2">
<q-select
v-model="formData.type"
label="ประเภท"
dense
id="visibleColumns"
for="visibleColumns"
v-model="dataStore.visibleColumns"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
option-label="name"
option-value="id"
:options="type"
@update:model-value="dataUpdate"
:options="dataStore.columns"
option-value="name"
options-cover
class="col-xs-12 col-sm-3 col-md-2"
/>
</div>
<div class="col-2">
<q-select
v-model="formData.status"
label="สถานะ"
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="dataStore.statusOptions"
@update:model-value="dataUpdate"
/>
</div>
<q-space />
<q-input
for="#search"
class="col-xs-12 col-sm-3 col-md-2"
standout
dense
v-model="filterKeyword"
ref="filterRef"
outlined
placeholder="ค้นหา"
@keydown.enter.prevent="filterFn"
>
<template v-slot:append>
<q-icon
v-if="filterKeyword !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</q-input>
<q-select
id="visibleColumns"
for="visibleColumns"
v-model="dataStore.visibleColumns"
multiple
outlined
dense
options-dense
:display-value="$q.lang.table.columns"
emit-value
map-options
:options="dataStore.columns"
option-value="name"
options-cover
class="col-xs-12 col-sm-3 col-md-2"
/>
</div>
<div class="col-12 row q-mb-sm">
<q-card bordered class="col-12 filter-card q-pa-sm">
<div class="row col-12 q-col-gutter-sm">
<div class="col-2">
<datepicker
menu-class-name="modalfix"
v-model="formData.year"
class="col-2"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
@update:model-value="dataUpdate"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
lazy-rules
outlined
:model-value="
formData.year === 0 ? null : Number(formData.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-if="formData.year" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="yearAll"
class="cursor-pointer"
/>
</template>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div class="col-2">
<q-select
v-model="formData.type"
label="ประเภท"
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="type"
@update:model-value="dataUpdate"
/>
</div>
<div class="col-2">
<q-select
v-model="formData.status"
label="สถานะ"
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="dataStore.statusOptions"
@update:model-value="dataUpdate"
/>
</div>
</div>
</q-card>
</div>
<div class="col-12">
@ -481,4 +484,8 @@ onMounted(async () => {
<DialogStatus :modal="modalStatusEdit" :data="dataRow" :close="close" />
</template>
<style scoped></style>
<style scoped>
.filter-card {
background-color: #f1f1f1b0;
}
</style>