You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

212 lines
5.5 KiB
Plaintext

11 months ago
import { createRouter, createWebHistory } from 'vue-router'
import LoginView from '../views/Login.vue'
import IndexView from '../views/Index.vue'
import Error404 from '@/views/error/404.vue'
import {
UserOutlined,
AppstoreOutlined,
SendOutlined,
BellOutlined,
FieldTimeOutlined,
CheckCircleOutlined,
EditOutlined,
SwitcherOutlined,
SearchOutlined,
FormOutlined,
ApiOutlined,
UnorderedListOutlined,
ApartmentOutlined,
BarsOutlined,
} from '@ant-design/icons-vue';
export const menuRoutes = [
{
path: '/wf',
name: 'workflow',
meta: {
icon: <AppstoreOutlined />,
label: '基础功能',
},
component: IndexView,
redirect: '/wf/todo',
children: [{
path: 'start',
name: 'wfStart',
meta: {
icon: <SendOutlined />,
label: '发起',
},
component: () => import('@/views/workflow/Start.vue')
}, {
path: 'todo',
name: 'wfTodo',
meta: {
icon: <BellOutlined />,
label: '待办',
},
component: () => import('@/views/workflow/TodoList.vue')
}, {
path: 'running',
name: 'wfRunning',
meta: {
icon: <FieldTimeOutlined />,
label: '在途',
},
component: () => import('@/views/workflow/Running.vue')
}, {
path: 'completed',
name: 'wfCompleted',
meta: {
icon: <CheckCircleOutlined />,
label: '已完成',
},
component: () => import('@/views/workflow/Completed.vue')
}, {
path: 'query',
name: 'wfQuery',
meta: {
icon: <SearchOutlined />,
label: '查询',
scop:'2',
},
component: () => import('@/views/workflow/IntegratedQuery.vue')
}, {
path: 'draft',
name: 'wfDraft',
meta: {
icon: <FormOutlined />,
label: '草稿',
},
component: () => import('@/views/workflow/Draft.vue')
}, {
path: 'cc',
name: 'wfCC',
meta: {
icon: <EditOutlined />,
label: '抄送',
},
component: () => import('@/views/workflow/Send.vue')
}, {
path: 'batch',
name: 'wfBatch',
meta: {
icon: <SwitcherOutlined />,
label: '批处理',
},
component: () => import('@/views/workflow/Batch.vue')
}]
},
{
path: '/query',
name: 'query',
meta: {
icon: <SearchOutlined />,
label: '流程查询',
},
component: IndexView,
redirect: '/query/start',
children: [
{
path: 'start',
name: 'startQuery',
meta: {
icon: <SendOutlined />,
label: '我发起的',
scop:'1',//查询范围
},
component: () => import('@/views/workflow/IntegratedQuery.vue')
}, {
path: 'participation',
name: 'participationQuery',
meta: {
icon: <UserOutlined />,
label: '我参与的',
scop:'0',//查询范围
},
component: () => import('@/views/workflow/IntegratedQuery.vue')
}
]
},
{
path: '/functionCall',
name: 'functionCall',
meta: {
icon: <AppstoreOutlined />,
label: '功能调用',
},
component: IndexView,
redirect: '/functionCall/FlowTree',
children: [
{
path: 'FlowTree',
name: 'FlowTree',
meta: {
icon: <ApartmentOutlined />,
label: '流程设计',
},
component: () => import('@/views/functionCall/callPort.vue'),
}, {
path: 'FormTree',
name: 'FormTree',
meta: {
icon: <BarsOutlined />,
label: '表单设计',
},
component: () => import('@/views/functionCall/callPort.vue'),
}
]
},
{
path: '/apis',
name: "Apis",
meta: {
icon: <ApiOutlined />,
label: 'API列表',
},
redirect: '/apis/list',
component: IndexView,
children: [
{
path: 'list',
name: 'apiList',
meta: {
icon: <UnorderedListOutlined />,
label: '工具包接口',
},
component: () => import('@/views/api/List.vue')
}
]
},
]
const staticRoutes = [
{
path: '/',
name: 'Index',
redirect: '/wf/todo'
},
{
path: '/login',
name: 'login',
component: LoginView
},
{
path: '/:path(.*)*',
name: 'error',
component: Error404,
}
]
const routes = [...menuRoutes, ...staticRoutes]
export const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes
})