ต่อ api รายละเอียดการประเมินของ
This commit is contained in:
parent
cab89c78f3
commit
4521f80918
17 changed files with 1226 additions and 191 deletions
|
|
@ -12,5 +12,22 @@ export default {
|
||||||
meetingById: (id: string) => `${evaluation}/meeting/${id}`,
|
meetingById: (id: string) => `${evaluation}/meeting/${id}`,
|
||||||
|
|
||||||
evaluationFilebyId:(volume:string,id:string,file:string) => `${evaluationFile}/${volume}/${id}/${file}`,
|
evaluationFilebyId:(volume:string,id:string,file:string) => `${evaluationFile}/${volume}/${id}/${file}`,
|
||||||
evaluationFileListbyId:(volume:string,id:string) => `${evaluationFile}/${volume}/${id}`
|
evaluationFileListbyId:(volume:string,id:string) => `${evaluationFile}/${volume}/${id}`,
|
||||||
|
evaluationApproveDoc1:(id:string)=>`${evaluation}/doc1/approve/${id}`,
|
||||||
|
|
||||||
|
evaluationHistory: (id: string) => `${evaluation}/step-history/${id}`,
|
||||||
|
|
||||||
|
evaluationDateAnnounce:(id:string) => `${evaluation}/check-date/${id}`,
|
||||||
|
|
||||||
|
evaluationSigner:(id:string,num:number) => `${evaluation}/doc${num}-signer/${id}`,
|
||||||
|
|
||||||
|
evaluationSentToContact:(id:string) => `${evaluation}/contact/user/${id}`,
|
||||||
|
|
||||||
|
evaluationPatchData:(volume:string,id:string,file:string) => `${evaluationFile}/${volume}/${id}/${file}`,
|
||||||
|
|
||||||
|
evaluationChooseDirectors:(id:string) => `${evaluation}/choose-directors/${id}`,
|
||||||
|
evaluationChooseMeeting:(id:string) => `${evaluation}/choose-meetings/${id}`,
|
||||||
|
|
||||||
|
evaluationListData:(id:string) =>`${evaluation}/director-meeting/${id}`
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, reactive } from "vue";
|
import { onMounted, ref, reactive } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
FormCommand,
|
FormCommand,
|
||||||
|
|
@ -25,15 +26,19 @@ import ViewStep7 from "@/modules/12_evaluatePersonal/components/Detail/viewstep/
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
import PopupHistory from "@/modules/12_evaluatePersonal/components/Detail/popupHistory.vue";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm } = mixin;
|
const { dialogConfirm } = mixin;
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const modalHistory = ref<boolean>(false);
|
||||||
const externalLink =
|
const externalLink =
|
||||||
"https://accreditation.ocsc.go.th/accreditation/search/curriculum";
|
"https://accreditation.ocsc.go.th/accreditation/search/curriculum";
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
const formCommand = reactive<FormCommand>({
|
const formCommand = reactive<FormCommand>({
|
||||||
elementaryFullName: "",
|
elementaryFullName: "",
|
||||||
elementaryPosition: "",
|
elementaryPosition: "",
|
||||||
|
|
@ -168,6 +173,10 @@ async function saveStep9() {
|
||||||
console.log("Save 9");
|
console.log("Save 9");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onClickPopupHistory() {
|
||||||
|
modalHistory.value = !modalHistory.value;
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
store.step = 1;
|
store.step = 1;
|
||||||
});
|
});
|
||||||
|
|
@ -176,7 +185,20 @@ onMounted(() => {
|
||||||
<template>
|
<template>
|
||||||
<div class="row q-col-gutter-md">
|
<div class="row q-col-gutter-md">
|
||||||
<div class="col-xs-12 col-sm-3">
|
<div class="col-xs-12 col-sm-3">
|
||||||
<div class="toptitle">ประเมินชำนาญการ</div>
|
<div class="toptitle">
|
||||||
|
ประเมินชำนาญการ
|
||||||
|
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
color="primary"
|
||||||
|
icon="history"
|
||||||
|
@click="onClickPopupHistory"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติการประเมิน</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
<Stepper />
|
<Stepper />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -199,11 +221,11 @@ onMounted(() => {
|
||||||
: 'col-xs-12 col-sm-5 row'
|
: 'col-xs-12 col-sm-5 row'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-card flat bordered class="col-12 ">
|
<q-card flat bordered class="col-12">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<Step1 v-if="store.step === 1" />
|
<Step1 v-if="store.step === 1" />
|
||||||
<Step2 v-if="store.step === 2" @update:form="updateformCommand" />
|
<Step2 v-if="store.step === 2" @update:form="updateformCommand" />
|
||||||
<Step3 v-if="store.step === 3" :step="store.step"/>
|
<Step3 v-if="store.step === 3" :step="store.step" />
|
||||||
<Step4 v-if="store.step === 4" />
|
<Step4 v-if="store.step === 4" />
|
||||||
<Step5 v-if="store.step === 5" />
|
<Step5 v-if="store.step === 5" />
|
||||||
<Step6 v-if="store.step === 6" />
|
<Step6 v-if="store.step === 6" />
|
||||||
|
|
@ -225,9 +247,10 @@ onMounted(() => {
|
||||||
></q-card>
|
></q-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<PopupHistory :modal="modalHistory" :close="onClickPopupHistory" :id="id" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,44 @@ import CardMeet from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/C
|
||||||
|
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm } = mixin;
|
const { dialogConfirm, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
|
const director = ref<any[]>();
|
||||||
|
const meeting = ref<any[]>();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
// onMounted(() => {
|
// onMounted(() => {
|
||||||
// store.step = 1;
|
// store.step = 1;
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
function getList() {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.evaluationListData(id.value))
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
director.value = data.directors;
|
||||||
|
meeting.value = data.meetings;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -24,8 +52,8 @@ const $q = useQuasar();
|
||||||
<div class="toptitle">กรรมการและการประชุม</div>
|
<div class="toptitle">กรรมการและการประชุม</div>
|
||||||
|
|
||||||
<div class="row col-12 q-gutter-md">
|
<div class="row col-12 q-gutter-md">
|
||||||
<CardDirector />
|
<CardDirector :data="director"/>
|
||||||
<CardMeet />
|
<CardMeet :data="meeting"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,178 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, watch } from "vue";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
import HeaderDialog from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
const mixins = useCounterMixin();
|
||||||
|
const { showLoader, hideLoader, date2Thai } = mixins;
|
||||||
|
|
||||||
|
/** รับ props Tab 1 */
|
||||||
|
const props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
modal: {
|
||||||
|
type: Boolean,
|
||||||
|
require: true,
|
||||||
|
},
|
||||||
|
close: {
|
||||||
|
type: Function,
|
||||||
|
default: () => "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: false,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "step",
|
||||||
|
align: "left",
|
||||||
|
label: "การแก้ไข",
|
||||||
|
sortable: true,
|
||||||
|
field: "step",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lastUpdateFullName",
|
||||||
|
align: "left",
|
||||||
|
label: "ผู้ดำเนินการ",
|
||||||
|
sortable: true,
|
||||||
|
field: "lastUpdateFullName",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lastUpdatedAt",
|
||||||
|
align: "left",
|
||||||
|
label: "วันที่แก้ไข",
|
||||||
|
sortable: true,
|
||||||
|
field: "lastUpdatedAt",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const row = ref<any>();
|
||||||
|
|
||||||
|
async function fetchListHistory(id: string) {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.evaluationHistory(id))
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
const list = data.map((e: any) => ({
|
||||||
|
step: e.step,
|
||||||
|
lastUpdateFullName: e.lastUpdateFullName,
|
||||||
|
lastUpdatedAt: date2Thai(e.lastUpdatedAt),
|
||||||
|
}));
|
||||||
|
row.value = list;
|
||||||
|
})
|
||||||
|
.catch((err) => {})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.modal,
|
||||||
|
() => {
|
||||||
|
props.modal && props.id && fetchListHistory(props.id);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<q-dialog v-model="props.modal">
|
||||||
|
<q-card style="width: 700px; max-width: 80vw">
|
||||||
|
<q-card-section>
|
||||||
|
<HeaderDialog :tittle="'ประวัติการประเมิน'" :close="props.close" />
|
||||||
|
</q-card-section>
|
||||||
|
<q-separator />
|
||||||
|
<q-card-section class="q-pt-none">
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-12 row q-col-gutter-md">
|
||||||
|
<div class="col-12 q-mt-sm">
|
||||||
|
<q-table
|
||||||
|
ref="table"
|
||||||
|
flat
|
||||||
|
bordered
|
||||||
|
class="custom-header-table"
|
||||||
|
:columns="columns"
|
||||||
|
:rows="row"
|
||||||
|
dense
|
||||||
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
|
>
|
||||||
|
<template v-slot:header="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<q-th
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
|
<span class="text-weight-medium" v-html="col.label" />
|
||||||
|
</q-th>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
<template v-slot:body="props">
|
||||||
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
|
<q-td
|
||||||
|
v-for="col in props.cols"
|
||||||
|
:key="col.name"
|
||||||
|
:props="props"
|
||||||
|
>
|
||||||
|
<div v-if="col.name == 'no'">
|
||||||
|
{{ props.rowIndex + 1 }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ col.value }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
</q-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.custom-header-table {
|
||||||
|
height: auto;
|
||||||
|
.q-table tr:nth-child(odd) td {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
.q-table tr:nth-child(even) td {
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table thead tr {
|
||||||
|
background: #ecebeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-table thead tr th {
|
||||||
|
position: sticky;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
/* this will be the loading indicator */
|
||||||
|
.q-table thead tr:last-child th {
|
||||||
|
/* height of all previous header rows */
|
||||||
|
top: 48px;
|
||||||
|
}
|
||||||
|
.q-table thead tr:first-child th {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -3,13 +3,16 @@ import { ref, reactive, onMounted } from "vue";
|
||||||
import keycloak from "@/plugins/keycloak";
|
import keycloak from "@/plugins/keycloak";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -96,7 +99,26 @@ async function onClickDowloadFile(
|
||||||
await genReport(body, fileName);
|
await genReport(body, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getSigner() {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.evaluationSigner(id.value, 1))
|
||||||
|
.then((res) => {
|
||||||
|
const data = res.data.result;
|
||||||
|
formCommand.elementaryFullName = data.commanderFullname;
|
||||||
|
formCommand.elementaryPosition = data.commanderPosition;
|
||||||
|
formCommand.abovelevelFullname = data.commanderAboveFullname;
|
||||||
|
formCommand.abovelevelPosition = data.commanderAbovePosition;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getSigner();
|
||||||
const ref = {
|
const ref = {
|
||||||
elementaryFullNameRef: elementaryFullNameRef.value,
|
elementaryFullNameRef: elementaryFullNameRef.value,
|
||||||
elementaryPositonRef: elementaryPositonRef.value,
|
elementaryPositonRef: elementaryPositonRef.value,
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ function getPDF(url: string,type:string) {
|
||||||
messageError($q,e)
|
messageError($q,e)
|
||||||
})
|
})
|
||||||
.finally(()=>{
|
.finally(()=>{
|
||||||
|
store.log = 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,17 @@ import keycloak from "@/plugins/keycloak";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import PopupReason from "@/components/Dialogs/PopupReason.vue";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, showLoader, hideLoader, messageError,success } = mixin;
|
const {
|
||||||
|
date2Thai,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
messageError,
|
||||||
|
success,
|
||||||
|
dialogConfirm,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -18,7 +26,7 @@ const id = ref<string>(route.params.id as string);
|
||||||
const fullName = ref<string>(
|
const fullName = ref<string>(
|
||||||
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
||||||
);
|
);
|
||||||
const mesasger = ref<string>("");
|
const messenger = ref<string>("");
|
||||||
const title = ref<string>("");
|
const title = ref<string>("");
|
||||||
const modalEvaluation = ref<boolean>(false);
|
const modalEvaluation = ref<boolean>(false);
|
||||||
const fileEvaluationUpload = ref<any>();
|
const fileEvaluationUpload = ref<any>();
|
||||||
|
|
@ -125,33 +133,24 @@ function getPDF(url: string, type: string, fileName: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ส่งไปประกาศบนเว็บไซต์ */
|
/** ส่งไปประกาศบนเว็บไซต์ */
|
||||||
function onWebSite() {}
|
function onWebSite() {
|
||||||
|
showLoader();
|
||||||
// function getFileList() {
|
http
|
||||||
// showLoader();
|
.put(config.API.evaluationApproveDoc1(id.value))
|
||||||
// http
|
.then((res) => {})
|
||||||
// .get(config.API.evaluationFilebyId("เล่ม 1", id.value))
|
.catch((e) => {})
|
||||||
// .then((res) => {
|
.finally(() => {
|
||||||
// const fileList = res.data;
|
success($q, "ส่งไปประกาศบนเว็บไซต์ สำเร็จ");
|
||||||
// files.forEach((file, index) => {
|
hideLoader();
|
||||||
// const apiFile = fileList[index];
|
});
|
||||||
// file.pathName = apiFile.pathname;
|
}
|
||||||
// });
|
|
||||||
|
|
||||||
// console.log(files);
|
|
||||||
// })
|
|
||||||
// .catch((e) => {})
|
|
||||||
// .finally(() => {
|
|
||||||
// hideLoader();
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
function upLoadFile() {
|
function upLoadFile() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.evaluationFileListbyId("เล่ม 1", id.value), {
|
.post(config.API.evaluationFileListbyId("เล่ม 1", id.value), {
|
||||||
fileList: {
|
fileList: {
|
||||||
fileName: "4-แบบประเมินคุณลักษณะบุคคล",
|
fileName: "10-ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
||||||
metadata: {
|
metadata: {
|
||||||
tag: "value",
|
tag: "value",
|
||||||
},
|
},
|
||||||
|
|
@ -175,15 +174,39 @@ function upLoadFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileUpLoad(url: string) {
|
function fileUpLoad(url: string) {
|
||||||
axios.put(url, fileEvaluationUpload.value, {
|
axios
|
||||||
headers: { "Content-Type": fileEvaluationUpload.value?.type },
|
.put(url, fileEvaluationUpload.value, {
|
||||||
onUploadProgress: (e) => console.log(e),
|
headers: { "Content-Type": fileEvaluationUpload.value?.type },
|
||||||
}).catch((e)=>{
|
onUploadProgress: (e) => console.log(e),
|
||||||
messageError($q,e)
|
})
|
||||||
}).finally(()=>{
|
.catch((e) => {
|
||||||
fileEvaluationUpload.value = null
|
messageError($q, e);
|
||||||
success($q, "อัปโหลดไฟล์สำเร็จ");
|
})
|
||||||
})
|
.finally(() => {
|
||||||
|
fileEvaluationUpload.value = null;
|
||||||
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function sentMessenger() {
|
||||||
|
dialogConfirm($q, () => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.evaluationSentToContact(id.value), {
|
||||||
|
subject: title.value,
|
||||||
|
body: messenger.value,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
modalEvaluation.value = false;
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -338,7 +361,7 @@ function fileUpLoad(url: string) {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
v-model="mesasger"
|
v-model="messenger"
|
||||||
label="ข้อความ"
|
label="ข้อความ"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
outlined
|
outlined
|
||||||
|
|
@ -357,6 +380,7 @@ function fileUpLoad(url: string) {
|
||||||
id="onSubmit"
|
id="onSubmit"
|
||||||
class="q-px-md q-py-xs"
|
class="q-px-md q-py-xs"
|
||||||
label="ส่งข้อความ"
|
label="ส่งข้อความ"
|
||||||
|
@click="sentMessenger"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,31 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import keycloak from "@/plugins/keycloak";
|
||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import genReport from "@/plugins/genreport";
|
||||||
|
|
||||||
|
const modalView = ref<boolean>(false);
|
||||||
|
const fullName = ref<string>(
|
||||||
|
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
||||||
|
);
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const numOfPages = ref<number>(0);
|
||||||
|
const page = ref<number>(1);
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
||||||
const AnnouncementDate = ref<string | null>(date2Thai(new Date()));
|
const AnnouncementStartDate = ref<string | null>();
|
||||||
|
const AnnouncementEndDate = ref<string | null>();
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
|
const pdfSrc = ref<any>();
|
||||||
|
|
||||||
const fileEvaluation5 = ref<any>();
|
const fileEvaluation5 = ref<any>();
|
||||||
const status = ref<string>("ANNOUNCE_WEB");
|
const status = ref<string>("ANNOUNCE_WEB");
|
||||||
const website = ref<string>("https://bma-ehr.frappet.com/");
|
const website = ref<string>("https://bma-ehr.frappet.com/");
|
||||||
|
|
@ -24,17 +34,17 @@ const files = [
|
||||||
{
|
{
|
||||||
id: "file1",
|
id: "file1",
|
||||||
fileName: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
fileName: "แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
||||||
pathName: "12",
|
pathName: "5-แบบสรุปข้อมูลของผู้ขอรับการคัดเลือก (เอกสารหมายเลข 9)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "file2",
|
id: "file2",
|
||||||
fileName: "ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
fileName: "ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
||||||
pathName: "12",
|
pathName: "10-ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "file3",
|
id: "file3",
|
||||||
fileName: "เอกสารแสดงผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
fileName: "ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
||||||
pathName: "12",
|
pathName: "6-ผลงานที่จะส่งประเมิน (เอกสารหมายเลข 11)",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -106,19 +116,113 @@ function fileUpLoad(url: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyLink(link: string) {
|
function getFileName(fileName: string) {
|
||||||
navigator.clipboard
|
if (fileName && fileName.lastIndexOf(".") !== -1) {
|
||||||
.writeText(link)
|
const index = fileName.indexOf("(");
|
||||||
.then(() => {
|
if (index !== -1) {
|
||||||
console.log(`Copied link for file: ${link}`);
|
return fileName.substring(0, index).trim();
|
||||||
|
} else {
|
||||||
|
// กรณีไม่มีวงเล็บ
|
||||||
|
return fileName.split(".").slice(0, -1).join(".");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// ในกรณีที่ไม่มีนามสกุล
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ไปหน้าต่อไปของรายงาน */
|
||||||
|
function nextPage() {
|
||||||
|
if (page.value < numOfPages.value) {
|
||||||
|
page.value++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** กลับหน้าก่อนหน้าของรายงาน */
|
||||||
|
function backPage() {
|
||||||
|
if (page.value !== 1) {
|
||||||
|
page.value--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function copyLink(name: string) {
|
||||||
|
console.log(name);
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.evaluationFilebyId("เล่ม 1", id.value, name))
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res.data);
|
||||||
|
const link = res.data.downloadUrl;
|
||||||
|
navigator.clipboard.writeText(link);
|
||||||
|
})
|
||||||
|
.catch((e) => {})
|
||||||
|
.finally(() => {
|
||||||
|
success($q, "คัดลอก URL สำเร็จ");
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
success($q, "คัดลอกสำเร็จ");
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// function linkCopy(link: string) {
|
||||||
|
// navigator.clipboard
|
||||||
|
// .writeText(link)
|
||||||
|
// .then(() => {
|
||||||
|
// console.log(`Copied link for file: ${link}`);
|
||||||
|
// })
|
||||||
|
// .catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// success($q, "คัดลอกสำเร็จ");
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
async function onClickDowloadFile(
|
||||||
|
tp: string,
|
||||||
|
templateName: string,
|
||||||
|
fileName: string
|
||||||
|
) {
|
||||||
|
showLoader();
|
||||||
|
const data = Object.assign(
|
||||||
|
{ fullName: fullName.value },
|
||||||
|
tp === "EV1_005" || tp === "EV1_007" ? { organizationName: "-" } : null,
|
||||||
|
tp === "EV1_007" ? { positionName: "-" } : null,
|
||||||
|
tp === "EV1_007" ? { positionLeaveName: "-" } : null
|
||||||
|
);
|
||||||
|
const body = {
|
||||||
|
template: tp,
|
||||||
|
reportName: templateName,
|
||||||
|
data: data,
|
||||||
|
};
|
||||||
|
console.log(body);
|
||||||
|
await genReport(body, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onClickViewPDF(file: any) {
|
||||||
|
// pdfSrc.value = file.webkitRelativePath;
|
||||||
|
modalView.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getDate();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -127,7 +231,8 @@ function copyLink(link: string) {
|
||||||
<q-banner class="text-weight-bold text-red-14 bg-red-2 text-center">
|
<q-banner class="text-weight-bold text-red-14 bg-red-2 text-center">
|
||||||
<div class="text-weight-bold">
|
<div class="text-weight-bold">
|
||||||
<q-icon name="info_outline" color="red-14" size="24px" />
|
<q-icon name="info_outline" color="red-14" size="24px" />
|
||||||
ประกาศเมื่อวันที่ {{ AnnouncementDate }}
|
ประกาศเมื่อวันที่ {{ AnnouncementStartDate }} ถึงวันที่
|
||||||
|
{{ AnnouncementEndDate }}
|
||||||
</div>
|
</div>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -156,7 +261,7 @@ function copyLink(link: string) {
|
||||||
round
|
round
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-clipboard-outline"
|
icon="mdi-clipboard-outline"
|
||||||
@click="copyLink(file.fileName)"
|
@click="copyLink(file.pathName)"
|
||||||
>
|
>
|
||||||
<q-tooltip>คัดลอกลิ้งค์</q-tooltip>
|
<q-tooltip>คัดลอกลิ้งค์</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -168,6 +273,80 @@ function copyLink(link: string) {
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
|
บันทึกแจ้งผลการประกาศคัดเลือก
|
||||||
|
</div>
|
||||||
|
<div class="col-12"><q-separator /></div>
|
||||||
|
<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">
|
||||||
|
<q-btn
|
||||||
|
class="col-12"
|
||||||
|
outline
|
||||||
|
icon="download"
|
||||||
|
label="ดาวน์โหลดต้นแบบ"
|
||||||
|
color="primary"
|
||||||
|
@click="
|
||||||
|
onClickDowloadFile(
|
||||||
|
'EV1_005',
|
||||||
|
'template-1',
|
||||||
|
'แบบพิจารณาคุณสมบัติบุคคล'
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-sm-6 row">
|
||||||
|
<q-btn
|
||||||
|
v-if="fileEvaluation5"
|
||||||
|
class="col-12"
|
||||||
|
outline
|
||||||
|
icon="visibility"
|
||||||
|
label="ดูไฟล์เอกสาร"
|
||||||
|
color="primary"
|
||||||
|
@click="onClickViewPDF(fileEvaluation5)"
|
||||||
|
>
|
||||||
|
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div> -->
|
||||||
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
|
<q-file
|
||||||
|
ref="fileEvaluation1Ref"
|
||||||
|
v-model="fileEvaluation5"
|
||||||
|
class="col-12"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
label="อัปโหลดไฟล์"
|
||||||
|
hide-bottom-space
|
||||||
|
lazy-rules
|
||||||
|
accept=".pdf"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="attach_file" />
|
||||||
|
</template>
|
||||||
|
</q-file>
|
||||||
|
</div>
|
||||||
|
<div class="col-2 self-center text-center q-pl-none">
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
color="primary"
|
||||||
|
icon="mdi-upload"
|
||||||
|
@click="upLoadFile"
|
||||||
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="col-12">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
บันทึกแจ้งผลการประกาศคัดเลือก
|
บันทึกแจ้งผลการประกาศคัดเลือก
|
||||||
|
|
@ -251,7 +430,7 @@ function copyLink(link: string) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="q-mt-xs q-gutter-md" align="right">
|
<div class="q-mt-xs q-gutter-md" align="right">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -263,6 +442,93 @@ function copyLink(link: string) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<q-dialog
|
||||||
|
v-model="modalView"
|
||||||
|
persistent
|
||||||
|
:maximized="true"
|
||||||
|
transition-show="slide-up"
|
||||||
|
transition-hide="slide-down"
|
||||||
|
>
|
||||||
|
<q-card class="bg-white">
|
||||||
|
<div class="flex justify-end items-center align-center q-mr-md q-mt-sm">
|
||||||
|
<q-btn
|
||||||
|
icon="close"
|
||||||
|
unelevated
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
style="color: #ff8080; background-color: #ffdede"
|
||||||
|
size="12px"
|
||||||
|
v-close-popup
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="q-pa-md">
|
||||||
|
<div class="row items-start items-center">
|
||||||
|
<div class="col">
|
||||||
|
<q-btn
|
||||||
|
padding="xs"
|
||||||
|
icon="mdi-chevron-left"
|
||||||
|
color="grey-2"
|
||||||
|
text-color="grey-5"
|
||||||
|
size="md"
|
||||||
|
class="my-auto"
|
||||||
|
@click="backPage"
|
||||||
|
:disable="page == 1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-auto">
|
||||||
|
<div class="q-pa-md flex">
|
||||||
|
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col text-right">
|
||||||
|
<q-btn
|
||||||
|
padding="xs"
|
||||||
|
icon="mdi-chevron-right"
|
||||||
|
color="grey-2"
|
||||||
|
text-color="grey-5"
|
||||||
|
size="md"
|
||||||
|
@click="nextPage"
|
||||||
|
:disable="page === numOfPages"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row items- items-center">
|
||||||
|
<VuePDF ref="vuePDFRef" :pdf="pdfSrc" :page="page" fit-parent />
|
||||||
|
</div>
|
||||||
|
<div class="row items- items-end">
|
||||||
|
<div class="col">
|
||||||
|
<q-btn
|
||||||
|
padding="xs"
|
||||||
|
icon="mdi-chevron-left"
|
||||||
|
color="grey-2"
|
||||||
|
text-color="grey-5"
|
||||||
|
size="md"
|
||||||
|
class="my-auto"
|
||||||
|
@click="backPage"
|
||||||
|
:disable="page == 1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-md-auto">
|
||||||
|
<div class="q-pa-md flex">
|
||||||
|
หน้าที่ {{ page }} จาก {{ numOfPages }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col text-right">
|
||||||
|
<q-btn
|
||||||
|
padding="xs"
|
||||||
|
icon="mdi-chevron-right"
|
||||||
|
color="grey-2"
|
||||||
|
text-color="grey-5"
|
||||||
|
size="md"
|
||||||
|
@click="nextPage"
|
||||||
|
:disable="page === numOfPages"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,19 @@
|
||||||
<script setup lang="ts">
|
<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 ViewPDF from "@/modules/12_evaluatePersonal/components/Detail/viewstep/viewPDF.vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
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 mixin = useCounterMixin();
|
||||||
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
||||||
const AnnouncementDate = ref<string | null>(date2Thai(new Date()));
|
const AnnouncementDate = ref<string | null>(date2Thai(new Date()));
|
||||||
|
|
@ -28,6 +37,49 @@ function onClickViewPDF(file: any) {
|
||||||
const updateInput = (value: any) => {
|
const updateInput = (value: any) => {
|
||||||
emit("update:form", value, ref);
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -36,11 +88,12 @@ const updateInput = (value: any) => {
|
||||||
<q-banner class="text-weight-bold text-red-14 bg-red-2 text-center">
|
<q-banner class="text-weight-bold text-red-14 bg-red-2 text-center">
|
||||||
<div class="text-weight-bold">
|
<div class="text-weight-bold">
|
||||||
<q-icon name="info_outline" color="red-14" size="24px" />
|
<q-icon name="info_outline" color="red-14" size="24px" />
|
||||||
ประกาศเมื่อวันที่ {{ AnnouncementDate }}
|
ประกาศเมื่อวันที่ {{ AnnouncementStartDate }} ถึงวันที่
|
||||||
|
{{ AnnouncementEndDate }}
|
||||||
</div>
|
</div>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<!-- <div class="col-6">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
<div class="text-weight-medium bg-grey-1 q-py-sm q-px-md">
|
||||||
เอกสารเล่ม 2
|
เอกสารเล่ม 2
|
||||||
|
|
@ -49,7 +102,7 @@ const updateInput = (value: any) => {
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 q-pa-sm">
|
<div class="col-12 q-pa-sm">
|
||||||
<div class="row q-col-gutter-md col-12">
|
<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
|
<q-btn
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outline
|
outline
|
||||||
|
|
@ -59,7 +112,7 @@ const updateInput = (value: any) => {
|
||||||
>
|
>
|
||||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div> -->
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
<div class="col-xs-12 col-sm-6 row">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="fileEvaluation1"
|
v-if="fileEvaluation1"
|
||||||
|
|
@ -97,7 +150,7 @@ const updateInput = (value: any) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-card bordered style="border: 1px solid #d6dee1">
|
<q-card bordered style="border: 1px solid #d6dee1">
|
||||||
|
|
@ -114,6 +167,7 @@ const updateInput = (value: any) => {
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||||
<q-input
|
<q-input
|
||||||
|
readonly
|
||||||
ref="elementaryFullNameRef"
|
ref="elementaryFullNameRef"
|
||||||
dense
|
dense
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6"
|
||||||
|
|
@ -125,6 +179,7 @@ const updateInput = (value: any) => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
|
readonly
|
||||||
ref="elementaryPositonRef"
|
ref="elementaryPositonRef"
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6"
|
||||||
dense
|
dense
|
||||||
|
|
@ -146,6 +201,7 @@ const updateInput = (value: any) => {
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
<div class="row col-12 q-col-gutter-md q-pa-sm">
|
||||||
<q-input
|
<q-input
|
||||||
|
readonly
|
||||||
ref="abovelevelFullnameRef"
|
ref="abovelevelFullnameRef"
|
||||||
dense
|
dense
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6"
|
||||||
|
|
@ -160,6 +216,7 @@ const updateInput = (value: any) => {
|
||||||
ref="abovelevelPositionRef"
|
ref="abovelevelPositionRef"
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6"
|
||||||
dense
|
dense
|
||||||
|
readonly
|
||||||
outlined
|
outlined
|
||||||
v-model="formCommand.abovelevelPosition"
|
v-model="formCommand.abovelevelPosition"
|
||||||
label="ตำแหน่ง"
|
label="ตำแหน่ง"
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,98 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref } from "vue";
|
import { reactive, ref,onMounted } from "vue";
|
||||||
|
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
import { useEvaluateDetailStore } from "@/modules/12_evaluatePersonal/store/EvaluateDetail";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import axios from "axios";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
|
|
||||||
const store = useEvaluateDetailStore();
|
const store = useEvaluateDetailStore();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin;
|
|
||||||
|
const { date2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||||
|
|
||||||
const selectedItem = ref(1);
|
const selectedItem = ref(1);
|
||||||
|
|
||||||
function handleItemClick(itemNumber: number) {
|
function handleItemClick(itemNumber: number) {
|
||||||
store.tabPanels = itemNumber.toString();
|
store.tabPanels = itemNumber.toString();
|
||||||
selectedItem.value = itemNumber;
|
selectedItem.value = itemNumber;
|
||||||
|
|
||||||
|
getFile(itemNumber);
|
||||||
}
|
}
|
||||||
|
// evaluationFilebyId
|
||||||
|
function getFile(volume: number) {
|
||||||
|
const fileText = numToThai(volume);
|
||||||
|
console.log(fileText)
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.evaluationFilebyId("เล่ม 2", id.value, fileText))
|
||||||
|
.then((res) => {
|
||||||
|
const link = res.data.downloadUrl;
|
||||||
|
const type = res.data.fileType;
|
||||||
|
console.log(link,type)
|
||||||
|
getPDF(link, type);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
// messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPDF(url: string, type: string) {
|
||||||
|
axios
|
||||||
|
.get(url, {
|
||||||
|
method: "GET",
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Accept: type, // ถ้ามีการระบุเมื่ออัปโหลด
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
store.log = 0;
|
||||||
|
console.log(res);
|
||||||
|
const blob = new Blob([res.data]);
|
||||||
|
const objectUrl = URL.createObjectURL(blob);
|
||||||
|
|
||||||
|
const pdfData = await usePDF(`${objectUrl}`);
|
||||||
|
showLoader();
|
||||||
|
setTimeout(() => {
|
||||||
|
store.log = 1;
|
||||||
|
store.pdfSrcStore = pdfData.pdf.value;
|
||||||
|
store.numOfPagesStore = pdfData.pages.value;
|
||||||
|
hideLoader();
|
||||||
|
}, 1500);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
store.log = 0;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function numToThai(val: number) {
|
||||||
|
switch (val) {
|
||||||
|
case 1:
|
||||||
|
return "1-เอกสารเล่ม 2";
|
||||||
|
default:
|
||||||
|
return "1-เอกสารเล่ม 2";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(()=>{
|
||||||
|
getFile(1)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,24 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import axios from "axios";
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
import keycloak from "@/plugins/keycloak";
|
||||||
|
|
||||||
|
import genReport from "@/plugins/genreport";
|
||||||
|
|
||||||
|
const fullName = ref<string>(
|
||||||
|
keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : ""
|
||||||
|
);
|
||||||
|
const $q = useQuasar();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin;
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
const modalConfirm = ref<boolean>(false);
|
const modalConfirm = ref<boolean>(false);
|
||||||
const modalView = ref<boolean>(false);
|
const modalView = ref<boolean>(false);
|
||||||
const pdfSrc = ref<any>();
|
const pdfSrc = ref<any>();
|
||||||
|
|
@ -9,33 +27,26 @@ const nameOfWork = ref<string>("");
|
||||||
const nameOfOwner = ref<string>("");
|
const nameOfOwner = ref<string>("");
|
||||||
const position = ref<string>("");
|
const position = ref<string>("");
|
||||||
const status = ref<string>("WAIT_CHECK_DOC_V2");
|
const status = ref<string>("WAIT_CHECK_DOC_V2");
|
||||||
const fileEvaluation91 = ref<any>();
|
const fileEvaluation81 = ref<any>();
|
||||||
const fileEvaluation92 = ref<any>();
|
const fileEvaluation82 = ref<any>();
|
||||||
const fileEvaluation93 = ref<any>();
|
const fileEvaluation83 = ref<any>();
|
||||||
const fileEvaluation94 = ref<any>();
|
const fileEvaluation84 = ref<any>();
|
||||||
const fileEvaluation95 = ref<any>();
|
const fileEvaluation85 = ref<any>();
|
||||||
const fileEvaluation96 = ref<any>();
|
const fileEvaluation86 = ref<any>();
|
||||||
|
|
||||||
async function onClickDowloadFile(
|
async function onClickDowloadFile(
|
||||||
tp: string,
|
tp: string,
|
||||||
templateName: string,
|
templateName: string,
|
||||||
fileName: string
|
fileName: string
|
||||||
) {
|
) {
|
||||||
// showLoader();
|
showLoader();
|
||||||
// const data = Object.assign(
|
|
||||||
// { fullName: fullName.value },
|
const body = {
|
||||||
// tp === "EV1_005" || tp === "EV1_007"
|
template: tp,
|
||||||
// ? { organizationName: "หน่วยงาน" }
|
reportName: templateName,
|
||||||
// : null,
|
data:{}
|
||||||
// tp === "EV1_007" ? { positionName: "ตำแหน่ง" } : null,
|
};
|
||||||
// tp === "EV1_007" ? { positionLeaveName: "ระดับ" } : null
|
await genReport(body, fileName);
|
||||||
// );
|
|
||||||
// const body = {
|
|
||||||
// template: tp,
|
|
||||||
// reportName: templateName,
|
|
||||||
// data: data,
|
|
||||||
// };
|
|
||||||
// await genReport(body, fileName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClickViewPDF(file: any) {
|
function onClickViewPDF(file: any) {
|
||||||
|
|
@ -46,6 +57,113 @@ function onClickViewPDF(file: any) {
|
||||||
function openConfirmEvalution() {
|
function openConfirmEvalution() {
|
||||||
modalConfirm.value = true;
|
modalConfirm.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function upLoadFile(name: string, file: any) {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.post(config.API.evaluationFileListbyId("เล่ม 2", id.value), {
|
||||||
|
fileList: {
|
||||||
|
fileName: name,
|
||||||
|
metadata: {
|
||||||
|
tag: "value",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
const foundKey: any = Object.keys(res.data).find(
|
||||||
|
(key) =>
|
||||||
|
res.data[key]?.fileName !== undefined &&
|
||||||
|
res.data[key]?.fileName !== ""
|
||||||
|
);
|
||||||
|
const link = res.data[foundKey]?.uploadUrl;
|
||||||
|
fileUpLoad(link, file);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function fileUpLoad(url: string, file: any) {
|
||||||
|
axios
|
||||||
|
.put(url, file, {
|
||||||
|
headers: { "Content-Type": file?.type },
|
||||||
|
onUploadProgress: (e) => console.log(e),
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
fileEvaluation81.value = null;
|
||||||
|
fileEvaluation82.value = null;
|
||||||
|
fileEvaluation83.value = null;
|
||||||
|
fileEvaluation84.value = null;
|
||||||
|
fileEvaluation85.value = null;
|
||||||
|
fileEvaluation86.value = null;
|
||||||
|
success($q, "อัปโหลดไฟล์สำเร็จ");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function downloadFile() {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.evaluationFilebyId("เล่ม 2", id.value, '2-เอกสารเล่ม 2 (ฉบับแก้ไข)'))
|
||||||
|
.then((res) => {
|
||||||
|
const link = res.data.downloadUrl;
|
||||||
|
const type = res.data.fileType;
|
||||||
|
const fileName = res.data.fileName;
|
||||||
|
getPDF(link, type, fileName);
|
||||||
|
})
|
||||||
|
.catch((e) => {})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPDF(url: string, type: string, fileName: string) {
|
||||||
|
axios
|
||||||
|
.get(url, {
|
||||||
|
method: "GET",
|
||||||
|
responseType: "blob",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Accept: type, // ถ้ามีการระบุเมื่ออัปโหลด
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then(async (res) => {
|
||||||
|
console.log(res);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = window.URL.createObjectURL(res.data);
|
||||||
|
a.download = fileName;
|
||||||
|
// a.download = res.data.fileName + `.${mime.getExtension(res.data.fileType)}`
|
||||||
|
a.click();
|
||||||
|
})
|
||||||
|
.catch((e) => {})
|
||||||
|
.finally(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
function confirmApprove(){
|
||||||
|
const data = {
|
||||||
|
metadata: {
|
||||||
|
additionalProp1: nameOfWork.value,
|
||||||
|
additionalProp2: nameOfOwner.value,
|
||||||
|
additionalProp3: position.value,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
showLoader()
|
||||||
|
http
|
||||||
|
.patch(config.API.evaluationPatchData('เล่ม 2',id.value,'2-เอกสารเล่ม 2 (ฉบับแก้ไข)'),data)
|
||||||
|
.then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
}).catch((e)=>{
|
||||||
|
messageError($q,e)
|
||||||
|
}).finally(()=>{
|
||||||
|
modalConfirm.value = false
|
||||||
|
hideLoader()
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -78,9 +196,9 @@ function openConfirmEvalution() {
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="
|
@click="
|
||||||
onClickDowloadFile(
|
onClickDowloadFile(
|
||||||
'EV1_005',
|
'เอกสารแบบ ค',
|
||||||
'template-1',
|
'template-4',
|
||||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
'เอกสารแบบ ค'
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -89,20 +207,20 @@ function openConfirmEvalution() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
<div class="col-xs-12 col-sm-6 row">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="fileEvaluation91"
|
v-if="fileEvaluation81"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outline
|
outline
|
||||||
icon="visibility"
|
icon="visibility"
|
||||||
label="ดูไฟล์เอกสาร"
|
label="ดูไฟล์เอกสาร"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="onClickViewPDF(fileEvaluation91)"
|
@click="onClickViewPDF(fileEvaluation81)"
|
||||||
>
|
>
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
v-model="fileEvaluation91"
|
v-model="fileEvaluation81"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -110,6 +228,7 @@ function openConfirmEvalution() {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
label="อัปโหลดไฟล์"
|
label="อัปโหลดไฟล์"
|
||||||
accept=".pdf"
|
accept=".pdf"
|
||||||
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="attach_file" />
|
<q-icon name="attach_file" />
|
||||||
|
|
@ -123,6 +242,12 @@ function openConfirmEvalution() {
|
||||||
dense
|
dense
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-upload"
|
icon="mdi-upload"
|
||||||
|
@click="
|
||||||
|
upLoadFile(
|
||||||
|
'แบบตรวจสอบความถูกต้องครบถ้วนของข้อมูลประกอบการประเมินผลงาน (เอกสารแบบ ค)',
|
||||||
|
fileEvaluation81
|
||||||
|
)
|
||||||
|
"
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -149,9 +274,9 @@ function openConfirmEvalution() {
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="
|
@click="
|
||||||
onClickDowloadFile(
|
onClickDowloadFile(
|
||||||
'EV1_005',
|
'เอกสารหมายเลข 15',
|
||||||
'template-1',
|
'template-4',
|
||||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
'เอกสารหมายเลข 15'
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -160,20 +285,20 @@ function openConfirmEvalution() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
<div class="col-xs-12 col-sm-6 row">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="fileEvaluation92"
|
v-if="fileEvaluation82"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outline
|
outline
|
||||||
icon="visibility"
|
icon="visibility"
|
||||||
label="ดูไฟล์เอกสาร"
|
label="ดูไฟล์เอกสาร"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="onClickViewPDF(fileEvaluation92)"
|
@click="onClickViewPDF(fileEvaluation82)"
|
||||||
>
|
>
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
v-model="fileEvaluation92"
|
v-model="fileEvaluation82"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -181,6 +306,7 @@ function openConfirmEvalution() {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
label="อัปโหลดไฟล์"
|
label="อัปโหลดไฟล์"
|
||||||
accept=".pdf"
|
accept=".pdf"
|
||||||
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="attach_file" />
|
<q-icon name="attach_file" />
|
||||||
|
|
@ -194,6 +320,12 @@ function openConfirmEvalution() {
|
||||||
dense
|
dense
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-upload"
|
icon="mdi-upload"
|
||||||
|
@click="
|
||||||
|
upLoadFile(
|
||||||
|
'บัญชีแสดงการรับ-ส่งผลงาน (เอกสารหมายเลข 15)',
|
||||||
|
fileEvaluation82
|
||||||
|
)
|
||||||
|
"
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -220,9 +352,9 @@ function openConfirmEvalution() {
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="
|
@click="
|
||||||
onClickDowloadFile(
|
onClickDowloadFile(
|
||||||
'EV1_005',
|
'เอกสารหมายเลข 16',
|
||||||
'template-1',
|
'template-4',
|
||||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
'เอกสารหมายเลข 16'
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -231,20 +363,20 @@ function openConfirmEvalution() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
<div class="col-xs-12 col-sm-6 row">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="fileEvaluation93"
|
v-if="fileEvaluation83"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outline
|
outline
|
||||||
icon="visibility"
|
icon="visibility"
|
||||||
label="ดูไฟล์เอกสาร"
|
label="ดูไฟล์เอกสาร"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="onClickViewPDF(fileEvaluation93)"
|
@click="onClickViewPDF(fileEvaluation83)"
|
||||||
>
|
>
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
v-model="fileEvaluation93"
|
v-model="fileEvaluation83"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -265,6 +397,12 @@ function openConfirmEvalution() {
|
||||||
dense
|
dense
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-upload"
|
icon="mdi-upload"
|
||||||
|
@click="
|
||||||
|
upLoadFile(
|
||||||
|
'แบบประเมินผลงาน (เอกสารหมายเลข 16)',
|
||||||
|
fileEvaluation83
|
||||||
|
)
|
||||||
|
"
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -291,9 +429,9 @@ function openConfirmEvalution() {
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="
|
@click="
|
||||||
onClickDowloadFile(
|
onClickDowloadFile(
|
||||||
'EV1_005',
|
'เอกสารหมายเลข 17',
|
||||||
'template-1',
|
'template-4',
|
||||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
'เอกสารหมายเลข 17'
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -302,20 +440,20 @@ function openConfirmEvalution() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
<div class="col-xs-12 col-sm-6 row">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="fileEvaluation94"
|
v-if="fileEvaluation84"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outline
|
outline
|
||||||
icon="visibility"
|
icon="visibility"
|
||||||
label="ดูไฟล์เอกสาร"
|
label="ดูไฟล์เอกสาร"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="onClickViewPDF(fileEvaluation94)"
|
@click="onClickViewPDF(fileEvaluation84)"
|
||||||
>
|
>
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
v-model="fileEvaluation94"
|
v-model="fileEvaluation84"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -336,6 +474,12 @@ function openConfirmEvalution() {
|
||||||
dense
|
dense
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-upload"
|
icon="mdi-upload"
|
||||||
|
@click="
|
||||||
|
upLoadFile(
|
||||||
|
'แบบแสดงการประเมินผลงาน (เอกสารหมายเลข 17)',
|
||||||
|
fileEvaluation84
|
||||||
|
)
|
||||||
|
"
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -362,9 +506,9 @@ function openConfirmEvalution() {
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="
|
@click="
|
||||||
onClickDowloadFile(
|
onClickDowloadFile(
|
||||||
'EV1_005',
|
'เอกสารหมายเลข 18',
|
||||||
'template-1',
|
'template-4',
|
||||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
'เอกสารหมายเลข 18'
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -373,20 +517,20 @@ function openConfirmEvalution() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
<div class="col-xs-12 col-sm-6 row">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="fileEvaluation95"
|
v-if="fileEvaluation85"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outline
|
outline
|
||||||
icon="visibility"
|
icon="visibility"
|
||||||
label="ดูไฟล์เอกสาร"
|
label="ดูไฟล์เอกสาร"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="onClickViewPDF(fileEvaluation95)"
|
@click="onClickViewPDF(fileEvaluation85)"
|
||||||
>
|
>
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
v-model="fileEvaluation95"
|
v-model="fileEvaluation85"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -407,6 +551,12 @@ function openConfirmEvalution() {
|
||||||
dense
|
dense
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-upload"
|
icon="mdi-upload"
|
||||||
|
@click="
|
||||||
|
upLoadFile(
|
||||||
|
'แบบรายงานผลการประเมินบุคคล (เอกสารหมายเลข 18)',
|
||||||
|
fileEvaluation85
|
||||||
|
)
|
||||||
|
"
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -433,9 +583,9 @@ function openConfirmEvalution() {
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="
|
@click="
|
||||||
onClickDowloadFile(
|
onClickDowloadFile(
|
||||||
'EV1_005',
|
'เอกสารแบบ ง',
|
||||||
'template-1',
|
'template-4',
|
||||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
'เอกสารแบบ ง'
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -444,20 +594,20 @@ function openConfirmEvalution() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6 row">
|
<div class="col-xs-12 col-sm-6 row">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="fileEvaluation96"
|
v-if="fileEvaluation86"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outline
|
outline
|
||||||
icon="visibility"
|
icon="visibility"
|
||||||
label="ดูไฟล์เอกสาร"
|
label="ดูไฟล์เอกสาร"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="onClickViewPDF(fileEvaluation96)"
|
@click="onClickViewPDF(fileEvaluation86)"
|
||||||
>
|
>
|
||||||
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
<q-tooltip> ดูไฟล์เอกสาร </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-10 row">
|
<div class="col-xs-12 col-sm-10 row">
|
||||||
<q-file
|
<q-file
|
||||||
v-model="fileEvaluation96"
|
v-model="fileEvaluation86"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
|
|
@ -478,6 +628,12 @@ function openConfirmEvalution() {
|
||||||
dense
|
dense
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="mdi-upload"
|
icon="mdi-upload"
|
||||||
|
@click="
|
||||||
|
upLoadFile(
|
||||||
|
'แบบสรุปผลการประเมิน (เอกสารแบบ ง)',
|
||||||
|
fileEvaluation86
|
||||||
|
)
|
||||||
|
"
|
||||||
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
><q-tooltip>อัปโหลดไฟล์</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -506,13 +662,7 @@ function openConfirmEvalution() {
|
||||||
icon="download"
|
icon="download"
|
||||||
label="ดาวน์โหลด"
|
label="ดาวน์โหลด"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="
|
@click="downloadFile"
|
||||||
onClickDowloadFile(
|
|
||||||
'EV1_005',
|
|
||||||
'template-1',
|
|
||||||
'แบบพิจารณาคุณสมบัติบุคคล'
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
<q-tooltip> ดาวน์โหลดต้นแบบ </q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
|
@ -591,6 +741,7 @@ function openConfirmEvalution() {
|
||||||
id="onSubmit"
|
id="onSubmit"
|
||||||
class="q-px-md q-py-xs"
|
class="q-px-md q-py-xs"
|
||||||
label="ยืนยัน"
|
label="ยืนยัน"
|
||||||
|
@click="confirmApprove"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,42 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { success } = mixin;
|
||||||
|
const route = useRoute();
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
const status = ref<string>("DONE");
|
const status = ref<string>("DONE");
|
||||||
|
const link = ref<string>('https://bma-ehr-publish.frappet.synology.me')
|
||||||
|
|
||||||
|
function copyLink(){
|
||||||
|
const linkById = `${link.value}/${id.value}`
|
||||||
|
navigator.clipboard.writeText(linkById);
|
||||||
|
success($q,'คัดลอกสำเร็จ')
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 text-center">
|
<div class="col-12 text-center">
|
||||||
|
<div>
|
||||||
|
<p class="text-weight-bold" style="font-size: 18px;">Public URL</p>
|
||||||
|
<a :href="link" target="_blank">{{ link }}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
|
class="q-mt-md"
|
||||||
outline
|
outline
|
||||||
color="green"
|
icon="mdi-clipboard-outline"
|
||||||
label="คัดลอก URL"
|
label="คัดลอกลิ้งค์"
|
||||||
class="q-pa-sm"
|
color="primary"
|
||||||
style="font-size: 16px"
|
@click="copyLink"
|
||||||
/>
|
>
|
||||||
|
<q-tooltip> คัดลอกลิ้งค์ </q-tooltip></q-btn
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref, onMounted, defineProps, watch } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
@ -15,11 +15,20 @@ import DialogDirector from "@/modules/12_evaluatePersonal/components/Detail/view
|
||||||
|
|
||||||
/** import store*/
|
/** import store*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const id = ref<string>(route.params.id as string);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const { showLoader, hideLoader, messageError } = mixin;
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { showLoader, hideLoader, messageError, dialogConfirm } = mixin;
|
||||||
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -49,15 +58,6 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "duty",
|
|
||||||
align: "left",
|
|
||||||
label: "หน้าที่",
|
|
||||||
sortable: true,
|
|
||||||
field: "duty",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "email",
|
name: "email",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -144,9 +144,82 @@ async function updatePaging(rpp: number, p: number) {
|
||||||
*/
|
*/
|
||||||
function returnDirector(data: any) {
|
function returnDirector(data: any) {
|
||||||
const dataList = data.map((item: any) => item.id);
|
const dataList = data.map((item: any) => item.id);
|
||||||
rows.value = data;
|
console.log(dataList);
|
||||||
onClickClose();
|
|
||||||
|
dialogConfirm($q, () => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.evaluationChooseDirectors(id.value), {
|
||||||
|
directors: dataList,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
onClickClose();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getList() {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.evaluateDirectorMain())
|
||||||
|
.then((res) => {
|
||||||
|
// maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
|
const data = res.data.result;
|
||||||
|
|
||||||
|
listDirector.value = data.map((item: any) => ({
|
||||||
|
id: item.id,
|
||||||
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
|
createdAt: item.createdAt,
|
||||||
|
createdUserId: item.createdUserId,
|
||||||
|
lastUpdatedAt: item.lastUpdatedAt,
|
||||||
|
lastUpdateUserId: item.lastUpdateUserId,
|
||||||
|
createdFullName: item.createdFullName,
|
||||||
|
lastUpdateFullName: item.lastUpdateFullName,
|
||||||
|
prefix: item.prefix,
|
||||||
|
firstName: item.firstName,
|
||||||
|
lastName: item.lastName,
|
||||||
|
phone: item.phone,
|
||||||
|
email: item.email,
|
||||||
|
position: item.position,
|
||||||
|
}));
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.data,
|
||||||
|
() => {
|
||||||
|
if (props.data) {
|
||||||
|
rows.value = props.data.map((item: any) => ({
|
||||||
|
id:item.id,
|
||||||
|
name:`${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
|
prefix:item.prefix,
|
||||||
|
firstName:item.firstName,
|
||||||
|
lastName:item.lastName,
|
||||||
|
position:item.position,
|
||||||
|
positionName:item.positionName,
|
||||||
|
email:item.email,
|
||||||
|
phone:item.phone,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref, onMounted, watch, defineProps } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
import { useQuasar } from "quasar";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
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 mixin = useCounterMixin();
|
||||||
|
const $q = useQuasar();
|
||||||
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { showLoader, hideLoader, messageError, dialogConfirm, date2Thai } =
|
||||||
|
mixin;
|
||||||
import DialogMeet from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/DialogMeet.vue";
|
import DialogMeet from "@/modules/12_evaluatePersonal/components/Detail/viewTab2/DialogMeet.vue";
|
||||||
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
|
@ -17,22 +35,22 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateMeeting",
|
name: "date",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันเวลาในการประชุม",
|
label: "วันเวลาในการประชุม",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "dateMeeting",
|
field: "date",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "results",
|
name: "result",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ผลการพิจารณาของคณะกรรมการประเมินผลงานแต่ละคณะ",
|
label: "ผลการพิจารณาของคณะกรรมการประเมินผลงานแต่ละคณะ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "results",
|
field: "result",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
@ -86,9 +104,89 @@ async function updatePaging(rpp: number, p: number) {
|
||||||
*/
|
*/
|
||||||
function returnData(data: any) {
|
function returnData(data: any) {
|
||||||
const dataList = data.map((item: any) => item.id);
|
const dataList = data.map((item: any) => item.id);
|
||||||
rows.value = data;
|
dialogConfirm($q, () => {
|
||||||
onClickClose();
|
showLoader();
|
||||||
|
http
|
||||||
|
.put(config.API.evaluationChooseMeeting(id.value), {
|
||||||
|
meetings: dataList,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
onClickClose();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getList() {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(
|
||||||
|
config.API
|
||||||
|
.meeting
|
||||||
|
// currentPage.value,
|
||||||
|
// rowsPerPage.value,
|
||||||
|
// filterKeyword.value
|
||||||
|
()
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
|
// maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
|
||||||
|
const data = res.data.result;
|
||||||
|
listMeet.value = data.map((item: any) => ({
|
||||||
|
id: item.id,
|
||||||
|
createdAt: item.createdAt,
|
||||||
|
createdUserId: item.createdUserId,
|
||||||
|
lastUpdatedAt: item.lastUpdatedAt,
|
||||||
|
lastUpdateUserId: item.lastUpdateUserId,
|
||||||
|
createdFullName: item.createdFullName,
|
||||||
|
lastUpdateFullName: item.lastUpdateFullName,
|
||||||
|
title: item.tittle,
|
||||||
|
round: item.round,
|
||||||
|
date: `${date2Thai(item.dateStart as Date, false, true)} - ${date2Thai(
|
||||||
|
item.dateEnd as Date,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
)}`,
|
||||||
|
result: item.result,
|
||||||
|
timePeriod: item.duration,
|
||||||
|
}));
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.data,
|
||||||
|
() => {
|
||||||
|
if (props.data) {
|
||||||
|
console.log(props.data)
|
||||||
|
rows.value = props.data.map((item: any) => ({
|
||||||
|
id: item.id,
|
||||||
|
date: `${date2Thai(item.dateStart as Date, false, true)} - ${date2Thai(
|
||||||
|
item.dateEnd as Date,
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
)}`,
|
||||||
|
dateStart: item.dateStart,
|
||||||
|
dateEnd: item.dateEnd,
|
||||||
|
result: item.result,
|
||||||
|
timePeriod: item.duration,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
<q-card bordered class="row col-12" style="border: 1px solid #d6dee1">
|
||||||
|
|
|
||||||
|
|
@ -15,15 +15,13 @@ const currentPage = ref<number>(1);
|
||||||
/** ค้นหาคอลัม */
|
/** ค้นหาคอลัม */
|
||||||
const visibleColumns2 = ref<string[]>([
|
const visibleColumns2 = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"dateMeeting",
|
"name",
|
||||||
"results",
|
"position",
|
||||||
"timePeriod",
|
|
||||||
"email",
|
"email",
|
||||||
"phone",
|
"phone",
|
||||||
"role",
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/**ข้อมูลหัว ตาราง*/
|
// หัวตาราง
|
||||||
const columns2 = ref<QTableProps["columns"]>([
|
const columns2 = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -33,42 +31,42 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
field: "no",
|
field: "no",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateMeeting",
|
name: "name",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันเวลาในการประชุม",
|
label: "ชื่อ-นามสกุล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "dateMeeting",
|
field: "name",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "results",
|
name: "position",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ผลการพิจารณาของคณะกรรมการประเมินผลงานแต่ละคณะ",
|
label: "ตำแหน่ง",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "results",
|
field: "position",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "timePeriod",
|
name: "email",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ระยะเวลาในการแก้ไขผลงาน",
|
label: "อีเมล",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "timePeriod",
|
field: "email",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "phone",
|
||||||
|
align: "left",
|
||||||
|
label: "เบอร์โทรศัพท์",
|
||||||
|
sortable: true,
|
||||||
|
field: "phone",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,22 +37,22 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dateMeeting",
|
name: "date",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "วันเวลาในการประชุม",
|
label: "วันเวลาในการประชุม",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "dateMeeting",
|
field: "date",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "results",
|
name: "result",
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "ผลการพิจารณาของคณะกรรมการประเมินผลงานแต่ละคณะ",
|
label: "ผลการพิจารณาของคณะกรรมการประเมินผลงานแต่ละคณะ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "results",
|
field: "result",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
sort: (a: string, b: string) =>
|
sort: (a: string, b: string) =>
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,6 @@ watch(()=>store.log, () => {
|
||||||
if(store.log === 1){
|
if(store.log === 1){
|
||||||
numOfPages.value = store.numOfPagesStore;
|
numOfPages.value = store.numOfPagesStore;
|
||||||
pdfSrc.value = store.pdfSrcStore;
|
pdfSrc.value = store.pdfSrcStore;
|
||||||
console.log('1',pdfSrc.value)
|
|
||||||
console.log('2',numOfPages.value)
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue