From 2acaf97a285d635f446713b24e9f01385293c02f Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 13 Mar 2025 17:07:28 +0700 Subject: [PATCH 1/4] =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1?= =?UTF-8?q?=E0=B8=B9=E0=B8=A5=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=20=3D=3D>=20=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/org/api.org.ts | 2 + .../10_registry/02_Government/07_Position.vue | 455 +++++++----------- .../10_registry/interface/response/Main.ts | 12 +- src/modules/10_registry/store/Position.ts | 35 ++ 4 files changed, 212 insertions(+), 292 deletions(-) create mode 100644 src/modules/10_registry/store/Position.ts diff --git a/src/api/org/api.org.ts b/src/api/org/api.org.ts index 465982b..ba33d4b 100644 --- a/src/api/org/api.org.ts +++ b/src/api/org/api.org.ts @@ -6,6 +6,8 @@ const profileOrg = `${env.API_URI}/org/profile`; const report = `${env.API_URI}/org`; const workflow = `${env.API_URI}/org/workflow`; export default { + orgCommandCode: `${metadata}commandCode`, + profilePosition: () => `${org}/profile/keycloak/position`, searchCommander: `${org}/profile/search/commander`, diff --git a/src/modules/10_registry/02_Government/07_Position.vue b/src/modules/10_registry/02_Government/07_Position.vue index 2e62377..a2fc877 100644 --- a/src/modules/10_registry/02_Government/07_Position.vue +++ b/src/modules/10_registry/02_Government/07_Position.vue @@ -1,16 +1,18 @@ diff --git a/src/modules/10_registry/interface/response/Main.ts b/src/modules/10_registry/interface/response/Main.ts index 136aded..531e11c 100644 --- a/src/modules/10_registry/interface/response/Main.ts +++ b/src/modules/10_registry/interface/response/Main.ts @@ -11,4 +11,14 @@ interface DataRequest { topic: string; } -export type { DataRequest }; +interface DataCommandCode { + id: string; + createdAt: Date; + lastUpdatedAt: Date; + createdFullName: string; + lastUpdateFullName: string; + name: string; + code: number; +} + +export type { DataRequest, DataCommandCode }; diff --git a/src/modules/10_registry/store/Position.ts b/src/modules/10_registry/store/Position.ts new file mode 100644 index 0000000..7fee4f6 --- /dev/null +++ b/src/modules/10_registry/store/Position.ts @@ -0,0 +1,35 @@ +import { ref } from "vue"; +import { defineStore } from "pinia"; +import { useQuasar } from "quasar"; + +import { useCounterMixin } from "@/stores/mixin"; + +import type { DataOption } from "@/modules/10_registry/interface/index/Main"; + +const $q = useQuasar(); +const mixin = useCounterMixin(); +const {} = mixin; + +export const useGovernmentPosDataStore = defineStore("GovernmentPos", () => { + // commandCode ขอตำแหน่ง + const positionCode = ref([ + 0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, + ]); + + const commandCodeData = ref([]); + + function convertCommandCodeName(val: string) { + return ( + commandCodeData.value.find((e: DataOption) => e.id === val)?.name ?? "-" + ); + } + + return { + // Data + commandCodeData, + positionCode, + + // Function + convertCommandCodeName, + }; +}); From 6efe622a76eebf02aab01ee762182f8629a78b2b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 14 Mar 2025 11:48:52 +0700 Subject: [PATCH 2/4] =?UTF-8?q?=E0=B9=80=E0=B8=AD=E0=B8=81=E0=B8=AA?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=20=E0=B8=81.=E0=B8=9E.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10_registry/05_Other/03_FileOther.vue | 138 ++++++++++++++++++ src/modules/10_registry/store/registry.ts | 3 +- src/modules/10_registry/tabs/05_other.vue | 2 + src/stores/data.ts | 5 +- 4 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 src/modules/10_registry/05_Other/03_FileOther.vue diff --git a/src/modules/10_registry/05_Other/03_FileOther.vue b/src/modules/10_registry/05_Other/03_FileOther.vue new file mode 100644 index 0000000..4682422 --- /dev/null +++ b/src/modules/10_registry/05_Other/03_FileOther.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/src/modules/10_registry/store/registry.ts b/src/modules/10_registry/store/registry.ts index 075e83f..8c7aa40 100644 --- a/src/modules/10_registry/store/registry.ts +++ b/src/modules/10_registry/store/registry.ts @@ -10,6 +10,7 @@ export const useRegistryInFormationStore = defineStore( () => { const typeProfile = ref("OFFICER"); const profileId = ref(""); + const citizenId = ref(""); function typeChangeName(val: string) { switch (val) { @@ -29,6 +30,6 @@ export const useRegistryInFormationStore = defineStore( return "-"; } } - return { typeChangeName, typeProfile, profileId }; + return { typeChangeName, typeProfile, profileId, citizenId }; } ); diff --git a/src/modules/10_registry/tabs/05_other.vue b/src/modules/10_registry/tabs/05_other.vue index 09b87e2..7dde665 100644 --- a/src/modules/10_registry/tabs/05_other.vue +++ b/src/modules/10_registry/tabs/05_other.vue @@ -4,6 +4,7 @@ import { useRouter } from "vue-router"; /** component */ import Other from "@/modules/10_registry/05_Other/01_Other.vue"; import File from "@/modules/10_registry/05_Other/02_File.vue"; +import FileOther from "@/modules/10_registry/05_Other/03_FileOther.vue"; const router = useRouter(); @@ -27,6 +28,7 @@ const router = useRouter();
+
diff --git a/src/modules/10_registry/02_Government/06_Assistance.vue b/src/modules/10_registry/02_Government/06_Assistance.vue index 44b0f48..a87f459 100644 --- a/src/modules/10_registry/02_Government/06_Assistance.vue +++ b/src/modules/10_registry/02_Government/06_Assistance.vue @@ -220,6 +220,34 @@ function getHistory() { }); } +/** + * ฟังก์ชันโหลไฟลเอกสารหลักฐาน + * @param id รายการที่ต้องการโหลด + */ +async function onDownloadFile(id: string, profileId: string) { + showLoader(); + await http + .get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + "ช่วยราชการ", + profileId, + id, + "เอกสารหลักฐาน" + ) + ) + .then(async (res) => { + const data = res.data; + window.open(data.downloadUrl, "_blank"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -302,6 +330,18 @@ onMounted(async () => { + + ดาวน์โหลด + {
- - ประวัติแก้ไขรายการช่วยราชการ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขรายการช่วยราชการ + +
{{ @@ -369,5 +422,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; }