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,32 +1,80 @@
1
- <script setup lang="ts">
1
+ <script setup>
2
2
  import XTab from '@vue2-client/base-client/components/common/XTab/XTab.vue'
3
- import { ref } from 'vue'
4
-
5
- defineProps({
6
- // HTab特有的属性
7
- hasTopMargin: {
8
- type: Boolean,
9
- default: true
10
- },
11
- // 是否启用 style7 样式(细下划线、自适应)
12
- useStyle7: {
13
- type: Boolean,
14
- default: false
15
- },
16
- // 是否叠加圆点样式(仅在 useStyle7 true 时生效)
17
- useCycle: {
18
- type: Boolean,
19
- default: false
20
- },
21
- useStyle8: {
22
- type: Boolean,
23
- default: false
3
+ import { ref, computed, useAttrs, useSlots, watch, onMounted } from 'vue'
4
+ import { getConfigByName } from '@vue2-client/services/api/common'
5
+
6
+ const props = defineProps({
7
+ // 标签栏右侧附加区域的配置名(可选)。提供时将自动加载配置并渲染到 tabBar 右侧。
8
+ tabBarExtraConfig: {
9
+ type: String,
10
+ default: undefined
11
+ }
12
+ })
13
+
14
+ // 兼容多种样式配置
15
+ const attrs = useAttrs()
16
+ const wrapperClassObject = computed(() => {
17
+ const a = attrs
18
+ const classes = {}
19
+
20
+ // 通用布尔样式开关(以存在/空字符串/'true' 为真)
21
+ const booleanStyleKeys = [
22
+ 'hasTopMargin', 'useStyle7', 'useCycle', 'useStyle8'
23
+ ]
24
+ for (const key of booleanStyleKeys) {
25
+ const val = a[key]
26
+ const truthy = val === true || val === '' || val === 'true'
27
+ if (truthy) classes[`h-tab-${key}`] = true
24
28
  }
29
+ return classes
25
30
  })
26
31
 
27
32
  // 创建对XTab组件的引用
28
33
  const xTabRef = ref()
29
34
 
35
+ // 获取插槽(避免模板中直接使用 $slots 触发类型检查错误)
36
+ const slots = useSlots()
37
+ const slotNames = computed(() => {
38
+ try {
39
+ return Object.keys(slots || {})
40
+ } catch (e) {
41
+ return []
42
+ }
43
+ })
44
+
45
+ // 右侧附加区域的动态配置
46
+ const extraConfig = ref(null)
47
+ const extraItems = computed(() => {
48
+ const cfg = extraConfig.value
49
+ return cfg && cfg.value ? cfg.value : []
50
+ })
51
+
52
+ // 本地异步组件映射(未全局注册时生效)
53
+ const localMap = {
54
+ 'x-input': () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
55
+ 'x-select': () => import('@vue2-client/base-client/components/his/XSelect/XSelect.vue'),
56
+ 'x-radio': () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
57
+ 'x-buttons': () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
58
+ 'h-buttons': () => import('@vue2-client/base-client/components/common/HIS/HButtons/HButtons.vue')
59
+ }
60
+
61
+ // 从 attrs 中读取 serverName 与 env(保持向后兼容)
62
+ const serverName = computed(() => (attrs && attrs.serverName))
63
+ const env = computed(() => (attrs && attrs.env) || 'prod')
64
+
65
+ const loadExtraConfig = (configName) => {
66
+ if (!configName) {
67
+ extraConfig.value = null
68
+ return
69
+ }
70
+ getConfigByName(configName, serverName.value, (res) => {
71
+ extraConfig.value = res
72
+ }, env.value === 'dev')
73
+ }
74
+
75
+ onMounted(() => loadExtraConfig(props.tabBarExtraConfig))
76
+ watch(() => props.tabBarExtraConfig, loadExtraConfig)
77
+
30
78
  // 暴露方法给父组件使用
31
79
  defineExpose({
32
80
  // 为了兼容性,保留getXTabInstance方法
@@ -37,16 +85,32 @@ defineExpose({
37
85
  <template>
38
86
  <div
39
87
  class="h-tab-wrapper"
40
- :class="{ 'h-tab-has-top-margin': hasTopMargin,
41
- 'h-tab-style7': useStyle7,
42
- 'h-tab-cycle': useStyle7 && useCycle,
43
- 'h-tab-style8': useStyle8}">
88
+ :class="[wrapperClassObject, extraItems.length > 1 ? 'h-tab-extra-wrapper-multiple' : '']">
44
89
  <x-tab
45
90
  ref="xTabRef"
46
91
  v-bind="$attrs"
47
92
  v-on="$listeners"
48
93
  >
49
- <template v-for="(_, name) in $slots" #[name]="slotData">
94
+ <template v-if="extraItems.length" #tabBarExtraContent>
95
+ <!-- 父级可接管渲染;未提供则按配置兜底渲染 -->
96
+ <slot name="tabBarExtraContent" :config="extraConfig" :items="extraItems">
97
+ <div class="h-tab-extra-wrapper">
98
+ <component
99
+ v-for="(item, idx) in extraItems"
100
+ :is="localMap[item.slotType] || item.slotType"
101
+ :key="idx"
102
+ :ref="item.slotRef || `extra_${idx}`"
103
+ :serviceName="item.serviceName || serverName"
104
+ :serverName="item.serviceName || serverName"
105
+ :queryParamsName="item.slotConfig"
106
+ :env="env"
107
+ v-on="$listeners"
108
+ v-bind="item.attrs"
109
+ />
110
+ </div>
111
+ </slot>
112
+ </template>
113
+ <template v-for="name in slotNames" #[name]="slotData">
50
114
  <slot :name="name" v-bind="slotData" />
51
115
  </template>
52
116
  </x-tab>
@@ -109,7 +173,7 @@ defineExpose({
109
173
  }
110
174
 
111
175
  // 带顶部边距的样式
112
- &.h-tab-has-top-margin {
176
+ &.h-tab-hasTopMargin {
113
177
  :deep(.ant-tabs-nav) {
114
178
  margin-top: 6px;
115
179
  }
@@ -128,7 +192,7 @@ defineExpose({
128
192
  }
129
193
 
130
194
  // 通用样式7:细下划线、透明背景、可配置宽度
131
- &.h-tab-style7 {
195
+ &.h-tab-useStyle7 {
132
196
  :deep(.ant-tabs-tab-next),
133
197
  :deep(.ant-tabs-tab-prev-icon-target),
134
198
  :deep(.ant-tabs-tab-next-icon) { display: none; }
@@ -177,7 +241,7 @@ defineExpose({
177
241
  }
178
242
 
179
243
  // 可选:标签左侧圆点
180
- &.h-tab-cycle {
244
+ &.h-tab-useCycle {
181
245
  :deep(.ant-tabs-tab) {
182
246
  position: relative;
183
247
  padding-left: 18px !important;
@@ -209,7 +273,7 @@ defineExpose({
209
273
  }
210
274
  }
211
275
  // 用户词条使用样式
212
- &.h-tab-style8 {
276
+ &.h-tab-useStyle8 {
213
277
  :deep(.ant-tabs-tab-next),
214
278
  :deep(.ant-tabs-tab-prev-icon-target),
215
279
  :deep(.ant-tabs-tab-next-icon) { display: none; }
@@ -289,5 +353,30 @@ defineExpose({
289
353
  display: none; // 隐藏下划线
290
354
  }
291
355
  }
356
+ &.h-tab-extra-wrapper-multiple {
357
+ :deep(.h-tab-extra-wrapper){
358
+ display: flex;
359
+ justify-content: end;
360
+ gap: 8px;
361
+ }
362
+ :deep(.x-radio-group){
363
+ height: 32px;
364
+ }
365
+ :deep(.x-radio-item){
366
+ height: 32px;
367
+ display: flex;
368
+ align-items: center;
369
+ margin-bottom: 0px;
370
+ }
371
+ :deep(.ant-tabs-tab){
372
+ height: 34px;
373
+ }
374
+ :deep(.ant-tabs-nav-container){
375
+ padding-top: 2px;
376
+ }
377
+ :deep(.ant-tabs-extra-content){
378
+ line-height: 0px !important;
379
+ }
380
+ }
292
381
  }
293
382
  </style>
@@ -1,61 +1,61 @@
1
- <template>
2
- <div class="h-tab-demo">
3
- <!-- &lt;!&ndash; XTab &ndash;&gt;-->
4
- <!-- <a-card title="XTab">-->
5
- <!-- <h-tab-->
6
- <!-- configName="openPrescriptionTab"-->
7
- <!-- serverName="af-his"-->
8
- <!-- />-->
9
- <!-- </a-card>-->
10
-
11
- <!-- HFormTable -->
12
- <a-card title="HFormTable" style="margin-top: 20px;">
13
- <h-form-table
14
- queryParamsName="outpatientAdviceAllCRUD"
15
- serviceName="af-his"
16
- />
17
- </a-card>
18
-
19
- <!-- HForm -->
20
- <a-card title="HAddNativeForm" style="margin-top: 20px;">
21
- <h-add-native-form
22
- queryParamsName="TCMAdviceFormConfig"
23
- serviceName="af-his"
24
- />
25
- </a-card>
26
- <!-- <a-card title="HFormGroup" style="margin-top: 20px;">-->
27
- <!-- <h-form-group-->
28
- <!-- queryParamsName="surgeryApplicationFormGroup"-->
29
- <!-- serviceName="af-his"-->
30
- <!-- :left-hide="true"-->
31
- <!-- />-->
32
- <!-- </a-card>-->
33
- <!-- &lt;!&ndash; HButtons &ndash;&gt;-->
34
- <!-- <a-card title="HButtons" style="margin-top: 20px;">-->
35
- <!-- <h-buttons-->
36
- <!-- queryParamsName="outpatientAdviceGroup"-->
37
- <!-- serviceName="af-his"-->
38
- <!-- />-->
39
- <!-- </a-card>-->
40
- </div>
41
- </template>
42
-
43
- <script setup>
44
- // import HTab from './HTab/HTab.vue'
45
- import HFormTable from './HFormTable/HFormTable.vue'
46
- // import HButtons from './HButtons/HButtons.vue'
47
- import HAddNativeForm from '@vue2-client/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm.vue'
48
- // import HFormGroup from './HFormGroup/HFormGroup.vue'
49
- </script>
50
-
51
- <style scoped lang="less">
52
- .h-tab-demo {
53
- padding: 20px;
54
-
55
- h4 {
56
- color: #333;
57
- margin-bottom: 10px;
58
- font-size: 14px;
59
- }
60
- }
61
- </style>
1
+ <template>
2
+ <div class="h-tab-demo">
3
+ <!-- &lt;!&ndash; XTab &ndash;&gt;-->
4
+ <!-- <a-card title="XTab">-->
5
+ <!-- <h-tab-->
6
+ <!-- configName="openPrescriptionTab"-->
7
+ <!-- serverName="af-his"-->
8
+ <!-- />-->
9
+ <!-- </a-card>-->
10
+
11
+ <!-- HFormTable -->
12
+ <a-card title="HFormTable" style="margin-top: 20px;">
13
+ <h-form-table
14
+ queryParamsName="outpatientAdviceAllCRUD"
15
+ serviceName="af-his"
16
+ />
17
+ </a-card>
18
+
19
+ <!-- HForm -->
20
+ <a-card title="HAddNativeForm" style="margin-top: 20px;">
21
+ <h-add-native-form
22
+ queryParamsName="TCMAdviceFormConfig"
23
+ serviceName="af-his"
24
+ />
25
+ </a-card>
26
+ <!-- <a-card title="HFormGroup" style="margin-top: 20px;">-->
27
+ <!-- <h-form-group-->
28
+ <!-- queryParamsName="surgeryApplicationFormGroup"-->
29
+ <!-- serviceName="af-his"-->
30
+ <!-- :left-hide="true"-->
31
+ <!-- />-->
32
+ <!-- </a-card>-->
33
+ <!-- &lt;!&ndash; HButtons &ndash;&gt;-->
34
+ <!-- <a-card title="HButtons" style="margin-top: 20px;">-->
35
+ <!-- <h-buttons-->
36
+ <!-- queryParamsName="outpatientAdviceGroup"-->
37
+ <!-- serviceName="af-his"-->
38
+ <!-- />-->
39
+ <!-- </a-card>-->
40
+ </div>
41
+ </template>
42
+
43
+ <script setup>
44
+ // import HTab from './HTab/HTab.vue'
45
+ import HFormTable from './HFormTable/HFormTable.vue'
46
+ // import HButtons from './HButtons/HButtons.vue'
47
+ import HAddNativeForm from '@vue2-client/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm.vue'
48
+ // import HFormGroup from './HFormGroup/HFormGroup.vue'
49
+ </script>
50
+
51
+ <style scoped lang="less">
52
+ .h-tab-demo {
53
+ padding: 20px;
54
+
55
+ h4 {
56
+ color: #333;
57
+ margin-bottom: 10px;
58
+ font-size: 14px;
59
+ }
60
+ }
61
+ </style>