ปรับฟอร์ม kpi

This commit is contained in:
Warunee Tamkoo 2024-05-08 08:06:53 +07:00
parent d642f663f3
commit 6c10587139
6 changed files with 43 additions and 38 deletions

View file

@ -269,6 +269,14 @@ onMounted(() => {
v-model:dataListCriteria="dataListCriteria"
v-model:competencyScore="competencyScore"
/>
<div class="row text-body2 text-weight-bold justify-center">
<span
>สรปผลการประเมนสมรรถนะ (คะแนนเต
{{ store.dataEvaluation.capacityPoint }} คะแนน)</span
>
<div class="text-primary q-pl-md">{{ competencyScore }}</div>
</div>
</div>
</q-scroll-area>

View file

@ -24,7 +24,7 @@ const $q = useQuasar();
const store = useKpiDataStore();
const expectedLevel = ref<any>();
const weight = ref<number | null>(null);
const weight = ref<number>(100);
const mixin = useCounterMixin();
const {
showLoader,
@ -123,7 +123,7 @@ function closeDialog() {
formDetail.definition = "";
formDetail.criteria = "";
idProps.value = null;
weight.value = null;
// weight.value = null;
expectedLevel.value = null;
dataListCapacityDetails.value = [];
@ -375,6 +375,7 @@ watch(
<div class="col-4 text-grey-6">ำหน (อยละ)</div>
<div class="col-8">
<q-input
readonly
v-model="weight"
dense
outlined
@ -386,11 +387,9 @@ watch(
/>
</div>
<div class="col-4 text-grey-6">ระดบทคาดหว</div>
<div
v-if="type == 'HEAD' || type == 'GROUP'"
class="col-8"
>
<div class="col-8">
<q-select
:readonly="type == 'HEAD' || type == 'GROUP'"
v-model="expectedLevel"
:options="expectedLevelOp"
dense
@ -402,7 +401,7 @@ watch(
class="inputgreen"
/>
</div>
<div v-else>
<!-- <div v-else>
<q-input
v-model="expectedLevel"
dense
@ -412,7 +411,7 @@ watch(
hide-bottom-space
class="inputgreen"
/>
</div>
</div> -->
</div>
</q-card>
</div>
@ -428,8 +427,8 @@ watch(
</div>
<div
v-if="dataListCapacityDetails.length == 0"
class="q-pa-md text-weight-bold col-12 text-center "
style="border: 2px solid #f5f5f5;"
class="q-pa-md text-weight-bold col-12 text-center"
style="border: 2px solid #f5f5f5"
>
<span>ไมพบขอมลสมรรถนะ</span>
</div>

View file

@ -11,7 +11,8 @@ import File from "@/modules/08_KPI/components/Tab/05_File.vue";
const store = useKpiDataStore();
const route = useRoute();
const isReadonly = <boolean>(route.name === "KPIEditEvaluator" ? true : false);
const isReadonly = ref<boolean>(route.name === "KPIEditEvaluator" ? true : false);
const step = ref<number>(1); // 1 = , 2 = , 3 =
const indicatorScore = defineModel("indicatorScore", {
type: Number,
default: 0,
@ -23,20 +24,24 @@ const competencyScore = defineModel("competencyScore", {
const itemsTab = ref<any>([
{
name: "1",
label: "ผู้ขอรับการประเมิน",
label: "จัดทำแบบฟอร์มการประเมิน",
},
{
name: "2",
label: "ผู้ประเมิน",
label: "รายงานความก้าวหน้า",
},
{
name: "3",
label: "ผู้บังคับบัญชาเหนือขึ้นไป",
},
{
name: "4",
label: "ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง",
label: "รายงานผลสำเร็จของงาน",
},
// {
// name: "3",
// label: "",
// },
// {
// name: "4",
// label: "",
// },
{
name: "5",
label: "ไฟล์เอกสาร",
@ -63,14 +68,15 @@ const splitterModel = ref<number>(12);
:icon="tab.icon"
:label="tab.label"
/> -->
<q-tab name="1" label="ผู้ขอรับการประเมิน" />
<q-tab name="2" label="ผู้ประเมิน"> </q-tab>
<q-tab name="3" label="ผู้บังคับบัญชา">
<q-tab name="1" label="จัดทำข้อตกลง" />
<q-tab name="2" label="รายงานความก้าวหน้า" :disable="step < 2" />
<q-tab name="3" label="รายงานผลสำเร็จของงาน" :disable="step < 3" />
<!-- <q-tab name="3" label="ผู้บังคับบัญชา">
<div class="text-caption">เหนอขนไป</div>
</q-tab>
<q-tab name="4" label="ผู้บังคับบัญชา">
<div class="text-caption">เหนอขนไปอกชนหน</div>
</q-tab>
</q-tab> -->
<q-tab name="5" label="ไฟล์เอกสาร" />
</q-tabs>
</template>

View file

@ -204,7 +204,7 @@ watch(
<q-tooltip>เพมขอม</q-tooltip>
</q-btn>
</div>
<div class="col-auto">
<!-- <div class="col-auto">
<q-btn
v-if="!isReadonly"
flat
@ -217,7 +217,7 @@ watch(
>
<q-tooltip>ประเม</q-tooltip>
</q-btn>
</div>
</div> -->
</div>
</q-card-section>
<q-separator />

View file

@ -115,7 +115,7 @@ function onAdd(type: string) {
const rows = ref<any>([]);
const lists = ref<any>([]);
const resultEvaluation = ref<string | 0>(0);
// const resultEvaluation = ref<string | 0>(0);
function getData(type: string) {
http
@ -161,7 +161,7 @@ function getData(type: string) {
weightAvg != 0
? (resultAvg / weightAvg) * store.dataEvaluation.capacityPoint
: 0;
resultEvaluation.value = sum.toFixed(2);
// resultEvaluation.value = sum.toFixed(2);
competencyScore.value = sum;
}
});
@ -239,7 +239,7 @@ onMounted(() => {
</div>
<q-space />
<q-btn
<!-- <q-btn
v-if="!isReadonly"
flat
round
@ -250,7 +250,7 @@ onMounted(() => {
@click="onEvaluate(item.id)"
>
<q-tooltip>ประเม</q-tooltip>
</q-btn>
</q-btn> -->
</div>
</q-card-section>
<q-card-section class="q-pa-sm">
@ -359,14 +359,6 @@ onMounted(() => {
v-model:dataListCriteria="dataListCriteria"
:get-data="getData"
/>
<div class="row text-body2 text-weight-bold justify-center">
<span
>สรปผลการประเมนสมรรถนะ (คะแนนเต
{{ store.dataEvaluation.capacityPoint }} คะแนน)</span
>
<div class="text-primary q-pl-md">{{ resultEvaluation }}</div>
</div>
</template>
<style scoped>

View file

@ -342,7 +342,7 @@ onMounted(async () => {
}}</span>
<q-space />
<div class="q-gutter-x-sm">
<q-btn
<!-- <q-btn
v-if="!isReadonly"
unelevated
round
@ -353,7 +353,7 @@ onMounted(async () => {
@click="modalScore = true"
>
<q-tooltip>แกไขคะแนนเต</q-tooltip>
</q-btn>
</q-btn> -->
<q-btn
v-if="!isReadonly"
unelevated