ปรับทดลองงาน
This commit is contained in:
parent
91935f9f6f
commit
1fc820eb3d
11 changed files with 42 additions and 1475 deletions
|
|
@ -1,83 +0,0 @@
|
|||
<template>
|
||||
<div class="row col-12 q-gutter-lg no-margin">
|
||||
<div class="col-12 row">
|
||||
<div class="col-12 text-top2 row items-center">
|
||||
ผู้บังคับบัญชาผู้มอบหมายงาน
|
||||
</div>
|
||||
<div class="col-12 row q-col-gutter-md">
|
||||
<q-select
|
||||
class="col-xs-12 col-sm-8"
|
||||
dense
|
||||
v-model="Autherise"
|
||||
outlined
|
||||
:options="option"
|
||||
label="ผู้บังคับบัญชา"
|
||||
/>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dateAutherise"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
class="full-width datepicker col-3"
|
||||
:model-value="
|
||||
dateAutherise != null ? date2Thai(dateAutherise) : null
|
||||
"
|
||||
:label="`${'ลงวันที่'}`"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai } = mixin;
|
||||
const Autherise = ref<any>(null);
|
||||
|
||||
const dateAutherise = ref<any>(new Date());
|
||||
|
||||
const option = ref<any>(["นาย ภูริณัฐ บุญขาว", "นาย พงศกร วรารักษ์"]);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.text-top2 {
|
||||
font-weight: 500;
|
||||
padding-bottom: 8px;
|
||||
color: rgb(70, 68, 68);
|
||||
}
|
||||
|
||||
.text-top0 {
|
||||
font-weight: 600;
|
||||
padding-bottom: 8px;
|
||||
color: rgb(70, 68, 68);
|
||||
}
|
||||
</style>
|
||||
|
|
@ -41,7 +41,7 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
onMounted(async () => {
|
||||
console.log("tab===>", props.tab);
|
||||
// console.log("tab===>", props.tab);
|
||||
|
||||
if (props.tab !== undefined) {
|
||||
round.value = props.tab.charAt(4);
|
||||
|
|
@ -50,6 +50,7 @@ onMounted(async () => {
|
|||
}
|
||||
await fecthFormdata(assignId.value);
|
||||
});
|
||||
|
||||
const fecthFormdata = async (id: string) => {
|
||||
await http
|
||||
.get(config.API.formevaluateRecord(id))
|
||||
|
|
@ -64,13 +65,14 @@ const fecthFormdata = async (id: string) => {
|
|||
option.value.push(res.data.data.director);
|
||||
Autherise.value = res.data.data.director.name;
|
||||
list1_1.value = res.data.data.assign_output;
|
||||
evaluate_expenct_level.value = res.data.data.assign_output.map((e) => ({
|
||||
evaluate_expenct_level.value = res.data.data.assign_output.map((e: any) => ({
|
||||
id: e.id,
|
||||
labal: e.output_desc,
|
||||
}));
|
||||
evaluate_ouptut.value = res.data.data.assign_output.map((e) => ({
|
||||
evaluate_ouptut.value = res.data.data.assign_output.map((e: any) => ({
|
||||
id: e.id,
|
||||
}));
|
||||
|
||||
checkArray.value = list1_1.value.length;
|
||||
|
||||
console.log(res.data.data.evaluate_no, round.value);
|
||||
|
|
@ -87,7 +89,7 @@ const fecthFormRound = async (id: string, no: string) => {
|
|||
showLoader();
|
||||
await http
|
||||
.get(config.API.formevaluateround(id, no))
|
||||
.then((res: any) => {
|
||||
.then(async(res: any) => {
|
||||
// console.log(res);
|
||||
let data = res.data.data.evaluate;
|
||||
start_date.value = data.date_start;
|
||||
|
|
@ -133,6 +135,14 @@ const fecthFormRound = async (id: string, no: string) => {
|
|||
) {
|
||||
etc2.value = true;
|
||||
}
|
||||
|
||||
if (data.achievements) {
|
||||
await data.achievements.map((e: any, index: number) => {
|
||||
evaluate_expenct_level.value[index].level = e.evaluate_expect_level
|
||||
evaluate_ouptut.value[index].text = e.evaluate_output_desc
|
||||
evaluate_ouptut.value[index].level = e.evaluate_output_level
|
||||
});
|
||||
}
|
||||
status.value = false;
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -405,7 +415,7 @@ const saveformdata = async (data: any) => {
|
|||
</div>
|
||||
<div class="col-12 text-top0 row items-center">
|
||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||
<span class="text-black q-px-sm">{{ "ครั้งที่" + round }}</span>
|
||||
<span class="text-black q-px-sm">{{ "ครั้งที่ " + round }}</span>
|
||||
ระหว่างวันที่
|
||||
<span class="text-black q-px-sm">{{ date2Thai(start_date) }}</span>
|
||||
ถึงวันที่
|
||||
|
|
@ -447,6 +457,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -498,6 +509,7 @@ const saveformdata = async (data: any) => {
|
|||
hide-bottom-space
|
||||
:row="1"
|
||||
:rules="evaluate_ouptutRules"
|
||||
:disable="!status"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
|
|
@ -509,6 +521,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -551,6 +564,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -590,6 +604,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -629,6 +644,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -668,6 +684,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -707,6 +724,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -782,6 +800,7 @@ const saveformdata = async (data: any) => {
|
|||
@click="
|
||||
(achievement_other.text = ''), (achievement_other.level = 0)
|
||||
"
|
||||
:disable="!status"
|
||||
/></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
|
@ -805,6 +824,7 @@ const saveformdata = async (data: any) => {
|
|||
:rules="[
|
||||
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
:disable="!status"
|
||||
/>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
|
@ -816,6 +836,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -857,6 +878,7 @@ const saveformdata = async (data: any) => {
|
|||
:row="5"
|
||||
:rules="achievement_strengthRules"
|
||||
ref="achievement_strengthRef"
|
||||
:disable="!status"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 row">
|
||||
|
|
@ -876,6 +898,7 @@ const saveformdata = async (data: any) => {
|
|||
:row="5"
|
||||
:rules="achievement_inproveRules"
|
||||
ref="achievement_inproveRef"
|
||||
:disable="!status"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -911,6 +934,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -958,6 +982,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -1005,6 +1030,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -1037,6 +1063,7 @@ const saveformdata = async (data: any) => {
|
|||
dense
|
||||
v-model="etc2"
|
||||
@click="(behavio_orther.text = ''), (behavio_orther.level = 0)"
|
||||
:disable="!status"
|
||||
/>
|
||||
</div>
|
||||
<q-card
|
||||
|
|
@ -1061,6 +1088,7 @@ const saveformdata = async (data: any) => {
|
|||
:rules="[
|
||||
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
|
||||
]"
|
||||
:disable="!status"
|
||||
/>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
|
@ -1072,6 +1100,7 @@ const saveformdata = async (data: any) => {
|
|||
color="grey"
|
||||
:color-selected="ratingColors"
|
||||
label="ระดับการประเมินพฤติกรรม"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:tip-1>
|
||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||
|
|
@ -1113,6 +1142,7 @@ const saveformdata = async (data: any) => {
|
|||
:row="5"
|
||||
:rules="behavio_strengthRules"
|
||||
ref="behavio_strengthRef"
|
||||
:disable="!status"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 row">
|
||||
|
|
@ -1132,6 +1162,7 @@ const saveformdata = async (data: any) => {
|
|||
:row="5"
|
||||
:rules="behavio_inproveRules"
|
||||
ref="behavio_inproveRef"
|
||||
:disable="!status"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1163,6 +1194,7 @@ const saveformdata = async (data: any) => {
|
|||
v-model="orientation"
|
||||
val="1"
|
||||
label="ดำเนินการเเล้ว"
|
||||
:disable="!status"
|
||||
/>
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
|
|
@ -1170,6 +1202,7 @@ const saveformdata = async (data: any) => {
|
|||
v-model="orientation"
|
||||
val="0"
|
||||
label=" ยังไม่ได้ดำเนินการ"
|
||||
:disable="!status"
|
||||
/>
|
||||
</div>
|
||||
</q-item-section>
|
||||
|
|
@ -1194,6 +1227,7 @@ const saveformdata = async (data: any) => {
|
|||
v-model="self_learning"
|
||||
val="0"
|
||||
label=" ยังไม่ได้ดำเนินการ"
|
||||
:disable="!status"
|
||||
/>
|
||||
</div>
|
||||
</q-item-section>
|
||||
|
|
@ -1218,6 +1252,7 @@ const saveformdata = async (data: any) => {
|
|||
v-model="training_seminar"
|
||||
val="0"
|
||||
label=" ยังไม่ได้ดำเนินการ"
|
||||
:disable="!status"
|
||||
/>
|
||||
</div>
|
||||
</q-item-section>
|
||||
|
|
@ -1237,6 +1272,7 @@ const saveformdata = async (data: any) => {
|
|||
v-model="other_training"
|
||||
val="1"
|
||||
label="ดำเนินการเเล้ว"
|
||||
:disable="!status"
|
||||
/>
|
||||
<q-radio
|
||||
checked-icon="task_alt"
|
||||
|
|
@ -1297,6 +1333,7 @@ const saveformdata = async (data: any) => {
|
|||
"
|
||||
:label="`${'ลงวันที่'}`"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||
:disable="!status"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -75,26 +75,6 @@ const nextPage = () => {
|
|||
</q-menu>
|
||||
</q-btn>
|
||||
</q-tab>
|
||||
|
||||
<!-- <q-tab name="save3" label="ครั้งที่ 3" />
|
||||
<q-btn size="12px" flat dense icon="mdi-download" :disable="tab !== 'save3'"
|
||||
:color="tab !== 'save3' ? 'grey' : 'add'">
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar><q-icon color="red"
|
||||
name="mdi-file-pdf" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .PDF</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup>
|
||||
<q-item-section avatar><q-icon color="blue"
|
||||
name="mdi-file-word" /></q-item-section>
|
||||
<q-item-section>ไฟล์ .docx</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn> -->
|
||||
</q-tabs>
|
||||
<div>
|
||||
<q-btn color="blue" flat dense icon="mdi-plus" @click="nextPage">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue