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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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/10] 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: Wed, 4 Feb 2026 13:01:41 +0700 Subject: [PATCH 10/10] fix:add fiedl email phone --- src/components/Dialogs/DialogDebug.vue | 43 ++++++++++++++++++++++++++ src/views/MainLayout.vue | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index 8d475ec9c..917151c0e 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -47,6 +47,8 @@ const formData = reactive({ system: "mgt", fileAttachments: [] as File[], menu: "", + email: "", + phone: "", }); /** ฟังก์ชันบันทึกข้อมูล */ @@ -60,6 +62,8 @@ function onSubmit() { system: formData.system, menu: formData.menu, org: orgName.value, + email: formData.email, + phone: formData.phone, }; const res = await http.post(config.API.orgIssues, payload); @@ -187,6 +191,8 @@ function onClose() { formData.title = ""; formData.description = ""; formData.fileAttachments = []; + formData.email = ""; + formData.phone = ""; } @@ -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) {