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