updated kpi
This commit is contained in:
parent
bb19640c98
commit
6c03e24518
8 changed files with 114 additions and 46 deletions
|
|
@ -57,7 +57,7 @@ const router = useRouter();
|
|||
async function fetchEvaluation() {
|
||||
await http
|
||||
.get(config.API.kpiEvaluation + `/${id.value}`)
|
||||
.then(async(res) => {
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
|
||||
store.dataEvaluation = await data;
|
||||
|
|
@ -442,19 +442,20 @@ onMounted(async () => {
|
|||
<q-tooltip>แก้ไขคะแนนเต็ม</q-tooltip>
|
||||
</q-btn> -->
|
||||
<q-btn
|
||||
v-if="
|
||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||
store.rolePerson === 'USER'
|
||||
"
|
||||
unelevated
|
||||
round
|
||||
icon="edit"
|
||||
icon="mdi-account"
|
||||
color="grey-2"
|
||||
text-color="edit"
|
||||
size="md"
|
||||
@click="modalEdit = true"
|
||||
>
|
||||
<q-tooltip>แก้ไขผู้ประเมิน</q-tooltip>
|
||||
<q-tooltip>{{
|
||||
store.dataEvaluation.evaluationStatus === "NEW" &&
|
||||
store.rolePerson === "USER"
|
||||
? "แก้ไขผู้ประเมิน"
|
||||
: "ข้อมูลผู้ประเมิน"
|
||||
}}</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
unelevated
|
||||
|
|
@ -538,7 +539,7 @@ onMounted(async () => {
|
|||
: (
|
||||
store.excusiveIndicator1ScoreVal +
|
||||
store.excusiveIndicator2ScoreVal +
|
||||
store.competencyScore
|
||||
store.competencyScoreVal
|
||||
).toFixed(2)
|
||||
}}
|
||||
</span>
|
||||
|
|
@ -560,11 +561,25 @@ onMounted(async () => {
|
|||
<q-dialog v-model="modalEdit" persistent>
|
||||
<q-card bordered style="width: 50vh">
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||
<DialogHeader tittle="แก้ไขผู้ประเมิน" :close="close" />
|
||||
<DialogHeader
|
||||
:tittle="
|
||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||
store.rolePerson === 'USER'
|
||||
? 'แก้ไขผู้ประเมิน'
|
||||
: 'ข้อมูลผู้ประเมิน'
|
||||
"
|
||||
:close="close"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="column q-gutter-sm">
|
||||
<q-select
|
||||
:readonly="
|
||||
!(
|
||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||
store.rolePerson === 'USER'
|
||||
)
|
||||
"
|
||||
v-model="evaluatorId"
|
||||
outlined
|
||||
label="ผู้ประเมิน"
|
||||
|
|
@ -576,16 +591,20 @@ onMounted(async () => {
|
|||
map-options
|
||||
hide-bottom-space
|
||||
lazy-rules
|
||||
:rules="[
|
||||
(val:string) =>
|
||||
!!val || `${'กรุณาเลือกผู้ประเมิน'}`,
|
||||
]"
|
||||
:rules="[ (val:string) => !!val ||
|
||||
`${'กรุณาเลือกผู้ประเมิน'}`, ]"
|
||||
use-input
|
||||
@filter="(inputValue:any,
|
||||
doneFn:Function) => filterOption(inputValue, doneFn,'evaluatorIdOp'
|
||||
) "
|
||||
doneFn:Function) => filterOption(inputValue, doneFn,'evaluatorIdOp'
|
||||
) "
|
||||
/>
|
||||
<q-select
|
||||
:readonly="
|
||||
!(
|
||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||
store.rolePerson === 'USER'
|
||||
)
|
||||
"
|
||||
v-model="commanderId"
|
||||
outlined
|
||||
label="ผู้บังคับบัญชาเหนือขึ้นไป"
|
||||
|
|
@ -600,7 +619,14 @@ onMounted(async () => {
|
|||
doneFn:Function) => filterOption(inputValue, doneFn,'commanderIdOp'
|
||||
) "
|
||||
>
|
||||
<template v-if="commanderId" v-slot:append>
|
||||
<template
|
||||
v-if="
|
||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||
store.rolePerson === 'USER' &&
|
||||
commanderId
|
||||
"
|
||||
v-slot:append
|
||||
>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="commanderId = null"
|
||||
|
|
@ -609,6 +635,12 @@ onMounted(async () => {
|
|||
</template>
|
||||
</q-select>
|
||||
<q-select
|
||||
:readonly="
|
||||
!(
|
||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||
store.rolePerson === 'USER'
|
||||
)
|
||||
"
|
||||
v-model="commanderHighId"
|
||||
outlined
|
||||
label="ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง"
|
||||
|
|
@ -623,7 +655,14 @@ onMounted(async () => {
|
|||
doneFn:Function) => filterOption(inputValue, doneFn,'commanderHighOp'
|
||||
) "
|
||||
>
|
||||
<template v-if="commanderHighId" v-slot:append>
|
||||
<template
|
||||
v-if="
|
||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||
store.rolePerson === 'USER' &&
|
||||
commanderHighId
|
||||
"
|
||||
v-slot:append
|
||||
>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="commanderHighId = null"
|
||||
|
|
@ -634,7 +673,14 @@ onMounted(async () => {
|
|||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
<q-card-actions
|
||||
v-if="
|
||||
store.dataEvaluation.evaluationStatus === 'NEW' &&
|
||||
store.rolePerson === 'USER'
|
||||
"
|
||||
align="right"
|
||||
class="bg-white text-teal"
|
||||
>
|
||||
<q-btn label="บันทึก" color="secondary" type="submit"
|
||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
|
|
|
|||
|
|
@ -201,25 +201,25 @@ function changRound() {
|
|||
function redirectViewDetail(id: string) {
|
||||
store.tabMain = "1";
|
||||
|
||||
store.indicatorWeightTotal = 0;
|
||||
store.indicatorWeight1Total = 0;
|
||||
store.indicatorWeight2Total = 0;
|
||||
store.indicatorPercentVal = 0;
|
||||
store.indicatorScore = 0;
|
||||
store.indicatorScoreVal = 0;
|
||||
store.competencyScore = 0;
|
||||
store.competencyScoreVal = 0;
|
||||
store.devScore = 0;
|
||||
store.devScoreVal = 0;
|
||||
store.competencyDevScore = 0;
|
||||
store.excusiveCompetencyScore = 0;
|
||||
store.excusiveIndicator1PercentVal = 0;
|
||||
store.excusiveIndicator1Weight = 0;
|
||||
store.excusiveIndicator1ScoreVal = 0;
|
||||
store.excusiveIndicator2Weight = 0;
|
||||
store.excusiveIndicator2PercentVal = 0;
|
||||
store.excusiveIndicator2ScoreVal = 0;
|
||||
store.excusiveIndicatorScore = 0;
|
||||
// store.indicatorWeightTotal = 0;
|
||||
// store.indicatorWeight1Total = 0;
|
||||
// store.indicatorWeight2Total = 0;
|
||||
// store.indicatorPercentVal = 0;
|
||||
// store.indicatorScore = 0;
|
||||
// store.indicatorScoreVal = 0;
|
||||
// store.competencyScore = 0;
|
||||
// store.competencyScoreVal = 0;
|
||||
// store.devScore = 0;
|
||||
// store.devScoreVal = 0;
|
||||
// store.competencyDevScore = 0;
|
||||
// store.excusiveCompetencyScore = 0;
|
||||
// store.excusiveIndicator1PercentVal = 0;
|
||||
// store.excusiveIndicator1Weight = 0;
|
||||
// store.excusiveIndicator1ScoreVal = 0;
|
||||
// store.excusiveIndicator2Weight = 0;
|
||||
// store.excusiveIndicator2PercentVal = 0;
|
||||
// store.excusiveIndicator2ScoreVal = 0;
|
||||
// store.excusiveIndicatorScore = 0;
|
||||
|
||||
router.push(`/KPI/${id}`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,15 @@ function fetchList() {
|
|||
: store.tabMainevaluator === "4"
|
||||
? "APPROVE"
|
||||
: store.tabMainevaluator === "5"
|
||||
? "EVALUATING"
|
||||
? "EVALUATING_EVALUATOR"
|
||||
: store.tabMainevaluator === "6"
|
||||
? "EVALUATING_EVALUATOR"
|
||||
: undefined,
|
||||
evaluating:
|
||||
store.tabMainevaluator === "5"
|
||||
? true
|
||||
: store.tabMainevaluator === "6"
|
||||
? false
|
||||
: undefined,
|
||||
reqedit: store.tabMainevaluator === "3" ? "NEW" : undefined,
|
||||
};
|
||||
|
|
@ -316,8 +324,9 @@ onMounted(async () => {
|
|||
label="อนุมัติเพื่อเริ่มประเมิน"
|
||||
@click="onChangTab"
|
||||
/>
|
||||
<q-tab name="5" label="สรุปผลการประเมิน" @click="onChangTab" />
|
||||
<q-tab
|
||||
name="5"
|
||||
name="6"
|
||||
label="ตรวจสอบผลการประเมิน"
|
||||
@click="onChangTab"
|
||||
/>
|
||||
|
|
@ -389,6 +398,19 @@ onMounted(async () => {
|
|||
:fetchList="fetchList"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="6">
|
||||
<TabOther
|
||||
:columns="columns"
|
||||
:visibleColumns="visibleColumns"
|
||||
:rows="dataListMain"
|
||||
:formQuery="store.formQuery"
|
||||
:total="totalList"
|
||||
:maxPage="maxPage"
|
||||
:updatePagination="updatePagination"
|
||||
:fetchList="fetchList"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-card>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue