af-mobile-client-vue3 1.3.77 → 1.3.79
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/App.vue +1 -1
- package/src/components/data/XFormItem/index.vue +27 -3
- package/src/router/routes.ts +421 -421
- package/src/services/v3Api.ts +28 -5
- package/src/utils/mobileUtil.ts +72 -0
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/views/component/XCellListView/index.vue +48 -21
- package/src/views/component/XFormGroupView/index.vue +82 -78
- package/src/views/component/XFormView/index.vue +42 -41
- package/src/views/user/my/comm/ModifyPassword.vue +5 -1
- package/src/views/user/my/index.vue +14 -12
package/src/services/v3Api.ts
CHANGED
|
@@ -67,15 +67,38 @@ function getLeafNodesByCondition(type, nodes, parent = null) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
function transformData(inputData) {
|
|
70
|
+
if (!inputData || !Array.isArray(inputData))
|
|
71
|
+
return []
|
|
72
|
+
|
|
70
73
|
function transform(node) {
|
|
74
|
+
if (!node || typeof node !== 'object')
|
|
75
|
+
return {}
|
|
76
|
+
|
|
77
|
+
let children = []
|
|
78
|
+
if (node.children) {
|
|
79
|
+
if (Array.isArray(node.children)) {
|
|
80
|
+
children = node.children.map(transform)
|
|
81
|
+
}
|
|
82
|
+
else if (typeof node.children === 'object') {
|
|
83
|
+
// 检查是否是空标记
|
|
84
|
+
if (node.children.empty === true) {
|
|
85
|
+
children = []
|
|
86
|
+
}
|
|
87
|
+
else if (node.children.id || node.children.name) {
|
|
88
|
+
// 如果是单个节点对象
|
|
89
|
+
children = [transform(node.children)]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
71
94
|
return {
|
|
72
|
-
label: node.name,
|
|
73
|
-
value: node.id,
|
|
95
|
+
label: node.name || '',
|
|
96
|
+
value: node.id ?? null,
|
|
74
97
|
f_organization_id: node.f_organization_id,
|
|
75
98
|
f_department_id: node.f_department_id,
|
|
76
|
-
parentid: node.parentid,
|
|
99
|
+
parentid: node.parentid || node.parentId || node.parent_id || null,
|
|
77
100
|
orgid: node.orgid,
|
|
78
|
-
children
|
|
101
|
+
children,
|
|
79
102
|
}
|
|
80
103
|
}
|
|
81
104
|
|
|
@@ -83,7 +106,7 @@ function transformData(inputData) {
|
|
|
83
106
|
}
|
|
84
107
|
|
|
85
108
|
function getResData(params, toCallback) {
|
|
86
|
-
const data = { userId: params.userid, roleName: params.roleName }
|
|
109
|
+
const data = { userId: params.userid, roleName: params.roleName, filter: params.filter, filterType: params.filterType }
|
|
87
110
|
if (params.source === '获取分公司') {
|
|
88
111
|
runLogic('getOrgBySearch', data, 'af-system').then(res => toCallback(res))
|
|
89
112
|
}
|
package/src/utils/mobileUtil.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { showConfirmDialog } from 'vant'
|
|
2
|
+
|
|
1
3
|
interface Param {
|
|
2
4
|
funcName: string // 注册列表中的对应函数的key
|
|
3
5
|
param: Record<string, unknown> // 入参json格式
|
|
@@ -36,3 +38,73 @@ export class mobileUtil {
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
41
|
+
|
|
42
|
+
export class mobileTools {
|
|
43
|
+
// 打电话
|
|
44
|
+
static callPhone(phone: any) {
|
|
45
|
+
mobileUtil.execute({
|
|
46
|
+
funcName: 'makePhoneCall',
|
|
47
|
+
param: { phoneNumber: phone.user_phone },
|
|
48
|
+
callbackFunc: (result: any) => {
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 定位-导航
|
|
54
|
+
static mapInfoView(map: any) {
|
|
55
|
+
const { f_lng, f_lat, f_address } = map
|
|
56
|
+
// 判断是否有精确的经纬度坐标
|
|
57
|
+
if (f_lng && f_lat && !Number.isNaN(Number.parseFloat(f_lng)) && !Number.isNaN(Number.parseFloat(f_lat))) {
|
|
58
|
+
// 有精确坐标,直接使用经纬度导航
|
|
59
|
+
const navigationParam = {
|
|
60
|
+
lat: Number.parseFloat(f_lat),
|
|
61
|
+
lng: Number.parseFloat(f_lng),
|
|
62
|
+
name: f_address || '目标位置',
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
mobileUtil.execute({
|
|
66
|
+
funcName: 'openMapNavigation',
|
|
67
|
+
param: navigationParam,
|
|
68
|
+
callbackFunc: (result: any) => {
|
|
69
|
+
console.log('精确坐标导航结果===', result)
|
|
70
|
+
},
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// 没有精确坐标,检查是否有地址
|
|
75
|
+
if (!f_address) {
|
|
76
|
+
// 没有地址,直接提示
|
|
77
|
+
showConfirmDialog({
|
|
78
|
+
title: '导航提示',
|
|
79
|
+
message: '未检测到地址,无法进行导航',
|
|
80
|
+
confirmButtonText: '确定',
|
|
81
|
+
showCancelButton: false,
|
|
82
|
+
})
|
|
83
|
+
return
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// 有地址,提示用户是否使用地址导航
|
|
87
|
+
showConfirmDialog({
|
|
88
|
+
title: '导航提示',
|
|
89
|
+
message: `该档案中未维护精确坐标,是否继续使用(${f_address})进行导航?`,
|
|
90
|
+
confirmButtonText: '确定导航',
|
|
91
|
+
cancelButtonText: '取消',
|
|
92
|
+
}).then(() => {
|
|
93
|
+
// 用户确认,使用地址导航
|
|
94
|
+
const addressParam = {
|
|
95
|
+
address: f_address,
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
mobileUtil.execute({
|
|
99
|
+
funcName: 'openMapNavigation',
|
|
100
|
+
param: addressParam,
|
|
101
|
+
callbackFunc: (result: any) => {
|
|
102
|
+
},
|
|
103
|
+
})
|
|
104
|
+
}).catch(() => {
|
|
105
|
+
// 用户取消导航
|
|
106
|
+
console.log('用户取消导航')
|
|
107
|
+
})
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 根据类型获取日期区间字符串
|
|
3
|
-
* @param type '当年' | 'curMonth' | '当日'
|
|
4
|
-
* @param show 区分实际值还是显示值, true为实际值, false为显示值
|
|
5
|
-
* @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
|
|
6
|
-
*/
|
|
7
|
-
export function getRangeByType(type: string, show: boolean): [string, string] {
|
|
8
|
-
const now = new Date()
|
|
9
|
-
const year = now.getFullYear()
|
|
10
|
-
const month = (now.getMonth() + 1).toString().padStart(2, '0')
|
|
11
|
-
const day = now.getDate().toString().padStart(2, '0')
|
|
12
|
-
|
|
13
|
-
if (!show) {
|
|
14
|
-
if (type === 'curYear') {
|
|
15
|
-
return [
|
|
16
|
-
`${year}-01-01 00:00:00`,
|
|
17
|
-
`${year}-12-31 23:59:59`,
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
if (type === 'curMonth') {
|
|
21
|
-
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
22
|
-
return [
|
|
23
|
-
`${year}-${month}-01 00:00:00`,
|
|
24
|
-
`${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
if (type === 'curDay') {
|
|
28
|
-
return [
|
|
29
|
-
`${year}-${month}-${day} 00:00:00`,
|
|
30
|
-
`${year}-${month}-${day} 23:59:59`,
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (show) {
|
|
35
|
-
if (type === 'curYear') {
|
|
36
|
-
return [
|
|
37
|
-
`${year}-01-01`,
|
|
38
|
-
`${year}-12-31`,
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
if (type === 'curMonth') {
|
|
42
|
-
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
43
|
-
return [
|
|
44
|
-
`${year}-${month}-01`,
|
|
45
|
-
`${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
if (type === 'curDay') {
|
|
49
|
-
return [
|
|
50
|
-
`${year}-${month}-${day}`,
|
|
51
|
-
`${year}-${month}-${day}`,
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
// 兜底返回空字符串数组
|
|
56
|
-
return ['', '']
|
|
57
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 根据类型获取日期区间字符串
|
|
3
|
+
* @param type '当年' | 'curMonth' | '当日'
|
|
4
|
+
* @param show 区分实际值还是显示值, true为实际值, false为显示值
|
|
5
|
+
* @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
|
|
6
|
+
*/
|
|
7
|
+
export function getRangeByType(type: string, show: boolean): [string, string] {
|
|
8
|
+
const now = new Date()
|
|
9
|
+
const year = now.getFullYear()
|
|
10
|
+
const month = (now.getMonth() + 1).toString().padStart(2, '0')
|
|
11
|
+
const day = now.getDate().toString().padStart(2, '0')
|
|
12
|
+
|
|
13
|
+
if (!show) {
|
|
14
|
+
if (type === 'curYear') {
|
|
15
|
+
return [
|
|
16
|
+
`${year}-01-01 00:00:00`,
|
|
17
|
+
`${year}-12-31 23:59:59`,
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
if (type === 'curMonth') {
|
|
21
|
+
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
22
|
+
return [
|
|
23
|
+
`${year}-${month}-01 00:00:00`,
|
|
24
|
+
`${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
if (type === 'curDay') {
|
|
28
|
+
return [
|
|
29
|
+
`${year}-${month}-${day} 00:00:00`,
|
|
30
|
+
`${year}-${month}-${day} 23:59:59`,
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (show) {
|
|
35
|
+
if (type === 'curYear') {
|
|
36
|
+
return [
|
|
37
|
+
`${year}-01-01`,
|
|
38
|
+
`${year}-12-31`,
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
if (type === 'curMonth') {
|
|
42
|
+
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
43
|
+
return [
|
|
44
|
+
`${year}-${month}-01`,
|
|
45
|
+
`${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
if (type === 'curDay') {
|
|
49
|
+
return [
|
|
50
|
+
`${year}-${month}-${day}`,
|
|
51
|
+
`${year}-${month}-${day}`,
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// 兜底返回空字符串数组
|
|
56
|
+
return ['', '']
|
|
57
|
+
}
|
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
3
|
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
4
5
|
import { defineEmits, ref } from 'vue'
|
|
5
6
|
import { useRouter } from 'vue-router'
|
|
6
7
|
|
|
7
8
|
// 定义事件
|
|
8
9
|
const emit = defineEmits(['deleteRow'])
|
|
10
|
+
|
|
11
|
+
// 多选操作配置
|
|
12
|
+
const multiSelectActions = ref([
|
|
13
|
+
{ name: '批量审核', key: 'batchAudit', color: '#000000', icon: 'passed' },
|
|
14
|
+
])
|
|
15
|
+
|
|
16
|
+
const userInfo = useUserStore().getUserInfo()
|
|
9
17
|
// 访问路由
|
|
10
18
|
const router = useRouter()
|
|
11
19
|
// 获取默认值
|
|
12
|
-
|
|
20
|
+
const idKey = ref('o_id')
|
|
13
21
|
|
|
14
22
|
// 简易crud表单测试
|
|
15
|
-
const configName = ref('
|
|
16
|
-
const serviceName = ref('af-
|
|
23
|
+
const configName = ref('lngChargeAuditMobileCRUD')
|
|
24
|
+
const serviceName = ref('af-gaslink')
|
|
17
25
|
|
|
18
26
|
// 资源权限测试
|
|
19
27
|
// const configName = ref('crud_sources_test')
|
|
@@ -46,16 +54,16 @@ const serviceName = ref('af-safecheck')
|
|
|
46
54
|
// }
|
|
47
55
|
|
|
48
56
|
// 跳转到表单——以表单组来渲染纯表单
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
function toDetail(item) {
|
|
58
|
+
router.push({
|
|
59
|
+
name: 'XFormView',
|
|
60
|
+
query: {
|
|
61
|
+
id: item[idKey.value],
|
|
62
|
+
// id: item.rr_id,
|
|
63
|
+
// o_id: item.o_id,
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
}
|
|
59
67
|
|
|
60
68
|
// 新增功能
|
|
61
69
|
// function addOption(totalCount) {
|
|
@@ -84,20 +92,39 @@ const serviceName = ref('af-safecheck')
|
|
|
84
92
|
// }
|
|
85
93
|
|
|
86
94
|
// 删除功能
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
//
|
|
92
|
-
|
|
95
|
+
function deleteRow(result) {
|
|
96
|
+
emit('deleteRow', result.o_id)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 多选操作处理
|
|
100
|
+
function handleMultiSelectAction(action: string, selectedItems: any[], selectedItemsArray: any[]) {
|
|
101
|
+
console.log('多选操作:', action, selectedItems, selectedItemsArray)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// 选择变化处理
|
|
105
|
+
function handleSelectionChange(selectedItems: any[]) {
|
|
106
|
+
console.log('选择变化,当前选中:', selectedItems.length, '个项目')
|
|
107
|
+
// 可以在这里更新UI状态,比如显示选中数量等
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// 数据加载完成后处理 @after-load
|
|
111
|
+
function afterLoad(result) {
|
|
112
|
+
console.log('afterLoad:', result)
|
|
113
|
+
}
|
|
93
114
|
</script>
|
|
94
115
|
|
|
95
116
|
<template>
|
|
96
117
|
<NormalDataLayout id="XCellListView" title="工作计划">
|
|
97
118
|
<template #layout_content>
|
|
98
119
|
<XCellList
|
|
99
|
-
|
|
100
|
-
|
|
120
|
+
config-name="lngSaleOrderCRUD"
|
|
121
|
+
service-name="af-gaslink"
|
|
122
|
+
:enable-multi-select="true"
|
|
123
|
+
id-key="rr_id"
|
|
124
|
+
:multi-select-actions="multiSelectActions"
|
|
125
|
+
@to-detail="toDetail"
|
|
126
|
+
@multi-select-action="handleMultiSelectAction"
|
|
127
|
+
@selection-change="handleSelectionChange"
|
|
101
128
|
/>
|
|
102
129
|
</template>
|
|
103
130
|
</NormalDataLayout>
|
|
@@ -1,78 +1,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
|
|
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
|
-
//
|
|
35
|
-
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// function initComponents() {
|
|
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
|
-
</
|
|
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
|
+
// const configName = ref('reviewFormGroup')
|
|
9
|
+
// const serviceName = ref('af-revenue')
|
|
10
|
+
|
|
11
|
+
// 纯表单
|
|
12
|
+
// const configName = ref('form_check_test')
|
|
13
|
+
// const serviceName = ref('af-system')
|
|
14
|
+
|
|
15
|
+
// const configName = ref("计划下发Form")
|
|
16
|
+
// const serviceName = ref("af-linepatrol")
|
|
17
|
+
|
|
18
|
+
// 表单组
|
|
19
|
+
const configName = ref('lngChargeAuditMobileFormGroup')
|
|
20
|
+
const serviceName = ref('af-gaslink')
|
|
21
|
+
|
|
22
|
+
const formData = ref({})
|
|
23
|
+
const formGroup = ref(null)
|
|
24
|
+
const route = useRoute()
|
|
25
|
+
const isInit = ref(false)
|
|
26
|
+
function submit(_result) {
|
|
27
|
+
showDialog({ message: '提交成功' }).then(() => {
|
|
28
|
+
console.log('12121')
|
|
29
|
+
// history.back()
|
|
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
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
66
|
+
<template #layout_content>
|
|
67
|
+
<!-- v-if="isInit" -->
|
|
68
|
+
<XFormGroup
|
|
69
|
+
ref="formGroup"
|
|
70
|
+
config-name="ApplyAddContractFormGroup"
|
|
71
|
+
service-name="af-apply"
|
|
72
|
+
:group-form-data="formData"
|
|
73
|
+
mode="新增"
|
|
74
|
+
@submit="submit"
|
|
75
|
+
/>
|
|
76
|
+
</template>
|
|
77
|
+
</NormalDataLayout>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<style scoped lang="less">
|
|
81
|
+
|
|
82
|
+
</style>
|
|
@@ -1,41 +1,42 @@
|
|
|
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 { ref } from 'vue'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
'
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
:form
|
|
33
|
-
@on-submit="onSubmit"
|
|
34
|
-
/>
|
|
35
|
-
</template>
|
|
36
|
-
</NormalDataLayout>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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 { ref } from 'vue'
|
|
5
|
+
import {
|
|
6
|
+
Button as VanButton,
|
|
7
|
+
} from 'vant'
|
|
8
|
+
|
|
9
|
+
const configName = ref('测试Form')
|
|
10
|
+
const serviceName = ref('af-safecheck')
|
|
11
|
+
const formGroupAddConstruction = ref()
|
|
12
|
+
|
|
13
|
+
// 提交测试
|
|
14
|
+
function onSubmit(form) {
|
|
15
|
+
console.log('事件触发提交表单----', form)
|
|
16
|
+
}
|
|
17
|
+
async function onAsyncSubmit() {
|
|
18
|
+
const res = await formGroupAddConstruction.value.asyncSubmit()
|
|
19
|
+
console.log('异步提交表单----', res)
|
|
20
|
+
}
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
25
|
+
<template #layout_content>
|
|
26
|
+
<XForm
|
|
27
|
+
ref="formGroupAddConstruction"
|
|
28
|
+
mode="新增"
|
|
29
|
+
:config-name="configName"
|
|
30
|
+
:show-tab-header="false"
|
|
31
|
+
service-name="af-safecheck"
|
|
32
|
+
:is-group-form="true"
|
|
33
|
+
@on-submit="onSubmit"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
</NormalDataLayout>
|
|
37
|
+
<van-button type="primary" @click="onAsyncSubmit">提交</van-button>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<style scoped lang="less">
|
|
41
|
+
|
|
42
|
+
</style>
|
|
@@ -329,14 +329,18 @@ watch(() => props.visible, (newVal) => {
|
|
|
329
329
|
.van-field__label {
|
|
330
330
|
color: #333;
|
|
331
331
|
font-weight: 500;
|
|
332
|
+
display: flex;
|
|
333
|
+
align-items: center;
|
|
332
334
|
}
|
|
333
335
|
|
|
334
336
|
.van-field__control {
|
|
335
337
|
color: #333;
|
|
338
|
+
padding-right: 40px;
|
|
336
339
|
}
|
|
337
340
|
|
|
338
341
|
.van-field__right-icon {
|
|
339
|
-
padding:
|
|
342
|
+
padding: 8px;
|
|
343
|
+
min-width: 32px;
|
|
340
344
|
}
|
|
341
345
|
}
|
|
342
346
|
|
|
@@ -3,7 +3,8 @@ import type { PhoneLocationStatus } from '@af-mobile-client-vue3/components/data
|
|
|
3
3
|
import useSettingStore from '@af-mobile-client-vue3/stores/modules/setting'
|
|
4
4
|
import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
|
|
5
5
|
import { mobileUtil } from '@af-mobile-client-vue3/utils/mobileUtil'
|
|
6
|
-
import { Dialog as vanDialog, Icon as vanIcon
|
|
6
|
+
import { Dialog as vanDialog, Icon as vanIcon, Sticky as VanSticky,
|
|
7
|
+
} from 'vant'
|
|
7
8
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|
8
9
|
import { useRouter } from 'vue-router'
|
|
9
10
|
import ModifyPassword from './comm/ModifyPassword.vue'
|
|
@@ -155,16 +156,18 @@ const webMobileConfig = useSettingStore().getSetting()
|
|
|
155
156
|
<template>
|
|
156
157
|
<main class="my_main">
|
|
157
158
|
<!-- 顶部导航栏 -->
|
|
158
|
-
<
|
|
159
|
-
<
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
159
|
+
<VanSticky :offset-top="0">
|
|
160
|
+
<nav class="header_nav">
|
|
161
|
+
<div class="header_content">
|
|
162
|
+
<h1 class="main_title">
|
|
163
|
+
我的
|
|
164
|
+
</h1>
|
|
165
|
+
<!-- <div class="setting_section"> -->
|
|
166
|
+
<!-- <van-icon name="setting-o" class="setting-icon" /> -->
|
|
167
|
+
<!-- </div> -->
|
|
168
|
+
</div>
|
|
169
|
+
</nav>
|
|
170
|
+
</VanSticky>
|
|
168
171
|
|
|
169
172
|
<!-- 主要内容区域 -->
|
|
170
173
|
<div class="content">
|
|
@@ -276,7 +279,6 @@ const webMobileConfig = useSettingStore().getSetting()
|
|
|
276
279
|
|
|
277
280
|
<style scoped lang="less">
|
|
278
281
|
.my_main {
|
|
279
|
-
min-height: 100vh;
|
|
280
282
|
background-color: #f7f8fa;
|
|
281
283
|
|
|
282
284
|
// 顶部导航栏
|