reportidperson
This commit is contained in:
parent
546902909b
commit
067a32f436
3 changed files with 62 additions and 261 deletions
|
|
@ -35,6 +35,9 @@ const appointTopic = ref<AppointTopicMain>();
|
|||
const appointOp = ref<AppointTopicMain[]>([]);
|
||||
const appointAll = ref<AppointTopicMain[]>([]);
|
||||
|
||||
const reportPersonId = ref<AppointTopic[]>([]);
|
||||
const reportPersonIdOp = ref<AppointTopic[]>([]);
|
||||
|
||||
const fullname = ref<string>();
|
||||
const date_start = ref<Date>();
|
||||
const date_finish = ref<any>();
|
||||
|
|
@ -549,6 +552,7 @@ function putDataEdit(id: string) {
|
|||
});
|
||||
}
|
||||
const data = {
|
||||
reportPersonId: reportPersonId.value ? reportPersonId.value : "",
|
||||
appointId: appointTopic.value ? appointTopic.value.id : "",
|
||||
fullname: fullname.value,
|
||||
position: position.value,
|
||||
|
|
@ -682,6 +686,7 @@ function putData(id: string) {
|
|||
});
|
||||
}
|
||||
const data = {
|
||||
reportPersonId: reportPersonId.value ? reportPersonId.value : "",
|
||||
appointId: appointTopic.value ? appointTopic.value.id : "",
|
||||
personalId: GUID,
|
||||
fullname: fullname.value,
|
||||
|
|
@ -755,7 +760,7 @@ async function getAssign() {
|
|||
isEdit.value = false;
|
||||
const data = res.data.data;
|
||||
fullname.value = data.profile.name;
|
||||
appointTopic.value = data.assign.appointId
|
||||
appointTopic.value = data.assign.appointId;
|
||||
position.value = data.profile.positionName;
|
||||
date_start.value = data.assign.date_start;
|
||||
date_finish.value = data.assign.date_finish;
|
||||
|
|
@ -978,6 +983,16 @@ async function getAppoint(id: string) {
|
|||
function updateAppointMent() {
|
||||
if (appointTopic.value) {
|
||||
const data = appointTopic.value.directors;
|
||||
const dataPerson = data.map((dataPerson: AppointTopic) => ({
|
||||
...dataPerson,
|
||||
name: `${dataPerson.name} (${dataPerson.position}${
|
||||
dataPerson.positionLevel && dataPerson.positionType
|
||||
? ", " + dataPerson.positionType + ": " + dataPerson.positionLevel
|
||||
: ""
|
||||
})`,
|
||||
}));
|
||||
|
||||
reportPersonIdOp.value = dataPerson;
|
||||
|
||||
const dataFindChairman = data.find(
|
||||
(item: AppointTopic) => item.role === "chairman"
|
||||
|
|
@ -987,10 +1002,10 @@ function updateAppointMent() {
|
|||
);
|
||||
const dataFindCaretaker1 = data.filter(
|
||||
(item: AppointTopic) => item.role === "caregiver"
|
||||
)[0];
|
||||
)[0];
|
||||
const dataFindCaretaker2 = data.filter(
|
||||
(item: AppointTopic) => item.role === "caregiver"
|
||||
)[1];
|
||||
)[1];
|
||||
|
||||
const createChairmanObject = (dataPerson: AppointTopic) => ({
|
||||
id: dataPerson.id,
|
||||
|
|
@ -1145,26 +1160,51 @@ onMounted(async () => {
|
|||
<div class="col-12 text-dark">
|
||||
<div class="row col-12">
|
||||
<div class="row col-12 q-gutter-lg">
|
||||
<div class="col-12 row">
|
||||
<div class="col-6 q-mb-sm">
|
||||
<q-select
|
||||
outlined
|
||||
dense
|
||||
label="เลือกคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ"
|
||||
bg-color="white"
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ']"
|
||||
hide-bottom-space
|
||||
:options="appointOp"
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="!isEdit && routeName !== 'probationWorkAdd'"
|
||||
borderless
|
||||
option-label="topic"
|
||||
option-value="id"
|
||||
v-model="appointTopic"
|
||||
map-options
|
||||
@update:model-value="updateAppointMent"
|
||||
></q-select>
|
||||
<div class="col-12">
|
||||
<div class="row q-col-gutter-sm q-mb-sm">
|
||||
<div class="col-6">
|
||||
<q-select
|
||||
outlined
|
||||
dense
|
||||
label="เลือกคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ"
|
||||
bg-color="white"
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ']"
|
||||
hide-bottom-space
|
||||
:options="appointOp"
|
||||
class="col-xs-12 col-sm-6"
|
||||
:readonly="!isEdit && routeName !== 'probationWorkAdd'"
|
||||
borderless
|
||||
option-label="topic"
|
||||
option-value="id"
|
||||
v-model="appointTopic"
|
||||
map-options
|
||||
@update:model-value="updateAppointMent"
|
||||
></q-select>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<q-select
|
||||
:readonly="
|
||||
!isEdit &&
|
||||
appointTopic?.id !== ''
|
||||
"
|
||||
outlined
|
||||
dense
|
||||
label="ผู้บันทึกแบบประเมินผล (คณะกรรมการ)"
|
||||
bg-color="white"
|
||||
:rules="[(val:string) => !!val || 'กรุณาเลือกผู้บันทึกแบบประเมินผล (คณะกรรมการ)']"
|
||||
hide-bottom-space
|
||||
:options="reportPersonIdOp"
|
||||
class="col-xs-12 col-sm-6"
|
||||
borderless
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
v-model="reportPersonId"
|
||||
map-options
|
||||
emit-value
|
||||
></q-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-top0 items-center">
|
||||
<q-avatar class="bg-grey-2 q-mr-sm" size="28px">1</q-avatar>
|
||||
ผู้ทดลองปฏิบัติหน้าที่ราชการ
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue