ปรับวินัย
This commit is contained in:
parent
117cc8aeb8
commit
5c1b67a642
12 changed files with 161 additions and 190 deletions
|
|
@ -592,8 +592,6 @@ onMounted(() => {
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
v-model="formData.description"
|
v-model="formData.description"
|
||||||
:rules="[(val) => !!val || 'กรุณาการข้อมูล']"
|
|
||||||
lazy-rules
|
|
||||||
label="รายละเอียดเรื่องร้องเรียน"
|
label="รายละเอียดเรื่องร้องเรียน"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
rows="5"
|
||||||
|
|
@ -668,10 +666,6 @@ onMounted(() => {
|
||||||
emit-value
|
emit-value
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
map-options
|
map-options
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณาเลือกระดับการพิจารณา'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
selectLevel(formData.levelConsideration);
|
selectLevel(formData.levelConsideration);
|
||||||
changeFormData();
|
changeFormData();
|
||||||
|
|
@ -712,10 +706,6 @@ onMounted(() => {
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
label="วันที่กำหนดพิจารณา"
|
label="วันที่กำหนดพิจารณา"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณาเลือกวันที่กำหนดพิจารณา'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -746,8 +736,6 @@ onMounted(() => {
|
||||||
emit-value
|
emit-value
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
map-options
|
map-options
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกลักษณะความผิด'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -785,11 +773,6 @@ onMounted(() => {
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
label="วันที่แจ้งเตือนล่วงหน้า"
|
label="วันที่แจ้งเตือนล่วงหน้า"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val || `${'กรุณาเลือกวันที่แจ้งเตือนล่วงหน้า'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
@ -820,10 +803,6 @@ onMounted(() => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณาเลือกรับเรื่องร้องเรียน'}`,
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -838,8 +817,6 @@ onMounted(() => {
|
||||||
v-model="formData.appellant"
|
v-model="formData.appellant"
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
label="ผู้ร้องเรียน"
|
label="ผู้ร้องเรียน"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกข้อมูล'}`]"
|
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
rows="5"
|
||||||
|
|
@ -856,10 +833,6 @@ onMounted(() => {
|
||||||
outlined
|
outlined
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
v-model="formData.result"
|
v-model="formData.result"
|
||||||
:rules="[
|
|
||||||
(val) => !!val || 'กรุณากรอกผลการตรวจสอบเรื่องร้องเรียน',
|
|
||||||
]"
|
|
||||||
lazy-rules
|
|
||||||
label="ผลการตรวจสอบเรื่องร้องเรียน"
|
label="ผลการตรวจสอบเรื่องร้องเรียน"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="5"
|
rows="5"
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,13 @@ const router = useRouter();
|
||||||
/** stoer */
|
/** stoer */
|
||||||
const complainstStore = useComplainstDataStore();
|
const complainstStore = useComplainstDataStore();
|
||||||
const { fetchComplainst } = complainstStore;
|
const { fetchComplainst } = complainstStore;
|
||||||
|
const filterRef = ref<HTMLInputElement | null>(null);
|
||||||
const filterTable = ref<string>("");
|
const filterTable = ref<string>("");
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const rowsPerPage = ref<number>(10);
|
const rowsPerPage = ref<number>(10);
|
||||||
const statusFilter = ref<string>('ALL')
|
const statusFilter = ref<string>("ALL");
|
||||||
|
|
||||||
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
|
||||||
rowsPerPage.value = rowPerpage;
|
rowsPerPage.value = rowPerpage;
|
||||||
|
|
@ -69,8 +69,16 @@ function filterFn() {
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
function dataUpdate(){
|
function dataUpdate() {
|
||||||
console.log(statusFilter.value)
|
console.log(statusFilter.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetFilter() {
|
||||||
|
filterKeyword.value = "";
|
||||||
|
if (filterRef.value) {
|
||||||
|
filterRef.value.focus();
|
||||||
|
getList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
||||||
|
|
@ -80,7 +88,9 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">รายการเรื่องร้องเรียน</div>
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
|
รายการเรื่องร้องเรียน
|
||||||
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
||||||
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
<div class="row col-12 q-col-gutter-sm q-mb-sm">
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
|
|
@ -113,18 +123,25 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="#search"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
id="filterTable"
|
standout
|
||||||
for="filterTable"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
label="ค้นหา"
|
ref="filterRef"
|
||||||
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
@keydown.enter.prevent="filterFn"
|
@keydown.enter.prevent="filterFn"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
|
<q-icon
|
||||||
|
v-if="filterKeyword !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -638,8 +638,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:options="investigateFactStore.respondentTypeOps"
|
:options="investigateFactStore.respondentTypeOps"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกผู้ร้องเรียน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
doneFn: Function) => investigateFactStore.filterSelector(inputValue, doneFn, 'filterrespondentType'
|
doneFn: Function) => investigateFactStore.filterSelector(inputValue, doneFn, 'filterrespondentType'
|
||||||
)"
|
)"
|
||||||
|
|
@ -676,8 +674,6 @@ onMounted(async () => {
|
||||||
v-model="formData.organizationId"
|
v-model="formData.organizationId"
|
||||||
:options="investigateFactStore.organizationIdOp"
|
:options="investigateFactStore.organizationIdOp"
|
||||||
label="เลือกสำนักงาน"
|
label="เลือกสำนักงาน"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -808,11 +804,7 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
|
||||||
ref="investigationDetailRef"
|
ref="investigationDetailRef"
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณาเลือกลักษณะการสืบสวน'}`,
|
|
||||||
]"
|
|
||||||
v-model="formData.investigationDetail"
|
v-model="formData.investigationDetail"
|
||||||
:options="investigateFactStore.investigationDetailOp"
|
:options="investigateFactStore.investigationDetailOp"
|
||||||
label="ลักษณะการสืบสวน"
|
label="ลักษณะการสืบสวน"
|
||||||
|
|
@ -852,12 +844,6 @@ onMounted(async () => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'รายการอื่นๆ(โปรดระบุ)'}`"
|
:label="`${'รายการอื่นๆ(โปรดระบุ)'}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
formData.investigationDetail === 'OTHER'
|
|
||||||
? !!val || 'กรุณากรอกรายการอื่นๆ'
|
|
||||||
: true,
|
|
||||||
]"
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -922,7 +908,6 @@ onMounted(async () => {
|
||||||
for="#daysExtend"
|
for="#daysExtend"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
|
||||||
ref="daysExtendRef"
|
ref="daysExtendRef"
|
||||||
v-model="formData.investigationDaysExtend"
|
v-model="formData.investigationDaysExtend"
|
||||||
:options="investigateFactStore.daysExtendOp"
|
:options="investigateFactStore.daysExtendOp"
|
||||||
|
|
@ -930,11 +915,6 @@ onMounted(async () => {
|
||||||
emit-value
|
emit-value
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
map-options
|
map-options
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
(!!val && val != 0) ||
|
|
||||||
`${'กรุณาเลือกจำนวนวันที่ต้องการขยาย'}`,
|
|
||||||
]"
|
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
use-input
|
use-input
|
||||||
|
|
@ -981,7 +961,6 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
|
||||||
borderless
|
borderless
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:model-value="
|
:model-value="
|
||||||
|
|
@ -991,11 +970,6 @@ onMounted(async () => {
|
||||||
)
|
)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val ||
|
|
||||||
`${'กรุณาเลือกวันที่เริ่มการสืบสวน'}`,
|
|
||||||
]"
|
|
||||||
:label="`${'วันที่เริ่มการสืบสวน'}`"
|
:label="`${'วันที่เริ่มการสืบสวน'}`"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
@ -1047,7 +1021,6 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
borderless
|
borderless
|
||||||
:model-value="
|
:model-value="
|
||||||
|
|
@ -1055,11 +1028,6 @@ onMounted(async () => {
|
||||||
? date2Thai(formData.investigationDateEnd as Date)
|
? date2Thai(formData.investigationDateEnd as Date)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val ||
|
|
||||||
`${'กรุณาเลือกวันที่สิ้นสุดการสืบสวน'}`,
|
|
||||||
]"
|
|
||||||
:label="`${'วันที่สิ้นสุดการสืบสวน'}`"
|
:label="`${'วันที่สิ้นสุดการสืบสวน'}`"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
@ -1220,10 +1188,8 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
ref="investigationDescriptionRef"
|
ref="investigationDescriptionRef"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
|
||||||
borderless
|
borderless
|
||||||
v-model="formData.investigationDescription"
|
v-model="formData.investigationDescription"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกรายละเอียด'}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'รายละเอียด'}`"
|
:label="`${'รายละเอียด'}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
@ -1254,12 +1220,8 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
lazy-rules
|
|
||||||
ref="investigationStatusResultRef"
|
ref="investigationStatusResultRef"
|
||||||
v-model="formData.investigationStatusResult"
|
v-model="formData.investigationStatusResult"
|
||||||
:rules="[
|
|
||||||
(val) => !!val || `${'กรุณาเลือกผลการสืบสวน'}`,
|
|
||||||
]"
|
|
||||||
:options="mainStore.statusResultOptions"
|
:options="mainStore.statusResultOptions"
|
||||||
label="ผลการสืบสวน"
|
label="ผลการสืบสวน"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -1295,10 +1257,6 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
ref="investigationCauseTextRef"
|
ref="investigationCauseTextRef"
|
||||||
v-model="formData.investigationCauseText"
|
v-model="formData.investigationCauseText"
|
||||||
:rules="[
|
|
||||||
(val) =>
|
|
||||||
!!val || `${'กรุณาเลือกร้ายแรง/ไม่ร้ายแรง'}`,
|
|
||||||
]"
|
|
||||||
:options="mainStore.causeTextOptions"
|
:options="mainStore.causeTextOptions"
|
||||||
label="ร้ายแรง/ไม่ร้ายแรง"
|
label="ร้ายแรง/ไม่ร้ายแรง"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -1325,10 +1283,8 @@ onMounted(async () => {
|
||||||
ref="resultRef"
|
ref="resultRef"
|
||||||
:readonly="isReadonly"
|
:readonly="isReadonly"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
|
||||||
borderless
|
borderless
|
||||||
v-model="formData.result"
|
v-model="formData.result"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกเหตุผล'}`]"
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'เหตุผล'}`"
|
:label="`${'เหตุผล'}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
@ -1468,8 +1424,6 @@ onMounted(async () => {
|
||||||
v-model="formData.documentFile"
|
v-model="formData.documentFile"
|
||||||
@added="uploadFile"
|
@added="uploadFile"
|
||||||
label="ไฟล์เอกสารหลักฐาน"
|
label="ไฟล์เอกสารหลักฐาน"
|
||||||
hide-bottom-space
|
|
||||||
lazy-rules
|
|
||||||
accept=".pdf,.xlsx,.doc"
|
accept=".pdf,.xlsx,.doc"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,14 @@ const $q = useQuasar(); //ใช้ noti quasar
|
||||||
/** ค้นหาข้อมูลในตาราง */
|
/** ค้นหาข้อมูลในตาราง */
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const filterRef = ref<HTMLInputElement | null>(null);
|
const filterRef = ref<HTMLInputElement | null>(null);
|
||||||
const resetFilter = () => {
|
function resetFilter() {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
if (filterRef.value) {
|
if (filterRef.value) {
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
|
getList();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
const statusFilter = ref<string>('ALL')
|
const statusFilter = ref<string>("ALL");
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
|
|
@ -90,8 +91,12 @@ async function editPage(id: string) {
|
||||||
router.push(`/discipline/investigatefacts/${id}`);
|
router.push(`/discipline/investigatefacts/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function dataUpdate(){
|
function dataUpdate() {
|
||||||
console.log(statusFilter.value)
|
console.log(statusFilter.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function filterFn() {
|
||||||
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
/**เมื่อเริ่มโหลดหน้า
|
||||||
|
|
@ -133,6 +138,7 @@ onMounted(async () => {
|
||||||
outlined
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
|
@keydown.enter.prevent="filterFn"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
|
|
@ -168,7 +174,6 @@ onMounted(async () => {
|
||||||
ref="table"
|
ref="table"
|
||||||
:columns="dataInvestigate.columns"
|
:columns="dataInvestigate.columns"
|
||||||
:rows="dataInvestigate.rows"
|
:rows="dataInvestigate.rows"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="interrogated"
|
row-key="interrogated"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -214,10 +219,10 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{
|
{{
|
||||||
(currentPage - 1) * Number(pagination.rowsPerPage) +
|
(currentPage - 1) * Number(pagination.rowsPerPage) +
|
||||||
props.rowIndex +
|
props.rowIndex +
|
||||||
1
|
1
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
|
|
|
||||||
|
|
@ -19,28 +19,23 @@ const { fetchList } = dataInvestigateDis;
|
||||||
const rowsPerPage = ref<number>(10);
|
const rowsPerPage = ref<number>(10);
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
|
||||||
|
|
||||||
async function fetchListDisciplinary() {
|
async function fetchListDisciplinary() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.disciplineDisciplinary() +
|
config.API.disciplineDisciplinary() +
|
||||||
`?page=${page.value}&pageSize=${rowsPerPage.value}`
|
`?page=${page.value}&pageSize=${rowsPerPage.value}&keyword=${filter.value}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
maxPage.value = Math.ceil(
|
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
res.data.result.total / rowsPerPage.value
|
|
||||||
);
|
|
||||||
fetchList(data);
|
fetchList(data);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {})
|
||||||
})
|
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
@ -78,7 +73,6 @@ onMounted(async () => {
|
||||||
style="max-height: 80vh"
|
style="max-height: 80vh"
|
||||||
:rows="dataInvestigateDis.rows"
|
:rows="dataInvestigateDis.rows"
|
||||||
:columns="dataInvestigateDis.columns"
|
:columns="dataInvestigateDis.columns"
|
||||||
:filter="filter"
|
|
||||||
:visible-columns="dataInvestigateDis.visibleColumns"
|
:visible-columns="dataInvestigateDis.visibleColumns"
|
||||||
v-model:inputfilter="filter"
|
v-model:inputfilter="filter"
|
||||||
v-model:inputvisible="dataInvestigateDis.visibleColumns"
|
v-model:inputvisible="dataInvestigateDis.visibleColumns"
|
||||||
|
|
@ -89,6 +83,7 @@ onMounted(async () => {
|
||||||
:rowsPerPage="rowsPerPage"
|
:rowsPerPage="rowsPerPage"
|
||||||
:page="page"
|
:page="page"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
|
:fetchListDisciplinary="fetchListDisciplinary"
|
||||||
@update:pagination="updatePagingProp"
|
@update:pagination="updatePagingProp"
|
||||||
v-model:open-edit="openEdit"
|
v-model:open-edit="openEdit"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ const filterRef = ref<any>(null);
|
||||||
const attrs = ref<any>(useAttrs());
|
const attrs = ref<any>(useAttrs());
|
||||||
const paging = ref<boolean>(true);
|
const paging = ref<boolean>(true);
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
const statusFilter = ref<string>('ALL')
|
const statusFilter = ref<string>("ALL");
|
||||||
|
|
||||||
/** รับ props มาจากหน้าหลัก */
|
/** รับ props มาจากหน้าหลัก */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -29,6 +29,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
fetchListDisciplinary: {
|
||||||
|
type: Function,
|
||||||
|
default: () => console.log("not function"),
|
||||||
|
},
|
||||||
nornmalData: {
|
nornmalData: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
defualt: true,
|
defualt: true,
|
||||||
|
|
@ -86,6 +90,7 @@ function resetFilter() {
|
||||||
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
||||||
emit("update:inputfilter", "");
|
emit("update:inputfilter", "");
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
|
props.fetchListDisciplinary?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateProp(newPagination: any, page: number) {
|
function updateProp(newPagination: any, page: number) {
|
||||||
|
|
@ -108,28 +113,31 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
function dataUpdate(){
|
function dataUpdate() {
|
||||||
console.log(statusFilter.value)
|
console.log(statusFilter.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function filterFn() {
|
||||||
|
props.fetchListDisciplinary?.();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pb-sm row q-col-gutter-sm">
|
<div class="q-pb-sm row q-col-gutter-sm">
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<q-select
|
<q-select
|
||||||
v-model="statusFilter"
|
v-model="statusFilter"
|
||||||
label="สถานะ"
|
label="สถานะ"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:options="dataInvestigateDis.statusOptions"
|
:options="dataInvestigateDis.statusOptions"
|
||||||
@update:model-value="dataUpdate"
|
@update:model-value="dataUpdate"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<!-- ค้นหาข้อความใน table -->
|
<!-- ค้นหาข้อความใน table -->
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -143,6 +151,7 @@ console.log(statusFilter.value)
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="max-width: 200px"
|
style="max-width: 200px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
|
@keydown.enter.prevent="filterFn"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="inputfilter == ''" name="search" />
|
<q-icon v-if="inputfilter == ''" name="search" />
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
import { useInvestigateDisStore } from "@/modules/11_discipline/store/InvestigateDisStore";
|
||||||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||||
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
import { useDisciplineMainStore } from "@/modules/11_discipline/store/main";
|
||||||
import DialogHistory from '@/modules/11_discipline/components/4_Result/DialogHistory.vue'
|
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
|
|
@ -45,8 +45,8 @@ const consideredAgency = ref<string>("");
|
||||||
const organizationOption = ref<DataOption[]>([]);
|
const organizationOption = ref<DataOption[]>([]);
|
||||||
/** ตัวแปร ref สำหรับแสดง validate */
|
/** ตัวแปร ref สำหรับแสดง validate */
|
||||||
const detailRef = ref<Object | null>(null);
|
const detailRef = ref<Object | null>(null);
|
||||||
const modalHistory = ref<boolean>(false)
|
const modalHistory = ref<boolean>(false);
|
||||||
const personalId = ref<string>('')
|
const personalId = ref<string>("");
|
||||||
|
|
||||||
/** รับ props มาจากหน้าหลัก */
|
/** รับ props มาจากหน้าหลัก */
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -233,15 +233,14 @@ function confirmDelete(docid: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDetial(id:string){
|
function openDetial(id: string) {
|
||||||
personalId.value = id
|
personalId.value = id;
|
||||||
modalHistory.value = true
|
modalHistory.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDetail(){
|
function closeDetail() {
|
||||||
modalHistory.value = false
|
modalHistory.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="row q-col-gutter-sm">
|
<div class="row q-col-gutter-sm">
|
||||||
|
|
@ -276,8 +275,6 @@ function closeDetail(){
|
||||||
map-options
|
map-options
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:options="dataStore.complainantoptions"
|
:options="dataStore.complainantoptions"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกผู้ร้องเรียน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="selectComplainant(respondentType)"
|
@update:model-value="selectComplainant(respondentType)"
|
||||||
@filter="(inputValue: any,
|
@filter="(inputValue: any,
|
||||||
doneFn: Function) => dataStore.filterSelector(inputValue, doneFn, 'filterrespondentType'
|
doneFn: Function) => dataStore.filterSelector(inputValue, doneFn, 'filterrespondentType'
|
||||||
|
|
@ -311,8 +308,6 @@ function closeDetail(){
|
||||||
v-model="organizationId"
|
v-model="organizationId"
|
||||||
:options="organizationOption"
|
:options="organizationOption"
|
||||||
label="เลือกสำนักงาน"
|
label="เลือกสำนักงาน"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกสำนักงาน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12" v-if="respondentType === 'PERSON'">
|
<div class="row col-12" v-if="respondentType === 'PERSON'">
|
||||||
|
|
@ -347,7 +342,6 @@ function closeDetail(){
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
style="color: #000000; font-weight: 500"
|
style="color: #000000; font-weight: 500"
|
||||||
|
|
||||||
>
|
>
|
||||||
<span class="text-weight-medium">{{
|
<span class="text-weight-medium">{{
|
||||||
col.label
|
col.label
|
||||||
|
|
@ -361,21 +355,23 @@ function closeDetail(){
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
|
|
||||||
>
|
>
|
||||||
<div v-if="col.name == 'no'" @click="openDetial(props.row.id)">
|
<div
|
||||||
|
v-if="col.name == 'no'"
|
||||||
|
@click="openDetial(props.row.id)"
|
||||||
|
>
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'info'">
|
<div v-else-if="col.name == 'info'">
|
||||||
<router-link
|
<router-link
|
||||||
target="_blank"
|
target="_blank"
|
||||||
:to="`/registry/${props.row.personId}`"
|
:to="`/registry/${props.row.personId}`"
|
||||||
><q-icon name="info" color="info" size="sm"
|
><q-icon name="info" color="info" size="sm"
|
||||||
><q-tooltip
|
><q-tooltip
|
||||||
>ดูข้อมูลในทะเบียนประวัติ</q-tooltip
|
>ดูข้อมูลในทะเบียนประวัติ</q-tooltip
|
||||||
>
|
>
|
||||||
</q-icon></router-link
|
</q-icon></router-link
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="col.name === 'organization'"
|
v-else-if="col.name === 'organization'"
|
||||||
|
|
@ -405,8 +401,6 @@ function closeDetail(){
|
||||||
for="#detail"
|
for="#detail"
|
||||||
label="สรุปผลการพิจารณา"
|
label="สรุปผลการพิจารณา"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกสรุปผลการพิจารณา'}`]"
|
|
||||||
lazy-rules
|
|
||||||
@update:model-value="changeFormData()"
|
@update:model-value="changeFormData()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -456,7 +450,6 @@ function closeDetail(){
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
|
||||||
:class="inputEdit(isReadonly)"
|
:class="inputEdit(isReadonly)"
|
||||||
outlined
|
outlined
|
||||||
:model-value="
|
:model-value="
|
||||||
|
|
@ -514,7 +507,6 @@ function closeDetail(){
|
||||||
@added="uploadFile"
|
@added="uploadFile"
|
||||||
label="ไฟล์เอกสารหลักฐาน"
|
label="ไฟล์เอกสารหลักฐาน"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
lazy-rules
|
|
||||||
accept=".pdf,.xlsx,.doc"
|
accept=".pdf,.xlsx,.doc"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
|
|
@ -582,10 +574,9 @@ function closeDetail(){
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<DialogHistory
|
<DialogHistory
|
||||||
:modal="modalHistory"
|
:modal="modalHistory"
|
||||||
:close="closeDetail"
|
:close="closeDetail"
|
||||||
:person-id="personalId"
|
:person-id="personalId"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -92,12 +92,12 @@ onMounted(async () => {
|
||||||
:paging="true"
|
:paging="true"
|
||||||
:titleText="''"
|
:titleText="''"
|
||||||
:page="page"
|
:page="page"
|
||||||
|
:fetchListResult="fetchListResult"
|
||||||
:pageSize="pageSize"
|
:pageSize="pageSize"
|
||||||
:maxPage="maxPage"
|
:maxPage="maxPage"
|
||||||
@update:queryString="updateQueryString"
|
@update:queryString="updateQueryString"
|
||||||
v-model:open-edit="openEdit"
|
v-model:open-edit="openEdit"
|
||||||
>
|
>
|
||||||
|
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
|
fetchListResult: {
|
||||||
|
type: Function,
|
||||||
|
default: () => console.log("not function"),
|
||||||
|
},
|
||||||
openEdit: {
|
openEdit: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
|
|
@ -68,6 +72,7 @@ function resetFilter() {
|
||||||
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
||||||
emit("update:inputfilter", "");
|
emit("update:inputfilter", "");
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
|
props.fetchListResult?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateRowsPerPage(newPagination: any) {
|
function updateRowsPerPage(newPagination: any) {
|
||||||
|
|
@ -75,10 +80,6 @@ function updateRowsPerPage(newPagination: any) {
|
||||||
currentPage.value = 1;
|
currentPage.value = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFn() {
|
|
||||||
updatePaging(1, Number(pagination.value.rowsPerPage), filter.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatePaging(p: number, pS: number, key: string) {
|
function updatePaging(p: number, pS: number, key: string) {
|
||||||
emit("update:queryString", p, pS, key);
|
emit("update:queryString", p, pS, key);
|
||||||
}
|
}
|
||||||
|
|
@ -95,6 +96,13 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||||
function dataUpdate() {
|
function dataUpdate() {
|
||||||
console.log(statusFilter.value);
|
console.log(statusFilter.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateInput(value: string | number | null) {
|
||||||
|
emit("update:inputfilter", value);
|
||||||
|
}
|
||||||
|
function filterFn() {
|
||||||
|
props.fetchListResult?.();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -118,18 +126,19 @@ function dataUpdate() {
|
||||||
<q-input
|
<q-input
|
||||||
standout
|
standout
|
||||||
dense
|
dense
|
||||||
v-model="filter"
|
:model-value="inputfilter"
|
||||||
ref="filterRef"
|
ref="filterRef"
|
||||||
@keydown.enter.prevent="filterFn"
|
@keydown.enter.prevent="filterFn"
|
||||||
|
@update:model-value="updateInput"
|
||||||
outlined
|
outlined
|
||||||
placeholder="ค้นหา"
|
placeholder="ค้นหา"
|
||||||
style="max-width: 200px"
|
style="max-width: 200px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="filter == ''" name="search" />
|
<q-icon v-if="inputfilter == ''" name="search" />
|
||||||
<q-icon
|
<q-icon
|
||||||
v-if="filter !== ''"
|
v-if="inputfilter !== ''"
|
||||||
name="clear"
|
name="clear"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useDisciplineDirectorDataStore } from "@/modules/11_discipline/store/DirectorStore";
|
import { useDisciplineDirectorDataStore } from "@/modules/11_discipline/store/DirectorStore";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import DialogTotal from '@/modules/11_discipline/components/6_BasicInformation/Director/DialogInvestigateTotal.vue'
|
import DialogTotal from "@/modules/11_discipline/components/6_BasicInformation/Director/DialogInvestigateTotal.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDisciplineDirectorDataStore();
|
const dataStore = useDisciplineDirectorDataStore();
|
||||||
|
|
@ -103,12 +103,12 @@ function resetFilter() {
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
if (filterRef.value) {
|
if (filterRef.value) {
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
|
getList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterFn() {
|
function filterFn() {
|
||||||
getList();
|
getList();
|
||||||
console.log("enter", filterKeyword.value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDetail(title: string) {
|
function openDetail(title: string) {
|
||||||
|
|
@ -116,8 +116,8 @@ function openDetail(title: string) {
|
||||||
modalDetail.value = true;
|
modalDetail.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDetail(){
|
function closeDetail() {
|
||||||
modalDetail.value = false
|
modalDetail.value = false;
|
||||||
}
|
}
|
||||||
/**เมื่อเริ่มโหลดหน้า
|
/**เมื่อเริ่มโหลดหน้า
|
||||||
* ส่งข้อมูลจำลองไปยัง store
|
* ส่งข้อมูลจำลองไปยัง store
|
||||||
|
|
@ -190,7 +190,6 @@ onMounted(() => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="dataStore.columns"
|
:columns="dataStore.columns"
|
||||||
:rows="dataStore.rows"
|
:rows="dataStore.rows"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="tb-list"
|
row-key="tb-list"
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
|
|
|
||||||
|
|
@ -129,10 +129,11 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
const openModal = () => (modal.value = true);
|
const openModal = () => (modal.value = true);
|
||||||
const closeModal = () => (modal.value = false);
|
const closeModal = () => (modal.value = false);
|
||||||
|
|
||||||
const resetFilter = () => {
|
function resetFilter(){
|
||||||
filterKeyword.value = "";
|
filterKeyword.value = "";
|
||||||
filterKeyword2.value = "";
|
filterKeyword2.value = "";
|
||||||
filterRef.value.focus();
|
filterRef.value.focus();
|
||||||
|
getList()
|
||||||
};
|
};
|
||||||
|
|
||||||
const currentPage = ref<number>(1);
|
const currentPage = ref<number>(1);
|
||||||
|
|
@ -228,6 +229,10 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function filterFn() {
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
/** เรียกใช้งานเมื่อเริ่มหน้าเว็ป */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
|
|
@ -257,25 +262,27 @@ onMounted(() => {
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
for="#search"
|
||||||
standout
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
dense
|
standout
|
||||||
v-model="filterKeyword"
|
dense
|
||||||
ref="filterRef"
|
v-model="filterKeyword"
|
||||||
outlined
|
ref="filterRef"
|
||||||
debounce="300"
|
outlined
|
||||||
placeholder="ค้นหา"
|
debounce="300"
|
||||||
>
|
placeholder="ค้นหา"
|
||||||
<template v-slot:append>
|
@keydown.enter.prevent="filterFn"
|
||||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
>
|
||||||
<q-icon
|
<template v-slot:append>
|
||||||
v-if="filterKeyword !== ''"
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
name="clear"
|
<q-icon
|
||||||
class="cursor-pointer"
|
v-if="filterKeyword !== ''"
|
||||||
@click="resetFilter"
|
name="clear"
|
||||||
/>
|
class="cursor-pointer"
|
||||||
</template>
|
@click="resetFilter"
|
||||||
</q-input>
|
/>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
v-model="dataStore.visibleColumns"
|
v-model="dataStore.visibleColumns"
|
||||||
|
|
@ -298,7 +305,6 @@ onMounted(() => {
|
||||||
<d-table
|
<d-table
|
||||||
:columns="dataStore.columns"
|
:columns="dataStore.columns"
|
||||||
:rows="dataStore.rows"
|
:rows="dataStore.rows"
|
||||||
:filter="filterKeyword"
|
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:visible-columns="dataStore.visibleColumns"
|
:visible-columns="dataStore.visibleColumns"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
|
|
|
||||||
|
|
@ -236,6 +236,12 @@ function yearAll() {
|
||||||
formData.year = 0;
|
formData.year = 0;
|
||||||
getData();
|
getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetFilter(){
|
||||||
|
filterKeyword.value = "";
|
||||||
|
getData()
|
||||||
|
};
|
||||||
|
|
||||||
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -341,18 +347,25 @@ onMounted(async () => {
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
|
for="#search"
|
||||||
class="col-xs-12 col-sm-3 col-md-2"
|
class="col-xs-12 col-sm-3 col-md-2"
|
||||||
id="filterTable"
|
standout
|
||||||
for="filterTable"
|
|
||||||
dense
|
dense
|
||||||
outlined
|
|
||||||
v-model="filterKeyword"
|
v-model="filterKeyword"
|
||||||
label="ค้นหา"
|
ref="filterRef"
|
||||||
|
outlined
|
||||||
debounce="300"
|
debounce="300"
|
||||||
|
placeholder="ค้นหา"
|
||||||
@keydown.enter.prevent="filterFn"
|
@keydown.enter.prevent="filterFn"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||||
|
<q-icon
|
||||||
|
v-if="filterKeyword !== ''"
|
||||||
|
name="clear"
|
||||||
|
class="cursor-pointer"
|
||||||
|
@click="resetFilter"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue