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