diff --git a/src/api/02_organizational/api.treelist.ts b/src/api/02_organizational/api.treelist.ts index 40285ee7a..afb16eee1 100644 --- a/src/api/02_organizational/api.treelist.ts +++ b/src/api/02_organizational/api.treelist.ts @@ -10,6 +10,7 @@ import env from "../index"; const organizationPath = `${env.API_URI_ORG_SERVICE}/Organization/`; const postionMasterPath = `${env.API_URI_ORG_SERVICE}/PositionMaster`; const organizationPosition = `${env.API_URI_ORG_SERVICE}/OrganizationPosition/`; +const organizationEmployeePosition = `${env.API_URI_ORG_EMPLOYEE_SERVICE}/organization-employee/`; const report = `${env.API_URI}/report/organization/`; @@ -83,8 +84,7 @@ export default { getPositionNumberIdByOcId: (OcId: string) => `${postionMasterPath}/position-number/Oc/${OcId}`, - - /** - * api ประวัติการ publish - */ + organizationEmployeePosition: `${organizationEmployeePosition}`, + organizationEmployeePositionId: (id: string) => + `${organizationEmployeePosition}${id}`, }; diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 9ab8a9ba1..72273513a 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -1,11 +1,21 @@ -/** - * api บรรจุ แต่งตั้ง ย้าย โอน - */ import env from "../index"; - -const placement = `${env.API_PLACEMENT_URI}/Placement/placement/`; +const placement = `${env.API_URI}/Placement/placement`; +const orgTree = `${env.API_URI_ORG_TREE}`; export default { + MainDetail: (year: number) => `${placement}/exam/${year}`, + yearOptions: () => `${placement}/fiscal`, + redirectToPage: (examId: string) => `${placement}/pass/${examId}`, + disclaimF: () => `${placement}/pass/disclaim`, + deferment: () => `${placement}/pass/deferment`, + getStatCard: (examId: string) => `${placement}/pass/stat/${examId}`, + getDatapersonal: (id: string) => `${placement}/personal/${id}`, + putProperty: (id: string) => `${placement}/property/${id}`, + orgTree: orgTree, + placementPass: () => `${placement}/pass`, + placementDefermentInfo: (id: string) => `${placement}/pass/deferment/${id}`, + placementDisclaimInfo: (id: string) => `${placement}/pass/disclaim/${id}`, + //personal placementPersonalId: (personalId: string) => `${placement}personal/${personalId}`, diff --git a/src/api/index.ts b/src/api/index.ts index 857d2e33d..9ba34e3bc 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -8,10 +8,12 @@ const env = ref(process.env.NODE_ENV || "development"); const config = ref({ development: { - // API_URI: "https://localhost:7006/api/v1", + // API_URI: "https://localhost:7260/api", API_URI: "https://bma-ehr.frappet.synology.me/api/v1", // API_URI_ORG_SERVICE: "https://localhost:7056/api/v1", //ใช้ชั่วคราว API_URI_ORG_SERVICE: "https://bma-ehr.frappet.synology.me/api/v1", //ใช้ชั่วคราว + API_URI_ORG_EMPLOYEE_SERVICE: "https://localhost:7208/api/v1", //ใช้ชั่วคราว + // API_URI_ORG_EMPLOYEE_SERVICE: "https://bma-ehr.frappet.synology.me/api/v1", //ใช้ชั่วคราว // API_URI_PROFILE_SERVICE: "https://localhost:7159/api/v1", API_URI_PROFILE_SERVICE: "https://bma-ehr.frappet.synology.me/api/v1", //ใช้ชั่วคราว // API_CANDIDATE_URI: "https://localhost:7007/api/v1", @@ -19,6 +21,8 @@ const config = ref({ // API_REPORT_URI: "https://localhost:7187/api/v1", API_REPORT_URI: "https://bma-ehr.frappet.synology.me/api/v1", API_PLACEMENT_URI: "https://localhost:7260/api", + API_URI_ORG_TREE: + "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230712_172702.json", MEET_URI: "meet.frappet.com", }, test: { @@ -31,9 +35,12 @@ const config = ref({ // API_URI: "https://localhost:5010", API_URI: `${window.location.protocol}//${window.location.host}/api/v1`, API_URI_ORG_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว + API_URI_ORG_EMPLOYEE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว API_URI_PROFILE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, API_CANDIDATE_URI: `${window.location.protocol}//${window.location.host}/api/v1`, API_REPORT_URI: `${window.location.protocol}//${window.location.host}/api/v1`, + API_URI_ORG_TREE: + "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230707_115124.json", MEET_URI: "meet.frappet.com", }, }); @@ -46,6 +53,9 @@ const API_REPORT_URI = ref(config.value[env.value].API_REPORT_URI); const API_URI_ORG_SERVICE = ref( config.value[env.value].API_URI_ORG_SERVICE ); +const API_URI_ORG_EMPLOYEE_SERVICE = ref( + config.value[env.value].API_URI_ORG_EMPLOYEE_SERVICE +); const MEET_URI = ref(config.value[env.value].MEET_URI); const API_URI_PROFILE_SERVICE = ref( config.value[env.value].API_URI_PROFILE_SERVICE @@ -53,6 +63,7 @@ const API_URI_PROFILE_SERVICE = ref( const API_PLACEMENT_URI = ref( config.value[env.value].API_PLACEMENT_URI ); +const API_URI_ORG_TREE = ref(config.value[env.value].API_URI_ORG_TREE); export default { env: env.value, @@ -61,7 +72,9 @@ export default { API_CANDIDATE_URI: API_CANDIDATE_URI.value, API_REPORT_URI: API_REPORT_URI.value, API_URI_ORG_SERVICE: API_URI_ORG_SERVICE.value, + API_URI_ORG_EMPLOYEE_SERVICE: API_URI_ORG_EMPLOYEE_SERVICE.value, API_URI_PROFILE_SERVICE: API_URI_PROFILE_SERVICE.value, API_PLACEMENT_URI: API_PLACEMENT_URI.value, + API_URI_ORG_TREE: API_URI_ORG_TREE.value, MEET_URI: MEET_URI.value, }; diff --git a/src/api/manage/api.organization.ts b/src/api/manage/api.organization.ts index 064a3d5e5..1138be215 100644 --- a/src/api/manage/api.organization.ts +++ b/src/api/manage/api.organization.ts @@ -3,6 +3,7 @@ * เมนูย่อย: ข้อมูลโครงสร้างหน่วยงาน */ import env from "../index"; +const organizationMain = `${env.API_URI}/metadata/main/`; const organization = `${env.API_URI}/metadata/organization/`; const organizationOrganization = `${env.API_URI}/metadata/organization-organization/`; const organizationShortName = `${env.API_URI}/metadata/organization-shortname/`; @@ -21,6 +22,7 @@ export default { /** * api จำนวนข้อมูลใน ระบบจัดการข้อมูลหลัก tab ย่อยแต่ละ tab */ + organizationMain: `${organizationMain}organization`, organization, countDashbordSubHistory: (type: number) => `${dashbord}${type}`, countDashbordHistory: `${dashbord}`, diff --git a/src/api/manage/api.positionEmployee.ts b/src/api/manage/api.positionEmployee.ts index abd2be21b..456594378 100644 --- a/src/api/manage/api.positionEmployee.ts +++ b/src/api/manage/api.positionEmployee.ts @@ -3,6 +3,7 @@ * เมนูย่อย: ข้อมูลตำแหน่งของลูกจ้างกรุงเทพมหานคร */ import env from "../index"; +const positionEmployee = `${env.API_URI}/metadata/main/`; const positionEmployeePosition = `${env.API_URI}/metadata/position-employee-position/`; const positionEmployeePositionSide = `${env.API_URI}/metadata/position-employee-position-side/`; const positionEmployeeGroup = `${env.API_URI}/metadata/position-employee-group/`; @@ -11,6 +12,7 @@ const positionEmployeeLevel = `${env.API_URI}/metadata/position-employee-level/` const positionEmployeeStatus = `${env.API_URI}/metadata/position-employee-status/`; export default { + positionEmployee: `${positionEmployee}positionEmployee`, /** * api ตำแหน่ง */ diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 4a463859c..3552d4a07 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -88,11 +88,16 @@ const menuList = readonly([ }, { key: 3.5, + label: "ผังโครงสร้างลูกจ้าง", + path: "organizationalEmployee", + }, + { + key: 3.6, label: "จัดการบัญชี 2", path: "manageReport2", }, { - key: 3.6, + key: 3.7, label: "รายงานบัญชี", path: "organizationalReport", }, diff --git a/src/modules/01_metadata/components/positionEmployee/Group.vue b/src/modules/01_metadata/components/positionEmployee/Group.vue index 00c538863..7d8f70425 100644 --- a/src/modules/01_metadata/components/positionEmployee/Group.vue +++ b/src/modules/01_metadata/components/positionEmployee/Group.vue @@ -437,7 +437,7 @@ const fetchHistory = async () => { .catch((e) => { messageError($q, e); }) - .finally(async () => { + .finally(() => { hideLoader(); }); }; diff --git a/src/modules/02_organizational/router.ts b/src/modules/02_organizational/router.ts index 01e908726..cec042ef6 100644 --- a/src/modules/02_organizational/router.ts +++ b/src/modules/02_organizational/router.ts @@ -9,6 +9,8 @@ const MainStructChart = () => const MainOrgChart = () => import("@/modules/02_organizational/views/MainOrgChart.vue"); const MainTree = () => import("@/modules/02_organizational/views/MainTree.vue"); +const MainTreeEmployee = () => + import("@/modules/02_organizational/views/MainTreeEmployee.vue"); const MainReport = () => import("@/modules/02_organizational/views/MainReport.vue"); const ManageReport2 = () => @@ -60,6 +62,16 @@ export default [ Role: "organization", }, }, + { + path: "/organizational/employee", + name: "organizationalEmployee", + component: MainTreeEmployee, + meta: { + Auth: true, + Key: [9], + Role: "organization", + }, + }, { path: "/organizational/manage/report", name: "manageReport2", diff --git a/src/modules/02_organizational/views/MainTree.vue b/src/modules/02_organizational/views/MainTree.vue index c212bb6e0..9d5441556 100644 --- a/src/modules/02_organizational/views/MainTree.vue +++ b/src/modules/02_organizational/views/MainTree.vue @@ -2,102 +2,78 @@