af-mobile-client-vue3 1.3.62 → 1.3.64
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
CHANGED
|
@@ -141,7 +141,7 @@ const previewLonLatKey = computed(() => {
|
|
|
141
141
|
|
|
142
142
|
const previewMapPoint = computed(() => {
|
|
143
143
|
const val = form.value[previewLonLatKey.value]
|
|
144
|
-
if (val && typeof val === 'string' && val.includes(',')) {
|
|
144
|
+
if (previewMapRef.value && val && typeof val === 'string' && val.includes(',')) {
|
|
145
145
|
const [lon, lat] = val.split(',').map(Number)
|
|
146
146
|
if (!Number.isNaN(lon) && !Number.isNaN(lat)) {
|
|
147
147
|
return [lon, lat]
|
|
@@ -623,7 +623,7 @@ defineExpose({ init, form, formGroupName, validate, asyncSubmit, setForm, getFor
|
|
|
623
623
|
</VanCellGroup>
|
|
624
624
|
<slot name="extraCellGroup" />
|
|
625
625
|
<!-- 地图预览,统一放在表单项下方,只在有经纬度时显示 -->
|
|
626
|
-
<div v-if="previewMapPoint" style="height: 200px; margin-top: 12px; position: relative;">
|
|
626
|
+
<div v-if="previewLonLatKey" v-show="previewMapPoint" style="height: 200px; margin-top: 12px; position: relative;">
|
|
627
627
|
<XOlMap
|
|
628
628
|
ref="previewMapRef"
|
|
629
629
|
:center="previewMapPoint"
|
|
@@ -591,10 +591,7 @@ function init() {
|
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
function getDataCallback(res) {
|
|
594
|
-
option.value = res
|
|
595
|
-
...item,
|
|
596
|
-
value: item.label, // 将value设置为label的值
|
|
597
|
-
}))
|
|
594
|
+
option.value = res
|
|
598
595
|
if (attr.type === 'radio')
|
|
599
596
|
initRadioValue()
|
|
600
597
|
}
|
|
@@ -1,134 +1,134 @@
|
|
|
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
|
-
</script>
|
|
115
|
-
|
|
116
|
-
<template>
|
|
117
|
-
<NormalDataLayout id="XCellListView" title="工作计划">
|
|
118
|
-
<template #layout_content>
|
|
119
|
-
<XCellList
|
|
120
|
-
config-name="
|
|
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"
|
|
128
|
-
/>
|
|
129
|
-
</template>
|
|
130
|
-
</NormalDataLayout>
|
|
131
|
-
</template>
|
|
132
|
-
|
|
133
|
-
<style scoped lang="less">
|
|
134
|
-
</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 { 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
|
+
</script>
|
|
115
|
+
|
|
116
|
+
<template>
|
|
117
|
+
<NormalDataLayout id="XCellListView" title="工作计划">
|
|
118
|
+
<template #layout_content>
|
|
119
|
+
<XCellList
|
|
120
|
+
config-name="saleOrderAuditMobileCRUD"
|
|
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"
|
|
128
|
+
/>
|
|
129
|
+
</template>
|
|
130
|
+
</NormalDataLayout>
|
|
131
|
+
</template>
|
|
132
|
+
|
|
133
|
+
<style scoped lang="less">
|
|
134
|
+
</style>
|
|
@@ -1,42 +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
|
-
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>
|
|
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>
|
package/vite.config.ts
CHANGED
|
@@ -85,6 +85,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|
|
85
85
|
'~': path.join(__dirname, './src/assets'),
|
|
86
86
|
'~root': path.join(__dirname, '.'),
|
|
87
87
|
'@af-mobile-client-vue3': path.join(__dirname, './src'),
|
|
88
|
+
'xml-utils': path.resolve(__dirname, 'node_modules/xml-utils'),
|
|
88
89
|
},
|
|
89
90
|
},
|
|
90
91
|
|