ตัวชี้วัด => รายการงานที่ได้รับมอบหมาย interface
This commit is contained in:
parent
a8773977bb
commit
e100ac0ec3
5 changed files with 62 additions and 13 deletions
|
|
@ -5,11 +5,14 @@ import { useRouter, useRoute } from "vue-router";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/** importType*/
|
||||
import type { FormDataRole } from "@/modules/01_metadataNew/interface/request/Main";
|
||||
import type { DataOption } from "@/modules/01_metadataNew/interface/index/Main";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
|
@ -27,11 +30,10 @@ const form = reactive<FormDataRole>({
|
|||
includingName: "", //ชื่อตัวชี้วัด
|
||||
target: "", //ค่าเป้าหมาย
|
||||
unit: "", //หน่วยนับ
|
||||
weight: "", //น้ำหนัก
|
||||
weight: null, //น้ำหนัก
|
||||
meaning: "", //นิยามหรือความหมาย
|
||||
formula: "", //สูตรคำนวณ
|
||||
documentInfoEvidence: "", //ข้อมูลเอกสารหลักฐาน
|
||||
|
||||
node: null,
|
||||
nodeId: null,
|
||||
orgRevisionId: null,
|
||||
|
|
@ -65,6 +67,7 @@ function fetchspecialByid(id: string) {
|
|||
http
|
||||
.get(config.API.kpiSpecial + `/${id}`)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
const data = res.data.result;
|
||||
form.year = data.year;
|
||||
form.round = data.period;
|
||||
|
|
|
|||
|
|
@ -19,4 +19,19 @@ interface ItemsMenu {
|
|||
color: string;
|
||||
}
|
||||
|
||||
export type { Pagination, DataOption, NewPagination, ItemsMenu };
|
||||
interface DataAssignment {
|
||||
createdAt: string;
|
||||
id: string;
|
||||
including: string;
|
||||
includingName: string;
|
||||
period: string;
|
||||
year: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
Pagination,
|
||||
DataOption,
|
||||
NewPagination,
|
||||
ItemsMenu,
|
||||
DataAssignment,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,21 +21,21 @@ interface FormListMainByRole {
|
|||
}
|
||||
interface FormDataRole {
|
||||
position: string;
|
||||
year: number | null;
|
||||
year: number | null | string;
|
||||
round: string;
|
||||
org: string;
|
||||
including: string;
|
||||
includingName: string;
|
||||
target: string;
|
||||
unit: string;
|
||||
weight: string;
|
||||
weight: number | null;
|
||||
meaning: string;
|
||||
formula: string;
|
||||
documentInfoEvidence: string;
|
||||
node: number | null;
|
||||
nodeId: string | null;
|
||||
orgRevisionId: string | null;
|
||||
date: any | null;
|
||||
date: [null, null];
|
||||
}
|
||||
|
||||
interface FormCompetency {
|
||||
|
|
@ -56,6 +56,14 @@ interface FormQueryCapacity {
|
|||
keyword: string;
|
||||
}
|
||||
|
||||
interface FormFilterAssignment {
|
||||
keyword: string;
|
||||
period: string;
|
||||
year: number | string | null;
|
||||
pageSize: number;
|
||||
page: number;
|
||||
}
|
||||
|
||||
export type {
|
||||
DataSumCalendarObject,
|
||||
DataListsObject,
|
||||
|
|
@ -63,4 +71,5 @@ export type {
|
|||
FormDataRole,
|
||||
FormCompetency,
|
||||
FormQueryCapacity,
|
||||
FormFilterAssignment,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,4 +40,22 @@ interface ResEvaluator {
|
|||
type: string;
|
||||
}
|
||||
|
||||
export type { ResRound, ResDataCapacity, ResEvaluator };
|
||||
interface ResAssignment {
|
||||
data: {
|
||||
result: {
|
||||
data: [
|
||||
{
|
||||
createdAt: string;
|
||||
id: string;
|
||||
including: string;
|
||||
includingName: string;
|
||||
period: string;
|
||||
year: string;
|
||||
}
|
||||
];
|
||||
total: number;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export type { ResRound, ResDataCapacity, ResEvaluator, ResAssignment };
|
||||
|
|
|
|||
|
|
@ -5,10 +5,14 @@ import { useQuasar, type QTableProps } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** importType*/
|
||||
import type {
|
||||
DataOption,
|
||||
NewPagination,
|
||||
DataAssignment,
|
||||
} from "@/modules/01_metadataNew/interface/index/Main";
|
||||
import type { FormFilterAssignment } from "@/modules/01_metadataNew/interface/request/Main";
|
||||
import type { ResAssignment } from "@/modules/01_metadataNew/interface/response/Main";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -39,16 +43,16 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>(["including", "includingName"]);
|
||||
|
||||
/** Option รอบการประเมิน*/
|
||||
const roundOp = ref<DataOption[]>([
|
||||
{ id: "APR", name: "รอบเมษายน" },
|
||||
{ id: "OCT", name: "รอบตุลาคม" },
|
||||
]);
|
||||
const visibleColumns = ref<string[]>(["including", "includingName"]);
|
||||
const rows = ref<any[]>([]);
|
||||
const rows = ref<DataAssignment[]>([]);
|
||||
|
||||
const formFilter = reactive<any>({
|
||||
const formFilter = reactive<FormFilterAssignment>({
|
||||
keyword: "",
|
||||
period: "",
|
||||
year: new Date().getFullYear(),
|
||||
|
|
@ -63,7 +67,7 @@ function fetchList() {
|
|||
formFilter.year = formFilter.year ? formFilter.year.toString() : null;
|
||||
http
|
||||
.post(config.API.kpiSpecial + `/search`, formFilter)
|
||||
.then((res) => {
|
||||
.then((res: ResAssignment) => {
|
||||
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
|
||||
totalList.value = res.data.result.total;
|
||||
rows.value = res.data.result.data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue