parent
1dc321ba5c
commit
124a04c43d
|
@ -51,201 +51,234 @@ export const systemRoutes: RouteRecordRaw[] = [
|
||||||
path: '/organization',
|
path: '/organization',
|
||||||
name: 'Organization',
|
name: 'Organization',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/organization/hr/member',
|
redirect: '/organization/dept',
|
||||||
meta: { title: '组织架构', icon: 'user-group', hidden: false, sort: 2 },
|
meta: { title: '组织架构', icon: 'user-group', hidden: false, sort: 2 },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/organization/hr',
|
path: '/organization/user',
|
||||||
name: 'HRManagement',
|
name: 'OrganizationUser',
|
||||||
component: () => import('@/components/ParentView/index.vue'),
|
component: () => import('@/views/system/user/index.vue'),
|
||||||
redirect: '/organization/hr/member',
|
meta: { title: '用户管理', icon: 'user', hidden: false, sort: 2.25 },
|
||||||
meta: { title: '人员管理', icon: 'user', hidden: false },
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/organization/hr/member',
|
|
||||||
name: 'HRMember',
|
|
||||||
component: () => import('@/views/system/user/index.vue'),
|
|
||||||
meta: { title: '成员', icon: 'user', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/dept',
|
|
||||||
name: 'HRDept',
|
|
||||||
component: () => import('@/views/system/dept/index.vue'),
|
|
||||||
meta: { title: '部门', icon: 'dept', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/workload',
|
|
||||||
name: 'HRWorkload',
|
|
||||||
component: () => import('@/views/hr/workload/index.vue'),
|
|
||||||
meta: { title: '任务管理', icon: 'workload', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/attendance',
|
|
||||||
name: 'HRAttendance',
|
|
||||||
component: () => import('@/views/hr/attendance/index.vue'),
|
|
||||||
meta: { title: '考勤', icon: 'attendance', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/performance',
|
|
||||||
name: 'HRPerformance',
|
|
||||||
component: () => import('@/components/ParentView/index.vue'),
|
|
||||||
meta: { title: '绩效', icon: 'performance', hidden: false },
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/organization/hr/performance/dimention',
|
|
||||||
name: 'Dimention',
|
|
||||||
component: () => import('@/views/performance/setting/index.vue'),
|
|
||||||
meta: { title: '绩效维度', icon: 'performance', hidden: false },
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/performance/rule',
|
|
||||||
name: 'Rule',
|
|
||||||
component: () => import('@/views/performance/rule.vue'),
|
|
||||||
meta: { title: '绩效细则', icon: 'performance', hidden: false },
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/performance/my',
|
|
||||||
name: 'MyPerformance',
|
|
||||||
component: () => import('@/views/performance/my.vue'),
|
|
||||||
meta: { title: '我的绩效', icon: 'performance', hidden: false },
|
|
||||||
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary',
|
|
||||||
name: 'HRSalary',
|
|
||||||
component: () => import('@/components/ParentView/index.vue'),
|
|
||||||
redirect: '/organization/hr/salary/overview',
|
|
||||||
meta: { title: '工资', icon: 'salary', hidden: false },
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/overview',
|
|
||||||
name: 'HRSalaryOverview',
|
|
||||||
component: () => import('@/components/ParentView/index.vue'),
|
|
||||||
meta: { title: '工资概览', icon: 'salary', hidden: false },
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/payroll',
|
|
||||||
name: 'Payroll',
|
|
||||||
component: () => import('@/views/salary-management/index.vue'),
|
|
||||||
meta: { title: '工资单', icon: 'salary', hidden: false },
|
|
||||||
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
//
|
|
||||||
// {
|
|
||||||
// path: '/organization/hr/salary/insurance',
|
|
||||||
// name: 'HRInsurance',
|
|
||||||
// component: () => import('@/components/ParentView/index.vue'),
|
|
||||||
// redirect: '/organization/hr/salary/insurance/overview',
|
|
||||||
// meta: { title: '保险', icon: 'safety', hidden: false },
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// path: '/organization/hr/salary/insurance/overview',
|
|
||||||
// name: 'HRInsuranceOverview',
|
|
||||||
// component: () => import('@/views/hr/salary/insurance/overview/index.vue'),
|
|
||||||
// meta: { title: '工作台概览', icon: 'dashboard', hidden: false },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/organization/hr/salary/insurance/my-insurance',
|
|
||||||
// name: 'HRMyInsurance',
|
|
||||||
// component: () => import('@/views/hr/salary/insurance/my-insurance/index.vue'),
|
|
||||||
// meta: { title: '我的保险', icon: 'shield', hidden: false },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/organization/hr/salary/insurance/health-records',
|
|
||||||
// name: 'HRHealthRecords',
|
|
||||||
// component: () => import('@/views/hr/salary/insurance/health-records/index.vue'),
|
|
||||||
// meta: { title: '健康档案', icon: 'heart', hidden: false },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/organization/hr/salary/insurance/policy-files',
|
|
||||||
// name: 'HRPolicyFiles',
|
|
||||||
// component: () => import('@/views/hr/salary/insurance/policy-files/index.vue'),
|
|
||||||
// meta: { title: '保单文件', icon: 'file', hidden: false },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: '/organization/hr/salary/insurance/personal-info',
|
|
||||||
// name: 'HRPersonalInfo',
|
|
||||||
// component: () => import('@/views/hr/salary/insurance/personal-info/index.vue'),
|
|
||||||
// meta: { title: '个人信息', icon: 'user', hidden: false },
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
//
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/system-insurance/health-management',
|
|
||||||
name: 'HRSystemHealthManagement',
|
|
||||||
component: () => import('@/views/hr/salary/system-insurance/health-management/index.vue'),
|
|
||||||
meta: { title: '健康档案管理', icon: 'heart', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/system-insurance',
|
|
||||||
name: 'HRSystemInsurance',
|
|
||||||
component: () => import('@/components/ParentView/index.vue'),
|
|
||||||
redirect: '/organization/hr/salary/system-insurance/overview',
|
|
||||||
meta: { title: '人员保险', icon: 'settings', hidden: false },
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/system-insurance/overview',
|
|
||||||
name: 'HRSystemInsuranceOverview',
|
|
||||||
component: () => import('@/views/hr/salary/system-insurance/overview/index.vue'),
|
|
||||||
meta: { title: '工作台概览', icon: 'dashboard', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/system-insurance/management',
|
|
||||||
name: 'HRSystemInsuranceManagement',
|
|
||||||
component: () => import('@/views/hr/salary/system-insurance/management/index.vue'),
|
|
||||||
meta: { title: '保险管理', icon: 'shield', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/system-insurance/file-management',
|
|
||||||
name: 'HRSystemFileManagement',
|
|
||||||
component: () => import('@/views/hr/salary/system-insurance/file-management/index.vue'),
|
|
||||||
meta: { title: '保单文件管理', icon: 'file', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/system-insurance/company-management',
|
|
||||||
name: 'HRSystemCompanyManagement',
|
|
||||||
component: () => import('@/views/hr/salary/system-insurance/company-management/index.vue'),
|
|
||||||
meta: { title: '保险公司管理', icon: 'building', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/system-insurance/type-management',
|
|
||||||
name: 'HRSystemTypeManagement',
|
|
||||||
component: () => import('@/views/hr/salary/system-insurance/type-management/index.vue'),
|
|
||||||
meta: { title: '保险类型管理', icon: 'category', hidden: false },
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/salary/certification',
|
|
||||||
name: 'HRCertification',
|
|
||||||
component: () => import('@/views/hr/salary/certification/index.vue'),
|
|
||||||
meta: { title: '人员资质管理', icon: 'idcard', hidden: false },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/organization/hr/contribution',
|
|
||||||
name: 'HRContribution',
|
|
||||||
component: () => import('@/views/hr/contribution/index.vue'),
|
|
||||||
meta: { title: '责献积分制度', icon: 'contribution', hidden: false },
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/organization/role',
|
path: '/organization/dept',
|
||||||
name: 'OrganizationRole',
|
name: 'OrganizationDept',
|
||||||
component: () => import('@/views/system/role/index.vue'),
|
component: () => import('@/views/system/dept/index.vue'),
|
||||||
meta: { title: '角色管理', icon: 'role', hidden: false },
|
meta: { title: '部门管理', icon: 'mind-mapping', hidden: false, sort: 2.5 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/organization/post',
|
||||||
|
name: 'OrganizationPost',
|
||||||
|
component: () => import('@/views/system/post/index.vue'),
|
||||||
|
meta: { title: '岗位管理', icon: 'nav', hidden: false, sort: 2.75 },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/organization/hr/workload',
|
||||||
|
name: 'HRWorkload',
|
||||||
|
component: () => import('@/views/hr/workload/index.vue'),
|
||||||
|
meta: { title: '任务管理', icon: 'bookmark', hidden: false },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// path: '/organization',
|
||||||
|
// name: 'Organization',
|
||||||
|
// component: Layout,
|
||||||
|
// redirect: '/organization/hr/member',
|
||||||
|
// meta: { title: '组织架构', icon: 'user-group', hidden: false, sort: 2 },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr',
|
||||||
|
// name: 'HRManagement',
|
||||||
|
// component: () => import('@/components/ParentView/index.vue'),
|
||||||
|
// redirect: '/organization/hr/member',
|
||||||
|
// meta: { title: '人员管理', icon: 'user', hidden: false },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/member',
|
||||||
|
// name: 'HRMember',
|
||||||
|
// component: () => import('@/views/system/user/index.vue'),
|
||||||
|
// meta: { title: '成员', icon: 'user', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/dept',
|
||||||
|
// name: 'HRDept',
|
||||||
|
// component: () => import('@/views/system/dept/index.vue'),
|
||||||
|
// meta: { title: '部门', icon: 'dept', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/workload',
|
||||||
|
// name: 'HRWorkload',
|
||||||
|
// component: () => import('@/views/hr/workload/index.vue'),
|
||||||
|
// meta: { title: '任务管理', icon: 'workload', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/attendance',
|
||||||
|
// name: 'HRAttendance',
|
||||||
|
// component: () => import('@/views/hr/attendance/index.vue'),
|
||||||
|
// meta: { title: '考勤', icon: 'attendance', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/performance',
|
||||||
|
// name: 'HRPerformance',
|
||||||
|
// component: () => import('@/components/ParentView/index.vue'),
|
||||||
|
// meta: { title: '绩效', icon: 'performance', hidden: false },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/performance/dimention',
|
||||||
|
// name: 'Dimention',
|
||||||
|
// component: () => import('@/views/performance/setting/index.vue'),
|
||||||
|
// meta: { title: '绩效维度', icon: 'performance', hidden: false },
|
||||||
|
//
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/performance/rule',
|
||||||
|
// name: 'Rule',
|
||||||
|
// component: () => import('@/views/performance/rule.vue'),
|
||||||
|
// meta: { title: '绩效细则', icon: 'performance', hidden: false },
|
||||||
|
//
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/performance/my',
|
||||||
|
// name: 'MyPerformance',
|
||||||
|
// component: () => import('@/views/performance/my.vue'),
|
||||||
|
// meta: { title: '我的绩效', icon: 'performance', hidden: false },
|
||||||
|
//
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary',
|
||||||
|
// name: 'HRSalary',
|
||||||
|
// component: () => import('@/components/ParentView/index.vue'),
|
||||||
|
// redirect: '/organization/hr/salary/overview',
|
||||||
|
// meta: { title: '工资', icon: 'salary', hidden: false },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/overview',
|
||||||
|
// name: 'HRSalaryOverview',
|
||||||
|
// component: () => import('@/components/ParentView/index.vue'),
|
||||||
|
// meta: { title: '工资概览', icon: 'salary', hidden: false },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/payroll',
|
||||||
|
// name: 'Payroll',
|
||||||
|
// component: () => import('@/views/salary-management/index.vue'),
|
||||||
|
// meta: { title: '工资单', icon: 'salary', hidden: false },
|
||||||
|
//
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/insurance',
|
||||||
|
// name: 'HRInsurance',
|
||||||
|
// component: () => import('@/components/ParentView/index.vue'),
|
||||||
|
// redirect: '/organization/hr/salary/insurance/overview',
|
||||||
|
// meta: { title: '保险', icon: 'safety', hidden: false },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/insurance/overview',
|
||||||
|
// name: 'HRInsuranceOverview',
|
||||||
|
// component: () => import('@/views/hr/salary/insurance/overview/index.vue'),
|
||||||
|
// meta: { title: '工作台概览', icon: 'dashboard', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/insurance/my-insurance',
|
||||||
|
// name: 'HRMyInsurance',
|
||||||
|
// component: () => import('@/views/hr/salary/insurance/my-insurance/index.vue'),
|
||||||
|
// meta: { title: '我的保险', icon: 'shield', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/insurance/health-records',
|
||||||
|
// name: 'HRHealthRecords',
|
||||||
|
// component: () => import('@/views/hr/salary/insurance/health-records/index.vue'),
|
||||||
|
// meta: { title: '健康档案', icon: 'heart', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/insurance/policy-files',
|
||||||
|
// name: 'HRPolicyFiles',
|
||||||
|
// component: () => import('@/views/hr/salary/insurance/policy-files/index.vue'),
|
||||||
|
// meta: { title: '保单文件', icon: 'file', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/insurance/personal-info',
|
||||||
|
// name: 'HRPersonalInfo',
|
||||||
|
// component: () => import('@/views/hr/salary/insurance/personal-info/index.vue'),
|
||||||
|
// meta: { title: '个人信息', icon: 'user', hidden: false },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/system-insurance/health-management',
|
||||||
|
// name: 'HRSystemHealthManagement',
|
||||||
|
// component: () => import('@/views/hr/salary/system-insurance/health-management/index.vue'),
|
||||||
|
// meta: { title: '健康档案管理', icon: 'heart', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/system-insurance',
|
||||||
|
// name: 'HRSystemInsurance',
|
||||||
|
// component: () => import('@/components/ParentView/index.vue'),
|
||||||
|
// redirect: '/organization/hr/salary/system-insurance/overview',
|
||||||
|
// meta: { title: '人员保险', icon: 'settings', hidden: false },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/system-insurance/overview',
|
||||||
|
// name: 'HRSystemInsuranceOverview',
|
||||||
|
// component: () => import('@/views/hr/salary/system-insurance/overview/index.vue'),
|
||||||
|
// meta: { title: '工作台概览', icon: 'dashboard', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/system-insurance/management',
|
||||||
|
// name: 'HRSystemInsuranceManagement',
|
||||||
|
// component: () => import('@/views/hr/salary/system-insurance/management/index.vue'),
|
||||||
|
// meta: { title: '保险管理', icon: 'shield', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/system-insurance/file-management',
|
||||||
|
// name: 'HRSystemFileManagement',
|
||||||
|
// component: () => import('@/views/hr/salary/system-insurance/file-management/index.vue'),
|
||||||
|
// meta: { title: '保单文件管理', icon: 'file', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/system-insurance/company-management',
|
||||||
|
// name: 'HRSystemCompanyManagement',
|
||||||
|
// component: () => import('@/views/hr/salary/system-insurance/company-management/index.vue'),
|
||||||
|
// meta: { title: '保险公司管理', icon: 'building', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/system-insurance/type-management',
|
||||||
|
// name: 'HRSystemTypeManagement',
|
||||||
|
// component: () => import('@/views/hr/salary/system-insurance/type-management/index.vue'),
|
||||||
|
// meta: { title: '保险类型管理', icon: 'category', hidden: false },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/salary/certification',
|
||||||
|
// name: 'HRCertification',
|
||||||
|
// component: () => import('@/views/hr/salary/certification/index.vue'),
|
||||||
|
// meta: { title: '人员资质管理', icon: 'idcard', hidden: false },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/hr/contribution',
|
||||||
|
// name: 'HRContribution',
|
||||||
|
// component: () => import('@/views/hr/contribution/index.vue'),
|
||||||
|
// meta: { title: '责献积分制度', icon: 'contribution', hidden: false },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/organization/role',
|
||||||
|
// name: 'OrganizationRole',
|
||||||
|
// component: () => import('@/views/system/role/index.vue'),
|
||||||
|
// meta: { title: '角色管理', icon: 'role', hidden: false },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
path: '/asset-management',
|
path: '/asset-management',
|
||||||
name: 'AssetManagement',
|
name: 'AssetManagement',
|
||||||
|
|
|
@ -4,10 +4,9 @@ import type { RouteRecordRaw } from 'vue-router'
|
||||||
import { mapTree, toTreeArray } from 'xe-utils'
|
import { mapTree, toTreeArray } from 'xe-utils'
|
||||||
import { cloneDeep, omit } from 'lodash-es'
|
import { cloneDeep, omit } from 'lodash-es'
|
||||||
import { constantRoutes, systemRoutes } from '@/router/route'
|
import { constantRoutes, systemRoutes } from '@/router/route'
|
||||||
import { type RouteItem, getUserRouteWithAdapter } from '@/apis'
|
import type { RouteItem } from '@/apis'
|
||||||
import { transformPathToName } from '@/utils'
|
import { transformPathToName } from '@/utils'
|
||||||
import { asyncRouteModules } from '@/router/asyncModules'
|
import { asyncRouteModules } from '@/router/asyncModules'
|
||||||
import { convertMenuData, type ApiMenuItem } from '@/utils/menuConverter'
|
|
||||||
|
|
||||||
const layoutComponentMap = {
|
const layoutComponentMap = {
|
||||||
Layout: () => import('@/layout/index.vue'),
|
Layout: () => import('@/layout/index.vue'),
|
||||||
|
@ -94,91 +93,63 @@ const storeSetup = () => {
|
||||||
// 获取路由数据并已通过适配器转换
|
// 获取路由数据并已通过适配器转换
|
||||||
// const { data } = await getUserRouteWithAdapter()
|
// const { data } = await getUserRouteWithAdapter()
|
||||||
const data = [{
|
const data = [{
|
||||||
"id": 1000,
|
id: 1000,
|
||||||
"parentId": 0,
|
parentId: 0,
|
||||||
"title": "系统管理",
|
title: '系统管理',
|
||||||
"type": 1,
|
type: 1,
|
||||||
"path": "/system",
|
path: '/system',
|
||||||
"name": "System",
|
name: 'System',
|
||||||
"component": "Layout",
|
component: 'Layout',
|
||||||
"redirect": "/system/user",
|
redirect: '/system/user',
|
||||||
"icon": "settings",
|
icon: 'settings',
|
||||||
"isExternal": false,
|
isExternal: false,
|
||||||
"isCache": false,
|
isCache: false,
|
||||||
"isHidden": false,
|
isHidden: false,
|
||||||
"sort": 1,
|
sort: 1,
|
||||||
"children": [
|
children: [
|
||||||
{
|
{
|
||||||
"id": 1010,
|
id: 1010,
|
||||||
"parentId": 1000,
|
parentId: 1000,
|
||||||
"title": "用户管理",
|
title: '用户管理',
|
||||||
"type": 2,
|
type: 2,
|
||||||
"path": "/system/user",
|
path: '/system/user',
|
||||||
"name": "SystemUser",
|
name: 'SystemUser',
|
||||||
"component": "system/user/index",
|
component: 'system/user/index',
|
||||||
"icon": "user",
|
icon: 'user',
|
||||||
"isExternal": false,
|
isExternal: false,
|
||||||
"isCache": false,
|
isCache: false,
|
||||||
"isHidden": false,
|
isHidden: false,
|
||||||
"sort": 1
|
sort: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1030,
|
id: 1030,
|
||||||
"parentId": 1000,
|
parentId: 1000,
|
||||||
"title": "角色管理",
|
title: '角色管理',
|
||||||
"type": 2,
|
type: 2,
|
||||||
"path": "/system/role",
|
path: '/system/role',
|
||||||
"name": "SystemRole",
|
name: 'SystemRole',
|
||||||
"component": "system/role/index",
|
component: 'system/role/index',
|
||||||
"icon": "user-group",
|
icon: 'user-group',
|
||||||
"isExternal": false,
|
isExternal: false,
|
||||||
"isCache": false,
|
isCache: false,
|
||||||
"isHidden": false,
|
isHidden: false,
|
||||||
"sort": 2
|
sort: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1050,
|
id: 1050,
|
||||||
"parentId": 1000,
|
parentId: 1000,
|
||||||
"title": "菜单管理",
|
title: '菜单管理',
|
||||||
"type": 2,
|
type: 2,
|
||||||
"path": "/system/menu",
|
path: '/system/menu',
|
||||||
"name": "SystemMenu",
|
name: 'SystemMenu',
|
||||||
"component": "system/menu/index",
|
component: 'system/menu/index',
|
||||||
"icon": "menu",
|
icon: 'menu',
|
||||||
"isExternal": false,
|
isExternal: false,
|
||||||
"isCache": false,
|
isCache: false,
|
||||||
"isHidden": false,
|
isHidden: false,
|
||||||
"sort": 3
|
sort: 3,
|
||||||
},
|
},
|
||||||
{
|
],
|
||||||
"id": 1070,
|
|
||||||
"parentId": 1000,
|
|
||||||
"title": "部门管理",
|
|
||||||
"type": 2,
|
|
||||||
"path": "/system/dept",
|
|
||||||
"name": "SystemDept",
|
|
||||||
"component": "system/dept/index",
|
|
||||||
"icon": "mind-mapping",
|
|
||||||
"isExternal": false,
|
|
||||||
"isCache": false,
|
|
||||||
"isHidden": false,
|
|
||||||
"sort": 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 1090,
|
|
||||||
"parentId": 1000,
|
|
||||||
"title": "岗位管理",
|
|
||||||
"type": 2,
|
|
||||||
"path": "/system/post",
|
|
||||||
"name": "SystemPost",
|
|
||||||
"component": "system/post/index",
|
|
||||||
"icon": "settings",
|
|
||||||
"isExternal": false,
|
|
||||||
"isCache": false,
|
|
||||||
"isHidden": false,
|
|
||||||
"sort": 5
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}]
|
}]
|
||||||
// 使用已转换的数据生成路由
|
// 使用已转换的数据生成路由
|
||||||
const asyncRoutes = formatAsyncRoutes(data as unknown as RouteItem[])
|
const asyncRoutes = formatAsyncRoutes(data as unknown as RouteItem[])
|
||||||
|
|
|
@ -46,11 +46,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { TableColumnData, TableInstance } from '@arco-design/web-vue'
|
import type { TableColumnData } from '@arco-design/web-vue'
|
||||||
import PostAddModal from './PostAddModal.vue'
|
import PostAddModal from './PostAddModal.vue'
|
||||||
import PostDetailDrawer from './PostDetailDrawer.vue'
|
import PostDetailDrawer from './PostDetailDrawer.vue'
|
||||||
import { deletePost, pagePost,listPost } from '@/apis/system/post'
|
import { deletePost, listPost } from '@/apis/system/post'
|
||||||
import type { PostVO, PostPageQuery } from '@/apis/system/type'
|
import type { PostVO } from '@/apis/system/type'
|
||||||
import { useResetReactive, useTable } from '@/hooks'
|
import { useResetReactive, useTable } from '@/hooks'
|
||||||
import { isMobile } from '@/utils'
|
import { isMobile } from '@/utils'
|
||||||
import has from '@/utils/has'
|
import has from '@/utils/has'
|
||||||
|
@ -81,7 +81,7 @@ const queryFormColumns: ColumnItem[] = reactive([
|
||||||
props: {
|
props: {
|
||||||
options: [
|
options: [
|
||||||
{ label: '正常', value: 1 },
|
{ label: '正常', value: 1 },
|
||||||
{ label: '停用', value: 0 }
|
{ label: '停用', value: 0 },
|
||||||
],
|
],
|
||||||
placeholder: '请选择状态',
|
placeholder: '请选择状态',
|
||||||
},
|
},
|
||||||
|
@ -94,8 +94,8 @@ const {
|
||||||
pagination,
|
pagination,
|
||||||
search,
|
search,
|
||||||
handleDelete,
|
handleDelete,
|
||||||
} = useTable((params) => listPost({
|
} = useTable((params) => listPost({
|
||||||
...queryForm,
|
...queryForm,
|
||||||
}), { immediate: true })
|
}), { immediate: true })
|
||||||
|
|
||||||
const tableColumns = ref<TableColumnData[]>([
|
const tableColumns = ref<TableColumnData[]>([
|
||||||
|
@ -106,44 +106,44 @@ const tableColumns = ref<TableColumnData[]>([
|
||||||
render: ({ rowIndex }) => h('span', {}, rowIndex + 1 + (pagination.current - 1) * pagination.pageSize),
|
render: ({ rowIndex }) => h('span', {}, rowIndex + 1 + (pagination.current - 1) * pagination.pageSize),
|
||||||
fixed: !isMobile() ? 'left' : undefined,
|
fixed: !isMobile() ? 'left' : undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '岗位名称',
|
title: '岗位名称',
|
||||||
dataIndex: 'postName',
|
dataIndex: 'postName',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
fixed: !isMobile() ? 'left' : undefined,
|
fixed: !isMobile() ? 'left' : undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '岗位排序',
|
title: '岗位排序',
|
||||||
dataIndex: 'postSort',
|
dataIndex: 'postSort',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
slotName: 'status',
|
slotName: 'status',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '说明',
|
title: '说明',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
sortable: {
|
sortable: {
|
||||||
sortDirections: ['ascend', 'descend'],
|
sortDirections: ['ascend', 'descend'],
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
@ -188,4 +188,4 @@ const onDetail = (record: PostVO) => {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<template>
|
<template>
|
||||||
<h1>这个暂时写不了,角色管理采用菜单权限的设置</h1>
|
|
||||||
<GiPageLayout :header-style="{ padding: 0, borderBottom: 'none' }">
|
<GiPageLayout :header-style="{ padding: 0, borderBottom: 'none' }">
|
||||||
<template #left>
|
<template #left>
|
||||||
<RoleTree @node-click="handleSelectRole" />
|
<RoleTree @node-click="handleSelectRole" />
|
||||||
|
|
Loading…
Reference in New Issue