From 74bd72c70c1f3dbc6f0ee403e8216ff2eeeef39f Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Fri, 12 Jul 2024 13:22:35 +0700 Subject: [PATCH] KPI --- .../14_KPI/components/Tab/04_Result.vue | 32 +++++++--- .../Tab/Dialog/01_FormIndicator.vue | 11 ++-- .../Tab/Dialog/04_FormCompetency.vue | 22 ++++++- .../Tab/Dialog/DialogCommentProgress.vue | 1 + .../components/Tab/Dialog/DialogEvalute.vue | 64 ++++++++++--------- .../components/Tab/Topic/01_Indicator.vue | 19 ++++-- .../components/Tab/Topic/02_Competency.vue | 21 +++--- .../components/Tab/Topic/03_Develop.vue | 15 +++-- src/modules/14_KPI/views/detailView.vue | 13 ++-- 9 files changed, 123 insertions(+), 75 deletions(-) diff --git a/src/modules/14_KPI/components/Tab/04_Result.vue b/src/modules/14_KPI/components/Tab/04_Result.vue index ebe047324..54893b488 100644 --- a/src/modules/14_KPI/components/Tab/04_Result.vue +++ b/src/modules/14_KPI/components/Tab/04_Result.vue @@ -396,9 +396,9 @@ onMounted(() => { bordered class="q-mt-md" v-if=" - store.rolePerson == 'COMMANDER' && evaluatorComment !== null && - store.dataEvaluation.commanderId !== null + store.dataEvaluation.commanderId !== null && + store.dataEvaluation.evaluationStatus !== 'SUMMARY' " > @@ -422,7 +422,12 @@ onMounted(() => { 'SUMMARY_COMMANDER' " label="เห็นด้วยกับผลการประเมิน" - @click="resetCommander()" + @click=" + store.dataEvaluation.evaluationStatus !== + 'SUMMARY_COMMANDER' + ? '' + : resetCommander() + " /> { บันทึกข้อมูล { bordered class="q-mt-md" v-if=" - store.rolePerson == 'COMMANDERHIGH' && - superiorComment !== '' && + store.dataEvaluation.evaluationStatus !== 'SUMMARY' && + store.dataEvaluation.evaluationStatus !== 'SUMMARY_COMMANDER' && store.dataEvaluation.commanderHighId !== null " > @@ -504,7 +515,12 @@ onMounted(() => { unchecked-icon="panorama_fish_eye" val="true" label="เห็นด้วยกับผลการประเมิน" - @click="resetCommanderHigh()" + @click=" + store.dataEvaluation.evaluationStatus !== + 'SUMMARY_COMMANDER_HIGH' + ? '' + : resetCommanderHigh() + " />
-
ลำดับ/รหัสตัวชี้วัด
-
ชื่อตัวชี้วัด
+
ลำดับ/รหัสตัวชี้วัด
+
ชื่อตัวชี้วัด
@@ -574,11 +574,11 @@ const title = computed(() => { @click="clickList(item.id)" > -
-
+
+
{{ item.including }}
-
+
{{ item.includingName }}
@@ -964,6 +964,7 @@ const title = computed(() => { .my-menu-link { background: #ebf9f7 !important; color: #1bb19ab8 !important; + border: 0; } .no-shadow { box-shadow: none !important; diff --git a/src/modules/14_KPI/components/Tab/Dialog/04_FormCompetency.vue b/src/modules/14_KPI/components/Tab/Dialog/04_FormCompetency.vue index 539b3bc3e..076de5943 100644 --- a/src/modules/14_KPI/components/Tab/Dialog/04_FormCompetency.vue +++ b/src/modules/14_KPI/components/Tab/Dialog/04_FormCompetency.vue @@ -277,12 +277,22 @@ watch( - +
-
+
-
+
รายละเอียดสมรรถนะ diff --git a/src/modules/14_KPI/components/Tab/Dialog/DialogCommentProgress.vue b/src/modules/14_KPI/components/Tab/Dialog/DialogCommentProgress.vue index 115ca8d8e..41cb9b0fb 100644 --- a/src/modules/14_KPI/components/Tab/Dialog/DialogCommentProgress.vue +++ b/src/modules/14_KPI/components/Tab/Dialog/DialogCommentProgress.vue @@ -655,6 +655,7 @@ watch( .my-menu-link { background: #ebf9f7 !important; color: #1bb19ab8 !important; + border: 0; } .q-btn-group--outline > .q-btn-item:not(:last-child):before { diff --git a/src/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue b/src/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue index da9473b55..7c5e8216a 100644 --- a/src/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue +++ b/src/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue @@ -271,34 +271,40 @@ function updateSelect() { search.value = ""; } -function getOrgOp() { - http - .get(config.API.Kpiorg) - .then((res) => { - const data = res.data.result; - evaluatorIdMainOp.value = data.caregiver.map((i: any) => ({ - id: i.id, - name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${ - i.lastName ? i.lastName : "" - }`, - })); - commanderIdMainOp.value = data.commander.map((i: any) => ({ - id: i.id, - name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${ - i.lastName ? i.lastName : "" - }`, - })); - commanderHighMainOp.value = data.chairman.map((i: any) => ({ - id: i.id, - name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${ - i.lastName ? i.lastName : "" - }`, - })); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => {}); +function getOrgOp(check: boolean,id:string) { + if (check == false) { + http + .get(config.API.Kpiorg+`/${id}`) + .then((res) => { + const data = res.data.result; + evaluatorIdMainOp.value = data.caregiver.map((i: any) => ({ + id: i.id, + name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${ + i.lastName ? i.lastName : "" + }`, + })); + commanderIdMainOp.value = data.commander.map((i: any) => ({ + id: i.id, + name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${ + i.lastName ? i.lastName : "" + }`, + })); + commanderHighMainOp.value = data.chairman.map((i: any) => ({ + id: i.id, + name: `${i.prefix ? i.prefix : ""}${i.firstName ? i.firstName : ""} ${ + i.lastName ? i.lastName : "" + }`, + })); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => {}); + } else { + evaluatorIdMainOp.value = []; + commanderIdMainOp.value = []; + commanderHighMainOp.value = []; + } } function onSubmit() { @@ -346,7 +352,6 @@ watch( (n) => { if (n == true) { fetchRoundOption(); - getOrgOp(); } } ); @@ -456,6 +461,7 @@ watch( color="primary" dense v-model="props.selected" + @click="getOrgOp(props.selected,props.row.id)" /> ([ label: "ตัวชี้วัด", sortable: true, field: "includingName", - headerStyle: "font-size: 14px", - style: "font-size: 14px", + headerStyle: "font-size: 14px;width:200px", + style: "font-size: 14px;", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, @@ -334,6 +334,9 @@ const isEditStep3 = computed(() => {
{{ props.row.point ? `ระดับ ${props.row.point}` : "" }}
+
+ {{ props.row.includingName ? props.row.includingName : "-" }} +
{{ parseFloat( @@ -347,9 +350,10 @@ const isEditStep3 = computed(() => {
{ { {
{ round :icon=" item.id == 'HEAD' || item.id == 'GROUP' - ? 'edit' + ? 'mdi-eye' : 'edit' " color="info" @click.stop.pervent="onEdit(props.row, item.id)" > - แก้ไข + ดูรายละเอียด + แก้ไข { {
- รายงานความก้าวหน้า + บันทึกเหตุการณ์/พฤติกรรม - { @click="openPopupProblem(props.row.id)" > รายงานปัญหา - + -->
diff --git a/src/modules/14_KPI/views/detailView.vue b/src/modules/14_KPI/views/detailView.vue index c8418a60d..cd8760e5a 100644 --- a/src/modules/14_KPI/views/detailView.vue +++ b/src/modules/14_KPI/views/detailView.vue @@ -143,9 +143,6 @@ async function fetchProfile(id: string) { function close() { modalEdit.value = false; - evaluatorId.value = null; - commanderId.value = null; - commanderHighId.value = null; } function onSubmit() { @@ -175,10 +172,9 @@ function onSubmit() { } }); } - async function getOrgOp() { http - .get(config.API.Kpiorg) + .get(config.API.Kpiorg+`/${store.dataProfile.profileId}`) .then((res) => { const data = res.data.result; evaluatorIdMainOp.value = data.caregiver.map((i: any) => ({ @@ -294,8 +290,8 @@ async function getProfile() { } async function getAll() { await fetchEvaluation(); - getProfile(); - getOrgOp(); + await getProfile(); + await getOrgOp(); } function sendToEvaluatore() { @@ -456,7 +452,7 @@ function goToSummary() { } onMounted(async () => { - showLoader(); + store.isUpdate = await false; await getAll(); }); @@ -887,6 +883,7 @@ onMounted(async () => {
+ {{ evaluatorId }}