fix:add field isAllRoot To API act/search
This commit is contained in:
parent
ed0d84b45c
commit
5fbb76690c
1 changed files with 20 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue