From 7a19a82318473cd263e555dec48ced4075f6c3b3 Mon Sep 17 00:00:00 2001 From: esacpe <12345678> Date: Fri, 26 Sep 2025 16:08:24 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E8=BD=AC=E6=8D=A2=E5=A4=84=E7=90=86'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 81 +- src/router/index.js | 939 ++++++++++-------- .../components/detailForm.vue | 12 +- src/views/login/index.vue | 3 +- .../components/viewAndUploadDialog.vue | 0 .../components/viewExamDetalis.vue | 0 .../examManagement/index.vue | 0 .../trainingProject/components/addPxxm.vue | 23 +- .../components/viewDetailsDialog.vue | 2 +- .../unitInformation/index.vue | 0 10 files changed, 595 insertions(+), 465 deletions(-) rename src/views/securityManagement/{ => trainingManagement}/examManagement/components/viewAndUploadDialog.vue (100%) rename src/views/securityManagement/{ => trainingManagement}/examManagement/components/viewExamDetalis.vue (100%) rename src/views/securityManagement/{ => trainingManagement}/examManagement/index.vue (100%) rename src/views/securityManagement/{ => unitManagement}/unitInformation/components/viewDetailsDialog.vue (98%) rename src/views/securityManagement/{ => unitManagement}/unitInformation/index.vue (100%) diff --git a/src/permission.js b/src/permission.js index ad85f57..d9b3095 100644 --- a/src/permission.js +++ b/src/permission.js @@ -14,42 +14,45 @@ const whiteList = ['/login','/', '/oatuh_login', '/sso_redirect', '/editPassword * next 往下走 */ let onRun = true; -// router.beforeEach(async (to, from, next) => { -// // 存在 token ,进入主页 -// // if (store.state.user.token) { -// // 快捷访问 -// if (store.getters.token) { -// // 判断用户资料是否获取 -// // 若不存在用户信息,则需要获取用户信息 -// // 触发获取用户信息的 action,并获取用户当前权限 -// await store.commit('permission/setRouteReady', true) -// // 添加完动态路由之后,需要在进行一次主动跳转 -// const afterMenuList = await getItem('menusPermission'); -// // 处理用户权限,筛选出需要添加的权限 -// if (store.state.permission.routes == 0) { -// const filterRoutes = await store.dispatch('permission/filterRoutes', afterMenuList) -// filterRoutes.forEach(item => { -// router.addRoute(item) -// }) -// next({ -// ...to, -// replace: true -// }) -// } else { -// next() -// } -// // 利用 addRoute 循环添加 -// } else { -// const isOatuh = getItem('isOatuh') -// // 没有token的情况下,可以进入白名单 -// if (whiteList.indexOf(to.path) > -1) { -// next() -// } else { -// if (isOatuh) { -// next('/oatuh_login') -// } else { -// next('/login') -// } -// } -// } -// }) +router.beforeEach(async (to, from, next) => { + // 存在 token ,进入主页 + // if (store.state.user.token) { + // 快捷访问 + if (store.getters.token) { + // 判断用户资料是否获取 + // 若不存在用户信息,则需要获取用户信息 + // 触发获取用户信息的 action,并获取用户当前权限 + await store.commit('permission/setRouteReady', true) + // 添加完动态路由之后,需要在进行一次主动跳转 + const afterMenuList = await getItem('menusPermission'); + // 处理用户权限,筛选出需要添加的权限 + if (store.state.permission.routes == 0) { + const filterRoutes = await store.dispatch('permission/filterRoutes', afterMenuList) + + console.log(filterRoutes); + + filterRoutes.forEach(item => { + router.addRoute(item) + }) + next({ + ...to, + replace: true + }) + } else { + next() + } + // 利用 addRoute 循环添加 + } else { + const isOatuh = getItem('isOatuh') + // 没有token的情况下,可以进入白名单 + if (whiteList.indexOf(to.path) > -1) { + next() + } else { + if (isOatuh) { + next('/oatuh_login') + } else { + next('/login') + } + } + } +}) diff --git a/src/router/index.js b/src/router/index.js index 154a7cd..89a0f36 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -15,7 +15,270 @@ import store from "@/store"; * 私有路由表 */ -export const privateRoutes = []; +export const privateRoutes = [ + { + path: "/", + name: "unitManagement", + component: layout, + redirect: "/unitManagement/unitInformation", + meta: { + title: "单位管理", + icon: "personnel" + }, + children: [ + { + path: "/unitManagement/unitInformation", + name: "unitInformation", + component: () => + import("@/views/securityManagement/unitManagement/unitInformation/index"), + meta: { + title: "单位信息", + icon: "personnel" + }, + } + ] + }, + { + path: "/personnelManagement", + name: "personnelManagement", + component: layout, + meta: { + title: "人员管理", + icon: "personnel" + }, + children: [ + { + path: "/personnelManagement/practitioner", + name: "practitioner", + component: () => + import("@/views/securityManagement/personnelManagement/practitioner/index"), + meta: { + title: "从业人员管理", + icon: "personnel" + }, + }, + { + path: "/personnelManagement/applicantPersonnel", + name: "applicantPersonnel", + component: () => + import("@/views/securityManagement/personnelManagement/applicantPersonnel/index"), + meta: { + title: "申请人员", + icon: "personnel" + } + }, + ] + }, + { + path: "/trainingManagement", + name: "trainingManagement", + component: layout, + meta: { + title: "培训管理", + icon: "personnel" + }, + children: [ + { + path: "/trainingManagement/trainer", + name: "trainer", + component: () => + import("@/views/securityManagement/trainingManagement/trainer/index"), + meta: { + title: "培训人员", + icon: "personnel" + }, + }, + { + path: "/trainingManagement/personnelTraining", + name: "personnelTraining", + component: () => + import("@/views/securityManagement/trainingManagement/personnelTraining/index"), + meta: { + title: "保安待培训人员管理", + icon: "personnel" + }, + }, + { + path: "/trainingManagement/trainingProject", + name: "trainingProject", + component: () => + import("@/views/securityManagement/trainingManagement/trainingProject/index"), + meta: { + title: "保安培训项目管理", + icon: "personnel" + } + }, + { + path: "/trainingManagement/examManagement", + name: "examManagement", + component: () => + import("@/views/securityManagement/trainingManagement/examManagement/index"), + meta: { + title: "保安考试管理", + icon: "personnel" + }, + }, + ] + }, + { + path: "/training", + name: "training", + component: layout, + meta: { + title: "培训中心", + icon: "personnel" + }, + children: [ + { + path: "/training/securityTrainingVideo", + name: "securityTrainingVideo", + component: () => import("@/views/Training/SecurityTrainingVideo/index"), + meta: { + title: "保安培训视频", + icon: "personnel" + } + }, + { + path: "/training/securityQuestionBank", + name: "securityQuestionBank", + component: () => import("@/views/Training/SecurityQuestionBank/index"), + meta: { + title: "保安题库", + icon: "personnel" + } + }, + { + path: "/training/securityTrainingSyllabus", + name: "securityTrainingSyllabus", + component: () => import("@/views/Training/SecurityTrainingSyllabus/index"), + meta: { + title: "保安培训教学大纲", + icon: "personnel" + } + }, + ] + }, + { + path: "/njxx", + name: "njxx", + component: layout, + meta: { + title: "年检信息", + icon: "personnel" + }, + children: [ + { + path: "/training/annualInspectionTraining", + name: "annualInspectionTraining", + component: () => import("@/views/Training/AnnualInspectionTraining/index"), + meta: { + title: "年检培训", + icon: "personnel" + } + }, + { + path: "/training/annualInspectionApplicants", + name: "annualInspectionApplicants", + component: () => import("@/views/Training/AnnualInspectionApplicants/index"), + meta: { + title: "年检申请人员", + icon: "personnel" + } + }, + { + path: "/training/annualInspection", + name: "annualInspection", + component: () => import("@/views/Training/AnnualInspection/index"), + meta: { + title: "年检", + icon: "personnel" + } + }, + ] + }, + { + path: "/systemConfig", + name: "systemConfigModel", + component: layout, + meta: { + title: "系统管理", + icon: "personnel" + }, + children: [ + { + path: "/user/userList", + name: "userList", + component: () => + import("@/views/backOfficeSystem/systemConfig/user-list/index"), + meta: { + title: "用户管理", + icon: "role" + } + }, + { + path: "/user/role", + name: "userRoleIndex", + component: () => + import("@/views/backOfficeSystem/systemConfig/role-list/index"), + meta: { + title: "角色列表", + icon: "role" + } + }, + { + path: "/user/menuList", + name: "menuList", + component: () => + import("@/views/backOfficeSystem/systemConfig/menu-list/index"), + meta: { + title: "菜单管理", + icon: "personnel-manage" + } + }, + { + path: "/dict/detail", + name: "dictDetail", + component: () => + import("@/views/backOfficeSystem/systemConfig/dict/detail"), + meta: { + title: "字典数据" + } + }, + { + path: "/dict/index", + name: "dictIndex", + component: () => + import("@/views/backOfficeSystem/systemConfig/dict/index"), + meta: { + title: "字典列表", + icon: "article-ranking" + } + }, + { + path: "/user/deptAllocationUser/:id", + name: "deptAllocationUser", + component: () => + import( + "@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser" + ), + meta: { + title: "管理用户" + } + }, + { + path: "/user/allocationUser/:id", + name: "allocationUser", + component: () => + import( + "@/views/backOfficeSystem/systemConfig/role-list/allocationUser" + ), + meta: { + title: "分配用户" + } + }, + ] + }, +]; /** * 公开路由表 @@ -51,424 +314,270 @@ export const publicRoutes = [ // name: "dataBI", // component: () => import("@/views/dataBI/index") //警保 // }, - { - path: "/editPassword", // 注意:带有路径"/"的记录中的组件"默认"是一个不返回 Promise 的函数 - component: layout, - redirect: "/user/department-ist", - children: [ - - { - path: "/", - name: "unitInformation", - component: () => - import("@/views/securityManagement/unitInformation/index"), - meta: { - title: "单位信息", - icon: "personnel" - }, - }, - { - path: "/personnelManagement", - name: "personnelManagement", - meta: { - title: "人员管理", - icon: "personnel" - }, - children: [ - { - path: "/personnelManagement/practitioner", - name: "practitioner", - component: () => - import("@/views/securityManagement/personnelManagement/practitioner/index"), - meta: { - title: "从业人员管理", - icon: "personnel" - }, - }, - { - path: "/personnelManagement/applicantPersonnel", - name: "applicantPersonnel", - component: () => - import("@/views/securityManagement/personnelManagement/applicantPersonnel/index"), - meta: { - title: "申请人员", - icon: "personnel" - } - }, - ] - }, - { - path: "/trainingManagement", - name: "/trainingManagement", - meta: { - title: "培训管理", - icon: "personnel" - }, - children: [ - { - path: "/trainingManagement/trainer", - name: "trainer", - component: () => - import("@/views/securityManagement/trainingManagement/trainer/index"), - meta: { - title: "培训人员", - icon: "personnel" - }, - }, - { - path: "/trainingManagement/personnelTraining", - name: "personnelTraining", - component: () => - import("@/views/securityManagement/trainingManagement/personnelTraining/index"), - meta: { - title: "保安待培训人员管理", - icon: "personnel" - }, - }, - { - path: "/trainingManagement/trainingProject", - name: "trainingProject", - component: () => - import("@/views/securityManagement/trainingManagement/trainingProject/index"), - meta: { - title: "保安培训项目管理", - icon: "personnel" - } - }, - ] - }, - { - path: "/examManagement", - name: "examManagement", - component: () => - import("@/views/securityManagement/examManagement/index"), - meta: { - title: "保安考试管理", - icon: "personnel" - }, - }, - { - path: "/training", - name: "training", - meta: { - title: "培训中心", - icon: "personnel" - }, - children: [ - { - path: "/training/securityTrainingVideo", - name: "securityTrainingVideo", - component: () => import("@/views/Training/SecurityTrainingVideo/index"), - meta: { - title: "保安培训视频", - icon: "personnel" - } - }, - { - path: "/training/securityQuestionBank", - name: "securityQuestionBank", - component: () => import("@/views/Training/SecurityQuestionBank/index"), - meta: { - title: "保安题库", - icon: "personnel" - } - }, - { - path: "/training/securityTrainingSyllabus", - name: "securityTrainingSyllabus", - component: () => import("@/views/Training/SecurityTrainingSyllabus/index"), - meta: { - title: "保安培训教学大纲", - icon: "personnel" - } - }, - ] - }, - { - path: "/njxx", - name: "njxx", - meta: { - title: "年检信息", - icon: "personnel" - }, - children: [ - { - path: "/training/annualInspectionTraining", - name: "annualInspectionTraining", - component: () => import("@/views/Training/AnnualInspectionTraining/index"), - meta: { - title: "年检培训", - icon: "personnel" - } - }, - { - path: "/training/annualInspectionApplicants", - name: "annualInspectionApplicants", - component: () => import("@/views/Training/AnnualInspectionApplicants/index"), - meta: { - title: "年检申请人员", - icon: "personnel" - } - }, - { - path: "/training/annualInspection", - name: "annualInspection", - component: () => import("@/views/Training/AnnualInspection/index"), - meta: { - title: "年检", - icon: "personnel" - } - }, - ] - }, + // { + // path: "/editPassword", // 注意:带有路径"/"的记录中的组件"默认"是一个不返回 Promise 的函数 + // component: layout, + // redirect: "/user/department-ist", + // children: [ + // { - // path: "/systemConfig", - // name: "systemConfigModel", + // path: "/", + // name: "unitInformation", + // component: () => + // import("@/views/securityManagement/unitInformation/index"), // meta: { - // title: "系统管理", + // title: "单位信息", // icon: "personnel" // }, - // children: [ - // { - // path: "/user/department-ist", - // name: "departmentList", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/department-list/index" - // ), - // meta: { - // title: "部门管理", - // icon: "personnel-manage" - // } - // }, - // { - // path: "/user/userList", - // name: "userList", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/user-list/index"), - // meta: { - // title: "用户管理", - // icon: "role" - // } - // }, - // { - // path: "/user/role", - // name: "userRoleIndex", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/role-list/index"), - // meta: { - // title: "角色列表", - // icon: "role" - // } - // }, - // { - // path: "/user/menuList", - // name: "menuList", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/menu-list/index"), - // meta: { - // title: "菜单管理", - // icon: "personnel-manage" - // } - // }, - // { - // path: "/user/publicSecurity", - // name: "publicSecurity", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/publicSecurity/index" - // ), - // meta: { - // title: "公安机关要素", - // icon: "personnel-manage" - // } - // }, - // { - // path: "/dict/detail", - // name: "dictDetail", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/dict/detail"), - // meta: { - // title: "字典数据" - // } - // }, - // { - // path: "/dict/index", - // name: "dictIndex", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/dict/index"), - // meta: { - // title: "字典列表", - // icon: "article-ranking" - // } - // }, - // { - // path: "/user/job", - // name: "userJob", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/job-list/index"), - // meta: { - // title: "岗位列表", - // icon: "personnel-manage" - // } - // }, - // { - // path: "/user/deptAllocationUser/:id", - // name: "deptAllocationUser", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser" - // ), - // meta: { - // title: "管理用户" - // } - // }, - // { - // path: "/user/allocationUser/:id", - // name: "allocationUser", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/role-list/allocationUser" - // ), - // meta: { - // title: "分配用户" - // } - // }, - // { - // path: "/sys/systemFxMx", - // name: "systemFxMx", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/systemFxMx/index"), - // meta: { - // title: "系统分析模型", - // icon: "personnel-manage" - // } - // }, - // // { - // // path: "/sys/ysjq", - // // name: "ysjq", - // // component: () => import("@/views/backOfficeSystem/systemConfig/ysjq/index"), - // // meta: { - // // title: "演示警情", - // // icon: "personnel-manage" - // // } - // // }, - // { - // path: "/user/systemConfig", - // name: "systemConfig", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/system-config-list/index" - // ), - // meta: { - // title: "系统配置", - // icon: "personnel-manage" - // } - // }, + // }, + // { + // path: "/systemConfig", + // name: "systemConfigModel", + // meta: { + // title: "系统管理", + // icon: "personnel" + // }, + // children: [ + // { + // path: "/user/department-ist", + // name: "departmentList", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/department-list/index" + // ), + // meta: { + // title: "部门管理", + // icon: "personnel-manage" + // } + // }, + // { + // path: "/user/userList", + // name: "userList", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/user-list/index"), + // meta: { + // title: "用户管理", + // icon: "role" + // } + // }, + // { + // path: "/user/role", + // name: "userRoleIndex", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/role-list/index"), + // meta: { + // title: "角色列表", + // icon: "role" + // } + // }, + // { + // path: "/user/menuList", + // name: "menuList", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/menu-list/index"), + // meta: { + // title: "菜单管理", + // icon: "personnel-manage" + // } + // }, + // { + // path: "/user/publicSecurity", + // name: "publicSecurity", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/publicSecurity/index" + // ), + // meta: { + // title: "公安机关要素", + // icon: "personnel-manage" + // } + // }, + // { + // path: "/dict/detail", + // name: "dictDetail", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/dict/detail"), + // meta: { + // title: "字典数据" + // } + // }, + // { + // path: "/dict/index", + // name: "dictIndex", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/dict/index"), + // meta: { + // title: "字典列表", + // icon: "article-ranking" + // } + // }, + // { + // path: "/user/job", + // name: "userJob", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/job-list/index"), + // meta: { + // title: "岗位列表", + // icon: "personnel-manage" + // } + // }, + // { + // path: "/user/deptAllocationUser/:id", + // name: "deptAllocationUser", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser" + // ), + // meta: { + // title: "管理用户" + // } + // }, + // { + // path: "/user/allocationUser/:id", + // name: "allocationUser", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/role-list/allocationUser" + // ), + // meta: { + // title: "分配用户" + // } + // }, + // { + // path: "/sys/systemFxMx", + // name: "systemFxMx", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/systemFxMx/index"), + // meta: { + // title: "系统分析模型", + // icon: "personnel-manage" + // } + // }, + // { + // path: "/sys/ysjq", + // name: "ysjq", + // component: () => import("@/views/backOfficeSystem/systemConfig/ysjq/index"), + // meta: { + // title: "演示警情", + // icon: "personnel-manage" + // } + // }, + // { + // path: "/user/systemConfig", + // name: "systemConfig", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/system-config-list/index" + // ), + // meta: { + // title: "系统配置", + // icon: "personnel-manage" + // } + // }, - // { - // path: "/user/systemVersion", - // name: "systemVersion", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/system-version-list/index" - // ), - // meta: { - // title: "系统版本管理", - // icon: "personnel-manage" - // } - // }, - // { - // path: "/user/useQk", - // name: "useQk", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/useQk/index"), - // meta: { - // title: "系统使用情况", - // icon: "personnel-manage" - // } - // }, - // { - // path: "/user/zdqyFz", - // name: "zdqyFz", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/zdqyFz/index"), - // meta: { - // title: "重点区域分值", - // icon: "personnel-manage" - // } - // }, + // { + // path: "/user/systemVersion", + // name: "systemVersion", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/system-version-list/index" + // ), + // meta: { + // title: "系统版本管理", + // icon: "personnel-manage" + // } + // }, + // { + // path: "/user/useQk", + // name: "useQk", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/useQk/index"), + // meta: { + // title: "系统使用情况", + // icon: "personnel-manage" + // } + // }, + // { + // path: "/user/zdqyFz", + // name: "zdqyFz", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/zdqyFz/index"), + // meta: { + // title: "重点区域分值", + // icon: "personnel-manage" + // } + // }, - // { - // path: "/user/log", - // name: "/user/log", - // meta: { - // title: "日志", - // icon: "article" - // }, - // children: [ - // { - // path: "/user/operateLog", - // name: "/user/operateLog", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index" - // ), - // meta: { - // title: "操作日志", - // icon: "article-ranking" - // } - // }, - // { - // path: "/user/loginLog", - // name: "/user/loginLog", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index" - // ), - // meta: { - // title: "登录日志", - // icon: "article-ranking" - // } - // } - // ] - // }, - // { - // path: "/developer", - // name: "developer", - // component: () => import("@/views/developer/index"), - // meta: { - // title: "开发者中心", - // icon: "article-ranking" - // } - // }, - // { - // //如果三级 需要把路由注册出来 - // path: "/user/operateLog", - // name: "/user/operateLog", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index" - // ) - // }, - // { - // path: "/user/loginLog", - // name: "/user/loginLog", - // component: () => - // import( - // "@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index" - // ) - // }, - // { - // path: "/tool/gen-edit/index/:tableId", - // name: "gen-edit", - // component: () => - // import("@/views/backOfficeSystem/systemConfig/gen/editTable"), - // meta: { - // title: "代码生成编辑" - // } - // } - // ] + // { + // path: "/user/log", + // name: "/user/log", + // meta: { + // title: "日志", + // icon: "article" + // }, + // children: [ + // { + // path: "/user/operateLog", + // name: "/user/operateLog", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index" + // ), + // meta: { + // title: "操作日志", + // icon: "article-ranking" + // } + // }, + // { + // path: "/user/loginLog", + // name: "/user/loginLog", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index" + // ), + // meta: { + // title: "登录日志", + // icon: "article-ranking" + // } + // } + // ] + // }, + // { + // path: "/developer", + // name: "developer", + // component: () => import("@/views/developer/index"), + // meta: { + // title: "开发者中心", + // icon: "article-ranking" + // } + // }, + // { + // //如果三级 需要把路由注册出来 + // path: "/user/operateLog", + // name: "/user/operateLog", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index" + // ) + // }, + // { + // path: "/user/loginLog", + // name: "/user/loginLog", + // component: () => + // import( + // "@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index" + // ) + // }, + // { + // path: "/tool/gen-edit/index/:tableId", + // name: "gen-edit", + // component: () => + // import("@/views/backOfficeSystem/systemConfig/gen/editTable"), + // meta: { + // title: "代码生成编辑" + // } + // } + // ] // }, // { // path: "/basicsmanage", @@ -1425,8 +1534,8 @@ export const publicRoutes = [ // } // ] // } - ] - } + // ] + // } ]; const router = createRouter({ diff --git a/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue b/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue index 28caa25..1f8897c 100644 --- a/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue +++ b/src/views/Training/SecurityTrainingSyllabus/components/detailForm.vue @@ -49,7 +49,7 @@ const formList = reactive([ { label: "学时安排", prop: "gksc", type: "input" }, ], [ - { label: "上传附件", prop: "fj", type: "upload" }, + { label: "上传附件", prop: "fj", type: "upload", isAll: true, showBtn: true, isImg: false }, ], ]) @@ -64,7 +64,7 @@ const init = (type, id,) => { function getDateById (id) { qcckPost({},`/mosty-base/baxx/jxda/getInfo/${id}`).then((res) => { - res.fj = res.fj ? res.fj.split(','):[] + res.fj = res.fj ? JSON.parse(res.fj):[] listQuery.value = res || {}; }) } @@ -74,7 +74,11 @@ const save = () => { loading.value = true; let url = title.value == '新增' ? `/mosty-base/baxx/jxda/add` : `/mosty-base/baxx/jxda/edit`; let params = { ...val } - params.fj = params.fj ? params.fj.join(','):'' + params.fj = params.fj ? JSON.stringify(params.fj):'' + + console.log(params, val); + + return qcckPost(params, url).then(() => { loading.value = false; proxy.$message.success("保存成功"); @@ -87,7 +91,7 @@ const save = () => { } const close = () => { dialogForm.value = false; - listQuery.value = {fj:[]} + listQuery.value.fj = [] FormRef.value.reset() };; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index c4ec179..a761d86 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -141,7 +141,8 @@ const handleLogin = () => { loading.value = false; // 登录后操作; if (res.deptList.length === 1) { - window.location.href = "/"; + // router.push("/unitManagement/unitInformation"); + window.location.href = "/bagl"; } else { deptList.value = [...res.deptList]; loginDialog.value = true; diff --git a/src/views/securityManagement/examManagement/components/viewAndUploadDialog.vue b/src/views/securityManagement/trainingManagement/examManagement/components/viewAndUploadDialog.vue similarity index 100% rename from src/views/securityManagement/examManagement/components/viewAndUploadDialog.vue rename to src/views/securityManagement/trainingManagement/examManagement/components/viewAndUploadDialog.vue diff --git a/src/views/securityManagement/examManagement/components/viewExamDetalis.vue b/src/views/securityManagement/trainingManagement/examManagement/components/viewExamDetalis.vue similarity index 100% rename from src/views/securityManagement/examManagement/components/viewExamDetalis.vue rename to src/views/securityManagement/trainingManagement/examManagement/components/viewExamDetalis.vue diff --git a/src/views/securityManagement/examManagement/index.vue b/src/views/securityManagement/trainingManagement/examManagement/index.vue similarity index 100% rename from src/views/securityManagement/examManagement/index.vue rename to src/views/securityManagement/trainingManagement/examManagement/index.vue diff --git a/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue b/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue index 8b016e3..1822fa5 100644 --- a/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue +++ b/src/views/securityManagement/trainingManagement/trainingProject/components/addPxxm.vue @@ -57,11 +57,10 @@ - - + + + + @@ -102,6 +101,7 @@ import SelectPersonnelDialog from "./selectPersonnelDialog.vue"; const { proxy } = getCurrentInstance() const visible = ref(false) const showDialog = ref(false) +const cyryList = ref([]) const formData = ref({ pxkcList: [{ pxkcxm: '', //课程名称 @@ -173,6 +173,7 @@ const delItem = (item,index) => { } const init = () => { + getCyryList() showDialog.value = true } @@ -197,6 +198,18 @@ const handleChange = (val) => { pageData.tableData = [...pageData.tableData, ...val]?.filter((i, index, arr) => arr?.findIndex(s => i?.id === s?.id) === index) } +// 获取授课教员 +const getCyryList = async () => { + const res = await qcckPost({ + pxgsid: "", + gw: '04' + }, `/mosty-base//baxx/cyry/list`) + + if (res) { + cyryList.value = res + } +} + const save = () => { if (pageData.tableData.length === 0) return proxy.$message.warning('请选择培训保安人员') const ryidList = pageData.tableData?.map(i => i?.id) diff --git a/src/views/securityManagement/unitInformation/components/viewDetailsDialog.vue b/src/views/securityManagement/unitManagement/unitInformation/components/viewDetailsDialog.vue similarity index 98% rename from src/views/securityManagement/unitInformation/components/viewDetailsDialog.vue rename to src/views/securityManagement/unitManagement/unitInformation/components/viewDetailsDialog.vue index 6ec4e33..ccd39a9 100644 --- a/src/views/securityManagement/unitInformation/components/viewDetailsDialog.vue +++ b/src/views/securityManagement/unitManagement/unitInformation/components/viewDetailsDialog.vue @@ -11,7 +11,7 @@ {{ formData.dwmc }} {{ formData.xydm }} - +
diff --git a/src/views/securityManagement/unitInformation/index.vue b/src/views/securityManagement/unitManagement/unitInformation/index.vue similarity index 100% rename from src/views/securityManagement/unitInformation/index.vue rename to src/views/securityManagement/unitManagement/unitInformation/index.vue