From fbe84894ea1a0e970a393abb471b720e5cbfa967 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Wed, 27 Mar 2024 13:44:39 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20clear?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salaryEmployeeChart/TabCriteria.vue | 46 +++++++++++-------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/modules/13_salary/components/salaryEmployeeChart/TabCriteria.vue b/src/modules/13_salary/components/salaryEmployeeChart/TabCriteria.vue index 36eb8dace..2ba1b2f2c 100644 --- a/src/modules/13_salary/components/salaryEmployeeChart/TabCriteria.vue +++ b/src/modules/13_salary/components/salaryEmployeeChart/TabCriteria.vue @@ -5,7 +5,10 @@ import type { ListData, ResponseData, } from "@/modules/13_salary/interface/index/EmployeeChart"; -import type { NewPagination,DataOption } from "@/modules/13_salary/interface/index/Main"; +import type { + NewPagination, + DataOption, +} from "@/modules/13_salary/interface/index/Main"; import DialogFormCriteria from "@/modules/13_salary/components/salaryEmployeeChart/DialogFormCriteria.vue"; /** importType*/ @@ -17,7 +20,7 @@ import { useCounterMixin } from "@/stores/mixin"; import http from "@/plugins/http"; import config from "@/app.config"; -const posTypeOp = ref([]) +const posTypeOp = ref([]); const posType = ref(""); const maxPage = ref(1); const $q = useQuasar(); @@ -167,7 +170,6 @@ function getData() { `/?page=${formFilter.page}&pageSize=${formFilter.pageSize}&keyword=${formFilter.keyword}&posTypeId=${posType.value}` ) .then((res) => { - const data = res.data.result.data; const total = res.data.result.total; maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize); @@ -229,25 +231,25 @@ watch( ); /** ดึงข้อมูลกลุ่มงาน */ -function getPosType(){ +function getPosType() { http - .get(config.API.salaryEmployeePosType()) - .then((res)=>{ - const data = res.data.result - posTypeOp.value = data.map((item:any)=>({ - id:item.id, - name:item.posTypeName - })) - }).catch((e)=>{ - messageError($q,e) - }).finally(()=>{ - - }) + .get(config.API.salaryEmployeePosType()) + .then((res) => { + const data = res.data.result; + posTypeOp.value = data.map((item: any) => ({ + id: item.id, + name: item.posTypeName, + })); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => {}); } onMounted(() => { getData(); - getPosType() + getPosType(); }); @@ -265,7 +267,15 @@ onMounted(() => { emit-value map-options @update:model-value="getData" - /> + > + + เพิ่ม