update UI - แสดงรายชื่อผู้สอบผ่านในรอบของการสอบคัดเลือก/แข่งขันที่ได้จากระบบ
ปรับในส่วนของการแสดงผลข้อมูลให้ครบตาม design ปรับให้เป็นหน้าฟอร์มกรณีอยู่ในโหมดแก้ไข ปรับการแสดงสถานะและ Action ให้ถกต้อง
This commit is contained in:
parent
b958dfad20
commit
312642f8f6
9 changed files with 576 additions and 575 deletions
|
|
@ -1,412 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, defineComponent, h } from "vue";
|
|
||||||
import Table from "@/modules/05_placement/components/PlacementTableView.vue";
|
|
||||||
import { useQuasar, QForm } from "quasar";
|
|
||||||
import type { TableName } from "@/modules/05_placement/interface/request/placement";
|
|
||||||
import { usePlacementDataStore } from "@/modules/05_placement/store";
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import DialogHeader from "@/modules/05_placement/components/DialogHeader.vue";
|
|
||||||
import DialogFooter from "@/modules/05_placement/components/DialogFooter.vue";
|
|
||||||
const editvisible = ref<boolean>(false);
|
|
||||||
const myForm = ref<QForm | null>(null);
|
|
||||||
const edit = ref<boolean>(false);
|
|
||||||
const visibleColumns = ref<String[]>([]);
|
|
||||||
const store = usePlacementDataStore();
|
|
||||||
const filter = ref<string>("");
|
|
||||||
const { placementData } = store;
|
|
||||||
const editRow = ref<boolean>(false); //เช็คมีการแก้ไขข้อมูล
|
|
||||||
const modal = ref<boolean>(false); //modal add detail
|
|
||||||
const modal_right = ref<boolean>(false); //modal add detail
|
|
||||||
const modalEdit = ref<boolean>(false); //modal ที่แสดงใช้สำหรับแก้ไขหรือไม่
|
|
||||||
const position = ref<number>();
|
|
||||||
const Name = ref<string>();
|
|
||||||
const ExamOrder = ref<number>();
|
|
||||||
const Unit = ref<string>();
|
|
||||||
const ReportingDate = ref<string>();
|
|
||||||
const BMAOfficer = ref<boolean>();
|
|
||||||
const Status = ref<string>();
|
|
||||||
const checkList = ref<string>();
|
|
||||||
const positionMasterUserNote = ref<string>();
|
|
||||||
const $q = useQuasar(); // show dialog
|
|
||||||
const files = ref<File[]>([]);
|
|
||||||
const clickEditRow = () => {
|
|
||||||
editRow.value = true;
|
|
||||||
};
|
|
||||||
const getClass = (val: boolean) => {
|
|
||||||
return {
|
|
||||||
"full-width inputgreen cursor-pointer": val,
|
|
||||||
"full-width cursor-pointer": !val,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
const selectData = (props: TableName) => {
|
|
||||||
if (editvisible.value == true) {
|
|
||||||
editRow.value = false;
|
|
||||||
modalEdit.value = true;
|
|
||||||
modal.value = false;
|
|
||||||
edit.value = true;
|
|
||||||
position.value = props.position;
|
|
||||||
Name.value = props.Name;
|
|
||||||
ExamOrder.value = props.ExamOrder;
|
|
||||||
Unit.value = props.Unit;
|
|
||||||
ReportingDate.value = props.ReportingDate;
|
|
||||||
BMAOfficer.value = props.BMAOfficer;
|
|
||||||
Status.value = props.Status;
|
|
||||||
checkList.value = props.checkList;
|
|
||||||
} else {
|
|
||||||
editRow.value = false;
|
|
||||||
modalEdit.value = true;
|
|
||||||
modal.value = true;
|
|
||||||
edit.value = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const getNumFile = ref(0);
|
|
||||||
const editDetail = (props: TableName, action: "cancel" | "wait") => {
|
|
||||||
|
|
||||||
if (action === "cancel") {
|
|
||||||
getNumFile.value = 0;
|
|
||||||
editRow.value = false;
|
|
||||||
modalEdit.value = false;
|
|
||||||
modal_right.value = true;
|
|
||||||
edit.value = true;
|
|
||||||
Name.value = props.Name;
|
|
||||||
} else if (action === "wait") {
|
|
||||||
getNumFile.value = 1;
|
|
||||||
editRow.value = false;
|
|
||||||
modalEdit.value = true;
|
|
||||||
modal_right.value = true;
|
|
||||||
edit.value = true;
|
|
||||||
Name.value = props.Name;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
placementData.mappingPosition.columns.length == 0
|
|
||||||
? (visibleColumns.value = [
|
|
||||||
"position",
|
|
||||||
"Name",
|
|
||||||
"ExamOrder",
|
|
||||||
"Unit",
|
|
||||||
"ReportingDate",
|
|
||||||
"BMAOfficer",
|
|
||||||
"Status",
|
|
||||||
"checkList",
|
|
||||||
])
|
|
||||||
: (visibleColumns.value = placementData.mappingPosition.columns);
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "position",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "position",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Name",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ-สกุล",
|
|
||||||
sortable: true,
|
|
||||||
field: "Name",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "ExamOrder",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับที่สอบได้",
|
|
||||||
sortable: true,
|
|
||||||
field: "ExamOrder",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Unit",
|
|
||||||
align: "left",
|
|
||||||
label: "หน่วยงานที่รับการบรรจุ",
|
|
||||||
sortable: true,
|
|
||||||
field: "Unit",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "ReportingDate",
|
|
||||||
align: "left",
|
|
||||||
label: "วันที่รายงานตัว",
|
|
||||||
sortable: true,
|
|
||||||
field: "ReportingDate",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "BMAOfficer",
|
|
||||||
align: "left",
|
|
||||||
label: "ข้าราชการฯ กทม.",
|
|
||||||
sortable: true,
|
|
||||||
field: "BMAOfficer",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Status",
|
|
||||||
align: "left",
|
|
||||||
label: "สถานะการบรรจุ",
|
|
||||||
sortable: true,
|
|
||||||
field: "Status",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const rows = ref<TableName[]>([
|
|
||||||
{
|
|
||||||
position: 1,
|
|
||||||
Name: "setthawut",
|
|
||||||
ExamOrder: 1,
|
|
||||||
Unit: "chamomind",
|
|
||||||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
|
||||||
BMAOfficer: true,
|
|
||||||
Status: "บรรจุเเล้ว",
|
|
||||||
checkList: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
position: 1,
|
|
||||||
Name: "setthawut",
|
|
||||||
ExamOrder: 1,
|
|
||||||
Unit: "chamomind",
|
|
||||||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
|
||||||
BMAOfficer: true,
|
|
||||||
Status: "ยังไม่บรรจุ",
|
|
||||||
checkList: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
position: 1,
|
|
||||||
Name: "setthawut",
|
|
||||||
ExamOrder: 1,
|
|
||||||
Unit: "chamomind",
|
|
||||||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
|
||||||
BMAOfficer: true,
|
|
||||||
Status: "เตรียมบรรจุ",
|
|
||||||
checkList: null,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
position: 1,
|
|
||||||
Name: "setthawut",
|
|
||||||
ExamOrder: 1,
|
|
||||||
Unit: "chamomind",
|
|
||||||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
|
||||||
BMAOfficer: true,
|
|
||||||
Status: "เตรียมบรรจุ",
|
|
||||||
checkList: null,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
position: 1,
|
|
||||||
Name: "tee",
|
|
||||||
ExamOrder: 1,
|
|
||||||
Unit: "chamomind",
|
|
||||||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
|
||||||
BMAOfficer: true,
|
|
||||||
Status: "เตรียมบรรจุ",
|
|
||||||
checkList: null,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
position: 1,
|
|
||||||
Name: "setthawut",
|
|
||||||
ExamOrder: 1,
|
|
||||||
Unit: "chamomind",
|
|
||||||
ReportingDate: "30 พ.ค. 2566", //วันที่รายงานตัว
|
|
||||||
BMAOfficer: true,
|
|
||||||
Status: "บรรจุเเล้ว",
|
|
||||||
checkList: null,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const clickCancel = async () => {
|
|
||||||
editvisible.value = false;
|
|
||||||
};
|
|
||||||
const clickClose = async () => {
|
|
||||||
if (editRow.value == true) {
|
|
||||||
$q.dialog({
|
|
||||||
title: `ข้อมูลมีการแก้ไข`,
|
|
||||||
message: `ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?`,
|
|
||||||
cancel: "ยกเลิก",
|
|
||||||
ok: "ยืนยัน",
|
|
||||||
persistent: true,
|
|
||||||
}).onOk(async () => {
|
|
||||||
modal_right.value = false;
|
|
||||||
modal.value = false;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
modal_right.value = false;
|
|
||||||
modal.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<q-form ref="myForm">
|
|
||||||
<Table
|
|
||||||
:rows="rows"
|
|
||||||
:columns="columns"
|
|
||||||
:filter="filter"
|
|
||||||
:visible-columns="visibleColumns"
|
|
||||||
v-model:inputfilter="filter"
|
|
||||||
v-model:inputvisible="visibleColumns"
|
|
||||||
v-model:editvisible="editvisible"
|
|
||||||
:cancel="clickCancel"
|
|
||||||
:history="true"
|
|
||||||
:boss="true"
|
|
||||||
:saveNoDraft="true"
|
|
||||||
>
|
|
||||||
<template #columns="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-icon
|
|
||||||
class="q-mr-sm"
|
|
||||||
size="15px"
|
|
||||||
color="primary"
|
|
||||||
name="mdi-bookmark"
|
|
||||||
v-if="props.row.isDirector"
|
|
||||||
></q-icon>
|
|
||||||
|
|
||||||
<q-td
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
@click="selectData(props.row)"
|
|
||||||
class="cursor-pointer"
|
|
||||||
>
|
|
||||||
<div v-if="col.name == 'isActive'" class="table_ellipsis">
|
|
||||||
<div v-if="!editvisible">
|
|
||||||
<q-icon
|
|
||||||
v-if="col.value == false"
|
|
||||||
name="mdi-close"
|
|
||||||
color="red"
|
|
||||||
class="text-h5"
|
|
||||||
/>
|
|
||||||
<q-icon
|
|
||||||
v-else
|
|
||||||
name="mdi-check"
|
|
||||||
color="positive"
|
|
||||||
class="text-h5"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else class="table_ellipsis">
|
|
||||||
{{ col.value }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
<q-td auto-width>
|
|
||||||
<div v-if="props.row.Status === 'บรรจุเเล้ว'">
|
|
||||||
<div></div>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="props.row.Status === 'ยังไม่บรรจุ'">
|
|
||||||
<q-btn
|
|
||||||
color="blue"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
size="14px"
|
|
||||||
icon="mdi-account-alert"
|
|
||||||
@click="editDetail(props.row, 'wait')"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
size="14px"
|
|
||||||
icon="mdi-account-remove"
|
|
||||||
@click="editDetail(props.row, 'cancel')"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div v-else align="right">
|
|
||||||
<q-btn
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
size="14px"
|
|
||||||
icon="mdi-account-remove"
|
|
||||||
@click="editDetail(props.row, 'cancel')"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</Table>
|
|
||||||
</q-form>
|
|
||||||
<q-dialog v-model="modal" persistent>
|
|
||||||
<q-card style="width: 800px">
|
|
||||||
<q-form ref="myForm">
|
|
||||||
<!-- :tittle="`${modalEdit ? 'แก้ไข' : 'สร้าง'}รายละเอียดของ...`" -->
|
|
||||||
<DialogHeader :tittle="`รายละเอียดของ${Name}`" :close="clickClose" />
|
|
||||||
<q-separator />
|
|
||||||
<q-card-section class="q-p-sm"> text </q-card-section>
|
|
||||||
<q-separator />
|
|
||||||
<DialogFooter
|
|
||||||
:save="clickSave"
|
|
||||||
v-model:editvisible="edit"
|
|
||||||
v-model:modalEdit="modalEdit"
|
|
||||||
/>
|
|
||||||
</q-form>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
<q-dialog v-model="modal_right" persistent>
|
|
||||||
<q-card style="width: 800px">
|
|
||||||
<q-form ref="myForm">
|
|
||||||
<!-- :tittle="`${modalEdit ? 'แก้ไข' : 'สร้าง'}รายละเอียดของ...`" -->
|
|
||||||
<DialogHeader
|
|
||||||
:tittle="`${modalEdit ? 'ขอผ่อนผัน' : 'สละสิทธิ์'} ชื่อ...`"
|
|
||||||
:close="clickClose"
|
|
||||||
/>
|
|
||||||
<q-separator />
|
|
||||||
<q-card-section class="q-p-sm">
|
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
||||||
<q-input
|
|
||||||
:class="getClass(edit)"
|
|
||||||
hide-bottom-space
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionMasterUserNote"
|
|
||||||
:label="`${'กรอกเหตุผล'}`"
|
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
<q-file
|
|
||||||
v-if="getNumFile == 1"
|
|
||||||
v-model="files"
|
|
||||||
dense
|
|
||||||
:label="'เลือกไฟล์เอกสารหลักฐาน'"
|
|
||||||
outlined
|
|
||||||
use-chips
|
|
||||||
multiple
|
|
||||||
class="q-py-sm"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon name="attach_file" color="primary" />
|
|
||||||
</template>
|
|
||||||
</q-file>
|
|
||||||
<!-- :rules="[(val) => !!val || `${'กรุณากรอกเงื่อนไขตำแหน่ง'}`]" -->
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
<q-separator />
|
|
||||||
<DialogFooter
|
|
||||||
:save="clickSave"
|
|
||||||
v-model:editvisible="edit"
|
|
||||||
v-model:modalEdit="modalEdit"
|
|
||||||
/>
|
|
||||||
</q-form>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive } from "vue";
|
import { reactive, ref } from "vue";
|
||||||
|
|
||||||
import { defineAsyncComponent } from "@vue/runtime-core";
|
import { defineAsyncComponent } from "@vue/runtime-core";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const year = ref<string>("2566");
|
||||||
|
const round = ref<string>("1");
|
||||||
|
const title = ref<string>("การสอบแข่งขันเพื่อรับบุคคลทั่วไปเข้ารับราชการ");
|
||||||
|
|
||||||
const itemTop = reactive([
|
const itemTop = reactive([
|
||||||
{
|
{
|
||||||
|
|
@ -12,60 +18,52 @@ const itemTop = reactive([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
num: 3,
|
num: 1,
|
||||||
title: "ยังไม่บรรจุ",
|
title: "ยังไม่บรรจุ",
|
||||||
color: "#02A998",
|
color: "#02A998",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
num: 3,
|
num: 5,
|
||||||
title: "เตรียมบรรจุ",
|
title: "เตรียมบรรจุ",
|
||||||
color: "#2EA0FF",
|
color: "#2EA0FF",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
num: 3,
|
num: 1,
|
||||||
title: "บรรจุเเล้ว",
|
title: "บรรจุเเล้ว",
|
||||||
color: "#4154B3",
|
color: "#4154B3",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
num: 3,
|
num: 0,
|
||||||
title: "สละสิทธิ์",
|
title: "สละสิทธิ์",
|
||||||
color: "#FF5C5F",
|
color: "#FF5C5F",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const AddTablePosition = defineAsyncComponent(
|
const AddTablePosition = defineAsyncComponent(
|
||||||
() => import("@/modules/05_placement/components/PlacementTable.vue")
|
() => import("@/modules/05_placement/components/pass/Table.vue")
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 row">
|
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 row">
|
||||||
|
<div class="toptitle">
|
||||||
|
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="router.go(-1)" />
|
||||||
|
รายชื่อผู้สอบในรอบ {{ title }} ครั้งที่ {{ round }} ปี {{ year }}
|
||||||
|
</div>
|
||||||
|
<q-space />
|
||||||
|
|
||||||
<div class="q-py-md row col-12 no-wrap">
|
<div class="q-py-md row col-12 no-wrap">
|
||||||
<hr
|
<hr class="q-separator q-separator--vertical gt-sm" aria-orientation="vertical" style="width: 2px" />
|
||||||
class="q-separator q-separator--vertical gt-sm"
|
|
||||||
aria-orientation="vertical"
|
|
||||||
style="width: 2px"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div class="col-12 row bg-white">
|
<div class="col-12 row bg-white">
|
||||||
<div class="fit q-pa-md">
|
<div class="fit q-pa-md">
|
||||||
<div class="row col-12 q-col-gutter-md fit">
|
<div class="row col-12 q-col-gutter-md fit">
|
||||||
<div
|
<div class="" v-for="item in itemTop" :key="item.id" style="width: 15%">
|
||||||
class=""
|
<div class="q-card q-card--bordered q-card--flat no-shadow row fit cardNum items-center q-pa-sm">
|
||||||
v-for="item in itemTop"
|
|
||||||
:key="item.id"
|
|
||||||
style="width: 15%"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="q-card q-card--bordered q-card--flat no-shadow row fit cardNum items-center q-pa-sm"
|
|
||||||
>
|
|
||||||
<div class="col-12 row items-center q-pa-sm">
|
<div class="col-12 row items-center q-pa-sm">
|
||||||
<div
|
<div class="col-12 text-h5 text-weight-bold" :style="{ color: item.color }">
|
||||||
class="col-12 text-h5 text-weight-bold"
|
|
||||||
:style="{ color: item.color }"
|
|
||||||
>
|
|
||||||
{{ item.num }}
|
{{ item.num }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 text-dark ellipsis">
|
<div class="col-12 text-dark ellipsis">
|
||||||
|
|
@ -1,27 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<q-card-actions class="text-primary">
|
<q-card-actions class="text-primary">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn v-if="!editvisible" flat round :disabled="editvisible" :color="editvisible ? 'grey-7' : 'primary'"
|
||||||
v-if="!editvisible"
|
@click="edit" icon="mdi-pencil-outline">
|
||||||
flat
|
|
||||||
round
|
|
||||||
:disabled="editvisible"
|
|
||||||
:color="editvisible ? 'grey-7' : 'primary'"
|
|
||||||
@click="edit"
|
|
||||||
icon="mdi-pencil-outline"
|
|
||||||
>
|
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
||||||
<q-btn
|
<q-btn flat round :disabled="!editvisible" :color="!editvisible ? 'grey-7' : 'public'" @click="checkSave"
|
||||||
flat
|
icon="mdi-content-save-outline">
|
||||||
round
|
|
||||||
:disabled="!editvisible"
|
|
||||||
:color="!editvisible ? 'grey-7' : 'public'"
|
|
||||||
@click="checkSave"
|
|
||||||
icon="mdi-content-save-outline"
|
|
||||||
>
|
|
||||||
<q-tooltip>บันทึก</q-tooltip>
|
<q-tooltip>บันทึก</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
<q-toolbar-title class="text-subtitle2 text-bold">{{ tittle }}</q-toolbar-title>
|
<q-toolbar-title class="text-subtitle2 text-bold">{{ title }}</q-toolbar-title>
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="close"
|
icon="close"
|
||||||
unelevated
|
unelevated
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
import { ref, useAttrs } from "vue";
|
import { ref, useAttrs } from "vue";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
tittle: String,
|
title: String,
|
||||||
close: {
|
close: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
514
src/modules/05_placement/components/pass/Table.vue
Normal file
514
src/modules/05_placement/components/pass/Table.vue
Normal file
|
|
@ -0,0 +1,514 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
|
import Table from "@/modules/05_placement/components/pass/TableView.vue";
|
||||||
|
import { useQuasar, QForm } from "quasar";
|
||||||
|
import type { TableName } from "@/modules/05_placement/interface/request/placement";
|
||||||
|
import { usePlacementDataStore } from "@/modules/05_placement/store";
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue";
|
||||||
|
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
|
const editvisible = ref<boolean>(false);
|
||||||
|
const myForm = ref<QForm | null>(null);
|
||||||
|
const edit = ref<boolean>(false);
|
||||||
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
const store = usePlacementDataStore();
|
||||||
|
const filter = ref<string>("");
|
||||||
|
const { placementData } = store;
|
||||||
|
const editRow = ref<boolean>(false); //เช็คมีการแก้ไขข้อมูล
|
||||||
|
const modal = ref<boolean>(false); //modal add detail
|
||||||
|
const modal_right = ref<boolean>(false); //modal add detail
|
||||||
|
const modalEdit = ref<boolean>(false); //modal ที่แสดงใช้สำหรับแก้ไขหรือไม่
|
||||||
|
const Name = ref<string>();
|
||||||
|
const positionMasterUserNote = ref<string>();
|
||||||
|
const $q = useQuasar(); // show dialog
|
||||||
|
const files = ref<File[]>([]);
|
||||||
|
const appointModal = ref<boolean>(false);
|
||||||
|
const appoint = ref<any>({
|
||||||
|
Code: '',
|
||||||
|
UnitName: '',
|
||||||
|
PositionNo: '',
|
||||||
|
PositionType: '',
|
||||||
|
PositionManage: '',
|
||||||
|
PositionTypeManage: '',
|
||||||
|
PositionLine: '',
|
||||||
|
Major: '',
|
||||||
|
PositionLevel: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const saveAppoint = () => {
|
||||||
|
console.log("save appoint===>", appoint.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
const savePostpone = () => {
|
||||||
|
const dataPost = { note: positionMasterUserNote.value, files: files }
|
||||||
|
console.log("save postpone===>", dataPost);
|
||||||
|
positionMasterUserNote.value = '';
|
||||||
|
modal_right.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const saveDisclaim = () => {
|
||||||
|
const dataPost = { note: positionMasterUserNote.value }
|
||||||
|
console.log("save disclaim===>", dataPost);
|
||||||
|
positionMasterUserNote.value = '';
|
||||||
|
modal_right.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const clickEditRow = () => {
|
||||||
|
editRow.value = true;
|
||||||
|
};
|
||||||
|
const getClass = (val: boolean) => {
|
||||||
|
return {
|
||||||
|
"full-width inputgreen cursor-pointer": val,
|
||||||
|
"full-width cursor-pointer": !val,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const selectData = (props: TableName) => {
|
||||||
|
if (editvisible.value == true) {
|
||||||
|
// editRow.value = false;
|
||||||
|
// modalEdit.value = true;
|
||||||
|
modal.value = false;
|
||||||
|
// edit.value = true;
|
||||||
|
// position.value = props.position;
|
||||||
|
Name.value = props.Name;
|
||||||
|
// ExamOrder.value = props.ExamOrder;
|
||||||
|
// Unit.value = props.Unit;
|
||||||
|
// ReportingDate.value = props.ReportingDate;
|
||||||
|
// BMAOfficer.value = props.BMAOfficer;
|
||||||
|
// Status.value = props.Status;
|
||||||
|
// checkList.value = props.checkList;
|
||||||
|
} else {
|
||||||
|
// editRow.value = false;
|
||||||
|
// modalEdit.value = true;
|
||||||
|
modal.value = true;
|
||||||
|
// edit.value = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const getNumFile = ref(0);
|
||||||
|
const editDetail = (props: TableName, action: "cancel" | "wait") => {
|
||||||
|
|
||||||
|
if (action === "cancel") {
|
||||||
|
getNumFile.value = 0;
|
||||||
|
editRow.value = false;
|
||||||
|
modalEdit.value = false;
|
||||||
|
modal_right.value = true;
|
||||||
|
edit.value = true;
|
||||||
|
Name.value = props.Name;
|
||||||
|
} else if (action === "wait") {
|
||||||
|
getNumFile.value = 1;
|
||||||
|
editRow.value = false;
|
||||||
|
modalEdit.value = true;
|
||||||
|
modal_right.value = true;
|
||||||
|
edit.value = true;
|
||||||
|
Name.value = props.Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
placementData.mappingPosition.columns.length == 0
|
||||||
|
? (visibleColumns.value = [
|
||||||
|
"position",
|
||||||
|
"Name",
|
||||||
|
"ExamOrder",
|
||||||
|
"Unit",
|
||||||
|
"ReportingDate",
|
||||||
|
"BMAOfficer",
|
||||||
|
"Status",
|
||||||
|
"checkList",
|
||||||
|
])
|
||||||
|
: (visibleColumns.value = placementData.mappingPosition.columns);
|
||||||
|
const columns = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "position",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "position",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Name",
|
||||||
|
align: "left",
|
||||||
|
label: "ชื่อ-สกุล",
|
||||||
|
sortable: true,
|
||||||
|
field: "Name",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ExamOrder",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับที่สอบได้",
|
||||||
|
sortable: true,
|
||||||
|
field: "ExamOrder",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Unit",
|
||||||
|
align: "left",
|
||||||
|
label: "หน่วยงานที่รับการบรรจุ",
|
||||||
|
sortable: true,
|
||||||
|
field: "Unit",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ReportingDate",
|
||||||
|
align: "left",
|
||||||
|
label: "วันที่รายงานตัว",
|
||||||
|
sortable: true,
|
||||||
|
field: "ReportingDate",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "BMAOfficer",
|
||||||
|
align: "left",
|
||||||
|
label: "ข้าราชการฯ กทม.",
|
||||||
|
sortable: true,
|
||||||
|
field: "BMAOfficer",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Status",
|
||||||
|
align: "left",
|
||||||
|
label: "สถานะการบรรจุ",
|
||||||
|
sortable: true,
|
||||||
|
field: "Status",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const rows = ref<TableName[]>([
|
||||||
|
{
|
||||||
|
Id: "4016500103241",
|
||||||
|
position: 1,
|
||||||
|
Name: "นางสาวกัณฐิมา กาฬสินธุ์",
|
||||||
|
ExamOrder: 1,
|
||||||
|
unitId: "",
|
||||||
|
UnitGroup: "",
|
||||||
|
Unit: "",
|
||||||
|
ReportingDate: "-", //วันที่รายงานตัว
|
||||||
|
BMAOfficer: true,
|
||||||
|
Status: "สละสิทธิ์",
|
||||||
|
checkList: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Id: "4016500092355",
|
||||||
|
position: 2,
|
||||||
|
Name: "นางสาวรัชภรณ์ ภักดี",
|
||||||
|
ExamOrder: 2,
|
||||||
|
unitId: "",
|
||||||
|
UnitGroup: "",
|
||||||
|
Unit: "",
|
||||||
|
ReportingDate: "", //วันที่รายงานตัว
|
||||||
|
BMAOfficer: false,
|
||||||
|
Status: "ยังไม่บรรจุ",
|
||||||
|
checkList: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Id: "4016500086436",
|
||||||
|
position: 3,
|
||||||
|
Name: "นางสาวภาพรรณ ลออ",
|
||||||
|
ExamOrder: 3,
|
||||||
|
unitId: "",
|
||||||
|
UnitGroup: "",
|
||||||
|
Unit: "",
|
||||||
|
ReportingDate: "", //วันที่รายงานตัว
|
||||||
|
BMAOfficer: true,
|
||||||
|
Status: "ยังไม่บรรจุ",
|
||||||
|
checkList: null,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
Id: "4016500073585",
|
||||||
|
position: 4,
|
||||||
|
Name: "นางกติมา พนมเทียน",
|
||||||
|
ExamOrder: 4,
|
||||||
|
unitId: "",
|
||||||
|
UnitGroup: "กลุ่มงานช่วยนักบริหาร (กบห.)",
|
||||||
|
Unit: "นักทรัพยากรบุคคล (กบห.1)",
|
||||||
|
ReportingDate: "2023-05-30", //วันที่รายงานตัว
|
||||||
|
BMAOfficer: true,
|
||||||
|
Status: "เตรียมบรรจุ",
|
||||||
|
checkList: null,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
Id: "4016500053234",
|
||||||
|
position: 5,
|
||||||
|
Name: "นางสาววิยฎา ทองเอียด",
|
||||||
|
ExamOrder: 5,
|
||||||
|
unitId: "",
|
||||||
|
UnitGroup: "กลุ่มงานช่วยนักบริหาร (กบห.)",
|
||||||
|
Unit: "นักทรัพยากรบุคคล (กบห.2)",
|
||||||
|
ReportingDate: "2023-05-30", //วันที่รายงานตัว
|
||||||
|
BMAOfficer: true,
|
||||||
|
Status: "เตรียมบรรจุ",
|
||||||
|
checkList: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Id: "4016500042345",
|
||||||
|
position: 6,
|
||||||
|
Name: "นายศรุณ เจริญเมือง",
|
||||||
|
ExamOrder: 6,
|
||||||
|
unitId: "",
|
||||||
|
UnitGroup: "กลุ่มงานช่วยนักบริหาร (กบห.)",
|
||||||
|
Unit: "นักทรัพยากรบุคคล (กบห.3)",
|
||||||
|
ReportingDate: "2023-05-30", //วันที่รายงานตัว
|
||||||
|
BMAOfficer: true,
|
||||||
|
Status: "เตรียมบรรจุ",
|
||||||
|
checkList: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Id: "401650002245",
|
||||||
|
position: 7,
|
||||||
|
Name: "นายอภินัน บอบู่",
|
||||||
|
ExamOrder: 7,
|
||||||
|
unitId: "",
|
||||||
|
UnitGroup: "กลุ่มงานช่วยนักบริหาร (กบห.)",
|
||||||
|
Unit: "นักทรัพยากรบุคคล (กบห.4)",
|
||||||
|
ReportingDate: "2023-05-30", //วันที่รายงานตัว
|
||||||
|
BMAOfficer: true,
|
||||||
|
Status: "บรรจุเเล้ว",
|
||||||
|
checkList: null,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const clickCancel = async () => {
|
||||||
|
editvisible.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const openAppointModal = (value: any) => {
|
||||||
|
appointModal.value = true
|
||||||
|
editRow.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const clickClose = async () => {
|
||||||
|
if (editRow.value == true) {
|
||||||
|
$q.dialog({
|
||||||
|
title: `ข้อมูลมีการแก้ไข`,
|
||||||
|
message: `ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?`,
|
||||||
|
cancel: "ยกเลิก",
|
||||||
|
ok: "ยืนยัน",
|
||||||
|
persistent: true,
|
||||||
|
}).onOk(async () => {
|
||||||
|
modal_right.value = false;
|
||||||
|
modal.value = false;
|
||||||
|
appointModal.value = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
modal_right.value = false;
|
||||||
|
modal.value = false;
|
||||||
|
appointModal.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const save = () => {
|
||||||
|
console.log("rows===>", rows.value)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<q-form ref="myForm">
|
||||||
|
<Table :rows="rows" :columns="columns" :filter="filter" :visible-columns="visibleColumns" v-model:inputfilter="filter"
|
||||||
|
v-model:inputvisible="visibleColumns" v-model:editvisible="editvisible" :cancel="clickCancel" :history="true"
|
||||||
|
:boss="true" :saveNoDraft="true" :add="save">
|
||||||
|
<template #columns="props">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<q-icon class="q-mr-sm" size="15px" color="primary" name="mdi-bookmark" v-if="props.row.isDirector"></q-icon>
|
||||||
|
|
||||||
|
<q-td v-for="col in props.cols" :key="col.name" :props="props" @click="selectData(props.row)"
|
||||||
|
class="cursor-pointer">
|
||||||
|
<div v-if="col.name == 'BMAOfficer'" class="table_ellipsis">
|
||||||
|
<div>
|
||||||
|
<q-icon v-if="col.value == false" name="mdi-close" color="grey-5" class="text-h5" />
|
||||||
|
<q-icon v-else name="mdi-check" color="positive" class="text-h5" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name == 'Name'" class="table_ellipsis">
|
||||||
|
{{ col.value }}
|
||||||
|
<p>{{ props.row.Id }}</p>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name == 'Unit'" class="table_ellipsis">
|
||||||
|
|
||||||
|
<div v-if="editvisible && props.row.Status == 'ยังไม่บรรจุ'">
|
||||||
|
<div @click="openAppointModal">
|
||||||
|
<q-input hide-bottom-space outlined dense lazy-rules v-model="props.row.Unit">
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="bookmark" color="primary" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="props.row.Status == 'ยังไม่บรรจุ' || props.row.Status == 'สละสิทธิ์'">-</div>
|
||||||
|
<div v-else>
|
||||||
|
{{ props.row.UnitGroup }}
|
||||||
|
<p>{{ col.value }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="col.name == 'ReportingDate' && col.value != '-'" class="table_ellipsis">
|
||||||
|
<div v-if="editvisible && props.row.Status == 'ยังไม่บรรจุ'">
|
||||||
|
<datepicker :locale="'th'" autoApply :enableTimePicker="false" week-start="0"
|
||||||
|
v-model="props.row.ReportingDate">
|
||||||
|
<template #year="{ year }">
|
||||||
|
{{ year + 543 }}
|
||||||
|
</template>
|
||||||
|
<template #year-overlay-value="{ value }">
|
||||||
|
{{ parseInt(value + 543) }}
|
||||||
|
</template>
|
||||||
|
<template #trigger>
|
||||||
|
<q-input hide-bottom-space outlined dense lazy-rules :model-value="mixin.date2Thai(col.value)">
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="event" class="cursor-pointer" style="color: var(--q-primary)">
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
</datepicker>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="props.row.Status == 'ยังไม่บรรจุ' || props.row.Status == 'สละสิทธิ์'">-</div>
|
||||||
|
<div v-else>
|
||||||
|
{{ mixin.date2Thai(col.value) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else class="table_ellipsis">
|
||||||
|
{{ col.value }}
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
<q-td auto-width>
|
||||||
|
<div v-if="props.row.Status === 'บรรจุเเล้ว' || props.row.Status === 'สละสิทธิ์'">
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="props.row.Status === 'ยังไม่บรรจุ'">
|
||||||
|
<q-btn color="blue" flat dense round size="14px" icon="mdi-account-alert"
|
||||||
|
@click="editDetail(props.row, 'wait')" />
|
||||||
|
<q-btn color="red" flat dense round size="14px" icon="mdi-account-remove"
|
||||||
|
@click="editDetail(props.row, 'cancel')" />
|
||||||
|
</div>
|
||||||
|
<div v-else align="right">
|
||||||
|
<q-btn color="red" flat dense round size="14px" icon="mdi-account-remove"
|
||||||
|
@click="editDetail(props.row, 'cancel')" />
|
||||||
|
</div>
|
||||||
|
</q-td>
|
||||||
|
</q-tr>
|
||||||
|
</template>
|
||||||
|
</Table>
|
||||||
|
</q-form>
|
||||||
|
|
||||||
|
<q-dialog v-model="appointModal" persistent>
|
||||||
|
<q-card style="width: 800px">
|
||||||
|
<q-form ref="myForm">
|
||||||
|
<DialogHeader title="เลือกหน่วยงานที่รับบรรจุ" :close="clickClose" />
|
||||||
|
<q-separator />
|
||||||
|
<q-card-section>
|
||||||
|
|
||||||
|
<div class="row q-col-gutter-xs">
|
||||||
|
<div class="col">
|
||||||
|
<q-select outlined dense v-model="appoint.Code" label="รหัสส่วนราชการ" />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<q-select outlined dense v-model="appoint.UnitName" label="ชื่อหน่วยงาน" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row q-col-gutter-xs q-pt-xs">
|
||||||
|
<div class="col">
|
||||||
|
<q-select outlined dense v-model="appoint.PositionNo" label="ตำแหน่งเลขที่" />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<q-select outlined dense v-model="appoint.PositionType" label="ประเภทตำแหน่ง" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row q-col-gutter-xs q-pt-xs">
|
||||||
|
<div class="col">
|
||||||
|
<q-select outlined dense v-model="appoint.PositionManage" label="ตำแหน่งทางการบริหาร" />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<q-select outlined dense v-model="appoint.PositionTypeManage" label="ด้านทางบริหาร" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row q-col-gutter-xs q-pt-xs">
|
||||||
|
<div class="col">
|
||||||
|
<q-select outlined dense v-model="appoint.PositionLine" label="ตำแหน่งในสายงาน" />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<q-select outlined dense v-model="appoint.Major" label="ด้าน/สาขา" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row q-col-gutter-xs q-pt-xs">
|
||||||
|
<div class="col-6">
|
||||||
|
<q-select outlined dense v-model="appoint.PositionLevel" label="ระดับตำแหน่ง" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
|
<q-separator />
|
||||||
|
<DialogFooter v-model:editvisible="edit" v-model:modalEdit="modalEdit" :save="saveAppoint" />
|
||||||
|
</q-form>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
|
||||||
|
<q-dialog v-model="modal" persistent>
|
||||||
|
<q-card style="width: 800px">
|
||||||
|
<q-form ref="myForm">
|
||||||
|
<!-- :title="`${modalEdit ? 'แก้ไข' : 'สร้าง'}รายละเอียดของ...`" -->
|
||||||
|
<DialogHeader :title="`รายละเอียดของ${Name}`" :close="clickClose" />
|
||||||
|
<q-separator />
|
||||||
|
<q-card-section class="q-p-sm"> text 5 </q-card-section>
|
||||||
|
<q-separator />
|
||||||
|
<DialogFooter v-model:editvisible="edit" v-model:modalEdit="modalEdit" />
|
||||||
|
</q-form>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
|
||||||
|
<q-dialog v-model="modal_right" persistent>
|
||||||
|
<q-card style="width: 800px">
|
||||||
|
<q-form ref="myForm">
|
||||||
|
<!-- :title="`${modalEdit ? 'แก้ไข' : 'สร้าง'}รายละเอียดของ...`" -->
|
||||||
|
<DialogHeader :title="`${modalEdit ? 'ขอผ่อนผัน' : 'สละสิทธิ์'} ชื่อ${Name}`" :close="clickClose" />
|
||||||
|
<q-separator />
|
||||||
|
<q-card-section class="q-p-sm">
|
||||||
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||||
|
<q-input :class="getClass(edit)" hide-bottom-space :outlined="edit" dense lazy-rules :readonly="!edit"
|
||||||
|
:borderless="!edit" v-model="positionMasterUserNote" :label="`${'กรอกเหตุผล'}`"
|
||||||
|
@update:modelValue="clickEditRow" type="textarea" />
|
||||||
|
<q-file v-if="getNumFile == 1" v-model="files" dense :label="'เลือกไฟล์เอกสารหลักฐาน'" outlined use-chips
|
||||||
|
multiple class="q-py-sm">
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="attach_file" color="primary" />
|
||||||
|
</template>
|
||||||
|
</q-file>
|
||||||
|
<!-- :rules="[(val) => !!val || `${'กรุณากรอกเงื่อนไขตำแหน่ง'}`]" -->
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
<q-separator />
|
||||||
|
<DialogFooter v-model:editvisible="edit" v-model:modalEdit="modalEdit"
|
||||||
|
:save="modalEdit ? savePostpone : saveDisclaim" />
|
||||||
|
</q-form>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.q-table p {
|
||||||
|
margin-bottom: 0;
|
||||||
|
color: #818181;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,89 +1,36 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="q-px-md q-pb-md">
|
<div class="q-px-md q-pb-md">
|
||||||
<div class="col-12 row q-py-sm" v-if="nornmalData == false">
|
<div class="col-12 row q-py-sm" v-if="nornmalData == false">
|
||||||
<q-btn
|
<q-btn size="12px" v-if="!editvisible" flat round :disabled="editvisible"
|
||||||
size="12px"
|
:color="editvisible ? 'grey-7' : 'primary'" @click="clickEdit" icon="mdi-pencil-outline">
|
||||||
v-if="!editvisible"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
:disabled="editvisible"
|
|
||||||
:color="editvisible ? 'grey-7' : 'primary'"
|
|
||||||
@click="clickEdit"
|
|
||||||
icon="mdi-pencil-outline"
|
|
||||||
>
|
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn size="12px" flat round v-if="editvisible" :disabled="!editvisible" :color="!editvisible ? 'grey-7' : 'red'"
|
||||||
size="12px"
|
@click="clickCancel" icon="mdi-undo">
|
||||||
flat
|
|
||||||
round
|
|
||||||
v-if="editvisible"
|
|
||||||
:disabled="!editvisible"
|
|
||||||
:color="!editvisible ? 'grey-7' : 'red'"
|
|
||||||
@click="clickCancel"
|
|
||||||
icon="mdi-undo"
|
|
||||||
>
|
|
||||||
<q-tooltip>ยกเลิก</q-tooltip>
|
<q-tooltip>ยกเลิก</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<div class="q-px-sm">
|
<div class="q-px-sm">
|
||||||
<q-btn
|
<q-btn flat round :disabled="editvisible == false" :color="editvisible == false ? 'grey-7' : 'public'"
|
||||||
flat
|
@click="add" icon="mdi-content-save-outline">
|
||||||
round
|
|
||||||
:disabled="editvisible == false"
|
|
||||||
:color="editvisible == false ? 'grey-7' : 'public'"
|
|
||||||
@click="add"
|
|
||||||
icon="mdi-content-save-outline"
|
|
||||||
>
|
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="items-center" style="display: flex">
|
<div class="items-center" style="display: flex">
|
||||||
<div
|
<div class="row items-center" style="display: flex" v-if="publicData == false && publicNoBtn == false"></div>
|
||||||
class="row items-center"
|
|
||||||
style="display: flex"
|
|
||||||
v-if="publicData == false && publicNoBtn == false"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<q-input
|
<q-input standout dense :model-value="inputfilter" ref="filterRef" @update:model-value="updateInput" outlined
|
||||||
standout
|
debounce="300" placeholder="ค้นหา" style="max-width: 200px" class="q-ml-sm">
|
||||||
dense
|
|
||||||
:model-value="inputfilter"
|
|
||||||
ref="filterRef"
|
|
||||||
@update:model-value="updateInput"
|
|
||||||
outlined
|
|
||||||
debounce="300"
|
|
||||||
placeholder="ค้นหา"
|
|
||||||
style="max-width: 200px"
|
|
||||||
class="q-ml-sm"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="inputfilter == ''" name="search" />
|
<q-icon v-if="inputfilter == ''" name="search" />
|
||||||
<q-icon
|
<q-icon v-if="inputfilter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||||
v-if="inputfilter !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="resetFilter"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<!-- แสดง table ใน คอลัมน์ -->
|
<!-- แสดง table ใน คอลัมน์ -->
|
||||||
<q-select
|
<q-select :model-value="inputvisible" @update:model-value="updateVisible" :display-value="$q.lang.table.columns"
|
||||||
:model-value="inputvisible"
|
multiple outlined dense :options="attrs.columns" options-dense option-value="name" map-options emit-value
|
||||||
@update:model-value="updateVisible"
|
style="min-width: 150px" class="gt-xs q-ml-sm" />
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
:options="attrs.columns"
|
|
||||||
options-dense
|
|
||||||
option-value="name"
|
|
||||||
map-options
|
|
||||||
emit-value
|
|
||||||
style="min-width: 150px"
|
|
||||||
class="gt-xs q-ml-sm"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -93,59 +40,22 @@
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="items-center" style="display: flex">
|
<div class="items-center" style="display: flex">
|
||||||
<!-- ค้นหาข้อความใน table -->
|
<!-- ค้นหาข้อความใน table -->
|
||||||
<q-input
|
<q-input standout dense :model-value="inputfilter" ref="filterRef" @update:model-value="updateInput" outlined
|
||||||
standout
|
debounce="300" placeholder="ค้นหา" style="max-width: 200px" class="q-ml-sm">
|
||||||
dense
|
|
||||||
:model-value="inputfilter"
|
|
||||||
ref="filterRef"
|
|
||||||
@update:model-value="updateInput"
|
|
||||||
outlined
|
|
||||||
debounce="300"
|
|
||||||
placeholder="ค้นหา"
|
|
||||||
style="max-width: 200px"
|
|
||||||
class="q-ml-sm"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon v-if="inputfilter == ''" name="search" />
|
<q-icon v-if="inputfilter == ''" name="search" />
|
||||||
<q-icon
|
<q-icon v-if="inputfilter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||||
v-if="inputfilter !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="resetFilter"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<!-- แสดงคอลัมน์ใน table -->
|
<!-- แสดงคอลัมน์ใน table -->
|
||||||
<q-select
|
<q-select :model-value="inputvisible" @update:model-value="updateVisible" :display-value="$q.lang.table.columns"
|
||||||
:model-value="inputvisible"
|
multiple outlined dense :options="attrs.columns" options-dense option-value="name" map-options emit-value
|
||||||
@update:model-value="updateVisible"
|
style="min-width: 150px" class="gt-xs q-ml-sm" />
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
:options="attrs.columns"
|
|
||||||
options-dense
|
|
||||||
option-value="name"
|
|
||||||
map-options
|
|
||||||
emit-value
|
|
||||||
style="min-width: 150px"
|
|
||||||
class="gt-xs q-ml-sm"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-table
|
<q-table ref="table" flat bordered class="custom-header-table" v-bind="attrs" virtual-scroll
|
||||||
ref="table"
|
:virtual-scroll-sticky-size-start="48" dense :pagination-label="paginationLabel" :pagination="initialPagination"
|
||||||
flat
|
:rows-per-page-options="[0]">
|
||||||
bordered
|
|
||||||
class="custom-header-table"
|
|
||||||
v-bind="attrs"
|
|
||||||
virtual-scroll
|
|
||||||
:virtual-scroll-sticky-size-start="48"
|
|
||||||
dense
|
|
||||||
:pagination-label="paginationLabel"
|
|
||||||
:pagination="initialPagination"
|
|
||||||
:rows-per-page-options="[0]"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
|
|
@ -369,11 +279,14 @@ const resetFilter = () => {
|
||||||
.icon-color {
|
.icon-color {
|
||||||
color: #4154b3;
|
color: #4154b3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-header-table {
|
.custom-header-table {
|
||||||
max-height: 64vh;
|
max-height: 64vh;
|
||||||
|
|
||||||
.q-table tr:nth-child(odd) td {
|
.q-table tr:nth-child(odd) td {
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-table tr:nth-child(even) td {
|
.q-table tr:nth-child(even) td {
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
@ -386,11 +299,13 @@ const resetFilter = () => {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this will be the loading indicator */
|
/* this will be the loading indicator */
|
||||||
.q-table thead tr:last-child th {
|
.q-table thead tr:last-child th {
|
||||||
/* height of all previous header rows */
|
/* height of all previous header rows */
|
||||||
top: 48px;
|
top: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-table thead tr:first-child th {
|
.q-table thead tr:first-child th {
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1,17 +1,15 @@
|
||||||
interface TableName {
|
interface TableName {
|
||||||
|
Id: string;
|
||||||
position: number;
|
position: number;
|
||||||
Name: string;
|
Name: string;
|
||||||
ExamOrder: number;
|
ExamOrder: number;
|
||||||
|
unitId: string;
|
||||||
|
UnitGroup: string;
|
||||||
Unit: string;
|
Unit: string;
|
||||||
ReportingDate: string; //วันที่รายงานตัว
|
ReportingDate: string; //วันที่รายงานตัว
|
||||||
BMAOfficer: boolean;
|
BMAOfficer: boolean;
|
||||||
Status: string;
|
Status: string;
|
||||||
checkList: any;
|
checkList: any;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type { TableName };
|
||||||
export type {
|
|
||||||
TableName,
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Main = () => import("@/modules/05_placement/views/Main.vue");
|
const Main = () => import("@/modules/05_placement/views/Main.vue");
|
||||||
const Detail = () => import("@/modules/05_placement/components/PlacementDetail.vue");
|
const PlacementDetail = () =>
|
||||||
|
import("@/modules/05_placement/components/pass/Detail.vue");
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
|
@ -19,7 +20,7 @@ export default [
|
||||||
{
|
{
|
||||||
path: "/placement/detail",
|
path: "/placement/detail",
|
||||||
name: "placementDetail",
|
name: "placementDetail",
|
||||||
component: Detail,
|
component: PlacementDetail,
|
||||||
meta: {
|
meta: {
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [7],
|
Key: [7],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue