vue2-client 1.17.51 → 1.18.1
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
|
@@ -1,125 +1,125 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-card :bordered="false">
|
|
3
|
-
<x-form-table
|
|
4
|
-
title="示例表单"
|
|
5
|
-
:queryParamsName="queryParamsName"
|
|
6
|
-
:fixedAddForm="fixedAddForm"
|
|
7
|
-
:externalSelectedRowKeys="selectedKeys"
|
|
8
|
-
@action="action"
|
|
9
|
-
@selectRow="selectRow"
|
|
10
|
-
@columnClick="columnClick"
|
|
11
|
-
@ceshi="ceshi"
|
|
12
|
-
:defaultQueryForm="{
|
|
13
|
-
s_f_user_name: '张三'
|
|
14
|
-
}"
|
|
15
|
-
serviceName="af-system"
|
|
16
|
-
ref="xFormTable"
|
|
17
|
-
>
|
|
18
|
-
<template #formBtnExpand>
|
|
19
|
-
<a-button @click="defaultF">默认</a-button>
|
|
20
|
-
<a-button @click="middleF">中等</a-button>
|
|
21
|
-
<a-button @click="smallF">小</a-button>
|
|
22
|
-
</template>
|
|
23
|
-
</x-form-table>
|
|
24
|
-
<div style="height: 100px;width: 100%; background-color: #F7FAFC;">
|
|
25
|
-
</div>
|
|
26
|
-
<div style="height: 100px; width: 100%; background-color: #f0f2f5;">
|
|
27
|
-
</div>
|
|
28
|
-
</a-card>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script>
|
|
32
|
-
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
|
|
33
|
-
import { microDispatch } from '@vue2-client/utils/microAppUtils'
|
|
34
|
-
|
|
35
|
-
export default {
|
|
36
|
-
name: 'Demo',
|
|
37
|
-
components: {
|
|
38
|
-
XFormTable,
|
|
39
|
-
},
|
|
40
|
-
data () {
|
|
41
|
-
return {
|
|
42
|
-
// 查询配置文件名
|
|
43
|
-
queryParamsName: 'ceshiCRUD',
|
|
44
|
-
// 查询配置左侧tree
|
|
45
|
-
xTreeConfigName: 'addressType',
|
|
46
|
-
// 新增表单固定值
|
|
47
|
-
fixedAddForm: {},
|
|
48
|
-
// 是否显示详情抽屉
|
|
49
|
-
detailVisible: false,
|
|
50
|
-
// 当前记录
|
|
51
|
-
record: {},
|
|
52
|
-
// 选中的行keys
|
|
53
|
-
selectedKeys: [],
|
|
54
|
-
selected: {
|
|
55
|
-
keys: [],
|
|
56
|
-
rows: [],
|
|
57
|
-
},
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
methods: {
|
|
61
|
-
// input框 行編輯參數傳遞
|
|
62
|
-
ceshi (...args) {
|
|
63
|
-
// attr, value, currentRecord, currentIndex, nextRecord, nextIndex
|
|
64
|
-
const [attr, value, currentRecord, currentIndex, nextRecord, nextIndex] =
|
|
65
|
-
args
|
|
66
|
-
console.log(
|
|
67
|
-
'ceshi',
|
|
68
|
-
attr,
|
|
69
|
-
value,
|
|
70
|
-
currentRecord,
|
|
71
|
-
currentIndex,
|
|
72
|
-
nextRecord,
|
|
73
|
-
nextIndex
|
|
74
|
-
)
|
|
75
|
-
// 示例:当按下 Enter 键且有下一行时,跳转到下一行的同一列
|
|
76
|
-
// 可以在这里执行业务逻辑(例如:保存数据)
|
|
77
|
-
console.log('当前行:', currentIndex, '下一行:', nextIndex)
|
|
78
|
-
if (!nextIndex) {
|
|
79
|
-
this.$message.warning('没有下一行')
|
|
80
|
-
return
|
|
81
|
-
}
|
|
82
|
-
// 跳转到下一行的同一列
|
|
83
|
-
this.$refs.xFormTable.$refs.xTable.focusInput(nextIndex, attr.model)
|
|
84
|
-
},
|
|
85
|
-
test () {
|
|
86
|
-
this.$refs.xFormTable.setTableData([])
|
|
87
|
-
},
|
|
88
|
-
defaultF () {
|
|
89
|
-
this.$refs.xFormTable.setTableSize('default')
|
|
90
|
-
},
|
|
91
|
-
middleF () {
|
|
92
|
-
this.$refs.xFormTable.setTableSize('middle')
|
|
93
|
-
},
|
|
94
|
-
smallF () {
|
|
95
|
-
this.$refs.xFormTable.setTableSize('small')
|
|
96
|
-
},
|
|
97
|
-
columnClick (key, value, record) {
|
|
98
|
-
microDispatch({
|
|
99
|
-
type: 'v3route',
|
|
100
|
-
path: '/bingliguanli/dianzibingliluru',
|
|
101
|
-
props: { selected: arguments[0].his_f_admission_id },
|
|
102
|
-
})
|
|
103
|
-
},
|
|
104
|
-
action (record, id, actionType) {
|
|
105
|
-
this.detailVisible = true
|
|
106
|
-
console.log('触发了详情操作', record, id, actionType)
|
|
107
|
-
},
|
|
108
|
-
onClose () {
|
|
109
|
-
this.detailVisible = false
|
|
110
|
-
// 关闭详情之后重新查询表单
|
|
111
|
-
this.$refs.xFormTable.refreshTable(true)
|
|
112
|
-
},
|
|
113
|
-
selectRow (selectedRowKeys, selectedRows) {
|
|
114
|
-
this.selected = {
|
|
115
|
-
keys: selectedRowKeys,
|
|
116
|
-
rows: selectedRows,
|
|
117
|
-
}
|
|
118
|
-
console.log('selectedDemo', this.selected)
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
computed: {},
|
|
122
|
-
}
|
|
123
|
-
</script>
|
|
124
|
-
|
|
125
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-card :bordered="false">
|
|
3
|
+
<x-form-table
|
|
4
|
+
title="示例表单"
|
|
5
|
+
:queryParamsName="queryParamsName"
|
|
6
|
+
:fixedAddForm="fixedAddForm"
|
|
7
|
+
:externalSelectedRowKeys="selectedKeys"
|
|
8
|
+
@action="action"
|
|
9
|
+
@selectRow="selectRow"
|
|
10
|
+
@columnClick="columnClick"
|
|
11
|
+
@ceshi="ceshi"
|
|
12
|
+
:defaultQueryForm="{
|
|
13
|
+
s_f_user_name: '张三'
|
|
14
|
+
}"
|
|
15
|
+
serviceName="af-system"
|
|
16
|
+
ref="xFormTable"
|
|
17
|
+
>
|
|
18
|
+
<template #formBtnExpand>
|
|
19
|
+
<a-button @click="defaultF">默认</a-button>
|
|
20
|
+
<a-button @click="middleF">中等</a-button>
|
|
21
|
+
<a-button @click="smallF">小</a-button>
|
|
22
|
+
</template>
|
|
23
|
+
</x-form-table>
|
|
24
|
+
<div style="height: 100px;width: 100%; background-color: #F7FAFC;">
|
|
25
|
+
</div>
|
|
26
|
+
<div style="height: 100px; width: 100%; background-color: #f0f2f5;">
|
|
27
|
+
</div>
|
|
28
|
+
</a-card>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
|
|
33
|
+
import { microDispatch } from '@vue2-client/utils/microAppUtils'
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
name: 'Demo',
|
|
37
|
+
components: {
|
|
38
|
+
XFormTable,
|
|
39
|
+
},
|
|
40
|
+
data () {
|
|
41
|
+
return {
|
|
42
|
+
// 查询配置文件名
|
|
43
|
+
queryParamsName: 'ceshiCRUD',
|
|
44
|
+
// 查询配置左侧tree
|
|
45
|
+
xTreeConfigName: 'addressType',
|
|
46
|
+
// 新增表单固定值
|
|
47
|
+
fixedAddForm: {},
|
|
48
|
+
// 是否显示详情抽屉
|
|
49
|
+
detailVisible: false,
|
|
50
|
+
// 当前记录
|
|
51
|
+
record: {},
|
|
52
|
+
// 选中的行keys
|
|
53
|
+
selectedKeys: [],
|
|
54
|
+
selected: {
|
|
55
|
+
keys: [],
|
|
56
|
+
rows: [],
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
// input框 行編輯參數傳遞
|
|
62
|
+
ceshi (...args) {
|
|
63
|
+
// attr, value, currentRecord, currentIndex, nextRecord, nextIndex
|
|
64
|
+
const [attr, value, currentRecord, currentIndex, nextRecord, nextIndex] =
|
|
65
|
+
args
|
|
66
|
+
console.log(
|
|
67
|
+
'ceshi',
|
|
68
|
+
attr,
|
|
69
|
+
value,
|
|
70
|
+
currentRecord,
|
|
71
|
+
currentIndex,
|
|
72
|
+
nextRecord,
|
|
73
|
+
nextIndex
|
|
74
|
+
)
|
|
75
|
+
// 示例:当按下 Enter 键且有下一行时,跳转到下一行的同一列
|
|
76
|
+
// 可以在这里执行业务逻辑(例如:保存数据)
|
|
77
|
+
console.log('当前行:', currentIndex, '下一行:', nextIndex)
|
|
78
|
+
if (!nextIndex) {
|
|
79
|
+
this.$message.warning('没有下一行')
|
|
80
|
+
return
|
|
81
|
+
}
|
|
82
|
+
// 跳转到下一行的同一列
|
|
83
|
+
this.$refs.xFormTable.$refs.xTable.focusInput(nextIndex, attr.model)
|
|
84
|
+
},
|
|
85
|
+
test () {
|
|
86
|
+
this.$refs.xFormTable.setTableData([])
|
|
87
|
+
},
|
|
88
|
+
defaultF () {
|
|
89
|
+
this.$refs.xFormTable.setTableSize('default')
|
|
90
|
+
},
|
|
91
|
+
middleF () {
|
|
92
|
+
this.$refs.xFormTable.setTableSize('middle')
|
|
93
|
+
},
|
|
94
|
+
smallF () {
|
|
95
|
+
this.$refs.xFormTable.setTableSize('small')
|
|
96
|
+
},
|
|
97
|
+
columnClick (key, value, record) {
|
|
98
|
+
microDispatch({
|
|
99
|
+
type: 'v3route',
|
|
100
|
+
path: '/bingliguanli/dianzibingliluru',
|
|
101
|
+
props: { selected: arguments[0].his_f_admission_id },
|
|
102
|
+
})
|
|
103
|
+
},
|
|
104
|
+
action (record, id, actionType) {
|
|
105
|
+
this.detailVisible = true
|
|
106
|
+
console.log('触发了详情操作', record, id, actionType)
|
|
107
|
+
},
|
|
108
|
+
onClose () {
|
|
109
|
+
this.detailVisible = false
|
|
110
|
+
// 关闭详情之后重新查询表单
|
|
111
|
+
this.$refs.xFormTable.refreshTable(true)
|
|
112
|
+
},
|
|
113
|
+
selectRow (selectedRowKeys, selectedRows) {
|
|
114
|
+
this.selected = {
|
|
115
|
+
keys: selectedRowKeys,
|
|
116
|
+
rows: selectedRows,
|
|
117
|
+
}
|
|
118
|
+
console.log('selectedDemo', this.selected)
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
computed: {},
|
|
122
|
+
}
|
|
123
|
+
</script>
|
|
124
|
+
|
|
125
|
+
<style scoped></style>
|