แก้ฟิลเตอร์ สรรหา
This commit is contained in:
parent
3bfb6687e8
commit
50e5652b43
13 changed files with 216 additions and 104 deletions
|
|
@ -17,7 +17,8 @@ const $q = useQuasar();
|
|||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, success, showLoader, hideLoader } = mixin;
|
||||
const { messageError, success, showLoader, hideLoader, onSearchDataTable } =
|
||||
mixin;
|
||||
|
||||
const year = ref<string>("");
|
||||
const round = ref<string>("");
|
||||
|
|
@ -26,6 +27,7 @@ const count = ref<number>(0);
|
|||
const pass = ref<number>(0);
|
||||
const notpass = ref<number>(0);
|
||||
const rows = ref<any[]>([]);
|
||||
const rowsData = ref<any[]>([]);
|
||||
const importId = ref<string>(route.params.id as string); // Period Import Id
|
||||
const filter = ref<string>(""); //search data table
|
||||
const visibleColumns = ref<String[]>([
|
||||
|
|
@ -359,6 +361,7 @@ async function fetchData() {
|
|||
});
|
||||
}
|
||||
rows.value = result;
|
||||
rowsData.value = result;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -398,6 +401,14 @@ async function candidateToPlacement() {
|
|||
.onDismiss(() => {});
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filter.value,
|
||||
rowsData.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
hideLoader();
|
||||
await fetchData();
|
||||
|
|
@ -459,7 +470,8 @@ onMounted(async () => {
|
|||
:notpass="notpass"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:filter="filter"
|
||||
v-model:filter="filter"
|
||||
:onSearch="onSearch"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="visibleColumns"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,13 @@ import type { QTableProps } from "quasar";
|
|||
import { ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import Table from "@/modules/03_recruiting/components/Table.vue";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { onSearchDataTable } = mixin;
|
||||
const $q = useQuasar(); // show dialog
|
||||
const router = useRouter();
|
||||
const file = ref<boolean>(true);
|
||||
|
|
@ -104,6 +109,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
* @param id
|
||||
*/
|
||||
const rows = ref<any[]>([]);
|
||||
const rowsData = ref<any[]>([]);
|
||||
|
||||
function clickEdit(id: string) {
|
||||
router.push(`/compete/import/${id}`);
|
||||
|
|
@ -127,6 +133,14 @@ function remove() {
|
|||
})
|
||||
.onDismiss(() => {});
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filter.value,
|
||||
rowsData.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
|
|
@ -137,7 +151,8 @@ function remove() {
|
|||
<Table
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:filter="filter"
|
||||
v-model:filter="filter"
|
||||
:onSearch="onSearch"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="visibleColumns"
|
||||
|
|
@ -208,5 +223,4 @@ function remove() {
|
|||
</q-card>
|
||||
</template>
|
||||
|
||||
|
||||
<style></style>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import HistoryTable from "@/components/TableHistory.vue";
|
|||
|
||||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
const { success, dateText, showLoader, hideLoader, messageError } = mixin;
|
||||
const { success, dateText, showLoader, hideLoader, messageError,onSearchDataTable } = mixin;
|
||||
|
||||
const router = useRouter();
|
||||
const name = ref<string>("");
|
||||
|
|
@ -50,6 +50,7 @@ const textTittle = ref<string>("");
|
|||
const textTittleScore = ref<string>("");
|
||||
const textTittleCandidate = ref<string>("");
|
||||
const rows = ref<ResponseRecruitPeriod[]>([]);
|
||||
const rowsData = ref<ResponseRecruitPeriod[]>([]);
|
||||
const initialPagination = ref<Pagination>({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
|
@ -182,6 +183,7 @@ async function fetchData() {
|
|||
}
|
||||
|
||||
rows.value = result;
|
||||
rowsData.value = result;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -432,6 +434,14 @@ async function checkSave() {
|
|||
});
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filter.value,
|
||||
rowsData.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
/** ดึงข้อมูล เมื่อโหลดหน้า component */
|
||||
onMounted(async () => {
|
||||
hideLoader();
|
||||
|
|
@ -449,7 +459,8 @@ onMounted(async () => {
|
|||
style="max-height: 80vh"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:filter="filter"
|
||||
v-model:filter="filter"
|
||||
:onSearch="onSearch"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="visibleColumns"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue