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

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

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

View file

@ -69,13 +69,10 @@ function getData() {
keyword: "",
})
.then((res) => {
console.log(res);
const dataList = res.data.result.data;
const dataMap = dataList.map((item: any) => ({
id: item.id,
name: `${item.posMasterNoPrefix}${item.posMasterNo}${
item.posMasterNoSuffix == null ? "" : `(${item.posMasterNoSuffix})`
}`,
name: `${item.orgShortname}${item.posMasterNoPrefix}${item.posMasterNo}${item.posMasterNoSuffix}`,
posMasterNoPrefix: item.posMasterNoPrefix,
posMasterNo: item.posMasterNo,
posMasterNoSuffix: item.posMasterNoSuffix,
@ -129,8 +126,8 @@ watch(
hide-pagination
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>
</q-card-section>
<q-separator />

View file

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