vue2-client 1.17.51 → 1.18.2
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/base-client/components/common/XFormTable/XFormTable.vue +5 -0
- package/src/base-client/components/common/XFormTable/demo.vue +129 -125
- package/src/base-client/components/common/XTable/XTable.vue +6 -1
- package/src/base-client/components/common/XTable/XTableWrapper.vue +743 -738
- package/src/components/STable/index.js +22 -5
- package/src/config/default/antd.config.js +2 -2
package/package.json
CHANGED
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
@editButtonStateDataClick="editButtonStateDataClick"
|
|
87
87
|
@importExcelOk="importExcelOk"
|
|
88
88
|
@rowClick="handleRowClick"
|
|
89
|
+
@rowDblClick="handleRowDblClick"
|
|
89
90
|
@beforeDataChange="beforeDataChange"
|
|
90
91
|
@expand="onExpand">
|
|
91
92
|
<template slot="leftButton" slot-scope="{selectedRowKeys, selectedRows}">
|
|
@@ -150,6 +151,7 @@
|
|
|
150
151
|
@editButtonStateDataClick="editButtonStateDataClick"
|
|
151
152
|
@importExcelOk="importExcelOk"
|
|
152
153
|
@rowClick="handleRowClick"
|
|
154
|
+
@rowDblClick="handleRowDblClick"
|
|
153
155
|
@beforeDataChange="beforeDataChange"
|
|
154
156
|
@expand="onExpand">
|
|
155
157
|
<template slot="leftButton" slot-scope="{selectedRowKeys, selectedRows}">
|
|
@@ -1046,6 +1048,9 @@ export default {
|
|
|
1046
1048
|
handleRowClick (record) {
|
|
1047
1049
|
this.$emit('rowClick', record)
|
|
1048
1050
|
},
|
|
1051
|
+
handleRowDblClick (record) {
|
|
1052
|
+
this.$emit('rowDblClick', record)
|
|
1053
|
+
},
|
|
1049
1054
|
beforeDataChange (record) {
|
|
1050
1055
|
this.$emit('beforeDataChange', record)
|
|
1051
1056
|
},
|
|
@@ -1,125 +1,129 @@
|
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<a-button @click="
|
|
21
|
-
<a-button @click="
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
import
|
|
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
|
-
},
|
|
108
|
-
|
|
109
|
-
this.detailVisible =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
+
@rowDblClick="rowDblClick"
|
|
13
|
+
:defaultQueryForm="{
|
|
14
|
+
s_f_user_name: '张三'
|
|
15
|
+
}"
|
|
16
|
+
serviceName="af-system"
|
|
17
|
+
ref="xFormTable"
|
|
18
|
+
>
|
|
19
|
+
<template #formBtnExpand>
|
|
20
|
+
<a-button @click="defaultF">默认</a-button>
|
|
21
|
+
<a-button @click="middleF">中等</a-button>
|
|
22
|
+
<a-button @click="smallF">小</a-button>
|
|
23
|
+
</template>
|
|
24
|
+
</x-form-table>
|
|
25
|
+
<div style="height: 100px;width: 100%; background-color: #F7FAFC;">
|
|
26
|
+
</div>
|
|
27
|
+
<div style="height: 100px; width: 100%; background-color: #f0f2f5;">
|
|
28
|
+
</div>
|
|
29
|
+
</a-card>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
|
|
34
|
+
import { microDispatch } from '@vue2-client/utils/microAppUtils'
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'Demo',
|
|
38
|
+
components: {
|
|
39
|
+
XFormTable,
|
|
40
|
+
},
|
|
41
|
+
data () {
|
|
42
|
+
return {
|
|
43
|
+
// 查询配置文件名
|
|
44
|
+
queryParamsName: 'ceshiCRUD',
|
|
45
|
+
// 查询配置左侧tree
|
|
46
|
+
xTreeConfigName: 'addressType',
|
|
47
|
+
// 新增表单固定值
|
|
48
|
+
fixedAddForm: {},
|
|
49
|
+
// 是否显示详情抽屉
|
|
50
|
+
detailVisible: false,
|
|
51
|
+
// 当前记录
|
|
52
|
+
record: {},
|
|
53
|
+
// 选中的行keys
|
|
54
|
+
selectedKeys: [],
|
|
55
|
+
selected: {
|
|
56
|
+
keys: [],
|
|
57
|
+
rows: [],
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
rowDblClick (record) {
|
|
63
|
+
console.log('rowDblClick', record)
|
|
64
|
+
},
|
|
65
|
+
// input框 行編輯參數傳遞
|
|
66
|
+
ceshi (...args) {
|
|
67
|
+
// attr, value, currentRecord, currentIndex, nextRecord, nextIndex
|
|
68
|
+
const [attr, value, currentRecord, currentIndex, nextRecord, nextIndex] =
|
|
69
|
+
args
|
|
70
|
+
console.log(
|
|
71
|
+
'ceshi',
|
|
72
|
+
attr,
|
|
73
|
+
value,
|
|
74
|
+
currentRecord,
|
|
75
|
+
currentIndex,
|
|
76
|
+
nextRecord,
|
|
77
|
+
nextIndex
|
|
78
|
+
)
|
|
79
|
+
// 示例:当按下 Enter 键且有下一行时,跳转到下一行的同一列
|
|
80
|
+
// 可以在这里执行业务逻辑(例如:保存数据)
|
|
81
|
+
console.log('当前行:', currentIndex, '下一行:', nextIndex)
|
|
82
|
+
if (!nextIndex) {
|
|
83
|
+
this.$message.warning('没有下一行')
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
// 跳转到下一行的同一列
|
|
87
|
+
this.$refs.xFormTable.$refs.xTable.focusInput(nextIndex, attr.model)
|
|
88
|
+
},
|
|
89
|
+
test () {
|
|
90
|
+
this.$refs.xFormTable.setTableData([])
|
|
91
|
+
},
|
|
92
|
+
defaultF () {
|
|
93
|
+
this.$refs.xFormTable.setTableSize('default')
|
|
94
|
+
},
|
|
95
|
+
middleF () {
|
|
96
|
+
this.$refs.xFormTable.setTableSize('middle')
|
|
97
|
+
},
|
|
98
|
+
smallF () {
|
|
99
|
+
this.$refs.xFormTable.setTableSize('small')
|
|
100
|
+
},
|
|
101
|
+
columnClick (key, value, record) {
|
|
102
|
+
microDispatch({
|
|
103
|
+
type: 'v3route',
|
|
104
|
+
path: '/bingliguanli/dianzibingliluru',
|
|
105
|
+
props: { selected: arguments[0].his_f_admission_id },
|
|
106
|
+
})
|
|
107
|
+
},
|
|
108
|
+
action (record, id, actionType) {
|
|
109
|
+
this.detailVisible = true
|
|
110
|
+
console.log('触发了详情操作', record, id, actionType)
|
|
111
|
+
},
|
|
112
|
+
onClose () {
|
|
113
|
+
this.detailVisible = false
|
|
114
|
+
// 关闭详情之后重新查询表单
|
|
115
|
+
this.$refs.xFormTable.refreshTable(true)
|
|
116
|
+
},
|
|
117
|
+
selectRow (selectedRowKeys, selectedRows) {
|
|
118
|
+
this.selected = {
|
|
119
|
+
keys: selectedRowKeys,
|
|
120
|
+
rows: selectedRows,
|
|
121
|
+
}
|
|
122
|
+
console.log('selectedDemo', this.selected)
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
computed: {},
|
|
126
|
+
}
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<style scoped></style>
|
|
@@ -167,6 +167,7 @@
|
|
|
167
167
|
:queryParamsName="queryParamsName"
|
|
168
168
|
:disableAction="disableAction"
|
|
169
169
|
@rowClick="handleRowClick"
|
|
170
|
+
@rowDblClick="handleRowDblClick"
|
|
170
171
|
@beforeDataChange="beforeDataChange"
|
|
171
172
|
@expand="onExpand">
|
|
172
173
|
<template slot="expandedRowRender">
|
|
@@ -278,7 +279,8 @@
|
|
|
278
279
|
ref="selectedDataTable"
|
|
279
280
|
:load-selected-data="true"
|
|
280
281
|
@beforeDataChange="beforeDataChange"
|
|
281
|
-
@rowClick="handleRowClick"
|
|
282
|
+
@rowClick="handleRowClick"
|
|
283
|
+
@rowDblClick="handleRowDblClick">
|
|
282
284
|
</x-table-wrapper>
|
|
283
285
|
</a-modal>
|
|
284
286
|
</div>
|
|
@@ -1564,6 +1566,9 @@ export default {
|
|
|
1564
1566
|
handleRowClick (record) {
|
|
1565
1567
|
this.$emit('rowClick', record)
|
|
1566
1568
|
},
|
|
1569
|
+
handleRowDblClick (record) {
|
|
1570
|
+
this.$emit('rowDblClick', record)
|
|
1571
|
+
},
|
|
1567
1572
|
beforeDataChange (record) {
|
|
1568
1573
|
this.$emit('beforeDataChange', record)
|
|
1569
1574
|
},
|