แก้ไข เพิ่ม manual ใน config

This commit is contained in:
AnandaTon 2024-06-24 10:11:04 +07:00
parent 5246a694d4
commit 0a5fc706b1
3 changed files with 32 additions and 63 deletions

View file

@ -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,
};

View file

@ -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"
}

View file

@ -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 {