fixing bug
This commit is contained in:
parent
080ef0b4e8
commit
700dcaee4a
6 changed files with 143 additions and 160 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, computed, watch } from "vue";
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -66,7 +66,7 @@ async function fetchEvaluation() {
|
|||
store.dataEvaluation = await data;
|
||||
formProfile.status = store.convertStatus(data.evaluationStatus);
|
||||
formProfile.result = store.convertResults(data.evaluationResults);
|
||||
store.checkCompetency();
|
||||
// store.checkCompetency();
|
||||
store.checkCompetencyDefaultCompetencyLevel();
|
||||
|
||||
fetchProfile(data.profileId);
|
||||
|
|
@ -264,8 +264,8 @@ function filterOption(val: any, update: Function, refData: string) {
|
|||
|
||||
async function getAll() {
|
||||
await fetchEvaluation();
|
||||
getProfile();
|
||||
getOrgOp();
|
||||
await getProfile();
|
||||
await getOrgOp();
|
||||
}
|
||||
|
||||
function sendToEvaluatore() {
|
||||
|
|
@ -401,14 +401,44 @@ function sendToEvauator() {
|
|||
});
|
||||
}
|
||||
|
||||
function goToSummary() {
|
||||
async function goToSummary() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
() => {
|
||||
async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.sendToSummary(store.dataEvaluation.id))
|
||||
.then(async (res) => {
|
||||
await http
|
||||
.put(
|
||||
config.API.updatePoint(store.dataEvaluation.id),
|
||||
store.dataEvaluation.posTypeName != "อำนวยการ" &&
|
||||
store.dataEvaluation.posTypeName != "บริหาร"
|
||||
? {
|
||||
totalPoint1: store.indicatorScoreVal.toFixed(2),
|
||||
totalPoint2_1: store.competencyScoreVal.toFixed(2),
|
||||
totalPoint2_2: store.devScoreVal.toFixed(2),
|
||||
summaryPoint: (
|
||||
store.indicatorScoreVal +
|
||||
store.competencyScoreVal +
|
||||
store.devScoreVal
|
||||
).toFixed(2),
|
||||
}
|
||||
: {
|
||||
totalPoint1: (
|
||||
store.excusiveIndicator1ScoreVal +
|
||||
store.excusiveIndicator2ScoreVal
|
||||
).toFixed(2),
|
||||
totalPoint2_1: store.competencyScoreVal.toFixed(2),
|
||||
summaryPoint: (
|
||||
store.excusiveIndicator1ScoreVal +
|
||||
store.excusiveIndicator2ScoreVal +
|
||||
store.competencyScoreVal
|
||||
).toFixed(2),
|
||||
}
|
||||
)
|
||||
.then((res) => {});
|
||||
|
||||
await fetchEvaluation();
|
||||
store.tabMain = "4";
|
||||
store.tabOpen = 4;
|
||||
|
|
@ -502,15 +532,15 @@ onMounted(async () => {
|
|||
<div class="q-gutter-x-sm">
|
||||
<span
|
||||
v-if="
|
||||
(store.tabMain === '1' &&
|
||||
store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.tabMain === '1' &&
|
||||
store.dataEvaluation.evaluationStatus == 'NEW' &&
|
||||
((store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName != 'บริหาร' &&
|
||||
store.indicatorWeightTotal != 100) ||
|
||||
((store.dataEvaluation.posTypeName == 'อำนวยการ' ||
|
||||
store.dataEvaluation.posTypeName == 'บริหาร') &&
|
||||
(store.indicatorWeight1Total != 100 ||
|
||||
store.indicatorWeight2Total != 20) &&
|
||||
store.dataEvaluation.evaluationStatus == 'NEW')
|
||||
((store.dataEvaluation.posTypeName == 'อำนวยการ' ||
|
||||
store.dataEvaluation.posTypeName == 'บริหาร') &&
|
||||
(store.indicatorWeight1Total != 100 ||
|
||||
store.indicatorWeight2Total != 20)))
|
||||
"
|
||||
class="text-red"
|
||||
>*น้ำหนัก(ร้อยละ) ผลสัมฤทธิ์ของงานไม่ถูกต้อง</span
|
||||
|
|
|
|||
|
|
@ -275,8 +275,6 @@ function getProfile() {
|
|||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
store.dataProfile = data;
|
||||
store.checkCompetency();
|
||||
store.checkCompetencyDefaultCompetencyLevel();
|
||||
|
||||
formRound.profileId = data.profileId;
|
||||
formRound.prefix = data.prefix;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue