Merge branch 'develop' into dev-tee
# Conflicts: # src/modules/06_retirement/components/ExitInterview/exitRegistry.vue
This commit is contained in:
commit
a03c46e35a
17 changed files with 637 additions and 265 deletions
|
|
@ -12,6 +12,7 @@
|
|||
:add="clickAdd"
|
||||
:edit="clickEdit"
|
||||
:addData="false"
|
||||
:bottom="true"
|
||||
:editData="status == 'checkRegister' || status == 'payment'"
|
||||
name="ประวัติการทำงาน (ตั้งแต่เริ่มปฏิบัติงานกับกรุงเทพมหานคร - ปัจจุบัน)"
|
||||
icon="mdi-briefcase"
|
||||
|
|
@ -550,13 +551,13 @@ const fetchData = async () => {
|
|||
yearDiff = yearDiff + d.yearDiff;
|
||||
monthDiff = monthDiff + d.monthDiff;
|
||||
dayDiff = dayDiff + d.dayDiff;
|
||||
if (dayDiff > 30) {
|
||||
dayDiff = dayDiff % 30;
|
||||
if (dayDiff >= 30) {
|
||||
monthDiff = monthDiff + parseInt((dayDiff / 30).toString());
|
||||
dayDiff = dayDiff % 30;
|
||||
}
|
||||
if (monthDiff > 12) {
|
||||
monthDiff = monthDiff % 12;
|
||||
if (monthDiff >= 12) {
|
||||
yearDiff = yearDiff + parseInt((monthDiff / 12).toString());
|
||||
monthDiff = monthDiff % 12;
|
||||
}
|
||||
total.value = `${yearDiff > 0 ? yearDiff + " ปี " : ""}${
|
||||
monthDiff > 0 ? monthDiff + " เดือน " : ""
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@
|
|||
<template #body="props">
|
||||
<slot v-bind="props" name="columns"></slot>
|
||||
</template>
|
||||
<template v-slot:bottom v-if="bottom == true">
|
||||
<slot v-bind="props" name="bottom"></slot>
|
||||
</template>
|
||||
</q-table>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -99,6 +102,7 @@ const props = defineProps({
|
|||
inputvisible: Array,
|
||||
editvisible: Boolean,
|
||||
nameHeader: Boolean,
|
||||
bottom: Boolean,
|
||||
addData: {
|
||||
type: Boolean,
|
||||
defualt: true,
|
||||
|
|
|
|||
|
|
@ -36,6 +36,20 @@
|
|||
<q-icon name="attach_file" color="blue" />
|
||||
</template>
|
||||
</q-file>
|
||||
<div>
|
||||
<q-btn
|
||||
size="md"
|
||||
icon="mdi-upload"
|
||||
round
|
||||
flat
|
||||
color="blue"
|
||||
v-if="statusPayment"
|
||||
@click="uploadFile"
|
||||
>
|
||||
<q-tooltip v-if="setSeat == false">อัปโหลดที่นั่งสอบ</q-tooltip>
|
||||
<q-tooltip v-if="setSeat == true">อัปโหลดคะแนนสอบ</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
<div class="col-12 row q-py-sm items-center q-col-gutter-sm">
|
||||
|
|
@ -70,20 +84,6 @@
|
|||
<q-tooltip>ตรวจสอบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
size="md"
|
||||
icon="mdi-upload"
|
||||
round
|
||||
flat
|
||||
color="blue"
|
||||
v-if="statusPayment"
|
||||
@click="uploadFile"
|
||||
>
|
||||
<q-tooltip v-if="setSeat == false">อัปโหลดที่นั่งสอบ</q-tooltip>
|
||||
<q-tooltip v-if="setSeat == true">อัปโหลดคะแนนสอบ</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn icon="mdi-download" round color="green-6" flat>
|
||||
<q-tooltip>ดาวน์โหลดไฟล์</q-tooltip>
|
||||
|
|
|
|||
|
|
@ -380,13 +380,13 @@
|
|||
v-model="props.row.code"
|
||||
:rules="[
|
||||
(val) =>
|
||||
val.length >= 4 ||
|
||||
val.length >= 3 ||
|
||||
`${'กรุณากรอกรหัสประจำตำแหน่งที่สอบ'}`,
|
||||
]"
|
||||
:label="`${'รหัสประจำตำแหน่งที่สอบ'}`"
|
||||
@update:modelValue="clickEditRow"
|
||||
hide-bottom-space
|
||||
mask="####"
|
||||
mask="###"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td key="position" :props="props">
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import { useQuasar } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import { usePersonalDataStore } from "@/modules/05_placement/storePersona";
|
||||
|
||||
import Informationvue from "@/modules/05_placement/components/PersonalDetail/Information/Information.vue";
|
||||
import Addressvue from "@/modules/05_placement/components/PersonalDetail/Information/Address.vue";
|
||||
import EducationVue from "@/modules/05_placement/components/PersonalDetail/Education.vue";
|
||||
|
|
@ -16,7 +18,7 @@ import Certicate from "@/modules/05_placement/components/PersonalDetail/Informat
|
|||
import ExamResult from "@/modules/05_placement/components/PersonalDetail/ExamResult.vue";
|
||||
import Qualification from "@/modules/05_placement/components/PersonalDetail/Qualification.vue";
|
||||
import Familyvue from "@/modules/05_placement/components/PersonalDetail/Information/Family.vue";
|
||||
// import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue";
|
||||
import Document from "@/modules/05_placement/components/PersonalDetail/Information/Document.vue";
|
||||
|
||||
import {
|
||||
AddressDataDefualt,
|
||||
|
|
@ -38,6 +40,7 @@ const $q = useQuasar(); // show dialog
|
|||
const router = useRouter();
|
||||
const store = useDataStore();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const storePersonal = usePersonalDataStore();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const { changeTab } = store;
|
||||
const statusEdit = ref<boolean>(false);
|
||||
|
|
@ -110,12 +113,13 @@ const guidCheck = (id: string) => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
storePersonal.loading = false;
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.placementPersonalId(examId.value))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
|
||||
storePersonal.fecthDataInformation(data);
|
||||
personalData.value.fullName = data.fullName;
|
||||
personalData.value.id = data.personalId;
|
||||
|
||||
|
|
@ -254,7 +258,7 @@ const fetchData = async () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="q-pb-lg">
|
||||
<q-card class="row q-pb-lg">
|
||||
<q-card class="row q-pb-lg" v-if="storePersonal.loading">
|
||||
<div id="information" name="1" class="col-12 q-pa-sm">
|
||||
<Informationvue
|
||||
v-model:statusEdit="statusEdit"
|
||||
|
|
@ -316,7 +320,11 @@ const fetchData = async () => {
|
|||
<q-separator size="4px" />
|
||||
</div>
|
||||
<!-- v-model:data="QualificationData" -->
|
||||
<Document v-model:statusEdit="statusEdit" :fetch="fetchData" />
|
||||
<Document
|
||||
v-model:statusEdit="statusEdit"
|
||||
:fetch="fetchData"
|
||||
:datainformation="storePersonal.dataMain"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ watch(visibleColumns, async (count: String[], prevCount: String[]) => {
|
|||
onMounted(async () => {
|
||||
await fetchLevel();
|
||||
await fetchPositionPath();
|
||||
await props.fetch();
|
||||
// await props.fetch();
|
||||
rows.value = props.data;
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -67,17 +67,17 @@ const registAddress = reactive<AddressData>({
|
|||
zipCode: "",
|
||||
districtId: "",
|
||||
provinceId: "",
|
||||
})
|
||||
});
|
||||
|
||||
const currentAddress = reactive<AddressData>({
|
||||
subDistrictId: "",
|
||||
zipCode: "",
|
||||
districtId: "",
|
||||
provinceId: "",
|
||||
})
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
await getNewData();
|
||||
// await getNewData();
|
||||
emit("update:statusEdit", false);
|
||||
});
|
||||
|
||||
|
|
@ -126,7 +126,9 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
|
||||
const refreshData = async () => {
|
||||
myform.value.reset();
|
||||
await getNewData();
|
||||
await props.fetch();
|
||||
await fetchProvince();
|
||||
// await getNewData();
|
||||
};
|
||||
|
||||
const getNewData = async () => {
|
||||
|
|
@ -179,7 +181,9 @@ const editData = async () => {
|
|||
.finally(async () => {
|
||||
edit.value = false;
|
||||
emit("update:statusEdit", false);
|
||||
await getNewData();
|
||||
// await getNewData();
|
||||
await props.fetch();
|
||||
await fetchProvince();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -196,13 +200,13 @@ const saveData = async () => {
|
|||
const selectProvince = async (e: string | null, name: string) => {
|
||||
if (e != null) {
|
||||
if (name == "1") {
|
||||
registAddress.subDistrictId = ""
|
||||
registAddress.zipCode = ""
|
||||
registAddress.districtId = ""
|
||||
registAddress.subDistrictId = "";
|
||||
registAddress.zipCode = "";
|
||||
registAddress.districtId = "";
|
||||
} else {
|
||||
currentAddress.subDistrictId = ""
|
||||
currentAddress.zipCode = ""
|
||||
currentAddress.districtId = ""
|
||||
currentAddress.subDistrictId = "";
|
||||
currentAddress.zipCode = "";
|
||||
currentAddress.districtId = "";
|
||||
}
|
||||
myform.value.resetValidation();
|
||||
await fetchDistrict(e, name);
|
||||
|
|
@ -253,36 +257,58 @@ const fetchProvince = async () => {
|
|||
Ops.value.provinceOps = option;
|
||||
OpsFilter.value.provinceOps = option;
|
||||
|
||||
const checkRegistProvinceId = await option.find((e: any) => e.id === addressData.value.registProvinceId)
|
||||
const checkRegistProvinceId = await option.find(
|
||||
(e: any) => e.id === addressData.value.registProvinceId
|
||||
);
|
||||
|
||||
// ที่อยู่ถ้า id จังหวัดว่างไม่ดึงค่าอำเภอ ตำบล และรหัสไปรษณีย์
|
||||
if (addressData.value.registProvinceId == '' || addressData.value.registProvinceId == '00000000-0000-0000-0000-000000000000' || !checkRegistProvinceId) {
|
||||
registAddress.subDistrictId = ""
|
||||
registAddress.zipCode = ""
|
||||
registAddress.districtId = ""
|
||||
if (
|
||||
addressData.value.registProvinceId == "" ||
|
||||
addressData.value.registProvinceId ==
|
||||
"00000000-0000-0000-0000-000000000000" ||
|
||||
!checkRegistProvinceId
|
||||
) {
|
||||
registAddress.subDistrictId = "";
|
||||
registAddress.zipCode = "";
|
||||
registAddress.districtId = "";
|
||||
} else {
|
||||
registAddress.provinceId = await addressData.value.registProvinceId
|
||||
registAddress.zipCode = await addressData.value.registZipCode
|
||||
registAddress.provinceId = await addressData.value.registProvinceId;
|
||||
registAddress.zipCode = await addressData.value.registZipCode;
|
||||
|
||||
await fetchDistrict(addressData.value.registProvinceId, "1");
|
||||
if (addressData.value.registDistrictId != null && addressData.value.registDistrictId != '00000000-0000-0000-0000-000000000000') {
|
||||
if (
|
||||
addressData.value.registDistrictId != null &&
|
||||
addressData.value.registDistrictId !=
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
) {
|
||||
await fetchSubDistrict(addressData.value.registDistrictId, "1");
|
||||
}
|
||||
}
|
||||
|
||||
const checkCurrentProvinceId = await option.find((e: any) => e.id === addressData.value.currentProvinceId)
|
||||
const checkCurrentProvinceId = await option.find(
|
||||
(e: any) => e.id === addressData.value.currentProvinceId
|
||||
);
|
||||
|
||||
// ที่อยู่ปัจจุบันถ้า id จังหวัดว่างไม่ดึงค่าอำเภอ ตำบล และรหัสไปรษณีย์
|
||||
if (addressData.value.currentProvinceId == '' || addressData.value.currentProvinceId == '00000000-0000-0000-0000-000000000000' || !checkCurrentProvinceId) {
|
||||
currentAddress.subDistrictId = ""
|
||||
currentAddress.zipCode = ""
|
||||
currentAddress.districtId = ""
|
||||
if (
|
||||
addressData.value.currentProvinceId == "" ||
|
||||
addressData.value.currentProvinceId ==
|
||||
"00000000-0000-0000-0000-000000000000" ||
|
||||
!checkCurrentProvinceId
|
||||
) {
|
||||
currentAddress.subDistrictId = "";
|
||||
currentAddress.zipCode = "";
|
||||
currentAddress.districtId = "";
|
||||
} else {
|
||||
currentAddress.provinceId = addressData.value.currentProvinceId
|
||||
currentAddress.zipCode = addressData.value.currentZipCode
|
||||
currentAddress.provinceId = addressData.value.currentProvinceId;
|
||||
currentAddress.zipCode = addressData.value.currentZipCode;
|
||||
|
||||
await fetchDistrict(addressData.value.currentProvinceId, "2");
|
||||
if (addressData.value.currentDistrictId != null && addressData.value.currentDistrictId != '00000000-0000-0000-0000-000000000000') {
|
||||
if (
|
||||
addressData.value.currentDistrictId != null &&
|
||||
addressData.value.currentDistrictId !=
|
||||
"00000000-0000-0000-0000-000000000000"
|
||||
) {
|
||||
await fetchSubDistrict(addressData.value.currentDistrictId, "2");
|
||||
}
|
||||
}
|
||||
|
|
@ -312,19 +338,23 @@ const fetchDistrict = async (id: string | null, position: string) => {
|
|||
OpsFilter.value.districtOps = option;
|
||||
|
||||
// ที่อยู่ เช็คอำเภอว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
||||
const checkRegistDistrictId = option.find((e: any) => e.id === addressData.value.registDistrictId)
|
||||
const checkRegistDistrictId = option.find(
|
||||
(e: any) => e.id === addressData.value.registDistrictId
|
||||
);
|
||||
|
||||
if (checkRegistDistrictId) {
|
||||
registAddress.districtId = addressData.value.registDistrictId
|
||||
registAddress.districtId = addressData.value.registDistrictId;
|
||||
}
|
||||
} else {
|
||||
Ops.value.districtCOps = option;
|
||||
OpsFilter.value.districtCOps = option;
|
||||
|
||||
// ที่อยู่ปัจจุบัน เช็คอำเภอว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
||||
const checkCurrentDistrictId = await option.find((e: any) => e.id === addressData.value.currentDistrictId)
|
||||
const checkCurrentDistrictId = await option.find(
|
||||
(e: any) => e.id === addressData.value.currentDistrictId
|
||||
);
|
||||
if (checkCurrentDistrictId) {
|
||||
currentAddress.districtId = addressData.value.currentDistrictId
|
||||
currentAddress.districtId = addressData.value.currentDistrictId;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -358,18 +388,23 @@ const fetchSubDistrict = async (id: string | null, position: string) => {
|
|||
OpsFilter.value.subdistrictOps = option;
|
||||
|
||||
// ที่อยู่ เช็คตำบลว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
||||
const checkRegistSubDistrictId = await option.find((e: any) => e.id === addressData.value.registSubDistrictId)
|
||||
const checkRegistSubDistrictId = await option.find(
|
||||
(e: any) => e.id === addressData.value.registSubDistrictId
|
||||
);
|
||||
if (checkRegistSubDistrictId) {
|
||||
registAddress.subDistrictId = addressData.value.registSubDistrictId
|
||||
registAddress.subDistrictId = addressData.value.registSubDistrictId;
|
||||
}
|
||||
} else {
|
||||
Ops.value.subdistrictCOps = option;
|
||||
OpsFilter.value.subdistrictCOps = option;
|
||||
|
||||
// ที่อยู่ปัจจุบัน เช็คตำบลว่ามี id ใน array ไหม ถ้ามีค่อยกำหนดค่าไปในตัวแปรใหม่เพิ่มแสดงผล
|
||||
const checkCurrentSubDistrictId = await option.find((e: any) => e.id === addressData.value.currentSubDistrictId)
|
||||
const checkCurrentSubDistrictId = await option.find(
|
||||
(e: any) => e.id === addressData.value.currentSubDistrictId
|
||||
);
|
||||
if (checkCurrentSubDistrictId) {
|
||||
currentAddress.subDistrictId = addressData.value.currentSubDistrictId
|
||||
currentAddress.subDistrictId =
|
||||
addressData.value.currentSubDistrictId;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -405,91 +440,268 @@ const getClass = (val: boolean) => {
|
|||
|
||||
<template>
|
||||
<q-card class="col-12 q-px-lg q-py-md q-mt-md no-border">
|
||||
<HeaderTop v-model:edit="edit" header="ข้อมูลที่อยู่" icon="mdi-map-marker" :save="saveData" :history="false"
|
||||
:changeBtn="changeBtn" :disable="statusEdit" :cancel="refreshData" />
|
||||
<HeaderTop
|
||||
v-model:edit="edit"
|
||||
header="ข้อมูลที่อยู่"
|
||||
icon="mdi-map-marker"
|
||||
:save="saveData"
|
||||
:history="false"
|
||||
:changeBtn="changeBtn"
|
||||
:disable="statusEdit"
|
||||
:cancel="refreshData"
|
||||
/>
|
||||
<q-form ref="myform">
|
||||
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
|
||||
<div class="col-xs-12">
|
||||
<q-input :class="getClass(edit)" hide-bottom-space :outlined="edit" dense lazy-rules type="textarea" autogrow
|
||||
:readonly="!edit" :borderless="!edit" v-model="addressData.registAddress"
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
type="textarea"
|
||||
autogrow
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="addressData.registAddress"
|
||||
:rules="[(val: string) => !!val || `${'กรุณากรอก ที่อยู่ตามทะเบียนบ้าน'}`]"
|
||||
:label="`${'ที่อยู่ตามทะเบียนบ้าน'}`" />
|
||||
:label="`${'ที่อยู่ตามทะเบียนบ้าน'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก จังหวัด'}`]" :outlined="edit" dense
|
||||
lazy-rules v-model="registAddress.provinceId" emit-value map-options option-label="name"
|
||||
:options="Ops.provinceOps" option-value="id" :label="`${'จังหวัด'}`"
|
||||
@update:model-value="(value: string) => selectProvince(value, '1')" use-input input-debounce="0" @filter="(inputValue: string,
|
||||
<selector
|
||||
:hide-dropdown-icon="!edit"
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือก จังหวัด'}`]"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="registAddress.provinceId"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.provinceOps"
|
||||
option-value="id"
|
||||
:label="`${'จังหวัด'}`"
|
||||
@update:model-value="(value: string) => selectProvince(value, '1')"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="(inputValue: string,
|
||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'provinceOps'
|
||||
)" />
|
||||
)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก เขต / อำเภอ'}`]" :outlined="edit" dense
|
||||
lazy-rules v-model="registAddress.districtId" emit-value map-options option-label="name"
|
||||
:options="Ops.districtOps" option-value="id" :label="`${'เขต / อำเภอ'}`"
|
||||
@update:model-value="(value: string) => selectDistrict(value, '1')" use-input input-debounce="0" @filter="(inputValue: string,
|
||||
<selector
|
||||
:hide-dropdown-icon="!edit"
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือก เขต / อำเภอ'}`]"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="registAddress.districtId"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.districtOps"
|
||||
option-value="id"
|
||||
:label="`${'เขต / อำเภอ'}`"
|
||||
@update:model-value="(value: string) => selectDistrict(value, '1')"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="(inputValue: string,
|
||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'districtOps'
|
||||
)" />
|
||||
)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก แขวง / ตำบล '}`]" :outlined="edit" dense
|
||||
lazy-rules v-model="registAddress.subDistrictId" emit-value map-options option-label="name"
|
||||
:options="Ops.subdistrictOps" option-value="id" :label="`${'แขวง / ตำบล '}`"
|
||||
@update:model-value="(value: string) => selectSubDistrict(value, '1')" use-input input-debounce="0" @filter="(inputValue: string,
|
||||
<selector
|
||||
:hide-dropdown-icon="!edit"
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือก แขวง / ตำบล '}`]"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="registAddress.subDistrictId"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.subdistrictOps"
|
||||
option-value="id"
|
||||
:label="`${'แขวง / ตำบล '}`"
|
||||
@update:model-value="(value: string) => selectSubDistrict(value, '1')"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="(inputValue: string,
|
||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'subdistrictOps'
|
||||
)" />
|
||||
)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
<q-input :class="getClass(edit)" hide-bottom-space dense lazy-rules readonly borderless
|
||||
v-model="registAddress.zipCode" :style="!edit ? '' : 'padding:0 12px;'" :label="`${'รหัสไปรษณีย์'}`" />
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
dense
|
||||
lazy-rules
|
||||
readonly
|
||||
borderless
|
||||
v-model="registAddress.zipCode"
|
||||
:style="!edit ? '' : 'padding:0 12px;'"
|
||||
:label="`${'รหัสไปรษณีย์'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 q-pt-lg"><q-separator /></div>
|
||||
<div class="col-xs-12 q-gutter-sm items-center flex q-my-sm">
|
||||
<label class="text-bold">ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้าน</label>
|
||||
<q-radio v-model="addressData.registSame" checked-icon="task_alt" unchecked-icon="panorama_fish_eye" val="1"
|
||||
label="ใช่" dense :disable="!edit" />
|
||||
<q-radio v-model="addressData.registSame" checked-icon="task_alt" unchecked-icon="panorama_fish_eye" val="0"
|
||||
label="ไม่" dense :disable="!edit" />
|
||||
<label class="text-bold"
|
||||
>ที่อยู่ปัจจุบันตรงกับที่อยู่ตามทะเบียนบ้าน</label
|
||||
>
|
||||
<q-radio
|
||||
v-model="addressData.registSame"
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
val="1"
|
||||
label="ใช่"
|
||||
dense
|
||||
:disable="!edit"
|
||||
/>
|
||||
<q-radio
|
||||
v-model="addressData.registSame"
|
||||
checked-icon="task_alt"
|
||||
unchecked-icon="panorama_fish_eye"
|
||||
val="0"
|
||||
label="ไม่"
|
||||
dense
|
||||
:disable="!edit"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12" v-if="addressData.registSame == '0'">
|
||||
<q-input :class="getClass(edit)" hide-bottom-space :outlined="edit" dense lazy-rules type="textarea" autogrow
|
||||
:readonly="!edit" :borderless="!edit" v-model="addressData.currentAddress"
|
||||
:rules="[(val: string) => !!val || `${'กรุณากรอก ที่อยู่ปัจจุบัน'}`]" :label="`${'ที่อยู่ปัจจุบัน'}`" />
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
type="textarea"
|
||||
autogrow
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="addressData.currentAddress"
|
||||
:rules="[(val: string) => !!val || `${'กรุณากรอก ที่อยู่ปัจจุบัน'}`]"
|
||||
:label="`${'ที่อยู่ปัจจุบัน'}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.registSame == '0'">
|
||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก จังหวัด'}`]" :outlined="edit" dense
|
||||
lazy-rules v-model="currentAddress.provinceId" emit-value map-options option-label="name"
|
||||
:options="Ops.provinceOps" option-value="id" :label="`${'จังหวัด'}`"
|
||||
@update:model-value="(value: string) => selectProvince(value, '2')" use-input input-debounce="0" @filter="(inputValue: string,
|
||||
<div
|
||||
class="col-xs-6 col-sm-3 col-md-3"
|
||||
v-if="addressData.registSame == '0'"
|
||||
>
|
||||
<selector
|
||||
:hide-dropdown-icon="!edit"
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือก จังหวัด'}`]"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="currentAddress.provinceId"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.provinceOps"
|
||||
option-value="id"
|
||||
:label="`${'จังหวัด'}`"
|
||||
@update:model-value="(value: string) => selectProvince(value, '2')"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="(inputValue: string,
|
||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'provinceOps'
|
||||
)" />
|
||||
)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.registSame == '0'">
|
||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก เขต / อำเภอ'}`]" :outlined="edit" dense
|
||||
lazy-rules v-model="currentAddress.districtId" emit-value map-options option-label="name"
|
||||
:options="Ops.districtCOps" option-value="id" :label="`${'เขต / อำเภอ'}`"
|
||||
@update:model-value="(value: string) => selectDistrict(value, '2')" use-input input-debounce="0" @filter="(inputValue: string,
|
||||
<div
|
||||
class="col-xs-6 col-sm-3 col-md-3"
|
||||
v-if="addressData.registSame == '0'"
|
||||
>
|
||||
<selector
|
||||
:hide-dropdown-icon="!edit"
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือก เขต / อำเภอ'}`]"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="currentAddress.districtId"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.districtCOps"
|
||||
option-value="id"
|
||||
:label="`${'เขต / อำเภอ'}`"
|
||||
@update:model-value="(value: string) => selectDistrict(value, '2')"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="(inputValue: string,
|
||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'districtCOps'
|
||||
)" />
|
||||
)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.registSame == '0'">
|
||||
<selector :hide-dropdown-icon="!edit" hide-bottom-space :class="getClass(edit)" :readonly="!edit"
|
||||
:borderless="!edit" :rules="[(val: string) => !!val || `${'กรุณาเลือก แขวง / ตำบล '}`]" :outlined="edit" dense
|
||||
lazy-rules v-model="currentAddress.subDistrictId" emit-value map-options option-label="name"
|
||||
:options="Ops.subdistrictCOps" option-value="id" :label="`${'แขวง / ตำบล '}`"
|
||||
@update:model-value="(value: string) => selectSubDistrict(value, '2')" use-input input-debounce="0" @filter="(inputValue: string,
|
||||
<div
|
||||
class="col-xs-6 col-sm-3 col-md-3"
|
||||
v-if="addressData.registSame == '0'"
|
||||
>
|
||||
<selector
|
||||
:hide-dropdown-icon="!edit"
|
||||
hide-bottom-space
|
||||
:class="getClass(edit)"
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
:rules="[(val: string) => !!val || `${'กรุณาเลือก แขวง / ตำบล '}`]"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="currentAddress.subDistrictId"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="Ops.subdistrictCOps"
|
||||
option-value="id"
|
||||
:label="`${'แขวง / ตำบล '}`"
|
||||
@update:model-value="(value: string) => selectSubDistrict(value, '2')"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="(inputValue: string,
|
||||
doneFn: Function) => filterSelector(inputValue, doneFn, 'subdistrictCOps'
|
||||
)" />
|
||||
)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3" v-if="addressData.registSame == '0'">
|
||||
<q-input :class="getClass(edit)" hide-bottom-space dense lazy-rules readonly borderless
|
||||
v-model="currentAddress.zipCode" :style="!edit ? '' : 'padding:0 12px;'" :label="`${'รหัสไปรษณีย์'}`" />
|
||||
<div
|
||||
class="col-xs-6 col-sm-3 col-md-3"
|
||||
v-if="addressData.registSame == '0'"
|
||||
>
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
hide-bottom-space
|
||||
dense
|
||||
lazy-rules
|
||||
readonly
|
||||
borderless
|
||||
v-model="currentAddress.zipCode"
|
||||
:style="!edit ? '' : 'padding:0 12px;'"
|
||||
:label="`${'รหัสไปรษณีย์'}`"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ onMounted(async () => {
|
|||
if (route.params.id) {
|
||||
profileId.value = route.params.personalId.toString();
|
||||
}
|
||||
await props.fetch();
|
||||
// await props.fetch();
|
||||
rows.value = props.data;
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
round
|
||||
color="blue"
|
||||
icon="mdi-download-outline"
|
||||
@click="downloadData(file.file)"
|
||||
@click="downloadData(file.pathName)"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดเอกสารหลักฐาน</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
color="red"
|
||||
icon="mdi-delete-outline"
|
||||
v-show="edit"
|
||||
@click="deleteData(file.id)"
|
||||
@click="deleteData(file.docId)"
|
||||
>
|
||||
<q-tooltip>ลบเอกสารหลักฐาน</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -159,58 +159,72 @@ const props = defineProps({
|
|||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
},
|
||||
datainformation: {
|
||||
type: Array,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["update:statusEdit"]);
|
||||
|
||||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
const route = useRoute();
|
||||
const { success, messageError, showLoader, hideLoader } = mixin;
|
||||
const { success, messageError, showLoader, dialogConfirm } = mixin;
|
||||
const profileId = ref<string>(
|
||||
route.params.id ? route.params.id.toString() : ""
|
||||
route.params.personalId ? route.params.personalId.toString() : ""
|
||||
);
|
||||
const edit = ref<boolean>(false);
|
||||
const uploader = ref<any>();
|
||||
const files = ref<any>([]);
|
||||
const file = ref<any>([]);
|
||||
const name = ref<string>("");
|
||||
const dataMain = ref<any>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
await getData();
|
||||
// props.fetch()
|
||||
});
|
||||
|
||||
const getData = async () => {
|
||||
if (profileId.value) {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profilePaperId(profileId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
files.value = data;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
if (props.datainformation) {
|
||||
dataMain.value = props.datainformation;
|
||||
files.value = dataMain.value.docs;
|
||||
}
|
||||
// if (profileId.value) {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.profilePaperId(profileId.value))
|
||||
// .then((res) => {
|
||||
// const data = res.data.result;
|
||||
// files.value = data;
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// messageError($q, e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// }
|
||||
};
|
||||
|
||||
const deleteData = async (id: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profilePaperId(id))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await getData();
|
||||
});
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.documentDelid(profileId.value, id))
|
||||
.then(() => {
|
||||
success($q, "ลบไฟล์เอกสารสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await props.fetch();
|
||||
});
|
||||
},
|
||||
"ยืนยันการลบเอกสารหลักฐาน",
|
||||
"ต้องการยืนยันการลบเอกสารหลักฐานนี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
|
||||
const uploadData = async () => {
|
||||
|
|
@ -221,32 +235,31 @@ const uploadData = async () => {
|
|||
type: file.value[0].type,
|
||||
});
|
||||
const formData = new FormData();
|
||||
formData.append("avatar", newFile);
|
||||
formData.append("moss", "newFile");
|
||||
formData.append("file", newFile);
|
||||
// formData.append("moss", "newFile");
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profilePaperId(profileId.value), formData)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
.put(config.API.documentByid(profileId.value), formData)
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
await props.fetch();
|
||||
uploader.value.reset();
|
||||
name.value = "";
|
||||
edit.value = false;
|
||||
emit("update:statusEdit", false);
|
||||
await getData();
|
||||
});
|
||||
} else {
|
||||
// modalError(
|
||||
// $q,
|
||||
// "ไม่สามารถอัปโหลดไฟล์ได้",
|
||||
// "กรุณาเลือกไฟล์ที่ต้องการอัปโหลด"
|
||||
// );
|
||||
getData();
|
||||
// } else {
|
||||
// // modalError(
|
||||
// // $q,
|
||||
// // "ไม่สามารถอัปโหลดไฟล์ได้",
|
||||
// // "กรุณาเลือกไฟล์ที่ต้องการอัปโหลด"
|
||||
// // );
|
||||
// getData();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ const editData = async () => {
|
|||
};
|
||||
await http
|
||||
.put(config.API.placementFamilyId(route.params.personalId.toString()), body)
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ const fetchPlacementData = async () => {
|
|||
class="q-mr-sm"
|
||||
@click="router.push(`/placement`)"
|
||||
/>
|
||||
รายชื่อผู้สอบในรอบs {{ title }} ครั้งที่ {{ round }} ปี {{ year }}
|
||||
รายชื่อผู้สอบในรอบ {{ title }} ครั้งที่ {{ round }} ปี {{ year }}
|
||||
</div>
|
||||
<q-card bordered class="q-py-sm row col-12">
|
||||
<div class="col-12 row bg-white">
|
||||
|
|
|
|||
24
src/modules/05_placement/storePersona.ts
Normal file
24
src/modules/05_placement/storePersona.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
import type { Information } from "@/modules/05_placement/components/PersonalDetail/profileType";
|
||||
|
||||
export const usePersonalDataStore = defineStore("personal-detail", () => {
|
||||
const dataMain = ref<any>([])
|
||||
const loading = ref<boolean>(false)
|
||||
function fecthDataInformation(data: Information) {
|
||||
dataMain.value = data
|
||||
if (dataMain.value) {
|
||||
loading.value = true
|
||||
} else {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
fecthDataInformation,
|
||||
dataMain,
|
||||
loading,
|
||||
|
||||
};
|
||||
})
|
||||
|
|
@ -4,6 +4,11 @@ import { useQuasar } from "quasar";
|
|||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type {
|
||||
OptionQuestions,
|
||||
OptionQuestions2,
|
||||
} from "@/modules/06_retirement/interface/request/Main";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
|
|
@ -60,86 +65,87 @@ const score = reactive([
|
|||
const scoreTotal = ref<number|string>('');
|
||||
|
||||
const reasonWorkOther = ref("");
|
||||
const reasonWork_option = ref<any>([
|
||||
{ label: "ความมั่นคงในการทำงาน ", value: 0 },
|
||||
{ label: "สิทธิประโยชน์/สวัสดิการ", value: 1 },
|
||||
{ label: "อัตราเงินเดือน ", value: 2 },
|
||||
{ label: "ลักษณะงาน ", value: 3 },
|
||||
{ label: "วัฒนธรรมการทำงานของข้าราชการ ", value: 4 },
|
||||
{ label: "นโยบายของหน่วยงาน ", value: 5 },
|
||||
{ label: "ระบบการทำงาน", value: 6 },
|
||||
{ label: "สมดุลชีวิตการทำงาน ", value: 7 },
|
||||
{ label: "บรรยากาศในการทำงาน ", value: 8 },
|
||||
{ label: "การพัฒนาในสายอาชีพ ", value: 9 },
|
||||
{ label: "โอกาสความก้าวหน้า ", value: 10 },
|
||||
{ label: "การได้รับการยอมรับจากสังคม ", value: 11 },
|
||||
{ label: "อื่น ๆ (ระบุ) ", value: 12 },
|
||||
]);
|
||||
// const reasonWork_option = ref<any>([
|
||||
// { label: "ความมั่นคงในการทำงาน ", value: 0 },
|
||||
// { label: "สิทธิประโยชน์/สวัสดิการ", value: 1 },
|
||||
// { label: "อัตราเงินเดือน ", value: 2 },
|
||||
// { label: "ลักษณะงาน ", value: 3 },
|
||||
// { label: "วัฒนธรรมการทำงานของข้าราชการ ", value: 4 },
|
||||
// { label: "นโยบายของหน่วยงาน ", value: 5 },
|
||||
// { label: "ระบบการทำงาน", value: 6 },
|
||||
// { label: "สมดุลชีวิตการทำงาน ", value: 7 },
|
||||
// { label: "บรรยากาศในการทำงาน ", value: 8 },
|
||||
// { label: "การพัฒนาในสายอาชีพ ", value: 9 },
|
||||
// { label: "โอกาสความก้าวหน้า ", value: 10 },
|
||||
// { label: "การได้รับการยอมรับจากสังคม ", value: 11 },
|
||||
// { label: "อื่น ๆ (ระบุ) ", value: 12 },
|
||||
// ]);
|
||||
const exitFactorOther = ref("");
|
||||
const exitFactor_option = ref<any>([
|
||||
{ label: "อัตราเงินเดือน ", value: 0 },
|
||||
{ label: "สวัสดิการ", value: 1 },
|
||||
{ label: "ลักษณะงาน ", value: 2 },
|
||||
{ label: "ระบบการทำงาน ", value: 3 },
|
||||
{ label: "ระบบสนับสนุนการปฏิบัติงาน ", value: 4 },
|
||||
{ label: "การมอบหมายงานที่ชัดเจนและเหมาะสม ", value: 5 },
|
||||
{ label: "การบริหารงานของผู้บังคับบัญชา", value: 6 },
|
||||
{ label: "การทำงานเป็นทีมกับเพื่อนร่วมงาน ", value: 7 },
|
||||
{ label: "ระบบบริหารงานภายในหน่วยงาน ", value: 8 },
|
||||
{ label: "บรรยากาศในการทำงาน ", value: 9 },
|
||||
{ label: "การปฏิบัติอย่างเป็นธรรม ", value: 10 },
|
||||
{ label: "การยอมรับความแตกต่างหลากหลาย ", value: 11 },
|
||||
{ label: "การดูแลและให้ความช่วยเหลือในช่วงเริ่มต้นปฏิบัติงาน ", value: 12 },
|
||||
{ label: "การพัฒนาอย่างเป็นระบบและต่อเนื่อง ", value: 13 },
|
||||
{ label: "โอกาสความก้าวหน้า ", value: 14 },
|
||||
{ label: "อื่น ๆ (ระบุ) ", value: 15 },
|
||||
]);
|
||||
// const exitFactor_option = ref<any>([
|
||||
// { label: "อัตราเงินเดือน ", value: 0 },
|
||||
// { label: "สวัสดิการ", value: 1 },
|
||||
// { label: "ลักษณะงาน ", value: 2 },
|
||||
// { label: "ระบบการทำงาน ", value: 3 },
|
||||
// { label: "ระบบสนับสนุนการปฏิบัติงาน ", value: 4 },
|
||||
// { label: "การมอบหมายงานที่ชัดเจนและเหมาะสม ", value: 5 },
|
||||
// { label: "การบริหารงานของผู้บังคับบัญชา", value: 6 },
|
||||
// { label: "การทำงานเป็นทีมกับเพื่อนร่วมงาน ", value: 7 },
|
||||
// { label: "ระบบบริหารงานภายในหน่วยงาน ", value: 8 },
|
||||
// { label: "บรรยากาศในการทำงาน ", value: 9 },
|
||||
// { label: "การปฏิบัติอย่างเป็นธรรม ", value: 10 },
|
||||
// { label: "การยอมรับความแตกต่างหลากหลาย ", value: 11 },
|
||||
// { label: "การดูแลและให้ความช่วยเหลือในช่วงเริ่มต้นปฏิบัติงาน ", value: 12 },
|
||||
// { label: "การพัฒนาอย่างเป็นระบบและต่อเนื่อง ", value: 13 },
|
||||
// { label: "โอกาสความก้าวหน้า ", value: 14 },
|
||||
// { label: "อื่น ๆ (ระบุ) ", value: 15 },
|
||||
// ]);
|
||||
const suggestFriendsReason = ref("");
|
||||
const suggestFriends_option = ref<any>([
|
||||
{ label: "แนะนำ ", value: true },
|
||||
{ label: "ไม่แนะนำ (ระบุ)", value: false },
|
||||
]);
|
||||
const timeThink_option = ref<any>([
|
||||
{ label: "น้อยกว่า 2 สัปดาห์ ", value: 0 },
|
||||
{ label: "1 เดือน - 3 เดือน", value: 1 },
|
||||
{ label: "3 เดือน - 6 เดือน ", value: 2 },
|
||||
{ label: "6 เดือนขึ้นไป ", value: 3 },
|
||||
]);
|
||||
// const suggestFriends_option = ref<any>([
|
||||
// { label: "แนะนำ ", value: true },
|
||||
// { label: "ไม่แนะนำ (ระบุ)", value: false },
|
||||
// ]);
|
||||
// const timeThink_option = ref<any>([
|
||||
// { label: "น้อยกว่า 2 สัปดาห์ ", value: 0 },
|
||||
// { label: "1 เดือน - 3 เดือน", value: 1 },
|
||||
// { label: "3 เดือน - 6 เดือน ", value: 2 },
|
||||
// { label: "6 เดือนขึ้นไป ", value: 3 },
|
||||
// ]);
|
||||
const haveJobReason = ref<any>("");
|
||||
const haveJob_option = ref<any>([
|
||||
{ label: "มี (ระบุ) ", value: true },
|
||||
{ label: "ไม่มี", value: false },
|
||||
]);
|
||||
// const haveJob_option = ref<any>([
|
||||
// { label: "มี (ระบุ) ", value: true },
|
||||
// { label: "ไม่มี", value: false },
|
||||
// ]);
|
||||
const futureWorkReason = ref<any>("");
|
||||
const futureWork_option = ref<any>([
|
||||
{ label: "อยาก ", value: true },
|
||||
{ label: "ไม่อยาก (ระบุ)", value: false },
|
||||
]);
|
||||
// const futureWork_option = ref<any>([
|
||||
// { label: "อยาก", value: true },
|
||||
// { label: "ไม่อยาก (ระบุ)", value: false },
|
||||
// ]);
|
||||
const adjustOther = ref("");
|
||||
const adjust_option = ref<any>([
|
||||
{ label: "อัตราเงินเดือน ", value: 0 },
|
||||
{ label: "สวัสดิการ", value: 1 },
|
||||
{ label: "ลักษณะงาน ", value: 2 },
|
||||
{ label: "ระบบการทำงาน ", value: 3 },
|
||||
{ label: "ระบบสนับสนุนการปฏิบัติงาน ", value: 4 },
|
||||
{ label: "การมอบหมายงานที่ชัดเจนและเหมาะสม ", value: 5 },
|
||||
{ label: "การบริหารงานของผู้บังคับบัญชา", value: 6 },
|
||||
{ label: "การทำงานเป็นทีมกับเพื่อนร่วมงาน ", value: 7 },
|
||||
{ label: "ระบบบริหารงานภายในหน่วยงาน ", value: 8 },
|
||||
{ label: "บรรยากาศในการทำงาน ", value: 9 },
|
||||
{ label: "การปฏิบัติอย่างเป็นธรรม ", value: 10 },
|
||||
{ label: "การยอมรับความแตกต่างหลากหลาย ", value: 11 },
|
||||
{ label: "การดูแลและให้ความช่วยเหลือในช่วงเริ่มต้นปฏิบัติงาน ", value: 12 },
|
||||
{ label: "การพัฒนาอย่างเป็นระบบและต่อเนื่อง ", value: 13 },
|
||||
{ label: "โอกาสความก้าวหน้า ", value: 14 },
|
||||
{ label: "อื่น ๆ (ระบุ) ", value: 15 },
|
||||
]);
|
||||
// const adjust_option = ref<any>([
|
||||
// { label: "อัตราเงินเดือน ", value: 0 },
|
||||
// { label: "สวัสดิการ", value: 1 },
|
||||
// { label: "ลักษณะงาน ", value: 2 },
|
||||
// { label: "ระบบการทำงาน ", value: 3 },
|
||||
// { label: "ระบบสนับสนุนการปฏิบัติงาน ", value: 4 },
|
||||
// { label: "การมอบหมายงานที่ชัดเจนและเหมาะสม ", value: 5 },
|
||||
// { label: "การบริหารงานของผู้บังคับบัญชา", value: 6 },
|
||||
// { label: "การทำงานเป็นทีมกับเพื่อนร่วมงาน ", value: 7 },
|
||||
// { label: "ระบบบริหารงานภายในหน่วยงาน ", value: 8 },
|
||||
// { label: "บรรยากาศในการทำงาน ", value: 9 },
|
||||
// { label: "การปฏิบัติอย่างเป็นธรรม ", value: 10 },
|
||||
// { label: "การยอมรับความแตกต่างหลากหลาย ", value: 11 },
|
||||
// { label: "การดูแลและให้ความช่วยเหลือในช่วงเริ่มต้นปฏิบัติงาน ", value: 12 },
|
||||
// { label: "การพัฒนาอย่างเป็นระบบและต่อเนื่อง ", value: 13 },
|
||||
// { label: "โอกาสความก้าวหน้า ", value: 14 },
|
||||
// { label: "อื่น ๆ (ระบุ) ", value: 15 },
|
||||
// ]);
|
||||
|
||||
onMounted(async () => {
|
||||
if (keycloak.tokenParsed != null) {
|
||||
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
|
||||
}
|
||||
await getData();
|
||||
await fecthquestion();
|
||||
});
|
||||
|
||||
//นำข้อมูลมาแสดง
|
||||
|
|
@ -185,6 +191,81 @@ const getData = async () => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
// เรียกคำถามแบบสอบถาม
|
||||
const questionDesc = reactive<any>([
|
||||
{
|
||||
question1Desc: "",
|
||||
question2Desc: "",
|
||||
question3Desc: "",
|
||||
question4Desc: "",
|
||||
question5Desc: "",
|
||||
question6Desc: "",
|
||||
question7Desc: "",
|
||||
question8Desc: "",
|
||||
question9Desc: "",
|
||||
question10Desc: "",
|
||||
},
|
||||
]);
|
||||
const question1Answer = ref<OptionQuestions[]>([]);
|
||||
const question2Answer = ref<OptionQuestions[]>([]);
|
||||
const question3Answer = ref<OptionQuestions[]>([]);
|
||||
const question4Answer = ref<OptionQuestions[]>([]);
|
||||
const question7Answer = ref<OptionQuestions2[]>([]);
|
||||
const question8Answer = ref<OptionQuestions2[]>([]);
|
||||
const question9Answer = ref<OptionQuestions2[]>([]);
|
||||
async function fecthquestion() {
|
||||
await http
|
||||
.get(config.API.questionnaireList())
|
||||
.then((result) => {
|
||||
const data = result.data.result;
|
||||
console.log(data);
|
||||
// คำถามแบบสอบถามหลัก
|
||||
for (let i = 1; i <= 10; i++) {
|
||||
questionDesc[`question${i}Desc`] =
|
||||
`${i}.` + " " + data[`question${i}Desc`];
|
||||
}
|
||||
// คำถามแบบสอบถามย่อย
|
||||
question1Answer.value = data.question1Answer.map(
|
||||
(e: any, index: number) => ({
|
||||
label: e,
|
||||
value: index,
|
||||
})
|
||||
);
|
||||
question2Answer.value = data.question2Answer.map(
|
||||
(e: any, index: number) => ({
|
||||
label: e,
|
||||
value: index,
|
||||
})
|
||||
);
|
||||
question3Answer.value = data.question3Answer.map(
|
||||
(e: any, index: number) => ({
|
||||
label: e,
|
||||
value: index,
|
||||
})
|
||||
);
|
||||
question4Answer.value = data.question4Answer.map(
|
||||
(e: any, index: number) => ({
|
||||
label: e,
|
||||
value: index,
|
||||
})
|
||||
);
|
||||
question7Answer.value = data.question7Answer.map((e: any) => ({
|
||||
label: e,
|
||||
value: e == "ไม่มี" ? false : true,
|
||||
}));
|
||||
question8Answer.value = data.question8Answer.map((e: any) => ({
|
||||
label: e,
|
||||
value: e == "แนะนำ" ? true : false,
|
||||
}));
|
||||
question9Answer.value = data.question9Answer.map((e: any) => ({
|
||||
label: e,
|
||||
value: e == "อยาก" ? true : false,
|
||||
}));
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
watch(score, () => {
|
||||
scoreTotal.value = score.reduce((accumulator, object) => {
|
||||
|
|
@ -311,11 +392,13 @@ const putData = () => {
|
|||
>
|
||||
แบบสอบถาม
|
||||
</div>
|
||||
|
||||
<q-separator />
|
||||
<div class="col-12 row q-pa-sm q-col-gutter-sm">
|
||||
<div class="col-10 text-top0 items-center">
|
||||
1. เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร (เลือกได้มากกว่า
|
||||
1 ข้อ)
|
||||
<!-- 1. เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร (เลือกได้มากกว่า
|
||||
1 ข้อ) -->
|
||||
{{ questionDesc.question1Desc }}
|
||||
</div>
|
||||
<div class="col-2 text-top0 items-center">
|
||||
<q-input
|
||||
|
|
@ -330,7 +413,7 @@ const putData = () => {
|
|||
</div>
|
||||
|
||||
<q-option-group
|
||||
:options="reasonWork_option"
|
||||
:options="question1Answer"
|
||||
type="checkbox"
|
||||
v-model="reasonWork"
|
||||
disable
|
||||
|
|
@ -356,8 +439,9 @@ const putData = () => {
|
|||
</q-item-label>
|
||||
</div>
|
||||
<div class="col-10 text-top0 items-center">
|
||||
2. สำหรับการลาออกในครั้งนี้
|
||||
ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด
|
||||
<!-- 2. สำหรับการลาออกในครั้งนี้
|
||||
ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด -->
|
||||
{{ questionDesc.question2Desc }}
|
||||
</div>
|
||||
<div class="col-2 text-top0 items-center">
|
||||
<q-input
|
||||
|
|
@ -373,7 +457,7 @@ const putData = () => {
|
|||
|
||||
<div class="col-12">
|
||||
<q-option-group
|
||||
:options="timeThink_option"
|
||||
:options="question2Answer"
|
||||
type="radio"
|
||||
v-model="timeThink"
|
||||
disable
|
||||
|
|
@ -381,8 +465,9 @@ const putData = () => {
|
|||
</div>
|
||||
|
||||
<div class="col-10 text-top0 items-center">
|
||||
3. ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ (เลือกได้มากกว่า 1
|
||||
ข้อ )
|
||||
<!-- 3. ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ (เลือกได้มากกว่า 1
|
||||
ข้อ ) -->
|
||||
{{ questionDesc.question3Desc }}
|
||||
</div>
|
||||
|
||||
<div class="col-2 text-top0 items-center">
|
||||
|
|
@ -398,7 +483,7 @@ const putData = () => {
|
|||
</div>
|
||||
|
||||
<q-option-group
|
||||
:options="exitFactor_option"
|
||||
:options="question3Answer"
|
||||
type="checkbox"
|
||||
v-model="exitFactor"
|
||||
disable
|
||||
|
|
@ -426,7 +511,8 @@ const putData = () => {
|
|||
</div>
|
||||
|
||||
<div class="col-10 text-top0 items-center">
|
||||
4. อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง (เลือกได้มากกว่า 1 ข้อ)
|
||||
<!-- 4. อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง (เลือกได้มากกว่า 1 ข้อ) -->
|
||||
{{ questionDesc.question4Desc }}
|
||||
</div>
|
||||
|
||||
<div class="col-2 text-top0 items-center">
|
||||
|
|
@ -443,7 +529,7 @@ const putData = () => {
|
|||
|
||||
<q-list>
|
||||
<q-option-group
|
||||
:options="adjust_option"
|
||||
:options="question4Answer"
|
||||
type="checkbox"
|
||||
v-model="adjust"
|
||||
disable
|
||||
|
|
@ -470,8 +556,9 @@ const putData = () => {
|
|||
</q-item-label>
|
||||
</div>
|
||||
<div class="col-10 text-top0 items-center">
|
||||
5. โปรดระบุสาเหตุที่แท้จริง
|
||||
ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร ?
|
||||
<!-- 5. โปรดระบุสาเหตุที่แท้จริง
|
||||
ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร ? -->
|
||||
{{ questionDesc.question5Desc }}
|
||||
</div>
|
||||
<div class="col-2 text-top0 items-center">
|
||||
<q-input
|
||||
|
|
@ -496,8 +583,9 @@ const putData = () => {
|
|||
/>
|
||||
|
||||
<div class="col-10 text-top0 items-center">
|
||||
6. ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ
|
||||
ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร
|
||||
<!-- 6. ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ
|
||||
ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร -->
|
||||
{{ questionDesc.question6Desc }}
|
||||
</div>
|
||||
<div class="col-2 text-top0 items-center">
|
||||
<q-input
|
||||
|
|
@ -522,10 +610,11 @@ const putData = () => {
|
|||
/>
|
||||
|
||||
<div class="col-10 text-top0 items-center">
|
||||
7. ท่านมีงานใหม่หรือไม่ ถ้ามี (โปรดระบุ
|
||||
<!-- 7. ท่านมีงานใหม่หรือไม่ ถ้ามี (โปรดระบุ
|
||||
ชื่อบริษัทเอกชน/หน่วยงานภาครัฐ)
|
||||
และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน
|
||||
ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร
|
||||
ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร -->
|
||||
{{ questionDesc.question7Desc }}
|
||||
</div>
|
||||
|
||||
<div class="col-2 text-top0 items-center">
|
||||
|
|
@ -541,7 +630,7 @@ const putData = () => {
|
|||
</div>
|
||||
|
||||
<q-option-group
|
||||
:options="haveJob_option"
|
||||
:options="question7Answer"
|
||||
type="radio"
|
||||
v-model="haveJob"
|
||||
disable
|
||||
|
|
@ -567,8 +656,9 @@ const putData = () => {
|
|||
</q-item-label>
|
||||
</div>
|
||||
<div class="col-10 text-top0 items-center">
|
||||
8. ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่ (ถ้าไม่
|
||||
โปรดระบุเหตุผล)
|
||||
<!-- 8. ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่ (ถ้าไม่
|
||||
โปรดระบุเหตุผล) -->
|
||||
{{ questionDesc.question8Desc }}
|
||||
</div>
|
||||
|
||||
<div class="col-2 text-top0 items-center">
|
||||
|
|
@ -584,7 +674,7 @@ const putData = () => {
|
|||
</div>
|
||||
|
||||
<q-option-group
|
||||
:options="suggestFriends_option"
|
||||
:options="question8Answer"
|
||||
type="radio"
|
||||
v-model="suggestFriends"
|
||||
disable
|
||||
|
|
@ -610,9 +700,10 @@ const putData = () => {
|
|||
</q-item-label>
|
||||
</div>
|
||||
<div class="col-10 text-top0 items-center">
|
||||
9. หากท่านมีโอกาสในอนาคต
|
||||
<!-- 9. หากท่านมีโอกาสในอนาคต
|
||||
ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่ (ถ้าไม่
|
||||
โปรดระบุเหตุผล)
|
||||
โปรดระบุเหตุผล) -->
|
||||
{{ questionDesc.question9Desc }}
|
||||
</div>
|
||||
<div class="col-2 text-top0 items-center">
|
||||
<q-input
|
||||
|
|
@ -625,9 +716,8 @@ const putData = () => {
|
|||
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-option-group
|
||||
:options="futureWork_option"
|
||||
:options="question9Answer"
|
||||
type="radio"
|
||||
v-model="futureWork"
|
||||
disable
|
||||
|
|
@ -654,7 +744,8 @@ const putData = () => {
|
|||
</div>
|
||||
|
||||
<div class="col-10 text-top0 items-center">
|
||||
10. ความคิดเห็นและข้อเสนอแนะอื่น ๆ
|
||||
<!-- 10. ความคิดเห็นและข้อเสนอแนะอื่น ๆ -->
|
||||
{{ questionDesc.question10Desc }}
|
||||
</div>
|
||||
<div class="col-2 text-top0 items-center">
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -1 +1,14 @@
|
|||
export type {};
|
||||
interface OptionQuestions {
|
||||
label: string;
|
||||
value: number;
|
||||
}
|
||||
interface OptionQuestions2 {
|
||||
label: string;
|
||||
value: boolean;
|
||||
}
|
||||
|
||||
|
||||
export type {
|
||||
OptionQuestions,
|
||||
OptionQuestions2
|
||||
};
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ const dialogDeleteData = async (id: string) => {
|
|||
const deleteData = async (id: string) => {
|
||||
await http
|
||||
.delete(config.API.personsOrder(id))
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -271,8 +271,6 @@ const fetchSalary = async (personalId: string) => {
|
|||
.get(config.API.salaryOrder(personalId))
|
||||
.then((res: any) => {
|
||||
const data = res.data.result;
|
||||
console.log(data);
|
||||
|
||||
modalData.value = {
|
||||
salaryAmount:
|
||||
data.salaryAmount === 0 &&
|
||||
|
|
@ -318,7 +316,7 @@ const putSalary = async (salary: any) => {
|
|||
}
|
||||
await http
|
||||
.put(config.API.salaryOrder(personalId.value), modalData.value)
|
||||
.then((any) => {
|
||||
.then(() => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue