This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-06-25 18:07:08 +07:00
parent 9fb037fc80
commit eee6504a5d
3 changed files with 25 additions and 9 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, reactive } from "vue";
import { ref, onMounted, reactive, watch } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
@ -25,6 +25,7 @@ const expanded = ref<Array<string>>([]);
const filter = ref<string>("");
const nodeTree = ref<DataTree[]>([]);
const posmasterId = ref<string>("");
const isAll = ref<boolean>(false);
/** function เรียกข้อมูลโครงสร้าง แบบปัจุบัน*/
function fetchOrganizationActive() {
@ -143,7 +144,10 @@ const keyword = ref<string>("");
function fetchPosMaster() {
showLoader();
http
.post(config.API.orgPosAct + `/search`, { posmasterId: posmasterId.value })
.post(config.API.orgPosAct + `/search`, {
posmasterId: posmasterId.value,
// isAll: isAll.value,
})
.then((res) => {
const data = res.data.result;
rowPosition.value = data;
@ -156,6 +160,11 @@ function fetchPosMaster() {
});
}
function updateIsAll(val: boolean) {
isAll.value = val;
fetchPosMaster();
}
/**
* function เลอกราชชอรกษาการ
* @param data อมลรายช
@ -334,16 +343,15 @@ onMounted(() => {
<q-space />
<div class="row q-gutter-md">
<div>
<!-- <q-checkbox
<q-checkbox
@update:model-value="updateIsAll"
keep-color
v-model="reqMaster.isAll"
v-model="isAll"
label="แสดงตำแหน่งทั้งหมด"
color="primary"
>
<q-tooltip
>แสดงตำแหนงทงหมดภายใตหนวยงาน/วนราชการทเลอก</q-tooltip
>
</q-checkbox> -->
<q-tooltip>แสดงตำแหนงทงหมด</q-tooltip>
</q-checkbox>
</div>
<div>
<q-input outlined dense v-model="keyword" label="ค้นหา">