|
@@ -1,4 +1,4 @@
|
|
|
-import * as EnumType from '@/enums/routerName';
|
|
|
|
|
|
|
+import * as EnumType from '@/common/constants/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';
|
|
@@ -35,7 +35,6 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
path: '/futures',
|
|
path: '/futures',
|
|
|
name: 'forward',
|
|
name: 'forward',
|
|
|
component: () => import('@/views/market/forward/index.vue'),
|
|
component: () => import('@/views/market/forward/index.vue'),
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/warehouse-trade',
|
|
path: '/warehouse-trade',
|
|
@@ -47,16 +46,18 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'custom_info',
|
|
name: 'custom_info',
|
|
|
component: () => import('@/views/information/custom/index.vue'),
|
|
component: () => import('@/views/information/custom/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ redirect: (to) => {
|
|
|
|
|
+ return { name: 'custom_info_normal' };
|
|
|
},
|
|
},
|
|
|
- redirect: to => { return { name: 'custom_info_normal' } },
|
|
|
|
|
children: [
|
|
children: [
|
|
|
{
|
|
{
|
|
|
path: '/custom_info/normal',
|
|
path: '/custom_info/normal',
|
|
|
name: 'custom_info_normal',
|
|
name: 'custom_info_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,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -64,7 +65,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'custom_info_disabled',
|
|
name: 'custom_info_disabled',
|
|
|
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,16 +75,18 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'goods_info',
|
|
name: 'goods_info',
|
|
|
component: () => import('@/views/information/goods/index.vue'),
|
|
component: () => import('@/views/information/goods/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ redirect: (to) => {
|
|
|
|
|
+ return { name: 'goods_info_spot' };
|
|
|
},
|
|
},
|
|
|
- redirect: to => { return { name: 'goods_info_spot' } },
|
|
|
|
|
children: [
|
|
children: [
|
|
|
{
|
|
{
|
|
|
path: '/goods_info/spot',
|
|
path: '/goods_info/spot',
|
|
|
name: 'goods_info_spot',
|
|
name: 'goods_info_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,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -91,7 +94,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'goods_info_hedge',
|
|
name: 'goods_info_hedge',
|
|
|
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,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
@@ -101,7 +104,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'outaccount_status',
|
|
name: 'outaccount_status',
|
|
|
component: () => import('@/views/search/outaccount_status/index.vue'),
|
|
component: () => import('@/views/search/outaccount_status/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -109,7 +112,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'inventory',
|
|
name: 'inventory',
|
|
|
component: () => import('@/views/search/inventory/index.vue'),
|
|
component: () => import('@/views/search/inventory/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -117,16 +120,18 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'spot_contract',
|
|
name: 'spot_contract',
|
|
|
component: () => import('@/views/information/spot-contract/index.vue'),
|
|
component: () => import('@/views/information/spot-contract/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ redirect: (to) => {
|
|
|
|
|
+ return { name: 'spot_contract_unsubmitted' };
|
|
|
},
|
|
},
|
|
|
- redirect: to => { return { name: 'spot_contract_unsubmitted' } },
|
|
|
|
|
children: [
|
|
children: [
|
|
|
{
|
|
{
|
|
|
path: '/spot_contract/not-commit',
|
|
path: '/spot_contract/not-commit',
|
|
|
name: 'spot_contract_unsubmitted',
|
|
name: 'spot_contract_unsubmitted',
|
|
|
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,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -134,7 +139,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'spot_contract_checkpending',
|
|
name: 'spot_contract_checkpending',
|
|
|
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,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -142,7 +147,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'spot_contract_performance',
|
|
name: 'spot_contract_performance',
|
|
|
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,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -150,26 +155,28 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'spot_contract_finished',
|
|
name: 'spot_contract_finished',
|
|
|
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,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/warehouse_info',
|
|
path: '/warehouse_info',
|
|
|
name: 'warehouse_info',
|
|
name: 'warehouse_info',
|
|
|
component: () => import('@/views/information/warehouse-info/index.vue'),
|
|
component: () => import('@/views/information/warehouse-info/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ redirect: (to) => {
|
|
|
|
|
+ return { name: 'warehouse_info_normal' };
|
|
|
},
|
|
},
|
|
|
- redirect: to => { return { name: 'warehouse_info_normal' } },
|
|
|
|
|
children: [
|
|
children: [
|
|
|
{
|
|
{
|
|
|
path: '/warehouse_info/normal',
|
|
path: '/warehouse_info/normal',
|
|
|
name: 'warehouse_info_normal',
|
|
name: 'warehouse_info_normal',
|
|
|
component: () => import('@/views/information/warehouse-info/list/normal-use/index.vue'),
|
|
component: () => import('@/views/information/warehouse-info/list/normal-use/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -177,17 +184,17 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'warehouse_info_disabled',
|
|
name: 'warehouse_info_disabled',
|
|
|
component: () => import('@/views/information/warehouse-info/list/stop-use/index.vue'),
|
|
component: () => import('@/views/information/warehouse-info/list/stop-use/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/exposure',
|
|
path: '/exposure',
|
|
|
name: 'exposure',
|
|
name: 'exposure',
|
|
|
component: () => import('@/views/business/exposure/index.vue'),
|
|
component: () => import('@/views/business/exposure/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -195,7 +202,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'plan',
|
|
name: 'plan',
|
|
|
component: () => import('@/views/business/plan/index.vue'),
|
|
component: () => import('@/views/business/plan/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -203,16 +210,18 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'purchase',
|
|
name: 'purchase',
|
|
|
component: () => import('@/views/business/purchase/index.vue'),
|
|
component: () => import('@/views/business/purchase/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ redirect: (to) => {
|
|
|
|
|
+ return { name: EnumType.Purchase.realTime };
|
|
|
},
|
|
},
|
|
|
- redirect: to => { return { name: EnumType.Purchase.realTime } },
|
|
|
|
|
children: [
|
|
children: [
|
|
|
{
|
|
{
|
|
|
path: '/purchase/forward',
|
|
path: '/purchase/forward',
|
|
|
name: EnumType.Purchase.forward,
|
|
name: EnumType.Purchase.forward,
|
|
|
component: () => import('@/views/business/purchase/list/forward/index.vue'),
|
|
component: () => import('@/views/business/purchase/list/forward/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -220,7 +229,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: EnumType.Purchase.history,
|
|
name: EnumType.Purchase.history,
|
|
|
component: () => import('@/views/business/purchase/list/history/index.vue'),
|
|
component: () => import('@/views/business/purchase/list/history/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -228,7 +237,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: EnumType.Purchase.realTime,
|
|
name: EnumType.Purchase.realTime,
|
|
|
component: () => import('@/views/business/purchase/list/real-time/index.vue'),
|
|
component: () => import('@/views/business/purchase/list/real-time/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -236,17 +245,17 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: EnumType.Purchase.spot,
|
|
name: EnumType.Purchase.spot,
|
|
|
component: () => import('@/views/business/purchase/list/spot/index.vue'),
|
|
component: () => import('@/views/business/purchase/list/spot/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
path: '/sell',
|
|
path: '/sell',
|
|
|
name: 'sell',
|
|
name: 'sell',
|
|
|
component: () => import('@/views/business/sell/index.vue'),
|
|
component: () => import('@/views/business/sell/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -254,7 +263,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'business_review',
|
|
name: 'business_review',
|
|
|
component: () => import('@/views/manage/business-review/index.vue'),
|
|
component: () => import('@/views/manage/business-review/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -262,7 +271,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'finance_review',
|
|
name: 'finance_review',
|
|
|
component: () => import('@/views/manage/finance-review/index.vue'),
|
|
component: () => import('@/views/manage/finance-review/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -270,7 +279,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'inventory_review',
|
|
name: 'inventory_review',
|
|
|
component: () => import('@/views/manage/inventory-review/index.vue'),
|
|
component: () => import('@/views/manage/inventory-review/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -278,7 +287,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'exposure_report',
|
|
name: 'exposure_report',
|
|
|
component: () => import('@/views/report/exposure-report/index.vue'),
|
|
component: () => import('@/views/report/exposure-report/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -286,7 +295,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'finance_report',
|
|
name: 'finance_report',
|
|
|
component: () => import('@/views/report/finance-report/index.vue'),
|
|
component: () => import('@/views/report/finance-report/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -294,7 +303,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'inventory_report',
|
|
name: 'inventory_report',
|
|
|
component: () => import('@/views/report/inventory-report/index.vue'),
|
|
component: () => import('@/views/report/inventory-report/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -302,7 +311,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
name: 'spot_report',
|
|
name: 'spot_report',
|
|
|
component: () => import('@/views/report/spot-report/index.vue'),
|
|
component: () => import('@/views/report/spot-report/index.vue'),
|
|
|
meta: {
|
|
meta: {
|
|
|
- requireAuth: true
|
|
|
|
|
|
|
+ requireAuth: true,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|