import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';

// 路由配置信息
const routes = [
  { path: '/', redirect: '/FormList' },
  {
    path: '/Test',
    name: 'Test',
    component: () => import('@/components/Test.vue'),
  },
  //表单列表
  {
    path: '/FormList',
    name: 'FormList',
    component: () => import('@/views/FormBuilder/FormList/Index.vue'),
  },
  //表单实例
  {
    path: '/FormQuery',
    name: 'FormQuery',
    component: () => import('@/views/FormBuilder/FormQuery/Index.vue'),
  },
  //表单设计
  {
    path: '/FormDesigner/:MODELCODE',
    name: 'FormDesigner',
    component: () => import('@/views/FormBuilder/FormDesigner/Index.vue'),
  },
  //新建表单
  {
    path: '/CreateFormInstance',
    name: 'CreateFormInstance',
    component: () => import('@/views/FormBuilder/FormQuery/CreateFormInstance.vue'),
  },
];

// 创建路由
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
