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