ปรับ Code ประเมืน
This commit is contained in:
parent
f9c4bb3b80
commit
5b2be2af2b
24 changed files with 603 additions and 1398 deletions
|
|
@ -1,13 +1,19 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { DataOption } from "@/modules/12_evaluatePersonal/interface/index/Main";
|
||||
|
||||
import type { EvaluateList } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||
import type { EvaluateRes } from "@/modules/12_evaluatePersonal/interface/response/evalute";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai } = mixin;
|
||||
export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
||||
/** function สถานะ*/
|
||||
/**
|
||||
* function Convert สถานะ
|
||||
* @param val สถานะ
|
||||
*/
|
||||
function convertStatus(val: string) {
|
||||
switch (val) {
|
||||
case "CHECK_SPEC":
|
||||
|
|
@ -31,6 +37,10 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* function Convert ระดับที่ยื่นขอ
|
||||
* @param val ระดับที่ยื่นขอ
|
||||
*/
|
||||
function convertType(val: string) {
|
||||
if (val === "EXPERT") {
|
||||
return "ชำนาญการ";
|
||||
|
|
@ -39,15 +49,27 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
|||
}
|
||||
}
|
||||
|
||||
// ตรวจสอบคุณสมบัติด้วยตนเอง -> CHECK_SPEC
|
||||
// จัดเตรียมเอกสารเล่ม 1-> PREPARE_DOC_V1
|
||||
// ตรวจสอบความถูกต้องของเอกสารเล่ม 1 -> CHECK_DOC_V1
|
||||
// รอตรวจสอบคุณสมบัติ -> WAIT_CHECK_DOC_V1
|
||||
// ประกาศบนเว็บไซต์ -> ANNOUNCE_WEB
|
||||
// จัดเตรียมเอกสารเล่ม 2 -> PREPARE_DOC_V2
|
||||
// ตรวจสอบความถูกต้องของเอกสารเล่ม 2 -> CHECK_DOC_V2
|
||||
// รอพิจารณาผลการประเมิน -> WAIT_CHECK_DOC_V2
|
||||
// เสร็จสิ้น -> DONE
|
||||
const rows = ref<EvaluateList[]>([]);
|
||||
/**
|
||||
* function เรียกข้่อมูลรายการคำขอประเมิน
|
||||
* @param data รายการคำขอประเมิน
|
||||
*/
|
||||
function fetchData(data: EvaluateRes[]) {
|
||||
const dataList: EvaluateList[] = data.map(
|
||||
(data: EvaluateRes) =>
|
||||
({
|
||||
id: data.id,
|
||||
citizanId: data.citizenId,
|
||||
fullName: data.fullName,
|
||||
position: data.position,
|
||||
level: convertType(data.type),
|
||||
positionNumber: data.posNo,
|
||||
agency: data.oc,
|
||||
status: convertStatus(data.step),
|
||||
} as EvaluateList)
|
||||
);
|
||||
rows.value = dataList;
|
||||
}
|
||||
|
||||
const visibleColumns = ref<String[]>([
|
||||
"no",
|
||||
|
|
@ -59,23 +81,6 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
|
|||
"agency",
|
||||
"status",
|
||||
]);
|
||||
const rows = ref<any[]>([]);
|
||||
function fetchData(data: any[]) {
|
||||
console.log(data);
|
||||
const dataList: any[] = data.map((data: any) => ({
|
||||
id: data.id,
|
||||
citizanId: data.citizenId,
|
||||
fullName: data.fullName,
|
||||
position: data.position,
|
||||
level: convertType(data.type),
|
||||
positionNumber: data.posNo,
|
||||
agency: data.oc,
|
||||
status: convertStatus(data.step),
|
||||
}));
|
||||
rows.value = dataList;
|
||||
console.log(dataList);
|
||||
}
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue