From 8337d743685132a2906f64985d829fc78f2f51f6 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 22 Jan 2025 17:52:40 +0700 Subject: [PATCH 1/5] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=81?= =?UTF-8?q?=E0=B8=9A=E0=B8=9A=E0=B8=A1=E0=B8=AD=E0=B8=9A=E0=B8=AB=E0=B8=A1?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B8=AF=20?= =?UTF-8?q?=E0=B9=84=E0=B8=A1=E0=B9=88=E0=B9=80=E0=B9=80=E0=B8=AA=E0=B8=94?= =?UTF-8?q?=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/probation/api.probation.ts | 1 + .../components/03_AssignPage.vue | 2 +- .../15_probationReport/interface/Main.ts | 8 +++++++ src/modules/15_probationReport/views/main.vue | 22 +++++++++++-------- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/api/probation/api.probation.ts b/src/api/probation/api.probation.ts index 003d1eb..0d4be07 100644 --- a/src/api/probation/api.probation.ts +++ b/src/api/probation/api.probation.ts @@ -21,6 +21,7 @@ export default { `${probation}/data-options/knowledge?personal_id=${personalId}`, probationsGetAssign: (assignId: string) => `${probation}/assign/probation-assign?assign_id=${assignId}`, + probationsGetAssignNew: (assignId: string) => `${probation}/assign?assign_id=${assignId}`, summarySurveyDetail: (id: string) => `${probation}/survey?assign_id=${id}`, summaryDetail: () => `${probation}/survey`, saveEditAssign: (personalId: string) => diff --git a/src/modules/15_probationReport/components/03_AssignPage.vue b/src/modules/15_probationReport/components/03_AssignPage.vue index 47c6631..6ebcfdc 100644 --- a/src/modules/15_probationReport/components/03_AssignPage.vue +++ b/src/modules/15_probationReport/components/03_AssignPage.vue @@ -763,7 +763,7 @@ async function DataSave(id: string) { /** get ข้อมูลรายการมอบหมาย */ async function getAssign() { await http - .get(config.API.probationsGetAssign(probationStore.assignId)) + .get(config.API.probationsGetAssignNew(probationStore.assignId)) .then((res) => { isEdit.value = false; const data = res.data.result; diff --git a/src/modules/15_probationReport/interface/Main.ts b/src/modules/15_probationReport/interface/Main.ts index 5f56050..ef1950a 100644 --- a/src/modules/15_probationReport/interface/Main.ts +++ b/src/modules/15_probationReport/interface/Main.ts @@ -71,6 +71,13 @@ interface ProbationReportType { pass_result: number; evaluate_date: Date; } + +interface FileType{ + path:string + pathname:string + fileName:string + title:string +} export type { ListDataText, DataSurvey, @@ -78,4 +85,5 @@ export type { AppointTopicMain, AppointTopic, ProbationReportType, + FileType }; diff --git a/src/modules/15_probationReport/views/main.vue b/src/modules/15_probationReport/views/main.vue index ba9a0ec..e8a2d86 100644 --- a/src/modules/15_probationReport/views/main.vue +++ b/src/modules/15_probationReport/views/main.vue @@ -11,6 +11,7 @@ import { useProbationReport } from "@/modules/15_probationReport/store"; import type { DataSurvey, ProbationReportType, + FileType } from "@/modules/15_probationReport/interface/Main"; import SurveyPage from "@/modules/15_probationReport/components/01_SurveyPage.vue"; @@ -25,9 +26,12 @@ const { showLoader, hideLoader, messageError } = mixin; const dataSurvey = ref(null); const isData = ref(true); -const dataProbation = ref(""); -const dataResult1 = ref(""); -const dataResult2 = ref(""); +const dataProbation = ref([]); +const dataResult1 = ref([]); +const dataResult2 = ref([]); +// const dataProbation = ref(""); +// const dataResult1 = ref(""); +// const dataResult2 = ref(""); const formDataResult = ref({ develop_orientation_score: 0, @@ -115,15 +119,15 @@ async function getSalary( id: string, name: string, group: string, - val: Ref + val: Ref ) { await http .get(config.API.developmentSalaryFile(name, group, id)) .then((res) => { - val.value = res.data.fileName; + val.value = res.data; }) .catch((e) => { - messageError($q, e); + // messageError($q, e); }); } @@ -170,16 +174,16 @@ onMounted(async () => { > - + From fcbce0f9943c835b5e074113ecca2e096c002d7d Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 22 Jan 2025 17:53:59 +0700 Subject: [PATCH 2/5] no message --- src/modules/15_probationReport/views/main.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/15_probationReport/views/main.vue b/src/modules/15_probationReport/views/main.vue index e8a2d86..c0813df 100644 --- a/src/modules/15_probationReport/views/main.vue +++ b/src/modules/15_probationReport/views/main.vue @@ -11,7 +11,7 @@ import { useProbationReport } from "@/modules/15_probationReport/store"; import type { DataSurvey, ProbationReportType, - FileType + FileType, } from "@/modules/15_probationReport/interface/Main"; import SurveyPage from "@/modules/15_probationReport/components/01_SurveyPage.vue"; @@ -124,7 +124,7 @@ async function getSalary( await http .get(config.API.developmentSalaryFile(name, group, id)) .then((res) => { - val.value = res.data; + val.value = res.data ? res.data : []; }) .catch((e) => { // messageError($q, e); @@ -183,7 +183,11 @@ onMounted(async () => { name="RESULT2" label="ผลการประเมินการฯ ครั้งที่ 2" /> - + From 3e3147686c6752368c16c47ca53e3ddb8c4b489d Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 22 Jan 2025 18:02:37 +0700 Subject: [PATCH 3/5] =?UTF-8?q?=E0=B8=A5=E0=B8=9A=E0=B8=9B=E0=B8=B8?= =?UTF-8?q?=E0=B9=88=E0=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/03_AssignPage.vue | 90 +------------------ 1 file changed, 3 insertions(+), 87 deletions(-) diff --git a/src/modules/15_probationReport/components/03_AssignPage.vue b/src/modules/15_probationReport/components/03_AssignPage.vue index 6ebcfdc..bacc4b0 100644 --- a/src/modules/15_probationReport/components/03_AssignPage.vue +++ b/src/modules/15_probationReport/components/03_AssignPage.vue @@ -1094,42 +1094,12 @@ onMounted(async () => {