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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.17.51",
3
+ "version": "1.18.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -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
- :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
+ @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
  },