From d558f826f68f9ea29bc579552914df301fa26a35 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 28 Jan 2026 11:25:50 +0700 Subject: [PATCH 01/15] feat:issue --- src/api/02_organizational/api.organization.ts | 2 + src/components/Dialogs/DialogDebug.vue | 369 ++++++++++++++++++ src/stores/positionKeycloak.ts | 60 +++ src/views/MainLayout.vue | 20 + 4 files changed, 451 insertions(+) create mode 100644 src/components/Dialogs/DialogDebug.vue create mode 100644 src/stores/positionKeycloak.ts diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index 6588f5db0..62a8a3385 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -194,4 +194,6 @@ export default { workflowCommanderSign: `${workflow}/commander/sign`, orgAssistance: (id: string) => `${orgProfile}/assistance/${id}`, + + orgIssues: `${organization}/issues`, }; diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue new file mode 100644 index 000000000..5511675d8 --- /dev/null +++ b/src/components/Dialogs/DialogDebug.vue @@ -0,0 +1,369 @@ + + + + + diff --git a/src/stores/positionKeycloak.ts b/src/stores/positionKeycloak.ts new file mode 100644 index 000000000..a285c459c --- /dev/null +++ b/src/stores/positionKeycloak.ts @@ -0,0 +1,60 @@ +import { ref } from "vue"; +import { defineStore } from "pinia"; + +export const usePositionKeycloakStore = defineStore("positionKeycloak", () => { + const dataPositionKeycloak = ref(null); + + function setPositionKeycloak(data: any) { + dataPositionKeycloak.value = data; + } + + function findOrgName(obj: any) { + if (obj) { + let name = + obj.child4 != null && + obj.child4 !== "" && + obj.child3 != null && + obj.child3 !== "" + ? obj.child4 + (obj.child3 ? "/" : "") + : obj.child4 != null && obj.child4 !== "" + ? obj.child4 + : ""; + + name += + obj.child3 != null && + obj.child3 !== "" && + obj.child2 != null && + obj.child2 !== "" + ? obj.child3 + (obj.child2 ? "/" : "") + : obj.child3 != null && obj.child3 !== "" + ? obj.child3 + : ""; + + name += + obj.child2 != null && + obj.child2 !== "" && + obj.child1 != null && + obj.child1 !== "" + ? obj.child2 + (obj.child1 ? "/" : "") + : obj.child2 != null && obj.child2 !== "" + ? obj.child2 + : ""; + + name += + obj.child1 != null && + obj.child1 !== "" && + obj.root != null && + obj.root !== "" + ? obj.child1 + (obj.root ? "/" : "") + : obj.child1 != null && obj.child1 !== "" + ? obj.child1 + : ""; + name += obj.root != null && obj.root !== "" ? obj.root : ""; + return name == "" ? "-" : name; + } else { + return ""; + } + } + + return { dataPositionKeycloak, setPositionKeycloak, findOrgName }; +}); diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 8180cbd86..2081fcc54 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -6,6 +6,7 @@ import { storeToRefs } from "pinia"; import { scroll, useQuasar } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import { useMenuDataStore } from "@/stores/menuList"; +import { usePositionKeycloakStore } from "@/stores/positionKeycloak"; import { tokenParsed, logout, @@ -26,6 +27,7 @@ import type { import { tabList, tabListPlacement } from "../interface/request/main/main"; import LoginLinkage from "@/components/LoginLinkage.vue"; +import DialogDebug from "@/components/Dialogs/DialogDebug.vue"; // landing page config url const configParam = { @@ -63,6 +65,7 @@ const modalLoginLinkage = ref(false); //เข้าสู่ระบ // landing page redirect const landingPageUrl = ref(configParam.landingPageUrl); +const modalDebug = ref(false); async function fetchmsgNoread() { await http @@ -524,6 +527,7 @@ async function fetchKeycloakPosition() { .get(config.API.keycloakPosition()) .then(async (res) => { const data = await res.data.result; + usePositionKeycloakStore().setPositionKeycloak(data); if (data.avatarName) { await getImg(data.profileId, data.avatarName); } else { @@ -783,6 +787,21 @@ function onViewDetailNoti(url: string) { + + + + + + แจ้งปัญหาการใช้งานระบบ + + + + From 20f9c73b9183efe0d8309063a22d6c779a29815c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 28 Jan 2026 11:32:19 +0700 Subject: [PATCH 02/15] fix: max-file-size="5000000" --- src/components/Dialogs/DialogDebug.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index 5511675d8..76b14f07b 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -274,11 +274,11 @@ function onClose() { ref="uploader" class="full-width" text-color="dark" - :max-size="10000000" accept=".jpg,.png,.pdf,.csv,.doc" bordered - label="[ไฟล์ jpg,png,pdf,csv,doc ขนาดไม่เกิน 10MB]" + label="[ไฟล์ jpg,png,pdf,csv,doc ขนาดไม่เกิน 5MB]" multiple + max-file-size="5000000" @added="onAddfile" @removed="onRemoveFile" > From a6dc8dd00f5b46920c43a063fe93f97d555a3f2c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 28 Jan 2026 11:41:28 +0700 Subject: [PATCH 03/15] fix --- src/components/Dialogs/DialogDebug.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index 76b14f07b..f90387068 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -312,7 +312,7 @@ function onClose() { />
- {{ "[ไฟล์ jpg,png,pdf,csv,doc ขนาดไม่เกิน 10MB]" }} + {{ "[ไฟล์ jpg,png,pdf,csv,doc ขนาดไม่เกิน 5MB]" }}
{{ scope.uploadSizeLabel }} From f770fb6f0f2283057d28832d471477e902c096b4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 28 Jan 2026 13:18:29 +0700 Subject: [PATCH 04/15] fix:path upload --- src/components/Dialogs/DialogDebug.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index f90387068..492afe33d 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -116,7 +116,7 @@ async function uploadProfile(code: string) { fileName: file.name, })); const res = await http.post( - config.API.file("issueAttachments", "documents", code), + config.API.file("issueAttachments", formData.system, code), { replace: false, fileList: fileName, From 8b303f7b0d23bd0881785fe406a93b3d3f2bcb72 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 28 Jan 2026 13:23:30 +0700 Subject: [PATCH 05/15] fix:org name --- src/components/Dialogs/DialogDebug.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index 492afe33d..8d475ec9c 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -47,7 +47,6 @@ const formData = reactive({ system: "mgt", fileAttachments: [] as File[], menu: "", - org: orgName.value, }); /** ฟังก์ชันบันทึกข้อมูล */ @@ -60,7 +59,7 @@ function onSubmit() { description: formData.description, system: formData.system, menu: formData.menu, - org: formData.org, + org: orgName.value, }; const res = await http.post(config.API.orgIssues, payload); @@ -188,7 +187,6 @@ function onClose() { formData.title = ""; formData.description = ""; formData.fileAttachments = []; - formData.org = orgName.value; } From a79a5858b664e1fd0b9d8d0caa3b4b919b42bac4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 28 Jan 2026 18:25:18 +0700 Subject: [PATCH 06/15] feat:page issues --- .../22_issues/components/DialogViewIssue.vue | 428 ++++++++++++++++++ src/modules/22_issues/router.ts | 14 + src/modules/22_issues/store.ts | 49 ++ src/modules/22_issues/views/Main.vue | 317 +++++++++++++ src/router/index.ts | 2 + 5 files changed, 810 insertions(+) create mode 100644 src/modules/22_issues/components/DialogViewIssue.vue create mode 100644 src/modules/22_issues/router.ts create mode 100644 src/modules/22_issues/store.ts create mode 100644 src/modules/22_issues/views/Main.vue diff --git a/src/modules/22_issues/components/DialogViewIssue.vue b/src/modules/22_issues/components/DialogViewIssue.vue new file mode 100644 index 000000000..fd19ed9c3 --- /dev/null +++ b/src/modules/22_issues/components/DialogViewIssue.vue @@ -0,0 +1,428 @@ + + + + + diff --git a/src/modules/22_issues/router.ts b/src/modules/22_issues/router.ts new file mode 100644 index 000000000..df3ef253d --- /dev/null +++ b/src/modules/22_issues/router.ts @@ -0,0 +1,14 @@ +const Main = () => import("@/modules/22_issues/views/Main.vue"); + +export default [ + { + path: "/issues", + name: "issuesMain", + component: Main, + meta: { + Auth: true, + Key: "REPORT_ORG", + Role: "STAFF", + }, + }, +]; diff --git a/src/modules/22_issues/store.ts b/src/modules/22_issues/store.ts new file mode 100644 index 000000000..fb7c52372 --- /dev/null +++ b/src/modules/22_issues/store.ts @@ -0,0 +1,49 @@ +import { ref } from "vue"; +import { defineStore } from "pinia"; + +export const useIssueStore = defineStore("issue", () => { + const systemOptions = ref([ + { label: "ทั้งหมด", value: "" }, + { label: "ระบบบริหารจัดการ", value: "MGT" }, + { label: "ระบบผู้ใช้งาน", value: "USER" }, + { label: "ระบบลงเวลา", value: "CHECKIN" }, + ]); + + const statusOptions = ref([ + { label: "ทั้งหมด", value: "" }, + { label: "ใหม่", value: "NEW" }, + { label: "กำลังดำเนินการ", value: "IN_PROGRESS" }, + { label: "แก้ไขแล้ว", value: "RESOLVED" }, + { label: "ปิดแล้ว", value: "CLOSED" }, + ]); + + function convertStatus(status: string) { + let val = status.toUpperCase(); + switch (val) { + case "NEW": + return "ใหม่"; + case "IN_PROGRESS": + return "กำลังดำเนินการ"; + case "RESOLVED": + return "แก้ไขแล้ว"; + case "CLOSED": + return "ปิดแล้ว"; + default: + return status; + } + } + + function convertSystem(system: string) { + let val = system.toUpperCase(); + switch (val) { + case "MGT": + return "ระบบบริหารจัดการ"; + case "USER": + return "ระบบผู้ใช้งาน"; + case "CHECKIN": + return "ระบบลงเวลา"; + } + } + + return { systemOptions, statusOptions, convertStatus, convertSystem }; +}); diff --git a/src/modules/22_issues/views/Main.vue b/src/modules/22_issues/views/Main.vue new file mode 100644 index 000000000..0e1e837fd --- /dev/null +++ b/src/modules/22_issues/views/Main.vue @@ -0,0 +1,317 @@ + + + + diff --git a/src/router/index.ts b/src/router/index.ts index 3fc48e205..f570ed6ce 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -28,6 +28,7 @@ import ModuleCommand from "@/modules/18_command/router"; import ModulePositionCondition from "@/modules/19_condition/router"; import ModulePositionTemp from "@/modules/20_positionTemp/router"; import ModuleReport from "@/modules/21_report/router"; +import ModuleIssues from "@/modules/22_issues/router"; // TODO: ใช้หรือไม่? import { authenticated, logout } from "@/plugins/auth"; @@ -79,6 +80,7 @@ const router = createRouter({ ...ModulePositionCondition, ...ModulePositionTemp, ...ModuleReport, + ...ModuleIssues, ], }, /** From c6c1fe93c1309eefe910b96e2196a54591c6901c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 29 Jan 2026 14:07:54 +0700 Subject: [PATCH 07/15] fix:interface --- .../22_issues/components/DialogViewIssue.vue | 134 ++++++++++-------- src/modules/22_issues/interface/Main.ts | 42 ++++++ src/modules/22_issues/store.ts | 9 +- src/modules/22_issues/views/Main.vue | 38 +++-- 4 files changed, 147 insertions(+), 76 deletions(-) create mode 100644 src/modules/22_issues/interface/Main.ts diff --git a/src/modules/22_issues/components/DialogViewIssue.vue b/src/modules/22_issues/components/DialogViewIssue.vue index fd19ed9c3..d23394fcb 100644 --- a/src/modules/22_issues/components/DialogViewIssue.vue +++ b/src/modules/22_issues/components/DialogViewIssue.vue @@ -1,7 +1,6 @@ From ffce0164b487a160845e4fd7695a68d42a04b7cc Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 29 Jan 2026 14:56:51 +0700 Subject: [PATCH 08/15] fix: img --- .../22_issues/components/DialogViewIssue.vue | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/src/modules/22_issues/components/DialogViewIssue.vue b/src/modules/22_issues/components/DialogViewIssue.vue index d23394fcb..25b2d423c 100644 --- a/src/modules/22_issues/components/DialogViewIssue.vue +++ b/src/modules/22_issues/components/DialogViewIssue.vue @@ -396,7 +396,7 @@ watch( - + + + + + + + From 3e568267baf88f59277c9b1cc00210c59410617a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 29 Jan 2026 14:58:29 +0700 Subject: [PATCH 09/15] fix:btn position --- .../22_issues/components/DialogViewIssue.vue | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/modules/22_issues/components/DialogViewIssue.vue b/src/modules/22_issues/components/DialogViewIssue.vue index 25b2d423c..1847da42a 100644 --- a/src/modules/22_issues/components/DialogViewIssue.vue +++ b/src/modules/22_issues/components/DialogViewIssue.vue @@ -409,6 +409,14 @@ watch( --> + - - Date: Tue, 3 Feb 2026 10:57:32 +0700 Subject: [PATCH 10/15] fix:bug --- .../probation/FormEvaluation/FormSaveResult.vue | 2 +- .../probation/FormEvaluation/FormSaveResultAdd.vue | 14 +++++++------- .../FormEvaluation/FormSaveResultAddCommander.vue | 14 +++++++------- .../FormEvaluation/FormSaveResultCommader.vue | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue index 67d3b260e..8f3501946 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResult.vue @@ -130,7 +130,7 @@ async function fectFormfull() { evaluate_expenct_level.value = await probationStore.assignOutput.map( (e: any) => ({ id: e.id, - labal: e.output_desc, + label: e.output_desc, }) ); evaluate_ouptut.value = await probationStore.assignOutput.map((e: any) => ({ diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue index b2408b3b5..13141b464 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormSaveResultAdd.vue @@ -122,7 +122,7 @@ const variablesToWatch = [ competency_level, learn_level, apply_level, - success_level, + // success_level, ]; const ArrayCountbotton = [orientation, self_learning, training_seminar]; @@ -158,7 +158,7 @@ async function fecthFormdata(id: string) { evaluate_expenct_level.value = res.data.result.assign_output.map( (e: any) => ({ id: e.id, - labal: e.output_desc, + label: e.output_desc, }) ); evaluate_ouptut.value = res.data.result.assign_output.map((e: any) => ({ @@ -186,7 +186,7 @@ function savaForm() { competency_level.value === 0 || learn_level.value === 0 || apply_level.value === 0 || - success_level.value === 0 || + // success_level.value === 0 || achievement_strength_desc.value === "" || lengthconduct.value !== 4 || lengthmoral_level.value !== 3 || @@ -260,7 +260,7 @@ function putformData() { competency_level: competency_level.value, learn_level: learn_level.value, apply_level: apply_level.value, - success_level: success_level.value, + // success_level: success_level.value, achievement_other: achievement_other.value, achievement_strength_desc: achievement_strength_desc.value, achievement_improve_desc: achievement_improve_desc.value, @@ -809,7 +809,7 @@ onMounted(async () => { - + @@ -851,7 +851,7 @@ onMounted(async () => { - 1.8 อื่น ๆ + 1.7 อื่น ๆ ({ id: e.id, - labal: e.output_desc, + label: e.output_desc, }) ); evaluate_ouptut.value = res.data.result.assign_output.map((e: any) => ({ @@ -267,7 +267,7 @@ function putformData() { competency_level: competency_level.value, learn_level: learn_level.value, apply_level: apply_level.value, - success_level: success_level.value, + // success_level: success_level.value, achievement_other: achievement_other.value, achievement_strength_desc: achievement_strength_desc.value, achievement_improve_desc: achievement_improve_desc.value, @@ -814,7 +814,7 @@ onMounted(async () => { - + @@ -856,7 +856,7 @@ onMounted(async () => { - 1.8 อื่น ๆ + 1.7 อื่น ๆ ({ id: e.id, - labal: e.output_desc, + label: e.output_desc, }) ); evaluate_ouptut.value = await probationStore.assignOutput.map((e: any) => ({ From 79d1a14ec41fe9bc88e078feab8e29ab09ab53b0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 3 Feb 2026 15:08:24 +0700 Subject: [PATCH 11/15] fix: form upload Attachment --- .../18_command/components/Step/View0_Live.vue | 443 ++++++++++++------ 1 file changed, 292 insertions(+), 151 deletions(-) diff --git a/src/modules/18_command/components/Step/View0_Live.vue b/src/modules/18_command/components/Step/View0_Live.vue index fd5e051f3..4d03fa36f 100644 --- a/src/modules/18_command/components/Step/View0_Live.vue +++ b/src/modules/18_command/components/Step/View0_Live.vue @@ -1,5 +1,5 @@ @@ -344,6 +350,43 @@ function onClose() {
+ +
+
+
+ +
+
+ +
+
+
diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 2081fcc54..452e437a4 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -790,7 +790,7 @@ function onViewDetailNoti(url: string) {