vue2-client 1.22.2 → 1.22.3

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