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

@ -90,6 +90,7 @@ function fetchOrganizationActive() {
/** function fetchTree ยุทธศาสตร์ / แผน*/ /** function fetchTree ยุทธศาสตร์ / แผน*/
function fetchTreeStrategy() { function fetchTreeStrategy() {
showLoader();
http http
.get(config.API.devStrategy) .get(config.API.devStrategy)
.then((res) => { .then((res) => {
@ -98,11 +99,15 @@ function fetchTreeStrategy() {
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
})
.finally(() => {
hideLoader();
}); });
} }
/** functioon fetchcTree หน่วยงาน/ส่วนราชการ*/ /** functioon fetchcTree หน่วยงาน/ส่วนราชการ*/
function fetchTreeAgency(id: string) { function fetchTreeAgency(id: string) {
showLoader();
http http
.get(config.API.orgByid(id.toString())) .get(config.API.orgByid(id.toString()))
.then(async (res) => { .then(async (res) => {
@ -112,6 +117,9 @@ function fetchTreeAgency(id: string) {
}) })
.catch((err) => { .catch((err) => {
messageError($q, err); messageError($q, err);
})
.finally(() => {
hideLoader();
}); });
} }

View file

@ -189,7 +189,7 @@ function onClickHistory(id: string) {
onMounted(async () => { onMounted(async () => {
await fetchActive(); await fetchActive();
await fetchList(); // await fetchList();
}); });
</script> </script>

View file

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