vue2-client 1.12.73 → 1.12.75

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.73",
3
+ "version": "1.12.75",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -1,209 +1,209 @@
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
- <!-- 当有 title2 数据时显示信息项 -->
21
- <template v-if="panel.title2 && panel.title2.length">
22
- <span
23
- v-for="(item, headerIndex) in panel.title2"
24
- :key="headerIndex"
25
- class="info-item"
26
- :style="config.title2Style"
27
- >
28
- <span>{{ item.key }}:</span>
29
- <span>{{ item.value }}</span>
30
- </span>
31
- </template>
32
- <!-- 当有 title3 数据时显示时间项 -->
33
- <span
34
- v-if="panel.title3"
35
- class="time-item"
36
- :style="config.title3Style"
37
- >
38
- {{ panel.title3 }}
39
- </span>
40
- <!-- 修改搜索框的显示条件 -->
41
- <a-input-search
42
- v-if="panel.search"
43
- v-model="searchText[panelIndex]"
44
- placeholder="panel.searchPlace"
45
- class="search-input"
46
- @search="(value) => onSearch(value, panelIndex)"
47
- @click.stop
48
- />
49
- </div>
50
- </template>
51
- <!-- 根据类型显示不同内容 -->
52
- <template v-if="panel.type === 'picture'">
53
- <img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
54
- </template>
55
- <template v-else-if="panel.type === 'cover'">
56
- <x-report
57
- :use-oss-for-img="false"
58
- :config-name="panel.configName"
59
- server-name="af-his"
60
- :show-img-in-cell="true"
61
- :display-only="true"
62
- :edit-mode="false"
63
- :show-save-button="false"
64
- :no-padding="true"
65
- :dont-format="true">
66
- </x-report>
67
- </template>
68
- </a-collapse-panel>
69
- </a-collapse>
70
- </div>
71
- </template>
72
-
73
- <script>
74
- import XReport from '@vue2-client/base-client/components/common/XReportGrid'
75
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
76
-
77
- export default {
78
- name: 'XCollapse',
79
- components: {
80
- XReport
81
- },
82
- inject: ['getConfigByName', 'getComponentByName'],
83
- data () {
84
- return {
85
- activeKey: [],
86
- config: {},
87
- configName: '',
88
- searchText: {}
89
- }
90
- },
91
- props: {
92
- // json名
93
- queryParamsName: {
94
- type: Object,
95
- default: 'openPrescriptionConfig'
96
- },
97
- parameter: {
98
- type: Object,
99
- }
100
- },
101
- created () {
102
- this.searchTexts = {} // 初始化对象
103
-
104
- this.getData(this.queryParamsName)
105
- window.addEventListener('setItem', (e) => {
106
- console.log('监听到sessionStorage的变化:', e)
107
- if (e.key === 'klcf_id') {
108
- this.newVal = sessionStorage.getItem('klcf_id')
109
- // 进行业务处理
110
- console.log('sessionStorage中的值发生了变化:', this.newVal)
111
- }
112
- })
113
- },
114
- beforeDestroy () {
115
- window.removeEventListener('setItem', this.handleStorageChange)
116
- },
117
- methods: {
118
- handleStorageChange (e) {
119
- console.log('监听到sessionStorage的变化:', e)
120
- if (e.key === 'klcf_id') {
121
- this.newVal = sessionStorage.getItem('klcf_id')
122
- // 进行业务处理
123
- console.log('sessionStorage中的值发生了变化:', this.newVal)
124
- }
125
- },
126
- async getData (config, parameter) {
127
- this.configName = config
128
- getConfigByName(config, 'af-his', res => {
129
- this.config = res
130
- console.warn(this.config)
131
- runLogic(res.mainLogic, this.parameter, 'af-his').then(result => {
132
- this.config.showData = result
133
- this.activeKey = this.config.showData.map((_, panelIndex) => panelIndex.toString())
134
- })
135
- })
136
- },
137
- refreshXCollapse () {
138
- this.getData(this.queryParamsName)
139
- },
140
- handleChange (keys) {
141
- this.activeKey = keys
142
- },
143
- onSearch (value, panelIndex) {
144
- console.log('搜索内容:', value, '面板索引:', panelIndex)
145
- },
146
- },
147
- watch: {
148
- queryParamsName: {
149
- handler (newValue) {
150
- this.getData(newValue, null)
151
- },
152
- deep: true
153
- }
154
- }
155
- }
156
- </script>
157
-
158
- <style scoped>
159
- .header-content {
160
- display: flex;
161
- align-items: center;
162
- gap: 24px;
163
- white-space: nowrap;
164
- overflow: hidden;
165
- }
166
-
167
- .header-text {
168
- margin-right: 16px;
169
- font-size: 16px;
170
- font-weight: 800;
171
- flex-shrink: 0;
172
- }
173
-
174
- .info-item {
175
- display: inline-flex;
176
- align-items: center;
177
- gap: 4px;
178
- font-size: 12px;
179
- color: #888888;
180
- flex-shrink: 0;
181
- }
182
-
183
- .time-item {
184
- margin-left: auto;
185
- text-align: right;
186
- flex-shrink: 0;
187
- }
188
-
189
- /* 覆盖 ant-design-vue 的默认样式 */
190
- :deep(.ant-collapse-header) {
191
- align-items: center !important;
192
- }
193
-
194
- :deep(.ant-collapse-header-text) {
195
- flex: 1;
196
- }
197
-
198
- :deep(.ant-collapse-content > .ant-collapse-content-box) {
199
- padding: 0;
200
- }
201
-
202
- :deep(.ant-card-body) {
203
- padding: 8px;
204
- }
205
- .search-input {
206
- margin-left: auto;
207
- width: 100%;
208
- }
209
- </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
+ <!-- 当有 title2 数据时显示信息项 -->
21
+ <template v-if="panel.title2 && panel.title2.length">
22
+ <span
23
+ v-for="(item, headerIndex) in panel.title2"
24
+ :key="headerIndex"
25
+ class="info-item"
26
+ :style="config.title2Style"
27
+ >
28
+ <span>{{ item.key }}:</span>
29
+ <span>{{ item.value }}</span>
30
+ </span>
31
+ </template>
32
+ <!-- 当有 title3 数据时显示时间项 -->
33
+ <span
34
+ v-if="panel.title3"
35
+ class="time-item"
36
+ :style="config.title3Style"
37
+ >
38
+ {{ panel.title3 }}
39
+ </span>
40
+ <!-- 修改搜索框的显示条件 -->
41
+ <a-input-search
42
+ v-if="panel.search"
43
+ v-model="searchText[panelIndex]"
44
+ :placeholder="panel.searchPlace"
45
+ class="search-input"
46
+ @search="(value) => onSearch(value, panelIndex)"
47
+ @click.stop
48
+ />
49
+ </div>
50
+ </template>
51
+ <!-- 根据类型显示不同内容 -->
52
+ <template v-if="panel.type === 'picture'">
53
+ <img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
54
+ </template>
55
+ <template v-else-if="panel.type === 'cover'">
56
+ <x-report
57
+ :use-oss-for-img="false"
58
+ :config-name="panel.configName"
59
+ server-name="af-his"
60
+ :show-img-in-cell="true"
61
+ :display-only="true"
62
+ :edit-mode="false"
63
+ :show-save-button="false"
64
+ :no-padding="true"
65
+ :dont-format="true">
66
+ </x-report>
67
+ </template>
68
+ </a-collapse-panel>
69
+ </a-collapse>
70
+ </div>
71
+ </template>
72
+
73
+ <script>
74
+ import XReport from '@vue2-client/base-client/components/common/XReportGrid'
75
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
76
+
77
+ export default {
78
+ name: 'XCollapse',
79
+ components: {
80
+ XReport
81
+ },
82
+ inject: ['getConfigByName', 'getComponentByName'],
83
+ data () {
84
+ return {
85
+ activeKey: [],
86
+ config: {},
87
+ configName: '',
88
+ searchText: {}
89
+ }
90
+ },
91
+ props: {
92
+ // json名
93
+ queryParamsName: {
94
+ type: Object,
95
+ default: 'openPrescriptionConfig'
96
+ },
97
+ parameter: {
98
+ type: Object,
99
+ }
100
+ },
101
+ created () {
102
+ this.searchTexts = {} // 初始化对象
103
+
104
+ this.getData(this.queryParamsName)
105
+ window.addEventListener('setItem', (e) => {
106
+ console.log('监听到sessionStorage的变化:', e)
107
+ if (e.key === 'klcf_id') {
108
+ this.newVal = sessionStorage.getItem('klcf_id')
109
+ // 进行业务处理
110
+ console.log('sessionStorage中的值发生了变化:', this.newVal)
111
+ }
112
+ })
113
+ },
114
+ beforeDestroy () {
115
+ window.removeEventListener('setItem', this.handleStorageChange)
116
+ },
117
+ methods: {
118
+ handleStorageChange (e) {
119
+ console.log('监听到sessionStorage的变化:', e)
120
+ if (e.key === 'klcf_id') {
121
+ this.newVal = sessionStorage.getItem('klcf_id')
122
+ // 进行业务处理
123
+ console.log('sessionStorage中的值发生了变化:', this.newVal)
124
+ }
125
+ },
126
+ async getData (config, parameter) {
127
+ this.configName = config
128
+ getConfigByName(config, 'af-his', res => {
129
+ this.config = res
130
+ console.warn(this.config)
131
+ runLogic(res.mainLogic, this.parameter, 'af-his').then(result => {
132
+ this.config.showData = result
133
+ this.activeKey = this.config.showData.map((_, panelIndex) => panelIndex.toString())
134
+ })
135
+ })
136
+ },
137
+ refreshXCollapse () {
138
+ this.getData(this.queryParamsName)
139
+ },
140
+ handleChange (keys) {
141
+ this.activeKey = keys
142
+ },
143
+ onSearch (value, panelIndex) {
144
+ console.log('搜索内容:', value, '面板索引:', panelIndex)
145
+ },
146
+ },
147
+ watch: {
148
+ queryParamsName: {
149
+ handler (newValue) {
150
+ this.getData(newValue, null)
151
+ },
152
+ deep: true
153
+ }
154
+ }
155
+ }
156
+ </script>
157
+
158
+ <style scoped>
159
+ .header-content {
160
+ display: flex;
161
+ align-items: center;
162
+ gap: 24px;
163
+ white-space: nowrap;
164
+ overflow: hidden;
165
+ }
166
+
167
+ .header-text {
168
+ margin-right: 16px;
169
+ font-size: 16px;
170
+ font-weight: 800;
171
+ flex-shrink: 0;
172
+ }
173
+
174
+ .info-item {
175
+ display: inline-flex;
176
+ align-items: center;
177
+ gap: 4px;
178
+ font-size: 12px;
179
+ color: #888888;
180
+ flex-shrink: 0;
181
+ }
182
+
183
+ .time-item {
184
+ margin-left: auto;
185
+ text-align: right;
186
+ flex-shrink: 0;
187
+ }
188
+
189
+ /* 覆盖 ant-design-vue 的默认样式 */
190
+ :deep(.ant-collapse-header) {
191
+ align-items: center !important;
192
+ }
193
+
194
+ :deep(.ant-collapse-header-text) {
195
+ flex: 1;
196
+ }
197
+
198
+ :deep(.ant-collapse-content > .ant-collapse-content-box) {
199
+ padding: 0;
200
+ }
201
+
202
+ :deep(.ant-card-body) {
203
+ padding: 8px;
204
+ }
205
+ .search-input {
206
+ margin-left: auto;
207
+ width: 100%;
208
+ }
209
+ </style>
@@ -49,7 +49,7 @@ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
49
49
  // 设置 dayjs 为中文语言环境
50
50
  dayjs.locale('zh-cn')
51
51
 
52
- export default ({
52
+ export default {
53
53
  name: 'XTimeline',
54
54
  components: {
55
55
  },
@@ -73,7 +73,7 @@ export default ({
73
73
  return {
74
74
  currentDate: this.modelValue, // 当前选中日期
75
75
  baseDate: dayjs().format('YYYY-MM-DD'), // 基准日期,默认今天,用于计算显示范围
76
- config: null, // 时间轴配置
76
+ config: null,
77
77
  disabledDates: [] // 禁用日期列表
78
78
  }
79
79
  },
@@ -268,7 +268,7 @@ export default ({
268
268
  this.$emit('next-week', this.baseDate)
269
269
  }
270
270
  }
271
- })
271
+ }
272
272
  </script>
273
273
 
274
274
  <style scoped>