edit btn
This commit is contained in:
parent
93665959f3
commit
e61297a4fa
4 changed files with 199 additions and 28 deletions
|
|
@ -3,10 +3,14 @@ import { ref, defineAsyncComponent, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useProbationDataStore } from "@/modules/05_placement/store";
|
import { useProbationDataStore } from "@/modules/05_placement/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const routeName = router.currentRoute.value.name;
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const probationStore = useProbationDataStore();
|
const probationStore = useProbationDataStore();
|
||||||
const { ratingColors } = probationStore;
|
const { ratingColors } = probationStore;
|
||||||
|
|
@ -23,7 +27,16 @@ const {
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const assignId = ref<string>(route.params.form.toString());
|
const assignId = ref<string>(route.params.form.toString());
|
||||||
|
const saveEdit = (id:string) => {
|
||||||
|
dialogConfirm($q,() => console.log("save"))
|
||||||
|
}
|
||||||
|
const edit = () => {
|
||||||
|
status.value = true;
|
||||||
|
console.log(status.value);
|
||||||
|
};
|
||||||
|
const cancel = () => {
|
||||||
|
status.value = false;
|
||||||
|
};
|
||||||
const person = ref<any>([]);
|
const person = ref<any>([]);
|
||||||
const assign = ref<any>([]);
|
const assign = ref<any>([]);
|
||||||
const evaluate_no = ref<string>("");
|
const evaluate_no = ref<string>("");
|
||||||
|
|
@ -312,6 +325,34 @@ const putformData = () => {
|
||||||
<div class="row col-12 q-gutter-lg no-margin">
|
<div class="row col-12 q-gutter-lg no-margin">
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<div>แบบประเมินผล (ผู้บังคับบัญชา)</div>
|
<div>แบบประเมินผล (ผู้บังคับบัญชา)</div>
|
||||||
|
<q-space />
|
||||||
|
<div v-if="status == false">
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
@click="edit()"
|
||||||
|
icon="mdi-pencil-outline"
|
||||||
|
>
|
||||||
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
|
||||||
|
<q-tooltip>ยกเลิก</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="public"
|
||||||
|
@click="saveEdit(assignId)"
|
||||||
|
icon="mdi-content-save-outline"
|
||||||
|
>
|
||||||
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="col-12 text-top0 row items-center">
|
<div class="col-12 text-top0 row items-center">
|
||||||
|
|
@ -362,6 +403,7 @@ const putformData = () => {
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
:disable="!status"
|
||||||
>
|
>
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -401,6 +443,7 @@ const putformData = () => {
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
:disable="!status"
|
||||||
>
|
>
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -440,6 +483,7 @@ const putformData = () => {
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
:disable="!status"
|
||||||
>
|
>
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -479,6 +523,7 @@ const putformData = () => {
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
:disable="!status"
|
||||||
>
|
>
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -518,6 +563,7 @@ const putformData = () => {
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
:disable="!status"
|
||||||
>
|
>
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -557,6 +603,7 @@ const putformData = () => {
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
:disable="!status"
|
||||||
>
|
>
|
||||||
<template v-slot:tip-1>
|
<template v-slot:tip-1>
|
||||||
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
<q-tooltip>ต่ำกว่าความคาดหวังมาก</q-tooltip>
|
||||||
|
|
@ -588,6 +635,7 @@ const putformData = () => {
|
||||||
1.7 อื่นๆ
|
1.7 อื่นๆ
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
|
:disable="!status"
|
||||||
dense
|
dense
|
||||||
v-model="etc"
|
v-model="etc"
|
||||||
@click="
|
@click="
|
||||||
|
|
@ -608,6 +656,7 @@ const putformData = () => {
|
||||||
v-model="achievement_other.text"
|
v-model="achievement_other.text"
|
||||||
label="กรอกอื่นๆ"
|
label="กรอกอื่นๆ"
|
||||||
dense
|
dense
|
||||||
|
:disable="!status"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
autogrow
|
autogrow
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -624,6 +673,7 @@ const putformData = () => {
|
||||||
v-model="achievement_other.level"
|
v-model="achievement_other.level"
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
:disable="!status"
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
|
@ -677,6 +727,7 @@ const putformData = () => {
|
||||||
v-model="conduct_level[i]"
|
v-model="conduct_level[i]"
|
||||||
:val="list.id"
|
:val="list.id"
|
||||||
max="5"
|
max="5"
|
||||||
|
:disable="!status"
|
||||||
size="sm"
|
size="sm"
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
|
|
@ -725,6 +776,7 @@ const putformData = () => {
|
||||||
:val="list.id"
|
:val="list.id"
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
:disable="!status"
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
|
@ -772,6 +824,7 @@ const putformData = () => {
|
||||||
:val="list.id"
|
:val="list.id"
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
:disable="!status"
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
|
@ -806,6 +859,7 @@ const putformData = () => {
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
dense
|
dense
|
||||||
v-model="etc2"
|
v-model="etc2"
|
||||||
|
:disable="!status"
|
||||||
@click="(behavio_orther.text = ''), (behavio_orther.level = 0)"
|
@click="(behavio_orther.text = ''), (behavio_orther.level = 0)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -823,6 +877,7 @@ const putformData = () => {
|
||||||
v-model="behavio_orther.text"
|
v-model="behavio_orther.text"
|
||||||
label="กรอกอื่นๆ"
|
label="กรอกอื่นๆ"
|
||||||
dense
|
dense
|
||||||
|
:disable="!status"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
autogrow
|
autogrow
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -839,6 +894,7 @@ const putformData = () => {
|
||||||
v-model="behavio_orther.level"
|
v-model="behavio_orther.level"
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
:disable="!status"
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
|
@ -878,6 +934,7 @@ const putformData = () => {
|
||||||
class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
:disable="!status"
|
||||||
label="กรอกจุดเด่น"
|
label="กรอกจุดเด่น"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:row="5"
|
:row="5"
|
||||||
|
|
@ -899,6 +956,7 @@ const putformData = () => {
|
||||||
type="textarea"
|
type="textarea"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
label="กรอกสิ่งที่ควรปรับปรุง"
|
label="กรอกสิ่งที่ควรปรับปรุง"
|
||||||
|
:disable="!status"
|
||||||
:row="5"
|
:row="5"
|
||||||
:rules="behavio_inproveRules"
|
:rules="behavio_inproveRules"
|
||||||
ref="behavio_inproveRef"
|
ref="behavio_inproveRef"
|
||||||
|
|
@ -933,11 +991,13 @@ const putformData = () => {
|
||||||
v-model="orientation"
|
v-model="orientation"
|
||||||
val="1"
|
val="1"
|
||||||
label="ดำเนินการเเล้ว"
|
label="ดำเนินการเเล้ว"
|
||||||
|
:disable="!status"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
v-model="orientation"
|
v-model="orientation"
|
||||||
|
:disable="!status"
|
||||||
val="0"
|
val="0"
|
||||||
label=" ยังไม่ได้ดำเนินการ"
|
label=" ยังไม่ได้ดำเนินการ"
|
||||||
/>
|
/>
|
||||||
|
|
@ -955,12 +1015,14 @@ const putformData = () => {
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
v-model="self_learning"
|
v-model="self_learning"
|
||||||
|
:disable="!status"
|
||||||
val="1"
|
val="1"
|
||||||
label="ดำเนินการเเล้ว"
|
label="ดำเนินการเเล้ว"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
|
:disable="!status"
|
||||||
v-model="self_learning"
|
v-model="self_learning"
|
||||||
val="0"
|
val="0"
|
||||||
label=" ยังไม่ได้ดำเนินการ"
|
label=" ยังไม่ได้ดำเนินการ"
|
||||||
|
|
@ -977,6 +1039,7 @@ const putformData = () => {
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-radio
|
<q-radio
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
|
:disable="!status"
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
v-model="training_seminar"
|
v-model="training_seminar"
|
||||||
val="1"
|
val="1"
|
||||||
|
|
@ -986,6 +1049,7 @@ const putformData = () => {
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
v-model="training_seminar"
|
v-model="training_seminar"
|
||||||
|
:disable="!status"
|
||||||
val="0"
|
val="0"
|
||||||
label=" ยังไม่ได้ดำเนินการ"
|
label=" ยังไม่ได้ดำเนินการ"
|
||||||
/>
|
/>
|
||||||
|
|
@ -1006,12 +1070,14 @@ const putformData = () => {
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
v-model="other_training"
|
v-model="other_training"
|
||||||
val="1"
|
val="1"
|
||||||
|
:disable="!status"
|
||||||
label="ดำเนินการเเล้ว"
|
label="ดำเนินการเเล้ว"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
unchecked-icon="panorama_fish_eye"
|
unchecked-icon="panorama_fish_eye"
|
||||||
v-model="other_training"
|
v-model="other_training"
|
||||||
|
:disable="!status"
|
||||||
val="0"
|
val="0"
|
||||||
label=" ยังไม่ได้ดำเนินการ"
|
label=" ยังไม่ได้ดำเนินการ"
|
||||||
/>
|
/>
|
||||||
|
|
@ -1045,6 +1111,7 @@ const putformData = () => {
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
|
:readonly="!status"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
|
|
@ -1062,6 +1129,7 @@ const putformData = () => {
|
||||||
dateAutherise != null ? date2Thai(dateAutherise) : null
|
dateAutherise != null ? date2Thai(dateAutherise) : null
|
||||||
"
|
"
|
||||||
:label="`${'ลงวันที่'}`"
|
:label="`${'ลงวันที่'}`"
|
||||||
|
:disable="!status"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกลงวันที่'}`]"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
@ -1082,9 +1150,9 @@ const putformData = () => {
|
||||||
<!-- <Footer /> -->
|
<!-- <Footer /> -->
|
||||||
<q-toolbar class="text-primary">
|
<q-toolbar class="text-primary">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn label="บันทึก" color="secondary" @click="savaForm" v-if="status" />
|
<q-btn v-if="routeName == 'FormEvaluateAdd'" label="บันทึก" color="secondary" @click="savaForm" />
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@ import { ref, defineAsyncComponent, computed, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useProbationDataStore } from "@/modules/05_placement/store";
|
import { useProbationDataStore } from "@/modules/05_placement/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const routeName = router.currentRoute.value.name;
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const probationStore = useProbationDataStore();
|
const probationStore = useProbationDataStore();
|
||||||
const { ratingColors } = probationStore;
|
const { ratingColors } = probationStore;
|
||||||
|
|
@ -23,7 +25,16 @@ const {
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const assignId = ref<string>(route.params.form.toString());
|
const assignId = ref<string>(route.params.form.toString());
|
||||||
|
const saveEdit = (id:string) => {
|
||||||
|
dialogConfirm($q,() => console.log("save"))
|
||||||
|
}
|
||||||
|
const edit = () => {
|
||||||
|
status.value = true;
|
||||||
|
console.log(status.value);
|
||||||
|
};
|
||||||
|
const cancel = () => {
|
||||||
|
status.value = false;
|
||||||
|
};
|
||||||
// const person = ref<any>([]);
|
// const person = ref<any>([]);
|
||||||
const assign = ref<any>([]);
|
const assign = ref<any>([]);
|
||||||
const evaluate_no = ref<string>("");
|
const evaluate_no = ref<string>("");
|
||||||
|
|
@ -442,6 +453,34 @@ const putformData = () => {
|
||||||
<div class="row col-12 q-gutter-lg no-margin">
|
<div class="row col-12 q-gutter-lg no-margin">
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<div>แบบประเมินผล (คณะกรรมการ)</div>
|
<div>แบบประเมินผล (คณะกรรมการ)</div>
|
||||||
|
<q-space />
|
||||||
|
<div v-if="status == false">
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
@click="edit()"
|
||||||
|
icon="mdi-pencil-outline"
|
||||||
|
>
|
||||||
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
|
||||||
|
<q-tooltip>ยกเลิก</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="public"
|
||||||
|
@click="saveEdit(assignId)"
|
||||||
|
icon="mdi-content-save-outline"
|
||||||
|
>
|
||||||
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="col-12 text-top0 row items-center">
|
<div class="col-12 text-top0 row items-center">
|
||||||
|
|
@ -489,6 +528,7 @@ const putformData = () => {
|
||||||
v-model="learn_level"
|
v-model="learn_level"
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
:disable="!status"
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
|
@ -529,6 +569,7 @@ const putformData = () => {
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
color="grey"
|
color="grey"
|
||||||
|
:disable="!status"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
>
|
>
|
||||||
|
|
@ -566,6 +607,7 @@ const putformData = () => {
|
||||||
<q-rating
|
<q-rating
|
||||||
v-model="success_level"
|
v-model="success_level"
|
||||||
max="5"
|
max="5"
|
||||||
|
:disable="!status"
|
||||||
size="sm"
|
size="sm"
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
|
|
@ -602,6 +644,7 @@ const putformData = () => {
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
dense
|
dense
|
||||||
|
:disable="!status"
|
||||||
v-model="etc"
|
v-model="etc"
|
||||||
@click="
|
@click="
|
||||||
(achievement_other.text = ''), (achievement_other.level = 0)
|
(achievement_other.text = ''), (achievement_other.level = 0)
|
||||||
|
|
@ -623,6 +666,7 @@ const putformData = () => {
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
autogrow
|
autogrow
|
||||||
|
:disable="!status"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
outlined
|
outlined
|
||||||
class="bg-white"
|
class="bg-white"
|
||||||
|
|
@ -638,6 +682,7 @@ const putformData = () => {
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
color="grey"
|
color="grey"
|
||||||
|
:disable="!status"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
>
|
>
|
||||||
|
|
@ -709,6 +754,7 @@ const putformData = () => {
|
||||||
:val="list.id"
|
:val="list.id"
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
:disable="!status"
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
|
@ -754,6 +800,7 @@ const putformData = () => {
|
||||||
<q-rating
|
<q-rating
|
||||||
v-model="moral_level[i]"
|
v-model="moral_level[i]"
|
||||||
:val="list.id"
|
:val="list.id"
|
||||||
|
:disable="!status"
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
color="grey"
|
color="grey"
|
||||||
|
|
@ -801,6 +848,7 @@ const putformData = () => {
|
||||||
<q-rating
|
<q-rating
|
||||||
v-model="discipline_level[i]"
|
v-model="discipline_level[i]"
|
||||||
:val="list.id"
|
:val="list.id"
|
||||||
|
:disable="!status"
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
color="grey"
|
color="grey"
|
||||||
|
|
@ -837,6 +885,7 @@ const putformData = () => {
|
||||||
class="q-ml-sm"
|
class="q-ml-sm"
|
||||||
dense
|
dense
|
||||||
v-model="etc2"
|
v-model="etc2"
|
||||||
|
:disable="!status"
|
||||||
@click="(behavio_orther.text = ''), (behavio_orther.level = 0)"
|
@click="(behavio_orther.text = ''), (behavio_orther.level = 0)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -855,6 +904,7 @@ const putformData = () => {
|
||||||
label="กรอกอื่นๆ"
|
label="กรอกอื่นๆ"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
:disable="!status"
|
||||||
autogrow
|
autogrow
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -870,6 +920,7 @@ const putformData = () => {
|
||||||
v-model="behavio_orther.level"
|
v-model="behavio_orther.level"
|
||||||
max="5"
|
max="5"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
:disable="!status"
|
||||||
color="grey"
|
color="grey"
|
||||||
:color-selected="ratingColors"
|
:color-selected="ratingColors"
|
||||||
label="ระดับการประเมินพฤติกรรม"
|
label="ระดับการประเมินพฤติกรรม"
|
||||||
|
|
@ -1045,30 +1096,30 @@ const putformData = () => {
|
||||||
<div class="row q-gutter-md align-center">
|
<div class="row q-gutter-md align-center">
|
||||||
<div class="col-8">1. การปฐมนิเทศ</div>
|
<div class="col-8">1. การปฐมนิเทศ</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input dense type="number" v-model="orientation" />
|
<q-input dense type="number" :disable="!status" v-model="orientation" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input dense type="number" v-model="orientation_percent" />
|
<q-input dense type="number" :disable="!status" v-model="orientation_percent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
<div class="row q-gutter-md align-center">
|
<div class="row q-gutter-md align-center">
|
||||||
<div class="col-8">2. การเรียนรู้ด้วยตนเอง</div>
|
<div class="col-8">2. การเรียนรู้ด้วยตนเอง</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input dense type="number" v-model="self_learning" />
|
<q-input dense type="number" :disable="!status" v-model="self_learning" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input dense type="number" v-model="self_learning_percent" />
|
<q-input dense type="number" :disable="!status" v-model="self_learning_percent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
<div class="row q-gutter-md align-center">
|
<div class="row q-gutter-md align-center">
|
||||||
<div class="col-8">3. การอบรมสัมนาร่วมกัน</div>
|
<div class="col-8">3. การอบรมสัมนาร่วมกัน</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input dense type="number" v-model="training_seminar" />
|
<q-input dense type="number" :disable="!status" v-model="training_seminar" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input dense type="number" v-model="training_seminar_percent" />
|
<q-input dense type="number" :disable="!status" v-model="training_seminar_percent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-separator class="q-my-xs" />
|
<q-separator class="q-my-xs" />
|
||||||
|
|
@ -1077,10 +1128,10 @@ const putformData = () => {
|
||||||
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
4. การอบรมอื่น ๆ ตามที่หน่วยงานกำหนด (ถ้ามี)
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input dense type="number" v-model="other_training" />
|
<q-input dense type="number" :disable="!status" v-model="other_training" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<q-input dense type="number" v-model="other_training_percent" />
|
<q-input dense type="number" :disable="!status" v-model="other_training_percent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <q-list dense>
|
<!-- <q-list dense>
|
||||||
|
|
@ -1207,6 +1258,7 @@ const putformData = () => {
|
||||||
dense
|
dense
|
||||||
v-model="develop_result"
|
v-model="develop_result"
|
||||||
outlined
|
outlined
|
||||||
|
:disable="!status"
|
||||||
:options="develop_result_option"
|
:options="develop_result_option"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
|
|
@ -1241,6 +1293,7 @@ const putformData = () => {
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
|
:readonly="!status"
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
>
|
>
|
||||||
|
|
@ -1254,6 +1307,7 @@ const putformData = () => {
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
:disable="!status"
|
||||||
class="full-width datepicker col-3"
|
class="full-width datepicker col-3"
|
||||||
:model-value="
|
:model-value="
|
||||||
dateAutherise != null ? date2Thai(dateAutherise) : null
|
dateAutherise != null ? date2Thai(dateAutherise) : null
|
||||||
|
|
@ -1290,6 +1344,7 @@ const putformData = () => {
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
|
:readonly="!status"
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
>
|
>
|
||||||
|
|
@ -1302,6 +1357,7 @@ const putformData = () => {
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
|
:disable="!status"
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker col-3"
|
class="full-width datepicker col-3"
|
||||||
:model-value="
|
:model-value="
|
||||||
|
|
@ -1339,6 +1395,7 @@ const putformData = () => {
|
||||||
:locale="'th'"
|
:locale="'th'"
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
|
:readonly="!status"
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
>
|
>
|
||||||
|
|
@ -1352,6 +1409,7 @@ const putformData = () => {
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
:disable="!status"
|
||||||
class="full-width datepicker col-3"
|
class="full-width datepicker col-3"
|
||||||
:model-value="
|
:model-value="
|
||||||
dateAutherise != null ? date2Thai(dateAutherise) : null
|
dateAutherise != null ? date2Thai(dateAutherise) : null
|
||||||
|
|
@ -1395,6 +1453,7 @@ const putformData = () => {
|
||||||
autoApply
|
autoApply
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
|
:readonly="!status"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
|
|
@ -1406,6 +1465,7 @@ const putformData = () => {
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
|
:disable="!status"
|
||||||
dense
|
dense
|
||||||
class="full-width datepicker col-3"
|
class="full-width datepicker col-3"
|
||||||
:model-value="
|
:model-value="
|
||||||
|
|
@ -1432,7 +1492,7 @@ const putformData = () => {
|
||||||
|
|
||||||
<q-toolbar class="text-primary">
|
<q-toolbar class="text-primary">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn label="บันทึก" color="secondary" @click="savaForm" v-if="status" />
|
<q-btn v-if="routeName == 'probationFormAddevaluascore'" label="บันทึก" color="secondary" @click="savaForm" />
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,14 @@ import { ref, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useProbationDataStore } from "@/modules/05_placement/store";
|
import { useProbationDataStore } from "@/modules/05_placement/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
// import { formatDate } from "@fullcalendar/core";
|
// import { formatDate } from "@fullcalendar/core";
|
||||||
|
|
||||||
import { useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
const router = useRouter();
|
||||||
|
const routeName = router.currentRoute.value.name;
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const probationStore = useProbationDataStore();
|
const probationStore = useProbationDataStore();
|
||||||
|
|
@ -35,7 +37,16 @@ const status = ref<boolean>(true);
|
||||||
const round = ref<any>();
|
const round = ref<any>();
|
||||||
|
|
||||||
const checkArray = ref<number>(0);
|
const checkArray = ref<number>(0);
|
||||||
|
const saveEdit = (id:string) => {
|
||||||
|
dialogConfirm($q,() => console.log("save"))
|
||||||
|
}
|
||||||
|
const edit = () => {
|
||||||
|
status.value = true;
|
||||||
|
console.log(status.value);
|
||||||
|
};
|
||||||
|
const cancel = () => {
|
||||||
|
status.value = false;
|
||||||
|
};
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
tab: String,
|
tab: String,
|
||||||
});
|
});
|
||||||
|
|
@ -397,7 +408,35 @@ const saveformdata = async (data: any) => {
|
||||||
<div class="row col-12 q-gutter-lg no-margin">
|
<div class="row col-12 q-gutter-lg no-margin">
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<div>แบบบันทึกผล</div>
|
<div>แบบบันทึกผล</div>
|
||||||
</div>
|
<q-space/>
|
||||||
|
<q-space />
|
||||||
|
<div v-if="status == false">
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="primary"
|
||||||
|
@click="edit()"
|
||||||
|
icon="mdi-pencil-outline"
|
||||||
|
>
|
||||||
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<q-btn flat round color="red" @click="cancel()" icon="mdi-undo">
|
||||||
|
<q-tooltip>ยกเลิก</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="public"
|
||||||
|
@click="saveEdit(assignId)"
|
||||||
|
icon="mdi-content-save-outline"
|
||||||
|
>
|
||||||
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="col-12 text-top0 row items-center">
|
<div class="col-12 text-top0 row items-center">
|
||||||
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
<q-icon name="mdi-label" color="grey-4" class="q-pr-sm" />
|
||||||
|
|
@ -1217,6 +1256,7 @@ const saveformdata = async (data: any) => {
|
||||||
v-model="self_learning"
|
v-model="self_learning"
|
||||||
val="1"
|
val="1"
|
||||||
label="ดำเนินการเเล้ว"
|
label="ดำเนินการเเล้ว"
|
||||||
|
:disable="!status"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
|
|
@ -1242,6 +1282,7 @@ const saveformdata = async (data: any) => {
|
||||||
v-model="training_seminar"
|
v-model="training_seminar"
|
||||||
val="1"
|
val="1"
|
||||||
label="ดำเนินการเเล้ว"
|
label="ดำเนินการเเล้ว"
|
||||||
|
:disable="!status"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
checked-icon="task_alt"
|
checked-icon="task_alt"
|
||||||
|
|
@ -1277,6 +1318,7 @@ const saveformdata = async (data: any) => {
|
||||||
v-model="other_training"
|
v-model="other_training"
|
||||||
val="0"
|
val="0"
|
||||||
label=" ยังไม่ได้ดำเนินการ"
|
label=" ยังไม่ได้ดำเนินการ"
|
||||||
|
:disable="!status"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
@ -1313,6 +1355,7 @@ const saveformdata = async (data: any) => {
|
||||||
borderless
|
borderless
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
|
:readonly="!status"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
@ -1349,7 +1392,7 @@ const saveformdata = async (data: any) => {
|
||||||
</div>
|
</div>
|
||||||
<q-toolbar class="text-primary">
|
<q-toolbar class="text-primary">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn v-if="status" label="บันทึก" color="secondary" @click="savaForm" />
|
<q-btn v-if="routeName == 'probationFormAddresult'" label="บันทึก" color="secondary" @click="savaForm" />
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -203,9 +203,9 @@ const behavio_inproveRules = [
|
||||||
|
|
||||||
const savaForm = () => {
|
const savaForm = () => {
|
||||||
achievement_strengthRef.value.validate();
|
achievement_strengthRef.value.validate();
|
||||||
achievement_inproveRef.value.validate();
|
// achievement_inproveRef.value.validate();
|
||||||
behavio_strengthRef.value.validate();
|
behavio_strengthRef.value.validate();
|
||||||
behavio_inproveRef.value.validate();
|
// behavio_inproveRef.value.validate();
|
||||||
|
|
||||||
let hasError = false;
|
let hasError = false;
|
||||||
// const filterlevel1_1 = evaluate_expenct_level.value.filter(
|
// const filterlevel1_1 = evaluate_expenct_level.value.filter(
|
||||||
|
|
@ -225,12 +225,12 @@ const savaForm = () => {
|
||||||
apply_level.value === 0 ||
|
apply_level.value === 0 ||
|
||||||
success_level.value === 0 ||
|
success_level.value === 0 ||
|
||||||
achievement_strength_desc.value === "" ||
|
achievement_strength_desc.value === "" ||
|
||||||
achievement_improve_desc.value === "" ||
|
// achievement_improve_desc.value === "" ||
|
||||||
conduct_level.value.length < 4 ||
|
conduct_level.value.length < 4 ||
|
||||||
moral_level.value.length < 3 ||
|
moral_level.value.length < 3 ||
|
||||||
discipline_level.value.length < 5 ||
|
discipline_level.value.length < 5 ||
|
||||||
behavior_strength_desc.value === "" ||
|
behavior_strength_desc.value === "" ||
|
||||||
behavior_improve_desc.value === "" ||
|
// behavior_improve_desc.value === "" ||
|
||||||
orientation.value === null ||
|
orientation.value === null ||
|
||||||
self_learning.value === null ||
|
self_learning.value === null ||
|
||||||
training_seminar.value === null
|
training_seminar.value === null
|
||||||
|
|
@ -718,8 +718,8 @@ const saveformdata = async (data: any) => {
|
||||||
สิ่งที่ควรปรับปรุง (ไม่เกิน 5 บรรทัด)
|
สิ่งที่ควรปรับปรุง (ไม่เกิน 5 บรรทัด)
|
||||||
</div>
|
</div>
|
||||||
<q-input outlined dense v-model="achievement_improve_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
<q-input outlined dense v-model="achievement_improve_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||||
lazy-rules type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5"
|
type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5"
|
||||||
:rules="achievement_inproveRules" ref="achievement_inproveRef" />
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -899,8 +899,8 @@ const saveformdata = async (data: any) => {
|
||||||
สิ่งที่ควรปรับปรุง (ไม่เกิน 5 บรรทัด)
|
สิ่งที่ควรปรับปรุง (ไม่เกิน 5 บรรทัด)
|
||||||
</div>
|
</div>
|
||||||
<q-input outlined dense v-model="behavior_improve_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
<q-input outlined dense v-model="behavior_improve_desc" class="col-xs-12 col-sm-11 col-md-10 offset-md-1"
|
||||||
lazy-rules type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5"
|
type="textarea" hide-bottom-space label="กรอกสิ่งที่ควรปรับปรุง" :row="5"
|
||||||
:rules="behavio_inproveRules" ref="behavio_inproveRef" />
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue