fix:สรรหา แข่งขัน
This commit is contained in:
parent
d5912a0dc9
commit
e49a301273
7 changed files with 253 additions and 99 deletions
BIN
public/File/บัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ).xlsx
Normal file
BIN
public/File/บัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ).xlsx
Normal file
Binary file not shown.
BIN
public/File/ผลการสอบแข่งขันฯ (บัญชีรายชื่อ).xlsx
Normal file
BIN
public/File/ผลการสอบแข่งขันฯ (บัญชีรายชื่อ).xlsx
Normal file
Binary file not shown.
|
|
@ -21,6 +21,7 @@ export default {
|
|||
editPeriod: (id: string) => `${recruit}period/${id}`,
|
||||
getPeriodById: (id: string) => `${recruit}period/${id}`,
|
||||
uploadCandidates: (id: string) => `${recruit}candidate/${id}`,
|
||||
uploadResult: (id: string) => `${recruit}result/${id}`,
|
||||
getImportHistory: (id: string) => `${recruit}history/${id}`,
|
||||
|
||||
//upload
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ const visibleColumns = ref<String[]>([
|
|||
"examID",
|
||||
"profileID",
|
||||
"fullName",
|
||||
"hddPosition",
|
||||
"dateOfBirth",
|
||||
"gender",
|
||||
"position_name",
|
||||
|
|
@ -88,6 +89,15 @@ const columns = ref<QTableProps["columns"]>([
|
|||
headerStyle: "font-size: 14px; min-width: 250px",
|
||||
style: "font-size: 14px; ",
|
||||
},
|
||||
{
|
||||
name: "hddPosition",
|
||||
align: "left",
|
||||
label: "บัญชีสอบ",
|
||||
sortable: true,
|
||||
field: "hddPosition",
|
||||
headerStyle: "font-size: 14px; min-width: 250px",
|
||||
style: "font-size: 14px; ",
|
||||
},
|
||||
{
|
||||
name: "dateOfBirth",
|
||||
align: "left",
|
||||
|
|
|
|||
|
|
@ -42,9 +42,11 @@ const order = ref<number>(1);
|
|||
const files = ref<any>(null);
|
||||
const files_score = ref<any>(null);
|
||||
const files_candidate = ref<any>(null);
|
||||
const files_result = ref<any>(null);
|
||||
const modalAdd = ref<boolean>(false);
|
||||
const modalScore = ref<boolean>(false);
|
||||
const modalCandidate = ref<boolean>(false);
|
||||
const modalResult = ref<boolean>(false);
|
||||
const selected_row_id = ref<string>("");
|
||||
const rowsHistory = ref<ResponseHistoryObject[]>([]); //select data history
|
||||
const tittleHistory = ref<string>("ประวัติการนำเข้าข้อมูล"); //
|
||||
|
|
@ -58,6 +60,7 @@ const filter = ref<string>(""); //search data table
|
|||
const textTittle = ref<string>("");
|
||||
const textTittleScore = ref<string>("");
|
||||
const textTittleCandidate = ref<string>("");
|
||||
const textTittleResult = ref<string>("");
|
||||
const rows = ref<ResponseRecruitPeriod[]>([]);
|
||||
const rowsData = ref<ResponseRecruitPeriod[]>([]);
|
||||
const initialPagination = ref<Pagination>({
|
||||
|
|
@ -71,6 +74,7 @@ const visibleColumns = ref<String[]>([
|
|||
"year",
|
||||
"examCount",
|
||||
"scoreCount",
|
||||
"result",
|
||||
]);
|
||||
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
|
|
@ -113,7 +117,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
{
|
||||
name: "examCount",
|
||||
label: "จำนวนผู้สอบทั้งหมด",
|
||||
label: "ข้อมูลผู้สมัครสอบ",
|
||||
align: "right",
|
||||
field: "examCount",
|
||||
sortable: true,
|
||||
|
|
@ -122,13 +126,22 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
{
|
||||
name: "scoreCount",
|
||||
label: "จำนวนที่บันทึกผลสอบ",
|
||||
label: "บัญชีรวมคะแนน",
|
||||
align: "right",
|
||||
field: "scoreCount",
|
||||
sortable: true,
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "result",
|
||||
label: "ผลการสอบ",
|
||||
align: "right",
|
||||
field: "result",
|
||||
sortable: true,
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
const columnsHistory = ref<QTableProps["columns"]>([
|
||||
|
|
@ -257,13 +270,23 @@ function clickDetail(id: string) {
|
|||
router.push(`/compete/import/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* นำเข้าไฟล์ผู้สมัครสอบอีกครั้ง
|
||||
* @param id รอบสอบเเข่งขัน
|
||||
*/
|
||||
async function clickUpload(id: string) {
|
||||
modalCandidate.value = true;
|
||||
textTittleCandidate.value = "นำเข้าผู้สมัครสอบแข่งขัน";
|
||||
selected_row_id.value = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* นำเข้าไฟล์ผลคะแนนสอบอีกครั้ง
|
||||
* @param id รอบสอบเเข่งขัน
|
||||
*/
|
||||
async function clickEdit(id: string) {
|
||||
modalScore.value = true;
|
||||
textTittleScore.value = "นำเข้าผลคะแนนสอบแข่งขัน";
|
||||
textTittleScore.value = "นำเข้าบัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ)";
|
||||
selected_row_id.value = id;
|
||||
}
|
||||
|
||||
|
|
@ -271,9 +294,9 @@ async function clickEdit(id: string) {
|
|||
* นำเข้าไฟล์ผู้สมัครสอบอีกครั้ง
|
||||
* @param id รอบสอบเเข่งขัน
|
||||
*/
|
||||
async function clickUpload(id: string) {
|
||||
modalCandidate.value = true;
|
||||
textTittleCandidate.value = "นำเข้าผู้สมัครสอบแข่งขัน";
|
||||
async function clickResult(id: string) {
|
||||
modalResult.value = true;
|
||||
textTittleResult.value = "นำเข้าไฟล์ผลการสอบแข่งขันฯ (บัญชีรายชื่อ)";
|
||||
selected_row_id.value = id;
|
||||
}
|
||||
|
||||
|
|
@ -366,6 +389,11 @@ async function clickCloseCandidate() {
|
|||
modalCandidate.value = false;
|
||||
files_candidate.value = null;
|
||||
}
|
||||
/** ปิด dialog เลือกไฟล์ผลการสอบแข่งขันฯ */
|
||||
async function clickCloseResult() {
|
||||
modalResult.value = false;
|
||||
files_result.value = null;
|
||||
}
|
||||
|
||||
/** บันทึกข้อมูล เลือกไฟล์ผู้สมัครสอบแข่งขัน */
|
||||
async function checkSaveCandidate() {
|
||||
|
|
@ -411,6 +439,28 @@ async function checkSaveScore() {
|
|||
});
|
||||
}
|
||||
|
||||
/** บันทึกข้อมูล เลือกไฟล์ผลการสอบแข่งขันฯ */
|
||||
async function checkSaveResult() {
|
||||
const fd = new FormData();
|
||||
fd.append("attachment", files_result.value[0]);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.uploadResult(selected_row_id.value), fd)
|
||||
.then((res) => {
|
||||
success($q, "นำเข้าข้อมูลผลการสอบแข่งขันฯ (บัญชีรายชื่อ)");
|
||||
modalResult.value = false;
|
||||
files_result.value = null;
|
||||
selected_row_id.value = "";
|
||||
fetchData();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** save data */
|
||||
async function checkSave() {
|
||||
const fd = new FormData();
|
||||
|
|
@ -539,7 +589,9 @@ onMounted(async () => {
|
|||
name="mdi-history"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>แสดงประวัติการทำงาน</q-item-section>
|
||||
<q-item-section
|
||||
>แสดงประวัติการนำเข้าข้อมูล</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
|
|
@ -555,52 +607,6 @@ onMounted(async () => {
|
|||
<div v-else-if="col.name == 'year'" class="table_ellipsis2">
|
||||
{{ col.value + 543 }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'scoreCount'" class="table_ellipsis2">
|
||||
<q-btn
|
||||
:disable="props.row.examCount == 0"
|
||||
flat
|
||||
dense
|
||||
size="12px"
|
||||
round
|
||||
color="green"
|
||||
@click.stop.prevent="clickEdit(props.row.id)"
|
||||
v-if="
|
||||
col.value == null && checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
>
|
||||
<q-icon name="mdi-file-excel-outline" size="20px" />
|
||||
<!-- นำเข้าไฟล์ผลคะแนนสอบ -->
|
||||
<q-tooltip>นำเข้าไฟล์ผลคะแนนสอบ</q-tooltip>
|
||||
</q-btn>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="green"
|
||||
@click.stop.prevent="clickEdit(props.row.id)"
|
||||
icon="mdi-file-excel-outline"
|
||||
>
|
||||
<q-tooltip>นำเข้าไฟล์ผลคะแนนสอบอีกครั้ง</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="indigo"
|
||||
@click.stop.prevent="clickPassExam(props.row.id)"
|
||||
icon="mdi-clipboard-arrow-down"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดรายชื่อผู้สอบแข่งขันได้</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'examCount'" class="table_ellipsis2">
|
||||
<q-btn
|
||||
flat
|
||||
|
|
@ -647,6 +653,99 @@ onMounted(async () => {
|
|||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.name == 'scoreCount'" class="table_ellipsis2">
|
||||
<q-btn
|
||||
:disable="props.row.examCount == 0"
|
||||
flat
|
||||
dense
|
||||
size="12px"
|
||||
round
|
||||
color="green"
|
||||
@click.stop.prevent="clickEdit(props.row.id)"
|
||||
v-if="
|
||||
col.value == null && checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
>
|
||||
<q-icon name="mdi-file-excel-outline" size="20px" />
|
||||
<!-- นำเข้าไฟล์ผลคะแนนสอบ -->
|
||||
<q-tooltip
|
||||
>นำเข้าไฟล์บัญชีรวมคะแนนทั้งหมด
|
||||
(เรียงตามเลขประจำตัวสอบ)</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
<div v-else>
|
||||
{{ props.row.score.scoreCount }}
|
||||
<q-btn
|
||||
:disable="props.row.examCount == 0"
|
||||
flat
|
||||
dense
|
||||
size="12px"
|
||||
round
|
||||
color="green"
|
||||
@click.stop.prevent="clickEdit(props.row.id)"
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
>
|
||||
<q-icon name="mdi-file-excel-outline" size="20px" />
|
||||
<!-- นำเข้าไฟล์ผลคะแนนสอบ -->
|
||||
<q-tooltip
|
||||
>นำเข้าไฟล์บัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ)
|
||||
อีกครั้ง</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="col.name == 'result'" class="table_ellipsis2">
|
||||
<q-btn
|
||||
:disable="props.row.score == null"
|
||||
flat
|
||||
dense
|
||||
size="12px"
|
||||
color="green"
|
||||
round
|
||||
@click.stop.prevent="clickResult(props.row.id)"
|
||||
v-if="
|
||||
props.row.score == null &&
|
||||
checkPermission($route)?.attrIsUpdate
|
||||
"
|
||||
>
|
||||
<q-icon name="mdi-file-excel-outline" size="20px" />
|
||||
<q-tooltip
|
||||
>นำเข้าไฟล์ผลการสอบแข่งขันฯ (บัญชีรายชื่อ)</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
<div v-else>
|
||||
{{ props.row.score.resultCount }}
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="green"
|
||||
@click.stop.prevent="clickResult(props.row.id)"
|
||||
icon="mdi-file-excel-outline"
|
||||
>
|
||||
<q-tooltip
|
||||
>นำเข้าไฟล์ผลการสอบแข่งขันฯ (บัญชีรายชื่อ)
|
||||
อีกครั้ง</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="indigo"
|
||||
@click.stop.prevent="clickPassExam(props.row.id)"
|
||||
icon="mdi-clipboard-arrow-down"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดรายชื่อผู้สอบแข่งขันได้</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
|
|
@ -768,57 +867,13 @@ onMounted(async () => {
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="modalScore" persistent>
|
||||
<q-card style="width: 600px">
|
||||
<q-form ref="myFormScore">
|
||||
<DialogHeadTemplate
|
||||
:title="textTittleScore"
|
||||
:close="clickCloseScore"
|
||||
title-type="สรรหาสอบแข่งขัน_จำนวนที่บันทึกผลสอบ"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="col-12 row items-center q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<q-file
|
||||
v-model="files_score"
|
||||
dense
|
||||
label="เลือกไฟล์ผลคะแนนสอบแข่งขัน"
|
||||
outlined
|
||||
use-chips
|
||||
multiple
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions class="text-primary q-py-sm">
|
||||
<q-space />
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="public"
|
||||
@click="checkSaveScore"
|
||||
icon="mdi-content-save-outline"
|
||||
>
|
||||
<q-tooltip>บันทึก</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="modalCandidate" persistent>
|
||||
<q-card style="width: 600px">
|
||||
<q-form ref="myFormScore">
|
||||
<DialogHeadTemplate
|
||||
:title="textTittleCandidate"
|
||||
:close="clickCloseCandidate"
|
||||
title-type="สรรหาสอบแข่งขัน_จำนวนผู้สอบทั้งหมด"
|
||||
title-type="ข้อมูลผู้สมัครสอบ"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
|
|
@ -855,6 +910,94 @@ onMounted(async () => {
|
|||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="modalScore" persistent>
|
||||
<q-card style="width: 600px">
|
||||
<q-form ref="myFormScore">
|
||||
<DialogHeadTemplate
|
||||
:title="textTittleScore"
|
||||
:close="clickCloseScore"
|
||||
title-type="บัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ)"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="col-12 row items-center q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<q-file
|
||||
v-model="files_score"
|
||||
dense
|
||||
label="เลือกไฟล์บัญชีรวมคะแนนทั้งหมด (เรียงตามเลขประจำตัวสอบ)"
|
||||
outlined
|
||||
use-chips
|
||||
multiple
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions class="text-primary q-py-sm">
|
||||
<q-space />
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="public"
|
||||
@click="checkSaveScore"
|
||||
icon="mdi-content-save-outline"
|
||||
>
|
||||
<q-tooltip>บันทึก</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="modalResult" persistent>
|
||||
<q-card style="width: 600px">
|
||||
<q-form ref="myFormScore">
|
||||
<DialogHeadTemplate
|
||||
:title="textTittleResult"
|
||||
:close="clickCloseResult"
|
||||
title-type="ผลการสอบแข่งขันฯ (บัญชีรายชื่อ)"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="col-12 row items-center q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<q-file
|
||||
v-model="files_result"
|
||||
dense
|
||||
label="เลือกไฟล์ผลการสอบแข่งขันฯ (บัญชีรายชื่อ)"
|
||||
outlined
|
||||
use-chips
|
||||
multiple
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
</template>
|
||||
</q-file>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions class="text-primary q-py-sm">
|
||||
<q-space />
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="public"
|
||||
@click="checkSaveResult"
|
||||
icon="mdi-content-save-outline"
|
||||
>
|
||||
<q-tooltip>บันทึก</q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style></style>
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ onMounted(async () => {
|
|||
name="mdi-history"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>แสดงประวัติการทำงาน</q-item-section>
|
||||
<q-item-section>แสดงประวัติการนำเข้าข้อมูล</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue