vue2-client 1.22.27 → 1.22.28

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.
@@ -0,0 +1,862 @@
1
+ <template>
2
+ <div class="x-collapse-wrapper" :class="wrapperClassObject">
3
+ <div class="collapse-content-wrapper" :class="{ 'with-pagination': shouldShowPagination }">
4
+ <a-collapse
5
+ :activeKey="activeKey"
6
+ @change="handleChange"
7
+ :bordered="config.bordered || true"
8
+ :expand-icon-position="config.expandIconPosition || 'right'"
9
+ :style="config.style || ''"
10
+ >
11
+ <a-collapse-panel
12
+ v-for="(panel, panelIndex) in pagedPanels"
13
+ :key="panelIndex.toString()"
14
+ :show-arrow="config.showArrow || false"
15
+ :disabled="config.collapsible">
16
+ <template #header>
17
+ <div class="header-content">
18
+ <!-- 新增蓝色圆点图标,根据配置显示 -->
19
+ <div
20
+ v-if="config.showCircleIcon"
21
+ class="blue-circle-icon"
22
+ :style="config.circleIconStyle || {}"></div>
23
+ <span
24
+ class="header-text"
25
+ :style="config.titleStyle">
26
+ {{ getPanelTitle(panel) }}
27
+ </span>
28
+ <!-- 当有 title2 数据时显示信息项 -->
29
+ <template v-if="panel.title2 && panel.title2.length">
30
+ <span
31
+ v-for="(item, headerIndex) in panel.title2"
32
+ :key="`panel-${panelIndex}-title2-${headerIndex}`"
33
+ class="info-item"
34
+ :style="config.title2Style">
35
+ <!-- 根据showTitle是否显示键名 -->
36
+ <span v-if="item.showTitle">{{ item.key }}:</span>
37
+ <span>{{ item.value }}</span>
38
+ </span>
39
+ </template>
40
+ <!-- 当有 title3 数据时显示时间项(与 title2 一致:支持数组/单项) -->
41
+ <template v-if="panel.title3 && Array.isArray(panel.title3) && panel.title3.length">
42
+ <span
43
+ v-for="(item, t3Index) in panel.title3"
44
+ :key="`panel-${panelIndex}-title3-${t3Index}`"
45
+ :class="['time-item', { 'time-first': t3Index === 0 }]"
46
+ :style="config.title3Style">
47
+ <span v-if="item.showTitle">{{ item.key }}:</span>
48
+ <span>{{ item.value }}</span>
49
+ </span>
50
+ </template>
51
+ <span
52
+ v-else-if="panel.title3"
53
+ class="time-item time-first"
54
+ :style="config.title3Style">
55
+ {{ panel.title3 }}
56
+ </span>
57
+ <!-- 修改搜索框的显示条件 -->
58
+ <a-input-search
59
+ v-if="panel.search"
60
+ v-model="searchText[panelIndex]"
61
+ :placeholder="panel.searchPlace"
62
+ class="search-input"
63
+ @search="(value) => onSearch(value, panelIndex)"
64
+ @click.stop/>
65
+ </div>
66
+ </template>
67
+
68
+ <!-- 新增设置图标,根据配置显示 -->
69
+ <template #extra v-if="config.showSettingIcon">
70
+ <a-icon
71
+ v-if="activeKey.includes(panelIndex.toString())"
72
+ :type="config.settingIconType || 'setting'"
73
+ class="setting-icon"
74
+ @click.stop="handleSettingClick(panel, panelIndex)"/>
75
+ </template>
76
+
77
+ <!-- 根据类型显示不同内容 -->
78
+ <template v-if="panel.type === 'picture'">
79
+ <img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
80
+ </template>
81
+ <template v-else-if="panel.type === 'x-report-tr-group' && panel.columns">
82
+ <div v-if="false" style="display:none">{{ logPanel(panel) }}</div>
83
+ <x-report-tr-group
84
+ :columns="panel.columns"
85
+ :env="env"
86
+ :config="config"
87
+ :config-data="config"
88
+ :display="true"
89
+ :ref="`dynamicComponent_${ panel.type }_${ panelIndex }`"
90
+ @deleteData="deleteData"
91
+ @add="add"
92
+ @listClick="listClick"
93
+ @click="click"
94
+ @component-mounted="handleMounted"
95
+ @search-complete="handleSearchComplete" />
96
+ </template>
97
+ <template v-else-if="['x-image-report','x-form-table','x-simple-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report','x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio', 'x-text-card','x-tree-rows'].includes(panel.type)">
98
+ <component
99
+ :is="getComponentName(panel.type)"
100
+ :ref="`dynamicComponent_${ panel.type }_${ panelIndex }`"
101
+ :serverName="panel.serverName || 'af-his'"
102
+ :queryParamsName="panel.configName"
103
+ :parameter="panel.parameter"
104
+ :countVisible="false"
105
+ :env="env"
106
+ :style="config.componentStyle || ''"
107
+ v-bind="panel.attrs || {}"
108
+ :class="panel.className"
109
+ :ipanelIndex="panelIndex"
110
+ @deleteData="deleteData"
111
+ @add="add"
112
+ @listClick="listClick"
113
+ @click="click"
114
+ @component-mounted="handleMounted"
115
+ @search-complete="handleSearchComplete" />
116
+ </template>
117
+ </a-collapse-panel>
118
+ </a-collapse>
119
+ </div>
120
+ <div v-if="shouldShowPagination" class="xcollapse-pagination">
121
+ <div class="pagination-extras">
122
+ <a-button-group size="small">
123
+ <a-button icon="vertical-right" :disabled="paginationCurrent === 1" @click="goFirstPage"/>
124
+ <a-pagination
125
+ :current="paginationCurrent"
126
+ :pageSize="paginationPageSize"
127
+ :total="paginationTotal"
128
+ :showSizeChanger="false"
129
+ show-less-items
130
+ @change="onPageChange"/>
131
+ <a-button icon="vertical-left" :disabled="paginationCurrent === maxPage" @click="goLastPage"/>
132
+ </a-button-group>
133
+ <span class="pagination-info">共 {{ maxPage }} 页, {{ paginationTotal }} 条</span>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </template>
138
+
139
+ <script>
140
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
141
+
142
+ export default {
143
+ name: 'XCollapse',
144
+ components: {
145
+ XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'),
146
+ XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'),
147
+ XFormGroup: () => import('@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'),
148
+ XTreePro: () => import('@vue2-client/base-client/components/common/XTree/XTreePro.vue'),
149
+ XHisEditor: () => import('@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'),
150
+ XTab: () => import('@vue2-client/base-client/components/common/XTab/XTab.vue'),
151
+ XReport: () => import('@vue2-client/base-client/components/common/XReport/XReport.vue'),
152
+ XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
153
+ XLabelSelect: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelect.vue'),
154
+ XConversation: () => import('@vue2-client/base-client/components/common/XConversation/XConversation.vue'),
155
+ XCheckList: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
156
+ XCardSet: () => import('@vue2-client/base-client/components/common/XCardSet/XCardSet.vue'),
157
+ XCollapse: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
158
+ XHDescriptions: () => import('@vue2-client/base-client/components/his/XHDescriptions/XHDescriptions.vue'),
159
+ XImageReport: () => import('@vue2-client/base-client/components/his/XImageReport/XImageReport.vue'),
160
+ XSidebar: () => import('@vue2-client/base-client/components/his/XSidebar/XSidebar.vue'),
161
+ XList: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
162
+ XInput: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
163
+ XTimeLine: () => import('@vue2-client/base-client/components/common/XTimeline/XTimeline.vue'),
164
+ XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
165
+ XTextCard: () => import('@vue2-client/base-client/components/his/XTextCard/XTextCard.vue'),
166
+ XTreeRows: () => import('@vue2-client/base-client/components/his/XTreeRows/XTreeRows.vue'),
167
+ XSimpleTable: () => import('@vue2-client/base-client/components/his/XSimpleTable/XSimpleTable.vue'),
168
+ XReportTrGroup: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportTrGroup.vue')
169
+ },
170
+ data () {
171
+ return {
172
+ activeKey: [],
173
+ config: {},
174
+ configName: '',
175
+ searchText: {},
176
+ sonInstances: [], // 存储子组件实例
177
+ paginationCurrent: 1,
178
+ paginationPageSize: 5,
179
+ lastParams: {}, // 缓存最近一次非分页参数
180
+ paginationTotal: 0, // 后端返回的 total(仅分页模式使用)
181
+ }
182
+ },
183
+ props: {
184
+ // 环境
185
+ env: {
186
+ type: String,
187
+ default: 'prod'
188
+ },
189
+ // json名
190
+ queryParamsName: {
191
+ type: [String, Object],
192
+ default: null
193
+ },
194
+ parameter: {
195
+ type: Object,
196
+ default: () => {
197
+ return {}
198
+ }
199
+ }
200
+ },
201
+ created () {
202
+ this.getData(this.queryParamsName, this.parameter)
203
+ },
204
+ beforeDestroy () {},
205
+ mounted () {
206
+ this.$nextTick(() => {
207
+ console.log('[XCollapse] mounted config:', this.config)
208
+ console.log('[XCollapse] mounted showData:', this.config?.showData)
209
+ console.log('[XCollapse] mounted pagedPanels:', this.pagedPanels)
210
+ })
211
+ },
212
+ computed: {
213
+ // 基于 $attrs 的样式类开关(与 XHDescriptions.vue 思路一致)
214
+ wrapperClassObject () {
215
+ const attrs = this.$attrs || {}
216
+ const classes = {}
217
+ const booleanStyleKeys = [
218
+ 'style1',
219
+ 'check-result',
220
+ 'medical-entry'
221
+ ]
222
+ booleanStyleKeys.forEach(key => {
223
+ const val = attrs[key]
224
+ const truthy = val === true || val === '' || val === 'true'
225
+ if (truthy) classes[`xcollapse-${key}`] = true
226
+ })
227
+ const size = attrs.size
228
+ if (size && typeof size === 'string') classes[`xcollapse-size-${size}`] = true
229
+ if (this.shouldShowPagination) classes['with-pagination'] = true
230
+ return classes
231
+ },
232
+ enablePagination () { return !!this.config?.pagination },
233
+ shouldShowPagination () { return this.enablePagination },
234
+ maxPage () {
235
+ const size = Number(this.paginationPageSize || 1)
236
+ const total = this.paginationTotal
237
+ return Math.max(1, Math.ceil(total / size))
238
+ },
239
+ pagedPanels () {
240
+ const showData = this.config?.showData || []
241
+ if (this.enablePagination) return showData
242
+ const start = (this.paginationCurrent - 1) * this.paginationPageSize
243
+ const end = start + this.paginationPageSize
244
+ return showData.slice(start, end)
245
+ }
246
+ },
247
+ methods: {
248
+ handleMounted (instance) {
249
+ this.sonInstances.push(instance)
250
+ },
251
+ handleSearchComplete ({ hasMatch, panelIndex }) {
252
+ if (hasMatch && !this.activeKey.includes(panelIndex.toString())) {
253
+ // 只展开包含搜索结果的面板
254
+ this.activeKey = [panelIndex.toString()]
255
+ }
256
+ },
257
+ getComponentName (componentName) {
258
+ return componentName
259
+ },
260
+ getPanelTitle (panel) {
261
+ // 兼容数据为纯对象数组(无 title 字段)时的显示
262
+ if (panel && panel.title) return panel.title
263
+ if (panel && panel.name) return panel.name
264
+ if (panel && panel.code) return panel.code
265
+ return ''
266
+ },
267
+ logPanel (panel) {
268
+ console.log('[XCollapse] x-report-tr-group panel:', panel)
269
+ return panel
270
+ },
271
+ add (data) {
272
+ this.$emit('add', data)
273
+ },
274
+ deleteData (data) {
275
+ this.$emit('deleteData', data)
276
+ },
277
+ listClick (data) {
278
+ this.$emit('listClick', data)
279
+ },
280
+ click (data) {
281
+ this.$emit('click', data)
282
+ },
283
+ getConfigByName (componentName) {
284
+ const refKey = `dynamicComponent_${componentName}`
285
+ return this.$refs[refKey]
286
+ },
287
+ // xTreeRow 组件搜素功能
288
+ searchTreeRows (title) {
289
+ this.$nextTick(() => {
290
+ const instances = this.sonInstances
291
+ instances.forEach(comp => {
292
+ try {
293
+ comp.searchTitleToggle?.(title)
294
+ } catch (e) {
295
+ console.error('调用失败:', e)
296
+ }
297
+ })
298
+ })
299
+ },
300
+ async getData (config, parameter) {
301
+ this.configName = config
302
+ getConfigByName(config, 'af-his', res => {
303
+ // 合并配置,保留已有的 pagination 等开关
304
+ const original = this.config || {}
305
+ this.config = { ...original, ...res }
306
+ // 同步分页初值(仅当配置里提供时)
307
+ const p = this.config?.pagination || null
308
+ if (p && p.pageSize) this.paginationPageSize = Number(p.pageSize)
309
+ // 只在初始化时设置默认页码,避免每次重置
310
+ if (p && p.current && this.paginationCurrent === 1) {
311
+ this.paginationCurrent = Number(p.current)
312
+ }
313
+
314
+ // 组合请求参数,启用分页时传递页码与页大小
315
+ const baseParams = (parameter && Object.keys(parameter).length ? parameter : this.lastParams) || {}
316
+ this.lastParams = { ...baseParams }
317
+ const requestParams = { ...baseParams }
318
+ if (this.enablePagination) {
319
+ requestParams.page = this.paginationCurrent
320
+ requestParams.pageSize = this.paginationPageSize
321
+ }
322
+
323
+ runLogic(res.mainLogic, requestParams, 'af-his').then(result => {
324
+ let showData = []
325
+ let totalCount = 0
326
+
327
+ if (this.enablePagination) {
328
+ showData = result.data
329
+ this.paginationTotal = Number(result.total) || 0
330
+ totalCount = this.paginationTotal
331
+ } else {
332
+ showData = Array.isArray(result && result.data) ? result.data : (Array.isArray(result) ? result : [])
333
+ totalCount = showData.length
334
+ }
335
+
336
+ // 赋值
337
+ this.$set(this.config, 'showData', showData)
338
+ this.$set(this.config, 'totalCount', Number(totalCount))
339
+
340
+ // 后端分页边界保护:当前页超界时回退到最后一页并重拉
341
+ if (this.enablePagination) {
342
+ const total = Number(this.config.totalCount || 0)
343
+ const size = Number(this.paginationPageSize || 1)
344
+ const maxPage = Math.max(1, Math.ceil(total / size))
345
+ if (this.paginationCurrent > maxPage) {
346
+ this.paginationCurrent = maxPage
347
+ this.getData(this.queryParamsName, this.parameter)
348
+ return
349
+ }
350
+ }
351
+
352
+ // 更具timeType更改时间类型
353
+ if (this.config.timeType && this.config.timeType === '.') {
354
+ this.config.showData.forEach(panel => {
355
+ // if (panel.title3) {
356
+ // panel.title3 = this.convertToCustomFormat(panel.title3)
357
+ // }
358
+ })
359
+ this.$forceUpdate()
360
+ }
361
+ // 根据配置决定是否展开面板
362
+ const shouldCollapseAll = this.config.collapseAllByDefault || false
363
+ if (shouldCollapseAll) {
364
+ // 如果配置为默认关闭,直接设置为空数组,避免展开动画
365
+ this.activeKey = []
366
+ } else {
367
+ // 默认展开当前页的所有面板
368
+ this.activeKey = (this.config.showData || []).map((_, i) => i.toString())
369
+ }
370
+ })
371
+ })
372
+ },
373
+ onPageChange (page) {
374
+ this.paginationCurrent = page
375
+ // 后端分页:重新拉数;前端分页:仅切片
376
+ this.getData(this.queryParamsName, this.lastParams)
377
+ },
378
+ goFirstPage () {
379
+ if (this.paginationCurrent === 1) return
380
+ this.onPageChange(1)
381
+ },
382
+ goLastPage () {
383
+ if (this.paginationCurrent === this.maxPage) return
384
+ this.onPageChange(this.maxPage)
385
+ },
386
+ refreshXCollapse () {
387
+ this.getData(this.queryParamsName, this.parameter)
388
+ },
389
+ convertToCustomFormat (dateString) {
390
+ // 创建一个新的 Date 对象
391
+ const date = new Date(dateString)
392
+ // 获取年、月、日
393
+ const year = date.getFullYear()
394
+ const month = date.getMonth() + 1 // 月份从0开始,所以需要加1
395
+ const day = date.getDate()
396
+ // 返回格式化后的字符串
397
+ return `${year}.${month}.${day}`
398
+ },
399
+ handleChange (keys) {
400
+ this.activeKey = keys
401
+ // console.log(this.activeKey)
402
+ },
403
+ onSearch (value, panelIndex) {
404
+ this.$emit('searchChange', { value: value, panelIndex: panelIndex })
405
+ },
406
+ handleSettingClick (panel, panelIndex) {
407
+ this.$emit('settingClick', { panel, panelIndex })
408
+ }
409
+ },
410
+ watch: {
411
+ queryParamsName: {
412
+ handler (newValue) {
413
+ this.getData(newValue, this.parameter)
414
+ },
415
+ deep: true
416
+ },
417
+ 'config.showData': {
418
+ handler (val) {
419
+ console.log('[XCollapse] config.showData changed:', val)
420
+ },
421
+ deep: true
422
+ }
423
+ }
424
+ }
425
+ </script>
426
+
427
+ <style scoped lang="less">
428
+ .x-collapse-wrapper { position: relative; display: flex; flex-direction: column; min-height: 100%; height: 100%; }
429
+ .collapse-content-wrapper { flex: 1; min-height: 0; overflow: auto; position: relative; max-height: 78vh; }
430
+ .collapse-content-wrapper.with-pagination { padding-bottom: 0px; }
431
+ .header-content {
432
+ display: flex;
433
+ align-items: center;
434
+ justify-content: flex-start; // 左对齐,避免圆点被拉开
435
+ gap: 8px; // 圆点与标题的基础间距
436
+ white-space: nowrap;
437
+ overflow: hidden;
438
+ flex: 1; // 占满可用宽度,便于空间分配
439
+ }
440
+
441
+ .header-text {
442
+ margin-right: 14.17px;
443
+ font-size: 16px;
444
+ font-weight: 800;
445
+ flex-shrink: 0;
446
+ }
447
+
448
+ .info-item {
449
+ display: inline-flex;
450
+ align-items: center;
451
+ gap: 8px;
452
+ font-size: 12px;
453
+ color: #888888;
454
+ flex-shrink: 0;
455
+ }
456
+
457
+ .time-item {
458
+ margin-left: 12px;
459
+ text-align: right;
460
+ flex-shrink: 0;
461
+ }
462
+
463
+ :deep(.ant-collapse-header) {
464
+ display: flex;
465
+ position: relative;
466
+ // border-bottom: v-bind('config.showLine ? "1px solid #000000" : "none"');
467
+ align-items: center !important;
468
+ background-color: #ffffff;
469
+ padding: 12px 16px !important; /* 确保头部有足够的内边距 */
470
+ }
471
+
472
+ :deep(.ant-collapse-header-text) {
473
+ flex: 1;
474
+ }
475
+
476
+ :deep(.ant-collapse-content > .ant-collapse-content-box) {
477
+ padding: 16px !important; /* 确保内容区域有足够的内边距 */
478
+ }
479
+
480
+ .search-input {
481
+ margin-left: 12px;
482
+ width: auto;
483
+ max-width: 40%;
484
+ }
485
+
486
+ // 右侧块定位:首个 info-item 或 time-item 推到右侧
487
+ .header-content .info-item:first-of-type { margin-left: auto; }
488
+ .header-content .time-item:first-of-type { margin-left: auto; }
489
+
490
+ // 右侧块内部兄弟间距统一
491
+ .info-item + .info-item { margin-left: 12px; }
492
+ :deep(.ant-collapse-item-disabled > .ant-collapse-header) {
493
+ cursor: default !important;
494
+ }
495
+
496
+ /* 新增样式 */
497
+ .blue-circle-icon {
498
+ width: 12px;
499
+ height: 12px;
500
+ border-radius: 6px;
501
+ background: #3362DA;
502
+ margin-top: 15px;
503
+ margin-left: 11px;
504
+ margin-bottom: 12px;
505
+ flex-shrink: 0;
506
+ }
507
+
508
+ .setting-icon {
509
+ font-size: 16px;
510
+ cursor: pointer;
511
+ display: inline-flex;
512
+ align-items: center;
513
+ justify-content: center;
514
+ width: 19.47px;
515
+ height: 20px;
516
+ line-height: 20px;
517
+ vertical-align: middle;
518
+ color: #313131; /* 仅设置图标颜色,不设置背景 */
519
+ margin-top: 0; /* 去除向上偏移 */
520
+ margin-right: 47px; /* 与下拉箭头保持 20px 距离 */
521
+ }
522
+
523
+ :deep(.ant-collapse-extra) {
524
+ display: flex !important;
525
+ align-items: center;
526
+ }
527
+
528
+ .configurable-area {
529
+ //padding: 16px;
530
+ min-height: 100px;
531
+ border: 1px dashed #d9d9d9;
532
+ border-radius: 4px;
533
+ background-color: #fafafa;
534
+ }
535
+
536
+ .empty-hint {
537
+ color: #999;
538
+ text-align: center;
539
+ margin: 20px 0;
540
+ }
541
+
542
+ .loading-message {
543
+ text-align: center;
544
+ padding: 20px;
545
+ color: #666;
546
+ background: #f5f5f5;
547
+ border-radius: 4px;
548
+ margin: 10px 0;
549
+ }
550
+
551
+ .empty-state {
552
+ text-align: center;
553
+ padding: 40px 20px;
554
+ color: #999;
555
+ background: #fafafa;
556
+ border-radius: 4px;
557
+ margin: 10px 0;
558
+ flex: 1;
559
+ display: flex;
560
+ align-items: center;
561
+ justify-content: center;
562
+ }
563
+
564
+ /* 分页组件:固定在组件容器底部(不影响全局布局) */
565
+ .with-pagination { padding-bottom: 0; }
566
+ .xcollapse-pagination { /* 二盒子:自然流布局,不覆盖内容 */
567
+ position: static;
568
+ display: flex;
569
+ justify-content: center;
570
+ padding: 12px 0;
571
+ background: #fff;
572
+ border-top: 1px solid #f0f0f0;
573
+ }
574
+ .pagination-extras { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
575
+ .pagination-extras .ant-btn-group { gap: 8px; }
576
+ .pagination-extras .ant-btn-group + .pagination-info { margin-left: 9px; }
577
+ .pagination-info {
578
+ color: #5D5C5C;
579
+ font-family: 'Source Han Sans', sans-serif;
580
+ font-size: 16px;
581
+ font-weight: normal;
582
+ line-height: normal;
583
+ letter-spacing: 0em;
584
+ font-feature-settings: "kern" on;
585
+ }
586
+
587
+ /* 自定义分页按钮样式 */
588
+ :deep(.pagination-extras .ant-btn) {
589
+ font-family: 'Source Han Sans', sans-serif;
590
+ font-size: 16px;
591
+ font-weight: normal;
592
+ line-height: normal;
593
+ letter-spacing: 0em;
594
+ font-feature-settings: "kern" on;
595
+ color: #5D5C5C;
596
+ border-radius: 4px;
597
+ border: 1px solid #D8D8D8;
598
+ background: #FFFFFF;
599
+ box-sizing: border-box;
600
+ margin-right: 8px;
601
+ }
602
+
603
+ :deep(.pagination-extras .ant-btn:last-child) {
604
+ margin-right: 0;
605
+ }
606
+
607
+ /* 直达首页末页按钮样式 */
608
+ :deep(.pagination-extras .ant-btn[icon="vertical-left"]),
609
+ :deep(.pagination-extras .ant-btn[icon="vertical-right"]) {
610
+ position: static; /* 使用常规流布局,避免遮挡分页主体 */
611
+ width: 24px;
612
+ height: 24px;
613
+ border-radius: 4px;
614
+ opacity: 1;
615
+ background: #FFFFFF;
616
+ box-sizing: border-box;
617
+ border: 1px solid #D8D8D8;
618
+ margin-right: 8px;
619
+ }
620
+
621
+ /* 上一页下一页按钮样式 */
622
+ :deep(.ant-pagination .ant-pagination-prev),
623
+ :deep(.ant-pagination .ant-pagination-next) {
624
+ width: 24px;
625
+ height: 24px;
626
+ line-height: 24px;
627
+ border-radius: 4px;
628
+ opacity: 1;
629
+ background: #FFFFFF;
630
+ box-sizing: border-box;
631
+ border: 1px solid #D8D8D8;
632
+ }
633
+
634
+ /* 页码选择按钮样式 */
635
+ :deep(.ant-pagination .ant-pagination-item) {
636
+ width: 24px;
637
+ height: 24px;
638
+ border-radius: 4px;
639
+ border: 1px solid #D8D8D8;
640
+ background: #FFFFFF;
641
+ box-sizing: border-box;
642
+ font-family: 'Source Han Sans', sans-serif;
643
+ font-size: 16px;
644
+ font-weight: normal;
645
+ line-height: normal;
646
+ letter-spacing: 0em;
647
+ font-feature-settings: "kern" on;
648
+ color: #5D5C5C;
649
+ margin-right: 8px;
650
+ }
651
+
652
+ :deep(.ant-pagination .ant-pagination-item:last-child) {
653
+ margin-right: 0;
654
+ }
655
+
656
+ /* 当前页码样式 */
657
+ :deep(.ant-pagination .ant-pagination-item-active) {
658
+ background: #0057FE !important;
659
+ border: 1px solid #1890ff;
660
+ color: #FFFFFF !important;
661
+ }
662
+
663
+ /* 确保选中页码文字颜色生效 */
664
+ :deep(.ant-pagination .ant-pagination-item-active a) {
665
+ color: #FFFFFF !important;
666
+ }
667
+
668
+ /* 禁用状态样式 */
669
+ :deep(.pagination-extras .ant-btn:disabled) {
670
+ opacity: 0.5;
671
+ cursor: not-allowed;
672
+ }
673
+
674
+ /* 移除所有可能导致截断的固定高度 */
675
+ :deep(.ant-collapse-item) .ant-collapse-content .ant-collapse-content-box > * {
676
+ max-height: none !important; /* 移除可能的最大高度限制 */
677
+ height: auto !important; /* 使用自动高度 */
678
+ }
679
+
680
+ // 基于根容器类进行样式整合:x-collapse-wrapper.xcollapse-style1
681
+ .x-collapse-wrapper {
682
+ // 检查结果样式
683
+ &.xcollapse-check-result {
684
+ height: auto; /* 允许根据内容自适应高度,避免滚动被限制 */
685
+ min-height: 600px;
686
+ // 让每个面板成为独立卡片:去掉 antd 默认的分隔线,增加间距与圆角
687
+ :deep(.ant-collapse) {
688
+ background: transparent;
689
+ border: 0;
690
+ }
691
+
692
+ :deep(.ant-collapse > .ant-collapse-item) {
693
+ width: 555px;
694
+ min-height: auto;
695
+ height: auto;
696
+ margin-bottom:10px;
697
+ background: #FFFFFF; // 独立白底
698
+ box-sizing: border-box;
699
+ border: 1px solid #E5E9F0; // 每个面板自身边框
700
+ }
701
+
702
+ :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
703
+ :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
704
+
705
+ :deep(.ant-collapse-content > .ant-collapse-content-box) {
706
+ background: #FFFFFF;
707
+ padding: 0px !important;
708
+ }
709
+
710
+ // 表头:恢复合适的上下内边距,去掉顶部额外空白
711
+ :deep(.ant-collapse-header) {
712
+ background: #FFFFFF;
713
+ padding: 0px 0px !important;
714
+ height: 39px !important;
715
+ border-bottom: none !important; // 移除标题处下边线,避免与外边框连为一体
716
+ border: 1px solid #E5E9F0; // 每个面板自身边框
717
+ }
718
+
719
+ /* 将右侧留白转移到标题与第一项之间 */
720
+ .header-content { padding-right: 0px; gap: 5px; }
721
+ .header-content .info-item:first-of-type { margin-left: 24px !important; }
722
+ .header-content .time-item:first-of-type { margin-left: 24px !important; }
723
+
724
+ .info-item {
725
+ height: 20px;
726
+ opacity: 1;
727
+ font-family: "Source Han Sans";
728
+ font-size: 14px;
729
+ font-weight: 400;
730
+ line-height: 20px;
731
+ text-align: right;
732
+ letter-spacing: 0em;
733
+ font-feature-settings: "kern" on;
734
+ color: #313131 !important;
735
+ }
736
+
737
+ .header-text {
738
+ height: 23px;
739
+ opacity: 1;
740
+ font-family: "Source Han Sans";
741
+ font-size: 16px;
742
+ font-weight: 700;
743
+ line-height: 23px;
744
+ letter-spacing: 0em;
745
+ padding-right: 40px;
746
+ font-feature-settings: "kern" on;
747
+ color: #313131 !important;
748
+ }
749
+ }
750
+ // 历史病历样式
751
+ &.xcollapse-style1 {
752
+ height: auto; /* 允许根据内容自适应高度,避免滚动被限制 */
753
+ min-height: 600px;
754
+ .header-text {
755
+ font-family: "Source Han Sans";
756
+ font-size: 16px;
757
+ font-weight: 700;
758
+ line-height: 23px;
759
+ letter-spacing: 0em;
760
+ color: #313131;
761
+ margin-top: 8px;
762
+ margin-bottom: 8px;
763
+ margin-right: 0 !important;
764
+ }
765
+
766
+ .info-item {
767
+ font-family: "Source Han Sans";
768
+ font-size: 16px;
769
+ font-weight: 700;
770
+ line-height: 23px;
771
+ text-align: right;
772
+ color: #313131;
773
+ margin-top: 9px;
774
+ margin-bottom: 7px;
775
+ margin-left: 28.14px;
776
+ letter-spacing: 0em
777
+ }
778
+
779
+ .time-item {
780
+ font-family: "Source Han Sans";
781
+ font-size: 16px;
782
+ font-weight: 400;
783
+ line-height: 23px;
784
+ text-align: right;
785
+ margin-top: 9px;
786
+ margin-bottom: 7px;
787
+ color: #313131;
788
+ letter-spacing: 0em;
789
+ }
790
+
791
+ // 让每个面板成为独立卡片:去掉 antd 默认的分隔线,增加间距与圆角
792
+ :deep(.ant-collapse) {
793
+ background: transparent;
794
+ border: 0;
795
+ }
796
+
797
+ :deep(.ant-collapse > .ant-collapse-item) {
798
+ width: 555px;
799
+ min-height: auto;
800
+ height: auto;
801
+ margin-bottom:10px;
802
+ background: #FFFFFF; // 独立白底
803
+ box-sizing: border-box;
804
+ border: 1px solid #E5E9F0; // 每个面板自身边框
805
+ }
806
+
807
+ :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
808
+ :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
809
+
810
+ :deep(.ant-collapse-content > .ant-collapse-content-box) {
811
+ background: #FFFFFF;
812
+ padding: 0px !important;
813
+ }
814
+
815
+ // 表头:恢复合适的上下内边距,去掉顶部额外空白
816
+ :deep(.ant-collapse-header) {
817
+ background: #FFFFFF;
818
+ padding: 0px 0px !important;
819
+ height: 41px !important;
820
+ border-bottom: none !important; // 移除标题处下边线,避免与外边框连为一体
821
+ border: 1px solid #E5E9F0; // 每个面板自身边框
822
+ }
823
+ }
824
+
825
+ // 医学词条样式
826
+ &.xcollapse-medical-entry {
827
+ height: auto;
828
+ min-height: 600px;
829
+ :deep(.ant-collapse) { background: transparent; border: 0; }
830
+ :deep(.ant-collapse > .ant-collapse-item) {
831
+ width: 564px;
832
+ min-height: auto;
833
+ height: auto;
834
+ margin-bottom: 14px;
835
+ background: #FFFFFF;
836
+ box-sizing: border-box;
837
+ border: 1px solid #E5E9F0;
838
+ }
839
+ :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
840
+ :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
841
+ :deep(.ant-collapse-content > .ant-collapse-content-box) { background: #FFFFFF; padding: 0px !important; }
842
+ :deep(.ant-collapse-header) {
843
+ background: #FFFFFF;
844
+ padding: 0px 0px !important;
845
+ height: 39px !important;
846
+ border-bottom: none !important;
847
+ border: 1px solid #E5E9F0;
848
+ }
849
+ .header-text {
850
+ font-family: "Source Han Sans";
851
+ font-size: 16px;
852
+ font-weight: 700;
853
+ line-height: 23px;
854
+ letter-spacing: 0em;
855
+ color: #313131;
856
+ margin-top: 7px;
857
+ margin-bottom: 7px;
858
+ margin-right: 0 !important;
859
+ }
860
+ }
861
+ }
862
+ </style>