af-mobile-client-vue3 1.4.35 → 1.4.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/common/otherCharge/ChargePrintSelectorAndRemarks.vue +137 -137
- package/src/components/common/otherCharge/CodePayment.vue +357 -357
- package/src/components/common/otherCharge/FileUploader.vue +602 -602
- package/src/components/common/otherCharge/GridFileUploader.vue +846 -846
- package/src/components/common/otherCharge/PaymentMethodSelector.vue +202 -202
- package/src/components/common/otherCharge/PaymentMethodSelectorCard.vue +45 -45
- package/src/components/common/otherCharge/ReceiptModal.vue +273 -273
- package/src/components/common/otherCharge/index.ts +43 -43
- package/src/components/core/ImageUploader/index.vue +8 -0
- package/src/components/data/OtherCharge/OtherChargeItemModal.vue +547 -547
- package/src/components/data/XOlMap/types.ts +1 -1
- package/src/router/routes.ts +427 -427
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/views/component/XCellListView/index.vue +138 -30
- package/src/views/component/XFormGroupView/index.vue +82 -78
- package/src/views/component/XFormView/index.vue +46 -26
- package/src/views/component/XOlMapView/XLocationPicker/index.vue +118 -118
- package/src/views/component/index.vue +1 -1
package/src/router/routes.ts
CHANGED
|
@@ -1,427 +1,427 @@
|
|
|
1
|
-
import type { RouteRecordRaw } from 'vue-router'
|
|
2
|
-
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
3
|
-
import XReport from '@af-mobile-client-vue3/components/data/XReportGrid/XReport.vue'
|
|
4
|
-
import GridView from '@af-mobile-client-vue3/layout/GridView/index.vue'
|
|
5
|
-
import { ACCESS_TOKEN, PLATFORM_TYPE, USER_TYPE } from '@af-mobile-client-vue3/stores/mutation-type'
|
|
6
|
-
import { getPlatformRoutePrefix } from '@af-mobile-client-vue3/types/platform'
|
|
7
|
-
import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
|
|
8
|
-
import Forbidden from '@af-mobile-client-vue3/views/common/Forbidden.vue'
|
|
9
|
-
import NotFound from '@af-mobile-client-vue3/views/common/NotFound.vue'
|
|
10
|
-
import EvaluateRecordView from '@af-mobile-client-vue3/views/component/EvaluateRecordView/index.vue'
|
|
11
|
-
import IconifyView from '@af-mobile-client-vue3/views/component/IconifyView/index.vue'
|
|
12
|
-
import ComponentView from '@af-mobile-client-vue3/views/component/index.vue'
|
|
13
|
-
import OtherChargeForm from '@af-mobile-client-vue3/views/component/OtherCharge/index.vue'
|
|
14
|
-
import UserDetailView from '@af-mobile-client-vue3/views/component/UserDetailView/index.vue'
|
|
15
|
-
import UserDetailPage from '@af-mobile-client-vue3/views/component/UserDetailView/UserDetailPage.vue'
|
|
16
|
-
import XCellDetailView from '@af-mobile-client-vue3/views/component/XCellDetailView/index.vue'
|
|
17
|
-
import XCellListView from '@af-mobile-client-vue3/views/component/XCellListView/index.vue'
|
|
18
|
-
import XFormAppraiseView from '@af-mobile-client-vue3/views/component/XFormAppraiseView/index.vue'
|
|
19
|
-
import XFormGroupView from '@af-mobile-client-vue3/views/component/XFormGroupView/index.vue'
|
|
20
|
-
import XFormView from '@af-mobile-client-vue3/views/component/XFormView/index.vue'
|
|
21
|
-
import XOlMapView from '@af-mobile-client-vue3/views/component/XOlMapView/index.vue'
|
|
22
|
-
import XLocationPicker from '@af-mobile-client-vue3/views/component/XOlMapView/XLocationPicker/index.vue'
|
|
23
|
-
import XReportFormIframeView from '@af-mobile-client-vue3/views/component/XReportFormIframeView/index.vue'
|
|
24
|
-
import XReportFormView from '@af-mobile-client-vue3/views/component/XReportFormView/index.vue'
|
|
25
|
-
import XReportGridView from '@af-mobile-client-vue3/views/component/XReportGridView/index.vue'
|
|
26
|
-
import XRequestView from '@af-mobile-client-vue3/views/component/XRequestView/index.vue'
|
|
27
|
-
import XSignatureView from '@af-mobile-client-vue3/views/component/XSignatureView/index.vue'
|
|
28
|
-
import AuthLoading from '@af-mobile-client-vue3/views/loading/AuthLoading.vue'
|
|
29
|
-
import login from '@af-mobile-client-vue3/views/user/login/index.vue'
|
|
30
|
-
import my from '@af-mobile-client-vue3/views/user/my/index.vue'
|
|
31
|
-
import register from '@af-mobile-client-vue3/views/user/register/index.vue'
|
|
32
|
-
import AbnormalAlarmRecords from '@af-mobile-client-vue3/views/userRecords/AbnormalAlarmRecords.vue'
|
|
33
|
-
import CardReplacementRecords from '@af-mobile-client-vue3/views/userRecords/CardReplacementRecords.vue'
|
|
34
|
-
import ChangeRecords from '@af-mobile-client-vue3/views/userRecords/ChangeRecords.vue'
|
|
35
|
-
import CommandViewRecords from '@af-mobile-client-vue3/views/userRecords/CommandViewRecords.vue'
|
|
36
|
-
import GasCompensationRecords from '@af-mobile-client-vue3/views/userRecords/GasCompensationRecords.vue'
|
|
37
|
-
import InstrumentCollectionRecords from '@af-mobile-client-vue3/views/userRecords/InstrumentCollectionRecords.vue'
|
|
38
|
-
import MeterRecords from '@af-mobile-client-vue3/views/userRecords/MeterRecords.vue'
|
|
39
|
-
import OperateRecords from '@af-mobile-client-vue3/views/userRecords/OperateRecords.vue'
|
|
40
|
-
import OtherChargeRecords from '@af-mobile-client-vue3/views/userRecords/OtherChargeRecords.vue'
|
|
41
|
-
import PaymentRecords from '@af-mobile-client-vue3/views/userRecords/PaymentRecords.vue'
|
|
42
|
-
import PriceAdjustmentRecords from '@af-mobile-client-vue3/views/userRecords/PriceAdjustmentRecords.vue'
|
|
43
|
-
import ReplacementRecords from '@af-mobile-client-vue3/views/userRecords/ReplacementRecords.vue'
|
|
44
|
-
import SafetyRecords from '@af-mobile-client-vue3/views/userRecords/SafetyRecords.vue'
|
|
45
|
-
import TransactionRecords from '@af-mobile-client-vue3/views/userRecords/TransactionRecords.vue'
|
|
46
|
-
import TransferRecords from '@af-mobile-client-vue3/views/userRecords/TransferRecords.vue'
|
|
47
|
-
import externalUserRoutes from './external-routes'
|
|
48
|
-
|
|
49
|
-
const routes: Array<RouteRecordRaw> = [
|
|
50
|
-
{
|
|
51
|
-
path: '/',
|
|
52
|
-
name: 'root',
|
|
53
|
-
redirect: () => {
|
|
54
|
-
// 动态重定向逻辑:根据用户类型决定重定向目标
|
|
55
|
-
// 直接从 localStorage 获取数据,避免 Pinia 初始化时序问题
|
|
56
|
-
const Storage = createStorage({ storage: localStorage })
|
|
57
|
-
const token = Storage.get(ACCESS_TOKEN, '')
|
|
58
|
-
const userType = Storage.get(USER_TYPE, null)
|
|
59
|
-
const platformType = Storage.get(PLATFORM_TYPE, null)
|
|
60
|
-
|
|
61
|
-
if (token && userType === 'EXTERNAL') {
|
|
62
|
-
// 外部用户:尝试获取平台路由前缀
|
|
63
|
-
const platformPrefix = getPlatformRoutePrefix(platformType)
|
|
64
|
-
|
|
65
|
-
if (platformPrefix && platformPrefix !== '/ex/') {
|
|
66
|
-
return platformPrefix
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
// 默认重定向到 Component(系统用户或未登录用户)
|
|
70
|
-
return { name: 'Component' }
|
|
71
|
-
},
|
|
72
|
-
children: [
|
|
73
|
-
{
|
|
74
|
-
path: '/XReportFormIframeView',
|
|
75
|
-
name: 'XReportFormIframeView',
|
|
76
|
-
component: XReportFormIframeView,
|
|
77
|
-
meta: {
|
|
78
|
-
requiresAuth: true,
|
|
79
|
-
allowExternalUser: false,
|
|
80
|
-
title: '表单iframe视图',
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
path: '/Components/XForm',
|
|
85
|
-
name: 'XForm',
|
|
86
|
-
component: XForm,
|
|
87
|
-
props: route => ({
|
|
88
|
-
groupFormItems: JSON.parse(decodeURIComponent(route.query.groupFormItems as string)),
|
|
89
|
-
serviceName: route.query.serviceName,
|
|
90
|
-
formData: JSON.parse(decodeURIComponent(route.query.formData as string)),
|
|
91
|
-
mode: route.query.mode,
|
|
92
|
-
}),
|
|
93
|
-
meta: {
|
|
94
|
-
requiresAuth: true,
|
|
95
|
-
allowExternalUser: false,
|
|
96
|
-
title: '新增/修改表单',
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
path: '/Component',
|
|
103
|
-
name: 'Component',
|
|
104
|
-
redirect: { name: 'ComponentView' },
|
|
105
|
-
children: [
|
|
106
|
-
{
|
|
107
|
-
path: '/Component/main',
|
|
108
|
-
name: 'ComponentView',
|
|
109
|
-
component: ComponentView,
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
path: '/Component/XCellListView',
|
|
113
|
-
name: 'XCellListView',
|
|
114
|
-
component: XCellListView,
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
path: '/Component/XCellDetailView/:id',
|
|
118
|
-
name: 'XCellDetailView',
|
|
119
|
-
component: XCellDetailView,
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
path: '/Component/XFormGroupView',
|
|
123
|
-
name: 'XFormGroupView',
|
|
124
|
-
component: XFormGroupView,
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
path: '/Component/XReportFormView',
|
|
128
|
-
name: 'XReportFormView',
|
|
129
|
-
component: XReportFormView,
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
path: '/Component/XOlMapView',
|
|
133
|
-
name: 'XOlMapView',
|
|
134
|
-
component: XOlMapView,
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
path: '/Component/XOlMapView/XLocationPicker',
|
|
138
|
-
name: 'XLocationPicker',
|
|
139
|
-
component: XLocationPicker,
|
|
140
|
-
},
|
|
141
|
-
// {
|
|
142
|
-
// path: '/Components/XForm',
|
|
143
|
-
// name: 'XForm',
|
|
144
|
-
// component: XForm,
|
|
145
|
-
// props: route => ({
|
|
146
|
-
// groupFormItems: JSON.parse(decodeURIComponent(route.query.groupFormItems as string)),
|
|
147
|
-
// serviceName: route.query.serviceName,
|
|
148
|
-
// formData: JSON.parse(decodeURIComponent(route.query.formData as string)),
|
|
149
|
-
// mode: route.query.mode,
|
|
150
|
-
// }),
|
|
151
|
-
// meta:{ title: '新增/修改表单' }
|
|
152
|
-
// },
|
|
153
|
-
{
|
|
154
|
-
path: '/Component/XFormAppraiseView/:id/:openid',
|
|
155
|
-
name: 'XFormAppraiseView',
|
|
156
|
-
component: XFormAppraiseView,
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
path: '/Component/XFormView',
|
|
160
|
-
name: 'XFormView',
|
|
161
|
-
component: XFormView,
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
path: '/Component/OtherCharge',
|
|
165
|
-
name: 'OtherChargeForm',
|
|
166
|
-
component: OtherChargeForm,
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
path: '/Component/EvaluateRecordView',
|
|
170
|
-
name: 'EvaluateRecordView',
|
|
171
|
-
component: EvaluateRecordView,
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
path: '/Component/XSignatureView',
|
|
175
|
-
name: 'XSignatureView',
|
|
176
|
-
component: XSignatureView,
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
path: '/Component/XReportGridView',
|
|
180
|
-
name: 'XReportGridView',
|
|
181
|
-
component: XReportGridView,
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
path: '/Component/XReport',
|
|
185
|
-
name: 'XReport',
|
|
186
|
-
component: XReport,
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
path: '/GridView',
|
|
190
|
-
name: 'GridView',
|
|
191
|
-
component: GridView,
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
path: '/Component/XRequestView',
|
|
195
|
-
name: 'XRequestView',
|
|
196
|
-
component: XRequestView,
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
path: '/Component/IconifyView',
|
|
200
|
-
name: 'IconifyView',
|
|
201
|
-
component: IconifyView,
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
path: '/Component/UserDetailView',
|
|
205
|
-
name: 'UserDetailView',
|
|
206
|
-
component: UserDetailView,
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
path: '/Component/UserDetail/:userInfoId',
|
|
210
|
-
name: 'UserDetailRoute',
|
|
211
|
-
component: UserDetailPage,
|
|
212
|
-
meta: { title: '用户详情' },
|
|
213
|
-
},
|
|
214
|
-
],
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
// 用户记录相关路由
|
|
218
|
-
{
|
|
219
|
-
path: '/OperateRecords',
|
|
220
|
-
name: 'OperateRecords',
|
|
221
|
-
component: OperateRecords,
|
|
222
|
-
meta: {
|
|
223
|
-
title: '操作记录',
|
|
224
|
-
keepAlive: false,
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
path: '/PaymentRecords',
|
|
229
|
-
name: 'PaymentRecords',
|
|
230
|
-
component: PaymentRecords,
|
|
231
|
-
meta: {
|
|
232
|
-
title: '缴费记录',
|
|
233
|
-
keepAlive: false,
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
path: '/MeterRecords',
|
|
238
|
-
name: 'MeterRecords',
|
|
239
|
-
component: MeterRecords,
|
|
240
|
-
meta: {
|
|
241
|
-
title: '抄表记录',
|
|
242
|
-
keepAlive: false,
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
path: '/TransferRecords',
|
|
247
|
-
name: 'TransferRecords',
|
|
248
|
-
component: TransferRecords,
|
|
249
|
-
meta: {
|
|
250
|
-
title: '过户记录',
|
|
251
|
-
keepAlive: false,
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
path: '/SafetyRecords',
|
|
256
|
-
name: 'SafetyRecords',
|
|
257
|
-
component: SafetyRecords,
|
|
258
|
-
meta: {
|
|
259
|
-
title: '安检记录',
|
|
260
|
-
keepAlive: false,
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
path: '/ReplacementRecords',
|
|
265
|
-
name: 'ReplacementRecords',
|
|
266
|
-
component: ReplacementRecords,
|
|
267
|
-
meta: {
|
|
268
|
-
title: '换表记录',
|
|
269
|
-
keepAlive: false,
|
|
270
|
-
},
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
path: '/OtherChargeRecords',
|
|
274
|
-
name: 'OtherChargeRecords',
|
|
275
|
-
component: OtherChargeRecords,
|
|
276
|
-
meta: {
|
|
277
|
-
title: '其他收费记录',
|
|
278
|
-
keepAlive: false,
|
|
279
|
-
},
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
path: '/TransactionRecords',
|
|
283
|
-
name: 'TransactionRecords',
|
|
284
|
-
component: TransactionRecords,
|
|
285
|
-
meta: {
|
|
286
|
-
title: '流水记录',
|
|
287
|
-
keepAlive: false,
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
path: '/AbnormalAlarmRecords',
|
|
292
|
-
name: 'AbnormalAlarmRecords',
|
|
293
|
-
component: AbnormalAlarmRecords,
|
|
294
|
-
meta: {
|
|
295
|
-
title: '异常报警记录',
|
|
296
|
-
keepAlive: false,
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
path: '/CardReplacementRecords',
|
|
301
|
-
name: 'CardReplacementRecords',
|
|
302
|
-
component: CardReplacementRecords,
|
|
303
|
-
meta: {
|
|
304
|
-
title: '补卡记录',
|
|
305
|
-
keepAlive: false,
|
|
306
|
-
},
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
path: '/ChangeRecords',
|
|
310
|
-
name: 'ChangeRecords',
|
|
311
|
-
component: ChangeRecords,
|
|
312
|
-
meta: {
|
|
313
|
-
title: '变更记录',
|
|
314
|
-
keepAlive: false,
|
|
315
|
-
},
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
path: '/CommandViewRecords',
|
|
319
|
-
name: 'CommandViewRecords',
|
|
320
|
-
component: CommandViewRecords,
|
|
321
|
-
meta: {
|
|
322
|
-
title: '指令查看记录',
|
|
323
|
-
keepAlive: false,
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
path: '/GasCompensationRecords',
|
|
328
|
-
name: 'GasCompensationRecords',
|
|
329
|
-
component: GasCompensationRecords,
|
|
330
|
-
meta: {
|
|
331
|
-
title: '补气记录',
|
|
332
|
-
keepAlive: false,
|
|
333
|
-
},
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
path: '/InstrumentCollectionRecords',
|
|
337
|
-
name: 'InstrumentCollectionRecords',
|
|
338
|
-
component: InstrumentCollectionRecords,
|
|
339
|
-
meta: {
|
|
340
|
-
title: '表具采集记录',
|
|
341
|
-
keepAlive: false,
|
|
342
|
-
},
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
path: '/PriceAdjustmentRecords',
|
|
346
|
-
name: 'PriceAdjustmentRecords',
|
|
347
|
-
component: PriceAdjustmentRecords,
|
|
348
|
-
meta: {
|
|
349
|
-
title: '价格调整记录',
|
|
350
|
-
keepAlive: false,
|
|
351
|
-
},
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
path: '/login',
|
|
355
|
-
name: 'login',
|
|
356
|
-
component: login,
|
|
357
|
-
meta: {
|
|
358
|
-
requiresAuth: false,
|
|
359
|
-
allowExternalUser: true,
|
|
360
|
-
title: '用户登录',
|
|
361
|
-
},
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
path: '/loading',
|
|
365
|
-
name: 'AuthLoading',
|
|
366
|
-
component: AuthLoading,
|
|
367
|
-
meta: {
|
|
368
|
-
requiresAuth: false,
|
|
369
|
-
allowExternalUser: true,
|
|
370
|
-
title: '正在登录中...',
|
|
371
|
-
},
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
{
|
|
375
|
-
path: '/user/my',
|
|
376
|
-
name: 'userProfile',
|
|
377
|
-
component: my,
|
|
378
|
-
meta: {
|
|
379
|
-
requiresAuth: true,
|
|
380
|
-
allowExternalUser: false,
|
|
381
|
-
title: '个人中心',
|
|
382
|
-
},
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
path: '/register/:strategyId?/:openId?',
|
|
386
|
-
name: 'register',
|
|
387
|
-
component: register,
|
|
388
|
-
meta: {
|
|
389
|
-
requiresAuth: false,
|
|
390
|
-
allowExternalUser: true,
|
|
391
|
-
title: '用户注册',
|
|
392
|
-
},
|
|
393
|
-
},
|
|
394
|
-
...externalUserRoutes,
|
|
395
|
-
{
|
|
396
|
-
path: '/403',
|
|
397
|
-
name: '403',
|
|
398
|
-
component: Forbidden,
|
|
399
|
-
meta: {
|
|
400
|
-
requiresAuth: false,
|
|
401
|
-
allowExternalUser: true,
|
|
402
|
-
title: '禁止访问',
|
|
403
|
-
},
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
path: '/404',
|
|
407
|
-
name: '404',
|
|
408
|
-
component: NotFound,
|
|
409
|
-
meta: {
|
|
410
|
-
requiresAuth: false,
|
|
411
|
-
allowExternalUser: true,
|
|
412
|
-
title: '页面未找到',
|
|
413
|
-
},
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
path: '/:pathMatch(.*)',
|
|
417
|
-
redirect: {
|
|
418
|
-
name: '404',
|
|
419
|
-
},
|
|
420
|
-
meta: {
|
|
421
|
-
requiresAuth: false,
|
|
422
|
-
allowExternalUser: true,
|
|
423
|
-
},
|
|
424
|
-
},
|
|
425
|
-
]
|
|
426
|
-
|
|
427
|
-
export default routes
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
2
|
+
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
3
|
+
import XReport from '@af-mobile-client-vue3/components/data/XReportGrid/XReport.vue'
|
|
4
|
+
import GridView from '@af-mobile-client-vue3/layout/GridView/index.vue'
|
|
5
|
+
import { ACCESS_TOKEN, PLATFORM_TYPE, USER_TYPE } from '@af-mobile-client-vue3/stores/mutation-type'
|
|
6
|
+
import { getPlatformRoutePrefix } from '@af-mobile-client-vue3/types/platform'
|
|
7
|
+
import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
|
|
8
|
+
import Forbidden from '@af-mobile-client-vue3/views/common/Forbidden.vue'
|
|
9
|
+
import NotFound from '@af-mobile-client-vue3/views/common/NotFound.vue'
|
|
10
|
+
import EvaluateRecordView from '@af-mobile-client-vue3/views/component/EvaluateRecordView/index.vue'
|
|
11
|
+
import IconifyView from '@af-mobile-client-vue3/views/component/IconifyView/index.vue'
|
|
12
|
+
import ComponentView from '@af-mobile-client-vue3/views/component/index.vue'
|
|
13
|
+
import OtherChargeForm from '@af-mobile-client-vue3/views/component/OtherCharge/index.vue'
|
|
14
|
+
import UserDetailView from '@af-mobile-client-vue3/views/component/UserDetailView/index.vue'
|
|
15
|
+
import UserDetailPage from '@af-mobile-client-vue3/views/component/UserDetailView/UserDetailPage.vue'
|
|
16
|
+
import XCellDetailView from '@af-mobile-client-vue3/views/component/XCellDetailView/index.vue'
|
|
17
|
+
import XCellListView from '@af-mobile-client-vue3/views/component/XCellListView/index.vue'
|
|
18
|
+
import XFormAppraiseView from '@af-mobile-client-vue3/views/component/XFormAppraiseView/index.vue'
|
|
19
|
+
import XFormGroupView from '@af-mobile-client-vue3/views/component/XFormGroupView/index.vue'
|
|
20
|
+
import XFormView from '@af-mobile-client-vue3/views/component/XFormView/index.vue'
|
|
21
|
+
import XOlMapView from '@af-mobile-client-vue3/views/component/XOlMapView/index.vue'
|
|
22
|
+
import XLocationPicker from '@af-mobile-client-vue3/views/component/XOlMapView/XLocationPicker/index.vue'
|
|
23
|
+
import XReportFormIframeView from '@af-mobile-client-vue3/views/component/XReportFormIframeView/index.vue'
|
|
24
|
+
import XReportFormView from '@af-mobile-client-vue3/views/component/XReportFormView/index.vue'
|
|
25
|
+
import XReportGridView from '@af-mobile-client-vue3/views/component/XReportGridView/index.vue'
|
|
26
|
+
import XRequestView from '@af-mobile-client-vue3/views/component/XRequestView/index.vue'
|
|
27
|
+
import XSignatureView from '@af-mobile-client-vue3/views/component/XSignatureView/index.vue'
|
|
28
|
+
import AuthLoading from '@af-mobile-client-vue3/views/loading/AuthLoading.vue'
|
|
29
|
+
import login from '@af-mobile-client-vue3/views/user/login/index.vue'
|
|
30
|
+
import my from '@af-mobile-client-vue3/views/user/my/index.vue'
|
|
31
|
+
import register from '@af-mobile-client-vue3/views/user/register/index.vue'
|
|
32
|
+
import AbnormalAlarmRecords from '@af-mobile-client-vue3/views/userRecords/AbnormalAlarmRecords.vue'
|
|
33
|
+
import CardReplacementRecords from '@af-mobile-client-vue3/views/userRecords/CardReplacementRecords.vue'
|
|
34
|
+
import ChangeRecords from '@af-mobile-client-vue3/views/userRecords/ChangeRecords.vue'
|
|
35
|
+
import CommandViewRecords from '@af-mobile-client-vue3/views/userRecords/CommandViewRecords.vue'
|
|
36
|
+
import GasCompensationRecords from '@af-mobile-client-vue3/views/userRecords/GasCompensationRecords.vue'
|
|
37
|
+
import InstrumentCollectionRecords from '@af-mobile-client-vue3/views/userRecords/InstrumentCollectionRecords.vue'
|
|
38
|
+
import MeterRecords from '@af-mobile-client-vue3/views/userRecords/MeterRecords.vue'
|
|
39
|
+
import OperateRecords from '@af-mobile-client-vue3/views/userRecords/OperateRecords.vue'
|
|
40
|
+
import OtherChargeRecords from '@af-mobile-client-vue3/views/userRecords/OtherChargeRecords.vue'
|
|
41
|
+
import PaymentRecords from '@af-mobile-client-vue3/views/userRecords/PaymentRecords.vue'
|
|
42
|
+
import PriceAdjustmentRecords from '@af-mobile-client-vue3/views/userRecords/PriceAdjustmentRecords.vue'
|
|
43
|
+
import ReplacementRecords from '@af-mobile-client-vue3/views/userRecords/ReplacementRecords.vue'
|
|
44
|
+
import SafetyRecords from '@af-mobile-client-vue3/views/userRecords/SafetyRecords.vue'
|
|
45
|
+
import TransactionRecords from '@af-mobile-client-vue3/views/userRecords/TransactionRecords.vue'
|
|
46
|
+
import TransferRecords from '@af-mobile-client-vue3/views/userRecords/TransferRecords.vue'
|
|
47
|
+
import externalUserRoutes from './external-routes'
|
|
48
|
+
|
|
49
|
+
const routes: Array<RouteRecordRaw> = [
|
|
50
|
+
{
|
|
51
|
+
path: '/',
|
|
52
|
+
name: 'root',
|
|
53
|
+
redirect: () => {
|
|
54
|
+
// 动态重定向逻辑:根据用户类型决定重定向目标
|
|
55
|
+
// 直接从 localStorage 获取数据,避免 Pinia 初始化时序问题
|
|
56
|
+
const Storage = createStorage({ storage: localStorage })
|
|
57
|
+
const token = Storage.get(ACCESS_TOKEN, '')
|
|
58
|
+
const userType = Storage.get(USER_TYPE, null)
|
|
59
|
+
const platformType = Storage.get(PLATFORM_TYPE, null)
|
|
60
|
+
|
|
61
|
+
if (token && userType === 'EXTERNAL') {
|
|
62
|
+
// 外部用户:尝试获取平台路由前缀
|
|
63
|
+
const platformPrefix = getPlatformRoutePrefix(platformType)
|
|
64
|
+
|
|
65
|
+
if (platformPrefix && platformPrefix !== '/ex/') {
|
|
66
|
+
return platformPrefix
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// 默认重定向到 Component(系统用户或未登录用户)
|
|
70
|
+
return { name: 'Component' }
|
|
71
|
+
},
|
|
72
|
+
children: [
|
|
73
|
+
{
|
|
74
|
+
path: '/XReportFormIframeView',
|
|
75
|
+
name: 'XReportFormIframeView',
|
|
76
|
+
component: XReportFormIframeView,
|
|
77
|
+
meta: {
|
|
78
|
+
requiresAuth: true,
|
|
79
|
+
allowExternalUser: false,
|
|
80
|
+
title: '表单iframe视图',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
path: '/Components/XForm',
|
|
85
|
+
name: 'XForm',
|
|
86
|
+
component: XForm,
|
|
87
|
+
props: route => ({
|
|
88
|
+
groupFormItems: JSON.parse(decodeURIComponent(route.query.groupFormItems as string)),
|
|
89
|
+
serviceName: route.query.serviceName,
|
|
90
|
+
formData: JSON.parse(decodeURIComponent(route.query.formData as string)),
|
|
91
|
+
mode: route.query.mode,
|
|
92
|
+
}),
|
|
93
|
+
meta: {
|
|
94
|
+
requiresAuth: true,
|
|
95
|
+
allowExternalUser: false,
|
|
96
|
+
title: '新增/修改表单',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
path: '/Component',
|
|
103
|
+
name: 'Component',
|
|
104
|
+
redirect: { name: 'ComponentView' },
|
|
105
|
+
children: [
|
|
106
|
+
{
|
|
107
|
+
path: '/Component/main',
|
|
108
|
+
name: 'ComponentView',
|
|
109
|
+
component: ComponentView,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
path: '/Component/XCellListView',
|
|
113
|
+
name: 'XCellListView',
|
|
114
|
+
component: XCellListView,
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
path: '/Component/XCellDetailView/:id',
|
|
118
|
+
name: 'XCellDetailView',
|
|
119
|
+
component: XCellDetailView,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
path: '/Component/XFormGroupView',
|
|
123
|
+
name: 'XFormGroupView',
|
|
124
|
+
component: XFormGroupView,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
path: '/Component/XReportFormView',
|
|
128
|
+
name: 'XReportFormView',
|
|
129
|
+
component: XReportFormView,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
path: '/Component/XOlMapView',
|
|
133
|
+
name: 'XOlMapView',
|
|
134
|
+
component: XOlMapView,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
path: '/Component/XOlMapView/XLocationPicker',
|
|
138
|
+
name: 'XLocationPicker',
|
|
139
|
+
component: XLocationPicker,
|
|
140
|
+
},
|
|
141
|
+
// {
|
|
142
|
+
// path: '/Components/XForm',
|
|
143
|
+
// name: 'XForm',
|
|
144
|
+
// component: XForm,
|
|
145
|
+
// props: route => ({
|
|
146
|
+
// groupFormItems: JSON.parse(decodeURIComponent(route.query.groupFormItems as string)),
|
|
147
|
+
// serviceName: route.query.serviceName,
|
|
148
|
+
// formData: JSON.parse(decodeURIComponent(route.query.formData as string)),
|
|
149
|
+
// mode: route.query.mode,
|
|
150
|
+
// }),
|
|
151
|
+
// meta:{ title: '新增/修改表单' }
|
|
152
|
+
// },
|
|
153
|
+
{
|
|
154
|
+
path: '/Component/XFormAppraiseView/:id/:openid',
|
|
155
|
+
name: 'XFormAppraiseView',
|
|
156
|
+
component: XFormAppraiseView,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
path: '/Component/XFormView',
|
|
160
|
+
name: 'XFormView',
|
|
161
|
+
component: XFormView,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
path: '/Component/OtherCharge',
|
|
165
|
+
name: 'OtherChargeForm',
|
|
166
|
+
component: OtherChargeForm,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
path: '/Component/EvaluateRecordView',
|
|
170
|
+
name: 'EvaluateRecordView',
|
|
171
|
+
component: EvaluateRecordView,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
path: '/Component/XSignatureView',
|
|
175
|
+
name: 'XSignatureView',
|
|
176
|
+
component: XSignatureView,
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
path: '/Component/XReportGridView',
|
|
180
|
+
name: 'XReportGridView',
|
|
181
|
+
component: XReportGridView,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
path: '/Component/XReport',
|
|
185
|
+
name: 'XReport',
|
|
186
|
+
component: XReport,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
path: '/GridView',
|
|
190
|
+
name: 'GridView',
|
|
191
|
+
component: GridView,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
path: '/Component/XRequestView',
|
|
195
|
+
name: 'XRequestView',
|
|
196
|
+
component: XRequestView,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
path: '/Component/IconifyView',
|
|
200
|
+
name: 'IconifyView',
|
|
201
|
+
component: IconifyView,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
path: '/Component/UserDetailView',
|
|
205
|
+
name: 'UserDetailView',
|
|
206
|
+
component: UserDetailView,
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
path: '/Component/UserDetail/:userInfoId',
|
|
210
|
+
name: 'UserDetailRoute',
|
|
211
|
+
component: UserDetailPage,
|
|
212
|
+
meta: { title: '用户详情' },
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
// 用户记录相关路由
|
|
218
|
+
{
|
|
219
|
+
path: '/OperateRecords',
|
|
220
|
+
name: 'OperateRecords',
|
|
221
|
+
component: OperateRecords,
|
|
222
|
+
meta: {
|
|
223
|
+
title: '操作记录',
|
|
224
|
+
keepAlive: false,
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
path: '/PaymentRecords',
|
|
229
|
+
name: 'PaymentRecords',
|
|
230
|
+
component: PaymentRecords,
|
|
231
|
+
meta: {
|
|
232
|
+
title: '缴费记录',
|
|
233
|
+
keepAlive: false,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
path: '/MeterRecords',
|
|
238
|
+
name: 'MeterRecords',
|
|
239
|
+
component: MeterRecords,
|
|
240
|
+
meta: {
|
|
241
|
+
title: '抄表记录',
|
|
242
|
+
keepAlive: false,
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
path: '/TransferRecords',
|
|
247
|
+
name: 'TransferRecords',
|
|
248
|
+
component: TransferRecords,
|
|
249
|
+
meta: {
|
|
250
|
+
title: '过户记录',
|
|
251
|
+
keepAlive: false,
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
path: '/SafetyRecords',
|
|
256
|
+
name: 'SafetyRecords',
|
|
257
|
+
component: SafetyRecords,
|
|
258
|
+
meta: {
|
|
259
|
+
title: '安检记录',
|
|
260
|
+
keepAlive: false,
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
path: '/ReplacementRecords',
|
|
265
|
+
name: 'ReplacementRecords',
|
|
266
|
+
component: ReplacementRecords,
|
|
267
|
+
meta: {
|
|
268
|
+
title: '换表记录',
|
|
269
|
+
keepAlive: false,
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
path: '/OtherChargeRecords',
|
|
274
|
+
name: 'OtherChargeRecords',
|
|
275
|
+
component: OtherChargeRecords,
|
|
276
|
+
meta: {
|
|
277
|
+
title: '其他收费记录',
|
|
278
|
+
keepAlive: false,
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
path: '/TransactionRecords',
|
|
283
|
+
name: 'TransactionRecords',
|
|
284
|
+
component: TransactionRecords,
|
|
285
|
+
meta: {
|
|
286
|
+
title: '流水记录',
|
|
287
|
+
keepAlive: false,
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
path: '/AbnormalAlarmRecords',
|
|
292
|
+
name: 'AbnormalAlarmRecords',
|
|
293
|
+
component: AbnormalAlarmRecords,
|
|
294
|
+
meta: {
|
|
295
|
+
title: '异常报警记录',
|
|
296
|
+
keepAlive: false,
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
path: '/CardReplacementRecords',
|
|
301
|
+
name: 'CardReplacementRecords',
|
|
302
|
+
component: CardReplacementRecords,
|
|
303
|
+
meta: {
|
|
304
|
+
title: '补卡记录',
|
|
305
|
+
keepAlive: false,
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
path: '/ChangeRecords',
|
|
310
|
+
name: 'ChangeRecords',
|
|
311
|
+
component: ChangeRecords,
|
|
312
|
+
meta: {
|
|
313
|
+
title: '变更记录',
|
|
314
|
+
keepAlive: false,
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
path: '/CommandViewRecords',
|
|
319
|
+
name: 'CommandViewRecords',
|
|
320
|
+
component: CommandViewRecords,
|
|
321
|
+
meta: {
|
|
322
|
+
title: '指令查看记录',
|
|
323
|
+
keepAlive: false,
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
path: '/GasCompensationRecords',
|
|
328
|
+
name: 'GasCompensationRecords',
|
|
329
|
+
component: GasCompensationRecords,
|
|
330
|
+
meta: {
|
|
331
|
+
title: '补气记录',
|
|
332
|
+
keepAlive: false,
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
path: '/InstrumentCollectionRecords',
|
|
337
|
+
name: 'InstrumentCollectionRecords',
|
|
338
|
+
component: InstrumentCollectionRecords,
|
|
339
|
+
meta: {
|
|
340
|
+
title: '表具采集记录',
|
|
341
|
+
keepAlive: false,
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
path: '/PriceAdjustmentRecords',
|
|
346
|
+
name: 'PriceAdjustmentRecords',
|
|
347
|
+
component: PriceAdjustmentRecords,
|
|
348
|
+
meta: {
|
|
349
|
+
title: '价格调整记录',
|
|
350
|
+
keepAlive: false,
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
path: '/login',
|
|
355
|
+
name: 'login',
|
|
356
|
+
component: login,
|
|
357
|
+
meta: {
|
|
358
|
+
requiresAuth: false,
|
|
359
|
+
allowExternalUser: true,
|
|
360
|
+
title: '用户登录',
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
path: '/loading',
|
|
365
|
+
name: 'AuthLoading',
|
|
366
|
+
component: AuthLoading,
|
|
367
|
+
meta: {
|
|
368
|
+
requiresAuth: false,
|
|
369
|
+
allowExternalUser: true,
|
|
370
|
+
title: '正在登录中...',
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
|
|
374
|
+
{
|
|
375
|
+
path: '/user/my',
|
|
376
|
+
name: 'userProfile',
|
|
377
|
+
component: my,
|
|
378
|
+
meta: {
|
|
379
|
+
requiresAuth: true,
|
|
380
|
+
allowExternalUser: false,
|
|
381
|
+
title: '个人中心',
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
path: '/register/:strategyId?/:openId?',
|
|
386
|
+
name: 'register',
|
|
387
|
+
component: register,
|
|
388
|
+
meta: {
|
|
389
|
+
requiresAuth: false,
|
|
390
|
+
allowExternalUser: true,
|
|
391
|
+
title: '用户注册',
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
...externalUserRoutes,
|
|
395
|
+
{
|
|
396
|
+
path: '/403',
|
|
397
|
+
name: '403',
|
|
398
|
+
component: Forbidden,
|
|
399
|
+
meta: {
|
|
400
|
+
requiresAuth: false,
|
|
401
|
+
allowExternalUser: true,
|
|
402
|
+
title: '禁止访问',
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
path: '/404',
|
|
407
|
+
name: '404',
|
|
408
|
+
component: NotFound,
|
|
409
|
+
meta: {
|
|
410
|
+
requiresAuth: false,
|
|
411
|
+
allowExternalUser: true,
|
|
412
|
+
title: '页面未找到',
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
path: '/:pathMatch(.*)',
|
|
417
|
+
redirect: {
|
|
418
|
+
name: '404',
|
|
419
|
+
},
|
|
420
|
+
meta: {
|
|
421
|
+
requiresAuth: false,
|
|
422
|
+
allowExternalUser: true,
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
]
|
|
426
|
+
|
|
427
|
+
export default routes
|