ทะเบียนประวัติ ==> ข้อมูลตำแหน่ง
This commit is contained in:
parent
3d527561c5
commit
3e17d3a25a
4 changed files with 198 additions and 42 deletions
|
|
@ -14,6 +14,8 @@ import type { Avatar } from "@/components/information/interface/response/avatar"
|
|||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import CardPosition from "@/modules/21_report/components/CardPosition.vue";
|
||||
|
||||
/** use*/
|
||||
const route = useRoute();
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -24,6 +26,7 @@ const { showLoader, hideLoader, messageError, date2Thai } = mixin;
|
|||
|
||||
const isEmployee = defineModel("isEmployee", { type: String });
|
||||
const empType = ref<string>("officer");
|
||||
const checkRoute = ref<boolean>(route.name == "reportRegistry");
|
||||
/** props*/
|
||||
const props = defineProps({
|
||||
id: {
|
||||
|
|
@ -172,7 +175,9 @@ async function fetchProfileGov(id: string) {
|
|||
}
|
||||
|
||||
function redirecToRegistry() {
|
||||
router.push(`/registry-${props.type == 'employee' ? 'employee':'officer'}/${props.id}`);
|
||||
router.push(
|
||||
`/registry-${props.type == "employee" ? "employee" : "officer"}/${props.id}`
|
||||
);
|
||||
modal.value = false;
|
||||
}
|
||||
|
||||
|
|
@ -422,7 +427,11 @@ async function fetchProfile(id: string, avatarName: string) {
|
|||
:model-value="
|
||||
goverment.positionType ? goverment.positionType : '-'
|
||||
"
|
||||
:label="props.type == 'employee' ? 'กลุ่มงาน':'ประเภทตำแหน่ง'"
|
||||
:label="
|
||||
props.type == 'employee'
|
||||
? 'กลุ่มงาน'
|
||||
: 'ประเภทตำแหน่ง'
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-6">
|
||||
|
|
@ -434,7 +443,11 @@ async function fetchProfile(id: string, avatarName: string) {
|
|||
? goverment.positionLevel
|
||||
: '-'
|
||||
"
|
||||
:label="props.type == 'employee' ? 'ระดับชั้นงาน':'ระดับตำแหน่ง'"
|
||||
:label="
|
||||
props.type == 'employee'
|
||||
? 'ระดับชั้นงาน'
|
||||
: 'ระดับตำแหน่ง'
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
|
|
@ -470,6 +483,14 @@ async function fetchProfile(id: string, avatarName: string) {
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-card
|
||||
bordered
|
||||
style="border: 1px solid #d6dee1"
|
||||
v-if="checkRoute"
|
||||
>
|
||||
<CardPosition :id="props.id" :type="props.type" />
|
||||
</q-card>
|
||||
</div>
|
||||
</q-scroll-area>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -289,6 +289,27 @@ const posExecutiveOptionMain = ref<DataOption[]>([]);
|
|||
|
||||
const docOption = ref<DataOption2[]>(store.optionTemplateDoc);
|
||||
|
||||
const cardData = ref<any[]>([
|
||||
{
|
||||
label: "ระยะเวลาดำรงตำแหน่งในสายงาน",
|
||||
data: [
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "ระยะเวลาดำรงตำแหน่งตามระดับ",
|
||||
data: [{ name: "ละดับ", time: "1 ปี" }],
|
||||
},
|
||||
{
|
||||
label: "ระยะเวลาดำรงตำแหน่งทางการบริหาร",
|
||||
data: [{ name: "ตำแหน่งทางการบริหาร", time: "1 ปี" }],
|
||||
},
|
||||
]);
|
||||
|
||||
/** function fetch รายการ ตำแหน่งเงินเดือน*/
|
||||
async function fetchListSalary() {
|
||||
showLoader();
|
||||
|
|
@ -715,7 +736,24 @@ onMounted(() => {
|
|||
fetchListSalary();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row q-col-gutter-sm q-pb-sm">
|
||||
<div class="col" v-for="(item, index) in cardData" :key="index">
|
||||
<q-card bordered class="col-12" style="border: 1px solid #d6dee1">
|
||||
<div class="col-12 text-weight-medium bg-grey-1 q-py-xs q-px-md">
|
||||
{{ item.label }}
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-card-section class="q-pt-none" style="min-height: 200px">
|
||||
<li v-for="data in item.data" :key="data.id">
|
||||
{{ data.name }} {{ data.time }}
|
||||
</li>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-btn
|
||||
v-if="!isLeave && checkPermission($route)?.attrIsUpdate"
|
||||
|
|
|
|||
67
src/modules/21_report/components/CardPosition.vue
Normal file
67
src/modules/21_report/components/CardPosition.vue
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
/** props*/
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: String,
|
||||
requier: true,
|
||||
},
|
||||
|
||||
type: { type: String, default: "" },
|
||||
});
|
||||
|
||||
const cardData = ref<any[]>([
|
||||
{
|
||||
label: "ระยะเวลาดำรงตำแหน่งในสายงาน",
|
||||
data: [
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
{ name: "ตำแหน่ง", time: "1 ปี" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "ระยะเวลาดำรงตำแหน่งตามระดับ",
|
||||
data: [{ name: "ละดับ", time: "1 ปี" }],
|
||||
},
|
||||
{
|
||||
label: "ระยะเวลาดำรงตำแหน่งทางการบริหาร",
|
||||
data: [{ name: "ตำแหน่งทางการบริหาร", time: "1 ปี" }],
|
||||
},
|
||||
]);
|
||||
|
||||
onMounted(() => {
|
||||
console.log(props.id);
|
||||
console.log(props.type);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="q-pa-md">
|
||||
<div class="text-weight-bold row items-center">
|
||||
<q-icon name="mdi-account-tie" color="grey-7" />
|
||||
<span class="q-ml-md">ข้อมูลตำแหน่ง </span>
|
||||
</div>
|
||||
<div class="row q-pa-sm">
|
||||
<q-list flat bordered class="col-12" style="border-radius: 5px;">
|
||||
<q-card flat v-for="(item, index) in cardData" :key="index">
|
||||
<q-item>
|
||||
<q-item-section>
|
||||
<q-item-label class="text-grey-6">{{ item.label }}</q-item-label>
|
||||
<q-item-label
|
||||
><li v-for="data in item.data" :key="data.id">
|
||||
{{ data.name }} {{ data.time }}
|
||||
</li>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-separator spaced v-if="index !== 2" />
|
||||
</q-card>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -301,7 +301,7 @@ const columns = computed<QTableProps["columns"]>(() => {
|
|||
{
|
||||
name: "lengthPosition",
|
||||
align: "left",
|
||||
label: "ระยะเวลาดำรงตำแหน่งในเเต่ละระดับ",
|
||||
label: "ระยะเวลาดำรงตำแหน่งในระดับปัจจุบัน",
|
||||
sortable: true,
|
||||
field: "lengthPosition",
|
||||
headerStyle: "font-size: 14px",
|
||||
|
|
@ -318,6 +318,12 @@ const visibleColumns = computed<string[]>(() => {
|
|||
: visibleColumnsBase.value.filter((e: string) => e !== "positionExecutive");
|
||||
});
|
||||
|
||||
const typeTerm = ref<string>("");
|
||||
const rangeTerm = ref<RangeAge>({
|
||||
min: 0,
|
||||
max: 20,
|
||||
});
|
||||
|
||||
function onOpenOrg() {
|
||||
modalOrg.value = true;
|
||||
}
|
||||
|
|
@ -616,6 +622,10 @@ function clearFilter() {
|
|||
|
||||
expandedModal.value = false;
|
||||
filterTree.value = "";
|
||||
|
||||
typeTerm.value = "";
|
||||
rangeTerm.value.min = 0;
|
||||
rangeTerm.value.max = 20;
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
@ -1421,48 +1431,68 @@ onMounted(async () => {
|
|||
</q-select>
|
||||
</div>
|
||||
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="col-12">
|
||||
<!-- <q-btn-dropdown
|
||||
:label="
|
||||
sortBy
|
||||
? sortBy == 'DESC'
|
||||
? `เรียงตามวันที่บรรจุเเต่งตั้ง
|
||||
(เก่า-ล่าสุด)`
|
||||
: `เรียงตามวันที่บรรจุเเต่งตั้ง
|
||||
(ล่าสุด-เก่า)`
|
||||
: 'ลำดับการเเสดงผล'
|
||||
"
|
||||
dropdown-icon="mdi-chevron-down"
|
||||
rounded
|
||||
text-color="primary"
|
||||
dense
|
||||
padding="xs md"
|
||||
label-color="white"
|
||||
outline
|
||||
>
|
||||
<q-list>
|
||||
<q-item clickable v-close-popup @click="sortBy = 'ASC'">
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
>เรียงตามวันที่บรรจุเเต่งตั้ง
|
||||
(ล่าสุด-เก่า)</q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item clickable v-close-popup @click="sortBy = 'DESC'">
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
>เรียงตามวันที่บรรจุเเต่งตั้ง
|
||||
(เก่า-ล่าสุด)</q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown> -->
|
||||
<div class="">
|
||||
<q-radio
|
||||
v-model="typeTerm"
|
||||
val="position"
|
||||
label="ระยะเวลาดำรงตำแหน่งปัจจุบัน"
|
||||
size="xs"
|
||||
class="text-grey-8"
|
||||
/>
|
||||
<q-radio
|
||||
v-model="typeTerm"
|
||||
val="level"
|
||||
label="ระยะเวลาดำรงตำแหน่งในระดับปัจจุบัน"
|
||||
size="xs"
|
||||
class="text-grey-8"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-pa-md" v-if="typeTerm">
|
||||
<q-range
|
||||
v-model="rangeTerm"
|
||||
:min="0"
|
||||
:max="20"
|
||||
label
|
||||
color="primary"
|
||||
track-size="4px"
|
||||
thumb-size="16px"
|
||||
switch-label-side
|
||||
dense
|
||||
>
|
||||
</q-range>
|
||||
<div
|
||||
class="col-12 justify-around items-center row no-wrap q-pt-sm"
|
||||
>
|
||||
<div>
|
||||
<q-input
|
||||
readonly
|
||||
type="number"
|
||||
style="max-width: 60px"
|
||||
v-model="rangeTerm.min"
|
||||
dense
|
||||
standout="bg-teal text-white"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-px-sm text-grey-8">-</div>
|
||||
<div>
|
||||
<q-input
|
||||
readonly
|
||||
type="number"
|
||||
style="max-width: 60px"
|
||||
v-model="rangeTerm.max"
|
||||
dense
|
||||
standout="bg-teal text-white"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12"><q-separator /></div>
|
||||
|
||||
<div class="col-12 row q-pa-sm">
|
||||
<q-space />
|
||||
<q-btn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue