vue2-client 1.19.90 → 1.19.92

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.
Files changed (56) hide show
  1. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203170042.vue +1473 -0
  2. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203170134.vue +1473 -0
  3. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203170203.vue +1473 -0
  4. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171235.vue +1473 -0
  5. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171318.vue +1471 -0
  6. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171328.vue +1471 -0
  7. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171333.vue +1470 -0
  8. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171338.vue +1470 -0
  9. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171352.vue +1470 -0
  10. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171655.vue +1471 -0
  11. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171715.vue +1472 -0
  12. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171735.vue +1472 -0
  13. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171738.vue +1472 -0
  14. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203171955.vue +1472 -0
  15. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203172007.vue +1473 -0
  16. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203172037.vue +1473 -0
  17. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203172045.vue +1473 -0
  18. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203172244.vue +1473 -0
  19. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203172258.vue +1469 -0
  20. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203172323.vue +1469 -0
  21. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203172337.vue +1469 -0
  22. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203172359.vue +1469 -0
  23. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260203172404.vue +1469 -0
  24. package/.history/src/expression/core/Expression_20260305164427.js +1371 -0
  25. package/.history/src/expression/core/Expression_20260305170258.js +1358 -0
  26. package/.history/src/expression/core/Program_20260305111830.js +944 -0
  27. package/.history/src/expression/core/Program_20260305112041.js +931 -0
  28. package/.history/src/logic/LogicRunner_20260304154306.js +170 -0
  29. package/.history/src/logic/LogicRunner_20260304155553.js +112 -0
  30. package/.history/src/logic/LogicRunner_20260305105834.js +112 -0
  31. package/.history/src/logic/LogicRunner_20260305112718.js +129 -0
  32. package/.history/src/logic/LogicRunner_20260305182436.js +133 -0
  33. package/.history/src/logic/LogicRunner_20260306151301.js +213 -0
  34. package/.history/src/logic/LogicRunner_20260306152419.js +213 -0
  35. package/.history/src/logic/plugins/common/DateTools_20260305154159.js +61 -0
  36. package/.history/src/logic/plugins/common/DateTools_20260305154217.js +44 -0
  37. package/.history/src/logic/plugins/common/DateTools_20260305161014.js +44 -0
  38. package/.history/src/logic/plugins/common/HttpTools_20260305164352.js +80 -0
  39. package/.history/src/logic/plugins/common/HttpTools_20260305170258.js +75 -0
  40. package/.history/src/logic/plugins/common/HttpTools_20260305171634.js +75 -0
  41. package/.history/src/logic/plugins/common/HttpTools_20260306152419.js +72 -0
  42. package/.history/src/utils/indexedDB_20260306150918.js +593 -0
  43. package/.history/src/utils/indexedDB_20260306151301.js +586 -0
  44. package/docs/runFrontLogic/344/275/277/347/224/250/346/214/207/345/215/227.md +220 -0
  45. package/package.json +1 -1
  46. package/src/base-client/components/common/XButtons/XButtons.vue +44 -6
  47. package/src/base-client/components/common/XForm/XFormItem.vue +3 -1
  48. package/src/base-client/components/common/XForm/XTreeSelect.vue +10 -14
  49. package/src/base-client/components/common/XFormGroup/demo.vue +1 -1
  50. package/src/base-client/plugins/FrontLogicPlugin.js +6 -1
  51. package/src/logic/LogicRunner.js +136 -4
  52. package/src/logic/plugins/common/DateTools.js +35 -0
  53. package/src/logic/plugins/common/HttpTools.js +12 -10
  54. package/src/router/async/router.map.js +2 -2
  55. package/src/utils/indexedDB.js +36 -2
  56. package/src/utils/request.js +11 -7
@@ -0,0 +1,1473 @@
1
+ <template>
2
+ <div class="patient-info-descriptions" :class="wrapperClassObject">
3
+ <div class="descriptions-container">
4
+ <!-- 详情/收起按钮 -->
5
+ <div v-if="hasMoreItems" class="detail-button-wrapper">
6
+ <a-button
7
+ :type="(config && config.detailsConfig && config.detailsConfig.buttonType) || 'link'"
8
+ @click="toggleDetails"
9
+ >
10
+ {{ showAllItems ? '收起' : ((config && config.detailsConfig && config.detailsConfig.buttonText) || '详情') }}
11
+ <a-icon :type="showAllItems ? 'up' : 'down'" />
12
+ </a-button>
13
+ </div>
14
+
15
+ <!-- 当layout是对象格式且为5列时,使用自定义grid布局 -->
16
+ <template v-if="config && config.layout && typeof config.layout === 'object' && !Array.isArray(config.layout) && Object.values(config.layout).every(val => val === 5) && !wrapperClassObject['xhdesc-medical-history']">
17
+ <div class="grid-descriptions">
18
+ <template v-if="data">
19
+ <div
20
+ v-for="(row, rowIndex) in gridRows"
21
+ :key="'row-' + rowIndex"
22
+ class="grid-row"
23
+ :style="{ gridTemplateColumns: getGridTemplateColumns(getGridColumns()) }"
24
+ >
25
+ <div
26
+ v-for="(item, itemIndex) in row"
27
+ :key="'item-' + rowIndex + '-' + itemIndex"
28
+ class="grid-item"
29
+ >
30
+ <!-- 占位符项目 -->
31
+ <template v-if="!item.field || item.field === ''">
32
+ <div class="placeholder-content"></div>
33
+ </template>
34
+ <!-- 正常项目 -->
35
+ <template v-else-if="data[item.field] !== null && data[item.field] !== undefined">
36
+ <div :class="['label-wrapper', { 'with-avatar': item.showAvatar }]">
37
+ <div v-if="item.showAvatar" class="gender-icon">
38
+ <img :src="maleIcon" alt="male" class="gender-img" />
39
+ </div>
40
+ <span class="label-text">{{ item.label }}<span v-if="getItemColon(item)" class="colon">:</span></span>
41
+ </div>
42
+ <a-tooltip
43
+ v-if="isContentOverflow(data[item.field])"
44
+ :title="data[item.field]"
45
+ placement="topLeft"
46
+ :overlay-style="{ maxWidth: '400px' }"
47
+ >
48
+ <div
49
+ class="content-wrapper ellipsis"
50
+ :data-full-text="data[item.field]"
51
+ >
52
+ <template v-if="wrapperClassObject['xhdesc-report-mode']">
53
+ <div class="report-value">
54
+ {{ data[item.field] }}
55
+ </div>
56
+ <div class="report-unit">
57
+ {{ item.unit }}
58
+ </div>
59
+ </template>
60
+ <template v-else>
61
+ {{ data[item.field] }}
62
+ </template>
63
+ </div>
64
+ </a-tooltip>
65
+ <div
66
+ v-else
67
+ class="content-wrapper"
68
+ :data-full-text="data[item.field]"
69
+ >
70
+ <template v-if="wrapperClassObject['xhdesc-report-mode']">
71
+ <div class="report-value">
72
+ {{ data[item.field] }}
73
+ </div>
74
+ <div class="report-unit">
75
+ {{ item.unit }}
76
+ </div>
77
+ </template>
78
+ <template v-else>
79
+ {{ data[item.field] }}
80
+ </template>
81
+ </div>
82
+ </template>
83
+ </div>
84
+ </div>
85
+ </template>
86
+ </div>
87
+ </template>
88
+
89
+ <!-- 当有 layout 配置时使用 a-descriptions -->
90
+ <template v-else-if="config && config.layout && !wrapperClassObject['xhdesc-medical-history']">
91
+ <a-descriptions
92
+ :colon="getGlobalColon()"
93
+ :column="config.layout"
94
+ :size="(config && config.style && config.style.size)"
95
+ :bordered="(config && config.style && config.style.bordered)"
96
+ layout="horizontal">
97
+ <template v-if="data">
98
+ <!-- 显示前N个标签 -->
99
+ <a-descriptions-item
100
+ v-for="(item) in visibleItemsFiltered"
101
+ :key="item.field"
102
+ :colon="getItemColon(item)"
103
+ :class="{ 'with-divider': item.isLine }">
104
+ <template #label>
105
+ <div :class="['label-wrapper', { 'with-avatar': item.showAvatar }]">
106
+ <div v-if="item.showAvatar" class="gender-icon">
107
+ <img :src="maleIcon" alt="male" class="gender-img" />
108
+ </div>
109
+ <span class="label-text">
110
+ <template v-if="item.type === 'list'">
111
+ <span class="list-label-text">{{ item.label }}</span>
112
+ </template>
113
+ <template v-else>
114
+ {{ item.label }}
115
+ </template>
116
+ </span>
117
+ </div>
118
+ </template>
119
+ <a-tooltip
120
+ v-if="isContentOverflow(data[item.field])"
121
+ :title="data[item.field]"
122
+ placement="topLeft"
123
+ :overlay-style="{ maxWidth: '400px' }"
124
+ >
125
+ <div
126
+ class="content-wrapper ellipsis"
127
+ :data-full-text="data[item.field]"
128
+ >
129
+ <template v-if="wrapperClassObject['xhdesc-report-mode']">
130
+ <div class="report-value">
131
+ {{ data[item.field] }}
132
+ </div>
133
+ <div class="report-unit">
134
+ {{ item.unit }}
135
+ </div>
136
+ </template>
137
+ <template v-else>
138
+ {{ data[item.field] }}
139
+ </template>
140
+ </div>
141
+ </a-tooltip>
142
+ <div
143
+ v-else
144
+ class="content-wrapper"
145
+ :data-full-text="data[item.field]"
146
+ >
147
+ <template v-if="wrapperClassObject['xhdesc-report-mode']">
148
+ <div class="report-value">
149
+ {{ data[item.field] }}
150
+ </div>
151
+ <div class="report-unit">
152
+ {{ item.unit }}
153
+ </div>
154
+ </template>
155
+ <template v-else>
156
+ {{ data[item.field] }}
157
+ </template>
158
+ </div>
159
+ </a-descriptions-item>
160
+
161
+ <!-- 占位符项目 -->
162
+ <div
163
+ v-for="(item, index) in visibleItems"
164
+ v-if="!item.field || item.field === ''"
165
+ :key="'placeholder-' + index"
166
+ class="placeholder-item"
167
+ ></div>
168
+ </template>
169
+
170
+ <!-- 展开后显示剩余标签 -->
171
+ <template v-if="showAllItems">
172
+ <a-descriptions-item
173
+ v-for="item in hiddenItemsFiltered"
174
+ :key="item.field"
175
+ :colon="getItemColon(item)"
176
+ :class="{ 'with-divider': item.isLine }">
177
+ <template #label>
178
+ <div :class="['label-wrapper', { 'with-avatar': item.showAvatar }]">
179
+ <div v-if="item.showAvatar" class="gender-icon">
180
+ <img :src="maleIcon" alt="male" class="gender-img" />
181
+ </div>
182
+ <span class="label-text">
183
+ <template v-if="item.type === 'list'">
184
+ <span class="list-label-text">{{ item.label }}</span>
185
+ </template>
186
+ <template v-else>
187
+ {{ item.label }}
188
+ </template>
189
+ </span>
190
+ </div>
191
+ </template>
192
+ <div
193
+ class="content-wrapper"
194
+ :class="{ 'ellipsis': isContentOverflow(data[item.field]) }"
195
+ :data-full-text="data[item.field]"
196
+ >
197
+ <template v-if="wrapperClassObject['xhdesc-report-mode']">
198
+ <div class="report-value">
199
+ {{ data[item.field] }}
200
+ </div>
201
+ <div class="report-unit">
202
+ {{ item.unit }}
203
+ </div>
204
+ </template>
205
+ <template v-else>
206
+ {{ data[item.field] }}
207
+ </template>
208
+ </div>
209
+ </a-descriptions-item>
210
+
211
+ <!-- 展开部分的占位符项目 -->
212
+ <div
213
+ v-for="(item, index) in hiddenItems"
214
+ v-if="!item.field || item.field === ''"
215
+ :key="'hidden-placeholder-' + index"
216
+ class="placeholder-item"
217
+ ></div>
218
+ </template>
219
+ </a-descriptions>
220
+ </template>
221
+
222
+ <!-- 医疗病史模式:使用自定义HTML结构实现文本环绕 -->
223
+ <template v-else-if="config && config.layout && wrapperClassObject['xhdesc-medical-history']">
224
+ <div class="medical-history-descriptions">
225
+ <template v-if="data">
226
+ <!-- 显示前N个标签 -->
227
+ <div
228
+ v-for="(item) in visibleItemsFiltered"
229
+ :key="item.field"
230
+ :class="['medical-history-item', { 'with-divider': item.isLine }]"
231
+ >
232
+ <div class="medical-history-content">
233
+ <a-tooltip
234
+ v-if="isContentOverflow(data[item.field])"
235
+ :title="data[item.field]"
236
+ placement="topLeft"
237
+ :overlay-style="{ maxWidth: '400px' }"
238
+ >
239
+ <div class="medical-history-text ellipsis">
240
+ <span class="medical-history-label">{{ item.label }}:</span>{{ data[item.field] }}
241
+ </div>
242
+ </a-tooltip>
243
+ <div
244
+ v-else
245
+ class="medical-history-text"
246
+ >
247
+ <span class="medical-history-label">{{ item.label }}:</span>{{ data[item.field] }}
248
+ </div>
249
+ </div>
250
+ </div>
251
+
252
+ <!-- 展开后显示剩余标签 -->
253
+ <template v-if="showAllItems">
254
+ <div
255
+ v-for="item in hiddenItemsFiltered"
256
+ :key="item.field"
257
+ class="medical-history-item"
258
+ >
259
+ <div class="medical-history-content">
260
+ <a-tooltip
261
+ v-if="isContentOverflow(data[item.field])"
262
+ :title="data[item.field]"
263
+ placement="topLeft"
264
+ :overlay-style="{ maxWidth: '400px' }"
265
+ >
266
+ <div class="medical-history-text ellipsis">
267
+ <span class="medical-history-label">{{ item.label }}:</span>{{ data[item.field] }}
268
+ </div>
269
+ </a-tooltip>
270
+ <div
271
+ v-else
272
+ class="medical-history-text"
273
+ >
274
+ <span class="medical-history-label">{{ item.label }}:</span>{{ data[item.field] }}
275
+ </div>
276
+ </div>
277
+ </div>
278
+ </template>
279
+ </template>
280
+ </div>
281
+ </template>
282
+
283
+ <!-- 当没有 layout 配置时使用自适应布局 -->
284
+ <template v-else>
285
+ <div class="flex-descriptions">
286
+ <template v-if="data">
287
+ <!-- 显示可见的标签 -->
288
+ <div
289
+ v-for="(item) in visibleItemsFiltered"
290
+ :key="item.field"
291
+ :class="['description-item', { 'with-divider': item.isLine }]"
292
+ >
293
+ <div :class="['label-wrapper', { 'with-avatar': item.showAvatar }]">
294
+ <div v-if="item.showAvatar" class="gender-icon">
295
+ <img :src="maleIcon" alt="male" class="gender-img" />
296
+ </div>
297
+ <span class="label-text">{{ item.label }}<span v-if="getItemColon(item)" class="colon">:</span></span>
298
+ </div>
299
+ <a-tooltip
300
+ v-if="isContentOverflow(data[item.field])"
301
+ :title="data[item.field]"
302
+ placement="topLeft"
303
+ :overlay-style="{ maxWidth: '400px' }"
304
+ >
305
+ <div
306
+ class="content-wrapper ellipsis"
307
+ :data-full-text="data[item.field]"
308
+ >
309
+ <template v-if="wrapperClassObject['xhdesc-report-mode']">
310
+ <div class="report-value">
311
+ {{ data[item.field] }}
312
+ </div>
313
+ <div class="report-unit">
314
+ {{ item.unit }}
315
+ </div>
316
+ </template>
317
+ <template v-else>
318
+ {{ data[item.field] }}
319
+ </template>
320
+ </div>
321
+ </a-tooltip>
322
+ <div
323
+ v-else
324
+ class="content-wrapper"
325
+ :data-full-text="data[item.field]"
326
+ >
327
+ <template v-if="wrapperClassObject['xhdesc-report-mode']">
328
+ <div class="report-value">
329
+ {{ data[item.field] }}
330
+ </div>
331
+ <div class="report-unit">
332
+ {{ item.unit }}
333
+ </div>
334
+ </template>
335
+ <template v-else>
336
+ {{ data[item.field] }}
337
+ </template>
338
+ </div>
339
+ </div>
340
+
341
+ <!-- 展开后显示的内容 -->
342
+ <template v-if="showAllItems">
343
+ <div
344
+ v-for="item in hiddenItemsFiltered"
345
+ :key="item.field"
346
+ class="description-item"
347
+ >
348
+ <div :class="['label-wrapper', { 'with-avatar': item.showAvatar }]">
349
+ <div v-if="item.showAvatar" class="gender-icon">
350
+ <img :src="maleIcon" alt="male" class="gender-img" />
351
+ </div>
352
+ <span class="label-text">{{ item.label }}<span v-if="getItemColon(item)" class="colon">:</span></span>
353
+ </div>
354
+ <div
355
+ class="content-wrapper"
356
+ :class="{ 'ellipsis': isContentOverflow(data[item.field]) }"
357
+ :data-full-text="data[item.field]"
358
+ >
359
+ <template v-if="wrapperClassObject['xhdesc-report-mode']">
360
+ <div class="report-value">
361
+ {{ data[item.field] }}
362
+ </div>
363
+ <div class="report-unit">
364
+ {{ item.unit }}
365
+ </div>
366
+ </template>
367
+ <template v-else>
368
+ {{ data[item.field] }}
369
+ </template>
370
+ </div>
371
+ </div>
372
+ </template>
373
+ </template>
374
+ </div>
375
+ </template>
376
+
377
+ <!-- 可选:底部区域(分割线 + 三列内容) -->
378
+ <div v-if="config && config.footer && Array.isArray(config.footer.items) && data" class="xhdesc-footer">
379
+ <div class="xhdesc-divider" />
380
+ <!-- 医疗病史模式下的footer结构 -->
381
+ <div v-if="wrapperClassObject['xhdesc-medical-history']" class="medical-history-footer">
382
+ <div
383
+ v-for="(item, idx) in config.footer.items"
384
+ :key="item.field || idx"
385
+ class="medical-history-item">
386
+ <div class="medical-history-content">
387
+ <a-tooltip
388
+ v-if="isContentOverflow(data[item.field])"
389
+ :title="data[item.field]"
390
+ placement="topLeft"
391
+ :overlay-style="{ maxWidth: '400px' }"
392
+ >
393
+ <div class="medical-history-text ellipsis">
394
+ <span class="medical-history-label">{{ item.label }}:</span>{{ data[item.field] }}
395
+ </div>
396
+ </a-tooltip>
397
+ <div
398
+ v-else
399
+ class="medical-history-text"
400
+ >
401
+ <span class="medical-history-label">{{ item.label }}:</span>{{ data[item.field] }}
402
+ </div>
403
+ </div>
404
+ </div>
405
+ <!-- 右侧信息:换到下一行并靠右对齐(如 医生 / 医嘱日期) -->
406
+ <div
407
+ v-if="Array.isArray(config.footer.rightItems) && config.footer.rightItems.length"
408
+ class="footer-right">
409
+ <div
410
+ v-for="(item, ridx) in config.footer.rightItems"
411
+ :key="item.field || ridx"
412
+ class="footer-right-item">
413
+ <div class="label-wrapper">
414
+ <span class="label-text">{{ item.label }}<span v-if="getItemColon(item)" class="colon">:</span></span>
415
+ </div>
416
+ <div
417
+ class="content-wrapper"
418
+ :class="{ 'ellipsis': isContentOverflow(data[item.field]) }"
419
+ :data-full-text="data[item.field]"
420
+ >{{ data[item.field] }}
421
+ </div>
422
+ </div>
423
+ </div>
424
+ </div>
425
+ <!-- 非医疗病史模式下的footer结构 -->
426
+ <div v-else class="footer-grid">
427
+ <div
428
+ v-for="(item, idx) in config.footer.items"
429
+ :key="item.field || idx"
430
+ class="description-item">
431
+ <div class="label-wrapper">
432
+ <span class="label-text">{{ item.label }}<span v-if="getItemColon(item)" class="colon">:</span></span>
433
+ </div>
434
+ <div
435
+ class="content-wrapper"
436
+ :class="{ 'ellipsis': isContentOverflow(data[item.field]) }"
437
+ :data-full-text="data[item.field]"
438
+ >{{ data[item.field] }}
439
+ </div>
440
+ </div>
441
+ </div>
442
+ <!-- 右侧信息:换到下一行并靠右对齐(如 医生 / 医嘱日期) -->
443
+ <div
444
+ v-if="!wrapperClassObject['xhdesc-medical-history'] && Array.isArray(config.footer.rightItems) && config.footer.rightItems.length"
445
+ class="footer-right">
446
+ <div
447
+ v-for="(item, ridx) in config.footer.rightItems"
448
+ :key="item.field || ridx"
449
+ class="footer-right-item">
450
+ <div class="label-wrapper">
451
+ <span class="label-text">{{ item.label }}<span v-if="getItemColon(item)" class="colon">:</span></span>
452
+ </div>
453
+ <div
454
+ class="content-wrapper"
455
+ :class="{ 'ellipsis': isContentOverflow(data[item.field]) }"
456
+ :data-full-text="data[item.field]"
457
+ >{{ data[item.field] }}
458
+ </div>
459
+ </div>
460
+ </div>
461
+ </div>
462
+ </div>
463
+ </div>
464
+ </template>
465
+
466
+ <script>
467
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
468
+
469
+ export default {
470
+ name: 'XHDescriptions',
471
+ data () {
472
+ return {
473
+ hiddenConfig: '-1^',
474
+ data: null,
475
+ rawData: null,
476
+ config: null,
477
+ showAllItems: false,
478
+ maleIcon: require('@vue2-client/assets/svg/male.svg')
479
+ }
480
+ },
481
+ props: {
482
+ queryParamsName: {
483
+ type: String,
484
+ default: ''
485
+ },
486
+ parameter: {
487
+ type: Object,
488
+ default: () => {
489
+ return {}
490
+ }
491
+ }
492
+ },
493
+ computed: {
494
+ wrapperClassObject () {
495
+ const attrs = this.$attrs || {}
496
+ const classes = {}
497
+
498
+ const booleanStyleKeys = [
499
+ 'description',
500
+ 'no-padding',
501
+ 'medical-history',
502
+ 'patient-style',
503
+ 'margin-top-12',
504
+ 'padding-left15',
505
+ 'line-height30',
506
+ 'report-mode',
507
+ 'border1',
508
+ 'grid-formatted'
509
+ ]
510
+ booleanStyleKeys.forEach(key => {
511
+ const val = attrs[key]
512
+ const truthy = val === true || val === '' || val === 'true'
513
+ if (truthy) classes[`xhdesc-${key}`] = true
514
+ })
515
+ const size = attrs.size
516
+ if (size && typeof size === 'string') classes[`xhdesc-size-${size}`] = true
517
+ if (this.showAllItems && this.config && this.config.detailsConfig) classes['xhdesc-open'] = true
518
+ return classes
519
+ },
520
+ detailsAfterIndex () {
521
+ return (this.config && this.config.detailsConfig && this.config.detailsConfig.showAfterIndex) || 999
522
+ },
523
+ hasMoreItems () {
524
+ if (!(this.config && this.config.detailsConfig)) return false
525
+ if (!this.data || !(this.config && this.config.items) || !Array.isArray(this.config.items)) return false
526
+ const hiddenStartIndex = this.detailsAfterIndex || 0
527
+ if (hiddenStartIndex >= this.config.items.length) return false
528
+ for (let i = hiddenStartIndex; i < this.config.items.length; i++) {
529
+ const item = this.config.items[i]
530
+ if (item && item.field && this.data[item.field] !== null && this.data[item.field] !== undefined) {
531
+ return true
532
+ }
533
+ }
534
+ return false
535
+ },
536
+ visibleItems () {
537
+ if (!(this.config && this.config.items)) return []
538
+ if (!(this.config && this.config.detailsConfig)) return this.config.items
539
+ if (this.showAllItems) return this.config.items.slice(0, this.detailsAfterIndex)
540
+ return this.config.items.slice(0, this.detailsAfterIndex)
541
+ },
542
+ hiddenItems () {
543
+ if (!(this.config && this.config.items)) return []
544
+ if (!(this.config && this.config.detailsConfig)) return []
545
+ return this.config.items.slice(this.detailsAfterIndex)
546
+ },
547
+ visibleItemsFiltered () {
548
+ const list = this.visibleItems || []
549
+ if (!this.data) return []
550
+ // 过滤掉占位符项目,占位符在模板中单独处理
551
+ const res = list.filter(item => {
552
+ // 跳过空字段(占位符)
553
+ if (!item.field || item.field === '') return false
554
+ // 其他字段只有在有数据时才显示
555
+ return this.data[item.field] !== null && this.data[item.field] !== undefined
556
+ })
557
+ if (!this.showAllItems) return res
558
+ const hiddenFields = new Set((this.hiddenItems || []).map(i => i.field))
559
+ return res.filter(item => !hiddenFields.has(item.field))
560
+ },
561
+ hiddenItemsFiltered () {
562
+ const list = this.hiddenItems || []
563
+ if (!this.data) return []
564
+ // 过滤掉占位符项目,占位符在模板中单独处理
565
+ const res = list.filter(item => {
566
+ // 跳过空字段(占位符)
567
+ if (!item.field || item.field === '') return false
568
+ // 其他字段只有在有数据时才显示
569
+ return this.data[item.field] !== null && this.data[item.field] !== undefined
570
+ })
571
+ return res
572
+ },
573
+ // Grid布局的行分组数据
574
+ gridRows () {
575
+ if (!this.config?.items || !Array.isArray(this.config.items)) return []
576
+
577
+ const config = this.config || {}
578
+ const layout = config.layout
579
+
580
+ // 处理对象格式的layout配置(如 {"xl":5,"md":5,...})
581
+ if (layout && typeof layout === 'object' && !Array.isArray(layout)) {
582
+ // 检查是否所有断点都是相同的列数
583
+ const columnCounts = Object.values(layout)
584
+ const isUniform = columnCounts.every(count => count === columnCounts[0])
585
+ if (isUniform && columnCounts[0] > 0) {
586
+ const itemsPerRow = columnCounts[0]
587
+ // 根据项目数量创建相应行数,每行按配置列数显示
588
+ const rows = []
589
+ const items = this.config.items
590
+
591
+ for (let i = 0; i < items.length; i += itemsPerRow) {
592
+ const rowItems = items.slice(i, i + itemsPerRow)
593
+ rows.push(rowItems)
594
+ }
595
+
596
+ return rows
597
+ }
598
+ }
599
+
600
+ // 回退到原来的数组格式处理
601
+ if (!Array.isArray(layout) || !this.visibleItemsFiltered) return []
602
+
603
+ const items = [...this.visibleItemsFiltered]
604
+ const rows = []
605
+ let currentIndex = 0
606
+
607
+ for (let i = 0; i < layout.length; i++) {
608
+ const columnsInRow = layout[i]
609
+ const rowItems = items.slice(currentIndex, currentIndex + columnsInRow)
610
+ rows.push(rowItems)
611
+ currentIndex += columnsInRow
612
+ if (currentIndex >= items.length) break
613
+ }
614
+
615
+ return rows
616
+ }
617
+ },
618
+ created () {
619
+ this.getData(this.queryParamsName, {})
620
+ },
621
+ methods: {
622
+ async getData (data, parameterData) {
623
+ this.data = null
624
+ this.config = null
625
+ this.showAllItems = false
626
+ getConfigByName(data, 'af-his', res => {
627
+ this.config = res
628
+ const hiddenConfig = (this.config && this.config.hiddenConfig) || (0 === 1)
629
+ const parameter = { ...res.parameter, ...this.parameter, ...parameterData }
630
+ runLogic(res.logicName, parameter, 'af-his').then(result => {
631
+ // 如果配置启用 parseList(或 expandList),将 type=list 的父项展开为父项 + 子项(子项来自 result 中对应的数组)
632
+ const expandFlag = Boolean(res.expandList || res.parseList)
633
+ // 不用展开则直接将结果赋值给augmented
634
+ if(!expandFlag){
635
+ if (hiddenConfig) {
636
+ for (const key in result) {
637
+ if (Object.prototype.hasOwnProperty.call(result, key) && result[key] === this.hiddenConfig) {
638
+ delete result[key]
639
+ }
640
+ }
641
+ }
642
+ this.data = result
643
+ }
644
+ const augmented = {}
645
+ if (expandFlag && Array.isArray(res.items)) {
646
+ // 在 expandFlag && Array.isArray(res.items) 的分支内
647
+ const expandedItems = []
648
+ // 用快照遍历,避免遍历被修改过的 res.items
649
+ const originalItems = Array.isArray(res.items) ? res.items.slice() : []
650
+ originalItems.forEach(parentItem => {
651
+ if (!parentItem) return
652
+ if (parentItem.type === 'list') {
653
+ expandedItems.push(parentItem)
654
+ const arr = result ? result[parentItem.field] : null
655
+ if (Array.isArray(arr)) {
656
+ augmented[parentItem.field] = ''
657
+ arr.forEach((sub, idx) => {
658
+ const childItem = {
659
+ field: sub.field || `${parentItem.field}_${idx + 1}`,
660
+ label: sub.label ?? '',
661
+ colon: sub.colon ? sub.colon : parentItem.colon,
662
+ style: parentItem.style ? { ...parentItem.style } : undefined,
663
+ showAvatar: parentItem.showAvatar,
664
+ unit: parentItem.unit,
665
+ }
666
+ if (sub && sub.value !== undefined) augmented[childItem.field] = sub.value
667
+ expandedItems.push(childItem)
668
+ })
669
+ }
670
+ } else {
671
+ // 普通项直接加入
672
+ expandedItems.push(parentItem)
673
+ }
674
+ })
675
+ // 不要改原 res,创建新 config
676
+ this.rawData = result
677
+ this.config = { ...res, items: expandedItems }
678
+ this.data = augmented
679
+ }
680
+ })
681
+ })
682
+ },
683
+ toggleDetails () {
684
+ this.showAllItems = !this.showAllItems
685
+ },
686
+ isContentOverflow (content) {
687
+ if (!content || typeof content !== 'string') return false
688
+ return content.length > 150
689
+ },
690
+ // 获取全局 colon 配置
691
+ getGlobalColon () {
692
+ if (this.config && this.config.style && this.config.style.colon !== undefined) {
693
+ return this.config.style.colon
694
+ }
695
+ return true // 默认显示冒号
696
+ },
697
+ // 获取单个 item 的 colon 配置
698
+ getItemColon (item) {
699
+ // 优先级:item配置 > 全局配置 > 默认true
700
+ if (item && item.colon !== undefined) {
701
+ return item.colon
702
+ }
703
+ return this.getGlobalColon()
704
+ },
705
+ // 获取当前grid布局的列数
706
+ getGridColumns () {
707
+ const layout = this.config?.layout
708
+ if (layout && typeof layout === 'object' && !Array.isArray(layout)) {
709
+ const columnCounts = Object.values(layout)
710
+ if (columnCounts.length > 0 && columnCounts.every(count => count === columnCounts[0])) {
711
+ return columnCounts[0]
712
+ }
713
+ }
714
+ return 5 // 默认5列
715
+ },
716
+ // 生成CSS Grid模板列样式
717
+ getGridTemplateColumns (columns) {
718
+ if (typeof columns !== 'number' || columns <= 0) return 'repeat(auto-fit, minmax(200px, 1fr))'
719
+ return `repeat(${columns}, 1fr)`
720
+ },
721
+ // 判断项目是否应该显示(有数据)
722
+ shouldShowItem (item) {
723
+ if (!item.field || item.field === '') return false
724
+ return this.data[item.field] !== null && this.data[item.field] !== undefined
725
+ }
726
+ },
727
+ watch: {
728
+ queryParamsName: {
729
+ handler (newValue) {
730
+ console.log(newValue)
731
+ this.getData(newValue, {})
732
+ },
733
+ deep: true
734
+ },
735
+ parameter: {
736
+ handler (newValue, oldValue) {
737
+ console.log('监听事件触发:', { old: oldValue, new: newValue })
738
+ this.getData(this.queryParamsName, {})
739
+ },
740
+ deep: true
741
+ }
742
+ }
743
+ }
744
+ </script>
745
+
746
+ <style scoped lang="less">
747
+ .patient-info-descriptions {
748
+ background: #fff;
749
+ border-radius: 4px;
750
+ width: 100%;
751
+ }
752
+
753
+ .descriptions-container {
754
+ position: relative;
755
+ width: 100%;
756
+ padding-right: 80px; /* 为按钮预留空间 */
757
+ }
758
+
759
+ /* 自适应布局样式 */
760
+ .flex-descriptions {
761
+ display: flex;
762
+ flex-wrap: wrap;
763
+ gap: 8px 24px;
764
+ width: 100%;
765
+ }
766
+
767
+ /* Grid布局样式 */
768
+ .grid-descriptions {
769
+ width: 100%;
770
+ }
771
+
772
+ .grid-row {
773
+ display: grid;
774
+ gap: 16px 24px;
775
+ width: 100%;
776
+ margin-bottom: 16px;
777
+ }
778
+
779
+ .grid-row:last-child {
780
+ margin-bottom: 0;
781
+ }
782
+
783
+ .grid-item {
784
+ display: flex;
785
+ align-items: flex-start;
786
+ padding: 8px;
787
+ border-radius: 4px;
788
+ transition: background-color 0.3s;
789
+ min-width: 0; /* 允许内容收缩 */
790
+ min-height: 40px; /* 确保行高一致 */
791
+ }
792
+
793
+ .grid-item:hover {
794
+ background-color: rgba(0, 0, 0, 0.02);
795
+ }
796
+
797
+ /* 占位符项目样式 */
798
+ .placeholder-item {
799
+ background-color: transparent !important;
800
+ }
801
+
802
+ .placeholder-item:hover {
803
+ background-color: transparent !important;
804
+ }
805
+
806
+ .placeholder-item {
807
+ /* 占位符项目保持布局空间 */
808
+ min-height: 32px;
809
+ width: fit-content;
810
+ margin-right: 24px;
811
+ margin-bottom: 16px;
812
+ }
813
+
814
+ .placeholder-content {
815
+ /* 占位符内容为空,不显示任何内容 */
816
+ min-height: 20px; /* 较小的高度,避免视觉突兀 */
817
+ visibility: hidden; /* 完全隐藏内容 */
818
+ }
819
+
820
+ /* Grid布局冒号样式 */
821
+ .colon {
822
+ margin: 0;
823
+ color: rgba(0, 0, 0, 0.65);
824
+ font-size: 14px;
825
+ }
826
+
827
+ .description-item {
828
+ display: inline-flex;
829
+ align-items: center;
830
+ padding: 4px 8px;
831
+ border-radius: 4px;
832
+ transition: background-color 0.3s;
833
+ white-space: nowrap;
834
+ flex: 0 1 auto;
835
+ }
836
+
837
+ .description-item:hover {
838
+ background-color: rgba(0, 0, 0, 0.02);
839
+ }
840
+
841
+ /* 共用样式 */
842
+ .label-wrapper {
843
+ display: flex;
844
+ align-items: center;
845
+ gap: 8px;
846
+ color: rgba(0, 0, 0, 0.65);
847
+ font-size: v-bind('(config && config.style && config.style.fontSize) || "14px"');
848
+ white-space: nowrap;
849
+ }
850
+
851
+ .label-text {
852
+ white-space: nowrap;
853
+ color: #313131;
854
+ text-decoration: none !important;
855
+ }
856
+
857
+ .list-label-text{
858
+ font-weight: bold;
859
+ }
860
+
861
+ .content-wrapper {
862
+ display: inline-flex;
863
+ align-items: center;
864
+ margin-left: 4px;
865
+ font-size: v-bind('(config && config.style && config.style.fontSize) || "14px"');
866
+ color: rgba(0, 0, 0, 0.85);
867
+ text-decoration: none !important;
868
+ max-width: 300px;
869
+ overflow: hidden;
870
+ text-overflow: ellipsis;
871
+ white-space: nowrap;
872
+ }
873
+
874
+ /* 强制移除任何链接样式 */
875
+ ::v-deep a {
876
+ color: #313131 !important;
877
+ text-decoration: none !important;
878
+ }
879
+
880
+ .detail-button-wrapper {
881
+ position: absolute;
882
+ right: 0;
883
+ top: 0;
884
+ z-index: 10;
885
+ padding: 4px 8px;
886
+ white-space: nowrap;
887
+ background-color: #fff;
888
+ }
889
+
890
+ /* 底部区域:分割线 + 三列内容 */
891
+ .xhdesc-footer {
892
+ margin-top: 12px;
893
+ }
894
+
895
+ .xhdesc-divider {
896
+ width: calc(100% + 24px);
897
+ height: 0;
898
+ border-bottom: 1px solid #E5E9F0;
899
+ margin: 10px -12px 14px;
900
+ overflow: hidden;
901
+ }
902
+
903
+ /* medical-history 模式:左 padding 11px,右 12px */
904
+ .patient-info-descriptions.xhdesc-medical-history .xhdesc-divider {
905
+ width: calc(100% + 23px);
906
+ margin-left: -11px;
907
+ margin-right: -12px;
908
+ }
909
+
910
+ .footer-grid {
911
+ display: grid;
912
+ grid-template-columns: 1fr; // 单列
913
+ gap: 8px 24px; // 与上方描述项间距保持一致
914
+ align-items: start; // 左上对齐
915
+ }
916
+
917
+ .footer-right {
918
+ margin-top: 8px;
919
+ display: flex;
920
+ justify-content: flex-end;
921
+ align-items: center;
922
+ gap: 16px;
923
+ }
924
+
925
+ .footer-right-item {
926
+ display: inline-flex;
927
+ align-items: center;
928
+ }
929
+
930
+ /* Ant Design 描述列表样式覆盖 */
931
+ ::v-deep(.ant-descriptions-row) {
932
+ display: flex;
933
+ flex-direction: row;
934
+ align-items: flex-start;
935
+ }
936
+
937
+ ::v-deep(.ant-descriptions-item) {
938
+ padding: 0 !important;
939
+ display: flex !important;
940
+ align-items: stretch !important; /* 拉伸对齐,确保子项高度一致 */
941
+ flex-direction: row !important;
942
+ margin-right: 24px;
943
+ width: fit-content !important;
944
+ margin-bottom: 16px;
945
+ height: 32px !important; /* 固定高度 */
946
+ }
947
+
948
+ ::v-deep(.ant-descriptions-item-container) {
949
+ display: flex !important;
950
+ flex-direction: row !important;
951
+ align-items: flex-start !important;
952
+ position: relative;
953
+ gap: 0 !important;
954
+ width: 100% !important;
955
+ }
956
+
957
+ ::v-deep(.ant-descriptions-item-label) {
958
+ color: rgba(0, 0, 0, 0.65) !important;
959
+ padding: 0 !important;
960
+ margin: 0 !important;
961
+ font-size: v-bind('(config && config.style && config.style.fontSize) || "14px"') !important;
962
+ display: flex !important;
963
+ align-items: center !important;
964
+ justify-content: flex-start !important;
965
+ white-space: nowrap !important;
966
+ min-width: v-bind('(config && config.style && config.style.labelWidth) || "80px"') !important;
967
+ min-height: 32px !important;
968
+ height: 32px !important;
969
+ line-height: 32px !important;
970
+ padding-right: 2px !important;
971
+ }
972
+
973
+ ::v-deep(.ant-descriptions-item-content) {
974
+ font-size: v-bind('(config && config.style && config.style.fontSize) || "14px"') !important;
975
+ display: flex !important;
976
+ align-items: center !important;
977
+ justify-content: flex-start !important;
978
+ height: 100% !important; /* 占满父容器高度 */
979
+ padding: 0 !important;
980
+ margin: 0 !important;
981
+ margin-left: 0px !important;
982
+ }
983
+
984
+ ::v-deep(.ant-descriptions-item-colon) {
985
+ position: static !important;
986
+ display: inline-flex !important;
987
+ align-items: center !important;
988
+ margin: 0 !important;
989
+ padding: 0 !important;
990
+ margin-right: 2px !important;
991
+ }
992
+
993
+
994
+ ::v-deep(.ant-descriptions-item-container:hover) {
995
+ background-color: rgba(0, 0, 0, 0.02);
996
+ border-radius: 4px;
997
+ }
998
+
999
+ ::v-deep(.ant-btn-link) {
1000
+ padding: 0;
1001
+ height: auto;
1002
+ line-height: 1;
1003
+ }
1004
+
1005
+ /* 隐藏占位符项目的冒号 */
1006
+ ::v-deep(.ant-descriptions-item.placeholder-item .ant-descriptions-item-colon) {
1007
+ display: none !important;
1008
+ }
1009
+
1010
+
1011
+
1012
+ ::v-deep(.ant-btn-link:hover) {
1013
+ color: #1890ff;
1014
+ background: transparent;
1015
+ }
1016
+
1017
+ /* 响应式调整 */
1018
+ @media screen and (max-width: 768px) {
1019
+ .content-wrapper {
1020
+ max-width: 200px;
1021
+ }
1022
+ }
1023
+
1024
+ @media screen and (max-width: 576px) {
1025
+ .content-wrapper {
1026
+ max-width: 150px;
1027
+ }
1028
+ .flex-descriptions {
1029
+ gap: 4px 12px;
1030
+ }
1031
+ }
1032
+
1033
+ /* 添加虚线样式 */
1034
+ .with-divider {
1035
+ position: relative;
1036
+ margin-bottom: 16px !important;
1037
+ }
1038
+
1039
+ .with-divider::after {
1040
+ content: '';
1041
+ position: absolute;
1042
+ left: 0;
1043
+ bottom: -8px;
1044
+ width: 100%;
1045
+ height: 0;
1046
+ border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
1047
+ }
1048
+
1049
+ /* 对于 Ant Design 描述列表的特殊处理 */
1050
+ ::v-deep(.ant-descriptions-item.with-divider) {
1051
+ position: relative;
1052
+ margin-bottom: 16px !important;
1053
+ }
1054
+
1055
+ ::v-deep(.ant-descriptions-item.with-divider::after) {
1056
+ content: '';
1057
+ position: absolute;
1058
+ left: 0;
1059
+ bottom: -8px;
1060
+ width: 100%;
1061
+ height: 0;
1062
+ border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
1063
+ }
1064
+
1065
+ /* 加边框 */
1066
+ .xhdesc-description {
1067
+ padding: 4px 4px 4px 4px;
1068
+
1069
+ &.patient-info-descriptions,
1070
+ .patient-info-descriptions {
1071
+ border: 1px solid #E5E9F0;
1072
+ border-radius: 6px;
1073
+ padding: 6.5px 12px;
1074
+
1075
+ ::v-deep .ant-btn-link {
1076
+ border: none;
1077
+ }
1078
+
1079
+ ::v-deep .ant-descriptions-item-content {
1080
+ font-weight: bold;
1081
+ }
1082
+ }
1083
+ }
1084
+ /* 病患信息样式开关:patient-style */
1085
+ .xhdesc-patient-style {
1086
+ min-height: 41px;
1087
+ border-radius: 6px;
1088
+ opacity: 1;
1089
+ background: #FFFFFF;
1090
+ box-sizing: border-box;
1091
+ border: 0px solid #E5E9F0;
1092
+ padding-bottom: 0px !important;
1093
+ width: 100%;
1094
+ overflow: hidden;
1095
+
1096
+ &.patient-info-descriptions,
1097
+ .patient-info-descriptions {
1098
+ border: 0px solid #E5E9F0;
1099
+ border-radius: 6px;
1100
+ background: #FFFFFF;
1101
+ min-height: 41px;
1102
+ display: flex;
1103
+ align-items: center;
1104
+ flex-wrap: wrap;
1105
+ padding: 8px 12px;
1106
+
1107
+ ::v-deep .label-wrapper .label-text {
1108
+ font-family: "Source Han Sans";
1109
+ font-size: 16px !important;
1110
+ font-weight: 400 !important;
1111
+ line-height: 23px !important;
1112
+ letter-spacing: 0em;
1113
+ font-feature-settings: "kern" on;
1114
+ color: #5D5C5C;
1115
+ white-space: nowrap;
1116
+ }
1117
+
1118
+ ::v-deep .label-wrapper.with-avatar {
1119
+ gap: 9px;
1120
+ }
1121
+
1122
+ .gender-icon {
1123
+ margin-top: 2px;
1124
+ }
1125
+ .gender-img {
1126
+ width: 20px;
1127
+ height: 20px;
1128
+ opacity: 1;
1129
+ display: inline-block;
1130
+ }
1131
+
1132
+ ::v-deep .detail-button-wrapper .ant-btn .anticon {
1133
+ margin-left: 4px;
1134
+ color: #94979E;
1135
+ opacity: 1;
1136
+ }
1137
+
1138
+ ::v-deep .detail-button-wrapper .ant-btn,
1139
+ ::v-deep .detail-button-wrapper .ant-btn span {
1140
+ font-family: "Source Han Sans";
1141
+ font-size: 16px;
1142
+ color: #5D5C5C;
1143
+ white-space: nowrap;
1144
+ }
1145
+
1146
+ ::v-deep .ant-descriptions-item-content,
1147
+ ::v-deep .content-wrapper,
1148
+ .medical-history-text {
1149
+ font-family: "Source Han Sans";
1150
+ font-size: 16px !important;
1151
+ font-weight: 700;
1152
+ line-height: 23px !important;
1153
+ letter-spacing: 0em;
1154
+ font-feature-settings: "kern" on;
1155
+ color: #5D5C5C;
1156
+ word-break: break-word;
1157
+ }
1158
+
1159
+ ::v-deep .ant-descriptions-item {
1160
+ padding-bottom: 4px;
1161
+ display: flex;
1162
+ align-items: center;
1163
+ min-height: 32px;
1164
+ }
1165
+
1166
+ @media (max-width: 768px) {
1167
+ padding: 6px 8px;
1168
+
1169
+ ::v-deep .ant-descriptions-item {
1170
+ flex-basis: 50%; /* 在小屏幕上每行显示两项 */
1171
+ }
1172
+
1173
+ ::v-deep .label-wrapper .label-text,
1174
+ ::v-deep .ant-descriptions-item-content {
1175
+ font-size: 14px !important;
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+
1181
+ /* 展开态:patient-style 自适应高度 */
1182
+ .xhdesc-patient-style.xhdesc-open,
1183
+ .xhdesc-open .patient-info-descriptions.xhdesc-patient-style,
1184
+ .xhdesc-open .xhdesc-patient-style .patient-info-descriptions {
1185
+ height: auto;
1186
+ }
1187
+ .xhdesc-patient-style.xhdesc-open .patient-info-descriptions,
1188
+ .xhdesc-open .patient-info-descriptions.xhdesc-patient-style,
1189
+ .xhdesc-open .xhdesc-patient-style .patient-info-descriptions {
1190
+ align-items: flex-start;
1191
+ }
1192
+ // 去除住院收费页面两个描述列表之间的间距
1193
+ .xhdesc-margin-top-12 {
1194
+ margin-top: -12px;
1195
+ }
1196
+ .xhdesc-no-padding {
1197
+ padding: 0px;
1198
+ &.patient-info-descriptions,
1199
+ .patient-info-descriptions {
1200
+ ::v-deep .descriptions-container {
1201
+ padding: 0px;
1202
+ }
1203
+ ::v-deep .content-wrapper {
1204
+ margin: 0px;
1205
+ }
1206
+ }
1207
+ }
1208
+ // 库存管理左侧边距
1209
+ .xhdesc-padding-left15{
1210
+ padding-left: 15px;
1211
+ }
1212
+ // 库存管理左侧字体样式
1213
+ .xhdesc-line-height30{
1214
+ &.patient-info-descriptions,
1215
+ .patient-info-descriptions{
1216
+ ::v-deep .ant-descriptions-item{
1217
+ margin-bottom: 0px
1218
+ }
1219
+ ::v-deep .content-wrapper{
1220
+ line-height: 30px;
1221
+ }
1222
+ ::v-deep .ant-descriptions-item-label{
1223
+ line-height: 30px;
1224
+ }
1225
+ ::v-deep .content-wrapper{
1226
+ color: #0057FE;
1227
+ font-weight: 700
1228
+ }
1229
+ }
1230
+ }
1231
+ /* 医疗病史模式:自定义HTML结构样式 */
1232
+ .medical-history-descriptions {
1233
+ width: 100%;
1234
+ }
1235
+
1236
+ .medical-history-item {
1237
+ margin: 0;
1238
+ width: 100%;
1239
+ }
1240
+
1241
+ .medical-history-item.with-divider {
1242
+ position: relative;
1243
+ padding-bottom: 4px;
1244
+ margin-bottom: 4px;
1245
+ }
1246
+
1247
+ .medical-history-item.with-divider::after {
1248
+ content: '';
1249
+ position: absolute;
1250
+ left: 0;
1251
+ bottom: 0;
1252
+ width: 100%;
1253
+ height: 0;
1254
+ border-bottom: 1px solid rgba(0, 0, 0, 0.15);
1255
+ }
1256
+
1257
+ .medical-history-content {
1258
+ font-family: "Source Han Sans";
1259
+ font-size: 18px;
1260
+ line-height: 24px;
1261
+ letter-spacing: 0em;
1262
+ text-align: left;
1263
+ word-break: break-word;
1264
+ white-space: normal;
1265
+ text-indent: 0;
1266
+ padding-left: 0;
1267
+ margin-left: 0;
1268
+ overflow: hidden;
1269
+ position: relative;
1270
+ }
1271
+
1272
+ .medical-history-label {
1273
+ font-family: "Source Han Sans";
1274
+ font-size: 16px;
1275
+ font-weight: 700;
1276
+ color: #313131;
1277
+ white-space: nowrap;
1278
+ float: left;
1279
+ margin-right: 0px;
1280
+ position: relative;
1281
+ z-index: 1;
1282
+ }
1283
+
1284
+ .medical-history-text {
1285
+ font-family: "Source Han Sans";
1286
+ font-size: 16px;
1287
+ font-weight: 400;
1288
+ color: #313131;
1289
+ display: block;
1290
+ overflow: hidden;
1291
+ text-indent: 0;
1292
+ padding-left: 0;
1293
+ margin-left: 0;
1294
+ word-break: break-word;
1295
+ white-space: normal;
1296
+ text-align: left;
1297
+ line-height: 24px;
1298
+ margin-top: 0;
1299
+ margin-bottom: 0;
1300
+ }
1301
+
1302
+ .medical-history-text.ellipsis {
1303
+ display: -webkit-box;
1304
+ -webkit-box-orient: vertical;
1305
+ -webkit-line-clamp: 3;
1306
+ line-clamp: 3;
1307
+ overflow: hidden;
1308
+ cursor: pointer;
1309
+ position: relative;
1310
+ word-break: break-word;
1311
+ white-space: normal;
1312
+ line-height: 24px;
1313
+ text-indent: 0;
1314
+ padding-left: 0;
1315
+ margin-left: 0;
1316
+ text-align: left;
1317
+ -webkit-box-pack: start;
1318
+ -webkit-box-align: start;
1319
+ }
1320
+
1321
+ .medical-history-text.ellipsis::after {
1322
+ display: none;
1323
+ }
1324
+
1325
+ .medical-history-text.ellipsis::first-line {
1326
+ text-indent: 0;
1327
+ }
1328
+
1329
+ @supports not (-webkit-line-clamp: 3) {
1330
+ .medical-history-text.ellipsis {
1331
+ display: block;
1332
+ max-height: 72px;
1333
+ overflow: hidden;
1334
+ position: relative;
1335
+ }
1336
+
1337
+ .medical-history-text.ellipsis::after {
1338
+ content: '...';
1339
+ position: absolute;
1340
+ right: 0;
1341
+ bottom: 0;
1342
+ background: #fff;
1343
+ padding-left: 4px;
1344
+ display: block;
1345
+ }
1346
+ }
1347
+
1348
+ /* 医疗病史样式开关 */
1349
+ .patient-info-descriptions.xhdesc-medical-history {
1350
+ padding: 9px 12px 10px 11px !important;
1351
+ .descriptions-container {
1352
+ padding-right: 0;
1353
+ padding-left: 0px;
1354
+ }
1355
+ .medical-history-footer {
1356
+ width: 100%;
1357
+ }
1358
+ .medical-history-footer .footer-right {
1359
+ margin-top: 8px;
1360
+ display: flex;
1361
+ justify-content: flex-end;
1362
+ align-items: flex-start;
1363
+ gap: 16px;
1364
+ width: 100%;
1365
+ }
1366
+ .medical-history-footer .footer-right .label-wrapper .label-text {
1367
+ font-family: "Source Han Sans";
1368
+ font-size: 16px;
1369
+ font-weight: 700;
1370
+ color: #313131;
1371
+ line-height: 22px;
1372
+ }
1373
+ .medical-history-footer .footer-right .content-wrapper {
1374
+ font-family: "Source Han Sans";
1375
+ font-size: 16px;
1376
+ font-weight: 400;
1377
+ line-height: 22px;
1378
+ color: #313131;
1379
+ }
1380
+
1381
+ .medical-history-footer .footer-right .medical-history-item {
1382
+ display: inline-block;
1383
+ text-align: right;
1384
+ }
1385
+
1386
+ .medical-history-footer .footer-right .medical-history-content {
1387
+ text-align: right;
1388
+ }
1389
+
1390
+ .medical-history-footer .footer-right .medical-history-label {
1391
+ float: none;
1392
+ display: inline;
1393
+ margin-right: 0px;
1394
+ }
1395
+
1396
+ .medical-history-footer .footer-right .medical-history-text {
1397
+ display: inline;
1398
+ text-align: right;
1399
+ }
1400
+
1401
+ .medical-history-footer .footer-right .medical-history-text.ellipsis {
1402
+ display: inline;
1403
+ text-align: right;
1404
+ }
1405
+ }
1406
+
1407
+ /* 加边框 */
1408
+ .xhdesc-border1 {
1409
+ &.patient-info-descriptions,
1410
+ .patient-info-descriptions {
1411
+ border: 1px solid #E5E9F0;
1412
+ border-radius: 6px;
1413
+ }
1414
+ }
1415
+
1416
+ .xhdesc-grid-formatted {
1417
+ &.patient-info-descriptions,
1418
+ .patient-info-descriptions {
1419
+ ::v-deep .label-wrapper .label-text {
1420
+ height: 23px;
1421
+ opacity: 1;
1422
+ font-family: "Source Han Sans";
1423
+ font-size: 16px;
1424
+ font-weight: normal;
1425
+ line-height: normal;
1426
+ letter-spacing: 0em;
1427
+ color: #313131;
1428
+ }
1429
+
1430
+ ::v-deep .content-wrapper,
1431
+ ::v-deep .ant-descriptions-item-content {
1432
+ height: 23px;
1433
+ opacity: 1;
1434
+ font-family: "Source Han Sans";
1435
+ font-size: 16px;
1436
+ font-weight: bold;
1437
+ line-height: normal;
1438
+ letter-spacing: 0em;
1439
+ color: #313131;
1440
+ }
1441
+ }
1442
+ }
1443
+
1444
+ .xhdesc-report-mode {
1445
+ &.patient-info-descriptions,
1446
+ .patient-info-descriptions {
1447
+ ::v-deep .flex-descriptions{
1448
+ gap: 2px;
1449
+ .description-item {
1450
+ min-width: 175px;
1451
+ border-radius: 0px;
1452
+ display: inline-block;
1453
+ padding: 10px;
1454
+ border: 1px solid #E5E9F0;
1455
+ .content-wrapper {
1456
+ margin-left: 0px;
1457
+ width: 100%;
1458
+ margin-top: 14px;
1459
+ display: flex; justify-content: space-between;
1460
+ }
1461
+ }
1462
+ }
1463
+ ::v-deep .report-value {
1464
+ font-weight: bold;
1465
+ color: #0057FE;
1466
+ }
1467
+ ::v-deep .report-unit {
1468
+ font-weight: bold;
1469
+ text-align: end;
1470
+ }
1471
+ }
1472
+ }
1473
+ </style>