|
@@ -1,7 +1,9 @@
|
|
|
|
|
+import * as EnumType from '@/enums/routerName';
|
|
|
import Layout from '@/layout/index.vue';
|
|
import Layout from '@/layout/index.vue';
|
|
|
import { isLogin } from '@/services/bus/login';
|
|
import { isLogin } from '@/services/bus/login';
|
|
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
|
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
|
|
|
import eventBus from '../utils/eventBus';
|
|
import eventBus from '../utils/eventBus';
|
|
|
|
|
+
|
|
|
const routes: Array<RouteRecordRaw> = [
|
|
const routes: Array<RouteRecordRaw> = [
|
|
|
{
|
|
{
|
|
|
path: '/login',
|
|
path: '/login',
|
|
@@ -47,11 +49,11 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
|
},
|
|
},
|
|
|
- redirect: to => { return { name: 'custom_info_normal' } },
|
|
|
|
|
|
|
+ redirect: to => { return { name: EnumType.CustomInfo.normal } },
|
|
|
children: [
|
|
children: [
|
|
|
{
|
|
{
|
|
|
path: '/custom_info/normal',
|
|
path: '/custom_info/normal',
|
|
|
- name: 'custom_info_normal',
|
|
|
|
|
|
|
+ name: EnumType.CustomInfo.normal,
|
|
|
component: () => import('@/views/information/custom/list/normal-use/index.vue'),
|
|
component: () => import('@/views/information/custom/list/normal-use/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
@@ -59,7 +61,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/custom_info/stop',
|
|
path: '/custom_info/stop',
|
|
|
- name: 'custom_info_stop',
|
|
|
|
|
|
|
+ name: EnumType.CustomInfo.stop,
|
|
|
component: () => import('@/views/information/custom/list/stop-use/index.vue'),
|
|
component: () => import('@/views/information/custom/list/stop-use/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
@@ -74,11 +76,11 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
|
},
|
|
},
|
|
|
- redirect: to => { return { name: 'goods_info_spot' } },
|
|
|
|
|
|
|
+ redirect: to => { return { name: EnumType.GoodsInfo.spot } },
|
|
|
children: [
|
|
children: [
|
|
|
{
|
|
{
|
|
|
path: '/goods_info/spot',
|
|
path: '/goods_info/spot',
|
|
|
- name: 'goods_info_spot',
|
|
|
|
|
|
|
+ name: EnumType.GoodsInfo.spot,
|
|
|
component: () => import('@/views/information/goods/list/spot-variety/index.vue'),
|
|
component: () => import('@/views/information/goods/list/spot-variety/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
@@ -86,7 +88,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/goods_info/hedging',
|
|
path: '/goods_info/hedging',
|
|
|
- name: 'goods_info_hedging',
|
|
|
|
|
|
|
+ name: EnumType.GoodsInfo.hedging,
|
|
|
component: () => import('@/views/information/goods/list/hedging-variety/index.vue'),
|
|
component: () => import('@/views/information/goods/list/hedging-variety/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
@@ -117,11 +119,11 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
|
},
|
|
},
|
|
|
- redirect: to => { return { name: 'spot_contract-not-commit' } },
|
|
|
|
|
|
|
+ redirect: to => { return { name: EnumType.SpotContract.notCommit } },
|
|
|
children: [
|
|
children: [
|
|
|
{
|
|
{
|
|
|
path: '/spot_contract/not-commit',
|
|
path: '/spot_contract/not-commit',
|
|
|
- name: 'spot_contract-not-commit',
|
|
|
|
|
|
|
+ name: EnumType.SpotContract.notCommit,
|
|
|
component: () => import('@/views/information/spot-contract/list/not-commit/index.vue'),
|
|
component: () => import('@/views/information/spot-contract/list/not-commit/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
@@ -129,7 +131,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/spot_contract/done',
|
|
path: '/spot_contract/done',
|
|
|
- name: 'spot_contract-done',
|
|
|
|
|
|
|
+ name: EnumType.SpotContract.done,
|
|
|
component: () => import('@/views/information/spot-contract/list/done/index.vue'),
|
|
component: () => import('@/views/information/spot-contract/list/done/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
@@ -137,7 +139,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/spot_contract/peddding',
|
|
path: '/spot_contract/peddding',
|
|
|
- name: 'spot_contract-peddding',
|
|
|
|
|
|
|
+ name: EnumType.SpotContract.peddding,
|
|
|
component: () => import('@/views/information/spot-contract/list/peddding/index.vue'),
|
|
component: () => import('@/views/information/spot-contract/list/peddding/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
@@ -145,7 +147,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/spot_contract/performance',
|
|
path: '/spot_contract/performance',
|
|
|
- name: 'spot_contract-performance',
|
|
|
|
|
|
|
+ name: EnumType.SpotContract.performance,
|
|
|
component: () => import('@/views/information/spot-contract/list/performance/index.vue'),
|
|
component: () => import('@/views/information/spot-contract/list/performance/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
@@ -160,6 +162,25 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
|
},
|
|
},
|
|
|
|
|
+ redirect: to => { return { name: EnumType.WarehouseInfo.normal } },
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ path: '/warehouse_info/normal',
|
|
|
|
|
+ name: EnumType.WarehouseInfo.normal,
|
|
|
|
|
+ component: () => import('@/views/information/warehouse-info/list/normal-use/index.vue'),
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ requireAuth: true
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ path: '/warehouse_info/stop',
|
|
|
|
|
+ name: EnumType.WarehouseInfo.stop,
|
|
|
|
|
+ component: () => import('@/views/information/warehouse-info/list/stop-use/index.vue'),
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ requireAuth: true
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ ]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/exposure',
|
|
path: '/exposure',
|
|
@@ -184,6 +205,41 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
meta: {
|
|
meta: {
|
|
|
requireAuth: true
|
|
requireAuth: true
|
|
|
},
|
|
},
|
|
|
|
|
+ redirect: to => { return { name: EnumType.Purchase.realTime } },
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ path: '/purchase/forward',
|
|
|
|
|
+ name: EnumType.Purchase.forward,
|
|
|
|
|
+ component: () => import('@/views/business/purchase/list/forward/index.vue'),
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ requireAuth: true
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ path: '/purchase/history',
|
|
|
|
|
+ name: EnumType.Purchase.history,
|
|
|
|
|
+ component: () => import('@/views/business/purchase/list/history/index.vue'),
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ requireAuth: true
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ path: '/purchase/real-time',
|
|
|
|
|
+ name: EnumType.Purchase.realTime,
|
|
|
|
|
+ component: () => import('@/views/business/purchase/list/real-time/index.vue'),
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ requireAuth: true
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ path: '/purchase/spot',
|
|
|
|
|
+ name: EnumType.Purchase.spot,
|
|
|
|
|
+ component: () => import('@/views/business/purchase/list/spot/index.vue'),
|
|
|
|
|
+ meta: {
|
|
|
|
|
+ requireAuth: true
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ ]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/sell',
|
|
path: '/sell',
|