From 5fbb76690cc1c4cd7fd409c3f3528ab2604b464f Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 12 Feb 2026 13:17:27 +0700 Subject: [PATCH 1/3] fix:add field isAllRoot To API act/search --- src/modules/17_acting/views/main.vue | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/modules/17_acting/views/main.vue b/src/modules/17_acting/views/main.vue index 80c8f3c68..d36b9d9f6 100644 --- a/src/modules/17_acting/views/main.vue +++ b/src/modules/17_acting/views/main.vue @@ -46,6 +46,8 @@ const nodeTree = ref([]); const posmasterId = ref(""); const isAll = ref(false); const modalCommand = ref(false); + +const isAllRoot = ref(false); /** * function เรียกข้อมูลโครงสร้าง แบบปัจุบัน */ @@ -166,6 +168,7 @@ async function fetchPosMaster() { .post(config.API.orgPosAct + `/search`, { posmasterId: posmasterId.value, isAll: isAll.value, + isAllRoot: isAllRoot.value, }) .then((res) => { const data = res.data.result; @@ -186,6 +189,11 @@ function updateIsAll(val: boolean) { fetchPosMaster(); } +function updateIsAllRoot(val: boolean) { + isAllRoot.value = val; + fetchPosMaster(); +} + /** * function เลือกราชชื่อรักษาการ * @param data ข้อมูลรายชื่อ @@ -475,6 +483,18 @@ onMounted(async () => {
+
+ + แสดงทั้งหมดภายใต้หน่วยงาน + +
+
Date: Fri, 13 Feb 2026 13:44:21 +0700 Subject: [PATCH 2/3] fix: chang API orgPosAct To pagination --- src/modules/17_acting/views/main.vue | 30 ++++++++++++++++++---------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/modules/17_acting/views/main.vue b/src/modules/17_acting/views/main.vue index d36b9d9f6..025b727a3 100644 --- a/src/modules/17_acting/views/main.vue +++ b/src/modules/17_acting/views/main.vue @@ -12,6 +12,7 @@ import { import { useCounterMixin } from "@/stores/mixin"; import { useActingStore } from "@/modules/17_acting/store/Main"; import { useStructureTree } from "@/stores/structureTree"; +import { usePagination } from "@/composables/usePagination"; /** importType*/ import type { QTableProps } from "quasar"; @@ -39,6 +40,8 @@ const { onSearchDataTable, } = useCounterMixin(); +const { pagination, params, onRequest } = usePagination("", fetchPosMaster); + /** โครงสร้าง*/ const expanded = ref>([]); const filter = ref(""); @@ -166,14 +169,17 @@ const keyword = ref(""); async function fetchPosMaster() { await http .post(config.API.orgPosAct + `/search`, { + ...params.value, + // keyword: keyword.value.trim(), posmasterId: posmasterId.value, isAll: isAll.value, isAllRoot: isAllRoot.value, }) .then((res) => { - const data = res.data.result; - rowPosition.value = data; - dataPosition.value = data; + const result = res.data.result; + pagination.value.rowsNumber = result.total; + rowPosition.value = result.data; + dataPosition.value = result.data; }) .catch((err) => { messageError($q, err); @@ -186,10 +192,12 @@ async function fetchPosMaster() { */ function updateIsAll(val: boolean) { isAll.value = val; + pagination.value.page = 1; fetchPosMaster(); } function updateIsAllRoot(val: boolean) { + pagination.value.page = 1; isAllRoot.value = val; fetchPosMaster(); } @@ -293,11 +301,8 @@ async function getWorkFlow() { } function onSearchRowPosition() { - rowPosition.value = onSearchDataTable( - keyword.value, - dataPosition.value, - columns.value ? columns.value : [] - ); + pagination.value.page = 1; + fetchPosMaster(); } function onSearchListPerson() { @@ -523,16 +528,19 @@ onMounted(async () => {
- - +
From aa53326bbf55a8288dcc28dbab0307b1db59cea8 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 13 Feb 2026 13:50:44 +0700 Subject: [PATCH 3/3] fix: set pagination to defult --- src/modules/17_acting/views/main.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/17_acting/views/main.vue b/src/modules/17_acting/views/main.vue index 025b727a3..359aeba40 100644 --- a/src/modules/17_acting/views/main.vue +++ b/src/modules/17_acting/views/main.vue @@ -83,9 +83,11 @@ const isLaod = ref(false); * @param data ข้อมูลตำแหน่ง */ async function updateSelected(data: PosMaster) { + isLaod.value = true; posmasterId.value = data.posmasterId; storeActing.rootId = data.orgTreeId; - isLaod.value = true; + pagination.value.page = 1; + pagination.value.rowsNumber = 10; // เรียกใช้ function fetch รายชื่อ ,fetch รายชื่อรักษาการ await Promise.all([fetchPosMaster(), fetchListAct()]).finally(() => { isLaod.value = false;