สมรรถนะ => interface

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-04-19 15:50:01 +07:00
parent 0238e17fc4
commit 644005a6fe
3 changed files with 37 additions and 6 deletions

View file

@ -5,9 +5,12 @@ import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar"; import { useQuasar } from "quasar";
import { useRouter } from "vue-router"; 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 { useKPIDataStore } from "@/modules/14_KPI/store/KPIStore";
import type { DataOption } from "@/modules/14_KPI/interface/index/Main";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
@ -54,8 +57,8 @@ const columns = ref<QTableProps["columns"]>([
]); ]);
const visibleColumns = ref<string[]>(["name"]); const visibleColumns = ref<string[]>(["name"]);
const rows = ref<any[]>([]); const rows = ref<ResDataCapacity[]>([]);
const formQuery = reactive({ const formQuery = reactive<FormQueryCapacity>({
page: 1, page: 1,
pageSize: 10, pageSize: 10,
keyword: "", keyword: "",
@ -71,7 +74,7 @@ async function fetchList() {
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyType}` `?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}&type=${store.competencyType}`
) )
.then(async (res) => { .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); totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize);
rows.value = data; rows.value = data;
}) })

View file

@ -48,4 +48,17 @@ interface NewPagination {
sortBy: string; 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,
};

View file

@ -11,4 +11,19 @@ interface ResRound {
startDate: Date; 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 };