vue2-client 1.16.51 → 1.16.52

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 (30) hide show
  1. package/package.json +112 -112
  2. package/src/assets/img/paymentMethod/icon1.png +0 -0
  3. package/src/assets/img/paymentMethod/icon2.png +0 -0
  4. package/src/assets/img/paymentMethod/icon3.png +0 -0
  5. package/src/assets/img/paymentMethod/icon4.png +0 -0
  6. package/src/assets/img/paymentMethod/icon5.png +0 -0
  7. package/src/assets/img/paymentMethod/icon6.png +0 -0
  8. package/src/assets/svg/female.svg +1 -1
  9. package/src/assets/svg/male.svg +1 -1
  10. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +380 -371
  11. package/src/base-client/components/common/HIS/HForm/HForm.vue +9 -0
  12. package/src/base-client/components/common/HIS/HFormGroup/HFormGroup.vue +120 -120
  13. package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
  14. package/src/base-client/components/common/HIS/HFormTable/HFormTable.vue +379 -379
  15. package/src/base-client/components/common/HIS/HTab/HTab.vue +120 -31
  16. package/src/base-client/components/common/HIS/demo.vue +61 -61
  17. package/src/base-client/components/common/XCollapse/XCollapse.vue +461 -461
  18. package/src/base-client/components/common/XInput/XInput.vue +147 -147
  19. package/src/base-client/components/common/XReport/XReportHospitalizationDemo.vue +45 -0
  20. package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +824 -824
  21. package/src/base-client/components/common/XTab/XTab.vue +4 -0
  22. package/src/base-client/components/common/XTable/XTable.vue +1610 -1610
  23. package/src/base-client/components/common/XTimeline/XTimeline.vue +454 -454
  24. package/src/base-client/components/his/XCharge/testConfig.js +149 -0
  25. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
  26. package/src/base-client/components/his/XList/XList.vue +829 -829
  27. package/src/base-client/components/his/XTitle/XTitle.vue +46 -2
  28. package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
  29. package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
  30. package/src/router/async/router.map.js +132 -129
@@ -1,461 +1,461 @@
1
- <template>
2
- <div class="x-collapse-wrapper" :class="wrapperClassObject">
3
- <a-collapse
4
- :activeKey="activeKey"
5
- @change="handleChange"
6
- :bordered="config.bordered || true"
7
- :expand-icon-position="config.expandIconPosition || 'right'"
8
- :style="config.style || ''"
9
- >
10
- <a-collapse-panel
11
- v-for="(panel, panelIndex) in config.showData"
12
- :key="panelIndex.toString()"
13
- :show-arrow="config.showArrow || false"
14
- :disabled="config.collapsible">
15
- <template #header>
16
- <div class="header-content">
17
- <!-- 新增蓝色圆点图标,根据配置显示 -->
18
- <div
19
- v-if="config.showCircleIcon"
20
- class="blue-circle-icon"
21
- :style="config.circleIconStyle || {}"></div>
22
- <span
23
- class="header-text"
24
- :style="config.titleStyle">
25
- {{ panel.title }}
26
- </span>
27
- <!-- 当有 title2 数据时显示信息项 -->
28
- <template v-if="panel.title2 && panel.title2.length">
29
- <span
30
- v-for="(item, headerIndex) in panel.title2"
31
- :key="headerIndex"
32
- class="info-item"
33
- :style="config.title2Style">
34
- <!-- 根据showTitle是否显示键名 -->
35
- <span v-if="item.showTitle">{{ item.key }}:</span>
36
- <span>{{ item.value }}</span>
37
- </span>
38
- </template>
39
- <!-- 当有 title3 数据时显示时间项(与 title2 一致:支持数组/单项) -->
40
- <template v-if="panel.title3 && Array.isArray(panel.title3) && panel.title3.length">
41
- <span
42
- v-for="(item, t3Index) in panel.title3"
43
- :key="t3Index"
44
- :class="['time-item', { 'time-first': t3Index === 0 }]"
45
- :style="config.title3Style">
46
- <span v-if="item.showTitle">{{ item.key }}:</span>
47
- <span>{{ item.value }}</span>
48
- </span>
49
- </template>
50
- <span
51
- v-else-if="panel.title3"
52
- class="time-item time-first"
53
- :style="config.title3Style">
54
- {{ panel.title3 }}
55
- </span>
56
- <!-- 修改搜索框的显示条件 -->
57
- <a-input-search
58
- v-if="panel.search"
59
- v-model="searchText[panelIndex]"
60
- :placeholder="panel.searchPlace"
61
- class="search-input"
62
- @search="(value) => onSearch(value, panelIndex)"
63
- @click.stop/>
64
- </div>
65
- </template>
66
-
67
- <!-- 新增设置图标,根据配置显示 -->
68
- <template #extra v-if="config.showSettingIcon">
69
- <a-icon
70
- v-if="activeKey.includes(panelIndex.toString())"
71
- :type="config.settingIconType || 'setting'"
72
- class="setting-icon"
73
- @click.stop="handleSettingClick(panel, panelIndex)"/>
74
- </template>
75
-
76
- <!-- 根据类型显示不同内容 -->
77
- <template v-if="panel.type === 'picture'">
78
- <img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
79
- </template>
80
- <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)">
81
- <component
82
- :is="getComponentName(panel.type)"
83
- :ref="`dynamicComponent_${ panel.type }_${ panelIndex }`"
84
- :serverName="panel.serverName || 'af-his'"
85
- :queryParamsName="panel.configName"
86
- :parameter="panel.parameter"
87
- :countVisible="false"
88
- :env="env"
89
- :style="config.componentStyle || ''"
90
- v-bind="panel.attrs || {}"
91
- :class="panel.className"
92
- :ipanelIndex="panelIndex"
93
- @deleteData="deleteData"
94
- @add="add"
95
- @listClick="listClick"
96
- @click="click"
97
- @component-mounted="handleMounted"
98
- @search-complete="handleSearchComplete" />
99
- </template>
100
- </a-collapse-panel>
101
- </a-collapse>
102
- </div>
103
- </template>
104
-
105
- <script>
106
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
107
-
108
- export default {
109
- name: 'XCollapse',
110
- components: {
111
- XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'),
112
- XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'),
113
- XFormGroup: () => import('@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'),
114
- XTreePro: () => import('@vue2-client/base-client/components/common/XTree/XTreePro.vue'),
115
- XHisEditor: () => import('@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'),
116
- XTab: () => import('@vue2-client/base-client/components/common/XTab/XTab.vue'),
117
- XReport: () => import('@vue2-client/base-client/components/common/XReport/XReport.vue'),
118
- XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
119
- XLabelSelect: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelect.vue'),
120
- XConversation: () => import('@vue2-client/base-client/components/common/XConversation/XConversation.vue'),
121
- XCheckList: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
122
- XCardSet: () => import('@vue2-client/base-client/components/common/XCardSet/XCardSet.vue'),
123
- XCollapse: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
124
- XHDescriptions: () => import('@vue2-client/base-client/components/his/XHDescriptions/XHDescriptions.vue'),
125
- XImageReport: () => import('@vue2-client/base-client/components/his/XImageReport/XImageReport.vue'),
126
- XSidebar: () => import('@vue2-client/base-client/components/his/XSidebar/XSidebar.vue'),
127
- XList: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
128
- XInput: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
129
- XTimeLine: () => import('@vue2-client/base-client/components/common/XTimeline/XTimeline.vue'),
130
- XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
131
- XTextCard: () => import('@vue2-client/base-client/components/his/XTextCard/XTextCard.vue'),
132
- XTreeRows: () => import('@vue2-client/base-client/components/his/XTreeRows/XTreeRows.vue'),
133
- XSimpleTable: () => import('@vue2-client/base-client/components/his/XSimpleTable/XSimpleTable.vue')
134
- },
135
- data () {
136
- return {
137
- activeKey: [],
138
- config: {},
139
- configName: '',
140
- searchText: {},
141
- sonInstances: [] // 存储子组件实例
142
- }
143
- },
144
- props: {
145
- // 环境
146
- env: {
147
- type: String,
148
- default: 'prod'
149
- },
150
- // json名
151
- queryParamsName: {
152
- type: Object,
153
- default: null
154
- },
155
- parameter: {
156
- type: Object,
157
- default: () => {
158
- return {}
159
- }
160
- }
161
- },
162
- created () {
163
- this.getData(this.queryParamsName, this.parameter)
164
- },
165
- beforeDestroy () {},
166
- computed: {
167
- // 基于 $attrs 的样式类开关(与 XHDescriptions.vue 思路一致)
168
- wrapperClassObject () {
169
- const attrs = this.$attrs || {}
170
- const classes = {}
171
- const booleanStyleKeys = [
172
- 'style1'
173
- ]
174
- booleanStyleKeys.forEach(key => {
175
- const val = attrs[key]
176
- const truthy = val === true || val === '' || val === 'true'
177
- if (truthy) classes[`xcollapse-${key}`] = true
178
- })
179
- const size = attrs.size
180
- if (size && typeof size === 'string') classes[`xcollapse-size-${size}`] = true
181
- return classes
182
- }
183
- },
184
- methods: {
185
- handleMounted (instance) {
186
- this.sonInstances.push(instance)
187
- },
188
- handleSearchComplete ({ hasMatch, panelIndex }) {
189
- if (hasMatch && !this.activeKey.includes(panelIndex.toString())) {
190
- // 只展开包含搜索结果的面板
191
- this.activeKey = [panelIndex.toString()]
192
- }
193
- },
194
- getComponentName (componentName) {
195
- return componentName
196
- },
197
- add (data) {
198
- this.$emit('add', data)
199
- },
200
- deleteData (data) {
201
- this.$emit('deleteData', data)
202
- },
203
- listClick (data) {
204
- this.$emit('listClick', data)
205
- },
206
- click (data) {
207
- this.$emit('click', data)
208
- },
209
- getConfigByName (componentName) {
210
- const refKey = `dynamicComponent_${componentName}`
211
- return this.$refs[refKey]
212
- },
213
- // xTreeRow 组件搜素功能
214
- searchTreeRows (title) {
215
- this.$nextTick(() => {
216
- const instances = this.sonInstances
217
- instances.forEach(comp => {
218
- try {
219
- comp.searchTitleToggle?.(title)
220
- } catch (e) {
221
- console.error('调用失败:', e)
222
- }
223
- })
224
- })
225
- },
226
- async getData (config, parameter) {
227
- this.configName = config
228
- getConfigByName(config, 'af-his', res => {
229
- this.config = res
230
- console.warn(this.config)
231
- runLogic(res.mainLogic, parameter, 'af-his').then(result => {
232
- this.config.showData = result
233
- console.log('result', result)
234
- // 更具timeType更改时间类型
235
- if (this.config.timeType && this.config.timeType === '.') {
236
- this.config.showData.forEach(panel => {
237
- // if (panel.title3) {
238
- // panel.title3 = this.convertToCustomFormat(panel.title3)
239
- // }
240
- })
241
- this.$forceUpdate()
242
- }
243
- const shouldCollapseAll = this.config.collapseAllByDefault || false
244
- // 初始化展开状态
245
- this.activeKey = this.config.showData.map((_, i) => i.toString())
246
- // 初始化关闭所有折叠面板
247
- if (shouldCollapseAll) {
248
- setTimeout(() => {
249
- this.activeKey = [] // 关闭所有面板
250
- }, 0.00001)
251
- }
252
- })
253
- })
254
- },
255
- refreshXCollapse () {
256
- this.getData(this.queryParamsName, this.parameter)
257
- },
258
- convertToCustomFormat (dateString) {
259
- // 创建一个新的 Date 对象
260
- const date = new Date(dateString)
261
- // 获取年、月、日
262
- const year = date.getFullYear()
263
- const month = date.getMonth() + 1 // 月份从0开始,所以需要加1
264
- const day = date.getDate()
265
- // 返回格式化后的字符串
266
- return `${year}.${month}.${day}`
267
- },
268
- handleChange (keys) {
269
- this.activeKey = keys
270
- // console.log(this.activeKey)
271
- },
272
- onSearch (value, panelIndex) {
273
- this.$emit('searchChange', { value: value, panelIndex: panelIndex })
274
- },
275
- handleSettingClick (panel, panelIndex) {
276
- this.$emit('settingClick', { panel, panelIndex })
277
- }
278
- },
279
- watch: {
280
- queryParamsName: {
281
- handler (newValue) {
282
- this.getData(newValue, this.parameter)
283
- },
284
- deep: true
285
- }
286
- }
287
- }
288
- </script>
289
-
290
- <style scoped lang="less">
291
- .header-content {
292
- display: flex;
293
- align-items: center;
294
- gap: 24px;
295
- white-space: nowrap;
296
- overflow: hidden;
297
- }
298
-
299
- .header-text {
300
- margin-right: 16px;
301
- font-size: 16px;
302
- font-weight: 800;
303
- flex-shrink: 0;
304
- }
305
-
306
- .info-item {
307
- display: inline-flex;
308
- align-items: center;
309
- gap: 4px;
310
- font-size: 12px;
311
- color: #888888;
312
- flex-shrink: 0;
313
- }
314
-
315
- .time-item {
316
- margin-left: auto;
317
- text-align: right;
318
- flex-shrink: 0;
319
- }
320
-
321
- :deep(.ant-collapse-header) {
322
- position: relative;
323
- border-bottom: v-bind('config.showLine ? "1px solid #000000" : "none"');
324
- align-items: center !important;
325
- background-color: #ffffff;
326
- }
327
-
328
- :deep(.ant-collapse-header-text) {
329
- flex: 1;
330
- }
331
-
332
- :deep(.ant-collapse-content > .ant-collapse-content-box) {
333
- padding: 0;
334
- }
335
-
336
- :deep(.ant-card-body) {
337
- padding: 8px;
338
- }
339
- .search-input {
340
- margin-left: auto;
341
- width: 100%;
342
- }
343
- :deep(.ant-collapse-item-disabled > .ant-collapse-header) {
344
- cursor: default !important;
345
- }
346
-
347
- /* 新增样式 */
348
- .blue-circle-icon {
349
- width: 12px;
350
- height: 12px;
351
- border-radius: 6px;
352
- background: #3362da;
353
- margin-right: 8px;
354
- flex-shrink: 0;
355
- }
356
-
357
- .setting-icon {
358
- font-size: 16px;
359
- cursor: pointer;
360
- display: inline-flex;
361
- align-items: center;
362
- justify-content: center;
363
- height: 100%;
364
- line-height: 1;
365
- vertical-align: middle;
366
- margin-top: -20px; /* 微调偏移量(根据实际情况调整) */
367
- }
368
-
369
- :deep(.ant-collapse-extra) {
370
- display: flex !important;
371
- align-items: center;
372
- }
373
-
374
- .configurable-area {
375
- padding: 16px;
376
- min-height: 100px;
377
- border: 1px dashed #d9d9d9;
378
- border-radius: 4px;
379
- background-color: #fafafa;
380
- }
381
-
382
- .empty-hint {
383
- color: #999;
384
- text-align: center;
385
- margin: 20px 0;
386
- }
387
-
388
- // 基于根容器类进行样式整合:x-collapse-wrapper.xcollapse-style1
389
- .x-collapse-wrapper {
390
- &.xcollapse-style1 {
391
- height: 1185px;
392
- .header-content {
393
- gap: 6px; // 圆点与title1更紧凑的基础间距
394
- }
395
- .blue-circle-icon {
396
- margin-right: 0px !important; // 图标与标题更紧凑
397
- }
398
- .header-text {
399
- font-family: "Source Han Sans";
400
- font-size: 18px;
401
- font-weight: 700;
402
- line-height: normal;
403
- letter-spacing: 0em;
404
- color: #313131;
405
- // 额外拉开与 title2 的距离(在小gap基础上单独增大)
406
- margin-right: 25px !important;
407
- }
408
-
409
- .info-item {
410
- font-family: "Source Han Sans";
411
- font-size: 18px;
412
- font-weight: 700;
413
- line-height: normal;
414
- text-align: right;
415
- color: #313131;
416
- letter-spacing: 0em
417
- }
418
-
419
- .time-item {
420
- font-family: "Source Han Sans";
421
- font-size: 18px;
422
- font-weight: 400;
423
- line-height: normal;
424
- text-align: right;
425
- color: #313131;
426
- letter-spacing: 0em;
427
- }
428
-
429
- // 让每个面板成为独立卡片:去掉 antd 默认的分隔线,增加间距与圆角
430
- :deep(.ant-collapse) {
431
- background: transparent;
432
- border: 0;
433
- }
434
-
435
- :deep(.ant-collapse > .ant-collapse-item) {
436
- width: 100%;
437
- height: 410px;
438
- margin: 16px 0; // 面板之间留白
439
- border-radius: 6px; // 分离的圆角
440
- overflow: hidden; // 保持圆角
441
- background: #FFFFFF; // 独立白底
442
- box-sizing: border-box;
443
- border: 1px solid #E5E9F0; // 每个面板自身边框
444
- }
445
-
446
- :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
447
- :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
448
-
449
- :deep(.ant-collapse-content > .ant-collapse-content-box) { background: #FFFFFF; }
450
-
451
- // 表头:恢复合适的上下内边距,去掉顶部额外空白
452
- :deep(.ant-collapse-header) {
453
- background: #FFFFFF;
454
- padding: 12px 16px; // 恢复上下内边距
455
- align-items: center;
456
- color: #262626;
457
- border-bottom: none !important; // 移除标题处下边线,避免与外边框连为一体
458
- }
459
- }
460
- }
461
- </style>
1
+ <template>
2
+ <div class="x-collapse-wrapper" :class="wrapperClassObject">
3
+ <a-collapse
4
+ :activeKey="activeKey"
5
+ @change="handleChange"
6
+ :bordered="config.bordered || true"
7
+ :expand-icon-position="config.expandIconPosition || 'right'"
8
+ :style="config.style || ''"
9
+ >
10
+ <a-collapse-panel
11
+ v-for="(panel, panelIndex) in config.showData"
12
+ :key="panelIndex.toString()"
13
+ :show-arrow="config.showArrow || false"
14
+ :disabled="config.collapsible">
15
+ <template #header>
16
+ <div class="header-content">
17
+ <!-- 新增蓝色圆点图标,根据配置显示 -->
18
+ <div
19
+ v-if="config.showCircleIcon"
20
+ class="blue-circle-icon"
21
+ :style="config.circleIconStyle || {}"></div>
22
+ <span
23
+ class="header-text"
24
+ :style="config.titleStyle">
25
+ {{ panel.title }}
26
+ </span>
27
+ <!-- 当有 title2 数据时显示信息项 -->
28
+ <template v-if="panel.title2 && panel.title2.length">
29
+ <span
30
+ v-for="(item, headerIndex) in panel.title2"
31
+ :key="headerIndex"
32
+ class="info-item"
33
+ :style="config.title2Style">
34
+ <!-- 根据showTitle是否显示键名 -->
35
+ <span v-if="item.showTitle">{{ item.key }}:</span>
36
+ <span>{{ item.value }}</span>
37
+ </span>
38
+ </template>
39
+ <!-- 当有 title3 数据时显示时间项(与 title2 一致:支持数组/单项) -->
40
+ <template v-if="panel.title3 && Array.isArray(panel.title3) && panel.title3.length">
41
+ <span
42
+ v-for="(item, t3Index) in panel.title3"
43
+ :key="t3Index"
44
+ :class="['time-item', { 'time-first': t3Index === 0 }]"
45
+ :style="config.title3Style">
46
+ <span v-if="item.showTitle">{{ item.key }}:</span>
47
+ <span>{{ item.value }}</span>
48
+ </span>
49
+ </template>
50
+ <span
51
+ v-else-if="panel.title3"
52
+ class="time-item time-first"
53
+ :style="config.title3Style">
54
+ {{ panel.title3 }}
55
+ </span>
56
+ <!-- 修改搜索框的显示条件 -->
57
+ <a-input-search
58
+ v-if="panel.search"
59
+ v-model="searchText[panelIndex]"
60
+ :placeholder="panel.searchPlace"
61
+ class="search-input"
62
+ @search="(value) => onSearch(value, panelIndex)"
63
+ @click.stop/>
64
+ </div>
65
+ </template>
66
+
67
+ <!-- 新增设置图标,根据配置显示 -->
68
+ <template #extra v-if="config.showSettingIcon">
69
+ <a-icon
70
+ v-if="activeKey.includes(panelIndex.toString())"
71
+ :type="config.settingIconType || 'setting'"
72
+ class="setting-icon"
73
+ @click.stop="handleSettingClick(panel, panelIndex)"/>
74
+ </template>
75
+
76
+ <!-- 根据类型显示不同内容 -->
77
+ <template v-if="panel.type === 'picture'">
78
+ <img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
79
+ </template>
80
+ <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)">
81
+ <component
82
+ :is="getComponentName(panel.type)"
83
+ :ref="`dynamicComponent_${ panel.type }_${ panelIndex }`"
84
+ :serverName="panel.serverName || 'af-his'"
85
+ :queryParamsName="panel.configName"
86
+ :parameter="panel.parameter"
87
+ :countVisible="false"
88
+ :env="env"
89
+ :style="config.componentStyle || ''"
90
+ v-bind="panel.attrs || {}"
91
+ :class="panel.className"
92
+ :ipanelIndex="panelIndex"
93
+ @deleteData="deleteData"
94
+ @add="add"
95
+ @listClick="listClick"
96
+ @click="click"
97
+ @component-mounted="handleMounted"
98
+ @search-complete="handleSearchComplete" />
99
+ </template>
100
+ </a-collapse-panel>
101
+ </a-collapse>
102
+ </div>
103
+ </template>
104
+
105
+ <script>
106
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
107
+
108
+ export default {
109
+ name: 'XCollapse',
110
+ components: {
111
+ XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'),
112
+ XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'),
113
+ XFormGroup: () => import('@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'),
114
+ XTreePro: () => import('@vue2-client/base-client/components/common/XTree/XTreePro.vue'),
115
+ XHisEditor: () => import('@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'),
116
+ XTab: () => import('@vue2-client/base-client/components/common/XTab/XTab.vue'),
117
+ XReport: () => import('@vue2-client/base-client/components/common/XReport/XReport.vue'),
118
+ XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
119
+ XLabelSelect: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelect.vue'),
120
+ XConversation: () => import('@vue2-client/base-client/components/common/XConversation/XConversation.vue'),
121
+ XCheckList: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
122
+ XCardSet: () => import('@vue2-client/base-client/components/common/XCardSet/XCardSet.vue'),
123
+ XCollapse: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
124
+ XHDescriptions: () => import('@vue2-client/base-client/components/his/XHDescriptions/XHDescriptions.vue'),
125
+ XImageReport: () => import('@vue2-client/base-client/components/his/XImageReport/XImageReport.vue'),
126
+ XSidebar: () => import('@vue2-client/base-client/components/his/XSidebar/XSidebar.vue'),
127
+ XList: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
128
+ XInput: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
129
+ XTimeLine: () => import('@vue2-client/base-client/components/common/XTimeline/XTimeline.vue'),
130
+ XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
131
+ XTextCard: () => import('@vue2-client/base-client/components/his/XTextCard/XTextCard.vue'),
132
+ XTreeRows: () => import('@vue2-client/base-client/components/his/XTreeRows/XTreeRows.vue'),
133
+ XSimpleTable: () => import('@vue2-client/base-client/components/his/XSimpleTable/XSimpleTable.vue')
134
+ },
135
+ data () {
136
+ return {
137
+ activeKey: [],
138
+ config: {},
139
+ configName: '',
140
+ searchText: {},
141
+ sonInstances: [] // 存储子组件实例
142
+ }
143
+ },
144
+ props: {
145
+ // 环境
146
+ env: {
147
+ type: String,
148
+ default: 'prod'
149
+ },
150
+ // json名
151
+ queryParamsName: {
152
+ type: Object,
153
+ default: null
154
+ },
155
+ parameter: {
156
+ type: Object,
157
+ default: () => {
158
+ return {}
159
+ }
160
+ }
161
+ },
162
+ created () {
163
+ this.getData(this.queryParamsName, this.parameter)
164
+ },
165
+ beforeDestroy () {},
166
+ computed: {
167
+ // 基于 $attrs 的样式类开关(与 XHDescriptions.vue 思路一致)
168
+ wrapperClassObject () {
169
+ const attrs = this.$attrs || {}
170
+ const classes = {}
171
+ const booleanStyleKeys = [
172
+ 'style1'
173
+ ]
174
+ booleanStyleKeys.forEach(key => {
175
+ const val = attrs[key]
176
+ const truthy = val === true || val === '' || val === 'true'
177
+ if (truthy) classes[`xcollapse-${key}`] = true
178
+ })
179
+ const size = attrs.size
180
+ if (size && typeof size === 'string') classes[`xcollapse-size-${size}`] = true
181
+ return classes
182
+ }
183
+ },
184
+ methods: {
185
+ handleMounted (instance) {
186
+ this.sonInstances.push(instance)
187
+ },
188
+ handleSearchComplete ({ hasMatch, panelIndex }) {
189
+ if (hasMatch && !this.activeKey.includes(panelIndex.toString())) {
190
+ // 只展开包含搜索结果的面板
191
+ this.activeKey = [panelIndex.toString()]
192
+ }
193
+ },
194
+ getComponentName (componentName) {
195
+ return componentName
196
+ },
197
+ add (data) {
198
+ this.$emit('add', data)
199
+ },
200
+ deleteData (data) {
201
+ this.$emit('deleteData', data)
202
+ },
203
+ listClick (data) {
204
+ this.$emit('listClick', data)
205
+ },
206
+ click (data) {
207
+ this.$emit('click', data)
208
+ },
209
+ getConfigByName (componentName) {
210
+ const refKey = `dynamicComponent_${componentName}`
211
+ return this.$refs[refKey]
212
+ },
213
+ // xTreeRow 组件搜素功能
214
+ searchTreeRows (title) {
215
+ this.$nextTick(() => {
216
+ const instances = this.sonInstances
217
+ instances.forEach(comp => {
218
+ try {
219
+ comp.searchTitleToggle?.(title)
220
+ } catch (e) {
221
+ console.error('调用失败:', e)
222
+ }
223
+ })
224
+ })
225
+ },
226
+ async getData (config, parameter) {
227
+ this.configName = config
228
+ getConfigByName(config, 'af-his', res => {
229
+ this.config = res
230
+ console.warn(this.config)
231
+ runLogic(res.mainLogic, parameter, 'af-his').then(result => {
232
+ this.config.showData = result
233
+ console.log('result', result)
234
+ // 更具timeType更改时间类型
235
+ if (this.config.timeType && this.config.timeType === '.') {
236
+ this.config.showData.forEach(panel => {
237
+ // if (panel.title3) {
238
+ // panel.title3 = this.convertToCustomFormat(panel.title3)
239
+ // }
240
+ })
241
+ this.$forceUpdate()
242
+ }
243
+ const shouldCollapseAll = this.config.collapseAllByDefault || false
244
+ // 初始化展开状态
245
+ this.activeKey = this.config.showData.map((_, i) => i.toString())
246
+ // 初始化关闭所有折叠面板
247
+ if (shouldCollapseAll) {
248
+ setTimeout(() => {
249
+ this.activeKey = [] // 关闭所有面板
250
+ }, 0.00001)
251
+ }
252
+ })
253
+ })
254
+ },
255
+ refreshXCollapse () {
256
+ this.getData(this.queryParamsName, this.parameter)
257
+ },
258
+ convertToCustomFormat (dateString) {
259
+ // 创建一个新的 Date 对象
260
+ const date = new Date(dateString)
261
+ // 获取年、月、日
262
+ const year = date.getFullYear()
263
+ const month = date.getMonth() + 1 // 月份从0开始,所以需要加1
264
+ const day = date.getDate()
265
+ // 返回格式化后的字符串
266
+ return `${year}.${month}.${day}`
267
+ },
268
+ handleChange (keys) {
269
+ this.activeKey = keys
270
+ // console.log(this.activeKey)
271
+ },
272
+ onSearch (value, panelIndex) {
273
+ this.$emit('searchChange', { value: value, panelIndex: panelIndex })
274
+ },
275
+ handleSettingClick (panel, panelIndex) {
276
+ this.$emit('settingClick', { panel, panelIndex })
277
+ }
278
+ },
279
+ watch: {
280
+ queryParamsName: {
281
+ handler (newValue) {
282
+ this.getData(newValue, this.parameter)
283
+ },
284
+ deep: true
285
+ }
286
+ }
287
+ }
288
+ </script>
289
+
290
+ <style scoped lang="less">
291
+ .header-content {
292
+ display: flex;
293
+ align-items: center;
294
+ gap: 24px;
295
+ white-space: nowrap;
296
+ overflow: hidden;
297
+ }
298
+
299
+ .header-text {
300
+ margin-right: 16px;
301
+ font-size: 16px;
302
+ font-weight: 800;
303
+ flex-shrink: 0;
304
+ }
305
+
306
+ .info-item {
307
+ display: inline-flex;
308
+ align-items: center;
309
+ gap: 4px;
310
+ font-size: 12px;
311
+ color: #888888;
312
+ flex-shrink: 0;
313
+ }
314
+
315
+ .time-item {
316
+ margin-left: auto;
317
+ text-align: right;
318
+ flex-shrink: 0;
319
+ }
320
+
321
+ :deep(.ant-collapse-header) {
322
+ position: relative;
323
+ border-bottom: v-bind('config.showLine ? "1px solid #000000" : "none"');
324
+ align-items: center !important;
325
+ background-color: #ffffff;
326
+ }
327
+
328
+ :deep(.ant-collapse-header-text) {
329
+ flex: 1;
330
+ }
331
+
332
+ :deep(.ant-collapse-content > .ant-collapse-content-box) {
333
+ padding: 0;
334
+ }
335
+
336
+ :deep(.ant-card-body) {
337
+ padding: 8px;
338
+ }
339
+ .search-input {
340
+ margin-left: auto;
341
+ width: 100%;
342
+ }
343
+ :deep(.ant-collapse-item-disabled > .ant-collapse-header) {
344
+ cursor: default !important;
345
+ }
346
+
347
+ /* 新增样式 */
348
+ .blue-circle-icon {
349
+ width: 12px;
350
+ height: 12px;
351
+ border-radius: 6px;
352
+ background: #3362da;
353
+ margin-right: 8px;
354
+ flex-shrink: 0;
355
+ }
356
+
357
+ .setting-icon {
358
+ font-size: 16px;
359
+ cursor: pointer;
360
+ display: inline-flex;
361
+ align-items: center;
362
+ justify-content: center;
363
+ height: 100%;
364
+ line-height: 1;
365
+ vertical-align: middle;
366
+ margin-top: -20px; /* 微调偏移量(根据实际情况调整) */
367
+ }
368
+
369
+ :deep(.ant-collapse-extra) {
370
+ display: flex !important;
371
+ align-items: center;
372
+ }
373
+
374
+ .configurable-area {
375
+ padding: 16px;
376
+ min-height: 100px;
377
+ border: 1px dashed #d9d9d9;
378
+ border-radius: 4px;
379
+ background-color: #fafafa;
380
+ }
381
+
382
+ .empty-hint {
383
+ color: #999;
384
+ text-align: center;
385
+ margin: 20px 0;
386
+ }
387
+
388
+ // 基于根容器类进行样式整合:x-collapse-wrapper.xcollapse-style1
389
+ .x-collapse-wrapper {
390
+ &.xcollapse-style1 {
391
+ height: 1185px;
392
+ .header-content {
393
+ gap: 6px; // 圆点与title1更紧凑的基础间距
394
+ }
395
+ .blue-circle-icon {
396
+ margin-right: 0px !important; // 图标与标题更紧凑
397
+ }
398
+ .header-text {
399
+ font-family: "Source Han Sans";
400
+ font-size: 18px;
401
+ font-weight: 700;
402
+ line-height: normal;
403
+ letter-spacing: 0em;
404
+ color: #313131;
405
+ // 额外拉开与 title2 的距离(在小gap基础上单独增大)
406
+ margin-right: 25px !important;
407
+ }
408
+
409
+ .info-item {
410
+ font-family: "Source Han Sans";
411
+ font-size: 18px;
412
+ font-weight: 700;
413
+ line-height: normal;
414
+ text-align: right;
415
+ color: #313131;
416
+ letter-spacing: 0em
417
+ }
418
+
419
+ .time-item {
420
+ font-family: "Source Han Sans";
421
+ font-size: 18px;
422
+ font-weight: 400;
423
+ line-height: normal;
424
+ text-align: right;
425
+ color: #313131;
426
+ letter-spacing: 0em;
427
+ }
428
+
429
+ // 让每个面板成为独立卡片:去掉 antd 默认的分隔线,增加间距与圆角
430
+ :deep(.ant-collapse) {
431
+ background: transparent;
432
+ border: 0;
433
+ }
434
+
435
+ :deep(.ant-collapse > .ant-collapse-item) {
436
+ width: 100%;
437
+ height: 410px;
438
+ margin: 16px 0; // 面板之间留白
439
+ border-radius: 6px; // 分离的圆角
440
+ overflow: hidden; // 保持圆角
441
+ background: #FFFFFF; // 独立白底
442
+ box-sizing: border-box;
443
+ border: 1px solid #E5E9F0; // 每个面板自身边框
444
+ }
445
+
446
+ :deep(.ant-collapse > .ant-collapse-item:first-child) { margin-top: 0; }
447
+ :deep(.ant-collapse > .ant-collapse-item:last-child) { margin-bottom: 0; }
448
+
449
+ :deep(.ant-collapse-content > .ant-collapse-content-box) { background: #FFFFFF; }
450
+
451
+ // 表头:恢复合适的上下内边距,去掉顶部额外空白
452
+ :deep(.ant-collapse-header) {
453
+ background: #FFFFFF;
454
+ padding: 12px 16px; // 恢复上下内边距
455
+ align-items: center;
456
+ color: #262626;
457
+ border-bottom: none !important; // 移除标题处下边线,避免与外边框连为一体
458
+ }
459
+ }
460
+ }
461
+ </style>