af-mobile-client-vue3 1.3.1 → 1.3.2-2.1
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/CLAUDE.md +5 -0
- package/README.md +2 -1
- package/compress.js +36 -36
- package/package.json +114 -114
- package/postcss.config.ts +1 -1
- package/src/App.vue +1 -1
- package/src/components/core/NavBar/index.vue +1 -1
- package/src/components/core/XGridDropOption/index.vue +7 -9
- package/src/components/core/XMultiSelect/index.vue +1 -1
- package/src/components/data/CardContainer/CardContainer.vue +118 -0
- package/src/components/data/CardContainer/CardHeader.vue +99 -0
- package/src/components/data/InfoDisplay/index.vue +132 -0
- package/src/components/data/UserDetail/api.ts +24 -0
- package/src/components/data/UserDetail/index.vue +620 -0
- package/src/components/data/UserDetail/recordEntries.ts +159 -0
- package/src/components/data/UserDetail/types.ts +26 -0
- package/src/components/data/XCellList/index.vue +66 -20
- package/src/components/data/XForm/index.vue +1 -1
- package/src/components/data/XFormGroup/doc/README.md +33 -20
- package/src/components/data/XFormGroup/index.vue +42 -36
- package/src/components/data/XFormItem/index.vue +11 -11
- package/src/components/data/XOlMap/README.md +61 -61
- package/src/components/data/XOlMap/XLocationPicker/index.vue +2 -1
- package/src/components/data/XReportGrid/XAddReport/index.md +17 -16
- package/src/components/data/XReportGrid/index.md +14 -10
- package/src/components/data/XSignature/index.vue +1 -2
- package/src/font-style/font.css +1 -1
- package/src/hooks/useBoolean.ts +26 -0
- package/src/hooks/useLoading.ts +16 -0
- package/src/plugins/collectIcons.ts +10 -0
- package/src/router/README.md +1 -1
- package/src/router/guards.ts +1 -1
- package/src/router/index.ts +1 -1
- package/src/router/routes.ts +176 -0
- package/src/services/api/user.ts +17 -0
- package/src/stores/modules/setting.ts +2 -1
- package/src/styles/var.less +9 -0
- package/src/views/component/IconifyView/index.vue +0 -3
- package/src/views/component/UserDetailView/UserDetailPage.vue +77 -0
- package/src/views/component/UserDetailView/index.vue +234 -0
- package/src/views/component/XCellListView/index.vue +2 -2
- package/src/views/component/XOlMapView/testData.ts +1 -1
- package/src/views/component/index.vue +4 -0
- package/src/views/component/menu.vue +1 -1
- package/src/views/user/login/ForgetPasswordForm.vue +1 -1
- package/src/views/user/login/LoginForm.vue +4 -3
- package/src/views/user/login/LoginWave.vue +1 -1
- package/src/views/user/my/comm/ModifyPassword.vue +346 -0
- package/src/views/user/my/index.vue +440 -183
- package/src/views/user/register/index.vue +952 -0
- package/src/views/userRecords/AbnormalAlarmRecords.vue +21 -0
- package/src/views/userRecords/CardReplacementRecords.vue +21 -0
- package/src/views/userRecords/ChangeRecords.vue +19 -0
- package/src/views/userRecords/CommandViewRecords.vue +20 -0
- package/src/views/userRecords/GasCompensationRecords.vue +20 -0
- package/src/views/userRecords/InstrumentCollectionRecords.vue +21 -0
- package/src/views/userRecords/MeterRecords.vue +20 -0
- package/src/views/userRecords/OperateRecords.vue +51 -0
- package/src/views/userRecords/OtherChargeRecords.vue +19 -0
- package/src/views/userRecords/PaymentRecords.vue +28 -0
- package/src/views/userRecords/PriceAdjustmentRecords.vue +19 -0
- package/src/views/userRecords/ReplacementRecords.vue +19 -0
- package/src/views/userRecords/SafetyRecords.vue +19 -0
- package/src/views/userRecords/TransactionRecords.vue +21 -0
- package/src/views/userRecords/TransferRecords.vue +19 -0
- package/src/views/userRecords/operateRecordDetail/index.vue +316 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AddUserDetail.vue +124 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AdvanceDeliveryDetail.vue +88 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AutoAccountsCancelDetail.vue +205 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AutoAccountsDetail.vue +192 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BankDkDetail.vue +192 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BankPayDetail.vue +192 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BlacklistDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CancellationDetail.vue +101 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardMeterCenterCancelDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardMeterCenterDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardOverUserDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ChangeMeterCancelDetail.vue +166 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ChangeMeterDetail.vue +205 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/DisableManageDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/EnableManageDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/FaZheChangeDetail.vue +124 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/FeeDeductionDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/GasPriceChangeDetail.vue +126 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/InputtorChangeDetail.vue +126 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotMeterCenterCancelDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotMeterCenterDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotOpenDetail.vue +88 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineCardDetail.vue +101 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineMeterCenterCancelDetail.vue +218 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineMeterCenterDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OffGasAddGasDetail.vue +140 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OtherChargeCancelDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OtherChargeDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OverUserChangeDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReBillDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/RefundDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReplaceCardManageCancelDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReplaceCardManageDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/SaleCardGasDetail.vue +140 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/TransferManageCancelDetail.vue +152 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/TransferManageDetail.vue +178 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/UserChangeDetail.vue +123 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/WechatPayDetail.vue +192 -0
- package/src/views/userRecords/types.ts +66 -0
- package/uno.config.ts +5 -1
- package/vite.config.ts +9 -2
package/src/router/routes.ts
CHANGED
|
@@ -6,6 +6,8 @@ import NotFound from '@af-mobile-client-vue3/views/common/NotFound.vue'
|
|
|
6
6
|
import EvaluateRecordView from '@af-mobile-client-vue3/views/component/EvaluateRecordView/index.vue'
|
|
7
7
|
import IconifyView from '@af-mobile-client-vue3/views/component/IconifyView/index.vue'
|
|
8
8
|
import ComponentView from '@af-mobile-client-vue3/views/component/index.vue'
|
|
9
|
+
import UserDetailView from '@af-mobile-client-vue3/views/component/UserDetailView/index.vue'
|
|
10
|
+
import UserDetailPage from '@af-mobile-client-vue3/views/component/UserDetailView/UserDetailPage.vue'
|
|
9
11
|
import XCellDetailView from '@af-mobile-client-vue3/views/component/XCellDetailView/index.vue'
|
|
10
12
|
import XCellListView from '@af-mobile-client-vue3/views/component/XCellListView/index.vue'
|
|
11
13
|
import XFormAppraiseView from '@af-mobile-client-vue3/views/component/XFormAppraiseView/index.vue'
|
|
@@ -20,6 +22,22 @@ import XRequestView from '@af-mobile-client-vue3/views/component/XRequestView/in
|
|
|
20
22
|
import XSignatureView from '@af-mobile-client-vue3/views/component/XSignatureView/index.vue'
|
|
21
23
|
import login from '@af-mobile-client-vue3/views/user/login/index.vue'
|
|
22
24
|
import my from '@af-mobile-client-vue3/views/user/my/index.vue'
|
|
25
|
+
import register from '@af-mobile-client-vue3/views/user/register/index.vue'
|
|
26
|
+
import AbnormalAlarmRecords from '@af-mobile-client-vue3/views/userRecords/AbnormalAlarmRecords.vue'
|
|
27
|
+
import CardReplacementRecords from '@af-mobile-client-vue3/views/userRecords/CardReplacementRecords.vue'
|
|
28
|
+
import ChangeRecords from '@af-mobile-client-vue3/views/userRecords/ChangeRecords.vue'
|
|
29
|
+
import CommandViewRecords from '@af-mobile-client-vue3/views/userRecords/CommandViewRecords.vue'
|
|
30
|
+
import GasCompensationRecords from '@af-mobile-client-vue3/views/userRecords/GasCompensationRecords.vue'
|
|
31
|
+
import InstrumentCollectionRecords from '@af-mobile-client-vue3/views/userRecords/InstrumentCollectionRecords.vue'
|
|
32
|
+
import MeterRecords from '@af-mobile-client-vue3/views/userRecords/MeterRecords.vue'
|
|
33
|
+
import OperateRecords from '@af-mobile-client-vue3/views/userRecords/OperateRecords.vue'
|
|
34
|
+
import OtherChargeRecords from '@af-mobile-client-vue3/views/userRecords/OtherChargeRecords.vue'
|
|
35
|
+
import PaymentRecords from '@af-mobile-client-vue3/views/userRecords/PaymentRecords.vue'
|
|
36
|
+
import PriceAdjustmentRecords from '@af-mobile-client-vue3/views/userRecords/PriceAdjustmentRecords.vue'
|
|
37
|
+
import ReplacementRecords from '@af-mobile-client-vue3/views/userRecords/ReplacementRecords.vue'
|
|
38
|
+
import SafetyRecords from '@af-mobile-client-vue3/views/userRecords/SafetyRecords.vue'
|
|
39
|
+
import TransactionRecords from '@af-mobile-client-vue3/views/userRecords/TransactionRecords.vue'
|
|
40
|
+
import TransferRecords from '@af-mobile-client-vue3/views/userRecords/TransferRecords.vue'
|
|
23
41
|
|
|
24
42
|
const routes: Array<RouteRecordRaw> = [
|
|
25
43
|
{
|
|
@@ -143,6 +161,159 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
143
161
|
name: 'IconifyView',
|
|
144
162
|
component: IconifyView,
|
|
145
163
|
},
|
|
164
|
+
{
|
|
165
|
+
path: '/Component/UserDetailView',
|
|
166
|
+
name: 'UserDetailView',
|
|
167
|
+
component: UserDetailView,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
path: '/Component/UserDetail/:userInfoId',
|
|
171
|
+
name: 'UserDetailRoute',
|
|
172
|
+
component: UserDetailPage,
|
|
173
|
+
meta: { title: '用户详情' },
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
path: '/userRecords',
|
|
179
|
+
name: 'userRecords',
|
|
180
|
+
children: [
|
|
181
|
+
// 用户记录相关路由
|
|
182
|
+
{
|
|
183
|
+
path: '/records',
|
|
184
|
+
name: 'OperateRecords',
|
|
185
|
+
component: OperateRecords,
|
|
186
|
+
meta: {
|
|
187
|
+
title: '操作记录',
|
|
188
|
+
keepAlive: false,
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
path: '/payment',
|
|
193
|
+
name: 'PaymentRecords',
|
|
194
|
+
component: PaymentRecords,
|
|
195
|
+
meta: {
|
|
196
|
+
title: '缴费记录',
|
|
197
|
+
keepAlive: false,
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
path: '/meter',
|
|
202
|
+
name: 'MeterRecords',
|
|
203
|
+
component: MeterRecords,
|
|
204
|
+
meta: {
|
|
205
|
+
title: '抄表记录',
|
|
206
|
+
keepAlive: false,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
path: '/transfer',
|
|
211
|
+
name: 'TransferRecords',
|
|
212
|
+
component: TransferRecords,
|
|
213
|
+
meta: {
|
|
214
|
+
title: '过户记录',
|
|
215
|
+
keepAlive: false,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
path: '/safety',
|
|
220
|
+
name: 'SafetyRecords',
|
|
221
|
+
component: SafetyRecords,
|
|
222
|
+
meta: {
|
|
223
|
+
title: '安检记录',
|
|
224
|
+
keepAlive: false,
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
path: '/replacement',
|
|
229
|
+
name: 'ReplacementRecords',
|
|
230
|
+
component: ReplacementRecords,
|
|
231
|
+
meta: {
|
|
232
|
+
title: '换表记录',
|
|
233
|
+
keepAlive: false,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
path: '/otherCharge',
|
|
238
|
+
name: 'OtherChargeRecords',
|
|
239
|
+
component: OtherChargeRecords,
|
|
240
|
+
meta: {
|
|
241
|
+
title: '其他收费记录',
|
|
242
|
+
keepAlive: false,
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
path: '/transaction',
|
|
247
|
+
name: 'TransactionRecords',
|
|
248
|
+
component: TransactionRecords,
|
|
249
|
+
meta: {
|
|
250
|
+
title: '流水记录',
|
|
251
|
+
keepAlive: false,
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
path: '/abnormalAlarm',
|
|
256
|
+
name: 'AbnormalAlarmRecords',
|
|
257
|
+
component: AbnormalAlarmRecords,
|
|
258
|
+
meta: {
|
|
259
|
+
title: '异常报警记录',
|
|
260
|
+
keepAlive: false,
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
path: '/cardReplacement',
|
|
265
|
+
name: 'CardReplacementRecords',
|
|
266
|
+
component: CardReplacementRecords,
|
|
267
|
+
meta: {
|
|
268
|
+
title: '补卡记录',
|
|
269
|
+
keepAlive: false,
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
path: '/change',
|
|
274
|
+
name: 'ChangeRecords',
|
|
275
|
+
component: ChangeRecords,
|
|
276
|
+
meta: {
|
|
277
|
+
title: '变更记录',
|
|
278
|
+
keepAlive: false,
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
path: '/commandView',
|
|
283
|
+
name: 'CommandViewRecords',
|
|
284
|
+
component: CommandViewRecords,
|
|
285
|
+
meta: {
|
|
286
|
+
title: '指令查看记录',
|
|
287
|
+
keepAlive: false,
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
path: '/gasCompensation',
|
|
292
|
+
name: 'GasCompensationRecords',
|
|
293
|
+
component: GasCompensationRecords,
|
|
294
|
+
meta: {
|
|
295
|
+
title: '补气记录',
|
|
296
|
+
keepAlive: false,
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
path: '/instrumentCollection',
|
|
301
|
+
name: 'InstrumentCollectionRecords',
|
|
302
|
+
component: InstrumentCollectionRecords,
|
|
303
|
+
meta: {
|
|
304
|
+
title: '表具采集记录',
|
|
305
|
+
keepAlive: false,
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
path: '/priceAdjustment',
|
|
310
|
+
name: 'PriceAdjustmentRecords',
|
|
311
|
+
component: PriceAdjustmentRecords,
|
|
312
|
+
meta: {
|
|
313
|
+
title: '价格调整记录',
|
|
314
|
+
keepAlive: false,
|
|
315
|
+
},
|
|
316
|
+
},
|
|
146
317
|
],
|
|
147
318
|
},
|
|
148
319
|
{
|
|
@@ -155,6 +326,11 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
155
326
|
name: 'userProfile',
|
|
156
327
|
component: my,
|
|
157
328
|
},
|
|
329
|
+
{
|
|
330
|
+
path: '/register/:strategyId?/:openId?',
|
|
331
|
+
name: 'register',
|
|
332
|
+
component: register,
|
|
333
|
+
},
|
|
158
334
|
{
|
|
159
335
|
path: '/404',
|
|
160
336
|
name: '404',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { post } from '@af-mobile-client-vue3/services/restTools'
|
|
2
|
+
|
|
3
|
+
const userApi = {
|
|
4
|
+
// 修改密码
|
|
5
|
+
modifyPassword: '/af-system/user/modifypwd',
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 修改密码
|
|
10
|
+
* @param data 修改密码参数
|
|
11
|
+
* @returns Promise
|
|
12
|
+
*/
|
|
13
|
+
export function modifyPassword(data: any) {
|
|
14
|
+
return post(userApi.modifyPassword, JSON.stringify(data))
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { userApi }
|
|
@@ -10,7 +10,7 @@ export interface WebConfig {
|
|
|
10
10
|
systemName: string
|
|
11
11
|
routerName: string
|
|
12
12
|
systemDesc: string
|
|
13
|
-
homePage:
|
|
13
|
+
homePage: any
|
|
14
14
|
defaultAvatarUrl: string
|
|
15
15
|
wechatLogin: boolean
|
|
16
16
|
wxLoginAge: boolean
|
|
@@ -19,6 +19,7 @@ export interface WebConfig {
|
|
|
19
19
|
systemLogo: string
|
|
20
20
|
homeAppList: Array<any>
|
|
21
21
|
slideshowList: Array<any>
|
|
22
|
+
registerRequire: boolean
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// 存放 webConfig 中的 setting 配置
|
package/src/styles/var.less
CHANGED
|
@@ -14,3 +14,12 @@
|
|
|
14
14
|
--base-interval-1: 14px;
|
|
15
15
|
--base-interval-2: 28px;
|
|
16
16
|
}
|
|
17
|
+
// 全局弹出框样式覆盖 - 最强优先级
|
|
18
|
+
.van-popover,
|
|
19
|
+
.van-popover.van-popover--light,
|
|
20
|
+
.van-popover.van-popover--dark {
|
|
21
|
+
background-color: #ffffff !important;
|
|
22
|
+
border: none !important;
|
|
23
|
+
outline: none !important;
|
|
24
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
|
|
25
|
+
}
|
|
@@ -3,13 +3,10 @@ import { Icon } from '@iconify/vue'
|
|
|
3
3
|
import {
|
|
4
4
|
Cell as VanCell,
|
|
5
5
|
CellGroup as VanCellGroup,
|
|
6
|
-
Col as VanCol,
|
|
7
6
|
Divider as VanDivider,
|
|
8
|
-
Field as VanField,
|
|
9
7
|
Grid as VanGrid,
|
|
10
8
|
GridItem as VanGridItem,
|
|
11
9
|
NavBar as VanNavBar,
|
|
12
|
-
Row as VanRow,
|
|
13
10
|
Tab as VanTab,
|
|
14
11
|
Tabs as VanTabs,
|
|
15
12
|
} from 'vant'
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { RecordEntry } from '@af-mobile-client-vue3/components/data/UserDetail/recordEntries'
|
|
3
|
+
import type { BaseUser } from '@af-mobile-client-vue3/components/data/UserDetail/types'
|
|
4
|
+
import UserDetail from '@af-mobile-client-vue3/components/data/UserDetail/index.vue'
|
|
5
|
+
import { showToast, Dialog as VanDialog, NavBar as VanNavBar } from 'vant'
|
|
6
|
+
import { useRoute, useRouter } from 'vue-router'
|
|
7
|
+
|
|
8
|
+
const route = useRoute()
|
|
9
|
+
const router = useRouter()
|
|
10
|
+
|
|
11
|
+
// 从路由参数获取用户ID
|
|
12
|
+
const userInfoId = route.params.userInfoId as string
|
|
13
|
+
|
|
14
|
+
// 返回上一页
|
|
15
|
+
function handleBack() {
|
|
16
|
+
router.back()
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 记录点击处理
|
|
20
|
+
function handleRecordClick(entry: RecordEntry, user: BaseUser) {
|
|
21
|
+
showToast(`点击了${entry.title},用户:${user.f_user_name}`)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 业务办理点击处理
|
|
25
|
+
function handleBusinessClick(user: BaseUser) {
|
|
26
|
+
VanDialog.alert({
|
|
27
|
+
title: '业务办理',
|
|
28
|
+
message: `为用户 ${user.f_user_name}(${user.f_userinfo_code})办理业务`,
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// 打印处理
|
|
33
|
+
function handlePrint(user: BaseUser) {
|
|
34
|
+
showToast(`打印用户 ${user.f_user_name} 的档案`)
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<div class="user-detail-page">
|
|
40
|
+
<!-- 导航栏 -->
|
|
41
|
+
<VanNavBar
|
|
42
|
+
title="用户详情"
|
|
43
|
+
left-text="返回"
|
|
44
|
+
left-arrow
|
|
45
|
+
@click-left="handleBack"
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
<!-- 用户详情组件 -->
|
|
49
|
+
<UserDetail
|
|
50
|
+
:user-info-id="userInfoId"
|
|
51
|
+
:show-recent-time="true"
|
|
52
|
+
:show-bottom-buttons="true"
|
|
53
|
+
business-button-text="立即办理"
|
|
54
|
+
@record-click="handleRecordClick"
|
|
55
|
+
@business-click="handleBusinessClick"
|
|
56
|
+
@print="handlePrint"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<style scoped lang="less">
|
|
62
|
+
.user-detail-page {
|
|
63
|
+
height: 100vh;
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
background-color: #f5f7fa;
|
|
67
|
+
|
|
68
|
+
.van-nav-bar {
|
|
69
|
+
flex-shrink: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:deep(.user-detail) {
|
|
73
|
+
flex: 1;
|
|
74
|
+
overflow-y: auto;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { BaseUser } from '@af-mobile-client-vue3/components/data/UserDetail/types'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { Button as VanButton } from 'vant'
|
|
5
|
+
|
|
6
|
+
import { reactive } from 'vue'
|
|
7
|
+
import { useRouter } from 'vue-router'
|
|
8
|
+
|
|
9
|
+
const router = useRouter()
|
|
10
|
+
|
|
11
|
+
// 模拟用户数据
|
|
12
|
+
const mockUsers = reactive<BaseUser[]>([
|
|
13
|
+
{
|
|
14
|
+
f_userinfo_id: '65836',
|
|
15
|
+
f_userinfo_code: '1166730',
|
|
16
|
+
f_user_name: '刘思聪',
|
|
17
|
+
f_user_phone: '15199996077',
|
|
18
|
+
f_address: '滨河营业厅',
|
|
19
|
+
f_user_state: '正常',
|
|
20
|
+
f_user_type: '民用',
|
|
21
|
+
f_meter_type: '气量卡表',
|
|
22
|
+
f_meternumber: '0002353',
|
|
23
|
+
f_balance: 1.61,
|
|
24
|
+
f_balance_amount: 0,
|
|
25
|
+
f_userfiles_id: '71717',
|
|
26
|
+
f_times: 11,
|
|
27
|
+
f_total_gas: 768,
|
|
28
|
+
f_valve_state: '开启',
|
|
29
|
+
f_hascard: '是',
|
|
30
|
+
f_card_id: '9400002001',
|
|
31
|
+
},
|
|
32
|
+
])
|
|
33
|
+
|
|
34
|
+
// 切换用户 - 现在跳转到新路由
|
|
35
|
+
function switchUser() {
|
|
36
|
+
const user = mockUsers[0]
|
|
37
|
+
router.push({
|
|
38
|
+
name: 'UserDetailRoute',
|
|
39
|
+
params: { userInfoId: user.f_userinfo_id },
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<NormalDataLayout title="UserDetail 用户详情组件">
|
|
46
|
+
<template #layout_content>
|
|
47
|
+
<div class="demo-container">
|
|
48
|
+
<!-- 基础使用说明 -->
|
|
49
|
+
<div class="demo-section">
|
|
50
|
+
<h3>基础使用</h3>
|
|
51
|
+
<p>UserDetail 组件用于展示用户的详细信息,支持动态配置记录入口和交互功能。</p>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<!-- 用户选择器 -->
|
|
55
|
+
<div class="demo-section">
|
|
56
|
+
<h3>点击用户查看详情</h3>
|
|
57
|
+
<div class="user-selector">
|
|
58
|
+
<VanButton
|
|
59
|
+
size="small"
|
|
60
|
+
@click="switchUser()"
|
|
61
|
+
>
|
|
62
|
+
{{ mockUsers[0].f_user_name }}
|
|
63
|
+
<span class="user-status" :class="`status-${mockUsers[0].f_user_state}`">
|
|
64
|
+
{{ mockUsers[0].f_user_state }}
|
|
65
|
+
</span>
|
|
66
|
+
</VanButton>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<!-- 功能特性说明 -->
|
|
71
|
+
<div class="demo-section">
|
|
72
|
+
<h3>组件特性</h3>
|
|
73
|
+
<ul class="feature-list">
|
|
74
|
+
<li>📋 用户基本信息展示与折叠</li>
|
|
75
|
+
<li>🔗 可配置的记录入口</li>
|
|
76
|
+
<li>⏰ 支持显示最近业务时间</li>
|
|
77
|
+
<li>🖨️ 内置打印功能</li>
|
|
78
|
+
<li>⚙️ 自定义 API 接口</li>
|
|
79
|
+
<li>🎨 多种用户状态样式</li>
|
|
80
|
+
</ul>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<!-- Props 说明 -->
|
|
84
|
+
<div class="demo-section">
|
|
85
|
+
<h3>主要 Props</h3>
|
|
86
|
+
<div class="props-table">
|
|
87
|
+
<div class="props-row">
|
|
88
|
+
<span class="prop-name">userInfoId</span>
|
|
89
|
+
<span class="prop-type">string</span>
|
|
90
|
+
<span class="prop-desc">用户ID(必传)</span>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="props-row">
|
|
93
|
+
<span class="prop-name">showRecentTime</span>
|
|
94
|
+
<span class="prop-type">boolean</span>
|
|
95
|
+
<span class="prop-desc">是否展示历史时间</span>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="props-row">
|
|
98
|
+
<span class="prop-name">recordEntries</span>
|
|
99
|
+
<span class="prop-type">RecordEntry[]</span>
|
|
100
|
+
<span class="prop-desc">记录入口配置</span>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="props-row">
|
|
103
|
+
<span class="prop-name">showBottomButtons</span>
|
|
104
|
+
<span class="prop-type">boolean</span>
|
|
105
|
+
<span class="prop-desc">是否显示底部按钮区域</span>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="props-row">
|
|
108
|
+
<span class="prop-name">showHeader</span>
|
|
109
|
+
<span class="prop-type">boolean</span>
|
|
110
|
+
<span class="prop-desc">是否显示头部导航栏</span>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="props-row">
|
|
113
|
+
<span class="prop-name">headerTitle</span>
|
|
114
|
+
<span class="prop-type">string</span>
|
|
115
|
+
<span class="prop-desc">头部标题文本</span>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="props-row">
|
|
118
|
+
<span class="prop-name">#bottom</span>
|
|
119
|
+
<span class="prop-type">slot</span>
|
|
120
|
+
<span class="prop-desc">底部插槽,可自定义按钮内容</span>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</template>
|
|
126
|
+
</NormalDataLayout>
|
|
127
|
+
</template>
|
|
128
|
+
|
|
129
|
+
<style scoped lang="less">
|
|
130
|
+
.demo-container {
|
|
131
|
+
padding: 16px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.demo-section {
|
|
135
|
+
margin-bottom: 24px;
|
|
136
|
+
|
|
137
|
+
h3 {
|
|
138
|
+
margin: 0 0 12px 0;
|
|
139
|
+
font-size: 16px;
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
color: #323233;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
p {
|
|
145
|
+
margin: 0 0 12px 0;
|
|
146
|
+
font-size: 14px;
|
|
147
|
+
color: #646566;
|
|
148
|
+
line-height: 1.5;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.user-selector {
|
|
153
|
+
display: flex;
|
|
154
|
+
gap: 8px;
|
|
155
|
+
flex-wrap: wrap;
|
|
156
|
+
|
|
157
|
+
.van-button {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
gap: 6px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.user-status {
|
|
164
|
+
font-size: 12px;
|
|
165
|
+
padding: 1px 6px;
|
|
166
|
+
border-radius: 10px;
|
|
167
|
+
|
|
168
|
+
&.status-正常 {
|
|
169
|
+
background-color: #e6ffed;
|
|
170
|
+
color: #52c41a;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&.status-欠费 {
|
|
174
|
+
background-color: #fff1f0;
|
|
175
|
+
color: #f5222d;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&.status-暂停 {
|
|
179
|
+
background-color: #fff7e6;
|
|
180
|
+
color: #fa8c16;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.feature-list {
|
|
186
|
+
margin: 0;
|
|
187
|
+
padding-left: 20px;
|
|
188
|
+
|
|
189
|
+
li {
|
|
190
|
+
margin-bottom: 8px;
|
|
191
|
+
font-size: 14px;
|
|
192
|
+
color: #646566;
|
|
193
|
+
line-height: 1.5;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.props-table {
|
|
198
|
+
background-color: #f8f9fa;
|
|
199
|
+
border-radius: 8px;
|
|
200
|
+
padding: 12px;
|
|
201
|
+
|
|
202
|
+
.props-row {
|
|
203
|
+
display: flex;
|
|
204
|
+
align-items: center;
|
|
205
|
+
padding: 8px 0;
|
|
206
|
+
border-bottom: 1px solid #ebedf0;
|
|
207
|
+
|
|
208
|
+
&:last-child {
|
|
209
|
+
border-bottom: none;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.prop-name {
|
|
214
|
+
flex: 0 0 120px;
|
|
215
|
+
font-size: 13px;
|
|
216
|
+
font-weight: 600;
|
|
217
|
+
color: #1976d2;
|
|
218
|
+
font-family: 'Monaco', 'Consolas', monospace;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.prop-type {
|
|
222
|
+
flex: 0 0 80px;
|
|
223
|
+
font-size: 12px;
|
|
224
|
+
color: #e91e63;
|
|
225
|
+
font-family: 'Monaco', 'Consolas', monospace;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.prop-desc {
|
|
229
|
+
flex: 1;
|
|
230
|
+
font-size: 13px;
|
|
231
|
+
color: #646566;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
</style>
|
|
@@ -12,8 +12,8 @@ const router = useRouter()
|
|
|
12
12
|
const idKey = ref('o_id')
|
|
13
13
|
|
|
14
14
|
// 简易crud表单测试
|
|
15
|
-
const configName = ref('
|
|
16
|
-
const serviceName = ref('af-
|
|
15
|
+
const configName = ref('mobile_meterInfoManageCRUD')
|
|
16
|
+
const serviceName = ref('af-revenue')
|
|
17
17
|
|
|
18
18
|
// 资源权限测试
|
|
19
19
|
// const configName = ref('crud_sources_test')
|
|
@@ -123,9 +123,9 @@ function handleSubmit() {
|
|
|
123
123
|
await afterGeneral(data)
|
|
124
124
|
else
|
|
125
125
|
if (data.resources.data)
|
|
126
|
-
await afterGeneral(data.resources.data)
|
|
126
|
+
await afterGeneral(data.resources.data, data.access_token)
|
|
127
127
|
else
|
|
128
|
-
await afterGeneral(data.resources)
|
|
128
|
+
await afterGeneral(data.resources, data.access_token)
|
|
129
129
|
|
|
130
130
|
const toPath = decodeURIComponent((route.query?.redirect || '/') as string)
|
|
131
131
|
closeToast()
|
|
@@ -160,7 +160,7 @@ function closeWindows() {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
async function afterGeneral(result) {
|
|
163
|
+
async function afterGeneral(result, token = '') {
|
|
164
164
|
// 排序 functions 及其嵌套的 children
|
|
165
165
|
if (result.functions && Array.isArray(result.functions)) {
|
|
166
166
|
// 对顶层菜单进行排序
|
|
@@ -197,6 +197,7 @@ async function afterGeneral(result) {
|
|
|
197
197
|
username: formData.username,
|
|
198
198
|
password: formData.password,
|
|
199
199
|
rememberMe: rememberMe.value,
|
|
200
|
+
token,
|
|
200
201
|
},
|
|
201
202
|
},
|
|
202
203
|
{
|
|
@@ -4,7 +4,7 @@ import { hexToRgba } from '@af-mobile-client-vue3/utils/common'
|
|
|
4
4
|
|
|
5
5
|
<template>
|
|
6
6
|
<div class="wave">
|
|
7
|
-
<div class="enter-y wave-wrapper
|
|
7
|
+
<div class="enter-y wave-wrapper w-full bottom-0 fixed !-z-5">
|
|
8
8
|
<svg
|
|
9
9
|
class="ignore-waves"
|
|
10
10
|
xmlns="http://www.w3.org/2000/svg"
|