ปรับวินัย

This commit is contained in:
setthawutttty 2023-12-27 15:50:41 +07:00
parent 117cc8aeb8
commit 5c1b67a642
12 changed files with 161 additions and 190 deletions

View file

@ -18,13 +18,14 @@ const $q = useQuasar(); //ใช้ noti quasar
/** ค้นหาข้อมูลในตาราง */
const filterKeyword = ref<string>("");
const filterRef = ref<HTMLInputElement | null>(null);
const resetFilter = () => {
function resetFilter() {
filterKeyword.value = "";
if (filterRef.value) {
filterRef.value.focus();
getList();
}
};
const statusFilter = ref<string>('ALL')
}
const statusFilter = ref<string>("ALL");
const currentPage = ref<number>(1);
const maxPage = ref<number>(1);
const page = ref<number>(1);
@ -90,8 +91,12 @@ async function editPage(id: string) {
router.push(`/discipline/investigatefacts/${id}`);
}
function dataUpdate(){
console.log(statusFilter.value)
function dataUpdate() {
console.log(statusFilter.value);
}
function filterFn() {
getList();
}
/**
@ -133,6 +138,7 @@ onMounted(async () => {
outlined
debounce="300"
placeholder="ค้นหา"
@keydown.enter.prevent="filterFn"
>
<template v-slot:append>
<q-icon v-if="filterKeyword == ''" name="search" />
@ -168,7 +174,6 @@ onMounted(async () => {
ref="table"
:columns="dataInvestigate.columns"
:rows="dataInvestigate.rows"
:filter="filterKeyword"
row-key="interrogated"
flat
bordered
@ -214,10 +219,10 @@ onMounted(async () => {
>
<div v-if="col.name == 'no'">
{{
(currentPage - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
(currentPage - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
</div>
<div>
{{ col.value }}