ต่อ api รายละเอียดการประเมินของ
This commit is contained in:
parent
cab89c78f3
commit
4521f80918
17 changed files with 1226 additions and 191 deletions
|
|
@ -1,10 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id as string);
|
||||
const $q = useQuasar();
|
||||
const AnnouncementStartDate = ref<string | null>();
|
||||
const AnnouncementEndDate = ref<string | null>();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
||||
const AnnouncementDate = ref<string | null>(date2Thai(new Date()));
|
||||
|
|
@ -28,6 +37,49 @@ function onClickViewPDF(file: any) {
|
|||
const updateInput = (value: any) => {
|
||||
emit("update:form", value, ref);
|
||||
};
|
||||
|
||||
function getDate() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationDateAnnounce(id.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
AnnouncementStartDate.value = date2Thai(data.dateStartAnnounce);
|
||||
const endDate = new Date(data.dateEndAnnounce);
|
||||
endDate.setDate(endDate.getDate() + 30);
|
||||
AnnouncementEndDate.value = date2Thai(endDate);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
function getSigner() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.evaluationSigner(id.value, 2))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
formCommand.elementaryFullName = data.commanderFullnameDoc2;
|
||||
formCommand.elementaryPosition = data.commanderPositionDoc2;
|
||||
formCommand.abovelevelFullname = data.commanderAboveFullnameDoc2;
|
||||
formCommand.abovelevelPosition = data.commanderAbovePositionDoc2;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getSigner();
|
||||
getDate();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -36,11 +88,12 @@ const updateInput = (value: any) => {
|
|||
<q-banner class="text-weight-bold text-red-14 bg-red-2 text-center">
|
||||
<div class="text-weight-bold">
|
||||
<q-icon name="info_outline" color="red-14" size="24px" />
|
||||
ประกาศเมื่อวันที่ {{ AnnouncementDate }}
|
||||
ประกาศเมื่อวันที่ {{ AnnouncementStartDate }} ถึงวันที่
|
||||
{{ AnnouncementEndDate }}
|
||||
</div>
|
||||
</q-banner>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<!-- <div class="col-6">
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||
เอกสารเล่ม 2
|
||||
|
|
@ -49,7 +102,7 @@ const updateInput = (value: any) => {
|
|||
<div class="row">
|
||||
<div class="col-12 q-pa-sm">
|
||||
<div class="row q-col-gutter-md col-12">
|
||||
<!-- <div class="col-xs-12 col-sm-6 row">
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
class="col-12"
|
||||
outline
|
||||
|
|
@ -59,7 +112,7 @@ const updateInput = (value: any) => {
|
|||
>
|
||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
||||
>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 row">
|
||||
<q-btn
|
||||
v-if="fileEvaluation1"
|
||||
|
|
@ -97,7 +150,7 @@ const updateInput = (value: any) => {
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-12">
|
||||
<q-card bordered style="border: 1px solid #d6dee1">
|
||||
|
|
@ -114,6 +167,7 @@ const updateInput = (value: any) => {
|
|||
</div>
|
||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||
<q-input
|
||||
readonly
|
||||
ref="elementaryFullNameRef"
|
||||
dense
|
||||
class="col-xs-12 col-sm-6"
|
||||
|
|
@ -125,6 +179,7 @@ const updateInput = (value: any) => {
|
|||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
readonly
|
||||
ref="elementaryPositonRef"
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
|
|
@ -146,6 +201,7 @@ const updateInput = (value: any) => {
|
|||
</div>
|
||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||
<q-input
|
||||
readonly
|
||||
ref="abovelevelFullnameRef"
|
||||
dense
|
||||
class="col-xs-12 col-sm-6"
|
||||
|
|
@ -160,6 +216,7 @@ const updateInput = (value: any) => {
|
|||
ref="abovelevelPositionRef"
|
||||
class="col-xs-12 col-sm-6"
|
||||
dense
|
||||
readonly
|
||||
outlined
|
||||
v-model="formCommand.abovelevelPosition"
|
||||
label="ตำแหน่ง"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue