From 1e1395f88a4bad24ab412e11a4f340018251a94d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 18 Mar 2025 15:23:57 +0700 Subject: [PATCH 1/5] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4=20=3D=3D>=20loadFile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10_registry/01_Information/06_Ability.vue | 7 +- .../02_Government/02_Discipline.vue | 62 ++++++++++++++---- .../10_registry/02_Government/04_Duty.vue | 64 ++++++++++++++---- .../10_registry/03_Salary/02_Nopaid.vue | 65 +++++++++++++++---- .../04_Achievement/01_Certificate.vue | 64 ++++++++++++++---- .../04_Achievement/03_Insignia.vue | 63 ++++++++++++++---- .../10_registry/04_Achievement/04_Honor.vue | 64 ++++++++++++++---- src/modules/10_registry/store/Main.ts | 38 +++++++++++ 8 files changed, 352 insertions(+), 75 deletions(-) create mode 100644 src/modules/10_registry/store/Main.ts diff --git a/src/modules/10_registry/01_Information/06_Ability.vue b/src/modules/10_registry/01_Information/06_Ability.vue index 806507c..a05e7ca 100644 --- a/src/modules/10_registry/01_Information/06_Ability.vue +++ b/src/modules/10_registry/01_Information/06_Ability.vue @@ -248,7 +248,7 @@ async function onDownloadFile(id: string, profileId: string) { .get( config.API.subFileByFileName( "ทะเบียนประวัติ", - "ประกาศเกียรติคุณ", + "เอกสารความสามารถพิเศษ", profileId, id, "เอกสารหลักฐาน" @@ -328,6 +328,7 @@ onMounted(async () => { {{ col.label }} + @@ -344,7 +345,6 @@ onMounted(async () => { {{ col.value ? col.value : "-" }} - { > ดาวน์โหลด + + + (""); const $q = useQuasar(); const mixin = useCounterMixin(); const dataStore = useDataStore(); +const { getPathUploadFlie } = useRegistryDataStore(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; @@ -26,6 +28,8 @@ const rowsHistory = ref([]); const rowsHistoryData = ref([]); const mode = ref($q.screen.gt.xs); +const fileGroup = ref("เอกสารวินัย"); + const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -179,6 +183,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -247,6 +256,7 @@ onMounted(async () => { {{ col.label }} + @@ -263,6 +273,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }} + + + ดาวน์โหลด + + {
- - ประวัติแก้ไขวินัย - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขวินัย + +
{{ @@ -331,5 +368,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/02_Government/04_Duty.vue b/src/modules/10_registry/02_Government/04_Duty.vue index e1970fd..1ff8476 100644 --- a/src/modules/10_registry/02_Government/04_Duty.vue +++ b/src/modules/10_registry/02_Government/04_Duty.vue @@ -6,6 +6,7 @@ import { ref, reactive, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { DutyFormType } from "@/modules/10_registry/interface/index/Main"; //history dialog @@ -22,6 +23,7 @@ const rowsHistoryData = ref([]); const $q = useQuasar(); const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); +const { getPathUploadFlie } = useRegistryDataStore(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; @@ -241,6 +243,8 @@ const columnsHistory = ref([ }, ]); +const fileGroup = ref("เอกสารปฏิบัติราชการพิเศษ"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -282,6 +286,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -352,6 +361,7 @@ onMounted(async () => { {{ col.label }} + @@ -368,6 +378,21 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + + {
- - ประวัติแก้ไขปฏิบัติราชการพิเศษ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขปฏิบัติราชการพิเศษ + +
{{ @@ -417,6 +455,7 @@ onMounted(async () => {
+ { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/03_Salary/02_Nopaid.vue b/src/modules/10_registry/03_Salary/02_Nopaid.vue index 4a7fea2..ecdc9a4 100644 --- a/src/modules/10_registry/03_Salary/02_Nopaid.vue +++ b/src/modules/10_registry/03_Salary/02_Nopaid.vue @@ -6,6 +6,7 @@ import { ref, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { NopaidFormType } from "@/modules/10_registry/interface/index/Main"; @@ -24,6 +25,7 @@ const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; +const { getPathUploadFlie } = useRegistryDataStore(); const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -218,6 +220,8 @@ const columnsHistory = ref([ }, ]); +const fileGroup = ref("เอกสารบันทึกวันที่ไม่ได้รับเงินเดือน"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -261,6 +265,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -331,6 +340,7 @@ onMounted(async () => { {{ col.label }}
+ @@ -347,6 +357,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }} + + + ดาวน์โหลด + + {
- - ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ + - + ดาวน์โหลด + + + ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ + +
{{ @@ -398,6 +435,7 @@ onMounted(async () => { + { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/04_Achievement/01_Certificate.vue b/src/modules/10_registry/04_Achievement/01_Certificate.vue index 2234bdc..6ec2af0 100644 --- a/src/modules/10_registry/04_Achievement/01_Certificate.vue +++ b/src/modules/10_registry/04_Achievement/01_Certificate.vue @@ -6,6 +6,7 @@ import { ref, reactive, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { CertificateDetail } from "@/modules/10_registry/interface/index/Main"; @@ -18,6 +19,7 @@ const dataPerson = useDataStore(); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; +const { getPathUploadFlie } = useRegistryDataStore(); const idByRow = ref(""); const rows = ref([]); @@ -216,6 +218,9 @@ const columnsHistory = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, ]); + +const fileGroup = ref("เอกสารใบอนุญาตประกอบวิชาชีพ"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -263,6 +268,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -333,6 +343,7 @@ onMounted(async () => { {{ col.label }}
+ @@ -349,6 +360,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }} + + + ดาวน์โหลด + + {
- - ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ + +
{{ @@ -398,6 +436,7 @@ onMounted(async () => {
+ { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/04_Achievement/03_Insignia.vue b/src/modules/10_registry/04_Achievement/03_Insignia.vue index 244e5af..d8b0323 100644 --- a/src/modules/10_registry/04_Achievement/03_Insignia.vue +++ b/src/modules/10_registry/04_Achievement/03_Insignia.vue @@ -6,6 +6,7 @@ import http from "@/plugins/http"; import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { InsigniaFormType } from "@/modules/10_registry/interface/index/Main"; @@ -25,6 +26,7 @@ const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; +const { getPathUploadFlie } = useRegistryDataStore(); const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -432,6 +434,8 @@ const columnsHistory = ref([ }, ]); +const fileGroup = ref("เครื่องราชฯ"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -479,6 +483,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -549,6 +558,7 @@ onMounted(async () => { {{ col.label }}
+ @@ -567,6 +577,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }} + + + ดาวน์โหลด + + {
- - ประวัติแก้ไขเครื่องราชอิสริยาภรณ์ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขเครื่องราชอิสริยาภรณ์ + +
{{ @@ -647,5 +685,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/04_Achievement/04_Honor.vue b/src/modules/10_registry/04_Achievement/04_Honor.vue index 6031f16..58035f2 100644 --- a/src/modules/10_registry/04_Achievement/04_Honor.vue +++ b/src/modules/10_registry/04_Achievement/04_Honor.vue @@ -7,6 +7,7 @@ import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { useDataStore } from "@/stores/data"; import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { HonorFormData } from "@/modules/10_registry/interface/index/Main"; @@ -27,6 +28,7 @@ const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; +const { getPathUploadFlie } = useRegistryDataStore(); const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -218,6 +220,8 @@ const columnsHistory = ref([ }, ]); +const fileGroup = ref("ประกาศเกียรติคุณ"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -263,6 +267,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -333,6 +342,7 @@ onMounted(async () => { {{ col.label }} + @@ -349,6 +359,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + {
- - ประวัติแก้ไขประกาศเกียรติคุณ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขประกาศเกียรติคุณ + +
{{ @@ -398,6 +436,7 @@ onMounted(async () => {
+ { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/store/Main.ts b/src/modules/10_registry/store/Main.ts new file mode 100644 index 0000000..47c2ab6 --- /dev/null +++ b/src/modules/10_registry/store/Main.ts @@ -0,0 +1,38 @@ +import { defineStore } from "pinia"; +import { useQuasar } from "quasar"; + +import http from "@/plugins/http"; +import config from "@/app.config"; +import { useCounterMixin } from "@/stores/mixin"; + +const $q = useQuasar(); +const mixin = useCounterMixin(); +const { messageError } = mixin; + +export const useRegistryDataStore = defineStore("RegistryDataStoreMain", () => { + async function getPathUploadFlie( + group: string, + profileId: string, + id: string + ) { + try { + const res = await http.get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + group, + profileId, + id, + "เอกสารหลักฐาน" + ) + ); + return res.data; + } catch (err) { + messageError($q, err); + } + } + + return { + // Function + getPathUploadFlie, + }; +}); From 8ff3456a237a8a0181b9cf6754b73e0777138a4d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 19 Mar 2025 09:45:12 +0700 Subject: [PATCH 2/5] =?UTF-8?q?fix=20=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02_Government/01_Government.vue | 35 +++++++------------ .../02_Government/05_Actposition.vue | 7 ++-- .../10_registry/02_Government/07_Position.vue | 4 +-- .../10_registry/03_Salary/01_Salary.vue | 8 ++--- src/modules/10_registry/views/main.vue | 12 +++---- 5 files changed, 29 insertions(+), 37 deletions(-) diff --git a/src/modules/10_registry/02_Government/01_Government.vue b/src/modules/10_registry/02_Government/01_Government.vue index 0f95ce8..f9a6c23 100644 --- a/src/modules/10_registry/02_Government/01_Government.vue +++ b/src/modules/10_registry/02_Government/01_Government.vue @@ -19,8 +19,10 @@ import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue"; const link = ref(""); const $q = useQuasar(); const mixin = useCounterMixin(); -const dataPerson = useDataStore() -const checkType = ref(dataPerson.officerType == 'OFFICER' ? true:false) +const dataPerson = useDataStore(); +const checkType = ref( + dataPerson.officerType == "OFFICER" ? true : false +); const store = useRegistryInFormationStore(); const { showLoader, hideLoader, messageError, date2Thai, dateToISO } = mixin; @@ -383,7 +385,7 @@ function getData() { /** get history */ function getHistory() { const url = - dataPerson.officerType == 'OFFICER' + dataPerson.officerType == "OFFICER" ? config.API.dataUserGovernmentHistory("") : config.API.dataUserGovernmentHistory("-employee"); showLoader(); @@ -402,7 +404,7 @@ function getHistory() { }); } -onMounted(async() => { +onMounted(async () => { link.value = await dataPerson.getProFileType(); getData(); }); @@ -433,31 +435,25 @@ onMounted(async() => { {{ formData.org ? formData.org : "-" }}
- {{ checkType ? 'ตำแหน่งในสายงาน':'ตำแหน่ง' }} + {{ checkType ? "ตำแหน่งในสายงาน" : "ตำแหน่ง" }}
{{ formData.position ? formData.position : "-" }}
- +
- ตำแหน่งเลขที่ + {{ checkType ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่" }}
{{ formData.posMasterNo ? formData.posMasterNo : "-" }}
-
+
ตำแหน่งทางการบริหาร
{{ formData.posExecutive ? formData.posExecutive : "-" }}
-
+
ด้านทางการบริหาร
@@ -472,19 +468,14 @@ onMounted(async() => {
-
+
สายงาน
{{ formData.positionField ? formData.positionField : "-" }}
- {{ - checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน" - }} + {{ checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน" }}
{{ formData.posType ? formData.posType : "-" }} diff --git a/src/modules/10_registry/02_Government/05_Actposition.vue b/src/modules/10_registry/02_Government/05_Actposition.vue index 8f887b3..ffc0371 100644 --- a/src/modules/10_registry/02_Government/05_Actposition.vue +++ b/src/modules/10_registry/02_Government/05_Actposition.vue @@ -26,6 +26,9 @@ const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; const modalHistory = ref(false); +const checkType = ref( + dataStore.officerType == "OFFICER" ? true : false +); /** ตัวแปรข้อมูล */ const visibleColumns = ref([ @@ -60,7 +63,7 @@ const columns = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -138,7 +141,7 @@ const columnsHistory = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", diff --git a/src/modules/10_registry/02_Government/07_Position.vue b/src/modules/10_registry/02_Government/07_Position.vue index a2fc877..c120440 100644 --- a/src/modules/10_registry/02_Government/07_Position.vue +++ b/src/modules/10_registry/02_Government/07_Position.vue @@ -76,7 +76,7 @@ const baseColumns = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -153,7 +153,7 @@ const baseColumns = ref([ { name: "amount", align: "left", - label: link.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน", + label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", sortable: true, field: "amount", headerStyle: "font-size: 14px", diff --git a/src/modules/10_registry/03_Salary/01_Salary.vue b/src/modules/10_registry/03_Salary/01_Salary.vue index 6f1d567..4361270 100644 --- a/src/modules/10_registry/03_Salary/01_Salary.vue +++ b/src/modules/10_registry/03_Salary/01_Salary.vue @@ -75,7 +75,7 @@ const baseColumns = ref([ { name: "amount", align: "left", - label: checkType.value ? "เงินเดือน" : "ค่าตอบแทนรายเดือน", + label: checkType.value ? "เงินเดือน" : "ค่าจ้าง", sortable: true, field: "amount", headerStyle: "font-size: 14px", @@ -105,7 +105,7 @@ const baseColumns = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -257,7 +257,7 @@ const baseColumnsHistory = ref([ { name: "amount", align: "left", - label: checkType.value ? "เงินเดือน" : "ค่าตอบแทนรายเดือน", + label: checkType.value ? "เงินเดือน" : "ค่าจ้าง", sortable: true, field: "amount", headerStyle: "font-size: 14px", @@ -297,7 +297,7 @@ const baseColumnsHistory = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", diff --git a/src/modules/10_registry/views/main.vue b/src/modules/10_registry/views/main.vue index 0fb2ead..f19dcc2 100644 --- a/src/modules/10_registry/views/main.vue +++ b/src/modules/10_registry/views/main.vue @@ -1,7 +1,5 @@