From 0a5fc706b1710d898711b15b1218f9e4a0382270 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Mon, 24 Jun 2024 10:11:04 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=20manual=20?= =?UTF-8?q?=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 {