af-mobile-client-vue3 1.2.20 → 1.2.21
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
|
@@ -408,6 +408,10 @@ function prepareForm() {
|
|
|
408
408
|
return cleanedForm
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
+
function getFormData() {
|
|
412
|
+
return prepareForm()
|
|
413
|
+
}
|
|
414
|
+
|
|
411
415
|
async function onSubmit() {
|
|
412
416
|
await validate()
|
|
413
417
|
// 清理表单数据
|
|
@@ -447,7 +451,7 @@ function emitFunc(func, data, value) {
|
|
|
447
451
|
watch(() => props.formData, (_val) => {
|
|
448
452
|
form.value = _val
|
|
449
453
|
})
|
|
450
|
-
defineExpose({ init, form, formGroupName, validate, asyncSubmit, setForm })
|
|
454
|
+
defineExpose({ init, form, formGroupName, validate, asyncSubmit, setForm, getFormData })
|
|
451
455
|
</script>
|
|
452
456
|
|
|
453
457
|
<template>
|
|
@@ -1159,6 +1159,7 @@ function emitFunc(func, data) {
|
|
|
1159
1159
|
<!-- 文本输入框 -->
|
|
1160
1160
|
<VanField
|
|
1161
1161
|
v-if="(attr.type === 'input' || attr.type === 'intervalPicker') && showItem"
|
|
1162
|
+
v-model="(modelData as string)"
|
|
1162
1163
|
:label="labelData"
|
|
1163
1164
|
:label-align="labelAlign"
|
|
1164
1165
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
@@ -1173,11 +1174,13 @@ function emitFunc(func, data) {
|
|
|
1173
1174
|
>
|
|
1174
1175
|
<template #input>
|
|
1175
1176
|
<input
|
|
1176
|
-
|
|
1177
|
+
:value="modelData"
|
|
1177
1178
|
:readonly="readonly || (attr.inputOnAfterName && attr.inputOnAfterFunc && !attr.inputOnAfterName.includes('|'))"
|
|
1178
1179
|
class="van-field__control"
|
|
1179
1180
|
:placeholder="placeholder"
|
|
1180
1181
|
style="flex: 1; min-width: 0;"
|
|
1182
|
+
@input="e => modelData = (e.target as HTMLInputElement).value"
|
|
1183
|
+
@blur="() => formTypeCheck(attr, modelData as string)"
|
|
1181
1184
|
>
|
|
1182
1185
|
<VanButton
|
|
1183
1186
|
v-if="attr.inputOnAfterName && attr.inputOnAfterFunc && !attr.inputOnAfterName.includes('|')"
|
|
@@ -1,107 +1,29 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
|
-
import
|
|
4
|
-
import { defineEmits, ref } from 'vue'
|
|
3
|
+
import { ref } from 'vue'
|
|
5
4
|
import { useRouter } from 'vue-router'
|
|
6
5
|
|
|
7
|
-
// 定义事件
|
|
8
|
-
const emit = defineEmits(['deleteRow'])
|
|
9
|
-
// 访问路由
|
|
10
6
|
const router = useRouter()
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const serviceName = ref('af-gaslink')
|
|
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
|
-
})
|
|
7
|
+
const configName = ref('ApplyContractPhoneCRUD')
|
|
8
|
+
const xCellListSupplementalAgreement = ref()
|
|
9
|
+
// 详情
|
|
10
|
+
function add(row) {
|
|
11
|
+
console.log('>>>> 新增')
|
|
58
12
|
}
|
|
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)
|
|
13
|
+
function cancellation(row) {
|
|
14
|
+
console.log('>>>> 作废')
|
|
89
15
|
}
|
|
90
16
|
</script>
|
|
91
17
|
|
|
92
18
|
<template>
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
@delete-row="deleteRow"
|
|
102
|
-
/>
|
|
103
|
-
</template>
|
|
104
|
-
</NormalDataLayout>
|
|
19
|
+
<XCellList
|
|
20
|
+
ref="xCellListSupplementalAgreement"
|
|
21
|
+
service-name="af-apply"
|
|
22
|
+
:config-name="configName"
|
|
23
|
+
:custom-add="true"
|
|
24
|
+
@add="add"
|
|
25
|
+
@cancellation="cancellation"
|
|
26
|
+
/>
|
|
105
27
|
</template>
|
|
106
28
|
|
|
107
29
|
<style scoped lang="less">
|