no message
This commit is contained in:
parent
304168f337
commit
4ffde198d6
2 changed files with 130 additions and 23 deletions
|
|
@ -74,13 +74,7 @@ const positionOp = ref<DataOption[]>([]);
|
|||
const positionMainOp = ref<DataOption[]>([]);
|
||||
|
||||
/** Option รอบการประเมิน*/
|
||||
const roundOp = ref<DataOption[]>([
|
||||
{ id: "APR", name: "รอบเมษายน" },
|
||||
{
|
||||
id: "OCT",
|
||||
name: "รอบตุลาคม",
|
||||
},
|
||||
]);
|
||||
const roundOp = ref<DataOption[]>([]);
|
||||
|
||||
/**
|
||||
* function ต้นหาข้อมูลของ Option
|
||||
|
|
@ -245,7 +239,41 @@ function updateSelected(data: any) {
|
|||
form.orgRevisionId = data.orgRevisionId;
|
||||
}
|
||||
|
||||
function getRound() {
|
||||
showLoader();
|
||||
http
|
||||
.get(
|
||||
config.API.kpiPeriod +
|
||||
`?year=${form.year}`
|
||||
)
|
||||
.then((res) => {
|
||||
const data = res.data.result.data;
|
||||
roundOp.value = data.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: statusTothai(item.durationKPI),
|
||||
}))
|
||||
console.log(roundOp.value)
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader()
|
||||
});
|
||||
}
|
||||
|
||||
function statusTothai(val: string) {
|
||||
switch (val) {
|
||||
case "SPECIAL":
|
||||
return "รอบพิเศษ";
|
||||
case "APR":
|
||||
return "รอบเมษายน";
|
||||
case "OCT":
|
||||
return "รอบตุลาคม";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getRound()
|
||||
fetchActive();
|
||||
getOptions();
|
||||
if (id.value !== "") {
|
||||
|
|
@ -319,7 +347,7 @@ onMounted(() => {
|
|||
hide-bottom-space
|
||||
outlined
|
||||
:model-value="
|
||||
form.year === 0 ? null : Number(form.year) + 543
|
||||
form.year === null ? null : Number(form.year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue