From 3744b3e0d8715d75fc3d0f9ebfa8c09cbae9d000 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Mon, 15 Jul 2024 15:29:15 +0700 Subject: [PATCH] =?UTF-8?q?KPI=20=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B8=95=E0=B8=B2=E0=B8=A1=20user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tab/Dialog/DialogGovernment.vue | 11 + src/modules/14_KPI/router.ts | 13 + src/modules/14_KPI/views/detailView.vue | 339 +++++++++---- src/modules/14_KPI/views/mainDetail.vue | 451 ++++++++++++++++++ 4 files changed, 724 insertions(+), 90 deletions(-) create mode 100644 src/modules/14_KPI/views/mainDetail.vue diff --git a/src/modules/14_KPI/components/Tab/Dialog/DialogGovernment.vue b/src/modules/14_KPI/components/Tab/Dialog/DialogGovernment.vue index 032e5c1e7..f9a23e82f 100644 --- a/src/modules/14_KPI/components/Tab/Dialog/DialogGovernment.vue +++ b/src/modules/14_KPI/components/Tab/Dialog/DialogGovernment.vue @@ -153,6 +153,16 @@ const columns = ref([ style: "font-size: 14px", format: (val) => statusText(val), }, + { + name: "commandNo", + align: "left", + label: "เลขที่คำสั่ง", + sortable: true, + field: "commandNo", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (val) => statusText(val), + }, ]); const visibleColumns = ref([ "no", @@ -166,6 +176,7 @@ const visibleColumns = ref([ "dateEnd", "createdAt", "status", + "commandNo", ]); const statusText = (val: string) => { diff --git a/src/modules/14_KPI/router.ts b/src/modules/14_KPI/router.ts index be79872b2..5d9f8bd43 100644 --- a/src/modules/14_KPI/router.ts +++ b/src/modules/14_KPI/router.ts @@ -1,4 +1,7 @@ const roundPage = () => import("@/modules/14_KPI/views/round.vue"); +const probationDetail = () => import("@/modules/14_KPI/views/mainDetail.vue"); + + // const IndicatorByPlan = () => // import("@/modules/14_KPI/views/indicatorByPlan.vue"); // const IndicatorByPlanDetail = () => @@ -80,4 +83,14 @@ export default [ Role: "evaluateKPI", }, }, + { + path: "/probation-detail/:id", + name: "probationMainDetail", + component: probationDetail, + meta: { + Auth: true, + Key: [1.1], + Role: "evaluateKPI", + }, + }, ]; diff --git a/src/modules/14_KPI/views/detailView.vue b/src/modules/14_KPI/views/detailView.vue index db8f5f5d1..68257f34d 100644 --- a/src/modules/14_KPI/views/detailView.vue +++ b/src/modules/14_KPI/views/detailView.vue @@ -62,7 +62,7 @@ const isReadonly = (route.name === "KPIEditEvaluator" ? true : false); const store = useKpiDataStore(); const $q = useQuasar(); const mixin = useCounterMixin(); -const { showLoader, hideLoader, messageError, dialogConfirm, success } = mixin; +const { showLoader, hideLoader, messageError, dialogConfirm, success ,findOrgName} = mixin; const evaluatorIdOp = ref([]); const commanderIdOp = ref([]); @@ -403,7 +403,8 @@ function openGovernment() { modalGovernment.value = true; } function openStatus() { - modalStatus.value = true; + router.push(`/probation-detail/${store.dataEvaluation.profileId}`); + // modalStatus.value = true; } function sendToEvauator() { @@ -451,6 +452,49 @@ function goToSummary() { ); } +const modalEvaluatorDetail = ref(false); +const topic = ref(""); +function viewEvaluatorDetail(profileId: string, type: string) { + modalEvaluatorDetail.value = true; + topic.value = + type == "evaluator" + ? "ข้อมูลของผู้ประเมิน" + : type == "commander" + ? "ข้อมูลของผู้บังคับบัญชาเหนือขึ้นไป" + : "ข้อมูลของผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง"; + fetchProfileEvaluator(profileId); +} + +const evaluator = ref({ + fullName: "", + position: "", + avartar: "", + posTypeName: "", + posLevelName: "", + org: "", +}); +async function fetchProfileEvaluator(id: string) { + showLoader(); + http + .get(config.API.profilePosition + `/${id}`) + .then((res) => { + console.log(res.data.result); + const data = res.data.result; + evaluator.value.fullName = + data.prefix + data.firstName + " " + data.lastName; + evaluator.value.position = data.position; + evaluator.value.posTypeName = data.posTypeName; + evaluator.value.posLevelName = data.posLevelName; + evaluator.value.org = findOrgName(data); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); +} + onMounted(async () => { store.isUpdate = await false; @@ -883,103 +927,155 @@ onMounted(async () => {
- +
+ filterOption(inputValue, doneFn,'evaluatorIdOp' ) " - /> - + + ดูข้อมูลผู้ประเมิน + +
+
+
+
+ - - - + ดูข้อมูลผู้บังคับบัญชาเหนือขึ้นไป + +
+
+
+
+ - - + @click=" + viewEvaluatorDetail(commanderHighId.id, 'commanderHigh') + " + > + ดูข้อมูลผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง + +
+
@@ -999,6 +1095,67 @@ onMounted(async () => { + + + + + + +
+ {{ + evaluator.fullName + }} +
+ + +
+
+
+
ตำแหน่งในสายงาน
+
ตำแหน่งประเภท
+
ตำแหน่งทางการบริหาร
+
สังกัด
+
+
+
+ {{ evaluator.position ? evaluator.position : "-" }} +
+
+ {{ evaluator.posTypeName ? evaluator.posTypeName : "-" }} + {{ + evaluator.posLevelName + ? ` (${evaluator.posLevelName})` + : "-" + }} +
+
+ {{ + evaluator.posExecutiveName + ? evaluator.posExecutiveName + : "-" + }} +
+
+ {{ evaluator.org ? evaluator.org : "-" }} +
+
+ +
+
รักษาการในตำแหน่ง/การรักษาราชการแทน
+
+
+
-
+
+
+
+
+
+
+
+ - + /> -->