ปรับวินัย
This commit is contained in:
parent
117cc8aeb8
commit
5c1b67a642
12 changed files with 161 additions and 190 deletions
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue