fixing rank registry & change type any to interface
This commit is contained in:
parent
32b83298cd
commit
516a405df4
4 changed files with 68 additions and 11 deletions
|
|
@ -9,6 +9,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
|
||||
import type { InformationData } from "@/interface/Main";
|
||||
|
||||
const link = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
|
|
@ -31,12 +32,13 @@ const rowsHistory = ref<any[]>([]);
|
|||
const modalHistory = ref<boolean>(false);
|
||||
|
||||
/** ตัวแปรข้อมูล */
|
||||
const formDataInformation = reactive<any>({
|
||||
const formDataInformation = reactive<InformationData>({
|
||||
rank: "", //ยศ
|
||||
citizenId: "", //เลขประจำตัวประชาชน
|
||||
prefix: "",
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
birthDate: "", //วันเกิด
|
||||
birthDate: null, //วันเกิด
|
||||
gender: "", //เพศ
|
||||
relationship: "", //สถานภาพ
|
||||
nationality: "", //สัญชาติ
|
||||
|
|
@ -247,6 +249,7 @@ async function getData() {
|
|||
.get(config.API.dataUserInformationByType(link.value))
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
formDataInformation.rank = data.rank;
|
||||
formDataInformation.citizenId = data.citizenId;
|
||||
formDataInformation.prefix = data.prefix;
|
||||
formDataInformation.firstName = data.firstName;
|
||||
|
|
@ -395,7 +398,13 @@ onMounted(async () => {
|
|||
<div class="col-7">
|
||||
{{
|
||||
formDataInformation.firstName
|
||||
? `${formDataInformation.prefix}${formDataInformation.firstName} ${formDataInformation.lastName}`
|
||||
? `${
|
||||
formDataInformation.rank
|
||||
? formDataInformation.rank
|
||||
: formDataInformation.prefix
|
||||
}${formDataInformation.firstName} ${
|
||||
formDataInformation.lastName
|
||||
}`
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -112,7 +112,6 @@ const clickBack = () => {
|
|||
function redirectToPagePetition() {
|
||||
router.push(`/registry/request-edit`);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -154,7 +153,13 @@ function redirectToPagePetition() {
|
|||
<div class="column text-center q-mt-md q-mb-sm">
|
||||
<span class="text-teal text-weight-medium">{{
|
||||
dataStore.formData.firstName
|
||||
? `${dataStore.formData.prefix}${dataStore.formData.firstName} ${dataStore.formData.lastName}`
|
||||
? `${
|
||||
dataStore.formData.rank
|
||||
? dataStore.formData.rank
|
||||
: dataStore.formData.prefix
|
||||
}${dataStore.formData.firstName} ${
|
||||
dataStore.formData.lastName
|
||||
}`
|
||||
: "-"
|
||||
}}</span>
|
||||
<span class="text-grey text-weight-medium">{{
|
||||
|
|
@ -165,7 +170,9 @@ function redirectToPagePetition() {
|
|||
: "ลูกจ้างชั่วคราว"
|
||||
}}</span>
|
||||
<span class="text-grey text-weight-medium">{{
|
||||
dataStore.formData.position ? `${dataStore.formData.position}` : "-"
|
||||
dataStore.formData.position
|
||||
? `${dataStore.formData.position}`
|
||||
: "-"
|
||||
}}</span>
|
||||
|
||||
<div class="text-grey">{{ dataStore.formData.posNo }}</div>
|
||||
|
|
@ -182,10 +189,14 @@ function redirectToPagePetition() {
|
|||
</q-item> -->
|
||||
<q-item>
|
||||
<q-item-section class="text-grey-6">{{
|
||||
dataStore.officerType == "OFFICER" ? "ตำแหน่งประเภท" : "กลุ่มงาน"
|
||||
dataStore.officerType == "OFFICER"
|
||||
? "ตำแหน่งประเภท"
|
||||
: "กลุ่มงาน"
|
||||
}}</q-item-section>
|
||||
<q-item-section>{{
|
||||
dataStore.formData.posTypeName ? dataStore.formData.posTypeName : "-"
|
||||
dataStore.formData.posTypeName
|
||||
? dataStore.formData.posTypeName
|
||||
: "-"
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
<q-item>
|
||||
|
|
@ -193,7 +204,9 @@ function redirectToPagePetition() {
|
|||
dataStore.officerType == "OFFICER" ? "ระดับ" : "ระดับชั้นงาน"
|
||||
}}</q-item-section>
|
||||
<q-item-section>{{
|
||||
dataStore.formData.posLevelName ? dataStore.formData.posLevelName : "-"
|
||||
dataStore.formData.posLevelName
|
||||
? dataStore.formData.posLevelName
|
||||
: "-"
|
||||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
|
@ -291,7 +304,9 @@ function redirectToPagePetition() {
|
|||
: "ลูกจ้างประจำกรุงเทพมหานคร"
|
||||
}}</span>
|
||||
<span class="text-grey text-weight-medium">{{
|
||||
dataStore.formData.position ? `${dataStore.formData.position}` : "-"
|
||||
dataStore.formData.position
|
||||
? `${dataStore.formData.position}`
|
||||
: "-"
|
||||
}}</span>
|
||||
<div class="text-grey">{{ dataStore.formData.posNo }}</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue