af-mobile-client-vue3 1.4.9 → 1.4.11
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/.env +1 -0
- package/mock/modules/prose.mock.ts.timestamp-1761115794478.mjs +53 -0
- package/package.json +4 -2
- package/postcss.config.ts +8 -8
- package/src/components/data/UserDetail/index.vue +10 -1
- package/src/components/data/XFormGroup/doc/DeviceForm.vue +1 -1
- package/src/components/data/XFormGroup/doc/UserForm.vue +1 -1
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/router/routes.ts +421 -421
- package/src/stores/modules/homeApp/README.md +124 -0
- package/src/stores/modules/setting.ts +1 -1
- package/src/stores/modules/user.ts +4 -0
- package/src/styles/login.less +1 -0
- package/src/types/crypto.ts +111 -0
- package/src/utils/EncryptUtil.ts +246 -0
- package/src/utils/http/index.ts +24 -0
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/utils/timeUtil.ts +27 -27
- package/src/utils/wechat.ts +3 -29
- package/src/views/component/XCellListView/index.vue +107 -138
- package/src/views/component/XFormGroupView/index.vue +91 -82
- package/src/views/component/XFormView/index.vue +61 -46
- package/src/views/user/login/LoginForm.vue +2 -1
package/src/utils/timeUtil.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
// 时间工具:提供简单的日期时间格式化
|
|
2
|
-
|
|
3
|
-
export function pad2(num: number): string {
|
|
4
|
-
return num < 10 ? `0${num}` : `${num}`
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* 按照简单占位符格式化当前时间
|
|
9
|
-
* 支持占位:YYYY MM DD HH mm ss
|
|
10
|
-
* @param format 默认 'YYYY-MM-DD HH:mm:ss'
|
|
11
|
-
*/
|
|
12
|
-
export function formatNow(format: string = 'YYYY-MM-DD HH:mm:ss'): string {
|
|
13
|
-
const d = new Date()
|
|
14
|
-
const map: Record<string, string> = {
|
|
15
|
-
YYYY: `${d.getFullYear()}`,
|
|
16
|
-
MM: pad2(d.getMonth() + 1),
|
|
17
|
-
DD: pad2(d.getDate()),
|
|
18
|
-
HH: pad2(d.getHours()),
|
|
19
|
-
mm: pad2(d.getMinutes()),
|
|
20
|
-
ss: pad2(d.getSeconds()),
|
|
21
|
-
}
|
|
22
|
-
let out = format
|
|
23
|
-
Object.keys(map).forEach((k) => {
|
|
24
|
-
out = out.replace(new RegExp(k, 'g'), map[k])
|
|
25
|
-
})
|
|
26
|
-
return out
|
|
27
|
-
}
|
|
1
|
+
// 时间工具:提供简单的日期时间格式化
|
|
2
|
+
|
|
3
|
+
export function pad2(num: number): string {
|
|
4
|
+
return num < 10 ? `0${num}` : `${num}`
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 按照简单占位符格式化当前时间
|
|
9
|
+
* 支持占位:YYYY MM DD HH mm ss
|
|
10
|
+
* @param format 默认 'YYYY-MM-DD HH:mm:ss'
|
|
11
|
+
*/
|
|
12
|
+
export function formatNow(format: string = 'YYYY-MM-DD HH:mm:ss'): string {
|
|
13
|
+
const d = new Date()
|
|
14
|
+
const map: Record<string, string> = {
|
|
15
|
+
YYYY: `${d.getFullYear()}`,
|
|
16
|
+
MM: pad2(d.getMonth() + 1),
|
|
17
|
+
DD: pad2(d.getDate()),
|
|
18
|
+
HH: pad2(d.getHours()),
|
|
19
|
+
mm: pad2(d.getMinutes()),
|
|
20
|
+
ss: pad2(d.getSeconds()),
|
|
21
|
+
}
|
|
22
|
+
let out = format
|
|
23
|
+
Object.keys(map).forEach((k) => {
|
|
24
|
+
out = out.replace(new RegExp(k, 'g'), map[k])
|
|
25
|
+
})
|
|
26
|
+
return out
|
|
27
|
+
}
|
package/src/utils/wechat.ts
CHANGED
|
@@ -5,10 +5,10 @@ import wx from 'weixin-js-sdk'
|
|
|
5
5
|
export interface WechatConfig {
|
|
6
6
|
debug: boolean
|
|
7
7
|
appId: string
|
|
8
|
-
timestamp:
|
|
8
|
+
timestamp: number
|
|
9
9
|
nonceStr: string
|
|
10
10
|
signature: string
|
|
11
|
-
jsApiList:
|
|
11
|
+
jsApiList: any[]
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// 微信扫码配置
|
|
@@ -63,36 +63,10 @@ export function configWechatSDK(config: WechatConfig): Promise<void> {
|
|
|
63
63
|
})
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
// 微信扫码
|
|
67
|
-
export function scanQRCode(config: WechatScanConfig): Promise<WechatScanResult> {
|
|
68
|
-
return new Promise((resolve, reject) => {
|
|
69
|
-
if (!isWechatBrowser()) {
|
|
70
|
-
reject(new Error('非微信环境,无法使用微信扫码'))
|
|
71
|
-
return
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
wx.scanQRCode({
|
|
75
|
-
needResult: config.needResult,
|
|
76
|
-
scanType: config.scanType,
|
|
77
|
-
success: (res: WechatScanResult) => {
|
|
78
|
-
console.log('微信扫码成功:', res)
|
|
79
|
-
resolve(res)
|
|
80
|
-
},
|
|
81
|
-
fail: (res: any) => {
|
|
82
|
-
console.error('微信扫码失败:', res)
|
|
83
|
-
reject(new Error(`微信扫码失败: ${res.errMsg}`))
|
|
84
|
-
},
|
|
85
|
-
cancel: () => {
|
|
86
|
-
reject(new Error('用户取消扫码'))
|
|
87
|
-
},
|
|
88
|
-
})
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
|
|
92
66
|
// 获取微信签名(模拟)
|
|
93
67
|
export async function getWechatSignature(url: string): Promise<{
|
|
94
68
|
appId: string
|
|
95
|
-
timestamp:
|
|
69
|
+
timestamp: number
|
|
96
70
|
nonceStr: string
|
|
97
71
|
signature: string
|
|
98
72
|
}> {
|
|
@@ -1,138 +1,107 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
|
-
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
//
|
|
23
|
-
const configName = ref('lngChargeAuditMobileCRUD')
|
|
24
|
-
const serviceName = ref('af-gaslink')
|
|
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
|
-
// 数据加载完成后处理 @after-load
|
|
111
|
-
function afterLoad(result) {
|
|
112
|
-
console.log('afterLoad:', result)
|
|
113
|
-
}
|
|
114
|
-
function emitFunc(func, data) {
|
|
115
|
-
console.log('emitFunc:', func, data)
|
|
116
|
-
}
|
|
117
|
-
</script>
|
|
118
|
-
|
|
119
|
-
<template>
|
|
120
|
-
<NormalDataLayout id="XCellListView" title="工作计划">
|
|
121
|
-
<template #layout_content>
|
|
122
|
-
<XCellList
|
|
123
|
-
config-name="scanCodeAndNFCRUD"
|
|
124
|
-
service-name="af-safecheck"
|
|
125
|
-
:enable-multi-select="true"
|
|
126
|
-
id-key="t_id"
|
|
127
|
-
:multi-select-actions="multiSelectActions"
|
|
128
|
-
@to-detail="toDetail"
|
|
129
|
-
@multi-select-action="handleMultiSelectAction"
|
|
130
|
-
@selection-change="handleSelectionChange"
|
|
131
|
-
@x-form-item-emit-func="emitFunc"
|
|
132
|
-
/>
|
|
133
|
-
</template>
|
|
134
|
-
</NormalDataLayout>
|
|
135
|
-
</template>
|
|
136
|
-
|
|
137
|
-
<style scoped lang="less">
|
|
138
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { defineEmits, ref } from 'vue'
|
|
5
|
+
import { useRouter } from 'vue-router'
|
|
6
|
+
|
|
7
|
+
// 定义事件
|
|
8
|
+
const emit = defineEmits(['deleteRow'])
|
|
9
|
+
// 访问路由
|
|
10
|
+
const router = useRouter()
|
|
11
|
+
// 获取默认值
|
|
12
|
+
// const idKey = ref('o_id')
|
|
13
|
+
|
|
14
|
+
// 简易crud表单测试
|
|
15
|
+
const configName = ref('ceshiCRUD')
|
|
16
|
+
const serviceName = ref('af-safecheck')
|
|
17
|
+
|
|
18
|
+
// 资源权限测试
|
|
19
|
+
// const configName = ref('crud_sources_test')
|
|
20
|
+
// const serviceName = ref('af-system')
|
|
21
|
+
|
|
22
|
+
// 实际业务测试
|
|
23
|
+
// const configName = ref('lngChargeAuditMobileCRUD')
|
|
24
|
+
// const serviceName = ref('af-gaslink')
|
|
25
|
+
|
|
26
|
+
// 跳转到详情页面
|
|
27
|
+
// function toDetail(item) {
|
|
28
|
+
// router.push({
|
|
29
|
+
// name: 'XCellDetailView',
|
|
30
|
+
// params: { id: item[idKey.value] }, // 如果使用命名路由,推荐使用路由参数而不是直接构建 URL
|
|
31
|
+
// query: {
|
|
32
|
+
// operName: item[operNameKey.value],
|
|
33
|
+
// method:item[methodKey.value],
|
|
34
|
+
// requestMethod:item[requestMethodKey.value],
|
|
35
|
+
// operatorType:item[operatorTypeKey.value],
|
|
36
|
+
// operUrl:item[operUrlKey.value],
|
|
37
|
+
// operIp:item[operIpKey.value],
|
|
38
|
+
// costTime:item[costTimeKey.value],
|
|
39
|
+
// operTime:item[operTimeKey.value],
|
|
40
|
+
//
|
|
41
|
+
// title: item[titleKey.value],
|
|
42
|
+
// businessType: item[businessTypeKey.value],
|
|
43
|
+
// status:item[statusKey.value]
|
|
44
|
+
// }
|
|
45
|
+
// })
|
|
46
|
+
// }
|
|
47
|
+
|
|
48
|
+
// 跳转到表单——以表单组来渲染纯表单
|
|
49
|
+
// function toDetail(item) {
|
|
50
|
+
// router.push({
|
|
51
|
+
// name: 'XFormGroupView',
|
|
52
|
+
// query: {
|
|
53
|
+
// id: item[idKey.value],
|
|
54
|
+
// // id: item.rr_id,
|
|
55
|
+
// // o_id: item.o_id,
|
|
56
|
+
// },
|
|
57
|
+
// })
|
|
58
|
+
// }
|
|
59
|
+
|
|
60
|
+
// 新增功能
|
|
61
|
+
// function addOption(totalCount) {
|
|
62
|
+
// router.push({
|
|
63
|
+
// name: 'XFormView',
|
|
64
|
+
// params: { id: totalCount, openid: totalCount },
|
|
65
|
+
// query: {
|
|
66
|
+
// configName: configName.value,
|
|
67
|
+
// serviceName: serviceName.value,
|
|
68
|
+
// mode: '新增',
|
|
69
|
+
// },
|
|
70
|
+
// })
|
|
71
|
+
// }
|
|
72
|
+
|
|
73
|
+
// 修改功能
|
|
74
|
+
// function updateRow(result) {
|
|
75
|
+
// router.push({
|
|
76
|
+
// name: 'XFormView',
|
|
77
|
+
// params: { id: result.o_id, openid: result.o_id },
|
|
78
|
+
// query: {
|
|
79
|
+
// configName: configName.value,
|
|
80
|
+
// serviceName: serviceName.value,
|
|
81
|
+
// mode: '修改',
|
|
82
|
+
// },
|
|
83
|
+
// })
|
|
84
|
+
// }
|
|
85
|
+
|
|
86
|
+
// 删除功能
|
|
87
|
+
// function deleteRow(result) {
|
|
88
|
+
// emit('deleteRow', result.o_id)
|
|
89
|
+
// }
|
|
90
|
+
// const fixQueryForm = ref({
|
|
91
|
+
// f_operator_id: '487184754014158848',
|
|
92
|
+
// })
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<template>
|
|
96
|
+
<NormalDataLayout id="XCellListView" title="工作计划">
|
|
97
|
+
<template #layout_content>
|
|
98
|
+
<XCellList
|
|
99
|
+
:config-name="configName"
|
|
100
|
+
:service-name="serviceName"
|
|
101
|
+
/>
|
|
102
|
+
</template>
|
|
103
|
+
</NormalDataLayout>
|
|
104
|
+
</template>
|
|
105
|
+
|
|
106
|
+
<style scoped lang="less">
|
|
107
|
+
</style>
|
|
@@ -1,82 +1,91 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
|
|
3
|
-
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
-
import { showDialog } from 'vant'
|
|
5
|
-
import { ref } from 'vue'
|
|
6
|
-
import { useRoute } from 'vue-router'
|
|
7
|
-
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// const configName = ref(
|
|
13
|
-
// const serviceName = ref(
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
// const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// 表单组——数据
|
|
34
|
-
// function initComponents () {
|
|
35
|
-
// runLogic('getlngChargeAuditMobileFormGroupData', {id: 29}, 'af-gaslink').then((res) => {
|
|
36
|
-
// formData.value = {...res}
|
|
37
|
-
// })
|
|
38
|
-
// }
|
|
39
|
-
|
|
40
|
-
// 纯表单——数据
|
|
41
|
-
// function initComponents() {
|
|
42
|
-
// formData.value = { plan_name: 'af-llllll', plan_point: '1号点位', plan_single: '1号点位', plan_range: '2024-12-12' }
|
|
43
|
-
// }
|
|
44
|
-
|
|
45
|
-
// function initComponents() {
|
|
46
|
-
// runLogic('getlngChargeAuditMobileFormGroupData', { id: route.query?.id, o_id: route.query?.o_id }, 'af-gaslink').then((res) => {
|
|
47
|
-
// console.log('res------', res)
|
|
48
|
-
// formData.value = { ...res }
|
|
49
|
-
// formGroup.value.init({
|
|
50
|
-
// configName: configName.value,
|
|
51
|
-
// serviceName: serviceName.value,
|
|
52
|
-
// groupFormData: { ...res },
|
|
53
|
-
// mode: "新增"
|
|
54
|
-
// })
|
|
55
|
-
// isInit.value = true
|
|
56
|
-
// })
|
|
57
|
-
// }
|
|
58
|
-
|
|
59
|
-
// onBeforeMount(() => {
|
|
60
|
-
// initComponents()
|
|
61
|
-
// })
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XFormGroup from '@af-mobile-client-vue3/components/data/XFormGroup/index.vue'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { showDialog } from 'vant'
|
|
5
|
+
import { ref } from 'vue'
|
|
6
|
+
import { useRoute } from 'vue-router'
|
|
7
|
+
|
|
8
|
+
// 纯表单
|
|
9
|
+
const configName = ref('appapplyuserinfoFormGroup')
|
|
10
|
+
const serviceName = ref('af-apply')
|
|
11
|
+
|
|
12
|
+
// const configName = ref("计划下发Form")
|
|
13
|
+
// const serviceName = ref("af-linepatrol")
|
|
14
|
+
|
|
15
|
+
// 表单组
|
|
16
|
+
// const configName = ref('lngChargeAuditMobileFormGroup')
|
|
17
|
+
// const serviceName = ref('af-gaslink')
|
|
18
|
+
|
|
19
|
+
const formData = ref({ t_userinfo: { f_user_name: 111 } })
|
|
20
|
+
const formGroup = ref(null)
|
|
21
|
+
const route = useRoute()
|
|
22
|
+
const isInit = ref(false)
|
|
23
|
+
function submit(_result) {
|
|
24
|
+
showDialog({ message: '提交成功' })
|
|
25
|
+
history.back()
|
|
26
|
+
}
|
|
27
|
+
const myXForm = ref([])
|
|
28
|
+
function setRef(value: any) {
|
|
29
|
+
console.log('myXForm', myXForm)
|
|
30
|
+
formGroup.value.setRef(myXForm.value)
|
|
31
|
+
console.log(formGroup)
|
|
32
|
+
}
|
|
33
|
+
// 表单组——数据
|
|
34
|
+
// function initComponents () {
|
|
35
|
+
// runLogic('getlngChargeAuditMobileFormGroupData', {id: 29}, 'af-gaslink').then((res) => {
|
|
36
|
+
// formData.value = {...res}
|
|
37
|
+
// })
|
|
38
|
+
// }
|
|
39
|
+
|
|
40
|
+
// 纯表单——数据
|
|
41
|
+
// function initComponents() {
|
|
42
|
+
// formData.value = { plan_name: 'af-llllll', plan_point: '1号点位', plan_single: '1号点位', plan_range: '2024-12-12' }
|
|
43
|
+
// }
|
|
44
|
+
|
|
45
|
+
// function initComponents() {
|
|
46
|
+
// runLogic('getlngChargeAuditMobileFormGroupData', { id: route.query?.id, o_id: route.query?.o_id }, 'af-gaslink').then((res) => {
|
|
47
|
+
// console.log('res------', res)
|
|
48
|
+
// formData.value = { ...res }
|
|
49
|
+
// formGroup.value.init({
|
|
50
|
+
// configName: configName.value,
|
|
51
|
+
// serviceName: serviceName.value,
|
|
52
|
+
// groupFormData: { ...res },
|
|
53
|
+
// mode: "新增"
|
|
54
|
+
// })
|
|
55
|
+
// isInit.value = true
|
|
56
|
+
// })
|
|
57
|
+
// }
|
|
58
|
+
|
|
59
|
+
// onBeforeMount(() => {
|
|
60
|
+
// initComponents()
|
|
61
|
+
// })
|
|
62
|
+
function a() {
|
|
63
|
+
}
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<template>
|
|
67
|
+
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
68
|
+
<template #layout_content>
|
|
69
|
+
<button @click="a">
|
|
70
|
+
修改
|
|
71
|
+
</button>
|
|
72
|
+
<!-- v-if="isInit" -->
|
|
73
|
+
<XFormGroup
|
|
74
|
+
ref="formGroup"
|
|
75
|
+
:config-name="configName"
|
|
76
|
+
:service-name="serviceName"
|
|
77
|
+
:group-form-data="formData"
|
|
78
|
+
mode="新增"
|
|
79
|
+
@submit="submit"
|
|
80
|
+
>
|
|
81
|
+
<!-- <template #device="{ setRef, removeRef, item, formData }">
|
|
82
|
+
<XFormView :setRef="setRef" :formGroupName="'myXForm'"/>
|
|
83
|
+
</template> -->
|
|
84
|
+
</XFormGroup>
|
|
85
|
+
</template>
|
|
86
|
+
</NormalDataLayout>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<style scoped lang="less">
|
|
90
|
+
|
|
91
|
+
</style>
|
|
@@ -1,46 +1,61 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
3
|
-
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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
|
-
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
3
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { mobileUtil } from '@af-mobile-client-vue3/utils/mobileUtil'
|
|
5
|
+
import { ref } from 'vue'
|
|
6
|
+
import {
|
|
7
|
+
showFailToast,
|
|
8
|
+
showSuccessToast,
|
|
9
|
+
Button as VanButton,
|
|
10
|
+
CellGroup as VanCellGroup,
|
|
11
|
+
Form as VanForm,
|
|
12
|
+
} from 'vant'
|
|
13
|
+
|
|
14
|
+
const configName = ref('lngSecurityChecktestForm')
|
|
15
|
+
const serviceName = ref('af-safecheck')
|
|
16
|
+
function aaa() {
|
|
17
|
+
mobileUtil.execute({
|
|
18
|
+
funcName: 'startNfcScan',
|
|
19
|
+
param: { a: 1 },
|
|
20
|
+
callbackFunc: (result) => {
|
|
21
|
+
console.log('回调了test111', JSON.stringify(result))
|
|
22
|
+
return 222
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
function bbb() {
|
|
27
|
+
mobileUtil.execute({
|
|
28
|
+
funcName: 'scanBarcode',
|
|
29
|
+
param: { a: 1 },
|
|
30
|
+
callbackFunc: (result) => {
|
|
31
|
+
console.log('回调了test111', JSON.stringify(result))
|
|
32
|
+
return 222
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
const formGroupAddConstruction = ref(null)
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
41
|
+
<template #layout_content>
|
|
42
|
+
<VanButton @click="aaa">
|
|
43
|
+
测试nfc
|
|
44
|
+
</VanButton>
|
|
45
|
+
<VanButton @click="bbb">
|
|
46
|
+
扫码
|
|
47
|
+
</VanButton>
|
|
48
|
+
<XForm
|
|
49
|
+
ref="formGroupAddConstruction"
|
|
50
|
+
mode="新增"
|
|
51
|
+
:config-name="configName"
|
|
52
|
+
:service-name="serviceName"
|
|
53
|
+
:form-readonly="false"
|
|
54
|
+
/>
|
|
55
|
+
</template>
|
|
56
|
+
</NormalDataLayout>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<style scoped lang="less">
|
|
60
|
+
|
|
61
|
+
</style>
|
|
@@ -10,6 +10,7 @@ import { UserType } from '@af-mobile-client-vue3/types/auth'
|
|
|
10
10
|
import { isWechat } from '@af-mobile-client-vue3/utils/platform-auth'
|
|
11
11
|
import { funcToRouter, loadRoutes } from '@af-mobile-client-vue3/utils/routerUtil'
|
|
12
12
|
import { secureStorageBatchWrite, secureStorageRead } from '@af-mobile-client-vue3/utils/secureStorage'
|
|
13
|
+
import bcrypt from 'bcryptjs'
|
|
13
14
|
import {
|
|
14
15
|
closeToast,
|
|
15
16
|
showDialog,
|
|
@@ -123,7 +124,7 @@ function handleSubmit() {
|
|
|
123
124
|
console.warn(setting)
|
|
124
125
|
const data: any = await userState.Login({
|
|
125
126
|
username,
|
|
126
|
-
password,
|
|
127
|
+
password: bcrypt.hashSync(password, 10),
|
|
127
128
|
resourceName: setting.getSetting()?.routerName || '智慧手机',
|
|
128
129
|
})
|
|
129
130
|
login.f = data
|