vue2-client 1.12.16 → 1.12.18

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.12.16",
3
+ "version": "1.12.18",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -1,145 +1,153 @@
1
- <template>
2
- <div>
3
- <a-collapse
4
- :activeKey="activeKey"
5
- @change="handleChange"
6
- >
7
- <a-collapse-panel
8
- v-for="(panel, panelIndex) in config.showData"
9
- :key="panelIndex.toString()"
10
- :show-arrow="false"
11
- >
12
- <template #header>
13
- <div class="header-content">
14
- <span
15
- class="header-text"
16
- :style="config.titleStyle"
17
- >
18
- {{ panel.title }}
19
- </span>
20
- <span
21
- v-for="(item, headerIndex) in panel.title2 || []"
22
- :key="headerIndex"
23
- class="info-item"
24
- :style="config.title2Style"
25
- >
26
- <span>{{ item.key }}:</span>
27
- <span>{{ item.value }}</span>
28
- </span>
29
- <span
30
- class="time-item"
31
- :style="config.title3Style"
32
- >
33
- {{ panel.title3 }}
34
- </span>
35
- </div>
36
- </template>
37
- <!-- 根据类型显示不同内容 -->
38
- <template v-if="panel.type === 'picture'">
39
- <img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
40
- </template>
41
- <template v-else-if="panel.type === 'cover'">
42
- <x-report
43
- :use-oss-for-img="false"
44
- :config-name="panel.configName"
45
- server-name="af-his"
46
- :show-img-in-cell="true"
47
- :display-only="true"
48
- :edit-mode="false"
49
- :show-save-button="false"
50
- :no-padding="true"
51
- :dont-format="true">
52
- </x-report>
53
- </template>
54
- </a-collapse-panel>
55
- </a-collapse>
56
- </div>
57
- </template>
58
-
59
- <script>
60
- import XReport from '@vue2-client/base-client/components/common/XReportGrid'
61
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
62
-
63
- export default {
64
- name: 'XCollapse',
65
- components: {
66
- XReport
67
- },
68
- data () {
69
- return {
70
- activeKey: [],
71
- config: {}
72
- }
73
- },
74
- props: {
75
- // json名
76
- queryParamsName: {
77
- type: Object,
78
- default: 'zsftestConfig'
79
- },
80
- },
81
- created () {
82
- this.getData(this.queryParamsName)
83
- },
84
- methods: {
85
- async getData (config) {
86
- getConfigByName(config, 'af-his', res => {
87
- this.config = res
88
- runLogic(res.mainLogic, {}, 'af-his').then(result => {
89
- console.log(result)
90
- this.config.showData = result
91
- this.activeKey = this.config.showData.map((_, panelIndex) => panelIndex.toString())
92
- })
93
- })
94
- },
95
- handleChange (keys) {
96
- this.activeKey = keys
97
- },
98
- },
99
- watch: {
100
- queryParamsName: {
101
- handler (newValue) {
102
- console.log(newValue)
103
- this.getData(newValue)
104
- },
105
- deep: true
106
- }
107
- }
108
- }
109
- </script>
110
-
111
- <style scoped>
112
- .header-content {
113
- display: flex;
114
- align-items: center;
115
- gap: 24px;
116
- }
117
-
118
- .header-text {
119
- margin-right: 16px;
120
- font-size: 16px;
121
- font-weight: 800; /* 默认加粗 */
122
- }
123
-
124
- .info-item {
125
- display: inline-flex;
126
- align-items: center;
127
- gap: 4px;
128
- font-size: 12px;
129
- color: #888888;
130
- }
131
-
132
- .time-item {
133
- margin-left: auto;
134
- text-align: right;
135
- }
136
-
137
- /* 覆盖 ant-design-vue 的默认样式 */
138
- :deep(.ant-collapse-header) {
139
- align-items: center !important;
140
- }
141
-
142
- :deep(.ant-collapse-header-text) {
143
- flex: 1;
144
- }
145
- </style>
1
+ <template>
2
+ <div>
3
+ <a-collapse
4
+ :activeKey="activeKey"
5
+ @change="handleChange"
6
+ >
7
+ <a-collapse-panel
8
+ v-for="(panel, panelIndex) in config.showData"
9
+ :key="panelIndex.toString()"
10
+ :show-arrow="false"
11
+ >
12
+ <template #header>
13
+ <div class="header-content">
14
+ <span
15
+ class="header-text"
16
+ :style="config.titleStyle"
17
+ >
18
+ {{ panel.title }}
19
+ </span>
20
+ <span
21
+ v-for="(item, headerIndex) in panel.title2 || []"
22
+ :key="headerIndex"
23
+ class="info-item"
24
+ :style="config.title2Style"
25
+ >
26
+ <span>{{ item.key }}:</span>
27
+ <span>{{ item.value }}</span>
28
+ </span>
29
+ <span
30
+ class="time-item"
31
+ :style="config.title3Style"
32
+ >
33
+ {{ panel.title3 }}
34
+ </span>
35
+ </div>
36
+ </template>
37
+ <!-- 根据类型显示不同内容 -->
38
+ <template v-if="panel.type === 'picture'">
39
+ <img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
40
+ </template>
41
+ <template v-else-if="panel.type === 'cover'">
42
+ <x-report
43
+ :use-oss-for-img="false"
44
+ :config-name="panel.configName"
45
+ server-name="af-his"
46
+ :show-img-in-cell="true"
47
+ :display-only="true"
48
+ :edit-mode="false"
49
+ :show-save-button="false"
50
+ :no-padding="true"
51
+ :dont-format="true">
52
+ </x-report>
53
+ </template>
54
+ </a-collapse-panel>
55
+ </a-collapse>
56
+ </div>
57
+ </template>
58
+
59
+ <script>
60
+ import XReport from '@vue2-client/base-client/components/common/XReportGrid'
61
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
62
+
63
+ export default {
64
+ name: 'XCollapse',
65
+ components: {
66
+ XReport
67
+ },
68
+ data () {
69
+ return {
70
+ activeKey: [],
71
+ config: {}
72
+ }
73
+ },
74
+ props: {
75
+ // json名
76
+ queryParamsName: {
77
+ type: Object,
78
+ default: 'openPrescriptionConfig'
79
+ },
80
+ },
81
+ created () {
82
+ this.getData(this.queryParamsName)
83
+ },
84
+ methods: {
85
+ async getData (config) {
86
+ getConfigByName(config, 'af-his', res => {
87
+ this.config = res
88
+ runLogic(res.mainLogic, {}, 'af-his').then(result => {
89
+ console.log(result)
90
+ this.config.showData = result
91
+ this.activeKey = this.config.showData.map((_, panelIndex) => panelIndex.toString())
92
+ })
93
+ })
94
+ },
95
+ handleChange (keys) {
96
+ this.activeKey = keys
97
+ },
98
+ },
99
+ watch: {
100
+ queryParamsName: {
101
+ handler (newValue) {
102
+ console.log(newValue)
103
+ this.getData(newValue)
104
+ },
105
+ deep: true
106
+ }
107
+ }
108
+ }
109
+ </script>
110
+
111
+ <style scoped>
112
+ .header-content {
113
+ display: flex;
114
+ align-items: center;
115
+ gap: 24px;
116
+ }
117
+
118
+ .header-text {
119
+ margin-right: 16px;
120
+ font-size: 16px;
121
+ font-weight: 800; /* 默认加粗 */
122
+ }
123
+
124
+ .info-item {
125
+ display: inline-flex;
126
+ align-items: center;
127
+ gap: 4px;
128
+ font-size: 12px;
129
+ color: #888888;
130
+ }
131
+
132
+ .time-item {
133
+ margin-left: auto;
134
+ text-align: right;
135
+ }
136
+
137
+ /* 覆盖 ant-design-vue 的默认样式 */
138
+ :deep(.ant-collapse-header) {
139
+ align-items: center !important;
140
+ }
141
+
142
+ :deep(.ant-collapse-header-text) {
143
+ flex: 1;
144
+ }
145
+
146
+ :deep(.ant-collapse-content > .ant-collapse-content-box) {
147
+ padding: 0;
148
+ }
149
+
150
+ :deep(.ant-card-body) {
151
+ padding: 8px;
152
+ }
153
+ </style>
@@ -44,6 +44,18 @@ export default {
44
44
  return null
45
45
  },
46
46
  },
47
+ setGlobalData: {
48
+ default: () => () => {
49
+ console.warn('setGlobalData is not provided.')
50
+ return null
51
+ },
52
+ },
53
+ getGlobalData: {
54
+ default: () => () => {
55
+ console.warn('getGlobalData is not provided.')
56
+ return null
57
+ },
58
+ },
47
59
  getSelectedData: {
48
60
  default: () => () => {
49
61
  console.warn('getSelectedData is not provided.')