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