From 43f4cecf7f0a8fa12bbaf101c9111422f58d2dc9 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 18 Apr 2024 11:42:01 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B9=80=E0=B8=A0=E0=B8=97=E0=B8=97?= =?UTF-8?q?=E0=B8=B8=E0=B8=99=20=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/09_scholarship/views/detail.vue | 90 +++++++++++++-------- src/modules/09_scholarship/views/main.vue | 61 +++++++------- 2 files changed, 85 insertions(+), 66 deletions(-) diff --git a/src/modules/09_scholarship/views/detail.vue b/src/modules/09_scholarship/views/detail.vue index 6e228f4..dc5c812 100644 --- a/src/modules/09_scholarship/views/detail.vue +++ b/src/modules/09_scholarship/views/detail.vue @@ -103,15 +103,19 @@ const scholarshipTypeOp = ref([ { id: "DOMESTICE", name: "การศึกษาในประเทศ" }, { id: "NOABROAD", - name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)", + name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)", }, { id: "ABROAD", - name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)", + name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)", }, { id: "EXECUTIVE", - name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)", + name: " ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรประเภทนักบริหาร)", + }, + { + id: "RESEARCH", + name: "ศึกษา ฝึกอบรม ประชุม ดูงาน และปฏิบัติการวิจัย ณ ต่างประเทศ", }, ]); @@ -288,8 +292,8 @@ async function clickUpload(file: any) { await http .post( config.API.developmentSalaryFile( - "ระบบพัฒนาบุคคล", - "ฟอร์มรายงานตัวกลับเข้ารับราชการ", + "พัฒนาบุคคล", + "ฟอร์มรายงานตัวกลับ", id.value ), { @@ -346,17 +350,16 @@ function getFile() { http .get( config.API.developmentSalaryFile( - "ระบบพัฒนาบุคคล", - "ฟอร์มรายงานตัวกลับเข้ารับราชการ", + "พัฒนาบุคคล", + "ฟอร์มรายงานตัวกลับ", id.value ) ) .then((res) => { - const dataFile = res.data; - fileList.value = dataFile[0]; - }) - .catch((e) => { - messageError($q, e); + if (res) { + const dataFile = res.data; + fileList.value = dataFile[0]; + } }) .finally(() => {}); } @@ -409,26 +412,41 @@ onMounted(async () => {
- แก้ไขข้อมูลรายงานตัวกลับเข้ารับราชการ - -
-
- - ดาวน์โหลดฟอร์มต้นแบบ + + + + + + + แก้ไขข้อมูลรายงานตัวกลับเข้ารับราชการ + + + + + + + + ดาวน์โหลดฟอร์มต้นแบบ + + + + +
+
{
-
+
- ดาวน์โหลดไฟล์เอกสาร - + ดาวน์โหลดไฟล์
diff --git a/src/modules/09_scholarship/views/main.vue b/src/modules/09_scholarship/views/main.vue index 9ddc4cc..659b4f9 100644 --- a/src/modules/09_scholarship/views/main.vue +++ b/src/modules/09_scholarship/views/main.vue @@ -16,7 +16,7 @@ const router = useRouter(); const $q = useQuasar(); const filterKeyword = ref(""); -const profilId = ref('') +const profilId = ref(""); const currentPage = ref(1); const maxPage = ref(1); const page = ref(1); @@ -26,21 +26,22 @@ const rows = ref(); const year = ref(0); const type = ref("DOMESTICE"); const scholarshipTypeOp = ref([ - { - id: "DOMESTICE", - name: "การศึกษาในประเทศ", - }, + { id: "DOMESTICE", name: "การศึกษาในประเทศ" }, { id: "NOABROAD", - name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)", + name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)", }, { id: "ABROAD", - name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)", + name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)", }, { id: "EXECUTIVE", - name: "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)", + name: " ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยงานภายนอก (หลักสูตรประเภทนักบริหาร)", + }, + { + id: "RESEARCH", + name: "ศึกษา ฝึกอบรม ประชุม ดูงาน และปฏิบัติการวิจัย ณ ต่างประเทศ", }, ]); @@ -79,16 +80,14 @@ const visibleColumns = ref(["scholarshipYear", "scholarshipType"]); /** ดึงข้อมูล */ function getData() { http - .get(config.API.developmentScholarship+`/user/${profilId.value}`) - .then((res)=>{ - rows.value = res.data.result - }).catch((e)=>{ - messageError($q,e) - }).finally(()=>{ - - }) - - + .get(config.API.developmentScholarship + `/user/${profilId.value}`) + .then((res) => { + rows.value = res.data.result; + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => {}); } function onEdit(id: string) { @@ -117,8 +116,8 @@ function getProfileId() { http .get(config.API.profilePosition()) .then((res) => { - profilId.value = res.data.result.profileId - getData() + profilId.value = res.data.result.profileId; + getData(); }) .catch((e) => { messageError($q, e); @@ -129,17 +128,17 @@ function getProfileId() { } function convertType(val: string) { - switch (val) { - case "DOMESTICE": - return "การศึกษาในประเทศ"; - case "NOABROAD": - return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)"; - case "ABROAD": - return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)"; - case "EXECUTIVE": - return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)"; - } + switch (val) { + case "DOMESTICE": + return "การศึกษาในประเทศ"; + case "NOABROAD": + return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่ไม่มีการไปต่างประเทศ)"; + case "ABROAD": + return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรที่มีการไปต่างประเทศ)"; + case "EXECUTIVE": + return "ฝึกอบรมในประเทศที่ส่งไปพัฒนากับหน่วยวงานภายนอก (หลักสูตรประเภทนักบริหาร)"; } +} onMounted(async () => { getProfileId(); @@ -299,7 +298,7 @@ onMounted(async () => { {{ col.value ? col.value + 543 : "-" }}
- {{ col.value ? convertType(col.value): "-" }} + {{ col.value ? convertType(col.value) : "-" }}
{{ col.value ? col.value : "-" }}