fix:add field isAllRoot To API act/search

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-02-12 13:17:27 +07:00
parent ed0d84b45c
commit 5fbb76690c

View file

@ -46,6 +46,8 @@ const nodeTree = ref<DataTree[]>([]);
const posmasterId = ref<string>("");
const isAll = ref<boolean>(false);
const modalCommand = ref<boolean>(false);
const isAllRoot = ref<boolean>(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 () => {
<q-toolbar style="padding: 0">
<q-space />
<div class="row q-gutter-md">
<div>
<q-checkbox
@update:model-value="updateIsAllRoot"
keep-color
v-model="isAllRoot"
label="แสดงทั้งหมดภายใต้หน่วยงาน"
color="primary"
>
<q-tooltip>แสดงทงหมดภายใตหนวยงาน</q-tooltip>
</q-checkbox>
</div>
<div>
<q-checkbox
@update:model-value="updateIsAll"