รายละเอียดโครงสร้าง
This commit is contained in:
parent
4cfcc2d018
commit
b96560ea78
2 changed files with 106 additions and 6 deletions
|
|
@ -18,7 +18,7 @@ const modal = defineModel<boolean>("structureDetail", { required: true });
|
|||
const treeId = defineModel<string>("treeId", { required: true });
|
||||
const orgLevel = defineModel<number>("orgLevel", { required: true });
|
||||
|
||||
const formData = reactive<any>({
|
||||
const formData = reactive({
|
||||
orgName: "",
|
||||
agencyName: "", //*ส่วนราชการ
|
||||
orgType: "", //*ประเภท
|
||||
|
|
@ -27,7 +27,15 @@ const formData = reactive<any>({
|
|||
orgPhoneEx: "", //หมายเลขโทรศัพท์ที่ติดต่อจากภายนอก
|
||||
orgPhoneIn: "", //หมายเลขโทรศัพท์ที่ติดต่อจากภายใน
|
||||
orgFax: "", //หมายเลขโทรสาร
|
||||
orgShortName: "",
|
||||
orgShortName: "", //อักษรย่อ
|
||||
misId: "", //MsiId
|
||||
departMentCode: "", //DEPARTMENT CODE
|
||||
divisionCode: "", //DIVISION CODE
|
||||
sectionCode: "", //SECTION CODE
|
||||
jobCode: "", //JOB CODE
|
||||
responsibility: "", //หน้าที่ความรับผิดชอบ
|
||||
isCommission: "", //สำนักปลัด
|
||||
isDeputy: "", //สำนักงาน กก.
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -54,8 +62,20 @@ async function fetchDetailTree(id: string, type: string) {
|
|||
: "ยุบเลิก";
|
||||
formData.orgPhoneEx = data[`org${type}PhoneEx`];
|
||||
formData.orgPhoneIn = data[`org${type}PhoneIn`];
|
||||
formData.orgFax = data[`org${type}Fax`];
|
||||
formData.orgShortName = data[`org${type}ShortName`];
|
||||
formData.orgFax = data[`org${type}Fax`] ? data[`org${type}Fax`] : "-";
|
||||
formData.orgShortName = data[`org${type}ShortName`]
|
||||
? data[`org${type}ShortName`]
|
||||
: "-";
|
||||
formData.misId = data.misId ? data.misId : "-";
|
||||
formData.departMentCode = data.DEPARTMENT_CODE
|
||||
? data.DEPARTMENT_CODE
|
||||
: "-";
|
||||
formData.divisionCode = data.DIVISION_CODE ? data.DIVISION_CODE : "-";
|
||||
formData.sectionCode = data.SECTION_CODE ? data.SECTION_CODE : "-";
|
||||
formData.jobCode = data.JOB_CODE ? data.JOB_CODE : "-";
|
||||
formData.responsibility = data.responsibility ? data.responsibility : "-";
|
||||
formData.isDeputy = data.isDeputy ? "ใช่" : "-";
|
||||
formData.isCommission = data.isCommission ? "ใช่" : "-";
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -108,6 +128,12 @@ watch(
|
|||
<p>{{ formData.agencyName }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">อักษรย่อ</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.orgShortName }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">ประเภท</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
|
|
@ -149,8 +175,63 @@ watch(
|
|||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">Fax</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p v-if="formData.orgFax != ''">{{ formData.orgFax }}</p>
|
||||
<p v-else>-</p>
|
||||
<p>{{ formData.orgFax }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">MsiId</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.misId }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">DEPARTMENT CODE</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.departMentCode }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">DIVISION CODE</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.divisionCode }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">SECTION CODE</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.sectionCode }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">JOB CODE</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.jobCode }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">หน้าที่ความรับผิดชอบ</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.responsibility }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">สำนักปลัด</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.isDeputy }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row q-col-gutter-sm q-mb-xs">
|
||||
<div class="col-4 text-bold">สำนักงาน กก.</div>
|
||||
<div class="col-8 text-grey-8">
|
||||
<p>{{ formData.isCommission }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -148,6 +148,24 @@ export const useOrganizational = defineStore("organizationalStore", () => {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันแปลงค่าสถานะรายละเอียดโครงสร้าง
|
||||
* @param type สถานะ
|
||||
* @returns ชือสถานะ
|
||||
*/
|
||||
function convertStatus(type: string) {
|
||||
switch (type) {
|
||||
case "current":
|
||||
return "ปกติ";
|
||||
case "draft":
|
||||
return "แบบร่าง";
|
||||
case "old":
|
||||
return "ยุบเลิก";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
typeOrganizational,
|
||||
statusView,
|
||||
|
|
@ -171,5 +189,6 @@ export const useOrganizational = defineStore("organizationalStore", () => {
|
|||
rootId,
|
||||
isLosck,
|
||||
remark,
|
||||
convertStatus,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue