From 0a5fc706b1710d898711b15b1218f9e4a0382270 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Mon, 24 Jun 2024 10:11:04 +0700 Subject: [PATCH 1/7] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=20man?= =?UTF-8?q?ual=20=E0=B9=83=E0=B8=99=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.ts | 30 ++++++++++++++++++++ src/manual.json | 61 ---------------------------------------- src/views/MainLayout.vue | 4 +-- 3 files changed, 32 insertions(+), 63 deletions(-) delete mode 100644 src/manual.json diff --git a/src/app.config.ts b/src/app.config.ts index be0aacba9..c124dedc8 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -137,10 +137,40 @@ const API = { ...file, }; +const path = "http://localhost:3008"; + +const manualConfig = { + "/": `${path}/`, + "/KPI-indicator-plan": `${path}/manual/chapter-3-admin-evaluate`, + "/organization-new": `${path}/manual/chapter-4-admin-organization`, + "/registry-new": `${path}/manual/chapter-7-admin-registry`, + "/registry-employee": `${path}/manual/chapter-8-admin-registry-employee`, + "/order": `${path}/manual/chapter-9-admin-order`, + "/placement": `${path}/manual/chapter-11-admin-appointment`, + "/transfer": `${path}/manual/chapter-11-admin-appointment`, + "/receive": `${path}/manual/chapter-11-admin-appointment`, + "/help-government": `${path}/manual/chapter-11-admin-appointment`, + "/repatriate": `${path}/manual/chapter-11-admin-appointment`, + "/appoint-promote": `${path}/manual/chapter-11-admin-appointment`, + "/appoint-employee": `${path}/manual/chapter-11-admin-appointment`, + "/other": `${path}/manual/chapter-11-admin-appointment`, + "/salary": `${path}/manual/chapter-18-admin-salary`, + "/salary-employee": `${path}/manual/chapter-18-admin-salary`, + "/salary/round": `${path}/manual/chapter-18-admin-salary`, + "/salary/lists": `${path}/manual/chapter-18-admin-salary`, + "/salary-employee/lists": `${path}/manual/chapter-18-admin-salary`, + "/salary/command": `${path}/manual/chapter-18-admin-salary`, + "/development": `${path}/manual/chapter-20-admin-development`, + "/development/history": `${path}/manual/chapter-20-admin-development`, + "/development/employee-history": `${path}/manual/chapter-20-admin-development`, + "/development/scholarship": `${path}/manual/chapter-20-admin-development`, +}; + export default { API: API, compettitivePanel, qualifyDisableExamPanel, qualifyExamPanel, s3ClusterUrl, + manualConfig, }; diff --git a/src/manual.json b/src/manual.json deleted file mode 100644 index 5a00a2c5c..000000000 --- a/src/manual.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "/": "http://localhost:3008/", - "/KPI-indicator-plan": "http://localhost:3008/manual/chapter-3-admin-evaluate", - "/KPI-indicator-role": "http://localhost:3008/manual/chapter-3-admin-evaluate", - "/assignment": "http://localhost:3008/manual/chapter-3-admin-evaluate", - "/KPI-competency": "http://localhost:3008/manual/chapter-3-admin-evaluate", - "/strategic": "http://localhost:3008/manual/chapter-3-admin-evaluate", - "/organization-new": "http://localhost:3008/manual/chapter-4-admin-organization", - "/registry-new": "http://localhost:3008/manual/chapter-7-admin-registry", - "/registry-employee": "http://localhost:3008/manual/chapter-8-admin-registry-employee", - "/order": "http://localhost:3008/manual/chapter-9-admin-order", - "/compete/period": "http://localhost:3008/manual/chapter-10-admin-recruit", - "/compete/period/stat": "http://localhost:3008/manual/chapter-10-admin-recruit", - "/qualify/period": "http://localhost:3008/manual/chapter-10-admin-recruit", - "/disable/period": "http://localhost:3008/manual/chapter-10-admin-recruit", - "/qualify/manage": "http://localhost:3008/manual/chapter-10-admin-recruit", - "/qualify/period/stat": "http://localhost:3008/manual/chapter-10-admin-recruit", - "/qualify/disable/stat": "http://localhost:3008/manual/chapter-10-admin-recruit", - "/placement": "http://localhost:3008/manual/chapter-11-admin-appointment", - "/transfer": "http://localhost:3008/manual/chapter-11-admin-appointment", - "/receive": "http://localhost:3008/manual/chapter-11-admin-appointment", - "/help-government": "http://localhost:3008/manual/chapter-11-admin-appointment", - "/repatriate": "http://localhost:3008/manual/chapter-11-admin-appointment", - "/appoint-promote": "http://localhost:3008/manual/chapter-11-admin-appointment", - "/appoint-employee": "http://localhost:3008/manual/chapter-11-admin-appointment", - "/other": "http://localhost:3008/manual/chapter-11-admin-appointment", - "/probation": "http://localhost:3008/manual/chapter-12-admin-probation", - "/retirement": "http://localhost:3008/manual/chapter-13-admin-retirement", - "/retirement/resign": "http://localhost:3008/manual/chapter-13-admin-retirement", - "/exit-Interview": "http://localhost:3008/manual/chapter-13-admin-retirement", - "/deceased": "http://localhost:3008/manual/chapter-13-admin-retirement", - "/dismiss-order": "http://localhost:3008/manual/chapter-13-admin-retirement", - "/insignia/round-proposals": "http://localhost:3008/manual/chapter-14-admin-insignia", - "/insignia/manage/list-manage": "http://localhost:3008/manual/chapter-14-admin-insignia", - "/insignia/record": "http://localhost:3008/manual/chapter-14-admin-insignia", - "/insignia/allocate": "http://localhost:3008/manual/chapter-14-admin-insignia", - "/insignia/borrow": "http://localhost:3008/manual/chapter-14-admin-insignia", - "/insignia/report": "http://localhost:3008/manual/chapter-14-admin-insignia", - "/discipline/complaints": "http://localhost:3008/manual/chapter-16-admin-discipline", - "/discipline/investigatefacts": "http://localhost:3008/manual/chapter-16-admin-discipline", - "/discipline/disciplinary": "http://localhost:3008/manual/chapter-16-admin-discipline", - "/discipline-result": "http://localhost:3008/manual/chapter-16-admin-discipline", - "/discipline-suspend": "http://localhost:3008/manual/chapter-16-admin-discipline", - "/discipline-appealcomplain": "http://localhost:3008/manual/chapter-16-admin-discipline", - "/discipline-order": "http://localhost:3008/manual/chapter-16-admin-discipline", - "/discipline/director": "http://localhost:3008/manual/chapter-16-admin-discipline", - "/discipline/channel": "http://localhost:3008/manual/chapter-16-admin-discipline", - "/evaluate": "http://localhost:3008/manual/chapter-17-admin-KPI", - "/evaluate/director": "http://localhost:3008/manual/chapter-17-admin-KPI", - "/evaluate/meeting": "http://localhost:3008/manual/chapter-17-admin-KPI", - "/salary":"http://localhost:3008/manual/chapter-18-admin-salary", - "/salary-employee":"http://localhost:3008/manual/chapter-18-admin-salary", - "/salary/round":"http://localhost:3008/manual/chapter-18-admin-salary", - "/salary/lists":"http://localhost:3008/manual/chapter-18-admin-salary", - "/salary-employee/lists":"http://localhost:3008/manual/chapter-18-admin-salary", - "/salary/command":"http://localhost:3008/manual/chapter-18-admin-salary", - "/development":"http://localhost:3008/manual/chapter-20-admin-development", - "/development/history":"http://localhost:3008/manual/chapter-20-admin-development", - "/development/employee-history":"http://localhost:3008/manual/chapter-20-admin-development", - "/development/scholarship":"http://localhost:3008/manual/chapter-20-admin-development" -} \ No newline at end of file diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 48287850a..bcd79c094 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -9,7 +9,6 @@ import { useCounterMixin } from "@/stores/mixin"; import http from "@/plugins/http"; import config from "@/app.config"; -import manual from "@/manual.json"; import type { ScrollType, @@ -478,7 +477,8 @@ watch( const handleButtonClick = () => { const currentPath = route.path; - const popupPath = manual[currentPath as keyof typeof manual]; + const popupPath = + config.manualConfig[currentPath as keyof typeof config.manualConfig]; if (popupPath) { window.open(popupPath); } else { From 23afca088195e5b1447e93cd9e3acebc65299271 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Mon, 24 Jun 2024 10:16:40 +0700 Subject: [PATCH 2/7] Update app.config.ts --- src/app.config.ts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/app.config.ts b/src/app.config.ts index c124dedc8..784c7001b 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -138,14 +138,26 @@ const API = { }; const path = "http://localhost:3008"; +const name = ""; const manualConfig = { "/": `${path}/`, "/KPI-indicator-plan": `${path}/manual/chapter-3-admin-evaluate`, + "/KPI-indicator-role": `${path}/manual/chapter-3-admin-evaluate`, + "/assignment": `${path}/manual/chapter-3-admin-evaluate`, + "/KPI-competency": `${path}/manual/chapter-3-admin-evaluate`, + "/strategic": `${path}/manual/chapter-3-admin-evaluate`, "/organization-new": `${path}/manual/chapter-4-admin-organization`, "/registry-new": `${path}/manual/chapter-7-admin-registry`, "/registry-employee": `${path}/manual/chapter-8-admin-registry-employee`, "/order": `${path}/manual/chapter-9-admin-order`, + "/compete/period": `${path}/manual/chapter-10-admin-recruit`, + "/compete/period/stat": `${path}/manual/chapter-10-admin-recruit`, + "/qualify/period": `${path}/manual/chapter-10-admin-recruit`, + "/disable/period": `${path}/manual/chapter-10-admin-recruit`, + "/qualify/manage": `${path}/manual/chapter-10-admin-recruit`, + "/qualify/period/stat": `${path}/manual/chapter-10-admin-recruit`, + "/qualify/disable/stat": `${path}/manual/chapter-10-admin-recruit`, "/placement": `${path}/manual/chapter-11-admin-appointment`, "/transfer": `${path}/manual/chapter-11-admin-appointment`, "/receive": `${path}/manual/chapter-11-admin-appointment`, @@ -154,6 +166,30 @@ const manualConfig = { "/appoint-promote": `${path}/manual/chapter-11-admin-appointment`, "/appoint-employee": `${path}/manual/chapter-11-admin-appointment`, "/other": `${path}/manual/chapter-11-admin-appointment`, + "/probation": `${path}/manual/chapter-12-admin-probation`, + "/retirement": `${path}/manual/chapter-13-admin-retirement`, + "/retirement/resign": `${path}/manual/chapter-13-admin-retirement`, + "/exit-Interview": `${path}/manual/chapter-13-admin-retirement`, + "/deceased": `${path}/manual/chapter-13-admin-retirement`, + "/dismiss-order": `${path}/manual/chapter-13-admin-retirement`, + "/insignia/round-proposals": `${path}/manual/chapter-14-admin-insignia`, + "/insignia/manage/list-manage": `${path}/manual/chapter-14-admin-insignia`, + "/insignia/record": `${path}/manual/chapter-14-admin-insignia`, + "/insignia/allocate": `${path}/manual/chapter-14-admin-insignia`, + "/insignia/borrow": `${path}/manual/chapter-14-admin-insignia`, + "/insignia/report": `${path}/manual/chapter-14-admin-insignia`, + "/discipline/complaints": `${path}/manual/chapter-16-admin-discipline`, + "/discipline/investigatefacts": `${path}/manual/chapter-16-admin-discipline`, + "/discipline/disciplinary": `${path}/manual/chapter-16-admin-discipline`, + "/discipline-result": `${path}/manual/chapter-16-admin-discipline`, + "/discipline-suspend": `${path}/manual/chapter-16-admin-discipline`, + "/discipline-appealcomplain": `${path}/manual/chapter-16-admin-discipline`, + "/discipline-order": `${path}/manual/chapter-16-admin-discipline`, + "/discipline/director": `${path}/manual/chapter-16-admin-discipline`, + "/discipline/channel": `${path}/manual/chapter-16-admin-discipline`, + "/evaluate": `${path}/manual/chapter-17-admin-KPI`, + "/evaluate/director": `${path}/manual/chapter-17-admin-KPI`, + "/evaluate/meeting": `${path}/manual/chapter-17-admin-KPI`, "/salary": `${path}/manual/chapter-18-admin-salary`, "/salary-employee": `${path}/manual/chapter-18-admin-salary`, "/salary/round": `${path}/manual/chapter-18-admin-salary`, From dd9c078419809f54f500560d25433eaaecf1fa74 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Mon, 24 Jun 2024 13:42:44 +0700 Subject: [PATCH 3/7] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B9=80?= =?UTF-8?q?=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=81=E0=B8=A3=E0=B8=A3?= =?UTF-8?q?=E0=B8=A1=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Director/Form.vue | 61 +++++++++++++++++-- 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/src/modules/12_evaluatePersonal/components/Director/Form.vue b/src/modules/12_evaluatePersonal/components/Director/Form.vue index 9a7b64e7e..89565c6f4 100644 --- a/src/modules/12_evaluatePersonal/components/Director/Form.vue +++ b/src/modules/12_evaluatePersonal/components/Director/Form.vue @@ -14,6 +14,14 @@ import http from "@/plugins/http"; import config from "@/app.config"; import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue"; +const total = ref(0); +const totalList = ref(1); +const pagination = ref({ + sortBy: "createdAt", + descending: true, + page: 1, + rowsPerPage: 10, +}); const modalPersonal = ref(false); const personId = ref(""); const $q = useQuasar(); @@ -47,10 +55,10 @@ const emit = defineEmits(["formDataReturn"]); // const idCard = ref(""); const idCardRef = ref(null); -const type = ref("idcard"); +const type = ref("citizenId"); const search = ref(""); const typeOps = ref([ - { id: "idcard", name: "เลขประจำตัวประชาชน" }, + { id: "citizenId", name: "เลขประจำตัวประชาชน" }, { id: "firstname", name: "ชื่อ" }, { id: "lastname", name: "นามสกุล" }, ]); @@ -203,12 +211,21 @@ async function searchInput() { keyword: search.value, }; await http - .post(config.API.orgSearchPersonal(), body) + .post( + config.API.orgSearchPersonal() + + `?page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}`, + body + ) .then((res) => { - const data = res.data.result; + const data = res.data.result.data; + totalList.value = Math.ceil( + res.data.result.total / pagination.value.rowsPerPage + ); + total.value = res.data.result.total; + const list = data.map((e: ResponsePreson) => ({ personId: e.id, - idcard: e.idcard, + idcard: e.citizenId, prefix: e.prefix, firstName: e.firstName, lastName: e.lastName, @@ -252,6 +269,17 @@ function onclickViewinfo(id: string) { function updatemodalPersonal(modal: boolean) { modalPersonal.value = modal; } +function updatePagination(newPagination: any) { + pagination.value.page = 1; + pagination.value.rowsPerPage = newPagination.rowsPerPage; +} + +watch( + () => pagination.value.rowsPerPage, + async () => { + await searchInput(); + } +);