clear code + comment
This commit is contained in:
parent
a9609d2d7f
commit
ac70090e22
19 changed files with 231 additions and 166 deletions
|
|
@ -58,10 +58,12 @@ const formMainProject = reactive<FormAddHistoryProject>({
|
|||
organizingTraining: "", //หน่วยงานที่รับผิดชอบจัดการอบรม
|
||||
});
|
||||
|
||||
/** class */
|
||||
function getClass() {
|
||||
return "inputgreen";
|
||||
}
|
||||
|
||||
/** ดึงข้อมูล */
|
||||
function fetchDataDetail() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -112,6 +114,7 @@ function fetchDataDetail() {
|
|||
});
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */
|
||||
onMounted(() => {
|
||||
if (id.value) {
|
||||
fetchDataDetail();
|
||||
|
|
|
|||
|
|
@ -39,23 +39,17 @@ const pagination = ref({
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
dialogConfirm,
|
||||
messageError,
|
||||
dialogMessageNotify,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const store = useDevelopmentDataStore();
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
|
||||
const selected = ref<any[]>([]);
|
||||
const search = ref<string>("citizenId");
|
||||
const inputSearch = ref<any>("");
|
||||
|
||||
const inputType = computed(() => {
|
||||
return search.value === "citizenId" ? "number" : "text";
|
||||
});
|
||||
const govOp = ref<DataOption[]>([
|
||||
{
|
||||
id: "citizenId",
|
||||
|
|
@ -165,6 +159,8 @@ function closeDialog() {
|
|||
function getClass() {
|
||||
return "inputgreen";
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลตาม keyword */
|
||||
function searchFilter() {
|
||||
let queryParams: any = {
|
||||
page: formFilter.page,
|
||||
|
|
@ -203,16 +199,19 @@ function searchFilter() {
|
|||
});
|
||||
}
|
||||
|
||||
/** update ค่า เเถวข้อมูล */
|
||||
function updatePage(val:number){
|
||||
formFilter.page = val;
|
||||
searchFilter();
|
||||
}
|
||||
|
||||
/** update ค่า เเถวข้อมูล */
|
||||
function updatePageSize(newPagination: NewPagination) {
|
||||
formFilter.page = 1;
|
||||
formFilter.pageSize = newPagination.rowsPerPage;
|
||||
}
|
||||
|
||||
/** เช็คเเถวข้อมูลว่ามีการเปลี่ยนแปลงไหม */
|
||||
watch(
|
||||
() => formFilter.pageSize,
|
||||
() => {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import type {
|
|||
FormFilter,
|
||||
NewPagination,
|
||||
} from "@/modules/15_development/interface/index/Main";
|
||||
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
|
||||
|
|
@ -22,13 +21,11 @@ const year = ref<string>("");
|
|||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
dialogConfirm,
|
||||
messageError,
|
||||
dialogMessageNotify,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const store = useDevelopmentDataStore();
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
|
||||
|
|
@ -139,6 +136,8 @@ function closeDialog() {
|
|||
function getClass() {
|
||||
return "inputgreen";
|
||||
}
|
||||
|
||||
/** ค้นข้อมูลตาม ฟิลเตอร์ */
|
||||
function searchFilter() {
|
||||
let queryParams: any = {
|
||||
page: formFilter.page,
|
||||
|
|
@ -171,16 +170,19 @@ function searchFilter() {
|
|||
});
|
||||
}
|
||||
|
||||
/** update ค่า เเถวข้อมูล */
|
||||
function updatePage(val: number) {
|
||||
formFilter.page = val;
|
||||
searchFilter();
|
||||
}
|
||||
|
||||
/** update ค่า เเถวข้อมูล */
|
||||
function updatePageSize(newPagination: NewPagination) {
|
||||
formFilter.page = 1;
|
||||
formFilter.pageSize = newPagination.rowsPerPage;
|
||||
}
|
||||
|
||||
/** เช็คเเถวข้อมูลว่ามีการเปลี่ยนแปลงไหม */
|
||||
watch(
|
||||
() => formFilter.pageSize,
|
||||
() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue