vue2-client 1.13.25 → 1.13.26

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,74 +1,91 @@
1
- <template>
2
- <amis-renderer :schema="schemaJson" :locals="locals" />
3
- </template>
4
- <script>
5
- import AMISRenderer from '@vue2-client/base-client/components/common/AMisRender'
6
-
7
- const schema = {
8
- // 原生与自定义组件混用
9
- type: 'page',
10
- data: {
11
- queryParamsName: 'crud_dictionary_manage',
12
- fixedQueryForm: '{}'
13
- },
14
- body: [
15
- {
16
- type: 'tabs',
17
- tabsMode: 'chrome',
18
- name: 'fixedQueryForm',
19
- id: 'username',
20
- tabs: [
21
- {
22
- title: '测试1',
23
- value: '{"d_f_name":"设备异常处理方式"}',
24
- body: {
25
- name: 'username',
26
- id: 'XFormTable1',
27
- type: 'XFormTable',
28
- }
29
- },
30
- {
31
- title: '选项卡3',
32
- value: '{"d_f_name":"二级用气性质"}',
33
- body: {
34
- name: 'username2',
35
- id: 'XFormTable2',
36
- type: 'XFormTable',
37
- }
38
- },
39
- ],
40
- },
41
- ]
42
- }
43
-
44
- export default {
45
- name: 'AMisDemo',
46
- components: {
47
- 'amis-renderer': AMISRenderer,
48
- },
49
- computed: {
50
- },
51
- props: {
52
- queryParamsName: {
53
- type: String,
54
- default: () => {
55
- return 'crud_dictionary_manage'
56
- }
57
- },
58
- schemaJson: {
59
- type: Object,
60
- default: () => {
61
- return schema
62
- }
63
- }
64
- },
65
- mounted () {
66
- },
67
- data: () => ({
68
- locals: {},
69
- vms: {},
70
- }),
71
- methods: {
72
- }
73
- }
74
- </script>
1
+ <template>
2
+ <amis-renderer :schema="schemaJson" :locals="locals" />
3
+ </template>
4
+ <script>
5
+ import AMISRenderer from '@vue2-client/base-client/components/common/AMisRender'
6
+
7
+ const schema = {
8
+ // 原生与自定义组件混用
9
+ type: 'page',
10
+ data: {
11
+ queryParamsName: 'crud_dictionary_manage',
12
+ fixedQueryForm: '{}'
13
+ },
14
+ body: [
15
+ {
16
+ type: 'tabs',
17
+ tabsMode: 'chrome',
18
+ name: 'fixedQueryForm',
19
+ id: 'username',
20
+ tabs: [
21
+ {
22
+ title: '测试1',
23
+ value: '{"d_f_name":"设备异常处理方式"}',
24
+ body: {
25
+ name: 'username',
26
+ id: 'XFormTable1',
27
+ type: 'XFormTable',
28
+ }
29
+ },
30
+ {
31
+ title: '选项卡3',
32
+ value: '{"d_f_name":"二级用气性质"}',
33
+ body: {
34
+ name: 'username2',
35
+ id: 'XFormTable2',
36
+ type: 'XFormTable',
37
+ }
38
+ },
39
+ ],
40
+ },
41
+ ]
42
+ }
43
+
44
+ export default {
45
+ name: 'AMisDemo',
46
+ components: {
47
+ 'amis-renderer': AMISRenderer,
48
+ },
49
+ computed: {
50
+ },
51
+ props: {
52
+ queryParamsName: {
53
+ type: String,
54
+ default: () => {
55
+ return 'crud_dictionary_manage'
56
+ }
57
+ },
58
+ schemaJson: {
59
+ type: Object,
60
+ default: () => {
61
+ return schema
62
+ }
63
+ }
64
+ },
65
+ mounted () {
66
+ },
67
+ data: () => ({
68
+ locals: {},
69
+ vms: {},
70
+ }),
71
+ methods: {
72
+ handleSearchUpdate(val) {
73
+ const tab = this.getComponentByName('tab')
74
+ const crud1 = tab.$refs['tab_com_x-report-grid_7'][0].$refs.crud1
75
+
76
+ // 根据不同的搜索条件更新不同的字段
77
+ const searchParams = {
78
+ field: 'h_registration_id', // 默认字段
79
+ value: val
80
+ }
81
+
82
+ // 如果搜索值包含特定特征,可以切换到其他字段
83
+ if (val.includes('特定特征')) {
84
+ searchParams.field = 'p_name'
85
+ }
86
+
87
+ crud1.handleSearchUpdate(searchParams)
88
+ }
89
+ }
90
+ }
91
+ </script>
@@ -1,76 +1,76 @@
1
- <template>
2
- <div id="test" v-if="showReport">
3
- <XReport
4
- @updateImg="updateImg"
5
- ref="main"
6
- :use-oss-for-img="false"
7
- config-name="outpatientWait"
8
- server-name="af-his"
9
- :show-img-in-cell="true"
10
- :display-only="displayOnly"
11
- :edit-mode="false"
12
- :show-save-button="false"
13
- :dont-format="true"/>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import XReport from '@vue2-client/base-client/components/common/XReportGrid/XReport'
19
- // eslint-disable-next-line no-unused-vars
20
- import { exportHTMLNodeToPDF } from '@vue2-client/utils/htmlToPDFApi'
21
-
22
- export default {
23
- name: 'Example',
24
- components: {
25
- XReport
26
- },
27
- mounted () {
28
- console.log(this.$route)
29
- },
30
- data () {
31
- return {
32
- test: {
33
- title: {
34
- type: 'titleKey',
35
- value: 'f_type'
36
- },
37
- designMode: 'json',
38
- },
39
- total: 1,
40
- registerMap: [],
41
- displayOnly: true,
42
- showReport: true
43
- }
44
- },
45
- methods: {
46
- updateImg (data) {
47
- console.warn('demo', data)
48
- },
49
- testExport () {
50
- this.showReport = false
51
- this.displayOnly = true
52
- this.$nextTick(() => {
53
- this.showReport = true
54
- setTimeout(() => {
55
- exportHTMLNodeToPDF('123', '#test')
56
- this.showReport = false
57
- this.displayOnly = false
58
- this.$nextTick(() => {
59
- this.showReport = true
60
- })
61
- }, 500)
62
- })
63
- },
64
- testSave () {
65
- const result = []
66
- this.registerMap.forEach(item => {
67
- result.push(item.exportData())
68
- })
69
- console.warn('save', result)
70
- }
71
- }
72
- }
73
- </script>
74
- <style scoped>
75
-
76
- </style>
1
+ <template>
2
+ <div id="test" v-if="showReport">
3
+ <XReport
4
+ @updateImg="updateImg"
5
+ ref="main"
6
+ :use-oss-for-img="false"
7
+ config-name="outpatientWait"
8
+ server-name="af-his"
9
+ :show-img-in-cell="true"
10
+ :display-only="displayOnly"
11
+ :edit-mode="false"
12
+ :show-save-button="false"
13
+ :dont-format="true"/>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import XReport from '@vue2-client/base-client/components/common/XReportGrid/XReport'
19
+ // eslint-disable-next-line no-unused-vars
20
+ import { exportHTMLNodeToPDF } from '@vue2-client/utils/htmlToPDFApi'
21
+
22
+ export default {
23
+ name: 'Example',
24
+ components: {
25
+ XReport
26
+ },
27
+ mounted () {
28
+ console.log(this.$route)
29
+ },
30
+ data () {
31
+ return {
32
+ test: {
33
+ title: {
34
+ type: 'titleKey',
35
+ value: 'f_type'
36
+ },
37
+ designMode: 'json',
38
+ },
39
+ total: 1,
40
+ registerMap: [],
41
+ displayOnly: true,
42
+ showReport: true
43
+ }
44
+ },
45
+ methods: {
46
+ updateImg (data) {
47
+ console.warn('demo', data)
48
+ },
49
+ testExport () {
50
+ this.showReport = false
51
+ this.displayOnly = true
52
+ this.$nextTick(() => {
53
+ this.showReport = true
54
+ setTimeout(() => {
55
+ exportHTMLNodeToPDF('123', '#test')
56
+ this.showReport = false
57
+ this.displayOnly = false
58
+ this.$nextTick(() => {
59
+ this.showReport = true
60
+ })
61
+ }, 500)
62
+ })
63
+ },
64
+ testSave () {
65
+ const result = []
66
+ this.registerMap.forEach(item => {
67
+ result.push(item.exportData())
68
+ })
69
+ console.warn('save', result)
70
+ }
71
+ }
72
+ }
73
+ </script>
74
+ <style scoped>
75
+
76
+ </style>