285 lines
8.3 KiB
JavaScript
285 lines
8.3 KiB
JavaScript
import { RouterView } from 'vue-router';
|
|
|
|
const workerCard = {
|
|
name: 'WorkerCard',
|
|
path: ':id',
|
|
component: () => import('src/pages/Worker/Card/WorkerCard.vue'),
|
|
redirect: { name: 'WorkerSummary' },
|
|
meta: {
|
|
menu: [
|
|
'WorkerBasicData',
|
|
'WorkerBusiness',
|
|
'WorkerNotes',
|
|
'WorkerPda',
|
|
'WorkerNotificationsManager',
|
|
'WorkerPBX',
|
|
'WorkerLog',
|
|
'WorkerCalendar',
|
|
'WorkerDms',
|
|
'WorkerTimeControl',
|
|
'WorkerLocker',
|
|
'WorkerPit',
|
|
'WorkerBalance',
|
|
'WorkerFormation',
|
|
'WorkerMedical',
|
|
'WorkerOperator',
|
|
],
|
|
},
|
|
children: [
|
|
{
|
|
name: 'WorkerSummary',
|
|
path: 'summary',
|
|
meta: {
|
|
title: 'summary',
|
|
icon: 'launch',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerSummary.vue'),
|
|
},
|
|
{
|
|
path: 'basic-data',
|
|
name: 'WorkerBasicData',
|
|
meta: {
|
|
title: 'basicData',
|
|
icon: 'vn:settings',
|
|
acls: [
|
|
{
|
|
model: 'Worker',
|
|
props: 'updateAttributes',
|
|
accessType: 'WRITE',
|
|
},
|
|
],
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerBasicData.vue'),
|
|
},
|
|
{
|
|
path: 'business',
|
|
name: 'WorkerBusiness',
|
|
meta: {
|
|
title: 'business',
|
|
icon: 'handshake',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerBusiness.vue'),
|
|
},
|
|
{
|
|
path: 'notes',
|
|
name: 'NotesCard',
|
|
redirect: { name: 'WorkerNotes' },
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'WorkerNotes',
|
|
meta: {
|
|
title: 'notes',
|
|
icon: 'vn:notes',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerNotes.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'WorkerTimeControl',
|
|
path: 'time-control',
|
|
meta: {
|
|
title: 'timeControl',
|
|
icon: 'access_time',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerTimeControl.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerCalendar',
|
|
path: 'calendar',
|
|
meta: {
|
|
title: 'calendar',
|
|
icon: 'calendar_today',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerCalendar.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerPda',
|
|
path: 'pda',
|
|
meta: {
|
|
title: 'pda',
|
|
icon: 'phone_android',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerPda.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerNotificationsManager',
|
|
path: 'notifications',
|
|
meta: {
|
|
title: 'notifications',
|
|
icon: 'notifications',
|
|
},
|
|
component: () =>
|
|
import('src/pages/Worker/Card/WorkerNotificationsManager.vue'),
|
|
},
|
|
{
|
|
path: 'pbx',
|
|
name: 'WorkerPBX',
|
|
meta: {
|
|
title: 'pbx',
|
|
icon: 'vn:pbx',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerPBX.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerDms',
|
|
path: 'dms',
|
|
meta: {
|
|
title: 'dms',
|
|
icon: 'cloud_upload',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerDms.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerLog',
|
|
path: 'log',
|
|
meta: {
|
|
title: 'log',
|
|
icon: 'vn:History',
|
|
acls: [{ model: 'WorkerLog', props: 'find', accessType: 'READ' }],
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerLog.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerLocker',
|
|
path: 'locker',
|
|
meta: {
|
|
title: 'locker',
|
|
icon: 'lock',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerLocker.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerBalance',
|
|
path: 'balance',
|
|
meta: {
|
|
title: 'balance',
|
|
icon: 'balance',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerBalance.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerFormation',
|
|
path: 'formation',
|
|
meta: {
|
|
title: 'formation',
|
|
icon: 'clinical_notes',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerFormation.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerMedical',
|
|
path: 'medical',
|
|
meta: {
|
|
title: 'medical',
|
|
icon: 'medical_information',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerMedical.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerPit',
|
|
path: 'pit',
|
|
meta: {
|
|
title: 'pit',
|
|
icon: 'lock',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerPit.vue'),
|
|
},
|
|
{
|
|
name: 'WorkerOperator',
|
|
path: 'operator',
|
|
meta: {
|
|
title: 'operator',
|
|
icon: 'person',
|
|
},
|
|
component: () => import('src/pages/Worker/Card/WorkerOperator.vue'),
|
|
},
|
|
],
|
|
};
|
|
|
|
const departmentCard = {
|
|
name: 'DepartmentCard',
|
|
path: ':id',
|
|
component: () => import('src/pages/Department/Card/DepartmentCard.vue'),
|
|
redirect: { name: 'DepartmentSummary' },
|
|
meta: {
|
|
menu: ['DepartmentBasicData'],
|
|
},
|
|
children: [
|
|
{
|
|
path: 'summary',
|
|
name: 'DepartmentSummary',
|
|
meta: {
|
|
title: 'summary',
|
|
icon: 'launch',
|
|
},
|
|
component: () => import('src/pages/Department/Card/DepartmentSummary.vue'),
|
|
},
|
|
{
|
|
path: 'basic-data',
|
|
name: 'DepartmentBasicData',
|
|
meta: {
|
|
title: 'basicData',
|
|
icon: 'vn:settings',
|
|
},
|
|
component: () => import('src/pages/Department/Card/DepartmentBasicData.vue'),
|
|
},
|
|
],
|
|
};
|
|
|
|
export default {
|
|
name: 'Worker',
|
|
path: '/worker',
|
|
meta: {
|
|
title: 'workers',
|
|
icon: 'vn:worker',
|
|
moduleName: 'Worker',
|
|
keyBinding: 'w',
|
|
menu: ['WorkerList', 'WorkerDepartment'],
|
|
},
|
|
component: RouterView,
|
|
redirect: { name: 'WorkerMain' },
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'WorkerMain',
|
|
component: () => import('src/components/common/VnModule.vue'),
|
|
redirect: { name: 'WorkerIndexMain' },
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'WorkerIndexMain',
|
|
redirect: { name: 'WorkerList' },
|
|
component: () => import('src/pages/Worker/WorkerList.vue'),
|
|
children: [
|
|
{
|
|
name: 'WorkerList',
|
|
path: 'list',
|
|
meta: {
|
|
title: 'list',
|
|
icon: 'view_list',
|
|
},
|
|
},
|
|
workerCard,
|
|
],
|
|
},
|
|
{
|
|
path: 'department',
|
|
name: 'Department',
|
|
redirect: { name: 'WorkerDepartment' },
|
|
component: () => import('src/pages/Worker/WorkerDepartment.vue'),
|
|
children: [
|
|
{
|
|
name: 'WorkerDepartment',
|
|
path: 'list',
|
|
meta: { title: 'department', icon: 'vn:greuge' },
|
|
},
|
|
departmentCard,
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|