- rename folder personal list
- add filter status contain ของหน่วยงาน
This commit is contained in:
parent
37b3fa9f0c
commit
0a74df75bc
11 changed files with 234 additions and 410 deletions
|
|
@ -5,7 +5,7 @@ const orgTree = `${env.API_URI_ORG_TREE}`;
|
||||||
export default {
|
export default {
|
||||||
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
MainDetail: (year: number) => `${placement}/exam/${year}`,
|
||||||
yearOptions: () => `${placement}/fiscal`,
|
yearOptions: () => `${placement}/fiscal`,
|
||||||
redirectToPage: (examId: string) => `${placement}/pass/${examId}`,
|
personalList: (examId: string) => `${placement}/pass/${examId}`,
|
||||||
disclaimF: () => `${placement}/pass/disclaim`,
|
disclaimF: () => `${placement}/pass/disclaim`,
|
||||||
deferment: () => `${placement}/pass/deferment`,
|
deferment: () => `${placement}/pass/deferment`,
|
||||||
getStatCard: (examId: string) => `${placement}/pass/stat/${examId}`,
|
getStatCard: (examId: string) => `${placement}/pass/stat/${examId}`,
|
||||||
|
|
|
||||||
|
|
@ -128,14 +128,15 @@ const fetchPlacementData = async (val: number) => {
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
http
|
http
|
||||||
.get(config.API.MainDetail(val))
|
.get(config.API.MainDetail(val))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
dataPlacement.value = res.data.result;
|
dataPlacement.value = res.data.result;
|
||||||
DataStore.DataMainOrig = dataPlacement.value;
|
DataStore.DataMainOrig = dataPlacement.value;
|
||||||
console.log(DataStore.DataMainOrig);
|
console.log(DataStore.DataMainOrig);
|
||||||
|
|
||||||
// rows.value = DataStore.DataMainOrig;
|
// rows.value = DataStore.DataMainOrig;
|
||||||
DataStore.DataMainOrig.map((e: any) => {
|
const dataArr: any = [];
|
||||||
rows.value.push({
|
await DataStore.DataMainOrig.map((e: any) => {
|
||||||
|
dataArr.push({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
examRound: e.examRound,
|
examRound: e.examRound,
|
||||||
examOrder: e.examOrder,
|
examOrder: e.examOrder,
|
||||||
|
|
@ -149,6 +150,8 @@ const fetchPlacementData = async (val: number) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rows.value = dataArr;
|
||||||
|
|
||||||
examTypeFilter();
|
examTypeFilter();
|
||||||
examTimeFilter();
|
examTimeFilter();
|
||||||
expiredAccountFilter();
|
expiredAccountFilter();
|
||||||
|
|
@ -160,6 +163,7 @@ const fetchPlacementData = async (val: number) => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchYearOptions = async () => {
|
const fetchYearOptions = async () => {
|
||||||
http
|
http
|
||||||
.get(config.API.yearOptions())
|
.get(config.API.yearOptions())
|
||||||
|
|
@ -185,7 +189,7 @@ const filterYear = () => {
|
||||||
|
|
||||||
// ดูรายการสอบแข่งขัน หน้าต่อไป
|
// ดูรายการสอบแข่งขัน หน้าต่อไป
|
||||||
const redirectToPage = (examId?: number) => {
|
const redirectToPage = (examId?: number) => {
|
||||||
router.push(`/placement/pass/${examId}`);
|
router.push(`/placement/personal-list/${examId}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
//-------------------|ค้นหาในตาราง|-----------------//
|
//-------------------|ค้นหาในตาราง|-----------------//
|
||||||
|
|
@ -243,9 +247,10 @@ const searchFilterTable = async () => {
|
||||||
examType.value,
|
examType.value,
|
||||||
expiredAccount.value
|
expiredAccount.value
|
||||||
);
|
);
|
||||||
// rows.value = DataStore.DataMainUpdate;
|
|
||||||
DataStore.DataMainUpdate.map((e: any) => {
|
const dataArr: any = [];
|
||||||
rows.value.push({
|
await DataStore.DataMainUpdate.map((e: any) => {
|
||||||
|
dataArr.push({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
examRound: e.examRound,
|
examRound: e.examRound,
|
||||||
examOrder: e.examOrder,
|
examOrder: e.examOrder,
|
||||||
|
|
@ -258,6 +263,7 @@ const searchFilterTable = async () => {
|
||||||
numberOfCandidates: e.numberOfCandidates,
|
numberOfCandidates: e.numberOfCandidates,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
rows.value = dataArr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -278,7 +284,7 @@ const expiredAccountFilter = async () => {
|
||||||
const paging = ref<boolean>(true);
|
const paging = ref<boolean>(true);
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "accountStartDate",
|
sortBy: "accountStartDate",
|
||||||
descending: false,
|
descending: true,
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { defineAsyncComponent } from "@vue/runtime-core";
|
import { defineAsyncComponent } from "@vue/runtime-core";
|
||||||
import { useRouter ,useRoute} from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import cardTop from "@/modules/05_placement/components/pass/StatCard.vue";
|
import cardTop from "@/modules/05_placement/components/PersonalList/StatCard.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";
|
||||||
|
|
@ -14,7 +14,7 @@ const DataStore = usePlacementDataStore();
|
||||||
|
|
||||||
const $q = useQuasar
|
const $q = useQuasar
|
||||||
const mixin = useCounterMixin()
|
const mixin = useCounterMixin()
|
||||||
const { messageError } = mixin
|
const { messageError, showLoader, hideLoader } = mixin
|
||||||
let roleAdmin = ref<boolean>(false);
|
let roleAdmin = ref<boolean>(false);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -24,7 +24,7 @@ const round = ref<string>("");
|
||||||
const title = ref<string>("");
|
const title = ref<string>("");
|
||||||
const examData = ref<any>();
|
const examData = ref<any>();
|
||||||
const AddTablePosition = defineAsyncComponent(
|
const AddTablePosition = defineAsyncComponent(
|
||||||
() => import("@/modules/05_placement/components/pass/Table.vue")
|
() => import("@/modules/05_placement/components/PersonalList/Table.vue")
|
||||||
);
|
);
|
||||||
const stat = ref<any>({
|
const stat = ref<any>({
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|
@ -37,71 +37,82 @@ const stat = ref<any>({
|
||||||
const getStat = async () => {
|
const getStat = async () => {
|
||||||
const examIdString = Array.isArray(examId) ? examId[0] : examId;
|
const examIdString = Array.isArray(examId) ? examId[0] : examId;
|
||||||
await http
|
await http
|
||||||
.get(config.API.getStatCard(examIdString))
|
.get(config.API.getStatCard(examIdString))
|
||||||
.then((res) =>{
|
.then((res) => {
|
||||||
const statCard = res.data.result;
|
const statCard = res.data.result;
|
||||||
// อัปเดตค่าในตัวแปร stat
|
// อัปเดตค่าในตัวแปร stat
|
||||||
stat.value = {
|
stat.value = {
|
||||||
total: statCard.total,
|
total: statCard.total,
|
||||||
unContain: statCard.unContain,
|
unContain: statCard.unContain,
|
||||||
prepareContain: statCard.prepareContain,
|
prepareContain: statCard.prepareContain,
|
||||||
contain: statCard.contain,
|
contain: statCard.contain,
|
||||||
disclaim: statCard.disclaim,
|
disclaim: statCard.disclaim,
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("🚀 ~ file: Table.vue:96 ~ getStatCard ~ data:", statCard);
|
console.log("🚀 ~ file: Table.vue:96 ~ getStatCard ~ data:", statCard);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
if (DataStore.DataMainOrig.length == 0) {
|
||||||
|
await fetchPlacementData();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keycloak.tokenParsed != null) {
|
||||||
|
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
|
||||||
|
}
|
||||||
|
|
||||||
|
await getStat()
|
||||||
|
|
||||||
examData.value = await DataStore.DataMainOrig.find((x: any) => x.id == examId);
|
examData.value = await DataStore.DataMainOrig.find((x: any) => x.id == examId);
|
||||||
// console.log("DataStore===>", DataStore.DataMainOrig.find((x: any) => x.id == examId))
|
|
||||||
title.value = examData.value.examRound;
|
title.value = examData.value.examRound;
|
||||||
round.value = examData.value.examOrder;
|
round.value = examData.value.examOrder;
|
||||||
year.value = examData.value.fiscalYear;
|
year.value = examData.value.fiscalYear;
|
||||||
|
|
||||||
await getStat()
|
|
||||||
if (keycloak.tokenParsed != null) {
|
|
||||||
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const fetchPlacementData = async () => {
|
||||||
|
showLoader();
|
||||||
|
http
|
||||||
|
.get(config.API.MainDetail(0))
|
||||||
|
.then(async (res) => {
|
||||||
|
DataStore.DataMainOrig = res.data.result;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
};
|
||||||
</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">
|
<div class="toptitle">
|
||||||
<q-btn
|
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="router.go(-1)" />
|
||||||
icon="mdi-arrow-left"
|
|
||||||
unelevated
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
flat
|
|
||||||
color="primary"
|
|
||||||
class="q-mr-sm"
|
|
||||||
@click="router.go(-1)"
|
|
||||||
/>
|
|
||||||
รายชื่อผู้สอบในรอบ {{ title }} ครั้งที่ {{ round }} ปี {{ year }}
|
รายชื่อผู้สอบในรอบ {{ title }} ครั้งที่ {{ round }} ปี {{ year }}
|
||||||
</div>
|
</div>
|
||||||
<q-card bordered class="q-py-sm row col-12">
|
<q-card bordered class="q-py-sm row col-12">
|
||||||
<div class="col-12 row bg-white">
|
<div class="col-12 row bg-white">
|
||||||
<div class="fit q-px-md q-py-sm">
|
<div class="fit q-px-md q-py-sm">
|
||||||
<div class="row col-12 q-col-gutter-md fit">
|
<div class="row col-12 q-col-gutter-md fit">
|
||||||
<cardTop :amount="stat.total" label="จำนวนทั้งหมด" color="#016987" />
|
<cardTop :amount="stat.total" label="จำนวนทั้งหมด" color="#016987" />
|
||||||
<cardTop v-if="roleAdmin" :amount="stat.unContain" label="จำนวนที่ยังไม่บรรจุ" color="#02A998" />
|
<cardTop v-if="roleAdmin" :amount="stat.unContain" label="จำนวนที่ยังไม่บรรจุ" color="#02A998" />
|
||||||
<cardTop :amount="stat.prepareContain" label="จำนวนที่เตรียมบรรจุ" color="#2EA0FF" />
|
<cardTop :amount="stat.prepareContain" label="จำนวนที่เตรียมบรรจุ" color="#2EA0FF" />
|
||||||
<cardTop :amount="stat.contain" label="จำนวนที่บรรจุแล้ว" color="#4154B3" />
|
<cardTop :amount="stat.contain" label="จำนวนที่บรรจุแล้ว" color="#4154B3" />
|
||||||
<cardTop :amount="stat.disclaim" label="จำนวนที่สละสิทธิ์" color="#FF5C5F" />
|
<cardTop :amount="stat.disclaim" label="จำนวนที่สละสิทธิ์" color="#FF5C5F" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm">
|
<q-card flat bordered class="col-12 q-mt-sm q-pt-sm">
|
||||||
<div>
|
<div>
|
||||||
<AddTablePosition :statCard="getStat" class="q-pa-none" @get-stat="getStat"/>
|
<AddTablePosition :statCard="getStat" class="q-pa-none" @get-stat="getStat" />
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue";
|
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -3,12 +3,12 @@ import { ref, onMounted, watch, reactive } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import Table from "@/modules/05_placement/components/pass/TableView.vue";
|
import Table from "@/modules/05_placement/components/PersonalList/TableView.vue";
|
||||||
import DialogCard from "@/modules/05_placement/components/pass/TableDetail.vue";
|
import DialogCard from "@/modules/05_placement/components/PersonalList/TableDetail.vue";
|
||||||
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue";
|
||||||
import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue";
|
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
||||||
import type { PartialTableName } from "@/modules/05_placement/interface/request/placement";
|
import type { PartialTableName } from "@/modules/05_placement/interface/request/placement";
|
||||||
import DialogOrgTree from "@/modules/05_placement/components/pass/OrgTree.vue";
|
import DialogOrgTree from "@/modules/05_placement/components/PersonalList/OrgTree.vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -35,6 +35,7 @@ const modalwaitInfo = ref<boolean>(false); //modal add detail
|
||||||
const userNote = ref<string>("");
|
const userNote = ref<string>("");
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const Name = ref<string>();
|
const Name = ref<string>();
|
||||||
|
const rowsAll = ref<any>([]);
|
||||||
const rows = ref<any>([]);
|
const rows = ref<any>([]);
|
||||||
const myForm = ref<any>();
|
const myForm = ref<any>();
|
||||||
const files = ref<any>(null);
|
const files = ref<any>(null);
|
||||||
|
|
@ -135,11 +136,10 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
const getTable = async () => {
|
const getTable = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.redirectToPage(examIdString))
|
.get(config.API.personalList(examIdString))
|
||||||
.then((res: any) => {
|
.then(async (res: any) => {
|
||||||
const dataArray: PartialTableName[] = res.data.result;
|
rowsAll.value = [];
|
||||||
rows.value = [];
|
res.data.result.map((data: any) => {
|
||||||
dataArray.map((data) => {
|
|
||||||
const rowData = {
|
const rowData = {
|
||||||
personalId: data.personalId,
|
personalId: data.personalId,
|
||||||
idCard: data.idCard,
|
idCard: data.idCard,
|
||||||
|
|
@ -157,28 +157,30 @@ const getTable = async () => {
|
||||||
data.bmaOfficer == "OFFICER"
|
data.bmaOfficer == "OFFICER"
|
||||||
? "ขรก.กทม. สามัญ"
|
? "ขรก.กทม. สามัญ"
|
||||||
: data.bmaOfficer == "EMPLOYEE_PERM"
|
: data.bmaOfficer == "EMPLOYEE_PERM"
|
||||||
? "ลูกจ้างประจำ"
|
? "ลูกจ้างประจำ"
|
||||||
: data.bmaOfficer == "EMPLOYEE_TEMP"
|
: data.bmaOfficer == "EMPLOYEE_TEMP"
|
||||||
? "ลูกจ้างชั่วคราว"
|
? "ลูกจ้างชั่วคราว"
|
||||||
: data.bmaOfficer == null
|
: data.bmaOfficer == null
|
||||||
? "บุคคลภายนอก"
|
? "บุคคลภายนอก"
|
||||||
: "-",
|
: "-",
|
||||||
statusId: data.statusId,
|
statusId: data.statusId,
|
||||||
statusName:
|
statusName:
|
||||||
data.statusId == "UN-CONTAIN"
|
data.statusId == "UN-CONTAIN"
|
||||||
? "ยังไม่บรรจุ"
|
? "ยังไม่บรรจุ"
|
||||||
: data.statusId == "PREPARE-CONTAIN"
|
: data.statusId == "PREPARE-CONTAIN"
|
||||||
? "เตรียมบรรจุ"
|
? "เตรียมบรรจุ"
|
||||||
: data.statusId == "CONTAIN"
|
: data.statusId == "CONTAIN"
|
||||||
? "บรรจุแล้ว"
|
? "บรรจุแล้ว"
|
||||||
: data.statusId == "DISCLAIM"
|
: data.statusId == "DISCLAIM"
|
||||||
? "สละสิทธิ์"
|
? "สละสิทธิ์"
|
||||||
: "-",
|
: "-",
|
||||||
deferment: data.deferment,
|
deferment: data.deferment,
|
||||||
};
|
};
|
||||||
|
|
||||||
rows.value.push(rowData);
|
rowsAll.value.push(rowData);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rows.value = roleAdmin ? rowsAll.value : rowsAll.value.filter((x: any) => x.statusId != 'CONTAIN');
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -370,101 +372,74 @@ onMounted(async () => {
|
||||||
await getTable();
|
await getTable();
|
||||||
});
|
});
|
||||||
|
|
||||||
const expiredAccount = ref<boolean>(false);
|
const containStatus = ref<boolean>(false);
|
||||||
|
watch(containStatus, () => {
|
||||||
watch(expiredAccount, () => {
|
// console.log("containStatus===>", containStatus.value);
|
||||||
console.log("expiredAccount===>", expiredAccount.value);
|
if (containStatus.value) {
|
||||||
|
rows.value = rowsAll.value.filter((x: any) => x.statusId != 'CONTAIN');
|
||||||
|
} else {
|
||||||
|
rows.value = rowsAll.value.filter((x: any) => x.statusId == 'CONTAIN');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const pagination = ref({
|
|
||||||
sortBy: "number",
|
|
||||||
descending: false,
|
|
||||||
page: 1,
|
|
||||||
rowsPerPage: 10,
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<Table
|
<Table :contain-status="containStatus" :rows="rows" :columns="columns" :filter="filter"
|
||||||
:expired-account="expiredAccount"
|
:visible-columns="visibleColumns" v-model:inputfilter="filter" v-model:inputvisible="visibleColumns"
|
||||||
:rows="rows"
|
v-model:editvisible="editvisible" v-model:containfilter="containStatus" :history="true" :boss="true"
|
||||||
:columns="columns"
|
:saveNoDraft="true" :role-admin="roleAdmin">
|
||||||
:filter="filter"
|
|
||||||
:visible-columns="visibleColumns"
|
|
||||||
v-model:inputfilter="filter"
|
|
||||||
v-model:inputvisible="visibleColumns"
|
|
||||||
v-model:editvisible="editvisible"
|
|
||||||
v-model:expiredaccountfilter="expiredAccount"
|
|
||||||
:history="true"
|
|
||||||
:boss="true"
|
|
||||||
:saveNoDraft="true"
|
|
||||||
:role-admin="roleAdmin"
|
|
||||||
>
|
|
||||||
<template #columns="props">
|
<template #columns="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-td
|
<q-td v-for="col in props.cols" :key="col.name" :props="props" @click="selectData(props.row.personalId)"
|
||||||
v-for="col in props.cols"
|
class="cursor-pointer">
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
@click="selectData(props.row.personalId)"
|
|
||||||
class="cursor-pointer"
|
|
||||||
>
|
|
||||||
<template v-if="col.name === 'position'">
|
<template v-if="col.name === 'position'">
|
||||||
{{ props.rowIndex + 1 }}
|
{{ props.rowIndex + 1 }}
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template v-else-if="col.name === 'fullName'" class="table_ellipsis">
|
||||||
v-else-if="col.name === 'fullName'"
|
|
||||||
class="table_ellipsis"
|
|
||||||
>
|
|
||||||
<div class="row col-12 text-no-wrap items-center">
|
<div class="row col-12 text-no-wrap items-center">
|
||||||
<img
|
<img v-if="props.row.avatar == null" src="@/assets/avatar_user.jpg" class="col-4 img-info" />
|
||||||
v-if="props.row.avatar == null"
|
|
||||||
src="@/assets/avatar_user.jpg"
|
|
||||||
class="col-4 img-info"
|
|
||||||
/>
|
|
||||||
<img v-else :src="props.row.avatar" class="col-4 img-info" />
|
<img v-else :src="props.row.avatar" class="col-4 img-info" />
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="text-weight-medium">{{ props.row.name }}</div>
|
<div class="text-weight-medium">{{ props.row.name }}</div>
|
||||||
<div class="text-weight-light">{{ props.row.idCard }}</div>
|
<div class="text-weight-light">{{ props.row.idCard }}</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
<template v-else-if="col.name === 'number'">
|
</template>
|
||||||
<div class="text-weight-medium">
|
<template v-else-if="col.name === 'number'">
|
||||||
{{ props.row.number !== null ? props.row.number : "-" }}
|
<div class="text-weight-medium">
|
||||||
</div>
|
{{ props.row.number !== null ? props.row.number : "-" }}
|
||||||
</template>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-else-if="col.name === 'organizationName'">
|
<template v-else-if="col.name === 'organizationName'">
|
||||||
<div
|
<div v-if="props.row.orgName !== null ||
|
||||||
v-if="props.row.orgName !== null ||
|
props.row.positionPath !== null
|
||||||
props.row.positionPath !== null
|
">
|
||||||
"
|
<div class="col-4">
|
||||||
>
|
<div class="text-weight-medium">
|
||||||
<div class="col-4">
|
{{
|
||||||
<div class="text-weight-medium">
|
props.row.orgName !== null
|
||||||
{{
|
? props.row.orgName
|
||||||
props.row.orgName !== null
|
: "-"
|
||||||
? props.row.orgName
|
|
||||||
: "-"
|
|
||||||
}}
|
}}
|
||||||
{{
|
{{
|
||||||
props.row.organizationShortName !== null
|
props.row.organizationShortName !== null
|
||||||
? `(${props.row.organizationShortName})`
|
? `(${props.row.organizationShortName})`
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-weight-light">
|
<div class="text-weight-light">
|
||||||
{{
|
{{
|
||||||
props.row.positionPath !== null
|
props.row.positionPath !== null
|
||||||
? props.row.positionPath
|
? props.row.positionPath
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
{{
|
{{
|
||||||
props.row.positionNumber !== null
|
props.row.positionNumber !== null
|
||||||
? `(${props.row.positionNumber})`
|
? `(${props.row.positionNumber})`
|
||||||
: ""
|
: ""
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -475,9 +450,7 @@ const pagination = ref({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template v-else-if="col.name === 'reportingDate' && col.value !== '-'">
|
||||||
v-else-if="col.name === 'reportingDate' && col.value !== '-'"
|
|
||||||
>
|
|
||||||
<div class="text-weight-medium">
|
<div class="text-weight-medium">
|
||||||
{{ props.row.reportingDate }}
|
{{ props.row.reportingDate }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -494,116 +467,45 @@ const pagination = ref({
|
||||||
</template>
|
</template>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn icon="mdi-dots-vertical" size="12px" color="grey-7" flat round dense>
|
||||||
icon="mdi-dots-vertical"
|
|
||||||
size="12px"
|
|
||||||
color="grey-7"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
dense
|
|
||||||
>
|
|
||||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
||||||
<q-list dense style="min-width: 100px">
|
<q-list dense style="min-width: 100px">
|
||||||
<q-item
|
<q-item v-if="roleAdmin && props.row.statusId === 'UN-CONTAIN'" clickable v-close-popup
|
||||||
v-if="roleAdmin && props.row.statusId === 'UN-CONTAIN'"
|
@click="openAppointModal(props.row.personalId)">
|
||||||
clickable
|
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||||
v-close-popup
|
<q-icon color="primary" size="xs" name="mdi-bookmark-outline" />
|
||||||
@click="openAppointModal(props.row.personalId)"
|
|
||||||
>
|
|
||||||
<q-item-section
|
|
||||||
style="min-width: 0px"
|
|
||||||
avatar
|
|
||||||
class="q-py-sm"
|
|
||||||
>
|
|
||||||
<q-icon
|
|
||||||
color="primary"
|
|
||||||
size="xs"
|
|
||||||
name="mdi-bookmark-outline"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>เลือกหน่วยงานที่รับบรรจุ</q-item-section>
|
<q-item-section>เลือกหน่วยงานที่รับบรรจุ</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-item
|
<q-item v-if="roleAdmin && props.row.statusId === 'UN-CONTAIN'" clickable v-close-popup
|
||||||
v-if="roleAdmin && props.row.statusId === 'UN-CONTAIN'"
|
@click="editDetail(props.row, 'deferment')">
|
||||||
clickable
|
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||||
v-close-popup
|
<q-icon color="blue" size="xs" name="mdi-account-alert-outline" />
|
||||||
@click="editDetail(props.row, 'deferment')"
|
|
||||||
>
|
|
||||||
<q-item-section
|
|
||||||
style="min-width: 0px"
|
|
||||||
avatar
|
|
||||||
class="q-py-sm"
|
|
||||||
>
|
|
||||||
<q-icon
|
|
||||||
color="blue"
|
|
||||||
size="xs"
|
|
||||||
name="mdi-account-alert-outline"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>ขอผ่อนผัน</q-item-section>
|
<q-item-section>ขอผ่อนผัน</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item v-else-if="props.row.deferment === true &&
|
||||||
v-else-if="
|
props.row.statusId != 'DISCLAIM'
|
||||||
props.row.deferment === true &&
|
" clickable v-close-popup @click="editDetail(props.row, 'defermentInfo')">
|
||||||
props.row.statusId != 'DISCLAIM'
|
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||||
"
|
<q-icon color="blue" size="xs" name="mdi-account-details-outline" />
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="editDetail(props.row, 'defermentInfo')"
|
|
||||||
>
|
|
||||||
<q-item-section
|
|
||||||
style="min-width: 0px"
|
|
||||||
avatar
|
|
||||||
class="q-py-sm"
|
|
||||||
>
|
|
||||||
<q-icon
|
|
||||||
color="blue"
|
|
||||||
size="xs"
|
|
||||||
name="mdi-account-details-outline"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>ข้อมูลการผ่อนผัน</q-item-section>
|
<q-item-section>ข้อมูลการผ่อนผัน</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-item
|
<q-item v-if="props.row.statusId === 'UN-CONTAIN' ||
|
||||||
v-if="
|
props.row.statusId === 'PREPARE-CONTAIN'
|
||||||
props.row.statusId === 'UN-CONTAIN' ||
|
" clickable v-close-popup @click="editDetail(props.row, 'disclaim')">
|
||||||
props.row.statusId === 'PREPARE-CONTAIN'
|
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||||
"
|
<q-icon color="pink" size="xs" name="mdi-account-cancel-outline" />
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="editDetail(props.row, 'disclaim')"
|
|
||||||
>
|
|
||||||
<q-item-section
|
|
||||||
style="min-width: 0px"
|
|
||||||
avatar
|
|
||||||
class="q-py-sm"
|
|
||||||
>
|
|
||||||
<q-icon
|
|
||||||
color="pink"
|
|
||||||
size="xs"
|
|
||||||
name="mdi-account-cancel-outline"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>สละสิทธิ์</q-item-section>
|
<q-item-section>สละสิทธิ์</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item v-else-if="props.row.statusId === 'DISCLAIM'" clickable v-close-popup
|
||||||
v-else-if="props.row.statusId === 'DISCLAIM'"
|
@click="editDetail(props.row, 'disclaimInfo')">
|
||||||
clickable
|
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||||
v-close-popup
|
<q-icon color="pink" size="xs" name="mdi-account-cancel-outline" />
|
||||||
@click="editDetail(props.row, 'disclaimInfo')"
|
|
||||||
>
|
|
||||||
<q-item-section
|
|
||||||
style="min-width: 0px"
|
|
||||||
avatar
|
|
||||||
class="q-py-sm"
|
|
||||||
>
|
|
||||||
<q-icon
|
|
||||||
color="pink"
|
|
||||||
size="xs"
|
|
||||||
name="mdi-account-cancel-outline"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>ข้อมูลการสละสิทธิ์</q-item-section>
|
<q-item-section>ข้อมูลการสละสิทธิ์</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
@ -617,57 +519,25 @@ const pagination = ref({
|
||||||
</q-form>
|
</q-form>
|
||||||
|
|
||||||
<!-- เลือกหน่วยงานที่บรรจุ -->
|
<!-- เลือกหน่วยงานที่บรรจุ -->
|
||||||
<DialogOrgTree
|
<DialogOrgTree v-model:modal="appointModal" :personalId="personalId" :close="clickCloseModalTree" />
|
||||||
v-model:modal="appointModal"
|
|
||||||
:personalId="personalId"
|
|
||||||
:close="clickCloseModalTree"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- popup ขอผ่อนผัน / สละสิทธิ์ -->
|
<!-- popup ขอผ่อนผัน / สละสิทธิ์ -->
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<DialogCard
|
<DialogCard v-model:Modal="modal" :personal-id="personalId" :close="clickClose" :validate="validateData" />
|
||||||
v-model:Modal="modal"
|
|
||||||
:personal-id="personalId"
|
|
||||||
:close="clickClose"
|
|
||||||
:validate="validateData"
|
|
||||||
/>
|
|
||||||
</q-form>
|
</q-form>
|
||||||
<q-dialog v-model="modalDefermentDisclaim" persistent>
|
<q-dialog v-model="modalDefermentDisclaim" persistent>
|
||||||
<q-card style="width: 800px">
|
<q-card style="width: 800px">
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<DialogHeader
|
<DialogHeader :title="`${modalDisclaim ? 'สละสิทธิ์' : 'ขอผ่อนผัน'} ชื่อ${Name}`" :close="clickClose" />
|
||||||
:title="`${modalDisclaim ? 'สละสิทธิ์' : 'ขอผ่อนผัน'} ชื่อ${Name}`"
|
|
||||||
:close="clickClose"
|
|
||||||
/>
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-p-sm">
|
<q-card-section class="q-p-sm">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||||
<q-input
|
<q-input :class="getClass(edit)" hide-bottom-space :outlined="edit" dense lazy-rules
|
||||||
:class="getClass(edit)"
|
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']" :readonly="!edit" :borderless="!edit" v-model="userNote"
|
||||||
hide-bottom-space
|
:label="`${'กรอกเหตุผล'}`" @update:model-value="clickEditRow" type="textarea" />
|
||||||
:outlined="edit"
|
<q-file v-if="getNumFile === 1" v-model="files" dense :label="`${'เลือกไฟล์เอกสารหลักฐาน'}`" outlined
|
||||||
dense
|
use-chips :rules="[(val) => !!val || 'กรุณาเลือกไฟล์เอกสารหลักฐาน']" multiple
|
||||||
lazy-rules
|
@update:model-value="clickEditRow" class="q-py-sm">
|
||||||
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']"
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="userNote"
|
|
||||||
:label="`${'กรอกเหตุผล'}`"
|
|
||||||
@update:model-value="clickEditRow"
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
<q-file
|
|
||||||
v-if="getNumFile === 1"
|
|
||||||
v-model="files"
|
|
||||||
dense
|
|
||||||
:label="`${'เลือกไฟล์เอกสารหลักฐาน'}`"
|
|
||||||
outlined
|
|
||||||
use-chips
|
|
||||||
:rules="[(val) => !!val || 'กรุณาเลือกไฟล์เอกสารหลักฐาน']"
|
|
||||||
multiple
|
|
||||||
@update:model-value="clickEditRow"
|
|
||||||
class="q-py-sm"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="attach_file" color="primary" />
|
<q-icon name="attach_file" color="primary" />
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -675,11 +545,7 @@ const pagination = ref({
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<DialogFooter
|
<DialogFooter :editvisible="true" :validate="validateData" :save="modalDisclaim ? saveDisclaim : saveDeferment" />
|
||||||
:editvisible="true"
|
|
||||||
:validate="validateData"
|
|
||||||
:save="modalDisclaim ? saveDisclaim : saveDeferment"
|
|
||||||
/>
|
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
@ -688,10 +554,7 @@ const pagination = ref({
|
||||||
<q-dialog v-model="modalwaitInfo" persistent>
|
<q-dialog v-model="modalwaitInfo" persistent>
|
||||||
<q-card style="width: 500px; max-width: 500px">
|
<q-card style="width: 500px; max-width: 500px">
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<DialogHeader
|
<DialogHeader :title="`${modalDisclaim ? 'สละสิทธิ์' : 'ขอผ่อนผัน'} ชื่อ${Name}`" :close="clickClose" />
|
||||||
:title="`${modalDisclaim ? 'สละสิทธิ์' : 'ขอผ่อนผัน'} ชื่อ${Name}`"
|
|
||||||
:close="clickClose"
|
|
||||||
/>
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-p-sm">
|
<q-card-section class="q-p-sm">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -701,17 +564,8 @@ const pagination = ref({
|
||||||
<div v-if="!modalDisclaim" class="row q-pt-md">
|
<div v-if="!modalDisclaim" class="row q-pt-md">
|
||||||
<div class="col-3 text-grey-7 q-mt-sm">เอกสารหลักฐาน</div>
|
<div class="col-3 text-grey-7 q-mt-sm">เอกสารหลักฐาน</div>
|
||||||
<div class="col-2 q-mt-sm">
|
<div class="col-2 q-mt-sm">
|
||||||
<q-btn
|
<q-btn type="a" :href="dataInfo.reliefDoc" color="primary" flat dense round size="14px" icon="mdi-download"
|
||||||
type="a"
|
target="_blank" />
|
||||||
:href="dataInfo.reliefDoc"
|
|
||||||
color="primary"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
size="14px"
|
|
||||||
icon="mdi-download"
|
|
||||||
target="_blank"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import DialogHeader from "@/modules/05_placement/components/pass/DialogHeader.vue";
|
import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogHeader.vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import DialogFooter from "@/modules/05_placement/components/pass/DialogFooter.vue";
|
import DialogFooter from "@/modules/05_placement/components/PersonalList/DialogFooter.vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -28,7 +28,7 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const rows = ref<any[]>([
|
const rows = ref<any[]>([
|
||||||
]);
|
]);
|
||||||
//--------------------(แปลงวันที่เป็นไทย)------------------------------------//
|
//--------------------(แปลงวันที่เป็นไทย)------------------------------------//
|
||||||
// const graduationDate = new Date(graduationExample);
|
// const graduationDate = new Date(graduationExample);
|
||||||
// rows.value[0].graduation = date2Thai(graduationDate, false, false);
|
// rows.value[0].graduation = date2Thai(graduationDate, false, false);
|
||||||
|
|
@ -190,10 +190,7 @@ const putpersonalForm = async () => {
|
||||||
<q-card style="max-width: 100%; width: 80%">
|
<q-card style="max-width: 100%; width: 80%">
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<DialogHeader
|
<DialogHeader :title="`รายละเอียดของ ${personalForm.fullName}`" @click="close" />
|
||||||
:title="`รายละเอียดของ ${personalForm.fullName}`"
|
|
||||||
@click="close"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
|
|
@ -202,12 +199,8 @@ const putpersonalForm = async () => {
|
||||||
<q-card bordered class="card-panding">
|
<q-card bordered class="card-panding">
|
||||||
<div class="row items-center q-pa-xs header-text">
|
<div class="row items-center q-pa-xs header-text">
|
||||||
ข้อมูลทั่วไป
|
ข้อมูลทั่วไป
|
||||||
<span class="check-officer"
|
<span class="check-officer"><q-icon name="mdi-check" v-if="personalForm.bmaofficer !== null && ''" />{{
|
||||||
><q-icon
|
formBmaofficer(personalForm.bmaofficer) }}</span>
|
||||||
name="mdi-check"
|
|
||||||
v-if="personalForm.bmaofficer !== null && ''"
|
|
||||||
/>{{ formBmaofficer(personalForm.bmaofficer) }}</span
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-pa-xs">
|
<div class="row q-pa-xs">
|
||||||
<div class="col-3 header-sub-text">
|
<div class="col-3 header-sub-text">
|
||||||
|
|
@ -251,18 +244,8 @@ const putpersonalForm = async () => {
|
||||||
<div class="contanier-box-mini">
|
<div class="contanier-box-mini">
|
||||||
<q-card bordered class="card-panding">
|
<q-card bordered class="card-panding">
|
||||||
<div class="row items-center q-pa-xs header-text">การศึกษา</div>
|
<div class="row items-center q-pa-xs header-text">การศึกษา</div>
|
||||||
<q-table
|
<q-table ref="table" :rows="rows" :columns="columns" flat bordered class="custom-header-table"
|
||||||
ref="table"
|
virtual-scroll :virtual-scroll-sticky-size-start="48" dense hide-bottom>
|
||||||
:rows="rows"
|
|
||||||
:columns="columns"
|
|
||||||
flat
|
|
||||||
bordered
|
|
||||||
class="custom-header-table"
|
|
||||||
virtual-scroll
|
|
||||||
:virtual-scroll-sticky-size-start="48"
|
|
||||||
dense
|
|
||||||
hide-bottom
|
|
||||||
>
|
|
||||||
</q-table>
|
</q-table>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -339,21 +322,9 @@ const putpersonalForm = async () => {
|
||||||
<div class="col-12 row items-center q-pa-sm header-text">
|
<div class="col-12 row items-center q-pa-sm header-text">
|
||||||
การคัดกรองคุณสมบัติ
|
การคัดกรองคุณสมบัติ
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div v-for="(item, index) of personalForm.isProperty" :key="index" class="q-pa-sm">
|
||||||
v-for="(item, index) of personalForm.isProperty"
|
<q-checkbox size="xs" v-model="item.value" :val="item.value" :label="item.name" keep-color color="teal"
|
||||||
:key="index"
|
:rules="[isRequired]" class="checkbox-group" />
|
||||||
class="q-pa-sm"
|
|
||||||
>
|
|
||||||
<q-checkbox
|
|
||||||
size="xs"
|
|
||||||
v-model="item.value"
|
|
||||||
:val="item.value"
|
|
||||||
:label="item.name"
|
|
||||||
keep-color
|
|
||||||
color="teal"
|
|
||||||
:rules="[isRequired]"
|
|
||||||
class="checkbox-group"
|
|
||||||
/>
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
@ -361,12 +332,7 @@ const putpersonalForm = async () => {
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<div>
|
<div>
|
||||||
<DialogFooter
|
<DialogFooter @click="ClickSave" :model="props.Modal" :editvisible="save" :validate="validateData" />
|
||||||
@click="ClickSave"
|
|
||||||
:model="props.Modal"
|
|
||||||
:editvisible="save"
|
|
||||||
:validate="validateData"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
@ -410,6 +376,7 @@ const putpersonalForm = async () => {
|
||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
color: #818181;
|
color: #818181;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-text {
|
.sub-text {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
@ -1,44 +1,44 @@
|
||||||
<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">
|
<div class="col-12 row q-py-sm">
|
||||||
<q-toggle v-if="roleAdmin === false" class="col-xs-12 col-sm-5 col-md-5 toggle-expired-account"
|
<q-toggle v-if="roleAdmin === false" class="col-xs-12 col-sm-5 col-md-5 toggle-expired-account"
|
||||||
:model-value="expiredAccount" color="blue" label="แสดงบัญชีหมดอายุ" @update:model-value="updateExpiredAccount" />
|
:model-value="containStatus" color="blue" label="แสดงสถานะบรรจุแล้ว" @update:model-value="updateContain" />
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="items-center" style="display: flex">
|
<div class="items-center" style="display: flex">
|
||||||
<q-input standout dense :model-value="inputfilter" ref="filterRef" @update:model-value="updateInput" outlined
|
<q-input standout dense :model-value="inputfilter" ref="filterRef" @update:model-value="updateInput" outlined
|
||||||
debounce="300" placeholder="ค้นหา" style="max-width: 200px" class="q-ml-sm">
|
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 v-if="inputfilter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
<q-icon v-if="inputfilter !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<!-- แสดง table ใน คอลัมน์ -->
|
<!-- แสดง table ใน คอลัมน์ -->
|
||||||
<q-select :model-value="inputvisible" @update:model-value="updateVisible" :display-value="$q.lang.table.columns"
|
<q-select :model-value="inputvisible" @update:model-value="updateVisible" :display-value="$q.lang.table.columns"
|
||||||
multiple outlined dense :options="attrs.columns" options-dense option-value="name" map-options emit-value
|
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" />
|
style="min-width: 150px" class="gt-xs q-ml-sm" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-table ref="table" flat bordered class="custom-header-table" v-bind="attrs" virtual-scroll
|
<q-table ref="table" flat bordered class="custom-header-table" v-bind="attrs" virtual-scroll
|
||||||
:virtual-scroll-sticky-size-start="48" dense :pagination-label="paginationLabel" v-model:pagination="pagination">
|
:virtual-scroll-sticky-size-start="48" dense :pagination-label="paginationLabel" v-model:pagination="pagination">
|
||||||
<template v-slot:pagination="scope">
|
<template v-slot:pagination="scope">
|
||||||
<q-pagination v-model="pagination.page" color="primary" :max="scope.pagesNumber" :max-pages="5" size="sm"
|
<q-pagination v-model="pagination.page" color="primary" :max="scope.pagesNumber" :max-pages="5" size="sm"
|
||||||
boundary-links direction-links></q-pagination>
|
boundary-links direction-links></q-pagination>
|
||||||
</template>
|
</template>
|
||||||
<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">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
<q-th auto-width v-if="history == true" />
|
<q-th auto-width v-if="history == true" />
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template #body="props">
|
<template #body="props">
|
||||||
<slot v-bind="props" name="columns"></slot>
|
<slot v-bind="props" name="columns"></slot>
|
||||||
</template>
|
</template>
|
||||||
</q-table>
|
</q-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -133,12 +133,12 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
},
|
},
|
||||||
expiredAccount: Boolean,
|
containStatus: Boolean,
|
||||||
roleAdmin: Boolean
|
roleAdmin: Boolean
|
||||||
});
|
});
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "number",
|
sortBy: "number",
|
||||||
descending: true,
|
descending: false,
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
|
@ -158,7 +158,7 @@ const emit = defineEmits([
|
||||||
"update:editvisible",
|
"update:editvisible",
|
||||||
"update:titleText",
|
"update:titleText",
|
||||||
"update:inputvisibleFilter",
|
"update:inputvisibleFilter",
|
||||||
"update:expiredaccountfilter"
|
"update:containfilter"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const updateInput = (value: any) => {
|
const updateInput = (value: any) => {
|
||||||
|
|
@ -167,23 +167,9 @@ const updateInput = (value: any) => {
|
||||||
const updateVisible = (value: any) => {
|
const updateVisible = (value: any) => {
|
||||||
emit("update:inputvisible", value);
|
emit("update:inputvisible", value);
|
||||||
};
|
};
|
||||||
const updateVisibleFilter = (value: any) => {
|
|
||||||
emit("update:inputvisibleFilter", value);
|
|
||||||
};
|
|
||||||
|
|
||||||
const updateExpiredAccount = (value: any) => {
|
const updateContain = (value: any) => {
|
||||||
emit("update:expiredaccountfilter", value);
|
emit("update:containfilter", value);
|
||||||
};
|
|
||||||
|
|
||||||
const checkSave = () => {
|
|
||||||
props.validate();
|
|
||||||
props.save();
|
|
||||||
// if (myForm.value !== null) {
|
|
||||||
// myForm.value.validate().then((success) => {
|
|
||||||
// if (success) {
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetFilter = () => {
|
const resetFilter = () => {
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
const PlacementMain = () =>
|
const PlacementMain = () =>
|
||||||
import("@/modules/05_placement/components/Main.vue");
|
import("@/modules/05_placement/components/Main.vue");
|
||||||
const PlacementDetail = () =>
|
const PlacementDetail = () =>
|
||||||
import("@/modules/05_placement/components/pass/Detail.vue");
|
import("@/modules/05_placement/components/PersonalList/Detail.vue");
|
||||||
const PlacementPersonalDetail = () =>
|
const PlacementPersonalDetail = () =>
|
||||||
import("@/modules/05_placement/components/PersonalDetail/Detail.vue");
|
import("@/modules/05_placement/components/PersonalDetail/Detail.vue");
|
||||||
const addOrderPlacement = () =>
|
const addOrderPlacement = () =>
|
||||||
|
|
@ -29,8 +29,8 @@ const probationDetail = () =>
|
||||||
const probationForm = () =>
|
const probationForm = () =>
|
||||||
import("@/modules/05_placement/components/probation/form.vue");
|
import("@/modules/05_placement/components/probation/form.vue");
|
||||||
|
|
||||||
const probationWorkAdd = () =>
|
const probationWorkAdd = () =>
|
||||||
import("@/modules/05_placement/components/probation/AddWork.vue");
|
import("@/modules/05_placement/components/probation/AddWork.vue");
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: "/placement",
|
path: "/placement",
|
||||||
|
|
@ -43,7 +43,7 @@ export default [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/placement/pass/:examId",
|
path: "/placement/personal-list/:examId",
|
||||||
name: "placementDetail",
|
name: "placementDetail",
|
||||||
component: PlacementDetail,
|
component: PlacementDetail,
|
||||||
meta: {
|
meta: {
|
||||||
|
|
@ -53,7 +53,7 @@ export default [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/placement/detail/:personalId",
|
path: "/placement/personal-detail/:personalId",
|
||||||
name: "PlacementPersonalDetail",
|
name: "PlacementPersonalDetail",
|
||||||
component: PlacementPersonalDetail,
|
component: PlacementPersonalDetail,
|
||||||
meta: {
|
meta: {
|
||||||
|
|
@ -130,7 +130,7 @@ export default [
|
||||||
Auth: true,
|
Auth: true,
|
||||||
Key: [6.3],
|
Key: [6.3],
|
||||||
Role: "placement",
|
Role: "placement",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/probation/work/:id",
|
path: "/probation/work/:id",
|
||||||
|
|
@ -141,5 +141,5 @@ export default [
|
||||||
Key: [6.3],
|
Key: [6.3],
|
||||||
Role: "placement",
|
Role: "placement",
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue