fix bug
This commit is contained in:
parent
9fb037fc80
commit
eee6504a5d
3 changed files with 25 additions and 9 deletions
|
|
@ -90,6 +90,7 @@ function fetchOrganizationActive() {
|
|||
|
||||
/** function fetchTree ยุทธศาสตร์ / แผน*/
|
||||
function fetchTreeStrategy() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.devStrategy)
|
||||
.then((res) => {
|
||||
|
|
@ -98,11 +99,15 @@ function fetchTreeStrategy() {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** functioon fetchcTree หน่วยงาน/ส่วนราชการ*/
|
||||
function fetchTreeAgency(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.orgByid(id.toString()))
|
||||
.then(async (res) => {
|
||||
|
|
@ -112,6 +117,9 @@ function fetchTreeAgency(id: string) {
|
|||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ function onClickHistory(id: string) {
|
|||
|
||||
onMounted(async () => {
|
||||
await fetchActive();
|
||||
await fetchList();
|
||||
// await fetchList();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -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="ค้นหา">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue