vue2-client 1.16.60 → 1.16.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.16.60",
3
+ "version": "1.16.62",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -1,43 +1,44 @@
1
1
  <template>
2
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 }}
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) }}
26
27
  </span>
27
- <!-- 当有 title2 数据时显示信息项 -->
28
- <template v-if="panel.title2 && panel.title2.length">
28
+ <!-- 当有 title2 数据时显示信息项 -->
29
+ <template v-if="panel.title2 && panel.title2.length">
29
30
  <span
30
31
  v-for="(item, headerIndex) in panel.title2"
31
32
  :key="headerIndex"
32
33
  class="info-item"
33
34
  :style="config.title2Style">
34
35
  <!-- 根据showTitle是否显示键名 -->
35
- <span v-if="item.showTitle">{{ item.key }}:</span>
36
+ <span v-if="item.showTitle">{{ item.key }};</span>
36
37
  <span>{{ item.value }}</span>
37
38
  </span>
38
- </template>
39
- <!-- 当有 title3 数据时显示时间项(与 title2 一致:支持数组/单项) -->
40
- <template v-if="panel.title3 && Array.isArray(panel.title3) && panel.title3.length">
39
+ </template>
40
+ <!-- 当有 title3 数据时显示时间项(与 title2 一致:支持数组/单项) -->
41
+ <template v-if="panel.title3 && Array.isArray(panel.title3) && panel.title3.length">
41
42
  <span
42
43
  v-for="(item, t3Index) in panel.title3"
43
44
  :key="t3Index"
@@ -46,59 +47,76 @@
46
47
  <span v-if="item.showTitle">{{ item.key }}:</span>
47
48
  <span>{{ item.value }}</span>
48
49
  </span>
49
- </template>
50
- <span
51
- v-else-if="panel.title3"
52
- class="time-item time-first"
53
- :style="config.title3Style">
50
+ </template>
51
+ <span
52
+ v-else-if="panel.title3"
53
+ class="time-item time-first"
54
+ :style="config.title3Style">
54
55
  {{ panel.title3 }}
55
56
  </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>
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="['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)">
82
+ <component
83
+ :is="getComponentName(panel.type)"
84
+ :ref="`dynamicComponent_${ panel.type }_${ panelIndex }`"
85
+ :serverName="panel.serverName || 'af-his'"
86
+ :queryParamsName="panel.configName"
87
+ :parameter="panel.parameter"
88
+ :countVisible="false"
89
+ :env="env"
90
+ :style="config.componentStyle || ''"
91
+ v-bind="panel.attrs || {}"
92
+ :class="panel.className"
93
+ :ipanelIndex="panelIndex"
94
+ @deleteData="deleteData"
95
+ @add="add"
96
+ @listClick="listClick"
97
+ @click="click"
98
+ @component-mounted="handleMounted"
99
+ @search-complete="handleSearchComplete" />
100
+ </template>
101
+ </a-collapse-panel>
102
+ </a-collapse>
103
+ <div v-if="shouldShowPagination" class="xcollapse-pagination">
104
+ <div class="pagination-extras">
105
+ <a-button-group size="small">
106
+ <a-button icon="vertical-right" :disabled="paginationCurrent === 1" @click="goFirstPage"/>
107
+ <a-pagination
108
+ :current="paginationCurrent"
109
+ :pageSize="paginationPageSize"
110
+ :total="paginationTotal"
111
+ :showSizeChanger="false"
112
+ show-less-items
113
+ @change="onPageChange"/>
114
+ <a-button icon="vertical-left" :disabled="paginationCurrent === maxPage" @click="goLastPage"/>
115
+ </a-button-group>
116
+ <span class="pagination-info">共 {{ maxPage }} 页, {{ paginationTotal }} 条</span>
117
+ </div>
118
+ </div>
119
+ </div>
102
120
  </div>
103
121
  </template>
104
122
 
@@ -138,7 +156,11 @@ export default {
138
156
  config: {},
139
157
  configName: '',
140
158
  searchText: {},
141
- sonInstances: [] // 存储子组件实例
159
+ sonInstances: [], // 存储子组件实例
160
+ paginationCurrent: 1,
161
+ paginationPageSize: 5,
162
+ lastParams: {}, // 缓存最近一次非分页参数
163
+ paginationTotal: 0, // 后端返回的 total(仅分页模式使用)
142
164
  }
143
165
  },
144
166
  props: {
@@ -178,7 +200,22 @@ export default {
178
200
  })
179
201
  const size = attrs.size
180
202
  if (size && typeof size === 'string') classes[`xcollapse-size-${size}`] = true
203
+ if (this.shouldShowPagination) classes['with-pagination'] = true
181
204
  return classes
205
+ },
206
+ enablePagination () { return !!this.config?.pagination },
207
+ shouldShowPagination () { return this.enablePagination },
208
+ maxPage () {
209
+ const size = Number(this.paginationPageSize || 1)
210
+ const total = this.paginationTotal
211
+ return Math.max(1, Math.ceil(total / size))
212
+ },
213
+ pagedPanels () {
214
+ const showData = this.config?.showData || []
215
+ if (this.enablePagination) return showData
216
+ const start = (this.paginationCurrent - 1) * this.paginationPageSize
217
+ const end = start + this.paginationPageSize
218
+ return showData.slice(start, end)
182
219
  }
183
220
  },
184
221
  methods: {
@@ -194,6 +231,13 @@ export default {
194
231
  getComponentName (componentName) {
195
232
  return componentName
196
233
  },
234
+ getPanelTitle (panel) {
235
+ // 兼容数据为纯对象数组(无 title 字段)时的显示
236
+ if (panel && panel.title) return panel.title
237
+ if (panel && panel.name) return panel.name
238
+ if (panel && panel.code) return panel.code
239
+ return ''
240
+ },
197
241
  add (data) {
198
242
  this.$emit('add', data)
199
243
  },
@@ -226,11 +270,57 @@ export default {
226
270
  async getData (config, parameter) {
227
271
  this.configName = config
228
272
  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)
273
+ // 合并配置,保留已有的 pagination 等开关
274
+ const original = this.config || {}
275
+ this.config = { ...original, ...res }
276
+ // 同步分页初值(仅当配置里提供时)
277
+ const p = this.config?.pagination || null
278
+ if (p && p.pageSize) this.paginationPageSize = Number(p.pageSize)
279
+ // 只在初始化时设置默认页码,避免每次重置
280
+ if (p && p.current && this.paginationCurrent === 1) {
281
+ this.paginationCurrent = Number(p.current)
282
+ }
283
+
284
+ // 组合请求参数,启用分页时传递页码与页大小
285
+ const baseParams = (parameter && Object.keys(parameter).length ? parameter : this.lastParams) || {}
286
+ this.lastParams = { ...baseParams }
287
+ const requestParams = { ...baseParams }
288
+ if (this.enablePagination) {
289
+ requestParams.page = this.paginationCurrent
290
+ requestParams.pageSize = this.paginationPageSize
291
+ }
292
+
293
+ runLogic(res.mainLogic, requestParams, 'af-his').then(result => {
294
+ let showData = []
295
+ let totalCount = 0
296
+
297
+ if (this.enablePagination) {
298
+ // 启用分页:后端固定返回 { total, data: [], page, pageSize }
299
+ showData = result.data
300
+ this.paginationTotal = Number(result.total) || 0
301
+ totalCount = this.paginationTotal
302
+ } else {
303
+ // 未启用分页:直接取数组
304
+ showData = Array.isArray(result && result.data) ? result.data : (Array.isArray(result) ? result : [])
305
+ totalCount = showData.length
306
+ }
307
+
308
+ // 赋值
309
+ this.$set(this.config, 'showData', showData)
310
+ this.$set(this.config, 'totalCount', Number(totalCount))
311
+
312
+ // 后端分页边界保护:当前页超界时回退到最后一页并重拉
313
+ if (this.enablePagination) {
314
+ const total = Number(this.config.totalCount || 0)
315
+ const size = Number(this.paginationPageSize || 1)
316
+ const maxPage = Math.max(1, Math.ceil(total / size))
317
+ if (this.paginationCurrent > maxPage) {
318
+ this.paginationCurrent = maxPage
319
+ this.getData(this.queryParamsName, this.parameter)
320
+ return
321
+ }
322
+ }
323
+
234
324
  // 更具timeType更改时间类型
235
325
  if (this.config.timeType && this.config.timeType === '.') {
236
326
  this.config.showData.forEach(panel => {
@@ -240,10 +330,10 @@ export default {
240
330
  })
241
331
  this.$forceUpdate()
242
332
  }
243
- const shouldCollapseAll = this.config.collapseAllByDefault || false
244
- // 初始化展开状态
245
- this.activeKey = this.config.showData.map((_, i) => i.toString())
333
+ // 默认展开当前页的所有面板
334
+ this.activeKey = (this.config.showData || []).map((_, i) => i.toString())
246
335
  // 初始化关闭所有折叠面板
336
+ const shouldCollapseAll = this.config.collapseAllByDefault || false
247
337
  if (shouldCollapseAll) {
248
338
  setTimeout(() => {
249
339
  this.activeKey = [] // 关闭所有面板
@@ -252,6 +342,19 @@ export default {
252
342
  })
253
343
  })
254
344
  },
345
+ onPageChange (page) {
346
+ this.paginationCurrent = page
347
+ // 后端分页:重新拉数;前端分页:仅切片
348
+ this.getData(this.queryParamsName, this.lastParams)
349
+ },
350
+ goFirstPage () {
351
+ if (this.paginationCurrent === 1) return
352
+ this.onPageChange(1)
353
+ },
354
+ goLastPage () {
355
+ if (this.paginationCurrent === this.maxPage) return
356
+ this.onPageChange(this.maxPage)
357
+ },
255
358
  refreshXCollapse () {
256
359
  this.getData(this.queryParamsName, this.parameter)
257
360
  },
@@ -288,16 +391,21 @@ export default {
288
391
  </script>
289
392
 
290
393
  <style scoped lang="less">
394
+ .x-collapse-wrapper { position: relative; display: flex; flex-direction: column; min-height: 100%; height: 100%; }
395
+ .collapse-content-wrapper { flex: 1; min-height: 0; overflow: auto; position: relative; max-height: 79vh; }
396
+ .collapse-content-wrapper.with-pagination { padding-bottom: 0px; }
291
397
  .header-content {
292
398
  display: flex;
293
399
  align-items: center;
294
- gap: 24px;
400
+ justify-content: flex-start; // 左对齐,避免圆点被拉开
401
+ gap: 8px; // 圆点与标题的基础间距
295
402
  white-space: nowrap;
296
403
  overflow: hidden;
404
+ flex: 1; // 占满可用宽度,便于空间分配
297
405
  }
298
406
 
299
407
  .header-text {
300
- margin-right: 16px;
408
+ margin-right: 14.17px;
301
409
  font-size: 16px;
302
410
  font-weight: 800;
303
411
  flex-shrink: 0;
@@ -306,23 +414,26 @@ export default {
306
414
  .info-item {
307
415
  display: inline-flex;
308
416
  align-items: center;
309
- gap: 4px;
417
+ gap: 8px;
310
418
  font-size: 12px;
311
419
  color: #888888;
312
420
  flex-shrink: 0;
313
421
  }
314
422
 
315
423
  .time-item {
316
- margin-left: auto;
424
+ margin-left: 12px;
317
425
  text-align: right;
318
426
  flex-shrink: 0;
319
427
  }
320
428
 
321
429
  :deep(.ant-collapse-header) {
430
+ display: flex;
322
431
  position: relative;
323
432
  border-bottom: v-bind('config.showLine ? "1px solid #000000" : "none"');
324
433
  align-items: center !important;
325
434
  background-color: #ffffff;
435
+ padding: 12px 16px !important; /* 确保头部有足够的内边距 */
436
+ min-height: 50px; /* 设置头部最小高度 */
326
437
  }
327
438
 
328
439
  :deep(.ant-collapse-header-text) {
@@ -330,16 +441,21 @@ export default {
330
441
  }
331
442
 
332
443
  :deep(.ant-collapse-content > .ant-collapse-content-box) {
333
- padding: 0;
444
+ padding: 16px !important; /* 确保内容区域有足够的内边距 */
334
445
  }
335
446
 
336
- :deep(.ant-card-body) {
337
- padding: 8px;
338
- }
339
447
  .search-input {
340
- margin-left: auto;
341
- width: 100%;
448
+ margin-left: 12px;
449
+ width: auto;
450
+ max-width: 40%;
342
451
  }
452
+
453
+ // 右侧块定位:首个 info-item 或 time-item 推到右侧
454
+ .header-content .info-item:first-of-type { margin-left: auto; }
455
+ .header-content .time-item:first-of-type { margin-left: auto; }
456
+
457
+ // 右侧块内部兄弟间距统一
458
+ .info-item + .info-item { margin-left: 12px; }
343
459
  :deep(.ant-collapse-item-disabled > .ant-collapse-header) {
344
460
  cursor: default !important;
345
461
  }
@@ -349,8 +465,8 @@ export default {
349
465
  width: 12px;
350
466
  height: 12px;
351
467
  border-radius: 6px;
352
- background: #3362da;
353
- margin-right: 8px;
468
+ background: #3362DA;
469
+ margin: 6px;
354
470
  flex-shrink: 0;
355
471
  }
356
472
 
@@ -372,7 +488,7 @@ export default {
372
488
  }
373
489
 
374
490
  .configurable-area {
375
- padding: 16px;
491
+ //padding: 16px;
376
492
  min-height: 100px;
377
493
  border: 1px dashed #d9d9d9;
378
494
  border-radius: 4px;
@@ -385,40 +501,172 @@ export default {
385
501
  margin: 20px 0;
386
502
  }
387
503
 
504
+ .loading-message {
505
+ text-align: center;
506
+ padding: 20px;
507
+ color: #666;
508
+ background: #f5f5f5;
509
+ border-radius: 4px;
510
+ margin: 10px 0;
511
+ }
512
+
513
+ .empty-state {
514
+ text-align: center;
515
+ padding: 40px 20px;
516
+ color: #999;
517
+ background: #fafafa;
518
+ border-radius: 4px;
519
+ margin: 10px 0;
520
+ flex: 1;
521
+ display: flex;
522
+ align-items: center;
523
+ justify-content: center;
524
+ }
525
+
526
+ /* 分页组件:固定在组件容器底部(不影响全局布局) */
527
+ .with-pagination { padding-bottom: 0; }
528
+ .xcollapse-pagination { /* 粘在视口底部,宽度随容器 */
529
+ position: sticky;
530
+ bottom: 0;
531
+ display: flex;
532
+ justify-content: center;
533
+ padding: 12px 0;
534
+ background: #fff;
535
+ border-top: 1px solid #f0f0f0;
536
+ }
537
+ .pagination-extras { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
538
+ .pagination-extras .ant-btn-group { gap: 8px; }
539
+ .pagination-extras .ant-btn-group + .pagination-info { margin-left: 9px; }
540
+ .pagination-info {
541
+ color: #5D5C5C;
542
+ font-family: 'Source Han Sans', sans-serif;
543
+ font-size: 16px;
544
+ font-weight: normal;
545
+ line-height: normal;
546
+ letter-spacing: 0em;
547
+ font-feature-settings: "kern" on;
548
+ }
549
+
550
+ /* 自定义分页按钮样式 */
551
+ :deep(.pagination-extras .ant-btn) {
552
+ font-family: 'Source Han Sans', sans-serif;
553
+ font-size: 16px;
554
+ font-weight: normal;
555
+ line-height: normal;
556
+ letter-spacing: 0em;
557
+ font-feature-settings: "kern" on;
558
+ color: #5D5C5C;
559
+ border-radius: 4px;
560
+ border: 1px solid #D8D8D8;
561
+ background: #FFFFFF;
562
+ box-sizing: border-box;
563
+ margin-right: 8px;
564
+ }
565
+
566
+ :deep(.pagination-extras .ant-btn:last-child) {
567
+ margin-right: 0;
568
+ }
569
+
570
+ /* 直达首页末页按钮样式 */
571
+ :deep(.pagination-extras .ant-btn[icon="vertical-left"]),
572
+ :deep(.pagination-extras .ant-btn[icon="vertical-right"]) {
573
+ position: absolute;
574
+ left: 24px;
575
+ top: 24px;
576
+ width: 24px;
577
+ height: 24px;
578
+ transform: rotate(180deg);
579
+ border-radius: 4px;
580
+ opacity: 1;
581
+ background: #FFFFFF;
582
+ box-sizing: border-box;
583
+ border: 1px solid #D8D8D8;
584
+ }
585
+
586
+ /* 上一页下一页按钮样式 */
587
+ :deep(.ant-pagination .ant-pagination-prev),
588
+ :deep(.ant-pagination .ant-pagination-next) {
589
+ width: 24px;
590
+ height: 24px;
591
+ line-height: 24px;
592
+ border-radius: 4px;
593
+ opacity: 1;
594
+ background: #FFFFFF;
595
+ box-sizing: border-box;
596
+ border: 1px solid #D8D8D8;
597
+ }
598
+
599
+ /* 页码选择按钮样式 */
600
+ :deep(.ant-pagination .ant-pagination-item) {
601
+ width: 36px;
602
+ height: 24px;
603
+ border-radius: 4px;
604
+ border: 1px solid #D8D8D8;
605
+ background: #FFFFFF;
606
+ box-sizing: border-box;
607
+ font-family: 'Source Han Sans', sans-serif;
608
+ font-size: 16px;
609
+ font-weight: normal;
610
+ line-height: normal;
611
+ letter-spacing: 0em;
612
+ font-feature-settings: "kern" on;
613
+ color: #5D5C5C;
614
+ margin-right: 8px;
615
+ }
616
+
617
+ :deep(.ant-pagination .ant-pagination-item:last-child) {
618
+ margin-right: 0;
619
+ }
620
+
621
+ /* 当前页码样式 */
622
+ :deep(.ant-pagination .ant-pagination-item-active) {
623
+ background: #FFFFFF;
624
+ border: 1px solid #1890ff;
625
+ color: #1890ff;
626
+ }
627
+
628
+ /* 禁用状态样式 */
629
+ :deep(.pagination-extras .ant-btn:disabled) {
630
+ opacity: 0.5;
631
+ cursor: not-allowed;
632
+ }
633
+
634
+ /* 移除所有可能导致截断的固定高度 */
635
+ :deep(.ant-collapse-item) .ant-collapse-content .ant-collapse-content-box > * {
636
+ max-height: none !important; /* 移除可能的最大高度限制 */
637
+ height: auto !important; /* 使用自动高度 */
638
+ }
639
+
388
640
  // 基于根容器类进行样式整合:x-collapse-wrapper.xcollapse-style1
389
641
  .x-collapse-wrapper {
390
642
  &.xcollapse-style1 {
391
- height: 1185px;
392
- .header-content {
393
- gap: 6px; // 圆点与title1更紧凑的基础间距
394
- }
395
- .blue-circle-icon {
396
- margin-right: 0px !important; // 图标与标题更紧凑
397
- }
643
+ height: auto; /* 允许根据内容自适应高度,避免滚动被限制 */
644
+ min-height: 600px;
645
+ .blue-circle-icon { margin: 0 !important; }
398
646
  .header-text {
399
647
  font-family: "Source Han Sans";
400
- font-size: 18px;
648
+ font-size: 16px;
401
649
  font-weight: 700;
402
650
  line-height: normal;
403
651
  letter-spacing: 0em;
404
652
  color: #313131;
405
- // 额外拉开与 title2 的距离(在小gap基础上单独增大)
406
- margin-right: 25px !important;
653
+ margin-right: 0 !important;
407
654
  }
408
655
 
409
656
  .info-item {
410
657
  font-family: "Source Han Sans";
411
- font-size: 18px;
658
+ font-size: 16px;
412
659
  font-weight: 700;
413
660
  line-height: normal;
414
661
  text-align: right;
415
662
  color: #313131;
663
+ margin-left: 28.14px;
416
664
  letter-spacing: 0em
417
665
  }
418
666
 
419
667
  .time-item {
420
668
  font-family: "Source Han Sans";
421
- font-size: 18px;
669
+ font-size: 16px;
422
670
  font-weight: 400;
423
671
  line-height: normal;
424
672
  text-align: right;
@@ -433,11 +681,10 @@ export default {
433
681
  }
434
682
 
435
683
  :deep(.ant-collapse > .ant-collapse-item) {
436
- width: 100%;
437
- height: 410px;
438
- margin: 16px 0; // 面板之间留白
439
- border-radius: 6px; // 分离的圆角
440
- overflow: hidden; // 保持圆角
684
+ width: 564px;
685
+ min-height: auto;
686
+ height: auto;
687
+ margin: 3px 10px 26px 12px; // 面板之间留白
441
688
  background: #FFFFFF; // 独立白底
442
689
  box-sizing: border-box;
443
690
  border: 1px solid #E5E9F0; // 每个面板自身边框
@@ -451,9 +698,9 @@ export default {
451
698
  // 表头:恢复合适的上下内边距,去掉顶部额外空白
452
699
  :deep(.ant-collapse-header) {
453
700
  background: #FFFFFF;
454
- padding: 12px 16px; // 恢复上下内边距
701
+ padding: 0px 0px;
455
702
  align-items: center;
456
- color: #262626;
703
+ height: 39px;
457
704
  border-bottom: none !important; // 移除标题处下边线,避免与外边框连为一体
458
705
  }
459
706
  }
@@ -22,6 +22,13 @@
22
22
  @change="onChange">
23
23
  <a-icon slot="prefix" type="search"/>
24
24
  </a-input>
25
+ <span v-if="config.addParent.isShow" style="margin-left: 10px;">
26
+ <a-icon
27
+ :type="config.addParent.icon || 'plus-square'"
28
+ :style="{ fontSize: config.addParent.size || '30px', color: config.addParent.color }"
29
+ @click="addParent(config.addParent.func)"
30
+ />
31
+ </span>
25
32
  </div>
26
33
  </a-row>
27
34
  <a-row v-if="config.tabBtn && config.tabBtn.length > 0">
@@ -271,6 +278,11 @@ export default {
271
278
  this.nodeItemClick(node)
272
279
  this.$emit('itemChecked', node)
273
280
  },
281
+ addParent (func) {
282
+ if (func) {
283
+ this.$emit('action', null, null, null, func, null)
284
+ }
285
+ },
274
286
  action (record, func) {
275
287
  this.$emit('action', record, record[this.replaceFields.key], null, func)
276
288
  },
@@ -116,6 +116,32 @@
116
116
  </template>
117
117
  </div>
118
118
  </template>
119
+
120
+ <!-- 可选:底部区域(分割线 + 三列内容) -->
121
+ <div v-if="config && config.footer && Array.isArray(config.footer.items) && data" class="xhdesc-footer">
122
+ <div class="xhdesc-divider" />
123
+ <div class="footer-grid">
124
+ <div
125
+ v-for="(item, idx) in config.footer.items"
126
+ :key="item.field || idx"
127
+ class="description-item">
128
+ <div class="label-wrapper"><span class="label-text">{{ item.label }}:</span></div>
129
+ <div class="content-wrapper">{{ data[item.field] }}</div>
130
+ </div>
131
+ </div>
132
+ <!-- 右侧信息:换到下一行并靠右对齐(如 医生 / 医嘱日期) -->
133
+ <div
134
+ v-if="Array.isArray(config.footer.rightItems) && config.footer.rightItems.length"
135
+ class="footer-right">
136
+ <div
137
+ v-for="(item, ridx) in config.footer.rightItems"
138
+ :key="item.field || ridx"
139
+ class="footer-right-item">
140
+ <div class="label-wrapper"><span class="label-text">{{ item.label }}:</span></div>
141
+ <div class="content-wrapper">{{ data[item.field] }}</div>
142
+ </div>
143
+ </div>
144
+ </div>
119
145
  </div>
120
146
  </div>
121
147
  </template>
@@ -313,6 +339,8 @@ export default {
313
339
 
314
340
  .label-text {
315
341
  white-space: nowrap;
342
+ color: #313131; // 统一深灰
343
+ text-decoration: none !important; // 移除下划线
316
344
  }
317
345
 
318
346
  .content-wrapper {
@@ -321,12 +349,20 @@ export default {
321
349
  margin-left: 4px;
322
350
  font-size: v-bind('(config && config.style && config.style.fontSize) || "14px"');
323
351
  color: rgba(0, 0, 0, 0.85);
352
+ text-decoration: none !important; // 移除可能的下划线
324
353
  max-width: 300px;
325
354
  overflow: hidden;
326
355
  text-overflow: ellipsis;
327
356
  white-space: nowrap;
328
357
  }
329
358
 
359
+ /* 强制移除任何链接样式(如接口返回含 <a>) */
360
+ ::v-deep a,
361
+ ::deep a {
362
+ color: #313131 !important;
363
+ text-decoration: none !important;
364
+ }
365
+
330
366
  .detail-button-wrapper {
331
367
  position: absolute;
332
368
  right: 0;
@@ -337,6 +373,40 @@ export default {
337
373
  background-color: #fff;
338
374
  }
339
375
 
376
+ /* 底部区域:分割线 + 三列内容 */
377
+ .xhdesc-footer {
378
+ margin-top: 12px;
379
+ }
380
+
381
+ .xhdesc-divider {
382
+ width: 100%;
383
+ height: 0;
384
+ border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
385
+ margin: 8px 0 12px;
386
+ }
387
+
388
+ .footer-grid {
389
+ display: grid;
390
+ grid-template-columns: 1fr; // 单列
391
+ gap: 8px 24px; // 与上方描述项间距保持一致
392
+ align-items: start; // 左上对齐
393
+ }
394
+
395
+ /* footer 区域的每项直接沿用通用 .description-item/.label-wrapper/.content-wrapper 样式 */
396
+
397
+ .footer-right {
398
+ margin-top: 8px;
399
+ display: flex;
400
+ justify-content: flex-end;
401
+ align-items: center;
402
+ gap: 16px;
403
+ }
404
+
405
+ .footer-right-item {
406
+ display: inline-flex;
407
+ align-items: center;
408
+ }
409
+
340
410
  /* Ant Design 描述列表样式覆盖 */
341
411
  :deep(.ant-descriptions-row) {
342
412
  display: flex;
@@ -457,7 +527,7 @@ export default {
457
527
  height: 0;
458
528
  border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
459
529
  }
460
- /* 加边框 */
530
+
461
531
  /* 加边框 */
462
532
  .xhdesc-description {
463
533
  padding: 4px 4px 4px 4px;
@@ -634,5 +704,29 @@ export default {
634
704
  :deep(.ant-descriptions-table) {
635
705
  table-layout: auto !important;
636
706
  }
707
+
708
+ /* 医疗病史模式下:footer 区域恢复与上方描述项一致的横向样式 */
709
+ .xhdesc-footer {
710
+ .description-item {
711
+ display: inline-flex;
712
+ flex-direction: row;
713
+ align-items: center;
714
+ width: 100%;
715
+ }
716
+ .label-wrapper {
717
+ display: inline-flex;
718
+ margin-right: 4px;
719
+ margin-bottom: 0;
720
+ font-weight: 600; // 与上方保持一致
721
+ }
722
+ .content-wrapper {
723
+ display: inline-flex;
724
+ margin-left: 0;
725
+ max-width: 300px;
726
+ overflow: hidden;
727
+ text-overflow: ellipsis;
728
+ white-space: nowrap;
729
+ }
730
+ }
637
731
  }
638
732
  </style>
@@ -1,203 +1,203 @@
1
- <template>
2
- <div id="beingProcessed">
3
- <x-form-table
4
- title="我的工单"
5
- ref="xFormTable"
6
- :queryParamsName="queryParamsName"
7
- :fixed-query-form="{
8
- users_f_handler_id: currUser.id,
9
- }"
10
- @action="toDetail">
11
- <template #leftButton>
12
- <a-button @click="addApply">
13
- <a-icon type="plus"/>
14
- 发起报建
15
- </a-button>
16
- </template>
17
- </x-form-table>
18
- <a-modal
19
- v-model="applyAddFlag"
20
- :footer="null"
21
- :dialog-style="{ top: '5rem' }"
22
- :z-index="1001"
23
- title="发起报建"
24
- :destroyOnClose="true">
25
- <x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
26
- </a-modal>
27
- <WorkflowDetail
28
- ref="workFlow"
29
- @success="success"
30
- @nextClick="nextClick"
31
- @x-form-item-emit-func="handleFormItemEvent"
32
- >
33
- </WorkflowDetail>
34
- <!-- 地址选择器 -->
35
- <address-select ref="addressSelect" @setAddress="setForm"></address-select>
36
- </div>
37
- </template>
38
-
39
- <script>
40
- import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
41
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
42
- import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
43
- import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
44
- import { mapState } from 'vuex'
45
- import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
46
- import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup'
47
-
48
- export default {
49
- name: 'Apply',
50
- components: {
51
- XFormTable,
52
- XAddNativeForm,
53
- WorkflowDetail,
54
- AddressSelect,
55
- XFormGroup,
56
- },
57
- // 透传给子组件的方法(目前XFormTable接了)
58
- provide () {
59
- return {
60
- generalFunction: {
61
- setCancel: this.setCancel,
62
- chargeAdd: this.chargeAdd,
63
- addUser: this.addUser,
64
- editUser: this.editUser,
65
- addContract: this.addContract,
66
- addcharge: this.addcharge,
67
- updateFormData: this.updateFormData,
68
- chargeCancel: this.chargeCancel,
69
- chargeBatchRefund: this.chargeBatchRefund,
70
- }
71
- }
72
- },
73
- data () {
74
- return {
75
- // 查询配置文件名
76
- queryParamsName: 'ApplyProcessCRUD',
77
- // 发起报建弹框控制
78
- applyAddFlag: false,
79
- // 提交加载动画
80
- confirmLoading: false,
81
- refreshFn: null,
82
- chargeVisible: false
83
- }
84
- },
85
- computed: {
86
- ...mapState('account', { currUser: 'user' }),
87
- },
88
- methods: {
89
- addApply () {
90
- console.log('打开了吗')
91
- this.applyAddFlag = true
92
- this.$nextTick(
93
- () => {
94
- getConfigByName('addApplyForm', 'af-apply', (res) => {
95
- this.$refs.xForm.init({
96
- businessType: '新增',
97
- title: '发起报建',
98
- ...res
99
- })
100
- })
101
- }
102
- )
103
- },
104
- applySubmit (formData) {
105
- runLogic('addApply', formData).then(
106
- res => {
107
- this.$message.success('发起报建成功')
108
- this.$refs.xFormTable.refreshTable(true)
109
- this.applyAddFlag = false
110
- }
111
- ).catch(() => {
112
- this.applyAddFlag = false
113
- })
114
- },
115
- success () {
116
- console.log('完工')
117
- },
118
- toDetail (record, id) {
119
- this.$refs.workFlow.init({
120
- workflowId: record.ab_f_workflow_id
121
- })
122
- },
123
- handleFormItemEvent (func, data, value) {
124
- console.log('打印一下:', func, data, value)
125
- if (func === 'selectAddress') {
126
- this.$refs.addressSelect.setFormShow()
127
- }
128
- },
129
- setForm (record) {
130
- this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
131
- },
132
- nextClick ({ form, formStep, workflowId }) {
133
- console.log('success', form, formStep, workflowId)
134
- const data = {
135
- workflowId,
136
- form,
137
- formStep
138
- }
139
- runLogic('applySubmitAfter', data, 'af-apply').then(
140
- res => {
141
- if (res) {
142
- // this.$message.success('提交成功!')
143
- this.$refs.xFormTable.refreshTable(true)
144
- }
145
- }
146
- )
147
- },
148
- // 协议作废
149
- setCancel (record, refreshFn) {
150
- this.$refs.cancelContract.setCancel(record, refreshFn)
151
- },
152
- // 增值收费新增
153
- chargeAdd (refreshFn) {
154
- this.$refs.addCharge.chargeAdd(this.$refs.workFlow.workflowId, refreshFn)
155
- },
156
- // 协议新增
157
- addContract (refreshFn) {
158
- this.$refs.addContract.addContract(this.$refs.workFlow.workflowId, refreshFn)
159
- },
160
- // 新增用户
161
- addUser (refreshFn) {
162
- if (this.$refs.workFlow.$refs.baseInformation.details.f_workflow_define_name != '团购报建流程') {
163
- this.$message.success('只有团购报建流程才可以新增用户信息!')
164
- return
165
- }
166
- this.$refs.addUser.addUser(this.$refs.workFlow.workflowId, refreshFn)
167
- },
168
- // 编辑用户
169
- editUser (record, refreshFn) {
170
- this.$refs.addUser.editUser(record, refreshFn)
171
- },
172
- // 新增收费
173
- addcharge (refreshFn) {
174
- this.$refs.addApplyCharge.addcharge(this.$refs.workFlow.workflowId, refreshFn)
175
- },
176
- // 报装缴费页面初始化
177
- updateFormData (workflowId) {
178
- if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '报装缴费') {
179
- runLogic('getApplyBusinessrecode', { f_workflow_id: workflowId }, 'af-apply').then((res) => {
180
- this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm(res)
181
- })
182
- } else if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '合同签订') {
183
- runLogic('queryAgreementAmount', { workflowId: workflowId }, 'af-apply').then((res) => {
184
- this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm({ add_amount: res[0].f_contract_money })
185
- })
186
- }
187
- },
188
- // 增值收费单个数据的撤销功能
189
- chargeCancel (record, refreshFn) {
190
- this.$refs.cancel.chargeCancel(record, refreshFn)
191
- },
192
- // 批量撤销(退费)
193
- chargeBatchRefund (selectedRowKeys, selectedRows, refreshFn) {
194
- if (selectedRowKeys.length === 0 || selectedRows.length === 0) {
195
- this.$message.warn('请选择要退费的记录', 5)
196
- return
197
- }
198
- const workflowId = this.$refs.workFlow.workflowId
199
- this.$refs.batchRefund.selectRow(selectedRowKeys, selectedRows, refreshFn, workflowId)
200
- }
201
- }
202
- }
203
- </script>
1
+ <template>
2
+ <div id="beingProcessed">
3
+ <x-form-table
4
+ title="我的工单"
5
+ ref="xFormTable"
6
+ :queryParamsName="queryParamsName"
7
+ :fixed-query-form="{
8
+ users_f_handler_id: currUser.id,
9
+ }"
10
+ @action="toDetail">
11
+ <template #leftButton>
12
+ <a-button @click="addApply">
13
+ <a-icon type="plus"/>
14
+ 发起报建
15
+ </a-button>
16
+ </template>
17
+ </x-form-table>
18
+ <a-modal
19
+ v-model="applyAddFlag"
20
+ :footer="null"
21
+ :dialog-style="{ top: '5rem' }"
22
+ :z-index="1001"
23
+ title="发起报建"
24
+ :destroyOnClose="true">
25
+ <x-add-native-form ref="xForm" @onSubmit="applySubmit"/>
26
+ </a-modal>
27
+ <WorkflowDetail
28
+ ref="workFlow"
29
+ @success="success"
30
+ @nextClick="nextClick"
31
+ @x-form-item-emit-func="handleFormItemEvent"
32
+ >
33
+ </WorkflowDetail>
34
+ <!-- 地址选择器 -->
35
+ <address-select ref="addressSelect" @setAddress="setForm"></address-select>
36
+ </div>
37
+ </template>
38
+
39
+ <script>
40
+ import WorkflowDetail from '@vue2-client/pages/WorkflowDetail/WorkflowDetail.vue'
41
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
42
+ import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
43
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
44
+ import { mapState } from 'vuex'
45
+ import AddressSelect from '@vue2-client/pages/addressSelect/index.vue'
46
+ import XFormGroup from '@vue2-client/base-client/components/common/XFormGroup'
47
+
48
+ export default {
49
+ name: 'Apply',
50
+ components: {
51
+ XFormTable,
52
+ XAddNativeForm,
53
+ WorkflowDetail,
54
+ AddressSelect,
55
+ XFormGroup,
56
+ },
57
+ // 透传给子组件的方法(目前XFormTable接了)
58
+ provide () {
59
+ return {
60
+ generalFunction: {
61
+ setCancel: this.setCancel,
62
+ chargeAdd: this.chargeAdd,
63
+ addUser: this.addUser,
64
+ editUser: this.editUser,
65
+ addContract: this.addContract,
66
+ addcharge: this.addcharge,
67
+ updateFormData: this.updateFormData,
68
+ chargeCancel: this.chargeCancel,
69
+ chargeBatchRefund: this.chargeBatchRefund,
70
+ }
71
+ }
72
+ },
73
+ data () {
74
+ return {
75
+ // 查询配置文件名
76
+ queryParamsName: 'ApplyProcessCRUD',
77
+ // 发起报建弹框控制
78
+ applyAddFlag: false,
79
+ // 提交加载动画
80
+ confirmLoading: false,
81
+ refreshFn: null,
82
+ chargeVisible: false
83
+ }
84
+ },
85
+ computed: {
86
+ ...mapState('account', { currUser: 'user' }),
87
+ },
88
+ methods: {
89
+ addApply () {
90
+ console.log('打开了吗')
91
+ this.applyAddFlag = true
92
+ this.$nextTick(
93
+ () => {
94
+ getConfigByName('addApplyForm', 'af-apply', (res) => {
95
+ this.$refs.xForm.init({
96
+ businessType: '新增',
97
+ title: '发起报建',
98
+ ...res
99
+ })
100
+ })
101
+ }
102
+ )
103
+ },
104
+ applySubmit (formData) {
105
+ runLogic('addApply', formData).then(
106
+ res => {
107
+ this.$message.success('发起报建成功')
108
+ this.$refs.xFormTable.refreshTable(true)
109
+ this.applyAddFlag = false
110
+ }
111
+ ).catch(() => {
112
+ this.applyAddFlag = false
113
+ })
114
+ },
115
+ success () {
116
+ console.log('完工')
117
+ },
118
+ toDetail (record, id) {
119
+ this.$refs.workFlow.init({
120
+ workflowId: record.ab_f_workflow_id
121
+ })
122
+ },
123
+ handleFormItemEvent (func, data, value) {
124
+ console.log('打印一下:', func, data, value)
125
+ if (func === 'selectAddress') {
126
+ this.$refs.addressSelect.setFormShow()
127
+ }
128
+ },
129
+ setForm (record) {
130
+ this.$refs.workFlow.setFormValue({ address: record.f_address, address_id: record.f_address_id })
131
+ },
132
+ nextClick ({ form, formStep, workflowId }) {
133
+ console.log('success', form, formStep, workflowId)
134
+ const data = {
135
+ workflowId,
136
+ form,
137
+ formStep
138
+ }
139
+ runLogic('applySubmitAfter', data, 'af-apply').then(
140
+ res => {
141
+ if (res) {
142
+ // this.$message.success('提交成功!')
143
+ this.$refs.xFormTable.refreshTable(true)
144
+ }
145
+ }
146
+ )
147
+ },
148
+ // 协议作废
149
+ setCancel (record, refreshFn) {
150
+ this.$refs.cancelContract.setCancel(record, refreshFn)
151
+ },
152
+ // 增值收费新增
153
+ chargeAdd (refreshFn) {
154
+ this.$refs.addCharge.chargeAdd(this.$refs.workFlow.workflowId, refreshFn)
155
+ },
156
+ // 协议新增
157
+ addContract (refreshFn) {
158
+ this.$refs.addContract.addContract(this.$refs.workFlow.workflowId, refreshFn)
159
+ },
160
+ // 新增用户
161
+ addUser (refreshFn) {
162
+ if (this.$refs.workFlow.$refs.baseInformation.details.f_workflow_define_name != '团购报建流程') {
163
+ this.$message.success('只有团购报建流程才可以新增用户信息!')
164
+ return
165
+ }
166
+ this.$refs.addUser.addUser(this.$refs.workFlow.workflowId, refreshFn)
167
+ },
168
+ // 编辑用户
169
+ editUser (record, refreshFn) {
170
+ this.$refs.addUser.editUser(record, refreshFn)
171
+ },
172
+ // 新增收费
173
+ addcharge (refreshFn) {
174
+ this.$refs.addApplyCharge.addcharge(this.$refs.workFlow.workflowId, refreshFn)
175
+ },
176
+ // 报装缴费页面初始化
177
+ updateFormData (workflowId) {
178
+ if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '报装缴费') {
179
+ runLogic('getApplyBusinessrecode', { f_workflow_id: workflowId }, 'af-apply').then((res) => {
180
+ this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm(res)
181
+ })
182
+ } else if (this.$refs.workFlow.$refs.baseInformation.details.f_sub_state == '合同签订') {
183
+ runLogic('queryAgreementAmount', { workflowId: workflowId }, 'af-apply').then((res) => {
184
+ this.$refs.workFlow.$refs.workflowHandle.$refs.xAddForm.setForm({ add_amount: res[0].f_contract_money })
185
+ })
186
+ }
187
+ },
188
+ // 增值收费单个数据的撤销功能
189
+ chargeCancel (record, refreshFn) {
190
+ this.$refs.cancel.chargeCancel(record, refreshFn)
191
+ },
192
+ // 批量撤销(退费)
193
+ chargeBatchRefund (selectedRowKeys, selectedRows, refreshFn) {
194
+ if (selectedRowKeys.length === 0 || selectedRows.length === 0) {
195
+ this.$message.warn('请选择要退费的记录', 5)
196
+ return
197
+ }
198
+ const workflowId = this.$refs.workFlow.workflowId
199
+ this.$refs.batchRefund.selectRow(selectedRowKeys, selectedRows, refreshFn, workflowId)
200
+ }
201
+ }
202
+ }
203
+ </script>
@@ -60,14 +60,12 @@ path: 'example',
60
60
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
61
61
  // component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
62
62
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
63
- // component: () => import('@vue2-client/base-client/components/common/HIS/demo.vue'),
64
- // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
63
+ component: () => import('@vue2-client/base-client/components/common/HIS/demo.vue'),
65
64
  // component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
66
65
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
67
66
  // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
68
67
  // component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
69
68
  // component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
70
- // component: () => import('@vue2-client/base-client/components/his/XCharge/XChargeDemo.vue'),
71
69
  // component: () => import('@vue2-client/base-client/components/his/XImportExcelButton/XFrontImportExcelDemo.vue'),
72
70
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
73
71
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
@@ -1,45 +0,0 @@
1
- <template>
2
- <div id="xreport-hosp-demo">
3
- <a-space style="margin-bottom: 12px;">
4
- <a-button type="primary" @click="doInit">手动初始化</a-button>
5
- </a-space>
6
- <XReport
7
- ref="reportRef"
8
- :edit-mode="true"
9
- :show-save-button="true"
10
- :show-img-in-cell="false"
11
- :use-oss-for-img="false"
12
- server-name="af-his"
13
- @updateImg="onUpdateImg"/>
14
- </div>
15
- </template>
16
-
17
- <script setup>
18
- import { ref } from 'vue'
19
- import XReport from '@vue2-client/base-client/components/common/XReport'
20
-
21
- const reportRef = ref(null)
22
-
23
- const payload = {
24
- arr: [
25
- { BQ: '病房区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
26
- { BQ: '感染科', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
27
- { BQ: '骨科病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
28
- { BQ: '呼吸科病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
29
- { BQ: '急症科病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 },
30
- { BQ: '内科二病区', RY: 0, CY: 0, CW: 0, SW: 0, SS: 0, ZC: 0, ZR: 0, ZY: 0 }
31
- ]
32
- }
33
-
34
- const doInit = async () => {
35
- if (!reportRef.value || !reportRef.value.init) return
36
- await reportRef.value.init({
37
- configName: 'hospitalizationStatsReport',
38
- configData: payload
39
- })
40
- }
41
-
42
- const onUpdateImg = data => {
43
- console.warn('updateImg:', data)
44
- }
45
- </script>
File without changes