Refactoring code module 02_organization

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-11 17:00:27 +07:00
parent 63b9aafbaf
commit 0f5d772e53
24 changed files with 805 additions and 1033 deletions

View file

@ -1,8 +1,11 @@
<script setup lang="ts">
import { ref, computed, watch } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useOrganizational } from "@/modules/02_organization/store/organizational";
/**
* importType
@ -24,12 +27,6 @@ import type { DataTree } from "@/modules/02_organization/interface/index/organiz
*/
import HeaderDialog from "@/components/DialogHeader.vue";
/**
* importStore
*/
import { useCounterMixin } from "@/stores/mixin";
import { useOrganizational } from "@/modules/02_organization/store/organizational";
/**
* use
*/
@ -72,19 +69,24 @@ const props = defineProps({
},
});
const title = ref<string>("ย้ายตำแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน");
const filterTree = ref<string>("");
const filterRef = ref();
const selectedTree = ref<string>("");
const levelTree = ref<number>(0);
const filterTable = ref<string>("");
const selectedFilter = ref<PosMaster2[]>([]);
const title = ref<string>("ย้ายตำแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน"); //title Dialog
const filterTree = ref<string>(""); ///
const filterRef = ref(); //
const selectedTree = ref<string>(""); //
const levelTree = ref<number>(0); //
const filterTable = ref<string>(""); //
const selectedFilter = ref<PosMaster2[]>([]); //
const pagination = ref({
page: reqMaster.value.page,
rowsPerPage: reqMaster.value.pageSize,
});
/**
* ดปมยายตำแหน
*
* เมอไมไดเลอกตำแหนงทองการยายและหนวยงานทองการยายปมยายตำแหนงจะป
*/
const isDisable = computed(() => {
if (selectedTree.value === "" && selectedFilter.value.length === 0) {
return true;
@ -146,6 +148,18 @@ function onClickMovePos() {
}
}
/**
* function updatePagination
* @param newPagination อม Pagination ใหม
*/
function updatePagination(newPagination: NewPagination) {
reqMaster.value.pageSize = newPagination.rowsPerPage;
reqMaster.value.page = 1;
}
/**
* การเปลยนแปลง modal เมอเป true
*/
watch(
() => modal.value,
() => {
@ -164,15 +178,6 @@ watch(
}
}
);
/**
* function updatePagination
* @param newPagination อม Pagination ใหม
*/
function updatePagination(newPagination: NewPagination) {
reqMaster.value.pageSize = newPagination.rowsPerPage;
reqMaster.value.page = 1;
}
</script>
<template>