แก้ไขแบบประเมิน => ผลสัมฤทธิ์ของงาน, งานที่ได้รับมอบหมายพิเศษ
This commit is contained in:
parent
f2571622d9
commit
f2870bd287
3 changed files with 68 additions and 7 deletions
|
|
@ -59,11 +59,24 @@ function fetchListRole() {
|
|||
});
|
||||
}
|
||||
|
||||
function fetchAssigned() {}
|
||||
function fetchAssigned() {
|
||||
const data = [
|
||||
{
|
||||
includingName: "name",
|
||||
target: "เป่า",
|
||||
point: "12",
|
||||
weight: "12",
|
||||
achievement: "12",
|
||||
evaluationResults: "12",
|
||||
},
|
||||
];
|
||||
rows_03.value = data;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchListPlanned();
|
||||
fetchListRole();
|
||||
fetchAssigned();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,29 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
import type { FormDataAssigned } from "@/modules/08_KPI/interface/request/index";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
const $q = useQuasar();
|
||||
const {
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
dialogMessageNotify,
|
||||
success,
|
||||
} = useCounterMixin();
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const isStatusEdit = defineModel<boolean>("isStatusEdit", { required: true });
|
||||
const kpiUserPlannedId = defineModel<string>("kpiUserPlannedId", {
|
||||
required: true,
|
||||
});
|
||||
|
||||
const formData = reactive<FormDataAssigned>({
|
||||
including: "", //รหัสตัวชี้วัด
|
||||
|
|
@ -35,7 +55,26 @@ function closeDialog() {
|
|||
formData.definition = "";
|
||||
}
|
||||
|
||||
function onSubmit() {}
|
||||
function onSubmit() {
|
||||
dialogConfirm($q, async () => {
|
||||
console.log(formData);
|
||||
|
||||
// try {
|
||||
// const url = isStatusEdit.value
|
||||
// ? config.API.kpiAchievement("planned") + `/${kpiUserPlannedId.value}`
|
||||
// : config.API.kpiAchievement("planned");
|
||||
|
||||
// const method = isStatusEdit.value ? "put" : "post";
|
||||
// await http[method](url, formData);
|
||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// } catch (err) {
|
||||
// messageError($q, err);
|
||||
// } finally {
|
||||
// hideLoader();
|
||||
closeDialog();
|
||||
// }
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
|
|
|
|||
|
|
@ -115,10 +115,10 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
function onAdd(edit: boolean = false, id: string = "") {
|
||||
isStatusEdit.value = edit;
|
||||
kpiUserPlannedId.value = id;
|
||||
if (numpage.value !== 3) {
|
||||
modal.value = true;
|
||||
isStatusEdit.value = edit;
|
||||
kpiUserPlannedId.value = id;
|
||||
} else if (numpage.value == 3) {
|
||||
modalAssigned.value = true;
|
||||
}
|
||||
|
|
@ -131,7 +131,11 @@ function onDelete(id: string) {
|
|||
const url =
|
||||
numpage.value === 1
|
||||
? config.API.kpiAchievement("planned") + `/${id}`
|
||||
: config.API.kpiAchievement("role") + `/${id}`;
|
||||
: numpage.value === 2
|
||||
? config.API.kpiAchievement("role") + `/${id}`
|
||||
: numpage.value === 3
|
||||
? config.API.kpiAchievement("role") + `/${id}`
|
||||
: "";
|
||||
await http.delete(url);
|
||||
props.fetchList?.();
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
|
|
@ -242,7 +246,12 @@ watch(
|
|||
:isStatusEdit="isStatusEdit"
|
||||
:kpiUserPlannedId="kpiUserPlannedId"
|
||||
/>
|
||||
<Dialog03 v-model:modal="modalAssigned" :numpage="numpage" />
|
||||
<Dialog03
|
||||
v-model:modal="modalAssigned"
|
||||
:numpage="numpage"
|
||||
:isStatusEdit="isStatusEdit"
|
||||
:kpiUserPlannedId="kpiUserPlannedId"
|
||||
/>
|
||||
</template>
|
||||
<style scoped>
|
||||
.custom-table2 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue