vue2-client 1.14.53 → 1.14.55

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.
@@ -1,76 +1,86 @@
1
- <template>
2
- <a-card :bordered="false">
3
- <a-button @click="()=>{queryParamsName = 'crud_device_realtime_upload_物联网流量计'}">测试1</a-button>
4
- <a-button @click="()=>{queryParamsName = 'crud_device_realtime_upload_LaiDe_TiaoYaXiang'}">测试2</a-button>
5
- <a-button @click="test()">测试3</a-button>
6
- <x-form-table
7
- title="示例表单"
8
- :queryParamsName="queryParamsName"
9
- :fixedAddForm="fixedAddForm"
10
- @action="action"
11
- @columnClick="columnClick"
12
- ref="xFormTable">
13
- </x-form-table>
14
- </a-card>
15
- </template>
16
-
17
- <script>
18
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
19
- import { microDispatch } from '@vue2-client/utils/microAppUtils'
20
-
21
- export default {
22
- name: 'Demo',
23
- components: {
24
- XFormTable
25
- },
26
- data () {
27
- return {
28
- // 查询配置文件名
29
- queryParamsName: 'ChargeQueryCRUD',
30
- // 查询配置左侧tree
31
- xTreeConfigName: 'addressType',
32
- // 新增表单固定值
33
- fixedAddForm: {},
34
- // 是否显示详情抽屉
35
- detailVisible: false,
36
- // 当前记录
37
- record: {}
38
- }
39
- },
40
- methods: {
41
- test () {
42
- this.$refs.xFormTable.setTableData([])
43
- },
44
- defaultF () {
45
- this.$refs.xFormTable.setTableSize('default')
46
- },
47
- middleF () {
48
- this.$refs.xFormTable.setTableSize('middle')
49
- },
50
- smallF () {
51
- this.$refs.xFormTable.setTableSize('small')
52
- },
53
- columnClick (key, value, record) {
54
- microDispatch({
55
- type: 'v3route',
56
- path: '/bingliguanli/dianzibingliluru',
57
- props: { selected: arguments[0].his_f_admission_id }
58
- })
59
- },
60
- action (record, id, actionType) {
61
- this.detailVisible = true
62
- console.log('触发了详情操作', record, id, actionType)
63
- },
64
- onClose () {
65
- this.detailVisible = false
66
- // 关闭详情之后重新查询表单
67
- this.$refs.xFormTable.refreshTable(true)
68
- }
69
- },
70
- computed: {},
71
- }
72
- </script>
73
-
74
- <style scoped>
75
-
76
- </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
+ ref="xFormTable">
12
+ </x-form-table>
13
+ </a-card>
14
+ </template>
15
+
16
+ <script>
17
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
18
+ import { microDispatch } from '@vue2-client/utils/microAppUtils'
19
+
20
+ export default {
21
+ name: 'Demo',
22
+ components: {
23
+ XFormTable
24
+ },
25
+ data () {
26
+ return {
27
+ // 查询配置文件名
28
+ queryParamsName: 'userInfosCRUD',
29
+ // 新增表单固定值
30
+ fixedAddForm: {},
31
+ // 是否显示详情抽屉
32
+ detailVisible: false,
33
+ // 当前记录
34
+ record: {},
35
+ // 选中的行keys
36
+ selectedKeys: ['813200000004', '72547', '72455', '72451'],
37
+ selected: {
38
+ keys: [],
39
+ rows: []
40
+ }
41
+ }
42
+ },
43
+ methods: {
44
+ test () {
45
+ this.$refs.xFormTable.setTableData([])
46
+ },
47
+ defaultF () {
48
+ this.$refs.xFormTable.setTableSize('default')
49
+ },
50
+ middleF () {
51
+ this.$refs.xFormTable.setTableSize('middle')
52
+ },
53
+ smallF () {
54
+ this.$refs.xFormTable.setTableSize('small')
55
+ },
56
+ columnClick (key, value, record) {
57
+ microDispatch({
58
+ type: 'v3route',
59
+ path: '/bingliguanli/dianzibingliluru',
60
+ props: { selected: arguments[0].his_f_admission_id }
61
+ })
62
+ },
63
+ action (record, id, actionType) {
64
+ this.detailVisible = true
65
+ console.log('触发了详情操作', record, id, actionType)
66
+ },
67
+ onClose () {
68
+ this.detailVisible = false
69
+ // 关闭详情之后重新查询表单
70
+ this.$refs.xFormTable.refreshTable(true)
71
+ },
72
+ selectRow (selectedRowKeys, selectedRows) {
73
+ this.selected = {
74
+ keys: selectedRowKeys,
75
+ rows: selectedRows
76
+ }
77
+ console.log('selected', this.selected)
78
+ },
79
+ },
80
+ computed: {},
81
+ }
82
+ </script>
83
+
84
+ <style scoped>
85
+
86
+ </style>