เพิ่มข้อมูลหลักบุคคล และตำแหน่ง

This commit is contained in:
Warunee Tamkoo 2024-02-01 17:43:39 +07:00
parent cb56eb25af
commit 9d1fd29a97
14 changed files with 125 additions and 29 deletions

View file

@ -61,11 +61,21 @@ const menuList = readonly<any[]>([
children: [ children: [
{ {
key: 3.1, key: 3.1,
label: "ข้อมูลเกี่ยวกับบุคคล",
path: "masterPersonal",
},
{
key: 3.2,
label: "ข้อมูลตำแหน่ง",
path: "masterPosition",
},
{
key: 3.3,
label: "ข้อมูลปฏิทินวันหยุด", label: "ข้อมูลปฏิทินวันหยุด",
path: "masterCalendarWork", path: "masterCalendarWork",
}, },
{ {
key: 3.2, key: 3.4,
label: "ข้อมูลเครื่องราชอิสริยาภรณ์", label: "ข้อมูลเครื่องราชอิสริยาภรณ์",
path: "masterInsignia", path: "masterInsignia",
}, },

View file

@ -0,0 +1,3 @@
<template>
คำนำหนาช
</template>

View file

@ -0,0 +1,3 @@
<template>
ยศ
</template>

View file

@ -0,0 +1,3 @@
<template>
กลมเลอด
</template>

View file

@ -0,0 +1,3 @@
<template>
เพศ
</template>

View file

@ -0,0 +1,3 @@
<template>
ศาสนา
</template>

View file

@ -0,0 +1,3 @@
<template>
สถานภาพ
</template>

View file

@ -4,6 +4,10 @@ const masterInsignia = () =>
import("@/modules/01_metadataNew/views/insignia.vue"); import("@/modules/01_metadataNew/views/insignia.vue");
const dateilInsignia = () => const dateilInsignia = () =>
import("@/modules/01_metadataNew/components/insignia/InsigniaDetail.vue"); import("@/modules/01_metadataNew/components/insignia/InsigniaDetail.vue");
const personalPage = () =>
import("@/modules/01_metadataNew/views/personal.vue");
const positionPage = () =>
import("@/modules/01_metadataNew/views/position.vue");
export default [ export default [
{ {
@ -36,4 +40,24 @@ export default [
Role: "metadata", Role: "metadata",
}, },
}, },
{
path: "/master-data/personal",
name: "masterPersonal",
component: personalPage,
meta: {
Auth: true,
Key: [7],
Role: "metadata",
},
},
{
path: "/master-data/position",
name: "masterPosition",
component: positionPage,
meta: {
Auth: true,
Key: [7],
Role: "metadata",
},
},
]; ];

View file

@ -0,0 +1,25 @@
<script setup lang="ts">
import ListPrefix from "@/modules/01_metadataNew/components/personal/01ListPrefix.vue";
import ListRank from "@/modules/01_metadataNew/components/personal/02ListRank.vue";
import ListBloodGroup from "@/modules/01_metadataNew/components/personal/03ListBloodGroup.vue";
import ListGender from "@/modules/01_metadataNew/components/personal/04ListGender.vue";
import ListReligion from "@/modules/01_metadataNew/components/personal/05ListReligion.vue";
import ListRelationship from "@/modules/01_metadataNew/components/personal/06ListRelationship.vue";
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">
อมลเกยวกบบคคล
</div>
<q-card flat bordered class="q-pa-md">
<ListPrefix />
<ListRank />
<ListBloodGroup />
<ListGender />
<ListReligion />
<ListRelationship />
</q-card>
</template>
<style scoped></style>

View file

@ -0,0 +1,11 @@
<script setup lang="ts"></script>
<template>
<div class="toptitle text-dark col-12 row items-center">
อมลตำแหน
</div>
<q-card flat bordered class="q-pa-md"> ตำแหน </q-card>
</template>
<style scoped></style>

View file

@ -84,24 +84,27 @@ function onSubmit() {
}); });
} }
function onClickPublish(){ function onClickPublish() {
dialogConfirm($q,()=>{ dialogConfirm(
$q,
() => {
alert('get') alert("get");
// showLoader() // showLoader()
// http // http
// .get(config.API.organizationPublishGet) // .get(config.API.organizationPublishGet)
// .then((res)=>{ // .then((res)=>{
props.close?.() props.close?.();
// }) // })
// .catch((e)=>{ // .catch((e)=>{
// messageError($q,e) // messageError($q,e)
// }) // })
// .finally(()=>{ // .finally(()=>{
// hideLoader() // hideLoader()
// }) // })
},'ยืนยันการเผยเเพร่ข้อมูล','ต้องการยืนยันการเผยเเพร่ข้อมูลนี้ใช่หรือไม่?') },
"ยืนยันการเผยเเพร่ข้อมูล",
"ต้องการยืนยันการเผยเเพร่ข้อมูลนี้ใช่หรือไม่?"
);
} }
watch( watch(
() => props.modal, () => props.modal,
@ -115,7 +118,7 @@ watch(
<template> <template>
<template> <template>
<q-dialog v-model="props.modal" persistent> <q-dialog v-model="props.modal" persistent>
<q-card style="min-width: 10vw"> <q-card style="min-width: 18vw">
<form @submit.prevent="validateForm"> <form @submit.prevent="validateForm">
<DialogHeader :tittle="`ตั้งเวลาเผยแพร่`" :close="props.close" /> <DialogHeader :tittle="`ตั้งเวลาเผยแพร่`" :close="props.close" />
<q-separator /> <q-separator />
@ -170,9 +173,16 @@ watch(
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white text-teal"> <q-card-actions align="right">
<q-btn :label="`เผยแพร่ข้อมูล`" color="indigo-9" @click="onClickPublish()"/> <q-btn
<q-space/> flat
color="blue-7"
icon="public"
@click="onClickPublish()"
>
<q-tooltip>เผยแพรอมลทนท</q-tooltip>
</q-btn>
<q-space />
<q-btn type="submit" :label="`บันทึก`" color="public" /> <q-btn type="submit" :label="`บันทึก`" color="public" />
</q-card-actions> </q-card-actions>
</form> </form>

View file

@ -69,13 +69,10 @@ function getData() {
keyword: "", keyword: "",
}) })
.then((res) => { .then((res) => {
console.log(res);
const dataList = res.data.result.data; const dataList = res.data.result.data;
const dataMap = dataList.map((item: any) => ({ const dataMap = dataList.map((item: any) => ({
id: item.id, id: item.id,
name: `${item.posMasterNoPrefix}${item.posMasterNo}${ name: `${item.orgShortname}${item.posMasterNoPrefix}${item.posMasterNo}${item.posMasterNoSuffix}`,
item.posMasterNoSuffix == null ? "" : `(${item.posMasterNoSuffix})`
}`,
posMasterNoPrefix: item.posMasterNoPrefix, posMasterNoPrefix: item.posMasterNoPrefix,
posMasterNo: item.posMasterNo, posMasterNo: item.posMasterNo,
posMasterNoSuffix: item.posMasterNoSuffix, posMasterNoSuffix: item.posMasterNoSuffix,
@ -129,8 +126,8 @@ watch(
hide-pagination hide-pagination
hide-header hide-header
/> />
<div v-else class="bg-grey-3 text-center q-pa-md text-bold"> <div v-else class="bg-grey-1 text-center q-pa-md">
ไมพบอมลำดบตำแหน ไมอม
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />

View file

@ -370,6 +370,7 @@ onMounted(async () => {});
</div> </div>
</div> </div>
<!-- v-if="store.typeOrganizational === 'draft' && !store.isPublic" -->
<q-btn <q-btn
v-if="store.typeOrganizational === 'draft'" v-if="store.typeOrganizational === 'draft'"
flat flat