af-mobile-client-vue3 1.3.34 → 1.3.35

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.
@@ -1,11 +1,14 @@
1
1
  {
2
+ "$schema": "https://json.schemastore.org/claude-code-settings.json",
2
3
  "permissions": {
3
4
  "allow": [
5
+ "Bash(rm:*)",
4
6
  "Bash(pnpm typecheck:*)",
5
7
  "Bash(pnpm lint:*)",
6
- "mcp__ide__getDiagnostics",
7
- "WebFetch(domain:github.com)"
8
+ "Bash(pnpm build:*)",
9
+ "Bash(timeout 10s pnpm dev)",
10
+ "Bash(true)"
8
11
  ],
9
12
  "deny": []
10
13
  }
11
- }
14
+ }
@@ -11,7 +11,7 @@ export default defineMock([{
11
11
  }
12
12
  },
13
13
  }, {
14
- url: '/api/af-auth/login',
14
+ url: '/api/af-auth/lo1gin',
15
15
  delay: 5000,
16
16
  body: () => {
17
17
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.3.34",
4
+ "version": "1.3.35",
5
5
  "packageManager": "pnpm@10.13.1",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -21,7 +21,7 @@ export const defaultRecordEntries: RecordEntry[] = [
21
21
  textColor: 'text-gray-500',
22
22
  dateLabel: '操作记录',
23
23
  route: 'OperateRecords',
24
- path: '/userRecords/operateRecords',
24
+ path: '/operateRecords',
25
25
  forMeterTypes: ['气量卡表', '金额卡表', '物联网表', '机表'],
26
26
  },
27
27
  {
@@ -32,7 +32,7 @@ export const defaultRecordEntries: RecordEntry[] = [
32
32
  textColor: 'text-blue-500',
33
33
  dateLabel: '缴费',
34
34
  route: 'PaymentRecords',
35
- path: '/userRecords/payment',
35
+ path: '/payment',
36
36
  forMeterTypes: ['气量卡表', '金额卡表', '物联网表', '机表'],
37
37
  },
38
38
  {
@@ -43,7 +43,7 @@ export const defaultRecordEntries: RecordEntry[] = [
43
43
  textColor: 'text-green-500',
44
44
  dateLabel: '抄表',
45
45
  route: 'MeterRecords',
46
- path: '/userRecords/meter',
46
+ path: '/meter',
47
47
  forMeterTypes: ['物联网表', '机表'],
48
48
  },
49
49
  {
@@ -54,7 +54,7 @@ export const defaultRecordEntries: RecordEntry[] = [
54
54
  textColor: 'text-purple-500',
55
55
  dateLabel: '过户',
56
56
  route: 'TransferRecords',
57
- path: '/userRecords/transfer',
57
+ path: '/transfer',
58
58
  forMeterTypes: ['气量卡表', '金额卡表', '物联网表', '机表'],
59
59
  },
60
60
  {
@@ -65,7 +65,7 @@ export const defaultRecordEntries: RecordEntry[] = [
65
65
  textColor: 'text-orange-500',
66
66
  dateLabel: '换表',
67
67
  route: 'ReplacementRecords',
68
- path: '/userRecords/replacement',
68
+ path: '/replacement',
69
69
  forMeterTypes: ['气量卡表', '金额卡表', '物联网表', '机表'],
70
70
  },
71
71
  {
@@ -76,7 +76,7 @@ export const defaultRecordEntries: RecordEntry[] = [
76
76
  textColor: 'text-indigo-500',
77
77
  dateLabel: '其他收费',
78
78
  route: 'OtherChargeRecords',
79
- path: '/userRecords/otherCharge',
79
+ path: '/otherCharge',
80
80
  forMeterTypes: ['气量卡表', '金额卡表', '物联网表', '机表'],
81
81
  },
82
82
  {
@@ -87,7 +87,7 @@ export const defaultRecordEntries: RecordEntry[] = [
87
87
  textColor: 'text-red-500',
88
88
  dateLabel: '异常报警',
89
89
  route: 'AbnormalAlarmRecords',
90
- path: '/userRecords/abnormalAlarm',
90
+ path: '/abnormalAlarm',
91
91
  forMeterTypes: ['物联网表', '机表'],
92
92
  },
93
93
  {
@@ -98,7 +98,7 @@ export const defaultRecordEntries: RecordEntry[] = [
98
98
  textColor: 'text-orange-500',
99
99
  dateLabel: '补卡',
100
100
  route: 'CardReplacementRecords',
101
- path: '/userRecords/cardReplacement',
101
+ path: '/cardReplacement',
102
102
  forMeterTypes: ['气量卡表', '金额卡表', '机表'],
103
103
  },
104
104
  {
@@ -109,7 +109,7 @@ export const defaultRecordEntries: RecordEntry[] = [
109
109
  textColor: 'text-purple-500',
110
110
  dateLabel: '变更',
111
111
  route: 'ChangeRecords',
112
- path: '/userRecords/change',
112
+ path: '/change',
113
113
  forMeterTypes: ['气量卡表', '金额卡表', '物联网表', '机表'],
114
114
  },
115
115
  {
@@ -120,7 +120,7 @@ export const defaultRecordEntries: RecordEntry[] = [
120
120
  textColor: 'text-blue-500',
121
121
  dateLabel: '指令查看',
122
122
  route: 'CommandViewRecords',
123
- path: '/userRecords/commandView',
123
+ path: '/commandView',
124
124
  forMeterTypes: ['物联网表', '机表'],
125
125
  },
126
126
  {
@@ -131,7 +131,7 @@ export const defaultRecordEntries: RecordEntry[] = [
131
131
  textColor: 'text-green-500',
132
132
  dateLabel: '流水',
133
133
  route: 'GasCompensationRecords',
134
- path: '/userRecords/gasCompensation',
134
+ path: '/gasCompensation',
135
135
  forMeterTypes: ['气量卡表', '金额卡表', '物联网表', '机表'],
136
136
  },
137
137
  {
@@ -142,7 +142,7 @@ export const defaultRecordEntries: RecordEntry[] = [
142
142
  textColor: 'text-gray-500',
143
143
  dateLabel: '表具采集',
144
144
  route: 'InstrumentCollectionRecords',
145
- path: '/userRecords/instrumentCollection',
145
+ path: '/instrumentCollection',
146
146
  forMeterTypes: ['物联网表', '机表'],
147
147
  },
148
148
  {
@@ -153,7 +153,7 @@ export const defaultRecordEntries: RecordEntry[] = [
153
153
  textColor: 'text-red-500',
154
154
  dateLabel: '价格调整',
155
155
  route: 'PriceAdjustmentRecords',
156
- path: '/userRecords/priceAdjustment',
156
+ path: '/priceAdjustment',
157
157
  forMeterTypes: ['气量卡表', '金额卡表', '物联网表', '机表'],
158
158
  },
159
159
  ]
@@ -882,6 +882,7 @@ function findOptionInTree(options, value) {
882
882
  <VanField
883
883
  v-if="attr.type === 'radio' && mode !== '查询' && showItem"
884
884
  name="radio"
885
+ center
885
886
  :placeholder="attr.placeholder ? attr.placeholder : `请选择${attr.name}`"
886
887
  :label="labelData"
887
888
  :label-align="labelAlign"
@@ -207,147 +207,142 @@ const routes: Array<RouteRecordRaw> = [
207
207
  },
208
208
  ],
209
209
  },
210
+
211
+ // 用户记录相关路由
210
212
  {
211
- path: '/userRecords',
212
- name: 'userRecords',
213
- children: [
214
- // 用户记录相关路由
215
- {
216
- path: '/records',
217
- name: 'OperateRecords',
218
- component: OperateRecords,
219
- meta: {
220
- title: '操作记录',
221
- keepAlive: false,
222
- },
223
- },
224
- {
225
- path: '/payment',
226
- name: 'PaymentRecords',
227
- component: PaymentRecords,
228
- meta: {
229
- title: '缴费记录',
230
- keepAlive: false,
231
- },
232
- },
233
- {
234
- path: '/meter',
235
- name: 'MeterRecords',
236
- component: MeterRecords,
237
- meta: {
238
- title: '抄表记录',
239
- keepAlive: false,
240
- },
241
- },
242
- {
243
- path: '/transfer',
244
- name: 'TransferRecords',
245
- component: TransferRecords,
246
- meta: {
247
- title: '过户记录',
248
- keepAlive: false,
249
- },
250
- },
251
- {
252
- path: '/safety',
253
- name: 'SafetyRecords',
254
- component: SafetyRecords,
255
- meta: {
256
- title: '安检记录',
257
- keepAlive: false,
258
- },
259
- },
260
- {
261
- path: '/replacement',
262
- name: 'ReplacementRecords',
263
- component: ReplacementRecords,
264
- meta: {
265
- title: '换表记录',
266
- keepAlive: false,
267
- },
268
- },
269
- {
270
- path: '/otherCharge',
271
- name: 'OtherChargeRecords',
272
- component: OtherChargeRecords,
273
- meta: {
274
- title: '其他收费记录',
275
- keepAlive: false,
276
- },
277
- },
278
- {
279
- path: '/transaction',
280
- name: 'TransactionRecords',
281
- component: TransactionRecords,
282
- meta: {
283
- title: '流水记录',
284
- keepAlive: false,
285
- },
286
- },
287
- {
288
- path: '/abnormalAlarm',
289
- name: 'AbnormalAlarmRecords',
290
- component: AbnormalAlarmRecords,
291
- meta: {
292
- title: '异常报警记录',
293
- keepAlive: false,
294
- },
295
- },
296
- {
297
- path: '/cardReplacement',
298
- name: 'CardReplacementRecords',
299
- component: CardReplacementRecords,
300
- meta: {
301
- title: '补卡记录',
302
- keepAlive: false,
303
- },
304
- },
305
- {
306
- path: '/change',
307
- name: 'ChangeRecords',
308
- component: ChangeRecords,
309
- meta: {
310
- title: '变更记录',
311
- keepAlive: false,
312
- },
313
- },
314
- {
315
- path: '/commandView',
316
- name: 'CommandViewRecords',
317
- component: CommandViewRecords,
318
- meta: {
319
- title: '指令查看记录',
320
- keepAlive: false,
321
- },
322
- },
323
- {
324
- path: '/gasCompensation',
325
- name: 'GasCompensationRecords',
326
- component: GasCompensationRecords,
327
- meta: {
328
- title: '补气记录',
329
- keepAlive: false,
330
- },
331
- },
332
- {
333
- path: '/instrumentCollection',
334
- name: 'InstrumentCollectionRecords',
335
- component: InstrumentCollectionRecords,
336
- meta: {
337
- title: '表具采集记录',
338
- keepAlive: false,
339
- },
340
- },
341
- {
342
- path: '/priceAdjustment',
343
- name: 'PriceAdjustmentRecords',
344
- component: PriceAdjustmentRecords,
345
- meta: {
346
- title: '价格调整记录',
347
- keepAlive: false,
348
- },
349
- },
350
- ],
213
+ path: '/records',
214
+ name: 'OperateRecords',
215
+ component: OperateRecords,
216
+ meta: {
217
+ title: '操作记录',
218
+ keepAlive: false,
219
+ },
220
+ },
221
+ {
222
+ path: '/payment',
223
+ name: 'PaymentRecords',
224
+ component: PaymentRecords,
225
+ meta: {
226
+ title: '缴费记录',
227
+ keepAlive: false,
228
+ },
229
+ },
230
+ {
231
+ path: '/meter',
232
+ name: 'MeterRecords',
233
+ component: MeterRecords,
234
+ meta: {
235
+ title: '抄表记录',
236
+ keepAlive: false,
237
+ },
238
+ },
239
+ {
240
+ path: '/transfer',
241
+ name: 'TransferRecords',
242
+ component: TransferRecords,
243
+ meta: {
244
+ title: '过户记录',
245
+ keepAlive: false,
246
+ },
247
+ },
248
+ {
249
+ path: '/safety',
250
+ name: 'SafetyRecords',
251
+ component: SafetyRecords,
252
+ meta: {
253
+ title: '安检记录',
254
+ keepAlive: false,
255
+ },
256
+ },
257
+ {
258
+ path: '/replacement',
259
+ name: 'ReplacementRecords',
260
+ component: ReplacementRecords,
261
+ meta: {
262
+ title: '换表记录',
263
+ keepAlive: false,
264
+ },
265
+ },
266
+ {
267
+ path: '/otherCharge',
268
+ name: 'OtherChargeRecords',
269
+ component: OtherChargeRecords,
270
+ meta: {
271
+ title: '其他收费记录',
272
+ keepAlive: false,
273
+ },
274
+ },
275
+ {
276
+ path: '/transaction',
277
+ name: 'TransactionRecords',
278
+ component: TransactionRecords,
279
+ meta: {
280
+ title: '流水记录',
281
+ keepAlive: false,
282
+ },
283
+ },
284
+ {
285
+ path: '/abnormalAlarm',
286
+ name: 'AbnormalAlarmRecords',
287
+ component: AbnormalAlarmRecords,
288
+ meta: {
289
+ title: '异常报警记录',
290
+ keepAlive: false,
291
+ },
292
+ },
293
+ {
294
+ path: '/cardReplacement',
295
+ name: 'CardReplacementRecords',
296
+ component: CardReplacementRecords,
297
+ meta: {
298
+ title: '补卡记录',
299
+ keepAlive: false,
300
+ },
301
+ },
302
+ {
303
+ path: '/change',
304
+ name: 'ChangeRecords',
305
+ component: ChangeRecords,
306
+ meta: {
307
+ title: '变更记录',
308
+ keepAlive: false,
309
+ },
310
+ },
311
+ {
312
+ path: '/commandView',
313
+ name: 'CommandViewRecords',
314
+ component: CommandViewRecords,
315
+ meta: {
316
+ title: '指令查看记录',
317
+ keepAlive: false,
318
+ },
319
+ },
320
+ {
321
+ path: '/gasCompensation',
322
+ name: 'GasCompensationRecords',
323
+ component: GasCompensationRecords,
324
+ meta: {
325
+ title: '补气记录',
326
+ keepAlive: false,
327
+ },
328
+ },
329
+ {
330
+ path: '/instrumentCollection',
331
+ name: 'InstrumentCollectionRecords',
332
+ component: InstrumentCollectionRecords,
333
+ meta: {
334
+ title: '表具采集记录',
335
+ keepAlive: false,
336
+ },
337
+ },
338
+ {
339
+ path: '/priceAdjustment',
340
+ name: 'PriceAdjustmentRecords',
341
+ component: PriceAdjustmentRecords,
342
+ meta: {
343
+ title: '价格调整记录',
344
+ keepAlive: false,
345
+ },
351
346
  },
352
347
  {
353
348
  path: '/login',
@@ -70,7 +70,7 @@ class Http {
70
70
  }
71
71
  }
72
72
  else {
73
- if (code === 401) {
73
+ if (code === 401 && response.config.url?.indexOf('af-auth/logout') === -1) {
74
74
  showToast({
75
75
  message: '登录态已失效,请重新登录',
76
76
  position: 'bottom',
package/vite.config.ts CHANGED
@@ -30,11 +30,6 @@ export default ({ mode }: ConfigEnv): UserConfig => {
30
30
  '.aofengcloud.com',
31
31
  ],
32
32
  proxy: Object.assign({
33
- '/api/af-auth/login': {
34
- target: mockServer,
35
- ws: false,
36
- changeOrigin: true,
37
- },
38
33
  '/api/af-system/user': {
39
34
  target: 'http://127.0.0.1:9002/',
40
35
  rewrite: (path: string) => path.replace(/^\/api\/af-system\//, '/'),