From 6a5823e15047b4e095177ef5c73e781acd7afefd Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Thu, 14 Aug 2025 11:46:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=8F=B8=E6=8E=92=E7=8F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/hr/paiban/index.ts | 65 +++++ src/layout/components/Sidebar/SidebarItem.vue | 10 +- src/permission.ts | 10 +- src/store/modules/permission.ts | 16 +- src/views/hr/company/companyduty.vue | 273 +++++++++++++----- src/views/hr/company/savePage.vue | 232 +++++++++++++++ src/views/hr/displayboards/dimissionrate.vue | 117 ++++---- 7 files changed, 581 insertions(+), 142 deletions(-) create mode 100644 src/api/hr/paiban/index.ts create mode 100644 src/views/hr/company/savePage.vue diff --git a/src/api/hr/paiban/index.ts b/src/api/hr/paiban/index.ts new file mode 100644 index 0000000..bb43d3e --- /dev/null +++ b/src/api/hr/paiban/index.ts @@ -0,0 +1,65 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; + + +/** + * 新增职务分类 + */ + export function companyDutyInit(data?: any){ + return request({ + url: '/systemapi/app/companyDutyInit', + method: 'post', + data: data + }); +} +/** + * 新增职务分类 + */ + export function getYearMonthWorkMan(data?: any){ + return request({ + url: '/systemapi/app/getYearMonthWorkMan', + method: 'post', + data: data + }); +} +/** + * 新增职务分类 + */ + export function geiOrgAllPeople(data?: any){ + return request({ + url: '/systemapi/app/geiOrgAllPeople', + method: 'post', + data: data + }); +} +/** + * 编辑值班信息 + */ + export function saveEditDutyInfo(data?: any){ + return request({ + url: '/systemapi/app/saveEditDutyInfo', + method: 'post', + data: data + }); +} + +/** + * 删除排班信息 + */ + export function delOneDayDuty(data?: any){ + return request({ + url: '/systemapi/app/delOneDayDuty', + method: 'post', + data: data + }); +} +/** + * 获取潘板信息 + */ + export function getDutyCont(data?: any){ + return request({ + url: '/systemapi/app/getDutyCont', + method: 'post', + data: data + }); +} diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 3828898..51da2df 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -79,11 +79,11 @@ function resolvePath(routePath: string) { // fullPath = fullPath + "&table_id=" + props.item.tableId; // } // } - console.log("路由路径<------------------"); - console.log("routePath:", routePath); - console.log("fullPath:", fullPath); - console.log("item:", props.item); - console.log("路由路径------------------>"); + // console.log("路由路径<------------------"); + // console.log("routePath:", routePath); + // console.log("fullPath:", fullPath); + // console.log("item:", props.item); + // console.log("路由路径------------------>"); return fullPath; } diff --git a/src/permission.ts b/src/permission.ts index 8b2e147..160872b 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -16,9 +16,9 @@ const whiteList = ["/login","/login/silentlogin","/aiurl"]; router.beforeEach(async (to:any, from:any, next:any) => { NProgress.start(); - console.log("白名单路由----》"); + // console.log("白名单路由----》"); const hasToken = localStorage.getItem(appTokenKey); - console.log("白名单路由----》",hasToken,"--->",to.path); + // console.log("白名单路由----》",hasToken,"--->",to.path); if (hasToken) { // console.log("白名单路由--22--》",hasToken,to.path); if (to.path === "/login") { @@ -43,11 +43,11 @@ router.beforeEach(async (to:any, from:any, next:any) => { try { // const { roles } = await userStore.getInfo(); const { perms } = await userStore.getInfo(); - console.log("路由权限---》",perms); + // console.log("路由权限---》",perms); const accessRoutes = await permissionStore.generateRoutes(perms); - console.log("路由权限--perms--》",accessRoutes); + // console.log("路由权限--perms--》",accessRoutes); accessRoutes.forEach((route:any) => { - console.log("路由权限--addRoutecessRoutes",route); + // console.log("路由权限--addRoutecessRoutes",route); router.addRoute(route); }); next({ ...to, replace: true }); diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index 5245f4f..04faf80 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -61,10 +61,10 @@ const filterAsyncRoutes = (routes: RouteRecordRaw[], roles: string[]) => { tmpRoute.component = Layout; // console.log(); } else { - console.log("判断用户-251->",tmpRoute.component); + // console.log("判断用户-251->",tmpRoute.component); const component = modules[`../../views/${tmpRoute.component}.vue`]; // const component = modules[`${tmpRoute.component}.vue`]; - console.log("判断用户-1111111111111111->",component); + // console.log("判断用户-1111111111111111->",component); if (component) { tmpRoute.component = component; } else { @@ -104,12 +104,12 @@ export const usePermissionStore = defineStore("permission", () => { listRoutes() .then(({ data: asyncRoutes }) => { // 根据角色获取有访问权限的路由 - console.log("获取到的路由---->",asyncRoutes); + // console.log("获取到的路由---->",asyncRoutes); const accessedRoutes = filterAsyncRoutes(asyncRoutes, roles); - console.log("获取到的路由--1-->",accessedRoutes); + // console.log("获取到的路由--1-->",accessedRoutes); - console.log("获取到的路由--2-->",roles); + // console.log("获取到的路由--2-->",roles); setRoutes(accessedRoutes); resolve(accessedRoutes); @@ -119,9 +119,9 @@ export const usePermissionStore = defineStore("permission", () => { }); }); } - console.log("获取到的路由--3->",routes) - console.log("获取到的路由--4->",setRoutes) - console.log("获取到的路由--5->",generateRoutes) + // console.log("获取到的路由--3->",routes) + // console.log("获取到的路由--4->",setRoutes) + // console.log("获取到的路由--5->",generateRoutes) return { routes, setRoutes, generateRoutes }; }); diff --git a/src/views/hr/company/companyduty.vue b/src/views/hr/company/companyduty.vue index 70853b6..c46d06b 100644 --- a/src/views/hr/company/companyduty.vue +++ b/src/views/hr/company/companyduty.vue @@ -3,16 +3,142 @@ @ 时间: 2025-08-11 14:11:11 @ 备注: 公司值班 --> - + diff --git a/src/views/hr/company/savePage.vue b/src/views/hr/company/savePage.vue new file mode 100644 index 0000000..89a66ca --- /dev/null +++ b/src/views/hr/company/savePage.vue @@ -0,0 +1,232 @@ + + + + diff --git a/src/views/hr/displayboards/dimissionrate.vue b/src/views/hr/displayboards/dimissionrate.vue index 1c14980..fe30834 100644 --- a/src/views/hr/displayboards/dimissionrate.vue +++ b/src/views/hr/displayboards/dimissionrate.vue @@ -3,91 +3,103 @@ @ 时间: 2023-06-30 16:03:33 @ 备注: 行政组织离职率 --> - - +