refactor: refs #8322 set department inside worker
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
e7f2d6ae7f
commit
245530b542
|
@ -40,7 +40,7 @@ onMounted(async () => {
|
|||
<template #body="{ entity: department }">
|
||||
<QCard class="column">
|
||||
<VnTitle
|
||||
:url="`#/department/department/${entityId}/basic-data`"
|
||||
:url="`#/worker/department/${entityId}/basic-data`"
|
||||
:text="t('Basic data')"
|
||||
/>
|
||||
<div class="full-width row wrap justify-between content-between">
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
<script setup>
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import WorkerDepartmentTree from './WorkerDepartmentTree.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<WorkerDepartmentTree />
|
||||
</QPage>
|
||||
<VnSection data-key="WorkerDepartment">
|
||||
<template #body>
|
||||
<div class="flex flex-center q-pa-md">
|
||||
<WorkerDepartmentTree />
|
||||
</div>
|
||||
</template>
|
||||
</VnSection>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -111,18 +111,16 @@ function handleEvent(type, event, node) {
|
|||
switch (type) {
|
||||
case 'path':
|
||||
state.set('TreeState', lastId);
|
||||
node.id && router.push({ path: `/department/department/${node.id}/summary` });
|
||||
node.id && router.push({ path: `/worker/department/${node.id}/summary` });
|
||||
break;
|
||||
|
||||
case 'tab':
|
||||
state.set('TreeState', lastId);
|
||||
node.id &&
|
||||
window.open(`#/department/department/${node.id}/summary`, '_blank');
|
||||
node.id && window.open(`#/worker/department/${node.id}/summary`, '_blank');
|
||||
break;
|
||||
|
||||
default:
|
||||
node.id &&
|
||||
router.push({ path: `#/department/department/${node.id}/summary` });
|
||||
node.id && router.push({ path: `#/worker/department/${node.id}/summary` });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
import { RouterView } from 'vue-router';
|
||||
|
||||
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: 'Department',
|
||||
path: '/worker/department',
|
||||
meta: {
|
||||
title: 'department',
|
||||
icon: 'vn:greuge',
|
||||
moduleName: 'Department',
|
||||
menu: [],
|
||||
},
|
||||
component: RouterView,
|
||||
redirect: { name: 'DepartmentMain' },
|
||||
children: [
|
||||
{
|
||||
name: 'DepartmentMain',
|
||||
path: '',
|
||||
component: () => import('src/components/common/VnModule.vue'),
|
||||
redirect: { name: 'DepartmentIndexMain' },
|
||||
children: [departmentCard],
|
||||
},
|
||||
],
|
||||
};
|
|
@ -11,7 +11,6 @@ import Route from './route';
|
|||
import Supplier from './supplier';
|
||||
import Travel from './travel';
|
||||
import Order from './order';
|
||||
import Department from './department';
|
||||
import Entry from './entry';
|
||||
import roadmap from './roadmap';
|
||||
import Parking from './parking';
|
||||
|
@ -35,7 +34,6 @@ export default [
|
|||
Travel,
|
||||
Order,
|
||||
invoiceIn,
|
||||
Department,
|
||||
Entry,
|
||||
roadmap,
|
||||
Parking,
|
||||
|
|
|
@ -62,8 +62,7 @@ const workerCard = {
|
|||
title: 'notes',
|
||||
icon: 'vn:notes',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Worker/Card/WorkerNotes.vue'),
|
||||
component: () => import('src/pages/Worker/Card/WorkerNotes.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -74,8 +73,7 @@ const workerCard = {
|
|||
title: 'timeControl',
|
||||
icon: 'access_time',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Worker/Card/WorkerTimeControl.vue'),
|
||||
component: () => import('src/pages/Worker/Card/WorkerTimeControl.vue'),
|
||||
},
|
||||
{
|
||||
name: 'WorkerCalendar',
|
||||
|
@ -190,6 +188,36 @@ const workerCard = {
|
|||
],
|
||||
};
|
||||
|
||||
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',
|
||||
|
@ -224,16 +252,21 @@ export default {
|
|||
},
|
||||
},
|
||||
workerCard,
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'department',
|
||||
name: 'WorkerDepartment',
|
||||
meta: {
|
||||
title: 'department',
|
||||
icon: 'vn:greuge',
|
||||
},
|
||||
name: 'Department',
|
||||
redirect: { name: 'WorkerDepartment' },
|
||||
component: () => import('src/pages/Worker/WorkerDepartment.vue'),
|
||||
children: [
|
||||
{
|
||||
name: 'WorkerDepartment',
|
||||
path: 'list',
|
||||
meta: { title: 'department', icon: 'vn:greuge' },
|
||||
},
|
||||
departmentCard,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
|
|
|
@ -9,7 +9,6 @@ import invoiceIn from './modules/invoiceIn';
|
|||
import wagon from './modules/wagon';
|
||||
import supplier from './modules/supplier';
|
||||
import travel from './modules/travel';
|
||||
import department from './modules/department';
|
||||
import ItemType from './modules/itemType';
|
||||
import shelving from 'src/router/modules/shelving';
|
||||
import order from 'src/router/modules/order';
|
||||
|
@ -85,7 +84,6 @@ const routes = [
|
|||
route,
|
||||
supplier,
|
||||
travel,
|
||||
department,
|
||||
roadmap,
|
||||
entry,
|
||||
parking,
|
||||
|
|
Loading…
Reference in New Issue