From 644005a6fec0e1de5d095f241a58f08de835c1cc Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 19 Apr 2024 15:50:01 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AA=E0=B8=A1=E0=B8=A3=E0=B8=A3=E0=B8=96?= =?UTF-8?q?=E0=B8=99=E0=B8=B0=20=3D>=20interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/competency/01ListCompetency.vue | 11 +++++++---- src/modules/14_KPI/interface/request/Main.ts | 15 ++++++++++++++- src/modules/14_KPI/interface/response/Main.ts | 17 ++++++++++++++++- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/modules/14_KPI/components/competency/01ListCompetency.vue b/src/modules/14_KPI/components/competency/01ListCompetency.vue index ef260ec99..f0dd94301 100644 --- a/src/modules/14_KPI/components/competency/01ListCompetency.vue +++ b/src/modules/14_KPI/components/competency/01ListCompetency.vue @@ -5,9 +5,12 @@ import { useCounterMixin } from "@/stores/mixin"; import { useQuasar } from "quasar"; import { useRouter } from "vue-router"; +import type { DataOption } from "@/modules/14_KPI/interface/index/Main"; +import type { FormQueryCapacity } from "@/modules/14_KPI/interface/request/Main"; +import type { ResDataCapacity } from "@/modules/14_KPI/interface/response/Main"; + import { useKPIDataStore } from "@/modules/14_KPI/store/KPIStore"; -import type { DataOption } from "@/modules/14_KPI/interface/index/Main"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -54,8 +57,8 @@ const columns = ref([ ]); const visibleColumns = ref(["name"]); -const rows = ref([]); -const formQuery = reactive({ +const rows = ref([]); +const formQuery = reactive({ page: 1, pageSize: 10, keyword: "", @@ -71,7 +74,7 @@ async function fetchList() { `?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyType}` ) .then(async (res) => { - const data = res.data.result.data; + const data: ResDataCapacity[] = res.data.result.data; totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize); rows.value = data; }) diff --git a/src/modules/14_KPI/interface/request/Main.ts b/src/modules/14_KPI/interface/request/Main.ts index 33bb7bfaa..d290bd82e 100644 --- a/src/modules/14_KPI/interface/request/Main.ts +++ b/src/modules/14_KPI/interface/request/Main.ts @@ -48,4 +48,17 @@ interface NewPagination { sortBy: string; } -export type { FormQueryRound, FormRound, FormCompetency, FormDataRole,NewPagination }; +interface FormQueryCapacity { + page: number; + pageSize: number; + keyword: string; +} + +export type { + FormQueryRound, + FormRound, + FormCompetency, + FormDataRole, + NewPagination, + FormQueryCapacity, +}; diff --git a/src/modules/14_KPI/interface/response/Main.ts b/src/modules/14_KPI/interface/response/Main.ts index da7e92931..1fdf8ce0e 100644 --- a/src/modules/14_KPI/interface/response/Main.ts +++ b/src/modules/14_KPI/interface/response/Main.ts @@ -11,4 +11,19 @@ interface ResRound { startDate: Date; } -export type { ResRound }; +interface ResDataCapacity { + description: string; + id: string; + name: string; + type: string; + capacityDetails: capacityDetails; +} + +interface capacityDetails { + capacityId: string; + description: string; + id: string; + level: string; +} + +export type { ResRound, ResDataCapacity };