ประกาศผล => fix bug
This commit is contained in:
parent
a68a5d47ac
commit
ad61a32ed9
5 changed files with 33 additions and 22 deletions
|
|
@ -42,6 +42,7 @@ const weightAssigned = ref<number>(0);
|
||||||
const resultPlanned = ref<number>(0);
|
const resultPlanned = ref<number>(0);
|
||||||
const resultRole = ref<number>(0);
|
const resultRole = ref<number>(0);
|
||||||
const resultAssigned = ref<number>(0);
|
const resultAssigned = ref<number>(0);
|
||||||
|
|
||||||
function fetchListPlanned() {
|
function fetchListPlanned() {
|
||||||
http
|
http
|
||||||
.get(config.API.kpiAchievement("planned") + `?id=${evaluationId.value}`)
|
.get(config.API.kpiAchievement("planned") + `?id=${evaluationId.value}`)
|
||||||
|
|
@ -206,13 +207,17 @@ watch(
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getCriteria();
|
showLoader(),
|
||||||
fetchListPlanned();
|
Promise.all([
|
||||||
fetchListRole();
|
getCriteria(),
|
||||||
fetchAssigned();
|
fetchListPlanned(),
|
||||||
setTimeout(() => {
|
fetchListRole(),
|
||||||
hideLoader();
|
fetchAssigned(),
|
||||||
}, 1000);
|
]).finally(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
hideLoader();
|
||||||
|
}, 2000);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import config from "@/app.config";
|
||||||
*/
|
*/
|
||||||
import type {
|
import type {
|
||||||
OptionCheckbox,
|
OptionCheckbox,
|
||||||
DataCapacity,
|
DataAchievement,
|
||||||
} from "@/modules/14_KPI/interface/index/Main";
|
} from "@/modules/14_KPI/interface/index/Main";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -39,24 +39,24 @@ const devId = defineModel<string>("devId", {
|
||||||
/**
|
/**
|
||||||
* Table
|
* Table
|
||||||
*/
|
*/
|
||||||
const rows = ref<DataCapacity[]>([]);
|
const rows = ref<DataAchievement[]>([]);
|
||||||
const visibleColumns = ref<String[]>(["capacityPoint", "capacityName"]);
|
const visibleColumns = ref<String[]>(["achievement", "detail"]);
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "capacityPoint",
|
name: "achievement",
|
||||||
align: "center",
|
align: "center",
|
||||||
label: "ระดับคะแนน",
|
label: "ระดับคะแนน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "capacityPoint",
|
field: "achievement",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px; width:20%;",
|
style: "font-size: 14px; width:20%;",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "capacityName",
|
name: "detail",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "เกณฑ์การประเมิน",
|
label: "เกณฑ์การประเมิน",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "capacityName",
|
field: "detail",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px; width:80%;",
|
style: "font-size: 14px; width:80%;",
|
||||||
},
|
},
|
||||||
|
|
@ -97,7 +97,11 @@ function fetchDetailIndividual() {
|
||||||
];
|
];
|
||||||
|
|
||||||
target.value = data.target;
|
target.value = data.target;
|
||||||
rows.value = data.capacity;
|
const achievements = ["10", "5", "0"];
|
||||||
|
rows.value = achievements.map((i) => ({
|
||||||
|
achievement: i,
|
||||||
|
detail: data[`achievement${i}`],
|
||||||
|
}));
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -200,13 +204,13 @@ watch(
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
<div v-if="col.name === 'capacityName'">
|
<div v-if="col.name === 'detail'">
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
const
|
const
|
||||||
readonly
|
readonly
|
||||||
v-model="props.row.capacityName"
|
v-model="props.row.detail"
|
||||||
label="เกณฑ์การประเมิน"
|
label="เกณฑ์การประเมิน"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,6 @@ onMounted(() => {
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:selection="tab === 'COMPLETE' ? 'multiple' : null"
|
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="pagination"
|
||||||
:paging="true"
|
:paging="true"
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,10 @@ interface FormData {
|
||||||
email: string;
|
email: string;
|
||||||
qualification: string;
|
qualification: string;
|
||||||
}
|
}
|
||||||
interface DataCapacity {}
|
interface DataAchievement {
|
||||||
|
achievement: string;
|
||||||
|
detail: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
DataOption,
|
DataOption,
|
||||||
|
|
@ -80,5 +83,5 @@ export type {
|
||||||
FormData,
|
FormData,
|
||||||
ItemsTab,
|
ItemsTab,
|
||||||
OptionCheckbox,
|
OptionCheckbox,
|
||||||
DataCapacity,
|
DataAchievement,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,9 @@ function fetcDataList() {
|
||||||
kpiPeriodId: store.formQuery.round ? store.formQuery.round : "",
|
kpiPeriodId: store.formQuery.round ? store.formQuery.round : "",
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result;
|
||||||
|
|
||||||
dataList.value = data;
|
dataList.value = data.data;
|
||||||
|
|
||||||
total.value = data.total;
|
total.value = data.total;
|
||||||
maxPage.value = Math.ceil(total.value / pageSize.value);
|
maxPage.value = Math.ceil(total.value / pageSize.value);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue