dataProduct.ts
5.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
import { tr } from 'element-plus/es/locale';
import type { RouteRecordRaw } from 'vue-router'
function Layout() {
return import('@/layouts/index.vue')
}
const routes: RouteRecordRaw[] = [
{
path: '/data-product/product-listing',
component: Layout,
meta: {
title: '数据产品上架',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'productListing',
component: () => import('@/views/data_product/productListing.vue'),
meta: {
title: '数据产品上架',
sidebar: false,
breadcrumb: false,
cache: true
},
},
{
path: 'listing-detail',
name: 'productListingDetail',
component: () => import('@/views/data_product/productListingDetail.vue'),
meta: {
title: '新建数据产品',
sidebar: false,
reuse: true,
breadcrumb: false,
cache: true
},
beforeEnter: (to, from) => {
if(to.query.type){
if (to.query.type == 'detail') {
to.meta.title = `详情-${to.query.name}`;
} else {
to.meta.editPage = true;
to.meta.title = to.query.type=='add'? '新建数据产品': to.query.type=='edit'? `编辑-${to.query.name}`: `详情-${to.query.name}`;
}
}
}
},
],
},
{
path: '/data-product/listing-check',
component: Layout,
meta: {
title: '数据产品审核',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'productListingCheck',
component: () => import('@/views/data_product/productListingCheck.vue'),
meta: {
title: '数据产品审核',
sidebar: false,
breadcrumb: false,
cache: true,
},
},
{
path: 'listing-detail',
name: 'productListingCheckDetail',
component: () => import('@/views/data_product/productListingDetail.vue'),
meta: {
title: '产品审核详情',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
},
beforeEnter: (to, from) => {
if (to.query.type == 'check') {
to.meta.editPage = true;
to.meta.title = `详情-${to.query.name}`;
return;
}
}
},
],
},
{
path: '/data-product/demands-publish',
component: Layout,
meta: {
title: '数据需求发布',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'productDemandsPublish',
component: () => import('@/views/data_product/productDemandsPublish.vue'),
meta: {
title: '数据需求发布',
sidebar: false,
breadcrumb: false,
cache: true
},
},
{
path: 'demands-detail',
name: 'productDemandsDetail',
component: () => import('@/views/data_product/productDemandsDetail.vue'),
meta: {
title: '新建数据需求',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
},
beforeEnter: (to, from) => {
if(to.query.type){
if (to.query.type == 'detail') {
to.meta.title = `详情-${to.query.name}`;
} else {
to.meta.editPage = true;
to.meta.title = to.query.type=='add'? `新建数据需求${to.query.interfaceType == '2' ? '(算法竞赛)' : (to.query.interfaceType == '3' ? '(要素市场)' : '')}`: to.query.type=='edit'? `编辑-${to.query.name}`: `详情-${to.query.name}`;
}
}
}
},
],
},
{
path: '/data-product/demands-check',
component: Layout,
meta: {
title: '数据需求审核',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'productDemandsCheck',
component: () => import('@/views/data_product/productDemandsCheck.vue'),
meta: {
title: '数据需求审核',
sidebar: false,
breadcrumb: false,
cache: true
},
},
{
path: 'demands-detail',
name: 'productDemandsCheckDetail',
component: () => import('@/views/data_product/productDemandsDetail.vue'),
meta: {
title: '需求审核详情',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
},
beforeEnter: (to, from) => {
if (to.query.type == 'check') {
to.meta.editPage = true;
to.meta.title = `详情-${to.query.name}`;
}
}
},
],
},
// {
// path: '/data-guide/transaction-finance',
// component: Layout,
// meta: {
// title: '交易融资指南',
// icon: 'sidebar-videos',
// },
// children: [
// {
// path: '',
// name: 'transactionFinanceGuid',
// component: () => import('@/views/data_transaction/transactionFinanceGuide.vue'),
// meta: {
// title: '交易融资指南',
// sidebar: false,
// breadcrumb: false,
// cache: true
// },
// },
// ],
// },
{
path: '/data-product/transaction-management',
component: Layout,
meta: {
title: '资产交易管理',
icon: 'sidebar-videos',
},
children: [
{
path: '',
name: 'transactionManagement',
component: () => import('@/views/data_transaction/transactionManagement.vue'),
meta: {
title: '资产交易管理',
sidebar: false,
breadcrumb: false,
cache: true
},
},
],
},
]
export default routes