af-mobile-client-vue3 1.4.2 → 1.4.3
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 +115 -115
- package/src/api/user/index.ts +45 -45
- package/src/components/data/XCellList/index.vue +8 -0
- package/src/components/data/XCellListFilter/index.vue +8 -0
- package/src/components/data/XFormItem/index.vue +1601 -1581
- package/src/router/guards.ts +131 -131
- package/src/router/routes.ts +1 -1
- package/src/services/api/Login.ts +6 -6
- package/src/services/v3Api.ts +170 -170
- package/src/stores/modules/user.ts +362 -362
- package/src/styles/login.less +109 -109
- package/src/types/platform.ts +194 -194
- package/src/utils/platform-auth.ts +150 -150
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/utils/wechat.ts +297 -297
- package/src/views/component/XCellListView/index.vue +138 -107
- package/src/views/component/XFormGroupView/index.vue +82 -78
- package/src/views/component/XFormView/index.vue +46 -41
- package/src/views/external/index.vue +158 -158
- package/src/views/loading/AuthLoading.vue +395 -395
- package/src/views/user/register/index.vue +958 -958
- package/vite.config.ts +115 -115
- package/certs/127.0.0.1+2-key.pem +0 -28
- package/certs/127.0.0.1+2.pem +0 -27
- package/mock/modules/prose.mock.ts.timestamp-1758877157774.mjs +0 -53
- package/mock/modules/user.mock.ts.timestamp-1758877157774.mjs +0 -97
|
@@ -1,107 +1,138 @@
|
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
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
|
-
//
|
|
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
|
-
|
|
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 { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
5
|
+
import { defineEmits, ref } from 'vue'
|
|
6
|
+
import { useRouter } from 'vue-router'
|
|
7
|
+
|
|
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()
|
|
17
|
+
// 访问路由
|
|
18
|
+
const router = useRouter()
|
|
19
|
+
// 获取默认值
|
|
20
|
+
const idKey = ref('o_id')
|
|
21
|
+
|
|
22
|
+
// 简易crud表单测试
|
|
23
|
+
const configName = ref('lngChargeAuditMobileCRUD')
|
|
24
|
+
const serviceName = ref('af-gaslink')
|
|
25
|
+
|
|
26
|
+
// 资源权限测试
|
|
27
|
+
// const configName = ref('crud_sources_test')
|
|
28
|
+
// const serviceName = ref('af-system')
|
|
29
|
+
|
|
30
|
+
// 实际业务测试
|
|
31
|
+
// const configName = ref('lngChargeAuditMobileCRUD')
|
|
32
|
+
// const serviceName = ref('af-gaslink')
|
|
33
|
+
|
|
34
|
+
// 跳转到详情页面
|
|
35
|
+
// function toDetail(item) {
|
|
36
|
+
// router.push({
|
|
37
|
+
// name: 'XCellDetailView',
|
|
38
|
+
// params: { id: item[idKey.value] }, // 如果使用命名路由,推荐使用路由参数而不是直接构建 URL
|
|
39
|
+
// query: {
|
|
40
|
+
// operName: item[operNameKey.value],
|
|
41
|
+
// method:item[methodKey.value],
|
|
42
|
+
// requestMethod:item[requestMethodKey.value],
|
|
43
|
+
// operatorType:item[operatorTypeKey.value],
|
|
44
|
+
// operUrl:item[operUrlKey.value],
|
|
45
|
+
// operIp:item[operIpKey.value],
|
|
46
|
+
// costTime:item[costTimeKey.value],
|
|
47
|
+
// operTime:item[operTimeKey.value],
|
|
48
|
+
//
|
|
49
|
+
// title: item[titleKey.value],
|
|
50
|
+
// businessType: item[businessTypeKey.value],
|
|
51
|
+
// status:item[statusKey.value]
|
|
52
|
+
// }
|
|
53
|
+
// })
|
|
54
|
+
// }
|
|
55
|
+
|
|
56
|
+
// 跳转到表单——以表单组来渲染纯表单
|
|
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
|
+
}
|
|
67
|
+
|
|
68
|
+
// 新增功能
|
|
69
|
+
// function addOption(totalCount) {
|
|
70
|
+
// router.push({
|
|
71
|
+
// name: 'XFormView',
|
|
72
|
+
// params: { id: totalCount, openid: totalCount },
|
|
73
|
+
// query: {
|
|
74
|
+
// configName: configName.value,
|
|
75
|
+
// serviceName: serviceName.value,
|
|
76
|
+
// mode: '新增',
|
|
77
|
+
// },
|
|
78
|
+
// })
|
|
79
|
+
// }
|
|
80
|
+
|
|
81
|
+
// 修改功能
|
|
82
|
+
// function updateRow(result) {
|
|
83
|
+
// router.push({
|
|
84
|
+
// name: 'XFormView',
|
|
85
|
+
// params: { id: result.o_id, openid: result.o_id },
|
|
86
|
+
// query: {
|
|
87
|
+
// configName: configName.value,
|
|
88
|
+
// serviceName: serviceName.value,
|
|
89
|
+
// mode: '修改',
|
|
90
|
+
// },
|
|
91
|
+
// })
|
|
92
|
+
// }
|
|
93
|
+
|
|
94
|
+
// 删除功能
|
|
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
|
+
}
|
|
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,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,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 { 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
|
-
:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
+
function emitFunc(func, data) {
|
|
22
|
+
console.log('emitFunc:', func, data)
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
28
|
+
<template #layout_content>
|
|
29
|
+
<XForm
|
|
30
|
+
ref="formGroupAddConstruction"
|
|
31
|
+
mode="新增"
|
|
32
|
+
:config-name="configName"
|
|
33
|
+
:show-tab-header="false"
|
|
34
|
+
service-name="af-safecheck"
|
|
35
|
+
:is-group-form="true"
|
|
36
|
+
@on-submit="onSubmit"
|
|
37
|
+
@x-form-item-emit-func="emitFunc"
|
|
38
|
+
/>
|
|
39
|
+
</template>
|
|
40
|
+
</NormalDataLayout>
|
|
41
|
+
<van-button type="primary" @click="onAsyncSubmit">提交</van-button>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<style scoped lang="less">
|
|
45
|
+
|
|
46
|
+
</style>
|